@usine/core/attempt
Classes
Section titled “Classes”Attempt
Section titled “Attempt”One try of a step on a worker. outcome is none while the attempt is in flight.
salvage records what the executor preserved of the workspace after an
unsuccessful end; the next attempt of the same Run resumes from a pushed salvage.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Attempt(…
args):Attempt
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”
readonlyagent:string&Brand<"AgentName">
readonlybrain:BrainSpec
readonlyid:string&Brand<"AttemptId">
number
Section titled “number”
readonlynumber:number&Brand<"AttemptNumber">
operatorIntervened
Section titled “operatorIntervened”
readonlyoperatorIntervened:boolean
outcome
Section titled “outcome”
readonlyoutcome:Option<AttemptSucceeded|AttemptFailed|AttemptCanceled>
parentModel
Section titled “parentModel”
readonlyparentModel:Option<string&Brand<"ModelId">>
readonlyrunId:string&Brand<"RunId">
salvage
Section titled “salvage”
readonlysalvage:Option<SalvagePushed|SalvageRetained>
startedAt
Section titled “startedAt”
readonlystartedAt:Utc
stepName
Section titled “stepName”
readonlystepName:string&Brand<"StepName">
readonlytask:string&Brand<"AttemptTask">
worker
Section titled “worker”
readonlyworker:string&Brand<"WorkerName">
AttemptContext
Section titled “AttemptContext”The effective task and roster Agent an operator assigns to a Run’s later Attempts.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AttemptContext(…
args):AttemptContext
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”
readonlyagent:Agent
parentModel
Section titled “parentModel”
readonlyparentModel:Option<string&Brand<"ModelId">>
readonlytask:string&Brand<"AttemptTask">
Type Aliases
Section titled “Type Aliases”AttemptId
Section titled “AttemptId”AttemptId = typeof
AttemptId.Type
Identity of one execution try; each retry receives a new identity under the same Run and Step.
AttemptNumber
Section titled “AttemptNumber”AttemptNumber = typeof
AttemptNumber.Type
1-based position of a try under its step. Retries are attempt N+1 under the same step, and the auto-retry cap counts total attempts.
AttemptTask
Section titled “AttemptTask”AttemptTask = typeof
AttemptTask.Type
Task text given to the agent after loop interpolation or an operator’s edit-and-retry amendment.
Variables
Section titled “Variables”AttemptId
Section titled “AttemptId”
constAttemptId:Schema.brand<Schema.NonEmptyString,"AttemptId">
Identity of one execution try; each retry receives a new identity under the same Run and Step.
AttemptNumber
Section titled “AttemptNumber”
constAttemptNumber:Schema.brand<Schema.Int,"AttemptNumber">
1-based position of a try under its step. Retries are attempt N+1 under the same step, and the auto-retry cap counts total attempts.
AttemptTask
Section titled “AttemptTask”
constAttemptTask:Schema.brand<Schema.String,"AttemptTask">
Task text given to the agent after loop interpolation or an operator’s edit-and-retry amendment.
shouldAutoRetry
Section titled “shouldAutoRetry”
constshouldAutoRetry: (options) =>boolean
The auto-retry law: only an infra failure retries, and only while the attempt
number is below maxAutoAttempts (ADR 0002).
number is the failed try’s position; maxAutoAttempts includes the first try.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
{ failure: AttemptFailure; maxAutoAttempts: AttemptNumber; number: AttemptNumber; } |
options.failure |
AttemptFailure |
options.maxAutoAttempts |
AttemptNumber |
options.number |
AttemptNumber |
Returns
Section titled “Returns”boolean