MCP tools now have context-aware permissions:
- In headless mode: automatically allowed (no user to ask)
- In TUI mode: require user confirmation (ask permission)
Previously, MCP tools fell under the wildcard '*' policy which defaults to
'ask' permission. In headless mode, tools with 'ask' permission are filtered
out to prevent the AI from seeing tools it cannot call. This caused MCP tools
to be unavailable in headless mode unless explicitly allowed via command-line
flags or agent file configuration.
Implementation:
- Added generateHeadlessPolicies() method to ToolPermissionService
- Headless policies inject 'mcp__*' allow policy before other policies
- Default policies keep MCP tools as 'ask' (appropriate for TUI mode)
- Headless policy only applies when isHeadless flag is true
Benefits:
- ✅ MCP tools work in headless mode without explicit --allow flags
- ✅ MCP tools still require confirmation in TUI mode for safety
- ✅ Consistent with agent file behavior
- ✅ Maintains security for other unmatched tools
Changes:
- Added generateHeadlessPolicies() in ToolPermissionService
- Updated initializeSync to include headless policies
- Added comprehensive tests for headless mode behavior
- Updated documentation to reflect context-aware permissions
Co-authored-by: dallin <dallin@continue.dev>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
- Update IntroMessage.tsx to display 'Config:' instead of 'Agent:'
- Update IntroMessage.test.tsx to match new label
- Update ServiceDebugger.tsx to use consistent 'Config:' label
This change provides clearer terminology for users.
Co-authored-by: dallin <dallin@continue.dev>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
When hub loading fails for a path that looks like a hub slug (owner/agent)
and is NOT a markdown file, re-throw the hub error instead of showing
"Not a markdown file". This preserves the actual error from the hub
(e.g., network error, auth error, not found) instead of a confusing
generic message.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add mockLoadPackageFromHub.mockRejectedValue() to test that verifies
file reading failure for markdown paths. Without this, the hub would
succeed and the file reading code wouldn't be exercised.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>