@ouro.bot/cli 0.1.0-alpha.1388 → 0.1.0-alpha.1389

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.1389",
6
+ "changes": [
7
+ "An approval-gated tool, including a bundle's declared consequential MCP tool, no longer runs on a voice call or through ouro mcp call, where no one can be asked: it answers that it needs approval and nothing runs."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.1388",
6
12
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1388",
2
+ "runtimeVersion": "0.1.0-alpha.1389",
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.1388</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1389</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -2477,7 +2477,7 @@ async function runAgent(messages, callbacks, channel, signal, options) {
2477
2477
  if (protectedCall && protectedCall.policy.kind === "required") {
2478
2478
  if (!options?.approvalCoordinator) {
2479
2479
  streamCallbackBuffer?.discard();
2480
- const rejection = "rejected: this protected tool requires approval, but the approval coordinator is unavailable; the handler was not invoked.";
2480
+ const rejection = tools_1.APPROVAL_UNAVAILABLE_REJECTION;
2481
2481
  rejectToolBatch(msg, [rejection]);
2482
2482
  (0, runtime_1.emitNervesEvent)({
2483
2483
  level: "warn",
@@ -2538,6 +2538,10 @@ class OuroDaemon {
2538
2538
  const binding = matches.length === 1 ? matches[0].mcpBinding : undefined;
2539
2539
  if (!binding)
2540
2540
  return { ok: false, error: "MCP tool is unavailable or ambiguous" };
2541
+ // A tool that asks the person first can't run from here: nothing on this path can ask them (ourostack/ouroboros#1694).
2542
+ if (matches[0].approvalPolicy?.(parsedArgs).kind === "required") {
2543
+ return { ok: false, error: `${binding.server}/${binding.rawName} is declared consequential, so it runs only once the person approves it in a conversation; ouro mcp call can't ask them, so nothing ran.` };
2544
+ }
2541
2545
  const result = await mcpCallManager.manager.callTool(binding, parsedArgs, owner);
2542
2546
  return { ok: true, data: result };
2543
2547
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ToolSelectionError = exports.surfaceToolDef = exports.speakTool = exports.restTool = exports.ponderTool = exports.observeTool = exports.settleTool = exports.tools = exports.SANCTUARY_OWNER_ADDITIONS = exports.SANCTUARY_MCP_PROVIDED_TOOLS = void 0;
3
+ exports.APPROVAL_UNAVAILABLE_REJECTION = exports.ToolSelectionError = exports.surfaceToolDef = exports.speakTool = exports.restTool = exports.ponderTool = exports.observeTool = exports.settleTool = exports.tools = exports.SANCTUARY_OWNER_ADDITIONS = exports.SANCTUARY_MCP_PROVIDED_TOOLS = void 0;
4
4
  exports.toolSelectionSchemas = toolSelectionSchemas;
5
5
  exports.selectToolsForChannel = selectToolsForChannel;
6
6
  exports.getToolsForChannel = getToolsForChannel;
@@ -10,6 +10,7 @@ exports.registeredToolDefinitions = registeredToolDefinitions;
10
10
  exports.approvalPolicyForToolName = approvalPolicyForToolName;
11
11
  exports.classifyApprovalForInvocation = classifyApprovalForInvocation;
12
12
  exports.approvalPolicyForInvocation = approvalPolicyForInvocation;
13
+ exports.rejectionWithoutApprover = rejectionWithoutApprover;
13
14
  exports.readOnlyOuroShellCommands = readOnlyOuroShellCommands;
14
15
  exports.shellRiskProfile = shellRiskProfile;
15
16
  exports.riskProfileForTool = riskProfileForTool;
@@ -308,6 +309,16 @@ async function approvalPolicyForInvocation(name, args, ctx) {
308
309
  // An approval requirement is not execution authority; dispatch needs the full classification.
309
310
  return (await classifyApprovalForInvocation(name, args, ctx)).policy;
310
311
  }
312
+ /** What an approval-gated call answers where nothing can ask the person, as in a turn with no approval coordinator: the handler never ran. */
313
+ exports.APPROVAL_UNAVAILABLE_REJECTION = "rejected: this protected tool requires approval, but the approval coordinator is unavailable; the handler was not invoked.";
314
+ /**
315
+ * For a dispatch path that can't ask the person, such as a voice call: the rejection when this call needs their approval,
316
+ * else null. Every approval-gated tool, the harness's own and a bundle's declared consequential ones, fails closed there
317
+ * (ourostack/ouroboros#1694).
318
+ */
319
+ async function rejectionWithoutApprover(name, args, ctx) {
320
+ return (await approvalPolicyForInvocation(name, args, ctx)).kind === "required" ? exports.APPROVAL_UNAVAILABLE_REJECTION : null;
321
+ }
311
322
  const findDefinition = resolveToolDefinition;
312
323
  /** The flags that print ouro's help or version, which run nothing. */
313
324
  const OURO_INFO_FLAGS = ["-h", "--help", "-v", "--version"];
@@ -2473,7 +2473,8 @@ class TwilioOpenAIRealtimeMediaStreamSession {
2473
2473
  message: "OpenAI Realtime voice tool call started",
2474
2474
  meta: { agentName: this.options.agentName, callSid: safeSegment(this.callSid), tool: name },
2475
2475
  });
2476
- output = await (0, tools_1.execTool)(name, args, this.toolContext);
2476
+ // A call has no one to approve a protected tool, so it never runs here.
2477
+ output = await (0, tools_1.rejectionWithoutApprover)(name, args, this.toolContext) ?? await (0, tools_1.execTool)(name, args, this.toolContext);
2477
2478
  (0, runtime_1.emitNervesEvent)({
2478
2479
  component: "senses",
2479
2480
  event: "senses.voice_twilio_realtime_tool_end",
@@ -3579,7 +3580,8 @@ class OpenAISipPhoneSession {
3579
3580
  message: "OpenAI SIP voice tool call started",
3580
3581
  meta: { agentName: this.options.agentName, callId: safeSegment(this.metadata.callId), tool: name },
3581
3582
  });
3582
- output = await (0, tools_1.execTool)(name, args, this.toolContext);
3583
+ // A call has no one to approve a protected tool, so it never runs here.
3584
+ output = await (0, tools_1.rejectionWithoutApprover)(name, args, this.toolContext) ?? await (0, tools_1.execTool)(name, args, this.toolContext);
3583
3585
  (0, runtime_1.emitNervesEvent)({
3584
3586
  component: "senses",
3585
3587
  event: "senses.voice_openai_sip_tool_end",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1388",
3
+ "version": "0.1.0-alpha.1389",
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.1388",
9
+ "version": "0.1.0-alpha.1389",
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.1388",
3
+ "version": "0.1.0-alpha.1389",
4
4
  "description": "Ouroboros, the agent harness: agents with durable memory that live where you talk (terminal, Teams, iMessage, mail, voice) and use real tools. Start with npx ouro.bot@latest.",
5
5
  "homepage": "https://ouroboros.bot/",
6
6
  "engines": {