Skip to main content

simulator/agents

packages/simulator/src/agents

Purpose

Autonomous agent runtime contracts and shipped implementations.

Public surface

AgentRoster

Interface
A roster is both the keyed runtime definition and the owner of the exact started-agent service used by the experiment Effect.

AgentRosterAcquisitionError

TypeAlias
Represents agent roster acquisition error conditions.

AgentRuntime

Interface
A runtime definition accepted by keyed society rosters.

AgentRuntimeDefinitionError

Class
Invalid runtime metadata rejected before a run acquires resources.

AgentRuntimeInput

Interface
Roster identity presented to a runtime’s private realization.

AgentsService

Interface
Describes agents service.

Application

Interface
One rendered application and its runtime-specific controller bridge.

ApplicationEndpoint

Interface
Where the cluster reached one ready application’s controller bridge. The cluster builds this from the port the application itself declared, so a runtime reads the address it asked for instead of re-deriving it: a protocol, port, path, or credential the runtime would have to reject cannot be spelled.

ContainerAgentRuntime

Interface
A runtime that is known to carry a container realization. Only defineContainerRuntime produces one, so reading its realization back needs no absent case.

ContainerRuntime

Interface
The container realization of one runtime. Image and resources belong here rather than to a rendered application because the cluster reserves capacity for the complete roster before any agent identity exists.

CredentialName

TypeAlias
Provider credential a container may request from the run-scoped Secret.

defineContainerRuntime

Function
Define one runtime and bind its container realization in a single operation. This describes no cross-runtime gateway protocol. Returns: The frozen nominal runtime accepted by a society roster.

File

Interface
One file materialized into a container from the run-scoped Secret.

HarvestTarget

Interface
One file read back from the running application after the customer program ends. relativePath is how the ledger names it, path is where the runtime placed it inside the container, and limitBytes bounds what the ledger carries for it.

image

Variable
Digest-pinned image identity accepted by the private container platform. The repository half excludes @ so a trailing digest cannot be smuggled in behind an earlier one, and the digest is lowercase hexadecimal of exactly the length SHA-256 produces.

Image

TypeAlias
Digest-pinned image identity accepted by the private container platform.

NanoClawGateway

Interface
Principal gateway exposed by an acquired NanoClaw runtime.

NanoClawGatewayError

Class
A NanoClaw principal socket could not connect, submit, or receive.

NanoClawGatewayInput

Class
Native instruction accepted by NanoClaw’s owner-local CLI channel.

NanoClawGatewayOutput

Class
One native output frame emitted by NanoClaw’s owner-local CLI channel.

nanoclawRuntime

Function
Construct a NanoClaw descriptor backed by one application container per roster identity and its runtime-owned native gateway bridge. Returns: The nanoclaw runtime result.

NanoClawRuntimeOptions

Interface
Configuration captured by one reusable NanoClaw runtime value.

OpenClawGateway

Interface
Principal gateway exposed by an acquired OpenClaw runtime.

OpenClawGatewayRequest

Class
Principal instruction accepted by OpenClaw’s agent gateway RPC.

OpenClawGatewayRequestError

Class
An OpenClaw gateway call failed or returned an invalid payload.

OpenClawGatewayResponse (type)

TypeAlias
Exact terminal response returned by OpenClaw’s agent gateway RPC.

OpenClawGatewayResponse (value)

Variable
Schema for the exact terminal response returned by the agent gateway RPC.

OpenClawGatewaySucceeded

Class
Successful terminal result returned by OpenClaw’s agent gateway RPC.

OpenClawGatewayTimedOut

Class
Timed-out terminal result returned by OpenClaw’s agent gateway RPC. OpenClaw treats this as a successful RPC payload rather than a transport failure. A run may time out before it has an agent result.

openClawRuntime

Function
Constructs a simulator runtime from a complete, digest-pinned agent image. Returns: A reusable OpenClaw container runtime definition.

OpenClawRuntimeOptions

Interface
Configuration captured by one reusable OpenClaw runtime value.

OpenClawSandboxConfig

TypeAlias
Default-agent sandbox configuration accepted by OpenClawConfig.

OpenClawToolsConfig

TypeAlias
Tool configuration accepted by OpenClawConfig.

Resources

Interface
Portable resource request for one application container.

routableBridgeEndpoint

Function
Refuse a bridge address that never leaves the controller’s own host. Returns: The same endpoint once it is known to be routable.

RunningAgent

Interface
A ready runtime exposes its principal gateway and one lifecycle observation. Completion of the termination Effect records a fact; customer policy decides whether that fact ends the run.

RuntimeAcquisitionError

Class
A runtime application or its native gateway did not become ready.

RuntimeCompleted

Class
An autonomous runtime completed normally.

runtimeConfigurationProjection

Function
Read the validated, immutable JSON projection captured at definition time. Returns: The runtime configuration encoded as JSON.

RuntimeExited

Class
A runtime process exited with an operating-system exit code.

RuntimeFailed

Class
An autonomous runtime completed with a recorded failure.

RuntimeGatewayOf

TypeAlias
The principal gateway exposed by one acquired runtime definition.

RuntimeSignaled

Class
A runtime process terminated in response to an operating-system signal.

RuntimeTermination

TypeAlias
Exact terminal observation produced by an acquired runtime.

StartedAgent

Interface
A ready autonomous runtime paired with its Registry-issued identity.

StartedAgents

TypeAlias
Exact keyed agents installed only after every runtime is ready.

stoppedBeforeAttach

Function
Fail with the runtime’s own error the moment its application stops, so a bridge race reports the stop instead of waiting out the startup deadline. The error type is a plain parameter, so each runtime keeps its exact failure channel and no gateway union exists. Returns: An Effect that only ever fails.

Files

  • agent.ts
  • container.ts
  • index.ts
  • nanoclaw/gateway.ts
  • nanoclaw/runtime.ts
  • openclaw/configuration.ts
  • openclaw/gateway.ts
  • openclaw/runtime.ts
  • roster.ts
  • workspace.ts