Migrate permission system from MCP file-based to stdio-based

Replace MCP permission server with stdio-based permission flow that
communicates directly with Claude CLI via stdin/stdout. This simplifies
the architecture and fixes permission expiration issues.

Key changes:
- Use --permission-prompt-tool stdio and --input-format stream-json
- Handle control_request messages for permission prompts
- Send control_response via stdin to approve/deny
- Check local permissions for auto-approval of pre-approved tools
- Only expire pending permissions when VS Code restarts, not panel close

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
andrepimenta
2025-12-02 18:07:45 +00:00
parent 0764bf8202
commit a156881a08
4 changed files with 479 additions and 206 deletions

View File

@@ -11,4 +11,6 @@ vsc-extension-quickstart.md
**/.vscode-test.*
backup
.claude
claude-code-chat-permissions-mcp/**
claude-code-chat-permissions-mcp/**
node_modules
mcp-permissions.js