增加口径目录页与试跑:入口表单、依赖说明和只读试跑

This commit is contained in:
ThearchyHelios
2026-11-03 19:43:39 +08:00
parent aeaca4ce69
commit 68af29a180
7 changed files with 389 additions and 4 deletions
+10 -1
View File
@@ -12,7 +12,8 @@
* 请求函数从 ./http 导入,不从 ./client 导入(client.ts 要导入这个文件,反过来就成了循环)。
*/
import type {
CertifyQueue, FreezeOut, LedgerFeedbackOut, LedgerFeedbackVerdict, LedgerIssueOut, LedgerReconcileIn, LedgerReconcileOut, RunLedger,
CaliberDescriptor, CaliberTrialOut, CertifyQueue, FreezeOut, LedgerFeedbackOut, LedgerFeedbackVerdict, LedgerIssueOut,
LedgerReconcileIn, LedgerReconcileOut, RunLedger,
} from '../typesLedger'
import { get, post, type RequestOptions } from './http'
@@ -37,4 +38,12 @@ export const caliberLedger = {
...(opts.conversation_id ? { conversation_id: opts.conversation_id } : {}),
...(opts.turn_id ? { turn_id: opts.turn_id } : {}),
}),
/** 口径目录:每份已发布口径卡的入口 Schema、依赖、能否组合/出具(不返回 SQL、参数值) */
catalog: (opts?: RequestOptions) => get<{ calibers: CaliberDescriptor[] }>('/ledger/calibers', opts),
/** 按固定版本试跑:只读探索运行,返回指标值和 run_id;不是正式出具 */
trial: (workflowId: string, version: number, nodeId: string, inputs: Record<string, unknown>) =>
post<CaliberTrialOut>(
`/ledger/calibers/${encodeURIComponent(workflowId)}/${version}/${encodeURIComponent(nodeId)}/trial`,
{ inputs },
),
}