Skip to content

Commit 0b47ef8

Browse files
committed
refactor: remove dead production code and stale files
LSP-confirmed 0-usage deletions across packages: - core: graph_cache, cache_manager, parallel_executor, query_optimizer, alerting, metrics_collector, rate_limiter, dead decay methods - cli: query_executor, progress_ui, wizard, dead planning methods - context-code: hybrid_retriever_v1_backup, dead git/bm25/embedding methods - soar: dead assess/retrieve methods - spawner: dead circuit_breaker/heartbeat/observability/recovery methods - examples: heartbeat_monitoring.py Also removes corresponding tests for deleted code.
1 parent d04bff2 commit 0b47ef8

63 files changed

Lines changed: 35 additions & 9378 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/heartbeat_monitoring.py

Lines changed: 0 additions & 233 deletions
This file was deleted.

packages/cli/src/aurora_cli/agent_discovery/parser.py

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -185,99 +185,3 @@ def parse_file(self, path: Path) -> AgentInfo | None:
185185
logger.warning("Validation failed for %s - %s", path, error_msg)
186186
return None
187187

188-
def parse_content(self, content: str, source_file: str | None = None) -> AgentInfo | None:
189-
"""Parse agent metadata from a string containing frontmatter.
190-
191-
Useful for testing or when agent content is provided directly
192-
rather than from a file.
193-
194-
Args:
195-
content: String containing markdown with YAML frontmatter
196-
source_file: Optional source file path to include in metadata
197-
198-
Returns:
199-
AgentInfo if successfully parsed and validated, None otherwise
200-
201-
Example:
202-
>>> parser = AgentParser()
203-
>>> content = '''---
204-
... id: test-agent
205-
... role: Test Agent
206-
... goal: Testing purposes
207-
... ---
208-
... # Test Agent
209-
... '''
210-
>>> agent = parser.parse_content(content)
211-
>>> print(agent.id)
212-
test-agent
213-
214-
"""
215-
try:
216-
post = frontmatter.loads(content)
217-
except Exception as e:
218-
logger.warning(
219-
"Failed to parse frontmatter from content: %s (%s)",
220-
type(e).__name__,
221-
str(e),
222-
)
223-
return None
224-
225-
if not post.metadata:
226-
logger.warning("No frontmatter found in content - expected YAML between --- delimiters")
227-
return None
228-
229-
# Add source_file if provided
230-
metadata = dict(post.metadata)
231-
if source_file:
232-
metadata["source_file"] = source_file
233-
234-
try:
235-
agent = AgentInfo.model_validate(metadata)
236-
logger.debug("Successfully parsed agent %s from content", agent.id)
237-
return agent
238-
239-
except ValidationError as e:
240-
errors = e.errors()
241-
missing_fields = [err["loc"][0] for err in errors if err["type"] == "missing"]
242-
243-
if missing_fields:
244-
logger.warning(
245-
"Validation failed for content - missing required fields: %s",
246-
", ".join(str(f) for f in missing_fields),
247-
)
248-
else:
249-
logger.warning(
250-
"Validation failed for content: %s",
251-
str(e),
252-
)
253-
return None
254-
255-
def extract_frontmatter(self, path: Path) -> dict[str, Any] | None:
256-
"""Extract raw frontmatter without validation.
257-
258-
Useful for debugging or when you need the raw metadata without
259-
Pydantic validation.
260-
261-
Args:
262-
path: Path to the agent markdown file
263-
264-
Returns:
265-
Dictionary of frontmatter metadata, or None if extraction fails
266-
267-
Example:
268-
>>> parser = AgentParser()
269-
>>> raw = parser.extract_frontmatter(Path("agent.md"))
270-
>>> print(raw)
271-
{'id': 'my-agent', 'role': 'My Role', ...}
272-
273-
"""
274-
resolved_path = Path(path).expanduser().resolve()
275-
276-
if not resolved_path.exists() or not resolved_path.is_file():
277-
return None
278-
279-
try:
280-
post = frontmatter.load(resolved_path)
281-
return dict(post.metadata) if post.metadata else None
282-
except Exception:
283-
return None

packages/cli/src/aurora_cli/commands/init_helpers.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -943,20 +943,6 @@ async def configure_mcp_servers(
943943
return created, updated, skipped, validation_warnings
944944

945945

946-
def get_mcp_capable_from_selection(tool_ids: list[str]) -> list[str]:
947-
"""Filter tool IDs to only those that support MCP.
948-
949-
Args:
950-
tool_ids: List of all selected tool IDs
951-
952-
Returns:
953-
List of tool IDs that have MCP support
954-
955-
"""
956-
from aurora_cli.configurators.mcp import MCPConfigRegistry
957-
958-
return [tid for tid in tool_ids if MCPConfigRegistry.supports_mcp(tid)]
959-
960946

961947
def detect_claude_hooks(project_path: Path) -> dict[str, bool]:
962948
"""Detect if Claude Code hooks are configured.

packages/cli/src/aurora_cli/configurators/claude_commands.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,3 @@ async def _update_file_with_markers(
119119
# The template already includes markers, so write as-is
120120
file_path.write_text(new_content, encoding="utf-8")
121121

122-
def get_command_list(self) -> list[str]:
123-
"""Get list of available command names.
124-
125-
Returns:
126-
List of command names that will be created
127-
128-
"""
129-
return list(get_all_command_templates().keys())

0 commit comments

Comments
 (0)