feat: 查标第 1 步——上传投标分册 → 检查 → 逐条处理 → 复查沿用
后端 - check 模块:检查预览、发起、进度、取消、记录;六个阶段(准备投标文件、响应匹配、规则、证据校验、 状态沿用、汇总);问题列表、处理、撤销、批量处理(只限提示级)。 - 每条清单项的检查结论 check_item_result(C9,迁移 0005):「已响应」也带投标原文出处; 没有校验通过的证据不能判已响应(C3)。级别从清单项算,不让模型定;说明不写整改建议。 - 响应匹配先只有第三层:内存 BM25 检索候选句 + check.match v1 提示词,检索不到不调模型, 漏答记 missing_answer,模型临时错误只影响那一批。 - 计费:免费版不记流水;专业版 24 小时内复查免扣(记一行 0);expected_charge 不一致时拒绝不扣点; 失败、取消退回;投标文件读不出文字按输入问题失败、不扣点。 - 投标分册:类型(volume_kind)和版本;电子投标平台加密格式在上传时拦下。 - 解析流水线前几个阶段拆到 document/pipeline/normalize.py,解析和检查共用。 - ops 模块:反馈接口;致命问题确认无误的说明自动进误报反馈(U4)。 - SK1:Valkey 客户端短超时、SSE 连接池上限。SK2:CI 加 Gotenberg、直接跑 init-roles.sh。 前端 - 上传投标文件并检查页、查标页(进度、覆盖范围、按级别筛选、逐条处理和行内说明、撤销、原文抽屉、 已处理、本次已解决);项目头抽成公共组件,加「查标」标签页;工作台「下一步」覆盖查标阶段。 契约、文档:openapi.yaml 加 item-results、volume_kind、coverage 字段;data-model、api-design §10、 架构 §8 / §13(SK14)、AGENTS.md 同步。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
127
packages/api-client/src/schema.d.ts
vendored
127
packages/api-client/src/schema.d.ts
vendored
@@ -944,6 +944,30 @@ export interface paths {
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/check-runs/{run_id}/item-results": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
run_id: components["parameters"]["RunId"];
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
/**
|
||||
* 每条清单项的检查结论(C9)
|
||||
* @description 「已响应」也是 AI 结论,同样带投标侧出处、可以复核、可以反馈判断有误(红线 1、2)。
|
||||
* 问题只为没响应好的条目生成;这里列出本批次参与检查的全部清单项。
|
||||
*
|
||||
*/
|
||||
get: operations["listCheckItemResults"];
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/check-runs/{run_id}/findings/bulk-resolve": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
@@ -1539,6 +1563,8 @@ export interface components {
|
||||
label?: string;
|
||||
} | null;
|
||||
next_action: components["schemas"]["NextAction"];
|
||||
/** @description 最近一次完成的检查(「处理致命问题」直接打开它) */
|
||||
latest_check_run_id?: components["schemas"]["Id"] | null;
|
||||
updated_at: components["schemas"]["Timestamp"];
|
||||
};
|
||||
ProjectDetail: components["schemas"]["ProjectListItem"] & {
|
||||
@@ -1618,11 +1644,18 @@ export interface components {
|
||||
/** @description PDF 能直接读出;Word 要转换后才知道,这里为 null */
|
||||
page_count?: number | null;
|
||||
};
|
||||
/**
|
||||
* @description 整本 / 资格证明 / 商务 / 技术 / 报价 / 其他(C8)
|
||||
* @enum {string}
|
||||
*/
|
||||
VolumeKind: "whole" | "qualification" | "commercial" | "technical" | "price" | "other";
|
||||
DocumentCreate: {
|
||||
upload_id: components["schemas"]["Id"];
|
||||
role: components["schemas"]["DocumentRole"];
|
||||
/** @description 投标分册名:商务 / 技术 / 报价 / 资格证明 */
|
||||
/** @description 用户自填的分册名称,不填时按分册类型显示 */
|
||||
volume_name?: string;
|
||||
/** @description 投标分册类型,默认整本(C8)。只用来排序检索候选和填写「找过哪些分册」,不限制检索范围 */
|
||||
volume_kind?: components["schemas"]["VolumeKind"];
|
||||
/** @description 投标分册重新上传时填上一版的编号,生成新版本(FR-M3-01) */
|
||||
replaces_document_id?: components["schemas"]["Id"];
|
||||
};
|
||||
@@ -1633,6 +1666,7 @@ export interface components {
|
||||
label: string;
|
||||
seq_no?: number;
|
||||
volume_name?: string | null;
|
||||
volume_kind?: components["schemas"]["VolumeKind"] | null;
|
||||
lineage_id?: components["schemas"]["Id"];
|
||||
is_latest_version?: boolean;
|
||||
original_filename: string;
|
||||
@@ -1893,7 +1927,7 @@ export interface components {
|
||||
CheckPreview: {
|
||||
can_start: boolean;
|
||||
/** @description can_start 为 false 的原因 */
|
||||
blockers?: ("no_parsed_tender" | "no_bid_documents" | "job_already_running" | "quota_exhausted" | "project_read_only")[];
|
||||
blockers?: ("no_parsed_tender" | "checklist_empty" | "no_bid_documents" | "job_already_running" | "quota_exhausted" | "project_read_only")[];
|
||||
billing: components["schemas"]["BillingMode"];
|
||||
/**
|
||||
* @description 这次检查扣几次
|
||||
@@ -1937,10 +1971,45 @@ export interface components {
|
||||
rule_set_version: string;
|
||||
legal_regime?: components["schemas"]["LegalRegime"];
|
||||
documents?: components["schemas"]["Document"][];
|
||||
/** @description 查了什么、没查什么(报告首页,FR-M3-09) */
|
||||
/** @description 查了什么、没查什么(报告首页、查标页顶部,FR-M3-09、m3-plan §2.5)。认不出、查不了、没查的都写在这里,不静默跳过。
|
||||
* */
|
||||
coverage?: {
|
||||
checked?: string[];
|
||||
not_checked?: string[];
|
||||
/** @description 本次检查的投标分册;没有文字层(扫描件)的页码 */
|
||||
documents?: {
|
||||
id?: components["schemas"]["Id"];
|
||||
label?: string;
|
||||
pages?: number;
|
||||
pages_without_text?: number[];
|
||||
chars?: number;
|
||||
}[];
|
||||
/** @description 清单项条数:正式清单、本次查了的、待确认区、不在所投包、没完成判断、证据没通过校验 */
|
||||
items?: {
|
||||
formal?: number;
|
||||
checked?: number;
|
||||
pending_zone?: number;
|
||||
other_lot?: number;
|
||||
undetermined?: number;
|
||||
evidence_unverified?: number;
|
||||
};
|
||||
checklist_confirmed?: boolean;
|
||||
legal_regime?: {
|
||||
value?: components["schemas"]["LegalRegime"];
|
||||
/** @description 这套法律体系的规则是否经过样本验证(招标投标体系暂无样本) */
|
||||
rules_verified?: boolean;
|
||||
};
|
||||
rule_set_version?: string;
|
||||
prompt_versions?: Record<string, never>;
|
||||
tokens?: {
|
||||
in?: number;
|
||||
out?: number;
|
||||
};
|
||||
model_calls?: number;
|
||||
/** @description 证据没通过校验的条目数,按原因码计 */
|
||||
verify_failures?: {
|
||||
[key: string]: number;
|
||||
};
|
||||
} | null;
|
||||
counts?: {
|
||||
fatal?: number;
|
||||
@@ -1990,6 +2059,31 @@ export interface components {
|
||||
resolved_by?: components["schemas"]["UserRef"] | null;
|
||||
resolved_at?: components["schemas"]["Timestamp"] | null;
|
||||
};
|
||||
CheckItemResult: {
|
||||
checklist_item_id: components["schemas"]["Id"];
|
||||
title?: string | null;
|
||||
/**
|
||||
* @description 已响应 / 未找到 / 负偏离未说明 / 疑似不满足 / 未给出具体值 / 未判定(模型漏答或暂时不可用)/ 扫描件请人工核对。
|
||||
* 没有校验通过的投标侧证据,不会是 responded(架构 §3.6)
|
||||
*
|
||||
* @enum {string}
|
||||
*/
|
||||
verdict: "responded" | "not_found" | "negative_deviation" | "suspected_unmet" | "no_value" | "undetermined" | "scanned";
|
||||
/**
|
||||
* @description 结论来自哪一层(m3-plan §2.1)
|
||||
* @enum {string}
|
||||
*/
|
||||
layer: "deviation_table" | "rule_compare" | "model" | "retrieval";
|
||||
/** @enum {string} */
|
||||
evidence_status: "verified" | "unverified" | "none";
|
||||
/** @description 证据没通过、漏答、模型错误等的原因码 */
|
||||
reason_code?: string | null;
|
||||
bid_citations: components["schemas"]["Citation"][];
|
||||
/** @description 响应值、模型指的页码、找过哪些分册 */
|
||||
detail: Record<string, never>;
|
||||
/** @description 24 小时内复查时沿用了上一次的结论(C2) */
|
||||
reused: boolean;
|
||||
};
|
||||
ManualCheck: {
|
||||
check_key: string;
|
||||
label: string;
|
||||
@@ -3821,7 +3915,7 @@ export interface operations {
|
||||
};
|
||||
};
|
||||
/** @description `job_already_running`(附 `job_id`)、`quota_exhausted`、`billing_changed`(附最新的 `preview`)、
|
||||
* `no_parsed_tender`、`no_bid_documents`、`project_read_only`
|
||||
* `no_parsed_tender`、`checklist_empty`、`no_bid_documents`、`project_read_only`
|
||||
* */
|
||||
409: {
|
||||
headers: {
|
||||
@@ -3915,6 +4009,31 @@ export interface operations {
|
||||
};
|
||||
};
|
||||
};
|
||||
listCheckItemResults: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
run_id: components["parameters"]["RunId"];
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description OK */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": {
|
||||
items: components["schemas"]["CheckItemResult"][];
|
||||
};
|
||||
};
|
||||
};
|
||||
404: components["responses"]["NotFound"];
|
||||
};
|
||||
};
|
||||
bulkResolveFindings: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
||||
Reference in New Issue
Block a user