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 df18882322 脚本 e2e 逼出的八条:闸看错了表 · 拒回喂指针 · 零行骗过闸与哨兵 · 早收不该算撞墙
凭证到位后 `w05` 五案例连跑六轮,逼出八条**浏览器走查逮不到**的缺陷 ——
脚本每张卡都先空手交一次、每个岔路口都按序代答,人手点的时候永远不会去试
「空着交上去会怎样」。末轮:跑到的四例全部 released,三例被拒 0
(第五例停在大模型账户余额不足,不是代码问题)。

平台侧(六条):
- L 数据工单的提交闸没牙 —— 卡没绑表就回落到必交付物,而数据工单要人补的是
  `parts.*` 主数据,不在交付物名单里:闸盯着一堆无关的表、一格不缺,空手交卷一路放行。
  契约新增 `ExecutionWorkOrder.gateLedgers`(这张卡该拦哪几张表,发卡的人说了算),
  `gateAddressesOf` 变三级取一:绑的表 > 卡自报 > 交付物。
- M `finish` 撞 doneWhen 为假的拒回只谈「行与列」,而缺的是一次**工具调用**;
  现在摆出判据原文 + 那几个名字此刻的读数,`tool_*_calls` 读到 0 的单独点名(`unmetWhy`)。
- N 人点了决策卡,模型每拍再发一张,连拒五拍熔断。把「他选的是 approve」写进拒回**没用** ——
  下一拍它又从头翻一次会滚走的窗口。改结构:`answeredCardFact` 把
  「这张卡已答过 → 他选的是什么」做成每拍都在的事实行。
- O 模型传 `requirement: null`,工具 `null.trim()` 当场崩(边界上一律经 `text()` 归一)。
- P 拒回里的 `count=(没写过)` 是 S-FEEL 函数名被当成台账名 —— 假线索模型会去追。
- Q/S 零行 = 零缺,闸与哨兵一起放过空手交卷的数据工单(`emptyGate`:卡自报的表一行都没有
  = 没完成);「早收」头一次只落观察、第二次起才算被拒(与「重发已答过的卡」同一把尺)。

活动侧(1.2.7 → 1.2.9):三张执行工单各自声明 `gateLedgers`;说明书③补「发卡前骨架必须先有行」、
⑤补这张卡的前提(一颗 absent 都不剩);哨兵 `parts_profile_rows >= created` 逐颗对账;
S0_bind 写明发录入卡那一拍别抢写需求行。

e2e 脚本加 `JCAI_E2E_BEARER` 直供旁路(服务账号 client_credentials 仍是正路)。
门禁 typecheck / lint / depcruise / test(2091)全绿;api:check 的差异仍只在 org/* 与 api/*
(工作树里先前那批鉴权改动),card.d.ts 是本轮的纯新增字段。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FJcX8A6TWp4GRs41TYryEh
2026-08-27 09:31:35 +08:00

2213 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>;
gateLedgers: z.ZodOptional<z.ZodArray<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>;
gateLedgers: z.ZodOptional<z.ZodArray<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;