Skip to main content

Classes

References

Run

Re-exports Run

RunCapture

Re-exports RunCapture

RunClient

Re-exports RunClient

ExperimentClient

Re-exports ExperimentClient

ScenarioRunStart

Re-exports ScenarioRunStart

ModelRunStart

Re-exports ModelRunStart

Type Aliases

ScenarioRetention

Ƭ ScenarioRetention: Object Independent real-time lifetimes from admission, bounded by inherited state.

Type declaration


ScenarioPlan

Ƭ ScenarioPlan: Object

Type declaration


ScenarioSimulation

Ƭ ScenarioSimulation: Object

Type declaration


ScenarioRecipe

Ƭ ScenarioRecipe: Object

Type declaration


ScenarioProgramDefinition

Ƭ ScenarioProgramDefinition: Object Not exported: an exported type refers to it.

Type declaration


ScenarioProgramMeasurement

Ƭ ScenarioProgramMeasurement: Object Not exported: an exported type refers to it.

Type declaration


ScenarioModelBudget

Ƭ ScenarioModelBudget: Object The complete work of one inference step’s model tree: every nested program call and fan-out child is charged to the same evaluation. Per-value byte bounds and the run record bound still apply.

Type declaration


ScenarioObservationScopes

Ƭ ScenarioObservationScopes: Object Independent read ceilings for experimental roles; existing row, field, marking and live-authority checks still apply.

Type declaration


ScenarioObservationCeiling

Ƭ ScenarioObservationCeiling: Object Not exported: an exported type refers to it.

Type declaration


ScenarioStep

Ƭ ScenarioStep: { kind: "operation" ; id: string ; path: string ; invoke: ScenarioFunction ; recover: ScenarioFunction ; contractDigest: string ; args: ScenarioExpression } | { kind: "observation" ; id: string ; source: ScenarioSource ; history: string ; decisionAt: number ; cutoff: number } | { kind: "assumption" ; id: string ; operation: string ; states?: ScenarioAssumedStates } | { kind: "query" ; id: string ; function: ScenarioFunction ; args: ScenarioExpression } | { kind: "measurement" ; id: string ; function: ScenarioFunction ; args: ScenarioExpression } | { kind: "expectation" ; id: string ; actual: ScenarioExpression ; comparison: ScenarioComparison ; expected: ScenarioExpression } | { kind: "refusal" ; id: string ; operation: string ; code: string } | { kind: "snapshot" ; id: string ; ttlHours: number } | { kind: "advance" ; id: string ; byMs: number ; maxJobs: number } | { kind: "inference" ; id: string ; model: string ; binding: ScenarioModelBinding ; args: ScenarioExpression } Not exported: an exported type refers to it.

ScenarioSource

Ƭ ScenarioSource: Object

Type declaration


ScenarioAssumedStates

Ƭ ScenarioAssumedStates: Object A literal hypothetical alternative, checked against the named source and the held command’s declared field scope. It carries no delivery evidence.

Type declaration


ScenarioComparison

Ƭ ScenarioComparison: "equal" | "at_least" | "at_most" Not exported: an exported type refers to it.

ScenarioModelBinding

Ƭ ScenarioModelBinding: "candidate" | "fixed"

ScenarioHistory

Ƭ ScenarioHistory: Object

Type declaration


ScenarioObservation

Ƭ ScenarioObservation: Object

Type declaration


ScenarioHistoryProducer

Ƭ ScenarioHistoryProducer: Object Not exported: an exported type refers to it.

Type declaration


ScenarioProgramCaptureRequest

Ƭ ScenarioProgramCaptureRequest: Object

Type declaration


ScenarioProgramRequest

Ƭ ScenarioProgramRequest: Object

Type declaration


ScenarioProgramStatus

Ƭ ScenarioProgramStatus: Object

Type declaration


ScenarioProgramProgress

Ƭ ScenarioProgramProgress: { state: "capturing" } | { state: "ready" } | { state: "expired" } | { state: "failed" ; code: string }

