Commit c4f03db
* Specs and plans complete, start loop
* feat: US-001 - McpSandboxBackend class skeleton and constructor
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-003 through US-009 - MCP session init, execute, file ops, health, close
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-010 through US-014 - Unit tests for MCP sandbox backend
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-015, US-016 - Add MCP to SandboxType enum and settings schema
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-017, US-018, US-019 - MCP sandbox factory, dispatch rules, error helper
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-020, US-021 - Wire mcp_sandbox_url through LLMController and stream_generator
- _resolve_user_settings() returns 4-tuple (model, api_key, default_sandbox, mcp_sandbox_url)
- mcp_sandbox_url passed to resolve_sandbox_backend() in llm_invoke() and stream_generator()
- MCP error handling in both llm_invoke() and stream_generator() mirroring Daytona pattern
- stream_generator() emits mcp_sandbox_unreachable SSE event on MCP failure
- Auto mode falls back to State backend on MCP errors
- Updated controller unit tests for 4-tuple return value
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-022 - Wire mcp_sandbox_url through worker tasks
- _execute_agent_stream() reads settings.default_mcp_sandbox_url
- Value passed to resolve_sandbox_backend() with mcp_sandbox_url parameter
- MCP error handling: sandbox_type='mcp' writes mcp_sandbox_unreachable to Redis stream
- Auto mode with effective_type='mcp' falls back to State backend and retries
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-036 through US-044 - Frontend MCP sandbox UX
- SandboxType extended with 'mcp', normalizeSandboxValue recognizes 'mcp'
- mcp_sandbox_url added to DefaultsResponse and patchDefaults types
- MCP entry added to SANDBOX_OPTIONS
- MCP Sandbox URL input in SandboxSettings (persists on blur/Enter)
- MCP option visibility gated on non-empty mcp_sandbox_url
- useSandboxHealth hook pings derived /health endpoint
- Green/red health dot in SandboxSettings and ThreadSandboxStatus
- mcp_sandbox_unreachable SSE event shows persistent error toast
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-046 through US-059 - Native MCP tool overrides with graceful degradation
- Tool discovery: _ensure_initialized() calls tools/list, caches in _available_tools
- _parse_meta() extracts exit_code and sandbox_id from _meta structure
- id property returns _meta.sandbox_id when available, fallback to local format
- execute() uses 'execute' tool on new servers, 'exec_command' on old
- Native overrides: read(), write(), edit(), grep_raw(), glob_info(), ls_info()
- Native upload_files()/download_files() via upload_file/download_file MCP tools
- All methods fall back to super() (inherited shell delegation) when native tools unavailable
- _parse_json_lines() helper for grep/glob/ls JSON lines parsing
- 75 unit tests covering native paths, fallback paths, _meta parsing, graceful degradation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: MCP sandbox API key wiring, unified settings UX, file sync, and health proxy
Wire MCP_SANDBOX_API_KEY end-to-end using provider keys pattern (encrypted
storage). Redesign sandbox settings so MCP config (URL + API key) only appears
when MCP is selected. Fix McpSandboxBackend SSE response parsing for
Streamable HTTP transport, populate files_update on write/edit for frontend
file sync, and add backend health-check proxy to bypass CORS.
- Add MCP_SANDBOX_API_KEY to UserTokenKey enum and env fallback
- Wire mcp_api_key through agents factory, LLMController, stream_generator,
and worker tasks
- Redesign SandboxSettings: conditional MCP config panel with URL, API key,
save button, and live health status
- MCP option always visible in sandbox dropdown (settings + thread selector)
- Add _parse_sse_json() to handle SSE-framed MCP responses (fixes tool
discovery and all tool calls against new exec_server)
- Return files_update from McpSandboxBackend.write() and edit() so files
propagate to frontend file editor panel
- Add GET /settings/mcp-sandbox-health proxy endpoint; update useSandboxHealth
hook to use backend proxy instead of direct browser fetch
- Update tests for 5-tuple _resolve_user_settings and SSE mock responses
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* chore: update wiki and sandboxes submodules
- wiki: MCP sandbox docs (10 tools, Default Sandbox UX, health check)
- sandboxes: CI pipeline with conformance tests on branch push and tag create
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
---------
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3dffdac commit c4f03db
37 files changed
Lines changed: 7444 additions & 54 deletions
File tree
- .claude
- plans
- specs/feat-890-mcp-sandbox
- backend
- src
- agents
- constants
- controllers
- repos
- routes/v0
- schemas/entities
- utils
- workers
- tests/unit
- agents
- controllers
- frontend/src
- components
- settings
- status
- hooks
- lib
- config
- services
- tasks
Large diffs are not rendered by default.
Lines changed: 395 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 199 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 356 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 256 additions & 0 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
0 commit comments