@ouro.bot/cli 0.1.0-alpha.90 → 0.1.0-alpha.92
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/changelog.json +14 -0
- package/dist/heart/core.js +10 -6
- package/dist/heart/daemon/daemon-cli.js +2 -1
- package/package.json +1 -1
package/changelog.json
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
|
|
3
3
|
"versions": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.1.0-alpha.92",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Final-answer truth checks now reject `intent=complete` when a must-resolve handoff still has an active live-session return obligation and no newer follow-up proves the loop resumed.",
|
|
8
|
+
"This keeps visible operator loops open until the agent actually brings back the external-state update or reports a concrete blocker instead of going dark early."
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"version": "0.1.0-alpha.91",
|
|
13
|
+
"changes": [
|
|
14
|
+
"Fixed `ouro changelog` so it reads the shipped object-shaped changelog format (`{ versions: [...] }`) instead of falling through to 'no changelog entries found' for valid runtime releases.",
|
|
15
|
+
"Added regression coverage for both populated and missing `versions` object-shaped changelog payloads so the CLI parser and coverage gate stay aligned."
|
|
16
|
+
]
|
|
17
|
+
},
|
|
4
18
|
{
|
|
5
19
|
"version": "0.1.0-alpha.90",
|
|
6
20
|
"changes": [
|
package/dist/heart/core.js
CHANGED
|
@@ -228,7 +228,7 @@ function parseFinalAnswerPayload(argumentsText) {
|
|
|
228
228
|
return {};
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
function getFinalAnswerRetryError(mustResolveBeforeHandoff, intent, sawSteeringFollowUp, delegationDecision, sawSendMessageSelf, sawGoInward, sawQuerySession, innerJob) {
|
|
231
|
+
function getFinalAnswerRetryError(mustResolveBeforeHandoff, intent, sawSteeringFollowUp, delegationDecision, sawSendMessageSelf, sawGoInward, sawQuerySession, currentObligation, innerJob) {
|
|
232
232
|
// 1. Delegation adherence: delegate-inward without evidence of inward action
|
|
233
233
|
if (delegationDecision?.target === "delegate-inward" && !sawSendMessageSelf && !sawGoInward && !sawQuerySession) {
|
|
234
234
|
(0, runtime_1.emitNervesEvent)({
|
|
@@ -254,8 +254,11 @@ function getFinalAnswerRetryError(mustResolveBeforeHandoff, intent, sawSteeringF
|
|
|
254
254
|
if (mustResolveBeforeHandoff && intent === "direct_reply" && !sawSteeringFollowUp) {
|
|
255
255
|
return "your final_answer used intent=direct_reply without a newer steering follow-up. continue the unresolved work, or call final_answer again with intent=complete or blocked when appropriate.";
|
|
256
256
|
}
|
|
257
|
-
// 5.
|
|
258
|
-
|
|
257
|
+
// 5. mustResolveBeforeHandoff + complete while a live return loop is still active
|
|
258
|
+
if (mustResolveBeforeHandoff && intent === "complete" && currentObligation && !sawSteeringFollowUp) {
|
|
259
|
+
return "you still owe the live session a visible return on this work. don't end the turn yet — continue until you've brought back the external-state update, or use intent=blocked with the concrete blocker.";
|
|
260
|
+
}
|
|
261
|
+
return null;
|
|
259
262
|
}
|
|
260
263
|
// Re-export kick utilities for backward compat
|
|
261
264
|
var kicks_1 = require("./kicks");
|
|
@@ -582,9 +585,11 @@ async function runAgent(messages, callbacks, channel, signal, options) {
|
|
|
582
585
|
// Extract answer from the tool call arguments.
|
|
583
586
|
// Supports: {"answer":"text","intent":"..."} or "text" (JSON string).
|
|
584
587
|
const { answer, intent } = parseFinalAnswerPayload(result.toolCalls[0].arguments);
|
|
588
|
+
const retryError = getFinalAnswerRetryError(mustResolveBeforeHandoffActive, intent, sawSteeringFollowUp, options?.delegationDecision, sawSendMessageSelf, sawGoInward, sawQuerySession, options?.currentObligation ?? null, options?.activeWorkFrame?.inner?.job);
|
|
585
589
|
const validDirectReply = mustResolveBeforeHandoffActive && intent === "direct_reply" && sawSteeringFollowUp;
|
|
586
590
|
const validTerminalIntent = intent === "complete" || intent === "blocked";
|
|
587
591
|
const validClosure = answer != null
|
|
592
|
+
&& !retryError
|
|
588
593
|
&& (!mustResolveBeforeHandoffActive || validDirectReply || validTerminalIntent);
|
|
589
594
|
if (validClosure) {
|
|
590
595
|
completion = {
|
|
@@ -622,10 +627,9 @@ async function runAgent(messages, callbacks, channel, signal, options) {
|
|
|
622
627
|
// malformed. Clear any partial streamed text or noise, then push the
|
|
623
628
|
// assistant msg + error tool result and let the model try again.
|
|
624
629
|
callbacks.onClearText?.();
|
|
625
|
-
const retryError = getFinalAnswerRetryError(mustResolveBeforeHandoffActive, intent, sawSteeringFollowUp, options?.delegationDecision, sawSendMessageSelf, sawGoInward);
|
|
626
630
|
messages.push(msg);
|
|
627
|
-
messages.push({ role: "tool", tool_call_id: result.toolCalls[0].id, content: retryError });
|
|
628
|
-
providerRuntime.appendToolOutput(result.toolCalls[0].id, retryError);
|
|
631
|
+
messages.push({ role: "tool", tool_call_id: result.toolCalls[0].id, content: retryError ?? "your final_answer was incomplete or malformed. call final_answer again with your complete response." });
|
|
632
|
+
providerRuntime.appendToolOutput(result.toolCalls[0].id, retryError ?? "your final_answer was incomplete or malformed. call final_answer again with your complete response.");
|
|
629
633
|
}
|
|
630
634
|
continue;
|
|
631
635
|
}
|
|
@@ -2189,7 +2189,8 @@ async function runOuroCli(args, deps = createDefaultOuroCliDeps()) {
|
|
|
2189
2189
|
? deps.getChangelogPath()
|
|
2190
2190
|
: (0, bundle_manifest_1.getChangelogPath)();
|
|
2191
2191
|
const raw = fs.readFileSync(changelogPath, "utf-8");
|
|
2192
|
-
const
|
|
2192
|
+
const parsed = JSON.parse(raw);
|
|
2193
|
+
const entries = Array.isArray(parsed) ? parsed : (parsed.versions ?? []);
|
|
2193
2194
|
let filtered = entries;
|
|
2194
2195
|
if (command.from) {
|
|
2195
2196
|
const fromVersion = command.from;
|