@ouro.bot/cli 0.1.0-alpha.637 → 0.1.0-alpha.638
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 +276 -270
- package/dist/heart/core.js +21 -0
- package/package.json +1 -1
package/dist/heart/core.js
CHANGED
|
@@ -344,6 +344,22 @@ function privateReturnAckLeakError(answer, heldTokens) {
|
|
|
344
344
|
}
|
|
345
345
|
return null;
|
|
346
346
|
}
|
|
347
|
+
function claimsPrivateReturnQueued(answer) {
|
|
348
|
+
if (!answer)
|
|
349
|
+
return false;
|
|
350
|
+
const normalized = answer.toLowerCase();
|
|
351
|
+
return /\b(queued|queue|will return|return when|when .*complete|when .*completes|private pass|inner dialog completes|later)\b/.test(normalized)
|
|
352
|
+
&& /\b(private|inner|return|queued|later)\b/.test(normalized);
|
|
353
|
+
}
|
|
354
|
+
function privateReturnMissingPonderError(input) {
|
|
355
|
+
if (input.sawPonder)
|
|
356
|
+
return null;
|
|
357
|
+
if (!looksLikePrivateReturnRequest(input.latestUserRequest))
|
|
358
|
+
return null;
|
|
359
|
+
if (!claimsPrivateReturnQueued(input.answer))
|
|
360
|
+
return null;
|
|
361
|
+
return "private-return acknowledgement claimed work was queued, but no ponder packet was created this turn. Call ponder(action=create, ...) first so the return has a packet, return obligation, and inner wake; then settle with only a queued acknowledgement. If you cannot create the packet, ask a blocking clarification without saying it is queued.";
|
|
362
|
+
}
|
|
347
363
|
function activeReturnObligationId(agentName, obligationId) {
|
|
348
364
|
if (!obligationId)
|
|
349
365
|
return null;
|
|
@@ -996,6 +1012,11 @@ async function runAgent(messages, callbacks, channel, signal, options) {
|
|
|
996
1012
|
}
|
|
997
1013
|
const deliveredAnswer = answer;
|
|
998
1014
|
const retryError = privateReturnAckLeakError(deliveredAnswer, privateReturnHeldTokens)
|
|
1015
|
+
?? privateReturnMissingPonderError({
|
|
1016
|
+
latestUserRequest: latestUserMessageText(messages),
|
|
1017
|
+
answer: deliveredAnswer,
|
|
1018
|
+
sawPonder,
|
|
1019
|
+
})
|
|
999
1020
|
?? getSettleRetryError(mustResolveBeforeHandoffActive, intent, sawSteeringFollowUp, options?.delegationDecision, sawSendMessageSelf, sawPonder, sawQuerySession, options?.currentObligation ?? null, options?.activeWorkFrame?.inner?.job, sawExternalStateQuery);
|
|
1000
1021
|
const validDirectReply = mustResolveBeforeHandoffActive && intent === "direct_reply" && sawSteeringFollowUp;
|
|
1001
1022
|
const validTerminalIntent = intent === "complete" || intent === "blocked";
|