|
@@ -392,10 +392,14 @@ export function formatRunResult(agentName: string, run: Record<string, unknown>,
|
|
|
const artifacts = Array.isArray(run.artifacts) ? run.artifacts : []
|
|
const artifacts = Array.isArray(run.artifacts) ? run.artifacts : []
|
|
|
const metadata: Record<string, unknown> = { ...run, ...extra, status, artifacts }
|
|
const metadata: Record<string, unknown> = { ...run, ...extra, status, artifacts }
|
|
|
const science = asRecord(asRecord(run.research)?.science)
|
|
const science = asRecord(asRecord(run.research)?.science)
|
|
|
|
|
+ const operation = asRecord(science?.operation)
|
|
|
|
|
+ const resultOnly = ["review_results", "clarify"].includes(getString(operation?.operation))
|
|
|
|
|
+ const acceptance = asRecord(asRecord(science?.acceptance)?.dimensions)
|
|
|
|
|
+ const synthesis = asRecord(science?.synthesis)
|
|
|
const researchIR = asRecord(science?.research_ir)
|
|
const researchIR = asRecord(science?.research_ir)
|
|
|
const observations = asRecord(science?.observations)
|
|
const observations = asRecord(science?.observations)
|
|
|
const irLabels: Record<string, string> = {
|
|
const irLabels: Record<string, string> = {
|
|
|
- not_compiled: "尚未编译", plans_only: "仅规划", blocked: "暂不能执行", ready: "可执行",
|
|
|
|
|
|
|
+ not_executed: "本轮未执行", not_compiled: "尚未编译", plans_only: "仅规划", blocked: "暂不能执行", ready: "可执行",
|
|
|
executed: "实验子程序已执行", reused_observations: "复用观察", failed: "执行失败", cancelled: "已取消",
|
|
executed: "实验子程序已执行", reused_observations: "复用观察", failed: "执行失败", cancelled: "已取消",
|
|
|
}
|
|
}
|
|
|
const hints: Record<string, string> = {
|
|
const hints: Record<string, string> = {
|
|
@@ -424,11 +428,15 @@ export function formatRunResult(agentName: string, run: Record<string, unknown>,
|
|
|
: `AgentPaaS ${agentName}(${labels[status] ?? "状态待核查"})`,
|
|
: `AgentPaaS ${agentName}(${labels[status] ?? "状态待核查"})`,
|
|
|
output: [
|
|
output: [
|
|
|
...(science ? [`研究状态:${scientificLabel(science.status)}。执行结束不代表科学结论成立。`] : []),
|
|
...(science ? [`研究状态:${scientificLabel(science.status)}。执行结束不代表科学结论成立。`] : []),
|
|
|
|
|
+ ...(operation?.operation === "review_results" ? ["本次操作:复核已有结果;保留研究定义与实验记录,未重新规划或执行实验。"] : []),
|
|
|
|
|
+ ...(operation?.operation === "clarify" ? ["本次操作:等待说明研究意图;未启动研究或实验。"] : []),
|
|
|
|
|
+ ...(asRecord(acceptance?.plan_review)?.status === "not_reassessed" ? ["原方案:本次未重审,原有待修订项继续保留;review-parent-gate.json。"] : []),
|
|
|
|
|
+ ...(synthesis ? [`结果综合:${({ reviewed: "模型复核通过", needs_revision: "解释待修订", review_pending: "待复核", uncertain: "存在不确定项" } as Record<string, string>)[getString(synthesis.status)] || "状态待核查"};${synthesis.answered ?? "未报告"}/${synthesis.total ?? "未报告"} 项限定范围回答;不是独立科学验收。详情见 research-synthesis.json。`] : []),
|
|
|
...(getString(science?.next_step) ? [`下一步研究:${getString(science?.next_step)}`] : []),
|
|
...(getString(science?.next_step) ? [`下一步研究:${getString(science?.next_step)}`] : []),
|
|
|
...(observations ? [`观察记录:${observations.recorded ?? "未报告"} 份;已解释 ${observations.interpreted ?? "未报告"} 份;模型审阅认可 ${observations.reviewed ?? "未报告"} 份。详情见 observation-ledger.json。`] : []),
|
|
...(observations ? [`观察记录:${observations.recorded ?? "未报告"} 份;已解释 ${observations.interpreted ?? "未报告"} 份;模型审阅认可 ${observations.reviewed ?? "未报告"} 份。详情见 observation-ledger.json。`] : []),
|
|
|
...(researchIR ? [
|
|
...(researchIR ? [
|
|
|
`科研 IR:${irLabels[getString(researchIR.status)] || "状态待核查"};本轮已执行 ${researchIR.executed_kernels ?? "未报告"} 个实验子程序。`,
|
|
`科研 IR:${irLabels[getString(researchIR.status)] || "状态待核查"};本轮已执行 ${researchIR.executed_kernels ?? "未报告"} 个实验子程序。`,
|
|
|
- `高层研究计划含 ${researchIR.planned_actions ?? "未报告"} 项行动,不代表全部已执行;详情见 execution-ir.json。`,
|
|
|
|
|
|
|
+ ...(!resultOnly ? [`高层研究计划含 ${researchIR.planned_actions ?? "未报告"} 项行动,不代表全部已执行;详情见 execution-ir.json。`] : []),
|
|
|
...(researchIR.engine === "lambda_cek" ? ["执行引擎:Lambda / CEK;程序凭据不代表科学结论成立。"] : []),
|
|
...(researchIR.engine === "lambda_cek" ? ["执行引擎:Lambda / CEK;程序凭据不代表科学结论成立。"] : []),
|
|
|
] : []),
|
|
] : []),
|
|
|
...(science?.execution_status === "conditional_diagnostic_completed"
|
|
...(science?.execution_status === "conditional_diagnostic_completed"
|