diff --git a/api-report/apps/api/src/modules/process/contract.d.ts b/api-report/apps/api/src/modules/process/contract.d.ts new file mode 100644 index 0000000..5239bdc --- /dev/null +++ b/api-report/apps/api/src/modules/process/contract.d.ts @@ -0,0 +1,21 @@ +/** + * module: process —— 对外类型(编码规范 §10.1;语义出处 OS 03)。 + * + * 流程层:流程包定义与版本、**边映射闭合校验**、工作流实例 + * (网关 / 审批点 / 失败走向 / 负责人四策略 / 聚合)。 + * + * M5 进行中:domain 已落(闭合校验 / 四策略解析 / 状态聚合), + * 用例与 Mastra 工作流编译随后(编码规范 §6.1)。 + */ +import type { ClosureReport, ClosureViolation, OwnerSpec, ProcessPackage, WorkflowState } from '@contracts'; +import type { ActivityContractFace, ClosureInput } from './internal/domain/closure.ts'; +import type { Candidate, NodeInstance, ResolveContext, Resolution } from './internal/domain/owner-resolution.ts'; +export type { ActivityContractFace, Candidate, ClosureInput, ClosureReport, ClosureViolation, NodeInstance, OwnerSpec, ProcessPackage, ResolveContext, Resolution, WorkflowState, }; +export declare class NotPublishableError extends Error { + readonly report: ClosureReport; + constructor(report: ClosureReport); +} +export declare class PositionVacantError extends Error { + readonly position: string; + constructor(position: string); +} diff --git a/api-report/apps/api/src/modules/process/index.d.ts b/api-report/apps/api/src/modules/process/index.d.ts new file mode 100644 index 0000000..a2750cf --- /dev/null +++ b/api-report/apps/api/src/modules/process/index.d.ts @@ -0,0 +1,7 @@ +/** + * module: process —— 唯一出口。只做 re-export,不写逻辑(编码规范 §10.1)。 + */ +export type { ActivityContractFace, Candidate, ClosureInput, ClosureReport, ClosureViolation, NodeInstance, OwnerSpec, ProcessPackage, ResolveContext, Resolution, WorkflowState, } from './contract.ts'; +export { NotPublishableError, PositionVacantError } from './contract.ts'; +export { checkClosure, publishable } from './internal/domain/closure.ts'; +export { aggregateWorkflowState, FAILURE_DIGESTIONS, isDigested, nextInstanceNumber, resolveOwner, } from './internal/domain/owner-resolution.ts';