mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-04 15:57:33 +01:00
feat(cso): helper replies carry remainingSeconds; producer receipts record a content-free tool timeline
This commit is contained in:
1 parent
92d11d86a3
commit
6a432f00a0
10 files changed
+70
-8
No files matched your search
@@ -686,6 +686,7 @@ export async function runProducerCell(inputPath: string, receiptPath: string, op
|
||||
durationMs: run.durationMs,
|
||||
firstUsefulResultMs: null,
|
||||
toolCalls: run.toolCalls,
|
||||
...(run.toolTimeline ? { toolTimeline: run.toolTimeline } : {}),
|
||||
output,
|
||||
outputHash: sha256(output),
|
||||
usage: {
|
||||
|
||||
@@ -130,6 +130,8 @@ export interface ProducerReceipt {
|
||||
durationMs: number;
|
||||
firstUsefulResultMs: null;
|
||||
toolCalls: number;
|
||||
/** Content-free tool timeline (name, offset, thread) for diagnosing overruns; absent when the adapter has none. */
|
||||
toolTimeline?: Array<{ atMs: number; tool: string; agent: 'main' | 'subagent' }>;
|
||||
output: string;
|
||||
outputHash: string;
|
||||
usage: {
|
||||
@@ -148,7 +150,7 @@ export interface ProducerReceipt {
|
||||
* Compact trusted index; raw output remains in the separately retained receipt.
|
||||
* Collection adds the matrix cell that the receipt's cellRef names.
|
||||
*/
|
||||
export type ProducerReceiptIndex = Omit<ProducerReceipt, 'output' | 'error'> & {
|
||||
export type ProducerReceiptIndex = Omit<ProducerReceipt, 'output' | 'error' | 'toolTimeline'> & {
|
||||
cell: ProducerCell;
|
||||
error?: { code: string };
|
||||
};
|
||||
|
||||
+1
-1
@@ -530,7 +530,7 @@ export function collectProducerReceipts(matrix: EvalMatrix, schedule: PreparedEv
|
||||
estimatedCost: { measured: costs.length, denominator: expected.length, totalUSD: costs.length ? costs.reduce((sum, value) => sum + value, 0) : null, source: 'pricing-table-estimate' },
|
||||
});
|
||||
}
|
||||
const indexes: ProducerReceiptIndex[] = bound.map(({ output: _output, error, ...receipt }) => ({ ...receipt, ...(error ? { error: { code: error.code } } : {}) }));
|
||||
const indexes: ProducerReceiptIndex[] = bound.map(({ output: _output, toolTimeline: _toolTimeline, error, ...receipt }) => ({ ...receipt, ...(error ? { error: { code: error.code } } : {}) }));
|
||||
const base = { schemaVersion: 1 as const, matrixHash: matrixHash(matrix), scheduleHash: digest(JSON.stringify(schedule)), receipts: indexes.sort((left, right) => left.cell.id.localeCompare(right.cell.id)), summary: {
|
||||
scheduled: matrix.cells.length, prepared: schedule.preparedCells, submitted: bound.length, missing: matrix.cells.length - bound.length,
|
||||
matchedPairsExpected: expectedMatchedPairs(matrix), matchedPairsSubmitted: completePairs.length, modelMismatches, groups,
|
||||
|
||||
Reference in new issue
Block a user