@usine/agents/child-host
Classes
Section titled “Classes”LocalProcess
Section titled “LocalProcess”Children run as processes on this machine.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LocalProcess(…
args):LocalProcess
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props?: object, options?: MakeOptions] |
Returns
Section titled “Returns”RemoteShell
Section titled “RemoteShell”Children run on another machine, each as one SSH command whose standard streams are the child’s.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RemoteShell(…
args):RemoteShell
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”destination
Section titled “destination”
readonlydestination:string
The SSH destination, passed to the client as one argument.
readonlyssh:object
readonlyargs: readonlystring[]
command
Section titled “command”
readonlycommand:string
sshEnvironment
Section titled “sshEnvironment”
readonlysshEnvironment:object
The SSH client’s own process environment: what SSH needs to reach the
machine, never the orchestrator’s secrets (ADR 0011), and the variables
an -o SendEnv= option in ssh names. Only those reach the child, so a
value that must stay out of the command line, such as a Gateway caller
token, travels here; never log this field.
Index Signature
Section titled “Index Signature”[key: string]: string
Interfaces
Section titled “Interfaces”HostInvocation
Section titled “HostInvocation”One command for a host to run.
Properties
Section titled “Properties”
readonlyargs: readonlystring[]
command
Section titled “command”
readonlycommand:string
readonlyoptionalcwd?:string
The directory the command starts in; the host user’s home directory when absent.
environment?
Section titled “environment?”
readonlyoptionalenvironment?:Readonly<Record<string,string|undefined>>
The command’s complete environment on this machine. On a remote shell, the variables exported on top of the shell’s own environment; undefined values are skipped.
pidFile?
Section titled “pidFile?”
readonlyoptionalpidFile?:string
On a remote shell, holds the command’s pid while it runs, so cleanup can stop it after its SSH client is gone.
Type Aliases
Section titled “Type Aliases”ChildHost
Section titled “ChildHost”ChildHost = typeof
ChildHost.Type
Where an Attempt’s children run, chosen by the Worker that prepared its checkout.
SshCommand
Section titled “SshCommand”SshCommand = typeof
SshCommand.Type
The local SSH executable and the options placed before the destination.
Variables
Section titled “Variables”CHILD_KILL_SCRIPT
Section titled “CHILD_KILL_SCRIPT”
constCHILD_KILL_SCRIPT:string
Stops every child an Attempt still runs on a remote host before its
worktree is kept or removed: for each <worktree>.child-*.pid that
childPidFile names, TERM, a bounded wait, then KILL. Run it with sh -c
and the worktree as $1; stdout reports one outcome per pid file. An SSH
client that exits does not prove its remote command has stopped.
ChildHost
Section titled “ChildHost”
constChildHost:Schema.Union<readonly [typeofLocalProcess, typeofRemoteShell]>
Where an Attempt’s children run, chosen by the Worker that prepared its checkout.
childPidFile
Section titled “childPidFile”
constchildPidFile: (worktree,session) =>string
Where a remote child’s pid is kept while it runs: beside its worktree, named by the child’s number in its session id.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
worktree |
string |
session |
AgentSessionId |
Returns
Section titled “Returns”string
sshArguments
Section titled “sshArguments”
constsshArguments: (host,invocation) =>string[]
The SSH client’s arguments that run invocation on the host’s machine: its options, the destination, and one remote command line.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
host |
RemoteShell |
invocation |
HostInvocation |
Returns
Section titled “Returns”string[]
SshCommand
Section titled “SshCommand”
constSshCommand:Schema.Struct<{args:Schema.$Array<Schema.String>;command:Schema.NonEmptyString; }>
The local SSH executable and the options placed before the destination.