Skip to content

@codesoul-co/hypha-domain / index ​

模块用法 ​

聚合 @codesoul-co/hypha-domain 的公共入口导出;应用应从包入口导入这些 Symbol,不应依赖内部文件路径。

从包入口导入 ​

ts
import {
  DomainCompiler,
  DomainPackRegistry,
  LocalDomainPackLoader,
  WorkflowCompiler,
  businessRuleEffectSchema,
  businessRuleScopeSchema,
  businessRuleSpecDefinition,
  businessRuleSpecExample,
} from '@codesoul-co/hypha-domain';

import type {
  BusinessRuleSpec,
  DomainAgentPatch,
  DomainAgentPatchTarget,
  DomainBindingResolution,
  DomainCompilationAudit,
  DomainCompilationResult,
  DomainCompileOptions,
  DomainPackRegistryEntry,
} from '@codesoul-co/hypha-domain';

// 完整导出列表见下方。

使用要点 ​

  • 33 个类型/接口用于应用代码、Adapter 或测试中的静态契约;请使用 import type,运行时不应依赖它们。
  • 4 个类提供可实例化的运行时实现;构造参数与公开方法在各自条目中完整列出。
  • 12 个函数是该模块的直接操作入口;每个 overload 的必需/可选参数与返回类型均在下方列出。
  • 31 个常量/枚举提供稳定值、Schema、Definition 或默认配置;应复用这些导出,避免在应用中复制内部值。

运行时校验示例 ​

ts
import { businessRuleEffectSchema } from '@codesoul-co/hypha-domain';

declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = businessRuleEffectSchema.parse(input);

配置、网络请求或持久化数据等不可信输入应先通过 Runtime Schema,再传给只接受已校验契约的函数或类。

公共导出 ​

