harness 与工作台同日修:数据工单确认即入库 · 叫了人不再自动推进(两道结构闸)· 审核卡 = 终局验收卡结构 · 验收清单人点达标 · 迟到守卫不丢放行裁决 · 画面跟着这一拍发出去的卡走 · 成果详情只翻页 · 占位居中 · 进度条

human-tool / ledger / loop-engine / release / task / interaction 六模块与 app 层(desk 路由、engines、consumers、
data-order-landing、case-stamp、reset-runs、seed-activities、容器与 server 装配),web 的 desk-task
(ViewRegion / chat-bubbles / review-face)与 app.css、ui-kit 图标;契约 card / manifest;
迁移 0034_task_seq 与迁移日志;api-report 快照;CLAUDE.md 快照、debt、活动开发规范、HTML 报告规范同步。
逐条口径见 CLAUDE.md 快照(2026-08-27 下午至晚)。另一会话做的,一直留在工作树没入库;与同批另两条提交互相依赖。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0167qWjeyBwvfdGovd7FWbCu
This commit is contained in:
xcs
2026-08-27 23:20:16 +08:00
co-authored by Claude Fable 5
parent 909b1fe4b7
commit 7b85a79323
79 changed files with 3903 additions and 1297 deletions
@@ -0,0 +1 @@
export {};
+37 -2
View File
@@ -1993,10 +1993,12 @@ export declare const saveWorkGroupRoute: {
* 安装两审在服务端跑:静态审读清单(工具契约在否、模型名绑没绑、模版有没有脚本、
* 声明与已物化的台账冲不冲),回放审重演历史(首装无历史即免,以样例集替代)。
* **恒为新增、版本并存**:装入不覆盖旧版本,在途任务按其启动时版本跑完。
* **路径(2026-08-27)**:`/api/gov/activity-packages` —— 从前叫 `/api/gov/activities`;那个前缀整个让给了运营端
* 活动模块(L1/L2/L3,`api/activity-ops.ts`),这里管的是**包**(版本 / 资产 / 装入),名副其实。
*/
export declare const installActivityRoute: {
readonly method: "POST";
readonly path: "/api/gov/activities";
readonly path: "/api/gov/activity-packages";
readonly access: "design";
readonly body: z.ZodObject<{
manifest: z.ZodObject<{
@@ -2115,6 +2117,7 @@ export declare const installActivityRoute: {
derived: "derived";
}>>;
caseKey: z.ZodOptional<z.ZodString>;
createOnly: z.ZodOptional<z.ZodBoolean>;
file: z.ZodOptional<z.ZodObject<{
titleColumn: z.ZodString;
bodyColumn: z.ZodString;
@@ -2229,6 +2232,11 @@ export declare const installActivityRoute: {
view: z.ZodOptional<z.ZodString>;
tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
doneWhen: z.ZodOptional<z.ZodString>;
cardVariant: z.ZodOptional<z.ZodEnum<{
data: "data";
review: "review";
}>>;
acceptanceChecklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>>;
phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
@@ -2250,6 +2258,32 @@ export declare const installActivityRoute: {
viewTemplates: z.ZodDefault<z.ZodArray<z.ZodObject<{
name: z.ZodString;
html: z.ZodString;
data: z.ZodOptional<z.ZodObject<{
case: z.ZodObject<{
ledger: z.ZodString;
key: z.ZodString;
prefix: z.ZodString;
}, z.core.$strip>;
rows: z.ZodArray<z.ZodObject<{
as: z.ZodString;
ledger: z.ZodString;
by: z.ZodObject<{
column: z.ZodString;
from: z.ZodString;
}, z.core.$strip>;
not: z.ZodOptional<z.ZodObject<{
column: z.ZodString;
from: z.ZodString;
}, z.core.$strip>>;
orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
field: z.ZodString;
dir: z.ZodEnum<{
desc: "desc";
asc: "asc";
}>;
}, z.core.$strip>>>;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>>>;
cardSchemas: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
distillHooks: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -2348,9 +2382,10 @@ export declare const registerToolRoute: {
}, z.core.$strip>;
}, z.core.$strip>;
};
/** 路径同 `installActivityRoute` 的说明:`/api/gov/activity-packages`(2026-08-27 让位给运营端活动模块) */
export declare const listActivitiesRoute: {
readonly method: "GET";
readonly path: "/api/gov/activities";
readonly path: "/api/gov/activity-packages";
readonly access: "design";
readonly output: z.ZodObject<{
activities: z.ZodArray<z.ZodObject<{
+1
View File
@@ -4,3 +4,4 @@ export * from './governance.ts';
export * from './org-directory.ts';
export * from './ingest.ts';
export * from './mail.ts';
export * from './activity-ops.ts';
File diff suppressed because it is too large Load Diff
+15
View File
@@ -604,6 +604,7 @@ export declare const workDoneSchema: z.ZodObject<{
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
checked: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
export type WorkDone = z.infer<typeof workDoneSchema>;
/** 执行工单:作业指导书 + 空表单(补全并入此类);落地失败卡是它的系统预置形态 */
@@ -884,6 +885,7 @@ export declare const executionWorkOrderSchema: z.ZodObject<{
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
checked: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
@@ -930,6 +932,7 @@ export declare const acceptanceWorkOrderSchema: z.ZodObject<{
settled: z.ZodOptional<z.ZodBoolean>;
rationale: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
checklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
label: z.ZodString;
effect: z.ZodEnum<{
@@ -1220,6 +1223,7 @@ export declare const acceptanceWorkOrderSchema: z.ZodObject<{
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
checked: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
@@ -1501,6 +1505,7 @@ export declare const workOrderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
checked: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
@@ -1519,6 +1524,7 @@ export declare const workOrderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
settled: z.ZodOptional<z.ZodBoolean>;
rationale: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
checklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
label: z.ZodString;
effect: z.ZodEnum<{
@@ -1809,6 +1815,7 @@ export declare const workOrderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
checked: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, z.core.$strip>], "mode">;
@@ -1828,6 +1835,7 @@ export declare const decisionCardSchema: z.ZodObject<{
variant: z.ZodOptional<z.ZodEnum<{
review: "review";
}>>;
checklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
ask: z.ZodString;
basis: z.ZodArray<z.ZodObject<{
k: z.ZodString;
@@ -1847,6 +1855,7 @@ export declare const decisionCardSchema: z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
note: z.ZodOptional<z.ZodString>;
checked: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
@@ -1943,6 +1952,7 @@ export declare const chatCardSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
variant: z.ZodOptional<z.ZodEnum<{
review: "review";
}>>;
checklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
ask: z.ZodString;
basis: z.ZodArray<z.ZodObject<{
k: z.ZodString;
@@ -1962,6 +1972,7 @@ export declare const chatCardSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
note: z.ZodOptional<z.ZodString>;
checked: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
@@ -2079,6 +2090,7 @@ export declare const chatMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
variant: z.ZodOptional<z.ZodEnum<{
review: "review";
}>>;
checklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
ask: z.ZodString;
basis: z.ZodArray<z.ZodObject<{
k: z.ZodString;
@@ -2098,6 +2110,7 @@ export declare const chatMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
at: z.ZodISODateTime;
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
note: z.ZodOptional<z.ZodString>;
checked: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
@@ -2195,6 +2208,7 @@ export declare const workOrderReplySchema: z.ZodDiscriminatedUnion<[z.ZodObject<
values: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
comment: z.ZodOptional<z.ZodString>;
selectedPorts: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
checked: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>], "mode">;
export type WorkOrderReply = z.infer<typeof workOrderReplySchema>;
export declare const chatCardReplySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -2202,6 +2216,7 @@ export declare const chatCardReplySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
cardId: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
value: z.ZodString;
note: z.ZodOptional<z.ZodString>;
checked: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"elicitation">;
cardId: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
+1
View File
@@ -14,4 +14,5 @@ export * from './process-package.ts';
export * from './manifest.ts';
export * from './org.ts';
export * from './mail.ts';
export * from './activity-ops.ts';
export * from './api/index.ts';
+147
View File
@@ -206,6 +206,7 @@ export declare const planStepSchema: z.ZodObject<{
data: "data";
review: "review";
}>>;
acceptanceChecklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
export type PlanStep = z.infer<typeof planStepSchema>;
/**
@@ -270,6 +271,7 @@ export declare const loopModelSchema: z.ZodObject<{
data: "data";
review: "review";
}>>;
acceptanceChecklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>>;
phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
@@ -328,6 +330,7 @@ export declare const businessModelSchema: z.ZodObject<{
data: "data";
review: "review";
}>>;
acceptanceChecklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>>;
phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
@@ -348,6 +351,95 @@ export declare const skillSchema: z.ZodObject<{
version: z.ZodString;
}, z.core.$strip>;
export type Skill = z.infer<typeof skillSchema>;
/**
* 运营中心沙箱看板的**取数声明**(2026-08-27):模版归活动,「哪几行是这一单的」也归活动 —— 案号前缀、
* 哪张表按哪一列圈,平台不该写死;基座只照声明逐表查**正式表**、把行集摊成扁平作用域交渲染器。
*
* 求值:先定案号 `case.prefix + 实例开案时刻 YYYYMMDDHHmmss`(与引擎注给模型铸主键的 `case:openedAt` 同一串);
* `rows` 按序求值,每条 = `ledger` 里 `by.column ∈ values(by.from)` 的行(`from` 只能引用 `case` 或前面已求出的
* 集合),可再用 `not` 排除一批、`orderBy` 排序。作用域里 `<as>` = 行数组、`<as>.<列>` = 首行标量、
* `<as 去符号>_rows` = 行数、`<as 去符号>_<列>_<值>` = tally 计数。案号那一行查无 → 这一单没落账,看板如实说。
*/
export declare const viewDataRowsSchema: z.ZodObject<{
as: z.ZodString;
ledger: z.ZodString;
by: z.ZodObject<{
column: z.ZodString;
from: z.ZodString;
}, z.core.$strip>;
not: z.ZodOptional<z.ZodObject<{
column: z.ZodString;
from: z.ZodString;
}, z.core.$strip>>;
orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
field: z.ZodString;
dir: z.ZodEnum<{
desc: "desc";
asc: "asc";
}>;
}, z.core.$strip>>>;
}, z.core.$strip>;
export type ViewDataRows = z.infer<typeof viewDataRowsSchema>;
export declare const viewDataSchema: z.ZodObject<{
case: z.ZodObject<{
ledger: z.ZodString;
key: z.ZodString;
prefix: z.ZodString;
}, z.core.$strip>;
rows: z.ZodArray<z.ZodObject<{
as: z.ZodString;
ledger: z.ZodString;
by: z.ZodObject<{
column: z.ZodString;
from: z.ZodString;
}, z.core.$strip>;
not: z.ZodOptional<z.ZodObject<{
column: z.ZodString;
from: z.ZodString;
}, z.core.$strip>>;
orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
field: z.ZodString;
dir: z.ZodEnum<{
desc: "desc";
asc: "asc";
}>;
}, z.core.$strip>>>;
}, z.core.$strip>>;
}, z.core.$strip>;
export type ViewData = z.infer<typeof viewDataSchema>;
/** `by.from` / `not.from` 里指案号本身的那个字 */
export declare const VIEW_DATA_CASE_REF = "case";
export declare const viewTemplateSchema: z.ZodObject<{
name: z.ZodString;
html: z.ZodString;
data: z.ZodOptional<z.ZodObject<{
case: z.ZodObject<{
ledger: z.ZodString;
key: z.ZodString;
prefix: z.ZodString;
}, z.core.$strip>;
rows: z.ZodArray<z.ZodObject<{
as: z.ZodString;
ledger: z.ZodString;
by: z.ZodObject<{
column: z.ZodString;
from: z.ZodString;
}, z.core.$strip>;
not: z.ZodOptional<z.ZodObject<{
column: z.ZodString;
from: z.ZodString;
}, z.core.$strip>>;
orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
field: z.ZodString;
dir: z.ZodEnum<{
desc: "desc";
asc: "asc";
}>;
}, z.core.$strip>>>;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>;
export type ViewTemplate = z.infer<typeof viewTemplateSchema>;
export declare const manifestAssetsSchema: z.ZodObject<{
businessModel: z.ZodObject<{
cmmnXml: z.ZodString;
@@ -395,6 +487,7 @@ export declare const manifestAssetsSchema: z.ZodObject<{
data: "data";
review: "review";
}>>;
acceptanceChecklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>>;
phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
@@ -416,6 +509,32 @@ export declare const manifestAssetsSchema: z.ZodObject<{
viewTemplates: z.ZodDefault<z.ZodArray<z.ZodObject<{
name: z.ZodString;
html: z.ZodString;
data: z.ZodOptional<z.ZodObject<{
case: z.ZodObject<{
ledger: z.ZodString;
key: z.ZodString;
prefix: z.ZodString;
}, z.core.$strip>;
rows: z.ZodArray<z.ZodObject<{
as: z.ZodString;
ledger: z.ZodString;
by: z.ZodObject<{
column: z.ZodString;
from: z.ZodString;
}, z.core.$strip>;
not: z.ZodOptional<z.ZodObject<{
column: z.ZodString;
from: z.ZodString;
}, z.core.$strip>>;
orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
field: z.ZodString;
dir: z.ZodEnum<{
desc: "desc";
asc: "asc";
}>;
}, z.core.$strip>>>;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>>>;
cardSchemas: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
distillHooks: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -673,6 +792,7 @@ export declare const activityManifestSchema: z.ZodObject<{
data: "data";
review: "review";
}>>;
acceptanceChecklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>>;
phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
name: z.ZodString;
@@ -694,6 +814,32 @@ export declare const activityManifestSchema: z.ZodObject<{
viewTemplates: z.ZodDefault<z.ZodArray<z.ZodObject<{
name: z.ZodString;
html: z.ZodString;
data: z.ZodOptional<z.ZodObject<{
case: z.ZodObject<{
ledger: z.ZodString;
key: z.ZodString;
prefix: z.ZodString;
}, z.core.$strip>;
rows: z.ZodArray<z.ZodObject<{
as: z.ZodString;
ledger: z.ZodString;
by: z.ZodObject<{
column: z.ZodString;
from: z.ZodString;
}, z.core.$strip>;
not: z.ZodOptional<z.ZodObject<{
column: z.ZodString;
from: z.ZodString;
}, z.core.$strip>>;
orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
field: z.ZodString;
dir: z.ZodEnum<{
desc: "desc";
asc: "asc";
}>;
}, z.core.$strip>>>;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>>>;
cardSchemas: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
distillHooks: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -800,5 +946,6 @@ export declare const installVerdictSchema: z.ZodObject<{
}, z.core.$strip>>>;
skippedNoHistory: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
stored: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
export type InstallVerdict = z.infer<typeof installVerdictSchema>;