Skip to content

@codesoul-co/hypha-core / contracts/runtime-coordination-schemas

Using this module

Use the Runtime coordination schemas module for declaring and runtime-validating contracts. It exports 38 constants, 18 functions.

Import from the package entrypoint

ts
import {
  fencedRunLeaseDefinition,
  fencedRunLeaseExample,
  fencedRunLeaseJsonSchema,
  fencedRunLeaseSchema,
  resourceAcquireRequestSchema,
  resourceClaimAssertionRequestSchema,
  resourceListRequestSchema,
  resourceReleaseRequestSchema,
} from '@codesoul-co/hypha-core';

// The complete export list is documented below.

Usage patterns

  • The module exposes 18 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
  • The 38 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.

Runtime validation example

ts
import { fencedRunLeaseSchema } from '@codesoul-co/hypha-core';

declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = fencedRunLeaseSchema.parse(input);

Parse untrusted configuration, network, or persisted input with the runtime schema before passing it to functions or classes that expect a validated contract.

Public exports

SymbolKindSignatureDescription
fencedRunLeaseDefinitionconstantconst fencedRunLeaseDefinition: SpecSchemaDefinition<FencedRunLease>Fenced Run Lease Definition constant exported by the contracts/runtime-coordination-schemas module.
fencedRunLeaseExampleconstantconst fencedRunLeaseExample: FencedRunLeaseValid example value for Fenced Run Lease.
fencedRunLeaseJsonSchemaconstantconst fencedRunLeaseJsonSchema: JsonSchemaJSON Schema for Fenced Run Lease.
fencedRunLeaseSchemaconstantconst fencedRunLeaseSchema: z.ZodEffects<z.ZodObject<{ id: z.ZodString; tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; ownerId: z.ZodString; acquiredAt: z.ZodString; expiresAt: z.ZodString; heartbeatAt: z.ZodString; revision: z.ZodNumber; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { id: string; revision: number; userId: string; runId: string; ex...Runtime schema for Fenced Run Lease.
resourceAcquireRequestSchemaconstantconst resourceAcquireRequestSchema: z.ZodObject<{ runLease: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.Z...Runtime schema for Resource Acquire Request.
resourceClaimAssertionRequestSchemaconstantconst resourceClaimAssertionRequestSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; resourceType: z.ZodEnum<["workspace", "artifact", "tool_scope", "memory_scope", "external_account", "custom"]>; resourceKey: z.ZodString; checkedAt: z.ZodString; } & { claimId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; checkedAt: string; ownerId: stri...Runtime schema for Resource Claim Assertion Request.
resourceListRequestSchemaconstantconst resourceListRequestSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; resourceType: z.ZodEnum<["workspace", "artifact", "tool_scope", "memory_scope", "external_account", "custom"]>; resourceKey: z.ZodString; checkedAt: z.ZodString; }, "strict", z.ZodTypeAny, { checkedAt: string; resourceType: "custom" | "workspace" | "artifact" | "tool_scope" | "memory_scope" | "external_account"; resourceKey: strin...Runtime schema for Resource List Request.
resourceReleaseRequestSchemaconstantconst resourceReleaseRequestSchema: z.ZodObject<{ runLease: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.Z...Runtime schema for Resource Release Request.
resourceRenewRequestSchemaconstantconst resourceRenewRequestSchema: z.ZodObject<{ runLease: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.Zod...Runtime schema for Resource Renew Request.
runLeaseAcquireRequestSchemaconstantconst runLeaseAcquireRequestSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; requestedLeaseId: z.ZodString; ownerId: z.ZodString; ttlMs: z.ZodNumber; acquiredAt: z.ZodString; idempotencyKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; idempotencyKey: string; ownerId: string; acquiredAt: string; requestedLeas...Runtime schema for Run Lease Acquire Request.
runLeaseAssertionRequestSchemaconstantconst runLeaseAssertionRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z....Runtime schema for Run Lease Assertion Request.
runLeaseAuthorizationSchemaconstantconst runLeaseAuthorizationSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z.Zod...Runtime schema for Run Lease Authorization.
runLeaseGuardJsonSchemaconstantconst runLeaseGuardJsonSchema: JsonSchemaJSON Schema for Run Lease Guard.
runLeaseGuardSchemaconstantconst runLeaseGuardSchema: z.ZodObject<{ leaseId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; leaseId: string; }, { fencingToken: number; ownerId: string; leaseId: string; }>Runtime schema for Run Lease Guard.
runLeaseHeartbeatRequestSchemaconstantconst runLeaseHeartbeatRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z....Runtime schema for Run Lease Heartbeat Request.
runLeasePreemptRequestSchemaconstantconst runLeasePreemptRequestSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; requestedLeaseId: z.ZodString; ownerId: z.ZodString; ttlMs: z.ZodNumber; acquiredAt: z.ZodString; idempotencyKey: z.ZodString; } & { reason: z.ZodLiteral<"cancellation">; }, "strict", z.ZodTypeAny, { userId: string; runId: string; reason: "cancellation"; idempo...Runtime schema for Run Lease Preempt Request.
runLeaseReleaseRequestSchemaconstantconst runLeaseReleaseRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z.Zo...Runtime schema for Run Lease Release Request.
runLeaseScopeJsonSchemaconstantconst runLeaseScopeJsonSchema: JsonSchemaJSON Schema for Run Lease Scope.
runLeaseScopeSchemaconstantconst runLeaseScopeSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>Runtime schema for Run Lease Scope.
runtimeCoordinationContractDefinitionsconstantconst runtimeCoordinationContractDefinitions: readonly [SpecSchemaDefinition<FencedRunLease>, SpecSchemaDefinition<StateExecutionClaim>, SpecSchemaDefinition<RuntimeResourceClaim>]Runtime Coordination Contract Definitions constant exported by the contracts/runtime-coordination-schemas module.
runtimeCoordinationContractJsonSchemasconstantconst runtimeCoordinationContractJsonSchemas: Record<string, JsonSchema>Runtime Coordination Contract JSON Schemas constant exported by the contracts/runtime-coordination-schemas module.
runtimeResourceClaimDefinitionconstantconst runtimeResourceClaimDefinition: SpecSchemaDefinition<RuntimeResourceClaim>Runtime Resource Claim Definition constant exported by the contracts/runtime-coordination-schemas module.
runtimeResourceClaimExampleconstantconst runtimeResourceClaimExample: RuntimeResourceClaimValid example value for Runtime Resource Claim.
runtimeResourceClaimJsonSchemaconstantconst runtimeResourceClaimJsonSchema: JsonSchemaJSON Schema for Runtime Resource Claim.
runtimeResourceClaimModeSchemaconstantconst runtimeResourceClaimModeSchema: z.ZodEnum<["shared", "exclusive"]>Runtime schema for Runtime Resource Claim Mode.
runtimeResourceClaimSchemaconstantconst runtimeResourceClaimSchema: z.ZodEffects<z.ZodObject<{ id: z.ZodString; tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; resourceType: z.ZodEnum<["workspace", "artifact", "tool_scope", "memory_scope", "external_account", "custom"]>; resourceKey: z.ZodString; mode: z.ZodEnum<["shared", "exclusive"]>; runId: z.ZodString; stateId: z.ZodOptional<z.ZodString>; ownerId: z.ZodString; fencingToken: z.ZodNu...Runtime schema for Runtime Resource Claim.
runtimeResourceTypeSchemaconstantconst runtimeResourceTypeSchema: z.ZodEnum<["workspace", "artifact", "tool_scope", "memory_scope", "external_account", "custom"]>Runtime schema for Runtime Resource Type.
stateExecutionClaimAcquireRequestSchemaconstantconst stateExecutionClaimAcquireRequestSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; requestedClaimId: z.ZodString; processRevision: z.ZodString; expectedRunRevision: z.ZodNumber; runLease: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partition...Runtime schema for State Execution Claim Acquire Request.
stateExecutionClaimAssertionRequestSchemaconstantconst stateExecutionClaimAssertionRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; }, "strict", z.ZodTypeAny, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { userId: string; runId: string; stateAttempt: number; stateId: string; ...Runtime schema for State Execution Claim Assertion Request.
stateExecutionClaimCompleteRequestSchemaconstantconst stateExecutionClaimCompleteRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; }, "strict", z.ZodTypeAny, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { userId: string; runId: string; stateAttempt: number; stateId: string; t...Runtime schema for State Execution Claim Complete Request.
stateExecutionClaimDefinitionconstantconst stateExecutionClaimDefinition: SpecSchemaDefinition<StateExecutionClaim>State Execution Claim Definition constant exported by the contracts/runtime-coordination-schemas module.
stateExecutionClaimExampleconstantconst stateExecutionClaimExample: StateExecutionClaimValid example value for State Execution Claim.
stateExecutionClaimGuardSchemaconstantconst stateExecutionClaimGuardSchema: z.ZodObject<{ claimId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; claimId: string; }, { fencingToken: number; ownerId: string; claimId: string; }>Runtime schema for State Execution Claim Guard.
stateExecutionClaimJsonSchemaconstantconst stateExecutionClaimJsonSchema: JsonSchemaJSON Schema for State Execution Claim.
stateExecutionClaimReleaseRequestSchemaconstantconst stateExecutionClaimReleaseRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; }, "strict", z.ZodTypeAny, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { userId: string; runId: string; stateAttempt: number; stateId: string; te...Runtime schema for State Execution Claim Release Request.
stateExecutionClaimRenewRequestSchemaconstantconst stateExecutionClaimRenewRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; }, "strict", z.ZodTypeAny, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { userId: string; runId: string; stateAttempt: number; stateId: string; tena...Runtime schema for State Execution Claim Renew Request.
stateExecutionClaimSchemaconstantconst stateExecutionClaimSchema: z.ZodEffects<z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; claimId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; processRevision: z.ZodString; expectedRunRevision: z.ZodNumber; fencingToken: z.ZodNumber; ownerId: z.ZodString; status: z.ZodEnum<["claimed", "completed", "released", "expired"]>; acquiredAt: z.ZodString; e...Runtime schema for State Execution Claim.
stateExecutionClaimScopeSchemaconstantconst stateExecutionClaimScopeSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; }, "strict", z.ZodTypeAny, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }>Runtime schema for State Execution Claim Scope.
validateFencedRunLeasefunctionvalidateFencedRunLease(input: unknown): FencedRunLeaseValidate Fenced Run Lease function with 1 public call signature; parameters and return types are listed below.
validateResourceAcquireRequestfunctionvalidateResourceAcquireRequest(input: unknown): ResourceAcquireRequestValidate Resource Acquire Request function with 1 public call signature; parameters and return types are listed below.
validateResourceClaimAssertionRequestfunctionvalidateResourceClaimAssertionRequest(input: unknown): ResourceClaimAssertionRequestValidate Resource Claim Assertion Request function with 1 public call signature; parameters and return types are listed below.
validateResourceListRequestfunctionvalidateResourceListRequest(input: unknown): ResourceListRequestValidate Resource List Request function with 1 public call signature; parameters and return types are listed below.
validateResourceReleaseRequestfunctionvalidateResourceReleaseRequest(input: unknown): ResourceReleaseRequestValidate Resource Release Request function with 1 public call signature; parameters and return types are listed below.
validateResourceRenewRequestfunctionvalidateResourceRenewRequest(input: unknown): ResourceRenewRequestValidate Resource Renew Request function with 1 public call signature; parameters and return types are listed below.
validateRunLeaseAcquireRequestfunctionvalidateRunLeaseAcquireRequest(input: unknown): RunLeaseAcquireRequestValidate Run Lease Acquire Request function with 1 public call signature; parameters and return types are listed below.
validateRunLeaseAssertionRequestfunctionvalidateRunLeaseAssertionRequest(input: unknown): RunLeaseAssertionRequestValidate Run Lease Assertion Request function with 1 public call signature; parameters and return types are listed below.
validateRunLeaseHeartbeatRequestfunctionvalidateRunLeaseHeartbeatRequest(input: unknown): RunLeaseHeartbeatRequestValidate Run Lease Heartbeat Request function with 1 public call signature; parameters and return types are listed below.
validateRunLeasePreemptRequestfunctionvalidateRunLeasePreemptRequest(input: unknown): RunLeasePreemptRequestValidate Run Lease Preempt Request function with 1 public call signature; parameters and return types are listed below.
validateRunLeaseReleaseRequestfunctionvalidateRunLeaseReleaseRequest(input: unknown): RunLeaseReleaseRequestValidate Run Lease Release Request function with 1 public call signature; parameters and return types are listed below.
validateRuntimeResourceClaimfunctionvalidateRuntimeResourceClaim(input: unknown): RuntimeResourceClaimValidate Runtime Resource Claim function with 1 public call signature; parameters and return types are listed below.
validateStateExecutionClaimfunctionvalidateStateExecutionClaim(input: unknown): StateExecutionClaimValidate State Execution Claim function with 1 public call signature; parameters and return types are listed below.
validateStateExecutionClaimAcquireRequestfunctionvalidateStateExecutionClaimAcquireRequest(input: unknown): StateExecutionClaimAcquireRequestValidate State Execution Claim Acquire Request function with 1 public call signature; parameters and return types are listed below.
validateStateExecutionClaimAssertionRequestfunctionvalidateStateExecutionClaimAssertionRequest(input: unknown): StateExecutionClaimAssertionRequestValidate State Execution Claim Assertion Request function with 1 public call signature; parameters and return types are listed below.
validateStateExecutionClaimCompleteRequestfunctionvalidateStateExecutionClaimCompleteRequest(input: unknown): StateExecutionClaimCompleteRequestValidate State Execution Claim Complete Request function with 1 public call signature; parameters and return types are listed below.
validateStateExecutionClaimReleaseRequestfunctionvalidateStateExecutionClaimReleaseRequest(input: unknown): StateExecutionClaimReleaseRequestValidate State Execution Claim Release Request function with 1 public call signature; parameters and return types are listed below.
validateStateExecutionClaimRenewRequestfunctionvalidateStateExecutionClaimRenewRequest(input: unknown): StateExecutionClaimRenewRequestValidate State Execution Claim Renew Request function with 1 public call signature; parameters and return types are listed below.

fencedRunLeaseDefinition

Fenced Run Lease Definition constant exported by the contracts/runtime-coordination-schemas module.

Declaration

text
export declare const fencedRunLeaseDefinition: SpecSchemaDefinition<FencedRunLease>;

fencedRunLeaseExample

Valid example value for Fenced Run Lease.

Declaration

text
export declare const fencedRunLeaseExample: FencedRunLease;

fencedRunLeaseJsonSchema

JSON Schema for Fenced Run Lease.

Declaration

text
export declare const fencedRunLeaseJsonSchema: JsonSchema;

fencedRunLeaseSchema

Runtime schema for Fenced Run Lease.

Declaration

text
export declare const fencedRunLeaseSchema: z.ZodEffects<z.ZodObject<{ id: z.ZodString; tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; ownerId: z.ZodString; acquiredAt: z.ZodString; expiresAt: z.ZodString; heartbeatAt: z.ZodString; revision: z.ZodNumber; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { id: string; revision: number; userId: string; runId: string; expiresAt: string; fencingToken: number; ownerId: string; acquiredAt: string; heartbeatAt: string; partitionKey: string; tenantId?: string | undefined; }, { id: string; revision: number; userId: string; runId: string; expiresAt: string; fencingToken: number; ownerId: string; acquiredAt: string; heartbeatAt: string; partitionKey: string; tenantId?: string | undefined; }>, { id: string; revision: number; userId: string; runId: string; expiresAt: string; fencingToken: number; ownerId: string; acquiredAt: string; heartbeatAt: string; partitionKey: string; tenantId?: string | undefined; }, { id: string; revision: number; userId: string; runId: string; expiresAt: string; fencingToken: number; ownerId: string; acquiredAt: string; heartbeatAt: string; partitionKey: string; tenantId?: string | undefined; }>;

resourceAcquireRequestSchema

Runtime schema for Resource Acquire Request.

Declaration

text
export declare const resourceAcquireRequestSchema: z.ZodObject<{ runLease: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; leaseId: string; }, { fencingToken: number; ownerId: string; leaseId: string; }>; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }>; stateId: z.ZodOptional<z.ZodString>; resources: z.ZodArray<z.ZodObject<{ requestedClaimId: z.ZodString; resourceType: z.ZodEnum<["workspace", "artifact", "tool_scope", "memory_scope", "external_account", "custom"]>; resourceKey: z.ZodString; mode: z.ZodEnum<["shared", "exclusive"]>; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>>; }, "strict", z.ZodTypeAny, { requestedClaimId: string; resourceType: "custom" | "workspace" | "artifact" | "tool_scope" | "memory_scope" | "external_account"; resourceKey: string; mode: "shared" | "exclusive"; metadata?: Record<string, JsonValue> | undefined; }, { requestedClaimId: string; resourceType: "custom" | "workspace" | "artifact" | "tool_scope" | "memory_scope" | "external_account"; resourceKey: string; mode: "shared" | "exclusive"; metadata?: Record<string, JsonValue> | undefined; }>, "many">; ttlMs: z.ZodNumber; acquiredAt: z.ZodString; idempotencyKey: z.ZodString; }, "strict", z.ZodTypeAny, { idempotencyKey: string; resources: { requestedClaimId: string; resourceType: "custom" | "workspace" | "artifact" | "tool_scope" | "memory_scope" | "external_account"; resourceKey: string; mode: "shared" | "exclusive"; metadata?: Record<string, JsonValue> | undefined; }[]; acquiredAt: string; ttlMs: number; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; stateId?: string | undefined; }, { idempotencyKey: string; resources: { requestedClaimId: string; resourceType: "custom" | "workspace" | "artifact" | "tool_scope" | "memory_scope" | "external_account"; resourceKey: string; mode: "shared" | "exclusive"; metadata?: Record<string, JsonValue> | undefined; }[]; acquiredAt: string; ttlMs: number; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; stateId?: string | undefined; }>;

resourceClaimAssertionRequestSchema

Runtime schema for Resource Claim Assertion Request.

Declaration

text
export declare const resourceClaimAssertionRequestSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; resourceType: z.ZodEnum<["workspace", "artifact", "tool_scope", "memory_scope", "external_account", "custom"]>; resourceKey: z.ZodString; checkedAt: z.ZodString; } & { claimId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; checkedAt: string; ownerId: string; resourceType: "custom" | "workspace" | "artifact" | "tool_scope" | "memory_scope" | "external_account"; resourceKey: string; claimId: string; tenantId?: string | undefined; }, { fencingToken: number; checkedAt: string; ownerId: string; resourceType: "custom" | "workspace" | "artifact" | "tool_scope" | "memory_scope" | "external_account"; resourceKey: string; claimId: string; tenantId?: string | undefined; }>;

resourceListRequestSchema

Runtime schema for Resource List Request.

Declaration

text
export declare const resourceListRequestSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; resourceType: z.ZodEnum<["workspace", "artifact", "tool_scope", "memory_scope", "external_account", "custom"]>; resourceKey: z.ZodString; checkedAt: z.ZodString; }, "strict", z.ZodTypeAny, { checkedAt: string; resourceType: "custom" | "workspace" | "artifact" | "tool_scope" | "memory_scope" | "external_account"; resourceKey: string; tenantId?: string | undefined; }, { checkedAt: string; resourceType: "custom" | "workspace" | "artifact" | "tool_scope" | "memory_scope" | "external_account"; resourceKey: string; tenantId?: string | undefined; }>;

resourceReleaseRequestSchema

Runtime schema for Resource Release Request.

Declaration

text
export declare const resourceReleaseRequestSchema: z.ZodObject<{ runLease: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; leaseId: string; }, { fencingToken: number; ownerId: string; leaseId: string; }>; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }>; claimIds: z.ZodArray<z.ZodString, "many">; releasedAt: z.ZodString; }, "strict", z.ZodTypeAny, { releasedAt: string; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; claimIds: string[]; }, { releasedAt: string; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; claimIds: string[]; }>;