ScenarioProgramRetirementResult

Ƭ ScenarioProgramRetirementResult: Object

Type declaration


ScenarioPlanRequest

Ƭ ScenarioPlanRequest: Object Not exported: an exported type refers to it.

Type declaration


ModelRunPlanRequest

Ƭ ModelRunPlanRequest: Object Planning resolves a handle in the selected executable at the selected state.

Type declaration


ModelReference

Ƭ ModelReference: Object Not exported: an exported type refers to it.

Type declaration


ScenarioRunRequest

Ƭ ScenarioRunRequest: Object Not exported: an exported type refers to it.

Type declaration


ScenarioStatus

Ƭ ScenarioStatus: Object

Type declaration


ScenarioExecutionState

Ƭ ScenarioExecutionState: { state: "admitted" } | { state: "running" } | { state: "waiting" } | { state: "completed" } | { state: "failed" } | { state: "cancelled" } Control state excludes step labels, refusal codes and business outcomes.

ScenarioSettlement

Ƭ ScenarioSettlement: { state: "pending" } | { state: "settled" } | { state: "unknown" } Whether a stopped run has reconciled every possibly submitted operation.

ScenarioCleanup

Ƭ ScenarioCleanup: { state: "pending" } | { state: "scheduled" ; reclaimAt: string } | { state: "reclaiming" } | { state: "complete" } | { state: "retained" ; expiresAt: string } | { state: "blocked" ; message: string }

ScenarioReport

Ƭ ScenarioReport: Object

Type declaration


ScenarioResult

Ƭ ScenarioResult: { state: "pending" } | { state: "value" ; value: unknown } | { state: "unavailable" } A run result is disclosed only after its dependencies are established under the reader’s current authority. JSON preserves exact Bijection scalars.

ScenarioRunInputs

Ƭ ScenarioRunInputs: Object What a run was started from and with, without business values: its starting snapshot and behavior, sampling controls, candidate program, replaced decisions, captured history names and sibling.

Type declaration


ScenarioCheckReport

Ƭ ScenarioCheckReport: Object

Type declaration


ScenarioCheckOutcome

Ƭ ScenarioCheckOutcome: { state: "pending" } | { state: "passed" ; actual: unknown ; expected: unknown } | { state: "failed" ; actual: unknown ; expected: unknown } | { state: "withheld" } | { state: "unavailable" }

ScenarioAssumptionReport

Ƭ ScenarioAssumptionReport: Object

Type declaration


ScenarioAssumptionConsequence

Ƭ ScenarioAssumptionConsequence: "declared_states" | "modeled_states" Not exported: an exported type refers to it.

ScenarioAssumptionOutcome

Ƭ ScenarioAssumptionOutcome: { state: "pending" } | { state: "admitted" ; calls: number ; digest: string } | { state: "withheld" } | { state: "unavailable" }

ScenarioObservationReport

Ƭ ScenarioObservationReport: Object

Type declaration


ScenarioObservationProvenance

Ƭ ScenarioObservationProvenance: "simulated" | "predicted" Not exported: an exported type refers to it.

ScenarioObservationOutcome

Ƭ ScenarioObservationOutcome: { state: "pending" } | { state: "admitted" ; records: number ; digest: string } | { state: "withheld" } | { state: "unavailable" }

ScenarioMeasurementReport

Ƭ ScenarioMeasurementReport: Object

Type declaration


ScenarioMeasurementOutcome

Ƭ ScenarioMeasurementOutcome: { state: "pending" } | { state: "measured" ; program: ProgramReference ; revision: string ; readings: unknown ; digest: string } | { state: "withheld" } | { state: "unavailable" }

ScenarioInferenceReport

Ƭ ScenarioInferenceReport: Object

Type declaration


ScenarioInferenceOutcome

