Skip to content

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

模块用法

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

从包入口导入

ts
import {
  runtimeCancelCommandDefinition,
  runtimeCancelCommandExample,
  runtimeCancelCommandJsonSchema,
  runtimeCancelCommandSchema,
  runtimeCancellationContractDefinitions,
  runtimeCancellationContractJsonSchemas,
  runtimeCancellationPolicySchema,
  runtimeCancellationTargetResultSchema,
} from '@codesoul-co/hypha-core';

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

使用要点

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

运行时校验示例

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

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

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

公共导出

Symbol种类签名说明
runtimeCancelCommandDefinition常量const runtimeCancelCommandDefinition: SpecSchemaDefinition<RuntimeCancelCommand>contracts/runtime-cancellation-schemas 模块导出的 Runtime Cancel Command Definition 常量。
runtimeCancelCommandExample常量const runtimeCancelCommandExample: RuntimeCancelCommandRuntime Cancel Command 的有效示例值。
runtimeCancelCommandJsonSchema常量const runtimeCancelCommandJsonSchema: JsonSchemaRuntime Cancel Command 的 JSON Schema。
runtimeCancelCommandSchema常量const runtimeCancelCommandSchema: z.ZodObject<{ commandId: z.ZodString; scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; workspaceId: z.ZodOptional<z.ZodString>; sessionId: z.ZodString; runId: z.ZodString; agentId: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; ...Runtime Cancel Command 的运行时 Schema。
runtimeCancellationContractDefinitions常量const runtimeCancellationContractDefinitions: readonly [SpecSchemaDefinition<RuntimeCancelCommand>, SpecSchemaDefinition<RuntimeCancelResult>]contracts/runtime-cancellation-schemas 模块导出的 Runtime Cancellation Contract Definitions 常量。
runtimeCancellationContractJsonSchemas常量const runtimeCancellationContractJsonSchemas: Record<string, JsonSchema>contracts/runtime-cancellation-schemas 模块导出的 Runtime Cancellation Contract JSON Schemas 常量。
runtimeCancellationPolicySchema常量const runtimeCancellationPolicySchema: z.ZodObject<{ propagation: z.ZodEnum<["none", "children", "all_descendants"]>; cancelRunningActivities: z.ZodBoolean; waitGraceMs: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { propagation: "none" | "children" | "all_descendants"; cancelRunningActivities: boolean; waitGraceMs?: number | undefined; }, { propagation: "none" | "children" | "all_descendants"; cancelRun...Runtime Cancellation Policy 的运行时 Schema。
runtimeCancellationTargetResultSchema常量const runtimeCancellationTargetResultSchema: z.ZodObject<{ targetType: z.ZodEnum<["activity", "child_run", "session_command"]>; targetId: z.ZodString; status: z.ZodEnum<["cancelled", "already_terminal", "not_found", "failed"]>; error: z.ZodOptional<z.ZodObject<{ code: z.ZodEnum<["RUNTIME_INVALID_INPUT", "RUNTIME_MESSAGE_BUS_UNAVAILABLE", "RUNTIME_MESSAGE_SCHEMA_INVALID", "RUNTIME_MESSAGE_DEAD_LETTERED", "RUNTIME_S...Runtime Cancellation Target Result 的运行时 Schema。
runtimeCancelResultDefinition常量const runtimeCancelResultDefinition: SpecSchemaDefinition<RuntimeCancelResult>contracts/runtime-cancellation-schemas 模块导出的 Runtime Cancel Result Definition 常量。
runtimeCancelResultExample常量const runtimeCancelResultExample: RuntimeCancelResultRuntime Cancel Result 的有效示例值。
runtimeCancelResultJsonSchema常量const runtimeCancelResultJsonSchema: JsonSchemaRuntime Cancel Result 的 JSON Schema。
runtimeCancelResultSchema常量const runtimeCancelResultSchema: z.ZodObject<{ commandId: z.ZodString; disposition: z.ZodEnum<["applied", "reused"]>; eventIds: z.ZodArray<z.ZodString, "many">; targetResults: z.ZodArray<z.ZodObject<{ targetType: z.ZodEnum<["activity", "child_run", "session_command"]>; targetId: z.ZodString; status: z.ZodEnum<["cancelled", "already_terminal", "not_found", "failed"]>; error: z.ZodOptional<z.ZodObject<{ code: z.ZodE...Runtime Cancel Result 的运行时 Schema。
validateRuntimeCancelCommand函数validateRuntimeCancelCommand(input: unknown): RuntimeCancelCommandValidate Runtime Cancel Command 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateRuntimeCancellationTargetResult函数validateRuntimeCancellationTargetResult(input: unknown): { status: "failed" | "cancelled" | "already_terminal" | "not_found"; targetType: "session_command" | "activity" | "child_run"; targetId: string; error?: { code: "RUNTIME_INVALID_INPUT" | "RUNTIME_MESSAGE_BUS_UNAVAILABLE" | "RUNTIME_MESSAGE_SCHEMA_INVALID" | "RUNTIME_MESSAGE_DEAD_LETTERED" | "RUNTIME_SESSION_QUEUE_CONFLICT" | "RUNTIME_SESSION_QUEUE_OVERFLOW" ...Validate Runtime Cancellation Target Result 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateRuntimeCancelResult函数validateRuntimeCancelResult(input: unknown): RuntimeCancelResultValidate Runtime Cancel Result 函数,提供 1 个公开调用签名;参数与返回类型见下表。

runtimeCancelCommandDefinition

contracts/runtime-cancellation-schemas 模块导出的 Runtime Cancel Command Definition 常量。

声明

text
export declare const runtimeCancelCommandDefinition: SpecSchemaDefinition<RuntimeCancelCommand>;

runtimeCancelCommandExample

Runtime Cancel Command 的有效示例值。

声明

text
export declare const runtimeCancelCommandExample: RuntimeCancelCommand;

runtimeCancelCommandJsonSchema

Runtime Cancel Command 的 JSON Schema。

声明

text
export declare const runtimeCancelCommandJsonSchema: JsonSchema;

runtimeCancelCommandSchema

Runtime Cancel Command 的运行时 Schema。

声明

text
// 精确类型由包入口解析;完整编译器展开定义见源码链接。
export declare const runtimeCancelCommandSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeCancelCommandSchema'];

该常量的编译器展开类型已压缩;它的公共名称、顶层类型与源码位置仍保留在本条目中。相关输入/输出字段请使用同模块导出的接口、类型或 Runtime Schema。

runtimeCancellationContractDefinitions

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

声明

text
export declare const runtimeCancellationContractDefinitions: readonly [SpecSchemaDefinition<RuntimeCancelCommand>, SpecSchemaDefinition<RuntimeCancelResult>];

runtimeCancellationContractJsonSchemas

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

声明

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

runtimeCancellationPolicySchema

Runtime Cancellation Policy 的运行时 Schema。

声明

text
export declare const runtimeCancellationPolicySchema: z.ZodObject<{ propagation: z.ZodEnum<["none", "children", "all_descendants"]>; cancelRunningActivities: z.ZodBoolean; waitGraceMs: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { propagation: "none" | "children" | "all_descendants"; cancelRunningActivities: boolean; waitGraceMs?: number | undefined; }, { propagation: "none" | "children" | "all_descendants"; cancelRunningActivities: boolean; waitGraceMs?: number | undefined; }>;

runtimeCancellationTargetResultSchema

Runtime Cancellation Target Result 的运行时 Schema。

声明

text
// 精确类型由包入口解析;完整编译器展开定义见源码链接。
export declare const runtimeCancellationTargetResultSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeCancellationTargetResultSchema'];

该常量的编译器展开类型已压缩;它的公共名称、顶层类型与源码位置仍保留在本条目中。相关输入/输出字段请使用同模块导出的接口、类型或 Runtime Schema。

runtimeCancelResultDefinition

contracts/runtime-cancellation-schemas 模块导出的 Runtime Cancel Result Definition 常量。

声明

text
export declare const runtimeCancelResultDefinition: SpecSchemaDefinition<RuntimeCancelResult>;

runtimeCancelResultExample

Runtime Cancel Result 的有效示例值。

声明

text
export declare const runtimeCancelResultExample: RuntimeCancelResult;

runtimeCancelResultJsonSchema

Runtime Cancel Result 的 JSON Schema。

声明

text
export declare const runtimeCancelResultJsonSchema: JsonSchema;

runtimeCancelResultSchema

Runtime Cancel Result 的运行时 Schema。

声明

text
// 精确类型由包入口解析;完整编译器展开定义见源码链接。
export declare const runtimeCancelResultSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeCancelResultSchema'];

该常量的编译器展开类型已压缩;它的公共名称、顶层类型与源码位置仍保留在本条目中。相关输入/输出字段请使用同模块导出的接口、类型或 Runtime Schema。

validateRuntimeCancelCommand

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

声明

text
export declare function validateRuntimeCancelCommand(input: unknown): RuntimeCancelCommand;

调用签名

text
validateRuntimeCancelCommand(input: unknown): RuntimeCancelCommand

参数

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

返回值

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

validateRuntimeCancellationTargetResult

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

声明

text
export declare function validateRuntimeCancellationTargetResult(input: unknown): {
    status: "failed" | "cancelled" | "already_terminal" | "not_found";
    targetType: "session_command" | "activity" | "child_run";
    targetId: string;
    error?: {
        code: "RUNTIME_INVALID_INPUT" | "RUNTIME_MESSAGE_BUS_UNAVAILABLE" | "RUNTIME_MESSAGE_SCHEMA_INVALID" | "RUNTIME_MESSAGE_DEAD_LETTERED" | "RUNTIME_SESSION_QUEUE_CONFLICT" | "RUNTIME_SESSION_QUEUE_OVERFLOW" | "RUNTIME_FENCING_REJECTED" | "RUNTIME_RESOURCE_CONFLICT" | "RUNTIME_IDEMPOTENCY_CONFLICT" | "RUNTIME_EVENT_STREAM_CORRUPT" | "RUNTIME_RECOVERY_REQUIRES_REVIEW" | "RUNTIME_RUN_NOT_FOUND" | "RUNTIME_RUN_CONFLICT" | "RUNTIME_LEASE_CONFLICT" | "RUNTIME_WORKFLOW_INVALID" | "RUNTIME_PROCESS_MISMATCH" | "RUNTIME_STATE_NOT_FOUND" | "RUNTIME_TRANSITION_REJECTED" | "RUNTIME_GUARD_FAILED" | "RUNTIME_INVARIANT_FAILED" | "RUNTIME_STATE_TIMEOUT" | "RUNTIME_RUN_TIMEOUT" | "RUNTIME_CANCELLED" | "RUNTIME_SIGNAL_INVALID" | "RUNTIME_SIGNAL_EXPIRED" | "RUNTIME_RETRY_EXHAUSTED" | "RUNTIME_CHECKPOINT_FAILED" | "RUNTIME_EVENT_APPEND_FAILED" | "RUNTIME_PROJECTION_FAILED" | "RUNTIME_REPLAY_DIVERGENCE" | "RUNTIME_INTERNAL_ERROR";
        message: string;
        retryable: boolean;
        details?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
            [key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
        } | null)[] | {
            [key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
        } | null)[] | {
            [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
        } | null)[] | {
            [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
        } | null)[] | {
            [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
        } | null)[] | {
            [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
        } | null)[] | {
            [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
        } | null)[] | {
            [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
        } | null)[] | {
            [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
        } | null)[] | {
            [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
        } | null)[] | {
            [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
        } | null)[] | {
            [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
        } | null> | undefined;
        causeRef?: string | undefined;
        stateId?: string | undefined;
        transitionId?: string | undefined;
    } | undefined;
};

调用签名

text
validateRuntimeCancellationTargetResult(input: unknown): { status: "failed" | "cancelled" | "already_terminal" | "not_found"; targetType: "session_command" | "activity" | "child_run"; targetId: string; error?: { code: "RUNTIME_INVALID_INPUT" | "RUNTIME_MESSAGE_BUS_UNAVAILABLE" | "RUNTIME_MESSAGE_SCHEMA_INVALID" | "RUNTIME_MESSAGE_DEAD_LETTERED" | "RUNTIME_SESSION_QUEUE_CONFLICT" | "RUNTIME_SESSION_QUEUE_OVERFLOW" | "RUNTIME_FENCING_REJECTED" | "RUNTIME_RESOURCE_CONFLICT" | "RUNTIME_IDEMPOTENCY_CONFLICT" | "RUNTIME_EVENT_STREAM_CORRUPT" | "RUNTIME_RECOVERY_REQUIRES_REVIEW" | "RUNTIME_RUN_NOT_FOUND" | "RUNTIME_RUN_CONFLICT" | "RUNTIME_LEASE_CONFLICT" | "RUNTIME_WORKFLOW_INVALID" | "RUNTIME_PROCESS_MISMATCH" | "RUNTIME_STATE_NOT_FOUND" | "RUNTIME_TRANSITION_REJECTED" | "RUNTIME_GUARD_FAILED" | "RUNTIME_INVARIANT_FAILED" | "RUNTIME_STATE_TIMEOUT" | "RUNTIME_RUN_TIMEOUT" | "RUNTIME_CANCELLED" | "RUNTIME_SIGNAL_INVALID" | "RUNTIME_SIGNAL_EXPIRED" | "RUNTIME_RETRY_EXHAUSTED" | "RUNTIME_CHECKPOINT_FAILED" | "RUNTIME_EVENT_APPEND_FAILED" | "RUNTIME_PROJECTION_FAILED" | "RUNTIME_REPLAY_DIVERGENCE" | "RUNTIME_INTERNAL_ERROR"; message: string; retryable: boolean; details?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | { [key: string]: string | number | boolean | any | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | any | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null> | undefined; causeRef?: string | undefined; stateId?: string | undefined; transitionId?: string | undefined; } | undefined; }

参数

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

返回值

  • 类型: { status: "failed" | "cancelled" | "already_terminal" | "not_found"; targetType: "session_command" | "activity" | "child_run"; targetId: string; error?: { code: "RUNTIME_INVALID_INPUT" | "RUNTIME_MESSAGE_BUS_UNAVAILABLE" | "RUNTIME_MESSAGE_SCHEMA_INVALID" | "RUNTIME_MESSAGE_DEAD_LETTERED" | "RUNTIME_SESSION_QUEUE_CONFLICT" | "RUNTIME_SESSION_QUEUE_OVERFLOW" | "RUNTIME_FENCING_REJECTED" | "RUNTIME_RESOURCE_CONFLICT" | "RUNTIME_IDEMPOTENCY_CONFLICT" | "RUNTIME_EVENT_STREAM_CORRUPT" | "RUNTIME_RECOVERY_REQUIRES_REVIEW" | "RUNTIME_RUN_NOT_FOUND" | "RUNTIME_RUN_CONFLICT" | "RUNTIME_LEASE_CONFLICT" | "RUNTIME_WORKFLOW_INVALID" | "RUNTIME_PROCESS_MISMATCH" | "RUNTIME_STATE_NOT_FOUND" | "RUNTIME_TRANSITION_REJECTED" | "RUNTIME_GUARD_FAILED" | "RUNTIME_INVARIANT_FAILED" | "RUNTIME_STATE_TIMEOUT" | "RUNTIME_RUN_TIMEOUT" | "RUNTIME_CANCELLED" | "RUNTIME_SIGNAL_INVALID" | "RUNTIME_SIGNAL_EXPIRED" | "RUNTIME_RETRY_EXHAUSTED" | "RUNTIME_CHECKPOINT_FAILED" | "RUNTIME_EVENT_APPEND_FAILED" | "RUNTIME_PROJECTION_FAILED" | "RUNTIME_REPLAY_DIVERGENCE" | "RUNTIME_INTERNAL_ERROR"; message: string; retryable: boolean; details?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | { [key: string]: string | number | boolean | any | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | any | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null)[] | { [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null)[] | any | null; } | null> | undefined; causeRef?: string | undefined; stateId?: string | undefined; transitionId?: string | undefined; } | undefined; }
  • 说明: 返回值契约由上述类型定义。

validateRuntimeCancelResult

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

声明

text
export declare function validateRuntimeCancelResult(input: unknown): RuntimeCancelResult;

调用签名

text
validateRuntimeCancelResult(input: unknown): RuntimeCancelResult

参数

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

返回值

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