resourceRenewRequestSchema

Runtime schema for Resource Renew Request.

Declaration

text
export declare const resourceRenewRequestSchema: z.ZodObject<{ runLease: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; leaseId: string; }, { fencingToken: number; ownerId: string; leaseId: string; }>; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }>; claimIds: z.ZodArray<z.ZodString, "many">; ttlMs: z.ZodNumber; renewedAt: z.ZodString; }, "strict", z.ZodTypeAny, { ttlMs: number; renewedAt: string; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; claimIds: string[]; }, { ttlMs: number; renewedAt: string; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; claimIds: string[]; }>;

runLeaseAcquireRequestSchema

Runtime schema for Run Lease Acquire Request.

Declaration

text
export declare const runLeaseAcquireRequestSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; requestedLeaseId: z.ZodString; ownerId: z.ZodString; ttlMs: z.ZodNumber; acquiredAt: z.ZodString; idempotencyKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; idempotencyKey: string; ownerId: string; acquiredAt: string; requestedLeaseId: string; ttlMs: number; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; idempotencyKey: string; ownerId: string; acquiredAt: string; requestedLeaseId: string; ttlMs: number; partitionKey: string; tenantId?: string | undefined; }>;

runLeaseAssertionRequestSchema

Runtime schema for Run Lease Assertion Request.

