forked from ChaiHao/BPOS-MVP
范式退役:活动只剩一种、只跑 Loop;审批活动可管;活动库重做
用户定的两件,一并落地。
**一、活动不再分 flow 和 loop —— 彻底退役 flow**
· `flow-engine` 模块整个删除(runner 379 行 + step-sequence 184 行 + 测试);
· `paradigm` 从清单身份、`activity_package`/`task` 两张表、任务卡与活动库一并退场;
`businessModel` 不再是判别联合 —— 只有案例模型(CMMN + 说明书 + DMN)一形;
· task 的引擎分派从「按 paradigm 取两个之一」收成**唯一的引擎**;
· `activities/` 四个 flow 活动(A1 受理 / A4 定价 / A6 议价 / A7 归档)各写了一份
案例模型:阶段照原来的步分,触达世界的项一律 manualActivationRule,
能算的交 DMN(A1 的三分类 P-03、A4 的 P-01/P-02)不交 Agent;
· 六个占位槽位的骨架从「机器步落台账 + 一张验收单」改成案例骨架,包版本 0.8.0 → 0.9.0。
**代价写在明处,不假装没有**:`turn-runner` 每一拍都要 `agent.decide` ——
环境里没有模型 key,案例活动一步也走不动。三套端到端(统一报价 / 新建流程包 / 测试台
Trace)整套跳过,文件头写明恢复条件:①有可用模型 ②走法改写成按 Enabled 集推进。
**不许把断言改松让它变绿** —— 绿得不诚实比红着更坏。debt.md 已记。
**二、审批活动可管**(新能力)
· `sys.approval_template`:审批点**可复用的那一半** —— 审批人看哪几项、按什么名字看、
怎么催、说什么话。谁来审不在里面(与活动点同口径,运营时轮值);驳回回哪个节点
也不在里面(那是每张图自己的事,留在节点上);
· 三条路由 + 引用反查:还被审批点引着就不许删(409),删了那些节点会**静默**退回旧行为;
· 运行时 `basisOf`:引了模板就按模板筛与改名,没引即旧行为(载荷全摊开)。
模板改了只影响新发出的审批单 —— 在途单的依据在发出那一刻已定形。
**三、活动库重做**:一区两格 —— 「活动(装进来的)」与「审批活动(配出来的)」,
都用流程卡那套两段式卡片(头 + 四格数据板),幽灵卡当入口(装入活动 / 新建审批活动);
「标准/案例」那一维随范式一起撤,业务分类成了唯一的一维,以行内小签呈现。
迁移 0020:两张表 drop paradigm、建 approval_template。已在开发库跑过并重播种。
实测(丁子乔账号):建「定价审批」模板 → 流程包 A5 属性里选得到 → 引用反查计数正确。
四闸绿(api:check 随本提交)。
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
* 活动库:**独立的安装与卸载入口** —— 不在编排中发生。
|
||||
* 安装恒为新增、版本并存;在途任务按其启动时版本跑完,切换零丢单。
|
||||
*/
|
||||
import type { ActivityManifest, InstallVerdict, Paradigm, StaticAuditFinding } from '@contracts';
|
||||
import type { ActivityManifest, InstallVerdict, StaticAuditFinding } from '@contracts';
|
||||
import type { AssetKind, AssetVersion, IncrementState, LoadEnvelope, PackageVersion, ReplayCase, ReplayVerdict } from './internal/domain/versioning.ts';
|
||||
import type { ExternalChecks } from './internal/domain/static-audit.ts';
|
||||
export type { ActivityManifest, AssetKind, AssetVersion, ExternalChecks, IncrementState, InstallVerdict, LoadEnvelope, PackageVersion, Paradigm, ReplayCase, ReplayVerdict, StaticAuditFinding, };
|
||||
export type { ActivityManifest, AssetKind, AssetVersion, ExternalChecks, IncrementState, InstallVerdict, LoadEnvelope, PackageVersion, ReplayCase, ReplayVerdict, StaticAuditFinding, };
|
||||
export declare class InstallRejectedError extends Error {
|
||||
readonly verdict: InstallVerdict;
|
||||
constructor(verdict: InstallVerdict);
|
||||
@@ -25,7 +25,6 @@ export type ActivityCard = {
|
||||
readonly activityId: string;
|
||||
readonly name: string;
|
||||
readonly category: string;
|
||||
readonly paradigm: Paradigm;
|
||||
readonly packageVersions: readonly PackageVersion[];
|
||||
readonly assetVersions: readonly AssetVersion[];
|
||||
readonly enabled: boolean;
|
||||
|
||||
@@ -6,7 +6,7 @@ export { ActivityNotInstalledError, InstallRejectedError, ToolNotDeclaredError }
|
||||
export type { Clock, IdGenerator, LedgerDeclarationApplier, ModelBindingProbe, RegistryStore, TemplateGuard, ToolContractProbe, } from './port.ts';
|
||||
export type { RegistryServiceDeps } from './internal/usecase/registry-service.ts';
|
||||
export { createRegistryService } from './internal/usecase/registry-service.ts';
|
||||
export { acceptanceLevelFindings, auditPassed, danglingListeners, flowFindings, loopFindings, scanArtifact, staticAudit, } from './internal/domain/static-audit.ts';
|
||||
export { acceptanceLevelFindings, auditPassed, danglingListeners, loopFindings, scanArtifact, staticAudit, } from './internal/domain/static-audit.ts';
|
||||
export { ASSET_KINDS, assertTransition, buildLoadEnvelope, canTransition, IllegalIncrementTransitionError, INCREMENT_STATES, judgeReplay, mayTakeEffect, shouldSeedAsset, } from './internal/domain/versioning.ts';
|
||||
export { createRegistryStore } from './internal/adapter/registry-store.ts';
|
||||
export { activityAssetTable, activityPackageTable, assetIncrementTable } from './internal/adapter/registry-schema.ts';
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/**
|
||||
* module: flow-engine —— 对外类型(编码规范 §10.1;语义出处 AM 05)。
|
||||
*
|
||||
* flow 范式:步序声明运行器(四种步型、重试与兜底、事件即步条件)。
|
||||
* **零临场调度** —— 运行中不得由 LLM 决定步序、跳步或兜底。
|
||||
*/
|
||||
import type { FlowModel, FlowStep, TaskId } from '@contracts';
|
||||
import type { FailureAction, FlowIssue, FlowPosition, NextAction, StepRuntime, StepState } from './internal/domain/step-sequence.ts';
|
||||
export type { FailureAction, FlowIssue, FlowModel, FlowPosition, FlowStep, NextAction, StepRuntime, StepState };
|
||||
export declare class FlowDeclarationInvalidError extends Error {
|
||||
readonly issues: readonly FlowIssue[];
|
||||
constructor(issues: readonly FlowIssue[]);
|
||||
}
|
||||
/** 一次推进的结果 —— 由 task 驱动,不自转 */
|
||||
export type AdvanceOutcome = {
|
||||
readonly position: FlowPosition;
|
||||
readonly status: 'running' | 'awaiting' | 'finished' | 'blocked';
|
||||
/** awaiting 时:在等什么 */
|
||||
readonly waitingFor?: {
|
||||
readonly kind: 'human' | 'event' | 'time';
|
||||
readonly ref: string;
|
||||
readonly deadline: string;
|
||||
};
|
||||
/** finished 时:末步验收工单的裁决决定终态 */
|
||||
readonly released?: boolean;
|
||||
/** 选择组的出口选择:恰发一口,随放行一并确认 */
|
||||
readonly selectedPorts?: Record<string, string>;
|
||||
readonly blockedReason?: string;
|
||||
};
|
||||
export type FlowEngineService = {
|
||||
/** 装载步序声明并校验 —— 谱必须全程可静态检查 */
|
||||
load(taskId: TaskId, model: FlowModel): Promise<FlowPosition>;
|
||||
position(taskId: TaskId): Promise<FlowPosition | undefined>;
|
||||
/** 推进一步(或若干确定步);异步步进入 awaiting 并登记监听 */
|
||||
advance(taskId: TaskId): Promise<AdvanceOutcome>;
|
||||
/** 事件即步的完成条件:人事件 / 数据事件 / 时间事件到达即续跑 */
|
||||
resume(taskId: TaskId, event: {
|
||||
kind: 'human' | 'data' | 'time';
|
||||
ref: string;
|
||||
payload: Record<string, unknown>;
|
||||
}): Promise<AdvanceOutcome>;
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* module: flow-engine —— 唯一出口。只做 re-export,不写逻辑(编码规范 §10.1)。
|
||||
*/
|
||||
export type { AdvanceOutcome, FailureAction, FlowEngineService, FlowIssue, FlowModel, FlowPosition, FlowStep, NextAction, StepRuntime, StepState, } from './contract.ts';
|
||||
export { FlowDeclarationInvalidError } from './contract.ts';
|
||||
export type { CardGateway, Clock, FlowStateStore, IdGenerator, ListenerRegistrar, LlmStepGateway, MemoryRecorder, PredicateEvaluator, TaskContext, TaskDataGateway, ToolStepInvoker, } from './port.ts';
|
||||
export type { FlowRunnerDeps } from './internal/usecase/flow-runner.ts';
|
||||
export { createFlowRunner } from './internal/usecase/flow-runner.ts';
|
||||
export { checkDeclaration, failureAction, initialPosition, lastStepIsAcceptance, markStep, nextAction, parallelGroupComplete, STEP_STATES, } from './internal/domain/step-sequence.ts';
|
||||
export { createFlowStateStore } from './internal/adapter/flow-state-store.ts';
|
||||
export { flowStateTable } from './internal/adapter/flow-state-schema.ts';
|
||||
@@ -1,131 +0,0 @@
|
||||
/**
|
||||
* module: flow-engine —— 本模块要外界提供的能力(编码规范 §10.1 / §5.3)。
|
||||
*/
|
||||
import type { FlowModel, StaffId, TaskId } from '@contracts';
|
||||
import type { FlowPosition } from './internal/domain/step-sequence.ts';
|
||||
export type Clock = {
|
||||
now(): Date;
|
||||
};
|
||||
export type IdGenerator = {
|
||||
next(): string;
|
||||
};
|
||||
/** 运行时实例状态 —— 三份持久状态之一(OS 09) */
|
||||
export type FlowStateStore = {
|
||||
save(taskId: TaskId, model: FlowModel, position: FlowPosition): Promise<void>;
|
||||
load(taskId: TaskId): Promise<{
|
||||
model: FlowModel;
|
||||
position: FlowPosition;
|
||||
} | undefined>;
|
||||
};
|
||||
/** 条件谓词求值 —— app 注入 `@sfeel`;零 LLM */
|
||||
export type PredicateEvaluator = (expression: string, scope: Readonly<Record<string, unknown>>) => boolean;
|
||||
/** 任务数据 —— app 注入 `ledger`(L1):读任务视图 = 正式版 + 本任务草稿层 */
|
||||
export type TaskDataGateway = {
|
||||
view(taskId: TaskId): Promise<Record<string, unknown>>;
|
||||
draftWrite(input: {
|
||||
taskId: TaskId;
|
||||
domain: string;
|
||||
object: string;
|
||||
key: Record<string, string | number>;
|
||||
patch: Record<string, unknown>;
|
||||
}): Promise<void>;
|
||||
};
|
||||
/** 工具步与纯工具步 —— app 注入 `toolbox`(L2) */
|
||||
export type ToolStepInvoker = {
|
||||
invoke(input: {
|
||||
tool: string;
|
||||
input: Record<string, unknown>;
|
||||
activityId: string;
|
||||
taskId: TaskId;
|
||||
stepNo: number;
|
||||
}): Promise<{
|
||||
ok: boolean;
|
||||
output?: Record<string, unknown>;
|
||||
error?: {
|
||||
message: string;
|
||||
retryable: boolean;
|
||||
};
|
||||
}>;
|
||||
/** 写类工具在 flow 里也走「登记动作意向」,除非契约显式预授权 */
|
||||
registerIntent(input: {
|
||||
taskId: TaskId;
|
||||
tool: string;
|
||||
input: Record<string, unknown>;
|
||||
label: string;
|
||||
}): Promise<void>;
|
||||
isWriteEffect(tool: string): Promise<boolean>;
|
||||
};
|
||||
/** LLM 步 —— app 注入 `llm`(L1)的 ModelGateway;模板与出参 schema 随声明版本冻结 */
|
||||
export type LlmStepGateway = {
|
||||
generate(input: {
|
||||
model: string;
|
||||
prompt: string;
|
||||
outputSchema: Record<string, unknown>;
|
||||
taskId: TaskId;
|
||||
stepNo: number;
|
||||
}): Promise<{
|
||||
ok: boolean;
|
||||
object?: unknown;
|
||||
text?: string;
|
||||
error?: string;
|
||||
}>;
|
||||
};
|
||||
/** 出参校验 —— app 注入 ajv:LLM 步的出参**必过声明的 schema**(AM 12.3) */
|
||||
export type SchemaValidator = {
|
||||
validate(schema: Record<string, unknown>, value: unknown): {
|
||||
ok: boolean;
|
||||
errors: string[];
|
||||
};
|
||||
};
|
||||
/**
|
||||
* 视图流控 —— app 注入 `interaction`(L3)。
|
||||
* flow 按步序位置推声明的模版;推的是**填好数的 HTML**,容器只渲染不执行。
|
||||
*/
|
||||
export type ViewGateway = {
|
||||
/** 按模版名取模版、以任务视图填数、推给前端;模版不存在就什么都不做 */
|
||||
push(input: {
|
||||
taskId: TaskId;
|
||||
activityId: string;
|
||||
template: string;
|
||||
scope: Record<string, unknown>;
|
||||
}): Promise<void>;
|
||||
};
|
||||
/** 人类工具步 —— app 注入 `human-tool`(L3) */
|
||||
export type CardGateway = {
|
||||
issue(input: {
|
||||
taskId: TaskId;
|
||||
ownerId: StaffId;
|
||||
humanCallCap: number;
|
||||
workOrder: 'execution' | 'acceptance';
|
||||
card: Record<string, unknown>;
|
||||
}): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
};
|
||||
/** 监听登记 —— app 注入 `event`(L1):异步步的完成条件 = 监听,时限必配 */
|
||||
export type ListenerRegistrar = {
|
||||
register(input: {
|
||||
taskId: TaskId;
|
||||
eventType: 'data' | 'time' | 'human';
|
||||
keyFilter: Record<string, string>;
|
||||
deadline: string;
|
||||
}): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
};
|
||||
export type MemoryRecorder = {
|
||||
append(input: {
|
||||
taskId: TaskId;
|
||||
kind: 'action' | 'result' | 'engine-transition';
|
||||
title: string;
|
||||
detail?: Record<string, unknown>;
|
||||
}): Promise<void>;
|
||||
};
|
||||
/** 任务上下文 —— 活动 ID、负责人、预算 */
|
||||
export type TaskContext = {
|
||||
of(taskId: TaskId): Promise<{
|
||||
activityId: string;
|
||||
ownerId: StaffId;
|
||||
humanCallCap: number;
|
||||
}>;
|
||||
};
|
||||
+23
-1
@@ -7,7 +7,7 @@
|
||||
* M5 进行中:domain 已落(闭合校验 / 四策略解析 / 状态聚合),
|
||||
* 用例与 Mastra 工作流编译随后(编码规范 §6.1)。
|
||||
*/
|
||||
import type { ClosureReport, ClosureViolation, OwnerSpec, ProcessNode, ProcessPackage, TerminalState, WorkflowState } from '@contracts';
|
||||
import type { ApprovalTemplate, ClosureReport, ClosureViolation, OwnerSpec, ProcessNode, ProcessPackage, TerminalState, WorkflowState } from '@contracts';
|
||||
import type { ActivityContractFace, ClosureInput } from './internal/domain/closure.ts';
|
||||
import type { Candidate, NodeInstance, ResolveContext, Resolution } from './internal/domain/owner-resolution.ts';
|
||||
import type { AssembleScope, Dispatch, RejectRoute } from './internal/domain/routing.ts';
|
||||
@@ -70,6 +70,16 @@ export type ProcessService = {
|
||||
version?: number;
|
||||
name?: string;
|
||||
}): Promise<ProcessPackage[]>;
|
||||
/** 列模板,连同「被哪些包的哪些审批点引着」 */
|
||||
approvalTemplates(): Promise<Array<ApprovalTemplate & {
|
||||
usedBy: Array<{
|
||||
packageId: string;
|
||||
nodeId: string;
|
||||
}>;
|
||||
}>>;
|
||||
saveApprovalTemplate(template: ApprovalTemplate): Promise<ApprovalTemplate>;
|
||||
/** 还被审批点引着就不许删(`TemplateInUseError`)—— 删了那些节点会静默退回旧行为 */
|
||||
deleteApprovalTemplate(id: string): Promise<void>;
|
||||
nodeOwners(packageId: string): Promise<Record<string, string>>;
|
||||
setNodeOwner(packageId: string, nodeId: string, staffId: string | undefined): Promise<void>;
|
||||
/** 任务终态到达:完成即继续流转;非完成即走声明的失败走向 */
|
||||
@@ -119,6 +129,18 @@ export declare class VersionTakenError extends Error {
|
||||
readonly version: number;
|
||||
constructor(packageId: string, version: number);
|
||||
}
|
||||
/** 模板还被审批点引着 —— 删了那些节点会静默退回「载荷全摊开」,不许悄悄改变行为 */
|
||||
export declare class TemplateInUseError extends Error {
|
||||
readonly templateId: string;
|
||||
readonly usedBy: ReadonlyArray<{
|
||||
packageId: string;
|
||||
nodeId: string;
|
||||
}>;
|
||||
constructor(templateId: string, usedBy: ReadonlyArray<{
|
||||
packageId: string;
|
||||
nodeId: string;
|
||||
}>);
|
||||
}
|
||||
export declare class PositionVacantError extends Error {
|
||||
readonly position: string;
|
||||
constructor(position: string);
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
* module: process —— 唯一出口。只做 re-export,不写逻辑(编码规范 §10.1)。
|
||||
*/
|
||||
export type { ActivityContractFace, AssembleScope, Candidate, ClosureInput, ClosureReport, ClosureViolation, NodeInstance, OwnerSpec, ProcessPackage, ProcessService, ResolveContext, Resolution, StartWorkflowInput, WorkflowRecord, WorkflowState, } from './contract.ts';
|
||||
export { ActiveVersionError, CallInterfaceViolationError, NotClosedError, VersionTakenError, PinnedVersionError, PositionVacantError, StaleVersionError } from './contract.ts';
|
||||
export { ActiveVersionError, CallInterfaceViolationError, NotClosedError, VersionTakenError, PinnedVersionError, PositionVacantError, StaleVersionError, TemplateInUseError } from './contract.ts';
|
||||
export type { FlowRuntime, ActivityDirectory, ApprovalGateway, Clock, FlowEventPublisher, IdGenerator, OrgDirectory, ProcessStore, ReceiptNotifier, Sfeel, TaskGateway, } from './port.ts';
|
||||
export type { ProcessServiceDeps } from './internal/usecase/process-service.ts';
|
||||
export { createProcessService } from './internal/usecase/process-service.ts';
|
||||
|
||||
+4
-1
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* module: process —— 本模块要外界提供的能力(编码规范 §10.1 / §5.3)。
|
||||
*/
|
||||
import type { ProcessNode, ProcessPackage, StaffId, TerminalState, WorkflowState } from '@contracts';
|
||||
import type { ApprovalTemplate, ProcessNode, ProcessPackage, StaffId, TerminalState, WorkflowState } from '@contracts';
|
||||
import type { NodeInstance } from './internal/domain/owner-resolution.ts';
|
||||
import type { ActivityContractFace } from './internal/domain/closure.ts';
|
||||
export type Clock = {
|
||||
@@ -77,6 +77,9 @@ export type ProcessStore = {
|
||||
*/
|
||||
renumberVersion(id: string, from: number, to: number): Promise<void>;
|
||||
getPackage(id: string, version?: number): Promise<ProcessPackage | undefined>;
|
||||
listApprovalTemplates(): Promise<ApprovalTemplate[]>;
|
||||
upsertApprovalTemplate(template: ApprovalTemplate): Promise<void>;
|
||||
deleteApprovalTemplate(id: string): Promise<void>;
|
||||
listPackages(): Promise<ProcessPackage[]>;
|
||||
insertWorkflow(record: WorkflowRecord): Promise<void>;
|
||||
getWorkflow(id: string): Promise<WorkflowRecord | undefined>;
|
||||
|
||||
+2
-3
@@ -4,10 +4,10 @@
|
||||
* 任务运行时:生命周期与**终态五名裁定**、Harness 预算执行器 / 停滞熔断、
|
||||
* 控制三语义、改派、断点续跑。范式(loop / flow)在此汇流 —— 对流程层与交互层不可区分。
|
||||
*/
|
||||
import type { BudgetCaps, ControlSemantic, Paradigm, StaffId, TaskId, TaskRuntimeState, TerminalState } from '@contracts';
|
||||
import type { BudgetCaps, ControlSemantic, StaffId, TaskId, TaskRuntimeState, TerminalState } from '@contracts';
|
||||
import type { BudgetBreach, Consumption, HarnessVerdict } from './internal/domain/harness.ts';
|
||||
import type { ControlOutcome, ResumeReadiness, TaskSnapshot, TerminalCause } from './internal/domain/lifecycle.ts';
|
||||
export type { BudgetBreach, BudgetCaps, Consumption, ControlOutcome, ControlSemantic, HarnessVerdict, Paradigm, ResumeReadiness, TaskRuntimeState, TaskSnapshot, TerminalCause, TerminalState, };
|
||||
export type { BudgetBreach, BudgetCaps, Consumption, ControlOutcome, ControlSemantic, HarnessVerdict, ResumeReadiness, TaskRuntimeState, TaskSnapshot, TerminalCause, TerminalState, };
|
||||
export declare class TaskNotFoundError extends Error {
|
||||
readonly taskId: TaskId;
|
||||
constructor(taskId: TaskId);
|
||||
@@ -29,7 +29,6 @@ export type LandedFacts = {
|
||||
export type Task = {
|
||||
readonly id: TaskId;
|
||||
readonly activityId: string;
|
||||
readonly paradigm: Paradigm;
|
||||
/** 起单来源:工作流节点;登记触发的直起单为 undefined */
|
||||
readonly workflowId?: string;
|
||||
readonly nodeId?: string;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* module: task —— 唯一出口。只做 re-export,不写逻辑(编码规范 §10.1)。
|
||||
*/
|
||||
export type { BudgetBreach, LandedFacts, BudgetCaps, Consumption, ControlOutcome, ControlSemantic, HarnessVerdict, Paradigm, ResumeReadiness, StartTaskInput, Task, TaskRuntimeState, TaskService, TaskSnapshot, TerminalCause, TerminalState, TickOutcome, } from './contract.ts';
|
||||
export type { BudgetBreach, LandedFacts, BudgetCaps, Consumption, ControlOutcome, ControlSemantic, HarnessVerdict, ResumeReadiness, StartTaskInput, Task, TaskRuntimeState, TaskService, TaskSnapshot, TerminalCause, TerminalState, TickOutcome, } from './contract.ts';
|
||||
export { TaskAlreadyTerminalError, TaskNotFoundError } from './contract.ts';
|
||||
export type { ActivityLoader, Clock, IdGenerator, InteractionPhaseSetter, ListenerProbe, MemoryRecorder, ParadigmEngine, PersistenceProbe, ReassignNotifier, SchemaValidator, TaskEventPublisher, TaskStore, } from './port.ts';
|
||||
export type { TaskServiceDeps } from './internal/usecase/task-service.ts';
|
||||
|
||||
+1
-2
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* module: task —— 本模块要外界提供的能力(编码规范 §10.1 / §5.3)。
|
||||
*/
|
||||
import type { BudgetCaps, Paradigm, StaffId, TaskId, TerminalState } from '@contracts';
|
||||
import type { BudgetCaps, StaffId, TaskId, TerminalState } from '@contracts';
|
||||
import type { Consumption } from './internal/domain/harness.ts';
|
||||
import type { LandedFacts, Task } from './contract.ts';
|
||||
export type Clock = {
|
||||
@@ -22,7 +22,6 @@ export type TaskStore = {
|
||||
/** 活动装载 —— app 注入 `activity-registry`(L4) */
|
||||
export type ActivityLoader = {
|
||||
load(activityId: string): Promise<{
|
||||
paradigm: Paradigm;
|
||||
caps: BudgetCaps;
|
||||
envelope: Record<string, unknown>;
|
||||
/** 输入 data 的 JSON Schema —— 缺项不得启动 */
|
||||
|
||||
+99
-149
@@ -310,10 +310,6 @@ export declare const govTaskRowSchema: z.ZodObject<{
|
||||
id: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
||||
title: z.ZodString;
|
||||
activityId: z.ZodString;
|
||||
paradigm: z.ZodEnum<{
|
||||
loop: "loop";
|
||||
flow: "flow";
|
||||
}>;
|
||||
ownerName: z.ZodString;
|
||||
runtime: z.ZodEnum<{
|
||||
running: "running";
|
||||
@@ -344,10 +340,6 @@ export declare const listGovTasksRoute: {
|
||||
id: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
||||
title: z.ZodString;
|
||||
activityId: z.ZodString;
|
||||
paradigm: z.ZodEnum<{
|
||||
loop: "loop";
|
||||
flow: "flow";
|
||||
}>;
|
||||
ownerName: z.ZodString;
|
||||
runtime: z.ZodEnum<{
|
||||
running: "running";
|
||||
@@ -522,6 +514,7 @@ export declare const listProcessPackagesRoute: {
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"terminate">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
templateId: z.ZodOptional<z.ZodString>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
@@ -645,6 +638,7 @@ export declare const saveProcessRoute: {
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"terminate">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
templateId: z.ZodOptional<z.ZodString>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
@@ -752,6 +746,7 @@ export declare const saveProcessRoute: {
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"terminate">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
templateId: z.ZodOptional<z.ZodString>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
@@ -892,6 +887,7 @@ export declare const setProcessStateRoute: {
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"terminate">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
templateId: z.ZodOptional<z.ZodString>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
@@ -1011,6 +1007,7 @@ export declare const deleteProcessVersionRoute: {
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"terminate">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
templateId: z.ZodOptional<z.ZodString>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
@@ -1052,6 +1049,94 @@ export declare const deleteProcessVersionRoute: {
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>;
|
||||
};
|
||||
/** 审批模板一览 —— 活动库里「审批活动」那一格看的就是它 */
|
||||
export declare const listApprovalTemplatesRoute: {
|
||||
readonly method: "GET";
|
||||
readonly path: "/api/gov/approval-templates";
|
||||
readonly output: z.ZodObject<{
|
||||
templates: z.ZodArray<z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
name: z.ZodString;
|
||||
basis: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
field: z.ZodString;
|
||||
label: z.ZodString;
|
||||
}, z.core.$strip>>>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
after: z.ZodString;
|
||||
action: z.ZodEnum<{
|
||||
nudge: "nudge";
|
||||
escalate: "escalate";
|
||||
}>;
|
||||
}, z.core.$strip>>>;
|
||||
}, z.core.$strip>>;
|
||||
message: z.ZodOptional<z.ZodString>;
|
||||
usedBy: z.ZodArray<z.ZodObject<{
|
||||
packageId: z.ZodString;
|
||||
nodeId: z.ZodString;
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>;
|
||||
};
|
||||
/** 建或改一张模板 —— id 已存在即覆盖(模板是配置,不长版本) */
|
||||
export declare const upsertApprovalTemplateRoute: {
|
||||
readonly method: "PUT";
|
||||
readonly path: "/api/gov/approval-templates";
|
||||
readonly body: z.ZodObject<{
|
||||
template: z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
name: z.ZodString;
|
||||
basis: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
field: z.ZodString;
|
||||
label: z.ZodString;
|
||||
}, z.core.$strip>>>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
after: z.ZodString;
|
||||
action: z.ZodEnum<{
|
||||
nudge: "nudge";
|
||||
escalate: "escalate";
|
||||
}>;
|
||||
}, z.core.$strip>>>;
|
||||
}, z.core.$strip>>;
|
||||
message: z.ZodOptional<z.ZodString>;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>;
|
||||
readonly output: z.ZodObject<{
|
||||
template: z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
name: z.ZodString;
|
||||
basis: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
field: z.ZodString;
|
||||
label: z.ZodString;
|
||||
}, z.core.$strip>>>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
after: z.ZodString;
|
||||
action: z.ZodEnum<{
|
||||
nudge: "nudge";
|
||||
escalate: "escalate";
|
||||
}>;
|
||||
}, z.core.$strip>>>;
|
||||
}, z.core.$strip>>;
|
||||
message: z.ZodOptional<z.ZodString>;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>;
|
||||
};
|
||||
/** 删一张模板 —— 还被审批点引着就拒(409):删了引它的节点会退回「载荷全摊开」 */
|
||||
export declare const deleteApprovalTemplateRoute: {
|
||||
readonly method: "DELETE";
|
||||
readonly path: "/api/gov/approval-templates/:id";
|
||||
readonly params: z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
readonly output: z.ZodObject<{
|
||||
ok: z.ZodBoolean;
|
||||
}, z.core.$strip>;
|
||||
};
|
||||
/**
|
||||
* 删整条流 —— 连同它的**所有版本**。货架上一条流一张卡,删的就是那张卡。
|
||||
* 两道闸:任一版有在途单即拒(那些单要按它跑完);还有调起规则指着它也拒 ——
|
||||
@@ -1129,6 +1214,7 @@ export declare const deleteProcessFlowRoute: {
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"terminate">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
templateId: z.ZodOptional<z.ZodString>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
@@ -1255,6 +1341,7 @@ export declare const editProcessVersionRoute: {
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"terminate">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
templateId: z.ZodOptional<z.ZodString>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
@@ -1366,6 +1453,7 @@ export declare const validateProcessRoute: {
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"terminate">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
templateId: z.ZodOptional<z.ZodString>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
@@ -1669,10 +1757,6 @@ export declare const installActivityRoute: {
|
||||
name: z.ZodString;
|
||||
packageVersion: z.ZodString;
|
||||
category: z.ZodString;
|
||||
paradigm: z.ZodEnum<{
|
||||
loop: "loop";
|
||||
flow: "flow";
|
||||
}>;
|
||||
sdkVersion: z.ZodString;
|
||||
checksum: z.ZodString;
|
||||
signature: z.ZodOptional<z.ZodString>;
|
||||
@@ -1817,8 +1901,7 @@ export declare const installActivityRoute: {
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>;
|
||||
assets: z.ZodObject<{
|
||||
businessModel: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
paradigm: z.ZodLiteral<"loop">;
|
||||
businessModel: z.ZodObject<{
|
||||
cmmnXml: z.ZodString;
|
||||
narrative: z.ZodString;
|
||||
dmn: z.ZodObject<{
|
||||
@@ -1851,137 +1934,7 @@ export declare const installActivityRoute: {
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
paradigm: z.ZodLiteral<"flow">;
|
||||
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"tool">;
|
||||
tool: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"llm">;
|
||||
model: z.ZodString;
|
||||
template: z.ZodString;
|
||||
outputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
card: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
||||
deadline: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"pure-tool">;
|
||||
tool: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>], "kind">>;
|
||||
parallelGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
name: z.ZodString;
|
||||
steps: z.ZodArray<z.ZodString>;
|
||||
}, z.core.$strip>>>;
|
||||
}, z.core.$strip>], "paradigm">;
|
||||
}, z.core.$strip>;
|
||||
skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
id: z.core.$ZodBranded<z.ZodString, "SkillId", "out">;
|
||||
label: z.ZodString;
|
||||
@@ -2102,10 +2055,6 @@ export declare const listActivitiesRoute: {
|
||||
activityId: z.ZodString;
|
||||
name: z.ZodString;
|
||||
category: z.ZodString;
|
||||
paradigm: z.ZodEnum<{
|
||||
loop: "loop";
|
||||
flow: "flow";
|
||||
}>;
|
||||
enabled: z.ZodBoolean;
|
||||
packageVersions: z.ZodArray<z.ZodObject<{
|
||||
version: z.ZodString;
|
||||
@@ -2489,6 +2438,7 @@ export declare const govWorkflowRoute: {
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"terminate">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
templateId: z.ZodOptional<z.ZodString>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
|
||||
+11
-699
@@ -6,24 +6,11 @@
|
||||
* 资产版本管业务模型 / DMN / 技能 —— 包只携初始版,此后由进化管线在系统内产生。
|
||||
*/
|
||||
import { z } from 'zod';
|
||||
/** 范式只存在于**引擎层**;交互层不可区分(编码规范 §9 双层边界) */
|
||||
export declare const PARADIGMS: readonly ["loop", "flow"];
|
||||
export declare const paradigmSchema: z.ZodEnum<{
|
||||
loop: "loop";
|
||||
flow: "flow";
|
||||
}>;
|
||||
export type Paradigm = z.infer<typeof paradigmSchema>;
|
||||
/** 活动类型两维分类之一(治理台活动库):标准活动 = flow,案例活动 = loop */
|
||||
export declare const ACTIVITY_TYPE_LABEL: Readonly<Record<Paradigm, string>>;
|
||||
export declare const manifestIdentitySchema: z.ZodObject<{
|
||||
activityId: z.core.$ZodBranded<z.ZodString, "ActivityId", "out">;
|
||||
name: z.ZodString;
|
||||
packageVersion: z.ZodString;
|
||||
category: z.ZodString;
|
||||
paradigm: z.ZodEnum<{
|
||||
loop: "loop";
|
||||
flow: "flow";
|
||||
}>;
|
||||
sdkVersion: z.ZodString;
|
||||
checksum: z.ZodString;
|
||||
signature: z.ZodOptional<z.ZodString>;
|
||||
@@ -112,288 +99,6 @@ export declare const manifestDeclarationsSchema: z.ZodObject<{
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>;
|
||||
export type ManifestDeclarations = z.infer<typeof manifestDeclarationsSchema>;
|
||||
export declare const STEP_KINDS: readonly ["tool", "llm", "human", "pure-tool"];
|
||||
export declare const stepKindSchema: z.ZodEnum<{
|
||||
human: "human";
|
||||
tool: "tool";
|
||||
llm: "llm";
|
||||
"pure-tool": "pure-tool";
|
||||
}>;
|
||||
export type StepKind = z.infer<typeof stepKindSchema>;
|
||||
/** 失败策略:声明给定,不临场(AM 5.3) */
|
||||
export declare const stepFailurePolicySchema: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
export type StepFailurePolicy = z.infer<typeof stepFailurePolicySchema>;
|
||||
export declare const flowStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"tool">;
|
||||
tool: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"llm">;
|
||||
model: z.ZodString;
|
||||
template: z.ZodString;
|
||||
outputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
card: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
||||
deadline: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"pure-tool">;
|
||||
tool: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>], "kind">;
|
||||
export type FlowStep = z.infer<typeof flowStepSchema>;
|
||||
export declare const flowModelSchema: z.ZodObject<{
|
||||
paradigm: z.ZodLiteral<"flow">;
|
||||
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"tool">;
|
||||
tool: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"llm">;
|
||||
model: z.ZodString;
|
||||
template: z.ZodString;
|
||||
outputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
card: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
||||
deadline: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"pure-tool">;
|
||||
tool: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>], "kind">>;
|
||||
parallelGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
name: z.ZodString;
|
||||
steps: z.ZodArray<z.ZodString>;
|
||||
}, z.core.$strip>>>;
|
||||
}, z.core.$strip>;
|
||||
export type FlowModel = z.infer<typeof flowModelSchema>;
|
||||
export declare const dmnDecisionTableSchema: z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
label: z.ZodString;
|
||||
@@ -450,7 +155,6 @@ export declare const dmnModelSchema: z.ZodObject<{
|
||||
}, z.core.$strip>;
|
||||
export type DmnModel = z.infer<typeof dmnModelSchema>;
|
||||
export declare const loopModelSchema: z.ZodObject<{
|
||||
paradigm: z.ZodLiteral<"loop">;
|
||||
cmmnXml: z.ZodString;
|
||||
narrative: z.ZodString;
|
||||
dmn: z.ZodObject<{
|
||||
@@ -485,8 +189,12 @@ export declare const loopModelSchema: z.ZodObject<{
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>;
|
||||
export type LoopModel = z.infer<typeof loopModelSchema>;
|
||||
export declare const businessModelSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
paradigm: z.ZodLiteral<"loop">;
|
||||
/**
|
||||
* 业务模型只有一种(2026-07-29 用户定:活动不再分 flow 和 loop,内部实现都是 Loop)——
|
||||
* 案例模型 CMMN + 说明书 + DMN。步序声明(flow)连同它的引擎一并退役:
|
||||
* 一件事该怎么办,由 Agent 依案例模型临场决定,不再有「照谱执行」这一路。
|
||||
*/
|
||||
export declare const businessModelSchema: z.ZodObject<{
|
||||
cmmnXml: z.ZodString;
|
||||
narrative: z.ZodString;
|
||||
dmn: z.ZodObject<{
|
||||
@@ -519,137 +227,7 @@ export declare const businessModelSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
paradigm: z.ZodLiteral<"flow">;
|
||||
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"tool">;
|
||||
tool: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"llm">;
|
||||
model: z.ZodString;
|
||||
template: z.ZodString;
|
||||
outputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
card: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
||||
deadline: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"pure-tool">;
|
||||
tool: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>], "kind">>;
|
||||
parallelGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
name: z.ZodString;
|
||||
steps: z.ZodArray<z.ZodString>;
|
||||
}, z.core.$strip>>>;
|
||||
}, z.core.$strip>], "paradigm">;
|
||||
}, z.core.$strip>;
|
||||
export type BusinessModel = z.infer<typeof businessModelSchema>;
|
||||
export declare const skillSchema: z.ZodObject<{
|
||||
id: z.core.$ZodBranded<z.ZodString, "SkillId", "out">;
|
||||
@@ -665,8 +243,7 @@ export declare const skillSchema: z.ZodObject<{
|
||||
}, z.core.$strip>;
|
||||
export type Skill = z.infer<typeof skillSchema>;
|
||||
export declare const manifestAssetsSchema: z.ZodObject<{
|
||||
businessModel: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
paradigm: z.ZodLiteral<"loop">;
|
||||
businessModel: z.ZodObject<{
|
||||
cmmnXml: z.ZodString;
|
||||
narrative: z.ZodString;
|
||||
dmn: z.ZodObject<{
|
||||
@@ -699,137 +276,7 @@ export declare const manifestAssetsSchema: z.ZodObject<{
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
paradigm: z.ZodLiteral<"flow">;
|
||||
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"tool">;
|
||||
tool: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"llm">;
|
||||
model: z.ZodString;
|
||||
template: z.ZodString;
|
||||
outputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
card: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
||||
deadline: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"pure-tool">;
|
||||
tool: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>], "kind">>;
|
||||
parallelGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
name: z.ZodString;
|
||||
steps: z.ZodArray<z.ZodString>;
|
||||
}, z.core.$strip>>>;
|
||||
}, z.core.$strip>], "paradigm">;
|
||||
}, z.core.$strip>;
|
||||
skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
id: z.core.$ZodBranded<z.ZodString, "SkillId", "out">;
|
||||
label: z.ZodString;
|
||||
@@ -873,10 +320,6 @@ export declare const activityManifestSchema: z.ZodObject<{
|
||||
name: z.ZodString;
|
||||
packageVersion: z.ZodString;
|
||||
category: z.ZodString;
|
||||
paradigm: z.ZodEnum<{
|
||||
loop: "loop";
|
||||
flow: "flow";
|
||||
}>;
|
||||
sdkVersion: z.ZodString;
|
||||
checksum: z.ZodString;
|
||||
signature: z.ZodOptional<z.ZodString>;
|
||||
@@ -1021,8 +464,7 @@ export declare const activityManifestSchema: z.ZodObject<{
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>;
|
||||
assets: z.ZodObject<{
|
||||
businessModel: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
paradigm: z.ZodLiteral<"loop">;
|
||||
businessModel: z.ZodObject<{
|
||||
cmmnXml: z.ZodString;
|
||||
narrative: z.ZodString;
|
||||
dmn: z.ZodObject<{
|
||||
@@ -1055,137 +497,7 @@ export declare const activityManifestSchema: z.ZodObject<{
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
paradigm: z.ZodLiteral<"flow">;
|
||||
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"tool">;
|
||||
tool: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"llm">;
|
||||
model: z.ZodString;
|
||||
template: z.ZodString;
|
||||
outputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
card: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
||||
deadline: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"pure-tool">;
|
||||
tool: z.ZodString;
|
||||
name: z.ZodString;
|
||||
label: z.ZodString;
|
||||
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
output: z.ZodOptional<z.ZodObject<{
|
||||
domain: z.ZodString;
|
||||
object: z.ZodString;
|
||||
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
||||
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
when: z.ZodOptional<z.ZodString>;
|
||||
view: z.ZodOptional<z.ZodString>;
|
||||
failure: z.ZodObject<{
|
||||
retry: z.ZodObject<{
|
||||
times: z.ZodNumber;
|
||||
backoff: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"human">;
|
||||
workOrder: z.ZodEnum<{
|
||||
execution: "execution";
|
||||
acceptance: "acceptance";
|
||||
}>;
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"blocked">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
}, z.core.$strip>;
|
||||
}, z.core.$strip>], "kind">>;
|
||||
parallelGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
name: z.ZodString;
|
||||
steps: z.ZodArray<z.ZodString>;
|
||||
}, z.core.$strip>>>;
|
||||
}, z.core.$strip>], "paradigm">;
|
||||
}, z.core.$strip>;
|
||||
skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
id: z.core.$ZodBranded<z.ZodString, "SkillId", "out">;
|
||||
label: z.ZodString;
|
||||
|
||||
@@ -109,6 +109,35 @@ export declare const nudgeLadderSchema: z.ZodObject<{
|
||||
}, z.core.$strip>>>;
|
||||
}, z.core.$strip>;
|
||||
export type NudgeLadder = z.infer<typeof nudgeLadderSchema>;
|
||||
/**
|
||||
* 审批活动模板(2026-07-29 用户定:审批活动要能管)。
|
||||
*
|
||||
* 审批点从前只在节点上现写:每个节点自己声明催办与委托语,依据一律「把载荷全摊开」。
|
||||
* 模板把**可复用的那半**提出来 —— 审批人看哪几项、按什么名字看、怎么催、说什么话;
|
||||
* 剩下不可复用的那半(驳回回哪个节点)仍留在节点上,那是这张图自己的事。
|
||||
*
|
||||
* 审批人**不在模板里**:与活动点同一口径,谁审是运营时分配的(有组按组轮值,无组全员轮值)。
|
||||
*/
|
||||
export declare const approvalTemplateSchema: z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
name: z.ZodString;
|
||||
basis: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
field: z.ZodString;
|
||||
label: z.ZodString;
|
||||
}, z.core.$strip>>>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
after: z.ZodString;
|
||||
action: z.ZodEnum<{
|
||||
nudge: "nudge";
|
||||
escalate: "escalate";
|
||||
}>;
|
||||
}, z.core.$strip>>>;
|
||||
}, z.core.$strip>>;
|
||||
message: z.ZodOptional<z.ZodString>;
|
||||
}, z.core.$strip>;
|
||||
export type ApprovalTemplate = z.infer<typeof approvalTemplateSchema>;
|
||||
export declare const processNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
kind: z.ZodLiteral<"start">;
|
||||
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
||||
@@ -162,6 +191,7 @@ export declare const processNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"terminate">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
templateId: z.ZodOptional<z.ZodString>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
@@ -270,6 +300,7 @@ export declare const processPackageSchema: z.ZodObject<{
|
||||
}, z.core.$strip>, z.ZodObject<{
|
||||
kind: z.ZodLiteral<"terminate">;
|
||||
}, z.core.$strip>], "kind">;
|
||||
templateId: z.ZodOptional<z.ZodString>;
|
||||
nudge: z.ZodOptional<z.ZodObject<{
|
||||
deadline: z.ZodString;
|
||||
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
|
||||
Reference in New Issue
Block a user