Skip to content

v0.2.0 — Sandbox mode with gitmachine

Choose a tag to compare

@shreyas-lyzr shreyas-lyzr released this 04 Mar 13:05
· 111 commits to main since this release

What's new

Sandbox mode — Run agent tools inside an isolated E2B cloud VM via gitmachine. The agent (LLM calls) still runs locally; only tool execution is remote. All changes are automatically committed to a session branch.

Usage

CLI:

export E2B_API_KEY="..."
export GITHUB_TOKEN="ghp_..."
gitclaw --dir ~/my-project --sandbox

SDK:

import { query } from "gitclaw";

for await (const msg of query({
  prompt: "Fix the auth bug",
  dir: ".",
  sandbox: { provider: "e2b" },
})) {
  if (msg.type === "delta") process.stdout.write(msg.content);
}

Details

  • gitmachine is an optional peer dependency — only loaded via dynamic import() when sandbox mode is activated
  • Without gitmachine installed, --sandbox gives a clear install instruction
  • Local mode is completely unchanged
  • New createBuiltinTools() factory selects local or sandbox tools
  • Shared helpers extracted to src/tools/shared.ts (reduces duplication across tool variants)
  • SandboxOptions, SandboxConfig, SandboxContext types exported from SDK

Files

File Action
src/tools/shared.ts New — shared constants, schemas, helpers
src/sandbox.ts New — sandbox context creation
src/tools/sandbox-{cli,read,write,memory}.ts New — sandbox tool variants
src/tools/index.ts New — createBuiltinTools() factory
src/index.ts Modified — --sandbox / -s flag + lifecycle
src/sdk-types.ts Modified — SandboxOptions type
src/sdk.ts Modified — sandbox init/teardown in query()
src/exports.ts Modified — export new types
package.json Modified — optional peer dep, version bump
src/tools/{cli,read,write,memory}.ts Refactored — use shared.ts