Generated from services/crossfire/node/packages/contracts/src/fleet-runtime.ts at
52bf0279Definitions#
These TypeScript definitions document server validation. check.object rejects unknown fields. Custom functions and refinements specify additional checks.
Imported definitions#
runtimeAction#
runtimeAction = check.choice('start', 'stop', 'reset')Related definitions:
runtimeOperation#
runtimeOperation = check.refine(check.object({ operationId: check.identifier, fleetId: check.identifier,
agentId: check.nullable(check.identifier), action: runtimeAction, expectedRevision: check.integer(),
status: check.choice('pending', 'running', 'succeeded', 'failed'), createdAt: check.integer(), completedAt: check.nullable(check.integer()),
errorMessage: check.nullable(check.text(4096)) }), value => (value.status === 'succeeded' || value.status === 'failed') === (value.completedAt !== null)
&& (value.status === 'failed') === (value.errorMessage !== null), 'Invalid session operation outcome')Related definitions:
runtimeRequest#
runtimeRequest = check.refine(check.object({ operationId: check.identifier, agentId: check.nullable(check.identifier),
action: runtimeAction, expectedRevision: check.integer(), confirmFreshHistory: check.boolean }), value => value.confirmFreshHistory === (value.action === 'reset'), 'Fresh history requires explicit confirmation')Related definitions:
runtimeClaim#
runtimeClaim = check.object({ connectionId: check.identifier })Related definitions:
runtimeReceipt#
runtimeReceipt = check.refine(check.object({ connectionId: check.identifier, status: check.choice('succeeded', 'failed'),
errorMessage: check.nullable(check.text(4096)) }), value => (value.status === 'failed') === (value.errorMessage !== null), 'Invalid session receipt')Related definitions:
FleetRuntimeOperation#
export type FleetRuntimeOperation = check.Parsed<typeof runtimeOperation>;Related definitions: