refactor(mma_exec): remove UNFETTERED_MODULES — all deps use generate_skeleton()
This commit is contained in:
@@ -134,9 +134,6 @@ def execute_agent(role: str, prompt: str, docs: list[str], debug: bool = False,
|
||||
|
||||
# Advanced Context: Dependency skeletons for Tier 3
|
||||
injected_context = ""
|
||||
# Whitelist of modules that sub-agents have "unfettered" (full) access to.
|
||||
# These will be provided in full if imported, instead of just skeletons.
|
||||
UNFETTERED_MODULES: list[str] = ['mcp_client', 'project_manager', 'events', 'aggregate']
|
||||
if role in ['tier3', 'tier3-worker']:
|
||||
for doc in docs:
|
||||
if doc.endswith('.py') and os.path.exists(doc):
|
||||
@@ -150,14 +147,9 @@ def execute_agent(role: str, prompt: str, docs: list[str], debug: bool = False,
|
||||
continue
|
||||
if os.path.exists(dep_file) and dep_file != doc:
|
||||
try:
|
||||
if dep in UNFETTERED_MODULES:
|
||||
with open(dep_file, 'r', encoding='utf-8') as f:
|
||||
full_content = f.read()
|
||||
injected_context += f"\n\nFULL MODULE CONTEXT: {dep_file}\n{full_content}\n"
|
||||
else:
|
||||
with open(dep_file, 'r', encoding='utf-8') as f:
|
||||
skeleton = generate_skeleton(f.read())
|
||||
injected_context += f"\n\nDEPENDENCY SKELETON: {dep_file}\n{skeleton}\n"
|
||||
with open(dep_file, 'r', encoding='utf-8') as f:
|
||||
skeleton = generate_skeleton(f.read())
|
||||
injected_context += f"\n\nDEPENDENCY SKELETON: {dep_file}\n{skeleton}\n"
|
||||
except Exception as e:
|
||||
print(f"Error gathering context for {dep_file}: {e}")
|
||||
# Check for token-bloat safety: if injected_context is too large, truncate it
|
||||
|
||||
Reference in New Issue
Block a user