Skip to content

@codesoul-co/hypha-core / contracts/runtime-human-task-schemas

Using this module

Use the Runtime human task schemas module for declaring and runtime-validating contracts. It exports 12 constants, 3 functions.

Import from the package entrypoint

ts
import {
  runtimeHumanTaskContractDefinitions,
  runtimeHumanTaskContractJsonSchemas,
  runtimeHumanTaskDecisionCommandDefinition,
  runtimeHumanTaskDecisionCommandExample,
  runtimeHumanTaskDecisionCommandJsonSchema,
  runtimeHumanTaskDecisionCommandSchema,
  runtimeHumanTaskDefinition,
  runtimeHumanTaskExample,
} 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

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

declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = runtimeHumanTaskDecisionCommandSchema.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

SymbolKindSignatureDescription
runtimeHumanTaskContractDefinitionsconstantconst runtimeHumanTaskContractDefinitions: readonly [SpecSchemaDefinition<RuntimeHumanTask>, SpecSchemaDefinition<RuntimeHumanTaskDecisionCommand>]Runtime Human Task Contract Definitions constant exported by the contracts/runtime-human-task-schemas module.
runtimeHumanTaskContractJsonSchemasconstantconst runtimeHumanTaskContractJsonSchemas: Record<string, JsonSchema>Runtime Human Task Contract JSON Schemas constant exported by the contracts/runtime-human-task-schemas module.
runtimeHumanTaskDecisionCommandDefinitionconstantconst runtimeHumanTaskDecisionCommandDefinition: SpecSchemaDefinition<RuntimeHumanTaskDecisionCommand>Runtime Human Task Decision Command Definition constant exported by the contracts/runtime-human-task-schemas module.
runtimeHumanTaskDecisionCommandExampleconstantconst runtimeHumanTaskDecisionCommandExample: RuntimeHumanTaskDecisionCommandValid example value for Runtime Human Task Decision Command.
runtimeHumanTaskDecisionCommandJsonSchemaconstantconst runtimeHumanTaskDecisionCommandJsonSchema: JsonSchemaJSON Schema for Runtime Human Task Decision Command.
runtimeHumanTaskDecisionCommandSchemaconstantconst runtimeHumanTaskDecisionCommandSchema: z.ZodEffects<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, { userId: string; sessionId: string; runId: string; tenantId?: string | undefined; workspace...Runtime schema for Runtime Human Task Decision Command.
runtimeHumanTaskDefinitionconstantconst runtimeHumanTaskDefinition: SpecSchemaDefinition<RuntimeHumanTask>Runtime Human Task Definition constant exported by the contracts/runtime-human-task-schemas module.
runtimeHumanTaskExampleconstantconst runtimeHumanTaskExample: RuntimeHumanTaskValid example value for Runtime Human Task.
runtimeHumanTaskJsonSchemaconstantconst runtimeHumanTaskJsonSchema: JsonSchemaJSON Schema for Runtime Human Task.
runtimeHumanTaskRequestJsonSchemaconstantconst runtimeHumanTaskRequestJsonSchema: JsonSchemaJSON Schema for Runtime Human Task Request.
runtimeHumanTaskRequestSchemaconstantconst runtimeHumanTaskRequestSchema: z.ZodEffects<z.ZodObject<{ taskId: z.ZodString; kind: z.ZodEnum<["tool", "skill", "prompt", "memory", "execution", "mcp", "policy"]>; subjectRef: z.ZodString; subjectHash: z.ZodString; requestedBy: z.ZodString; allowedDecisionScopes: z.ZodArray<z.ZodString, "many">; requestedAt: z.ZodString; expiresAt: z.ZodOptional<z.ZodString>; checkpointRef: z.ZodOptional<z.ZodString>; polic...Runtime schema for Runtime Human Task Request.
runtimeHumanTaskSchemaconstantconst runtimeHumanTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{ runId: z.ZodString; stateId: z.ZodString; stateAttempt: z.ZodNumber; status: z.ZodEnum<["pending", "approved", "rejected", "expired", "cancelled", "superseded"]>; revision: z.ZodNumber; decisionEventId: z.ZodOptional<z.ZodString>; decisionCommandId: z.ZodOptional<z.ZodString>; decisionIdempotencyKey: z.ZodOptional<z.ZodString>; decidedBy: z.ZodO...Runtime schema for Runtime Human Task.
validateRuntimeHumanTaskfunctionvalidateRuntimeHumanTask(input: unknown): RuntimeHumanTaskValidate Runtime Human Task function with 1 public call signature; parameters and return types are listed below.
validateRuntimeHumanTaskDecisionCommandfunctionvalidateRuntimeHumanTaskDecisionCommand(input: unknown): RuntimeHumanTaskDecisionCommandValidate Runtime Human Task Decision Command function with 1 public call signature; parameters and return types are listed below.
validateRuntimeHumanTaskRequestfunctionvalidateRuntimeHumanTaskRequest(input: unknown): RuntimeHumanTaskRequestValidate Runtime Human Task Request function with 1 public call signature; parameters and return types are listed below.

runtimeHumanTaskContractDefinitions

Runtime Human Task Contract Definitions constant exported by the contracts/runtime-human-task-schemas module.

Declaration

text
export declare const runtimeHumanTaskContractDefinitions: readonly [SpecSchemaDefinition<RuntimeHumanTask>, SpecSchemaDefinition<RuntimeHumanTaskDecisionCommand>];

runtimeHumanTaskContractJsonSchemas

Runtime Human Task Contract JSON Schemas constant exported by the contracts/runtime-human-task-schemas module.

Declaration

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

runtimeHumanTaskDecisionCommandDefinition

Runtime Human Task Decision Command Definition constant exported by the contracts/runtime-human-task-schemas module.

Declaration

text
export declare const runtimeHumanTaskDecisionCommandDefinition: SpecSchemaDefinition<RuntimeHumanTaskDecisionCommand>;

runtimeHumanTaskDecisionCommandExample

Valid example value for Runtime Human Task Decision Command.

Declaration

text
export declare const runtimeHumanTaskDecisionCommandExample: RuntimeHumanTaskDecisionCommand;

runtimeHumanTaskDecisionCommandJsonSchema

JSON Schema for Runtime Human Task Decision Command.

Declaration

text
export declare const runtimeHumanTaskDecisionCommandJsonSchema: JsonSchema;

runtimeHumanTaskDecisionCommandSchema

Runtime schema for Runtime Human Task Decision Command.

Declaration

text
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const runtimeHumanTaskDecisionCommandSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeHumanTaskDecisionCommandSchema'];

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.

runtimeHumanTaskDefinition

Runtime Human Task Definition constant exported by the contracts/runtime-human-task-schemas module.

Declaration

text
export declare const runtimeHumanTaskDefinition: SpecSchemaDefinition<RuntimeHumanTask>;

runtimeHumanTaskExample

Valid example value for Runtime Human Task.

Declaration

text
export declare const runtimeHumanTaskExample: RuntimeHumanTask;

runtimeHumanTaskJsonSchema

JSON Schema for Runtime Human Task.

Declaration

text
export declare const runtimeHumanTaskJsonSchema: JsonSchema;

runtimeHumanTaskRequestJsonSchema

JSON Schema for Runtime Human Task Request.

Declaration

text
export declare const runtimeHumanTaskRequestJsonSchema: JsonSchema;

runtimeHumanTaskRequestSchema

Runtime schema for Runtime Human Task Request.

Declaration

text
export declare const runtimeHumanTaskRequestSchema: z.ZodEffects<z.ZodObject<{ taskId: z.ZodString; kind: z.ZodEnum<["tool", "skill", "prompt", "memory", "execution", "mcp", "policy"]>; subjectRef: z.ZodString; subjectHash: z.ZodString; requestedBy: z.ZodString; allowedDecisionScopes: z.ZodArray<z.ZodString, "many">; requestedAt: z.ZodString; expiresAt: z.ZodOptional<z.ZodString>; checkpointRef: z.ZodOptional<z.ZodString>; policyRef: z.ZodOptional<z.ZodString>; providerRevision: z.ZodOptional<z.ZodString>; activityDescriptorRef: z.ZodOptional<z.ZodString>; activityDescriptorHash: z.ZodOptional<z.ZodString>; reason: z.ZodOptional<z.ZodString>; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strict", z.ZodTypeAny, { kind: "tool" | "memory" | "execution" | "policy" | "skill" | "prompt" | "mcp"; requestedAt: string; taskId: string; subjectHash: string; subjectRef: string; requestedBy: string; allowedDecisionScopes: string[]; metadata?: Record<string, unknown> | undefined; policyRef?: string | undefined; expiresAt?: string | undefined; reason?: string | undefined; activityDescriptorRef?: string | undefined; activityDescriptorHash?: string | undefined; providerRevision?: string | undefined; checkpointRef?: string | undefined; }, { kind: "tool" | "memory" | "execution" | "policy" | "skill" | "prompt" | "mcp"; requestedAt: string; taskId: string; subjectHash: string; subjectRef: string; requestedBy: string; allowedDecisionScopes: string[]; metadata?: Record<string, unknown> | undefined; policyRef?: string | undefined; expiresAt?: string | undefined; reason?: string | undefined; activityDescriptorRef?: string | undefined; activityDescriptorHash?: string | undefined; providerRevision?: string | undefined; checkpointRef?: string | undefined; }>, { kind: "tool" | "memory" | "execution" | "policy" | "skill" | "prompt" | "mcp"; requestedAt: string; taskId: string; subjectHash: string; subjectRef: string; requestedBy: string; allowedDecisionScopes: string[]; metadata?: Record<string, unknown> | undefined; policyRef?: string | undefined; expiresAt?: string | undefined; reason?: string | undefined; activityDescriptorRef?: string | undefined; activityDescriptorHash?: string | undefined; providerRevision?: string | undefined; checkpointRef?: string | undefined; }, { kind: "tool" | "memory" | "execution" | "policy" | "skill" | "prompt" | "mcp"; requestedAt: string; taskId: string; subjectHash: string; subjectRef: string; requestedBy: string; allowedDecisionScopes: string[]; metadata?: Record<string, unknown> | undefined; policyRef?: string | undefined; expiresAt?: string | undefined; reason?: string | undefined; activityDescriptorRef?: string | undefined; activityDescriptorHash?: string | undefined; providerRevision?: string | undefined; checkpointRef?: string | undefined; }>;

runtimeHumanTaskSchema

Runtime schema for Runtime Human Task.

Declaration

text
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const runtimeHumanTaskSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeHumanTaskSchema'];

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.

validateRuntimeHumanTask

Validate Runtime Human Task function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateRuntimeHumanTask(input: unknown): RuntimeHumanTask;

Call signature

text
validateRuntimeHumanTask(input: unknown): RuntimeHumanTask

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RuntimeHumanTask
  • Description: The return contract is defined by the type shown above.

validateRuntimeHumanTaskDecisionCommand

Validate Runtime Human Task Decision Command function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateRuntimeHumanTaskDecisionCommand(input: unknown): RuntimeHumanTaskDecisionCommand;

Call signature

text
validateRuntimeHumanTaskDecisionCommand(input: unknown): RuntimeHumanTaskDecisionCommand

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RuntimeHumanTaskDecisionCommand
  • Description: The return contract is defined by the type shown above.

validateRuntimeHumanTaskRequest

Validate Runtime Human Task Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateRuntimeHumanTaskRequest(input: unknown): RuntimeHumanTaskRequest;

Call signature

text
validateRuntimeHumanTaskRequest(input: unknown): RuntimeHumanTaskRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RuntimeHumanTaskRequest
  • Description: The return contract is defined by the type shown above.