Ƭ ScenarioInferenceOutcome: { state: "pending" } | { state: "inferred" ; version: string ; digest: string ; host: ProgramReference ; calls: ScenarioInferenceCall[] ; basis: ScenarioInferenceBasis } | { state: "unavailable" }

ScenarioInferenceCall

Ƭ ScenarioInferenceCall: Object

Type declaration


ScenarioInferenceBasis

Ƭ ScenarioInferenceBasis: Object Not exported: an exported type refers to it.

Type declaration


ScenarioResultResponse

Ƭ ScenarioResultResponse: Object

Type declaration


ScenarioCollectionStartRequest

Ƭ ScenarioCollectionStartRequest: Object

Type declaration


ScenarioCollectionBudget

Ƭ ScenarioCollectionBudget: Object Aggregate limits fixed before any collection child starts. The parent accounts every child’s admitted work; the native scheduler queues children while the collection is at its branch, byte or concurrency allowance.

Type declaration


ScenarioCollectionCase

Ƭ ScenarioCollectionCase: Object Not exported: an exported type refers to it.

Type declaration


ScenarioCollectionRequest

Ƭ ScenarioCollectionRequest: Object Not exported: an exported type refers to it.

Type declaration


ScenarioCollectionStatus

Ƭ ScenarioCollectionStatus: Object

Type declaration


ScenarioCollectionExecution

Ƭ ScenarioCollectionExecution: { state: "running" } | { state: "waiting" } | { state: "completed" } | { state: "cancelled" } Not exported: an exported type refers to it.

ScenarioSelection

Ƭ ScenarioSelection: Object Immutable identity of a native training decision; no metric values are cached.

Type declaration


ScenarioSelectionReference

Ƭ ScenarioSelectionReference: Object

Type declaration


ScenarioCollectionReport

Ƭ ScenarioCollectionReport: Object

Type declaration


ScenarioCollectionOrderRequest

Ƭ ScenarioCollectionOrderRequest: Object Order a bounded collection’s candidates by one named frozen measurement.

Type declaration


ScenarioCollectionOrder

Ƭ ScenarioCollectionOrder: Object

Type declaration


ScenarioCandidate

Ƭ ScenarioCandidate: Object Not exported: an exported type refers to it.

Type declaration


ScenarioCandidateComparison

Ƭ ScenarioCandidateComparison: { outcome: "preferred" ; candidate: string ; ranking: ScenarioCandidateRanking } | { outcome: "tie" ; candidates: string[] ; ranking: ScenarioCandidateRanking } | { outcome: "no_feasible" ; ranking: ScenarioCandidateRanking } | { outcome: "incomplete" ; reason: string ; ranking: ScenarioCandidateRanking | null } | { outcome: "incomparable" ; reason: string } Not exported: an exported type refers to it.

ScenarioCandidateRanking

Ƭ ScenarioCandidateRanking: Object Not exported: an exported type refers to it.

Type declaration


ScenarioCandidatePlace

Ƭ ScenarioCandidatePlace: Object Not exported: an exported type refers to it.

Type declaration


ScenarioCandidateNotComparable

Ƭ ScenarioCandidateNotComparable: Object Not exported: an exported type refers to it.

Type declaration


ScenarioSelectionStatus

Ƭ ScenarioSelectionStatus: Object

Type declaration


ScenarioHoldoutStartRequest

Ƭ ScenarioHoldoutStartRequest: Object

Type declaration


ScenarioPromotionRequest

Ƭ ScenarioPromotionRequest: Object

Type declaration


ScenarioPromotionProgress

Ƭ ScenarioPromotionProgress: { state: "pending" } | { state: "ready" } | { state: "expired" } | { state: "failed" ; code: string }

ScenarioPromotionStatus

Ƭ ScenarioPromotionStatus: Object

Type declaration


SubmissionEnvelope

Ƭ SubmissionEnvelope: Object Not exported: an exported type refers to it.

Type declaration


ScenarioCall

