@ouro.bot/cli 0.1.0-alpha.605 → 0.1.0-alpha.606
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.606",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Root-cause fix for the 2026-05-11 inner-dialog wake storm that cost ~$50 in minimax inference. PR #725 removed `inner.wake` from the Claude Code post-tool-use hook with the stated intent that the notification message stay in the queue and be picked up on the agent's next natural turn — but the daemon's `message.send` HANDLER (daemon.ts case `message.send`) was unconditionally calling `processManager.sendToAgent(to, { type: \"message\" })` after queueing, which woke the inner-dialog worker on every message.send anyway. ~30 message.send/min × the 3-turn instinct-loop cap = ~90 turns/min sustained for hours. PR #725 fixed the hook side; the daemon side defeated it.\n\nFix: the `message.send` handler is now pure queue-only delivery. No `startAgent`, no `sendToAgent` — just `router.send`. Callers that want immediate processing must send `inner.wake` explicitly after `message.send`. The Claude Code hook (cli-exec.ts) was already correctly discriminating (only firing inner.wake on session-start/stop, never per-tool-use), so it works as originally intended now. The CLI `ouro msg` was updated to chain `inner.wake` after `message.send` (operator-driven delivery wants immediate response, preserving historical CLI UX). Other callers (API, programmatic) default to queue-only.\n\nTest pinned: `daemon-command-plane-branches.test.ts` now asserts `processManager.startAgent` and `processManager.sendToAgent` are NOT called from `message.send`. The regression cannot be silently reintroduced."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.605",
|
|
6
12
|
"changes": [
|
|
@@ -7538,6 +7538,14 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
|
|
|
7538
7538
|
let response;
|
|
7539
7539
|
try {
|
|
7540
7540
|
response = await deps.sendCommand(deps.socketPath, daemonCommand);
|
|
7541
|
+
// `ouro msg` is operator-driven and expects the recipient to process the
|
|
7542
|
+
// message now (vs. on next natural turn). message.send is queue-only as
|
|
7543
|
+
// of the 2026-05-11 fix; we explicitly fire inner.wake to preserve the
|
|
7544
|
+
// historical CLI UX. Background callers (hooks, API) deliberately omit
|
|
7545
|
+
// this and let the agent pick up notifications on its next turn.
|
|
7546
|
+
if (command.kind === "message.send" && command.from === "ouro-cli") {
|
|
7547
|
+
await deps.sendCommand(deps.socketPath, { kind: "inner.wake", agent: command.to }).catch(() => { });
|
|
7548
|
+
}
|
|
7541
7549
|
}
|
|
7542
7550
|
catch (error) {
|
|
7543
7551
|
if (command.kind === "message.send") {
|
|
@@ -1164,6 +1164,20 @@ class OuroDaemon {
|
|
|
1164
1164
|
return { ok: result.ok, message: result.message };
|
|
1165
1165
|
}
|
|
1166
1166
|
case "message.send": {
|
|
1167
|
+
// Pure queue-only delivery. We DO NOT wake the recipient — that was
|
|
1168
|
+
// the 2026-05-11 $50 bleed. The Claude Code post-tool-use hook
|
|
1169
|
+
// (cli-exec.ts) intentionally sends only message.send for tool-use
|
|
1170
|
+
// events to avoid waking the agent on every tool call. The hook's
|
|
1171
|
+
// intent was completely defeated by this handler calling
|
|
1172
|
+
// `sendToAgent({type: "message"})`, which woke the inner-dialog
|
|
1173
|
+
// worker on EVERY message.send anyway. ~30 message.send/min × the
|
|
1174
|
+
// 3-turn instinct-loop cap = ~90 turns/min sustained for hours.
|
|
1175
|
+
//
|
|
1176
|
+
// Callers that want immediate processing must send `inner.wake`
|
|
1177
|
+
// explicitly after message.send. The CLI `ouro msg` does so
|
|
1178
|
+
// (lifecycle-boundary delivery should wake); the hook does so
|
|
1179
|
+
// only on session-start / stop, not per tool-use; the API does
|
|
1180
|
+
// not (notifications go to the queue).
|
|
1167
1181
|
const receipt = await this.router.send({
|
|
1168
1182
|
from: command.from,
|
|
1169
1183
|
to: command.to,
|
|
@@ -1172,8 +1186,6 @@ class OuroDaemon {
|
|
|
1172
1186
|
sessionId: command.sessionId,
|
|
1173
1187
|
taskRef: command.taskRef,
|
|
1174
1188
|
});
|
|
1175
|
-
await this.processManager.startAgent(command.to);
|
|
1176
|
-
this.processManager.sendToAgent?.(command.to, { type: "message" });
|
|
1177
1189
|
return { ok: true, message: `queued message ${receipt.id}`, data: receipt };
|
|
1178
1190
|
}
|
|
1179
1191
|
case "message.poll": {
|