Declaration

text
export declare const runLeaseAssertionRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; leaseId: string; }, { fencingToken: number; ownerId: string; leaseId: string; }>; checkedAt: z.ZodString; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; checkedAt: string; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; checkedAt: string; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }>;

runLeaseAuthorizationSchema

Runtime schema for Run Lease Authorization.

Declaration

text
export declare const runLeaseAuthorizationSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; leaseId: string; }, { fencingToken: number; ownerId: string; leaseId: string; }>; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }>;

runLeaseGuardJsonSchema

JSON Schema for Run Lease Guard.

Declaration

text
export declare const runLeaseGuardJsonSchema: JsonSchema;

runLeaseGuardSchema

Runtime schema for Run Lease Guard.

Declaration

text
export declare const runLeaseGuardSchema: z.ZodObject<{ leaseId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; leaseId: string; }, { fencingToken: number; ownerId: string; leaseId: string; }>;

runLeaseHeartbeatRequestSchema

Runtime schema for Run Lease Heartbeat Request.

Declaration

text
export declare const runLeaseHeartbeatRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; leaseId: string; }, { fencingToken: number; ownerId: string; leaseId: string; }>; ttlMs: z.ZodNumber; heartbeatAt: z.ZodString; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; heartbeatAt: string; ttlMs: number; }, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; heartbeatAt: string; ttlMs: number; }>;

