testbed/src
packages/testbed/src
Purpose
Public exports for launching and supervising connected-agent testbeds.Public surface
AgentName
TypeAlias
AgentName
Variable
awaitAgentReadyByPolling
Function
createOpenClawAdapter
Function
openclaw and @moltzap/openclaw-channel
dependencies. Callers may override either path for local development.
launchTestbed
Function
TestbedStartupInterrupted.
launchTestbedWithProcessSignals
Function
TestbedStartupInterrupted— a signal arrives during testbed startup
LogSlice
Interface
NanoclawAdapter
Class
New messages. The immutable cache key covers the pinned
NanoClaw source, dependency lock, bundled channel/skill, and host ABI.
NanoclawAdapterOptions
Interface
OpenClawAdapter
Class
deps.server.awaitAgentReady. Inbound traffic log marker:
inbound from agent:. Errors flow into the testbed via SpawnFailed
(boot) or RuntimeExitedBeforeReady / RuntimeReadyTimedOut
(post-spawn, surfaced by processExitLoop).
OpenClawAdapterDeps
Interface
OpenClawAdapterOptions
Interface
ReadyOutcome
TypeAlias
Runtime
Interface
RuntimeExitedBeforeReady
Class
startPendingRuntimeAgent when waitUntilReady returns
ProcessExited. The process exited before reaching ready.
stderr carries the full accumulated stdout+stderr at exit;
exitCode is null only if the process exited via signal.
Caller action: inspect stderr; check binary auth config.
RuntimeKind
TypeAlias
RuntimeLaunchFailed
TypeAlias
startRuntimeAgent and launchTestbed can
produce. Use Effect.catchTags to
branch by tag, or Effect.catchAll to handle uniformly.
Note: TestbedStartupInterrupted lives in testbed.ts because it only
arises in the signal-handling variant and carries the interrupting Signal.
RuntimeReadyTimedOut
Class
startPendingRuntimeAgent when waitUntilReady returns
Timeout. The process did not signal ready within timeoutMs and
has been torn down before the failure reaches the caller.
Caller action: increase readyTimeoutMs, or enable process-level
diagnostics at the adapter boundary.
RuntimeServerHandle
Interface
RuntimeStartOptions
TypeAlias
ServerUrl
TypeAlias
ServerUrl
Variable
SpawnFailed
Class
Runtime.spawn() in any adapter when the child process
cannot be started — exec error, missing binary, port allocation
failure, state-dir creation failure.
cause carries the underlying Error.
Caller action: surface to user. No retry — binary or config is wrong.
SpawnInput
Interface
startRuntimeAgent
Function
Runtime back to the caller.
Error channel is the union RuntimeLaunchFailed of the three
shapes above. Sibling: launchTestbed for multi-agent
coordinated startup.
Fails with:
SpawnFailed— the child process cannot be started (exec error, bad binary, port allocation failure, state-dir error)RuntimeReadyTimedOut—waitUntilReadyexceedsreadyTimeoutMsRuntimeExitedBeforeReady— the process exits before signaling ready (inspectstderr)
Testbed
Interface
TestbedAgent
Interface
TestbedAgentSpec
Interface
TestbedLaunchOptions
TypeAlias
TestbedProcessSignalOptions
TypeAlias
TestbedStartupInterrupted
Class
WorkspaceFile
Interface
Files
await-agent-ready.tserrors.tsnanoclaw-adapter.tsopenclaw-adapter.tsruntime.tstestbed.ts