@codesoul-co/hypha-core / contracts/runtime-control-schemas
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/runtime-control-schemas.ts - Exports: 15
Using this module
Use the Runtime control schemas module for declaring and runtime-validating contracts. It exports 13 constants, 2 functions.
Import from the package entrypoint
import {
runtimeControlContractDefinitions,
runtimeControlContractJsonSchemas,
runtimePauseCommandSchema,
runtimeResumeCommandSchema,
runtimeRunControlCommandDefinition,
runtimeRunControlCommandExample,
runtimeRunControlCommandJsonSchema,
runtimeRunControlCommandSchema,
} from '@codesoul-co/hypha-core';
// The complete export list is documented below.Usage patterns
- The module exposes 2 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
- The 13 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 { runtimePauseCommandSchema } from '@codesoul-co/hypha-core';
declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = runtimePauseCommandSchema.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 |
|---|---|---|---|
runtimeControlContractDefinitions | constant | const runtimeControlContractDefinitions: readonly [SpecSchemaDefinition<RuntimeRunControlCommand>, SpecSchemaDefinition<RuntimeRunControlResult>] | Runtime Control Contract Definitions constant exported by the contracts/runtime-control-schemas module. |
runtimeControlContractJsonSchemas | constant | const runtimeControlContractJsonSchemas: Record<string, JsonSchema> | Runtime Control Contract JSON Schemas constant exported by the contracts/runtime-control-schemas module. |
runtimePauseCommandSchema | constant | const runtimePauseCommandSchema: z.ZodObject<{ kind: z.ZodLiteral<"pause">; reason: z.ZodString; resumeKey: z.ZodOptional<z.ZodString>; requestedAt: z.ZodString; 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, { ... | Runtime schema for Runtime Pause Command. |
runtimeResumeCommandSchema | constant | const runtimeResumeCommandSchema: z.ZodObject<{ kind: z.ZodLiteral<"resume">; key: z.ZodOptional<z.ZodString>; payload: z.ZodOptional<z.ZodType<RuntimeJsonValue, z.ZodTypeDef, RuntimeJsonValue>>; requestedAt: z.ZodString; 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; agentI... | Runtime schema for Runtime Resume Command. |
runtimeRunControlCommandDefinition | constant | const runtimeRunControlCommandDefinition: SpecSchemaDefinition<RuntimeRunControlCommand> | Runtime Run Control Command Definition constant exported by the contracts/runtime-control-schemas module. |
runtimeRunControlCommandExample | constant | const runtimeRunControlCommandExample: RuntimeRunControlCommand | Valid example value for Runtime Run Control Command. |
runtimeRunControlCommandJsonSchema | constant | const runtimeRunControlCommandJsonSchema: JsonSchema | JSON Schema for Runtime Run Control Command. |
runtimeRunControlCommandSchema | constant | const runtimeRunControlCommandSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{ kind: z.ZodLiteral<"pause">; reason: z.ZodString; resumeKey: z.ZodOptional<z.ZodString>; requestedAt: z.ZodString; 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.Zod... | Runtime schema for Runtime Run Control Command. |
runtimeRunControlResultDefinition | constant | const runtimeRunControlResultDefinition: SpecSchemaDefinition<RuntimeRunControlResult> | Runtime Run Control Result Definition constant exported by the contracts/runtime-control-schemas module. |
runtimeRunControlResultExample | constant | const runtimeRunControlResultExample: RuntimeRunControlResult | Valid example value for Runtime Run Control Result. |
runtimeRunControlResultJsonSchema | constant | const runtimeRunControlResultJsonSchema: JsonSchema | JSON Schema for Runtime Run Control Result. |
runtimeRunControlResultSchema | constant | const runtimeRunControlResultSchema: z.ZodObject<{ commandId: z.ZodString; kind: z.ZodEnum<["pause", "resume", "signal"]>; disposition: z.ZodEnum<["applied", "reused", "lease_unavailable"]>; eventIds: z.ZodArray<z.ZodString, "many">; runRevision: z.ZodNumber; projection: z.ZodEffects<z.ZodObject<{ runId: z.ZodString; runStatus: z.ZodEnum<[import("./runtime-projection").RuntimeOrchestrationRunStatus, ...import("./r... | Runtime schema for Runtime Run Control Result. |
runtimeSignalCommandSchema | constant | const runtimeSignalCommandSchema: z.ZodObject<{ kind: z.ZodLiteral<"signal">; key: z.ZodString; payload: z.ZodType<RuntimeJsonValue, z.ZodTypeDef, RuntimeJsonValue>; sentAt: z.ZodString; 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>; }, "... | Runtime schema for Runtime Signal Command. |
validateRuntimeRunControlCommand | function | validateRuntimeRunControlCommand(input: unknown): RuntimeRunControlCommand | Validate Runtime Run Control Command function with 1 public call signature; parameters and return types are listed below. |
validateRuntimeRunControlResult | function | validateRuntimeRunControlResult(input: unknown): RuntimeRunControlResult | Validate Runtime Run Control Result function with 1 public call signature; parameters and return types are listed below. |
runtimeControlContractDefinitions
Runtime Control Contract Definitions constant exported by the contracts/runtime-control-schemas module.
- Kind: constant
- Import:
import { runtimeControlContractDefinitions } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
export declare const runtimeControlContractDefinitions: readonly [SpecSchemaDefinition<RuntimeRunControlCommand>, SpecSchemaDefinition<RuntimeRunControlResult>];runtimeControlContractJsonSchemas
Runtime Control Contract JSON Schemas constant exported by the contracts/runtime-control-schemas module.
- Kind: constant
- Import:
import { runtimeControlContractJsonSchemas } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
export declare const runtimeControlContractJsonSchemas: Record<string, JsonSchema>;runtimePauseCommandSchema
Runtime schema for Runtime Pause Command.
- Kind: constant
- Import:
import { runtimePauseCommandSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const runtimePauseCommandSchema: (typeof import('@codesoul-co/hypha-core'))['runtimePauseCommandSchema'];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.
runtimeResumeCommandSchema
Runtime schema for Runtime Resume Command.
- Kind: constant
- Import:
import { runtimeResumeCommandSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const runtimeResumeCommandSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeResumeCommandSchema'];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.
runtimeRunControlCommandDefinition
Runtime Run Control Command Definition constant exported by the contracts/runtime-control-schemas module.
- Kind: constant
- Import:
import { runtimeRunControlCommandDefinition } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
export declare const runtimeRunControlCommandDefinition: SpecSchemaDefinition<RuntimeRunControlCommand>;runtimeRunControlCommandExample
Valid example value for Runtime Run Control Command.
- Kind: constant
- Import:
import { runtimeRunControlCommandExample } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
export declare const runtimeRunControlCommandExample: RuntimeRunControlCommand;runtimeRunControlCommandJsonSchema
JSON Schema for Runtime Run Control Command.
- Kind: constant
- Import:
import { runtimeRunControlCommandJsonSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
export declare const runtimeRunControlCommandJsonSchema: JsonSchema;runtimeRunControlCommandSchema
Runtime schema for Runtime Run Control Command.
- Kind: constant
- Import:
import { runtimeRunControlCommandSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const runtimeRunControlCommandSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeRunControlCommandSchema'];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.
runtimeRunControlResultDefinition
Runtime Run Control Result Definition constant exported by the contracts/runtime-control-schemas module.
- Kind: constant
- Import:
import { runtimeRunControlResultDefinition } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
export declare const runtimeRunControlResultDefinition: SpecSchemaDefinition<RuntimeRunControlResult>;runtimeRunControlResultExample
Valid example value for Runtime Run Control Result.
- Kind: constant
- Import:
import { runtimeRunControlResultExample } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
export declare const runtimeRunControlResultExample: RuntimeRunControlResult;runtimeRunControlResultJsonSchema
JSON Schema for Runtime Run Control Result.
- Kind: constant
- Import:
import { runtimeRunControlResultJsonSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
export declare const runtimeRunControlResultJsonSchema: JsonSchema;runtimeRunControlResultSchema
Runtime schema for Runtime Run Control Result.
- Kind: constant
- Import:
import { runtimeRunControlResultSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const runtimeRunControlResultSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeRunControlResultSchema'];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.
runtimeSignalCommandSchema
Runtime schema for Runtime Signal Command.
- Kind: constant
- Import:
import { runtimeSignalCommandSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const runtimeSignalCommandSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeSignalCommandSchema'];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.
validateRuntimeRunControlCommand
Validate Runtime Run Control Command function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateRuntimeRunControlCommand } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
export declare function validateRuntimeRunControlCommand(input: unknown): RuntimeRunControlCommand;Call signature
validateRuntimeRunControlCommand(input: unknown): RuntimeRunControlCommandParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
RuntimeRunControlCommand - Description: The return contract is defined by the type shown above.
validateRuntimeRunControlResult
Validate Runtime Run Control Result function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateRuntimeRunControlResult } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-control-schemas
Declaration
export declare function validateRuntimeRunControlResult(input: unknown): RuntimeRunControlResult;Call signature
validateRuntimeRunControlResult(input: unknown): RuntimeRunControlResultParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
RuntimeRunControlResult - Description: The return contract is defined by the type shown above.