runLeasePreemptRequestSchema

Runtime schema for Run Lease Preempt Request.

Declaration

text
export declare const runLeasePreemptRequestSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; requestedLeaseId: z.ZodString; ownerId: z.ZodString; ttlMs: z.ZodNumber; acquiredAt: z.ZodString; idempotencyKey: z.ZodString; } & { reason: z.ZodLiteral<"cancellation">; }, "strict", z.ZodTypeAny, { userId: string; runId: string; reason: "cancellation"; idempotencyKey: string; ownerId: string; acquiredAt: string; requestedLeaseId: string; ttlMs: number; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; reason: "cancellation"; idempotencyKey: string; ownerId: string; acquiredAt: string; requestedLeaseId: string; ttlMs: number; partitionKey: string; tenantId?: string | undefined; }>;

runLeaseReleaseRequestSchema

Runtime schema for Run Lease Release Request.

Declaration

text
export declare const runLeaseReleaseRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; leaseId: string; }, { fencingToken: number; ownerId: string; leaseId: string; }>; releasedAt: z.ZodString; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; releasedAt: string; }, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; releasedAt: string; }>;

runLeaseScopeJsonSchema

JSON Schema for Run Lease Scope.

Declaration

text
export declare const runLeaseScopeJsonSchema: JsonSchema;