Ƭ ScenarioCall: (endpoint: "programs/capture" | "programs/status" | "programs/retire" | "programs/promote" | "programs/promotion" | "models/list" | "models/plan" | "models/inspect" | "plan" | "start" | "status" | "report" | "result" | "request" | "resume" | "cancel" | "retire" | "collections/start" | "collections/status" | "collections/report" | "collections/order" | "collections/select" | "collections/selection" | "collections/holdout" | "collections/resume" | "collections/cancel" | "collections/retire", body: ScenarioProgramCaptureRequest | ScenarioProgramRequest | ScenarioPromotionRequest | Record<string, never> | ModelRunPlanRequest | ScenarioPlanRequest | ScenarioStartRequest | ScenarioRunRequest | ScenarioCollectionStartRequest | ScenarioCollectionRequest | ScenarioCollectionOrderRequest | ScenarioHoldoutStartRequest, signal?: AbortSignal) => Promise<unknown>

Type declaration

▸ (endpoint, body, signal?): Promise<unknown>
Parameters
Returns
Promise<unknown>

ScenarioCollectionCapture

Ƭ ScenarioCollectionCapture: Object Persist this complete value before admission, including the holdout link. Restore it to retry an uncertain start without replanning or minting IDs.

Type declaration


ScenarioInput

Ƭ ScenarioInput<T>: ScenarioValue<T> | T extends readonly infer Item[] ? ScenarioInput<Item>[] : T extends ArrayBuffer ? T : T extends object ? { [Key in keyof T]: ScenarioInput<T[Key]> } : T Arguments may refer to earlier results without losing their declared types.

Type parameters


ScenarioOperation

Ƭ ScenarioOperation<Result>: Object

Type parameters

Type declaration


ScenarioObservationEntry

Ƭ ScenarioObservationEntry: string | { relation: string ; fields?: Record<string, AccessClaimType> ; when?: AccessCondition } One relation a role may read: its name, or the relation with the only fields it may read (typed for when) and a condition each read’s index range must prove. when reads row fields as resource.<field>, the simulated decision time as context.now and scalar case arguments as context.<argument>. Reads must .select(...) declared fields; a filter never establishes observation.

ScenarioObservationDeclaration

Ƭ ScenarioObservationDeclaration: Object

Type declaration


ScenarioDefinition

Ƭ ScenarioDefinition: Object

Type declaration


RunRelation

Ƭ RunRelation: { kind: "same" } | { kind: "captured" ; from: SnapshotRef ; step: string } | { kind: "fresh" ; from: SnapshotRef ; step: string } | { kind: "recompute" } | { kind: "resample" } | { kind: "same-specification" } | { kind: "sibling" } | { kind: "unrelated" } How a later run relates to an earlier one, from their native reports.

ScenarioProgramContext

Ƭ ScenarioProgramContext: Object

Type declaration


ScenarioProcedure

Ƭ ScenarioProcedure<I, O>: Object A reusable sequence of scenario instructions with a typed input and result. Calling it from several places, or from another procedure, keeps every instruction key distinct through its scope.

Type parameters

Type declaration


ScenarioSubmission

Ƭ ScenarioSubmission: Pick<SubmissionEnvelope, "deployment" | "caller"> & { endpoint: "start" ; request: ScenarioStartRequest } | { endpoint: "resume" | "cancel" | "retire" ; request: ScenarioRunRequest } | { endpoint: "collections/start" ; request: ScenarioCollectionStartRequest } | { endpoint: "collections/holdout" ; request: ScenarioHoldoutStartRequest } | { endpoint: "collections/resume" | "collections/cancel" | "collections/retire" ; request: ScenarioCollectionRequest } | { endpoint: "collections/select" ; request: ScenarioCollectionOrderRequest } | { endpoint: "programs/capture" ; request: ScenarioProgramCaptureRequest } | { endpoint: "programs/retire" ; request: ScenarioProgramRequest } | { endpoint: "programs/promote" ; request: ScenarioPromotionRequest }

