Skip to content
Merged
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
28 changes: 1 addition & 27 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,27 +1 @@
# agent-code-mode

An MCP stdio server that exposes one tool, `run`: the model writes a JavaScript script that runs in an isolated QuickJS-ng WASM sandbox and calls async bindings (`bash`, `read`, `write`, `edit`, `grep`, `glob`).
Every binding call is prepared, authorized against the host's permission rules and PreToolUse hooks (Claude Code or Codex CLI, fail-closed), and only then committed exactly as authorized.

## Verification

`npm run verify` (typecheck, tests, build). It must pass before any change is considered done.

## Repo rules

- English only: code, comments, tests, commit messages, PRs, README.
- The repo is public: nothing private (personal names, emails, home-directory paths, machine names, personal hook or config names). Test fixtures use generic example hooks.
- No `docs/` folder and no extra markdown files; the only markdown files are README.md, CLAUDE.md and AGENTS.md.
- Validate outside data at the boundary with zod (MCP requests, sandbox IPC, hook stdout, config files, `_meta`); never use `as` on unvalidated data. Internal code trusts validated types.
- TypeScript strict, ESM, Node >= 22. Keep dependencies small and justified.

## Module map

- `src/core`: frozen contracts (`types.ts`), boundary schemas, dispatcher (prepare, authorize, commit), run orchestration, output shaping, command hooks.
- `src/server`: MCP stdio server, host detection, runtime factory.
- `src/sandbox`: QuickJS-ng WASM sandbox in a child process.
- `src/hosts/claude`: Claude Code host adapter (settings, permission rules, hooks).
- `src/hosts/codex`: Codex CLI host adapter (config, exec policy, hooks).
- `src/tools`: tool runtime (`bash`, `read`, `write`, `edit`, `grep`, `glob`), journal and rollback.
- `src/testing`: fakes for tests (sandbox, host adapter, in-memory tool runtime).
- `bench`: benchmark.
@AGENTS.md
Loading