Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
ceda59c
Remove tool naming configuration
Waishnav Jun 21, 2026
b0058b7
Expose only short MCP tool names
Waishnav Jun 21, 2026
bf137c5
Drop legacy tool names from workspace UI
Waishnav Jun 21, 2026
5430542
Remove legacy tool naming documentation
Waishnav Jun 21, 2026
4391bb7
add small NOTE in README.md
Waishnav Jun 27, 2026
f5286f9
Fix Windows allowedRoots bypass (#40)
Ahmed-Hindy Jun 28, 2026
8a8fea9
feat(config): add codex tool mode
Waishnav Jun 21, 2026
908c9a0
feat(tools): add workspace-confined patch engine
Waishnav Jun 21, 2026
a0e6caa
feat(tools): expose apply_patch in codex mode
Waishnav Jun 21, 2026
60c43dc
feat(exec): add resumable process session manager
Waishnav Jun 21, 2026
a4aa58a
feat(exec): expose exec_command and write_stdin
Waishnav Jun 21, 2026
e3938ca
feat(exec): support optional PTY sessions
Waishnav Jun 21, 2026
4fc552d
fix(exec): terminate spawned process groups
Waishnav Jun 21, 2026
6d54923
docs: document codex mode QA and rollout
Waishnav Jun 21, 2026
e70e9bc
fix(config): keep codex tool names stable
Waishnav Jun 21, 2026
b9c0933
feat(ui): add codex tool card payloads
Waishnav Jun 22, 2026
0164595
feat(ui): render codex tool cards
Waishnav Jun 22, 2026
ee1dd50
fix(exec): wait for interrupted process exit
Waishnav Jun 22, 2026
d6bff09
fix(exec): wait after process interactions
Waishnav Jun 22, 2026
ab72d84
refactor(exec): isolate platform shell selection
Waishnav Jun 22, 2026
4d5a37c
fix(exec): terminate process trees on Windows
Waishnav Jun 22, 2026
d02ac26
fix(patch): replace existing files on Windows
Waishnav Jun 22, 2026
fa62642
test(tools): account for cross-platform semantics
Waishnav Jun 22, 2026
557d813
fix(exec): quote Windows commands consistently
Waishnav Jun 22, 2026
fbd45d1
fix(deps): use portable node-pty prebuilds
Waishnav Jun 22, 2026
7eaf319
test(exec): remove timing-only output assertion
Waishnav Jun 22, 2026
fb1a8d9
test(exec): decouple interrupt from output timing
Waishnav Jun 22, 2026
4a672e9
fix(exec): delegate pipe shell quoting to Node
Waishnav Jun 22, 2026
75c2ff6
fix(exec): pass raw commands to Windows PTYs
Waishnav Jun 22, 2026
e3c59e9
test(exec): quote Windows executable paths natively
Waishnav Jun 22, 2026
f900ade
fix(exec): preserve Windows PTY command lines
Waishnav Jun 22, 2026
5bd5af7
test(exec): clean up PTYs after assertions
Waishnav Jun 22, 2026
db8f995
test(exec): avoid PTY line discipline assumptions
Waishnav Jun 22, 2026
afdd4f6
test(exec): use native Windows PTY smoke command
Waishnav Jun 22, 2026
4620f86
fix(exec): pass raw Windows PTY commands
Waishnav Jun 22, 2026
402e94c
fix(deps): update Windows PTY handle fixes
Waishnav Jun 22, 2026
e49cb56
fix(exec): run Windows PTYs through temp scripts
Waishnav Jun 22, 2026
814e1d4
fix(exec): guard Windows PTY listener setup
Waishnav Jun 22, 2026
c1caac5
fix(deps): repair stable node-pty on macOS
Waishnav Jun 22, 2026
3109b22
fix(exec): delay Windows PTY command startup
Waishnav Jun 22, 2026
3988be8
fix(exec): omit PTY signals on Windows
Waishnav Jun 22, 2026
4f1feee
test(exec): allow hosted Windows PTY startup
Waishnav Jun 22, 2026
64319c6
fix(exec): exit Windows PTY scripts explicitly
Waishnav Jun 22, 2026
14ed5f2
fix(deps): combine PTY platform repairs
Waishnav Jun 22, 2026
58f014b
fix(exec): use native Windows PTY command lines
Waishnav Jun 22, 2026
be986c5
fix(exec): start Windows PTYs after listeners
Waishnav Jun 22, 2026
e7cd9fe
fix(exec): fall back from Windows native PTYs
Waishnav Jun 22, 2026
3fd16f1
fix(deps): retain stable Unix PTY support
Waishnav Jun 22, 2026
17fa037
fix(deps): normalize optional pty lock entry
Waishnav Jun 28, 2026
7dfe985
feat: preserve head and tail process output
Waishnav Jun 29, 2026
474aeb8
feat: normalize codex command sessions
Waishnav Jun 29, 2026
7510c54
feat: use numeric process session ids
Waishnav Jun 29, 2026
b43d85f
feat: align apply patch semantics with codex
Waishnav Jun 29, 2026
960fd78
docs: clarify codex patch semantics
Waishnav Jun 29, 2026
89d99c9
Merge pull request #26 from Waishnav/feat/codex-tool-mode
Waishnav Jun 29, 2026
f28552d
fix(skills): discover standard agent skill paths
Waishnav Jun 29, 2026
b1de12e
docs(skills): document standard agent skill paths
Waishnav Jun 29, 2026
2dfe621
fix(skills): make pi project skills opt-in
Waishnav Jun 29, 2026
7d360cc
docs(skills): mark pi project skills as opt-in
Waishnav Jun 29, 2026
3ea42e1
test(skills): set windows home fixture
Waishnav Jun 29, 2026
4ab5e85
fix(skills): resolve configured paths per workspace
Waishnav Jun 29, 2026
f2d6af0
Merge pull request #46 from Waishnav/codex/issue-28-agent-skill-paths
Waishnav Jun 29, 2026
d18851a
docs: remove internal codex tool mode QA doc
Waishnav Jun 29, 2026
e31b923
Release v1.0.3
Waishnav Jun 29, 2026
71e9c1c
Merge remote-tracking branch 'origin/main' into refactor/short-tool-n…
Waishnav Jun 30, 2026
6607926
Merge pull request #24 from Waishnav/refactor/short-tool-names-only
Waishnav Jun 30, 2026
943d6d6
test(ui): classify apply patch cards separately
Waishnav Jun 30, 2026
46e99a6
fix(ui): render apply patch as multi-file diff
Waishnav Jun 30, 2026
02bda1f
fix(apply-patch): stage changes before writing
Waishnav Jun 30, 2026
db7d4f6
docs(apply-patch): describe staged writes
Waishnav Jun 30, 2026
2d2c47f
fix(apply-patch): generate multi-hunk diffs
Waishnav Jun 30, 2026
daa729a
test(apply-patch): cover review edge cases
Waishnav Jun 30, 2026
466e8cc
refactor(ui): derive apply patch card title
Waishnav Jun 30, 2026
82b3004
Merge origin/main into apply patch diff UI
Waishnav Jun 30, 2026
0464e55
docs(tool): simplify apply patch description
Waishnav Jun 30, 2026
25c25ca
fix(apply-patch): handle case-only moves
Waishnav Jun 30, 2026
e08f5b2
Merge pull request #47 from Waishnav/codex/apply-patch-diff-ui
Waishnav Jun 30, 2026
47c7bac
Clarify show changes review timing
Waishnav Jun 30, 2026
28cf26f
Merge main into show changes instructions
Waishnav Jun 30, 2026
323d862
Merge pull request #48 from Waishnav/refine-show-changes-instructions
Waishnav Jun 30, 2026
a5b7816
Merge pull request #51 from Waishnav/simplify-show-changes-schema
Waishnav Jul 1, 2026
e61b1c1
Merge remote-tracking branch 'upstream/main'
janbam Jul 1, 2026
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
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ DEVSPACE_ALLOWED_ROOTS=/home/waishnav/personal,/home/waishnav/work
# Advanced escape hatch. `*` disables Host header allowlist protection.
# DEVSPACE_ALLOWED_HOSTS=localhost,127.0.0.1,your-public-host.example.com
DEVSPACE_TOOL_MODE=full
DEVSPACE_TOOL_NAMING=legacy
# off | changes | full. Defaults to changes.
# changes creates one aggregate review widget via review_changes instead of per-tool iframes.
DEVSPACE_WIDGETS=changes
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ Most users should connect through a public HTTPS tunnel:
https://your-tunnel-host.example.com/mcp
```

> [!NOTE]
> Using DevSpace as an MCP connector isn't against OpenAI's Usage Policies — it's
> a standard custom App/connector setup, and writing or running code isn't a
> restricted use case. But your account is governed by your usage, not by
> DevSpace. Don't point it at anything that would violate your provider's terms.
> Used normally, you're fine. (Based on OpenAI's Usage Policies and Service Terms
> as of June 2026.)

## What ChatGPT Can Do

Once connected, ChatGPT can open one of your approved project folders as a
Expand Down
39 changes: 28 additions & 11 deletions docs/chatgpt-coding-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,17 @@ new context during later tool calls.

Skills are enabled by default for coding-agent workflows.

DevSpace discovers skills from:
DevSpace discovers standard Agent Skills from:

- `DEVSPACE_AGENT_DIR`, which defaults to `~/.codex`
- project `.pi/skills`
- optional paths from `DEVSPACE_SKILL_PATHS`
- `~/.agents/skills`
- project `.agents/skills`

It also keeps compatibility with:

- `DEVSPACE_AGENT_DIR/skills`, defaulting to `~/.codex/skills`
- additional paths from `DEVSPACE_SKILL_PATHS`

Legacy project paths such as `.pi/skills` can be added through `DEVSPACE_SKILL_PATHS` when needed.

When `open_workspace` returns matching skills, the model should read the
advertised `SKILL.md` before following that skill.
Expand All @@ -97,7 +103,7 @@ Set `DEVSPACE_SKILLS=0` to hide skills from workspace output.

## Tool Names

Short names are the default:
DevSpace exposes these tool names:

- `open_workspace`
- `read`
Expand All @@ -109,15 +115,21 @@ By default, DevSpace also runs in `DEVSPACE_TOOL_MODE=minimal`, so dedicated
`grep`, `glob`, and `ls` tools are hidden. Use `bash` with command-line tools
such as `rg`, `find`, and `ls` for search and directory inspection.

Legacy names are available with `DEVSPACE_TOOL_NAMING=legacy`:
Use `DEVSPACE_TOOL_MODE=full` to restore dedicated search and directory tools.

The experimental Codex-style surface is enabled with
`DEVSPACE_TOOL_MODE=codex`. It exposes:

- `open_workspace`
- `read_file`
- `write_file`
- `edit_file`
- `run_shell`
- `read`
- `apply_patch`
- `exec_command`
- `write_stdin`

Use `DEVSPACE_TOOL_MODE=full` to restore dedicated search and directory tools.
In this mode, `write`, `edit`, `bash`, `grep`, `glob`, and `ls` are not
registered. `exec_command` returns a process session ID when a command is still
running after its yield window. Use `write_stdin` to poll it, send input, resize
a PTY, or send Ctrl-C. Set `tty: true` only for commands that need a terminal.

## Show Changes

Expand All @@ -129,6 +141,11 @@ and shell tools. The aggregate `show_changes` tool is not exposed by default.
Use `DEVSPACE_WIDGETS=off` to disable widget UI, or `DEVSPACE_WIDGETS=changes`
to expose the aggregate show-changes flow.

When `show_changes` is exposed, models should call it exactly once after the
final file modification in any turn that changes files. The tool only requires
the `workspaceId`; DevSpace automatically compares against the last shown
checkpoint and advances that checkpoint after rendering the aggregate diff.

## Shell Use

The shell tool is for commands that belong in a terminal:
Expand Down
39 changes: 27 additions & 12 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,23 @@ MCP clients discover metadata from:

## Tool Modes

`DEVSPACE_TOOL_NAMING` controls tool names.
`DEVSPACE_TOOL_MODE` controls the tool surface.

| Value | Behavior |
| --- | --- |
| `short` | Default. Uses `read`, `edit`, `bash`, and related names. |
| `legacy` | Uses `read_file`, `edit_file`, `run_shell`, and related names. |
| `minimal` | Default. Exposes `open_workspace`, `read`, `write`, `edit`, and `bash`. Clients use `bash` with tools such as `rg`, `find`, and `ls` for inspection. |
| `full` | Exposes the minimal tools plus dedicated `grep`, `glob`, and `ls` tools. |
| `codex` | Experimental. Exposes `open_workspace`, `read`, `apply_patch`, `exec_command`, and `write_stdin`. Existing mutation and shell tools are hidden. |

`DEVSPACE_TOOL_MODE` controls the tool surface.
`DEVSPACE_MINIMAL_TOOLS` remains a backward-compatible alias when
`DEVSPACE_TOOL_MODE` is unset: `1` selects `minimal` and `0` selects `full`.
The `codex` mode must be selected through `DEVSPACE_TOOL_MODE` and always uses
its fixed short tool names regardless of `DEVSPACE_TOOL_NAMING`.

| Value | Behavior |
| --- | --- |
| `minimal` | Default. Disables dedicated search and list tools. Clients use the shell tool with `rg`, `grep`, `find`, `ls`, or `tree` for inspection. |
| `full` | Enables dedicated `grep`, `glob`, and `ls` tools. |
Codex-mode commands run without a PTY by default. Set `tty: true` on
`exec_command` for interactive terminal programs. PTY support uses the optional
`node-pty` dependency; `write_stdin` can send input, poll output, and resize PTY
sessions.

## Widgets

Expand All @@ -88,13 +92,25 @@ MCP clients discover metadata from:
| Variable | Purpose |
| --- | --- |
| `DEVSPACE_SKILLS` | Set to `0` to hide skills. Enabled by default. |
| `DEVSPACE_AGENT_DIR` | Defaults to `~/.codex`. |
| `DEVSPACE_SKILL_PATHS` | Optional comma-separated skill directories. |
| `DEVSPACE_AGENT_DIR` | Defaults to `~/.codex`; its `skills` child is loaded for compatibility. |
| `DEVSPACE_SKILL_PATHS` | Optional comma-separated additional skill directories. |

DevSpace discovers standard Agent Skills from:

- `~/.agents/skills`
- project `.agents/skills`

It also keeps compatibility with:

- `DEVSPACE_AGENT_DIR/skills`, defaulting to `~/.codex/skills`
- additional paths from `DEVSPACE_SKILL_PATHS`

Legacy project paths such as `.pi/skills` can be added through `DEVSPACE_SKILL_PATHS` when needed.

Example:

```bash
DEVSPACE_SKILL_PATHS="$HOME/.codex/skills,$HOME/.claude/skills" \
DEVSPACE_SKILL_PATHS="$HOME/.claude/skills,$HOME/company/skills" \
npx @waishnav/devspace serve
```

Expand Down Expand Up @@ -131,7 +147,6 @@ DEVSPACE_ALLOWED_ROOTS="$HOME/personal,$HOME/work" \
DEVSPACE_PUBLIC_BASE_URL="https://devspace.example.com" \
DEVSPACE_WORKTREE_ROOT="$HOME/.devspace/worktrees" \
DEVSPACE_TOOL_MODE="minimal" \
DEVSPACE_TOOL_NAMING="short" \
DEVSPACE_WIDGETS="full" \
npx @waishnav/devspace serve
```
Expand Down
14 changes: 10 additions & 4 deletions docs/gotchas.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,17 @@ Skills are enabled by default. Check:
DEVSPACE_SKILLS=1 npx @waishnav/devspace serve
```

DevSpace looks in:
DevSpace looks in standard Agent Skills locations:

- `DEVSPACE_AGENT_DIR`, defaulting to `~/.codex`
- project `.pi/skills`
- `DEVSPACE_SKILL_PATHS`
- `~/.agents/skills`
- project `.agents/skills`

It also checks compatibility and custom paths:

- `DEVSPACE_AGENT_DIR/skills`, defaulting to `~/.codex/skills`
- additional paths from `DEVSPACE_SKILL_PATHS`

Legacy project paths such as `.pi/skills` can be added through `DEVSPACE_SKILL_PATHS` when needed.

If a skill appears in `open_workspace`, the model must read that skill's
`SKILL.md` before reading other files inside the skill directory.
Expand Down
50 changes: 44 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@waishnav/devspace",
"version": "1.0.2",
"version": "1.0.3",
"description": "Expose a secure local coding workspace through an MCP server.",
"type": "module",
"main": "dist/server.js",
Expand All @@ -24,8 +24,9 @@
"build": "npm run clean && npm run build:app && tsc -p tsconfig.build.json",
"build:app": "vite build",
"dev": "node scripts/dev-server.mjs",
"postinstall": "node scripts/fix-node-pty-permissions.mjs",
"start": "node dist/cli.js serve",
"test": "tsx src/config.test.ts && tsx src/roots.test.ts && tsx src/skills.test.ts && tsx src/workspaces.test.ts && tsx src/review-checkpoints.test.ts && tsx src/oauth-store.test.ts && tsx src/cli.test.ts",
"test": "tsx src/config.test.ts && tsx src/ui/card-types.test.ts && tsx src/ui/patch-display.test.ts && tsx src/apply-patch.test.ts && tsx src/process-platform.test.ts && tsx src/process-sessions.test.ts && tsx src/roots.test.ts && tsx src/skills.test.ts && tsx src/workspaces.test.ts && tsx src/review-checkpoints.test.ts && tsx src/oauth-store.test.ts && tsx src/cli.test.ts",
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"keywords": [],
Expand All @@ -38,6 +39,7 @@
"@modelcontextprotocol/sdk": "^1.29.0",
"@pierre/diffs": "^1.2.5",
"better-sqlite3": "^12.10.0",
"diff": "^8.0.3",
"drizzle-orm": "^0.45.2",
"express": "^5.2.1",
"react": "^19.2.6",
Expand All @@ -61,5 +63,8 @@
"protobufjs": "7.6.4",
"ws": "8.21.0",
"undici": "8.5.0"
},
"optionalDependencies": {
"node-pty": "^1.1.0"
}
}
22 changes: 22 additions & 0 deletions scripts/fix-node-pty-permissions.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { chmod } from "node:fs/promises";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";

if (process.platform === "darwin") {
const projectRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
for (const architecture of ["arm64", "x64"]) {
const helper = resolve(
projectRoot,
"node_modules",
"node-pty",
"prebuilds",
`darwin-${architecture}`,
"spawn-helper",
);
try {
await chmod(helper, 0o755);
} catch (error) {
if (error.code !== "ENOENT") throw error;
}
}
}
Loading