@blockrun/franklin 3.15.28 → 3.15.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/loop.js +17 -0
- package/package.json +1 -1
package/dist/agent/loop.js
CHANGED
|
@@ -1225,6 +1225,22 @@ export async function interactiveSession(config, getUserInput, onEvent, onAbortR
|
|
|
1225
1225
|
consecutiveTinyResponses = 0;
|
|
1226
1226
|
}
|
|
1227
1227
|
recordSessionUsage(resolvedModel, inputTokens, usage.outputTokens, costEstimate, routingTier);
|
|
1228
|
+
// Capture tool names invoked in this assistant turn. The AuditEntry
|
|
1229
|
+
// interface has had a `toolCalls?: string[]` slot since 3.15.11, but
|
|
1230
|
+
// nothing populated it — verified 2026-05-04 in a real Opus session
|
|
1231
|
+
// where 14 audit rows showed `tools=[]` despite Bash being called
|
|
1232
|
+
// every turn (the session jsonl had the tool_use blocks; the audit
|
|
1233
|
+
// just lost them). Now we pull names off responseParts so post-hoc
|
|
1234
|
+
// analytics can answer "what tools fired most often last week" from
|
|
1235
|
+
// ~/.blockrun/franklin-audit.jsonl alone.
|
|
1236
|
+
const turnToolNames = [];
|
|
1237
|
+
for (const p of responseParts) {
|
|
1238
|
+
if (p.type === 'tool_use') {
|
|
1239
|
+
const name = p.name;
|
|
1240
|
+
if (typeof name === 'string')
|
|
1241
|
+
turnToolNames.push(name);
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1228
1244
|
appendAudit({
|
|
1229
1245
|
ts: Date.now(),
|
|
1230
1246
|
sessionId,
|
|
@@ -1240,6 +1256,7 @@ export async function interactiveSession(config, getUserInput, onEvent, onAbortR
|
|
|
1240
1256
|
source: 'agent',
|
|
1241
1257
|
workDir,
|
|
1242
1258
|
prompt: extractLastUserPrompt(history),
|
|
1259
|
+
toolCalls: turnToolNames.length > 0 ? turnToolNames : undefined,
|
|
1243
1260
|
routingTier,
|
|
1244
1261
|
});
|
|
1245
1262
|
// Accumulate session-level totals for session meta
|
package/package.json
CHANGED