@cabane/companion 0.6.227 → 0.6.228

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/dist/cli.js CHANGED
@@ -2822,8 +2822,10 @@ var init_pump = __esm({
2822
2822
 
2823
2823
  // packages/agent-runtime/src/turn-control/prompt-guidance.ts
2824
2824
  function turnControlPromptGuidance(prefix) {
2825
- const controls = TURN_CONTROL_TOOLS.map((name) => `\`${prefix}${name}\` (${MEANINGS[name]})`);
2826
- return `The turn tools are: ${controls.join("; ")}. Read a tool's description before calling it. A peer response is ordinary conversation speech; your reply is the answer.`;
2825
+ return [
2826
+ "Turn tools (read each description before calling):",
2827
+ ...TURN_CONTROL_TOOLS.map((name) => `- \`${prefix}${name}\` \u2014 ${MEANINGS[name]}.`)
2828
+ ].join("\n");
2827
2829
  }
2828
2830
  var MEANINGS;
2829
2831
  var init_prompt_guidance = __esm({
@@ -2832,8 +2834,8 @@ var init_prompt_guidance = __esm({
2832
2834
  init_descriptions();
2833
2835
  MEANINGS = {
2834
2836
  answer: "declare the text you write next as your answer",
2835
- open_exchange: "put a question, go-ahead or request to a person",
2836
- cancel_wake: "cancel your own armed wake in this conversation",
2837
+ open_exchange: "ask a person for a decision, approval or action",
2838
+ cancel_wake: "cancel your scheduled return to this conversation",
2837
2839
  skip_turn: "end without posting a reply",
2838
2840
  wake_me: "schedule your own return; when it fires, say what you came back to check",
2839
2841
  withdraw_exchange: "withdraw an open exchange in this conversation with a reason"
@@ -2848,15 +2850,14 @@ var init_addendum = __esm({
2848
2850
  "use strict";
2849
2851
  init_prompt_guidance();
2850
2852
  CLAUDE_CODE_ADDENDUM = [
2851
- "On this harness the Cabane tools register under MCP prefixes. The workspace tools are",
2852
- "`mcp__cabane__query`, `mcp__cabane__mutate` and `mcp__cabane__describe`; the ancillary",
2853
- "tools are `mcp__cabane__read_binary`, `mcp__cabane__upload`, `mcp__cabane__begin_upload`,",
2854
- "`mcp__cabane__finalize_upload`, and `mcp__cabane__mint_render_token`.",
2855
- turnControlPromptGuidance("mcp__cabane_companion__"),
2856
- "Where this prompt names a tool by its bare verb, call",
2857
- "the prefixed form from your tool list. Your harness's own tools (shell, local file",
2858
- "read/edit) keep their ordinary names and act on the local machine only."
2859
- ].join(" ");
2853
+ "- Workspace tools: `mcp__cabane__query`, `mcp__cabane__mutate`, `mcp__cabane__describe`.",
2854
+ "- File tools: `mcp__cabane__read_binary`, `mcp__cabane__upload`, `mcp__cabane__begin_upload`, `mcp__cabane__finalize_upload`.",
2855
+ "- Page verification: `mcp__cabane__mint_render_token`.",
2856
+ "- Where these instructions use a bare tool name, call its prefixed form from the tool list.",
2857
+ "- Host tools such as the shell and local file editor keep their ordinary names and act on the local device.",
2858
+ "",
2859
+ turnControlPromptGuidance("mcp__cabane_companion__")
2860
+ ].join("\n");
2860
2861
  }
2861
2862
  });
2862
2863
 
@@ -3704,17 +3705,14 @@ var init_addendum2 = __esm({
3704
3705
  "use strict";
3705
3706
  init_prompt_guidance();
3706
3707
  OPENCODE_ADDENDUM = [
3707
- "Every tool here goes by its plain name: the workspace tools are `query`, `mutate` and",
3708
- "`describe`.",
3709
- turnControlPromptGuidance(""),
3710
- "The ancillary tools are `read_binary`, `upload`, `begin_upload`,",
3711
- "`finalize_upload`, `mint_render_token`; and the host tools are plain verbs too (`bash`,",
3712
- "`read`, `edit`). Mind the collision: a bare `read` or `edit` is the HOST tool, acting on the",
3713
- "local machine \u2014 a workspace read is `query` with the operation name `files.read`. The",
3714
- "collision runs the other way too: `read` is a host tool here AND `files.read` is an",
3715
- "operation name, so keep the bare verb and the dotted name apart. If a tool ever appears with",
3716
- "an `mcp__\u2026__` prefix, that prefix is not part of its name here."
3717
- ].join(" ");
3708
+ "- Workspace tools: `query`, `mutate`, `describe`.",
3709
+ "- File tools: `read_binary`, `upload`, `begin_upload`, `finalize_upload`.",
3710
+ "- Page verification: `mint_render_token`.",
3711
+ "- Call tools by their plain names here, without an `mcp__\u2026__` prefix.",
3712
+ "- Host tools such as `bash`, `read` and `edit` act on the local device. To read a workspace file, call `query` with the operation `files.read`.",
3713
+ "",
3714
+ turnControlPromptGuidance("")
3715
+ ].join("\n");
3718
3716
  }
3719
3717
  });
3720
3718
 
@@ -4447,23 +4445,14 @@ var init_addendum3 = __esm({
4447
4445
  "use strict";
4448
4446
  init_prompt_guidance();
4449
4447
  CODEX_ADDENDUM = [
4450
- "Codex surfaces MCP tools under qualified names, and on some versions defers them. The",
4451
- "workspace tools are `mcp__cabane__query`, `mcp__cabane__mutate` and",
4452
- "`mcp__cabane__describe` \u2014 if they aren't in your visible tool list, locate them in",
4453
- "the deferred-tool inventory and invoke those exact qualified names; never conclude the",
4454
- "workspace is",
4455
- "absent without attempting discovery and invocation, and if a call fails, report the recorded",
4456
- "error.",
4457
- turnControlPromptGuidance("mcp__cabane_companion__"),
4458
- // Every ancillary tool is written as Codex's own tool list shows it — qualified — so the sentence
4459
- // instructing exact qualified names doesn't contradict itself. The bare `query` / `mutate` below
4460
- // stay: that sentence is about operation names, after the qualified forms are given.
4461
- "The ancillary tools are `mcp__cabane__read_binary`, `mcp__cabane__upload`,",
4462
- "`mcp__cabane__begin_upload`, `mcp__cabane__finalize_upload` and",
4463
- "`mcp__cabane__mint_render_token` \u2014 all possibly deferred too.",
4464
- "There is no Cabane `read`/`write`/`search` tool \u2014 those are",
4465
- "operation NAMES you pass to `query` / `mutate`."
4466
- ].join(" ");
4448
+ "- Workspace tools: `mcp__cabane__query`, `mcp__cabane__mutate`, `mcp__cabane__describe`.",
4449
+ "- File tools: `mcp__cabane__read_binary`, `mcp__cabane__upload`, `mcp__cabane__begin_upload`, `mcp__cabane__finalize_upload`.",
4450
+ "- Page verification: `mcp__cabane__mint_render_token`.",
4451
+ "- Codex may defer MCP tools. If a listed tool is missing, search the deferred-tool inventory and call the matching tool by its exact name. Report discovery or call failures with the recorded error.",
4452
+ "- Names such as `files.read` are operations passed to `query` or `mutate`, not separate tools.",
4453
+ "",
4454
+ turnControlPromptGuidance("mcp__cabane_companion__")
4455
+ ].join("\n");
4467
4456
  }
4468
4457
  });
4469
4458
 
package/dist/runtime.js CHANGED
@@ -3016,28 +3016,29 @@ import {
3016
3016
  // packages/agent-runtime/src/turn-control/prompt-guidance.ts
3017
3017
  var MEANINGS = {
3018
3018
  answer: "declare the text you write next as your answer",
3019
- open_exchange: "put a question, go-ahead or request to a person",
3020
- cancel_wake: "cancel your own armed wake in this conversation",
3019
+ open_exchange: "ask a person for a decision, approval or action",
3020
+ cancel_wake: "cancel your scheduled return to this conversation",
3021
3021
  skip_turn: "end without posting a reply",
3022
3022
  wake_me: "schedule your own return; when it fires, say what you came back to check",
3023
3023
  withdraw_exchange: "withdraw an open exchange in this conversation with a reason"
3024
3024
  };
3025
3025
  function turnControlPromptGuidance(prefix) {
3026
- const controls = TURN_CONTROL_TOOLS.map((name) => `\`${prefix}${name}\` (${MEANINGS[name]})`);
3027
- return `The turn tools are: ${controls.join("; ")}. Read a tool's description before calling it. A peer response is ordinary conversation speech; your reply is the answer.`;
3026
+ return [
3027
+ "Turn tools (read each description before calling):",
3028
+ ...TURN_CONTROL_TOOLS.map((name) => `- \`${prefix}${name}\` \u2014 ${MEANINGS[name]}.`)
3029
+ ].join("\n");
3028
3030
  }
3029
3031
 
3030
3032
  // packages/agent-runtime/src/claude-code/addendum.ts
3031
3033
  var CLAUDE_CODE_ADDENDUM = [
3032
- "On this harness the Cabane tools register under MCP prefixes. The workspace tools are",
3033
- "`mcp__cabane__query`, `mcp__cabane__mutate` and `mcp__cabane__describe`; the ancillary",
3034
- "tools are `mcp__cabane__read_binary`, `mcp__cabane__upload`, `mcp__cabane__begin_upload`,",
3035
- "`mcp__cabane__finalize_upload`, and `mcp__cabane__mint_render_token`.",
3036
- turnControlPromptGuidance("mcp__cabane_companion__"),
3037
- "Where this prompt names a tool by its bare verb, call",
3038
- "the prefixed form from your tool list. Your harness's own tools (shell, local file",
3039
- "read/edit) keep their ordinary names and act on the local machine only."
3040
- ].join(" ");
3034
+ "- Workspace tools: `mcp__cabane__query`, `mcp__cabane__mutate`, `mcp__cabane__describe`.",
3035
+ "- File tools: `mcp__cabane__read_binary`, `mcp__cabane__upload`, `mcp__cabane__begin_upload`, `mcp__cabane__finalize_upload`.",
3036
+ "- Page verification: `mcp__cabane__mint_render_token`.",
3037
+ "- Where these instructions use a bare tool name, call its prefixed form from the tool list.",
3038
+ "- Host tools such as the shell and local file editor keep their ordinary names and act on the local device.",
3039
+ "",
3040
+ turnControlPromptGuidance("mcp__cabane_companion__")
3041
+ ].join("\n");
3041
3042
 
3042
3043
  // packages/agent-runtime/src/mcp-secret-env.ts
3043
3044
  function headersAsEnvReferences(server) {
@@ -3763,17 +3764,14 @@ var claudeCodeAdapter = createClaudeCodeAdapter();
3763
3764
 
3764
3765
  // packages/agent-runtime/src/opencode/addendum.ts
3765
3766
  var OPENCODE_ADDENDUM = [
3766
- "Every tool here goes by its plain name: the workspace tools are `query`, `mutate` and",
3767
- "`describe`.",
3768
- turnControlPromptGuidance(""),
3769
- "The ancillary tools are `read_binary`, `upload`, `begin_upload`,",
3770
- "`finalize_upload`, `mint_render_token`; and the host tools are plain verbs too (`bash`,",
3771
- "`read`, `edit`). Mind the collision: a bare `read` or `edit` is the HOST tool, acting on the",
3772
- "local machine \u2014 a workspace read is `query` with the operation name `files.read`. The",
3773
- "collision runs the other way too: `read` is a host tool here AND `files.read` is an",
3774
- "operation name, so keep the bare verb and the dotted name apart. If a tool ever appears with",
3775
- "an `mcp__\u2026__` prefix, that prefix is not part of its name here."
3776
- ].join(" ");
3767
+ "- Workspace tools: `query`, `mutate`, `describe`.",
3768
+ "- File tools: `read_binary`, `upload`, `begin_upload`, `finalize_upload`.",
3769
+ "- Page verification: `mint_render_token`.",
3770
+ "- Call tools by their plain names here, without an `mcp__\u2026__` prefix.",
3771
+ "- Host tools such as `bash`, `read` and `edit` act on the local device. To read a workspace file, call `query` with the operation `files.read`.",
3772
+ "",
3773
+ turnControlPromptGuidance("")
3774
+ ].join("\n");
3777
3775
 
3778
3776
  // packages/agent-runtime/src/opencode/events.ts
3779
3777
  function asRecord(v) {
@@ -4433,23 +4431,14 @@ var opencodeAdapter = createOpencodeAdapter();
4433
4431
 
4434
4432
  // packages/agent-runtime/src/codex/addendum.ts
4435
4433
  var CODEX_ADDENDUM = [
4436
- "Codex surfaces MCP tools under qualified names, and on some versions defers them. The",
4437
- "workspace tools are `mcp__cabane__query`, `mcp__cabane__mutate` and",
4438
- "`mcp__cabane__describe` \u2014 if they aren't in your visible tool list, locate them in",
4439
- "the deferred-tool inventory and invoke those exact qualified names; never conclude the",
4440
- "workspace is",
4441
- "absent without attempting discovery and invocation, and if a call fails, report the recorded",
4442
- "error.",
4443
- turnControlPromptGuidance("mcp__cabane_companion__"),
4444
- // Every ancillary tool is written as Codex's own tool list shows it — qualified — so the sentence
4445
- // instructing exact qualified names doesn't contradict itself. The bare `query` / `mutate` below
4446
- // stay: that sentence is about operation names, after the qualified forms are given.
4447
- "The ancillary tools are `mcp__cabane__read_binary`, `mcp__cabane__upload`,",
4448
- "`mcp__cabane__begin_upload`, `mcp__cabane__finalize_upload` and",
4449
- "`mcp__cabane__mint_render_token` \u2014 all possibly deferred too.",
4450
- "There is no Cabane `read`/`write`/`search` tool \u2014 those are",
4451
- "operation NAMES you pass to `query` / `mutate`."
4452
- ].join(" ");
4434
+ "- Workspace tools: `mcp__cabane__query`, `mcp__cabane__mutate`, `mcp__cabane__describe`.",
4435
+ "- File tools: `mcp__cabane__read_binary`, `mcp__cabane__upload`, `mcp__cabane__begin_upload`, `mcp__cabane__finalize_upload`.",
4436
+ "- Page verification: `mcp__cabane__mint_render_token`.",
4437
+ "- Codex may defer MCP tools. If a listed tool is missing, search the deferred-tool inventory and call the matching tool by its exact name. Report discovery or call failures with the recorded error.",
4438
+ "- Names such as `files.read` are operations passed to `query` or `mutate`, not separate tools.",
4439
+ "",
4440
+ turnControlPromptGuidance("mcp__cabane_companion__")
4441
+ ].join("\n");
4453
4442
 
4454
4443
  // packages/agent-runtime/src/codex/events.ts
4455
4444
  function asRecord3(v) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cabane/companion",
3
- "version": "0.6.227",
3
+ "version": "0.6.228",
4
4
  "type": "module",
5
5
  "description": "The Cabane Companion (headless): connect an agent on your machine to your Cabane workspace as a responder — drive work against your own codebase, files, and MCP servers without putting any of it in Cabane.",
6
6
  "license": "UNLICENSED",