mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-19 21:11:59 +00:00
合入 W3-b 口径账本闭环:caliber_from.nodes 改名映射;问数据的助手 use_caliber 选用已发布口径(服务端确定性内联实例化);按口径正式出具(自动只给问数据的答案)与口径对账;认证队列、固化成口径草稿、发布后补比;账本统计补上对账与认证转化;使用者的原始运行记录只给问数据的运行
This commit is contained in:
@@ -2412,7 +2412,8 @@ export function decodeRun(events: RunEvent[], final?: RunFinal, opts?: DecodeOpt
|
||||
id: `lm-${seq}`, seq, kind: 'note', status: 'done', code: 'ledger_matched',
|
||||
level: typeof counts.skipped === 'number' && counts.skipped > 0 ? 'warn' : 'info',
|
||||
title: LEDGER_TEXT.timeline(counts),
|
||||
sub: [LEDGER_TEXT.sub, retro ? LEDGER_TEXT.retro : ''].filter(Boolean).join(' · '),
|
||||
sub: [LEDGER_TEXT.sub, d.trigger === 'certified' ? LEDGER_TEXT.certified : retro ? LEDGER_TEXT.retro : '']
|
||||
.filter(Boolean).join(' · '),
|
||||
})
|
||||
break
|
||||
}
|
||||
@@ -3623,6 +3624,25 @@ export function decodeCopilot(ops: CopilotOp[], opts?: {
|
||||
.join('\n') })
|
||||
break
|
||||
}
|
||||
case 'use_caliber': {
|
||||
// 问数据的助手选用已发布口径(服务端 ledger/compose.py):取数节点和口径卡由服务端按那一版生成,不另转 add_node,
|
||||
// 这里一行说清选用了哪一版、生成了几个节点;拒收的照实写原因(原因同样交回了模型去改)
|
||||
const r = op.result && typeof op.result === 'object' ? op.result : null
|
||||
if (r?.status === 'ok') {
|
||||
nodeCount += num(r.nodes) ?? 0
|
||||
const metrics = Array.isArray(r.metrics) ? r.metrics.map((m: any) => String(m?.name ?? m?.id ?? '')).filter(Boolean) : []
|
||||
add({ id: `uc-${i}`, seq: i, kind: 'node', status: 'done', code: 'use_caliber',
|
||||
title: clip(LEDGER_TEXT.use.title(String(r.workflow_name ?? r.workflow_id ?? ''), num(r.version) ?? null,
|
||||
String(r.level_text ?? ''))),
|
||||
detail: LEDGER_TEXT.use.detail(Array.isArray(r.fetches) ? r.fetches.length : 0, String(r.card ?? r.card_id ?? ''),
|
||||
metrics.join('、')),
|
||||
...(r.card_id ? { nodeId: String(r.card_id) } : {}) })
|
||||
} else if (r?.status === 'refused') {
|
||||
add({ id: `uc-${i}`, seq: i, kind: 'note', status: 'done', level: 'warn', code: 'use_caliber_refused',
|
||||
title: LEDGER_TEXT.use.refused, detail: String(r.reason ?? '') || undefined })
|
||||
}
|
||||
break
|
||||
}
|
||||
case 'plan':
|
||||
add({ id: `cp-${i}`, seq: i, kind: 'note', status: 'done',
|
||||
title: clip(String(op.summary ?? '已完成规划'), 120) })
|
||||
|
||||
Reference in New Issue
Block a user