Symbol种类签名说明
DomainCompiler类new DomainCompiler(): DomainCompilerDomain Compiler 类,共公开 2 个构造函数或成员;精确签名见本条目的声明与成员表。
DomainPackRegistry类new DomainPackRegistry(): DomainPackRegistryDomain Pack Registry 类,共公开 6 个构造函数或成员;精确签名见本条目的声明与成员表。
LocalDomainPackLoader类new LocalDomainPackLoader(options: LocalDomainPackLoaderOptions): LocalDomainPackLoaderLocal Domain Pack Loader 类,共公开 3 个构造函数或成员;精确签名见本条目的声明与成员表。
WorkflowCompiler类new WorkflowCompiler(): WorkflowCompilerWorkflow Compiler 类,共公开 2 个构造函数或成员;精确签名见本条目的声明与成员表。
businessRuleEffectSchema常量const businessRuleEffectSchema: z.ZodEnum<["constraint", "precondition", "postcondition", "guidance"]>Business Rule Effect 的运行时 Schema。
businessRuleScopeSchema常量const businessRuleScopeSchema: z.ZodEnum<["domain", "task", "workflow", "state", "tool", "memory", "output"]>Business Rule Scope 的运行时 Schema。
businessRuleSpecDefinition常量const businessRuleSpecDefinition: SpecSchemaDefinition<BusinessRuleSpec>Business Rule Spec 的运行时校验入口,组合 Parser、Example 与 JSON Schema。
businessRuleSpecExample常量const businessRuleSpecExample: BusinessRuleSpecBusiness Rule Spec 的有效示例值。
businessRuleSpecJsonSchema常量const businessRuleSpecJsonSchema: JsonSchemaBusiness Rule Spec 的 JSON Schema。
businessRuleSpecSchema常量const businessRuleSpecSchema: 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>; } & { scope: z.ZodEnum<["domain", "task", "workflow", "state", "tool", "memory", "outp...Business Rule Spec 的运行时 Schema。
DOMAIN_COMPILER_VERSION常量const DOMAIN_COMPILER_VERSION: "1.0.0"由 index 模块导出的 DOMAIN COMPILER VERSION 常量。
domainAgenticReasoningModeSchema常量const domainAgenticReasoningModeSchema: z.ZodEnum<["react", "fsm_react", "tot", "critique"]>Domain Agentic Reasoning Mode 的运行时 Schema。
domainPackSpecDefinition常量const domainPackSpecDefinition: SpecSchemaDefinition<DomainPackSpec>Domain Pack Spec 的运行时校验入口,组合 Parser、Example 与 JSON Schema。
domainPackSpecExample常量const domainPackSpecExample: DomainPackSpecDomain Pack Spec 的有效示例值。
domainPackSpecJsonSchema常量const domainPackSpecJsonSchema: JsonSchemaDomain Pack Spec 的 JSON Schema。
domainPackSpecSchema常量const domainPackSpecSchema: z.ZodObject<{ id: z.ZodString; version: 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>; } & { name: z.ZodString; taskSchemas: z.ZodArray<z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<...Domain Pack Spec 的运行时 Schema。
domainPromptRefSchema常量const domainPromptRefSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodOptional<z.ZodString>; revision: z.ZodOptional<z.ZodString>; } & { required: z.ZodOptional<z.ZodBoolean>; priority: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { id: string; version?: string | undefined; revision?: string | undefined; required?: boolean | undefined; priority?: number | undefined; }, { id: string; version?: string |...Domain Prompt Ref 的运行时 Schema。
domainReasoningPersistenceSchema常量const domainReasoningPersistenceSchema: z.ZodEnum<["summary_only", "events_only"]>Domain Reasoning Persistence 的运行时 Schema。
domainSpecDefinitions常量const domainSpecDefinitions: readonly [SpecSchemaDefinition<WorkflowSpec>, SpecSchemaDefinition<ReasoningSpec>, SpecSchemaDefinition<BusinessRuleSpec>, SpecSchemaDefinition<DomainPackSpec>]由 index 模块导出的 Domain Spec Definitions 常量。
domainSpecJsonSchemas常量const domainSpecJsonSchemas: Record<string, JsonSchema>由 index 模块导出的 Domain Spec JSON Schemas 常量。
domainThinkingModeSchema常量const domainThinkingModeSchema: z.ZodEnum<["none", "summary", "structured"]>Domain Thinking Mode 的运行时 Schema。
reasoningSpecDefinition常量const reasoningSpecDefinition: SpecSchemaDefinition<ReasoningSpec>Reasoning Spec 的运行时校验入口,组合 Parser、Example 与 JSON Schema。
reasoningSpecExample常量const reasoningSpecExample: ReasoningSpecReasoning Spec 的有效示例值。
reasoningSpecJsonSchema常量const reasoningSpecJsonSchema: JsonSchemaReasoning Spec 的 JSON Schema。
reasoningSpecSchema常量const reasoningSpecSchema: 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>; } & { thinkingMode: z.ZodEnum<["none", "summary", "structured"]>; agenticMode: z.ZodEnum<...Reasoning Spec 的运行时 Schema。
riskProfileSpecSchema常量const riskProfileSpecSchema: z.ZodObject<{ defaultRiskLevel: z.ZodEnum<["low", "medium", "high", "critical"]>; escalationPolicyRef: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { defaultRiskLevel: "low" | "medium" | "high" | "critical"; escalationPolicyRef?: string | undefined; }, { defaultRiskLevel: "low" | "medium" | "high" | "critical"; escalationPolicyRef?: string | undefined; }>Risk Profile Spec 的运行时 Schema。
sessionProfileSpecSchema常量const sessionProfileSpecSchema: 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>; } & { metadataSchema: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>...Session Profile Spec 的运行时 Schema。
skillPolicyBindingSchema常量const skillPolicyBindingSchema: 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>; } & { skillRef: z.ZodObject<{ id: z.ZodString; version: z.ZodOptional<z.ZodString>; ...Skill Policy Binding 的运行时 Schema。
taskSchemaSpecSchema常量const taskSchemaSpecSchema: 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>; } & { taskType: z.ZodString; inputSchema: z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema...Task Schema Spec 的运行时 Schema。
workflowSpecDefinition常量const workflowSpecDefinition: SpecSchemaDefinition<WorkflowSpec>Workflow Spec 的运行时校验入口,组合 Parser、Example 与 JSON Schema。
workflowSpecExample常量const workflowSpecExample: WorkflowSpecWorkflow Spec 的有效示例值。
workflowSpecJsonSchema常量const workflowSpecJsonSchema: JsonSchemaWorkflow Spec 的 JSON Schema。
workflowSpecSchema常量const workflowSpecSchema: 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>; } & { initialState: z.ZodString; terminalStates: z.ZodArray<z.ZodString, "many">; states: ...Workflow Spec 的运行时 Schema。
workflowStateSpecSchema常量const workflowStateSpecSchema: 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>; } & { id: z.ZodString; goal: z.ZodString; inputContract: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>; outputCon...Workflow State Spec 的运行时 Schema。
workflowTransitionSpecSchema常量const workflowTransitionSpecSchema: z.ZodObject<{ from: z.ZodString; to: z.ZodString; guard: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { from: string; to: string; description?: string | undefined; guard?: string | undefined; }, { from: string; to: string; description?: string | undefined; guard?: string | undefined; }>Workflow Transition Spec 的运行时 Schema。
applyDomainAgentPatch函数applyDomainAgentPatch<TAgent extends DomainAgentPatchTarget>(agent: TAgent, patch: DomainAgentPatch): TAgentApply Domain Agent Patch 函数,提供 1 个公开调用签名;参数与返回类型见下表。
compileDomainPackToHarnessedSystem函数compileDomainPackToHarnessedSystem(input: DomainPackSpec, options: DomainCompileOptions): DomainCompilationResultCompile Domain Pack To Harnessed System 函数,提供 1 个公开调用签名;参数与返回类型见下表。
compileWorkflowToFSM函数compileWorkflowToFSM(domainPack: DomainPackSpec, options?: WorkflowCompileOptions): FSMProcessSpecCompile Workflow To FSM 函数,提供 1 个公开调用签名;参数与返回类型见下表。
createWorkflowDependencySnapshot函数createWorkflowDependencySnapshot(input: Omit<WorkflowDependencySnapshot, "dependencyHash">): WorkflowDependencySnapshotCreate Workflow Dependency Snapshot 函数,提供 1 个公开调用签名;参数与返回类型见下表。
extendDomainPack函数extendDomainPack(base: DomainPackSpec, overlay: DomainPackOverlay): DomainPackSpecExtend Domain Pack 函数,提供 1 个公开调用签名;参数与返回类型见下表。
initializeDomainSession函数initializeDomainSession(domainPack: DomainPackSpec, options?: DomainSessionInitOptions): DomainSessionInitializationInitialize Domain Session 函数,提供 1 个公开调用签名;参数与返回类型见下表。
listLocalDomainPackFiles函数listLocalDomainPackFiles(directory: string, recursive?: boolean, extensions?: string[]): Promise<string[]>List Local Domain Pack Files 函数,提供 1 个公开调用签名;参数与返回类型见下表。
loadDomainPackFile函数loadDomainPackFile(filePath: string): Promise<DomainPackSpec>Load Domain Pack File 函数,提供 1 个公开调用签名;参数与返回类型见下表。
parseDomainPackDocument函数parseDomainPackDocument(raw: string, filePath?: string): DomainPackSpecParse Domain Pack Document 函数,提供 1 个公开调用签名;参数与返回类型见下表。
resolveWorkflowToolExecutionScope函数resolveWorkflowToolExecutionScope(workflowStates: WorkflowStateBinding[], stateId: string): ToolExecutionScopeResolve Workflow Tool Execution Scope 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateDomainPackSpec函数validateDomainPackSpec(input: unknown): DomainPackSpecValidate Domain Pack Spec 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateWorkflowSpec函数validateWorkflowSpec(input: unknown): WorkflowSpecValidate Workflow Spec 函数,提供 1 个公开调用签名;参数与返回类型见下表。
BusinessRuleSpec接口interface BusinessRuleSpec extends VersionedSpec, SpecMetadataBusiness Rule Spec 接口,共包含 17 个公开字段或方法。
DomainAgentPatch接口interface DomainAgentPatchDomain Agent Patch 接口,共包含 9 个公开字段或方法。
DomainAgentPatchTarget接口interface DomainAgentPatchTargetDomain Agent Patch Target 接口,共包含 12 个公开字段或方法。
DomainBindingResolution接口interface DomainBindingResolutionDomain Binding Resolution 接口,共包含 23 个公开字段或方法。
DomainCompilationAudit接口interface DomainCompilationAuditDomain Compilation Audit 接口,共包含 9 个公开字段或方法。
DomainCompilationResult接口interface DomainCompilationResultDomain Compilation Result 接口,共包含 11 个公开字段或方法。
DomainCompileOptions接口interface DomainCompileOptionsDomain Compile Options 接口,共包含 20 个公开字段或方法。
DomainPackRegistryEntry接口interface DomainPackRegistryEntryDomain Pack Registry Entry 接口,共包含 2 个公开字段或方法。
DomainPackSpec接口interface DomainPackSpec extends VersionedSpec, SpecMetadataDomain Pack Spec 接口,共包含 31 个公开字段或方法。
DomainPromptRef接口interface DomainPromptRef extends SpecRefDomain Prompt Ref 接口,共包含 5 个公开字段或方法。
DomainSessionInitialization接口interface DomainSessionInitializationDomain Session Initialization 接口,共包含 10 个公开字段或方法。
DomainSessionInitOptions接口interface DomainSessionInitOptionsDomain Session Init Options 接口,共包含 2 个公开字段或方法。
LocalDomainPackLoaderOptions接口interface LocalDomainPackLoaderOptionsLocal Domain Pack Loader Options 接口,共包含 3 个公开字段或方法。
ReasoningSpec接口interface ReasoningSpec extends VersionedSpec, SpecMetadataReasoning Spec 接口,共包含 16 个公开字段或方法。
RiskProfileSpec接口interface RiskProfileSpecRisk Profile Spec 接口,共包含 2 个公开字段或方法。
SessionProfileSpec接口interface SessionProfileSpec extends VersionedSpec, SpecMetadataSession Profile Spec 接口,共包含 17 个公开字段或方法。
SkillPolicyBinding接口interface SkillPolicyBinding extends VersionedSpec, SpecMetadataSkill Policy Binding 接口,共包含 14 个公开字段或方法。
TaskInstance接口interface TaskInstanceTask Instance 接口,共包含 8 个公开字段或方法。
TaskSchemaSpec接口interface TaskSchemaSpec extends VersionedSpec, SpecMetadataTask Schema Spec 接口,共包含 16 个公开字段或方法。
WorkflowCompileOptions接口interface WorkflowCompileOptionsWorkflow Compile Options 接口,共包含 3 个公开字段或方法。
WorkflowDependencySnapshot接口interface WorkflowDependencySnapshotWorkflow Dependency Snapshot 接口,共包含 23 个公开字段或方法。
WorkflowSpec接口interface WorkflowSpec extends VersionedSpec, SpecMetadataWorkflow Spec 接口,共包含 12 个公开字段或方法。
WorkflowStateBinding接口interface WorkflowStateBindingWorkflow State Binding 接口,共包含 18 个公开字段或方法。
WorkflowStateSpec接口interface WorkflowStateSpec extends SpecMetadataWorkflow State Spec 接口,共包含 33 个公开字段或方法。
WorkflowTransitionSpec接口interface WorkflowTransitionSpecWorkflow Transition Spec 接口,共包含 4 个公开字段或方法。
BusinessRuleEffect类型type BusinessRuleEffect = 'constraint' | 'precondition' | 'postcondition' | 'guidance'Business Rule Effect 公共类型别名;完整类型表达式见声明。
BusinessRuleScope类型type BusinessRuleScope = 'domain' | 'task' | 'workflow' | 'state' | 'tool' | 'memory' | 'output'Business Rule Scope 公共类型别名;完整类型表达式见声明。
DomainAgenticReasoningMode类型type DomainAgenticReasoningMode = 'react' | 'fsm_react' | 'tot' | 'critique'Domain Agentic Reasoning Mode 公共类型别名;完整类型表达式见声明。
DomainPackOverlay类型type DomainPackOverlay = Partial<Omit<DomainPackSpec, 'id' | 'version' | 'name' | 'taskSchemas' | 'workflows'>> & { id?: string; version?: string; name?: string; taskSchemas?: TaskSchemaSpec[]; workflows?: WorkflowSpec[]; remove?: DomainPackOverlayRemovals; }Domain Pack Overlay 公共类型别名;完整类型表达式见声明。
DomainPackOverlayCollection类型type DomainPackOverlayCollection = 'taskSchemas' | 'outputContracts' | 'sessionProfiles' | 'workflows' | 'allowedSkills' | 'defaultSkills' | 'skillPolicies' | 'allowedPromptRefs' | 'defaultPromptRefs' | 'tools' | 'toolProfiles' | 'mcpProfiles' | 'memoryProfiles' | 'contextProfiles' | 'reasoningProfiles' | 'businessRules' | 'policies' | 'evaluationProfiles' | 'regressionCases'Domain Pack Overlay Collection 公共类型别名;完整类型表达式见声明。
DomainPackOverlayRemovals类型type DomainPackOverlayRemovals = Partial<Record<DomainPackOverlayCollection, string[]>>Domain Pack Overlay Removals 公共类型别名;完整类型表达式见声明。
DomainReasoningPersistence类型type DomainReasoningPersistence = 'summary_only' | 'events_only'Domain Reasoning Persistence 公共类型别名;完整类型表达式见声明。
DomainThinkingMode类型type DomainThinkingMode = 'none' | 'summary' | 'structured'Domain Thinking Mode 公共类型别名;完整类型表达式见声明。

DomainCompiler ​

Domain Compiler 类,共公开 2 个构造函数或成员;精确签名见本条目的声明与成员表。

  • 种类: 类
  • 导入: import { DomainCompiler } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare class DomainCompiler {
    compile(domainPack: DomainPackSpec, options: DomainCompileOptions): DomainCompilationResult;
}

公开成员 ​

成员种类签名说明
compile方法compile(domainPack: DomainPackSpec, options: DomainCompileOptions): DomainCompilationResult公开方法;参数与返回类型以签名列为准。
constructor构造函数(): DomainCompiler创建该类的实例。

DomainPackRegistry ​

Domain Pack Registry 类,共公开 6 个构造函数或成员;精确签名见本条目的声明与成员表。

  • 种类: 类
  • 导入: import { DomainPackRegistry } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare class DomainPackRegistry {
    register(spec: DomainPackSpec, source?: string): DomainPackSpec;
    registerMany(entries: DomainPackRegistryEntry[]): DomainPackSpec[];
    resolve(id: string, version?: string): DomainPackRegistryEntry | undefined;
    get(id: string, version?: string): DomainPackSpec | null;
    list(): DomainPackRegistryEntry[];
}

公开成员 ​

成员种类签名说明
constructor构造函数(): DomainPackRegistry创建该类的实例。
get方法get(id: string, version?: string): DomainPackSpec | null公开方法;参数与返回类型以签名列为准。
list方法list(): DomainPackRegistryEntry[]公开方法;参数与返回类型以签名列为准。
register方法register(spec: DomainPackSpec, source?: string): DomainPackSpec公开方法;参数与返回类型以签名列为准。
registerMany方法registerMany(entries: DomainPackRegistryEntry[]): DomainPackSpec[]公开方法;参数与返回类型以签名列为准。
resolve方法resolve(id: string, version?: string): DomainPackRegistryEntry | undefined公开方法;参数与返回类型以签名列为准。

LocalDomainPackLoader ​

Local Domain Pack Loader 类,共公开 3 个构造函数或成员;精确签名见本条目的声明与成员表。

  • 种类: 类
  • 导入: import { LocalDomainPackLoader } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare class LocalDomainPackLoader {
    constructor(options: LocalDomainPackLoaderOptions);
    load(): Promise<DomainPackRegistryEntry[]>;
    loadInto(registry: DomainPackRegistry): Promise<DomainPackSpec[]>;
}

公开成员 ​

成员种类签名说明
constructor构造函数(options: LocalDomainPackLoaderOptions): LocalDomainPackLoader创建该类的实例。
load方法load(): Promise<DomainPackRegistryEntry[]>公开方法;参数与返回类型以签名列为准。
loadInto方法loadInto(registry: DomainPackRegistry): Promise<DomainPackSpec[]>公开方法;参数与返回类型以签名列为准。

WorkflowCompiler ​

Workflow Compiler 类,共公开 2 个构造函数或成员;精确签名见本条目的声明与成员表。

  • 种类: 类
  • 导入: import { WorkflowCompiler } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare class WorkflowCompiler {
    compile(domainPack: DomainPackSpec, options?: WorkflowCompileOptions): FSMProcessSpec;
}

公开成员 ​

成员种类签名说明
compile方法compile(domainPack: DomainPackSpec, options?: WorkflowCompileOptions): FSMProcessSpec公开方法;参数与返回类型以签名列为准。
constructor构造函数(): WorkflowCompiler创建该类的实例。

businessRuleEffectSchema ​

Business Rule Effect 的运行时 Schema。

  • 种类: 常量
  • 导入: import { businessRuleEffectSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const businessRuleEffectSchema: z.ZodEnum<["constraint", "precondition", "postcondition", "guidance"]>;

businessRuleScopeSchema ​

Business Rule Scope 的运行时 Schema。

  • 种类: 常量
  • 导入: import { businessRuleScopeSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const businessRuleScopeSchema: z.ZodEnum<["domain", "task", "workflow", "state", "tool", "memory", "output"]>;

businessRuleSpecDefinition ​

Business Rule Spec 的运行时校验入口,组合 Parser、Example 与 JSON Schema。

  • 种类: 常量
  • 导入: import { businessRuleSpecDefinition } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const businessRuleSpecDefinition: SpecSchemaDefinition<BusinessRuleSpec>;

businessRuleSpecExample ​

Business Rule Spec 的有效示例值。

  • 种类: 常量
  • 导入: import { businessRuleSpecExample } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const businessRuleSpecExample: BusinessRuleSpec;

businessRuleSpecJsonSchema ​

Business Rule Spec 的 JSON Schema。

  • 种类: 常量
  • 导入: import { businessRuleSpecJsonSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const businessRuleSpecJsonSchema: JsonSchema;

businessRuleSpecSchema ​

Business Rule Spec 的运行时 Schema。

  • 种类: 常量
  • 导入: import { businessRuleSpecSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const businessRuleSpecSchema: 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>; } & { scope: z.ZodEnum<["domain", "task", "workflow", "state", "tool", "memory", "output"]>; effect: z.ZodEnum<["constraint", "precondition", "postcondition", "guidance"]>; expression: z.ZodOptional<z.ZodString>; inputSchema: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>; outputContractRef: z.ZodOptional<z.ZodString>; policyRefs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; evaluationRefs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; severity: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { id: string; version: string; scope: "domain" | "task" | "workflow" | "state" | "tool" | "memory" | "output"; effect: "constraint" | "precondition" | "postcondition" | "guidance"; name?: string | undefined; description?: string | undefined; owner?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; metadata?: Record<string, unknown> | undefined; expression?: string | undefined; inputSchema?: JsonSchema | undefined; outputContractRef?: string | undefined; policyRefs?: string[] | undefined; evaluationRefs?: string[] | undefined; severity?: "low" | "medium" | "high" | "critical" | undefined; }, { id: string; version: string; scope: "domain" | "task" | "workflow" | "state" | "tool" | "memory" | "output"; effect: "constraint" | "precondition" | "postcondition" | "guidance"; name?: string | undefined; description?: string | undefined; owner?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; metadata?: Record<string, unknown> | undefined; expression?: string | undefined; inputSchema?: JsonSchema | undefined; outputContractRef?: string | undefined; policyRefs?: string[] | undefined; evaluationRefs?: string[] | undefined; severity?: "low" | "medium" | "high" | "critical" | undefined; }>;

DOMAIN_COMPILER_VERSION ​

由 index 模块导出的 DOMAIN COMPILER VERSION 常量。

  • 种类: 常量
  • 导入: import { DOMAIN_COMPILER_VERSION } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const DOMAIN_COMPILER_VERSION: "1.0.0";

domainAgenticReasoningModeSchema ​

Domain Agentic Reasoning Mode 的运行时 Schema。

  • 种类: 常量
  • 导入: import { domainAgenticReasoningModeSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const domainAgenticReasoningModeSchema: z.ZodEnum<["react", "fsm_react", "tot", "critique"]>;

domainPackSpecDefinition ​

Domain Pack Spec 的运行时校验入口,组合 Parser、Example 与 JSON Schema。

  • 种类: 常量
  • 导入: import { domainPackSpecDefinition } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const domainPackSpecDefinition: SpecSchemaDefinition<DomainPackSpec>;

domainPackSpecExample ​

Domain Pack Spec 的有效示例值。

  • 种类: 常量
  • 导入: import { domainPackSpecExample } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const domainPackSpecExample: DomainPackSpec;

domainPackSpecJsonSchema ​

Domain Pack Spec 的 JSON Schema。

  • 种类: 常量
  • 导入: import { domainPackSpecJsonSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const domainPackSpecJsonSchema: JsonSchema;

domainPackSpecSchema ​

Domain Pack Spec 的运行时 Schema。

  • 种类: 常量
  • 导入: import { domainPackSpecSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
// 精确类型由包入口解析;完整编译器展开定义见源码链接。
export declare const domainPackSpecSchema: (typeof import('@codesoul-co/hypha-domain'))['domainPackSpecSchema'];

该常量的编译器展开类型已压缩;它的公共名称、顶层类型与源码位置仍保留在本条目中。相关输入/输出字段请使用同模块导出的接口、类型或 Runtime Schema。

domainPromptRefSchema ​

Domain Prompt Ref 的运行时 Schema。

  • 种类: 常量
  • 导入: import { domainPromptRefSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const domainPromptRefSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodOptional<z.ZodString>; revision: z.ZodOptional<z.ZodString>; } & { required: z.ZodOptional<z.ZodBoolean>; priority: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { id: string; version?: string | undefined; revision?: string | undefined; required?: boolean | undefined; priority?: number | undefined; }, { id: string; version?: string | undefined; revision?: string | undefined; required?: boolean | undefined; priority?: number | undefined; }>;

domainReasoningPersistenceSchema ​

Domain Reasoning Persistence 的运行时 Schema。

  • 种类: 常量
  • 导入: import { domainReasoningPersistenceSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const domainReasoningPersistenceSchema: z.ZodEnum<["summary_only", "events_only"]>;

domainSpecDefinitions ​

由 index 模块导出的 Domain Spec Definitions 常量。

  • 种类: 常量
  • 导入: import { domainSpecDefinitions } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const domainSpecDefinitions: readonly [SpecSchemaDefinition<WorkflowSpec>, SpecSchemaDefinition<ReasoningSpec>, SpecSchemaDefinition<BusinessRuleSpec>, SpecSchemaDefinition<DomainPackSpec>];

domainSpecJsonSchemas ​

由 index 模块导出的 Domain Spec JSON Schemas 常量。

  • 种类: 常量
  • 导入: import { domainSpecJsonSchemas } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

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

domainThinkingModeSchema ​

Domain Thinking Mode 的运行时 Schema。

  • 种类: 常量
  • 导入: import { domainThinkingModeSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const domainThinkingModeSchema: z.ZodEnum<["none", "summary", "structured"]>;

reasoningSpecDefinition ​

Reasoning Spec 的运行时校验入口,组合 Parser、Example 与 JSON Schema。

  • 种类: 常量
  • 导入: import { reasoningSpecDefinition } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const reasoningSpecDefinition: SpecSchemaDefinition<ReasoningSpec>;

reasoningSpecExample ​

Reasoning Spec 的有效示例值。

  • 种类: 常量
  • 导入: import { reasoningSpecExample } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const reasoningSpecExample: ReasoningSpec;

reasoningSpecJsonSchema ​

Reasoning Spec 的 JSON Schema。

  • 种类: 常量
  • 导入: import { reasoningSpecJsonSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const reasoningSpecJsonSchema: JsonSchema;

reasoningSpecSchema ​

Reasoning Spec 的运行时 Schema。

  • 种类: 常量
  • 导入: import { reasoningSpecSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const reasoningSpecSchema: 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>; } & { thinkingMode: z.ZodEnum<["none", "summary", "structured"]>; agenticMode: z.ZodEnum<["react", "fsm_react", "tot", "critique"]>; maxSteps: z.ZodOptional<z.ZodNumber>; persist: z.ZodOptional<z.ZodEnum<["summary_only", "events_only"]>>; plannerRef: z.ZodOptional<z.ZodString>; reasonerRef: z.ZodOptional<z.ZodString>; metadataSchema: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { id: string; version: string; thinkingMode: "none" | "summary" | "structured"; agenticMode: "react" | "fsm_react" | "tot" | "critique"; name?: string | undefined; description?: string | undefined; owner?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; maxSteps?: number | undefined; persist?: "summary_only" | "events_only" | undefined; plannerRef?: string | undefined; reasonerRef?: string | undefined; metadataSchema?: JsonSchema | undefined; metadata?: Record<string, unknown> | undefined; }, { id: string; version: string; thinkingMode: "none" | "summary" | "structured"; agenticMode: "react" | "fsm_react" | "tot" | "critique"; name?: string | undefined; description?: string | undefined; owner?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; maxSteps?: number | undefined; persist?: "summary_only" | "events_only" | undefined; plannerRef?: string | undefined; reasonerRef?: string | undefined; metadataSchema?: JsonSchema | undefined; metadata?: Record<string, unknown> | undefined; }>;

riskProfileSpecSchema ​

Risk Profile Spec 的运行时 Schema。

  • 种类: 常量
  • 导入: import { riskProfileSpecSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const riskProfileSpecSchema: z.ZodObject<{ defaultRiskLevel: z.ZodEnum<["low", "medium", "high", "critical"]>; escalationPolicyRef: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { defaultRiskLevel: "low" | "medium" | "high" | "critical"; escalationPolicyRef?: string | undefined; }, { defaultRiskLevel: "low" | "medium" | "high" | "critical"; escalationPolicyRef?: string | undefined; }>;

sessionProfileSpecSchema ​

Session Profile Spec 的运行时 Schema。

  • 种类: 常量
  • 导入: import { sessionProfileSpecSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const sessionProfileSpecSchema: 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>; } & { metadataSchema: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>; defaultMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; defaultMemoryProfileRef: z.ZodOptional<z.ZodString>; defaultContextProfileRef: z.ZodOptional<z.ZodString>; defaultReasoningProfileRef: z.ZodOptional<z.ZodString>; defaultToolProfileRef: z.ZodOptional<z.ZodString>; defaultMCPProfileRef: z.ZodOptional<z.ZodString>; defaultSkillPolicyRef: z.ZodOptional<z.ZodString>; defaultPolicyRefs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { id: string; version: string; name?: string | undefined; description?: string | undefined; owner?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; metadataSchema?: JsonSchema | undefined; defaultMetadata?: Record<string, unknown> | undefined; defaultMemoryProfileRef?: string | undefined; defaultContextProfileRef?: string | undefined; defaultReasoningProfileRef?: string | undefined; defaultToolProfileRef?: string | undefined; defaultMCPProfileRef?: string | undefined; defaultSkillPolicyRef?: string | undefined; defaultPolicyRefs?: string[] | undefined; }, { id: string; version: string; name?: string | undefined; description?: string | undefined; owner?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; metadataSchema?: JsonSchema | undefined; defaultMetadata?: Record<string, unknown> | undefined; defaultMemoryProfileRef?: string | undefined; defaultContextProfileRef?: string | undefined; defaultReasoningProfileRef?: string | undefined; defaultToolProfileRef?: string | undefined; defaultMCPProfileRef?: string | undefined; defaultSkillPolicyRef?: string | undefined; defaultPolicyRefs?: string[] | undefined; }>;

skillPolicyBindingSchema ​

Skill Policy Binding 的运行时 Schema。

  • 种类: 常量
  • 导入: import { skillPolicyBindingSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const skillPolicyBindingSchema: 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>; } & { skillRef: 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; }>; policyRefs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; allowedTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; requiredTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; trustLevel: z.ZodOptional<z.ZodEnum<["trusted", "reviewed", "untrusted"]>>; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { id: string; version: string; skillRef: { id: string; revision?: string | undefined; version?: string | undefined; }; name?: string | undefined; description?: string | undefined; owner?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; metadata?: Record<string, unknown> | undefined; policyRefs?: string[] | undefined; allowedTools?: string[] | undefined; requiredTools?: string[] | undefined; trustLevel?: "trusted" | "reviewed" | "untrusted" | undefined; }, { id: string; version: string; skillRef: { id: string; revision?: string | undefined; version?: string | undefined; }; name?: string | undefined; description?: string | undefined; owner?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; metadata?: Record<string, unknown> | undefined; policyRefs?: string[] | undefined; allowedTools?: string[] | undefined; requiredTools?: string[] | undefined; trustLevel?: "trusted" | "reviewed" | "untrusted" | undefined; }>;

taskSchemaSpecSchema ​

Task Schema Spec 的运行时 Schema。

  • 种类: 常量
  • 导入: import { taskSchemaSpecSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const taskSchemaSpecSchema: 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>; } & { taskType: z.ZodString; inputSchema: z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>; constraintsSchema: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>; acceptanceCriteriaSchema: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>; outputContractRef: z.ZodString; riskProfile: z.ZodOptional<z.ZodObject<{ defaultRiskLevel: z.ZodEnum<["low", "medium", "high", "critical"]>; escalationPolicyRef: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { defaultRiskLevel: "low" | "medium" | "high" | "critical"; escalationPolicyRef?: string | undefined; }, { defaultRiskLevel: "low" | "medium" | "high" | "critical"; escalationPolicyRef?: string | undefined; }>>; defaultWorkflowRef: z.ZodOptional<z.ZodString>; defaultSkillRefs: 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; inputSchema: JsonSchema; outputContractRef: string; taskType: string; name?: string | undefined; description?: string | undefined; owner?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; constraintsSchema?: JsonSchema | undefined; acceptanceCriteriaSchema?: JsonSchema | undefined; riskProfile?: { defaultRiskLevel: "low" | "medium" | "high" | "critical"; escalationPolicyRef?: string | undefined; } | undefined; defaultWorkflowRef?: string | undefined; defaultSkillRefs?: { id: string; revision?: string | undefined; version?: string | undefined; }[] | undefined; }, { id: string; version: string; inputSchema: JsonSchema; outputContractRef: string; taskType: string; name?: string | undefined; description?: string | undefined; owner?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; constraintsSchema?: JsonSchema | undefined; acceptanceCriteriaSchema?: JsonSchema | undefined; riskProfile?: { defaultRiskLevel: "low" | "medium" | "high" | "critical"; escalationPolicyRef?: string | undefined; } | undefined; defaultWorkflowRef?: string | undefined; defaultSkillRefs?: { id: string; revision?: string | undefined; version?: string | undefined; }[] | undefined; }>;

workflowSpecDefinition ​

Workflow Spec 的运行时校验入口,组合 Parser、Example 与 JSON Schema。

  • 种类: 常量
  • 导入: import { workflowSpecDefinition } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const workflowSpecDefinition: SpecSchemaDefinition<WorkflowSpec>;

workflowSpecExample ​

Workflow Spec 的有效示例值。

  • 种类: 常量
  • 导入: import { workflowSpecExample } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const workflowSpecExample: WorkflowSpec;

workflowSpecJsonSchema ​

Workflow Spec 的 JSON Schema。

  • 种类: 常量
  • 导入: import { workflowSpecJsonSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const workflowSpecJsonSchema: JsonSchema;

workflowSpecSchema ​

Workflow Spec 的运行时 Schema。

  • 种类: 常量
  • 导入: import { workflowSpecSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
// 精确类型由包入口解析;完整编译器展开定义见源码链接。
export declare const workflowSpecSchema: (typeof import('@codesoul-co/hypha-domain'))['workflowSpecSchema'];

该常量的编译器展开类型已压缩;它的公共名称、顶层类型与源码位置仍保留在本条目中。相关输入/输出字段请使用同模块导出的接口、类型或 Runtime Schema。

workflowStateSpecSchema ​

Workflow State Spec 的运行时 Schema。

  • 种类: 常量
  • 导入: import { workflowStateSpecSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
// 精确类型由包入口解析;完整编译器展开定义见源码链接。
export declare const workflowStateSpecSchema: (typeof import('@codesoul-co/hypha-domain'))['workflowStateSpecSchema'];

该常量的编译器展开类型已压缩;它的公共名称、顶层类型与源码位置仍保留在本条目中。相关输入/输出字段请使用同模块导出的接口、类型或 Runtime Schema。

workflowTransitionSpecSchema ​

Workflow Transition Spec 的运行时 Schema。

  • 种类: 常量
  • 导入: import { workflowTransitionSpecSchema } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare const workflowTransitionSpecSchema: z.ZodObject<{ from: z.ZodString; to: z.ZodString; guard: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { from: string; to: string; description?: string | undefined; guard?: string | undefined; }, { from: string; to: string; description?: string | undefined; guard?: string | undefined; }>;

applyDomainAgentPatch ​

Apply Domain Agent Patch 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { applyDomainAgentPatch } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare function applyDomainAgentPatch<TAgent extends DomainAgentPatchTarget>(agent: TAgent, patch: DomainAgentPatch): TAgent;

调用签名 ​

text
applyDomainAgentPatch<TAgent extends DomainAgentPatchTarget>(agent: TAgent, patch: DomainAgentPatch): TAgent

参数 ​

参数类型必需说明
agentTAgent是必需参数;接受的值由类型列定义。
patchDomainAgentPatch是必需参数;接受的值由类型列定义。

返回值 ​

  • 类型: TAgent
  • 说明: 返回值契约由上述类型定义。

compileDomainPackToHarnessedSystem ​

Compile Domain Pack To Harnessed System 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { compileDomainPackToHarnessedSystem } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare function compileDomainPackToHarnessedSystem(input: DomainPackSpec, options: DomainCompileOptions): DomainCompilationResult;

调用签名 ​

text
compileDomainPackToHarnessedSystem(input: DomainPackSpec, options: DomainCompileOptions): DomainCompilationResult

参数 ​

参数类型必需说明
inputDomainPackSpec是必需参数;接受的值由类型列定义。
optionsDomainCompileOptions是必需参数;接受的值由类型列定义。

返回值 ​

  • 类型: DomainCompilationResult
  • 说明: 返回值契约由上述类型定义。

compileWorkflowToFSM ​

Compile Workflow To FSM 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { compileWorkflowToFSM } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare function compileWorkflowToFSM(domainPack: DomainPackSpec, options?: WorkflowCompileOptions): FSMProcessSpec;

调用签名 ​

text
compileWorkflowToFSM(domainPack: DomainPackSpec, options?: WorkflowCompileOptions): FSMProcessSpec

参数 ​

参数类型必需说明
domainPackDomainPackSpec是必需参数;接受的值由类型列定义。
optionsWorkflowCompileOptions否可选参数;接受的值由类型列定义。

返回值 ​

  • 类型: FSMProcessSpec
  • 说明: 返回值契约由上述类型定义。

createWorkflowDependencySnapshot ​

Create Workflow Dependency Snapshot 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { createWorkflowDependencySnapshot } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare function createWorkflowDependencySnapshot(input: Omit<WorkflowDependencySnapshot, 'dependencyHash'>): WorkflowDependencySnapshot;

调用签名 ​

text
createWorkflowDependencySnapshot(input: Omit<WorkflowDependencySnapshot, "dependencyHash">): WorkflowDependencySnapshot

参数 ​

参数类型必需说明
inputOmit<WorkflowDependencySnapshot, "dependencyHash">是必需参数;接受的值由类型列定义。

返回值 ​

  • 类型: WorkflowDependencySnapshot
  • 说明: 返回值契约由上述类型定义。

extendDomainPack ​

Extend Domain Pack 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { extendDomainPack } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare function extendDomainPack(base: DomainPackSpec, overlay: DomainPackOverlay): DomainPackSpec;

调用签名 ​

text
extendDomainPack(base: DomainPackSpec, overlay: DomainPackOverlay): DomainPackSpec

参数 ​

参数类型必需说明
baseDomainPackSpec是必需参数;接受的值由类型列定义。
overlayDomainPackOverlay是必需参数;接受的值由类型列定义。

返回值 ​

  • 类型: DomainPackSpec
  • 说明: 返回值契约由上述类型定义。

initializeDomainSession ​

Initialize Domain Session 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { initializeDomainSession } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare function initializeDomainSession(domainPack: DomainPackSpec, options?: DomainSessionInitOptions): DomainSessionInitialization;

调用签名 ​

text
initializeDomainSession(domainPack: DomainPackSpec, options?: DomainSessionInitOptions): DomainSessionInitialization

参数 ​

参数类型必需说明
domainPackDomainPackSpec是必需参数;接受的值由类型列定义。
optionsDomainSessionInitOptions否可选参数;接受的值由类型列定义。

返回值 ​

  • 类型: DomainSessionInitialization
  • 说明: 返回值契约由上述类型定义。

listLocalDomainPackFiles ​

List Local Domain Pack Files 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { listLocalDomainPackFiles } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare function listLocalDomainPackFiles(directory: string, recursive?: boolean, extensions?: string[]): Promise<string[]>;

调用签名 ​

text
listLocalDomainPackFiles(directory: string, recursive?: boolean, extensions?: string[]): Promise<string[]>

参数 ​

参数类型必需说明
directorystring是必需参数;接受的值由类型列定义。
recursiveboolean否可选参数;接受的值由类型列定义。
extensionsstring[]否可选参数;接受的值由类型列定义。

返回值 ​

  • 类型: Promise<string[]>
  • 说明: 返回值契约由上述类型定义。

loadDomainPackFile ​

Load Domain Pack File 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { loadDomainPackFile } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare function loadDomainPackFile(filePath: string): Promise<DomainPackSpec>;

调用签名 ​

text
loadDomainPackFile(filePath: string): Promise<DomainPackSpec>

参数 ​

参数类型必需说明
filePathstring是必需参数;接受的值由类型列定义。

返回值 ​

  • 类型: Promise<DomainPackSpec>
  • 说明: 返回值契约由上述类型定义。

parseDomainPackDocument ​

Parse Domain Pack Document 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { parseDomainPackDocument } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare function parseDomainPackDocument(raw: string, filePath?: string): DomainPackSpec;

调用签名 ​

text
parseDomainPackDocument(raw: string, filePath?: string): DomainPackSpec

参数 ​

参数类型必需说明
rawstring是必需参数;接受的值由类型列定义。
filePathstring否可选参数;接受的值由类型列定义。

返回值 ​

  • 类型: DomainPackSpec
  • 说明: 返回值契约由上述类型定义。

resolveWorkflowToolExecutionScope ​

Resolve Workflow Tool Execution Scope 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { resolveWorkflowToolExecutionScope } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare function resolveWorkflowToolExecutionScope(workflowStates: WorkflowStateBinding[], stateId: string): ToolExecutionScope;

调用签名 ​

text
resolveWorkflowToolExecutionScope(workflowStates: WorkflowStateBinding[], stateId: string): ToolExecutionScope

参数 ​

参数类型必需说明
workflowStatesWorkflowStateBinding[]是必需参数;接受的值由类型列定义。
stateIdstring是必需参数;接受的值由类型列定义。

返回值 ​

  • 类型: ToolExecutionScope
  • 说明: 返回值契约由上述类型定义。

validateDomainPackSpec ​

Validate Domain Pack Spec 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateDomainPackSpec } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare function validateDomainPackSpec(input: unknown): DomainPackSpec;

调用签名 ​

text
validateDomainPackSpec(input: unknown): DomainPackSpec

参数 ​

参数类型必需说明
inputunknown是必需参数;接受的值由类型列定义。

返回值 ​

  • 类型: DomainPackSpec
  • 说明: 返回值契约由上述类型定义。

validateWorkflowSpec ​

Validate Workflow Spec 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateWorkflowSpec } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export declare function validateWorkflowSpec(input: unknown): WorkflowSpec;

调用签名 ​

text
validateWorkflowSpec(input: unknown): WorkflowSpec

参数 ​

参数类型必需说明
inputunknown是必需参数;接受的值由类型列定义。

返回值 ​

  • 类型: WorkflowSpec
  • 说明: 返回值契约由上述类型定义。

BusinessRuleSpec ​

Business Rule Spec 接口,共包含 17 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { BusinessRuleSpec } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface BusinessRuleSpec extends VersionedSpec, SpecMetadata {
    scope: BusinessRuleScope;
    effect: BusinessRuleEffect;
    expression?: string;
    inputSchema?: JsonSchema;
    outputContractRef?: string;
    policyRefs?: string[];
    evaluationRefs?: string[];
    severity?: RiskLevel;
    metadata?: Record<string, unknown>;
}

契约成员 ​

成员种类签名说明
createdAt属性createdAt?: string公开属性;类型、只读和可选状态以签名列为准。
description属性description?: string公开属性;类型、只读和可选状态以签名列为准。
effect属性effect: BusinessRuleEffect公开属性;类型、只读和可选状态以签名列为准。
evaluationRefs属性evaluationRefs?: string[]公开属性;类型、只读和可选状态以签名列为准。
expression属性expression?: string公开属性;类型、只读和可选状态以签名列为准。
id属性id: string公开属性;类型、只读和可选状态以签名列为准。
inputSchema属性inputSchema?: JsonSchema公开属性;类型、只读和可选状态以签名列为准。
metadata属性metadata?: Record<string, unknown>公开属性;类型、只读和可选状态以签名列为准。
name属性name?: string公开属性;类型、只读和可选状态以签名列为准。
outputContractRef属性outputContractRef?: string公开属性;类型、只读和可选状态以签名列为准。
owner属性owner?: string公开属性;类型、只读和可选状态以签名列为准。
policyRefs属性policyRefs?: string[]公开属性;类型、只读和可选状态以签名列为准。
scope属性scope: BusinessRuleScope公开属性;类型、只读和可选状态以签名列为准。
severity属性severity?: RiskLevel公开属性;类型、只读和可选状态以签名列为准。
tags属性tags?: string[]公开属性;类型、只读和可选状态以签名列为准。
updatedAt属性updatedAt?: string公开属性;类型、只读和可选状态以签名列为准。
version属性version: string公开属性;类型、只读和可选状态以签名列为准。

DomainAgentPatch ​

Domain Agent Patch 接口,共包含 9 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { DomainAgentPatch } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface DomainAgentPatch {
    promptRefs: DomainPromptRef[];
    skillRefs: SkillRef[];
    toolRefs: string[];
    memoryProfileRef?: string;
    mcpProfileRef?: string;
    contextSpecRef?: SpecRef;
    reasoningProfileRef?: string;
    policyRefs?: string[];
    metadata: Record<string, unknown>;
}

契约成员 ​

成员种类签名说明
contextSpecRef属性contextSpecRef?: SpecRef公开属性;类型、只读和可选状态以签名列为准。
mcpProfileRef属性mcpProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
memoryProfileRef属性memoryProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
metadata属性metadata: Record<string, unknown>公开属性;类型、只读和可选状态以签名列为准。
policyRefs属性policyRefs?: string[]公开属性;类型、只读和可选状态以签名列为准。
promptRefs属性promptRefs: DomainPromptRef[]公开属性;类型、只读和可选状态以签名列为准。
reasoningProfileRef属性reasoningProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
skillRefs属性skillRefs: SkillRef[]公开属性;类型、只读和可选状态以签名列为准。
toolRefs属性toolRefs: string[]公开属性;类型、只读和可选状态以签名列为准。

DomainAgentPatchTarget ​

Domain Agent Patch Target 接口,共包含 12 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { DomainAgentPatchTarget } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface DomainAgentPatchTarget {
    [key: string]: unknown;
    id?: string;
    version?: string;
    name?: string;
    modelAlias?: string;
    systemInstructions?: string;
    promptRefs?: DomainPromptRef[];
    skillRefs?: SkillRef[];
    toolRefs?: string[];
    memoryProfileRef?: string;
    contextSpecRef?: SpecRef;
    policyRefs?: string[];
    metadata?: Record<string, unknown>;
}

契约成员 ​

成员种类签名说明
contextSpecRef属性contextSpecRef?: SpecRef公开属性;类型、只读和可选状态以签名列为准。
id属性id?: string公开属性;类型、只读和可选状态以签名列为准。
memoryProfileRef属性memoryProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
metadata属性metadata?: Record<string, unknown>公开属性;类型、只读和可选状态以签名列为准。
modelAlias属性modelAlias?: string公开属性;类型、只读和可选状态以签名列为准。
name属性name?: string公开属性;类型、只读和可选状态以签名列为准。
policyRefs属性policyRefs?: string[]公开属性;类型、只读和可选状态以签名列为准。
promptRefs属性promptRefs?: DomainPromptRef[]公开属性;类型、只读和可选状态以签名列为准。
skillRefs属性skillRefs?: SkillRef[]公开属性;类型、只读和可选状态以签名列为准。
systemInstructions属性systemInstructions?: string公开属性;类型、只读和可选状态以签名列为准。
toolRefs属性toolRefs?: string[]公开属性;类型、只读和可选状态以签名列为准。
version属性version?: string公开属性;类型、只读和可选状态以签名列为准。

DomainBindingResolution ​

Domain Binding Resolution 接口,共包含 23 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { DomainBindingResolution } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface DomainBindingResolution {
    domainPackRef: SpecRef;
    taskSchema?: TaskSchemaSpec;
    outputContract?: OutputContractSpec;
    sessionProfile?: SessionProfileSpec;
    workflow: WorkflowSpec;
    memoryProfile?: MemorySpec;
    mcpProfile?: MCPIntegrationSpec;
    contextProfile?: ContextSpec;
    reasoningProfile?: ReasoningSpec;
    mcpProfiles: MCPIntegrationSpec[];
    reasoningProfiles: ReasoningSpec[];
    policies: PolicySpec[];
    evaluations: EvaluationSpec[];
    regressionCases: RegressionSpec[];
    businessRules: BusinessRuleSpec[];
    tools: ToolSpec[];
    toolProfiles: ToolProfileSpec[];
    allowedSkills: SkillRef[];
    defaultSkills: SkillRef[];
    skillPolicies: SkillPolicyBinding[];
    allowedPromptRefs: DomainPromptRef[];
    defaultPromptRefs: DomainPromptRef[];
    workflowStates: WorkflowStateBinding[];
}

契约成员 ​

成员种类签名说明
allowedPromptRefs属性allowedPromptRefs: DomainPromptRef[]公开属性;类型、只读和可选状态以签名列为准。
allowedSkills属性allowedSkills: SkillRef[]公开属性;类型、只读和可选状态以签名列为准。
businessRules属性businessRules: BusinessRuleSpec[]公开属性;类型、只读和可选状态以签名列为准。
contextProfile属性contextProfile?: ContextSpec公开属性;类型、只读和可选状态以签名列为准。
defaultPromptRefs属性defaultPromptRefs: DomainPromptRef[]公开属性;类型、只读和可选状态以签名列为准。
defaultSkills属性defaultSkills: SkillRef[]公开属性;类型、只读和可选状态以签名列为准。
domainPackRef属性domainPackRef: SpecRef公开属性;类型、只读和可选状态以签名列为准。
evaluations属性evaluations: EvaluationSpec[]公开属性;类型、只读和可选状态以签名列为准。
mcpProfile属性mcpProfile?: MCPIntegrationSpec公开属性;类型、只读和可选状态以签名列为准。
mcpProfiles属性mcpProfiles: MCPIntegrationSpec[]公开属性;类型、只读和可选状态以签名列为准。
memoryProfile属性memoryProfile?: MemorySpec公开属性;类型、只读和可选状态以签名列为准。
outputContract属性outputContract?: OutputContractSpec公开属性;类型、只读和可选状态以签名列为准。
policies属性policies: PolicySpec[]公开属性;类型、只读和可选状态以签名列为准。
reasoningProfile属性reasoningProfile?: ReasoningSpec公开属性;类型、只读和可选状态以签名列为准。
reasoningProfiles属性reasoningProfiles: ReasoningSpec[]公开属性;类型、只读和可选状态以签名列为准。
regressionCases属性regressionCases: RegressionSpec[]公开属性;类型、只读和可选状态以签名列为准。
sessionProfile属性sessionProfile?: SessionProfileSpec公开属性;类型、只读和可选状态以签名列为准。
skillPolicies属性skillPolicies: SkillPolicyBinding[]公开属性;类型、只读和可选状态以签名列为准。
taskSchema属性taskSchema?: TaskSchemaSpec公开属性;类型、只读和可选状态以签名列为准。
toolProfiles属性toolProfiles: ToolProfileSpec[]公开属性;类型、只读和可选状态以签名列为准。
tools属性tools: ToolSpec[]公开属性;类型、只读和可选状态以签名列为准。
workflow属性workflow: WorkflowSpec公开属性;类型、只读和可选状态以签名列为准。
workflowStates属性workflowStates: WorkflowStateBinding[]公开属性;类型、只读和可选状态以签名列为准。

DomainCompilationAudit ​

Domain Compilation Audit 接口,共包含 9 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { DomainCompilationAudit } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface DomainCompilationAudit {
    compilationHash: string;
    domainPackRef: SpecRef;
    workflowRef: SpecRef;
    agentRef: SpecRef;
    promptRefs: DomainPromptRef[];
    skillRefs: SkillRef[];
    toolRefs: SpecRef[];
    mcpRefs: SpecRef[];
    workflowStateBindingsHash: string;
}

契约成员 ​

成员种类签名说明
agentRef属性agentRef: SpecRef公开属性;类型、只读和可选状态以签名列为准。
compilationHash属性compilationHash: string公开属性;类型、只读和可选状态以签名列为准。
domainPackRef属性domainPackRef: SpecRef公开属性;类型、只读和可选状态以签名列为准。
mcpRefs属性mcpRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
promptRefs属性promptRefs: DomainPromptRef[]公开属性;类型、只读和可选状态以签名列为准。
skillRefs属性skillRefs: SkillRef[]公开属性;类型、只读和可选状态以签名列为准。
toolRefs属性toolRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
workflowRef属性workflowRef: SpecRef公开属性;类型、只读和可选状态以签名列为准。
workflowStateBindingsHash属性workflowStateBindingsHash: string公开属性;类型、只读和可选状态以签名列为准。

DomainCompilationResult ​

Domain Compilation Result 接口,共包含 11 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { DomainCompilationResult } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface DomainCompilationResult {
    domainPack: DomainPackSpec;
    bindings: DomainBindingResolution;
    fsmProcess: FSMProcessSpec;
    workflowRef: SpecRef;
    compilerVersion: string;
    processHash: string;
    dependencySnapshot: WorkflowDependencySnapshot;
    harnessedSystem: HarnessedAgentSystemSpec;
    agentPatch: DomainAgentPatch;
    sessionInitialization: DomainSessionInitialization;
    audit: DomainCompilationAudit;
}

契约成员 ​

成员种类签名说明
agentPatch属性agentPatch: DomainAgentPatch公开属性;类型、只读和可选状态以签名列为准。
audit属性audit: DomainCompilationAudit公开属性;类型、只读和可选状态以签名列为准。
bindings属性bindings: DomainBindingResolution公开属性;类型、只读和可选状态以签名列为准。
compilerVersion属性compilerVersion: string公开属性;类型、只读和可选状态以签名列为准。
dependencySnapshot属性dependencySnapshot: WorkflowDependencySnapshot公开属性;类型、只读和可选状态以签名列为准。
domainPack属性domainPack: DomainPackSpec公开属性;类型、只读和可选状态以签名列为准。
fsmProcess属性fsmProcess: FSMProcessSpec公开属性;类型、只读和可选状态以签名列为准。
harnessedSystem属性harnessedSystem: HarnessedAgentSystemSpec公开属性;类型、只读和可选状态以签名列为准。
processHash属性processHash: string公开属性;类型、只读和可选状态以签名列为准。
sessionInitialization属性sessionInitialization: DomainSessionInitialization公开属性;类型、只读和可选状态以签名列为准。
workflowRef属性workflowRef: SpecRef公开属性;类型、只读和可选状态以签名列为准。

DomainCompileOptions ​

Domain Compile Options 接口,共包含 20 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { DomainCompileOptions } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface DomainCompileOptions {
    systemId?: string;
    systemVersion?: string;
    agentRef: SpecRef;
    agentSkillRefs?: SkillRef[];
    agentToolRefs?: string[];
    taskSchemaId?: string;
    workflowId?: string;
    sessionProfileId?: string;
    memoryProfileId?: string;
    mcpProfileId?: string;
    contextProfileId?: string;
    reasoningProfileId?: string;
    policyRefs?: string[];
    evaluationRefs?: string[];
    traceRef?: SpecRef;
    modelProfileRef?: SpecRef;
    replayRef?: SpecRef;
    regressionRef?: SpecRef;
    deploymentRef?: SpecRef;
    metadata?: Record<string, unknown>;
}

契约成员 ​

成员种类签名说明
agentRef属性agentRef: SpecRef公开属性;类型、只读和可选状态以签名列为准。
agentSkillRefs属性agentSkillRefs?: SkillRef[]公开属性;类型、只读和可选状态以签名列为准。
agentToolRefs属性agentToolRefs?: string[]公开属性;类型、只读和可选状态以签名列为准。
contextProfileId属性contextProfileId?: string公开属性;类型、只读和可选状态以签名列为准。
deploymentRef属性deploymentRef?: SpecRef公开属性;类型、只读和可选状态以签名列为准。
evaluationRefs属性evaluationRefs?: string[]公开属性;类型、只读和可选状态以签名列为准。
mcpProfileId属性mcpProfileId?: string公开属性;类型、只读和可选状态以签名列为准。
memoryProfileId属性memoryProfileId?: string公开属性;类型、只读和可选状态以签名列为准。
metadata属性metadata?: Record<string, unknown>公开属性;类型、只读和可选状态以签名列为准。
modelProfileRef属性modelProfileRef?: SpecRef公开属性;类型、只读和可选状态以签名列为准。
policyRefs属性policyRefs?: string[]公开属性;类型、只读和可选状态以签名列为准。
reasoningProfileId属性reasoningProfileId?: string公开属性;类型、只读和可选状态以签名列为准。
regressionRef属性regressionRef?: SpecRef公开属性;类型、只读和可选状态以签名列为准。
replayRef属性replayRef?: SpecRef公开属性;类型、只读和可选状态以签名列为准。
sessionProfileId属性sessionProfileId?: string公开属性;类型、只读和可选状态以签名列为准。
systemId属性systemId?: string公开属性;类型、只读和可选状态以签名列为准。
systemVersion属性systemVersion?: string公开属性;类型、只读和可选状态以签名列为准。
taskSchemaId属性taskSchemaId?: string公开属性;类型、只读和可选状态以签名列为准。
traceRef属性traceRef?: SpecRef公开属性;类型、只读和可选状态以签名列为准。
workflowId属性workflowId?: string公开属性;类型、只读和可选状态以签名列为准。

DomainPackRegistryEntry ​

Domain Pack Registry Entry 接口,共包含 2 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { DomainPackRegistryEntry } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface DomainPackRegistryEntry {
    spec: DomainPackSpec;
    source?: string;
}

契约成员 ​

成员种类签名说明
source属性source?: string公开属性;类型、只读和可选状态以签名列为准。
spec属性spec: DomainPackSpec公开属性;类型、只读和可选状态以签名列为准。

DomainPackSpec ​

Domain Pack Spec 接口,共包含 31 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { DomainPackSpec } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface DomainPackSpec extends VersionedSpec, SpecMetadata {
    name: string;
    taskSchemas: TaskSchemaSpec[];
    outputContracts: OutputContractSpec[];
    sessionProfiles?: SessionProfileSpec[];
    workflows: WorkflowSpec[];
    defaultWorkflow?: string;
    allowedSkills?: SkillRef[];
    defaultSkills?: SkillRef[];
    skillPolicies?: SkillPolicyBinding[];
    allowedPromptRefs?: DomainPromptRef[];
    defaultPromptRefs?: DomainPromptRef[];
    tools?: ToolSpec[];
    toolProfiles?: ToolProfileSpec[];
    mcpProfiles?: MCPIntegrationSpec[];
    memoryProfiles?: MemorySpec[];
    contextProfiles?: ContextSpec[];
    reasoningProfiles?: ReasoningSpec[];
    defaultReasoningProfile?: string;
    businessRules?: BusinessRuleSpec[];
    policies?: PolicySpec[];
    evaluationProfiles?: EvaluationSpec[];
    regressionCases?: RegressionSpec[];
    deploymentProfile?: DeploymentSpec;
    metadata?: Record<string, unknown>;
}

契约成员 ​

成员种类签名说明
allowedPromptRefs属性allowedPromptRefs?: DomainPromptRef[]公开属性;类型、只读和可选状态以签名列为准。
allowedSkills属性allowedSkills?: SkillRef[]公开属性;类型、只读和可选状态以签名列为准。
businessRules属性businessRules?: BusinessRuleSpec[]公开属性;类型、只读和可选状态以签名列为准。
contextProfiles属性contextProfiles?: ContextSpec[]公开属性;类型、只读和可选状态以签名列为准。
createdAt属性createdAt?: string公开属性;类型、只读和可选状态以签名列为准。
defaultPromptRefs属性defaultPromptRefs?: DomainPromptRef[]公开属性;类型、只读和可选状态以签名列为准。
defaultReasoningProfile属性defaultReasoningProfile?: string公开属性;类型、只读和可选状态以签名列为准。
defaultSkills属性defaultSkills?: SkillRef[]公开属性;类型、只读和可选状态以签名列为准。
defaultWorkflow属性defaultWorkflow?: string公开属性;类型、只读和可选状态以签名列为准。
deploymentProfile属性deploymentProfile?: DeploymentSpec公开属性;类型、只读和可选状态以签名列为准。
description属性description?: string公开属性;类型、只读和可选状态以签名列为准。
evaluationProfiles属性evaluationProfiles?: EvaluationSpec[]公开属性;类型、只读和可选状态以签名列为准。
id属性id: string公开属性;类型、只读和可选状态以签名列为准。
mcpProfiles属性mcpProfiles?: MCPIntegrationSpec[]公开属性;类型、只读和可选状态以签名列为准。
memoryProfiles属性memoryProfiles?: MemorySpec[]公开属性;类型、只读和可选状态以签名列为准。
metadata属性metadata?: Record<string, unknown>公开属性;类型、只读和可选状态以签名列为准。
name属性name: string公开属性;类型、只读和可选状态以签名列为准。
outputContracts属性outputContracts: OutputContractSpec[]公开属性;类型、只读和可选状态以签名列为准。
owner属性owner?: string公开属性;类型、只读和可选状态以签名列为准。
policies属性policies?: PolicySpec[]公开属性;类型、只读和可选状态以签名列为准。
reasoningProfiles属性reasoningProfiles?: ReasoningSpec[]公开属性;类型、只读和可选状态以签名列为准。
regressionCases属性regressionCases?: RegressionSpec[]公开属性;类型、只读和可选状态以签名列为准。
sessionProfiles属性sessionProfiles?: SessionProfileSpec[]公开属性;类型、只读和可选状态以签名列为准。
skillPolicies属性skillPolicies?: SkillPolicyBinding[]公开属性;类型、只读和可选状态以签名列为准。
tags属性tags?: string[]公开属性;类型、只读和可选状态以签名列为准。
taskSchemas属性taskSchemas: TaskSchemaSpec[]公开属性;类型、只读和可选状态以签名列为准。
toolProfiles属性toolProfiles?: ToolProfileSpec[]公开属性;类型、只读和可选状态以签名列为准。
tools属性tools?: ToolSpec[]公开属性;类型、只读和可选状态以签名列为准。
updatedAt属性updatedAt?: string公开属性;类型、只读和可选状态以签名列为准。
version属性version: string公开属性;类型、只读和可选状态以签名列为准。
workflows属性workflows: WorkflowSpec[]公开属性;类型、只读和可选状态以签名列为准。

DomainPromptRef ​

Domain Prompt Ref 接口,共包含 5 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { DomainPromptRef } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface DomainPromptRef extends SpecRef {
    required?: boolean;
    priority?: number;
}

契约成员 ​

成员种类签名说明
id属性id: string公开属性;类型、只读和可选状态以签名列为准。
priority属性priority?: number公开属性;类型、只读和可选状态以签名列为准。
required属性required?: boolean公开属性;类型、只读和可选状态以签名列为准。
revision属性revision?: string公开属性;类型、只读和可选状态以签名列为准。
version属性version?: string公开属性;类型、只读和可选状态以签名列为准。

DomainSessionInitialization ​

Domain Session Initialization 接口,共包含 10 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { DomainSessionInitialization } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface DomainSessionInitialization {
    domainPackRef: SpecRef;
    sessionProfileRef?: SpecRef;
    metadata: Record<string, unknown>;
    memoryProfileRef?: string;
    contextProfileRef?: string;
    reasoningProfileRef?: string;
    toolProfileRef?: string;
    mcpProfileRef?: string;
    skillPolicyRef?: string;
    policyRefs?: string[];
}

契约成员 ​

成员种类签名说明
contextProfileRef属性contextProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
domainPackRef属性domainPackRef: SpecRef公开属性;类型、只读和可选状态以签名列为准。
mcpProfileRef属性mcpProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
memoryProfileRef属性memoryProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
metadata属性metadata: Record<string, unknown>公开属性;类型、只读和可选状态以签名列为准。
policyRefs属性policyRefs?: string[]公开属性;类型、只读和可选状态以签名列为准。
reasoningProfileRef属性reasoningProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
sessionProfileRef属性sessionProfileRef?: SpecRef公开属性;类型、只读和可选状态以签名列为准。
skillPolicyRef属性skillPolicyRef?: string公开属性;类型、只读和可选状态以签名列为准。
toolProfileRef属性toolProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。

DomainSessionInitOptions ​

Domain Session Init Options 接口,共包含 2 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { DomainSessionInitOptions } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface DomainSessionInitOptions {
    profileId?: string;
    metadata?: Record<string, unknown>;
}

契约成员 ​

成员种类签名说明
metadata属性metadata?: Record<string, unknown>公开属性;类型、只读和可选状态以签名列为准。
profileId属性profileId?: string公开属性;类型、只读和可选状态以签名列为准。

LocalDomainPackLoaderOptions ​

Local Domain Pack Loader Options 接口,共包含 3 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { LocalDomainPackLoaderOptions } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface LocalDomainPackLoaderOptions {
    directories: string[];
    recursive?: boolean;
    extensions?: string[];
}

契约成员 ​

成员种类签名说明
directories属性directories: string[]公开属性;类型、只读和可选状态以签名列为准。
extensions属性extensions?: string[]公开属性;类型、只读和可选状态以签名列为准。
recursive属性recursive?: boolean公开属性;类型、只读和可选状态以签名列为准。

ReasoningSpec ​

Reasoning Spec 接口,共包含 16 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { ReasoningSpec } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface ReasoningSpec extends VersionedSpec, SpecMetadata {
    thinkingMode: DomainThinkingMode;
    agenticMode: DomainAgenticReasoningMode;
    maxSteps?: number;
    persist?: DomainReasoningPersistence;
    plannerRef?: string;
    reasonerRef?: string;
    metadataSchema?: JsonSchema;
    metadata?: Record<string, unknown>;
}

契约成员 ​

成员种类签名说明
agenticMode属性agenticMode: DomainAgenticReasoningMode公开属性;类型、只读和可选状态以签名列为准。
createdAt属性createdAt?: string公开属性;类型、只读和可选状态以签名列为准。
description属性description?: string公开属性;类型、只读和可选状态以签名列为准。
id属性id: string公开属性;类型、只读和可选状态以签名列为准。
maxSteps属性maxSteps?: number公开属性;类型、只读和可选状态以签名列为准。
metadata属性metadata?: Record<string, unknown>公开属性;类型、只读和可选状态以签名列为准。
metadataSchema属性metadataSchema?: JsonSchema公开属性;类型、只读和可选状态以签名列为准。
name属性name?: string公开属性;类型、只读和可选状态以签名列为准。
owner属性owner?: string公开属性;类型、只读和可选状态以签名列为准。
persist属性persist?: DomainReasoningPersistence公开属性;类型、只读和可选状态以签名列为准。
plannerRef属性plannerRef?: string公开属性;类型、只读和可选状态以签名列为准。
reasonerRef属性reasonerRef?: string公开属性;类型、只读和可选状态以签名列为准。
tags属性tags?: string[]公开属性;类型、只读和可选状态以签名列为准。
thinkingMode属性thinkingMode: DomainThinkingMode公开属性;类型、只读和可选状态以签名列为准。
updatedAt属性updatedAt?: string公开属性;类型、只读和可选状态以签名列为准。
version属性version: string公开属性;类型、只读和可选状态以签名列为准。

RiskProfileSpec ​

Risk Profile Spec 接口,共包含 2 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { RiskProfileSpec } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface RiskProfileSpec {
    defaultRiskLevel: RiskLevel;
    escalationPolicyRef?: string;
}

契约成员 ​

成员种类签名说明
defaultRiskLevel属性defaultRiskLevel: RiskLevel公开属性;类型、只读和可选状态以签名列为准。
escalationPolicyRef属性escalationPolicyRef?: string公开属性;类型、只读和可选状态以签名列为准。

SessionProfileSpec ​

Session Profile Spec 接口,共包含 17 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { SessionProfileSpec } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface SessionProfileSpec extends VersionedSpec, SpecMetadata {
    metadataSchema?: JsonSchema;
    defaultMetadata?: Record<string, unknown>;
    defaultMemoryProfileRef?: string;
    defaultContextProfileRef?: string;
    defaultReasoningProfileRef?: string;
    defaultToolProfileRef?: string;
    defaultMCPProfileRef?: string;
    defaultSkillPolicyRef?: string;
    defaultPolicyRefs?: string[];
}

契约成员 ​

成员种类签名说明
createdAt属性createdAt?: string公开属性;类型、只读和可选状态以签名列为准。
defaultContextProfileRef属性defaultContextProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
defaultMCPProfileRef属性defaultMCPProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
defaultMemoryProfileRef属性defaultMemoryProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
defaultMetadata属性defaultMetadata?: Record<string, unknown>公开属性;类型、只读和可选状态以签名列为准。
defaultPolicyRefs属性defaultPolicyRefs?: string[]公开属性;类型、只读和可选状态以签名列为准。
defaultReasoningProfileRef属性defaultReasoningProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
defaultSkillPolicyRef属性defaultSkillPolicyRef?: string公开属性;类型、只读和可选状态以签名列为准。
defaultToolProfileRef属性defaultToolProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
description属性description?: string公开属性;类型、只读和可选状态以签名列为准。
id属性id: string公开属性;类型、只读和可选状态以签名列为准。
metadataSchema属性metadataSchema?: JsonSchema公开属性;类型、只读和可选状态以签名列为准。
name属性name?: string公开属性;类型、只读和可选状态以签名列为准。
owner属性owner?: string公开属性;类型、只读和可选状态以签名列为准。
tags属性tags?: string[]公开属性;类型、只读和可选状态以签名列为准。
updatedAt属性updatedAt?: string公开属性;类型、只读和可选状态以签名列为准。
version属性version: string公开属性;类型、只读和可选状态以签名列为准。

SkillPolicyBinding ​

Skill Policy Binding 接口,共包含 14 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { SkillPolicyBinding } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface SkillPolicyBinding extends VersionedSpec, SpecMetadata {
    skillRef: SkillRef;
    policyRefs?: string[];
    allowedTools?: string[];
    requiredTools?: string[];
    trustLevel?: 'trusted' | 'reviewed' | 'untrusted';
    metadata?: Record<string, unknown>;
}

契约成员 ​

成员种类签名说明
allowedTools属性allowedTools?: string[]公开属性;类型、只读和可选状态以签名列为准。
createdAt属性createdAt?: string公开属性;类型、只读和可选状态以签名列为准。
description属性description?: string公开属性;类型、只读和可选状态以签名列为准。
id属性id: string公开属性;类型、只读和可选状态以签名列为准。
metadata属性metadata?: Record<string, unknown>公开属性;类型、只读和可选状态以签名列为准。
name属性name?: string公开属性;类型、只读和可选状态以签名列为准。
owner属性owner?: string公开属性;类型、只读和可选状态以签名列为准。
policyRefs属性policyRefs?: string[]公开属性;类型、只读和可选状态以签名列为准。
requiredTools属性requiredTools?: string[]公开属性;类型、只读和可选状态以签名列为准。
skillRef属性skillRef: SkillRef公开属性;类型、只读和可选状态以签名列为准。
tags属性tags?: string[]公开属性;类型、只读和可选状态以签名列为准。
trustLevel属性trustLevel?: "trusted" | "reviewed" | "untrusted"公开属性;类型、只读和可选状态以签名列为准。
updatedAt属性updatedAt?: string公开属性;类型、只读和可选状态以签名列为准。
version属性version: string公开属性;类型、只读和可选状态以签名列为准。

TaskInstance ​

Task Instance 接口,共包含 8 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { TaskInstance } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface TaskInstance<TInput = unknown, TConstraints = unknown> {
    id: string;
    domainId: string;
    taskSchemaId: string;
    input: TInput;
    constraints?: TConstraints;
    acceptanceCriteria?: unknown;
    riskLevel?: RiskLevel;
    metadata?: Record<string, unknown>;
}

契约成员 ​

成员种类签名说明
acceptanceCriteria属性acceptanceCriteria?: unknown公开属性;类型、只读和可选状态以签名列为准。
constraints属性constraints?: TConstraints公开属性;类型、只读和可选状态以签名列为准。
domainId属性domainId: string公开属性;类型、只读和可选状态以签名列为准。
id属性id: string公开属性;类型、只读和可选状态以签名列为准。
input属性input: TInput公开属性;类型、只读和可选状态以签名列为准。
metadata属性metadata?: Record<string, unknown>公开属性;类型、只读和可选状态以签名列为准。
riskLevel属性riskLevel?: RiskLevel公开属性;类型、只读和可选状态以签名列为准。
taskSchemaId属性taskSchemaId: string公开属性;类型、只读和可选状态以签名列为准。

TaskSchemaSpec ​

Task Schema Spec 接口,共包含 16 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { TaskSchemaSpec } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface TaskSchemaSpec extends VersionedSpec, SpecMetadata {
    taskType: string;
    inputSchema: JsonSchema;
    constraintsSchema?: JsonSchema;
    acceptanceCriteriaSchema?: JsonSchema;
    outputContractRef: string;
    riskProfile?: RiskProfileSpec;
    defaultWorkflowRef?: string;
    defaultSkillRefs?: SkillRef[];
}

契约成员 ​

成员种类签名说明
acceptanceCriteriaSchema属性acceptanceCriteriaSchema?: JsonSchema公开属性;类型、只读和可选状态以签名列为准。
constraintsSchema属性constraintsSchema?: JsonSchema公开属性;类型、只读和可选状态以签名列为准。
createdAt属性createdAt?: string公开属性;类型、只读和可选状态以签名列为准。
defaultSkillRefs属性defaultSkillRefs?: SkillRef[]公开属性;类型、只读和可选状态以签名列为准。
defaultWorkflowRef属性defaultWorkflowRef?: string公开属性;类型、只读和可选状态以签名列为准。
description属性description?: string公开属性;类型、只读和可选状态以签名列为准。
id属性id: string公开属性;类型、只读和可选状态以签名列为准。
inputSchema属性inputSchema: JsonSchema公开属性;类型、只读和可选状态以签名列为准。
name属性name?: string公开属性;类型、只读和可选状态以签名列为准。
outputContractRef属性outputContractRef: string公开属性;类型、只读和可选状态以签名列为准。
owner属性owner?: string公开属性;类型、只读和可选状态以签名列为准。
riskProfile属性riskProfile?: RiskProfileSpec公开属性;类型、只读和可选状态以签名列为准。
tags属性tags?: string[]公开属性;类型、只读和可选状态以签名列为准。
taskType属性taskType: string公开属性;类型、只读和可选状态以签名列为准。
updatedAt属性updatedAt?: string公开属性;类型、只读和可选状态以签名列为准。
version属性version: string公开属性;类型、只读和可选状态以签名列为准。

WorkflowCompileOptions ​

Workflow Compile Options 接口,共包含 3 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { WorkflowCompileOptions } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface WorkflowCompileOptions {
    workflowId?: string;
    /** @deprecated Harness FSM identity is framework-owned and cannot be overridden. */
    fsmProcessId?: string;
    agentRef?: SpecRef;
}

契约成员 ​

成员种类签名说明
agentRef属性agentRef?: SpecRef公开属性;类型、只读和可选状态以签名列为准。
fsmProcessId属性fsmProcessId?: string公开属性;类型、只读和可选状态以签名列为准。
workflowId属性workflowId?: string公开属性;类型、只读和可选状态以签名列为准。

WorkflowDependencySnapshot ​

Workflow Dependency Snapshot 接口,共包含 23 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { WorkflowDependencySnapshot } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface WorkflowDependencySnapshot {
    domainPackRefs: SpecRef[];
    taskSchemaRefs: SpecRef[];
    outputContractRefs: SpecRef[];
    sessionProfileRefs: SpecRef[];
    agentRefs: SpecRef[];
    skillRefs: SpecRef[];
    skillPolicyRefs: SpecRef[];
    toolRefs: SpecRef[];
    toolProfileRefs: SpecRef[];
    mcpProfileRefs: SpecRef[];
    memoryProfileRefs: SpecRef[];
    contextProfileRefs: SpecRef[];
    reasoningProfileRefs: SpecRef[];
    workspaceProfileRefs: SpecRef[];
    businessRuleRefs: SpecRef[];
    policyRefs: SpecRef[];
    evaluationRefs: SpecRef[];
    traceRefs: SpecRef[];
    modelProfileRefs: SpecRef[];
    replayRefs: SpecRef[];
    regressionRefs: SpecRef[];
    deploymentRefs: SpecRef[];
    dependencyHash: string;
}

契约成员 ​

成员种类签名说明
agentRefs属性agentRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
businessRuleRefs属性businessRuleRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
contextProfileRefs属性contextProfileRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
dependencyHash属性dependencyHash: string公开属性;类型、只读和可选状态以签名列为准。
deploymentRefs属性deploymentRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
domainPackRefs属性domainPackRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
evaluationRefs属性evaluationRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
mcpProfileRefs属性mcpProfileRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
memoryProfileRefs属性memoryProfileRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
modelProfileRefs属性modelProfileRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
outputContractRefs属性outputContractRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
policyRefs属性policyRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
reasoningProfileRefs属性reasoningProfileRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
regressionRefs属性regressionRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
replayRefs属性replayRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
sessionProfileRefs属性sessionProfileRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
skillPolicyRefs属性skillPolicyRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
skillRefs属性skillRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
taskSchemaRefs属性taskSchemaRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
toolProfileRefs属性toolProfileRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
toolRefs属性toolRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
traceRefs属性traceRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
workspaceProfileRefs属性workspaceProfileRefs: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。

WorkflowSpec ​

Workflow Spec 接口,共包含 12 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { WorkflowSpec } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface WorkflowSpec extends VersionedSpec, SpecMetadata {
    initialState: string;
    terminalStates: string[];
    states: WorkflowStateSpec[];
    transitions: WorkflowTransitionSpec[];
}

契约成员 ​

成员种类签名说明
createdAt属性createdAt?: string公开属性;类型、只读和可选状态以签名列为准。
description属性description?: string公开属性;类型、只读和可选状态以签名列为准。
id属性id: string公开属性;类型、只读和可选状态以签名列为准。
initialState属性initialState: string公开属性;类型、只读和可选状态以签名列为准。
name属性name?: string公开属性;类型、只读和可选状态以签名列为准。
owner属性owner?: string公开属性;类型、只读和可选状态以签名列为准。
states属性states: WorkflowStateSpec[]公开属性;类型、只读和可选状态以签名列为准。
tags属性tags?: string[]公开属性;类型、只读和可选状态以签名列为准。
terminalStates属性terminalStates: string[]公开属性;类型、只读和可选状态以签名列为准。
transitions属性transitions: WorkflowTransitionSpec[]公开属性;类型、只读和可选状态以签名列为准。
updatedAt属性updatedAt?: string公开属性;类型、只读和可选状态以签名列为准。
version属性version: string公开属性;类型、只读和可选状态以签名列为准。

WorkflowStateBinding ​

Workflow State Binding 接口,共包含 18 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { WorkflowStateBinding } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface WorkflowStateBinding {
    stateId: string;
    allowedTools: string[];
    allowedSkills: string[];
    requiredSkills: string[];
    allowedPromptRefs: DomainPromptRef[];
    requiredPromptRefs: DomainPromptRef[];
    allowedMCPProfiles: string[];
    memoryPolicyRef?: string;
    reasoningProfileRef?: string;
    policyRefs: string[];
    evaluationRefs: string[];
    toolProfileRefs?: SpecRef[];
    allowedToolRefs?: SpecRef[];
    deniedToolRefs?: SpecRef[];
    allowedMCPProfileRefs?: SpecRef[];
    humanApprovalPolicyRef?: SpecRef;
    permissionScopes?: string[];
    capabilityLoadPolicy?: 'eager' | 'lazy' | 'model_selected';
}

契约成员 ​

成员种类签名说明
allowedMCPProfileRefs属性allowedMCPProfileRefs?: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
allowedMCPProfiles属性allowedMCPProfiles: string[]公开属性;类型、只读和可选状态以签名列为准。
allowedPromptRefs属性allowedPromptRefs: DomainPromptRef[]公开属性;类型、只读和可选状态以签名列为准。
allowedSkills属性allowedSkills: string[]公开属性;类型、只读和可选状态以签名列为准。
allowedToolRefs属性allowedToolRefs?: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
allowedTools属性allowedTools: string[]公开属性;类型、只读和可选状态以签名列为准。
capabilityLoadPolicy属性capabilityLoadPolicy?: "eager" | "lazy" | "model_selected"公开属性;类型、只读和可选状态以签名列为准。
deniedToolRefs属性deniedToolRefs?: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
evaluationRefs属性evaluationRefs: string[]公开属性;类型、只读和可选状态以签名列为准。
humanApprovalPolicyRef属性humanApprovalPolicyRef?: SpecRef公开属性;类型、只读和可选状态以签名列为准。
memoryPolicyRef属性memoryPolicyRef?: string公开属性;类型、只读和可选状态以签名列为准。
permissionScopes属性permissionScopes?: string[]公开属性;类型、只读和可选状态以签名列为准。
policyRefs属性policyRefs: string[]公开属性;类型、只读和可选状态以签名列为准。
reasoningProfileRef属性reasoningProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
requiredPromptRefs属性requiredPromptRefs: DomainPromptRef[]公开属性;类型、只读和可选状态以签名列为准。
requiredSkills属性requiredSkills: string[]公开属性;类型、只读和可选状态以签名列为准。
stateId属性stateId: string公开属性;类型、只读和可选状态以签名列为准。
toolProfileRefs属性toolProfileRefs?: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。

WorkflowStateSpec ​

Workflow State Spec 接口,共包含 33 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { WorkflowStateSpec } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface WorkflowStateSpec extends SpecMetadata {
    id: string;
    goal: string;
    inputContract?: JsonSchema;
    outputContract?: JsonSchema;
    allowedTools?: string[];
    allowedSkills?: string[];
    requiredSkills?: string[];
    allowedPromptRefs?: DomainPromptRef[];
    requiredPromptRefs?: DomainPromptRef[];
    allowedMCPProfiles?: string[];
    toolProfileRefs?: SpecRef[];
    allowedToolRefs?: SpecRef[];
    deniedToolRefs?: SpecRef[];
    allowedMCPProfileRefs?: SpecRef[];
    humanApprovalPolicyRef?: SpecRef;
    permissionScopes?: string[];
    capabilityLoadPolicy?: 'eager' | 'lazy' | 'model_selected';
    memoryPolicyRef?: string;
    reasoningProfileRef?: string;
    policyRefs?: string[];
    evaluationRefs?: string[];
    humanReviewRef?: string;
    humanReviewPolicy?: HumanReviewPolicySpec;
    timeoutMs?: number;
    timeoutPolicy?: TimeoutPolicySpec;
    retryPolicyRef?: string;
    retryPolicy?: RetryPolicySpec;
}

契约成员 ​

成员种类签名说明
allowedMCPProfileRefs属性allowedMCPProfileRefs?: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
allowedMCPProfiles属性allowedMCPProfiles?: string[]公开属性;类型、只读和可选状态以签名列为准。
allowedPromptRefs属性allowedPromptRefs?: DomainPromptRef[]公开属性;类型、只读和可选状态以签名列为准。
allowedSkills属性allowedSkills?: string[]公开属性;类型、只读和可选状态以签名列为准。
allowedToolRefs属性allowedToolRefs?: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
allowedTools属性allowedTools?: string[]公开属性;类型、只读和可选状态以签名列为准。
capabilityLoadPolicy属性capabilityLoadPolicy?: "eager" | "lazy" | "model_selected"公开属性;类型、只读和可选状态以签名列为准。
createdAt属性createdAt?: string公开属性;类型、只读和可选状态以签名列为准。
deniedToolRefs属性deniedToolRefs?: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
description属性description?: string公开属性;类型、只读和可选状态以签名列为准。
evaluationRefs属性evaluationRefs?: string[]公开属性;类型、只读和可选状态以签名列为准。
goal属性goal: string公开属性;类型、只读和可选状态以签名列为准。
humanApprovalPolicyRef属性humanApprovalPolicyRef?: SpecRef公开属性;类型、只读和可选状态以签名列为准。
humanReviewPolicy属性humanReviewPolicy?: HumanReviewPolicySpec公开属性;类型、只读和可选状态以签名列为准。
humanReviewRef属性humanReviewRef?: string公开属性;类型、只读和可选状态以签名列为准。
id属性id: string公开属性;类型、只读和可选状态以签名列为准。
inputContract属性inputContract?: JsonSchema公开属性;类型、只读和可选状态以签名列为准。
memoryPolicyRef属性memoryPolicyRef?: string公开属性;类型、只读和可选状态以签名列为准。
name属性name?: string公开属性;类型、只读和可选状态以签名列为准。
outputContract属性outputContract?: JsonSchema公开属性;类型、只读和可选状态以签名列为准。
owner属性owner?: string公开属性;类型、只读和可选状态以签名列为准。
permissionScopes属性permissionScopes?: string[]公开属性;类型、只读和可选状态以签名列为准。
policyRefs属性policyRefs?: string[]公开属性;类型、只读和可选状态以签名列为准。
reasoningProfileRef属性reasoningProfileRef?: string公开属性;类型、只读和可选状态以签名列为准。
requiredPromptRefs属性requiredPromptRefs?: DomainPromptRef[]公开属性;类型、只读和可选状态以签名列为准。
requiredSkills属性requiredSkills?: string[]公开属性;类型、只读和可选状态以签名列为准。
retryPolicy属性retryPolicy?: RetryPolicySpec公开属性;类型、只读和可选状态以签名列为准。
retryPolicyRef属性retryPolicyRef?: string公开属性;类型、只读和可选状态以签名列为准。
tags属性tags?: string[]公开属性;类型、只读和可选状态以签名列为准。
timeoutMs属性timeoutMs?: number公开属性;类型、只读和可选状态以签名列为准。
timeoutPolicy属性timeoutPolicy?: TimeoutPolicySpec公开属性;类型、只读和可选状态以签名列为准。
toolProfileRefs属性toolProfileRefs?: SpecRef[]公开属性;类型、只读和可选状态以签名列为准。
updatedAt属性updatedAt?: string公开属性;类型、只读和可选状态以签名列为准。

WorkflowTransitionSpec ​

Workflow Transition Spec 接口,共包含 4 个公开字段或方法。

  • 种类: 接口
  • 导入: import type { WorkflowTransitionSpec } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export interface WorkflowTransitionSpec {
    from: string;
    to: string;
    guard?: string;
    description?: string;
}

契约成员 ​

成员种类签名说明
description属性description?: string公开属性;类型、只读和可选状态以签名列为准。
from属性from: string公开属性;类型、只读和可选状态以签名列为准。
guard属性guard?: string公开属性;类型、只读和可选状态以签名列为准。
to属性to: string公开属性;类型、只读和可选状态以签名列为准。

BusinessRuleEffect ​

Business Rule Effect 公共类型别名;完整类型表达式见声明。

  • 种类: 类型
  • 导入: import type { BusinessRuleEffect } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export type BusinessRuleEffect = 'constraint' | 'precondition' | 'postcondition' | 'guidance';

BusinessRuleScope ​

Business Rule Scope 公共类型别名;完整类型表达式见声明。

  • 种类: 类型
  • 导入: import type { BusinessRuleScope } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export type BusinessRuleScope = 'domain' | 'task' | 'workflow' | 'state' | 'tool' | 'memory' | 'output';

DomainAgenticReasoningMode ​

Domain Agentic Reasoning Mode 公共类型别名;完整类型表达式见声明。

  • 种类: 类型
  • 导入: import type { DomainAgenticReasoningMode } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export type DomainAgenticReasoningMode = 'react' | 'fsm_react' | 'tot' | 'critique';

DomainPackOverlay ​

Domain Pack Overlay 公共类型别名;完整类型表达式见声明。

  • 种类: 类型
  • 导入: import type { DomainPackOverlay } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export type DomainPackOverlay = Partial<Omit<DomainPackSpec, 'id' | 'version' | 'name' | 'taskSchemas' | 'workflows'>> & {
    id?: string;
    version?: string;
    name?: string;
    taskSchemas?: TaskSchemaSpec[];
    workflows?: WorkflowSpec[];
    remove?: DomainPackOverlayRemovals;
};

DomainPackOverlayCollection ​

Domain Pack Overlay Collection 公共类型别名;完整类型表达式见声明。

  • 种类: 类型
  • 导入: import type { DomainPackOverlayCollection } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export type DomainPackOverlayCollection = 'taskSchemas' | 'outputContracts' | 'sessionProfiles' | 'workflows' | 'allowedSkills' | 'defaultSkills' | 'skillPolicies' | 'allowedPromptRefs' | 'defaultPromptRefs' | 'tools' | 'toolProfiles' | 'mcpProfiles' | 'memoryProfiles' | 'contextProfiles' | 'reasoningProfiles' | 'businessRules' | 'policies' | 'evaluationProfiles' | 'regressionCases';

DomainPackOverlayRemovals ​

Domain Pack Overlay Removals 公共类型别名;完整类型表达式见声明。

  • 种类: 类型
  • 导入: import type { DomainPackOverlayRemovals } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export type DomainPackOverlayRemovals = Partial<Record<DomainPackOverlayCollection, string[]>>;

DomainReasoningPersistence ​

Domain Reasoning Persistence 公共类型别名;完整类型表达式见声明。

  • 种类: 类型
  • 导入: import type { DomainReasoningPersistence } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export type DomainReasoningPersistence = 'summary_only' | 'events_only';

DomainThinkingMode ​

Domain Thinking Mode 公共类型别名;完整类型表达式见声明。

  • 种类: 类型
  • 导入: import type { DomainThinkingMode } from '@codesoul-co/hypha-domain';
  • 源码模块: index

声明 ​

text
export type DomainThinkingMode = 'none' | 'summary' | 'structured';