Requires Node.js 20.19 or newer and authorized Firedrill access. The package name is retained for compatibility.
FiredrillClient maps the Control API. Higher-level helpers create
and control sessions, run drills with a caller-owned agent callback, follow evidence,
and retain recovery checkpoints.
Install the SDK from npm:
Configure the client
Start an owned world
Examples below are integration skeletons. ImplementrunExistingAgent around your actual agent and checkpointStore.save as durable storage. Replace resource IDs with values from your project. The SDK does not supply those functions or an agent.
connect() creates one session, waits for readiness, issues actor-scoped world
access, and returns a handle. It does not invoke an agent. Omit scenarioId and
drillId for the build baseline.
The handle can reset state, advance virtual time, set declared faults, extend the
session, and destroy it. Mutations retain uncertain requests so you can recover
with the same idempotency key instead of issuing a duplicate action.
Run a drill with your agent
Existing CLI-based agents
For an agent that already invokesfiredrill world tools or firedrill world call, use createHostedCliBridge inside its interaction callback:
binding, signal, and interaction from the callback above. Your runExistingAgent integration must pass the bridge environment only to the intended child process and still return the actual agent result to the drill helper.
The bridge starts a loopback HTTP transport, not a world runtime or an agent. The child receives a separate scoped transport credential; the service continues to enforce the world actor and interaction. Close the bridge even if the agent fails or is cancelled.
Capture files and media
Passroot plus explicit policies to runHostedDrill:
Recovery rules
- Persist each run checkpoint before its callback returns.
- Retry an uncertain mutation with the same request and idempotency key.
- Do not rerun an agent after an upload or completion checkpoint.
- A local abort stops the client wait; it does not prove the server operation stopped.
- Keep control credentials separate from short-lived world bindings.