Skip to content

@usine/executor/ssh

The machines and SSH settings for the configured SSH Workers.

readonly optional harnessReadiness?: (machine) => HarnessProbe

Probes one rostered brain’s binary and login on a Worker’s machine; defaults to the @usine/agents/preflight checks over SSH, which start no prompt. Behind a Gateway, the Gateway’s checks for the brain still apply.

Parameter Type
machine SshMachine

HarnessProbe

readonly optional interruptGrace?: Input

Grace for the parent task’s cancellation, then for the Attempt to settle; each wait is bounded separately. Defaults to 10 seconds.

readonly optional ssh?: object

Local SSH executable and the options placed before each Worker’s port and identity file; defaults to ssh in batch mode with keepalives.

readonly args: readonly string[]

readonly command: string

readonly workers: readonly SshWorkerAddress[]

Every SSH Worker this executor runs Attempts on, each with its own machine.


An SSH Worker’s machine with the child host that every command and child on it runs through.

  • RemoteMachine

readonly address: SshWorkerAddress

The Worker’s address in usine.yaml, for preflight to check its root.

readonly gateway: Option<MachineGateway>

The Gateway in front of the machine, when the Worker has one.

readonly shell: RemoteShell

The SSH client and destination that every command and child on the machine runs through.

RemoteMachine.shell

readonly workerDirectory: string

The Worker’s directory on the machine: cached clones under repos, checkouts under attempts.

RemoteMachine.workerDirectory


How the orchestrator connects to one SSH Worker’s machine, and where the Worker keeps its state there.

readonly destination: string & Brand<"SshDestination">

What the local ssh client connects to: user@host, or a Host alias from the SSH configuration.

readonly gateway: Option<SshWorkerGateway>

The Gateway in front of the machine; without one, each Attempt’s token is written on the machine (ADR 0026).

readonly identityFile: Option<string & Brand<"SshIdentityFile">>

The private key the client authenticates with; the SSH agent and configuration decide when absent.

readonly name: string & Brand<"WorkerName">

readonly port: Option<number & Brand<"SshPort">>

The SSH server’s port; the SSH configuration decides when absent.

readonly root: string & Brand<"WorkerRoot">

The directory under which the Worker keeps workers/<name> on the machine.


The Gateway in front of an SSH Worker’s machine on a private network (ADR 0027): the executor attaches each Attempt’s token to it, and the Attempt’s children reach GitHub and the listed LLM providers through it.

readonly adminToken: Redacted<string>

The admin API’s bearer token.

readonly adminUrl: URL

The Gateway’s admin API as this process reaches it, usually a local forward through the SSH connection to the Gateway.

readonly domain: string & Brand<"GatewayDomain">

The Gateway’s private DNS domain: GitHub at git.<domain>, LLM providers at llm.<domain>, the forward proxy at <domain>:3128.

readonly llmProviders: readonly "anthropic"[]

The LLM providers whose credential the Gateway holds. A harness whose provider is not listed uses its login on the machine and reaches the provider through the forward proxy.

const layer: (options) => Layer.Layer<Executor, never, AttemptRuntime | CredentialProvider | ChildProcessSpawner.ChildProcessSpawner | HttpClient.HttpClient>

Runs Attempts on Linux machines the orchestrator connects to over SSH: each Attempt’s Pi parent is a durable task in this process (AttemptRuntime), and its children run on the Worker’s machine, one SSH command each. A Worker without a Gateway gets the Attempt’s single-repository GitHub token written beside its checkout (ADR 0026); a Worker behind a Gateway gets no token, only a caller token for the attachment the executor makes on the Gateway’s admin API through HttpClient (ADR 0027). An orchestrator restart reattaches a live Attempt to its checkout. Requires Node; worker contracts are platform-free.

Parameter Type
options SshExecutorOptions

Layer.Layer<Executor, never, AttemptRuntime | CredentialProvider | ChildProcessSpawner.ChildProcessSpawner | HttpClient.HttpClient>