Repository navigation
chore(agents): drop tool names that do not exist and dead code in the agent framework - #7085
Conversation
… agent framework The confirmation, risk, grant and document-tool tables named tools that were removed or renamed, and an unused path-permission cache was still loaded from disk on every SessionManager start, so the tables looked complete while hiding real drift. - run_cli_command, query_indexed_documents, index_documents, session_findings, read_document and run_tests (chunk_index) are removed; index_dir becomes the real index_directory it was prefix-matching. - run_tests stays in verification.py: it is a documented name classifier for third-party tools, alongside build/lint/typecheck. - SessionManager no longer reads path_permissions.json and ChatSession drops the field; old session files carrying it still load, and existing path_permissions.json files are left on disk. - Dead audio refinement helpers, SkillDelta.is_overlaid, STATUS_ORPHANED, unused file-snapshot defaults and the PyPDF2 fallback in filesystem_tools are deleted. Closes amd#7072
|
Verdict: Approve with suggestions This is a safe cleanup. It removes tool names that no real tool uses from the confirmation, risk and document-tool tables. It also deletes an unused path-permission cache and some helpers nothing calls. I checked whether dropping Real-world evidenceN/A: no evidence bundle was produced for this run. The change only removes names from internal tables plus dead code, and no command, endpoint or screen changes behaviour for a real tool. The verdict rests on static review and the author's reported test runs (Python, Go 🔍 Technical detailsIssues found 🟢 One stale What I verified
Strengths
|
# Conflicts: # src/gaia/agents/base/call_risk.py
The agent framework's confirmation, risk and document-tool tables listed tools that don't exist, such as
run_cli_commandandquery_indexed_documents. The tables looked complete while describing tools removed or renamed long ago, which hides real drift. A second, unused path-permission cache also wrotepath_permissions.jsonon every session start, alongside the real tool grants. This removes the phantom names, corrects one to the tool it was meant to match, and deletes the dead cache and other uncalled code. Confirmation behaviour for real tools is unchanged, and old session files still load.Closes #7072
Test plan
test_full_tool_bundles×2,test_manifest_tools_count_matches_real_registry); they fail identically without this change, because the browser tools aren't installed in the local environment.path_permissionsloads, and an existingpath_permissions.jsonis left on disk.go build,go vetand thecomponentstests pass. Agent UI:tsc --noEmitis clean and the permission-prompt tests pass (68).🔍 Technical details
run_cli_commandsse_translation.pyandPermissionPrompt.tsx. Its mixin went in #2995;run_shell_commandandwait_for_conditionwere already in every table.query_indexed_documents,index_documents,session_findings,read_documentindex_documentalready covers the prefix match.index_dirindex_directory, the real tool it matched by prefix.run_testschunk_index.py. Kept inverification.py, where the docs list it as a recognised test-run name.gaia_agent/session.py:validate_path,validate_directory,clear_path_permissionsand thepath_permissions.jsonload/save are gone.SkillDelta.is_overlaid,STATUS_ORPHANED, two unused snapshot defaults, and the unreachable PyPDF2 fallback (pypdf>=6.20is pinned).registry.py's warning for YAML-only agents, which a user with an old agent folder still sees.