Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/pure-mcp-refactor.yml
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
Comment on lines +19 to +22

Copy link
Copy Markdown

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/checkout persists the contents: write token in Git configuration. node scripts/refactor-pure-mcp.mjs and npm ci then run before the intended push step. Set persist-credentials: false. Provide the token only to the final git push command.

🧰 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
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pure-mcp-refactor.yml around lines 19 - 22, Update the
actions/checkout step in the workflow to set persist-credentials to false,
preventing the write token from being stored during npm ci and node
scripts/refactor-pure-mcp.mjs. Pass the token explicitly only to the final git
push command.

Source: Linters/SAST tools


- 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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, git commit exits with status 1 and marks the workflow as failed. Exit successfully when the staged diff is empty.

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

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- 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
- 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
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
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pure-mcp-refactor.yml around lines 46 - 52, Update the
“Commit verified refactor” step so it checks whether staging via git add -A
produced any changes before running git commit. When the staged diff is empty,
skip the commit and push path and exit successfully; retain the existing commit
and push behavior when changes are present.

34 changes: 34 additions & 0 deletions docs/pure-mcp-refactor-plan.md
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.
Loading