@codesoul-co/hypha-core / specs
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/specs.ts - Exports: 28
Using this module
Use the Specs module for declaring and runtime-validating contracts. It exports 2 constants, 2 functions, 22 interfaces, 2 types.
Import from the package entrypoint
import {
allowAllPolicyEngine,
denyExternalEffectsPolicyEngine,
assertVersionedSpec,
createPolicySpecEngine,
} from '@codesoul-co/hypha-core';
import type {
AuditPolicySpec,
ContextSourceSpec,
ContextSpec,
DeploymentSpec,
EvaluationSpec,
HarnessedAgentSystemSpec,
HumanReviewPolicySpec,
JsonSchema,
} from '@codesoul-co/hypha-core';
// The complete export list is documented below.Usage patterns
- Use the 24 type/interface exports as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime. - The module exposes 2 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
- The 2 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
allowAllPolicyEngine | constant | const allowAllPolicyEngine: PolicyEngine | Allow All Policy Engine constant exported by the specs module. |
denyExternalEffectsPolicyEngine | constant | const denyExternalEffectsPolicyEngine: PolicyEngine | Deny External Effects Policy Engine constant exported by the specs module. |
assertVersionedSpec | function | assertVersionedSpec(spec: VersionedSpec, label?: string): void | Assert Versioned Spec function with 1 public call signature; parameters and return types are listed below. |
createPolicySpecEngine | function | createPolicySpecEngine(policy: PolicySpec): PolicyEngine | Create Policy Spec Engine function with 1 public call signature; parameters and return types are listed below. |
AuditPolicySpec | interface | interface AuditPolicySpec | Audit Policy Spec interface with 4 public fields or methods. |
ContextSourceSpec | interface | interface ContextSourceSpec extends VersionedSpec, SpecMetadata | Context Source Spec interface with 11 public fields or methods. |
ContextSpec | interface | interface ContextSpec extends VersionedSpec, SpecMetadata | Context Spec interface with 12 public fields or methods. |
DeploymentSpec | interface | interface DeploymentSpec extends VersionedSpec, SpecMetadata | Deployment Spec interface with 11 public fields or methods. |
EvaluationSpec | interface | interface EvaluationSpec extends VersionedSpec, SpecMetadata | Evaluation Spec interface with 11 public fields or methods. |
HarnessedAgentSystemSpec | interface | interface HarnessedAgentSystemSpec extends VersionedSpec, SpecMetadata | Harnessed Agent System Spec interface with 25 public fields or methods. |
HumanReviewPolicySpec | interface | interface HumanReviewPolicySpec | Human Review Policy Spec interface with 4 public fields or methods. |
JsonSchema | interface | interface JsonSchema | JSON Schema for . |
OutputContractSpec | interface | interface OutputContractSpec extends VersionedSpec, SpecMetadata | Output Contract Spec interface with 9 public fields or methods. |
PolicyDecision | interface | interface PolicyDecision | Policy Decision interface with 6 public fields or methods. |
PolicyEngine | interface | interface PolicyEngine | Policy Engine interface with 1 public fields or methods. |
PolicyEvaluationContext | interface | interface PolicyEvaluationContext | Policy Evaluation Context interface with 7 public fields or methods. |
PolicyRuleSpec | interface | interface PolicyRuleSpec extends VersionedSpec, SpecMetadata | Policy Rule Spec interface with 12 public fields or methods. |
PolicySpec | interface | interface PolicySpec extends VersionedSpec, SpecMetadata | Policy Spec interface with 10 public fields or methods. |
RegressionSpec | interface | interface RegressionSpec extends VersionedSpec, SpecMetadata | Regression Spec interface with 10 public fields or methods. |
ReplaySpec | interface | interface ReplaySpec extends VersionedSpec, SpecMetadata | Replay Spec interface with 13 public fields or methods. |
RetryPolicySpec | interface | interface RetryPolicySpec | Retry Policy Spec interface with 6 public fields or methods. |
SpecMetadata | interface | interface SpecMetadata | Spec Metadata interface with 6 public fields or methods. |
SpecRef | interface | interface SpecRef | Spec Ref interface with 3 public fields or methods. |
TimeoutPolicySpec | interface | interface TimeoutPolicySpec | Timeout Policy Spec interface with 2 public fields or methods. |
TraceSpec | interface | interface TraceSpec extends VersionedSpec, SpecMetadata | Trace Spec interface with 11 public fields or methods. |
VersionedSpec | interface | interface VersionedSpec | Versioned Spec interface with 2 public fields or methods. |
RiskLevel | type | type RiskLevel = 'low' | 'medium' | 'high' | 'critical' | Public type alias for Risk Level; the declaration contains its complete type expression. |
SideEffectLevel | type | type SideEffectLevel = 'none' | 'read' | 'write' | 'external_effect' | 'irreversible' | Public type alias for Side Effect Level; the declaration contains its complete type expression. |
allowAllPolicyEngine
Allow All Policy Engine constant exported by the specs module.
- Kind: constant
- Import:
import { allowAllPolicyEngine } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export declare const allowAllPolicyEngine: PolicyEngine;denyExternalEffectsPolicyEngine
Deny External Effects Policy Engine constant exported by the specs module.
- Kind: constant
- Import:
import { denyExternalEffectsPolicyEngine } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export declare const denyExternalEffectsPolicyEngine: PolicyEngine;assertVersionedSpec
Assert Versioned Spec function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { assertVersionedSpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export declare function assertVersionedSpec(spec: VersionedSpec, label?: string): void;Call signature
assertVersionedSpec(spec: VersionedSpec, label?: string): voidParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
spec | VersionedSpec | Yes | Required parameter; accepted values are defined by the type column. |
label | string | No | Optional parameter; accepted values are defined by the type column. |
Returns
- Type:
void - Description: Returns no value.
createPolicySpecEngine
Create Policy Spec Engine function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { createPolicySpecEngine } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export declare function createPolicySpecEngine(policy: PolicySpec): PolicyEngine;Call signature
createPolicySpecEngine(policy: PolicySpec): PolicyEngineParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
policy | PolicySpec | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
PolicyEngine - Description: The return contract is defined by the type shown above.
AuditPolicySpec
Audit Policy Spec interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { AuditPolicySpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface AuditPolicySpec {
enabled: boolean;
includeInput?: boolean;
includeOutput?: boolean;
redactPaths?: string[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
enabled | property | enabled: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
includeInput | property | includeInput?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
includeOutput | property | includeOutput?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
redactPaths | property | redactPaths?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
ContextSourceSpec
Context Source Spec interface with 11 public fields or methods.
- Kind: interface
- Import:
import type { ContextSourceSpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface ContextSourceSpec extends VersionedSpec, SpecMetadata {
type: 'memory' | 'artifact' | 'skill' | 'domain' | 'mcp' | 'user_input' | 'system';
provenanceRequired?: boolean;
trustLevel?: 'trusted' | 'reviewed' | 'untrusted';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
provenanceRequired | property | provenanceRequired?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
trustLevel | property | trustLevel?: "trusted" | "reviewed" | "untrusted" | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "memory" | "artifact" | "skill" | "domain" | "mcp" | "user_input" | "system" | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ContextSpec
Context Spec interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { ContextSpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface ContextSpec extends VersionedSpec, SpecMetadata {
sources: ContextSourceSpec[];
tokenBudget?: number;
provenancePolicy?: 'required' | 'best_effort' | 'none';
instructionBoundaryPolicy?: 'strict' | 'tagged' | 'none';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
instructionBoundaryPolicy | property | instructionBoundaryPolicy?: "none" | "strict" | "tagged" | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
provenancePolicy | property | provenancePolicy?: "none" | "required" | "best_effort" | Public property; its type, readonly modifier and optionality are shown in the signature. |
sources | property | sources: ContextSourceSpec[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
tokenBudget | property | tokenBudget?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
DeploymentSpec
Deployment Spec interface with 11 public fields or methods.
- Kind: interface
- Import:
import type { DeploymentSpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface DeploymentSpec extends VersionedSpec, SpecMetadata {
mode: 'local' | 'self_hosted' | 'managed';
runtimeMode?: 'single-user' | 'multi-user';
configRefs?: SpecRef[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
configRefs | property | configRefs?: SpecRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
mode | property | mode: "local" | "self_hosted" | "managed" | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runtimeMode | property | runtimeMode?: "single-user" | "multi-user" | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
EvaluationSpec
Evaluation Spec interface with 11 public fields or methods.
- Kind: interface
- Import:
import type { EvaluationSpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface EvaluationSpec extends VersionedSpec, SpecMetadata {
type: 'schema' | 'output_contract' | 'tool_trace' | 'policy' | 'process' | 'cost' | 'latency' | 'regression' | 'human';
rubric?: JsonSchema;
deterministic?: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
deterministic | property | deterministic?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
rubric | property | rubric?: JsonSchema | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "schema" | "output_contract" | "tool_trace" | "policy" | "process" | "cost" | "latency" | "regression" | "human" | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
HarnessedAgentSystemSpec
Harnessed Agent System Spec interface with 25 public fields or methods.
- Kind: interface
- Import:
import type { HarnessedAgentSystemSpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface HarnessedAgentSystemSpec extends VersionedSpec, SpecMetadata {
agentRef: SpecRef;
fsmProcessRef: SpecRef;
traceRef: SpecRef;
policyRefs?: SpecRef[];
memoryRefs?: SpecRef[];
toolRefs?: SpecRef[];
skillRefs?: SpecRef[];
mcpRefs?: SpecRef[];
contextRefs?: SpecRef[];
reasoningRefs?: SpecRef[];
outputContractRefs?: SpecRef[];
businessRuleRefs?: SpecRef[];
modelProfileRef?: SpecRef;
evaluationRefs?: SpecRef[];
replayRef?: SpecRef;
regressionRef?: SpecRef;
deploymentRef?: SpecRef;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
agentRef | property | agentRef: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
businessRuleRefs | property | businessRuleRefs?: SpecRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
contextRefs | property | contextRefs?: SpecRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
deploymentRef | property | deploymentRef?: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
evaluationRefs | property | evaluationRefs?: SpecRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
fsmProcessRef | property | fsmProcessRef: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
mcpRefs | property | mcpRefs?: SpecRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
memoryRefs | property | memoryRefs?: SpecRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
modelProfileRef | property | modelProfileRef?: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
outputContractRefs | property | outputContractRefs?: SpecRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
policyRefs | property | policyRefs?: SpecRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
reasoningRefs | property | reasoningRefs?: SpecRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
regressionRef | property | regressionRef?: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
replayRef | property | replayRef?: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
skillRefs | property | skillRefs?: SpecRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
toolRefs | property | toolRefs?: SpecRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
traceRef | property | traceRef: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
HumanReviewPolicySpec
Human Review Policy Spec interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { HumanReviewPolicySpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface HumanReviewPolicySpec {
required: boolean;
reason?: string;
approverRole?: string;
timeoutPolicy?: TimeoutPolicySpec;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
approverRole | property | approverRole?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reason | property | reason?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
required | property | required: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
timeoutPolicy | property | timeoutPolicy?: TimeoutPolicySpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
JsonSchema
JSON Schema for .
- Kind: interface
- Import:
import type { JsonSchema } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface JsonSchema {
type?: string;
properties?: Record<string, JsonSchema>;
required?: string[];
items?: JsonSchema;
enum?: unknown[];
additionalProperties?: boolean | JsonSchema;
[key: string]: unknown;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
additionalProperties | property | additionalProperties?: boolean | JsonSchema | Public property; its type, readonly modifier and optionality are shown in the signature. |
enum | property | enum?: unknown[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
items | property | items?: JsonSchema | Public property; its type, readonly modifier and optionality are shown in the signature. |
properties | property | properties?: Record<string, JsonSchema> | Public property; its type, readonly modifier and optionality are shown in the signature. |
required | property | required?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
OutputContractSpec
Output Contract Spec interface with 9 public fields or methods.
- Kind: interface
- Import:
import type { OutputContractSpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface OutputContractSpec extends VersionedSpec, SpecMetadata {
schema: JsonSchema;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
schema | property | schema: JsonSchema | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
PolicyDecision
Policy Decision interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { PolicyDecision } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface PolicyDecision {
allowed: boolean;
requiresHumanReview?: boolean;
policyId?: string;
ruleId?: string;
reason?: string;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
allowed | property | allowed: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
policyId | property | policyId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reason | property | reason?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
requiresHumanReview | property | requiresHumanReview?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
ruleId | property | ruleId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
PolicyEngine
Policy Engine interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { PolicyEngine } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface PolicyEngine {
evaluate(context: PolicyEvaluationContext): Promise<PolicyDecision>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
evaluate | method | evaluate(context: PolicyEvaluationContext): Promise<PolicyDecision> | Public method; parameters and return type are shown in the signature. |
PolicyEvaluationContext
Policy Evaluation Context interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { PolicyEvaluationContext } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface PolicyEvaluationContext<TInput = unknown> {
runId: string;
stepId?: string;
userId?: string;
capabilityId?: string;
sideEffectLevel?: SideEffectLevel;
input?: TInput;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
capabilityId | property | capabilityId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
input | property | input?: TInput | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sideEffectLevel | property | sideEffectLevel?: SideEffectLevel | Public property; its type, readonly modifier and optionality are shown in the signature. |
stepId | property | stepId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
PolicyRuleSpec
Policy Rule Spec interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { PolicyRuleSpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface PolicyRuleSpec extends VersionedSpec, SpecMetadata {
effect: 'allow' | 'deny' | 'require_human_review';
expression?: string;
sideEffectLevels?: SideEffectLevel[];
scopes?: string[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
effect | property | effect: "allow" | "deny" | "require_human_review" | Public property; its type, readonly modifier and optionality are shown in the signature. |
expression | property | expression?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scopes | property | scopes?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
sideEffectLevels | property | sideEffectLevels?: SideEffectLevel[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
PolicySpec
Policy Spec interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { PolicySpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface PolicySpec extends VersionedSpec, SpecMetadata {
rules: PolicyRuleSpec[];
defaultEffect?: 'allow' | 'deny';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
defaultEffect | property | defaultEffect?: "allow" | "deny" | Public property; its type, readonly modifier and optionality are shown in the signature. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
rules | property | rules: PolicyRuleSpec[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RegressionSpec
Regression Spec interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { RegressionSpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface RegressionSpec extends VersionedSpec, SpecMetadata {
fixtureRefs: SpecRef[];
requiredChecks: Array<'event_types' | 'state_path' | 'tool_calls' | 'policy_decisions' | 'output_contract'>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
fixtureRefs | property | fixtureRefs: SpecRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
requiredChecks | property | requiredChecks: ("output_contract" | "state_path" | "event_types" | "tool_calls" | "policy_decisions")[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ReplaySpec
Replay Spec interface with 13 public fields or methods.
- Kind: interface
- Import:
import type { ReplaySpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface ReplaySpec extends VersionedSpec, SpecMetadata {
captureModelIO?: boolean;
captureToolIO?: boolean;
captureMemoryReadSet?: boolean;
capturePolicyDecisions?: boolean;
snapshotPolicy?: 'none' | 'state_path' | 'full';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
captureMemoryReadSet | property | captureMemoryReadSet?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
captureModelIO | property | captureModelIO?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
capturePolicyDecisions | property | capturePolicyDecisions?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
captureToolIO | property | captureToolIO?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
snapshotPolicy | property | snapshotPolicy?: "none" | "state_path" | "full" | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RetryPolicySpec
Retry Policy Spec interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { RetryPolicySpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface RetryPolicySpec {
maxAttempts: number;
backoffMs?: number;
maxBackoffMs?: number;
jitterRatio?: number;
maxElapsedMs?: number;
retryableCodes?: string[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
backoffMs | property | backoffMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
jitterRatio | property | jitterRatio?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxAttempts | property | maxAttempts: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxBackoffMs | property | maxBackoffMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxElapsedMs | property | maxElapsedMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
retryableCodes | property | retryableCodes?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
SpecMetadata
Spec Metadata interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { SpecMetadata } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface SpecMetadata {
name?: string;
description?: string;
owner?: string;
tags?: string[];
createdAt?: string;
updatedAt?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
SpecRef
Spec Ref interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { SpecRef } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface SpecRef {
id: string;
version?: string;
revision?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
revision | property | revision?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
TimeoutPolicySpec
Timeout Policy Spec interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { TimeoutPolicySpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface TimeoutPolicySpec {
timeoutMs: number;
onTimeout?: 'fail' | 'retry' | 'human_review';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
onTimeout | property | onTimeout?: "fail" | "retry" | "human_review" | Public property; its type, readonly modifier and optionality are shown in the signature. |
timeoutMs | property | timeoutMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
TraceSpec
Trace Spec interface with 11 public fields or methods.
- Kind: interface
- Import:
import type { TraceSpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface TraceSpec extends VersionedSpec, SpecMetadata {
eventTypes: string[];
retentionPolicy?: string;
redactionPolicy?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
eventTypes | property | eventTypes: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
redactionPolicy | property | redactionPolicy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
retentionPolicy | property | retentionPolicy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
VersionedSpec
Versioned Spec interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { VersionedSpec } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export interface VersionedSpec {
id: string;
version: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RiskLevel
Public type alias for Risk Level; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { RiskLevel } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export type RiskLevel = 'low' | 'medium' | 'high' | 'critical';SideEffectLevel
Public type alias for Side Effect Level; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { SideEffectLevel } from '@codesoul-co/hypha-core'; - Source module:
specs
Declaration
export type SideEffectLevel = 'none' | 'read' | 'write' | 'external_effect' | 'irreversible';