-
-
Notifications
You must be signed in to change notification settings - Fork 399
Refactor/pure mcp runtime #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,52 @@ | ||||||||||||||||||||||||||||||||||||||
| name: Apply pure MCP refactor | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||||||
| - refactor/pure-mcp-runtime | ||||||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||||||
| - scripts/refactor-pure-mcp.mjs | ||||||||||||||||||||||||||||||||||||||
| - .github/workflows/pure-mcp-refactor.yml | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||
| refactor: | ||||||||||||||||||||||||||||||||||||||
| if: github.actor != 'github-actions[bot]' | ||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||
| ref: refactor/pure-mcp-runtime | ||||||||||||||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||
| node-version: 22 | ||||||||||||||||||||||||||||||||||||||
| cache: npm | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Apply deterministic refactor | ||||||||||||||||||||||||||||||||||||||
| run: node scripts/refactor-pure-mcp.mjs | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Refresh lockfile and install | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| npm install --package-lock-only --ignore-scripts | ||||||||||||||||||||||||||||||||||||||
| npm ci | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Typecheck | ||||||||||||||||||||||||||||||||||||||
| run: npm run typecheck | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Test | ||||||||||||||||||||||||||||||||||||||
| run: npm test | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Build | ||||||||||||||||||||||||||||||||||||||
| run: npm run build | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Commit verified refactor | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| git config user.name "github-actions[bot]" | ||||||||||||||||||||||||||||||||||||||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||||||||||||||||||||||||||||||||||||||
| git add -A | ||||||||||||||||||||||||||||||||||||||
| git commit -m "refactor: make DevSpace a pure MCP runtime" | ||||||||||||||||||||||||||||||||||||||
| git push origin HEAD:refactor/pure-mcp-runtime | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+46
to
+52
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win Handle an already-applied refactor before committing. A push that changes only this workflow still triggers the job. If the refactor and lockfile are already current, Proposed fix git config user.email "41898282+github-actions[bot]`@users.noreply.github.com`"
git add -A
+ if git diff --cached --quiet; then
+ echo "No refactor changes to commit"
+ exit 0
+ fi
git commit -m "refactor: make DevSpace a pure MCP runtime"
git push origin HEAD:refactor/pure-mcp-runtime📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Pure MCP Runtime Refactor | ||
|
|
||
| This branch changes DevSpace from an agent orchestrator into a local MCP execution runtime. | ||
|
|
||
| ## Goal | ||
|
|
||
| Use the MCP host (for example ChatGPT) as the reasoning and coding agent. DevSpace only provides: | ||
|
|
||
| - workspace lifecycle | ||
| - files and search | ||
| - patches | ||
| - native shell execution | ||
| - persistent processes | ||
| - Git worktrees | ||
| - authentication | ||
| - review UI | ||
|
|
||
| ## Removed concept | ||
|
|
||
| DevSpace no longer starts local model providers. Codex, Claude Agent SDK, OpenCode, Cursor/Copilot ACP, and similar adapters are not part of this runtime. | ||
|
|
||
| ## Native mode | ||
|
|
||
| `DEVSPACE_TOOL_MODE=native` exposes a CLI-like environment. The host can use normal development commands and does not receive artificial instructions to avoid shell file operations. | ||
|
|
||
| The security boundary remains explicit: | ||
|
|
||
| - structured file tools are workspace-scoped; | ||
| - shell commands run with local user authority; | ||
| - worktrees provide change isolation, not OS sandboxing. | ||
|
|
||
| ## Migration | ||
|
|
||
| Existing `DEVSPACE_TOOL_MODE=codex` configuration maps to `native` for compatibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Do not persist the write token during repository script execution.
actions/checkoutpersists thecontents: writetoken in Git configuration.node scripts/refactor-pure-mcp.mjsandnpm cithen run before the intended push step. Setpersist-credentials: false. Provide the token only to the finalgit pushcommand.🧰 Tools
🪛 zizmor (1.29.0)
[warning] 19-22: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
🤖 Prompt for AI Agents
Source: Linters/SAST tools