Skip to content

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

模块用法

用于声明并运行时校验契约。Runtime coordination schemas 模块公开 38 常量、18 函数。

从包入口导入

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

// 完整导出列表见下方。

使用要点

  • 18 个函数是该模块的直接操作入口;每个 overload 的必需/可选参数与返回类型均在下方列出。
  • 38 个常量/枚举提供稳定值、Schema、Definition 或默认配置;应复用这些导出,避免在应用中复制内部值。

运行时校验示例

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

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

配置、网络请求或持久化数据等不可信输入应先通过 Runtime Schema,再传给只接受已校验契约的函数或类。

公共导出

Symbol种类签名说明
fencedRunLeaseDefinition常量const fencedRunLeaseDefinition: SpecSchemaDefinition<FencedRunLease>contracts/runtime-coordination-schemas 模块导出的 Fenced Run Lease Definition 常量。
fencedRunLeaseExample常量const fencedRunLeaseExample: FencedRunLeaseFenced Run Lease 的有效示例值。
fencedRunLeaseJsonSchema常量const fencedRunLeaseJsonSchema: JsonSchemaFenced Run Lease 的 JSON Schema。
fencedRunLeaseSchema常量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; ex...Fenced Run Lease 的运行时 Schema。
resourceAcquireRequestSchema常量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.Z...Resource Acquire Request 的运行时 Schema。
resourceClaimAssertionRequestSchema常量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: stri...Resource Claim Assertion Request 的运行时 Schema。
resourceListRequestSchema常量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: strin...Resource List Request 的运行时 Schema。
resourceReleaseRequestSchema常量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.Z...Resource Release Request 的运行时 Schema。
resourceRenewRequestSchema常量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.Zod...Resource Renew Request 的运行时 Schema。
runLeaseAcquireRequestSchema常量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; requestedLeas...Run Lease Acquire Request 的运行时 Schema。
runLeaseAssertionRequestSchema常量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....Run Lease Assertion Request 的运行时 Schema。
runLeaseAuthorizationSchema常量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.Zod...Run Lease Authorization 的运行时 Schema。
runLeaseGuardJsonSchema常量const runLeaseGuardJsonSchema: JsonSchemaRun Lease Guard 的 JSON Schema。
runLeaseGuardSchema常量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; }>Run Lease Guard 的运行时 Schema。
runLeaseHeartbeatRequestSchema常量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....Run Lease Heartbeat Request 的运行时 Schema。
runLeasePreemptRequestSchema常量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"; idempo...Run Lease Preempt Request 的运行时 Schema。
runLeaseReleaseRequestSchema常量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.Zo...Run Lease Release Request 的运行时 Schema。
runLeaseScopeJsonSchema常量const runLeaseScopeJsonSchema: JsonSchemaRun Lease Scope 的 JSON Schema。
runLeaseScopeSchema常量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; }>Run Lease Scope 的运行时 Schema。
runtimeCoordinationContractDefinitions常量const runtimeCoordinationContractDefinitions: readonly [SpecSchemaDefinition<FencedRunLease>, SpecSchemaDefinition<StateExecutionClaim>, SpecSchemaDefinition<RuntimeResourceClaim>]contracts/runtime-coordination-schemas 模块导出的 Runtime Coordination Contract Definitions 常量。
runtimeCoordinationContractJsonSchemas常量const runtimeCoordinationContractJsonSchemas: Record<string, JsonSchema>contracts/runtime-coordination-schemas 模块导出的 Runtime Coordination Contract JSON Schemas 常量。
runtimeResourceClaimDefinition常量const runtimeResourceClaimDefinition: SpecSchemaDefinition<RuntimeResourceClaim>contracts/runtime-coordination-schemas 模块导出的 Runtime Resource Claim Definition 常量。
runtimeResourceClaimExample常量const runtimeResourceClaimExample: RuntimeResourceClaimRuntime Resource Claim 的有效示例值。
runtimeResourceClaimJsonSchema常量const runtimeResourceClaimJsonSchema: JsonSchemaRuntime Resource Claim 的 JSON Schema。
runtimeResourceClaimModeSchema常量const runtimeResourceClaimModeSchema: z.ZodEnum<["shared", "exclusive"]>Runtime Resource Claim Mode 的运行时 Schema。
runtimeResourceClaimSchema常量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.ZodNu...Runtime Resource Claim 的运行时 Schema。
runtimeResourceTypeSchema常量const runtimeResourceTypeSchema: z.ZodEnum<["workspace", "artifact", "tool_scope", "memory_scope", "external_account", "custom"]>Runtime Resource Type 的运行时 Schema。
stateExecutionClaimAcquireRequestSchema常量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; partition...State Execution Claim Acquire Request 的运行时 Schema。
stateExecutionClaimAssertionRequestSchema常量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; ...State Execution Claim Assertion Request 的运行时 Schema。
stateExecutionClaimCompleteRequestSchema常量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; t...State Execution Claim Complete Request 的运行时 Schema。
stateExecutionClaimDefinition常量const stateExecutionClaimDefinition: SpecSchemaDefinition<StateExecutionClaim>contracts/runtime-coordination-schemas 模块导出的 State Execution Claim Definition 常量。
stateExecutionClaimExample常量const stateExecutionClaimExample: StateExecutionClaimState Execution Claim 的有效示例值。
stateExecutionClaimGuardSchema常量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; }>State Execution Claim Guard 的运行时 Schema。
stateExecutionClaimJsonSchema常量const stateExecutionClaimJsonSchema: JsonSchemaState Execution Claim 的 JSON Schema。
stateExecutionClaimReleaseRequestSchema常量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; te...State Execution Claim Release Request 的运行时 Schema。
stateExecutionClaimRenewRequestSchema常量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; tena...State Execution Claim Renew Request 的运行时 Schema。
stateExecutionClaimSchema常量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; e...State Execution Claim 的运行时 Schema。
stateExecutionClaimScopeSchema常量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; }>State Execution Claim Scope 的运行时 Schema。
validateFencedRunLease函数validateFencedRunLease(input: unknown): FencedRunLeaseValidate Fenced Run Lease 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateResourceAcquireRequest函数validateResourceAcquireRequest(input: unknown): ResourceAcquireRequestValidate Resource Acquire Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateResourceClaimAssertionRequest函数validateResourceClaimAssertionRequest(input: unknown): ResourceClaimAssertionRequestValidate Resource Claim Assertion Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateResourceListRequest函数validateResourceListRequest(input: unknown): ResourceListRequestValidate Resource List Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateResourceReleaseRequest函数validateResourceReleaseRequest(input: unknown): ResourceReleaseRequestValidate Resource Release Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateResourceRenewRequest函数validateResourceRenewRequest(input: unknown): ResourceRenewRequestValidate Resource Renew Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateRunLeaseAcquireRequest函数validateRunLeaseAcquireRequest(input: unknown): RunLeaseAcquireRequestValidate Run Lease Acquire Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateRunLeaseAssertionRequest函数validateRunLeaseAssertionRequest(input: unknown): RunLeaseAssertionRequestValidate Run Lease Assertion Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateRunLeaseHeartbeatRequest函数validateRunLeaseHeartbeatRequest(input: unknown): RunLeaseHeartbeatRequestValidate Run Lease Heartbeat Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateRunLeasePreemptRequest函数validateRunLeasePreemptRequest(input: unknown): RunLeasePreemptRequestValidate Run Lease Preempt Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateRunLeaseReleaseRequest函数validateRunLeaseReleaseRequest(input: unknown): RunLeaseReleaseRequestValidate Run Lease Release Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateRuntimeResourceClaim函数validateRuntimeResourceClaim(input: unknown): RuntimeResourceClaimValidate Runtime Resource Claim 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateStateExecutionClaim函数validateStateExecutionClaim(input: unknown): StateExecutionClaimValidate State Execution Claim 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateStateExecutionClaimAcquireRequest函数validateStateExecutionClaimAcquireRequest(input: unknown): StateExecutionClaimAcquireRequestValidate State Execution Claim Acquire Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateStateExecutionClaimAssertionRequest函数validateStateExecutionClaimAssertionRequest(input: unknown): StateExecutionClaimAssertionRequestValidate State Execution Claim Assertion Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateStateExecutionClaimCompleteRequest函数validateStateExecutionClaimCompleteRequest(input: unknown): StateExecutionClaimCompleteRequestValidate State Execution Claim Complete Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateStateExecutionClaimReleaseRequest函数validateStateExecutionClaimReleaseRequest(input: unknown): StateExecutionClaimReleaseRequestValidate State Execution Claim Release Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateStateExecutionClaimRenewRequest函数validateStateExecutionClaimRenewRequest(input: unknown): StateExecutionClaimRenewRequestValidate State Execution Claim Renew Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

