@rallycry/conveyor-mcp 5.0.12 → 5.0.13

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
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-5KU3QS6A.js";
5
5
  import {
6
6
  ConveyorConnection
7
- } from "./chunk-UOLE5JY2.js";
7
+ } from "./chunk-CRHA7PSA.js";
8
8
 
9
9
  // src/cli.ts
10
10
  import { createRequire } from "module";
@@ -72,14 +72,14 @@ function registerProjectTools(server2, conn2) {
72
72
  // src/tools/connection.ts
73
73
  import { z as z4 } from "zod/v3";
74
74
 
75
- // ../shared/dist/chunk-3D2OVVIS.js
75
+ // ../shared/dist/chunk-BH4SLNGU.js
76
76
  import { z as z2 } from "zod";
77
77
  import { z as z22 } from "zod";
78
- var DEFAULT_SONNET_MODEL = "claude-sonnet-5";
78
+ var DEFAULT_SONNET_MODEL = "claude-sonnet-5-5";
79
79
  var DEFAULT_OPUS_MODEL = "claude-opus-5-5";
80
80
  var DEFAULT_HAIKU_MODEL = "claude-haiku-4-5-20251001";
81
81
  var FABLE_MODEL = "claude-fable-5-1";
82
- var PREVIOUS_SONNET_MODEL = "claude-sonnet-4-6";
82
+ var PREVIOUS_SONNET_MODEL = "claude-sonnet-5";
83
83
  var PREVIOUS_OPUS_MODEL = "claude-opus-5";
84
84
  function formatModelId(provider, model) {
85
85
  return `${provider}/${model}`;
@@ -322,14 +322,14 @@ var f = {
322
322
  return { kind: "nullable", inner };
323
323
  }
324
324
  };
325
- function compileString(z15, spec) {
326
- let schema = z15.string();
325
+ function compileString(z16, spec) {
326
+ let schema = z16.string();
327
327
  if (spec.min !== void 0) schema = schema.min(spec.min);
328
328
  if (spec.max !== void 0) schema = schema.max(spec.max);
329
329
  return schema;
330
330
  }
331
- function compileNumber(z15, spec) {
332
- let schema = z15.number();
331
+ function compileNumber(z16, spec) {
332
+ let schema = z16.number();
333
333
  if (spec.int) schema = schema.int();
334
334
  if (spec.positive) schema = schema.positive();
335
335
  if (spec.nonnegative) schema = schema.nonnegative();
@@ -337,50 +337,50 @@ function compileNumber(z15, spec) {
337
337
  if (spec.max !== void 0) schema = schema.max(spec.max);
338
338
  return schema;
339
339
  }
340
- function compileArray(z15, spec) {
341
- let schema = z15.array(compileField(z15, spec.item));
340
+ function compileArray(z16, spec) {
341
+ let schema = z16.array(compileField(z16, spec.item));
342
342
  if (spec.min !== void 0) schema = schema.min(spec.min);
343
343
  if (spec.max !== void 0) schema = schema.max(spec.max);
344
344
  return schema;
345
345
  }
346
- function compileBase(z15, spec) {
346
+ function compileBase(z16, spec) {
347
347
  switch (spec.kind) {
348
348
  case "string":
349
- return compileString(z15, spec);
349
+ return compileString(z16, spec);
350
350
  case "number":
351
- return compileNumber(z15, spec);
351
+ return compileNumber(z16, spec);
352
352
  case "boolean":
353
- return z15.boolean();
353
+ return z16.boolean();
354
354
  case "enum":
355
- return z15.enum([...spec.values]);
355
+ return z16.enum([...spec.values]);
356
356
  case "array":
357
- return compileArray(z15, spec);
357
+ return compileArray(z16, spec);
358
358
  case "object":
359
- return z15.object(compileShape(z15, spec.fields));
359
+ return z16.object(compileShape(z16, spec.fields));
360
360
  }
361
361
  }
362
362
  function descriptionOf(spec) {
363
363
  if (spec.kind === "optional" || spec.kind === "nullable") return descriptionOf(spec.inner);
364
364
  return spec.desc;
365
365
  }
366
- function compileUndescribed(z15, spec) {
366
+ function compileUndescribed(z16, spec) {
367
367
  if (spec.kind === "optional") {
368
- return compileUndescribed(z15, spec.inner).optional();
368
+ return compileUndescribed(z16, spec.inner).optional();
369
369
  }
370
370
  if (spec.kind === "nullable") {
371
- return compileUndescribed(z15, spec.inner).nullable();
371
+ return compileUndescribed(z16, spec.inner).nullable();
372
372
  }
373
- return compileBase(z15, spec);
373
+ return compileBase(z16, spec);
374
374
  }
375
- function compileField(z15, spec) {
376
- const schema = compileUndescribed(z15, spec);
375
+ function compileField(z16, spec) {
376
+ const schema = compileUndescribed(z16, spec);
377
377
  const desc = descriptionOf(spec);
378
378
  return desc === void 0 ? schema : schema.describe(desc);
379
379
  }
380
- function compileShape(z15, fields) {
380
+ function compileShape(z16, fields) {
381
381
  const shape = {};
382
382
  for (const [key, spec] of Object.entries(fields)) {
383
- shape[key] = compileField(z15, spec);
383
+ shape[key] = compileField(z16, spec);
384
384
  }
385
385
  return shape;
386
386
  }
@@ -390,6 +390,7 @@ function defineToolContract(contract) {
390
390
  var mcpProjectId = f.optional(f.string({ desc: "Target Conveyor project ID" }));
391
391
  var cardDescriptionDesc = (lead) => `${lead} \u2014 ${CARD_DESCRIPTION_FIELD_HINT}`;
392
392
  var storyPointValueDesc = "Story point value (1=Common, 2=Magic, 3=Rare, 5=Unique)";
393
+ var priorityValueDesc = "Priority value from manage_priorities list (1 = the project's highest level; seeded defaults are 1=High, 2=Medium, 3=Low)";
393
394
  var getTaskContract = defineToolContract({
394
395
  name: "get_task",
395
396
  agent: {
@@ -623,7 +624,7 @@ var updateTaskContract = defineToolContract({
623
624
  }
624
625
  },
625
626
  mcp: {
626
- description: "Update task fields: title, description, plan, status, risk, story points, assignment, githubBranch, onHold, or tags. Set status to claim a card (InProgress), triage it (Open), or cancel it (Cancelled); for review approvals prefer approve_task / request_changes, which guard against stale-state races. Set onHold to park a card (true) or bring it back to the active board (false) without cancelling it. Tags are additive/subtractive \u2014 pass addTags/removeTags with tag names (not a replace-set). Pass projectId to target a specific project; otherwise the configured default project is used. Moving a task beyond Planning auto-fills any missing icon, story points, and agent assignment \u2014 don't spend turns on them; pass storyPointValue only to correct the sizing yourself. For subtasks use update_subtask.",
627
+ description: "Update task fields: title, description, plan, status, risk, story points, priority, assignment, githubBranch, onHold, or tags. Set status to claim a card (InProgress), triage it (Open), or cancel it (Cancelled); for review approvals prefer approve_task / request_changes, which guard against stale-state races. Set onHold to park a card (true) or bring it back to the active board (false) without cancelling it. Tags are additive/subtractive \u2014 pass addTags/removeTags with tag names (not a replace-set). Pass projectId to target a specific project; otherwise the configured default project is used. Moving a task beyond Planning auto-fills any missing icon, story points, and agent assignment \u2014 don't spend turns on them; pass storyPointValue only to correct the sizing yourself. For subtasks use update_subtask.",
627
628
  fields: {
628
629
  projectId: mcpProjectId,
629
630
  taskId: f.string({ desc: "The task ID" }),
@@ -645,6 +646,13 @@ var updateTaskContract = defineToolContract({
645
646
  })
646
647
  )
647
648
  ),
649
+ priorityValue: f.optional(
650
+ f.nullable(
651
+ f.number({
652
+ desc: `${priorityValueDesc}. The levels are per-project \u2014 a value the project has not configured is rejected. Pass null to clear it.`
653
+ })
654
+ )
655
+ ),
648
656
  assignedUserId: f.optional(f.nullable(f.string({ desc: "User ID to assign, or null" }))),
649
657
  subProjectId: f.optional(
650
658
  f.nullable(
@@ -1106,13 +1114,13 @@ var agentTaskIdOrSlug = f.optional(
1106
1114
  var listTaskFilesContract = defineToolContract({
1107
1115
  name: "list_task_files",
1108
1116
  agent: {
1109
- description: "List all files attached to this task with metadata. Use before fetching a specific file to see what is available and how large each is. For file contents use get_attachment. Pass task_id to list another card's files in this project, for example the pack parent's source documents.",
1117
+ description: "List all files attached to this task with metadata. Showcase files (the card's deliverables, `showcase: true` on each row) list first; a row with `supersedesFileId` is a newer version of that file. Use before fetching a specific file to see what is available and how large each is. For file contents use get_attachment. Pass task_id to list another card's files in this project, for example the pack parent's source documents.",
1110
1118
  fields: {
1111
1119
  task_id: agentTaskIdOrSlug
1112
1120
  }
1113
1121
  },
1114
1122
  mcp: {
1115
- description: "List all files attached to a task with metadata (no contents \u2014 fast and small). Pass projectId to target a specific project; otherwise the configured default project is used. Use before fetching a specific file to see what is available and how large each is. For file contents use get_attachment.",
1123
+ description: "List all files attached to a task with metadata (no contents \u2014 fast and small). Showcase files (the card's deliverables, `showcase: true` on each row) list first; a row with `supersedesFileId` is a newer version of that file. Pass projectId to target a specific project; otherwise the configured default project is used. Use before fetching a specific file to see what is available and how large each is. For file contents use get_attachment.",
1116
1124
  fields: {
1117
1125
  projectId: mcpProjectId,
1118
1126
  taskId: mcpTaskIdOrSlug
@@ -1156,10 +1164,20 @@ var attachmentTags = f.optional(
1156
1164
  desc: `Glossary tag names this file is a relevant example of. MUST be a JSON array of quoted strings, e.g. ["ops-hub", "platform-support"] \u2014 bare unquoted words are invalid JSON and fail the whole call before it is parsed (21 fleet calls in one week died this way). Use it when the file shows a tagged entity in a particular state: the tag's page lists its recent tagged attachments, so a reader can see what the entity looks like across the app and spot visual changes over time. Names are matched case-insensitively within the project; a name that matches no tag is reported back and never fails the upload. Max 5.`
1157
1165
  })
1158
1166
  );
1167
+ var attachmentShowcase = f.optional(
1168
+ f.boolean({
1169
+ desc: "Mark this file as a showcase: the finished result of the card. Showcase files render first with a thumbnail on the card, are what a tag gallery shows, always post to chat, get a long-lived link, are kept past the 90-day purge, and are appended to the PR body under '## Showcase'. Use it for the final capture, not for scoping or before shots."
1170
+ })
1171
+ );
1172
+ var attachmentSupersedes = f.optional(
1173
+ f.string({
1174
+ desc: "File id (from list_task_files) of an older file on this card that this upload replaces, e.g. the previous cut of a video. The old file loses showcase and collapses under the new one as history; the new one inherits its showcase flag and tag labels. Naming a file that already has a newer version replaces the newest one. A bad id never fails the upload \u2014 the reason comes back instead."
1175
+ })
1176
+ );
1159
1177
  var uploadAttachmentContract = defineToolContract({
1160
1178
  name: "upload_attachment",
1161
1179
  agent: {
1162
- description: "Upload a file (doc, notes, data, diagram, screenshot \u2014 any file type, up to 25MB) as a task attachment AND post it to the task chat in one step \u2014 no follow-up post_to_chat call needed. This is how you deliver a file the user should keep: it attaches to the card. Never publish deliverables as an external Claude artifact. Pass `tags` when the file is a good example of a glossary tag in some state.",
1180
+ description: "Upload a file (doc, notes, data, diagram, screenshot \u2014 any file type, up to 25MB) as a task attachment AND post it to the task chat in one step \u2014 no follow-up post_to_chat call needed. This is how you deliver a file the user should keep: it attaches to the card. Never publish deliverables as an external Claude artifact. Pass `showcase: true` for the capture that shows the finished result, `supersedes` with the old file's id when this is a newer version of a file already on the card, and `tags` when the file is a good example of a glossary tag in some state.",
1163
1181
  fields: {
1164
1182
  path: f.string({
1165
1183
  desc: "Path to the file \u2014 absolute, or relative to the workspace root"
@@ -1172,11 +1190,13 @@ var uploadAttachmentContract = defineToolContract({
1172
1190
  desc: "Alias of `title` (the external conveyor-mcp surface names this field `comment`). Provide at most one of the two."
1173
1191
  })
1174
1192
  ),
1175
- tags: attachmentTags
1193
+ tags: attachmentTags,
1194
+ showcase: attachmentShowcase,
1195
+ supersedes: attachmentSupersedes
1176
1196
  }
1177
1197
  },
1178
1198
  mcp: {
1179
- description: "Upload a local file as a task attachment (any file type, up to 25MB). Pass projectId to target a specific project; otherwise the configured default project is used. The file appears under the task's Files. Pass `comment` to also post it to the task chat in the same step, and `tags` when the file is a good example of a glossary tag in some state.",
1199
+ description: "Upload a local file as a task attachment (any file type, up to 25MB). Pass projectId to target a specific project; otherwise the configured default project is used. The file appears under the task's Files. Pass `comment` to also post it to the task chat in the same step, `showcase: true` for the capture that shows the finished result (a showcase file always posts to chat), `supersedes` with the old file's id when this is a newer version of a file already on the card, and `tags` when the file is a good example of a glossary tag in some state.",
1180
1200
  fields: {
1181
1201
  projectId: mcpProjectId,
1182
1202
  taskId: mcpTaskIdOrSlug,
@@ -1190,6 +1210,8 @@ var uploadAttachmentContract = defineToolContract({
1190
1210
  })
1191
1211
  ),
1192
1212
  tags: attachmentTags,
1213
+ showcase: attachmentShowcase,
1214
+ supersedes: attachmentSupersedes,
1193
1215
  mimeType: f.optional(
1194
1216
  f.string({ desc: "Override the mime type inferred from the file extension" })
1195
1217
  )
@@ -1214,11 +1236,35 @@ var deleteAttachmentContract = defineToolContract({
1214
1236
  }
1215
1237
  }
1216
1238
  });
1239
+ var SET_SHOWCASE_BEHAVIOR = "Mark an already-uploaded attachment as the card's showcase (`showcase: true`) or clear the flag (`showcase: false`) \u2014 the same flag upload_attachment sets at upload time, so promote an earlier capture here instead of uploading it again. A flip to showcase posts the file to the task chat once; a file that a chat message already carries is not posted again. `fileId` comes from list_task_files.";
1240
+ var showcaseFlag = f.boolean({
1241
+ desc: "true marks the file as the card's showcase; false clears the flag."
1242
+ });
1243
+ var setShowcaseContract = defineToolContract({
1244
+ name: "set_showcase",
1245
+ agent: {
1246
+ description: `${SET_SHOWCASE_BEHAVIOR} A pod can only change files on its own card.`,
1247
+ fields: {
1248
+ fileId: f.string({ desc: "The file ID to change" }),
1249
+ showcase: showcaseFlag
1250
+ }
1251
+ },
1252
+ mcp: {
1253
+ description: `${SET_SHOWCASE_BEHAVIOR} Requires Moderate on the project, the same bar as the star on the card's Files list. Pass projectId to target a specific project; otherwise the configured default project is used.`,
1254
+ fields: {
1255
+ projectId: mcpProjectId,
1256
+ taskId: f.string({ desc: "The task ID or slug the file is attached to" }),
1257
+ fileId: f.string({ desc: "The file ID to change" }),
1258
+ showcase: showcaseFlag
1259
+ }
1260
+ }
1261
+ });
1217
1262
  var attachmentsContracts = [
1218
1263
  listTaskFilesContract,
1219
1264
  getAttachmentContract,
1220
1265
  uploadAttachmentContract,
1221
- deleteAttachmentContract
1266
+ deleteAttachmentContract,
1267
+ setShowcaseContract
1222
1268
  ];
1223
1269
  var createSuggestionContract = defineToolContract({
1224
1270
  name: "create_suggestion",
@@ -1541,7 +1587,7 @@ var createPullRequestContract = defineToolContract({
1541
1587
  fields: {
1542
1588
  title: f.string({ desc: "The PR title" }),
1543
1589
  body: f.string({
1544
- desc: "The PR description/body in markdown. If the diff changes anything a user sees rendered, the body MUST show the visual proof inline, not just point at the card: upload the capture with upload_attachment, then embed the downloadUrl it returns under a '## Screenshots' heading (![caption](url) for images, [caption](url) for video). Only image and video URLs belong in a PR body: a document downloadUrl (csv, pdf, md, \u2026) needs a signed-in project member and shows 404 to a reviewer on GitHub, so point at the card instead. Attach to the card as well \u2014 the card is the durable home, the PR body is what the reviewer reads."
1590
+ desc: "The PR description/body in markdown. If the diff changes anything a user sees rendered, the body MUST show the visual proof inline, not just point at the card: upload the capture with upload_attachment, then embed the downloadUrl it returns under a '## Screenshots' heading (![caption](url) for images, [caption](url) for video). Only image and video URLs belong in a PR body: a document downloadUrl (csv, pdf, md, \u2026) needs a signed-in project member and shows 404 to a reviewer on GitHub, so point at the card instead. Attach to the card as well \u2014 the card is the durable home, the PR body is what the reviewer reads. Showcase attachments (uploaded with `showcase: true`) are appended under '## Showcase' automatically when Conveyor creates the PR; mention them inline yourself only if you want them next to specific text."
1545
1591
  }),
1546
1592
  branch: f.optional(
1547
1593
  f.string({
@@ -1572,7 +1618,7 @@ var createPullRequestContract = defineToolContract({
1572
1618
  taskId: f.string({ desc: "The task ID whose branch should be opened as a PR" }),
1573
1619
  title: f.string({ desc: "Pull request title" }),
1574
1620
  body: f.string({
1575
- desc: "Pull request body (markdown). For a diff that changes rendered UI, embed the visual proof inline: upload the capture with upload_attachment and paste the downloadUrl it returns as ![caption](url), in addition to leaving it on the card."
1621
+ desc: "Pull request body (markdown). For a diff that changes rendered UI, embed the visual proof inline: upload the capture with upload_attachment and paste the downloadUrl it returns as ![caption](url), in addition to leaving it on the card. Showcase attachments (uploaded with `showcase: true`) are appended under '## Showcase' automatically when Conveyor creates the PR; mention them inline yourself only if you want them next to specific text."
1576
1622
  }),
1577
1623
  head: f.optional(
1578
1624
  f.string({ desc: "Source branch for the PR (defaults to the task's branch)" })
@@ -2851,6 +2897,9 @@ function registerCreateTask(server2, conn2) {
2851
2897
  plan: z6.string().optional().describe("Task implementation plan (markdown)"),
2852
2898
  status: z6.enum(["Planning", "Open"]).optional().describe("Initial status (default: Planning)"),
2853
2899
  subProjectId: BOARD_ASSIGN,
2900
+ priorityValue: z6.number().int().positive().optional().describe(
2901
+ `${priorityValueDesc}. A value the project has not configured is rejected before the card is created.`
2902
+ ),
2854
2903
  tags: z6.array(z6.string()).optional().describe(
2855
2904
  'Tag names to assign to the new card (e.g. ["refactor"]). Unknown names are rejected before the card is created, so nothing is written and a corrected retry creates exactly one card. Create the tag first with manage_tags. Use list_tags to see available tags.'
2856
2905
  )
@@ -2876,6 +2925,9 @@ function registerUpdateTask(server2, conn2) {
2876
2925
  if (params.storyPointValue !== void 0) {
2877
2926
  parts.push(`story points: ${result.storyPointValue ?? "cleared"}`);
2878
2927
  }
2928
+ if (params.priorityValue !== void 0) {
2929
+ parts.push(`priority: ${result.priorityValue ?? "cleared"}`);
2930
+ }
2879
2931
  if ((result.addedTags ?? []).length > 0) parts.push(`+tags: ${result.addedTags.join(", ")}`);
2880
2932
  if ((result.removedTags ?? []).length > 0)
2881
2933
  parts.push(`-tags: ${result.removedTags.join(", ")}`);
@@ -3235,6 +3287,8 @@ var MIME_BY_EXT = {
3235
3287
  ".gz": "application/gzip",
3236
3288
  ".mp4": "video/mp4",
3237
3289
  ".webm": "video/webm",
3290
+ ".mov": "video/quicktime",
3291
+ ".m4v": "video/x-m4v",
3238
3292
  ".mp3": "audio/mpeg",
3239
3293
  ".wav": "audio/wav"
3240
3294
  };
@@ -3328,21 +3382,23 @@ function registerUploadAttachment(server2, conn2) {
3328
3382
  };
3329
3383
  }
3330
3384
  const comment = params.comment ?? params.title;
3331
- const result = await conn2.confirmFileUpload(
3332
- params.taskId,
3385
+ const result = await conn2.confirmFileUpload({
3386
+ taskId: params.taskId,
3333
3387
  fileId,
3334
3388
  comment,
3335
- params.projectId,
3336
- params.tags
3337
- );
3389
+ projectId: params.projectId,
3390
+ tags: params.tags,
3391
+ showcase: params.showcase,
3392
+ supersedes: params.supersedes
3393
+ });
3338
3394
  const lines = [
3339
- `Uploaded ${result.fileName} (${info.size} bytes, ${mimeType}). File ID: ${result.fileId}`
3395
+ `${result.showcase ? "Showcase attachment. " : ""}Uploaded ${result.fileName} (${info.size} bytes, ${mimeType}). File ID: ${result.fileId}`
3340
3396
  ];
3341
3397
  if (result.downloadUrl) lines.push(`downloadUrl: ${result.downloadUrl}`);
3342
3398
  if (result.messageId) lines.push("Posted to the task chat.");
3343
3399
  else if (comment === void 0) {
3344
3400
  lines.push(
3345
- "Not posted to the task chat \u2014 pass `comment` (or `title`) to show it in the card thread."
3401
+ "Not posted to the task chat \u2014 pass `comment` (or `title`) to show it in the card thread, or `showcase: true` for the finished result."
3346
3402
  );
3347
3403
  }
3348
3404
  if (result.appliedTags?.length) lines.push(`Tagged: ${result.appliedTags.join(", ")}.`);
@@ -3351,9 +3407,18 @@ function registerUploadAttachment(server2, conn2) {
3351
3407
  `No tag matched: ${result.unknownTags.join(", ")} \u2014 check the project's tag names.`
3352
3408
  );
3353
3409
  }
3410
+ const supersedeLine = describeSupersede(result);
3411
+ if (supersedeLine) lines.push(supersedeLine);
3354
3412
  return { content: [{ type: "text", text: lines.join("\n") }] };
3355
3413
  });
3356
3414
  }
3415
+ function describeSupersede(result) {
3416
+ if (result.superseded) {
3417
+ return `Replaces ${result.superseded.fileName} (${result.superseded.fileId}), which now collapses under it as history.`;
3418
+ }
3419
+ if (result.supersedeError) return `Did not replace the older file: ${result.supersedeError}.`;
3420
+ return null;
3421
+ }
3357
3422
  function registerSetFileTags(server2, conn2) {
3358
3423
  server2.tool(
3359
3424
  "set_file_tags",
@@ -3393,12 +3458,23 @@ function registerDeleteAttachment(server2, conn2) {
3393
3458
  };
3394
3459
  });
3395
3460
  }
3461
+ function registerSetShowcase(server2, conn2) {
3462
+ registerContractTool(server2, setShowcaseContract, async (params) => {
3463
+ const result = await conn2.setShowcase(params);
3464
+ const lines = result.showcase ? [
3465
+ `${result.fileName} (${result.id}) is now a showcase file. It is in the task chat and appended to the PR body under '## Showcase'.`
3466
+ ] : [`${result.fileName} (${result.id}) is no longer a showcase file.`];
3467
+ if (result.showcase && result.downloadUrl) lines.push(`downloadUrl: ${result.downloadUrl}`);
3468
+ return { content: [{ type: "text", text: lines.join("\n") }] };
3469
+ });
3470
+ }
3396
3471
  function registerAttachmentTools(server2, conn2) {
3397
3472
  registerListTaskFiles(server2, conn2);
3398
3473
  registerGetAttachment(server2, conn2);
3399
3474
  registerUploadAttachment(server2, conn2);
3400
3475
  registerDeleteAttachment(server2, conn2);
3401
3476
  registerSetFileTags(server2, conn2);
3477
+ registerSetShowcase(server2, conn2);
3402
3478
  }
3403
3479
 
3404
3480
  // src/tools/pull-request.ts
@@ -3527,6 +3603,7 @@ import { z as z10 } from "zod";
3527
3603
  import { z as z11 } from "zod";
3528
3604
  import { z as z12 } from "zod";
3529
3605
  import { z as z13 } from "zod";
3606
+ import { z as z14 } from "zod";
3530
3607
  var ACHIEVEMENT_RARITIES = [
3531
3608
  {
3532
3609
  key: "common",
@@ -3930,6 +4007,11 @@ var DeleteTaskFileRequestSchema = z42.object({
3930
4007
  sessionId: z42.string(),
3931
4008
  fileId: z42.string()
3932
4009
  });
4010
+ var SetTaskFileShowcaseRequestSchema = z42.object({
4011
+ sessionId: z42.string(),
4012
+ fileId: z42.string(),
4013
+ showcase: z42.boolean()
4014
+ });
3933
4015
  var GetTaskRequestSchema = z42.object({
3934
4016
  sessionId: z42.string(),
3935
4017
  taskSlugOrId: z42.string()
@@ -3978,7 +4060,11 @@ var ConfirmFileUploadRequestSchema = z42.object({
3978
4060
  fileId: z42.string(),
3979
4061
  title: z42.string().max(500).optional(),
3980
4062
  /** Glossary tag names (or ids) this file is an example of. */
3981
- tags: z42.array(z42.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS2).optional()
4063
+ tags: z42.array(z42.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS2).optional(),
4064
+ /** Mark the file as the card's showcase (the deliverable). */
4065
+ showcase: z42.boolean().optional(),
4066
+ /** Id of an older file on the same card this upload replaces. */
4067
+ supersedes: z42.string().min(1).max(64).optional()
3982
4068
  });
3983
4069
  var UpdateTaskStatusRequestSchema = z42.object({
3984
4070
  sessionId: z42.string(),
@@ -4513,6 +4599,9 @@ var CreateProjectTaskRequestSchema = z62.object({
4513
4599
  status: z62.string().optional(),
4514
4600
  // Assign to a sub-project board. Validated to belong to `projectId` in the handler.
4515
4601
  subProjectId: z62.string().nullable().optional(),
4602
+ // Priority value. Resolved to the project's configured Priority row in the
4603
+ // handler, which rejects an unconfigured value before the card is written.
4604
+ priorityValue: z62.number().int().positive().optional(),
4516
4605
  requestingUserId: z62.string().optional()
4517
4606
  });
4518
4607
  var SetProjectTaskParentRequestSchema = z62.object({
@@ -4542,6 +4631,9 @@ var UpdateProjectTaskRequestSchema = z62.object({
4542
4631
  // Story-point value, or null to clear. Resolved to the project's configured
4543
4632
  // StoryPoint row in the handler, which rejects an unconfigured value.
4544
4633
  storyPointValue: z62.number().int().positive().nullable().optional(),
4634
+ // Priority value, or null to clear. Resolved to the project's configured
4635
+ // Priority row in the handler, which rejects an unconfigured value.
4636
+ priorityValue: z62.number().int().positive().nullable().optional(),
4545
4637
  assignedUserId: z62.string().nullish(),
4546
4638
  // Move to a different sub-project board, or null to move to the parent board.
4547
4639
  // Validated to belong to `projectId` in the handler.
@@ -4558,9 +4650,9 @@ var UpdateProjectTaskRequestSchema = z62.object({
4558
4650
  onHold: z62.boolean().optional(),
4559
4651
  requestingUserId: z62.string().optional()
4560
4652
  }).strict().refine(
4561
- (v) => v.title !== void 0 || v.description !== void 0 || v.plan !== void 0 || v.status !== void 0 || v.risk !== void 0 || v.storyPointValue !== void 0 || v.assignedUserId !== void 0 || v.subProjectId !== void 0 || v.githubBranch !== void 0 || v.onHold !== void 0,
4653
+ (v) => v.title !== void 0 || v.description !== void 0 || v.plan !== void 0 || v.status !== void 0 || v.risk !== void 0 || v.storyPointValue !== void 0 || v.priorityValue !== void 0 || v.assignedUserId !== void 0 || v.subProjectId !== void 0 || v.githubBranch !== void 0 || v.onHold !== void 0,
4562
4654
  {
4563
- message: "update_task requires at least one field to change (title, description, plan, status, risk, storyPointValue, assignedUserId, subProjectId, githubBranch, or onHold)"
4655
+ message: "update_task requires at least one field to change (title, description, plan, status, risk, storyPointValue, priorityValue, assignedUserId, subProjectId, githubBranch, or onHold)"
4564
4656
  }
4565
4657
  );
4566
4658
  var TransitionProjectTaskStatusRequestSchema = z62.object({
@@ -4808,43 +4900,6 @@ var GetProjectTaskDependenciesRequestSchema = z62.object({
4808
4900
  projectId: z62.string(),
4809
4901
  taskId: z62.string()
4810
4902
  });
4811
- var ListProjectTaskFilesRequestSchema = z62.object({
4812
- projectId: z62.string(),
4813
- taskId: z62.string()
4814
- });
4815
- var GetProjectAttachmentRequestSchema = z62.object({
4816
- projectId: z62.string(),
4817
- taskId: z62.string(),
4818
- fileId: z62.string(),
4819
- /** Byte offset into text content (paging large logs/JSON). Default 0. */
4820
- offset: z62.number().int().nonnegative().optional(),
4821
- /** Max bytes of text content to return from `offset`. Server default applies. */
4822
- maxBytes: z62.number().int().positive().optional()
4823
- });
4824
- var DeleteProjectTaskFileRequestSchema = z62.object({
4825
- projectId: z62.string(),
4826
- taskId: z62.string(),
4827
- fileId: z62.string(),
4828
- requestingUserId: z62.string().optional()
4829
- });
4830
- var RequestProjectFileUploadRequestSchema = z62.object({
4831
- projectId: z62.string(),
4832
- taskId: z62.string(),
4833
- fileName: z62.string().min(1).max(255),
4834
- mimeType: z62.string().min(1).max(128),
4835
- fileSize: z62.number().int().positive().max(MAX_FILE_SIZE_BYTES2),
4836
- requestingUserId: z62.string().optional()
4837
- });
4838
- var ConfirmProjectFileUploadRequestSchema = z62.object({
4839
- projectId: z62.string(),
4840
- taskId: z62.string(),
4841
- fileId: z62.string(),
4842
- /** When set, the attachment is also posted to the task chat with this text. */
4843
- comment: z62.string().max(2e3).optional(),
4844
- /** Glossary tag names (or ids) this file is an example of. */
4845
- tags: z62.array(z62.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS2).optional(),
4846
- requestingUserId: z62.string().optional()
4847
- });
4848
4903
  var CreateProjectPullRequestRequestSchema = z62.object({
4849
4904
  projectId: z62.string(),
4850
4905
  taskId: z62.string(),
@@ -4951,143 +5006,191 @@ var GetProjectAnalyticsSummaryRequestSchema = z72.object({
4951
5006
  rangeDays: z72.number().int().min(1).max(GET_ANALYTICS_SUMMARY_MAX_RANGE_DAYS).optional(),
4952
5007
  campaign: z72.string().max(200).optional()
4953
5008
  });
4954
- var RequestWorkspaceRecycleRequestSchema = z82.object({
4955
- sessionId: z82.string(),
4956
- reason: z82.string().max(2e3)
5009
+ var ListProjectTaskFilesRequestSchema = z82.object({
5010
+ projectId: z82.string(),
5011
+ taskId: z82.string()
4957
5012
  });
4958
- var ReportApiOutageRequestSchema = z82.object({
4959
- sessionId: z82.string(),
4960
- detail: z82.string().max(2e3),
4961
- attempts: z82.number().int().min(0).max(100)
5013
+ var GetProjectAttachmentRequestSchema = z82.object({
5014
+ projectId: z82.string(),
5015
+ taskId: z82.string(),
5016
+ fileId: z82.string(),
5017
+ /** Byte offset into text content (paging large logs/JSON). Default 0. */
5018
+ offset: z82.number().int().nonnegative().optional(),
5019
+ /** Max bytes of text content to return from `offset`. Server default applies. */
5020
+ maxBytes: z82.number().int().positive().optional()
5021
+ });
5022
+ var DeleteProjectTaskFileRequestSchema = z82.object({
5023
+ projectId: z82.string(),
5024
+ taskId: z82.string(),
5025
+ fileId: z82.string(),
5026
+ requestingUserId: z82.string().optional()
5027
+ });
5028
+ var SetProjectTaskFileShowcaseRequestSchema = z82.object({
5029
+ projectId: z82.string(),
5030
+ taskId: z82.string(),
5031
+ fileId: z82.string(),
5032
+ showcase: z82.boolean(),
5033
+ requestingUserId: z82.string().optional()
5034
+ });
5035
+ var RequestProjectFileUploadRequestSchema = z82.object({
5036
+ projectId: z82.string(),
5037
+ taskId: z82.string(),
5038
+ fileName: z82.string().min(1).max(255),
5039
+ mimeType: z82.string().min(1).max(128),
5040
+ fileSize: z82.number().int().positive().max(MAX_FILE_SIZE_BYTES2),
5041
+ requestingUserId: z82.string().optional()
5042
+ });
5043
+ var ConfirmProjectFileUploadRequestSchema = z82.object({
5044
+ projectId: z82.string(),
5045
+ taskId: z82.string(),
5046
+ fileId: z82.string(),
5047
+ /** When set, the attachment is also posted to the task chat with this text. */
5048
+ comment: z82.string().max(2e3).optional(),
5049
+ /** Glossary tag names (or ids) this file is an example of. */
5050
+ tags: z82.array(z82.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS2).optional(),
5051
+ /** The card's showcase (its deliverable); always posts to chat, even with no `comment`. */
5052
+ showcase: z82.boolean().optional(),
5053
+ /** Id of an older file on the same card this upload replaces. */
5054
+ supersedes: z82.string().min(1).max(64).optional(),
5055
+ requestingUserId: z82.string().optional()
5056
+ });
5057
+ var RequestWorkspaceRecycleRequestSchema = z92.object({
5058
+ sessionId: z92.string(),
5059
+ reason: z92.string().max(2e3)
5060
+ });
5061
+ var ReportApiOutageRequestSchema = z92.object({
5062
+ sessionId: z92.string(),
5063
+ detail: z92.string().max(2e3),
5064
+ attempts: z92.number().int().min(0).max(100)
4962
5065
  });
4963
5066
  var CONTEXT_LINK_LOCATOR_MAX2 = 300;
4964
5067
  var TAG_DESCRIPTION_MAX = CARD_DESCRIPTION_MAX;
4965
5068
  var TAG_OVERVIEW_MAX = 32e3;
4966
5069
  var TAG_REASON_MAX = 500;
4967
- var ProjectTagContextPathSchema = z92.object({
4968
- type: z92.enum(["rule", "doc", "file", "folder"]),
4969
- path: z92.string().min(1).max(500),
4970
- label: z92.string().max(100).optional(),
5070
+ var ProjectTagContextPathSchema = z10.object({
5071
+ type: z10.enum(["rule", "doc", "file", "folder"]),
5072
+ path: z10.string().min(1).max(500),
5073
+ label: z10.string().max(100).optional(),
4971
5074
  /** Verified-link tether — text that must keep existing in the file. */
4972
- locator: z92.string().min(1).max(CONTEXT_LINK_LOCATOR_MAX2).regex(/^[^\r\n]*$/, "Locator cannot contain line breaks").optional(),
5075
+ locator: z10.string().min(1).max(CONTEXT_LINK_LOCATOR_MAX2).regex(/^[^\r\n]*$/, "Locator cannot contain line breaks").optional(),
4973
5076
  /** test = must appear in a real test/describe title; code = any substring. */
4974
- locatorType: z92.enum(["test", "code"]).optional()
5077
+ locatorType: z10.enum(["test", "code"]).optional()
4975
5078
  }).refine((link) => link.locator === void 0 === (link.locatorType === void 0), {
4976
5079
  message: "locator and locatorType must be provided together"
4977
5080
  }).refine((link) => link.locator === void 0 || link.type !== "folder", {
4978
5081
  message: "folder links cannot carry a locator"
4979
5082
  });
4980
- var hexColor = z92.string().regex(/^#[0-9a-fA-F]{6}$/, "Expected #RRGGBB hex color");
4981
- var overviewPathSchema = z92.string().min(1).max(500).regex(/^[^\r\n]*$/, "Overview path cannot contain line breaks");
4982
- var CreateProjectTagRequestSchema = z92.object({
4983
- projectId: z92.string(),
4984
- name: z92.string().min(1).max(50),
5083
+ var hexColor = z10.string().regex(/^#[0-9a-fA-F]{6}$/, "Expected #RRGGBB hex color");
5084
+ var overviewPathSchema = z10.string().min(1).max(500).regex(/^[^\r\n]*$/, "Overview path cannot contain line breaks");
5085
+ var CreateProjectTagRequestSchema = z10.object({
5086
+ projectId: z10.string(),
5087
+ name: z10.string().min(1).max(50),
4985
5088
  color: hexColor.optional(),
4986
- description: z92.string().max(TAG_DESCRIPTION_MAX).optional(),
4987
- overview: z92.string().max(TAG_OVERVIEW_MAX).optional(),
5089
+ description: z10.string().max(TAG_DESCRIPTION_MAX).optional(),
5090
+ overview: z10.string().max(TAG_OVERVIEW_MAX).optional(),
4988
5091
  /** Source the overview from this repo file (stored overview stays as the pending fallback). */
4989
5092
  overviewPath: overviewPathSchema.optional(),
4990
- contextPaths: z92.array(ProjectTagContextPathSchema).max(20).optional(),
5093
+ contextPaths: z10.array(ProjectTagContextPathSchema).max(20).optional(),
4991
5094
  /** Parents to link at create time (multi-parent DAG). */
4992
- parentTagIds: z92.array(z92.string()).max(25).optional(),
4993
- requestingUserId: z92.string().optional()
5095
+ parentTagIds: z10.array(z10.string()).max(25).optional(),
5096
+ requestingUserId: z10.string().optional()
4994
5097
  });
4995
- var UpdateProjectTagRequestSchema = z92.object({
4996
- projectId: z92.string(),
4997
- tagId: z92.string(),
4998
- name: z92.string().min(1).max(50).optional(),
5098
+ var UpdateProjectTagRequestSchema = z10.object({
5099
+ projectId: z10.string(),
5100
+ tagId: z10.string(),
5101
+ name: z10.string().min(1).max(50).optional(),
4999
5102
  color: hexColor.optional(),
5000
- description: z92.string().max(TAG_DESCRIPTION_MAX).optional(),
5103
+ description: z10.string().max(TAG_DESCRIPTION_MAX).optional(),
5001
5104
  /** Full markdown glossary body; null clears it. Rejected while overviewPath is set. */
5002
- overview: z92.string().max(TAG_OVERVIEW_MAX).nullable().optional(),
5105
+ overview: z10.string().max(TAG_OVERVIEW_MAX).nullable().optional(),
5003
5106
  /** Repo file to source the overview from; null clears back to the stored overview. */
5004
5107
  overviewPath: overviewPathSchema.nullable().optional(),
5005
5108
  /** Full replacement of the tag's context links when provided. */
5006
- contextPaths: z92.array(ProjectTagContextPathSchema).max(20).optional(),
5109
+ contextPaths: z10.array(ProjectTagContextPathSchema).max(20).optional(),
5007
5110
  /** Full-set replacement of the tag's parent tags (multi-parent DAG). */
5008
- parentTagIds: z92.array(z92.string()).max(25).optional(),
5111
+ parentTagIds: z10.array(z10.string()).max(25).optional(),
5009
5112
  /** One-line revision provenance, recorded in the tag's history. */
5010
- reason: z92.string().max(TAG_REASON_MAX).optional(),
5113
+ reason: z10.string().max(TAG_REASON_MAX).optional(),
5011
5114
  /** Card the caller was working in — stamped into the revision history. */
5012
- taskId: z92.string().optional(),
5013
- requestingUserId: z92.string().optional()
5115
+ taskId: z10.string().optional(),
5116
+ requestingUserId: z10.string().optional()
5014
5117
  });
5015
- var PostToProjectChatRequestSchema = z92.object({
5016
- projectId: z92.string(),
5017
- content: z92.string().min(1).max(2e4),
5018
- requestingUserId: z92.string().optional(),
5118
+ var PostToProjectChatRequestSchema = z10.object({
5119
+ projectId: z10.string(),
5120
+ content: z10.string().min(1).max(2e4),
5121
+ requestingUserId: z10.string().optional(),
5019
5122
  /** Marks the post so the server can persist it beyond chat (tag-audit summaries land in tag history). */
5020
- kind: z92.enum(["tag_audit_summary"]).optional()
5021
- });
5022
- var StartTagAuditRequestSchema = z92.object({
5023
- projectId: z92.string(),
5024
- requestingUserId: z92.string().optional()
5025
- });
5026
- var StartTaskAuditRequestSchema = z92.object({
5027
- projectId: z92.string(),
5028
- taskIds: z92.array(z92.string()).min(1).max(20),
5029
- requestingUserId: z92.string().optional()
5030
- });
5031
- var GetActiveAuditSessionsRequestSchema = z92.object({
5032
- projectId: z92.string()
5033
- });
5034
- var ReportTaskAuditResultRequestSchema = z92.object({
5035
- projectId: z92.string(),
5036
- taskId: z92.string(),
5037
- summary: z92.string(),
5038
- turnGrades: z92.array(
5039
- z92.object({
5040
- turnIndex: z92.number(),
5041
- phase: z92.enum(["planning", "building", "human"]),
5042
- grade: z92.enum(["correct", "neutral", "blunder"]),
5043
- reasoning: z92.string(),
5044
- eventType: z92.string(),
5045
- eventSummary: z92.string()
5123
+ kind: z10.enum(["tag_audit_summary"]).optional()
5124
+ });
5125
+ var StartTagAuditRequestSchema = z10.object({
5126
+ projectId: z10.string(),
5127
+ requestingUserId: z10.string().optional()
5128
+ });
5129
+ var StartTaskAuditRequestSchema = z10.object({
5130
+ projectId: z10.string(),
5131
+ taskIds: z10.array(z10.string()).min(1).max(20),
5132
+ requestingUserId: z10.string().optional()
5133
+ });
5134
+ var GetActiveAuditSessionsRequestSchema = z10.object({
5135
+ projectId: z10.string()
5136
+ });
5137
+ var ReportTaskAuditResultRequestSchema = z10.object({
5138
+ projectId: z10.string(),
5139
+ taskId: z10.string(),
5140
+ summary: z10.string(),
5141
+ turnGrades: z10.array(
5142
+ z10.object({
5143
+ turnIndex: z10.number(),
5144
+ phase: z10.enum(["planning", "building", "human"]),
5145
+ grade: z10.enum(["correct", "neutral", "blunder"]),
5146
+ reasoning: z10.string(),
5147
+ eventType: z10.string(),
5148
+ eventSummary: z10.string()
5046
5149
  })
5047
5150
  ),
5048
- planningAccuracy: z92.number().nullable(),
5049
- buildingAccuracy: z92.number().nullable(),
5050
- humanAccuracy: z92.number().nullable(),
5051
- planningCorrect: z92.number(),
5052
- planningNeutral: z92.number(),
5053
- planningBlunder: z92.number(),
5054
- buildingCorrect: z92.number(),
5055
- buildingNeutral: z92.number(),
5056
- buildingBlunder: z92.number(),
5057
- humanCorrect: z92.number(),
5058
- humanNeutral: z92.number(),
5059
- humanBlunder: z92.number(),
5060
- humanEvaluations: z92.array(
5061
- z92.object({
5062
- messageIndex: z92.number(),
5063
- rating: z92.union([z92.literal(-1), z92.literal(0), z92.literal(1)]),
5064
- reasoning: z92.string()
5151
+ planningAccuracy: z10.number().nullable(),
5152
+ buildingAccuracy: z10.number().nullable(),
5153
+ humanAccuracy: z10.number().nullable(),
5154
+ planningCorrect: z10.number(),
5155
+ planningNeutral: z10.number(),
5156
+ planningBlunder: z10.number(),
5157
+ buildingCorrect: z10.number(),
5158
+ buildingNeutral: z10.number(),
5159
+ buildingBlunder: z10.number(),
5160
+ humanCorrect: z10.number(),
5161
+ humanNeutral: z10.number(),
5162
+ humanBlunder: z10.number(),
5163
+ humanEvaluations: z10.array(
5164
+ z10.object({
5165
+ messageIndex: z10.number(),
5166
+ rating: z10.union([z10.literal(-1), z10.literal(0), z10.literal(1)]),
5167
+ reasoning: z10.string()
5065
5168
  })
5066
5169
  ).optional(),
5067
- suggestionIds: z92.array(z92.string()),
5068
- auditCostUsd: z92.number().nullable(),
5069
- model: z92.string().nullable(),
5170
+ suggestionIds: z10.array(z10.string()),
5171
+ auditCostUsd: z10.number().nullable(),
5172
+ model: z10.string().nullable(),
5070
5173
  /** When set, the audit is marked failed with this message instead. */
5071
- error: z92.string().optional()
5174
+ error: z10.string().optional()
5072
5175
  });
5073
- var GetTaskAuditsRequestSchema = z92.object({
5074
- projectId: z92.string(),
5075
- limit: z92.number().int().positive().max(200).optional().default(50)
5176
+ var GetTaskAuditsRequestSchema = z10.object({
5177
+ projectId: z10.string(),
5178
+ limit: z10.number().int().positive().max(200).optional().default(50)
5076
5179
  });
5077
- var GetTaskAuditRequestSchema = z92.object({
5078
- projectId: z92.string(),
5079
- auditId: z92.string()
5180
+ var GetTaskAuditRequestSchema = z10.object({
5181
+ projectId: z10.string(),
5182
+ auditId: z10.string()
5080
5183
  });
5081
- var GetTaskAuditAggregatesRequestSchema = z92.object({
5082
- projectId: z92.string()
5184
+ var GetTaskAuditAggregatesRequestSchema = z10.object({
5185
+ projectId: z10.string()
5083
5186
  });
5084
- var DeleteTaskAuditRequestSchema = z92.object({
5085
- projectId: z92.string(),
5086
- auditId: z92.string(),
5087
- requestingUserId: z92.string().optional()
5187
+ var DeleteTaskAuditRequestSchema = z10.object({
5188
+ projectId: z10.string(),
5189
+ auditId: z10.string(),
5190
+ requestingUserId: z10.string().optional()
5088
5191
  });
5089
- var MarkInitialPromptSubmittedRequestSchema = z92.object({
5090
- sessionId: z92.string()
5192
+ var MarkInitialPromptSubmittedRequestSchema = z10.object({
5193
+ sessionId: z10.string()
5091
5194
  });
5092
5195
  var DECISION_STATUS_LABELS = ["Open", "Decided", "Cancelled"];
5093
5196
  var DECISION_OPTION_KINDS = ["current", "planned", "proposed"];
@@ -5102,165 +5205,165 @@ var DECISION_DEADLINE_MIN_HOURS = 1;
5102
5205
  var DECISION_DEADLINE_MAX_DAYS = 30;
5103
5206
  var DECISION_DEADLINE_MAX_HOURS = DECISION_DEADLINE_MAX_DAYS * 24;
5104
5207
  var DECISION_LIST_MAX_LIMIT = 200;
5105
- var decisionIdSchema = z10.string().cuid("Invalid decision ID");
5106
- var optionInputSchema = z10.object({
5107
- label: z10.string().min(1, "Option label is required").max(DECISION_OPTION_LABEL_MAX),
5108
- description: z10.string().min(1, "Describe the option as GIVEN / WHEN / THEN"),
5109
- kind: z10.enum(DECISION_OPTION_KINDS).optional()
5208
+ var decisionIdSchema = z11.string().cuid("Invalid decision ID");
5209
+ var optionInputSchema = z11.object({
5210
+ label: z11.string().min(1, "Option label is required").max(DECISION_OPTION_LABEL_MAX),
5211
+ description: z11.string().min(1, "Describe the option as GIVEN / WHEN / THEN"),
5212
+ kind: z11.enum(DECISION_OPTION_KINDS).optional()
5110
5213
  });
5111
- var optionsArraySchema = z10.array(optionInputSchema).min(DECISION_OPTIONS_MIN, `A decision needs at least ${DECISION_OPTIONS_MIN} options`).max(
5214
+ var optionsArraySchema = z11.array(optionInputSchema).min(DECISION_OPTIONS_MIN, `A decision needs at least ${DECISION_OPTIONS_MIN} options`).max(
5112
5215
  DECISION_OPTIONS_MAX,
5113
5216
  `A decision takes at most ${DECISION_OPTIONS_MAX} options \u2014 more than that means the question is not framed yet`
5114
5217
  );
5115
- var CreateDecisionRequestSchema = z10.object({
5116
- projectId: z10.string().cuid("Invalid project ID"),
5218
+ var CreateDecisionRequestSchema = z11.object({
5219
+ projectId: z11.string().cuid("Invalid project ID"),
5117
5220
  /** The question, as one plain sentence. */
5118
- title: z10.string().min(1, "A decision needs a question").max(DECISION_QUESTION_MAX),
5119
- description: z10.string().max(CARD_DESCRIPTION_MAX).optional(),
5120
- context: z10.string().min(1, "Context is required \u2014 say why this is being asked now"),
5221
+ title: z11.string().min(1, "A decision needs a question").max(DECISION_QUESTION_MAX),
5222
+ description: z11.string().max(CARD_DESCRIPTION_MAX).optional(),
5223
+ context: z11.string().min(1, "Context is required \u2014 say why this is being asked now"),
5121
5224
  options: optionsArraySchema,
5122
5225
  /** 1-based position of the option that wins on silence. */
5123
- defaultOptionOrdinal: z10.number().int().min(1).max(DECISION_OPTIONS_MAX),
5124
- deadlineHours: z10.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional(),
5226
+ defaultOptionOrdinal: z11.number().int().min(1).max(DECISION_OPTIONS_MAX),
5227
+ deadlineHours: z11.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional(),
5125
5228
  /** Cards this decision blocks, by cuid or slug. */
5126
- impactedCardRefs: z10.array(z10.string().min(1)).max(50).optional(),
5127
- tagNames: z10.array(z10.string().min(1)).max(10).optional(),
5128
- raisedByTaskId: z10.string().min(1).optional(),
5129
- raisedByPrNumber: z10.number().int().positive().optional()
5229
+ impactedCardRefs: z11.array(z11.string().min(1)).max(50).optional(),
5230
+ tagNames: z11.array(z11.string().min(1)).max(10).optional(),
5231
+ raisedByTaskId: z11.string().min(1).optional(),
5232
+ raisedByPrNumber: z11.number().int().positive().optional()
5130
5233
  });
5131
- var VoteDecisionRequestSchema = z10.object({
5234
+ var VoteDecisionRequestSchema = z11.object({
5132
5235
  decisionId: decisionIdSchema,
5133
- optionId: z10.string().cuid("Invalid option ID"),
5134
- reason: z10.string().max(DECISION_VOTE_REASON_MAX).optional(),
5135
- source: z10.enum(DECISION_VOTE_SOURCES).optional()
5236
+ optionId: z11.string().cuid("Invalid option ID"),
5237
+ reason: z11.string().max(DECISION_VOTE_REASON_MAX).optional(),
5238
+ source: z11.enum(DECISION_VOTE_SOURCES).optional()
5136
5239
  });
5137
- var RemoveDecisionVoteRequestSchema = z10.object({
5240
+ var RemoveDecisionVoteRequestSchema = z11.object({
5138
5241
  decisionId: decisionIdSchema
5139
5242
  });
5140
- var ResolveDecisionRequestSchema = z10.object({
5243
+ var ResolveDecisionRequestSchema = z11.object({
5141
5244
  decisionId: decisionIdSchema,
5142
- chosenOptionId: z10.string().cuid("Invalid option ID"),
5143
- resolution: z10.string().min(1, "A resolution is required \u2014 say what was decided").max(DECISION_RESOLUTION_MAX),
5144
- resolutionNotes: z10.string().optional()
5245
+ chosenOptionId: z11.string().cuid("Invalid option ID"),
5246
+ resolution: z11.string().min(1, "A resolution is required \u2014 say what was decided").max(DECISION_RESOLUTION_MAX),
5247
+ resolutionNotes: z11.string().optional()
5145
5248
  });
5146
- var CancelDecisionRequestSchema = z10.object({
5249
+ var CancelDecisionRequestSchema = z11.object({
5147
5250
  decisionId: decisionIdSchema,
5148
5251
  /** Why it is being dropped. Posted to the decision thread. */
5149
- reason: z10.string().max(DECISION_RESOLUTION_MAX).optional()
5252
+ reason: z11.string().max(DECISION_RESOLUTION_MAX).optional()
5150
5253
  });
5151
- var BulkDecisionIdsRequestSchema = z10.object({
5152
- projectId: z10.string().cuid("Invalid project ID"),
5153
- decisionIds: z10.array(z10.string().cuid()).min(1).max(200)
5254
+ var BulkDecisionIdsRequestSchema = z11.object({
5255
+ projectId: z11.string().cuid("Invalid project ID"),
5256
+ decisionIds: z11.array(z11.string().cuid()).min(1).max(200)
5154
5257
  });
5155
- var ReopenDecisionRequestSchema = z10.object({
5258
+ var ReopenDecisionRequestSchema = z11.object({
5156
5259
  decisionId: decisionIdSchema,
5157
- deadlineHours: z10.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional()
5260
+ deadlineHours: z11.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional()
5158
5261
  });
5159
- var UpdateDecisionRequestSchema = z10.object({
5262
+ var UpdateDecisionRequestSchema = z11.object({
5160
5263
  decisionId: decisionIdSchema,
5161
- title: z10.string().min(1).max(200).optional(),
5162
- description: z10.string().max(CARD_DESCRIPTION_MAX).optional(),
5163
- context: z10.string().min(1).optional(),
5164
- deadlineAt: z10.string().datetime().optional(),
5264
+ title: z11.string().min(1).max(200).optional(),
5265
+ description: z11.string().max(CARD_DESCRIPTION_MAX).optional(),
5266
+ context: z11.string().min(1).optional(),
5267
+ deadlineAt: z11.string().datetime().optional(),
5165
5268
  /** Only accepted while the decision has zero votes. */
5166
5269
  options: optionsArraySchema.optional(),
5167
- defaultOptionOrdinal: z10.number().int().min(1).max(DECISION_OPTIONS_MAX).optional(),
5168
- addImpactedCardRefs: z10.array(z10.string().min(1)).max(50).optional(),
5169
- removeImpactedCardIds: z10.array(z10.string().min(1)).max(50).optional()
5270
+ defaultOptionOrdinal: z11.number().int().min(1).max(DECISION_OPTIONS_MAX).optional(),
5271
+ addImpactedCardRefs: z11.array(z11.string().min(1)).max(50).optional(),
5272
+ removeImpactedCardIds: z11.array(z11.string().min(1)).max(50).optional()
5170
5273
  });
5171
- var GetDecisionRequestSchema = z10.object({
5274
+ var GetDecisionRequestSchema = z11.object({
5172
5275
  /** cuid or slug. A slug needs `projectId` to resolve unambiguously. */
5173
- decisionId: z10.string().min(1),
5174
- projectId: z10.string().cuid().optional()
5276
+ decisionId: z11.string().min(1),
5277
+ projectId: z11.string().cuid().optional()
5175
5278
  });
5176
- var ListDecisionsRequestSchema = z10.object({
5177
- projectId: z10.string().cuid("Invalid project ID"),
5178
- status: z10.enum(DECISION_STATUS_LABELS).optional(),
5279
+ var ListDecisionsRequestSchema = z11.object({
5280
+ projectId: z11.string().cuid("Invalid project ID"),
5281
+ status: z11.enum(DECISION_STATUS_LABELS).optional(),
5179
5282
  /** Tag name, not id — an agent knows the tag it is working under. */
5180
- tag: z10.string().min(1).optional(),
5283
+ tag: z11.string().min(1).optional(),
5181
5284
  /** Decisions that this card is blocked by (cuid or slug). */
5182
- cardId: z10.string().min(1).optional(),
5183
- query: z10.string().min(1).optional(),
5184
- limit: z10.number().int().min(1).max(DECISION_LIST_MAX_LIMIT).optional()
5285
+ cardId: z11.string().min(1).optional(),
5286
+ query: z11.string().min(1).optional(),
5287
+ limit: z11.number().int().min(1).max(DECISION_LIST_MAX_LIMIT).optional()
5185
5288
  });
5186
- var optionInput = z11.object({
5187
- label: z11.string().min(1).max(DECISION_OPTION_LABEL_MAX),
5188
- description: z11.string().min(1),
5189
- kind: z11.enum(DECISION_OPTION_KINDS).optional()
5289
+ var optionInput = z12.object({
5290
+ label: z12.string().min(1).max(DECISION_OPTION_LABEL_MAX),
5291
+ description: z12.string().min(1),
5292
+ kind: z12.enum(DECISION_OPTION_KINDS).optional()
5190
5293
  });
5191
- var optionsInput = z11.array(optionInput).min(DECISION_OPTIONS_MIN).max(DECISION_OPTIONS_MAX);
5192
- var deadlineHours = z11.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional();
5193
- var CreateProjectDecisionRequestSchema = z11.object({
5194
- projectId: z11.string(),
5195
- question: z11.string().min(1).max(200),
5196
- summary: z11.string().max(CARD_DESCRIPTION_MAX).optional(),
5197
- context: z11.string().min(1),
5294
+ var optionsInput = z12.array(optionInput).min(DECISION_OPTIONS_MIN).max(DECISION_OPTIONS_MAX);
5295
+ var deadlineHours = z12.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional();
5296
+ var CreateProjectDecisionRequestSchema = z12.object({
5297
+ projectId: z12.string(),
5298
+ question: z12.string().min(1).max(200),
5299
+ summary: z12.string().max(CARD_DESCRIPTION_MAX).optional(),
5300
+ context: z12.string().min(1),
5198
5301
  options: optionsInput,
5199
- defaultOption: z11.number().int().min(1).max(DECISION_OPTIONS_MAX),
5302
+ defaultOption: z12.number().int().min(1).max(DECISION_OPTIONS_MAX),
5200
5303
  deadlineHours,
5201
- impactedCards: z11.array(z11.string().min(1)).max(50).optional(),
5304
+ impactedCards: z12.array(z12.string().min(1)).max(50).optional(),
5202
5305
  /**
5203
5306
  * Pod surface only: also block the card this session is working on. The
5204
5307
  * session's task id is resolved SERVER-side from `sessionId` — a
5205
5308
  * client-supplied card id would let a pod block any card in the project.
5206
5309
  */
5207
- includeCurrentCard: z11.boolean().optional(),
5208
- sessionId: z11.string().optional(),
5209
- tagNames: z11.array(z11.string().min(1)).max(10).optional(),
5210
- raisedByPr: z11.number().int().positive().optional(),
5310
+ includeCurrentCard: z12.boolean().optional(),
5311
+ sessionId: z12.string().optional(),
5312
+ tagNames: z12.array(z12.string().min(1)).max(10).optional(),
5313
+ raisedByPr: z12.number().int().positive().optional(),
5211
5314
  /** Slug or id of the card that raised the question. A link back, not a block. */
5212
- raisedByCard: z11.string().min(1).optional(),
5315
+ raisedByCard: z12.string().min(1).optional(),
5213
5316
  /** Absolute deadline (ISO 8601). Wins over `deadlineHours` when both are sent. */
5214
- deadlineAt: z11.string().datetime({ offset: true }).optional(),
5215
- requestingUserId: z11.string().optional()
5216
- });
5217
- var ListProjectDecisionsRequestSchema = z11.object({
5218
- projectId: z11.string(),
5219
- status: z11.enum(DECISION_STATUS_LABELS).optional(),
5220
- tag: z11.string().min(1).optional(),
5221
- card: z11.string().min(1).optional(),
5222
- query: z11.string().min(1).optional(),
5223
- limit: z11.number().int().min(1).max(DECISION_LIST_MAX_LIMIT).optional(),
5224
- requestingUserId: z11.string().optional()
5317
+ deadlineAt: z12.string().datetime({ offset: true }).optional(),
5318
+ requestingUserId: z12.string().optional()
5225
5319
  });
5226
- var GetProjectDecisionRequestSchema = z11.object({
5227
- projectId: z11.string(),
5228
- decision: z11.string().min(1),
5229
- requestingUserId: z11.string().optional()
5320
+ var ListProjectDecisionsRequestSchema = z12.object({
5321
+ projectId: z12.string(),
5322
+ status: z12.enum(DECISION_STATUS_LABELS).optional(),
5323
+ tag: z12.string().min(1).optional(),
5324
+ card: z12.string().min(1).optional(),
5325
+ query: z12.string().min(1).optional(),
5326
+ limit: z12.number().int().min(1).max(DECISION_LIST_MAX_LIMIT).optional(),
5327
+ requestingUserId: z12.string().optional()
5328
+ });
5329
+ var GetProjectDecisionRequestSchema = z12.object({
5330
+ projectId: z12.string(),
5331
+ decision: z12.string().min(1),
5332
+ requestingUserId: z12.string().optional()
5230
5333
  });
5231
- var VoteProjectDecisionRequestSchema = z11.object({
5232
- projectId: z11.string(),
5233
- decision: z11.string().min(1),
5334
+ var VoteProjectDecisionRequestSchema = z12.object({
5335
+ projectId: z12.string(),
5336
+ decision: z12.string().min(1),
5234
5337
  /** An option id, or its 1-based position. */
5235
- option: z11.string().min(1),
5236
- reason: z11.string().max(CARD_DESCRIPTION_MAX).optional(),
5237
- requestingUserId: z11.string().optional()
5238
- });
5239
- var ResolveProjectDecisionRequestSchema = z11.object({
5240
- projectId: z11.string(),
5241
- decision: z11.string().min(1),
5242
- option: z11.string().min(1),
5243
- resolution: z11.string().min(1).max(DECISION_RESOLUTION_MAX),
5244
- notes: z11.string().optional(),
5245
- requestingUserId: z11.string().optional()
5246
- });
5247
- var UpdateProjectDecisionRequestSchema = z11.object({
5248
- projectId: z11.string(),
5249
- decision: z11.string().min(1),
5250
- question: z11.string().min(1).max(200).optional(),
5251
- summary: z11.string().max(CARD_DESCRIPTION_MAX).optional(),
5252
- context: z11.string().min(1).optional(),
5338
+ option: z12.string().min(1),
5339
+ reason: z12.string().max(CARD_DESCRIPTION_MAX).optional(),
5340
+ requestingUserId: z12.string().optional()
5341
+ });
5342
+ var ResolveProjectDecisionRequestSchema = z12.object({
5343
+ projectId: z12.string(),
5344
+ decision: z12.string().min(1),
5345
+ option: z12.string().min(1),
5346
+ resolution: z12.string().min(1).max(DECISION_RESOLUTION_MAX),
5347
+ notes: z12.string().optional(),
5348
+ requestingUserId: z12.string().optional()
5349
+ });
5350
+ var UpdateProjectDecisionRequestSchema = z12.object({
5351
+ projectId: z12.string(),
5352
+ decision: z12.string().min(1),
5353
+ question: z12.string().min(1).max(200).optional(),
5354
+ summary: z12.string().max(CARD_DESCRIPTION_MAX).optional(),
5355
+ context: z12.string().min(1).optional(),
5253
5356
  /** Accepted only while nobody has voted. */
5254
5357
  options: optionsInput.optional(),
5255
- defaultOption: z11.number().int().min(1).max(DECISION_OPTIONS_MAX).optional(),
5256
- tagNames: z11.array(z11.string().min(1)).max(10).optional(),
5358
+ defaultOption: z12.number().int().min(1).max(DECISION_OPTIONS_MAX).optional(),
5359
+ tagNames: z12.array(z12.string().min(1)).max(10).optional(),
5257
5360
  deadlineHours,
5258
5361
  /** Absolute deadline (ISO 8601). Wins over `deadlineHours` when both are sent. */
5259
- deadlineAt: z11.string().datetime({ offset: true }).optional(),
5260
- addImpactedCards: z11.array(z11.string().min(1)).max(50).optional(),
5261
- removeImpactedCards: z11.array(z11.string().min(1)).max(50).optional(),
5262
- status: z11.enum(["Cancelled", "Open"]).optional(),
5263
- requestingUserId: z11.string().optional()
5362
+ deadlineAt: z12.string().datetime({ offset: true }).optional(),
5363
+ addImpactedCards: z12.array(z12.string().min(1)).max(50).optional(),
5364
+ removeImpactedCards: z12.array(z12.string().min(1)).max(50).optional(),
5365
+ status: z12.enum(["Cancelled", "Open"]).optional(),
5366
+ requestingUserId: z12.string().optional()
5264
5367
  });
5265
5368
  var EVALUATE_MAX_QUESTIONS = 32;
5266
5369
  var EVALUATE_MAX_ITEMS = 100;
@@ -5268,29 +5371,29 @@ var EVALUATE_ITEM_MAX_CHARS = 8e3;
5268
5371
  var EVALUATE_REQUEST_MAX_CHARS = 4e5;
5269
5372
  var TEXT_MAX = 1e3;
5270
5373
  var QUESTION_KEY = /^[A-Za-z0-9_-]{1,64}$/;
5271
- var EvaluateQuestionSchema = z12.object({
5272
- key: z12.string().regex(QUESTION_KEY, "key must be 1-64 letters, digits, _ or -"),
5273
- type: z12.enum(["noul", "choice", "score"]),
5274
- instructions: z12.string().min(1).max(4e3),
5275
- options: z12.array(
5276
- z12.object({
5277
- key: z12.string().min(1).max(200),
5278
- description: z12.string().min(1).max(TEXT_MAX)
5374
+ var EvaluateQuestionSchema = z13.object({
5375
+ key: z13.string().regex(QUESTION_KEY, "key must be 1-64 letters, digits, _ or -"),
5376
+ type: z13.enum(["noul", "choice", "score"]),
5377
+ instructions: z13.string().min(1).max(4e3),
5378
+ options: z13.array(
5379
+ z13.object({
5380
+ key: z13.string().min(1).max(200),
5381
+ description: z13.string().min(1).max(TEXT_MAX)
5279
5382
  })
5280
5383
  ).optional(),
5281
- levels: z12.array(z12.string().min(1).max(TEXT_MAX)).optional()
5384
+ levels: z13.array(z13.string().min(1).max(TEXT_MAX)).optional()
5282
5385
  }).superRefine((q, ctx) => {
5283
5386
  if (q.type === "choice") {
5284
5387
  const n = q.options?.length ?? 0;
5285
5388
  if (n < 2 || n > 255) {
5286
5389
  ctx.addIssue({
5287
- code: z12.ZodIssueCode.custom,
5390
+ code: z13.ZodIssueCode.custom,
5288
5391
  path: ["options"],
5289
5392
  message: "a choice question needs 2-255 options"
5290
5393
  });
5291
5394
  } else if (new Set(q.options?.map((o) => o.key)).size !== n) {
5292
5395
  ctx.addIssue({
5293
- code: z12.ZodIssueCode.custom,
5396
+ code: z13.ZodIssueCode.custom,
5294
5397
  path: ["options"],
5295
5398
  message: "option keys must be unique"
5296
5399
  });
@@ -5300,36 +5403,36 @@ var EvaluateQuestionSchema = z12.object({
5300
5403
  const n = q.levels?.length ?? 0;
5301
5404
  if (n < 2 || n > 10) {
5302
5405
  ctx.addIssue({
5303
- code: z12.ZodIssueCode.custom,
5406
+ code: z13.ZodIssueCode.custom,
5304
5407
  path: ["levels"],
5305
5408
  message: "a score question needs 2-10 levels"
5306
5409
  });
5307
5410
  }
5308
5411
  }
5309
5412
  });
5310
- var EvaluateQuestionsRequestSchema = z12.object({
5311
- projectId: z12.string(),
5312
- state: z12.string().max(JEV_STATE_MAX_CHARS).optional(),
5313
- items: z12.array(z12.string().max(EVALUATE_ITEM_MAX_CHARS)).max(EVALUATE_MAX_ITEMS).optional(),
5314
- questions: z12.array(EvaluateQuestionSchema).min(1).max(EVALUATE_MAX_QUESTIONS)
5413
+ var EvaluateQuestionsRequestSchema = z13.object({
5414
+ projectId: z13.string(),
5415
+ state: z13.string().max(JEV_STATE_MAX_CHARS).optional(),
5416
+ items: z13.array(z13.string().max(EVALUATE_ITEM_MAX_CHARS)).max(EVALUATE_MAX_ITEMS).optional(),
5417
+ questions: z13.array(EvaluateQuestionSchema).min(1).max(EVALUATE_MAX_QUESTIONS)
5315
5418
  }).superRefine((req, ctx) => {
5316
5419
  if (req.state === void 0 && (!req.items || req.items.length === 0)) {
5317
5420
  ctx.addIssue({
5318
- code: z12.ZodIssueCode.custom,
5421
+ code: z13.ZodIssueCode.custom,
5319
5422
  path: ["state"],
5320
5423
  message: "pass state, or a non-empty items array"
5321
5424
  });
5322
5425
  }
5323
5426
  if (JSON.stringify(req).length > EVALUATE_REQUEST_MAX_CHARS) {
5324
5427
  ctx.addIssue({
5325
- code: z12.ZodIssueCode.custom,
5428
+ code: z13.ZodIssueCode.custom,
5326
5429
  path: [],
5327
5430
  message: `the request is over ${EVALUATE_REQUEST_MAX_CHARS} characters; split the items across calls`
5328
5431
  });
5329
5432
  }
5330
5433
  if (new Set(req.questions.map((q) => q.key)).size !== req.questions.length) {
5331
5434
  ctx.addIssue({
5332
- code: z12.ZodIssueCode.custom,
5435
+ code: z13.ZodIssueCode.custom,
5333
5436
  path: ["questions"],
5334
5437
  message: "question keys must be unique"
5335
5438
  });
@@ -5367,129 +5470,129 @@ var MEETING_TITLE_MAX = 200;
5367
5470
  var MEETING_OCCURRED_AT_MIN_YEAR = 2e3;
5368
5471
  var MEETING_OCCURRED_AT_MAX_FUTURE_MS = 48 * 60 * 60 * 1e3;
5369
5472
  var OCCURRED_AT_RANGE_MESSAGE = `occurredAt must be a real date: no earlier than ${MEETING_OCCURRED_AT_MIN_YEAR}, and no more than 48 hours in the future.`;
5370
- var MeetingOccurredAtSchema = z13.string().datetime().refine((value) => {
5473
+ var MeetingOccurredAtSchema = z14.string().datetime().refine((value) => {
5371
5474
  const ms = Date.parse(value);
5372
5475
  if (Number.isNaN(ms)) return false;
5373
5476
  if (ms > Date.now() + MEETING_OCCURRED_AT_MAX_FUTURE_MS) return false;
5374
5477
  return new Date(ms).getUTCFullYear() >= MEETING_OCCURRED_AT_MIN_YEAR;
5375
5478
  }, OCCURRED_AT_RANGE_MESSAGE);
5376
- var CreateMeetingFromTranscriptRequestSchema = z13.object({
5377
- projectId: z13.string().cuid(),
5378
- rawText: z13.string().min(1).max(MEETING_TRANSCRIPT_MAX_CHARS),
5379
- title: z13.string().min(1).max(MEETING_TITLE_MAX).optional(),
5479
+ var CreateMeetingFromTranscriptRequestSchema = z14.object({
5480
+ projectId: z14.string().cuid(),
5481
+ rawText: z14.string().min(1).max(MEETING_TRANSCRIPT_MAX_CHARS),
5482
+ title: z14.string().min(1).max(MEETING_TITLE_MAX).optional(),
5380
5483
  /** ISO 8601. Defaults to now when the source carries no date. */
5381
5484
  occurredAt: MeetingOccurredAtSchema.optional(),
5382
5485
  /** Override auto-detection. Rarely needed; detection handles the three formats. */
5383
- format: z13.enum(["text", "vtt", "srt"]).optional(),
5384
- source: z13.enum(["manual", "slack"]).optional()
5486
+ format: z14.enum(["text", "vtt", "srt"]).optional(),
5487
+ source: z14.enum(["manual", "slack"]).optional()
5385
5488
  });
5386
- var GetMeetingRequestSchema = z13.object({
5387
- projectId: z13.string().cuid(),
5388
- meetingId: z13.string().cuid()
5489
+ var GetMeetingRequestSchema = z14.object({
5490
+ projectId: z14.string().cuid(),
5491
+ meetingId: z14.string().cuid()
5389
5492
  });
5390
- var UpdateMeetingRequestSchema = z13.object({
5391
- projectId: z13.string().cuid(),
5392
- meetingId: z13.string().cuid(),
5393
- title: z13.string().min(1).max(MEETING_TITLE_MAX).optional(),
5493
+ var UpdateMeetingRequestSchema = z14.object({
5494
+ projectId: z14.string().cuid(),
5495
+ meetingId: z14.string().cuid(),
5496
+ title: z14.string().min(1).max(MEETING_TITLE_MAX).optional(),
5394
5497
  occurredAt: MeetingOccurredAtSchema.optional()
5395
5498
  });
5396
- var RegenerateMeetingSummaryRequestSchema = z13.object({
5397
- projectId: z13.string().cuid(),
5398
- meetingId: z13.string().cuid()
5499
+ var RegenerateMeetingSummaryRequestSchema = z14.object({
5500
+ projectId: z14.string().cuid(),
5501
+ meetingId: z14.string().cuid()
5399
5502
  });
5400
- var DeleteMeetingRequestSchema = z13.object({
5401
- projectId: z13.string().cuid(),
5402
- meetingId: z13.string().cuid()
5503
+ var DeleteMeetingRequestSchema = z14.object({
5504
+ projectId: z14.string().cuid(),
5505
+ meetingId: z14.string().cuid()
5403
5506
  });
5404
- var checklistTitle = z13.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX);
5405
- var ListMeetingChecklistRequestSchema = z13.object({
5406
- projectId: z13.string().cuid(),
5407
- meetingId: z13.string().cuid()
5507
+ var checklistTitle = z14.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX);
5508
+ var ListMeetingChecklistRequestSchema = z14.object({
5509
+ projectId: z14.string().cuid(),
5510
+ meetingId: z14.string().cuid()
5408
5511
  });
5409
- var AddMeetingChecklistItemsRequestSchema = z13.object({
5410
- projectId: z13.string().cuid(),
5411
- meetingId: z13.string().cuid(),
5412
- items: z13.array(z13.object({ title: checklistTitle })).min(1).max(50)
5512
+ var AddMeetingChecklistItemsRequestSchema = z14.object({
5513
+ projectId: z14.string().cuid(),
5514
+ meetingId: z14.string().cuid(),
5515
+ items: z14.array(z14.object({ title: checklistTitle })).min(1).max(50)
5413
5516
  });
5414
- var UpdateMeetingChecklistItemRequestSchema = z13.object({
5415
- projectId: z13.string().cuid(),
5416
- meetingId: z13.string().cuid(),
5417
- itemId: z13.string().cuid(),
5517
+ var UpdateMeetingChecklistItemRequestSchema = z14.object({
5518
+ projectId: z14.string().cuid(),
5519
+ meetingId: z14.string().cuid(),
5520
+ itemId: z14.string().cuid(),
5418
5521
  title: checklistTitle.optional(),
5419
- ordinal: z13.number().int().min(0).optional(),
5522
+ ordinal: z14.number().int().min(0).optional(),
5420
5523
  /** Explicit null clears the link; undefined leaves it alone. */
5421
- linkedTaskId: z13.string().cuid().nullable().optional()
5524
+ linkedTaskId: z14.string().cuid().nullable().optional()
5422
5525
  }).refine(
5423
5526
  (v) => v.title !== void 0 || v.ordinal !== void 0 || v.linkedTaskId !== void 0,
5424
5527
  "Pass at least one of title, ordinal, or linkedTaskId."
5425
5528
  );
5426
- var DeleteMeetingChecklistItemRequestSchema = z13.object({
5427
- projectId: z13.string().cuid(),
5428
- meetingId: z13.string().cuid(),
5429
- itemId: z13.string().cuid()
5430
- });
5431
- var SetMeetingChecklistItemCheckedRequestSchema = z13.object({
5432
- projectId: z13.string().cuid(),
5433
- meetingId: z13.string().cuid(),
5434
- itemId: z13.string().cuid(),
5435
- checked: z13.boolean(),
5529
+ var DeleteMeetingChecklistItemRequestSchema = z14.object({
5530
+ projectId: z14.string().cuid(),
5531
+ meetingId: z14.string().cuid(),
5532
+ itemId: z14.string().cuid()
5533
+ });
5534
+ var SetMeetingChecklistItemCheckedRequestSchema = z14.object({
5535
+ projectId: z14.string().cuid(),
5536
+ meetingId: z14.string().cuid(),
5537
+ itemId: z14.string().cuid(),
5538
+ checked: z14.boolean(),
5436
5539
  /** Attach the card in the same call that ticks the item. */
5437
- linkedTaskId: z13.string().cuid().nullable().optional()
5540
+ linkedTaskId: z14.string().cuid().nullable().optional()
5438
5541
  });
5439
- var ListMeetingsRequestSchema = z13.object({
5440
- projectId: z13.string().cuid(),
5441
- limit: z13.number().int().min(1).max(50).optional(),
5442
- search: z13.string().max(200).optional()
5542
+ var ListMeetingsRequestSchema = z14.object({
5543
+ projectId: z14.string().cuid(),
5544
+ limit: z14.number().int().min(1).max(50).optional(),
5545
+ search: z14.string().max(200).optional()
5443
5546
  });
5444
- var ReadMeetingTranscriptRequestSchema = z13.object({
5445
- projectId: z13.string().cuid(),
5446
- meetingId: z13.string().cuid(),
5447
- offset: z13.number().int().min(0).optional(),
5448
- limit: z13.number().int().min(1).max(500).optional()
5547
+ var ReadMeetingTranscriptRequestSchema = z14.object({
5548
+ projectId: z14.string().cuid(),
5549
+ meetingId: z14.string().cuid(),
5550
+ offset: z14.number().int().min(0).optional(),
5551
+ limit: z14.number().int().min(1).max(500).optional()
5449
5552
  });
5450
5553
  var MEETING_SUMMARY_MAX_CHARS = 5e4;
5451
- var AddProjectMeetingChecklistItemsRequestSchema = z13.object({
5452
- projectId: z13.string().cuid(),
5453
- meetingId: z13.string().cuid(),
5454
- items: z13.array(z13.object({ title: z13.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX) })).min(1).max(50),
5455
- requestingUserId: z13.string().optional()
5456
- });
5457
- var CheckProjectMeetingChecklistItemRequestSchema = z13.object({
5458
- projectId: z13.string().cuid(),
5459
- meetingId: z13.string().cuid(),
5460
- title: z13.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
5461
- checked: z13.boolean(),
5554
+ var AddProjectMeetingChecklistItemsRequestSchema = z14.object({
5555
+ projectId: z14.string().cuid(),
5556
+ meetingId: z14.string().cuid(),
5557
+ items: z14.array(z14.object({ title: z14.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX) })).min(1).max(50),
5558
+ requestingUserId: z14.string().optional()
5559
+ });
5560
+ var CheckProjectMeetingChecklistItemRequestSchema = z14.object({
5561
+ projectId: z14.string().cuid(),
5562
+ meetingId: z14.string().cuid(),
5563
+ title: z14.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
5564
+ checked: z14.boolean(),
5462
5565
  /** Card id or slug. Resolved server-side and required to be in the project. */
5463
- linkedTask: z13.string().min(1).optional(),
5464
- requestingUserId: z13.string().optional()
5465
- });
5466
- var EditProjectMeetingChecklistItemRequestSchema = z13.object({
5467
- projectId: z13.string().cuid(),
5468
- meetingId: z13.string().cuid(),
5469
- title: z13.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
5470
- newTitle: z13.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
5471
- requestingUserId: z13.string().optional()
5472
- });
5473
- var RemoveProjectMeetingChecklistItemRequestSchema = z13.object({
5474
- projectId: z13.string().cuid(),
5475
- meetingId: z13.string().cuid(),
5476
- title: z13.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
5477
- requestingUserId: z13.string().optional()
5478
- });
5479
- var CreateProjectMeetingRequestSchema = z13.object({
5480
- projectId: z13.string().cuid(),
5481
- rawText: z13.string().min(1).max(MEETING_TRANSCRIPT_MAX_CHARS),
5482
- title: z13.string().min(1).max(MEETING_TITLE_MAX).optional(),
5566
+ linkedTask: z14.string().min(1).optional(),
5567
+ requestingUserId: z14.string().optional()
5568
+ });
5569
+ var EditProjectMeetingChecklistItemRequestSchema = z14.object({
5570
+ projectId: z14.string().cuid(),
5571
+ meetingId: z14.string().cuid(),
5572
+ title: z14.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
5573
+ newTitle: z14.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
5574
+ requestingUserId: z14.string().optional()
5575
+ });
5576
+ var RemoveProjectMeetingChecklistItemRequestSchema = z14.object({
5577
+ projectId: z14.string().cuid(),
5578
+ meetingId: z14.string().cuid(),
5579
+ title: z14.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
5580
+ requestingUserId: z14.string().optional()
5581
+ });
5582
+ var CreateProjectMeetingRequestSchema = z14.object({
5583
+ projectId: z14.string().cuid(),
5584
+ rawText: z14.string().min(1).max(MEETING_TRANSCRIPT_MAX_CHARS),
5585
+ title: z14.string().min(1).max(MEETING_TITLE_MAX).optional(),
5483
5586
  occurredAt: MeetingOccurredAtSchema.optional(),
5484
- requestingUserId: z13.string().optional()
5587
+ requestingUserId: z14.string().optional()
5485
5588
  });
5486
- var UpdateProjectMeetingRequestSchema = z13.object({
5487
- projectId: z13.string().cuid(),
5488
- meetingId: z13.string().cuid(),
5489
- title: z13.string().min(1).max(MEETING_TITLE_MAX).optional(),
5589
+ var UpdateProjectMeetingRequestSchema = z14.object({
5590
+ projectId: z14.string().cuid(),
5591
+ meetingId: z14.string().cuid(),
5592
+ title: z14.string().min(1).max(MEETING_TITLE_MAX).optional(),
5490
5593
  occurredAt: MeetingOccurredAtSchema.optional(),
5491
- summary: z13.string().min(1).max(MEETING_SUMMARY_MAX_CHARS).optional(),
5492
- requestingUserId: z13.string().optional()
5594
+ summary: z14.string().min(1).max(MEETING_SUMMARY_MAX_CHARS).optional(),
5595
+ requestingUserId: z14.string().optional()
5493
5596
  }).refine(
5494
5597
  (v) => v.title !== void 0 || v.occurredAt !== void 0 || v.summary !== void 0,
5495
5598
  "Pass at least one of title, occurredAt, or summary."
@@ -5514,8 +5617,8 @@ function anthropicEntry(model, label, inputPerMillion, outputPerMillion, opts =
5514
5617
  var ANTHROPIC_CATALOG = [
5515
5618
  anthropicEntry(DEFAULT_OPUS_MODEL, "Opus 5.5 Latest", 4, 20),
5516
5619
  anthropicEntry(PREVIOUS_OPUS_MODEL, "Opus 5", 5, 25),
5517
- anthropicEntry(DEFAULT_SONNET_MODEL, "Sonnet 5 Latest", 3, 15),
5518
- anthropicEntry(PREVIOUS_SONNET_MODEL, "Sonnet 4.6", 3, 15),
5620
+ anthropicEntry(DEFAULT_SONNET_MODEL, "Sonnet 5.5 Latest", 2, 10),
5621
+ anthropicEntry(PREVIOUS_SONNET_MODEL, "Sonnet 5", 2, 10),
5519
5622
  // The Haiku line (4.5 and older) predates the tuning surface and 400s on it.
5520
5623
  anthropicEntry(DEFAULT_HAIKU_MODEL, "Haiku 4.5", 1, 5, { supportsEffort: false }),
5521
5624
  anthropicEntry(FABLE_MODEL, "Fable 5.1", 10, 50)
@@ -5523,6 +5626,11 @@ var ANTHROPIC_CATALOG = [
5523
5626
  var CLAUDESPACE_WORKLOAD_LABEL = "rc-workload";
5524
5627
  var CLAUDESPACE_WORKLOAD_VALUE = "claudespace";
5525
5628
  var CONVEYOR_POD_SELECTOR = `${CLAUDESPACE_WORKLOAD_LABEL}=${CLAUDESPACE_WORKLOAD_VALUE}`;
5629
+ var PERSONAL_LOCAL_REGISTRY_NAMESPACE = "conveyor-system";
5630
+ var PERSONAL_LOCAL_REGISTRY_NAME = "conveyor-registry";
5631
+ var PERSONAL_LOCAL_REGISTRY_PORT = 5e3;
5632
+ var PERSONAL_LOCAL_REGISTRY_HOST = `${PERSONAL_LOCAL_REGISTRY_NAME}.${PERSONAL_LOCAL_REGISTRY_NAMESPACE}.svc.cluster.local:${PERSONAL_LOCAL_REGISTRY_PORT}`;
5633
+ var PERSONAL_LOCAL_REGISTRY_NODE_ENDPOINT = `http://127.0.0.1:${PERSONAL_LOCAL_REGISTRY_PORT}`;
5526
5634
  var MS_PER_DAY = 24 * 60 * 60 * 1e3;
5527
5635
  var POSTGRES_ENV = {
5528
5636
  POSTGRES_HOST_AUTH_METHOD: "trust",
@@ -5941,7 +6049,7 @@ function registerChecklistTools(server2, conn2) {
5941
6049
  }
5942
6050
 
5943
6051
  // src/tools/workspace.ts
5944
- import { z as z14 } from "zod/v3";
6052
+ import { z as z15 } from "zod/v3";
5945
6053
 
5946
6054
  // src/workspace-ssh-tunnel.ts
5947
6055
  import net from "net";
@@ -6061,8 +6169,8 @@ function registerAttachInfoTool(server2, conn2) {
6061
6169
  "workspace_attach_info",
6062
6170
  "Return SSH/SFTP attach metadata for a running task Claudespace, plus hosted preview URLs and configured preview ports. Optionally installs an OpenSSH public key for this attach session.",
6063
6171
  {
6064
- taskId: z14.string().describe("The task ID"),
6065
- sshPublicKey: z14.string().optional().describe("Optional OpenSSH public key to install into the workspace")
6172
+ taskId: z15.string().describe("The task ID"),
6173
+ sshPublicKey: z15.string().optional().describe("Optional OpenSSH public key to install into the workspace")
6066
6174
  },
6067
6175
  async ({ taskId, sshPublicKey }) => {
6068
6176
  const info = await conn2.getWorkspaceAttachInfo(taskId, sshPublicKey);
@@ -6075,7 +6183,7 @@ function registerPreviewUrlsTool(server2, conn2) {
6075
6183
  "workspace_preview_urls",
6076
6184
  "Return the hosted preview URLs and preview ports for a running task Claudespace. This mirrors the web UI preview link metadata.",
6077
6185
  {
6078
- taskId: z14.string().describe("The task ID")
6186
+ taskId: z15.string().describe("The task ID")
6079
6187
  },
6080
6188
  async ({ taskId }) => {
6081
6189
  const info = await conn2.getWorkspaceAttachInfo(taskId);
@@ -6105,10 +6213,10 @@ function registerStartTunnelTool(server2, conn2, startTunnel) {
6105
6213
  "workspace_start_tunnel",
6106
6214
  "Start a local loopback tunnel through the MCP server to a running task Claudespace port. Use port 2222 for SSH/SFTP, or one of previewPorts for app access.",
6107
6215
  {
6108
- taskId: z14.string().describe("The task ID"),
6109
- port: z14.number().optional().describe("Remote Claudespace port. Defaults to SSH port 2222."),
6110
- preferredLocalPort: z14.number().optional().describe("Preferred local loopback port. If omitted, the OS chooses one."),
6111
- sshPublicKey: z14.string().optional().describe("Optional OpenSSH public key to install before opening the tunnel")
6216
+ taskId: z15.string().describe("The task ID"),
6217
+ port: z15.number().optional().describe("Remote Claudespace port. Defaults to SSH port 2222."),
6218
+ preferredLocalPort: z15.number().optional().describe("Preferred local loopback port. If omitted, the OS chooses one."),
6219
+ sshPublicKey: z15.string().optional().describe("Optional OpenSSH public key to install before opening the tunnel")
6112
6220
  },
6113
6221
  async ({ taskId, port, preferredLocalPort, sshPublicKey }) => {
6114
6222
  const info = await conn2.getWorkspaceAttachInfo(taskId, sshPublicKey);
@@ -6168,7 +6276,7 @@ function registerStopTunnelTool(server2) {
6168
6276
  "workspace_stop_tunnel",
6169
6277
  "Stop a local workspace tunnel previously opened by workspace_start_tunnel.",
6170
6278
  {
6171
- tunnelId: z14.string().describe("Tunnel id returned by workspace_start_tunnel")
6279
+ tunnelId: z15.string().describe("Tunnel id returned by workspace_start_tunnel")
6172
6280
  },
6173
6281
  async ({ tunnelId }) => {
6174
6282
  const tunnel = activeTunnels.get(tunnelId);