feat(shipping-notice): 增强发货通知候选管理功能,支持候选选择、重复检测与业务摘要修订
This commit is contained in:
1 parent
70f684b94a
commit
b595e157e9
83 files changed
+5857
-200
No files matched your search
@@ -44,9 +44,11 @@
|
||||
"domain.state_hint.batch_no",
|
||||
"domain.state_hint.current_step",
|
||||
"domain.state_hint.focus_task_no",
|
||||
"domain.state_hint.hxops_turn_id",
|
||||
"domain.state_hint.match_status",
|
||||
"domain.state_hint.pending_human_reason",
|
||||
"domain.state_hint.review_status",
|
||||
"domain.state_hint.schedule_task_id",
|
||||
"domain.state_hint.status",
|
||||
"domain.state_hint.upload_status",
|
||||
"domain.summary",
|
||||
@@ -68,7 +70,11 @@
|
||||
"reference_context.last_failed_target.reason",
|
||||
"reference_context.recent_activity_summary",
|
||||
"refs.batch_no",
|
||||
"refs.capability",
|
||||
"refs.contract_version",
|
||||
"refs.file_name",
|
||||
"refs.hxops_turn_id",
|
||||
"refs.intake_nos",
|
||||
"refs.run_purpose",
|
||||
"refs.schedule_task_id",
|
||||
"refs.task_no",
|
||||
|
||||
@@ -11,6 +11,232 @@
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/tools/get_order_extraction_context": {
|
||||
"post": {
|
||||
"operationId": "get_order_extraction_context",
|
||||
"summary": "读取点击发送后完整订单抽取所需的邮件正文与附件文本",
|
||||
"description": "仅在 refs.capability=order_extraction 分支调用。Tool 从 platform.session_id 反查当前用户,并返回 input_snapshot_hash、documents 与固定输出契约;禁止让 LLM 传 user_id。",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"agent_runtime_context": {
|
||||
"type": "string",
|
||||
"description": "HXOPS 注入的完整 agent_runtime_context JSON 字符串;必须原样透传,禁止由 LLM 构造或修改"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"agent_runtime_context"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tools/submit_order_extraction": {
|
||||
"post": {
|
||||
"operationId": "submit_order_extraction",
|
||||
"summary": "提交完整订单抽取结果,由 HXOPS 执行证据校验、订单级判重与自动建单",
|
||||
"description": "只接受 get_order_extraction_context 的同一快照。HXOPS 仅在分类、SKU/Qty 置信度及原文证据均达标,且无阻断冲突/修订决策时自动建单;Reservation ID、Hub Code、Source Type 允许缺失。",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"agent_runtime_context": {
|
||||
"type": "string",
|
||||
"description": "HXOPS 注入的完整 agent_runtime_context JSON 字符串;必须原样透传,禁止由 LLM 构造或修改"
|
||||
},
|
||||
"input_snapshot_hash": {
|
||||
"type": "string",
|
||||
"description": "get_order_extraction_context 返回的不可变输入快照 SHA-256"
|
||||
},
|
||||
"schema_version": {
|
||||
"type": "string",
|
||||
"description": "固定为 shipping-order-extraction-v1",
|
||||
"enum": [
|
||||
"shipping-order-extraction-v1"
|
||||
]
|
||||
},
|
||||
"orders": {
|
||||
"type": "array",
|
||||
"description": "LLM 从一封或多封邮件中识别出的订单数组;一个附件可产生多个订单,非发货邮件可为空数组",
|
||||
"maxItems": 50,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"source_intake_no",
|
||||
"primary_document_id",
|
||||
"classification",
|
||||
"classification_confidence",
|
||||
"field_confidence",
|
||||
"lines",
|
||||
"evidence"
|
||||
],
|
||||
"properties": {
|
||||
"source_intake_no": {
|
||||
"type": "string",
|
||||
"description": "来源 Intake 编号,必须来自上下文"
|
||||
},
|
||||
"primary_document_id": {
|
||||
"type": "integer",
|
||||
"description": "主来源 Document ID,必须来自上下文"
|
||||
},
|
||||
"candidate_key_hint": {
|
||||
"type": "string",
|
||||
"description": "可选稳定订单标识,如 PO/订单号;不得使用随机值"
|
||||
},
|
||||
"classification": {
|
||||
"type": "string",
|
||||
"description": "仅 shipping_request 可自动建单",
|
||||
"enum": [
|
||||
"shipping_request",
|
||||
"non_shipping_request",
|
||||
"uncertain"
|
||||
]
|
||||
},
|
||||
"classification_confidence": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 1
|
||||
},
|
||||
"field_confidence": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sku",
|
||||
"qty"
|
||||
],
|
||||
"properties": {
|
||||
"sku": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 1
|
||||
},
|
||||
"qty": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"po_number": {
|
||||
"type": "string",
|
||||
"description": "可为空的 PO/订单号"
|
||||
},
|
||||
"lines": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sku",
|
||||
"qty"
|
||||
],
|
||||
"properties": {
|
||||
"sku": {
|
||||
"type": "string",
|
||||
"description": "SKU/料号"
|
||||
},
|
||||
"qty": {
|
||||
"type": "number",
|
||||
"exclusiveMinimum": 0
|
||||
},
|
||||
"reservation_id": {
|
||||
"type": "string",
|
||||
"description": "可为空,缺失时 Task 停在补字段门禁"
|
||||
},
|
||||
"hub_code": {
|
||||
"type": "string",
|
||||
"description": "可为空,缺失时 Task 停在补字段门禁"
|
||||
},
|
||||
"source_type": {
|
||||
"type": "string",
|
||||
"description": "可为空,缺失时 Task 停在补字段门禁"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"description": "至少分别提供 SKU 与 Qty 原文证据,元素含 field 与非空 quote",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"field",
|
||||
"quote"
|
||||
],
|
||||
"properties": {
|
||||
"field": {
|
||||
"type": "string",
|
||||
"description": "证据字段,如 lines[0].sku 或 lines[0].qty"
|
||||
},
|
||||
"quote": {
|
||||
"type": "string",
|
||||
"description": "原文片段,禁止改写"
|
||||
},
|
||||
"document_id": {
|
||||
"type": "integer",
|
||||
"description": "证据来源 Document ID"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"conflicts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"agent_runtime_context",
|
||||
"input_snapshot_hash",
|
||||
"schema_version",
|
||||
"orders"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tools/parse_notice": {
|
||||
"post": {
|
||||
"operationId": "parse_notice",
|
||||
@@ -135,7 +361,7 @@
|
||||
},
|
||||
"patch": {
|
||||
"type": "object",
|
||||
"description": "可更新字段:sku/reservation_id/quantity/qty/required_date/uom",
|
||||
"description": "可更新字段:sku/reservation_id/quantity/qty/required_date/uom/hub_code/source_type",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"comment": {
|
||||
@@ -532,4 +758,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user