fencedRunLeaseDefinition

contracts/runtime-coordination-schemas 模块导出的 Fenced Run Lease Definition 常量。

声明

text
export declare const fencedRunLeaseDefinition: SpecSchemaDefinition<FencedRunLease>;

fencedRunLeaseExample

Fenced Run Lease 的有效示例值。

声明

text
export declare const fencedRunLeaseExample: FencedRunLease;

fencedRunLeaseJsonSchema

Fenced Run Lease 的 JSON Schema。

声明

text
export declare const fencedRunLeaseJsonSchema: JsonSchema;

fencedRunLeaseSchema

Fenced Run Lease 的运行时 Schema。

声明

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

Resource Acquire Request 的运行时 Schema。

声明

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

Resource Claim Assertion Request 的运行时 Schema。

声明

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

Resource List Request 的运行时 Schema。

声明

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

Resource Release Request 的运行时 Schema。

声明

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

Resource Renew Request 的运行时 Schema。

声明

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

Run Lease Acquire Request 的运行时 Schema。

声明

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

Run Lease Assertion Request 的运行时 Schema。

声明

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

Run Lease Authorization 的运行时 Schema。

声明

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

Run Lease Guard 的 JSON Schema。

声明

text
export declare const runLeaseGuardJsonSchema: JsonSchema;

runLeaseGuardSchema

Run Lease Guard 的运行时 Schema。

声明

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

Run Lease Heartbeat Request 的运行时 Schema。

声明

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

Run Lease Preempt Request 的运行时 Schema。

声明

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

Run Lease Release Request 的运行时 Schema。

声明

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

Run Lease Scope 的 JSON Schema。

声明

text
export declare const runLeaseScopeJsonSchema: JsonSchema;

runLeaseScopeSchema

Run Lease Scope 的运行时 Schema。

声明

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

contracts/runtime-coordination-schemas 模块导出的 Runtime Coordination Contract Definitions 常量。

声明

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

runtimeCoordinationContractJsonSchemas

contracts/runtime-coordination-schemas 模块导出的 Runtime Coordination Contract JSON Schemas 常量。

声明

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

runtimeResourceClaimDefinition

contracts/runtime-coordination-schemas 模块导出的 Runtime Resource Claim Definition 常量。

声明

text
export declare const runtimeResourceClaimDefinition: SpecSchemaDefinition<RuntimeResourceClaim>;

runtimeResourceClaimExample

Runtime Resource Claim 的有效示例值。

声明

text
export declare const runtimeResourceClaimExample: RuntimeResourceClaim;

runtimeResourceClaimJsonSchema

Runtime Resource Claim 的 JSON Schema。

声明

text
export declare const runtimeResourceClaimJsonSchema: JsonSchema;

runtimeResourceClaimModeSchema

Runtime Resource Claim Mode 的运行时 Schema。

声明

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

runtimeResourceClaimSchema

Runtime Resource Claim 的运行时 Schema。

声明

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 Resource Type 的运行时 Schema。

声明

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

stateExecutionClaimAcquireRequestSchema

State Execution Claim Acquire Request 的运行时 Schema。

声明

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

State Execution Claim Assertion Request 的运行时 Schema。

声明

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

State Execution Claim Complete Request 的运行时 Schema。

声明

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

contracts/runtime-coordination-schemas 模块导出的 State Execution Claim Definition 常量。

声明

text
export declare const stateExecutionClaimDefinition: SpecSchemaDefinition<StateExecutionClaim>;

stateExecutionClaimExample

State Execution Claim 的有效示例值。

声明

text
export declare const stateExecutionClaimExample: StateExecutionClaim;

stateExecutionClaimGuardSchema

State Execution Claim Guard 的运行时 Schema。

声明

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

State Execution Claim 的 JSON Schema。

声明

text
export declare const stateExecutionClaimJsonSchema: JsonSchema;

stateExecutionClaimReleaseRequestSchema

State Execution Claim Release Request 的运行时 Schema。

声明

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

State Execution Claim Renew Request 的运行时 Schema。

声明

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

State Execution Claim 的运行时 Schema。

声明

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

State Execution Claim Scope 的运行时 Schema。

声明

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 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateFencedRunLease(input: unknown): FencedRunLease

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: FencedRunLease
  • 说明: 返回值契约由上述类型定义。

validateResourceAcquireRequest

Validate Resource Acquire Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateResourceAcquireRequest(input: unknown): ResourceAcquireRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: ResourceAcquireRequest
  • 说明: 返回值契约由上述类型定义。

validateResourceClaimAssertionRequest

Validate Resource Claim Assertion Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateResourceClaimAssertionRequest(input: unknown): ResourceClaimAssertionRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: ResourceClaimAssertionRequest
  • 说明: 返回值契约由上述类型定义。

validateResourceListRequest

Validate Resource List Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateResourceListRequest(input: unknown): ResourceListRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: ResourceListRequest
  • 说明: 返回值契约由上述类型定义。

validateResourceReleaseRequest

Validate Resource Release Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateResourceReleaseRequest(input: unknown): ResourceReleaseRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: ResourceReleaseRequest
  • 说明: 返回值契约由上述类型定义。

validateResourceRenewRequest

Validate Resource Renew Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateResourceRenewRequest(input: unknown): ResourceRenewRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: ResourceRenewRequest
  • 说明: 返回值契约由上述类型定义。

validateRunLeaseAcquireRequest

Validate Run Lease Acquire Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateRunLeaseAcquireRequest(input: unknown): RunLeaseAcquireRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: RunLeaseAcquireRequest
  • 说明: 返回值契约由上述类型定义。

validateRunLeaseAssertionRequest

Validate Run Lease Assertion Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateRunLeaseAssertionRequest(input: unknown): RunLeaseAssertionRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: RunLeaseAssertionRequest
  • 说明: 返回值契约由上述类型定义。

validateRunLeaseHeartbeatRequest

Validate Run Lease Heartbeat Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateRunLeaseHeartbeatRequest(input: unknown): RunLeaseHeartbeatRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: RunLeaseHeartbeatRequest
  • 说明: 返回值契约由上述类型定义。

validateRunLeasePreemptRequest

Validate Run Lease Preempt Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateRunLeasePreemptRequest(input: unknown): RunLeasePreemptRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: RunLeasePreemptRequest
  • 说明: 返回值契约由上述类型定义。

validateRunLeaseReleaseRequest

Validate Run Lease Release Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateRunLeaseReleaseRequest(input: unknown): RunLeaseReleaseRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: RunLeaseReleaseRequest
  • 说明: 返回值契约由上述类型定义。

validateRuntimeResourceClaim

Validate Runtime Resource Claim 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateRuntimeResourceClaim(input: unknown): RuntimeResourceClaim

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: RuntimeResourceClaim
  • 说明: 返回值契约由上述类型定义。

validateStateExecutionClaim

Validate State Execution Claim 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateStateExecutionClaim(input: unknown): StateExecutionClaim

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: StateExecutionClaim
  • 说明: 返回值契约由上述类型定义。

validateStateExecutionClaimAcquireRequest

Validate State Execution Claim Acquire Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateStateExecutionClaimAcquireRequest(input: unknown): StateExecutionClaimAcquireRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: StateExecutionClaimAcquireRequest
  • 说明: 返回值契约由上述类型定义。

validateStateExecutionClaimAssertionRequest

Validate State Execution Claim Assertion Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateStateExecutionClaimAssertionRequest(input: unknown): StateExecutionClaimAssertionRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: StateExecutionClaimAssertionRequest
  • 说明: 返回值契约由上述类型定义。

validateStateExecutionClaimCompleteRequest

Validate State Execution Claim Complete Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateStateExecutionClaimCompleteRequest(input: unknown): StateExecutionClaimCompleteRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: StateExecutionClaimCompleteRequest
  • 说明: 返回值契约由上述类型定义。

validateStateExecutionClaimReleaseRequest

Validate State Execution Claim Release Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateStateExecutionClaimReleaseRequest(input: unknown): StateExecutionClaimReleaseRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: StateExecutionClaimReleaseRequest
  • 说明: 返回值契约由上述类型定义。

validateStateExecutionClaimRenewRequest

Validate State Execution Claim Renew Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

声明

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

调用签名

text
validateStateExecutionClaimRenewRequest(input: unknown): StateExecutionClaimRenewRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: StateExecutionClaimRenewRequest
  • 说明: 返回值契约由上述类型定义。