@ouro.bot/cli 0.1.0-alpha.605 → 0.1.0-alpha.608

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,18 @@
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.608",
6
+ "changes": [
7
+ "Carry agent context through MCP CLI commands."
8
+ ]
9
+ },
10
+ {
11
+ "version": "0.1.0-alpha.606",
12
+ "changes": [
13
+ "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."
14
+ ]
15
+ },
4
16
  {
5
17
  "version": "0.1.0-alpha.605",
6
18
  "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") {
@@ -1237,7 +1237,7 @@ function parseMcpCommand(args) {
1237
1237
  if (!sub)
1238
1238
  throw new Error(`Usage\n${usage()}`);
1239
1239
  if (sub === "list")
1240
- return { kind: "mcp.list" };
1240
+ return { kind: "mcp.list", ...(agent ? { agent } : {}) };
1241
1241
  if (sub === "call") {
1242
1242
  const server = rest[0];
1243
1243
  const tool = rest[1];
@@ -1245,7 +1245,7 @@ function parseMcpCommand(args) {
1245
1245
  throw new Error(`Usage\n${usage()}`);
1246
1246
  const argsIdx = rest.indexOf("--args");
1247
1247
  const mcpArgs = argsIdx !== -1 && rest[argsIdx + 1] ? rest[argsIdx + 1] : undefined;
1248
- return { kind: "mcp.call", server, tool, ...(mcpArgs ? { args: mcpArgs } : {}) };
1248
+ return { kind: "mcp.call", server, tool, ...(mcpArgs ? { args: mcpArgs } : {}), ...(agent ? { agent } : {}) };
1249
1249
  }
1250
1250
  if (sub === "canary") {
1251
1251
  let socketOverride;
@@ -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": {
@@ -1228,6 +1240,7 @@ class OuroDaemon {
1228
1240
  };
1229
1241
  }
1230
1242
  case "mcp.list": {
1243
+ (0, identity_1.setAgentName)(command.agent ?? "slugger");
1231
1244
  const mcpManager = await (0, mcp_manager_1.getSharedMcpManager)();
1232
1245
  if (!mcpManager) {
1233
1246
  return { ok: true, data: [], message: "no MCP servers configured" };
@@ -1235,6 +1248,7 @@ class OuroDaemon {
1235
1248
  return { ok: true, data: mcpManager.listAllTools() };
1236
1249
  }
1237
1250
  case "mcp.call": {
1251
+ (0, identity_1.setAgentName)(command.agent ?? "slugger");
1238
1252
  const mcpCallManager = await (0, mcp_manager_1.getSharedMcpManager)();
1239
1253
  if (!mcpCallManager) {
1240
1254
  return { ok: false, error: "no MCP servers configured" };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.605",
3
+ "version": "0.1.0-alpha.608",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",