@ouro.bot/cli 0.1.0-alpha.1132 → 0.1.0-alpha.1133
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
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
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.1133",
|
|
6
|
+
"changes": [
|
|
7
|
+
"My errors come back to me: a rejected or unparseable settle is answered with why, and I correct course instead of the turn failing; my house notes count however I write them."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.1132",
|
|
6
12
|
"changes": [
|
|
@@ -352,6 +352,9 @@ const filedWithClaudeCode = (trace) => trace.some((entry) => entry.name === "rep
|
|
|
352
352
|
/** The path a write_file or edit_file call names, or "" when its arguments are not JSON with a string path. */
|
|
353
353
|
const filePathOf = (args) => { try { const parsed = JSON.parse(String(args ?? "")); return typeof parsed?.path === "string" ? parsed.path : "" } catch { return "" } }
|
|
354
354
|
const WROTE_TACIT = /(?:^|\/)psyche\/TACIT\.md$/
|
|
355
|
+
/** A shell command that writes TACIT.md: a redirect, tee, or sed -i onto it. How he writes it is his call; the file is checked separately. */
|
|
356
|
+
const SHELL_WROTE_TACIT = /(?:>>?|\btee\b(?:\s+-a)?)\s*["']?(?:\S*\/)?TACIT\.md\b|\bsed\s+-i\S*\s[^|;&]*TACIT\.md\b/
|
|
357
|
+
const commandOf = (args) => { try { const parsed = JSON.parse(String(args ?? "")); return typeof parsed?.command === "string" ? parsed.command : "" } catch { return "" } }
|
|
355
358
|
// Scoped to media-ask-no-hedge (REPLY_HEDGE_TERMS is pinned by the no-hedge psyche work): a refusal of the torrent, never a
|
|
356
359
|
// plain "no torrent needed", which is right for a title already in the library. Each torrent pattern stays in one sentence.
|
|
357
360
|
const TORRENT_DEFLECTIONS = [
|
|
@@ -571,13 +574,14 @@ export const CASES = [
|
|
|
571
574
|
sender: "principal",
|
|
572
575
|
delegated: false,
|
|
573
576
|
readback: ({ trace, before, after }) => {
|
|
574
|
-
const writes = trace.filter((entry) => /^(write_file|edit_file)$/.test(entry.name) && WROTE_TACIT.test(filePathOf(entry.args)))
|
|
577
|
+
const writes = trace.filter((entry) => (/^(write_file|edit_file)$/.test(entry.name) && WROTE_TACIT.test(filePathOf(entry.args)))
|
|
578
|
+
|| (entry.name === "shell" && SHELL_WROTE_TACIT.test(commandOf(entry.args))))
|
|
575
579
|
// A refused write leaves TACIT as it was, so a TACIT that already mentioned subtitles must also have changed.
|
|
576
580
|
const was = before.tacit?.text ?? null
|
|
577
581
|
const now = after.tacit?.text ?? ""
|
|
578
582
|
const learned = /subtitle/i.test(now) && (!/subtitle/i.test(was ?? "") || was !== now)
|
|
579
583
|
return [
|
|
580
|
-
check("a
|
|
584
|
+
check("a tool call wrote psyche/TACIT.md (write_file, edit_file or a shell write)", writes.length > 0, `${trace.length} tool calls`),
|
|
581
585
|
check("TACIT gained the subtitle rule during the case (it mentions subtitles now, and did not before or has new text)", learned),
|
|
582
586
|
check("the identity files (SOUL, IDENTITY, LORE, ASPIRATIONS) are unchanged", before.identitySha !== null && before.identitySha === after.identitySha),
|
|
583
587
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0"?>
|
|
2
2
|
<Container version="2">
|
|
3
3
|
<Name>ouro-butler</Name>
|
|
4
|
-
<Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.
|
|
4
|
+
<Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1133</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
package/dist/heart/core.js
CHANGED
|
@@ -1313,7 +1313,11 @@ async function runAgent(messages, callbacks, channel, signal, options) {
|
|
|
1313
1313
|
const queueRequiredCorrection = (assistant, message, limitContext) => {
|
|
1314
1314
|
if (budgetExhausted())
|
|
1315
1315
|
throw new Error(`provider iteration limit exhausted at response ${stepBudget} ${limitContext}`);
|
|
1316
|
-
|
|
1316
|
+
// A rejected tool call (settle, a terminal tool) is answered by its own tool result, so the agent reads why and corrects course.
|
|
1317
|
+
if (assistant.tool_calls?.length)
|
|
1318
|
+
rejectToolBatch(assistant, assistant.tool_calls.map(() => message));
|
|
1319
|
+
else
|
|
1320
|
+
rejectAttempt(assistant, [{ role: "user", content: message }]);
|
|
1317
1321
|
};
|
|
1318
1322
|
const toolLoopState = (0, tool_loop_1.createToolLoopState)();
|
|
1319
1323
|
const toolFrictionLedger = (0, tool_friction_1.createToolFrictionLedger)();
|
|
@@ -1501,6 +1505,9 @@ async function runAgent(messages, callbacks, channel, signal, options) {
|
|
|
1501
1505
|
messages: [...canonicalBudget.messages, ...rejectedAttempt, ...nextAttemptControls],
|
|
1502
1506
|
}).messages]
|
|
1503
1507
|
: [...canonicalBudget.messages];
|
|
1508
|
+
// Whatever path built this request, every tool call reaches the provider with a result: a gap the runtime left must
|
|
1509
|
+
// never 400 the turn and leave the agent unable to answer.
|
|
1510
|
+
repairOrphanedToolCalls(attemptMessages);
|
|
1504
1511
|
if (rejectedAttempt.length > 0 || canonicalBudget.status !== "within_budget")
|
|
1505
1512
|
providerRuntime.resetTurnState(attemptMessages);
|
|
1506
1513
|
const turnCallbackBufferRef = { current: null };
|
|
@@ -1622,15 +1629,6 @@ async function runAgent(messages, callbacks, channel, signal, options) {
|
|
|
1622
1629
|
}
|
|
1623
1630
|
const streamCallbackBuffer = turnCallbackBufferRef.current;
|
|
1624
1631
|
turnCallbackBufferRef.current = null;
|
|
1625
|
-
if (result.settleFinalization && !result.settleFinalization.ok) {
|
|
1626
|
-
// A completed settle payload is terminal provider output, not a prompt
|
|
1627
|
-
// for another model turn. Retractable callbacks have already cleared;
|
|
1628
|
-
// core-owned callback buffers must be discarded before surfacing the exact
|
|
1629
|
-
// parser failure through the ordinary terminal-error path.
|
|
1630
|
-
streamCallbackBuffer?.discard();
|
|
1631
|
-
finishTerminalProviderError(new Error(result.settleFinalization.errorCode), "unknown");
|
|
1632
|
-
continue;
|
|
1633
|
-
}
|
|
1634
1632
|
// Track usage from the latest API call
|
|
1635
1633
|
if (result.usage)
|
|
1636
1634
|
lastUsage = result.usage;
|
|
@@ -1685,6 +1683,13 @@ async function runAgent(messages, callbacks, channel, signal, options) {
|
|
|
1685
1683
|
if (thinkingItems.length > 0) {
|
|
1686
1684
|
msg._thinking_blocks = thinkingItems;
|
|
1687
1685
|
}
|
|
1686
|
+
if (result.settleFinalization && !result.settleFinalization.ok) {
|
|
1687
|
+
// An unparseable settle is the agent's own output: nothing reached anyone, so the agent reads why and settles again.
|
|
1688
|
+
// Retractable callbacks have already cleared; core-owned callback buffers are discarded with the attempt.
|
|
1689
|
+
streamCallbackBuffer?.discard();
|
|
1690
|
+
queueRequiredCorrection(msg, `settle was not delivered: its arguments did not parse (${result.settleFinalization.errorCode}). Call settle again with valid JSON arguments.`, "after an unparseable settle");
|
|
1691
|
+
continue;
|
|
1692
|
+
}
|
|
1688
1693
|
const settlingNow = result.toolCalls.length === 1 && (result.toolCalls[0].name === "settle" || result.toolCalls[0].name === "rest");
|
|
1689
1694
|
if (stepReportIteration === null && result.toolCalls.length > 0 && !settlingNow && budgetExhausted()) {
|
|
1690
1695
|
const wrapUpTool = candidateToolNames.has("settle") ? "settle" : candidateToolNames.has("rest") ? "rest" : null;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ouro.bot/cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.1133",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@ouro.bot/cli",
|
|
9
|
-
"version": "0.1.0-alpha.
|
|
9
|
+
"version": "0.1.0-alpha.1133",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
12
12
|
"@ouro.bot/friends": "0.1.0-alpha.18",
|