M6(3/n): minute 与 report —— L8 两个模块补齐
minute(纪要):工作台五要素里唯一的主动动作。 纪要本身不产生责任,唯一通往责任的路是决议经登记触发起单 —— 登记人即来源。 正文可续、决议只增;同一决议不重复起单(起单一刻已有一条带来源的流在跑)。 report(汇报):日/周/月/年对任务日志的聚合投影,零手工汇报。 未提交的草案每次取回都重算 —— 汇报是投影不是账本,提交那刻才固定为事实快照。 度量八指标落在这里(§4 注:度量是只读投影,不设独立模块): 自主率 / 纠正率 / 有效自主率 / 打扰率 / 断点率 / DMN 覆盖率 / 单位成本 / 终态分布。 口径全部挂归侧标签与事件流,零埋点;单位成本的分母只认放行通过。 周窗口以周一为首日,按 UTC 切分(单组织单时区)。 FactSource 只读 memory 与 task,一行都不另记 —— 五要素同源。 gates: tsc / eslint / depcruise(305 模块)/ api-report / 377 测试 全绿 日报已在真实系统上由 A1 任务日志聚合出来,含治理干预两行 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
@@ -2024,3 +2024,382 @@ export declare const listMessagesRoute: {
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>;
|
||||
};
|
||||
export declare const minuteResolutionSchema: z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
text: z.ZodString;
|
||||
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
||||
state: z.ZodEnum<{
|
||||
open: "open";
|
||||
registered: "registered";
|
||||
}>;
|
||||
workflowId: z.ZodOptional<z.ZodString>;
|
||||
registeredById: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
||||
registeredAt: z.ZodOptional<z.ZodString>;
|
||||
}, z.core.$strip>;
|
||||
export declare const minuteSchema: z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
title: z.ZodString;
|
||||
body: z.ZodString;
|
||||
authorId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
||||
authorName: z.ZodString;
|
||||
participants: z.ZodArray<z.ZodString>;
|
||||
occurredOn: z.ZodString;
|
||||
resolutions: z.ZodArray<z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
text: z.ZodString;
|
||||
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
||||
state: z.ZodEnum<{
|
||||
open: "open";
|
||||
registered: "registered";
|
||||
}>;
|
||||
workflowId: z.ZodOptional<z.ZodString>;
|
||||
registeredById: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
||||
registeredAt: z.ZodOptional<z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
createdAt: z.ZodString;
|
||||
updatedAt: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
export type MinuteView = z.infer<typeof minuteSchema>;
|
||||
export declare const listMinutesRoute: {
|
||||
readonly method: "GET";
|
||||
readonly path: "/api/minutes";
|
||||
readonly output: z.ZodObject<{
|
||||
minutes: z.ZodArray<z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
title: z.ZodString;
|
||||
body: z.ZodString;
|
||||
authorId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
||||
authorName: z.ZodString;
|
||||
participants: z.ZodArray<z.ZodString>;
|
||||
occurredOn: z.ZodString;
|
||||
resolutions: z.ZodArray<z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
text: z.ZodString;
|
||||
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
||||
state: z.ZodEnum<{
|
||||
open: "open";
|
||||
registered: "registered";
|
||||
}>;
|
||||
workflowId: z.ZodOptional<z.ZodString>;
|
||||
registeredById: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
||||
registeredAt: z.ZodOptional<z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
createdAt: z.ZodString;
|
||||
updatedAt: z.ZodString;
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>;
|
||||
};
|
||||
export declare const createMinuteRoute: {
|
||||
readonly method: "POST";
|
||||
readonly path: "/api/minutes";
|
||||
readonly body: z.ZodObject<{
|
||||
title: z.ZodString;
|
||||
body: z.ZodString;
|
||||
occurredOn: z.ZodString;
|
||||
participants: z.ZodDefault<z.ZodArray<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>>;
|
||||
resolutions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
||||
text: z.ZodString;
|
||||
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
||||
}, z.core.$strip>>>;
|
||||
}, z.core.$strip>;
|
||||
readonly output: z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
title: z.ZodString;
|
||||
body: z.ZodString;
|
||||
authorId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
||||
authorName: z.ZodString;
|
||||
participants: z.ZodArray<z.ZodString>;
|
||||
occurredOn: z.ZodString;
|
||||
resolutions: z.ZodArray<z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
text: z.ZodString;
|
||||
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
||||
state: z.ZodEnum<{
|
||||
open: "open";
|
||||
registered: "registered";
|
||||
}>;
|
||||
workflowId: z.ZodOptional<z.ZodString>;
|
||||
registeredById: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
||||
registeredAt: z.ZodOptional<z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
createdAt: z.ZodString;
|
||||
updatedAt: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
};
|
||||
export declare const appendResolutionRoute: {
|
||||
readonly method: "POST";
|
||||
readonly path: "/api/minutes/:minuteId/resolutions";
|
||||
readonly params: z.ZodObject<{
|
||||
minuteId: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
readonly body: z.ZodObject<{
|
||||
text: z.ZodString;
|
||||
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
||||
}, z.core.$strip>;
|
||||
readonly output: z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
title: z.ZodString;
|
||||
body: z.ZodString;
|
||||
authorId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
||||
authorName: z.ZodString;
|
||||
participants: z.ZodArray<z.ZodString>;
|
||||
occurredOn: z.ZodString;
|
||||
resolutions: z.ZodArray<z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
text: z.ZodString;
|
||||
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
||||
state: z.ZodEnum<{
|
||||
open: "open";
|
||||
registered: "registered";
|
||||
}>;
|
||||
workflowId: z.ZodOptional<z.ZodString>;
|
||||
registeredById: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
||||
registeredAt: z.ZodOptional<z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
createdAt: z.ZodString;
|
||||
updatedAt: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
};
|
||||
/** 决议 → 登记起单:登记人即来源 */
|
||||
export declare const registerResolutionRoute: {
|
||||
readonly method: "POST";
|
||||
readonly path: "/api/minutes/resolutions/:resolutionId/register";
|
||||
readonly params: z.ZodObject<{
|
||||
resolutionId: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
readonly body: z.ZodObject<{
|
||||
processPackageId: z.ZodString;
|
||||
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
||||
}, z.core.$strip>;
|
||||
readonly output: z.ZodObject<{
|
||||
workflowId: z.ZodString;
|
||||
resolutionId: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
};
|
||||
export declare const reportPeriodSchema: z.ZodEnum<{
|
||||
day: "day";
|
||||
week: "week";
|
||||
month: "month";
|
||||
year: "year";
|
||||
}>;
|
||||
export type ReportPeriodName = z.infer<typeof reportPeriodSchema>;
|
||||
export declare const REPORT_PERIOD_LABEL: Readonly<Record<ReportPeriodName, string>>;
|
||||
export declare const reportMetricsSchema: z.ZodObject<{
|
||||
autonomy: z.ZodNumber;
|
||||
correction: z.ZodNumber;
|
||||
effectiveAutonomy: z.ZodNumber;
|
||||
interruption: z.ZodNumber;
|
||||
breakpoint: z.ZodNumber;
|
||||
dmnCoverage: z.ZodNumber;
|
||||
unitCost: z.ZodObject<{
|
||||
tokens: z.ZodNumber;
|
||||
minutes: z.ZodNumber;
|
||||
humanCalls: z.ZodNumber;
|
||||
}, z.core.$strip>;
|
||||
terminalMix: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
||||
}, z.core.$strip>;
|
||||
export declare const reportSchema: z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
period: z.ZodEnum<{
|
||||
day: "day";
|
||||
week: "week";
|
||||
month: "month";
|
||||
year: "year";
|
||||
}>;
|
||||
title: z.ZodString;
|
||||
window: z.ZodObject<{
|
||||
from: z.ZodString;
|
||||
to: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
sections: z.ZodArray<z.ZodObject<{
|
||||
taskId: z.ZodString;
|
||||
title: z.ZodString;
|
||||
activityId: z.ZodString;
|
||||
terminalLabel: z.ZodOptional<z.ZodString>;
|
||||
lines: z.ZodArray<z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
metrics: z.ZodObject<{
|
||||
autonomy: z.ZodNumber;
|
||||
correction: z.ZodNumber;
|
||||
effectiveAutonomy: z.ZodNumber;
|
||||
interruption: z.ZodNumber;
|
||||
breakpoint: z.ZodNumber;
|
||||
dmnCoverage: z.ZodNumber;
|
||||
unitCost: z.ZodObject<{
|
||||
tokens: z.ZodNumber;
|
||||
minutes: z.ZodNumber;
|
||||
humanCalls: z.ZodNumber;
|
||||
}, z.core.$strip>;
|
||||
terminalMix: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
||||
}, z.core.$strip>;
|
||||
counts: z.ZodObject<{
|
||||
touched: z.ZodNumber;
|
||||
released: z.ZodNumber;
|
||||
logLines: z.ZodNumber;
|
||||
}, z.core.$strip>;
|
||||
note: z.ZodOptional<z.ZodString>;
|
||||
submittedAt: z.ZodOptional<z.ZodString>;
|
||||
generatedAt: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
export type ReportView = z.infer<typeof reportSchema>;
|
||||
/** 未提交的草案每次取回都重算 —— 汇报是投影,不是账本 */
|
||||
export declare const draftReportRoute: {
|
||||
readonly method: "GET";
|
||||
readonly path: "/api/reports/:period";
|
||||
readonly params: z.ZodObject<{
|
||||
period: z.ZodEnum<{
|
||||
day: "day";
|
||||
week: "week";
|
||||
month: "month";
|
||||
year: "year";
|
||||
}>;
|
||||
}, z.core.$strip>;
|
||||
readonly output: z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
period: z.ZodEnum<{
|
||||
day: "day";
|
||||
week: "week";
|
||||
month: "month";
|
||||
year: "year";
|
||||
}>;
|
||||
title: z.ZodString;
|
||||
window: z.ZodObject<{
|
||||
from: z.ZodString;
|
||||
to: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
sections: z.ZodArray<z.ZodObject<{
|
||||
taskId: z.ZodString;
|
||||
title: z.ZodString;
|
||||
activityId: z.ZodString;
|
||||
terminalLabel: z.ZodOptional<z.ZodString>;
|
||||
lines: z.ZodArray<z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
metrics: z.ZodObject<{
|
||||
autonomy: z.ZodNumber;
|
||||
correction: z.ZodNumber;
|
||||
effectiveAutonomy: z.ZodNumber;
|
||||
interruption: z.ZodNumber;
|
||||
breakpoint: z.ZodNumber;
|
||||
dmnCoverage: z.ZodNumber;
|
||||
unitCost: z.ZodObject<{
|
||||
tokens: z.ZodNumber;
|
||||
minutes: z.ZodNumber;
|
||||
humanCalls: z.ZodNumber;
|
||||
}, z.core.$strip>;
|
||||
terminalMix: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
||||
}, z.core.$strip>;
|
||||
counts: z.ZodObject<{
|
||||
touched: z.ZodNumber;
|
||||
released: z.ZodNumber;
|
||||
logLines: z.ZodNumber;
|
||||
}, z.core.$strip>;
|
||||
note: z.ZodOptional<z.ZodString>;
|
||||
submittedAt: z.ZodOptional<z.ZodString>;
|
||||
generatedAt: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
};
|
||||
export declare const listReportsRoute: {
|
||||
readonly method: "GET";
|
||||
readonly path: "/api/reports";
|
||||
readonly output: z.ZodObject<{
|
||||
reports: z.ZodArray<z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
period: z.ZodEnum<{
|
||||
day: "day";
|
||||
week: "week";
|
||||
month: "month";
|
||||
year: "year";
|
||||
}>;
|
||||
title: z.ZodString;
|
||||
window: z.ZodObject<{
|
||||
from: z.ZodString;
|
||||
to: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
sections: z.ZodArray<z.ZodObject<{
|
||||
taskId: z.ZodString;
|
||||
title: z.ZodString;
|
||||
activityId: z.ZodString;
|
||||
terminalLabel: z.ZodOptional<z.ZodString>;
|
||||
lines: z.ZodArray<z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
metrics: z.ZodObject<{
|
||||
autonomy: z.ZodNumber;
|
||||
correction: z.ZodNumber;
|
||||
effectiveAutonomy: z.ZodNumber;
|
||||
interruption: z.ZodNumber;
|
||||
breakpoint: z.ZodNumber;
|
||||
dmnCoverage: z.ZodNumber;
|
||||
unitCost: z.ZodObject<{
|
||||
tokens: z.ZodNumber;
|
||||
minutes: z.ZodNumber;
|
||||
humanCalls: z.ZodNumber;
|
||||
}, z.core.$strip>;
|
||||
terminalMix: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
||||
}, z.core.$strip>;
|
||||
counts: z.ZodObject<{
|
||||
touched: z.ZodNumber;
|
||||
released: z.ZodNumber;
|
||||
logLines: z.ZodNumber;
|
||||
}, z.core.$strip>;
|
||||
note: z.ZodOptional<z.ZodString>;
|
||||
submittedAt: z.ZodOptional<z.ZodString>;
|
||||
generatedAt: z.ZodString;
|
||||
}, z.core.$strip>>;
|
||||
}, z.core.$strip>;
|
||||
};
|
||||
/** 确认即提交,提交后不再改 */
|
||||
export declare const submitReportRoute: {
|
||||
readonly method: "POST";
|
||||
readonly path: "/api/reports/:reportId/submit";
|
||||
readonly params: z.ZodObject<{
|
||||
reportId: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
readonly body: z.ZodObject<{
|
||||
note: z.ZodOptional<z.ZodString>;
|
||||
}, z.core.$strip>;
|
||||
readonly output: z.ZodObject<{
|
||||
id: z.ZodString;
|
||||
period: z.ZodEnum<{
|
||||
day: "day";
|
||||
week: "week";
|
||||
month: "month";
|
||||
year: "year";
|
||||
}>;
|
||||
title: z.ZodString;
|
||||
window: z.ZodObject<{
|
||||
from: z.ZodString;
|
||||
to: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
sections: z.ZodArray<z.ZodObject<{
|
||||
taskId: z.ZodString;
|
||||
title: z.ZodString;
|
||||
activityId: z.ZodString;
|
||||
terminalLabel: z.ZodOptional<z.ZodString>;
|
||||
lines: z.ZodArray<z.ZodString>;
|
||||
}, z.core.$strip>>;
|
||||
metrics: z.ZodObject<{
|
||||
autonomy: z.ZodNumber;
|
||||
correction: z.ZodNumber;
|
||||
effectiveAutonomy: z.ZodNumber;
|
||||
interruption: z.ZodNumber;
|
||||
breakpoint: z.ZodNumber;
|
||||
dmnCoverage: z.ZodNumber;
|
||||
unitCost: z.ZodObject<{
|
||||
tokens: z.ZodNumber;
|
||||
minutes: z.ZodNumber;
|
||||
humanCalls: z.ZodNumber;
|
||||
}, z.core.$strip>;
|
||||
terminalMix: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
||||
}, z.core.$strip>;
|
||||
counts: z.ZodObject<{
|
||||
touched: z.ZodNumber;
|
||||
released: z.ZodNumber;
|
||||
logLines: z.ZodNumber;
|
||||
}, z.core.$strip>;
|
||||
note: z.ZodOptional<z.ZodString>;
|
||||
submittedAt: z.ZodOptional<z.ZodString>;
|
||||
generatedAt: z.ZodString;
|
||||
}, z.core.$strip>;
|
||||
};
|
||||
export type ListMinutesOutput = z.infer<typeof listMinutesRoute.output>;
|
||||
export type ListReportsOutput = z.infer<typeof listReportsRoute.output>;
|
||||
|
||||
Reference in New Issue
Block a user