@ouro.bot/cli 0.1.0-alpha.1308 → 0.1.0-alpha.1309

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.1309",
6
+ "changes": [
7
+ "coding_spawn, coding_status, coding_tail, coding_send_input and coding_kill have Ouro AX cards; their failures end with a code (missing-argument, invalid-runner, session-not-found), and coding_status and coding_tail state a low-risk profile."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.1308",
6
12
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1308",
2
+ "runtimeVersion": "0.1.0-alpha.1309",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-09-03T00:00:00.000Z"
5
5
  }
@@ -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.1308</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1309</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -4,6 +4,7 @@ exports.codingToolDefinitions = void 0;
4
4
  exports.countFilesInSessionOutput = countFilesInSessionOutput;
5
5
  const index_1 = require("./index");
6
6
  const context_pack_1 = require("./context-pack");
7
+ const tool_error_code_1 = require("../tool-error-code");
7
8
  const identity_1 = require("../../heart/identity");
8
9
  const obligations_1 = require("../../arc/obligations");
9
10
  const evolution_1 = require("../../arc/evolution");
@@ -51,6 +52,10 @@ async function sendCodingInput(manager, sessionId, input) {
51
52
  async function killCodingSession(manager, sessionId) {
52
53
  return manager.killSession(sessionId);
53
54
  }
55
+ /** The manager's action result as JSON, with the card's code added when the session is unknown. */
56
+ function actionResultText(result) {
57
+ return JSON.stringify(!result.ok && result.message.startsWith("session not found:") ? { ...result, code: "session-not-found" } : result);
58
+ }
54
59
  /**
55
60
  * Count distinct file paths mentioned in a coding session's stdout output.
56
61
  * Looks for path-like tokens (containing / and a file extension).
@@ -259,19 +264,19 @@ exports.codingToolDefinitions = [
259
264
  emitCodingToolEvent("coding_spawn");
260
265
  const rawRunner = requireArg(args, "runner");
261
266
  if (!rawRunner)
262
- return "runner is required";
267
+ return (0, tool_error_code_1.withCode)("runner is required", "missing-argument");
263
268
  const runner = parseRunner(rawRunner);
264
269
  if (!runner)
265
- return `invalid runner: ${rawRunner}`;
270
+ return (0, tool_error_code_1.withCode)(`invalid runner: ${rawRunner}`, "invalid-runner");
266
271
  const workdir = requireArg(args, "workdir");
267
272
  if (!workdir)
268
- return "workdir is required";
273
+ return (0, tool_error_code_1.withCode)("workdir is required", "missing-argument");
269
274
  const prompt = requireArg(args, "prompt");
270
275
  if (!prompt)
271
- return "prompt is required";
276
+ return (0, tool_error_code_1.withCode)("prompt is required", "missing-argument");
272
277
  const taskRef = requireArg(args, "taskRef");
273
278
  if (!taskRef)
274
- return "taskRef is required";
279
+ return (0, tool_error_code_1.withCode)("taskRef is required", "missing-argument");
275
280
  const request = {
276
281
  runner,
277
282
  workdir,
@@ -373,6 +378,11 @@ exports.codingToolDefinitions = [
373
378
  risk: "high",
374
379
  reason: "spawns a separate coding process and may create obligations",
375
380
  },
381
+ ax: { id: "tool:coding_spawn", group: "turn-coding", when: "Pick this to hand a whole coding job to a separate claude or codex worker; for one quick command, shell is enough.", effect: "write", errors: [
382
+ { code: "missing-argument", means: "runner, workdir, prompt or taskRef is missing or blank; the message names which.", fix: "Call coding_spawn again with all four filled in, the prompt complete enough to work from alone." },
383
+ { code: "invalid-runner", means: "runner is something other than claude or codex.", fix: "Set runner to claude or codex and spawn again." },
384
+ { code: "orientation-hold", means: "This turn is on a correction hold, so new coding work waits.", fix: "Call orientation_get, settle what the person meant, then spawn if the job is still right." },
385
+ ] },
376
386
  },
377
387
  {
378
388
  tool: codingStatusTool,
@@ -385,10 +395,14 @@ exports.codingToolDefinitions = [
385
395
  }
386
396
  const session = await getCodingSession(manager, sessionId);
387
397
  if (!session)
388
- return `session not found: ${sessionId}`;
398
+ return (0, tool_error_code_1.withCode)(`session not found: ${sessionId}`, "session-not-found");
389
399
  return appendCompletionScrutiny(JSON.stringify(session), session);
390
400
  },
391
401
  summaryKeys: ["sessionId"],
402
+ riskProfile: { mutates: "none", risk: "low" },
403
+ ax: { id: "tool:coding_status", group: "turn-coding", when: "Pick this to check how coding workers are progressing, or list them all, before telling anyone their state; coding_tail shows their output.", effect: "read", idempotent: true, errors: [
404
+ { code: "session-not-found", means: "No coding session has that id.", fix: "Call coding_status with no sessionId to list the sessions and their ids." },
405
+ ] },
392
406
  },
393
407
  {
394
408
  tool: codingTailTool,
@@ -396,13 +410,18 @@ exports.codingToolDefinitions = [
396
410
  emitCodingToolEvent("coding_tail");
397
411
  const sessionId = requireArg(args, "sessionId");
398
412
  if (!sessionId)
399
- return "sessionId is required";
413
+ return (0, tool_error_code_1.withCode)("sessionId is required", "missing-argument");
400
414
  const session = await getCodingSession((0, index_1.getCodingSessionManager)(), sessionId);
401
415
  if (!session)
402
- return `session not found: ${sessionId}`;
416
+ return (0, tool_error_code_1.withCode)(`session not found: ${sessionId}`, "session-not-found");
403
417
  return appendCompletionScrutiny((0, index_1.formatCodingTail)(session), session);
404
418
  },
405
419
  summaryKeys: ["sessionId"],
420
+ riskProfile: { mutates: "none", risk: "low" },
421
+ ax: { id: "tool:coding_tail", group: "turn-coding", when: "Pick this to read what a coding worker printed lately, to see why it stalled or what it finished; coding_status gives only its state.", effect: "read", idempotent: true, errors: [
422
+ { code: "missing-argument", means: "sessionId is missing or blank.", fix: "Get the id from coding_status, then call coding_tail with it." },
423
+ { code: "session-not-found", means: "That sessionId matches no coding session.", fix: "List the sessions with coding_status and use one of their ids." },
424
+ ] },
406
425
  },
407
426
  {
408
427
  tool: codingSendInputTool,
@@ -410,14 +429,19 @@ exports.codingToolDefinitions = [
410
429
  emitCodingToolEvent("coding_send_input");
411
430
  const sessionId = requireArg(args, "sessionId");
412
431
  if (!sessionId)
413
- return "sessionId is required";
432
+ return (0, tool_error_code_1.withCode)("sessionId is required", "missing-argument");
414
433
  const input = requireArg(args, "input");
415
434
  if (!input)
416
- return "input is required";
417
- return JSON.stringify(await sendCodingInput((0, index_1.getCodingSessionManager)(), sessionId, input));
435
+ return (0, tool_error_code_1.withCode)("input is required", "missing-argument");
436
+ return actionResultText(await sendCodingInput((0, index_1.getCodingSessionManager)(), sessionId, input));
418
437
  },
419
438
  summaryKeys: ["sessionId", "input"],
420
439
  riskProfile: { mutates: "external_side_effect", risk: "high", reason: "sends input to a live coding process" },
440
+ ax: { id: "tool:coding_send_input", group: "turn-coding", when: "Pick this to answer a coding worker that is waiting on a question, or steer one mid-task; to begin new work, use coding_spawn.", effect: "write", errors: [
441
+ { code: "missing-argument", means: "sessionId or input is missing or blank; the message names which.", fix: "Call coding_send_input again with both the session's id and the text to send." },
442
+ { code: "session-not-found", means: "The JSON reply's code says no live session has that id, often because it already ended.", fix: "Check it with coding_status; if it ended, read coding_tail or spawn a new session." },
443
+ { code: "orientation-hold", means: "This turn is on a correction hold, so input to a running worker waits.", fix: "Call orientation_get, settle the correction, then send the input if it still fits." },
444
+ ] },
421
445
  },
422
446
  {
423
447
  tool: codingKillTool,
@@ -425,10 +449,15 @@ exports.codingToolDefinitions = [
425
449
  emitCodingToolEvent("coding_kill");
426
450
  const sessionId = requireArg(args, "sessionId");
427
451
  if (!sessionId)
428
- return "sessionId is required";
429
- return JSON.stringify(await killCodingSession((0, index_1.getCodingSessionManager)(), sessionId));
452
+ return (0, tool_error_code_1.withCode)("sessionId is required", "missing-argument");
453
+ return actionResultText(await killCodingSession((0, index_1.getCodingSessionManager)(), sessionId));
430
454
  },
431
455
  summaryKeys: ["sessionId"],
432
456
  riskProfile: { mutates: "external_side_effect", risk: "high", reason: "terminates a live coding process" },
457
+ ax: { id: "tool:coding_kill", group: "turn-coding", when: "Pick this to stop a coding worker that is stuck, wrong or no longer wanted; unsaved work in its process is lost.", effect: "write", destructive: true, errors: [
458
+ { code: "missing-argument", means: "sessionId is missing or blank.", fix: "Find the session's id with coding_status and call coding_kill with it." },
459
+ { code: "session-not-found", means: "The JSON reply's code says no live session has that id; it may have ended already.", fix: "Confirm with coding_status; a session that already ended needs no kill." },
460
+ { code: "orientation-hold", means: "This turn is on a correction hold, so stopping a worker waits.", fix: "Call orientation_get, settle what the person meant, then kill the session if that is still wanted." },
461
+ ] },
433
462
  },
434
463
  ];
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1308",
3
+ "version": "0.1.0-alpha.1309",
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.1308",
9
+ "version": "0.1.0-alpha.1309",
10
10
  "bundleDependencies": [
11
11
  "@ouro.bot/friends"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1308",
3
+ "version": "0.1.0-alpha.1309",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },