feat: sprites support

This commit is contained in:
Nathan Flurry 2026-03-25 12:22:00 -07:00
parent 9cd9252725
commit 5da35e6dfa
35 changed files with 746 additions and 1257 deletions

View file

@ -0,0 +1,21 @@
import { SandboxAgent } from "sandbox-agent";
import { sprites } from "sandbox-agent/sprites";
const env: Record<string, string> = {};
if (process.env.ANTHROPIC_API_KEY) env.ANTHROPIC_API_KEY = process.env.ANTHROPIC_API_KEY;
if (process.env.OPENAI_API_KEY) env.OPENAI_API_KEY = process.env.OPENAI_API_KEY;
const client = await SandboxAgent.start({
sandbox: sprites({
token: process.env.SPRITES_API_KEY ?? process.env.SPRITE_TOKEN ?? process.env.SPRITES_TOKEN,
env,
}),
});
console.log(`UI: ${client.inspectorUrl}`);
console.log(await client.getHealth());
process.once("SIGINT", async () => {
await client.destroySandbox();
process.exit(0);
});