clementine-agent 1.0.61 → 1.0.62
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/assistant.js +18 -0
- package/package.json +1 -1
package/dist/agent/assistant.js
CHANGED
|
@@ -2580,6 +2580,24 @@ You have a cost budget per message — not a hard turn limit. Work until the tas
|
|
|
2580
2580
|
sdkMessagesCaptured: collectedSdkMessages.length,
|
|
2581
2581
|
toolCallsPaired: toolCallRecords.length,
|
|
2582
2582
|
resultClasses: toolCallRecords.map(r => `${r.name}:${r.resultClass}`),
|
|
2583
|
+
firstResultPreview: toolCallRecords[0]?.resultPreview?.slice(0, 300),
|
|
2584
|
+
rawFirstToolResult: (() => {
|
|
2585
|
+
// Dump the raw user-message tool_result block so we can
|
|
2586
|
+
// see is_error + content shape when the classifier picks
|
|
2587
|
+
// a result class that looks wrong (e.g. other_error when
|
|
2588
|
+
// the MCP server actually returned success).
|
|
2589
|
+
for (const msg of collectedSdkMessages) {
|
|
2590
|
+
if (msg.type !== 'user' || !msg.message?.content)
|
|
2591
|
+
continue;
|
|
2592
|
+
const blocks = Array.isArray(msg.message.content) ? msg.message.content : [];
|
|
2593
|
+
for (const b of blocks) {
|
|
2594
|
+
if (b?.type === 'tool_result') {
|
|
2595
|
+
return { is_error: b.is_error, content_shape: Array.isArray(b.content) ? 'array' : typeof b.content, content_head: JSON.stringify(b.content).slice(0, 300) };
|
|
2596
|
+
}
|
|
2597
|
+
}
|
|
2598
|
+
}
|
|
2599
|
+
return null;
|
|
2600
|
+
})(),
|
|
2583
2601
|
replyPreview: responseText.slice(0, 200).replace(/\n/g, ' '),
|
|
2584
2602
|
}, 'Contradiction validator pass');
|
|
2585
2603
|
}
|