runLeaseScopeSchema

Runtime schema for Run Lease Scope.

Declaration

text
export declare const runLeaseScopeSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>;

runtimeCoordinationContractDefinitions

Runtime Coordination Contract Definitions constant exported by the contracts/runtime-coordination-schemas module.

Declaration

text
export declare const runtimeCoordinationContractDefinitions: readonly [SpecSchemaDefinition<FencedRunLease>, SpecSchemaDefinition<StateExecutionClaim>, SpecSchemaDefinition<RuntimeResourceClaim>];

runtimeCoordinationContractJsonSchemas

Runtime Coordination Contract JSON Schemas constant exported by the contracts/runtime-coordination-schemas module.

Declaration

text
export declare const runtimeCoordinationContractJsonSchemas: Record<string, JsonSchema>;

runtimeResourceClaimDefinition

Runtime Resource Claim Definition constant exported by the contracts/runtime-coordination-schemas module.

Declaration

text
export declare const runtimeResourceClaimDefinition: SpecSchemaDefinition<RuntimeResourceClaim>;

runtimeResourceClaimExample

Valid example value for Runtime Resource Claim.

Declaration

text
export declare const runtimeResourceClaimExample: RuntimeResourceClaim;

runtimeResourceClaimJsonSchema

JSON Schema for Runtime Resource Claim.

Declaration

text
export declare const runtimeResourceClaimJsonSchema: JsonSchema;

runtimeResourceClaimModeSchema

Runtime schema for Runtime Resource Claim Mode.

Declaration

text
export declare const runtimeResourceClaimModeSchema: z.ZodEnum<["shared", "exclusive"]>;

runtimeResourceClaimSchema

Runtime schema for Runtime Resource Claim.

Declaration

text
export declare const runtimeResourceClaimSchema: z.ZodEffects<z.ZodObject<{ id: z.ZodString; tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; resourceType: z.ZodEnum<["workspace", "artifact", "tool_scope", "memory_scope", "external_account", "custom"]>; resourceKey: z.ZodString; mode: z.ZodEnum<["shared", "exclusive"]>; runId: z.ZodString; stateId: z.ZodOptional<z.ZodString>; ownerId: z.ZodString; fencingToken: z.ZodNumber; runFencingToken: z.ZodNumber; acquiredAt: z.ZodString; expiresAt: z.ZodString; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>>; }, "strict", z.ZodTypeAny, { id: string; userId: string; runId: string; expiresAt: string; fencingToken: number; ownerId: string; resourceType: "custom" | "workspace" | "artifact" | "tool_scope" | "memory_scope" | "external_account"; resourceKey: string; mode: "shared" | "exclusive"; acquiredAt: string; runFencingToken: number; tenantId?: string | undefined; metadata?: Record<string, JsonValue> | undefined; stateId?: string | undefined; }, { id: string; userId: string; runId: string; expiresAt: string; fencingToken: number; ownerId: string; resourceType: "custom" | "workspace" | "artifact" | "tool_scope" | "memory_scope" | "external_account"; resourceKey: string; mode: "shared" | "exclusive"; acquiredAt: string; runFencingToken: number; tenantId?: string | undefined; metadata?: Record<string, JsonValue> | undefined; stateId?: string | undefined; }>, { id: string; userId: string; runId: string; expiresAt: string; fencingToken: number; ownerId: string; resourceType: "custom" | "workspace" | "artifact" | "tool_scope" | "memory_scope" | "external_account"; resourceKey: string; mode: "shared" | "exclusive"; acquiredAt: string; runFencingToken: number; tenantId?: string | undefined; metadata?: Record<string, JsonValue> | undefined; stateId?: string | undefined; }, { id: string; userId: string; runId: string; expiresAt: string; fencingToken: number; ownerId: string; resourceType: "custom" | "workspace" | "artifact" | "tool_scope" | "memory_scope" | "external_account"; resourceKey: string; mode: "shared" | "exclusive"; acquiredAt: string; runFencingToken: number; tenantId?: string | undefined; metadata?: Record<string, JsonValue> | undefined; stateId?: string | undefined; }>;

runtimeResourceTypeSchema

Runtime schema for Runtime Resource Type.

Declaration

text
export declare const runtimeResourceTypeSchema: z.ZodEnum<["workspace", "artifact", "tool_scope", "memory_scope", "external_account", "custom"]>;

stateExecutionClaimAcquireRequestSchema

Runtime schema for State Execution Claim Acquire Request.

Declaration

text
export declare const stateExecutionClaimAcquireRequestSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; requestedClaimId: z.ZodString; processRevision: z.ZodString; expectedRunRevision: z.ZodNumber; runLease: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; leaseId: string; }, { fencingToken: number; ownerId: string; leaseId: string; }>; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }>; ttlMs: z.ZodNumber; acquiredAt: z.ZodString; idempotencyKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; idempotencyKey: string; stateAttempt: number; stateId: string; expectedRunRevision: number; requestedClaimId: string; acquiredAt: string; ttlMs: number; processRevision: string; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; tenantId?: string | undefined; }, { userId: string; runId: string; idempotencyKey: string; stateAttempt: number; stateId: string; expectedRunRevision: number; requestedClaimId: string; acquiredAt: string; ttlMs: number; processRevision: string; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; tenantId?: string | undefined; }>;

stateExecutionClaimAssertionRequestSchema

Runtime schema for State Execution Claim Assertion Request.

Declaration

text
export declare const stateExecutionClaimAssertionRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; }, "strict", z.ZodTypeAny, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ claimId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; claimId: string; }, { fencingToken: number; ownerId: string; claimId: string; }>; checkedAt: z.ZodString; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }; checkedAt: string; guard: { fencingToken: number; ownerId: string; claimId: string; }; }, { scope: { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }; checkedAt: string; guard: { fencingToken: number; ownerId: string; claimId: string; }; }>;

stateExecutionClaimCompleteRequestSchema

Runtime schema for State Execution Claim Complete Request.

Declaration

text
export declare const stateExecutionClaimCompleteRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; }, "strict", z.ZodTypeAny, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ claimId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; claimId: string; }, { fencingToken: number; ownerId: string; claimId: string; }>; runLease: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; leaseId: string; }, { fencingToken: number; ownerId: string; leaseId: string; }>; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }>; completedAt: z.ZodString; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; claimId: string; }; completedAt: string; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; }, { scope: { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; claimId: string; }; completedAt: string; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; }>;

stateExecutionClaimDefinition

State Execution Claim Definition constant exported by the contracts/runtime-coordination-schemas module.

Declaration

text
export declare const stateExecutionClaimDefinition: SpecSchemaDefinition<StateExecutionClaim>;

stateExecutionClaimExample

Valid example value for State Execution Claim.

Declaration

text
export declare const stateExecutionClaimExample: StateExecutionClaim;

stateExecutionClaimGuardSchema

Runtime schema for State Execution Claim Guard.

Declaration

