/** * 人类工具的卡协议(编码规范 §8.1 / §9;语义出处 OS 05,AM 06/07)。 * * **双层边界**:范式(loop / flow / skill)是后端实现逻辑的模型,只存在于引擎层; * 本文件是**前端呈现协议**,前端永远感知不到范式。旧文「四卡」的映射: * 执行卡 → 执行工单(work order · execution) * 放行卡 → 验收(工作区可修订报告 + 对话区验收单)(work order · acceptance) * 决策 / 补全 → 对话卡(decision / elicitation) * 落地失败卡 = 执行工单的系统预置形态,不构成第五种卡(OS 7.3)。 * * 形状以 2026-07-26 原型定稿为准(`~/coding/JCAI_PRD/workbench/_data/model.ts`); * 枚举值改用英文标识符 + 本文件的 *_LABEL 字典,界面文案由字典给出、与原型逐字一致。 */ import { z } from 'zod'; export declare const TONES: readonly ["ok", "warn", "danger", "brand", "muted"]; export declare const toneSchema: z.ZodEnum<{ ok: "ok"; warn: "warn"; danger: "danger"; brand: "brand"; muted: "muted"; }>; export type Tone = z.infer; /** 依据快照:调用必附上下文(OS 05)—— 裸调用基座必须拒发 */ export declare const basisSchema: z.ZodArray>; export type Basis = z.infer; export declare const formOptionSchema: z.ZodObject<{ value: z.ZodString; label: z.ZodString; negative: z.ZodOptional; }, z.core.$strip>; export type FormOption = z.infer; export declare const FORM_FIELD_KINDS: readonly ["text", "textarea", "radio", "number", "select", "check", "date", "money", "file"]; export declare const formFieldKindSchema: z.ZodEnum<{ number: "number"; file: "file"; text: "text"; check: "check"; date: "date"; textarea: "textarea"; radio: "radio"; select: "select"; money: "money"; }>; export type FormFieldKind = z.infer; /** 表单字段:结构化交互的原子。卡片表单由本 schema 驱动渲染与校验,后端回传校验同 schema(§9.2) */ export declare const formFieldSchema: z.ZodObject<{ key: z.ZodString; label: z.ZodString; kind: z.ZodEnum<{ number: "number"; file: "file"; text: "text"; check: "check"; date: "date"; textarea: "textarea"; radio: "radio"; select: "select"; money: "money"; }>; placeholder: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>>; group: z.ZodOptional; hint: z.ZodOptional; ai: z.ZodOptional; unit: z.ZodOptional; required: z.ZodOptional; cols: z.ZodOptional, z.ZodLiteral<2>]>>; }, z.core.$strip>; export type FormField = z.infer; declare const fileDocSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"html">; name: z.ZodString; html: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"markdown">; name: z.ZodString; md: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"excel">; name: z.ZodString; sheet: z.ZodString; rows: z.ZodArray>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"word">; name: z.ZodString; blocks: z.ZodArray; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"ul">; items: z.ZodArray; }, z.core.$strip>]>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"pdf">; name: z.ZodString; src: z.ZodString; }, z.core.$strip>], "kind">; export type FileDoc = z.infer; export { fileDocSchema }; export declare const viewBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ t: z.ZodLiteral<"callout">; tone: z.ZodEnum<{ ok: "ok"; warn: "warn"; danger: "danger"; brand: "brand"; muted: "muted"; }>; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"kv">; title: z.ZodOptional; items: z.ZodArray>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"badges">; title: z.ZodOptional; items: z.ZodArray>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"table">; title: z.ZodOptional; cols: z.ZodArray; rows: z.ZodArray>; editable: z.ZodOptional; editableCols: z.ZodOptional>; linkDonut: z.ZodOptional; unit: z.ZodOptional; map: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"bars">; title: z.ZodOptional; max: z.ZodOptional; redline: z.ZodOptional; items: z.ZodArray; tone: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"donut">; title: z.ZodOptional; unit: z.ZodOptional; items: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"mail">; dir: z.ZodEnum<{ out: "out"; in: "in"; }>; statusLabel: z.ZodOptional; editable: z.ZodOptional; from: z.ZodString; fromAddr: z.ZodOptional; to: z.ZodString; cc: z.ZodOptional; subject: z.ZodString; time: z.ZodString; body: z.ZodString; attachments: z.ZodOptional; file: z.ZodOptional; name: z.ZodString; html: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"markdown">; name: z.ZodString; md: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"excel">; name: z.ZodString; sheet: z.ZodString; rows: z.ZodArray>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"word">; name: z.ZodString; blocks: z.ZodArray; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"ul">; items: z.ZodArray; }, z.core.$strip>]>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"pdf">; name: z.ZodString; src: z.ZodString; }, z.core.$strip>], "kind">>; }, z.core.$strip>>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"cards">; title: z.ZodOptional; items: z.ZodArray; tone: z.ZodOptional>; title: z.ZodString; code: z.ZodOptional; swap: z.ZodOptional; }, z.core.$strip>>; big: z.ZodString; bigLabel: z.ZodOptional; meta: z.ZodOptional>>; note: z.ZodOptional; from: z.ZodOptional; time: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"waiting">; label: z.ZodString; hint: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"files">; title: z.ZodOptional; items: z.ZodArray; name: z.ZodString; html: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"markdown">; name: z.ZodString; md: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"excel">; name: z.ZodString; sheet: z.ZodString; rows: z.ZodArray>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"word">; name: z.ZodString; blocks: z.ZodArray; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"ul">; items: z.ZodArray; }, z.core.$strip>]>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"pdf">; name: z.ZodString; src: z.ZodString; }, z.core.$strip>], "kind">; }, z.core.$strip>>; }, z.core.$strip>], "t">; export type ViewBlock = z.infer; /** * 阶段:交互层的统一进展刻度。 * 引擎层的来源随范式而异(loop = CMMN Stage / 里程碑,flow = 步序位置),前端不感知。 */ export declare const stageSchema: z.ZodObject<{ id: z.core.$ZodBranded; label: z.ZodString; round: z.ZodOptional; }, z.core.$strip>; export type Stage = z.infer; export declare const DELIVERABLE_STATES: readonly ["draft", "pending-acceptance", "released", "rejected"]; export declare const deliverableStateSchema: z.ZodEnum<{ released: "released"; draft: "draft"; "pending-acceptance": "pending-acceptance"; rejected: "rejected"; }>; export type DeliverableState = z.infer; export declare const DELIVERABLE_STATE_LABEL: Readonly>; /** 过程成果:每个成果都要经验收放行才落地(放行门,OS 09) */ export declare const deliverableSchema: z.ZodObject<{ id: z.core.$ZodBranded; stage: z.core.$ZodBranded; round: z.ZodOptional; title: z.ZodString; desc: z.ZodOptional; blocks: z.ZodArray; tone: z.ZodEnum<{ ok: "ok"; warn: "warn"; danger: "danger"; brand: "brand"; muted: "muted"; }>; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"kv">; title: z.ZodOptional; items: z.ZodArray>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"badges">; title: z.ZodOptional; items: z.ZodArray>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"table">; title: z.ZodOptional; cols: z.ZodArray; rows: z.ZodArray>; editable: z.ZodOptional; editableCols: z.ZodOptional>; linkDonut: z.ZodOptional; unit: z.ZodOptional; map: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"bars">; title: z.ZodOptional; max: z.ZodOptional; redline: z.ZodOptional; items: z.ZodArray; tone: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"donut">; title: z.ZodOptional; unit: z.ZodOptional; items: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"mail">; dir: z.ZodEnum<{ out: "out"; in: "in"; }>; statusLabel: z.ZodOptional; editable: z.ZodOptional; from: z.ZodString; fromAddr: z.ZodOptional; to: z.ZodString; cc: z.ZodOptional; subject: z.ZodString; time: z.ZodString; body: z.ZodString; attachments: z.ZodOptional; file: z.ZodOptional; name: z.ZodString; html: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"markdown">; name: z.ZodString; md: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"excel">; name: z.ZodString; sheet: z.ZodString; rows: z.ZodArray>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"word">; name: z.ZodString; blocks: z.ZodArray; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"ul">; items: z.ZodArray; }, z.core.$strip>]>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"pdf">; name: z.ZodString; src: z.ZodString; }, z.core.$strip>], "kind">>; }, z.core.$strip>>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"cards">; title: z.ZodOptional; items: z.ZodArray; tone: z.ZodOptional>; title: z.ZodString; code: z.ZodOptional; swap: z.ZodOptional; }, z.core.$strip>>; big: z.ZodString; bigLabel: z.ZodOptional; meta: z.ZodOptional>>; note: z.ZodOptional; from: z.ZodOptional; time: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"waiting">; label: z.ZodString; hint: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"files">; title: z.ZodOptional; items: z.ZodArray; name: z.ZodString; html: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"markdown">; name: z.ZodString; md: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"excel">; name: z.ZodString; sheet: z.ZodString; rows: z.ZodArray>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"word">; name: z.ZodString; blocks: z.ZodArray; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"ul">; items: z.ZodArray; }, z.core.$strip>]>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"pdf">; name: z.ZodString; src: z.ZodString; }, z.core.$strip>], "kind">; }, z.core.$strip>>; }, z.core.$strip>], "t">>; state: z.ZodEnum<{ released: "released"; draft: "draft"; "pending-acceptance": "pending-acceptance"; rejected: "rejected"; }>; at: z.ZodOptional; }, z.core.$strip>; export type Deliverable = z.infer; export declare const WORK_ORDER_MODES: readonly ["execution", "acceptance"]; export declare const workOrderModeSchema: z.ZodEnum<{ execution: "execution"; acceptance: "acceptance"; }>; export type WorkOrderMode = z.infer; export declare const WORK_ORDER_MODE_LABEL: Readonly>; /** * 办结口径:执行件只有「已提交」,验收件是放行三选一 —— 与回传协议同一套标识符。 * 界面文案由字典给出(与原型逐字一致),不在组件里散落中文。 */ export declare const WORK_ORDER_RESULTS: readonly ["submitted", "pass", "redo", "revise"]; export declare const workOrderResultSchema: z.ZodEnum<{ redo: "redo"; revise: "revise"; submitted: "submitted"; pass: "pass"; }>; export type WorkOrderResult = z.infer; export declare const WORK_ORDER_RESULT_LABEL: Readonly>; /** 驳回两式 —— 退回即重来,判定处只此一处 */ export declare function isRejection(result: WorkOrderResult): boolean; /** 完成回传:谁、何时、答了什么(回传即留痕) */ export declare const workDoneSchema: z.ZodObject<{ at: z.ZodISODateTime; by: z.core.$ZodBranded; result: z.ZodEnum<{ redo: "redo"; revise: "revise"; submitted: "submitted"; pass: "pass"; }>; values: z.ZodOptional>; }, z.core.$strip>; export type WorkDone = z.infer; /** 执行工单:作业指导书 + 空表单(补全并入此类);落地失败卡是它的系统预置形态 */ export declare const executionWorkOrderSchema: z.ZodObject<{ mode: z.ZodLiteral<"execution">; preset: z.ZodOptional>; ask: z.ZodString; standard: z.ZodOptional; steps: z.ZodOptional>; basedOn: z.ZodOptional>; blocks: z.ZodOptional; tone: z.ZodEnum<{ ok: "ok"; warn: "warn"; danger: "danger"; brand: "brand"; muted: "muted"; }>; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"kv">; title: z.ZodOptional; items: z.ZodArray>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"badges">; title: z.ZodOptional; items: z.ZodArray>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"table">; title: z.ZodOptional; cols: z.ZodArray; rows: z.ZodArray>; editable: z.ZodOptional; editableCols: z.ZodOptional>; linkDonut: z.ZodOptional; unit: z.ZodOptional; map: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"bars">; title: z.ZodOptional; max: z.ZodOptional; redline: z.ZodOptional; items: z.ZodArray; tone: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"donut">; title: z.ZodOptional; unit: z.ZodOptional; items: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"mail">; dir: z.ZodEnum<{ out: "out"; in: "in"; }>; statusLabel: z.ZodOptional; editable: z.ZodOptional; from: z.ZodString; fromAddr: z.ZodOptional; to: z.ZodString; cc: z.ZodOptional; subject: z.ZodString; time: z.ZodString; body: z.ZodString; attachments: z.ZodOptional; file: z.ZodOptional; name: z.ZodString; html: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"markdown">; name: z.ZodString; md: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"excel">; name: z.ZodString; sheet: z.ZodString; rows: z.ZodArray>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"word">; name: z.ZodString; blocks: z.ZodArray; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"ul">; items: z.ZodArray; }, z.core.$strip>]>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"pdf">; name: z.ZodString; src: z.ZodString; }, z.core.$strip>], "kind">>; }, z.core.$strip>>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"cards">; title: z.ZodOptional; items: z.ZodArray; tone: z.ZodOptional>; title: z.ZodString; code: z.ZodOptional; swap: z.ZodOptional; }, z.core.$strip>>; big: z.ZodString; bigLabel: z.ZodOptional; meta: z.ZodOptional>>; note: z.ZodOptional; from: z.ZodOptional; time: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"waiting">; label: z.ZodString; hint: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"files">; title: z.ZodOptional; items: z.ZodArray; name: z.ZodString; html: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"markdown">; name: z.ZodString; md: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"excel">; name: z.ZodString; sheet: z.ZodString; rows: z.ZodArray>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"word">; name: z.ZodString; blocks: z.ZodArray; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"ul">; items: z.ZodArray; }, z.core.$strip>]>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"pdf">; name: z.ZodString; src: z.ZodString; }, z.core.$strip>], "kind">; }, z.core.$strip>>; }, z.core.$strip>], "t">>>; fields: z.ZodArray; placeholder: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>>; group: z.ZodOptional; hint: z.ZodOptional; ai: z.ZodOptional; unit: z.ZodOptional; required: z.ZodOptional; cols: z.ZodOptional, z.ZodLiteral<2>]>>; }, z.core.$strip>>; submitLabel: z.ZodOptional; id: z.core.$ZodBranded; at: z.ZodISODateTime; title: z.ZodString; basis: z.ZodArray>; stage: z.ZodOptional>; done: z.ZodOptional; result: z.ZodEnum<{ redo: "redo"; revise: "revise"; submitted: "submitted"; pass: "pass"; }>; values: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; export type ExecutionWorkOrder = z.infer; export declare const acceptanceCriterionCheckSchema: z.ZodObject<{ label: z.ZodString; level: z.ZodEnum<{ L1: "L1"; L2: "L2"; L3: "L3"; L4: "L4"; L5: "L5"; }>; pass: z.ZodBoolean; }, z.core.$strip>; export type AcceptanceCriterionCheck = z.infer; /** 待落地动作意向:预检全过才上卡,卡面呈现的即已验证的动作清单(OS 7.3) */ export declare const actionIntentViewSchema: z.ZodObject<{ label: z.ZodString; effect: z.ZodEnum<{ read: "read"; write: "write"; }>; detail: z.ZodString; }, z.core.$strip>; export type ActionIntentView = z.infer; export declare const ACTION_EFFECT_LABEL: Readonly>; /** 验收工单:AI 拟好的可修订报告 + 判据逐条核对 + 放行三选一 */ export declare const acceptanceWorkOrderSchema: z.ZodObject<{ mode: z.ZodLiteral<"acceptance">; deliverable: z.core.$ZodBranded; criteria: z.ZodArray; pass: z.ZodBoolean; }, z.core.$strip>>; actions: z.ZodOptional; detail: z.ZodString; }, z.core.$strip>>>; fields: z.ZodDefault; placeholder: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>>; group: z.ZodOptional; hint: z.ZodOptional; ai: z.ZodOptional; unit: z.ZodOptional; required: z.ZodOptional; cols: z.ZodOptional, z.ZodLiteral<2>]>>; }, z.core.$strip>>>; portChoice: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; passLabel: z.ZodOptional; id: z.core.$ZodBranded; at: z.ZodISODateTime; title: z.ZodString; basis: z.ZodArray>; stage: z.ZodOptional>; done: z.ZodOptional; result: z.ZodEnum<{ redo: "redo"; revise: "revise"; submitted: "submitted"; pass: "pass"; }>; values: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; export type AcceptanceWorkOrder = z.infer; export declare const workOrderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ mode: z.ZodLiteral<"execution">; preset: z.ZodOptional>; ask: z.ZodString; standard: z.ZodOptional; steps: z.ZodOptional>; basedOn: z.ZodOptional>; blocks: z.ZodOptional; tone: z.ZodEnum<{ ok: "ok"; warn: "warn"; danger: "danger"; brand: "brand"; muted: "muted"; }>; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"kv">; title: z.ZodOptional; items: z.ZodArray>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"badges">; title: z.ZodOptional; items: z.ZodArray>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"table">; title: z.ZodOptional; cols: z.ZodArray; rows: z.ZodArray>; editable: z.ZodOptional; editableCols: z.ZodOptional>; linkDonut: z.ZodOptional; unit: z.ZodOptional; map: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"bars">; title: z.ZodOptional; max: z.ZodOptional; redline: z.ZodOptional; items: z.ZodArray; tone: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"donut">; title: z.ZodOptional; unit: z.ZodOptional; items: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"mail">; dir: z.ZodEnum<{ out: "out"; in: "in"; }>; statusLabel: z.ZodOptional; editable: z.ZodOptional; from: z.ZodString; fromAddr: z.ZodOptional; to: z.ZodString; cc: z.ZodOptional; subject: z.ZodString; time: z.ZodString; body: z.ZodString; attachments: z.ZodOptional; file: z.ZodOptional; name: z.ZodString; html: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"markdown">; name: z.ZodString; md: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"excel">; name: z.ZodString; sheet: z.ZodString; rows: z.ZodArray>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"word">; name: z.ZodString; blocks: z.ZodArray; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"ul">; items: z.ZodArray; }, z.core.$strip>]>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"pdf">; name: z.ZodString; src: z.ZodString; }, z.core.$strip>], "kind">>; }, z.core.$strip>>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"cards">; title: z.ZodOptional; items: z.ZodArray; tone: z.ZodOptional>; title: z.ZodString; code: z.ZodOptional; swap: z.ZodOptional; }, z.core.$strip>>; big: z.ZodString; bigLabel: z.ZodOptional; meta: z.ZodOptional>>; note: z.ZodOptional; from: z.ZodOptional; time: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"waiting">; label: z.ZodString; hint: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"files">; title: z.ZodOptional; items: z.ZodArray; name: z.ZodString; html: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"markdown">; name: z.ZodString; md: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"excel">; name: z.ZodString; sheet: z.ZodString; rows: z.ZodArray>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"word">; name: z.ZodString; blocks: z.ZodArray; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ t: z.ZodLiteral<"ul">; items: z.ZodArray; }, z.core.$strip>]>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"pdf">; name: z.ZodString; src: z.ZodString; }, z.core.$strip>], "kind">; }, z.core.$strip>>; }, z.core.$strip>], "t">>>; fields: z.ZodArray; placeholder: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>>; group: z.ZodOptional; hint: z.ZodOptional; ai: z.ZodOptional; unit: z.ZodOptional; required: z.ZodOptional; cols: z.ZodOptional, z.ZodLiteral<2>]>>; }, z.core.$strip>>; submitLabel: z.ZodOptional; id: z.core.$ZodBranded; at: z.ZodISODateTime; title: z.ZodString; basis: z.ZodArray>; stage: z.ZodOptional>; done: z.ZodOptional; result: z.ZodEnum<{ redo: "redo"; revise: "revise"; submitted: "submitted"; pass: "pass"; }>; values: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ mode: z.ZodLiteral<"acceptance">; deliverable: z.core.$ZodBranded; criteria: z.ZodArray; pass: z.ZodBoolean; }, z.core.$strip>>; actions: z.ZodOptional; detail: z.ZodString; }, z.core.$strip>>>; fields: z.ZodDefault; placeholder: z.ZodOptional; options: z.ZodOptional; }, z.core.$strip>>>; group: z.ZodOptional; hint: z.ZodOptional; ai: z.ZodOptional; unit: z.ZodOptional; required: z.ZodOptional; cols: z.ZodOptional, z.ZodLiteral<2>]>>; }, z.core.$strip>>>; portChoice: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; passLabel: z.ZodOptional; id: z.core.$ZodBranded; at: z.ZodISODateTime; title: z.ZodString; basis: z.ZodArray>; stage: z.ZodOptional>; done: z.ZodOptional; result: z.ZodEnum<{ redo: "redo"; revise: "revise"; submitted: "submitted"; pass: "pass"; }>; values: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>], "mode">; export type WorkOrder = z.infer; /** AI 发言的类型标记 —— 对话区可分辨:结论 / 指导 / 判据 */ export declare const AI_TAGS: readonly ["conclusion", "guidance", "criterion"]; export declare const aiTagSchema: z.ZodEnum<{ conclusion: "conclusion"; guidance: "guidance"; criterion: "criterion"; }>; export type AiTag = z.infer; export declare const AI_TAG_LABEL: Readonly>; /** 决策卡:分支条件选择表;含自定义收尾项 */ export declare const decisionCardSchema: z.ZodObject<{ k: z.ZodLiteral<"decision">; ask: z.ZodString; basis: z.ZodArray>; recommend: z.ZodOptional; options: z.ZodArray; consequence: z.ZodOptional; recommended: z.ZodOptional; }, z.core.$strip>>; allowCustom: z.ZodDefault; chosen: z.ZodOptional; note: z.ZodOptional; }, z.core.$strip>>; id: z.core.$ZodBranded; at: z.ZodISODateTime; }, z.core.$strip>; export type DecisionCard = z.infer; /** 补全卡:就地要几个小信息;含「没法填」旁路 —— 两条路必走其一 */ export declare const elicitationCardSchema: z.ZodObject<{ k: z.ZodLiteral<"elicitation">; ask: z.ZodString; basis: z.ZodOptional>>; fields: z.ZodArray; }, z.core.$strip>>; done: z.ZodOptional; values: z.ZodRecord; reason: z.ZodOptional; }, z.core.$strip>>; id: z.core.$ZodBranded; at: z.ZodISODateTime; }, z.core.$strip>; export type ElicitationCard = z.infer; /** 评价卡:任务评价(评分 1–5 + 改进建议) */ export declare const ratingCardSchema: z.ZodObject<{ k: z.ZodLiteral<"rating">; ask: z.ZodString; basis: z.ZodOptional>>; done: z.ZodOptional; score: z.ZodNumber; note: z.ZodOptional; }, z.core.$strip>>; id: z.core.$ZodBranded; at: z.ZodISODateTime; }, z.core.$strip>; export type RatingCard = z.infer; export declare const chatCardSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ k: z.ZodLiteral<"decision">; ask: z.ZodString; basis: z.ZodArray>; recommend: z.ZodOptional; options: z.ZodArray; consequence: z.ZodOptional; recommended: z.ZodOptional; }, z.core.$strip>>; allowCustom: z.ZodDefault; chosen: z.ZodOptional; note: z.ZodOptional; }, z.core.$strip>>; id: z.core.$ZodBranded; at: z.ZodISODateTime; }, z.core.$strip>, z.ZodObject<{ k: z.ZodLiteral<"elicitation">; ask: z.ZodString; basis: z.ZodOptional>>; fields: z.ZodArray; }, z.core.$strip>>; done: z.ZodOptional; values: z.ZodRecord; reason: z.ZodOptional; }, z.core.$strip>>; id: z.core.$ZodBranded; at: z.ZodISODateTime; }, z.core.$strip>, z.ZodObject<{ k: z.ZodLiteral<"rating">; ask: z.ZodString; basis: z.ZodOptional>>; done: z.ZodOptional; score: z.ZodNumber; note: z.ZodOptional; }, z.core.$strip>>; id: z.core.$ZodBranded; at: z.ZodISODateTime; }, z.core.$strip>], "k">; export type ChatCard = z.infer; export declare const chatMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ k: z.ZodLiteral<"ai">; text: z.ZodString; tag: z.ZodOptional>; ref: z.ZodOptional>; id: z.core.$ZodBranded; at: z.ZodISODateTime; }, z.core.$strip>, z.ZodObject<{ k: z.ZodLiteral<"human">; text: z.ZodString; by: z.core.$ZodBranded; id: z.core.$ZodBranded; at: z.ZodISODateTime; }, z.core.$strip>, z.ZodObject<{ k: z.ZodLiteral<"system">; type: z.ZodEnum<{ human: "human"; data: "data"; time: "time"; control: "control"; }>; text: z.ZodString; id: z.core.$ZodBranded; at: z.ZodISODateTime; }, z.core.$strip>, z.ZodObject<{ k: z.ZodLiteral<"decision">; ask: z.ZodString; basis: z.ZodArray>; recommend: z.ZodOptional; options: z.ZodArray; consequence: z.ZodOptional; recommended: z.ZodOptional; }, z.core.$strip>>; allowCustom: z.ZodDefault; chosen: z.ZodOptional; note: z.ZodOptional; }, z.core.$strip>>; id: z.core.$ZodBranded; at: z.ZodISODateTime; }, z.core.$strip>, z.ZodObject<{ k: z.ZodLiteral<"elicitation">; ask: z.ZodString; basis: z.ZodOptional>>; fields: z.ZodArray; }, z.core.$strip>>; done: z.ZodOptional; values: z.ZodRecord; reason: z.ZodOptional; }, z.core.$strip>>; id: z.core.$ZodBranded; at: z.ZodISODateTime; }, z.core.$strip>, z.ZodObject<{ k: z.ZodLiteral<"rating">; ask: z.ZodString; basis: z.ZodOptional>>; done: z.ZodOptional; score: z.ZodNumber; note: z.ZodOptional; }, z.core.$strip>>; id: z.core.$ZodBranded; at: z.ZodISODateTime; }, z.core.$strip>], "k">; export type ChatMessage = z.infer; export declare const workOrderReplySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ mode: z.ZodLiteral<"execution">; workOrderId: z.core.$ZodBranded; values: z.ZodRecord; }, z.core.$strip>, z.ZodObject<{ mode: z.ZodLiteral<"acceptance">; workOrderId: z.core.$ZodBranded; verdict: z.ZodUnion, z.ZodEnum<{ redo: "redo"; revise: "revise"; }>]>; values: z.ZodDefault>; comment: z.ZodOptional; selectedPorts: z.ZodDefault>; }, z.core.$strip>], "mode">; export type WorkOrderReply = z.infer; export declare const chatCardReplySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ k: z.ZodLiteral<"decision">; cardId: z.core.$ZodBranded; value: z.ZodString; note: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ k: z.ZodLiteral<"elicitation">; cardId: z.core.$ZodBranded; values: z.ZodDefault>; reason: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ k: z.ZodLiteral<"rating">; cardId: z.core.$ZodBranded; score: z.ZodNumber; note: z.ZodOptional; }, z.core.$strip>], "k">; export type ChatCardReply = z.infer; /** * 驳回必附意见 —— 三规矩之一的机检形态(OS 05)。 * 后端回传校验与前端提交校验共用本函数。 */ export declare function rejectionNeedsComment(reply: WorkOrderReply): boolean; /** 补全卡两条路必走其一:要么填值,要么给「没法填」的理由 */ export declare function elicitationReplyIsEmpty(reply: ChatCardReply): boolean;