Skip to content

@codesoul-co/hypha-core / schemas

Using this module

Use the Schemas module for declaring and runtime-validating contracts. It exports 52 constants, 12 functions, 1 interface.

Import from the package entrypoint

ts
import {
  auditPolicySpecSchema,
  contextSourceSpecJsonSchema,
  contextSourceSpecSchema,
  contextSpecDefinition,
  contextSpecExample,
  contextSpecJsonSchema,
  contextSpecSchema,
  coreSpecDefinitions,
} from '@codesoul-co/hypha-core';

import type {
  SpecSchemaDefinition,
} from '@codesoul-co/hypha-core';

// The complete export list is documented below.

Usage patterns

  • Use the 1 type/interface export as static contracts in application code, adapters, or tests. Import them with import type; they do not exist at runtime.
  • The module exposes 12 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
  • The 52 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 { auditPolicySpecSchema } from '@codesoul-co/hypha-core';

declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = auditPolicySpecSchema.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
auditPolicySpecSchemaconstantconst auditPolicySpecSchema: z.ZodObject<{ enabled: z.ZodBoolean; includeInput: z.ZodOptional<z.ZodBoolean>; includeOutput: z.ZodOptional<z.ZodBoolean>; redactPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { enabled: boolean; includeInput?: boolean | undefined; includeOutput?: boolean | undefined; redactPaths?: string[] | undefined; }, { enabled: boolean; includeInput?: boolean | ...Runtime schema for Audit Policy Spec.
contextSourceSpecJsonSchemaconstantconst contextSourceSpecJsonSchema: JsonSchemaJSON Schema for Context Source Spec.
contextSourceSpecSchemaconstantconst contextSourceSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { type: z.ZodEnum<["memory", "artifact", "skill", "domain", "mcp", "user_input", ...Runtime schema for Context Source Spec.
contextSpecDefinitionconstantconst contextSpecDefinition: SpecSchemaDefinition<ContextSpec>Runtime validation entrypoint for the Context spec, combining its parser, example and JSON Schema.
contextSpecExampleconstantconst contextSpecExample: ContextSpecValid example value for Context Spec.
contextSpecJsonSchemaconstantconst contextSpecJsonSchema: JsonSchemaJSON Schema for Context Spec.
contextSpecSchemaconstantconst contextSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { sources: z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: ...Runtime schema for Context Spec.
coreSpecDefinitionsconstantconst coreSpecDefinitions: readonly [SpecSchemaDefinition<PolicySpec>, SpecSchemaDefinition<OutputContractSpec>, SpecSchemaDefinition<ContextSpec>, SpecSchemaDefinition<TraceSpec>, SpecSchemaDefinition<EvaluationSpec>, SpecSchemaDefinition<ReplaySpec>, SpecSchemaDefinition<RegressionSpec>, SpecSchemaDefinition<DeploymentSpec>, SpecSchemaDefinition<HarnessedAgentSystemSpec>]Core Spec Definitions constant exported by the schemas module.
coreSpecJsonSchemasconstantconst coreSpecJsonSchemas: Record<string, JsonSchema>Core Spec JSON Schemas constant exported by the schemas module.
deploymentSpecDefinitionconstantconst deploymentSpecDefinition: SpecSchemaDefinition<DeploymentSpec>Runtime validation entrypoint for the Deployment spec, combining its parser, example and JSON Schema.
deploymentSpecExampleconstantconst deploymentSpecExample: DeploymentSpecValid example value for Deployment Spec.
deploymentSpecJsonSchemaconstantconst deploymentSpecJsonSchema: JsonSchemaJSON Schema for Deployment Spec.
deploymentSpecSchemaconstantconst deploymentSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { mode: z.ZodEnum<["local", "self_hosted", "managed"]>; runtimeMode: z.ZodOptional<z...Runtime schema for Deployment Spec.
evaluationSpecDefinitionconstantconst evaluationSpecDefinition: SpecSchemaDefinition<EvaluationSpec>Runtime validation entrypoint for the Evaluation spec, combining its parser, example and JSON Schema.
evaluationSpecExampleconstantconst evaluationSpecExample: EvaluationSpecValid example value for Evaluation Spec.
evaluationSpecJsonSchemaconstantconst evaluationSpecJsonSchema: { allOf: { if: { properties: { type: { const: string; }; }; }; then: { required: string[]; }; }[]; type?: string; properties?: Record<string, JsonSchema>; required?: string[]; items?: JsonSchema; enum?: unknown[]; additionalProperties?: boolean | JsonSchema; }JSON Schema for Evaluation Spec.
evaluationSpecSchemaconstantconst evaluationSpecSchema: z.ZodEffects<z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { type: z.ZodEnum<["schema", "output_contract", "tool_trace", "policy",...Runtime schema for Evaluation Spec.
harnessedAgentSystemSpecDefinitionconstantconst harnessedAgentSystemSpecDefinition: SpecSchemaDefinition<HarnessedAgentSystemSpec>Runtime validation entrypoint for the Harnessed Agent System spec, combining its parser, example and JSON Schema.
harnessedAgentSystemSpecExampleconstantconst harnessedAgentSystemSpecExample: HarnessedAgentSystemSpecValid example value for Harnessed Agent System Spec.
harnessedAgentSystemSpecJsonSchemaconstantconst harnessedAgentSystemSpecJsonSchema: JsonSchemaJSON Schema for Harnessed Agent System Spec.
harnessedAgentSystemSpecSchemaconstantconst harnessedAgentSystemSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { agentRef: z.ZodObject<{ id: z.ZodString; version: z.ZodOptional<z.ZodStr...Runtime schema for Harnessed Agent System Spec.
humanReviewPolicySpecSchemaconstantconst humanReviewPolicySpecSchema: z.ZodObject<{ required: z.ZodBoolean; reason: z.ZodOptional<z.ZodString>; approverRole: z.ZodOptional<z.ZodString>; timeoutPolicy: z.ZodOptional<z.ZodObject<{ timeoutMs: z.ZodNumber; onTimeout: z.ZodOptional<z.ZodEnum<["fail", "retry", "human_review"]>>; }, "strip", z.ZodTypeAny, { timeoutMs: number; onTimeout?: "fail" | "retry" | "human_review" | undefined; }, { timeoutMs: numbe...Runtime schema for Human Review Policy Spec.
jsonSchemaSchemaconstantconst jsonSchemaSchema: z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>Runtime schema for JSON schema.
outputContractSpecDefinitionconstantconst outputContractSpecDefinition: SpecSchemaDefinition<OutputContractSpec>Runtime validation entrypoint for the Output Contract spec, combining its parser, example and JSON Schema.
outputContractSpecExampleconstantconst outputContractSpecExample: OutputContractSpecValid example value for Output Contract Spec.
outputContractSpecJsonSchemaconstantconst outputContractSpecJsonSchema: JsonSchemaJSON Schema for Output Contract Spec.
outputContractSpecSchemaconstantconst outputContractSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { schema: z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>; }, "strip", z.ZodType...Runtime schema for Output Contract Spec.
policyRuleSpecJsonSchemaconstantconst policyRuleSpecJsonSchema: JsonSchemaJSON Schema for Policy Rule Spec.
policyRuleSpecSchemaconstantconst policyRuleSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { effect: z.ZodEnum<["allow", "deny", "require_human_review"]>; expression: z.ZodOpt...Runtime schema for Policy Rule Spec.
policySpecDefinitionconstantconst policySpecDefinition: SpecSchemaDefinition<PolicySpec>Runtime validation entrypoint for the Policy spec, combining its parser, example and JSON Schema.
policySpecExampleconstantconst policySpecExample: PolicySpecValid example value for Policy Spec.
policySpecJsonSchemaconstantconst policySpecJsonSchema: JsonSchemaJSON Schema for Policy Spec.
policySpecSchemaconstantconst policySpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { rules: z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.Z...Runtime schema for Policy Spec.
regressionSpecDefinitionconstantconst regressionSpecDefinition: SpecSchemaDefinition<RegressionSpec>Runtime validation entrypoint for the Regression spec, combining its parser, example and JSON Schema.
regressionSpecExampleconstantconst regressionSpecExample: RegressionSpecValid example value for Regression Spec.
regressionSpecJsonSchemaconstantconst regressionSpecJsonSchema: JsonSchemaJSON Schema for Regression Spec.
regressionSpecSchemaconstantconst regressionSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { fixtureRefs: z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodOptional<z.Zo...Runtime schema for Regression Spec.
replaySpecDefinitionconstantconst replaySpecDefinition: SpecSchemaDefinition<ReplaySpec>Runtime validation entrypoint for the Replay spec, combining its parser, example and JSON Schema.
replaySpecExampleconstantconst replaySpecExample: ReplaySpecValid example value for Replay Spec.
replaySpecJsonSchemaconstantconst replaySpecJsonSchema: JsonSchemaJSON Schema for Replay Spec.
replaySpecSchemaconstantconst replaySpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { captureModelIO: z.ZodOptional<z.ZodBoolean>; captureToolIO: z.ZodOptional<z.ZodBoolean...Runtime schema for Replay Spec.
retryPolicySpecSchemaconstantconst retryPolicySpecSchema: z.ZodObject<{ maxAttempts: z.ZodNumber; backoffMs: z.ZodOptional<z.ZodNumber>; maxBackoffMs: z.ZodOptional<z.ZodNumber>; jitterRatio: z.ZodOptional<z.ZodNumber>; maxElapsedMs: z.ZodOptional<z.ZodNumber>; retryableCodes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { maxAttempts: number; backoffMs?: number | undefined; maxBackoffMs?: number | undefined; jitt...Runtime schema for Retry Policy Spec.
riskLevelSchemaconstantconst riskLevelSchema: z.ZodEnum<["low", "medium", "high", "critical"]>Runtime schema for Risk Level.
sideEffectLevelSchemaconstantconst sideEffectLevelSchema: z.ZodEnum<["none", "read", "write", "external_effect", "irreversible"]>Runtime schema for Side Effect Level.
specMetadataSchemaconstantconst specMetadataSchema: z.ZodObject<{ name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: strin...Runtime schema for Spec Metadata.
specRefSchemaconstantconst specRefSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodOptional<z.ZodString>; revision: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; revision?: string | undefined; version?: string | undefined; }, { id: string; revision?: string | undefined; version?: string | undefined; }>Runtime schema for Spec Ref.
timeoutPolicySpecSchemaconstantconst timeoutPolicySpecSchema: z.ZodObject<{ timeoutMs: z.ZodNumber; onTimeout: z.ZodOptional<z.ZodEnum<["fail", "retry", "human_review"]>>; }, "strip", z.ZodTypeAny, { timeoutMs: number; onTimeout?: "fail" | "retry" | "human_review" | undefined; }, { timeoutMs: number; onTimeout?: "fail" | "retry" | "human_review" | undefined; }>Runtime schema for Timeout Policy Spec.
traceSpecDefinitionconstantconst traceSpecDefinition: SpecSchemaDefinition<TraceSpec>Runtime validation entrypoint for the Trace spec, combining its parser, example and JSON Schema.
traceSpecExampleconstantconst traceSpecExample: TraceSpecValid example value for Trace Spec.
traceSpecJsonSchemaconstantconst traceSpecJsonSchema: JsonSchemaJSON Schema for Trace Spec.
traceSpecSchemaconstantconst traceSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { eventTypes: z.ZodArray<z.ZodString, "many">; retentionPolicy: z.ZodOptional<z.ZodString...Runtime schema for Trace Spec.
versionedSpecSchemaconstantconst versionedSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version: string; }>Runtime schema for Versioned Spec.
assertSpecSchemaDefinitionfunctionassertSpecSchemaDefinition(definition: SpecSchemaDefinition<unknown>): voidAssert Spec Schema Definition function with 1 public call signature; parameters and return types are listed below.
defineSpecSchemafunctiondefineSpecSchema<TSpec>(definition: { id: string; zod: ZodType<TSpec>; jsonSchema: JsonSchema; example: TSpec; }): SpecSchemaDefinition<TSpec>Runtime schema for Define Spec.
exportSpecJsonSchemasfunctionexportSpecJsonSchemas(definitions: readonly SpecSchemaDefinition<unknown>[]): Record<string, JsonSchema>Export Spec JSON Schemas function with 1 public call signature; parameters and return types are listed below.
validateContextSpecfunctionvalidateContextSpec(input: unknown): ContextSpecValidate Context Spec function with 1 public call signature; parameters and return types are listed below.
validateDeploymentSpecfunctionvalidateDeploymentSpec(input: unknown): DeploymentSpecValidate Deployment Spec function with 1 public call signature; parameters and return types are listed below.
validateEvaluationSpecfunctionvalidateEvaluationSpec(input: unknown): EvaluationSpecValidate Evaluation Spec function with 1 public call signature; parameters and return types are listed below.
validateHarnessedAgentSystemSpecfunctionvalidateHarnessedAgentSystemSpec(input: unknown): HarnessedAgentSystemSpecValidate Harnessed Agent System Spec function with 1 public call signature; parameters and return types are listed below.
validateOutputContractSpecfunctionvalidateOutputContractSpec(input: unknown): OutputContractSpecValidate Output Contract Spec function with 1 public call signature; parameters and return types are listed below.
validatePolicySpecfunctionvalidatePolicySpec(input: unknown): PolicySpecValidate Policy Spec function with 1 public call signature; parameters and return types are listed below.
validateRegressionSpecfunctionvalidateRegressionSpec(input: unknown): RegressionSpecValidate Regression Spec function with 1 public call signature; parameters and return types are listed below.
validateReplaySpecfunctionvalidateReplaySpec(input: unknown): ReplaySpecValidate Replay Spec function with 1 public call signature; parameters and return types are listed below.
validateTraceSpecfunctionvalidateTraceSpec(input: unknown): TraceSpecValidate Trace Spec function with 1 public call signature; parameters and return types are listed below.
SpecSchemaDefinitioninterfaceinterface SpecSchemaDefinitionSpec Schema Definition interface with 5 public fields or methods.

auditPolicySpecSchema

Runtime schema for Audit Policy Spec.

  • Kind: constant
  • Import: import { auditPolicySpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const auditPolicySpecSchema: z.ZodObject<{ enabled: z.ZodBoolean; includeInput: z.ZodOptional<z.ZodBoolean>; includeOutput: z.ZodOptional<z.ZodBoolean>; redactPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { enabled: boolean; includeInput?: boolean | undefined; includeOutput?: boolean | undefined; redactPaths?: string[] | undefined; }, { enabled: boolean; includeInput?: boolean | undefined; includeOutput?: boolean | undefined; redactPaths?: string[] | undefined; }>;

contextSourceSpecJsonSchema

JSON Schema for Context Source Spec.

  • Kind: constant
  • Import: import { contextSourceSpecJsonSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const contextSourceSpecJsonSchema: JsonSchema;

contextSourceSpecSchema

Runtime schema for Context Source Spec.

  • Kind: constant
  • Import: import { contextSourceSpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const contextSourceSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { type: z.ZodEnum<["memory", "artifact", "skill", "domain", "mcp", "user_input", "system"]>; provenanceRequired: z.ZodOptional<z.ZodBoolean>; trustLevel: z.ZodOptional<z.ZodEnum<["trusted", "reviewed", "untrusted"]>>; }, "strip", z.ZodTypeAny, { id: string; type: "system" | "memory" | "artifact" | "skill" | "mcp" | "user_input" | "domain"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; provenanceRequired?: boolean | undefined; trustLevel?: "trusted" | "reviewed" | "untrusted" | undefined; }, { id: string; type: "system" | "memory" | "artifact" | "skill" | "mcp" | "user_input" | "domain"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; provenanceRequired?: boolean | undefined; trustLevel?: "trusted" | "reviewed" | "untrusted" | undefined; }>;

contextSpecDefinition

Runtime validation entrypoint for the Context spec, combining its parser, example and JSON Schema.

  • Kind: constant
  • Import: import { contextSpecDefinition } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const contextSpecDefinition: SpecSchemaDefinition<ContextSpec>;

contextSpecExample

Valid example value for Context Spec.

  • Kind: constant
  • Import: import { contextSpecExample } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const contextSpecExample: ContextSpec;

contextSpecJsonSchema

JSON Schema for Context Spec.

  • Kind: constant
  • Import: import { contextSpecJsonSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const contextSpecJsonSchema: JsonSchema;

contextSpecSchema

Runtime schema for Context Spec.

  • Kind: constant
  • Import: import { contextSpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const contextSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { sources: z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { type: z.ZodEnum<["memory", "artifact", "skill", "domain", "mcp", "user_input", "system"]>; provenanceRequired: z.ZodOptional<z.ZodBoolean>; trustLevel: z.ZodOptional<z.ZodEnum<["trusted", "reviewed", "untrusted"]>>; }, "strip", z.ZodTypeAny, { id: string; type: "system" | "memory" | "artifact" | "skill" | "mcp" | "user_input" | "domain"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; provenanceRequired?: boolean | undefined; trustLevel?: "trusted" | "reviewed" | "untrusted" | undefined; }, { id: string; type: "system" | "memory" | "artifact" | "skill" | "mcp" | "user_input" | "domain"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; provenanceRequired?: boolean | undefined; trustLevel?: "trusted" | "reviewed" | "untrusted" | undefined; }>, "many">; tokenBudget: z.ZodOptional<z.ZodNumber>; provenancePolicy: z.ZodOptional<z.ZodEnum<["required", "best_effort", "none"]>>; instructionBoundaryPolicy: z.ZodOptional<z.ZodEnum<["strict", "tagged", "none"]>>; }, "strip", z.ZodTypeAny, { id: string; version: string; sources: { id: string; type: "system" | "memory" | "artifact" | "skill" | "mcp" | "user_input" | "domain"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; provenanceRequired?: boolean | undefined; trustLevel?: "trusted" | "reviewed" | "untrusted" | undefined; }[]; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; tokenBudget?: number | undefined; provenancePolicy?: "required" | "none" | "best_effort" | undefined; instructionBoundaryPolicy?: "strict" | "none" | "tagged" | undefined; }, { id: string; version: string; sources: { id: string; type: "system" | "memory" | "artifact" | "skill" | "mcp" | "user_input" | "domain"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; provenanceRequired?: boolean | undefined; trustLevel?: "trusted" | "reviewed" | "untrusted" | undefined; }[]; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; tokenBudget?: number | undefined; provenancePolicy?: "required" | "none" | "best_effort" | undefined; instructionBoundaryPolicy?: "strict" | "none" | "tagged" | undefined; }>;

coreSpecDefinitions

Core Spec Definitions constant exported by the schemas module.

  • Kind: constant
  • Import: import { coreSpecDefinitions } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const coreSpecDefinitions: readonly [SpecSchemaDefinition<PolicySpec>, SpecSchemaDefinition<OutputContractSpec>, SpecSchemaDefinition<ContextSpec>, SpecSchemaDefinition<TraceSpec>, SpecSchemaDefinition<EvaluationSpec>, SpecSchemaDefinition<ReplaySpec>, SpecSchemaDefinition<RegressionSpec>, SpecSchemaDefinition<DeploymentSpec>, SpecSchemaDefinition<HarnessedAgentSystemSpec>];

coreSpecJsonSchemas

Core Spec JSON Schemas constant exported by the schemas module.

  • Kind: constant
  • Import: import { coreSpecJsonSchemas } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

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

deploymentSpecDefinition

Runtime validation entrypoint for the Deployment spec, combining its parser, example and JSON Schema.

  • Kind: constant
  • Import: import { deploymentSpecDefinition } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const deploymentSpecDefinition: SpecSchemaDefinition<DeploymentSpec>;

deploymentSpecExample

Valid example value for Deployment Spec.

  • Kind: constant
  • Import: import { deploymentSpecExample } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const deploymentSpecExample: DeploymentSpec;

deploymentSpecJsonSchema

JSON Schema for Deployment Spec.

  • Kind: constant
  • Import: import { deploymentSpecJsonSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const deploymentSpecJsonSchema: JsonSchema;

deploymentSpecSchema

Runtime schema for Deployment Spec.

  • Kind: constant
  • Import: import { deploymentSpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const deploymentSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { mode: z.ZodEnum<["local", "self_hosted", "managed"]>; runtimeMode: z.ZodOptional<z.ZodEnum<["single-user", "multi-user"]>>; configRefs: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodOptional<z.ZodString>; revision: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; revision?: string | undefined; version?: string | undefined; }, { id: string; revision?: string | undefined; version?: string | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { id: string; version: string; mode: "managed" | "local" | "self_hosted"; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; runtimeMode?: "single-user" | "multi-user" | undefined; configRefs?: { id: string; revision?: string | undefined; version?: string | undefined; }[] | undefined; }, { id: string; version: string; mode: "managed" | "local" | "self_hosted"; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; runtimeMode?: "single-user" | "multi-user" | undefined; configRefs?: { id: string; revision?: string | undefined; version?: string | undefined; }[] | undefined; }>;

evaluationSpecDefinition

Runtime validation entrypoint for the Evaluation spec, combining its parser, example and JSON Schema.

  • Kind: constant
  • Import: import { evaluationSpecDefinition } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const evaluationSpecDefinition: SpecSchemaDefinition<EvaluationSpec>;

evaluationSpecExample

Valid example value for Evaluation Spec.

  • Kind: constant
  • Import: import { evaluationSpecExample } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const evaluationSpecExample: EvaluationSpec;

evaluationSpecJsonSchema

JSON Schema for Evaluation Spec.

  • Kind: constant
  • Import: import { evaluationSpecJsonSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const evaluationSpecJsonSchema: { allOf: { if: { properties: { type: { const: string; }; }; }; then: { required: string[]; }; }[]; type?: string; properties?: Record<string, JsonSchema>; required?: string[]; items?: JsonSchema; enum?: unknown[]; additionalProperties?: boolean | JsonSchema; };

evaluationSpecSchema

Runtime schema for Evaluation Spec.

  • Kind: constant
  • Import: import { evaluationSpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const evaluationSpecSchema: z.ZodEffects<z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { type: z.ZodEnum<["schema", "output_contract", "tool_trace", "policy", "process", "cost", "latency", "regression", "human"]>; rubric: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>; deterministic: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { id: string; type: "schema" | "human" | "policy" | "process" | "output_contract" | "tool_trace" | "cost" | "latency" | "regression"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; deterministic?: boolean | undefined; owner?: string | undefined; rubric?: JsonSchema | undefined; }, { id: string; type: "schema" | "human" | "policy" | "process" | "output_contract" | "tool_trace" | "cost" | "latency" | "regression"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; deterministic?: boolean | undefined; owner?: string | undefined; rubric?: JsonSchema | undefined; }>, { id: string; type: "schema" | "human" | "policy" | "process" | "output_contract" | "tool_trace" | "cost" | "latency" | "regression"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; deterministic?: boolean | undefined; owner?: string | undefined; rubric?: JsonSchema | undefined; }, { id: string; type: "schema" | "human" | "policy" | "process" | "output_contract" | "tool_trace" | "cost" | "latency" | "regression"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; deterministic?: boolean | undefined; owner?: string | undefined; rubric?: JsonSchema | undefined; }>;

harnessedAgentSystemSpecDefinition

Runtime validation entrypoint for the Harnessed Agent System spec, combining its parser, example and JSON Schema.

  • Kind: constant
  • Import: import { harnessedAgentSystemSpecDefinition } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const harnessedAgentSystemSpecDefinition: SpecSchemaDefinition<HarnessedAgentSystemSpec>;

harnessedAgentSystemSpecExample

Valid example value for Harnessed Agent System Spec.

  • Kind: constant
  • Import: import { harnessedAgentSystemSpecExample } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const harnessedAgentSystemSpecExample: HarnessedAgentSystemSpec;

harnessedAgentSystemSpecJsonSchema

JSON Schema for Harnessed Agent System Spec.

  • Kind: constant
  • Import: import { harnessedAgentSystemSpecJsonSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const harnessedAgentSystemSpecJsonSchema: JsonSchema;

harnessedAgentSystemSpecSchema

Runtime schema for Harnessed Agent System Spec.

  • Kind: constant
  • Import: import { harnessedAgentSystemSpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

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

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.

humanReviewPolicySpecSchema

Runtime schema for Human Review Policy Spec.

  • Kind: constant
  • Import: import { humanReviewPolicySpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const humanReviewPolicySpecSchema: z.ZodObject<{ required: z.ZodBoolean; reason: z.ZodOptional<z.ZodString>; approverRole: z.ZodOptional<z.ZodString>; timeoutPolicy: z.ZodOptional<z.ZodObject<{ timeoutMs: z.ZodNumber; onTimeout: z.ZodOptional<z.ZodEnum<["fail", "retry", "human_review"]>>; }, "strip", z.ZodTypeAny, { timeoutMs: number; onTimeout?: "fail" | "retry" | "human_review" | undefined; }, { timeoutMs: number; onTimeout?: "fail" | "retry" | "human_review" | undefined; }>>; }, "strip", z.ZodTypeAny, { required: boolean; reason?: string | undefined; approverRole?: string | undefined; timeoutPolicy?: { timeoutMs: number; onTimeout?: "fail" | "retry" | "human_review" | undefined; } | undefined; }, { required: boolean; reason?: string | undefined; approverRole?: string | undefined; timeoutPolicy?: { timeoutMs: number; onTimeout?: "fail" | "retry" | "human_review" | undefined; } | undefined; }>;

jsonSchemaSchema

Runtime schema for JSON schema.

  • Kind: constant
  • Import: import { jsonSchemaSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const jsonSchemaSchema: z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>;

outputContractSpecDefinition

Runtime validation entrypoint for the Output Contract spec, combining its parser, example and JSON Schema.

  • Kind: constant
  • Import: import { outputContractSpecDefinition } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const outputContractSpecDefinition: SpecSchemaDefinition<OutputContractSpec>;

outputContractSpecExample

Valid example value for Output Contract Spec.

  • Kind: constant
  • Import: import { outputContractSpecExample } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const outputContractSpecExample: OutputContractSpec;

outputContractSpecJsonSchema

JSON Schema for Output Contract Spec.

  • Kind: constant
  • Import: import { outputContractSpecJsonSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const outputContractSpecJsonSchema: JsonSchema;

outputContractSpecSchema

Runtime schema for Output Contract Spec.

  • Kind: constant
  • Import: import { outputContractSpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const outputContractSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { schema: z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>; }, "strip", z.ZodTypeAny, { id: string; schema: JsonSchema; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; }, { id: string; schema: JsonSchema; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; }>;

policyRuleSpecJsonSchema

JSON Schema for Policy Rule Spec.

  • Kind: constant
  • Import: import { policyRuleSpecJsonSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const policyRuleSpecJsonSchema: JsonSchema;

policyRuleSpecSchema

Runtime schema for Policy Rule Spec.

  • Kind: constant
  • Import: import { policyRuleSpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const policyRuleSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { effect: z.ZodEnum<["allow", "deny", "require_human_review"]>; expression: z.ZodOptional<z.ZodString>; sideEffectLevels: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "read", "write", "external_effect", "irreversible"]>, "many">>; scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { id: string; effect: "allow" | "deny" | "require_human_review"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; expression?: string | undefined; sideEffectLevels?: ("external_effect" | "irreversible" | "read" | "write" | "none")[] | undefined; scopes?: string[] | undefined; }, { id: string; effect: "allow" | "deny" | "require_human_review"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; expression?: string | undefined; sideEffectLevels?: ("external_effect" | "irreversible" | "read" | "write" | "none")[] | undefined; scopes?: string[] | undefined; }>;

policySpecDefinition

Runtime validation entrypoint for the Policy spec, combining its parser, example and JSON Schema.

  • Kind: constant
  • Import: import { policySpecDefinition } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const policySpecDefinition: SpecSchemaDefinition<PolicySpec>;

policySpecExample

Valid example value for Policy Spec.

  • Kind: constant
  • Import: import { policySpecExample } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const policySpecExample: PolicySpec;

policySpecJsonSchema

JSON Schema for Policy Spec.

  • Kind: constant
  • Import: import { policySpecJsonSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const policySpecJsonSchema: JsonSchema;

policySpecSchema

Runtime schema for Policy Spec.

  • Kind: constant
  • Import: import { policySpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const policySpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { rules: z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { effect: z.ZodEnum<["allow", "deny", "require_human_review"]>; expression: z.ZodOptional<z.ZodString>; sideEffectLevels: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "read", "write", "external_effect", "irreversible"]>, "many">>; scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { id: string; effect: "allow" | "deny" | "require_human_review"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; expression?: string | undefined; sideEffectLevels?: ("external_effect" | "irreversible" | "read" | "write" | "none")[] | undefined; scopes?: string[] | undefined; }, { id: string; effect: "allow" | "deny" | "require_human_review"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; expression?: string | undefined; sideEffectLevels?: ("external_effect" | "irreversible" | "read" | "write" | "none")[] | undefined; scopes?: string[] | undefined; }>, "many">; defaultEffect: z.ZodOptional<z.ZodEnum<["allow", "deny"]>>; }, "strip", z.ZodTypeAny, { id: string; version: string; rules: { id: string; effect: "allow" | "deny" | "require_human_review"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; expression?: string | undefined; sideEffectLevels?: ("external_effect" | "irreversible" | "read" | "write" | "none")[] | undefined; scopes?: string[] | undefined; }[]; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; defaultEffect?: "allow" | "deny" | undefined; }, { id: string; version: string; rules: { id: string; effect: "allow" | "deny" | "require_human_review"; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; expression?: string | undefined; sideEffectLevels?: ("external_effect" | "irreversible" | "read" | "write" | "none")[] | undefined; scopes?: string[] | undefined; }[]; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; defaultEffect?: "allow" | "deny" | undefined; }>;

regressionSpecDefinition

Runtime validation entrypoint for the Regression spec, combining its parser, example and JSON Schema.

  • Kind: constant
  • Import: import { regressionSpecDefinition } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const regressionSpecDefinition: SpecSchemaDefinition<RegressionSpec>;

regressionSpecExample

Valid example value for Regression Spec.

  • Kind: constant
  • Import: import { regressionSpecExample } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const regressionSpecExample: RegressionSpec;

regressionSpecJsonSchema

JSON Schema for Regression Spec.

  • Kind: constant
  • Import: import { regressionSpecJsonSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const regressionSpecJsonSchema: JsonSchema;

regressionSpecSchema

Runtime schema for Regression Spec.

  • Kind: constant
  • Import: import { regressionSpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const regressionSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { fixtureRefs: z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodOptional<z.ZodString>; revision: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; revision?: string | undefined; version?: string | undefined; }, { id: string; revision?: string | undefined; version?: string | undefined; }>, "many">; requiredChecks: z.ZodArray<z.ZodEnum<["event_types", "state_path", "tool_calls", "policy_decisions", "output_contract"]>, "many">; }, "strip", z.ZodTypeAny, { id: string; version: string; fixtureRefs: { id: string; revision?: string | undefined; version?: string | undefined; }[]; requiredChecks: ("output_contract" | "state_path" | "event_types" | "tool_calls" | "policy_decisions")[]; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; }, { id: string; version: string; fixtureRefs: { id: string; revision?: string | undefined; version?: string | undefined; }[]; requiredChecks: ("output_contract" | "state_path" | "event_types" | "tool_calls" | "policy_decisions")[]; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; }>;

replaySpecDefinition

Runtime validation entrypoint for the Replay spec, combining its parser, example and JSON Schema.

  • Kind: constant
  • Import: import { replaySpecDefinition } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const replaySpecDefinition: SpecSchemaDefinition<ReplaySpec>;

replaySpecExample

Valid example value for Replay Spec.

  • Kind: constant
  • Import: import { replaySpecExample } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const replaySpecExample: ReplaySpec;

replaySpecJsonSchema

JSON Schema for Replay Spec.

  • Kind: constant
  • Import: import { replaySpecJsonSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const replaySpecJsonSchema: JsonSchema;

replaySpecSchema

Runtime schema for Replay Spec.

  • Kind: constant
  • Import: import { replaySpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const replaySpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { captureModelIO: z.ZodOptional<z.ZodBoolean>; captureToolIO: z.ZodOptional<z.ZodBoolean>; captureMemoryReadSet: z.ZodOptional<z.ZodBoolean>; capturePolicyDecisions: z.ZodOptional<z.ZodBoolean>; snapshotPolicy: z.ZodOptional<z.ZodEnum<["none", "state_path", "full"]>>; }, "strip", z.ZodTypeAny, { id: string; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; captureModelIO?: boolean | undefined; captureToolIO?: boolean | undefined; captureMemoryReadSet?: boolean | undefined; capturePolicyDecisions?: boolean | undefined; snapshotPolicy?: "none" | "full" | "state_path" | undefined; }, { id: string; version: string; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; captureModelIO?: boolean | undefined; captureToolIO?: boolean | undefined; captureMemoryReadSet?: boolean | undefined; capturePolicyDecisions?: boolean | undefined; snapshotPolicy?: "none" | "full" | "state_path" | undefined; }>;

retryPolicySpecSchema

Runtime schema for Retry Policy Spec.

  • Kind: constant
  • Import: import { retryPolicySpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const retryPolicySpecSchema: z.ZodObject<{ maxAttempts: z.ZodNumber; backoffMs: z.ZodOptional<z.ZodNumber>; maxBackoffMs: z.ZodOptional<z.ZodNumber>; jitterRatio: z.ZodOptional<z.ZodNumber>; maxElapsedMs: z.ZodOptional<z.ZodNumber>; retryableCodes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { maxAttempts: number; backoffMs?: number | undefined; maxBackoffMs?: number | undefined; jitterRatio?: number | undefined; maxElapsedMs?: number | undefined; retryableCodes?: string[] | undefined; }, { maxAttempts: number; backoffMs?: number | undefined; maxBackoffMs?: number | undefined; jitterRatio?: number | undefined; maxElapsedMs?: number | undefined; retryableCodes?: string[] | undefined; }>;

riskLevelSchema

Runtime schema for Risk Level.

  • Kind: constant
  • Import: import { riskLevelSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const riskLevelSchema: z.ZodEnum<["low", "medium", "high", "critical"]>;

sideEffectLevelSchema

Runtime schema for Side Effect Level.

  • Kind: constant
  • Import: import { sideEffectLevelSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const sideEffectLevelSchema: z.ZodEnum<["none", "read", "write", "external_effect", "irreversible"]>;

specMetadataSchema

Runtime schema for Spec Metadata.

  • Kind: constant
  • Import: import { specMetadataSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const specMetadataSchema: z.ZodObject<{ name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; }, { name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; }>;

specRefSchema

Runtime schema for Spec Ref.

  • Kind: constant
  • Import: import { specRefSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const specRefSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodOptional<z.ZodString>; revision: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; revision?: string | undefined; version?: string | undefined; }, { id: string; revision?: string | undefined; version?: string | undefined; }>;

timeoutPolicySpecSchema

Runtime schema for Timeout Policy Spec.

  • Kind: constant
  • Import: import { timeoutPolicySpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const timeoutPolicySpecSchema: z.ZodObject<{ timeoutMs: z.ZodNumber; onTimeout: z.ZodOptional<z.ZodEnum<["fail", "retry", "human_review"]>>; }, "strip", z.ZodTypeAny, { timeoutMs: number; onTimeout?: "fail" | "retry" | "human_review" | undefined; }, { timeoutMs: number; onTimeout?: "fail" | "retry" | "human_review" | undefined; }>;

traceSpecDefinition

Runtime validation entrypoint for the Trace spec, combining its parser, example and JSON Schema.

  • Kind: constant
  • Import: import { traceSpecDefinition } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const traceSpecDefinition: SpecSchemaDefinition<TraceSpec>;

traceSpecExample

Valid example value for Trace Spec.

  • Kind: constant
  • Import: import { traceSpecExample } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const traceSpecExample: TraceSpec;

traceSpecJsonSchema

JSON Schema for Trace Spec.

  • Kind: constant
  • Import: import { traceSpecJsonSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const traceSpecJsonSchema: JsonSchema;

traceSpecSchema

Runtime schema for Trace Spec.

  • Kind: constant
  • Import: import { traceSpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const traceSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { eventTypes: z.ZodArray<z.ZodString, "many">; retentionPolicy: z.ZodOptional<z.ZodString>; redactionPolicy: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; version: string; eventTypes: string[]; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; retentionPolicy?: string | undefined; redactionPolicy?: string | undefined; }, { id: string; version: string; eventTypes: string[]; name?: string | undefined; description?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; owner?: string | undefined; retentionPolicy?: string | undefined; redactionPolicy?: string | undefined; }>;

versionedSpecSchema

Runtime schema for Versioned Spec.

  • Kind: constant
  • Import: import { versionedSpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare const versionedSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; version: string; }, { id: string; version: string; }>;

assertSpecSchemaDefinition

Assert Spec Schema Definition function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { assertSpecSchemaDefinition } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare function assertSpecSchemaDefinition(definition: SpecSchemaDefinition<unknown>): void;

Call signature

text
assertSpecSchemaDefinition(definition: SpecSchemaDefinition<unknown>): void

Parameters

ParameterTypeRequiredDescription
definitionSpecSchemaDefinition<unknown>YesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: void
  • Description: Returns no value.

defineSpecSchema

Runtime schema for Define Spec.

  • Kind: function
  • Import: import { defineSpecSchema } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare function defineSpecSchema<TSpec>(definition: {
    id: string;
    zod: ZodType<TSpec>;
    jsonSchema: JsonSchema;
    example: TSpec;
}): SpecSchemaDefinition<TSpec>;

Call signature

text
defineSpecSchema<TSpec>(definition: { id: string; zod: ZodType<TSpec>; jsonSchema: JsonSchema; example: TSpec; }): SpecSchemaDefinition<TSpec>

Parameters

ParameterTypeRequiredDescription
definition{ id: string; zod: ZodType<TSpec>; jsonSchema: JsonSchema; example: TSpec; }YesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: SpecSchemaDefinition<TSpec>
  • Description: The return contract is defined by the type shown above.

exportSpecJsonSchemas

Export Spec JSON Schemas function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { exportSpecJsonSchemas } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare function exportSpecJsonSchemas(definitions: readonly SpecSchemaDefinition<unknown>[]): Record<string, JsonSchema>;

Call signature

text
exportSpecJsonSchemas(definitions: readonly SpecSchemaDefinition<unknown>[]): Record<string, JsonSchema>

Parameters

ParameterTypeRequiredDescription
definitionsreadonly SpecSchemaDefinition<unknown>[]YesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: Record<string, JsonSchema>
  • Description: The return contract is defined by the type shown above.

validateContextSpec

Validate Context Spec function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { validateContextSpec } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare function validateContextSpec(input: unknown): ContextSpec;

Call signature

text
validateContextSpec(input: unknown): ContextSpec

Parameters

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

Returns

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

validateDeploymentSpec

Validate Deployment Spec function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { validateDeploymentSpec } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare function validateDeploymentSpec(input: unknown): DeploymentSpec;

Call signature

text
validateDeploymentSpec(input: unknown): DeploymentSpec

Parameters

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

Returns

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

validateEvaluationSpec

Validate Evaluation Spec function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { validateEvaluationSpec } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare function validateEvaluationSpec(input: unknown): EvaluationSpec;

Call signature

text
validateEvaluationSpec(input: unknown): EvaluationSpec

Parameters

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

Returns

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

validateHarnessedAgentSystemSpec

Validate Harnessed Agent System Spec function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { validateHarnessedAgentSystemSpec } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare function validateHarnessedAgentSystemSpec(input: unknown): HarnessedAgentSystemSpec;

Call signature

text
validateHarnessedAgentSystemSpec(input: unknown): HarnessedAgentSystemSpec

Parameters

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

Returns

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

validateOutputContractSpec

Validate Output Contract Spec function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { validateOutputContractSpec } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare function validateOutputContractSpec(input: unknown): OutputContractSpec;

Call signature

text
validateOutputContractSpec(input: unknown): OutputContractSpec

Parameters

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

Returns

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

validatePolicySpec

Validate Policy Spec function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { validatePolicySpec } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare function validatePolicySpec(input: unknown): PolicySpec;

Call signature

text
validatePolicySpec(input: unknown): PolicySpec

Parameters

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

Returns

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

validateRegressionSpec

Validate Regression Spec function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { validateRegressionSpec } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare function validateRegressionSpec(input: unknown): RegressionSpec;

Call signature

text
validateRegressionSpec(input: unknown): RegressionSpec

Parameters

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

Returns

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

validateReplaySpec

Validate Replay Spec function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { validateReplaySpec } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare function validateReplaySpec(input: unknown): ReplaySpec;

Call signature

text
validateReplaySpec(input: unknown): ReplaySpec

Parameters

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

Returns

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

validateTraceSpec

Validate Trace Spec function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { validateTraceSpec } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export declare function validateTraceSpec(input: unknown): TraceSpec;

Call signature

text
validateTraceSpec(input: unknown): TraceSpec

Parameters

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

Returns

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

SpecSchemaDefinition

Spec Schema Definition interface with 5 public fields or methods.

  • Kind: interface
  • Import: import type { SpecSchemaDefinition } from '@codesoul-co/hypha-core';
  • Source module: schemas

Declaration

text
export interface SpecSchemaDefinition<TSpec> {
    id: string;
    zod: ZodType<TSpec>;
    jsonSchema: JsonSchema;
    example: TSpec;
    parse(input: unknown): TSpec;
}

Contract members

MemberKindSignatureDescription
examplepropertyexample: TSpecPublic property; its type, readonly modifier and optionality are shown in the signature.
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
jsonSchemapropertyjsonSchema: JsonSchemaPublic property; its type, readonly modifier and optionality are shown in the signature.
parsemethodparse(input: unknown): TSpecPublic method; parameters and return type are shown in the signature.
zodpropertyzod: z.ZodType<TSpec, z.ZodTypeDef, TSpec>Public property; its type, readonly modifier and optionality are shown in the signature.