@codesoul-co/hypha-domain / index
- 包索引:
@codesoul-co/hypha-domain - 源码:
packages/domain/src/index.ts - 导出数: 80
模块用法
聚合 @codesoul-co/hypha-domain 的公共入口导出;应用应从包入口导入这些 Symbol,不应依赖内部文件路径。
从包入口导入
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 或默认配置;应复用这些导出,避免在应用中复制内部值。
运行时校验示例
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(): DomainCompiler | Domain Compiler 类,共公开 2 个构造函数或成员;精确签名见本条目的声明与成员表。 |
DomainPackRegistry | 类 | new DomainPackRegistry(): DomainPackRegistry | Domain Pack Registry 类,共公开 6 个构造函数或成员;精确签名见本条目的声明与成员表。 |
LocalDomainPackLoader | 类 | new LocalDomainPackLoader(options: LocalDomainPackLoaderOptions): LocalDomainPackLoader | Local Domain Pack Loader 类,共公开 3 个构造函数或成员;精确签名见本条目的声明与成员表。 |
WorkflowCompiler | 类 | new WorkflowCompiler(): WorkflowCompiler | Workflow 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: BusinessRuleSpec | Business Rule Spec 的有效示例值。 |
businessRuleSpecJsonSchema | 常量 | const businessRuleSpecJsonSchema: JsonSchema | Business 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: DomainPackSpec | Domain Pack Spec 的有效示例值。 |
domainPackSpecJsonSchema | 常量 | const domainPackSpecJsonSchema: JsonSchema | Domain 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: ReasoningSpec | Reasoning Spec 的有效示例值。 |
reasoningSpecJsonSchema | 常量 | const reasoningSpecJsonSchema: JsonSchema | Reasoning 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: WorkflowSpec | Workflow Spec 的有效示例值。 |
workflowSpecJsonSchema | 常量 | const workflowSpecJsonSchema: JsonSchema | Workflow 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): TAgent | Apply Domain Agent Patch 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
compileDomainPackToHarnessedSystem | 函数 | compileDomainPackToHarnessedSystem(input: DomainPackSpec, options: DomainCompileOptions): DomainCompilationResult | Compile Domain Pack To Harnessed System 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
compileWorkflowToFSM | 函数 | compileWorkflowToFSM(domainPack: DomainPackSpec, options?: WorkflowCompileOptions): FSMProcessSpec | Compile Workflow To FSM 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
createWorkflowDependencySnapshot | 函数 | createWorkflowDependencySnapshot(input: Omit<WorkflowDependencySnapshot, "dependencyHash">): WorkflowDependencySnapshot | Create Workflow Dependency Snapshot 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
extendDomainPack | 函数 | extendDomainPack(base: DomainPackSpec, overlay: DomainPackOverlay): DomainPackSpec | Extend Domain Pack 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
initializeDomainSession | 函数 | initializeDomainSession(domainPack: DomainPackSpec, options?: DomainSessionInitOptions): DomainSessionInitialization | Initialize 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): DomainPackSpec | Parse Domain Pack Document 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
resolveWorkflowToolExecutionScope | 函数 | resolveWorkflowToolExecutionScope(workflowStates: WorkflowStateBinding[], stateId: string): ToolExecutionScope | Resolve Workflow Tool Execution Scope 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
validateDomainPackSpec | 函数 | validateDomainPackSpec(input: unknown): DomainPackSpec | Validate Domain Pack Spec 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
validateWorkflowSpec | 函数 | validateWorkflowSpec(input: unknown): WorkflowSpec | Validate Workflow Spec 函数,提供 1 个公开调用签名;参数与返回类型见下表。 |
BusinessRuleSpec | 接口 | interface BusinessRuleSpec extends VersionedSpec, SpecMetadata | Business Rule Spec 接口,共包含 17 个公开字段或方法。 |
DomainAgentPatch | 接口 | interface DomainAgentPatch | Domain Agent Patch 接口,共包含 9 个公开字段或方法。 |
DomainAgentPatchTarget | 接口 | interface DomainAgentPatchTarget | Domain Agent Patch Target 接口,共包含 12 个公开字段或方法。 |
DomainBindingResolution | 接口 | interface DomainBindingResolution | Domain Binding Resolution 接口,共包含 23 个公开字段或方法。 |
DomainCompilationAudit | 接口 | interface DomainCompilationAudit | Domain Compilation Audit 接口,共包含 9 个公开字段或方法。 |
DomainCompilationResult | 接口 | interface DomainCompilationResult | Domain Compilation Result 接口,共包含 11 个公开字段或方法。 |
DomainCompileOptions | 接口 | interface DomainCompileOptions | Domain Compile Options 接口,共包含 20 个公开字段或方法。 |
DomainPackRegistryEntry | 接口 | interface DomainPackRegistryEntry | Domain Pack Registry Entry 接口,共包含 2 个公开字段或方法。 |
DomainPackSpec | 接口 | interface DomainPackSpec extends VersionedSpec, SpecMetadata | Domain Pack Spec 接口,共包含 31 个公开字段或方法。 |
DomainPromptRef | 接口 | interface DomainPromptRef extends SpecRef | Domain Prompt Ref 接口,共包含 5 个公开字段或方法。 |
DomainSessionInitialization | 接口 | interface DomainSessionInitialization | Domain Session Initialization 接口,共包含 10 个公开字段或方法。 |
DomainSessionInitOptions | 接口 | interface DomainSessionInitOptions | Domain Session Init Options 接口,共包含 2 个公开字段或方法。 |
LocalDomainPackLoaderOptions | 接口 | interface LocalDomainPackLoaderOptions | Local Domain Pack Loader Options 接口,共包含 3 个公开字段或方法。 |
ReasoningSpec | 接口 | interface ReasoningSpec extends VersionedSpec, SpecMetadata | Reasoning Spec 接口,共包含 16 个公开字段或方法。 |
RiskProfileSpec | 接口 | interface RiskProfileSpec | Risk Profile Spec 接口,共包含 2 个公开字段或方法。 |
SessionProfileSpec | 接口 | interface SessionProfileSpec extends VersionedSpec, SpecMetadata | Session Profile Spec 接口,共包含 17 个公开字段或方法。 |
SkillPolicyBinding | 接口 | interface SkillPolicyBinding extends VersionedSpec, SpecMetadata | Skill Policy Binding 接口,共包含 14 个公开字段或方法。 |
TaskInstance | 接口 | interface TaskInstance | Task Instance 接口,共包含 8 个公开字段或方法。 |
TaskSchemaSpec | 接口 | interface TaskSchemaSpec extends VersionedSpec, SpecMetadata | Task Schema Spec 接口,共包含 16 个公开字段或方法。 |
WorkflowCompileOptions | 接口 | interface WorkflowCompileOptions | Workflow Compile Options 接口,共包含 3 个公开字段或方法。 |
WorkflowDependencySnapshot | 接口 | interface WorkflowDependencySnapshot | Workflow Dependency Snapshot 接口,共包含 23 个公开字段或方法。 |
WorkflowSpec | 接口 | interface WorkflowSpec extends VersionedSpec, SpecMetadata | Workflow Spec 接口,共包含 12 个公开字段或方法。 |
WorkflowStateBinding | 接口 | interface WorkflowStateBinding | Workflow State Binding 接口,共包含 18 个公开字段或方法。 |
WorkflowStateSpec | 接口 | interface WorkflowStateSpec extends SpecMetadata | Workflow State Spec 接口,共包含 33 个公开字段或方法。 |
WorkflowTransitionSpec | 接口 | interface WorkflowTransitionSpec | Workflow 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
声明
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
声明
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
声明
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
声明
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
声明
export declare const businessRuleEffectSchema: z.ZodEnum<["constraint", "precondition", "postcondition", "guidance"]>;businessRuleScopeSchema
Business Rule Scope 的运行时 Schema。
- 种类: 常量
- 导入:
import { businessRuleScopeSchema } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
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
声明
export declare const businessRuleSpecDefinition: SpecSchemaDefinition<BusinessRuleSpec>;businessRuleSpecExample
Business Rule Spec 的有效示例值。
- 种类: 常量
- 导入:
import { businessRuleSpecExample } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare const businessRuleSpecExample: BusinessRuleSpec;businessRuleSpecJsonSchema
Business Rule Spec 的 JSON Schema。
- 种类: 常量
- 导入:
import { businessRuleSpecJsonSchema } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare const businessRuleSpecJsonSchema: JsonSchema;businessRuleSpecSchema
Business Rule Spec 的运行时 Schema。
- 种类: 常量
- 导入:
import { businessRuleSpecSchema } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
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
声明
export declare const DOMAIN_COMPILER_VERSION: "1.0.0";domainAgenticReasoningModeSchema
Domain Agentic Reasoning Mode 的运行时 Schema。
- 种类: 常量
- 导入:
import { domainAgenticReasoningModeSchema } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
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
声明
export declare const domainPackSpecDefinition: SpecSchemaDefinition<DomainPackSpec>;domainPackSpecExample
Domain Pack Spec 的有效示例值。
- 种类: 常量
- 导入:
import { domainPackSpecExample } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare const domainPackSpecExample: DomainPackSpec;domainPackSpecJsonSchema
Domain Pack Spec 的 JSON Schema。
- 种类: 常量
- 导入:
import { domainPackSpecJsonSchema } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare const domainPackSpecJsonSchema: JsonSchema;domainPackSpecSchema
Domain Pack Spec 的运行时 Schema。
- 种类: 常量
- 导入:
import { domainPackSpecSchema } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
// 精确类型由包入口解析;完整编译器展开定义见源码链接。
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
声明
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
声明
export declare const domainReasoningPersistenceSchema: z.ZodEnum<["summary_only", "events_only"]>;domainSpecDefinitions
由 index 模块导出的 Domain Spec Definitions 常量。
- 种类: 常量
- 导入:
import { domainSpecDefinitions } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
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
声明
export declare const domainSpecJsonSchemas: Record<string, JsonSchema>;domainThinkingModeSchema
Domain Thinking Mode 的运行时 Schema。
- 种类: 常量
- 导入:
import { domainThinkingModeSchema } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare const domainThinkingModeSchema: z.ZodEnum<["none", "summary", "structured"]>;reasoningSpecDefinition
Reasoning Spec 的运行时校验入口,组合 Parser、Example 与 JSON Schema。
- 种类: 常量
- 导入:
import { reasoningSpecDefinition } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare const reasoningSpecDefinition: SpecSchemaDefinition<ReasoningSpec>;reasoningSpecExample
Reasoning Spec 的有效示例值。
- 种类: 常量
- 导入:
import { reasoningSpecExample } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare const reasoningSpecExample: ReasoningSpec;reasoningSpecJsonSchema
Reasoning Spec 的 JSON Schema。
- 种类: 常量
- 导入:
import { reasoningSpecJsonSchema } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare const reasoningSpecJsonSchema: JsonSchema;reasoningSpecSchema
Reasoning Spec 的运行时 Schema。
- 种类: 常量
- 导入:
import { reasoningSpecSchema } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
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
声明
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
声明
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
声明
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
声明
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
声明
export declare const workflowSpecDefinition: SpecSchemaDefinition<WorkflowSpec>;workflowSpecExample
Workflow Spec 的有效示例值。
- 种类: 常量
- 导入:
import { workflowSpecExample } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare const workflowSpecExample: WorkflowSpec;workflowSpecJsonSchema
Workflow Spec 的 JSON Schema。
- 种类: 常量
- 导入:
import { workflowSpecJsonSchema } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare const workflowSpecJsonSchema: JsonSchema;workflowSpecSchema
Workflow Spec 的运行时 Schema。
- 种类: 常量
- 导入:
import { workflowSpecSchema } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
// 精确类型由包入口解析;完整编译器展开定义见源码链接。
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
声明
// 精确类型由包入口解析;完整编译器展开定义见源码链接。
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
声明
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
声明
export declare function applyDomainAgentPatch<TAgent extends DomainAgentPatchTarget>(agent: TAgent, patch: DomainAgentPatch): TAgent;调用签名
applyDomainAgentPatch<TAgent extends DomainAgentPatchTarget>(agent: TAgent, patch: DomainAgentPatch): TAgent参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
agent | TAgent | 是 | 必需参数;接受的值由类型列定义。 |
patch | DomainAgentPatch | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
TAgent - 说明: 返回值契约由上述类型定义。
compileDomainPackToHarnessedSystem
Compile Domain Pack To Harnessed System 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { compileDomainPackToHarnessedSystem } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare function compileDomainPackToHarnessedSystem(input: DomainPackSpec, options: DomainCompileOptions): DomainCompilationResult;调用签名
compileDomainPackToHarnessedSystem(input: DomainPackSpec, options: DomainCompileOptions): DomainCompilationResult参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
input | DomainPackSpec | 是 | 必需参数;接受的值由类型列定义。 |
options | DomainCompileOptions | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
DomainCompilationResult - 说明: 返回值契约由上述类型定义。
compileWorkflowToFSM
Compile Workflow To FSM 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { compileWorkflowToFSM } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare function compileWorkflowToFSM(domainPack: DomainPackSpec, options?: WorkflowCompileOptions): FSMProcessSpec;调用签名
compileWorkflowToFSM(domainPack: DomainPackSpec, options?: WorkflowCompileOptions): FSMProcessSpec参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
domainPack | DomainPackSpec | 是 | 必需参数;接受的值由类型列定义。 |
options | WorkflowCompileOptions | 否 | 可选参数;接受的值由类型列定义。 |
返回值
- 类型:
FSMProcessSpec - 说明: 返回值契约由上述类型定义。
createWorkflowDependencySnapshot
Create Workflow Dependency Snapshot 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { createWorkflowDependencySnapshot } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare function createWorkflowDependencySnapshot(input: Omit<WorkflowDependencySnapshot, 'dependencyHash'>): WorkflowDependencySnapshot;调用签名
createWorkflowDependencySnapshot(input: Omit<WorkflowDependencySnapshot, "dependencyHash">): WorkflowDependencySnapshot参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
input | Omit<WorkflowDependencySnapshot, "dependencyHash"> | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
WorkflowDependencySnapshot - 说明: 返回值契约由上述类型定义。
extendDomainPack
Extend Domain Pack 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { extendDomainPack } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare function extendDomainPack(base: DomainPackSpec, overlay: DomainPackOverlay): DomainPackSpec;调用签名
extendDomainPack(base: DomainPackSpec, overlay: DomainPackOverlay): DomainPackSpec参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
base | DomainPackSpec | 是 | 必需参数;接受的值由类型列定义。 |
overlay | DomainPackOverlay | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
DomainPackSpec - 说明: 返回值契约由上述类型定义。
initializeDomainSession
Initialize Domain Session 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { initializeDomainSession } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare function initializeDomainSession(domainPack: DomainPackSpec, options?: DomainSessionInitOptions): DomainSessionInitialization;调用签名
initializeDomainSession(domainPack: DomainPackSpec, options?: DomainSessionInitOptions): DomainSessionInitialization参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
domainPack | DomainPackSpec | 是 | 必需参数;接受的值由类型列定义。 |
options | DomainSessionInitOptions | 否 | 可选参数;接受的值由类型列定义。 |
返回值
- 类型:
DomainSessionInitialization - 说明: 返回值契约由上述类型定义。
listLocalDomainPackFiles
List Local Domain Pack Files 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { listLocalDomainPackFiles } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare function listLocalDomainPackFiles(directory: string, recursive?: boolean, extensions?: string[]): Promise<string[]>;调用签名
listLocalDomainPackFiles(directory: string, recursive?: boolean, extensions?: string[]): Promise<string[]>参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
directory | string | 是 | 必需参数;接受的值由类型列定义。 |
recursive | boolean | 否 | 可选参数;接受的值由类型列定义。 |
extensions | string[] | 否 | 可选参数;接受的值由类型列定义。 |
返回值
- 类型:
Promise<string[]> - 说明: 返回值契约由上述类型定义。
loadDomainPackFile
Load Domain Pack File 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { loadDomainPackFile } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare function loadDomainPackFile(filePath: string): Promise<DomainPackSpec>;调用签名
loadDomainPackFile(filePath: string): Promise<DomainPackSpec>参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
filePath | string | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
Promise<DomainPackSpec> - 说明: 返回值契约由上述类型定义。
parseDomainPackDocument
Parse Domain Pack Document 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { parseDomainPackDocument } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare function parseDomainPackDocument(raw: string, filePath?: string): DomainPackSpec;调用签名
parseDomainPackDocument(raw: string, filePath?: string): DomainPackSpec参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
raw | string | 是 | 必需参数;接受的值由类型列定义。 |
filePath | string | 否 | 可选参数;接受的值由类型列定义。 |
返回值
- 类型:
DomainPackSpec - 说明: 返回值契约由上述类型定义。
resolveWorkflowToolExecutionScope
Resolve Workflow Tool Execution Scope 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { resolveWorkflowToolExecutionScope } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare function resolveWorkflowToolExecutionScope(workflowStates: WorkflowStateBinding[], stateId: string): ToolExecutionScope;调用签名
resolveWorkflowToolExecutionScope(workflowStates: WorkflowStateBinding[], stateId: string): ToolExecutionScope参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
workflowStates | WorkflowStateBinding[] | 是 | 必需参数;接受的值由类型列定义。 |
stateId | string | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
ToolExecutionScope - 说明: 返回值契约由上述类型定义。
validateDomainPackSpec
Validate Domain Pack Spec 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { validateDomainPackSpec } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare function validateDomainPackSpec(input: unknown): DomainPackSpec;调用签名
validateDomainPackSpec(input: unknown): DomainPackSpec参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
input | unknown | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
DomainPackSpec - 说明: 返回值契约由上述类型定义。
validateWorkflowSpec
Validate Workflow Spec 函数,提供 1 个公开调用签名;参数与返回类型见下表。
- 种类: 函数
- 导入:
import { validateWorkflowSpec } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export declare function validateWorkflowSpec(input: unknown): WorkflowSpec;调用签名
validateWorkflowSpec(input: unknown): WorkflowSpec参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
input | unknown | 是 | 必需参数;接受的值由类型列定义。 |
返回值
- 类型:
WorkflowSpec - 说明: 返回值契约由上述类型定义。
BusinessRuleSpec
Business Rule Spec 接口,共包含 17 个公开字段或方法。
- 种类: 接口
- 导入:
import type { BusinessRuleSpec } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
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
声明
export type BusinessRuleEffect = 'constraint' | 'precondition' | 'postcondition' | 'guidance';BusinessRuleScope
Business Rule Scope 公共类型别名;完整类型表达式见声明。
- 种类: 类型
- 导入:
import type { BusinessRuleScope } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export type BusinessRuleScope = 'domain' | 'task' | 'workflow' | 'state' | 'tool' | 'memory' | 'output';DomainAgenticReasoningMode
Domain Agentic Reasoning Mode 公共类型别名;完整类型表达式见声明。
- 种类: 类型
- 导入:
import type { DomainAgenticReasoningMode } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export type DomainAgenticReasoningMode = 'react' | 'fsm_react' | 'tot' | 'critique';DomainPackOverlay
Domain Pack Overlay 公共类型别名;完整类型表达式见声明。
- 种类: 类型
- 导入:
import type { DomainPackOverlay } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
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
声明
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
声明
export type DomainPackOverlayRemovals = Partial<Record<DomainPackOverlayCollection, string[]>>;DomainReasoningPersistence
Domain Reasoning Persistence 公共类型别名;完整类型表达式见声明。
- 种类: 类型
- 导入:
import type { DomainReasoningPersistence } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export type DomainReasoningPersistence = 'summary_only' | 'events_only';DomainThinkingMode
Domain Thinking Mode 公共类型别名;完整类型表达式见声明。
- 种类: 类型
- 导入:
import type { DomainThinkingMode } from '@codesoul-co/hypha-domain'; - 源码模块:
index
声明
export type DomainThinkingMode = 'none' | 'summary' | 'structured';