Fixes to mma and conductor.
This commit is contained in:
@@ -126,8 +126,42 @@ def get_dependencies(filepath: str) -> list[str]:
|
||||
print(f"Error getting dependencies for {filepath}: {e}")
|
||||
return []
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import json
|
||||
|
||||
# Mock Response Definitions
|
||||
MOCK_PLANNING_RESPONSE = {
|
||||
"status": "success",
|
||||
"message": "Mock response for planning task.",
|
||||
"data": {
|
||||
"task_type": "planning",
|
||||
"details": "Mocked plan generated."
|
||||
}
|
||||
}
|
||||
|
||||
MOCK_GENERIC_RESPONSE = {
|
||||
"status": "success",
|
||||
"message": "Mock response from the agent.",
|
||||
"data": {
|
||||
"task_type": "generic_mock",
|
||||
"details": "This is a generic mock response."
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def execute_agent(role: str, prompt: str, docs: list[str], debug: bool = False, failure_count: int = 0) -> str:
|
||||
model = get_model_for_role(role, failure_count)
|
||||
|
||||
# --- NEW MOCK HANDLING LOGIC ---
|
||||
if model == 'mock':
|
||||
# The 'prompt' argument here represents the user's task/command text.
|
||||
if "Epic Initialization" in prompt or "Sprint Planning" in prompt:
|
||||
return json.dumps(MOCK_PLANNING_RESPONSE)
|
||||
else:
|
||||
return json.dumps(MOCK_GENERIC_RESPONSE)
|
||||
# --- END NEW MOCK HANDLING LOGIC ---
|
||||
|
||||
# Advanced Context: Dependency skeletons for Tier 3
|
||||
injected_context = ""
|
||||
# Whitelist of modules that sub-agents have "unfettered" (full) access to.
|
||||
@@ -163,6 +197,7 @@ def execute_agent(role: str, prompt: str, docs: list[str], debug: bool = False,
|
||||
if role in ['tier3', 'tier3-worker']:
|
||||
system_directive = "STRICT SYSTEM DIRECTIVE: You are a stateless Tier 3 Worker (Contributor). " \
|
||||
"Your goal is to implement specific code changes or tests based on the provided task. " \
|
||||
"CRITICAL CODE STYLE RULE: ALL Python code MUST use exactly 1 SPACE for indentation. DO NOT use 4 spaces or tabs. " \
|
||||
"You have access to tools for reading and writing files (e.g., read_file, write_file, replace), " \
|
||||
"codebase investigation (discovered_tool_py_get_code_outline, discovered_tool_py_get_skeleton, discovered_tool_py_find_usages, discovered_tool_py_get_imports, discovered_tool_py_check_syntax, discovered_tool_get_tree), " \
|
||||
"version control (discovered_tool_get_git_diff), and web tools (discovered_tool_web_search, discovered_tool_fetch_url). " \
|
||||
|
||||
Reference in New Issue
Block a user