/** * 活动包清单六区与资产形状(编码规范 §8.1;语义出处 OS 11.1,AM 11)。 * * 清单机器可读,系统**不执行代码即知包为何物** —— 导入登记、安装静态审、编排装配读的都是清单。 * 资产与包分离版本化(OS 11.3):包版本管代码 / 契约 / 交互模版 / Harness; * 资产版本管业务模型 / DMN / 技能 —— 包只携初始版,此后由进化管线在系统内产生。 */ import { z } from 'zod'; export declare const manifestIdentitySchema: z.ZodObject<{ activityId: z.core.$ZodBranded; name: z.ZodString; packageVersion: z.ZodString; category: z.ZodString; sdkVersion: z.ZodString; checksum: z.ZodString; signature: z.ZodOptional; }, z.core.$strip>; export type ManifestIdentity = z.infer; export declare const harnessConfigSchema: z.ZodObject<{ memoryWindow: z.ZodDefault; stallAfter: z.ZodDefault; nudge: z.ZodDefault; }, z.core.$strip>>>; retry: z.ZodDefault; backoff: z.ZodDefault; }, z.core.$strip>>; }, z.core.$strip>; export type HarnessConfig = z.infer; export declare const manifestDeclarationsSchema: z.ZodObject<{ models: z.ZodDefault>; tools: z.ZodDefault; }, z.core.$strip>>>; ledger: z.ZodDefault; kind: z.ZodDefault>; caseKey: z.ZodOptional; file: z.ZodOptional>; fields: z.ZodArray; label: z.ZodOptional; primaryKey: z.ZodDefault; masked: z.ZodDefault; required: z.ZodOptional; tally: z.ZodOptional>; expect: z.ZodOptional; auto: z.ZodOptional; requiredWhen: z.ZodOptional>; distinct: z.ZodOptional; refersTo: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>>; listeners: z.ZodDefault; eventType: z.ZodEnum<{ human: "human"; data: "data"; time: "time"; control: "control"; }>; keyFilter: z.ZodDefault>; condition: z.ZodOptional; semantic: z.ZodEnum<{ observe: "observe"; "complete-step": "complete-step"; }>; deadline: z.ZodString; escalation: z.ZodDefault>>; }, z.core.$strip>>>; harness: z.ZodObject<{ memoryWindow: z.ZodDefault; stallAfter: z.ZodDefault; nudge: z.ZodDefault; }, z.core.$strip>>>; retry: z.ZodDefault; backoff: z.ZodDefault; }, z.core.$strip>>; }, z.core.$strip>; }, z.core.$strip>; export type ManifestDeclarations = z.infer; export declare const dmnDecisionTableSchema: z.ZodObject<{ id: z.ZodString; label: z.ZodString; hitPolicy: z.ZodDefault>; inputs: z.ZodArray>; outputs: z.ZodArray>; rules: z.ZodArray; then: z.ZodArray; annotation: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; export type DmnDecisionTable = z.infer; export declare const dmnModelSchema: z.ZodObject<{ drd: z.ZodArray>; inputs: z.ZodDefault>; }, z.core.$strip>>; tables: z.ZodArray>; inputs: z.ZodArray>; outputs: z.ZodArray>; rules: z.ZodArray; then: z.ZodArray; annotation: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; export type DmnModel = z.infer; /** * **步骤剧本** —— 一个计划项一条,把「这一步是什么状态」写成机器读得懂的东西。 * * 为什么要有它(2026-07-31 加,起因是 A1 反复空转): * 从前每一拍喂给模型的是**整本说明书 + 全部工具 + 全部可写台账**, * 模型得自己从六步里认出「我现在在第几步」。认对了还好,认岔了就开始转圈 —— * 实测 S1 已经把八字段写齐了,而说明书里 S3 写着「把八字段补到齐」, * 模型于是把同样三行又写一遍,被「写了等于没写」拒回,下一拍再写一遍,如此往复。 * * 治法不是把说明书写得更啰嗦,是**把状态挪进引擎**: * ① `doneWhen` 让引擎自己算得出「这一步的成果已经在那儿了」—— 是就直接收掉, * **不问模型**(能算的不问 LLM:同输入必同结论、零 token); * ② `guide` / `writes` / `tools` 让每一拍的上下文**只装当前这一步要用的东西** —— * 上下文小了,模型跑偏的余地也就小了。 * * 不写剧本的活动照旧跑(整本说明书 + 全部工具),只是没有这两样好处。 */ export declare const planStepSchema: z.ZodObject<{ item: z.ZodString; intent: z.ZodString; guide: z.ZodString; writes: z.ZodDefault>; reads: z.ZodDefault>; view: z.ZodOptional; tools: z.ZodDefault>; doneWhen: z.ZodOptional; }, z.core.$strip>; export type PlanStep = z.infer; /** * 阶段 —— **给人看的进度刻度**,引擎一眼都不看。 * * 计划项是给引擎的:一件事拆到能判「干完没有」的粒度,A1 有六项。 * 可六格进度条对人没有意义 —— 「查历史价 / 打标 / 定去向」在业务上是**一件事** * (判这单该怎么走),人关心的是「到哪一步了」,不是引擎拆了几项。 * 所以另立一层:几个计划项合成一个阶段,进度条按阶段走。 * * **只声明激活态的阶段**。结束态不在这里 —— 每个活动都以放行收口(铁律③), * 那是系统的规矩不是活动的阶段;进度条自己在末尾加这一格。 */ export declare const casePhaseSchema: z.ZodObject<{ name: z.ZodString; items: z.ZodArray; }, z.core.$strip>; export type CasePhase = z.infer; export declare const loopModelSchema: z.ZodObject<{ cmmnXml: z.ZodString; narrative: z.ZodString; dmn: z.ZodObject<{ drd: z.ZodArray>; inputs: z.ZodDefault>; }, z.core.$strip>>; tables: z.ZodArray>; inputs: z.ZodArray>; outputs: z.ZodArray>; rules: z.ZodArray; then: z.ZodArray; annotation: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; steps: z.ZodOptional>; reads: z.ZodDefault>; view: z.ZodOptional; tools: z.ZodDefault>; doneWhen: z.ZodOptional; }, z.core.$strip>>>; phases: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>; export type LoopModel = z.infer; /** * 业务模型只有一种(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<{ drd: z.ZodArray>; inputs: z.ZodDefault>; }, z.core.$strip>>; tables: z.ZodArray>; inputs: z.ZodArray>; outputs: z.ZodArray>; rules: z.ZodArray; then: z.ZodArray; annotation: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; steps: z.ZodOptional>; reads: z.ZodDefault>; view: z.ZodOptional; tools: z.ZodDefault>; doneWhen: z.ZodOptional; }, z.core.$strip>>>; phases: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>; export type BusinessModel = z.infer; export declare const skillSchema: z.ZodObject<{ id: z.core.$ZodBranded; label: z.ZodString; applicability: z.ZodString; method: z.ZodString; crystallized: z.ZodDefault; }, z.core.$strip>>>; knowledgeRefs: z.ZodDefault>; version: z.ZodString; }, z.core.$strip>; export type Skill = z.infer; export declare const manifestAssetsSchema: z.ZodObject<{ businessModel: z.ZodObject<{ cmmnXml: z.ZodString; narrative: z.ZodString; dmn: z.ZodObject<{ drd: z.ZodArray>; inputs: z.ZodDefault>; }, z.core.$strip>>; tables: z.ZodArray>; inputs: z.ZodArray>; outputs: z.ZodArray>; rules: z.ZodArray; then: z.ZodArray; annotation: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; steps: z.ZodOptional>; reads: z.ZodDefault>; view: z.ZodOptional; tools: z.ZodDefault>; doneWhen: z.ZodOptional; }, z.core.$strip>>>; phases: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>; skills: z.ZodDefault; label: z.ZodString; applicability: z.ZodString; method: z.ZodString; crystallized: z.ZodDefault; }, z.core.$strip>>>; knowledgeRefs: z.ZodDefault>; version: z.ZodString; }, z.core.$strip>>>; viewTemplates: z.ZodDefault>>; cardSchemas: z.ZodDefault>>; distillHooks: z.ZodDefault; milestone: z.ZodOptional; prompt: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>; export type ManifestAssets = z.infer; export declare const sampleCaseSchema: z.ZodObject<{ name: z.ZodString; input: z.ZodRecord; message: z.ZodOptional; expect: z.ZodObject<{ ports: z.ZodArray; payloadShape: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>; export type SampleCase = z.infer; export declare const activityManifestSchema: z.ZodObject<{ identity: z.ZodObject<{ activityId: z.core.$ZodBranded; name: z.ZodString; packageVersion: z.ZodString; category: z.ZodString; sdkVersion: z.ZodString; checksum: z.ZodString; signature: z.ZodOptional; }, z.core.$strip>; contract: z.ZodObject<{ activityId: z.core.$ZodBranded; version: z.ZodString; input: z.ZodObject<{ data: z.ZodRecord; messageAllowed: z.ZodDefault; messageHint: z.ZodOptional; inboundComm: z.ZodOptional; partyField: z.ZodString; subjectField: z.ZodOptional; bodyField: z.ZodOptional; attachmentsField: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; output: z.ZodObject<{ mandatory: z.ZodDefault; description: z.ZodOptional; when: z.ZodOptional; }, z.core.$strip>>>; selective: z.ZodDefault; description: z.ZodOptional; when: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>>; }, z.core.$strip>; requiredDeliverables: z.ZodDefault>; ledger: z.ZodOptional; ledgers: z.ZodOptional>; editableAtRelease: z.ZodOptional>; }, z.core.$strip>>>; acceptanceCriteria: z.ZodDefault; predicate: z.ZodOptional; modelRef: z.ZodOptional; }, z.core.$strip>>>; revisableAtRelease: z.ZodDefault>>; prohibitions: z.ZodDefault>>; authorization: z.ZodObject<{ discretion: z.ZodDefault>>; preauthorizedActions: z.ZodDefault; }, z.core.$strip>>>; humanCallBudget: z.ZodNumber; }, z.core.$strip>; resources: z.ZodObject<{ tools: z.ZodDefault; }, z.core.$strip>>>; skills: z.ZodDefault>>; models: z.ZodDefault>; roles: z.ZodDefault>; budget: z.ZodObject<{ steps: z.ZodNumber; tokens: z.ZodNumber; activeMinutes: z.ZodNumber; humanCalls: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>; }, z.core.$strip>; declarations: z.ZodObject<{ models: z.ZodDefault>; tools: z.ZodDefault; }, z.core.$strip>>>; ledger: z.ZodDefault; kind: z.ZodDefault>; caseKey: z.ZodOptional; file: z.ZodOptional>; fields: z.ZodArray; label: z.ZodOptional; primaryKey: z.ZodDefault; masked: z.ZodDefault; required: z.ZodOptional; tally: z.ZodOptional>; expect: z.ZodOptional; auto: z.ZodOptional; requiredWhen: z.ZodOptional>; distinct: z.ZodOptional; refersTo: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>>; listeners: z.ZodDefault; eventType: z.ZodEnum<{ human: "human"; data: "data"; time: "time"; control: "control"; }>; keyFilter: z.ZodDefault>; condition: z.ZodOptional; semantic: z.ZodEnum<{ observe: "observe"; "complete-step": "complete-step"; }>; deadline: z.ZodString; escalation: z.ZodDefault>>; }, z.core.$strip>>>; harness: z.ZodObject<{ memoryWindow: z.ZodDefault; stallAfter: z.ZodDefault; nudge: z.ZodDefault; }, z.core.$strip>>>; retry: z.ZodDefault; backoff: z.ZodDefault; }, z.core.$strip>>; }, z.core.$strip>; }, z.core.$strip>; assets: z.ZodObject<{ businessModel: z.ZodObject<{ cmmnXml: z.ZodString; narrative: z.ZodString; dmn: z.ZodObject<{ drd: z.ZodArray>; inputs: z.ZodDefault>; }, z.core.$strip>>; tables: z.ZodArray>; inputs: z.ZodArray>; outputs: z.ZodArray>; rules: z.ZodArray; then: z.ZodArray; annotation: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; steps: z.ZodOptional>; reads: z.ZodDefault>; view: z.ZodOptional; tools: z.ZodDefault>; doneWhen: z.ZodOptional; }, z.core.$strip>>>; phases: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>; skills: z.ZodDefault; label: z.ZodString; applicability: z.ZodString; method: z.ZodString; crystallized: z.ZodDefault; }, z.core.$strip>>>; knowledgeRefs: z.ZodDefault>; version: z.ZodString; }, z.core.$strip>>>; viewTemplates: z.ZodDefault>>; cardSchemas: z.ZodDefault>>; distillHooks: z.ZodDefault; milestone: z.ZodOptional; prompt: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>; samples: z.ZodArray; message: z.ZodOptional; expect: z.ZodObject<{ ports: z.ZodArray; payloadShape: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>>; entry: z.ZodObject<{ file: z.ZodString; checksum: z.ZodString; }, z.core.$strip>; }, z.core.$strip>; export type ActivityManifest = z.infer; export declare const staticAuditFindingSchema: z.ZodObject<{ code: z.ZodEnum<{ "signature-invalid": "signature-invalid"; "sdk-incompatible": "sdk-incompatible"; "schema-invalid": "schema-invalid"; "tool-contract-missing": "tool-contract-missing"; "model-name-unbound": "model-name-unbound"; "dangling-listener": "dangling-listener"; "template-has-script": "template-has-script"; "environment-capability": "environment-capability"; "dynamic-eval": "dynamic-eval"; "ledger-type-conflict": "ledger-type-conflict"; "acceptance-level-misreported": "acceptance-level-misreported"; "acceptance-predicate-unbound": "acceptance-predicate-unbound"; "deliverable-address-unbound": "deliverable-address-unbound"; "ledger-kind-invalid": "ledger-kind-invalid"; "reference-target-unbound": "reference-target-unbound"; }>; severity: z.ZodEnum<{ error: "error"; warn: "warn"; }>; message: z.ZodString; at: z.ZodOptional; }, z.core.$strip>; export type StaticAuditFinding = z.infer; export declare const replayAuditReportSchema: z.ZodObject<{ oldPassStillPass: z.ZodBoolean; checked: z.ZodNumber; regressions: z.ZodDefault>>; newlyBlocked: z.ZodDefault>>; skippedNoHistory: z.ZodDefault; }, z.core.$strip>; export type ReplayAuditReport = z.infer; export declare const installVerdictSchema: z.ZodObject<{ accepted: z.ZodBoolean; staticFindings: z.ZodArray; severity: z.ZodEnum<{ error: "error"; warn: "warn"; }>; message: z.ZodString; at: z.ZodOptional; }, z.core.$strip>>; replay: z.ZodObject<{ oldPassStillPass: z.ZodBoolean; checked: z.ZodNumber; regressions: z.ZodDefault>>; newlyBlocked: z.ZodDefault>>; skippedNoHistory: z.ZodDefault; }, z.core.$strip>; }, z.core.$strip>; export type InstallVerdict = z.infer;