This repository has been archived on 2026-09-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
BPOS-TMP-REPO/api-report/packages/contracts/src/card.d.ts
T
xcsandClaude Opus 5 0aa2fc11b0 资料文件真产出来了;E04/I01 补到验收线,顺手填了几个「墙拦住却不给路」的坑
**资料文件全链**(用户:审核资料这一步要真产出 word/excel/md/html,前端能渲、点资料名能开)
接手时这一步一个文件都产不出来 —— S3 剧本白纸黑字写着「file_ref 本 MVP 阶段可留空」。
文件是台账那一行的投影,不另存一份:
· 声明 `file:{titleColumn,bodyColumn,formatColumn}`,它同时是授权面(没声明就点不开)
· 现造真字节 —— docx/xlsx 是自己打的 OOXML 包(zip-write:store+CRC32,零依赖)
· 读回来渲 —— 解的就是造出来那份字节,渲得出来才证明文件是真的
· 件上 `data-file-of` → 工作区二级界面(Word 纸面/Excel 网格/渲好的 md/沙箱 html)+ 下载原件
放行落地前把每一份冻进 `sys.task_asset_file`(迁移 0029):归档件点开的必须是签字那一刻
那一份,而资料落在主数据上、试跑单不落正式表 —— 不存这一份,收工后一个都点不开。
工作成果里「产出的资料」自成一摞。Markdown 富文本渲染顺带销账(仍零依赖)。

**Harness**
· 画面按「这一拍办完之后」在办的那一步挑 —— 从前拿拍首的局面决定拍尾的事:
  收掉 S4、发出 S5 的卡,而屏上还摆着 S4 的只读件,人无处可填(墙要配路第四次现形)
· 验收「重做」真能退回重做,且打回后台账没动就不许再提交(软硬两段,不锁死单子)
· 立监听的授权面是清单声明;发卡的授权面是调人预算,不是计划项
· 读工具同参重调有兜底;空转写身后还有行动就不废串;finish 的 doneWhen 按写完后的草稿算

**界面**
· 翻件与翻页各归各位(从前二选一,多卡多页时页翻不动);没得翻写「—」不写 0/0
· 工作成果详情能翻份;表宽超出能横滑(E04/I01 抄版式时把 overflow-x 抄丢了)
· 查看面灰底滚过一屏变白 —— 两条独立的路都治了(沙箱内不同色 / 弹性子项不长个)
· 测试台「取不到」不再当成「还活着」

**活动**
E04 关系覆盖、I01 品牌内容各自补到验收线:判据全读基座数、判据指向的东西摆上卡面、
样例满载且名字 ≤14 字;提交前要裁的判据搬进说明书(模型会压拍,压过之后只有说明书还在)。

验收:e2e i01 4/4、e04 3/3 全部 released,资料在办中渲得出、放行后存了档点得开;
门禁 typecheck/lint/depcruise/1628 测全绿。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EEJX8Z7CHejvwmDQyPQuBX
2026-08-24 10:26:45 +08:00

2211 lines
81 KiB
TypeScript

