@usine/core/attempt/channel
Classes
Section titled “Classes”Cancel
Section titled “Cancel”Stops the entire Attempt, including every held or paused session. Used by cancellation and guardrails.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Cancel(…
args):Cancel
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props?: object, options?: MakeOptions] |
Returns
Section titled “Returns”ChildTarget
Section titled “ChildTarget”A harness child of the Attempt’s parent, addressed by the id it reports in the normalized event stream.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ChildTarget(…
args):ChildTarget
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”sessionId
Section titled “sessionId”
readonlysessionId:string&Brand<"AgentSessionId">
Failed
Section titled “Failed”Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Failed(…
args):Failed
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”failure
Section titled “failure”
readonlyfailure:InfraFailure|DefectFailure|AgentFailure|RunawayFailure|ChildSessionBudgetFailure
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Final(…
args):Final
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”result
Section titled “result”
readonlyresult:StepResult
InboundEnvelope
Section titled “InboundEnvelope”Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InboundEnvelope(…
args):InboundEnvelope
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”attemptId
Section titled “attemptId”
readonlyattemptId:string&Brand<"AttemptId">
operator
Section titled “operator”
readonlyoperator:string
payload
Section titled “payload”
readonlypayload:Steer|Interrupt|OperatorMessage|Release|Cancel
sentAt
Section titled “sentAt”
readonlysentAt:Utc
sequence
Section titled “sequence”
readonlysequence:number&Brand<"AttemptChannelSequence">
target
Section titled “target”
readonlytarget:ParentTarget|ChildTarget
The session this envelope addresses; the Pi parent unless a child is named.
version
Section titled “version”
readonlyversion:7
Interrupt
Section titled “Interrupt”Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Interrupt(…
args):Interrupt
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props?: object, options?: MakeOptions] |
Returns
Section titled “Returns”Interrupted
Section titled “Interrupted”The Attempt’s parent acknowledged cancellation. Terminal.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Interrupted(…
args):Interrupted
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props?: object, options?: MakeOptions] |
Returns
Section titled “Returns”Intervention
Section titled “Intervention”Attributed operator input addressed to one live session, never an Event.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Intervention(…
args):Intervention
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”action
Section titled “action”
readonlyaction:Steer|Interrupt|OperatorMessage|Release
operator
Section titled “operator”
readonlyoperator:string
target
Section titled “target”
readonlytarget:ParentTarget|ChildTarget
InterventionApplied
Section titled “InterventionApplied”Acknowledges delivery and records the resulting Hold or pause in the transcript.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InterventionApplied(…
args):InterventionApplied
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”inputSequence
Section titled “inputSequence”
readonlyinputSequence:number&Brand<"AttemptChannelSequence">
intervention
Section titled “intervention”
readonlyintervention:Intervention
readonlystate:InterventionState
InterventionRejected
Section titled “InterventionRejected”A session closed or refused an operator action; the Attempt itself continues.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InterventionRejected(…
args):InterventionRejected
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”inputSequence
Section titled “inputSequence”
readonlyinputSequence:number&Brand<"AttemptChannelSequence">
intervention
Section titled “intervention”
readonlyintervention:Intervention
message
Section titled “message”
readonlymessage:string
InterventionState
Section titled “InterventionState”The session’s supervision state after an accepted operator action.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InterventionState(…
args):InterventionState
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”
readonlyheld:boolean
paused
Section titled “paused”
readonlypaused:boolean
OperatorMessage
Section titled “OperatorMessage”An operator turn joined to the target session, distinct from a Steer so a takeover can record and hold it (ADR 0018).
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new OperatorMessage(…
args):OperatorMessage
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”message
Section titled “message”
readonlymessage:string
OutboundEnvelope
Section titled “OutboundEnvelope”Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new OutboundEnvelope(…
args):OutboundEnvelope
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”attemptId
Section titled “attemptId”
readonlyattemptId:string&Brand<"AttemptId">
payload
Section titled “payload”
readonlypayload:Started|SessionEvent|Final|Failed|Interrupted|InterventionApplied|InterventionRejected
sentAt
Section titled “sentAt”
readonlysentAt:Utc
sequence
Section titled “sequence”
readonlysequence:number&Brand<"AttemptChannelSequence">
version
Section titled “version”
readonlyversion:7
ParentTarget
Section titled “ParentTarget”The Pi parent, the default recipient of operator input for an Attempt.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ParentTarget(…
args):ParentTarget
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props?: object, options?: MakeOptions] |
Returns
Section titled “Returns”Release
Section titled “Release”Ends a held child’s takeover, letting its idle result return to the awaiting parent (ADR 0018).
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Release(…
args):Release
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props?: object, options?: MakeOptions] |
Returns
Section titled “Returns”RunSpec
Section titled “RunSpec”Launch input for one Attempt. Worker credentials are never part of it.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RunSpec(…
args):RunSpec
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”
readonlyagent:Agent
attemptId
Section titled “attemptId”
readonlyattemptId:string&Brand<"AttemptId">
baseCommit
Section titled “baseCommit”
readonlybaseCommit:string&Brand<"CommitSha">
maxChildren
Section titled “maxChildren”
readonlymaxChildren:number&Brand<"ChildSessionBudget">
parentEffort
Section titled “parentEffort”
readonlyparentEffort:"off"|"minimal"|"low"|"medium"|"high"|"xhigh"|"max"
parentModel
Section titled “parentModel”
readonlyparentModel:Option<string&Brand<"ModelId">>
payload
Section titled “payload”
readonlypayload:Json
repository
Section titled “repository”
readonlyrepository:string&Brand<"RepositoryName">
resume
Section titled “resume”
readonlyresume:Option<SalvagePushed>
The previous Attempt’s pushed salvage checked out in this workspace; the agent continues from it.
revision
Section titled “revision”
readonlyrevision:string&Brand<"RepositoryRevision">
readonlytask:string&Brand<"AttemptTask">
SessionEvent
Section titled “SessionEvent”One normalized parent or child session event, persisted in the Attempt transcript.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SessionEvent(…
args):SessionEvent
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”
readonlyevent:SessionStarted|TextOutput|ToolStarted|ToolFinished|PoolRateLimitsUpdated|SessionFinished|SessionIdle|SessionResumed|SessionTokensUpdated
Started
Section titled “Started”The parent model the SDK selected at launch, which the roster may not declare.
Child sessions report their own model in SessionStarted events.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Started(…
args):Started
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”parentModel
Section titled “parentModel”
readonlyparentModel:string&Brand<"ModelId">
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Steer(…
args):Steer
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”message
Section titled “message”
readonlymessage:string
Interfaces
Section titled “Interfaces”Progress
Section titled “Progress”How far one outbound channel has legally progressed.
Properties
Section titled “Properties”nextSequence
Section titled “nextSequence”
readonlynextSequence:number
readonlystate:"AwaitingStarted"|"Running"|"Terminal"
Where a channel consumer persists envelopes and the executor’s salvage record.
Properties
Section titled “Properties”append
Section titled “append”
readonlyappend: (direction,envelope) =>Effect<void,InfraFailure|DefectFailure|AgentFailure|RunawayFailure|ChildSessionBudgetFailure>
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
direction |
"inbound" | "outbound" |
envelope |
OutboundEnvelope | InboundEnvelope |
Returns
Section titled “Returns”Effect<void, InfraFailure | DefectFailure | AgentFailure | RunawayFailure | ChildSessionBudgetFailure>
salvage
Section titled “salvage”
readonlysalvage: (salvage) =>Effect<void,InfraFailure|DefectFailure|AgentFailure|RunawayFailure|ChildSessionBudgetFailure>
Records what the executor preserved of the workspace after the Attempt ended without success.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
salvage |
SalvagePushed | SalvageRetained |
Returns
Section titled “Returns”Effect<void, InfraFailure | DefectFailure | AgentFailure | RunawayFailure | ChildSessionBudgetFailure>
Violation
Section titled “Violation”One protocol violation, described for the infra failure that reports it.
Properties
Section titled “Properties”detail
Section titled “detail”
readonlydetail:string
message
Section titled “message”
readonlymessage:string
Type Aliases
Section titled “Type Aliases”Direction
Section titled “Direction”Direction = typeof
Direction.Type
Envelope
Section titled “Envelope”Envelope = typeof
Envelope.Type
InboundPayload
Section titled “InboundPayload”InboundPayload = typeof
InboundPayload.Type
OperatorAction
Section titled “OperatorAction”OperatorAction = typeof
OperatorAction.Type
Nonterminal operator controls; cancellation is an Attempt operation.
OutboundPayload
Section titled “OutboundPayload”OutboundPayload = typeof
OutboundPayload.Type
Sequence
Section titled “Sequence”Sequence = typeof
Sequence.Type
Per-Attempt, per-direction message sequence, starting at 1. Distinct from the engine’s transcript sequence, which orders persisted rows globally.
SessionTarget
Section titled “SessionTarget”SessionTarget = typeof
SessionTarget.Type
Which session inside an Attempt an inbound envelope addresses: the Pi parent, or one of its children.
Variables
Section titled “Variables”
constadmit: (progress,attemptId,envelope) =>Result.Result<Progress,Violation>
Checks one outbound envelope against the progress so far and returns the next progress, or the violation. Whatever sends outbound envelopes folds each one through it before appending it.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
progress |
Progress |
attemptId |
AttemptId |
envelope |
OutboundEnvelope |
Returns
Section titled “Returns”Result.Result<Progress, Violation>
Direction
Section titled “Direction”
constDirection:Schema.Literals<readonly ["inbound","outbound"]>
DIRECTIONS
Section titled “DIRECTIONS”
constDIRECTIONS: readonly ["inbound","outbound"]
Relative to the Attempt’s parent: inbound envelopes carry operator input and
Cancel to it, and outbound envelopes carry its activity and outcome.
Envelope
Section titled “Envelope”
constEnvelope:Schema.Union<readonly [typeofOutboundEnvelope, typeofInboundEnvelope]>
InboundPayload
Section titled “InboundPayload”
constInboundPayload:Schema.Union<readonly [Schema.Union<readonly [typeofSteer, typeofInterrupt, typeofOperatorMessage, typeofRelease]>, typeofCancel]>
initialProgress
Section titled “initialProgress”
constinitialProgress:Progress
OperatorAction
Section titled “OperatorAction”
constOperatorAction:Schema.Union<readonly [typeofSteer, typeofInterrupt, typeofOperatorMessage, typeofRelease]>
Nonterminal operator controls; cancellation is an Attempt operation.
OutboundPayload
Section titled “OutboundPayload”
constOutboundPayload:Schema.Union<readonly [typeofStarted, typeofSessionEvent, typeofFinal, typeofFailed, typeofInterrupted, typeofInterventionApplied, typeofInterventionRejected]>
PROTOCOL_VERSION
Section titled “PROTOCOL_VERSION”
constPROTOCOL_VERSION:7
Sequence
Section titled “Sequence”
constSequence:Schema.brand<Schema.Int,"AttemptChannelSequence">
Per-Attempt, per-direction message sequence, starting at 1. Distinct from the engine’s transcript sequence, which orders persisted rows globally.
SessionTarget
Section titled “SessionTarget”
constSessionTarget:Schema.Union<readonly [typeofParentTarget, typeofChildTarget]>
Which session inside an Attempt an inbound envelope addresses: the Pi parent, or one of its children.