mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 00:03:04 +00:00
chore: recover wellington workspace state
This commit is contained in:
parent
5d65013aa5
commit
c294ca85be
366 changed files with 1265 additions and 53395 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { Sandbox } from "@e2b/code-interpreter";
|
||||
import { SandboxAgent } from "sandbox-agent";
|
||||
import { detectAgent, buildInspectorUrl } from "@sandbox-agent/example-shared";
|
||||
import { detectAgent, buildInspectorUrl, waitForHealth } from "@sandbox-agent/example-shared";
|
||||
|
||||
const envs: Record<string, string> = {};
|
||||
if (process.env.ANTHROPIC_API_KEY) envs.ANTHROPIC_API_KEY = process.env.ANTHROPIC_API_KEY;
|
||||
|
|
@ -16,7 +16,7 @@ const run = async (cmd: string) => {
|
|||
};
|
||||
|
||||
console.log("Installing sandbox-agent...");
|
||||
await run("curl -fsSL https://releases.rivet.dev/sandbox-agent/0.3.x/install.sh | sh");
|
||||
await run("curl -fsSL https://releases.rivet.dev/sandbox-agent/0.2.x/install.sh | sh");
|
||||
|
||||
console.log("Installing agents...");
|
||||
await run("sandbox-agent install-agent claude");
|
||||
|
|
@ -27,7 +27,9 @@ await sandbox.commands.run("sandbox-agent server --no-token --host 0.0.0.0 --por
|
|||
|
||||
const baseUrl = `https://${sandbox.getHost(3000)}`;
|
||||
|
||||
console.log("Connecting to server...");
|
||||
console.log("Waiting for server...");
|
||||
await waitForHealth({ baseUrl });
|
||||
|
||||
const client = await SandboxAgent.connect({ baseUrl });
|
||||
const session = await client.createSession({ agent: detectAgent(), sessionInit: { cwd: "/home/user", mcpServers: [] } });
|
||||
const sessionId = session.id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue