@cabane/companion 0.6.173 → 0.6.174

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
@@ -2509,7 +2509,7 @@ var init_pump = __esm({
2509
2509
  });
2510
2510
 
2511
2511
  // packages/agent-runtime/src/turn-control/descriptions.ts
2512
- var MAX_ASK_QUESTION_BYTES, MAX_ASK_HEADLINE_BYTES, MAX_ASK_ITEMS, MAX_ASK_OPTION_BYTES, ASK_OPTION_NOT_A_STRING, MIN_ASK_OPTIONS, MAX_ASK_OPTIONS, MAX_WAKE_NOTE_BYTES, MAX_WITHDRAW_REASON_BYTES, MAX_SKIP_REASON_BYTES, TURN_CONTROL_TOOLS, TURN_CONTROL_TOOL_DESCRIPTIONS, TURN_CONTROL_FIELD_DESCRIPTIONS;
2512
+ var MAX_ASK_QUESTION_BYTES, MAX_ASK_HEADLINE_BYTES, MAX_ASK_ITEMS, MAX_ASK_OPTION_BYTES, ASK_OPTION_NOT_A_STRING, MIN_ASK_OPTIONS, MAX_ASK_OPTIONS, ASK_TARGET_PATTERN, ASK_TARGET_INVALID, MAX_WAKE_NOTE_BYTES, MAX_WITHDRAW_REASON_BYTES, MAX_SKIP_REASON_BYTES, TURN_CONTROL_TOOLS, TURN_CONTROL_TOOL_DESCRIPTIONS, TURN_CONTROL_FIELD_DESCRIPTIONS;
2513
2513
  var init_descriptions = __esm({
2514
2514
  "packages/agent-runtime/src/turn-control/descriptions.ts"() {
2515
2515
  "use strict";
@@ -2520,6 +2520,8 @@ var init_descriptions = __esm({
2520
2520
  ASK_OPTION_NOT_A_STRING = "An ask option is a plain string label.";
2521
2521
  MIN_ASK_OPTIONS = 2;
2522
2522
  MAX_ASK_OPTIONS = 4;
2523
+ ASK_TARGET_PATTERN = /^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|@?[A-Za-z0-9-]{2,32})$/;
2524
+ ASK_TARGET_INVALID = "An ask target is a user id or an @handle.";
2523
2525
  MAX_WAKE_NOTE_BYTES = 2e3;
2524
2526
  MAX_WITHDRAW_REASON_BYTES = 400;
2525
2527
  MAX_SKIP_REASON_BYTES = 500;
@@ -2531,7 +2533,7 @@ var init_descriptions = __esm({
2531
2533
  "withdraw_ask"
2532
2534
  ];
2533
2535
  TURN_CONTROL_TOOL_DESCRIPTIONS = {
2534
- ask: `Ask a person a structured question you need answered to continue, then end your turn; don't wait for the reply. \`targetUserId\` is a person on your roster; to bring in an agent, name it with \`@handle\` in your reply.
2536
+ ask: `Ask a person a structured question you need answered to continue, then end your turn; don't wait for the reply. \`targetUserId\` is a person on your roster, by their \`@handle\`; to bring in an agent, name it with \`@handle\` in your reply.
2535
2537
  - Form: one question (\`headline\`, optional \`question\` body, \`options\`) or \`questions\`, 1\u2013${MAX_ASK_ITEMS} \`{ headline, body?, options? }\`; never both. Decisions that arise together go in ONE call, in the order you want them answered. A second \`ask\` is a separate item, never an edit; raise one only for a genuinely new question.
2536
2538
  - \`headline\`: one sentence ending in \`?\`. Body (\`question\` or each item's \`body\`): a sentence or two of framing, not a report; inline Markdown only, no lists or headings. \`options\`: ${MIN_ASK_OPTIONS}\u2013${MAX_ASK_OPTIONS} one-click answers (always for a yes/no go-ahead), each a distinct course of action you can carry out without asking back.
2537
2539
  - Voice, in headline, body and options: "I" for yourself, never your own name; name everyone else who decides or acts, as on your roster. Never "you", "your", "we", "us", "our" or their contractions, nor "he", "she" or "they" for a named actor. Each option reads correctly alone. A quotation stays accurate: say who said it.
@@ -2546,7 +2548,7 @@ var init_descriptions = __esm({
2546
2548
  };
2547
2549
  TURN_CONTROL_FIELD_DESCRIPTIONS = {
2548
2550
  ask: {
2549
- targetUserId: "The workspace member (human) to ask \u2014 a user id, from your turn context's roster.",
2551
+ targetUserId: "The person to ask: their `@handle` from your turn context's roster (preferred), or their user id.",
2550
2552
  question: `SINGLE-question form: a short body \u2014 one or two sentences of framing the headline can't hold. NOT a report (up to ${MAX_ASK_QUESTION_BYTES} characters, inline markdown only). Provide EITHER this or \`questions\`, not both. Put the crisp one-sentence question in \`headline\`.`,
2551
2553
  headline: `SINGLE-question form: the question itself as ONE clear, capitalized sentence ending in \`?\` ("Should Ledger deploy once Mia approves?"), up to ${MAX_ASK_HEADLINE_BYTES} characters. What the person reads first in For you and on the chip \u2014 one scannable question, no elaboration (that goes in \`question\`). Strongly encouraged.`,
2552
2554
  options: `SINGLE-question form: optional ${MIN_ASK_OPTIONS}\u2013${MAX_ASK_OPTIONS} suggested one-click answers, up to ${MAX_ASK_OPTION_BYTES} characters each. Each option must make sense on its own.`,
@@ -8508,7 +8510,7 @@ function createTurnControlMcpServer(acts, skipState) {
8508
8510
  ASK_TOOL,
8509
8511
  TURN_CONTROL_TOOL_DESCRIPTIONS.ask,
8510
8512
  {
8511
- targetUserId: z17.string().uuid().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.targetUserId),
8513
+ targetUserId: z17.string().regex(ASK_TARGET_PATTERN, { error: ASK_TARGET_INVALID }).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.targetUserId),
8512
8514
  question: z17.string().min(1).max(MAX_ASK_QUESTION_BYTES).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.question),
8513
8515
  headline: z17.string().min(1).max(MAX_ASK_HEADLINE_BYTES).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.headline),
8514
8516
  options: z17.array(z17.string({ error: ASK_OPTION_NOT_A_STRING }).min(1).max(MAX_ASK_OPTION_BYTES)).min(MIN_ASK_OPTIONS).max(MAX_ASK_OPTIONS).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.options),
package/dist/runtime.js CHANGED
@@ -3468,6 +3468,8 @@ var MAX_ASK_OPTION_BYTES = 200;
3468
3468
  var ASK_OPTION_NOT_A_STRING = "An ask option is a plain string label.";
3469
3469
  var MIN_ASK_OPTIONS = 2;
3470
3470
  var MAX_ASK_OPTIONS = 4;
3471
+ var ASK_TARGET_PATTERN = /^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|@?[A-Za-z0-9-]{2,32})$/;
3472
+ var ASK_TARGET_INVALID = "An ask target is a user id or an @handle.";
3471
3473
  var MAX_WAKE_NOTE_BYTES = 2e3;
3472
3474
  var MAX_WITHDRAW_REASON_BYTES = 400;
3473
3475
  var MAX_SKIP_REASON_BYTES = 500;
@@ -3479,7 +3481,7 @@ var TURN_CONTROL_TOOLS = [
3479
3481
  "withdraw_ask"
3480
3482
  ];
3481
3483
  var TURN_CONTROL_TOOL_DESCRIPTIONS = {
3482
- ask: `Ask a person a structured question you need answered to continue, then end your turn; don't wait for the reply. \`targetUserId\` is a person on your roster; to bring in an agent, name it with \`@handle\` in your reply.
3484
+ ask: `Ask a person a structured question you need answered to continue, then end your turn; don't wait for the reply. \`targetUserId\` is a person on your roster, by their \`@handle\`; to bring in an agent, name it with \`@handle\` in your reply.
3483
3485
  - Form: one question (\`headline\`, optional \`question\` body, \`options\`) or \`questions\`, 1\u2013${MAX_ASK_ITEMS} \`{ headline, body?, options? }\`; never both. Decisions that arise together go in ONE call, in the order you want them answered. A second \`ask\` is a separate item, never an edit; raise one only for a genuinely new question.
3484
3486
  - \`headline\`: one sentence ending in \`?\`. Body (\`question\` or each item's \`body\`): a sentence or two of framing, not a report; inline Markdown only, no lists or headings. \`options\`: ${MIN_ASK_OPTIONS}\u2013${MAX_ASK_OPTIONS} one-click answers (always for a yes/no go-ahead), each a distinct course of action you can carry out without asking back.
3485
3487
  - Voice, in headline, body and options: "I" for yourself, never your own name; name everyone else who decides or acts, as on your roster. Never "you", "your", "we", "us", "our" or their contractions, nor "he", "she" or "they" for a named actor. Each option reads correctly alone. A quotation stays accurate: say who said it.
@@ -3494,7 +3496,7 @@ var TURN_CONTROL_TOOL_DESCRIPTIONS = {
3494
3496
  };
3495
3497
  var TURN_CONTROL_FIELD_DESCRIPTIONS = {
3496
3498
  ask: {
3497
- targetUserId: "The workspace member (human) to ask \u2014 a user id, from your turn context's roster.",
3499
+ targetUserId: "The person to ask: their `@handle` from your turn context's roster (preferred), or their user id.",
3498
3500
  question: `SINGLE-question form: a short body \u2014 one or two sentences of framing the headline can't hold. NOT a report (up to ${MAX_ASK_QUESTION_BYTES} characters, inline markdown only). Provide EITHER this or \`questions\`, not both. Put the crisp one-sentence question in \`headline\`.`,
3499
3501
  headline: `SINGLE-question form: the question itself as ONE clear, capitalized sentence ending in \`?\` ("Should Ledger deploy once Mia approves?"), up to ${MAX_ASK_HEADLINE_BYTES} characters. What the person reads first in For you and on the chip \u2014 one scannable question, no elaboration (that goes in \`question\`). Strongly encouraged.`,
3500
3502
  options: `SINGLE-question form: optional ${MIN_ASK_OPTIONS}\u2013${MAX_ASK_OPTIONS} suggested one-click answers, up to ${MAX_ASK_OPTION_BYTES} characters each. Each option must make sense on its own.`,
@@ -9101,7 +9103,7 @@ function createTurnControlMcpServer(acts, skipState) {
9101
9103
  ASK_TOOL,
9102
9104
  TURN_CONTROL_TOOL_DESCRIPTIONS.ask,
9103
9105
  {
9104
- targetUserId: z17.string().uuid().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.targetUserId),
9106
+ targetUserId: z17.string().regex(ASK_TARGET_PATTERN, { error: ASK_TARGET_INVALID }).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.targetUserId),
9105
9107
  question: z17.string().min(1).max(MAX_ASK_QUESTION_BYTES).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.question),
9106
9108
  headline: z17.string().min(1).max(MAX_ASK_HEADLINE_BYTES).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.headline),
9107
9109
  options: z17.array(z17.string({ error: ASK_OPTION_NOT_A_STRING }).min(1).max(MAX_ASK_OPTION_BYTES)).min(MIN_ASK_OPTIONS).max(MAX_ASK_OPTIONS).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.options),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cabane/companion",
3
- "version": "0.6.173",
3
+ "version": "0.6.174",
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",