Orchestrate sandboxed coding agents in TypeScript with sandcastle.run()
by mattpocockTypeScript
Last 12 weeks · 240 commits
2 of 6 standards met
As more and more providers are releasing their own harnesses, it would be nice if AgentProvider was re-designed to inherit from a base class that has all required functionality defined. This addition of composability will make it easier for user/agents to add support for more harness and or trackers as they come available. An example of how this is done is Ralph-tui. Their CONTRIBUTING.md gives detailed instructions on how to get agents to add support for new agent harnesses and trackers as users want support for. Thanks!
Outcome New Pi sandbox images install the maintained package instead of the deprecated package. This branch is intentionally stacked on #944 so maintained Pi 0.84 lowercase tool events remain visible. If #944 merges first, this branch can be refreshed to leave only the package migration commit. Changes replace the deprecated global Pi package in the generated Dockerfile assert the maintained package is present and the deprecated package is absent in both scaffold paths add a patch changeset Validation (190 passed) (224 passed) clean Docker build using the generated-template shape runtime smoke: returned , the maintained package was installed globally, and the deprecated package was absent The repository-wide test command was also sampled, but its unrelated environment-dependent integration suites are not a green signal on this host. The focused suites, typecheck, and exact image smoke above cover this change.
Pi 0.84 emits lowercase built-in tool names, so Sandcastle previously dropped those tool events from its public stream. This patch accepts the observed lowercase forms while preserving compatibility with older title-cased Pi streams. The parser keeps the existing display-safe argument selection and treats a pathless lowercase as the current directory. Focused parser tests pass (224/224), type checking passes, and a stock Pi container smoke surfaced one real lowercase call with no repository mutations.
Parent PRD #1 What to build Implement config reading from in the target repo. For v1, the only config field is — a shell command to run inside the sandbox after sync-in completes (e.g. ). Integrate with sync-in so that the command runs automatically after code is synced. Acceptance criteria [ ] is read from the host repo root [ ] command is executed inside the sandbox after sync-in [ ] Missing config file is handled gracefully (no error, no postSyncIn) [ ] Missing field is handled gracefully [ ] Test: postSyncIn command runs after sync-in and its effects are visible in the sandbox Blocked by Blocked by #4 User stories addressed User story 12: config with command
Summary Adds a agent provider so Kiro CLI can be used as the in , , and worktree runs — alongside the existing , , , , , and providers. Usage Authenticates via (requires Kiro Pro or higher), resolved automatically from . What's included factory and type exported from the main package , , and flag support added to the agent registry with a dedicated Dockerfile template and for local testing README docs and changeset Notes Session resume () is not wired up in this PR — Sandcastle does not yet capture or transfer Kiro session files. is , matching the behaviour of and . PR https://github.com/mattpocock/sandcastle/pull/902
Summary Adds a agent provider so Kiro CLI can be used as the in , , and worktree runs — alongside the existing , , , , , and providers. Usage Authenticates via (requires Kiro Pro or higher), resolved automatically from . What's included factory and type exported from the main package , , and flag support added to the agent registry with a dedicated Dockerfile template and for local testing README docs and changeset Notes Session resume () is not wired up in this PR — Sandcastle does not yet capture or transfer Kiro session files. is , matching the behaviour of and . Closes #903
Repository: mattpocock/sandcastle. Description: Orchestrate sandboxed coding agents in TypeScript with sandcastle.run() Stars: 7445, Forks: 757. Primary language: TypeScript. Languages: TypeScript (99.7%), JavaScript (0.2%), Dockerfile (0.1%), Shell (0%). License: MIT. Latest release: v0.12.0 (1mo ago). Open PRs: 41, open issues: 92. Last activity: 1mo ago. Community health: 42%. Top contributors: mattpocock, github-actions[bot], dichioniccolo, bwcampbell9, jerome-benoit, mellson, lautarosegura, NitayRabi, screenfluent, aravindcm49.