ScenarioSubmissionScope

Ƭ ScenarioSubmissionScope: SubmissionScope<`scenario:${ScenarioSubmission[“endpoint”]}`>

ScenarioSubmissionStore

Ƭ ScenarioSubmissionStore: SubmissionStore<ScenarioSubmission, ScenarioSubmissionScope["ref"]>

AccessCondition

Ƭ AccessCondition<Resource, Principal, Context>: (scope: AccessConditionScope<Resource, Principal, Context>) => AccessExpression<boolean>

Type parameters

Type declaration

▸ (scope): AccessExpression<boolean> Not exported: an exported type refers to it.
Parameters
Returns
AccessExpression<boolean>

Variables

MAX_SCENARIO_STEP_KEY_BYTES

• Const MAX_SCENARIO_STEP_KEY_BYTES: 256 Native step keys, including every enclosing program scope, admit this many bytes.

Functions

scenarioModelBudget

▸ scenarioModelBudget(budget): ScenarioModelBudget Check a model budget against the native bounds before admission.

Parameters

Returns

ScenarioModelBudget

defineScenario

▸ defineScenario<Args>(definition): ScenarioDefinition Define a versioned, repeatable recipe over ordinary business operations.

Type parameters

Parameters

Returns

ScenarioDefinition

runRelation

▸ runRelation(earlier, later): RunRelation Classify how later relates to earlier. Checkpoints produced by the earlier run are its output (step: "output") and its named intermediate captures.

Parameters

Returns

RunRelation

defineScenarioProcedure

▸ defineScenarioProcedure<I, O>(run): ScenarioProcedure<I, O>

Type parameters

Parameters

Returns

ScenarioProcedure<I, O>

defineScenarioProgram

▸ defineScenarioProgram<A, O>(definition): RegisteredQuery<"public", { input: any ; answer: any ; references: any ; frame: null | string ; nowMs: number }, Promise<{ result?: undefined ; state: "call" ; step: string ; frame: string = encoded.frame; references: string[] = encoded.references } | { validator: string ; state: "complete" ; result: string ; step?: undefined ; frame?: undefined = encoded.frame; references?: undefined = encoded.references }>> Export the query and reference it from defineScenario({program}). Each call resumes the saved frame with the awaited instruction’s answer, runs one segment and returns the next instruction with its new frame.

Type parameters

Parameters

Returns

RegisteredQuery<"public", { input: any ; answer: any ; references: any ; frame: null | string ; nowMs: number }, Promise<{ result?: undefined ; state: "call" ; step: string ; frame: string = encoded.frame; references: string[] = encoded.references } | { validator: string ; state: "complete" ; result: string ; step?: undefined ; frame?: undefined = encoded.frame; references?: undefined = encoded.references }>>

createRunClient

▸ createRunClient(call, ownerSignal?): Readonly<{ start: <I, O>(spec: ModelRunStart<I, O>) => Promise<Run<O>><O>(spec: ScenarioRunStart) => Promise<Run<O>> ; get: <O>(run: string | RunCapture, options: { model?: ModelReference<any, O> }) => Run<O> ; list: (signal?: AbortSignal) => Promise<readonly ModelRunSummary[]> ; calibrate: <T>(definition: { name: string ; run: Run<T> }, signal?: AbortSignal) => Promise<ModelArtifact<T>> }> Start and observe scenario and model runs through one native lifecycle.

Parameters

Returns

Readonly<{ start: <I, O>(spec: ModelRunStart<I, O>) => Promise<Run<O>><O>(spec: ScenarioRunStart) => Promise<Run<O>> ; get: <O>(run: string | RunCapture, options: { model?: ModelReference<any, O> }) => Run<O> ; list: (signal?: AbortSignal) => Promise<readonly ModelRunSummary[]> ; calibrate: <T>(definition: { name: string ; run: Run<T> }, signal?: AbortSignal) => Promise<ModelArtifact<T>> }>