@codesoul-co/hypha-core / contracts/runtime-helper-schemas
模块用法
用于声明并运行时校验契约。Runtime helper schemas 模块公开 24 常量、6 函数。
从包入口导入
import {
runtimeDeterminismScopeSchema,
runtimeDeterministicObservationDefinition,
runtimeDeterministicObservationExample,
runtimeDeterministicObservationJsonSchema,
runtimeDeterministicObservationSchema,
runtimeHelperContractDefinitions,
runtimeHelperContractJsonSchemas,
runtimeHelperExecutionScopeSchema,
} from '@codesoul-co/hypha-core';
// 完整导出列表见下方。使用要点
- 6 个函数是该模块的直接操作入口;每个 overload 的必需/可选参数与返回类型均在下方列出。
- 24 个常量/枚举提供稳定值、Schema、Definition 或默认配置;应复用这些导出,避免在应用中复制内部值。
运行时校验示例
import { runtimeDeterminismScopeSchema } from '@codesoul-co/hypha-core';
declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = runtimeDeterminismScopeSchema.parse(input);配置、网络请求或持久化数据等不可信输入应先通过 Runtime Schema,再传给只接受已校验契约的函数或类。
公共导出
| Symbol | 种类 | 签名 | 说明 |
|---|---|---|---|
runtimeDeterminismScopeSchema | 常量 | const runtimeDeterminismScopeSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; }, "strict", z.ZodTypeAny, { runId: string; userId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { runId: string; userId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }> | Runtime Determinism Scope 的运行时 Schema。 |
runtimeDeterministicObservationDefinition | 常量 | const runtimeDeterministicObservationDefinition: SpecSchemaDefinition<RuntimeDeterministicObservation<RuntimeJsonValue>> | 由 contracts/runtime-helper-schemas 模块导出的 Runtime Deterministic Observation Definition 常量。 |
runtimeDeterministicObservationExample | 常量 | const runtimeDeterministicObservationExample: RuntimeDeterministicObservation<RuntimeJsonValue> | Runtime Deterministic Observation 的有效示例值。 |
runtimeDeterministicObservationJsonSchema | 常量 | const runtimeDeterministicObservationJsonSchema: JsonSchema | Runtime Deterministic Observation 的 JSON Schema。 |
runtimeDeterministicObservationSchema | 常量 | const runtimeDeterministicObservationSchema: 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, { runId: string; userId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { runId: string; userId: string; stateAttempt: number; stateId: string; tena... | Runtime Deterministic Observation 的运行时 Schema。 |
runtimeHelperContractDefinitions | 常量 | const runtimeHelperContractDefinitions: readonly [SpecSchemaDefinition<RuntimeTransitionProposal>, SpecSchemaDefinition<RuntimeWaitIntent>, SpecSchemaDefinition<RuntimeStateExecutionResult>, SpecSchemaDefinition<RuntimeDeterministicObservation<RuntimeJsonValue>>, SpecSchemaDefinition<RuntimeObservationEventInput<RuntimeJsonValue>>] | 由 contracts/runtime-helper-schemas 模块导出的 Runtime Helper Contract Definitions 常量。 |
runtimeHelperContractJsonSchemas | 常量 | const runtimeHelperContractJsonSchemas: Record<string, JsonSchema> | 由 contracts/runtime-helper-schemas 模块导出的 Runtime Helper Contract JSON Schemas 常量。 |
runtimeHelperExecutionScopeSchema | 常量 | const runtimeHelperExecutionScopeSchema: z.ZodObject<{ 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; tenantId?: string... | Runtime Helper Execution Scope 的运行时 Schema。 |
runtimeObservationEventInputDefinition | 常量 | const runtimeObservationEventInputDefinition: SpecSchemaDefinition<RuntimeObservationEventInput<RuntimeJsonValue>> | 由 contracts/runtime-helper-schemas 模块导出的 Runtime Observation Event Input Definition 常量。 |
runtimeObservationEventInputExample | 常量 | const runtimeObservationEventInputExample: RuntimeObservationEventInput<RuntimeJsonValue> | Runtime Observation Event Input 的有效示例值。 |
runtimeObservationEventInputJsonSchema | 常量 | const runtimeObservationEventInputJsonSchema: JsonSchema | Runtime Observation Event Input 的 JSON Schema。 |
runtimeObservationEventInputSchema | 常量 | const runtimeObservationEventInputSchema: z.ZodObject<{ type: z.ZodType< | Runtime Observation Event Input 的运行时 Schema。 |
runtimeStateExecutionResultDefinition | 常量 | const runtimeStateExecutionResultDefinition: SpecSchemaDefinition<RuntimeStateExecutionResult> | 由 contracts/runtime-helper-schemas 模块导出的 Runtime State Execution Result Definition 常量。 |
runtimeStateExecutionResultExample | 常量 | const runtimeStateExecutionResultExample: RuntimeStateExecutionResult | Runtime State Execution Result 的有效示例值。 |
runtimeStateExecutionResultJsonSchema | 常量 | const runtimeStateExecutionResultJsonSchema: JsonSchema | Runtime State Execution Result 的 JSON Schema。 |
runtimeStateExecutionResultSchema | 常量 | const runtimeStateExecutionResultSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{ kind: z.ZodLiteral<"completed">; output: z.ZodOptional<z.ZodType<RuntimeJsonValue, z.ZodTypeDef, RuntimeJsonValue>>; variablesPatch: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<RuntimeJsonValue, z.ZodTypeDef, RuntimeJsonValue>>>; }, "strict", z.ZodTypeAny, { kind: "completed"; variablesPatch?: Record<string, RuntimeJsonVal... | Runtime State Execution Result 的运行时 Schema。 |
runtimeTransitionProposalDefinition | 常量 | const runtimeTransitionProposalDefinition: SpecSchemaDefinition<RuntimeTransitionProposal> | 由 contracts/runtime-helper-schemas 模块导出的 Runtime Transition Proposal Definition 常量。 |
runtimeTransitionProposalExample | 常量 | const runtimeTransitionProposalExample: RuntimeTransitionProposal | Runtime Transition Proposal 的有效示例值。 |
runtimeTransitionProposalJsonSchema | 常量 | const runtimeTransitionProposalJsonSchema: JsonSchema | Runtime Transition Proposal 的 JSON Schema。 |
runtimeTransitionProposalSchema | 常量 | const runtimeTransitionProposalSchema: z.ZodObject<{ to: z.ZodString; reason: z.ZodOptional<z.ZodString>; variablesPatch: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<RuntimeJsonValue, z.ZodTypeDef, RuntimeJsonValue>>>; }, "strict", z.ZodTypeAny, { to: string; reason?: string | undefined; variablesPatch?: Record<string, RuntimeJsonValue> | undefined; }, { to: string; reason?: string | undefined; variablesPatch... | Runtime Transition Proposal 的运行时 Schema。 |
runtimeWaitIntentDefinition | 常量 | const runtimeWaitIntentDefinition: SpecSchemaDefinition<RuntimeWaitIntent> | 由 contracts/runtime-helper-schemas 模块导出的 Runtime Wait Intent Definition 常量。 |
runtimeWaitIntentExample | 常量 | const runtimeWaitIntentExample: RuntimeWaitIntent | Runtime Wait Intent 的有效示例值。 |
runtimeWaitIntentJsonSchema | 常量 | const runtimeWaitIntentJsonSchema: JsonSchema | Runtime Wait Intent 的 JSON Schema。 |
runtimeWaitIntentSchema | 常量 | const runtimeWaitIntentSchema: z.ZodEffects<z.ZodObject<{ type: z.ZodEnum<["human", "signal", "timer", "pause"]>; key: z.ZodOptional<z.ZodString>; expectedSchema: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>; expiresAt: z.ZodOptional<z.ZodString>; timeoutTransitionId: z.ZodOptional<z.ZodString>; pendingActionRef: z.ZodOptional<z.ZodString>; reason: z.ZodOptional<z.ZodString>; metadata: z.ZodOptio... | Runtime Wait Intent 的运行时 Schema。 |
validateRuntimeDeterministicObservation | 函数 | validateRuntimeDeterministicObservation(input: unknown): RuntimeDeterministicObservation | Validate Runtime Deterministic Observation 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
validateRuntimeHelperExecutionScope | 函数 | validateRuntimeHelperExecutionScope(input: unknown): RuntimeHelperExecutionScope | Validate Runtime Helper Execution Scope 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
validateRuntimeObservationEventInput | 函数 | validateRuntimeObservationEventInput(input: unknown): RuntimeObservationEventInput | Validate Runtime Observation Event Input 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
validateRuntimeStateExecutionResult | 函数 | validateRuntimeStateExecutionResult(input: unknown): RuntimeStateExecutionResult | Validate Runtime State Execution Result 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
validateRuntimeTransitionProposal | 函数 | validateRuntimeTransitionProposal(input: unknown): RuntimeTransitionProposal | Validate Runtime Transition Proposal 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
validateRuntimeWaitIntent | 函数 | validateRuntimeWaitIntent(input: unknown): RuntimeWaitIntent | Validate Runtime Wait Intent 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
runtimeDeterminismScopeSchema
Runtime Determinism Scope 的运行时 Schema。
- 种类: 常量
- 导入:
import { runtimeDeterminismScopeSchema } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeDeterminismScopeSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; }, "strict", z.ZodTypeAny, { runId: string; userId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { runId: string; userId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }>;runtimeDeterministicObservationDefinition
由 contracts/runtime-helper-schemas 模块导出的 Runtime Deterministic Observation Definition 常量。
- 种类: 常量
- 导入:
import { runtimeDeterministicObservationDefinition } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeDeterministicObservationDefinition: SpecSchemaDefinition<RuntimeDeterministicObservation<RuntimeJsonValue>>;runtimeDeterministicObservationExample
Runtime Deterministic Observation 的有效示例值。
- 种类: 常量
- 导入:
import { runtimeDeterministicObservationExample } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeDeterministicObservationExample: RuntimeDeterministicObservation<RuntimeJsonValue>;runtimeDeterministicObservationJsonSchema
Runtime Deterministic Observation 的 JSON Schema。
- 种类: 常量
- 导入:
import { runtimeDeterministicObservationJsonSchema } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeDeterministicObservationJsonSchema: JsonSchema;runtimeDeterministicObservationSchema
Runtime Deterministic Observation 的运行时 Schema。
- 种类: 常量
- 导入:
import { runtimeDeterministicObservationSchema } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeDeterministicObservationSchema: 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, { runId: string; userId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }, { runId: string; userId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }>; key: z.ZodString; kind: z.ZodEnum<["clock", "id"]>; value: z.ZodType<RuntimeJsonValue, z.ZodTypeDef, RuntimeJsonValue>; }, "strict", z.ZodTypeAny, { value: RuntimeJsonValue; scope: { runId: string; userId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }; key: string; kind: "id" | "clock"; }, { value: RuntimeJsonValue; scope: { runId: string; userId: string; stateAttempt: number; stateId: string; tenantId?: string | undefined; }; key: string; kind: "id" | "clock"; }>;runtimeHelperContractDefinitions
由 contracts/runtime-helper-schemas 模块导出的 Runtime Helper Contract Definitions 常量。
- 种类: 常量
- 导入:
import { runtimeHelperContractDefinitions } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeHelperContractDefinitions: readonly [SpecSchemaDefinition<RuntimeTransitionProposal>, SpecSchemaDefinition<RuntimeWaitIntent>, SpecSchemaDefinition<RuntimeStateExecutionResult>, SpecSchemaDefinition<RuntimeDeterministicObservation<RuntimeJsonValue>>, SpecSchemaDefinition<RuntimeObservationEventInput<RuntimeJsonValue>>];runtimeHelperContractJsonSchemas
由 contracts/runtime-helper-schemas 模块导出的 Runtime Helper Contract JSON Schemas 常量。
- 种类: 常量
- 导入:
import { runtimeHelperContractJsonSchemas } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeHelperContractJsonSchemas: Record<string, JsonSchema>;runtimeHelperExecutionScopeSchema
Runtime Helper Execution Scope 的运行时 Schema。
- 种类: 常量
- 导入:
import { runtimeHelperExecutionScopeSchema } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeHelperExecutionScopeSchema: z.ZodObject<{ 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; tenantId?: string | undefined; }, { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | undefined; }>; stateId: z.ZodString; stateAttempt: z.ZodNumber; fencingToken: z.ZodNumber; correlationId: z.ZodString; causationId: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { correlationId: string; scope: { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | undefined; }; stateAttempt: number; stateId: string; fencingToken: number; causationId?: string | undefined; }, { correlationId: string; scope: { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | undefined; }; stateAttempt: number; stateId: string; fencingToken: number; causationId?: string | undefined; }>;runtimeObservationEventInputDefinition
由 contracts/runtime-helper-schemas 模块导出的 Runtime Observation Event Input Definition 常量。
- 种类: 常量
- 导入:
import { runtimeObservationEventInputDefinition } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeObservationEventInputDefinition: SpecSchemaDefinition<RuntimeObservationEventInput<RuntimeJsonValue>>;runtimeObservationEventInputExample
Runtime Observation Event Input 的有效示例值。
- 种类: 常量
- 导入:
import { runtimeObservationEventInputExample } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeObservationEventInputExample: RuntimeObservationEventInput<RuntimeJsonValue>;runtimeObservationEventInputJsonSchema
Runtime Observation Event Input 的 JSON Schema。
- 种类: 常量
- 导入:
import { runtimeObservationEventInputJsonSchema } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeObservationEventInputJsonSchema: JsonSchema;runtimeObservationEventInputSchema
Runtime Observation Event Input 的运行时 Schema。
- 种类: 常量
- 导入:
import { runtimeObservationEventInputSchema } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeObservationEventInputSchema: z.ZodObject<{ type: z.ZodType<`runtime.observation.${string}`, z.ZodTypeDef, `runtime.observation.${string}`>; payload: z.ZodType<RuntimeJsonValue, z.ZodTypeDef, RuntimeJsonValue>; options: z.ZodOptional<z.ZodObject<{ idempotencyKey: z.ZodOptional<z.ZodString>; causationId: z.ZodOptional<z.ZodString>; parentEventId: z.ZodOptional<z.ZodString>; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<RuntimeJsonValue, z.ZodTypeDef, RuntimeJsonValue>>>; }, "strict", z.ZodTypeAny, { metadata?: Record<string, RuntimeJsonValue> | undefined; causationId?: string | undefined; parentEventId?: string | undefined; idempotencyKey?: string | undefined; }, { metadata?: Record<string, RuntimeJsonValue> | undefined; causationId?: string | undefined; parentEventId?: string | undefined; idempotencyKey?: string | undefined; }>>; }, "strict", z.ZodTypeAny, { type: `runtime.observation.${string}`; payload: RuntimeJsonValue; options?: { metadata?: Record<string, RuntimeJsonValue> | undefined; causationId?: string | undefined; parentEventId?: string | undefined; idempotencyKey?: string | undefined; } | undefined; }, { type: `runtime.observation.${string}`; payload: RuntimeJsonValue; options?: { metadata?: Record<string, RuntimeJsonValue> | undefined; causationId?: string | undefined; parentEventId?: string | undefined; idempotencyKey?: string | undefined; } | undefined; }>;runtimeStateExecutionResultDefinition
由 contracts/runtime-helper-schemas 模块导出的 Runtime State Execution Result Definition 常量。
- 种类: 常量
- 导入:
import { runtimeStateExecutionResultDefinition } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeStateExecutionResultDefinition: SpecSchemaDefinition<RuntimeStateExecutionResult>;runtimeStateExecutionResultExample
Runtime State Execution Result 的有效示例值。
- 种类: 常量
- 导入:
import { runtimeStateExecutionResultExample } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeStateExecutionResultExample: RuntimeStateExecutionResult;runtimeStateExecutionResultJsonSchema
Runtime State Execution Result 的 JSON Schema。
- 种类: 常量
- 导入:
import { runtimeStateExecutionResultJsonSchema } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeStateExecutionResultJsonSchema: JsonSchema;runtimeStateExecutionResultSchema
Runtime State Execution Result 的运行时 Schema。
- 种类: 常量
- 导入:
import { runtimeStateExecutionResultSchema } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
// 精确类型由包入口解析;完整编译器展开定义见源码链接。
export declare const runtimeStateExecutionResultSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeStateExecutionResultSchema'];该常量的编译器展开类型已压缩;它的公共名称、顶层类型与源码位置仍保留在本条目中。相关输入/输出字段请使用同模块导出的接口、类型或 Runtime Schema。
runtimeTransitionProposalDefinition
由 contracts/runtime-helper-schemas 模块导出的 Runtime Transition Proposal Definition 常量。
- 种类: 常量
- 导入:
import { runtimeTransitionProposalDefinition } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeTransitionProposalDefinition: SpecSchemaDefinition<RuntimeTransitionProposal>;runtimeTransitionProposalExample
Runtime Transition Proposal 的有效示例值。
- 种类: 常量
- 导入:
import { runtimeTransitionProposalExample } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeTransitionProposalExample: RuntimeTransitionProposal;runtimeTransitionProposalJsonSchema
Runtime Transition Proposal 的 JSON Schema。
- 种类: 常量
- 导入:
import { runtimeTransitionProposalJsonSchema } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeTransitionProposalJsonSchema: JsonSchema;runtimeTransitionProposalSchema
Runtime Transition Proposal 的运行时 Schema。
- 种类: 常量
- 导入:
import { runtimeTransitionProposalSchema } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeTransitionProposalSchema: z.ZodObject<{ to: z.ZodString; reason: z.ZodOptional<z.ZodString>; variablesPatch: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<RuntimeJsonValue, z.ZodTypeDef, RuntimeJsonValue>>>; }, "strict", z.ZodTypeAny, { to: string; reason?: string | undefined; variablesPatch?: Record<string, RuntimeJsonValue> | undefined; }, { to: string; reason?: string | undefined; variablesPatch?: Record<string, RuntimeJsonValue> | undefined; }>;runtimeWaitIntentDefinition
由 contracts/runtime-helper-schemas 模块导出的 Runtime Wait Intent Definition 常量。
- 种类: 常量
- 导入:
import { runtimeWaitIntentDefinition } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeWaitIntentDefinition: SpecSchemaDefinition<RuntimeWaitIntent>;runtimeWaitIntentExample
Runtime Wait Intent 的有效示例值。
- 种类: 常量
- 导入:
import { runtimeWaitIntentExample } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeWaitIntentExample: RuntimeWaitIntent;runtimeWaitIntentJsonSchema
Runtime Wait Intent 的 JSON Schema。
- 种类: 常量
- 导入:
import { runtimeWaitIntentJsonSchema } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeWaitIntentJsonSchema: JsonSchema;runtimeWaitIntentSchema
Runtime Wait Intent 的运行时 Schema。
- 种类: 常量
- 导入:
import { runtimeWaitIntentSchema } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare const runtimeWaitIntentSchema: z.ZodEffects<z.ZodObject<{ type: z.ZodEnum<["human", "signal", "timer", "pause"]>; key: z.ZodOptional<z.ZodString>; expectedSchema: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>; expiresAt: z.ZodOptional<z.ZodString>; timeoutTransitionId: z.ZodOptional<z.ZodString>; pendingActionRef: z.ZodOptional<z.ZodString>; reason: z.ZodOptional<z.ZodString>; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<RuntimeJsonValue, z.ZodTypeDef, RuntimeJsonValue>>>; }, "strict", z.ZodTypeAny, { type: "signal" | "human" | "timer" | "pause"; reason?: string | undefined; metadata?: Record<string, RuntimeJsonValue> | undefined; expiresAt?: string | undefined; key?: string | undefined; pendingActionRef?: string | undefined; expectedSchema?: JsonSchema | undefined; timeoutTransitionId?: string | undefined; }, { type: "signal" | "human" | "timer" | "pause"; reason?: string | undefined; metadata?: Record<string, RuntimeJsonValue> | undefined; expiresAt?: string | undefined; key?: string | undefined; pendingActionRef?: string | undefined; expectedSchema?: JsonSchema | undefined; timeoutTransitionId?: string | undefined; }>, { type: "signal" | "human" | "timer" | "pause"; reason?: string | undefined; metadata?: Record<string, RuntimeJsonValue> | undefined; expiresAt?: string | undefined; key?: string | undefined; pendingActionRef?: string | undefined; expectedSchema?: JsonSchema | undefined; timeoutTransitionId?: string | undefined; }, { type: "signal" | "human" | "timer" | "pause"; reason?: string | undefined; metadata?: Record<string, RuntimeJsonValue> | undefined; expiresAt?: string | undefined; key?: string | undefined; pendingActionRef?: string | undefined; expectedSchema?: JsonSchema | undefined; timeoutTransitionId?: string | undefined; }>;validateRuntimeDeterministicObservation
Validate Runtime Deterministic Observation 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { validateRuntimeDeterministicObservation } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare function validateRuntimeDeterministicObservation(input: unknown): RuntimeDeterministicObservation;调用签名
validateRuntimeDeterministicObservation(input: unknown): RuntimeDeterministicObservation参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
input | unknown | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
RuntimeDeterministicObservation<RuntimeJsonValue> - 说明: 返回值契约由上述类型定义。
validateRuntimeHelperExecutionScope
Validate Runtime Helper Execution Scope 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { validateRuntimeHelperExecutionScope } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare function validateRuntimeHelperExecutionScope(input: unknown): RuntimeHelperExecutionScope;调用签名
validateRuntimeHelperExecutionScope(input: unknown): RuntimeHelperExecutionScope参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
input | unknown | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
RuntimeHelperExecutionScope - 说明: 返回值契约由上述类型定义。
validateRuntimeObservationEventInput
Validate Runtime Observation Event Input 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { validateRuntimeObservationEventInput } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare function validateRuntimeObservationEventInput(input: unknown): RuntimeObservationEventInput;调用签名
validateRuntimeObservationEventInput(input: unknown): RuntimeObservationEventInput参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
input | unknown | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
RuntimeObservationEventInput<RuntimeJsonValue> - 说明: 返回值契约由上述类型定义。
validateRuntimeStateExecutionResult
Validate Runtime State Execution Result 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { validateRuntimeStateExecutionResult } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare function validateRuntimeStateExecutionResult(input: unknown): RuntimeStateExecutionResult;调用签名
validateRuntimeStateExecutionResult(input: unknown): RuntimeStateExecutionResult参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
input | unknown | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
RuntimeStateExecutionResult - 说明: 返回值契约由上述类型定义。
validateRuntimeTransitionProposal
Validate Runtime Transition Proposal 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { validateRuntimeTransitionProposal } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare function validateRuntimeTransitionProposal(input: unknown): RuntimeTransitionProposal;调用签名
validateRuntimeTransitionProposal(input: unknown): RuntimeTransitionProposal参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
input | unknown | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
RuntimeTransitionProposal - 说明: 返回值契约由上述类型定义。
validateRuntimeWaitIntent
Validate Runtime Wait Intent 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { validateRuntimeWaitIntent } from '@codesoul-co/hypha-core'; - 源码模块:
contracts/runtime-helper-schemas
声明
export declare function validateRuntimeWaitIntent(input: unknown): RuntimeWaitIntent;调用签名
validateRuntimeWaitIntent(input: unknown): RuntimeWaitIntent参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
input | unknown | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
RuntimeWaitIntent - 说明: 返回值契约由上述类型定义。