/**
* 人类工具的卡协议(编码规范 §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<typeof toneSchema>;
/** 依据快照:调用必附上下文(OS 05)—— 裸调用基座必须拒发 */
export declare const basisSchema: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>;
export type Basis = z.infer<typeof basisSchema>;
export declare const formOptionSchema: z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
negative: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export type FormOption = z.infer<typeof formOptionSchema>;
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<typeof formFieldKindSchema>;
/** 表单字段:结构化交互的原子。卡片表单由本 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<z.ZodString>;
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
negative: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>>>;
group: z.ZodOptional<z.ZodString>;
hint: z.ZodOptional<z.ZodString>;
ai: z.ZodOptional<z.ZodString>;
ledger: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
required: z.ZodOptional<z.ZodBoolean>;
cols: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
}, z.core.$strip>;
export type FormField = z.infer<typeof formFieldSchema>;
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;
html: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"excel">;
name: z.ZodString;
sheet: z.ZodString;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"word">;
name: z.ZodString;
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
t: z.ZodEnum<{
h1: "h1";
h2: "h2";
p: "p";
}>;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"ul">;
items: z.ZodArray<z.ZodString>;
}, 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<typeof fileDocSchema>;
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<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
fromItem: z.ZodOptional<z.ZodObject<{
item: z.ZodString;
field: z.ZodString;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"badges">;
title: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
on: z.ZodBoolean;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"table">;
title: z.ZodOptional<z.ZodString>;
cols: z.ZodArray<z.ZodString>;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
editable: z.ZodOptional<z.ZodBoolean>;
editableCols: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
linkDonut: z.ZodOptional<z.ZodObject<{
col: z.ZodNumber;
title: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
map: z.ZodArray<z.ZodObject<{
match: z.ZodString;
label: z.ZodString;
tone: z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"bars">;
title: z.ZodOptional<z.ZodString>;
max: z.ZodOptional<z.ZodNumber>;
redline: z.ZodOptional<z.ZodNumber>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
text: z.ZodOptional<z.ZodString>;
tone: z.ZodOptional<z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"donut">;
title: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
tone: z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"mail">;
dir: z.ZodEnum<{
out: "out";
in: "in";
}>;
statusLabel: z.ZodOptional<z.ZodString>;
editable: z.ZodOptional<z.ZodBoolean>;
from: z.ZodString;
fromAddr: z.ZodOptional<z.ZodString>;
to: z.ZodString;
cc: z.ZodOptional<z.ZodString>;
subject: z.ZodString;
time: z.ZodString;
body: z.ZodString;
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
meta: z.ZodOptional<z.ZodString>;
file: z.ZodOptional<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;
html: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"excel">;
name: z.ZodString;
sheet: z.ZodString;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"word">;
name: z.ZodString;
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
t: z.ZodEnum<{
h1: "h1";
h2: "h2";
p: "p";
}>;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"ul">;
items: z.ZodArray<z.ZodString>;
}, 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<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
tag: z.ZodString;
icon: z.ZodOptional<z.ZodString>;
tone: z.ZodOptional<z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>>;
title: z.ZodString;
code: z.ZodOptional<z.ZodString>;
swap: z.ZodOptional<z.ZodObject<{
from: z.ZodString;
to: z.ZodString;
hint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
big: z.ZodString;
bigLabel: z.ZodOptional<z.ZodString>;
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
note: z.ZodOptional<z.ZodString>;
from: z.ZodOptional<z.ZodString>;
time: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"waiting">;
label: z.ZodString;
hint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"files">;
title: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
desc: z.ZodString;
file: 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;
html: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"excel">;
name: z.ZodString;
sheet: z.ZodString;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"word">;
name: z.ZodString;
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
t: z.ZodEnum<{
h1: "h1";
h2: "h2";
p: "p";
}>;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"ul">;
items: z.ZodArray<z.ZodString>;
}, 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<typeof viewBlockSchema>;
/**
* 阶段:交互层的统一进展刻度。
* 引擎层的来源随范式而异(loop = CMMN Stage / 里程碑,flow = 步序位置),前端不感知。
*/
export declare const stageSchema: z.ZodObject<{
id: z.core.$ZodBranded<z.ZodString, "StageId", "out">;
label: z.ZodString;
round: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type Stage = z.infer<typeof stageSchema>;
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<typeof deliverableStateSchema>;
export declare const DELIVERABLE_STATE_LABEL: Readonly<Record<DeliverableState, string>>;
/** 过程成果:每个成果都要经验收放行才落地(放行门,OS 09) */
export declare const deliverableSchema: z.ZodObject<{
id: z.core.$ZodBranded<z.ZodString, "DeliverableId", "out">;
stage: z.core.$ZodBranded<z.ZodString, "StageId", "out">;
round: z.ZodOptional<z.ZodNumber>;
title: z.ZodString;
desc: z.ZodOptional<z.ZodString>;
blocks: z.ZodArray<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<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
fromItem: z.ZodOptional<z.ZodObject<{
item: z.ZodString;
field: z.ZodString;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"badges">;
title: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
on: z.ZodBoolean;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"table">;
title: z.ZodOptional<z.ZodString>;
cols: z.ZodArray<z.ZodString>;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
editable: z.ZodOptional<z.ZodBoolean>;
editableCols: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
linkDonut: z.ZodOptional<z.ZodObject<{
col: z.ZodNumber;
title: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
map: z.ZodArray<z.ZodObject<{
match: z.ZodString;
label: z.ZodString;
tone: z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"bars">;
title: z.ZodOptional<z.ZodString>;
max: z.ZodOptional<z.ZodNumber>;
redline: z.ZodOptional<z.ZodNumber>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
text: z.ZodOptional<z.ZodString>;
tone: z.ZodOptional<z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"donut">;
title: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
tone: z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"mail">;
dir: z.ZodEnum<{
out: "out";
in: "in";
}>;
statusLabel: z.ZodOptional<z.ZodString>;
editable: z.ZodOptional<z.ZodBoolean>;
from: z.ZodString;
fromAddr: z.ZodOptional<z.ZodString>;
to: z.ZodString;
cc: z.ZodOptional<z.ZodString>;
subject: z.ZodString;
time: z.ZodString;
body: z.ZodString;
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
meta: z.ZodOptional<z.ZodString>;
file: z.ZodOptional<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;
html: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"excel">;
name: z.ZodString;
sheet: z.ZodString;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"word">;
name: z.ZodString;
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
t: z.ZodEnum<{
h1: "h1";
h2: "h2";
p: "p";
}>;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"ul">;
items: z.ZodArray<z.ZodString>;
}, 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<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
tag: z.ZodString;
icon: z.ZodOptional<z.ZodString>;
tone: z.ZodOptional<z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>>;
title: z.ZodString;
code: z.ZodOptional<z.ZodString>;
swap: z.ZodOptional<z.ZodObject<{
from: z.ZodString;
to: z.ZodString;
hint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
big: z.ZodString;
bigLabel: z.ZodOptional<z.ZodString>;
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
note: z.ZodOptional<z.ZodString>;
from: z.ZodOptional<z.ZodString>;
time: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"waiting">;
label: z.ZodString;
hint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"files">;
title: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
desc: z.ZodString;
file: 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;
html: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"excel">;
name: z.ZodString;
sheet: z.ZodString;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"word">;
name: z.ZodString;
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
t: z.ZodEnum<{
h1: "h1";
h2: "h2";
p: "p";
}>;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"ul">;
items: z.ZodArray<z.ZodString>;
}, 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.ZodString>;
}, z.core.$strip>;
export type Deliverable = z.infer<typeof deliverableSchema>;
export declare const WORK_ORDER_MODES: readonly ["execution", "acceptance"];
export declare const workOrderModeSchema: z.ZodEnum<{
execution: "execution";
acceptance: "acceptance";
}>;
export type WorkOrderMode = z.infer<typeof workOrderModeSchema>;
export declare const WORK_ORDER_MODE_LABEL: Readonly<Record<WorkOrderMode, string>>;
/**
* 办结口径:执行件只有「已提交」,验收件是放行三选一 —— 与回传协议同一套标识符。
* 界面文案由字典给出(与原型逐字一致),不在组件里散落中文。
*/
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<typeof workOrderResultSchema>;
export declare const WORK_ORDER_RESULT_LABEL: Readonly<Record<WorkOrderResult, string>>;
/** 驳回两式 —— 退回即重来,判定处只此一处 */
export declare function isRejection(result: WorkOrderResult): boolean;
/** 完成回传:谁、何时、答了什么(回传即留痕) */
export declare const workDoneSchema: z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
result: z.ZodEnum<{
redo: "redo";
revise: "revise";
submitted: "submitted";
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>;
export type WorkDone = z.infer<typeof workDoneSchema>;
/** 执行工单:作业指导书 + 空表单(补全并入此类);落地失败卡是它的系统预置形态 */
export declare const executionWorkOrderSchema: z.ZodObject<{
mode: z.ZodLiteral<"execution">;
preset: z.ZodOptional<z.ZodEnum<{
"landing-failure": "landing-failure";
}>>;
ask: z.ZodString;
standard: z.ZodOptional<z.ZodString>;
steps: z.ZodOptional<z.ZodArray<z.ZodString>>;
basedOn: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "DeliverableId", "out">>;
blocks: z.ZodOptional<z.ZodArray<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<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
fromItem: z.ZodOptional<z.ZodObject<{
item: z.ZodString;
field: z.ZodString;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"badges">;
title: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
on: z.ZodBoolean;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"table">;
title: z.ZodOptional<z.ZodString>;
cols: z.ZodArray<z.ZodString>;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
editable: z.ZodOptional<z.ZodBoolean>;
editableCols: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
linkDonut: z.ZodOptional<z.ZodObject<{
col: z.ZodNumber;
title: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
map: z.ZodArray<z.ZodObject<{
match: z.ZodString;
label: z.ZodString;
tone: z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"bars">;
title: z.ZodOptional<z.ZodString>;
max: z.ZodOptional<z.ZodNumber>;
redline: z.ZodOptional<z.ZodNumber>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
text: z.ZodOptional<z.ZodString>;
tone: z.ZodOptional<z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"donut">;
title: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
tone: z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"mail">;
dir: z.ZodEnum<{
out: "out";
in: "in";
}>;
statusLabel: z.ZodOptional<z.ZodString>;
editable: z.ZodOptional<z.ZodBoolean>;
from: z.ZodString;
fromAddr: z.ZodOptional<z.ZodString>;
to: z.ZodString;
cc: z.ZodOptional<z.ZodString>;
subject: z.ZodString;
time: z.ZodString;
body: z.ZodString;
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
meta: z.ZodOptional<z.ZodString>;
file: z.ZodOptional<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;
html: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"excel">;
name: z.ZodString;
sheet: z.ZodString;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"word">;
name: z.ZodString;
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
t: z.ZodEnum<{
h1: "h1";
h2: "h2";
p: "p";
}>;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"ul">;
items: z.ZodArray<z.ZodString>;
}, 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<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
tag: z.ZodString;
icon: z.ZodOptional<z.ZodString>;
tone: z.ZodOptional<z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>>;
title: z.ZodString;
code: z.ZodOptional<z.ZodString>;
swap: z.ZodOptional<z.ZodObject<{
from: z.ZodString;
to: z.ZodString;
hint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
big: z.ZodString;
bigLabel: z.ZodOptional<z.ZodString>;
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
note: z.ZodOptional<z.ZodString>;
from: z.ZodOptional<z.ZodString>;
time: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"waiting">;
label: z.ZodString;
hint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"files">;
title: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
desc: z.ZodString;
file: 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;
html: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"excel">;
name: z.ZodString;
sheet: z.ZodString;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"word">;
name: z.ZodString;
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
t: z.ZodEnum<{
h1: "h1";
h2: "h2";
p: "p";
}>;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"ul">;
items: z.ZodArray<z.ZodString>;
}, 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<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<z.ZodString>;
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
negative: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>>>;
group: z.ZodOptional<z.ZodString>;
hint: z.ZodOptional<z.ZodString>;
ai: z.ZodOptional<z.ZodString>;
ledger: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
required: z.ZodOptional<z.ZodBoolean>;
cols: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
}, z.core.$strip>>;
submitLabel: z.ZodOptional<z.ZodString>;
gate: z.ZodOptional<z.ZodObject<{
ready: z.ZodBoolean;
why: z.ZodString;
blanks: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
id: z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">;
at: z.ZodISODateTime;
title: z.ZodString;
basis: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>;
stage: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StageId", "out">>;
done: z.ZodOptional<z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
result: z.ZodEnum<{
redo: "redo";
revise: "revise";
submitted: "submitted";
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type ExecutionWorkOrder = z.infer<typeof executionWorkOrderSchema>;
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;
settled: z.ZodOptional<z.ZodBoolean>;
rationale: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type AcceptanceCriterionCheck = z.infer<typeof acceptanceCriterionCheckSchema>;
/** 待落地动作意向:预检全过才上卡,卡面呈现的即已验证的动作清单(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<typeof actionIntentViewSchema>;
export declare const ACTION_EFFECT_LABEL: Readonly<Record<'read' | 'write', string>>;
/** 验收工单:AI 拟好的可修订报告 + 判据逐条核对 + 放行三选一 */
export declare const acceptanceWorkOrderSchema: z.ZodObject<{
mode: z.ZodLiteral<"acceptance">;
deliverable: z.core.$ZodBranded<z.ZodString, "DeliverableId", "out">;
criteria: z.ZodArray<z.ZodObject<{
label: z.ZodString;
level: z.ZodEnum<{
L1: "L1";
L2: "L2";
L3: "L3";
L4: "L4";
L5: "L5";
}>;
pass: z.ZodBoolean;
settled: z.ZodOptional<z.ZodBoolean>;
rationale: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
label: z.ZodString;
effect: z.ZodEnum<{
read: "read";
write: "write";
}>;
detail: z.ZodString;
}, z.core.$strip>>>;
fields: z.ZodDefault<z.ZodArray<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<z.ZodString>;
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
negative: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>>>;
group: z.ZodOptional<z.ZodString>;
hint: z.ZodOptional<z.ZodString>;
ai: z.ZodOptional<z.ZodString>;
ledger: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
required: z.ZodOptional<z.ZodBoolean>;
cols: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
}, z.core.$strip>>>;
blocks: z.ZodOptional<z.ZodArray<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<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
fromItem: z.ZodOptional<z.ZodObject<{
item: z.ZodString;
field: z.ZodString;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"badges">;
title: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
on: z.ZodBoolean;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"table">;
title: z.ZodOptional<z.ZodString>;
cols: z.ZodArray<z.ZodString>;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
editable: z.ZodOptional<z.ZodBoolean>;
editableCols: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
linkDonut: z.ZodOptional<z.ZodObject<{
col: z.ZodNumber;
title: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
map: z.ZodArray<z.ZodObject<{
match: z.ZodString;
label: z.ZodString;
tone: z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"bars">;
title: z.ZodOptional<z.ZodString>;
max: z.ZodOptional<z.ZodNumber>;
redline: z.ZodOptional<z.ZodNumber>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
text: z.ZodOptional<z.ZodString>;
tone: z.ZodOptional<z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"donut">;
title: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
tone: z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"mail">;
dir: z.ZodEnum<{
out: "out";
in: "in";
}>;
statusLabel: z.ZodOptional<z.ZodString>;
editable: z.ZodOptional<z.ZodBoolean>;
from: z.ZodString;
fromAddr: z.ZodOptional<z.ZodString>;
to: z.ZodString;
cc: z.ZodOptional<z.ZodString>;
subject: z.ZodString;
time: z.ZodString;
body: z.ZodString;
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
meta: z.ZodOptional<z.ZodString>;
file: z.ZodOptional<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;
html: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"excel">;
name: z.ZodString;
sheet: z.ZodString;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"word">;
name: z.ZodString;
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
t: z.ZodEnum<{
h1: "h1";
h2: "h2";
p: "p";
}>;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"ul">;
items: z.ZodArray<z.ZodString>;
}, 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<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
tag: z.ZodString;
icon: z.ZodOptional<z.ZodString>;
tone: z.ZodOptional<z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>>;
title: z.ZodString;
code: z.ZodOptional<z.ZodString>;
swap: z.ZodOptional<z.ZodObject<{
from: z.ZodString;
to: z.ZodString;
hint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
big: z.ZodString;
bigLabel: z.ZodOptional<z.ZodString>;
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
note: z.ZodOptional<z.ZodString>;
from: z.ZodOptional<z.ZodString>;
time: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"waiting">;
label: z.ZodString;
hint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"files">;
title: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
desc: z.ZodString;
file: 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;
html: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"excel">;
name: z.ZodString;
sheet: z.ZodString;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"word">;
name: z.ZodString;
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
t: z.ZodEnum<{
h1: "h1";
h2: "h2";
p: "p";
}>;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"ul">;
items: z.ZodArray<z.ZodString>;
}, 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">>>;
portChoice: z.ZodOptional<z.ZodObject<{
group: z.ZodString;
ports: z.ZodArray<z.ZodObject<{
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>>;
landing: z.ZodOptional<z.ZodObject<{
rows: z.ZodNumber;
simulated: z.ZodDefault<z.ZodNumber>;
tables: z.ZodDefault<z.ZodArray<z.ZodObject<{
label: z.ZodString;
rows: z.ZodNumber;
}, z.core.$strip>>>;
ports: z.ZodDefault<z.ZodArray<z.ZodString>>;
carried: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
routedPort: z.ZodOptional<z.ZodObject<{
group: z.ZodString;
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
because: z.ZodString;
}, z.core.$strip>>;
passLabel: z.ZodOptional<z.ZodString>;
id: z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">;
at: z.ZodISODateTime;
title: z.ZodString;
basis: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>;
stage: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StageId", "out">>;
done: z.ZodOptional<z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
result: z.ZodEnum<{
redo: "redo";
revise: "revise";
submitted: "submitted";
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type AcceptanceWorkOrder = z.infer<typeof acceptanceWorkOrderSchema>;
export declare const workOrderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
mode: z.ZodLiteral<"execution">;
preset: z.ZodOptional<z.ZodEnum<{
"landing-failure": "landing-failure";
}>>;
ask: z.ZodString;
standard: z.ZodOptional<z.ZodString>;
steps: z.ZodOptional<z.ZodArray<z.ZodString>>;
basedOn: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "DeliverableId", "out">>;
blocks: z.ZodOptional<z.ZodArray<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<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
fromItem: z.ZodOptional<z.ZodObject<{
item: z.ZodString;
field: z.ZodString;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"badges">;
title: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
on: z.ZodBoolean;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"table">;
title: z.ZodOptional<z.ZodString>;
cols: z.ZodArray<z.ZodString>;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
editable: z.ZodOptional<z.ZodBoolean>;
editableCols: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
linkDonut: z.ZodOptional<z.ZodObject<{
col: z.ZodNumber;
title: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
map: z.ZodArray<z.ZodObject<{
match: z.ZodString;
label: z.ZodString;
tone: z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"bars">;
title: z.ZodOptional<z.ZodString>;
max: z.ZodOptional<z.ZodNumber>;
redline: z.ZodOptional<z.ZodNumber>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
text: z.ZodOptional<z.ZodString>;
tone: z.ZodOptional<z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"donut">;
title: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
tone: z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"mail">;
dir: z.ZodEnum<{
out: "out";
in: "in";
}>;
statusLabel: z.ZodOptional<z.ZodString>;
editable: z.ZodOptional<z.ZodBoolean>;
from: z.ZodString;
fromAddr: z.ZodOptional<z.ZodString>;
to: z.ZodString;
cc: z.ZodOptional<z.ZodString>;
subject: z.ZodString;
time: z.ZodString;
body: z.ZodString;
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
meta: z.ZodOptional<z.ZodString>;
file: z.ZodOptional<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;
html: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"excel">;
name: z.ZodString;
sheet: z.ZodString;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"word">;
name: z.ZodString;
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
t: z.ZodEnum<{
h1: "h1";
h2: "h2";
p: "p";
}>;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"ul">;
items: z.ZodArray<z.ZodString>;
}, 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<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
tag: z.ZodString;
icon: z.ZodOptional<z.ZodString>;
tone: z.ZodOptional<z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>>;
title: z.ZodString;
code: z.ZodOptional<z.ZodString>;
swap: z.ZodOptional<z.ZodObject<{
from: z.ZodString;
to: z.ZodString;
hint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
big: z.ZodString;
bigLabel: z.ZodOptional<z.ZodString>;
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
note: z.ZodOptional<z.ZodString>;
from: z.ZodOptional<z.ZodString>;
time: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"waiting">;
label: z.ZodString;
hint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"files">;
title: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
desc: z.ZodString;
file: 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;
html: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"excel">;
name: z.ZodString;
sheet: z.ZodString;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"word">;
name: z.ZodString;
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
t: z.ZodEnum<{
h1: "h1";
h2: "h2";
p: "p";
}>;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"ul">;
items: z.ZodArray<z.ZodString>;
}, 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<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<z.ZodString>;
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
negative: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>>>;
group: z.ZodOptional<z.ZodString>;
hint: z.ZodOptional<z.ZodString>;
ai: z.ZodOptional<z.ZodString>;
ledger: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
required: z.ZodOptional<z.ZodBoolean>;
cols: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
}, z.core.$strip>>;
submitLabel: z.ZodOptional<z.ZodString>;
gate: z.ZodOptional<z.ZodObject<{
ready: z.ZodBoolean;
why: z.ZodString;
blanks: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
id: z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">;
at: z.ZodISODateTime;
title: z.ZodString;
basis: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>;
stage: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StageId", "out">>;
done: z.ZodOptional<z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
result: z.ZodEnum<{
redo: "redo";
revise: "revise";
submitted: "submitted";
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
mode: z.ZodLiteral<"acceptance">;
deliverable: z.core.$ZodBranded<z.ZodString, "DeliverableId", "out">;
criteria: z.ZodArray<z.ZodObject<{
label: z.ZodString;
level: z.ZodEnum<{
L1: "L1";
L2: "L2";
L3: "L3";
L4: "L4";
L5: "L5";
}>;
pass: z.ZodBoolean;
settled: z.ZodOptional<z.ZodBoolean>;
rationale: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
label: z.ZodString;
effect: z.ZodEnum<{
read: "read";
write: "write";
}>;
detail: z.ZodString;
}, z.core.$strip>>>;
fields: z.ZodDefault<z.ZodArray<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<z.ZodString>;
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
negative: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>>>;
group: z.ZodOptional<z.ZodString>;
hint: z.ZodOptional<z.ZodString>;
ai: z.ZodOptional<z.ZodString>;
ledger: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
required: z.ZodOptional<z.ZodBoolean>;
cols: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
}, z.core.$strip>>>;
blocks: z.ZodOptional<z.ZodArray<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<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
fromItem: z.ZodOptional<z.ZodObject<{
item: z.ZodString;
field: z.ZodString;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"badges">;
title: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
on: z.ZodBoolean;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"table">;
title: z.ZodOptional<z.ZodString>;
cols: z.ZodArray<z.ZodString>;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
editable: z.ZodOptional<z.ZodBoolean>;
editableCols: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
linkDonut: z.ZodOptional<z.ZodObject<{
col: z.ZodNumber;
title: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
map: z.ZodArray<z.ZodObject<{
match: z.ZodString;
label: z.ZodString;
tone: z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"bars">;
title: z.ZodOptional<z.ZodString>;
max: z.ZodOptional<z.ZodNumber>;
redline: z.ZodOptional<z.ZodNumber>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
text: z.ZodOptional<z.ZodString>;
tone: z.ZodOptional<z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"donut">;
title: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
value: z.ZodNumber;
tone: z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"mail">;
dir: z.ZodEnum<{
out: "out";
in: "in";
}>;
statusLabel: z.ZodOptional<z.ZodString>;
editable: z.ZodOptional<z.ZodBoolean>;
from: z.ZodString;
fromAddr: z.ZodOptional<z.ZodString>;
to: z.ZodString;
cc: z.ZodOptional<z.ZodString>;
subject: z.ZodString;
time: z.ZodString;
body: z.ZodString;
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
meta: z.ZodOptional<z.ZodString>;
file: z.ZodOptional<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;
html: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"excel">;
name: z.ZodString;
sheet: z.ZodString;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"word">;
name: z.ZodString;
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
t: z.ZodEnum<{
h1: "h1";
h2: "h2";
p: "p";
}>;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"ul">;
items: z.ZodArray<z.ZodString>;
}, 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<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
tag: z.ZodString;
icon: z.ZodOptional<z.ZodString>;
tone: z.ZodOptional<z.ZodEnum<{
ok: "ok";
warn: "warn";
danger: "danger";
brand: "brand";
muted: "muted";
}>>;
title: z.ZodString;
code: z.ZodOptional<z.ZodString>;
swap: z.ZodOptional<z.ZodObject<{
from: z.ZodString;
to: z.ZodString;
hint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
big: z.ZodString;
bigLabel: z.ZodOptional<z.ZodString>;
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
note: z.ZodOptional<z.ZodString>;
from: z.ZodOptional<z.ZodString>;
time: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"waiting">;
label: z.ZodString;
hint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"files">;
title: z.ZodOptional<z.ZodString>;
items: z.ZodArray<z.ZodObject<{
label: z.ZodString;
desc: z.ZodString;
file: 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;
html: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"excel">;
name: z.ZodString;
sheet: z.ZodString;
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"word">;
name: z.ZodString;
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
t: z.ZodEnum<{
h1: "h1";
h2: "h2";
p: "p";
}>;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
t: z.ZodLiteral<"ul">;
items: z.ZodArray<z.ZodString>;
}, 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">>>;
portChoice: z.ZodOptional<z.ZodObject<{
group: z.ZodString;
ports: z.ZodArray<z.ZodObject<{
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>>;
landing: z.ZodOptional<z.ZodObject<{
rows: z.ZodNumber;
simulated: z.ZodDefault<z.ZodNumber>;
tables: z.ZodDefault<z.ZodArray<z.ZodObject<{
label: z.ZodString;
rows: z.ZodNumber;
}, z.core.$strip>>>;
ports: z.ZodDefault<z.ZodArray<z.ZodString>>;
carried: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
routedPort: z.ZodOptional<z.ZodObject<{
group: z.ZodString;
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
because: z.ZodString;
}, z.core.$strip>>;
passLabel: z.ZodOptional<z.ZodString>;
id: z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">;
at: z.ZodISODateTime;
title: z.ZodString;
basis: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>;
stage: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StageId", "out">>;
done: z.ZodOptional<z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
result: z.ZodEnum<{
redo: "redo";
revise: "revise";
submitted: "submitted";
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, z.core.$strip>], "mode">;
export type WorkOrder = z.infer<typeof workOrderSchema>;
/** 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<typeof aiTagSchema>;
export declare const AI_TAG_LABEL: Readonly<Record<AiTag, string>>;
/** 决策卡:分支条件选择表;含自定义收尾项 */
export declare const decisionCardSchema: z.ZodObject<{
k: z.ZodLiteral<"decision">;
ask: z.ZodString;
basis: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>;
recommend: z.ZodOptional<z.ZodString>;
options: z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
detail: z.ZodOptional<z.ZodString>;
consequence: z.ZodOptional<z.ZodString>;
recommended: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>>;
allowCustom: z.ZodDefault<z.ZodBoolean>;
chosen: z.ZodOptional<z.ZodObject<{
value: z.ZodString;
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
note: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>;
export type DecisionCard = z.infer<typeof decisionCardSchema>;
/** 补全卡:就地要几个小信息;含「没法填」旁路 —— 两条路必走其一 */
export declare const elicitationCardSchema: z.ZodObject<{
k: z.ZodLiteral<"elicitation">;
ask: z.ZodString;
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
placeholder: z.ZodOptional<z.ZodString>;
value: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
done: z.ZodOptional<z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
values: z.ZodRecord<z.ZodString, z.ZodString>;
reason: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>;
export type ElicitationCard = z.infer<typeof elicitationCardSchema>;
export declare const dataEntryCardSchema: z.ZodObject<{
k: z.ZodLiteral<"entry">;
ask: z.ZodString;
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
ledger: z.ZodString;
ledgerLabel: z.ZodOptional<z.ZodString>;
key: z.ZodRecord<z.ZodString, z.ZodString>;
keyLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
value: z.ZodOptional<z.ZodString>;
required: z.ZodDefault<z.ZodBoolean>;
placeholder: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
autoNote: z.ZodOptional<z.ZodString>;
also: z.ZodOptional<z.ZodArray<z.ZodObject<{
title: z.ZodString;
ledger: z.ZodString;
ledgerLabel: z.ZodOptional<z.ZodString>;
key: z.ZodRecord<z.ZodString, z.ZodString>;
keyLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
value: z.ZodOptional<z.ZodString>;
required: z.ZodDefault<z.ZodBoolean>;
placeholder: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
autoNote: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
done: z.ZodOptional<z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
values: z.ZodRecord<z.ZodString, z.ZodString>;
}, z.core.$strip>>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>;
export type DataEntryCard = z.infer<typeof dataEntryCardSchema>;
/** 评价卡:任务评价(评分 1–5 + 改进建议) */
export declare const ratingCardSchema: z.ZodObject<{
k: z.ZodLiteral<"rating">;
ask: z.ZodString;
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
done: z.ZodOptional<z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
score: z.ZodNumber;
note: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>;
export type RatingCard = z.infer<typeof ratingCardSchema>;
export declare const chatCardSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
k: z.ZodLiteral<"decision">;
ask: z.ZodString;
basis: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>;
recommend: z.ZodOptional<z.ZodString>;
options: z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
detail: z.ZodOptional<z.ZodString>;
consequence: z.ZodOptional<z.ZodString>;
recommended: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>>;
allowCustom: z.ZodDefault<z.ZodBoolean>;
chosen: z.ZodOptional<z.ZodObject<{
value: z.ZodString;
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
note: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"entry">;
ask: z.ZodString;
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
ledger: z.ZodString;
ledgerLabel: z.ZodOptional<z.ZodString>;
key: z.ZodRecord<z.ZodString, z.ZodString>;
keyLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
value: z.ZodOptional<z.ZodString>;
required: z.ZodDefault<z.ZodBoolean>;
placeholder: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
autoNote: z.ZodOptional<z.ZodString>;
also: z.ZodOptional<z.ZodArray<z.ZodObject<{
title: z.ZodString;
ledger: z.ZodString;
ledgerLabel: z.ZodOptional<z.ZodString>;
key: z.ZodRecord<z.ZodString, z.ZodString>;
keyLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
value: z.ZodOptional<z.ZodString>;
required: z.ZodDefault<z.ZodBoolean>;
placeholder: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
autoNote: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
done: z.ZodOptional<z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
values: z.ZodRecord<z.ZodString, z.ZodString>;
}, z.core.$strip>>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"elicitation">;
ask: z.ZodString;
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
placeholder: z.ZodOptional<z.ZodString>;
value: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
done: z.ZodOptional<z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
values: z.ZodRecord<z.ZodString, z.ZodString>;
reason: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"rating">;
ask: z.ZodString;
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
done: z.ZodOptional<z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
score: z.ZodNumber;
note: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>], "k">;
export type ChatCard = z.infer<typeof chatCardSchema>;
export declare const chatMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
k: z.ZodLiteral<"ai">;
text: z.ZodString;
tag: z.ZodOptional<z.ZodEnum<{
conclusion: "conclusion";
guidance: "guidance";
criterion: "criterion";
}>>;
ref: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"human">;
text: z.ZodString;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
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;
openComms: z.ZodOptional<z.ZodBoolean>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"decision">;
ask: z.ZodString;
basis: z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>;
recommend: z.ZodOptional<z.ZodString>;
options: z.ZodArray<z.ZodObject<{
value: z.ZodString;
label: z.ZodString;
detail: z.ZodOptional<z.ZodString>;
consequence: z.ZodOptional<z.ZodString>;
recommended: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>>;
allowCustom: z.ZodDefault<z.ZodBoolean>;
chosen: z.ZodOptional<z.ZodObject<{
value: z.ZodString;
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
note: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"entry">;
ask: z.ZodString;
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
ledger: z.ZodString;
ledgerLabel: z.ZodOptional<z.ZodString>;
key: z.ZodRecord<z.ZodString, z.ZodString>;
keyLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
value: z.ZodOptional<z.ZodString>;
required: z.ZodDefault<z.ZodBoolean>;
placeholder: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
autoNote: z.ZodOptional<z.ZodString>;
also: z.ZodOptional<z.ZodArray<z.ZodObject<{
title: z.ZodString;
ledger: z.ZodString;
ledgerLabel: z.ZodOptional<z.ZodString>;
key: z.ZodRecord<z.ZodString, z.ZodString>;
keyLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
value: z.ZodOptional<z.ZodString>;
required: z.ZodDefault<z.ZodBoolean>;
placeholder: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
autoNote: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
done: z.ZodOptional<z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
values: z.ZodRecord<z.ZodString, z.ZodString>;
}, z.core.$strip>>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"elicitation">;
ask: z.ZodString;
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
placeholder: z.ZodOptional<z.ZodString>;
value: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
done: z.ZodOptional<z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
values: z.ZodRecord<z.ZodString, z.ZodString>;
reason: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"rating">;
ask: z.ZodString;
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
done: z.ZodOptional<z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
score: z.ZodNumber;
note: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>], "k">;
export type ChatMessage = z.infer<typeof chatMessageSchema>;
export declare const workOrderReplySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
mode: z.ZodLiteral<"execution">;
workOrderId: z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">;
values: z.ZodRecord<z.ZodString, z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
mode: z.ZodLiteral<"acceptance">;
workOrderId: z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">;
verdict: z.ZodUnion<readonly [z.ZodLiteral<"pass">, z.ZodEnum<{
redo: "redo";
revise: "revise";
}>]>;
values: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
comment: z.ZodOptional<z.ZodString>;
selectedPorts: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>], "mode">;
export type WorkOrderReply = z.infer<typeof workOrderReplySchema>;
export declare const chatCardReplySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
k: z.ZodLiteral<"decision">;
cardId: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
value: z.ZodString;
note: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"elicitation">;
cardId: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
values: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
reason: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"entry">;
cardId: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
values: z.ZodRecord<z.ZodString, z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"rating">;
cardId: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
score: z.ZodNumber;
note: z.ZodOptional<z.ZodString>;
}, z.core.$strip>], "k">;
export type ChatCardReply = z.infer<typeof chatCardReplySchema>;
/**
* 驳回必附意见 —— 三规矩之一的机检形态(OS 05)。
* 后端回传校验与前端提交校验共用本函数。
*/
export declare function rejectionNeedsComment(reply: WorkOrderReply): boolean;
/** 补全卡两条路必走其一:要么填值,要么给「没法填」的理由 */
export declare function elicitationReplyIsEmpty(reply: ChatCardReply): boolean;