@cabane/companion 0.6.149 → 0.6.151

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
@@ -2324,7 +2324,7 @@ var init_pump = __esm({
2324
2324
  });
2325
2325
 
2326
2326
  // packages/agent-runtime/src/turn-control/descriptions.ts
2327
- var MAX_ASK_QUESTION_BYTES, MAX_ASK_HEADLINE_BYTES, MAX_ASK_ITEMS, MAX_ASK_OPTION_BYTES, TASK_STAGES, 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;
2327
+ 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;
2328
2328
  var init_descriptions = __esm({
2329
2329
  "packages/agent-runtime/src/turn-control/descriptions.ts"() {
2330
2330
  "use strict";
@@ -2332,14 +2332,7 @@ var init_descriptions = __esm({
2332
2332
  MAX_ASK_HEADLINE_BYTES = 120;
2333
2333
  MAX_ASK_ITEMS = 20;
2334
2334
  MAX_ASK_OPTION_BYTES = 200;
2335
- TASK_STAGES = [
2336
- "proposed",
2337
- "todo",
2338
- "in_progress",
2339
- "in_review",
2340
- "done",
2341
- "dropped"
2342
- ];
2335
+ ASK_OPTION_NOT_A_STRING = "An ask option is a plain string label.";
2343
2336
  MIN_ASK_OPTIONS = 2;
2344
2337
  MAX_ASK_OPTIONS = 4;
2345
2338
  MAX_WAKE_NOTE_BYTES = 2e3;
@@ -2364,19 +2357,11 @@ var init_descriptions = __esm({
2364
2357
  targetUserId: "The workspace member (human) to ask \u2014 a user id, from your turn context's roster.",
2365
2358
  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\`. Say "I" for yourself; name anyone else described, never "you", "we" or "they".`,
2366
2359
  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 human reads first in the inbox and the chip \u2014 one scannable question, no elaboration (that goes in \`question\`). Strongly encouraged. Say "I" for yourself; name anyone else described, never "you", "we" or "they".`,
2367
- 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 stand alone: "I" for yourself, anyone else responsible for its action by name \u2014 never "you", "we" or "they". An option may instead be \`{ label, move: { task, status } }\` \u2014 a MOVE of a task: clicking it is the person making that move, and the task's next stage owner is told for you. A wrapper carrying a move is ONE question about ONE task, and you are NOT woken when the move applies.`,
2360
+ 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 stand alone: "I" for yourself, anyone else responsible for its action by name \u2014 never "you", "we" or "they".`,
2368
2361
  questions: `MULTI-question form: 1\u2013${MAX_ASK_ITEMS} questions to ask at once, when a plan ends with several bounded decisions. Provide EITHER this or \`question\`/\`headline\`/\`options\`, not both.`,
2369
2362
  "questions.headline": `The one-sentence question ("Should Ledger deploy once Mia approves?") \u2014 required for each item, up to ${MAX_ASK_HEADLINE_BYTES} characters. Say "I" for yourself; name anyone else described, never "you", "we" or "they".`,
2370
2363
  "questions.body": `Optional short framing beneath the headline, up to ${MAX_ASK_QUESTION_BYTES} characters. NOT a report. Say "I" for yourself; name anyone else described, never "you", "we" or "they".`,
2371
- "options.label": `What the option SAYS. The destination stage is drawn beside it as a pill, so the label is the decision (\`Accept\`), not a restatement of the move.`,
2372
- "options.move": `Makes this option a MOVE of a task: clicking it is the person making that move, recorded as theirs. The next stage's owner is told for you, and you are not woken.`,
2373
- "options.move.task": `The task the move applies to \u2014 its reference (\`CT12\`) or its uuid. Every move in one ask names the SAME task.`,
2374
- "options.move.status": `The stage the task goes to when the person clicks this option. A move the task cannot make from where it is now is refused when you raise the ask, by name.`,
2375
- "questions.options.label": `What the option SAYS. The destination stage is drawn beside it as a pill, so the label is the decision (\`Accept\`), not a restatement of the move.`,
2376
- "questions.options.move": `See \`options.move\`. An ask carrying a move has exactly one question.`,
2377
- "questions.options.move.task": `The task the move applies to \u2014 its reference (\`CT12\`) or its uuid. Every move in one ask names the SAME task.`,
2378
- "questions.options.move.status": `The stage the task goes to when the person clicks this option. A move the task cannot make from where it is now is refused when you raise the ask, by name.`,
2379
- "questions.options": `Optional ${MIN_ASK_OPTIONS}\u2013${MAX_ASK_OPTIONS} one-click answers for this question, up to ${MAX_ASK_OPTION_BYTES} characters each. Each option must stand alone: "I" for yourself, anyone else responsible for its action by name \u2014 never "you", "we" or "they". An option may instead be \`{ label, move: { task, status } }\` \u2014 see the single-question form; an ask carrying a move has exactly one question.`,
2364
+ "questions.options": `Optional ${MIN_ASK_OPTIONS}\u2013${MAX_ASK_OPTIONS} one-click answers for this question, up to ${MAX_ASK_OPTION_BYTES} characters each. Each option must stand alone: "I" for yourself, anyone else responsible for its action by name \u2014 never "you", "we" or "they".`,
2380
2365
  replaces: "Withdraw a stale ask in this conversation as part of raising this one. Both land in a single write, so the person goes from the old question to the new one and never sees neither or both.",
2381
2366
  "replaces.askId": "The id of the open ask to withdraw.",
2382
2367
  "replaces.reason": `Why the old question is no longer the question \u2014 shown to the person on their Done row. Up to ${MAX_WITHDRAW_REASON_BYTES} characters.`
@@ -8143,33 +8128,13 @@ function createTurnControlMcpServer(acts, skipState) {
8143
8128
  targetUserId: z17.string().uuid().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.targetUserId),
8144
8129
  question: z17.string().min(1).max(MAX_ASK_QUESTION_BYTES).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.question),
8145
8130
  headline: z17.string().min(1).max(MAX_ASK_HEADLINE_BYTES).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.headline),
8146
- options: z17.array(
8147
- z17.union([
8148
- z17.string().min(1).max(MAX_ASK_OPTION_BYTES),
8149
- z17.object({
8150
- label: z17.string().min(1).max(MAX_ASK_OPTION_BYTES).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["options.label"]),
8151
- move: z17.object({
8152
- task: z17.string().min(1).max(200).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["options.move.task"]),
8153
- status: z17.enum(TASK_STAGES).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["options.move.status"])
8154
- }).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["options.move"])
8155
- })
8156
- ])
8157
- ).min(MIN_ASK_OPTIONS).max(MAX_ASK_OPTIONS).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.options),
8131
+ 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),
8158
8132
  questions: z17.array(
8159
8133
  z17.object({
8160
8134
  headline: z17.string().min(1).max(MAX_ASK_HEADLINE_BYTES).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.headline"]),
8161
8135
  body: z17.string().min(1).max(MAX_ASK_QUESTION_BYTES).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.body"]),
8162
8136
  options: z17.array(
8163
- z17.union([
8164
- z17.string().min(1).max(MAX_ASK_OPTION_BYTES),
8165
- z17.object({
8166
- label: z17.string().min(1).max(MAX_ASK_OPTION_BYTES).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.options.label"]),
8167
- move: z17.object({
8168
- task: z17.string().min(1).max(200).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.options.move.task"]),
8169
- status: z17.enum(TASK_STAGES).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.options.move.status"])
8170
- }).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.options.move"])
8171
- })
8172
- ])
8137
+ z17.string({ error: ASK_OPTION_NOT_A_STRING }).min(1).max(MAX_ASK_OPTION_BYTES)
8173
8138
  ).min(MIN_ASK_OPTIONS).max(MAX_ASK_OPTIONS).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.options"])
8174
8139
  })
8175
8140
  ).min(1).max(MAX_ASK_ITEMS).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.questions),
package/dist/runtime.js CHANGED
@@ -3766,14 +3766,7 @@ var MAX_ASK_QUESTION_BYTES = 400;
3766
3766
  var MAX_ASK_HEADLINE_BYTES = 120;
3767
3767
  var MAX_ASK_ITEMS = 20;
3768
3768
  var MAX_ASK_OPTION_BYTES = 200;
3769
- var TASK_STAGES = [
3770
- "proposed",
3771
- "todo",
3772
- "in_progress",
3773
- "in_review",
3774
- "done",
3775
- "dropped"
3776
- ];
3769
+ var ASK_OPTION_NOT_A_STRING = "An ask option is a plain string label.";
3777
3770
  var MIN_ASK_OPTIONS = 2;
3778
3771
  var MAX_ASK_OPTIONS = 4;
3779
3772
  var MAX_WAKE_NOTE_BYTES = 2e3;
@@ -3798,19 +3791,11 @@ var TURN_CONTROL_FIELD_DESCRIPTIONS = {
3798
3791
  targetUserId: "The workspace member (human) to ask \u2014 a user id, from your turn context's roster.",
3799
3792
  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\`. Say "I" for yourself; name anyone else described, never "you", "we" or "they".`,
3800
3793
  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 human reads first in the inbox and the chip \u2014 one scannable question, no elaboration (that goes in \`question\`). Strongly encouraged. Say "I" for yourself; name anyone else described, never "you", "we" or "they".`,
3801
- 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 stand alone: "I" for yourself, anyone else responsible for its action by name \u2014 never "you", "we" or "they". An option may instead be \`{ label, move: { task, status } }\` \u2014 a MOVE of a task: clicking it is the person making that move, and the task's next stage owner is told for you. A wrapper carrying a move is ONE question about ONE task, and you are NOT woken when the move applies.`,
3794
+ 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 stand alone: "I" for yourself, anyone else responsible for its action by name \u2014 never "you", "we" or "they".`,
3802
3795
  questions: `MULTI-question form: 1\u2013${MAX_ASK_ITEMS} questions to ask at once, when a plan ends with several bounded decisions. Provide EITHER this or \`question\`/\`headline\`/\`options\`, not both.`,
3803
3796
  "questions.headline": `The one-sentence question ("Should Ledger deploy once Mia approves?") \u2014 required for each item, up to ${MAX_ASK_HEADLINE_BYTES} characters. Say "I" for yourself; name anyone else described, never "you", "we" or "they".`,
3804
3797
  "questions.body": `Optional short framing beneath the headline, up to ${MAX_ASK_QUESTION_BYTES} characters. NOT a report. Say "I" for yourself; name anyone else described, never "you", "we" or "they".`,
3805
- "options.label": `What the option SAYS. The destination stage is drawn beside it as a pill, so the label is the decision (\`Accept\`), not a restatement of the move.`,
3806
- "options.move": `Makes this option a MOVE of a task: clicking it is the person making that move, recorded as theirs. The next stage's owner is told for you, and you are not woken.`,
3807
- "options.move.task": `The task the move applies to \u2014 its reference (\`CT12\`) or its uuid. Every move in one ask names the SAME task.`,
3808
- "options.move.status": `The stage the task goes to when the person clicks this option. A move the task cannot make from where it is now is refused when you raise the ask, by name.`,
3809
- "questions.options.label": `What the option SAYS. The destination stage is drawn beside it as a pill, so the label is the decision (\`Accept\`), not a restatement of the move.`,
3810
- "questions.options.move": `See \`options.move\`. An ask carrying a move has exactly one question.`,
3811
- "questions.options.move.task": `The task the move applies to \u2014 its reference (\`CT12\`) or its uuid. Every move in one ask names the SAME task.`,
3812
- "questions.options.move.status": `The stage the task goes to when the person clicks this option. A move the task cannot make from where it is now is refused when you raise the ask, by name.`,
3813
- "questions.options": `Optional ${MIN_ASK_OPTIONS}\u2013${MAX_ASK_OPTIONS} one-click answers for this question, up to ${MAX_ASK_OPTION_BYTES} characters each. Each option must stand alone: "I" for yourself, anyone else responsible for its action by name \u2014 never "you", "we" or "they". An option may instead be \`{ label, move: { task, status } }\` \u2014 see the single-question form; an ask carrying a move has exactly one question.`,
3798
+ "questions.options": `Optional ${MIN_ASK_OPTIONS}\u2013${MAX_ASK_OPTIONS} one-click answers for this question, up to ${MAX_ASK_OPTION_BYTES} characters each. Each option must stand alone: "I" for yourself, anyone else responsible for its action by name \u2014 never "you", "we" or "they".`,
3814
3799
  replaces: "Withdraw a stale ask in this conversation as part of raising this one. Both land in a single write, so the person goes from the old question to the new one and never sees neither or both.",
3815
3800
  "replaces.askId": "The id of the open ask to withdraw.",
3816
3801
  "replaces.reason": `Why the old question is no longer the question \u2014 shown to the person on their Done row. Up to ${MAX_WITHDRAW_REASON_BYTES} characters.`
@@ -9226,33 +9211,13 @@ function createTurnControlMcpServer(acts, skipState) {
9226
9211
  targetUserId: z17.string().uuid().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.targetUserId),
9227
9212
  question: z17.string().min(1).max(MAX_ASK_QUESTION_BYTES).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.question),
9228
9213
  headline: z17.string().min(1).max(MAX_ASK_HEADLINE_BYTES).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.headline),
9229
- options: z17.array(
9230
- z17.union([
9231
- z17.string().min(1).max(MAX_ASK_OPTION_BYTES),
9232
- z17.object({
9233
- label: z17.string().min(1).max(MAX_ASK_OPTION_BYTES).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["options.label"]),
9234
- move: z17.object({
9235
- task: z17.string().min(1).max(200).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["options.move.task"]),
9236
- status: z17.enum(TASK_STAGES).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["options.move.status"])
9237
- }).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["options.move"])
9238
- })
9239
- ])
9240
- ).min(MIN_ASK_OPTIONS).max(MAX_ASK_OPTIONS).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.options),
9214
+ 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),
9241
9215
  questions: z17.array(
9242
9216
  z17.object({
9243
9217
  headline: z17.string().min(1).max(MAX_ASK_HEADLINE_BYTES).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.headline"]),
9244
9218
  body: z17.string().min(1).max(MAX_ASK_QUESTION_BYTES).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.body"]),
9245
9219
  options: z17.array(
9246
- z17.union([
9247
- z17.string().min(1).max(MAX_ASK_OPTION_BYTES),
9248
- z17.object({
9249
- label: z17.string().min(1).max(MAX_ASK_OPTION_BYTES).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.options.label"]),
9250
- move: z17.object({
9251
- task: z17.string().min(1).max(200).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.options.move.task"]),
9252
- status: z17.enum(TASK_STAGES).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.options.move.status"])
9253
- }).describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.options.move"])
9254
- })
9255
- ])
9220
+ z17.string({ error: ASK_OPTION_NOT_A_STRING }).min(1).max(MAX_ASK_OPTION_BYTES)
9256
9221
  ).min(MIN_ASK_OPTIONS).max(MAX_ASK_OPTIONS).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask["questions.options"])
9257
9222
  })
9258
9223
  ).min(1).max(MAX_ASK_ITEMS).optional().describe(TURN_CONTROL_FIELD_DESCRIPTIONS.ask.questions),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cabane/companion",
3
- "version": "0.6.149",
3
+ "version": "0.6.151",
4
4
  "type": "module",
5
5
  "description": "The Cabane Companion (headless): connect a coding 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",
@@ -29,9 +29,9 @@
29
29
  "prepublishOnly": "pnpm build"
30
30
  },
31
31
  "dependencies": {
32
- "@anthropic-ai/claude-agent-sdk": "0.3.283",
32
+ "@anthropic-ai/claude-agent-sdk": "0.3.289",
33
33
  "@anthropic-ai/sandbox-runtime": "0.0.77",
34
- "@openai/codex-sdk": "0.158.0",
34
+ "@openai/codex-sdk": "0.160.0",
35
35
  "@hono/node-server": "1.19.14",
36
36
  "@inquirer/prompts": "7.10.1",
37
37
  "commander": "12.1.0",