@codesoul-co/hypha-core / contracts/runtime-cancellation-schemas
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/runtime-cancellation-schemas.ts - Exports: 15
Using this module
Use the Runtime cancellation schemas module for declaring and runtime-validating contracts. It exports 12 constants, 3 functions.
Import from the package entrypoint
import {
runtimeCancelCommandDefinition,
runtimeCancelCommandExample,
runtimeCancelCommandJsonSchema,
runtimeCancelCommandSchema,
runtimeCancellationContractDefinitions,
runtimeCancellationContractJsonSchemas,
runtimeCancellationPolicySchema,
runtimeCancellationTargetResultSchema,
} from '@codesoul-co/hypha-core';
// The complete export list is documented below.Usage patterns
- The module exposes 3 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
- The 12 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.
Runtime validation example
import { runtimeCancelCommandSchema } from '@codesoul-co/hypha-core';
declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = runtimeCancelCommandSchema.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
| Symbol | Kind | Signature | Description |
|---|---|---|---|
runtimeCancelCommandDefinition | constant | const runtimeCancelCommandDefinition: SpecSchemaDefinition<RuntimeCancelCommand> | Runtime Cancel Command Definition constant exported by the contracts/runtime-cancellation-schemas module. |
runtimeCancelCommandExample | constant | const runtimeCancelCommandExample: RuntimeCancelCommand | Valid example value for Runtime Cancel Command. |
runtimeCancelCommandJsonSchema | constant | const runtimeCancelCommandJsonSchema: JsonSchema | JSON Schema for Runtime Cancel Command. |
runtimeCancelCommandSchema | constant | 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 schema for Runtime Cancel Command. |
runtimeCancellationContractDefinitions | constant | const runtimeCancellationContractDefinitions: readonly [SpecSchemaDefinition<RuntimeCancelCommand>, SpecSchemaDefinition<RuntimeCancelResult>] | Runtime Cancellation Contract Definitions constant exported by the contracts/runtime-cancellation-schemas module. |
runtimeCancellationContractJsonSchemas | constant | const runtimeCancellationContractJsonSchemas: Record<string, JsonSchema> | Runtime Cancellation Contract JSON Schemas constant exported by the contracts/runtime-cancellation-schemas module. |
runtimeCancellationPolicySchema | constant | 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 schema for Runtime Cancellation Policy. |
runtimeCancellationTargetResultSchema | constant | 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 schema for Runtime Cancellation Target Result. |
runtimeCancelResultDefinition | constant | const runtimeCancelResultDefinition: SpecSchemaDefinition<RuntimeCancelResult> | Runtime Cancel Result Definition constant exported by the contracts/runtime-cancellation-schemas module. |
runtimeCancelResultExample | constant | const runtimeCancelResultExample: RuntimeCancelResult | Valid example value for Runtime Cancel Result. |
runtimeCancelResultJsonSchema | constant | const runtimeCancelResultJsonSchema: JsonSchema | JSON Schema for Runtime Cancel Result. |
runtimeCancelResultSchema | constant | 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 schema for Runtime Cancel Result. |
validateRuntimeCancelCommand | function | validateRuntimeCancelCommand(input: unknown): RuntimeCancelCommand | Validate Runtime Cancel Command function with 1 public call signature; parameters and return types are listed below. |
validateRuntimeCancellationTargetResult | 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" ... | Validate Runtime Cancellation Target Result function with 1 public call signature; parameters and return types are listed below. |
validateRuntimeCancelResult | function | validateRuntimeCancelResult(input: unknown): RuntimeCancelResult | Validate Runtime Cancel Result function with 1 public call signature; parameters and return types are listed below. |
runtimeCancelCommandDefinition
Runtime Cancel Command Definition constant exported by the contracts/runtime-cancellation-schemas module.
- Kind: constant
- Import:
import { runtimeCancelCommandDefinition } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
export declare const runtimeCancelCommandDefinition: SpecSchemaDefinition<RuntimeCancelCommand>;runtimeCancelCommandExample
Valid example value for Runtime Cancel Command.
- Kind: constant
- Import:
import { runtimeCancelCommandExample } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
export declare const runtimeCancelCommandExample: RuntimeCancelCommand;runtimeCancelCommandJsonSchema
JSON Schema for Runtime Cancel Command.
- Kind: constant
- Import:
import { runtimeCancelCommandJsonSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
export declare const runtimeCancelCommandJsonSchema: JsonSchema;runtimeCancelCommandSchema
Runtime schema for Runtime Cancel Command.
- Kind: constant
- Import:
import { runtimeCancelCommandSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const runtimeCancelCommandSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeCancelCommandSchema'];This compiler-expanded constant type is compacted. Its public name, top-level type, and source location remain here; use the module’s exported interfaces, types, or runtime schema for input/output fields.
runtimeCancellationContractDefinitions
Runtime Cancellation Contract Definitions constant exported by the contracts/runtime-cancellation-schemas module.
- Kind: constant
- Import:
import { runtimeCancellationContractDefinitions } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
export declare const runtimeCancellationContractDefinitions: readonly [SpecSchemaDefinition<RuntimeCancelCommand>, SpecSchemaDefinition<RuntimeCancelResult>];runtimeCancellationContractJsonSchemas
Runtime Cancellation Contract JSON Schemas constant exported by the contracts/runtime-cancellation-schemas module.
- Kind: constant
- Import:
import { runtimeCancellationContractJsonSchemas } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
export declare const runtimeCancellationContractJsonSchemas: Record<string, JsonSchema>;runtimeCancellationPolicySchema
Runtime schema for Runtime Cancellation Policy.
- Kind: constant
- Import:
import { runtimeCancellationPolicySchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
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 schema for Runtime Cancellation Target Result.
- Kind: constant
- Import:
import { runtimeCancellationTargetResultSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const runtimeCancellationTargetResultSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeCancellationTargetResultSchema'];This compiler-expanded constant type is compacted. Its public name, top-level type, and source location remain here; use the module’s exported interfaces, types, or runtime schema for input/output fields.
runtimeCancelResultDefinition
Runtime Cancel Result Definition constant exported by the contracts/runtime-cancellation-schemas module.
- Kind: constant
- Import:
import { runtimeCancelResultDefinition } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
export declare const runtimeCancelResultDefinition: SpecSchemaDefinition<RuntimeCancelResult>;runtimeCancelResultExample
Valid example value for Runtime Cancel Result.
- Kind: constant
- Import:
import { runtimeCancelResultExample } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
export declare const runtimeCancelResultExample: RuntimeCancelResult;runtimeCancelResultJsonSchema
JSON Schema for Runtime Cancel Result.
- Kind: constant
- Import:
import { runtimeCancelResultJsonSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
export declare const runtimeCancelResultJsonSchema: JsonSchema;runtimeCancelResultSchema
Runtime schema for Runtime Cancel Result.
- Kind: constant
- Import:
import { runtimeCancelResultSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const runtimeCancelResultSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeCancelResultSchema'];This compiler-expanded constant type is compacted. Its public name, top-level type, and source location remain here; use the module’s exported interfaces, types, or runtime schema for input/output fields.
validateRuntimeCancelCommand
Validate Runtime Cancel Command function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateRuntimeCancelCommand } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
export declare function validateRuntimeCancelCommand(input: unknown): RuntimeCancelCommand;Call signature
validateRuntimeCancelCommand(input: unknown): RuntimeCancelCommandParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
RuntimeCancelCommand - Description: The return contract is defined by the type shown above.
validateRuntimeCancellationTargetResult
Validate Runtime Cancellation Target Result function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateRuntimeCancellationTargetResult } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
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;
};Call signature
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; }Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
{ 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; } - Description: The return contract is defined by the type shown above.
validateRuntimeCancelResult
Validate Runtime Cancel Result function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateRuntimeCancelResult } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-cancellation-schemas
Declaration
export declare function validateRuntimeCancelResult(input: unknown): RuntimeCancelResult;Call signature
validateRuntimeCancelResult(input: unknown): RuntimeCancelResultParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
RuntimeCancelResult - Description: The return contract is defined by the type shown above.
