From ca35b3ef48abe6e117adb70b31a8d63662a95a68 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 6 Jun 2026 15:44:52 -0400 Subject: [PATCH] fix(opencode): Remove invalid MCP tools block, add timeout/env, grant subagent access The 46-entry mcp.manual-slop.tools block added in commit 30281843 was invalid per the v1.16.2 schema (McpLocalConfig has additionalProperties: false) and was being silently dropped. Also adds proper MCP server configuration and subagent permission grants. Changes: opencode.json: - Remove the silently-dropped mcp.manual-slop.tools block (46 entries) - Add timeout: 30000 (default 5000 is fragile) - Add environment block with PYTHONPATH, GIT_TERMINAL_PROMPT, GCM_INTERACTIVE, GIT_ASKPASS, HOME so mcp_env.toml values are injected into the MCP server process - Top-level 'tools' block intentionally omitted: schema only accepts boolean values (enable/disable), not description objects. Tool descriptions come from the MCP server's list_tools response (mcp_client.MCP_TOOL_SPECS). .opencode/agents/{tier1-orchestrator,tier2-tech-lead,tier3-worker,tier4-qa,explore}.md: - Add 'manual-slop_*': allow to each agent's permission block so subagents can use the 46 MCP tools (previously defaulted to deny in some permission schemas) general.md: no change (no permission block, defaults to allow all) Verified: - opencode.json is now schema-valid (no more 'Expected boolean' errors) - Both MCP servers connected: MiniMax (2 tools), manual-slop (46 tools) - manual-slop MCP server startup: ~651ms (well under 30s timeout) - All MCP tests pass: test_mcp_config.py + test_mcp_perf_tool.py = 4/4 - Subagent permission blocks confirmed in 'opencode debug config' output --- .opencode/agents/explore.md | 1 + .opencode/agents/tier1-orchestrator.md | 1 + .opencode/agents/tier2-tech-lead.md | 1 + .opencode/agents/tier3-worker.md | 1 + .opencode/agents/tier4-qa.md | 1 + opencode.json | 150 ++----------------------- 6 files changed, 15 insertions(+), 140 deletions(-) diff --git a/.opencode/agents/explore.md b/.opencode/agents/explore.md index 842a85a1..e24e1f77 100644 --- a/.opencode/agents/explore.md +++ b/.opencode/agents/explore.md @@ -12,6 +12,7 @@ permission: "git log*": allow "ls*": allow "dir*": allow + 'manual-slop_*': allow --- You are a fast, read-only agent specialized for exploring codebases. Use this when you need to quickly find files by patterns, search code for keywords, or answer about the codebase. diff --git a/.opencode/agents/tier1-orchestrator.md b/.opencode/agents/tier1-orchestrator.md index b499f566..e3a85841 100644 --- a/.opencode/agents/tier1-orchestrator.md +++ b/.opencode/agents/tier1-orchestrator.md @@ -10,6 +10,7 @@ permission: "git status*": allow "git diff*": allow "git log*": allow + 'manual-slop_*': allow --- STRICT SYSTEM DIRECTIVE: You are a Tier 1 Orchestrator. diff --git a/.opencode/agents/tier2-tech-lead.md b/.opencode/agents/tier2-tech-lead.md index f4bdb0a9..c81bc270 100644 --- a/.opencode/agents/tier2-tech-lead.md +++ b/.opencode/agents/tier2-tech-lead.md @@ -6,6 +6,7 @@ temperature: 0.4 permission: edit: ask bash: ask + 'manual-slop_*': allow --- STRICT SYSTEM DIRECTIVE: You are a Tier 2 Tech Lead. diff --git a/.opencode/agents/tier3-worker.md b/.opencode/agents/tier3-worker.md index 90a136f0..d46a58b7 100644 --- a/.opencode/agents/tier3-worker.md +++ b/.opencode/agents/tier3-worker.md @@ -6,6 +6,7 @@ temperature: 0.3 permission: edit: allow bash: allow + 'manual-slop_*': allow --- STRICT SYSTEM DIRECTIVE: You are a stateless Tier 3 Worker (Contributor). diff --git a/.opencode/agents/tier4-qa.md b/.opencode/agents/tier4-qa.md index c079b884..8eb8650c 100644 --- a/.opencode/agents/tier4-qa.md +++ b/.opencode/agents/tier4-qa.md @@ -10,6 +10,7 @@ permission: "git status*": allow "git diff*": allow "git log*": allow + 'manual-slop_*': allow --- STRICT SYSTEM DIRECTIVE: You are a stateless Tier 4 QA Agent. diff --git a/opencode.json b/opencode.json index 144a3123..62aa4d66 100644 --- a/opencode.json +++ b/opencode.json @@ -27,145 +27,13 @@ "C:\\projects\\manual_slop\\scripts\\mcp_server.py" ], "enabled": true, - "tools": { - "read_file": { - "description": "Read the full UTF-8 content of a file within the allowed project paths" - }, - "list_directory": { - "description": "List files and subdirectories within an allowed directory" - }, - "search_files": { - "description": "Search for files matching a glob pattern within an allowed directory" - }, - "get_file_summary": { - "description": "Get a compact heuristic summary of a file without reading its full content" - }, - "get_file_slice": { - "description": "Read a specific line range from a file" - }, - "set_file_slice": { - "description": "Replace a specific line range in a file with new content" - }, - "edit_file": { - "description": "Replace exact string match in a file. Preserves indentation and line endings" - }, - "get_tree": { - "description": "Returns a directory structure up to a max depth" - }, - "get_git_diff": { - "description": "Returns the git diff for a file or directory" - }, - "py_get_skeleton": { - "description": "Get a skeleton view of a Python file with function signatures and docstrings" - }, - "py_get_code_outline": { - "description": "Get a hierarchical outline of a Python code file with line ranges" - }, - "py_get_definition": { - "description": "Get the full source code for a specific class, function, or method definition" - }, - "py_update_definition": { - "description": "Surgically replace the definition of a class or function in a Python file" - }, - "py_get_signature": { - "description": "Get only the signature part of a Python function or method" - }, - "py_set_signature": { - "description": "Surgically replace only the signature of a Python function or method" - }, - "py_get_class_summary": { - "description": "Get a summary of a Python class listing its methods and their signatures" - }, - "py_get_var_declaration": { - "description": "Get the assignment/declaration line for a variable" - }, - "py_set_var_declaration": { - "description": "Surgically replace a variable assignment/declaration" - }, - "py_get_imports": { - "description": "Parses a file's AST and returns a strict list of its dependencies" - }, - "py_check_syntax": { - "description": "Runs a quick syntax check on a Python file" - }, - "py_get_docstring": { - "description": "Extracts the docstring for a specific module, class, or function" - }, - "py_find_usages": { - "description": "Finds exact string matches of a symbol in a given file or directory" - }, - "py_get_hierarchy": { - "description": "Scans the project to find subclasses of a given class" - }, - "py_remove_def": { - "description": "Excises a specific class or function definition from a Python file using AST" - }, - "py_add_def": { - "description": "Inserts a new definition into a specific context (module level or class)" - }, - "py_move_def": { - "description": "Relocates a definition within a file or across different Python files" - }, - "py_region_wrap": { - "description": "Wraps a specified block of code in #region: Name and #endregion: Name tags" - }, - "ts_c_get_skeleton": { - "description": "Get a skeleton view of a C file" - }, - "ts_cpp_get_skeleton": { - "description": "Get a skeleton view of a C++ file" - }, - "ts_c_get_code_outline": { - "description": "Get a hierarchical outline of a C file with line ranges" - }, - "ts_cpp_get_code_outline": { - "description": "Get a hierarchical outline of a C++ file with line ranges" - }, - "ts_c_get_definition": { - "description": "Get the full source code for a specific function or struct in a C file" - }, - "ts_cpp_get_definition": { - "description": "Get the full source code for a specific class/function/method in a C++ file" - }, - "ts_c_get_signature": { - "description": "Get only the signature part of a C function" - }, - "ts_cpp_get_signature": { - "description": "Get only the signature part of a C++ function or method" - }, - "ts_c_update_definition": { - "description": "Surgically replace the definition of a function in a C file" - }, - "ts_cpp_update_definition": { - "description": "Surgically replace the definition of a class or function in a C++ file" - }, - "derive_code_path": { - "description": "Recursively traces the execution path of a specific function or method" - }, - "web_search": { - "description": "Search the web using DuckDuckGo" - }, - "fetch_url": { - "description": "Fetch the full text content of a URL (stripped of HTML tags)" - }, - "get_ui_performance": { - "description": "Get current UI performance metrics (FPS, Frame Time, CPU, Input Lag)" - }, - "bd_create": { - "description": "Create a new Bead in the active Beads repository" - }, - "bd_update": { - "description": "Update an existing Bead" - }, - "bd_list": { - "description": "List all Beads in the active Beads repository" - }, - "bd_ready": { - "description": "Check if the Beads repository is initialized in the current workspace" - }, - "run_powershell": { - "description": "Run a PowerShell script within the project base directory" - } + "timeout": 30000, + "environment": { + "PYTHONPATH": "C:\\projects\\manual_slop\\src", + "GIT_TERMINAL_PROMPT": "0", + "GCM_INTERACTIVE": "never", + "GIT_ASKPASS": "echo", + "HOME": "C:\\Users\\Ed" } } }, @@ -212,5 +80,7 @@ "*.log" ] }, - "plugin": ["superpowers@git+https://github.com/obra/superpowers.git"] + "plugin": [ + "superpowers@git+https://github.com/obra/superpowers.git" + ] }