chore(conductor): Mark track 'Saved Tool Presets' as complete
This commit is contained in:
@@ -65,7 +65,7 @@ def get_model_for_role(role: str, failure_count: int = 0) -> str:
|
||||
elif role == 'tier2-tech-lead' or role == 'tier2':
|
||||
return 'gemini-3-flash-preview'
|
||||
elif role == 'tier3-worker' or role == 'tier3':
|
||||
return 'gemini-3-flash-preview'
|
||||
return 'gemini-3-flash-preview'
|
||||
elif role == 'tier4-qa' or role == 'tier4':
|
||||
return 'gemini-2.5-flash-lite'
|
||||
else:
|
||||
@@ -129,7 +129,7 @@ def get_dependencies(filepath: str) -> list[str]:
|
||||
print(f"Error getting dependencies for {filepath}: {e}")
|
||||
return []
|
||||
|
||||
def execute_agent(role: str, prompt: str, docs: list[str], debug: bool = False, failure_count: int = 0) -> str:
|
||||
def execute_agent(role: str, prompt: str, docs: list[str], debug: bool = False, failure_count: int = 0, tool_preset: str | None = None) -> str:
|
||||
model = get_model_for_role(role, failure_count)
|
||||
|
||||
# Advanced Context: Dependency skeletons for Tier 3
|
||||
@@ -199,12 +199,14 @@ def execute_agent(role: str, prompt: str, docs: list[str], debug: bool = False,
|
||||
try:
|
||||
env = os.environ.copy()
|
||||
env["GEMINI_CLI_HOOK_CONTEXT"] = "mma_headless"
|
||||
if tool_preset is not None:
|
||||
env["SLOP_TOOL_PRESET"] = tool_preset
|
||||
if debug:
|
||||
print("--- MMA DEBUG ---")
|
||||
print(f"Executing Command: {cmd}")
|
||||
print("Relevant Environment Variables:")
|
||||
for key, value in env.items():
|
||||
if key.startswith("GEMINI_CLI_"):
|
||||
if key.startswith("GEMINI_CLI_") or key == "SLOP_TOOL_PRESET":
|
||||
print(f" {key}={value}")
|
||||
process = subprocess.run(cmd, input=command_text, capture_output=True, text=True, encoding='utf-8', env=env)
|
||||
if debug:
|
||||
@@ -257,6 +259,11 @@ def create_parser() -> argparse.ArgumentParser:
|
||||
default=0,
|
||||
help="Number of times this task has failed previously"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--tool-preset",
|
||||
type=str,
|
||||
help="The tool preset to use"
|
||||
)
|
||||
parser.add_argument(
|
||||
"prompt",
|
||||
type=str,
|
||||
@@ -272,6 +279,7 @@ def main() -> None:
|
||||
prompt = args.prompt
|
||||
debug = args.debug
|
||||
failure_count = args.failure_count
|
||||
tool_preset = args.tool_preset
|
||||
docs = []
|
||||
if args.task_file and os.path.exists(args.task_file):
|
||||
with open(args.task_file, "rb") as f:
|
||||
@@ -282,6 +290,7 @@ def main() -> None:
|
||||
# Only override debug if it's explicitly set in the task file (optional)
|
||||
debug = task_data.get("debug", debug)
|
||||
failure_count = task_data.get("failure_count", failure_count)
|
||||
tool_preset = task_data.get("tool_preset", tool_preset)
|
||||
if not role or not prompt:
|
||||
parser.print_help()
|
||||
return
|
||||
@@ -293,8 +302,8 @@ def main() -> None:
|
||||
for ref in file_refs:
|
||||
if os.path.exists(ref) and ref not in docs:
|
||||
docs.append(ref)
|
||||
print(f"Executing role: {role} with docs: {docs} (debug={debug}, failure_count={failure_count})")
|
||||
result = execute_agent(role, prompt, docs, debug=debug, failure_count=failure_count)
|
||||
print(f"Executing role: {role} with docs: {docs} (debug={debug}, failure_count={failure_count}, tool_preset={tool_preset})")
|
||||
result = execute_agent(role, prompt, docs, debug=debug, failure_count=failure_count, tool_preset=tool_preset)
|
||||
print(result)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
9
scripts/tasks/mma_exec_tool_presets.toml
Normal file
9
scripts/tasks/mma_exec_tool_presets.toml
Normal file
@@ -0,0 +1,9 @@
|
||||
prompt = """
|
||||
In scripts/mma_exec.py:
|
||||
1. In 'create_parser', add '--tool-preset' argument.
|
||||
2. In 'execute_agent', add 'tool_preset: str | None = None' parameter.
|
||||
3. Inside 'execute_agent', if 'tool_preset' is not None, set 'env["SLOP_TOOL_PRESET"] = tool_preset'.
|
||||
4. In 'main', extract 'tool_preset' from 'args.tool_preset' or 'task_data.get("tool_preset")'.
|
||||
5. Pass 'tool_preset' to the 'execute_agent' call.
|
||||
Use 1-space indentation.
|
||||
"""
|
||||
6
scripts/tasks/multi_agent_tool_presets.toml
Normal file
6
scripts/tasks/multi_agent_tool_presets.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
prompt = """
|
||||
In src/multi_agent_conductor.py:
|
||||
1. In 'ConductorEngine.run' (around line 225), when creating the 'WorkerContext' instance, include 'tool_preset=self.tier_usage["Tier 3"]["tool_preset"]'.
|
||||
2. In 'run_worker_lifecycle' (around line 315), after the 'ai_client.set_provider' call, add a call to 'ai_client.set_tool_preset(context.tool_preset)'.
|
||||
Use 1-space indentation.
|
||||
"""
|
||||
5
scripts/tasks/test_harness_tool_presets.toml
Normal file
5
scripts/tasks/test_harness_tool_presets.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
prompt = """
|
||||
1. In tests/conftest.py, add 'env["SLOP_GLOBAL_TOOL_PRESETS"] = str((temp_workspace / "tool_presets.toml").absolute())' to the 'live_gui' fixture after the SLOP_GLOBAL_PRESETS line.
|
||||
2. In src/paths.py, update 'get_global_tool_presets_path' to return 'Path(os.environ.get("SLOP_GLOBAL_TOOL_PRESETS", root_dir / "tool_presets.toml"))'.
|
||||
Use 1-space indentation.
|
||||
"""
|
||||
9
scripts/tasks/tier_tool_presets.toml
Normal file
9
scripts/tasks/tier_tool_presets.toml
Normal file
@@ -0,0 +1,9 @@
|
||||
prompt = """
|
||||
In src/gui_2.py, modify '_render_mma_dashboard' inside the 'Tier Model Config' collapsing header (around line 2706):
|
||||
1. For each tier row, add a 'Tool Preset' combo box.
|
||||
2. Populate the combo box with sorted names of tool presets from 'self.controller.tool_presets'.
|
||||
3. Include an option 'None' (default) which clears the preset.
|
||||
4. Save the selected preset name into 'self.mma_tier_usage[tier]["tool_preset"]'.
|
||||
5. Adjust item widths (e.g., Provider: 80, Model: 150, Preset: -1) to ensure they all fit on one line or look organized.
|
||||
Use 1-space indentation.
|
||||
"""
|
||||
16
scripts/tasks/tool_preset_modal.toml
Normal file
16
scripts/tasks/tool_preset_modal.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
prompt = """
|
||||
In src/gui_2.py:
|
||||
1. In 'App.__init__', initialize tool preset editing state:
|
||||
self._editing_tool_preset_name = ''
|
||||
self._editing_tool_preset_categories = {}
|
||||
self._editing_tool_preset_scope = 'project'
|
||||
self._selected_tool_preset_idx = -1
|
||||
2. Implement 'App._render_tool_preset_manager_modal(self)'. Use 'imgui.begin_popup_modal("Tool Preset Manager", self.show_tool_preset_manager_modal)'.
|
||||
3. The modal should have a split layout using child regions:
|
||||
- Left (fixed width): Listbox of all tool presets from 'self.controller.tool_presets'.
|
||||
- Right (flexible): Fields to edit name, scope (radio), and a tree-view to manage categories and tools.
|
||||
4. For each category in editing state, show tools. Since we can't easily add NEW tools to categories in this UI yet, focus on editing the approval of EXISTING tools in the category.
|
||||
5. Add 'Save' and 'Delete' buttons that call 'self.controller._cb_save_tool_preset' and 'self.controller._cb_delete_tool_preset'.
|
||||
6. Call '_render_tool_preset_manager_modal' in '_gui_func'.
|
||||
Use 1-space indentation.
|
||||
"""
|
||||
Reference in New Issue
Block a user