text
export declare const stateExecutionClaimGuardSchema: z.ZodObject<{ claimId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; claimId: string; }, { fencingToken: number; ownerId: string; claimId: string; }>;

stateExecutionClaimJsonSchema

JSON Schema for State Execution Claim.

Declaration

text
export declare const stateExecutionClaimJsonSchema: JsonSchema;

stateExecutionClaimReleaseRequestSchema

Runtime schema for State Execution Claim Release Request.

Declaration

text
export declare const stateExecutionClaimReleaseRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; }, "strict", z.ZodTypeAny, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ claimId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; claimId: string; }, { fencingToken: number; ownerId: string; claimId: string; }>; runLease: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; leaseId: string; }, { fencingToken: number; ownerId: string; leaseId: string; }>; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }>; releasedAt: z.ZodString; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; claimId: string; }; releasedAt: string; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; }, { scope: { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; claimId: string; }; releasedAt: string; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; }>;

stateExecutionClaimRenewRequestSchema

Runtime schema for State Execution Claim Renew Request.

Declaration

text
export declare const stateExecutionClaimRenewRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; }, "strict", z.ZodTypeAny, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ claimId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; claimId: string; }, { fencingToken: number; ownerId: string; claimId: string; }>; runLease: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; partitionKey: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }, { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }>; guard: z.ZodObject<{ leaseId: z.ZodString; ownerId: z.ZodString; fencingToken: z.ZodNumber; }, "strict", z.ZodTypeAny, { fencingToken: number; ownerId: string; leaseId: string; }, { fencingToken: number; ownerId: string; leaseId: string; }>; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }, { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }>; ttlMs: z.ZodNumber; renewedAt: z.ZodString; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; claimId: string; }; ttlMs: number; renewedAt: string; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; }, { scope: { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; claimId: string; }; ttlMs: number; renewedAt: string; runLease: { scope: { userId: string; runId: string; partitionKey: string; tenantId?: string | undefined; }; guard: { fencingToken: number; ownerId: string; leaseId: string; }; }; }>;

stateExecutionClaimSchema

Runtime schema for State Execution Claim.

Declaration

text
export declare const stateExecutionClaimSchema: z.ZodEffects<z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; claimId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; processRevision: z.ZodString; expectedRunRevision: z.ZodNumber; fencingToken: z.ZodNumber; ownerId: z.ZodString; status: z.ZodEnum<["claimed", "completed", "released", "expired"]>; acquiredAt: z.ZodString; expiresAt: z.ZodString; completedAt: z.ZodOptional<z.ZodString>; releasedAt: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { userId: string; runId: string; status: "expired" | "completed" | "claimed" | "released"; expiresAt: string; stateAttempt: number; stateId: string; fencingToken: number; ownerId: string; expectedRunRevision: number; acquiredAt: string; claimId: string; processRevision: string; tenantId?: string | undefined; completedAt?: string | undefined; releasedAt?: string | undefined; }, { userId: string; runId: string; status: "expired" | "completed" | "claimed" | "released"; expiresAt: string; stateAttempt: number; stateId: string; fencingToken: number; ownerId: string; expectedRunRevision: number; acquiredAt: string; claimId: string; processRevision: string; tenantId?: string | undefined; completedAt?: string | undefined; releasedAt?: string | undefined; }>, { userId: string; runId: string; status: "expired" | "completed" | "claimed" | "released"; expiresAt: string; stateAttempt: number; stateId: string; fencingToken: number; ownerId: string; expectedRunRevision: number; acquiredAt: string; claimId: string; processRevision: string; tenantId?: string | undefined; completedAt?: string | undefined; releasedAt?: string | undefined; }, { userId: string; runId: string; status: "expired" | "completed" | "claimed" | "released"; expiresAt: string; stateAttempt: number; stateId: string; fencingToken: number; ownerId: string; expectedRunRevision: number; acquiredAt: string; claimId: string; processRevision: string; tenantId?: string | undefined; completedAt?: string | undefined; releasedAt?: string | undefined; }>;

stateExecutionClaimScopeSchema

Runtime schema for State Execution Claim Scope.

Declaration

text
export declare const stateExecutionClaimScopeSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; }, "strict", z.ZodTypeAny, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { userId: string; runId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }>;

validateFencedRunLease

Validate Fenced Run Lease function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateFencedRunLease(input: unknown): FencedRunLease;

Call signature

text
validateFencedRunLease(input: unknown): FencedRunLease

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: FencedRunLease
  • Description: The return contract is defined by the type shown above.

validateResourceAcquireRequest

Validate Resource Acquire Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateResourceAcquireRequest(input: unknown): ResourceAcquireRequest;

Call signature

text
validateResourceAcquireRequest(input: unknown): ResourceAcquireRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: ResourceAcquireRequest
  • Description: The return contract is defined by the type shown above.

validateResourceClaimAssertionRequest

Validate Resource Claim Assertion Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateResourceClaimAssertionRequest(input: unknown): ResourceClaimAssertionRequest;

Call signature

text
validateResourceClaimAssertionRequest(input: unknown): ResourceClaimAssertionRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: ResourceClaimAssertionRequest
  • Description: The return contract is defined by the type shown above.

validateResourceListRequest

Validate Resource List Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateResourceListRequest(input: unknown): ResourceListRequest;

Call signature

text
validateResourceListRequest(input: unknown): ResourceListRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: ResourceListRequest
  • Description: The return contract is defined by the type shown above.

validateResourceReleaseRequest

Validate Resource Release Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateResourceReleaseRequest(input: unknown): ResourceReleaseRequest;

Call signature

text
validateResourceReleaseRequest(input: unknown): ResourceReleaseRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: ResourceReleaseRequest
  • Description: The return contract is defined by the type shown above.

validateResourceRenewRequest

Validate Resource Renew Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateResourceRenewRequest(input: unknown): ResourceRenewRequest;

Call signature

text
validateResourceRenewRequest(input: unknown): ResourceRenewRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: ResourceRenewRequest
  • Description: The return contract is defined by the type shown above.

validateRunLeaseAcquireRequest

Validate Run Lease Acquire Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateRunLeaseAcquireRequest(input: unknown): RunLeaseAcquireRequest;

Call signature

text
validateRunLeaseAcquireRequest(input: unknown): RunLeaseAcquireRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RunLeaseAcquireRequest
  • Description: The return contract is defined by the type shown above.

validateRunLeaseAssertionRequest

Validate Run Lease Assertion Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateRunLeaseAssertionRequest(input: unknown): RunLeaseAssertionRequest;

Call signature

text
validateRunLeaseAssertionRequest(input: unknown): RunLeaseAssertionRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RunLeaseAssertionRequest
  • Description: The return contract is defined by the type shown above.

validateRunLeaseHeartbeatRequest

Validate Run Lease Heartbeat Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateRunLeaseHeartbeatRequest(input: unknown): RunLeaseHeartbeatRequest;

Call signature

text
validateRunLeaseHeartbeatRequest(input: unknown): RunLeaseHeartbeatRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RunLeaseHeartbeatRequest
  • Description: The return contract is defined by the type shown above.

validateRunLeasePreemptRequest

Validate Run Lease Preempt Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateRunLeasePreemptRequest(input: unknown): RunLeasePreemptRequest;

Call signature

text
validateRunLeasePreemptRequest(input: unknown): RunLeasePreemptRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RunLeasePreemptRequest
  • Description: The return contract is defined by the type shown above.

validateRunLeaseReleaseRequest

Validate Run Lease Release Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateRunLeaseReleaseRequest(input: unknown): RunLeaseReleaseRequest;

Call signature

text
validateRunLeaseReleaseRequest(input: unknown): RunLeaseReleaseRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RunLeaseReleaseRequest
  • Description: The return contract is defined by the type shown above.

validateRuntimeResourceClaim

Validate Runtime Resource Claim function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateRuntimeResourceClaim(input: unknown): RuntimeResourceClaim;

Call signature

text
validateRuntimeResourceClaim(input: unknown): RuntimeResourceClaim

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RuntimeResourceClaim
  • Description: The return contract is defined by the type shown above.

validateStateExecutionClaim

Validate State Execution Claim function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateStateExecutionClaim(input: unknown): StateExecutionClaim;

Call signature

text
validateStateExecutionClaim(input: unknown): StateExecutionClaim

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: StateExecutionClaim
  • Description: The return contract is defined by the type shown above.

validateStateExecutionClaimAcquireRequest

Validate State Execution Claim Acquire Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateStateExecutionClaimAcquireRequest(input: unknown): StateExecutionClaimAcquireRequest;

Call signature

text
validateStateExecutionClaimAcquireRequest(input: unknown): StateExecutionClaimAcquireRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: StateExecutionClaimAcquireRequest
  • Description: The return contract is defined by the type shown above.

validateStateExecutionClaimAssertionRequest

Validate State Execution Claim Assertion Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateStateExecutionClaimAssertionRequest(input: unknown): StateExecutionClaimAssertionRequest;

Call signature

text
validateStateExecutionClaimAssertionRequest(input: unknown): StateExecutionClaimAssertionRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: StateExecutionClaimAssertionRequest
  • Description: The return contract is defined by the type shown above.

validateStateExecutionClaimCompleteRequest

Validate State Execution Claim Complete Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateStateExecutionClaimCompleteRequest(input: unknown): StateExecutionClaimCompleteRequest;

Call signature

text
validateStateExecutionClaimCompleteRequest(input: unknown): StateExecutionClaimCompleteRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: StateExecutionClaimCompleteRequest
  • Description: The return contract is defined by the type shown above.

validateStateExecutionClaimReleaseRequest

Validate State Execution Claim Release Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateStateExecutionClaimReleaseRequest(input: unknown): StateExecutionClaimReleaseRequest;

Call signature

text
validateStateExecutionClaimReleaseRequest(input: unknown): StateExecutionClaimReleaseRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: StateExecutionClaimReleaseRequest
  • Description: The return contract is defined by the type shown above.

validateStateExecutionClaimRenewRequest

Validate State Execution Claim Renew Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateStateExecutionClaimRenewRequest(input: unknown): StateExecutionClaimRenewRequest;

Call signature

text
validateStateExecutionClaimRenewRequest(input: unknown): StateExecutionClaimRenewRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: StateExecutionClaimRenewRequest
  • Description: The return contract is defined by the type shown above.