mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 07:04:48 +00:00
refactor: rename engine/ to server/
This commit is contained in:
parent
016024c04b
commit
71ab40388c
37 changed files with 917 additions and 3 deletions
|
|
@ -31,6 +31,24 @@ await client.postMessage("my-session", { message: "Hello" });
|
|||
const events = await client.getEvents("my-session", { offset: 0, limit: 50 });
|
||||
```
|
||||
|
||||
## Autospawn (Node only)
|
||||
|
||||
```ts
|
||||
import { connectSandboxDaemonClient } from "sandbox-agent";
|
||||
|
||||
const client = await connectSandboxDaemonClient({
|
||||
spawn: { enabled: true },
|
||||
});
|
||||
|
||||
await client.createSession("my-session", { agent: "claude" });
|
||||
await client.postMessage("my-session", { message: "Hello" });
|
||||
|
||||
await client.dispose();
|
||||
```
|
||||
|
||||
Autospawn uses the local `sandbox-agent` binary. Install `@sandbox-agent/cli` (recommended), or
|
||||
set `SANDBOX_AGENT_BIN` to the binary path.
|
||||
|
||||
## Endpoint mapping
|
||||
|
||||
<details>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue