@ouro.bot/cli 0.1.0-alpha.1319 → 0.1.0-alpha.1320

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.1320",
6
+ "changes": [
7
+ "The await and attachment tools now carry Ouro AX cards, and their refusals carry a code the card names."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.1319",
6
12
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1319",
2
+ "runtimeVersion": "0.1.0-alpha.1320",
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.1319</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1320</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -31,6 +31,9 @@ function parseLimit(raw) {
31
31
  return undefined;
32
32
  return parsed;
33
33
  }
34
+ function frictionSignature(tool, code) {
35
+ return `${tool}:${code}`;
36
+ }
34
37
  function normalizeThrownReason(error) {
35
38
  const rendered = String(error);
36
39
  return rendered.startsWith("Error: ") ? rendered.slice(7) : rendered;
@@ -40,7 +43,7 @@ function attachmentNotFound(tool, attachmentId) {
40
43
  kind: "local_repair",
41
44
  recoverability: "transformable",
42
45
  summary: `Attachment ${attachmentId} is not in the recent attachment store anymore.`,
43
- signature: `${tool}:attachment-not-found`,
46
+ signature: frictionSignature(tool, "attachment-not-found"),
44
47
  suggested_next_actions: [
45
48
  {
46
49
  kind: "tool",
@@ -56,7 +59,7 @@ function missingAttachmentId(tool) {
56
59
  kind: "input_error",
57
60
  recoverability: "transformable",
58
61
  summary: "An attachment id is required for this tool call.",
59
- signature: `${tool}:missing-attachment-id`,
62
+ signature: frictionSignature(tool, "missing-attachment-id"),
60
63
  suggested_next_actions: [
61
64
  {
62
65
  kind: "tool",
@@ -71,7 +74,7 @@ function missingPrompt() {
71
74
  kind: "input_error",
72
75
  recoverability: "transformable",
73
76
  summary: "describe_image needs a targeted prompt before retrying.",
74
- signature: "describe_image:missing-prompt",
77
+ signature: frictionSignature("describe_image", "missing-prompt"),
75
78
  suggested_next_actions: [
76
79
  {
77
80
  kind: "message",
@@ -89,7 +92,7 @@ function normalizeMaterializeError(tool, attachmentId, reason) {
89
92
  kind: "input_error",
90
93
  recoverability: "transformable",
91
94
  summary: `Attachment ${attachmentId} is not an image, so it cannot produce a vision_safe variant.`,
92
- signature: `${tool}:not-image`,
95
+ signature: frictionSignature(tool, "not-image"),
93
96
  suggested_next_actions: [
94
97
  {
95
98
  kind: "tool",
@@ -104,7 +107,7 @@ function normalizeMaterializeError(tool, attachmentId, reason) {
104
107
  kind: "local_repair",
105
108
  recoverability: "retryable",
106
109
  summary: reason,
107
- signature: `${tool}:materialize-failed`,
110
+ signature: frictionSignature(tool, "materialize-failed"),
108
111
  suggested_next_actions: [
109
112
  {
110
113
  kind: "tool",
@@ -149,6 +152,10 @@ exports.attachmentToolDefinitions = [
149
152
  return (0, tool_results_1.okToolResult)("list_recent_attachments", attachments);
150
153
  },
151
154
  summaryKeys: ["kind", "limit"],
155
+ ax: { id: "tool:list_recent_attachments", group: "turn-attachments", when: "Pick this to find the id of a photo, voice note or document someone sent earlier, before opening it or asking them to resend.", effect: "read", idempotent: true, errors: [
156
+ { code: "invalid-arguments", means: "kind wasn't one of image, audio, document, binary or unknown.", fix: "Leave kind out, or pass one of those five." },
157
+ ] },
158
+ riskProfile: { mutates: "none", risk: "low" },
152
159
  },
153
160
  {
154
161
  tool: {
@@ -196,6 +203,12 @@ exports.attachmentToolDefinitions = [
196
203
  }
197
204
  },
198
205
  summaryKeys: ["attachment_id", "attachment_guid", "variant"],
206
+ ax: { id: "tool:materialize_attachment", group: "turn-attachments", when: "Pick this to get a real file path on disk for something someone sent, so another tool can open or forward it; to ask about a picture, use describe_image.", effect: "write", idempotent: true, errors: [
207
+ { code: "attachment-not-found", means: "That attachment isn't in the recent store any more, or this conversation can't see it.", fix: "Call list_recent_attachments for the current attachment_id, then retry." },
208
+ { code: "missing-attachment-id", means: "attachment_id was empty.", fix: "Call list_recent_attachments and retry with one of its ids." },
209
+ { code: "not-image", means: "variant vision_safe was asked for, but the attachment isn't an image.", fix: "Retry with variant original to get the file as it was sent." },
210
+ { code: "materialize-failed", means: "The file couldn't be written out or converted; the summary gives the reason.", fix: "Retry once; if it fails again, ask the person to send the file again." },
211
+ ] },
199
212
  },
200
213
  {
201
214
  tool: {
@@ -249,7 +262,7 @@ exports.attachmentToolDefinitions = [
249
262
  kind: "external_blocker",
250
263
  recoverability: missingMinimaxKey || error instanceof understand_1.UnsupportedImageModelError ? "blocked" : "retryable",
251
264
  summary: reason,
252
- signature: missingMinimaxKey ? "describe_image:minimax-missing-key" : "describe_image:provider-unavailable",
265
+ signature: frictionSignature("describe_image", missingMinimaxKey ? "minimax-missing-key" : "provider-unavailable"),
253
266
  suggested_next_actions: [
254
267
  {
255
268
  kind: "message",
@@ -274,5 +287,14 @@ exports.attachmentToolDefinitions = [
274
287
  }
275
288
  },
276
289
  summaryKeys: ["attachment_id", "attachment_guid", "prompt"],
290
+ ax: { id: "tool:describe_image", group: "turn-attachments", when: "Pick this to ask a pointed question about a photo or screenshot, like a date or total on it, or to double-check a reading you got wrong.", effect: "write", errors: [
291
+ { code: "attachment-not-found", means: "That attachment isn't in the recent store any more, or this conversation can't see it.", fix: "Call list_recent_attachments for the current attachment_id, then retry." },
292
+ { code: "missing-attachment-id", means: "attachment_id was empty.", fix: "Call list_recent_attachments and retry with one of its ids." },
293
+ { code: "missing-prompt", means: "prompt was empty.", fix: "Retry with a pointed question, like what is the confirmation number." },
294
+ { code: "not-image", means: "That attachment isn't an image, so there is nothing to look at.", fix: "Use materialize_attachment with variant original to get the file itself." },
295
+ { code: "minimax-missing-key", means: "The image model needs a MiniMax API key this agent doesn't have.", fix: "Tell your owner to run ouro auth with provider minimax for this agent; it needs them." },
296
+ { code: "provider-unavailable", means: "The image model couldn't answer; the summary gives the reason.", fix: "Retry once later; if it still fails, tell the person you can't read the image now." },
297
+ { code: "materialize-failed", means: "The file couldn't be written out or converted; the summary gives the reason.", fix: "Retry once; if it fails again, ask the person to send the file again." },
298
+ ] },
277
299
  },
278
300
  ];
@@ -196,7 +196,7 @@ function formatOwnerQuestion(question, choices) {
196
196
  function failedAskOwner(agentName, name, error) {
197
197
  const detail = error instanceof Error ? error.message : String(error);
198
198
  (0, runtime_1.emitNervesEvent)({ level: "error", component: "repertoire", event: "repertoire.await_ask_owner_error", message: "ask_owner could not reach the owner", meta: { agent: agentName, name, error: detail } });
199
- return JSON.stringify({ error: `the owner message could not be sent (${detail}); the await is still pending, so ask_owner can be retried` });
199
+ return JSON.stringify({ error: `the owner message could not be sent (${detail}); the await is still pending, so ask_owner can be retried`, code: "owner-unreachable" });
200
200
  }
201
201
  /** At most this many ask_owner closures per requester in a rolling day, so one requester cannot make the Butler pester the owner. */
202
202
  const ASK_OWNER_DAILY_LIMIT = 3;
@@ -287,19 +287,19 @@ function delivered(alert) {
287
287
  async function askOwnerTool(name, observation, question, choices, existing, agentRoot, agentName) {
288
288
  const parsed = parseAskOwner(question, choices);
289
289
  if (!parsed.ok)
290
- return JSON.stringify({ error: parsed.error });
290
+ return JSON.stringify({ error: parsed.error, code: "invalid-ask-owner" });
291
291
  const inFlightKey = `${agentRoot}\0${name}`;
292
292
  if (askOwnerInFlight.has(inFlightKey))
293
- return JSON.stringify({ error: `await "${name}" is already being asked; wait for the owner's reply instead of asking again` });
293
+ return JSON.stringify({ error: `await "${name}" is already being asked; wait for the owner's reply instead of asking again`, code: "ask-in-flight" });
294
294
  askOwnerInFlight.add(inFlightKey);
295
295
  try {
296
296
  const filerId = existing.filed_for_friend_id ?? null;
297
297
  const filer = await lookupFiler(agentRoot, filerId);
298
298
  if (!filer.isOwner && recentAskCount(agentRoot, filerId, Date.now()) >= ASK_OWNER_DAILY_LIMIT) {
299
- return JSON.stringify({ error: `ask_owner limit reached: this requester has already had my owner asked ${ASK_OWNER_DAILY_LIMIT} times in the last day; do not retry ask_owner, resolve with verdict 'no' with an observation and keep polling` });
299
+ return JSON.stringify({ error: `ask_owner limit reached: this requester has already had my owner asked ${ASK_OWNER_DAILY_LIMIT} times in the last day; do not retry ask_owner, resolve with verdict 'no' with an observation and keep polling`, code: "ask-limit-reached" });
300
300
  }
301
301
  if (!filer.isOwner && recentAskCount(agentRoot, undefined, Date.now()) >= ASK_OWNER_NON_OWNER_DAILY_LIMIT) {
302
- return JSON.stringify({ error: `ask_owner limit reached: my owner has already been asked ${ASK_OWNER_NON_OWNER_DAILY_LIMIT} times today on behalf of other requesters; do not retry ask_owner, resolve with verdict 'no' with an observation and keep polling` });
302
+ return JSON.stringify({ error: `ask_owner limit reached: my owner has already been asked ${ASK_OWNER_NON_OWNER_DAILY_LIMIT} times today on behalf of other requesters; do not retry ask_owner, resolve with verdict 'no' with an observation and keep polling`, code: "ask-limit-reached" });
303
303
  }
304
304
  const isA2A = existing.filed_from === "a2a";
305
305
  const noticeId = `await:${name}:asked_owner:${String(existing.created_at)}`;
@@ -370,21 +370,21 @@ async function askOwnerTool(name, observation, question, choices, existing, agen
370
370
  function fileAwait(args, agentRoot, agentName, sessionFriendId, sessionChannel, sessionKey, requestId) {
371
371
  const nameError = validateName(args.name);
372
372
  if (nameError)
373
- return JSON.stringify({ error: nameError });
373
+ return JSON.stringify({ error: nameError, code: "invalid-await-name" });
374
374
  if (!args.condition || !args.condition.trim()) {
375
- return JSON.stringify({ error: "condition is required" });
375
+ return JSON.stringify({ error: "condition is required", code: "missing-condition" });
376
376
  }
377
377
  if (!args.cadence || !args.cadence.trim()) {
378
- return JSON.stringify({ error: "cadence is required" });
378
+ return JSON.stringify({ error: "cadence is required", code: "missing-cadence" });
379
379
  }
380
380
  // Any ISO timestamp with a zone is accepted and stored in canonical form ("2026-10-12T12:09:00Z" becomes "...:00.000Z"); the alpha.910 replay refused four valid forms in a row.
381
381
  if (args.wake_at && (!/(?:Z|[+-]\d\d:?\d\d)$/i.test(args.wake_at) || !Number.isFinite(Date.parse(args.wake_at)))) {
382
- return JSON.stringify({ error: "wake_at must be an ISO timestamp with a time zone, like 2026-10-12T12:09:00Z" });
382
+ return JSON.stringify({ error: "wake_at must be an ISO timestamp with a time zone, like 2026-10-12T12:09:00Z", code: "invalid-wake-at" });
383
383
  }
384
384
  const wakeAt = args.wake_at ? new Date(args.wake_at).toISOString() : null;
385
385
  const filePath = awaitFilePath(agentRoot, args.name);
386
386
  if (fs.existsSync(filePath)) {
387
- return JSON.stringify({ error: `await "${args.name}" already exists` });
387
+ return JSON.stringify({ error: `await "${args.name}" already exists`, code: "await-exists" });
388
388
  }
389
389
  const mode = args.mode === "quick" ? "quick" : "full";
390
390
  const alert = sessionChannel === "external-event" ? null : args.alert ?? sessionChannel ?? null;
@@ -487,22 +487,22 @@ async function resolveAwaitTool(name, verdict, observation, agentRoot, agentName
487
487
  const content = typeof message === "string" && message.trim() ? message.trim() : undefined;
488
488
  const nameError = validateName(name);
489
489
  if (nameError)
490
- return JSON.stringify({ error: nameError });
490
+ return JSON.stringify({ error: nameError, code: "invalid-await-name" });
491
491
  const existing = readAwaitDefinition(agentRoot, name);
492
492
  if (!existing) {
493
493
  if (verdict === "ask_owner" && readAwaitDoneDefinition(agentRoot, name)?.status === "asked_owner") {
494
- return JSON.stringify({ error: `await "${name}" has already asked the owner and is closed; wait for the owner's reply instead of asking again` });
494
+ return JSON.stringify({ error: `await "${name}" has already asked the owner and is closed; wait for the owner's reply instead of asking again`, code: "already-asked-owner" });
495
495
  }
496
- return JSON.stringify({ error: `await "${name}" not found in awaiting/` });
496
+ return JSON.stringify({ error: `await "${name}" not found in awaiting/`, code: "await-not-found" });
497
497
  }
498
498
  if (existing.status !== "pending") {
499
- return JSON.stringify({ error: `await "${name}" is not pending (status: ${existing.status})` });
499
+ return JSON.stringify({ error: `await "${name}" is not pending (status: ${existing.status})`, code: "await-not-pending" });
500
500
  }
501
501
  if (verdict !== "yes" && verdict !== "no" && verdict !== "ask_owner") {
502
- return JSON.stringify({ error: `verdict must be exactly "yes", "no", or "ask_owner" (got ${JSON.stringify(verdict)}); use "no" with an observation while still waiting` });
502
+ return JSON.stringify({ error: `verdict must be exactly "yes", "no", or "ask_owner" (got ${JSON.stringify(verdict)}); use "no" with an observation while still waiting`, code: "invalid-verdict" });
503
503
  }
504
504
  if (!observation || !observation.trim()) {
505
- return JSON.stringify({ error: "observation is required" });
505
+ return JSON.stringify({ error: "observation is required", code: "missing-observation" });
506
506
  }
507
507
  if (verdict === "ask_owner")
508
508
  return askOwnerTool(name, observation, ask?.question, ask?.choices, existing, agentRoot, agentName);
@@ -585,13 +585,13 @@ async function resolveAwaitTool(name, verdict, observation, agentRoot, agentName
585
585
  function cancelAwaitTool(name, reason, agentRoot, agentName) {
586
586
  const nameError = validateName(name);
587
587
  if (nameError)
588
- return JSON.stringify({ error: nameError });
588
+ return JSON.stringify({ error: nameError, code: "invalid-await-name" });
589
589
  const existing = readAwaitDefinition(agentRoot, name);
590
590
  if (!existing) {
591
- return JSON.stringify({ error: `await "${name}" not found in awaiting/` });
591
+ return JSON.stringify({ error: `await "${name}" not found in awaiting/`, code: "await-not-found" });
592
592
  }
593
593
  if (existing.status !== "pending") {
594
- return JSON.stringify({ error: `await "${name}" is not pending (status: ${existing.status})` });
594
+ return JSON.stringify({ error: `await "${name}" is not pending (status: ${existing.status})`, code: "await-not-pending" });
595
595
  }
596
596
  const updates = {
597
597
  status: "canceled",
@@ -788,7 +788,7 @@ exports.awaitingToolDefinitions = [
788
788
  const event = ctx?.currentExternalEvent;
789
789
  const eventFriendId = event ? ctx?.context?.friend.id ?? null : null;
790
790
  if (event && !eventFriendId)
791
- return JSON.stringify({ error: "external event await authority has no exact owner relationship" });
791
+ return JSON.stringify({ error: "external event await authority has no exact owner relationship", code: "no-event-owner" });
792
792
  return fileAwait({
793
793
  name: a.name,
794
794
  condition: a.condition,
@@ -800,6 +800,14 @@ exports.awaitingToolDefinitions = [
800
800
  body: a.body,
801
801
  }, agentRoot, agentName, eventFriendId ?? ctx?.currentSession?.friendId ?? null, event ? "external-event" : ctx?.currentSession?.channel ?? null, event ? event.recordPath : ctx?.currentSession?.key ?? null, event ? null : ctx?.relationshipAuthorization?.requestId ?? null);
802
802
  },
803
+ ax: { id: "tool:await_condition", group: "turn-awaits", when: "Pick this when something will happen later outside your control, like a reply or a delivery, and someone should hear once it does.", effect: "write", errors: [
804
+ { code: "invalid-await-name", means: "name was empty or had characters other than letters, digits, underscores and hyphens.", fix: "Call again with a name such as dentist_reply or pr-1234-merged." },
805
+ { code: "missing-condition", means: "condition was empty.", fix: "Call again with condition saying, in plain words, what counts as done." },
806
+ { code: "missing-cadence", means: "cadence was empty.", fix: "Call again with how often to check, such as 15m or 1h." },
807
+ { code: "invalid-wake-at", means: "wake_at wasn't an ISO time with a time zone.", fix: "Pass a time such as 2026-10-12T12:09:00Z, or leave wake_at out." },
808
+ { code: "await-exists", means: "A pending await already has that name.", fix: "Pick another name, or cancel_await the old one first if it is stale." },
809
+ { code: "no-event-owner", means: "This turn handles an outside event that has no exact owner relationship, so it can't file an await.", fix: "Handle the event now without an await, or tell the owner what to watch for." },
810
+ ] },
803
811
  riskProfile: { mutates: "durable_state_write", risk: "high", reason: "files a durable await condition" },
804
812
  },
805
813
  {
@@ -826,7 +834,7 @@ exports.awaitingToolDefinitions = [
826
834
  const agentRoot = (0, identity_1.getAgentRoot)();
827
835
  const agentName = (0, identity_1.getAgentName)();
828
836
  if (isHouseCareAwait(a.name) && a.verdict !== "no")
829
- return JSON.stringify({ error: `${exports.HOUSE_CARE_AWAIT} is the package-managed daily house-care sweep and never resolves: finish every tick with verdict 'no' and a one-line observation, and send any owner digest with house_digest_send` });
837
+ return JSON.stringify({ error: `${exports.HOUSE_CARE_AWAIT} is the package-managed daily house-care sweep and never resolves: finish every tick with verdict 'no' and a one-line observation, and send any owner digest with house_digest_send`, code: "house-care-only-no" });
830
838
  if (ctx?.relationshipAuthorization) {
831
839
  const awaitName = String(a.name ?? "");
832
840
  const { session, requestId } = relationshipScopeFor(ctx, awaitName);
@@ -843,7 +851,7 @@ exports.awaitingToolDefinitions = [
843
851
  else if (session && requestId) {
844
852
  if (existing?.filed_for_friend_id !== session.friendId || existing.filed_from !== session.channel
845
853
  || existing.filed_from_key !== session.key || existing.request_id !== requestId) {
846
- return JSON.stringify({ error: "resolve_await is limited to the current relationship request or bound external event" });
854
+ return JSON.stringify({ error: "resolve_await is limited to the current relationship request or bound external event", code: "outside-request" });
847
855
  }
848
856
  binding = inspectRelationshipFollowUp(agentRoot, { friendId: session.friendId, channel: session.channel, key: session.key, requestId, awaitName });
849
857
  }
@@ -852,13 +860,28 @@ exports.awaitingToolDefinitions = [
852
860
  failBrokenAwait(agentRoot, agentName, awaitName, binding.reason);
853
861
  else
854
862
  cancelStaleAwait(agentRoot, agentName, awaitName, binding.reason);
855
- return JSON.stringify({ error: binding.reason });
863
+ return JSON.stringify({ error: binding.reason, code: "await-binding-inactive" });
856
864
  }
857
865
  if (!binding?.active)
858
- return JSON.stringify({ error: "resolve_await is limited to the current relationship request or bound external event" });
866
+ return JSON.stringify({ error: "resolve_await is limited to the current relationship request or bound external event", code: "outside-request" });
859
867
  }
860
868
  return resolveAwaitTool(a.name, a.verdict, a.observation, agentRoot, agentName, { question: a.question, choices: a.choices }, a.message);
861
869
  },
870
+ ax: { id: "tool:resolve_await", group: "turn-awaits", when: "Pick this on every check of a waiting condition to record what you saw: met, not yet, or stuck until your owner decides.", effect: "write", errors: [
871
+ { code: "invalid-await-name", means: "name was empty or had characters other than letters, digits, underscores and hyphens.", fix: "Call again with a name such as dentist_reply or pr-1234-merged." },
872
+ { code: "await-not-found", means: "No pending await has that name.", fix: "Check the name of the await this tick is about; it may already be resolved or cancelled." },
873
+ { code: "await-not-pending", means: "The await exists but is no longer pending, so there is nothing to resolve.", fix: "Stop checking it; its status in the reply says how it ended." },
874
+ { code: "invalid-verdict", means: "verdict wasn't exactly yes, no or ask_owner.", fix: "Use no with an observation while still waiting; yes only once the condition holds." },
875
+ { code: "missing-observation", means: "observation was empty.", fix: "Call again with one line saying what you saw on this check." },
876
+ { code: "house-care-only-no", means: "The daily house-care sweep never resolves; it takes only verdict no.", fix: "Resolve it with verdict no and a one-line observation; send any owner digest with house_digest_send." },
877
+ { code: "outside-request", means: "This conversation may touch only the await filed for its own current request, and this one isn't it.", fix: "Leave other awaits alone; the conversation that filed one, or its own tick, resolves it." },
878
+ { code: "await-binding-inactive", means: "The request or event this await served is gone, expired or no longer matches, so I closed the await; the reason is the error text.", fix: "Stop checking it; file a new await only if someone still needs the answer." },
879
+ { code: "already-asked-owner", means: "This await already asked the owner and is closed.", fix: "Wait for the owner's reply instead of asking again." },
880
+ { code: "invalid-ask-owner", means: "ask_owner needs a question and 2 to 4 non-empty choices without |; the error says which part is wrong.", fix: "Call again with question in plain words and 2 to 4 short choices." },
881
+ { code: "ask-in-flight", means: "The owner is being asked about this await right now.", fix: "Wait for the owner's reply; don't ask again." },
882
+ { code: "ask-limit-reached", means: "The owner has been asked too often in the last day, for this requester or for all of them.", fix: "Resolve with verdict no and an observation, and keep checking; don't retry ask_owner." },
883
+ { code: "owner-unreachable", means: "The question to the owner couldn't be sent; the await is still pending.", fix: "Try ask_owner again on the next check." },
884
+ ] },
862
885
  riskProfile: {
863
886
  mutates: ["durable_state_write", "external_side_effect"],
864
887
  risk: "high",
@@ -885,7 +908,7 @@ exports.awaitingToolDefinitions = [
885
908
  const agentRoot = (0, identity_1.getAgentRoot)();
886
909
  const agentName = (0, identity_1.getAgentName)();
887
910
  if (isHouseCareAwait(a.name))
888
- return JSON.stringify({ error: `${exports.HOUSE_CARE_AWAIT} is the package-managed daily house-care sweep and cannot be cancelled` });
911
+ return JSON.stringify({ error: `${exports.HOUSE_CARE_AWAIT} is the package-managed daily house-care sweep and cannot be cancelled`, code: "house-care-fixed" });
889
912
  if (ctx?.relationshipAuthorization) {
890
913
  const { session, requestId } = relationshipScopeFor(ctx, String(a.name ?? ""));
891
914
  if (!session || !requestId || !hasActiveRelationshipFollowUp(agentRoot, {
@@ -895,10 +918,17 @@ exports.awaitingToolDefinitions = [
895
918
  requestId,
896
919
  awaitName: String(a.name ?? ""),
897
920
  }))
898
- return JSON.stringify({ error: "cancel_await is limited to the current relationship request" });
921
+ return JSON.stringify({ error: "cancel_await is limited to the current relationship request", code: "outside-request" });
899
922
  }
900
923
  return cancelAwaitTool(a.name, a.reason, agentRoot, agentName);
901
924
  },
925
+ ax: { id: "tool:cancel_await", group: "turn-awaits", when: "Pick this to stop watching a condition nobody needs any more, quietly, without telling the person who asked; use resolve_await if it was met.", effect: "write", errors: [
926
+ { code: "invalid-await-name", means: "name was empty or had characters other than letters, digits, underscores and hyphens.", fix: "Call again with a name such as dentist_reply or pr-1234-merged." },
927
+ { code: "await-not-found", means: "No pending await has that name.", fix: "Check the name; it may already be resolved or cancelled." },
928
+ { code: "await-not-pending", means: "The await is no longer pending, so there is nothing to cancel.", fix: "Leave it; its status in the reply says how it ended." },
929
+ { code: "house-care-fixed", means: "The daily house-care sweep is managed by the package and can't be cancelled.", fix: "Leave it pending; resolve each of its checks with verdict no." },
930
+ { code: "outside-request", means: "This conversation may touch only the await filed for its own current request, and this one isn't it.", fix: "Leave other awaits alone; the conversation that filed one, or its own tick, resolves it." },
931
+ ] },
902
932
  riskProfile: { mutates: "durable_state_write", risk: "high", reason: "archives a durable await condition" },
903
933
  },
904
934
  ];
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1319",
3
+ "version": "0.1.0-alpha.1320",
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.1319",
9
+ "version": "0.1.0-alpha.1320",
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.1319",
3
+ "version": "0.1.0-alpha.1320",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },