mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 19:04:40 +00:00
SDK sandbox provisioning: built-in providers, docs restructure, and quickstart overhaul
- Add built-in sandbox providers (local, docker, e2b, daytona, vercel, cloudflare) to the TypeScript SDK so users import directly instead of passing client instances - Restructure docs: rename architecture to orchestration-architecture, add new architecture page for server overview, improve getting started flow - Rewrite quickstart to be TypeScript-first with provider CodeGroup and custom provider accordion - Update all examples to use new provider APIs - Update persist drivers and foundry for new SDK surface Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3426cbc6ec
commit
6a42f06342
53 changed files with 1689 additions and 667 deletions
|
|
@ -2,6 +2,7 @@ import { createInterface } from "node:readline/promises";
|
|||
import { stdin as input, stdout as output } from "node:process";
|
||||
import { Command } from "commander";
|
||||
import { SandboxAgent, type PermissionReply, type SessionPermissionRequest } from "sandbox-agent";
|
||||
import { local } from "sandbox-agent/local";
|
||||
|
||||
const options = parseOptions();
|
||||
const agent = options.agent.trim().toLowerCase();
|
||||
|
|
@ -9,10 +10,7 @@ const autoReply = parsePermissionReply(options.reply);
|
|||
const promptText = options.prompt?.trim() || `Create ./permission-example.txt with the text 'hello from the ${agent} permissions example'.`;
|
||||
|
||||
const sdk = await SandboxAgent.start({
|
||||
spawn: {
|
||||
enabled: true,
|
||||
log: "inherit",
|
||||
},
|
||||
sandbox: local({ log: "inherit" }),
|
||||
});
|
||||
|
||||
try {
|
||||
|
|
@ -43,10 +41,7 @@ try {
|
|||
const session = await sdk.createSession({
|
||||
agent,
|
||||
...(mode ? { mode } : {}),
|
||||
sessionInit: {
|
||||
cwd: process.cwd(),
|
||||
mcpServers: [],
|
||||
},
|
||||
cwd: process.cwd(),
|
||||
});
|
||||
|
||||
const rl = autoReply
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue