@rallycry/conveyor-mcp 5.0.11 → 5.0.12

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.
Files changed (2) hide show
  1. package/dist/cli.js +1230 -1182
  2. package/package.json +8 -8
package/dist/cli.js CHANGED
@@ -12,7 +12,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
12
12
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
13
13
 
14
14
  // src/tools/project.ts
15
- import { z } from "zod";
15
+ import { z } from "zod/v3";
16
16
  function registerProjectTools(server2, conn2) {
17
17
  server2.tool(
18
18
  "list_projects",
@@ -70,7 +70,7 @@ function registerProjectTools(server2, conn2) {
70
70
  }
71
71
 
72
72
  // src/tools/connection.ts
73
- import { z as z4 } from "zod";
73
+ import { z as z4 } from "zod/v3";
74
74
 
75
75
  // ../shared/dist/chunk-3D2OVVIS.js
76
76
  import { z as z2 } from "zod";
@@ -322,14 +322,14 @@ var f = {
322
322
  return { kind: "nullable", inner };
323
323
  }
324
324
  };
325
- function compileString(z14, spec) {
326
- let schema = z14.string();
325
+ function compileString(z15, spec) {
326
+ let schema = z15.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(z14, spec) {
332
- let schema = z14.number();
331
+ function compileNumber(z15, spec) {
332
+ let schema = z15.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(z14, spec) {
337
337
  if (spec.max !== void 0) schema = schema.max(spec.max);
338
338
  return schema;
339
339
  }
340
- function compileArray(z14, spec) {
341
- let schema = z14.array(compileField(z14, spec.item));
340
+ function compileArray(z15, spec) {
341
+ let schema = z15.array(compileField(z15, 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(z14, spec) {
346
+ function compileBase(z15, spec) {
347
347
  switch (spec.kind) {
348
348
  case "string":
349
- return compileString(z14, spec);
349
+ return compileString(z15, spec);
350
350
  case "number":
351
- return compileNumber(z14, spec);
351
+ return compileNumber(z15, spec);
352
352
  case "boolean":
353
- return z14.boolean();
353
+ return z15.boolean();
354
354
  case "enum":
355
- return z14.enum([...spec.values]);
355
+ return z15.enum([...spec.values]);
356
356
  case "array":
357
- return compileArray(z14, spec);
357
+ return compileArray(z15, spec);
358
358
  case "object":
359
- return z14.object(compileShape(z14, spec.fields));
359
+ return z15.object(compileShape(z15, 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(z14, spec) {
366
+ function compileUndescribed(z15, spec) {
367
367
  if (spec.kind === "optional") {
368
- return compileUndescribed(z14, spec.inner).optional();
368
+ return compileUndescribed(z15, spec.inner).optional();
369
369
  }
370
370
  if (spec.kind === "nullable") {
371
- return compileUndescribed(z14, spec.inner).nullable();
371
+ return compileUndescribed(z15, spec.inner).nullable();
372
372
  }
373
- return compileBase(z14, spec);
373
+ return compileBase(z15, spec);
374
374
  }
375
- function compileField(z14, spec) {
376
- const schema = compileUndescribed(z14, spec);
375
+ function compileField(z15, spec) {
376
+ const schema = compileUndescribed(z15, spec);
377
377
  const desc = descriptionOf(spec);
378
378
  return desc === void 0 ? schema : schema.describe(desc);
379
379
  }
380
- function compileShape(z14, fields) {
380
+ function compileShape(z15, fields) {
381
381
  const shape = {};
382
382
  for (const [key, spec] of Object.entries(fields)) {
383
- shape[key] = compileField(z14, spec);
383
+ shape[key] = compileField(z15, spec);
384
384
  }
385
385
  return shape;
386
386
  }
@@ -2354,7 +2354,7 @@ var TOOL_CONTRACTS = Object.fromEntries(
2354
2354
  );
2355
2355
 
2356
2356
  // src/tools/contract-tool.ts
2357
- import { z as z3 } from "zod";
2357
+ import { z as z3 } from "zod/v3";
2358
2358
  function mcpShape(surface) {
2359
2359
  return compileShape(z3, surface.fields);
2360
2360
  }
@@ -2423,7 +2423,7 @@ function registerConnectionTools(server2, conn2) {
2423
2423
  }
2424
2424
 
2425
2425
  // src/tools/project-config.ts
2426
- import { z as z5 } from "zod";
2426
+ import { z as z5 } from "zod/v3";
2427
2427
  var CONTEXT_LINK_LOCATOR_MAX = 300;
2428
2428
  function jsonResult(data) {
2429
2429
  return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
@@ -2658,7 +2658,7 @@ function registerProjectConfigTools(server2, conn2) {
2658
2658
  }
2659
2659
 
2660
2660
  // src/tools/tasks.ts
2661
- import { z as z6 } from "zod";
2661
+ import { z as z6 } from "zod/v3";
2662
2662
 
2663
2663
  // src/tools/tasks-format.ts
2664
2664
  function formatCompletedMeta(data) {
@@ -3105,7 +3105,7 @@ function registerTaskTools(server2, conn2) {
3105
3105
  }
3106
3106
 
3107
3107
  // src/tools/builds.ts
3108
- import { z as z7 } from "zod";
3108
+ import { z as z7 } from "zod/v3";
3109
3109
  function textResult2(result) {
3110
3110
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
3111
3111
  }
@@ -3204,7 +3204,7 @@ function registerBuildTools(server2, conn2) {
3204
3204
  // src/tools/attachments.ts
3205
3205
  import { readFile, stat } from "fs/promises";
3206
3206
  import { basename, extname } from "path";
3207
- import { z as z8 } from "zod";
3207
+ import { z as z8 } from "zod/v3";
3208
3208
  var MAX_FILE_SIZE_BYTES = 25 * 1024 * 1024;
3209
3209
  var MAX_FILE_TAGS = 5;
3210
3210
  var MIME_BY_EXT = {
@@ -3516,8 +3516,8 @@ function registerSuggestionTools(server2, conn2) {
3516
3516
  // ../shared/dist/index.js
3517
3517
  import { z as z9 } from "zod";
3518
3518
  import { z as z23 } from "zod";
3519
- import { z as z32 } from "zod";
3520
3519
  import { z as z42 } from "zod";
3520
+ import { z as z32 } from "zod";
3521
3521
  import { z as z52 } from "zod";
3522
3522
  import { z as z62 } from "zod";
3523
3523
  import { z as z72 } from "zod";
@@ -3526,6 +3526,7 @@ import { z as z92 } from "zod";
3526
3526
  import { z as z10 } from "zod";
3527
3527
  import { z as z11 } from "zod";
3528
3528
  import { z as z12 } from "zod";
3529
+ import { z as z13 } from "zod";
3529
3530
  var ACHIEVEMENT_RARITIES = [
3530
3531
  {
3531
3532
  key: "common",
@@ -3784,29 +3785,120 @@ var AgentEventSchema = z23.union([
3784
3785
  KnownAgentEventSchema,
3785
3786
  z23.object({ type: z23.string().min(1) }).catchall(z23.unknown())
3786
3787
  ]);
3787
- var cardDescription = z32.string().max(CARD_DESCRIPTION_MAX, CARD_DESCRIPTION_LIMIT_MESSAGE).optional();
3788
- var AgentHeartbeatSchema = z32.object({
3789
- sessionId: z32.string().optional(),
3790
- timestamp: z32.string(),
3791
- status: z32.enum(["active", "idle", "building"]),
3792
- currentAction: z32.string().optional(),
3788
+ var PtyChatAtSchema = z32.string().max(40).optional();
3789
+ var PtyChatTurnUsageSchema = z32.object({
3790
+ input: z32.number().int().nonnegative(),
3791
+ output: z32.number().int().nonnegative(),
3792
+ cacheRead: z32.number().int().nonnegative(),
3793
+ cacheWrite: z32.number().int().nonnegative()
3794
+ });
3795
+ var PtyChatTurnFileSchema = z32.object({
3796
+ path: z32.string().max(500),
3797
+ added: z32.number().int(),
3798
+ removed: z32.number().int()
3799
+ });
3800
+ var PTY_CHAT_TURN_FILES_MAX = 50;
3801
+ var PtyChatEventPayloadSchema = z32.discriminatedUnion("kind", [
3802
+ z32.object({
3803
+ kind: z32.literal("init"),
3804
+ at: PtyChatAtSchema,
3805
+ model: z32.string().max(200),
3806
+ claudeSessionId: z32.string().max(100).optional()
3807
+ }),
3808
+ z32.object({
3809
+ kind: z32.literal("user_text"),
3810
+ at: PtyChatAtSchema,
3811
+ text: z32.string().max(16384),
3812
+ // Set by the SERVER (never the agent) when this prompt was injected by
3813
+ // Conveyor rather than typed by a human — the routed message's `source`
3814
+ // (`ci_success`, `review_trigger`, `automated_feedback`, …). The agent
3815
+ // pastes automated messages into the TUI exactly like human prompts, so the
3816
+ // CLI records both as plain transcript `user` records; without this the
3817
+ // builder chat renders "All CI checks passed on your PR." as the human's
3818
+ // own bubble. Absent ⇒ a genuine human prompt. Exception: the AGENT sets
3819
+ // `model_switch` on the notice it emits after a live model/effort switch.
3820
+ source: z32.string().max(60).optional()
3821
+ }),
3822
+ z32.object({
3823
+ kind: z32.literal("assistant_text"),
3824
+ at: PtyChatAtSchema,
3825
+ text: z32.string().max(16384),
3826
+ model: z32.string().max(200).optional()
3827
+ }),
3828
+ z32.object({
3829
+ kind: z32.literal("tool_use"),
3830
+ at: PtyChatAtSchema,
3831
+ name: z32.string().max(200),
3832
+ // Compact preview: JSON.stringify(input) truncated agent-side. The cap
3833
+ // matches the text events because AskUserQuestion payloads ride this field
3834
+ // and the web lifts them into an interactive card — a tight cap forced
3835
+ // option descriptions down to 80 chars, making them unreadable. Every
3836
+ // other tool keeps a far smaller agent-side budget (`TOOL_INPUT_MAX` in
3837
+ // `chat-record-mapper.ts`), so the ring does not grow for normal calls.
3838
+ input: z32.string().max(16384),
3839
+ // Transcript tool_use block id — lets the client pair the tool_result.
3840
+ id: z32.string().max(100).optional()
3841
+ }),
3842
+ z32.object({
3843
+ kind: z32.literal("tool_result"),
3844
+ at: PtyChatAtSchema,
3845
+ // tool_use block id this result answers (absent on malformed records).
3846
+ toolUseId: z32.string().max(100).optional(),
3847
+ // Compact output preview, truncated agent-side.
3848
+ output: z32.string().max(2e3),
3849
+ isError: z32.boolean().optional()
3850
+ }),
3851
+ z32.object({
3852
+ kind: z32.literal("turn_end"),
3853
+ at: PtyChatAtSchema,
3854
+ // Wall-clock turn length as the CLI measured it ("Worked for 23s").
3855
+ durationMs: z32.number().int().nonnegative().optional(),
3856
+ // Last model that answered in this turn.
3857
+ model: z32.string().max(200).optional(),
3858
+ // Token usage summed over the turn's API responses.
3859
+ usage: PtyChatTurnUsageSchema.optional(),
3860
+ // Files the turn edited, with line counts. Absent when nothing was edited.
3861
+ files: z32.array(PtyChatTurnFileSchema).max(PTY_CHAT_TURN_FILES_MAX).optional()
3862
+ })
3863
+ ]);
3864
+ var PtyChatEventRequestSchema = z32.object({
3865
+ sessionId: z32.string(),
3866
+ event: PtyChatEventPayloadSchema
3867
+ });
3868
+ var PtyChatAttachRequestSchema = z32.object({
3869
+ sessionId: z32.string()
3870
+ });
3871
+ var PTY_EFFORT_LEVELS = ["low", "medium", "high", "xhigh", "max"];
3872
+ var SetPtyModelEffortRequestSchema = z32.object({
3873
+ sessionId: z32.string(),
3874
+ model: z32.string().min(1).max(200).optional(),
3875
+ effort: z32.enum(PTY_EFFORT_LEVELS).optional()
3876
+ }).refine((p) => p.model !== void 0 || p.effort !== void 0, {
3877
+ message: "model or effort is required"
3878
+ });
3879
+ var cardDescription = z42.string().max(CARD_DESCRIPTION_MAX, CARD_DESCRIPTION_LIMIT_MESSAGE).optional();
3880
+ var AgentHeartbeatSchema = z42.object({
3881
+ sessionId: z42.string().optional(),
3882
+ timestamp: z42.string(),
3883
+ status: z42.enum(["active", "idle", "building"]),
3884
+ currentAction: z42.string().optional(),
3793
3885
  /** Sender-observed main event-loop lag (ms) — see AgentHeartbeat.loopLagMs. */
3794
- loopLagMs: z32.number().nonnegative().optional()
3886
+ loopLagMs: z42.number().nonnegative().optional()
3795
3887
  });
3796
- var CreatePRInputSchema = z32.object({
3797
- title: z32.string().min(1),
3798
- body: z32.string(),
3799
- head: z32.string().optional(),
3800
- base: z32.string().optional()
3888
+ var CreatePRInputSchema = z42.object({
3889
+ title: z42.string().min(1),
3890
+ body: z42.string(),
3891
+ head: z42.string().optional(),
3892
+ base: z42.string().optional()
3801
3893
  });
3802
- var PostToChatInputSchema = z32.object({
3803
- message: z32.string().min(1),
3804
- type: z32.enum(["message", "question", "update"]).optional().default("message"),
3805
- milestone: z32.enum(["plan_ready", "implementation_complete", "blocked"]).optional()
3894
+ var PostToChatInputSchema = z42.object({
3895
+ message: z42.string().min(1),
3896
+ type: z42.enum(["message", "question", "update"]).optional().default("message"),
3897
+ milestone: z42.enum(["plan_ready", "implementation_complete", "blocked"]).optional()
3806
3898
  });
3807
- var GetTaskContextRequestSchema = z32.object({
3808
- sessionId: z32.string(),
3809
- includeHistory: z32.boolean().optional().default(false),
3899
+ var GetTaskContextRequestSchema = z42.object({
3900
+ sessionId: z42.string(),
3901
+ includeHistory: z42.boolean().optional().default(false),
3810
3902
  /**
3811
3903
  * Read the plan-revised marker WITHOUT consuming it. Bookkeeping fetches
3812
3904
  * (the session-identity check, the branch refresh) pass true so they cannot
@@ -3814,283 +3906,283 @@ var GetTaskContextRequestSchema = z32.object({
3814
3906
  * Defaults to false — consuming — so a pod running an older agent build still
3815
3907
  * clears the marker instead of showing the notice on every boot forever.
3816
3908
  */
3817
- peekPlanRevision: z32.boolean().optional().default(false)
3909
+ peekPlanRevision: z42.boolean().optional().default(false)
3818
3910
  });
3819
- var GetChatMessagesRequestSchema = z32.object({
3820
- sessionId: z32.string(),
3821
- limit: z32.number().int().positive().optional().default(50),
3822
- offset: z32.number().int().nonnegative().optional().default(0),
3911
+ var GetChatMessagesRequestSchema = z42.object({
3912
+ sessionId: z42.string(),
3913
+ limit: z42.number().int().positive().optional().default(50),
3914
+ offset: z42.number().int().nonnegative().optional().default(0),
3823
3915
  /** Task id or slug to read chat from. Omit for the session's own task. Only
3824
3916
  * the session's own task or one of its children resolves — anything else is
3825
3917
  * an error, never a silent fallback to the caller's own chat. */
3826
- taskId: z32.string().optional()
3918
+ taskId: z42.string().optional()
3827
3919
  });
3828
- var GetTaskFilesRequestSchema = z32.object({
3829
- sessionId: z32.string(),
3830
- taskId: z32.string().optional()
3920
+ var GetTaskFilesRequestSchema = z42.object({
3921
+ sessionId: z42.string(),
3922
+ taskId: z42.string().optional()
3831
3923
  });
3832
- var GetTaskFileRequestSchema = z32.object({
3833
- sessionId: z32.string(),
3834
- fileId: z32.string(),
3835
- taskId: z32.string().optional()
3924
+ var GetTaskFileRequestSchema = z42.object({
3925
+ sessionId: z42.string(),
3926
+ fileId: z42.string(),
3927
+ taskId: z42.string().optional()
3836
3928
  });
3837
- var DeleteTaskFileRequestSchema = z32.object({
3838
- sessionId: z32.string(),
3839
- fileId: z32.string()
3929
+ var DeleteTaskFileRequestSchema = z42.object({
3930
+ sessionId: z42.string(),
3931
+ fileId: z42.string()
3840
3932
  });
3841
- var GetTaskRequestSchema = z32.object({
3842
- sessionId: z32.string(),
3843
- taskSlugOrId: z32.string()
3933
+ var GetTaskRequestSchema = z42.object({
3934
+ sessionId: z42.string(),
3935
+ taskSlugOrId: z42.string()
3844
3936
  });
3845
- var GetCliHistoryRequestSchema = z32.object({
3846
- sessionId: z32.string(),
3847
- limit: z32.number().int().positive().optional().default(100),
3848
- source: z32.enum(["agent", "application"]).optional(),
3937
+ var GetCliHistoryRequestSchema = z42.object({
3938
+ sessionId: z42.string(),
3939
+ limit: z42.number().int().positive().optional().default(100),
3940
+ source: z42.enum(["agent", "application"]).optional(),
3849
3941
  /** Task id or slug to read logs from. Omit for the session's own task. Only
3850
3942
  * the session's own task or one of its children resolves — anything else is
3851
3943
  * an error, never a silent fallback to the caller's own logs. */
3852
- taskId: z32.string().optional()
3944
+ taskId: z42.string().optional()
3853
3945
  });
3854
- var ListSubtasksRequestSchema = z32.object({
3855
- sessionId: z32.string(),
3946
+ var ListSubtasksRequestSchema = z42.object({
3947
+ sessionId: z42.string(),
3856
3948
  /** "compact" returns the slim orchestration view (ListSubtasksCompactResponse:
3857
3949
  * per-child status, agent, story points, PR state, dependencies); "full" (default — wire-compat with older
3858
3950
  * agents) returns the verbose SubtaskSummaryDTO[] including description/plan. */
3859
- view: z32.enum(["compact", "full"]).optional()
3951
+ view: z42.enum(["compact", "full"]).optional()
3860
3952
  });
3861
- var GetDependenciesRequestSchema = z32.object({
3862
- sessionId: z32.string()
3953
+ var GetDependenciesRequestSchema = z42.object({
3954
+ sessionId: z42.string()
3863
3955
  });
3864
- var GetSuggestionsRequestSchema = z32.object({
3865
- sessionId: z32.string(),
3866
- status: z32.string().optional(),
3867
- limit: z32.number().int().min(1).max(100).optional()
3956
+ var GetSuggestionsRequestSchema = z42.object({
3957
+ sessionId: z42.string(),
3958
+ status: z42.string().optional(),
3959
+ limit: z42.number().int().min(1).max(100).optional()
3868
3960
  });
3869
- var ListManualTestsRequestSchema = z32.object({
3870
- sessionId: z32.string()
3961
+ var ListManualTestsRequestSchema = z42.object({
3962
+ sessionId: z42.string()
3871
3963
  });
3872
- var QueryManualTestsRequestSchema = z32.object({
3873
- sessionId: z32.string(),
3874
- cardStatuses: z32.array(z32.string()).optional(),
3875
- testStatuses: z32.array(z32.enum(["open", "approved", "rejected"])).optional()
3964
+ var QueryManualTestsRequestSchema = z42.object({
3965
+ sessionId: z42.string(),
3966
+ cardStatuses: z42.array(z42.string()).optional(),
3967
+ testStatuses: z42.array(z42.enum(["open", "approved", "rejected"])).optional()
3876
3968
  });
3877
- var CreatePullRequestRequestSchema = CreatePRInputSchema.extend({ sessionId: z32.string() });
3878
- var RequestFileUploadRequestSchema = z32.object({
3879
- sessionId: z32.string(),
3880
- fileName: z32.string().min(1).max(255),
3881
- mimeType: z32.string().min(1).max(128),
3882
- fileSize: z32.number().int().positive().max(MAX_FILE_SIZE_BYTES2)
3969
+ var CreatePullRequestRequestSchema = CreatePRInputSchema.extend({ sessionId: z42.string() });
3970
+ var RequestFileUploadRequestSchema = z42.object({
3971
+ sessionId: z42.string(),
3972
+ fileName: z42.string().min(1).max(255),
3973
+ mimeType: z42.string().min(1).max(128),
3974
+ fileSize: z42.number().int().positive().max(MAX_FILE_SIZE_BYTES2)
3883
3975
  });
3884
- var ConfirmFileUploadRequestSchema = z32.object({
3885
- sessionId: z32.string(),
3886
- fileId: z32.string(),
3887
- title: z32.string().max(500).optional(),
3976
+ var ConfirmFileUploadRequestSchema = z42.object({
3977
+ sessionId: z42.string(),
3978
+ fileId: z42.string(),
3979
+ title: z42.string().max(500).optional(),
3888
3980
  /** Glossary tag names (or ids) this file is an example of. */
3889
- tags: z32.array(z32.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS2).optional()
3981
+ tags: z42.array(z42.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS2).optional()
3890
3982
  });
3891
- var UpdateTaskStatusRequestSchema = z32.object({
3892
- sessionId: z32.string(),
3893
- status: z32.string(),
3894
- force: z32.boolean().optional().default(false)
3983
+ var UpdateTaskStatusRequestSchema = z42.object({
3984
+ sessionId: z42.string(),
3985
+ status: z42.string(),
3986
+ force: z42.boolean().optional().default(false)
3895
3987
  });
3896
- var StoreSessionIdRequestSchema = z32.object({
3897
- sessionId: z32.string(),
3898
- sdkSessionId: z32.string()
3988
+ var StoreSessionIdRequestSchema = z42.object({
3989
+ sessionId: z42.string(),
3990
+ sdkSessionId: z42.string()
3899
3991
  });
3900
- var SetManualTestsRequestSchema = z32.object({
3901
- sessionId: z32.string(),
3992
+ var SetManualTestsRequestSchema = z42.object({
3993
+ sessionId: z42.string(),
3902
3994
  items: ManualTestItemsSchema
3903
3995
  });
3904
- var EditManualTestRequestSchema = z32.object({
3905
- sessionId: z32.string(),
3906
- title: z32.string().min(1),
3907
- newTitle: z32.string().min(1)
3996
+ var EditManualTestRequestSchema = z42.object({
3997
+ sessionId: z42.string(),
3998
+ title: z42.string().min(1),
3999
+ newTitle: z42.string().min(1)
3908
4000
  });
3909
- var RemoveManualTestRequestSchema = z32.object({
3910
- sessionId: z32.string(),
3911
- title: z32.string().min(1)
4001
+ var RemoveManualTestRequestSchema = z42.object({
4002
+ sessionId: z42.string(),
4003
+ title: z42.string().min(1)
3912
4004
  });
3913
- var ApproveManualTestRequestSchema = z32.object({
3914
- sessionId: z32.string(),
3915
- title: z32.string().min(1)
4005
+ var ApproveManualTestRequestSchema = z42.object({
4006
+ sessionId: z42.string(),
4007
+ title: z42.string().min(1)
3916
4008
  });
3917
- var RejectManualTestRequestSchema = z32.object({
3918
- sessionId: z32.string(),
3919
- title: z32.string().min(1),
3920
- reason: z32.string().min(1).max(2e3)
4009
+ var RejectManualTestRequestSchema = z42.object({
4010
+ sessionId: z42.string(),
4011
+ title: z42.string().min(1),
4012
+ reason: z42.string().min(1).max(2e3)
3921
4013
  });
3922
- var SessionStartRequestSchema = z32.object({
3923
- sessionId: z32.string(),
3924
- agentVersion: z32.string(),
3925
- capabilities: z32.array(z32.string())
4014
+ var SessionStartRequestSchema = z42.object({
4015
+ sessionId: z42.string(),
4016
+ agentVersion: z42.string(),
4017
+ capabilities: z42.array(z42.string())
3926
4018
  });
3927
- var SessionStopRequestSchema = z32.object({
3928
- sessionId: z32.string(),
3929
- reason: z32.string().optional()
4019
+ var SessionStopRequestSchema = z42.object({
4020
+ sessionId: z42.string(),
4021
+ reason: z42.string().optional()
3930
4022
  });
3931
- var EndReviewSessionRequestSchema = z32.object({
3932
- sessionId: z32.string(),
3933
- reason: z32.enum(["approved", "changes_requested", "finished"]).optional()
4023
+ var EndReviewSessionRequestSchema = z42.object({
4024
+ sessionId: z42.string(),
4025
+ reason: z42.enum(["approved", "changes_requested", "finished"]).optional()
3934
4026
  });
3935
- var ConnectAgentRequestSchema = z32.object({
3936
- sessionId: z32.string()
4027
+ var ConnectAgentRequestSchema = z42.object({
4028
+ sessionId: z42.string()
3937
4029
  });
3938
- var ReportAgentStatusRequestSchema = z32.object({
3939
- sessionId: z32.string(),
3940
- status: z32.string(),
4030
+ var ReportAgentStatusRequestSchema = z42.object({
4031
+ sessionId: z42.string(),
4032
+ status: z42.string(),
3941
4033
  /** Why the agent reports this status (e.g. "user_question" while an AskUserQuestion questionnaire is pending in the TUI). */
3942
- reason: z32.string().optional(),
4034
+ reason: z42.string().optional(),
3943
4035
  /**
3944
4036
  * The pending question text, sent only alongside `reason: "user_question"`
3945
4037
  * so the server can surface it in the user-question notification body (and
3946
4038
  * thus the Attention feed) instead of a generic string. Optional: older
3947
4039
  * agents omit it and the server falls back to the generic wording.
3948
4040
  */
3949
- questionText: z32.string().optional()
4041
+ questionText: z42.string().optional()
3950
4042
  });
3951
- var NotifyAgentVersionRequestSchema = z32.object({
3952
- sessionId: z32.string(),
3953
- agentVersion: z32.string()
4043
+ var NotifyAgentVersionRequestSchema = z42.object({
4044
+ sessionId: z42.string(),
4045
+ agentVersion: z42.string()
3954
4046
  });
3955
- var DiscoveredPortSchema = z32.object({
3956
- port: z32.number().int().min(1).max(65535),
3957
- label: z32.string().min(1).max(64).optional(),
3958
- protocol: z32.enum(["http", "tcp"]).optional(),
3959
- detectedAt: z32.string()
4047
+ var DiscoveredPortSchema = z42.object({
4048
+ port: z42.number().int().min(1).max(65535),
4049
+ label: z42.string().min(1).max(64).optional(),
4050
+ protocol: z42.enum(["http", "tcp"]).optional(),
4051
+ detectedAt: z42.string()
3960
4052
  });
3961
- var ReportDiscoveredPortsRequestSchema = z32.object({
3962
- sessionId: z32.string(),
3963
- ports: z32.array(DiscoveredPortSchema).max(64)
4053
+ var ReportDiscoveredPortsRequestSchema = z42.object({
4054
+ sessionId: z42.string(),
4055
+ ports: z42.array(DiscoveredPortSchema).max(64)
3964
4056
  });
3965
- var ReportBootMilestoneRequestSchema = z32.object({
3966
- sessionId: z32.string(),
3967
- key: z32.string().max(64)
4057
+ var ReportBootMilestoneRequestSchema = z42.object({
4058
+ sessionId: z42.string(),
4059
+ key: z42.string().max(64)
3968
4060
  });
3969
- var CreateSubtaskRequestSchema = z32.object({
3970
- sessionId: z32.string(),
3971
- title: z32.string().min(1),
4061
+ var CreateSubtaskRequestSchema = z42.object({
4062
+ sessionId: z42.string(),
4063
+ title: z42.string().min(1),
3972
4064
  description: cardDescription,
3973
- plan: z32.string().optional(),
3974
- storyPointValue: z32.number().int().positive().optional(),
3975
- ordinal: z32.number().int().nonnegative().optional(),
3976
- followParentStatus: z32.boolean().optional(),
4065
+ plan: z42.string().optional(),
4066
+ storyPointValue: z42.number().int().positive().optional(),
4067
+ ordinal: z42.number().int().nonnegative().optional(),
4068
+ followParentStatus: z42.boolean().optional(),
3977
4069
  /** Sibling subtask ids or slugs this subtask blocks on (explicit dependency
3978
4070
  * metadata — preferred over encoding order in plan text / ordinal). */
3979
- dependsOn: z32.array(z32.string().min(1)).max(32).optional(),
4071
+ dependsOn: z42.array(z42.string().min(1)).max(32).optional(),
3980
4072
  /** Glossary tag names to assign to the child. Unmatched names come back in
3981
4073
  * the response rather than failing the create. */
3982
- tags: z32.array(z32.string().min(1)).max(10).optional()
4074
+ tags: z42.array(z42.string().min(1)).max(10).optional()
3983
4075
  });
3984
- var UpdateSubtaskRequestSchema = z32.object({
3985
- sessionId: z32.string(),
3986
- subtaskId: z32.string(),
3987
- title: z32.string().min(1).optional(),
4076
+ var UpdateSubtaskRequestSchema = z42.object({
4077
+ sessionId: z42.string(),
4078
+ subtaskId: z42.string(),
4079
+ title: z42.string().min(1).optional(),
3988
4080
  description: cardDescription,
3989
- plan: z32.string().optional(),
4081
+ plan: z42.string().optional(),
3990
4082
  /** Orchestration statuses only ("Planning" | "Open") — the pack parent's
3991
4083
  * sanctioned promotion path. Execution statuses stay with the build
3992
4084
  * pipeline / force_update_task_status. Enforced server-side. */
3993
- status: z32.string().optional(),
4085
+ status: z42.string().optional(),
3994
4086
  /** Assign a project agent to the child — accepts the agent's id or exact
3995
4087
  * name; resolved against the parent task's project server-side. */
3996
- agentIdOrName: z32.string().min(1).optional(),
3997
- storyPointValue: z32.number().int().positive().optional(),
3998
- followParentStatus: z32.boolean().optional(),
4088
+ agentIdOrName: z42.string().min(1).optional(),
4089
+ storyPointValue: z42.number().int().positive().optional(),
4090
+ followParentStatus: z42.boolean().optional(),
3999
4091
  /** Replace this subtask's dependency edges with these sibling ids/slugs.
4000
4092
  * Empty array clears all. Omit to leave dependencies unchanged. */
4001
- dependsOn: z32.array(z32.string().min(1)).max(32).optional()
4093
+ dependsOn: z42.array(z42.string().min(1)).max(32).optional()
4002
4094
  });
4003
- var DeleteSubtaskRequestSchema = z32.object({
4004
- sessionId: z32.string(),
4005
- subtaskId: z32.string()
4095
+ var DeleteSubtaskRequestSchema = z42.object({
4096
+ sessionId: z42.string(),
4097
+ subtaskId: z42.string()
4006
4098
  });
4007
- var SetSubtaskParentRequestSchema = z32.object({
4008
- sessionId: z32.string(),
4009
- taskId: z32.string().min(1),
4010
- detach: z32.boolean().optional(),
4011
- ordinal: z32.number().int().nonnegative().optional(),
4012
- followParentStatus: z32.boolean().optional()
4099
+ var SetSubtaskParentRequestSchema = z42.object({
4100
+ sessionId: z42.string(),
4101
+ taskId: z42.string().min(1),
4102
+ detach: z42.boolean().optional(),
4103
+ ordinal: z42.number().int().nonnegative().optional(),
4104
+ followParentStatus: z42.boolean().optional()
4013
4105
  });
4014
- var GetTaskPropertiesRequestSchema = z32.object({
4015
- sessionId: z32.string()
4106
+ var GetTaskPropertiesRequestSchema = z42.object({
4107
+ sessionId: z42.string()
4016
4108
  });
4017
- var UpdateTaskFieldsRequestSchema = z32.object({
4018
- sessionId: z32.string(),
4019
- plan: z32.string().optional(),
4109
+ var UpdateTaskFieldsRequestSchema = z42.object({
4110
+ sessionId: z42.string(),
4111
+ plan: z42.string().optional(),
4020
4112
  description: cardDescription
4021
4113
  });
4022
- var UpdateTaskPropertiesRequestSchema = z32.object({
4023
- sessionId: z32.string(),
4024
- title: z32.string().optional(),
4025
- storyPointValue: z32.number().int().positive().optional(),
4026
- tagIds: z32.array(z32.string()).optional(),
4027
- tagNames: z32.array(z32.string()).optional(),
4028
- githubPRUrl: z32.string().url().optional(),
4029
- githubBranch: z32.string().optional(),
4114
+ var UpdateTaskPropertiesRequestSchema = z42.object({
4115
+ sessionId: z42.string(),
4116
+ title: z42.string().optional(),
4117
+ storyPointValue: z42.number().int().positive().optional(),
4118
+ tagIds: z42.array(z42.string()).optional(),
4119
+ tagNames: z42.array(z42.string()).optional(),
4120
+ githubPRUrl: z42.string().url().optional(),
4121
+ githubBranch: z42.string().optional(),
4030
4122
  // Canonical risk level, or null to clear — same semantics as the headless
4031
4123
  // update_task boundary (resolved to the project's Risk row in the handler).
4032
4124
  risk: riskLevelSchema.nullable().optional()
4033
4125
  });
4034
- var ListIconsRequestSchema = z32.object({
4035
- sessionId: z32.string()
4126
+ var ListIconsRequestSchema = z42.object({
4127
+ sessionId: z42.string()
4036
4128
  });
4037
- var GenerateTaskIconRequestSchema = z32.object({
4038
- sessionId: z32.string(),
4039
- prompt: z32.string().min(1),
4040
- aspectRatio: z32.string().optional()
4129
+ var GenerateTaskIconRequestSchema = z42.object({
4130
+ sessionId: z42.string(),
4131
+ prompt: z42.string().min(1),
4132
+ aspectRatio: z42.string().optional()
4041
4133
  });
4042
- var SearchFaIconsRequestSchema = z32.object({
4043
- sessionId: z32.string(),
4044
- query: z32.string().min(1),
4045
- first: z32.number().int().positive().optional()
4134
+ var SearchFaIconsRequestSchema = z42.object({
4135
+ sessionId: z42.string(),
4136
+ query: z42.string().min(1),
4137
+ first: z42.number().int().positive().optional()
4046
4138
  });
4047
- var PickFaIconRequestSchema = z32.object({
4048
- sessionId: z32.string(),
4049
- fontAwesomeId: z32.string().min(1),
4050
- fontAwesomeStyle: z32.string().optional()
4139
+ var PickFaIconRequestSchema = z42.object({
4140
+ sessionId: z42.string(),
4141
+ fontAwesomeId: z42.string().min(1),
4142
+ fontAwesomeStyle: z42.string().optional()
4051
4143
  });
4052
- var CreateFollowUpTaskRequestSchema = z32.object({
4053
- sessionId: z32.string(),
4054
- title: z32.string().min(1),
4144
+ var CreateFollowUpTaskRequestSchema = z42.object({
4145
+ sessionId: z42.string(),
4146
+ title: z42.string().min(1),
4055
4147
  description: cardDescription,
4056
- plan: z32.string().optional(),
4057
- storyPointValue: z32.number().int().positive().optional()
4148
+ plan: z42.string().optional(),
4149
+ storyPointValue: z42.number().int().positive().optional()
4058
4150
  });
4059
- var AddDependencyRequestSchema = z32.object({
4060
- sessionId: z32.string(),
4061
- dependsOnSlugOrId: z32.string()
4151
+ var AddDependencyRequestSchema = z42.object({
4152
+ sessionId: z42.string(),
4153
+ dependsOnSlugOrId: z42.string()
4062
4154
  });
4063
- var RemoveDependencyRequestSchema = z32.object({
4064
- sessionId: z32.string(),
4065
- dependsOnSlugOrId: z32.string()
4155
+ var RemoveDependencyRequestSchema = z42.object({
4156
+ sessionId: z42.string(),
4157
+ dependsOnSlugOrId: z42.string()
4066
4158
  });
4067
- var CreateSuggestionRequestSchema = z32.object({
4068
- sessionId: z32.string(),
4069
- title: z32.string().min(1),
4159
+ var CreateSuggestionRequestSchema = z42.object({
4160
+ sessionId: z42.string(),
4161
+ title: z42.string().min(1),
4070
4162
  description: cardDescription,
4071
- tagNames: z32.array(z32.string()).optional()
4163
+ tagNames: z42.array(z42.string()).optional()
4072
4164
  });
4073
- var VoteSuggestionRequestSchema = z32.object({
4074
- sessionId: z32.string(),
4075
- suggestionId: z32.string(),
4076
- value: z32.union([z32.literal(1), z32.literal(-1)])
4165
+ var VoteSuggestionRequestSchema = z42.object({
4166
+ sessionId: z42.string(),
4167
+ suggestionId: z42.string(),
4168
+ value: z42.union([z42.literal(1), z42.literal(-1)])
4077
4169
  });
4078
- var TriggerIdentificationRequestSchema = z32.object({
4079
- sessionId: z32.string()
4170
+ var TriggerIdentificationRequestSchema = z42.object({
4171
+ sessionId: z42.string()
4080
4172
  });
4081
- var HandoffToImplementerRequestSchema = z32.object({
4082
- sessionId: z32.string(),
4173
+ var HandoffToImplementerRequestSchema = z42.object({
4174
+ sessionId: z42.string(),
4083
4175
  // Optional difficulty sizing — sets the task's story points before resolving
4084
4176
  // the matched implementer agent. Omit to hand off using the task's current
4085
4177
  // story points (or the project's default task agent when unsized).
4086
- storyPoints: z32.number().int().positive().optional(),
4178
+ storyPoints: z42.number().int().positive().optional(),
4087
4179
  // Optional kickoff note posted to the task chat alongside the handoff notice.
4088
- message: z32.string().optional()
4180
+ message: z42.string().optional()
4089
4181
  });
4090
- var SubmitCodeReviewResultRequestSchema = z32.object({
4091
- sessionId: z32.string(),
4092
- approved: z32.boolean(),
4093
- content: z32.string(),
4182
+ var SubmitCodeReviewResultRequestSchema = z42.object({
4183
+ sessionId: z42.string(),
4184
+ approved: z42.boolean(),
4185
+ content: z42.string(),
4094
4186
  // Canonical risk level the reviewer assigned to this change. Required on every
4095
4187
  // verdict — the reviewer must judge it. Applied authoritatively server-side
4096
4188
  // (may raise OR lower an already-set value; the reviewer has that authority).
@@ -4098,244 +4190,195 @@ var SubmitCodeReviewResultRequestSchema = z32.object({
4098
4190
  // The commit SHA the reviewer actually reviewed. When present, the verdict is
4099
4191
  // rejected unless the task is still at this SHA (guards against a late
4100
4192
  // old-SHA verdict overwriting a newer review cycle).
4101
- reviewedSha: z32.string().optional()
4193
+ reviewedSha: z42.string().optional()
4102
4194
  });
4103
- var CycleCodingAgentKeyRequestSchema = z32.object({
4104
- sessionId: z32.string(),
4105
- rateLimitType: z32.string(),
4106
- resetsAt: z32.string().optional()
4195
+ var CycleCodingAgentKeyRequestSchema = z42.object({
4196
+ sessionId: z42.string(),
4197
+ rateLimitType: z42.string(),
4198
+ resetsAt: z42.string().optional()
4107
4199
  });
4108
- var PostChildChatMessageRequestSchema = z32.object({
4109
- sessionId: z32.string(),
4110
- childTaskId: z32.string(),
4111
- message: z32.string().min(1)
4200
+ var PostChildChatMessageRequestSchema = z42.object({
4201
+ sessionId: z42.string(),
4202
+ childTaskId: z42.string(),
4203
+ message: z42.string().min(1)
4112
4204
  });
4113
- var UpdateChildStatusRequestSchema = z32.object({
4114
- sessionId: z32.string(),
4115
- childTaskId: z32.string(),
4116
- status: z32.string()
4205
+ var UpdateChildStatusRequestSchema = z42.object({
4206
+ sessionId: z42.string(),
4207
+ childTaskId: z42.string(),
4208
+ status: z42.string()
4117
4209
  });
4118
- var GetAgentStatusRequestSchema = z32.object({
4119
- taskId: z32.string()
4210
+ var GetAgentStatusRequestSchema = z42.object({
4211
+ taskId: z42.string()
4120
4212
  });
4121
- var GetUiCliHistoryRequestSchema = z32.object({
4122
- taskId: z32.string()
4213
+ var GetUiCliHistoryRequestSchema = z42.object({
4214
+ taskId: z42.string()
4123
4215
  });
4124
- var GetActivePtySessionRequestSchema = z32.object({
4125
- taskId: z32.string()
4216
+ var GetActivePtySessionRequestSchema = z42.object({
4217
+ taskId: z42.string()
4126
4218
  });
4127
- var ListActivePtySessionsRequestSchema = z32.object({
4128
- taskId: z32.string()
4219
+ var ListActivePtySessionsRequestSchema = z42.object({
4220
+ taskId: z42.string()
4129
4221
  });
4130
- var SendSoftStopRequestSchema = z32.object({
4131
- taskId: z32.string()
4222
+ var SendSoftStopRequestSchema = z42.object({
4223
+ taskId: z42.string()
4132
4224
  });
4133
- var StopTaskSessionRequestSchema = z32.object({
4134
- taskId: z32.string(),
4135
- sessionId: z32.string()
4225
+ var StopTaskSessionRequestSchema = z42.object({
4226
+ taskId: z42.string(),
4227
+ sessionId: z42.string()
4136
4228
  });
4137
- var FlushTaskQueueRequestSchema = z32.object({
4138
- taskId: z32.string(),
4139
- softStop: z32.boolean().optional()
4229
+ var FlushTaskQueueRequestSchema = z42.object({
4230
+ taskId: z42.string(),
4231
+ softStop: z42.boolean().optional()
4140
4232
  });
4141
- var CancelTaskQueuedMessageRequestSchema = z32.object({
4142
- taskId: z32.string(),
4143
- messageId: z32.string()
4233
+ var CancelTaskQueuedMessageRequestSchema = z42.object({
4234
+ taskId: z42.string(),
4235
+ messageId: z42.string()
4144
4236
  });
4145
- var FlushSingleQueuedMessageRequestSchema = z32.object({
4146
- taskId: z32.string(),
4147
- messageId: z32.string(),
4148
- softStop: z32.boolean().optional()
4237
+ var FlushSingleQueuedMessageRequestSchema = z42.object({
4238
+ taskId: z42.string(),
4239
+ messageId: z42.string(),
4240
+ softStop: z42.boolean().optional()
4149
4241
  });
4150
- var AnswerAgentQuestionRequestSchema = z32.object({
4151
- taskId: z32.string(),
4152
- requestId: z32.string(),
4153
- answers: z32.record(z32.string(), z32.string())
4242
+ var AnswerAgentQuestionRequestSchema = z42.object({
4243
+ taskId: z42.string(),
4244
+ requestId: z42.string(),
4245
+ answers: z42.record(z42.string(), z42.string())
4154
4246
  });
4155
- var ClearAgentTodosRequestSchema = z32.object({
4156
- taskId: z32.string()
4247
+ var ClearAgentTodosRequestSchema = z42.object({
4248
+ taskId: z42.string()
4157
4249
  });
4158
- var AgentQuestionOptionSchema = z32.object({
4159
- label: z32.string(),
4160
- description: z32.string(),
4161
- preview: z32.string().optional()
4250
+ var AgentQuestionOptionSchema = z42.object({
4251
+ label: z42.string(),
4252
+ description: z42.string(),
4253
+ preview: z42.string().optional()
4162
4254
  });
4163
- var AgentQuestionSchema = z32.object({
4164
- question: z32.string(),
4165
- header: z32.string(),
4166
- options: z32.array(AgentQuestionOptionSchema),
4167
- multiSelect: z32.boolean().optional()
4255
+ var AgentQuestionSchema = z42.object({
4256
+ question: z42.string(),
4257
+ header: z42.string(),
4258
+ options: z42.array(AgentQuestionOptionSchema),
4259
+ multiSelect: z42.boolean().optional()
4168
4260
  });
4169
- var AskUserQuestionRequestSchema = z32.object({
4170
- sessionId: z32.string(),
4171
- question: z32.string().min(1),
4172
- requestId: z32.string().min(1),
4173
- questions: z32.array(AgentQuestionSchema).min(1)
4261
+ var AskUserQuestionRequestSchema = z42.object({
4262
+ sessionId: z42.string(),
4263
+ question: z42.string().min(1),
4264
+ requestId: z42.string().min(1),
4265
+ questions: z42.array(AgentQuestionSchema).min(1)
4174
4266
  });
4175
- var PostAgentMessageRequestSchema = z32.object({
4176
- sessionId: z32.string().min(1),
4177
- content: z32.string(),
4178
- milestone: z32.enum(["plan_ready", "implementation_complete", "blocked"]).optional()
4267
+ var PostAgentMessageRequestSchema = z42.object({
4268
+ sessionId: z42.string().min(1),
4269
+ content: z42.string(),
4270
+ milestone: z42.enum(["plan_ready", "implementation_complete", "blocked"]).optional()
4179
4271
  });
4180
- var EmitAgentEventRequestSchema = z32.object({
4181
- sessionId: z32.string(),
4182
- events: z32.array(AgentEventSchema).max(500)
4272
+ var EmitAgentEventRequestSchema = z42.object({
4273
+ sessionId: z42.string(),
4274
+ events: z42.array(AgentEventSchema).max(500)
4183
4275
  });
4184
- var RefreshGithubTokenRequestSchema = z32.object({
4185
- sessionId: z32.string(),
4186
- forceFresh: z32.boolean().optional()
4276
+ var RefreshGithubTokenRequestSchema = z42.object({
4277
+ sessionId: z42.string(),
4278
+ forceFresh: z42.boolean().optional()
4187
4279
  });
4188
- var ReportCredentialFailureRequestSchema = z32.object({
4189
- sessionId: z32.string(),
4190
- error: z32.string().max(2e3).optional(),
4191
- tokenShape: z32.string().max(500).optional(),
4192
- healed: z32.boolean().optional()
4280
+ var ReportCredentialFailureRequestSchema = z42.object({
4281
+ sessionId: z42.string(),
4282
+ error: z42.string().max(2e3).optional(),
4283
+ tokenShape: z42.string().max(500).optional(),
4284
+ healed: z42.boolean().optional()
4193
4285
  });
4194
- var ReportReviewSpawnFailureRequestSchema = z32.object({
4195
- sessionId: z32.string(),
4196
- reviewSessionId: z32.string(),
4197
- error: z32.string().max(2e3).optional()
4286
+ var ReportReviewSpawnFailureRequestSchema = z42.object({
4287
+ sessionId: z42.string(),
4288
+ reviewSessionId: z42.string(),
4289
+ error: z42.string().max(2e3).optional()
4198
4290
  });
4199
4291
  var ReportBuilderSpawnFailureRequestSchema = ReportReviewSpawnFailureRequestSchema.omit({
4200
4292
  reviewSessionId: true
4201
- }).extend({ buildSessionId: z32.string() });
4202
- var SpawnTaskSessionRequestSchema = z32.object({
4203
- taskId: z32.string(),
4204
- kind: z32.enum(["tui", "shell"])
4293
+ }).extend({ buildSessionId: z42.string() });
4294
+ var SpawnTaskSessionRequestSchema = z42.object({
4295
+ taskId: z42.string(),
4296
+ kind: z42.enum(["tui", "shell"])
4205
4297
  });
4206
- var StartCodeReviewRequestSchema = z32.object({
4207
- taskId: z32.string(),
4208
- force: z32.boolean().optional()
4298
+ var StartCodeReviewRequestSchema = z42.object({
4299
+ taskId: z42.string(),
4300
+ force: z42.boolean().optional()
4209
4301
  });
4210
- var StopCodeReviewRequestSchema = z32.object({
4211
- taskId: z32.string()
4302
+ var StopCodeReviewRequestSchema = z42.object({
4303
+ taskId: z42.string()
4212
4304
  });
4213
- var ReportSessionSpawnFailureRequestSchema = z32.object({
4214
- sessionId: z32.string(),
4215
- spawnedSessionId: z32.string(),
4216
- error: z32.string().max(2e3).optional()
4305
+ var ReportSessionSpawnFailureRequestSchema = z42.object({
4306
+ sessionId: z42.string(),
4307
+ spawnedSessionId: z42.string(),
4308
+ error: z42.string().max(2e3).optional()
4217
4309
  });
4218
- var RefreshGithubTokenResponseSchema = z32.object({
4219
- token: z32.string()
4310
+ var RefreshGithubTokenResponseSchema = z42.object({
4311
+ token: z42.string()
4220
4312
  });
4221
4313
  var PTY_FRAME_MAX_CHARS = 256 * 1024;
4222
4314
  var PTY_MAX_DIMENSION = 1e3;
4223
- var PtyOutputRequestSchema = z32.object({
4224
- sessionId: z32.string(),
4225
- data: z32.string().max(PTY_FRAME_MAX_CHARS),
4226
- cols: z32.number().int().positive().max(PTY_MAX_DIMENSION).optional(),
4227
- rows: z32.number().int().positive().max(PTY_MAX_DIMENSION).optional()
4228
- });
4229
- var PtyEndedRequestSchema = z32.object({
4230
- sessionId: z32.string()
4231
- });
4232
- var PtyInputRequestSchema = z32.object({
4233
- sessionId: z32.string(),
4234
- data: z32.string().max(PTY_FRAME_MAX_CHARS)
4315
+ var PtyOutputRequestSchema = z42.object({
4316
+ sessionId: z42.string(),
4317
+ data: z42.string().max(PTY_FRAME_MAX_CHARS),
4318
+ cols: z42.number().int().positive().max(PTY_MAX_DIMENSION).optional(),
4319
+ rows: z42.number().int().positive().max(PTY_MAX_DIMENSION).optional()
4235
4320
  });
4236
- var PtyResizeRequestSchema = z32.object({
4237
- sessionId: z32.string(),
4238
- cols: z32.number().int().positive().max(PTY_MAX_DIMENSION),
4239
- rows: z32.number().int().positive().max(PTY_MAX_DIMENSION)
4321
+ var PtyEndedRequestSchema = z42.object({
4322
+ sessionId: z42.string()
4240
4323
  });
4241
- var PtyAttachRequestSchema = z32.object({
4242
- sessionId: z32.string()
4324
+ var PtyInputRequestSchema = z42.object({
4325
+ sessionId: z42.string(),
4326
+ data: z42.string().max(PTY_FRAME_MAX_CHARS)
4243
4327
  });
4244
- var ReportPtyStreamRequestSchema = z32.object({
4245
- sessionId: z32.string(),
4246
- port: z32.number().int().positive().max(65535).nullable()
4328
+ var PtyResizeRequestSchema = z42.object({
4329
+ sessionId: z42.string(),
4330
+ cols: z42.number().int().positive().max(PTY_MAX_DIMENSION),
4331
+ rows: z42.number().int().positive().max(PTY_MAX_DIMENSION)
4247
4332
  });
4248
- var ReportPtyInputRequestSchema = z32.object({
4249
- sessionId: z32.string()
4333
+ var PtyAttachRequestSchema = z42.object({
4334
+ sessionId: z42.string()
4250
4335
  });
4251
- var GetPtyStreamEndpointRequestSchema = z32.object({
4252
- sessionId: z32.string()
4336
+ var ReportPtyStreamRequestSchema = z42.object({
4337
+ sessionId: z42.string(),
4338
+ port: z42.number().int().positive().max(65535).nullable()
4253
4339
  });
4254
- var PtyChatEventPayloadSchema = z32.discriminatedUnion("kind", [
4255
- z32.object({
4256
- kind: z32.literal("init"),
4257
- model: z32.string().max(200),
4258
- claudeSessionId: z32.string().max(100).optional()
4259
- }),
4260
- z32.object({
4261
- kind: z32.literal("user_text"),
4262
- text: z32.string().max(16384),
4263
- // Set by the SERVER (never the agent) when this prompt was injected by
4264
- // Conveyor rather than typed by a human — the routed message's `source`
4265
- // (`ci_success`, `review_trigger`, `automated_feedback`, …). The agent
4266
- // pastes automated messages into the TUI exactly like human prompts, so the
4267
- // CLI records both as plain transcript `user` records; without this the
4268
- // builder chat renders "All CI checks passed on your PR." as the human's
4269
- // own bubble. Absent ⇒ a genuine human prompt.
4270
- source: z32.string().max(60).optional()
4271
- }),
4272
- z32.object({ kind: z32.literal("assistant_text"), text: z32.string().max(16384) }),
4273
- z32.object({
4274
- kind: z32.literal("tool_use"),
4275
- name: z32.string().max(200),
4276
- // Compact preview: JSON.stringify(input) truncated agent-side. The cap
4277
- // matches the text events because AskUserQuestion payloads ride this field
4278
- // and the web lifts them into an interactive card — a tight cap forced
4279
- // option descriptions down to 80 chars, making them unreadable. Every
4280
- // other tool keeps a far smaller agent-side budget (`TOOL_INPUT_MAX` in
4281
- // `chat-record-mapper.ts`), so the ring does not grow for normal calls.
4282
- input: z32.string().max(16384),
4283
- // Transcript tool_use block id — lets the client pair the tool_result.
4284
- id: z32.string().max(100).optional()
4285
- }),
4286
- z32.object({
4287
- kind: z32.literal("tool_result"),
4288
- // tool_use block id this result answers (absent on malformed records).
4289
- toolUseId: z32.string().max(100).optional(),
4290
- // Compact output preview, truncated agent-side.
4291
- output: z32.string().max(2e3),
4292
- isError: z32.boolean().optional()
4293
- }),
4294
- z32.object({ kind: z32.literal("turn_end") })
4295
- ]);
4296
- var PtyChatEventRequestSchema = z32.object({
4297
- sessionId: z32.string(),
4298
- event: PtyChatEventPayloadSchema
4340
+ var ReportPtyInputRequestSchema = z42.object({
4341
+ sessionId: z42.string()
4299
4342
  });
4300
- var PtyChatAttachRequestSchema = z32.object({
4301
- sessionId: z32.string()
4343
+ var GetPtyStreamEndpointRequestSchema = z42.object({
4344
+ sessionId: z42.string()
4302
4345
  });
4303
- var CreatePRResponseSchema = z32.object({
4304
- prNumber: z32.number().int().positive(),
4305
- prUrl: z32.string().url(),
4346
+ var CreatePRResponseSchema = z42.object({
4347
+ prNumber: z42.number().int().positive(),
4348
+ prUrl: z42.string().url(),
4306
4349
  /** Advisory glossary-upkeep note derived from the PR's changed files matched
4307
4350
  * against tag contextPaths — rendered into the tool result, never stored. */
4308
- glossaryNote: z32.string().optional()
4351
+ glossaryNote: z42.string().optional()
4309
4352
  });
4310
- var PostToChatResponseSchema = z32.object({
4311
- messageId: z32.string()
4353
+ var PostToChatResponseSchema = z42.object({
4354
+ messageId: z42.string()
4312
4355
  });
4313
- var UpdateTaskStatusResponseSchema = z32.object({
4314
- taskId: z32.string(),
4315
- status: z32.string()
4356
+ var UpdateTaskStatusResponseSchema = z42.object({
4357
+ taskId: z42.string(),
4358
+ status: z42.string()
4316
4359
  });
4317
- var StoreSessionIdResponseSchema = z32.object({
4318
- success: z32.boolean()
4360
+ var StoreSessionIdResponseSchema = z42.object({
4361
+ success: z42.boolean()
4319
4362
  });
4320
- var HeartbeatResponseSchema = z32.object({
4321
- acknowledged: z32.boolean()
4363
+ var HeartbeatResponseSchema = z42.object({
4364
+ acknowledged: z42.boolean()
4322
4365
  });
4323
- var SessionStartResponseSchema = z32.object({
4324
- sessionId: z32.string(),
4325
- startedAt: z32.string()
4366
+ var SessionStartResponseSchema = z42.object({
4367
+ sessionId: z42.string(),
4368
+ startedAt: z42.string()
4326
4369
  });
4327
- var SessionStopResponseSchema = z32.object({
4328
- sessionId: z32.string(),
4329
- stoppedAt: z32.string()
4370
+ var SessionStopResponseSchema = z42.object({
4371
+ sessionId: z42.string(),
4372
+ stoppedAt: z42.string()
4330
4373
  });
4331
- var DeleteSubtaskResponseSchema = z32.object({
4332
- deleted: z32.boolean()
4374
+ var DeleteSubtaskResponseSchema = z42.object({
4375
+ deleted: z42.boolean()
4333
4376
  });
4334
- var ParkOnCheckResultRequestSchema = z42.object({
4335
- sessionId: z42.string(),
4336
- sha: z42.string().regex(/^[0-9a-f]{7,40}$/i).optional(),
4337
- prNumber: z42.number().int().positive().optional(),
4338
- timeoutMinutes: z42.number().int().min(1).max(MAX_CI_WAIT_TIMEOUT_MINUTES).optional()
4377
+ var ParkOnCheckResultRequestSchema = z52.object({
4378
+ sessionId: z52.string(),
4379
+ sha: z52.string().regex(/^[0-9a-f]{7,40}$/i).optional(),
4380
+ prNumber: z52.number().int().positive().optional(),
4381
+ timeoutMinutes: z52.number().int().min(1).max(MAX_CI_WAIT_TIMEOUT_MINUTES).optional()
4339
4382
  });
4340
4383
  var GIT_BRANCH_NAME_MAX = 255;
4341
4384
  var GIT_BRANCH_NAME_MESSAGE = "Invalid git branch name \u2014 use only letters, numbers, '.', '_', '/' and '-', starting with a letter or number, with no '..', '@{' or '//', and no trailing '/', '-', '.' or '.lock'";
@@ -4349,97 +4392,97 @@ function isValidGitBranchName(name) {
4349
4392
  if (name.endsWith(".") || name.endsWith(".lock")) return false;
4350
4393
  return true;
4351
4394
  }
4352
- var cardDescription2 = z52.string().max(CARD_DESCRIPTION_MAX, CARD_DESCRIPTION_LIMIT_MESSAGE).optional();
4353
- var ListAccessibleProjectsRequestSchema = z52.object({
4354
- pageSize: z52.number().int().positive().max(100).optional().default(100)
4395
+ var cardDescription2 = z62.string().max(CARD_DESCRIPTION_MAX, CARD_DESCRIPTION_LIMIT_MESSAGE).optional();
4396
+ var ListAccessibleProjectsRequestSchema = z62.object({
4397
+ pageSize: z62.number().int().positive().max(100).optional().default(100)
4355
4398
  });
4356
- var ListProjectTasksRequestSchema = z52.object({
4357
- projectId: z52.string(),
4358
- status: z52.string().optional(),
4399
+ var ListProjectTasksRequestSchema = z62.object({
4400
+ projectId: z62.string(),
4401
+ status: z62.string().optional(),
4359
4402
  // Card types to include. Omitted/empty → defaults to ["task"] in the handler
4360
4403
  // (mirrors searchProjectTasks) so listing doesn't surface incidents/suggestions
4361
4404
  // unless asked. Enum validation lives at the MCP tool layer.
4362
- typeFilters: z52.array(z52.string()).optional(),
4363
- assigneeId: z52.string().optional(),
4364
- unassigned: z52.boolean().optional(),
4405
+ typeFilters: z62.array(z62.string()).optional(),
4406
+ assigneeId: z62.string().optional(),
4407
+ unassigned: z62.boolean().optional(),
4365
4408
  // Scope to a sub-project board when provided. Unlike the board layer's `?? null`
4366
4409
  // semantics, agents default to seeing the whole project when omitted.
4367
- subProjectId: z52.string().nullable().optional(),
4410
+ subProjectId: z62.string().nullable().optional(),
4368
4411
  // Plain equality on the on-hold flag: true = only parked cards, false =
4369
4412
  // exclude them, omitted = both. Deliberately NOT the board's
4370
4413
  // includeOnHold/surfaceActiveWork bucketing — an agent sweeping a backlog
4371
4414
  // needs the raw column, not a column projection.
4372
- onHold: z52.boolean().optional(),
4373
- limit: z52.number().int().positive().optional().default(50)
4415
+ onHold: z62.boolean().optional(),
4416
+ limit: z62.number().int().positive().optional().default(50)
4374
4417
  }).refine((p) => !(p.unassigned && p.assigneeId), {
4375
4418
  message: "Pass either assigneeId or unassigned, not both"
4376
4419
  });
4377
- var GetProjectTaskRequestSchema = z52.object({
4378
- projectId: z52.string(),
4379
- taskId: z52.string()
4420
+ var GetProjectTaskRequestSchema = z62.object({
4421
+ projectId: z62.string(),
4422
+ taskId: z62.string()
4380
4423
  });
4381
- var SearchProjectTasksRequestSchema = z52.object({
4382
- projectId: z52.string(),
4424
+ var SearchProjectTasksRequestSchema = z62.object({
4425
+ projectId: z62.string(),
4383
4426
  // Tag names, matched case-insensitively against the project glossary.
4384
- tagNames: z52.array(z52.string()).optional(),
4427
+ tagNames: z62.array(z62.string()).optional(),
4385
4428
  // How to combine tagNames: "any" (default) = carries at least one,
4386
4429
  // "all" = carries every one.
4387
- tagMatch: z52.enum(["any", "all"]).optional(),
4430
+ tagMatch: z62.enum(["any", "all"]).optional(),
4388
4431
  // Expand each named tag to its descendants in the tag DAG before matching,
4389
4432
  // so a parent tag sweeps its whole area. Default false.
4390
- includeChildTags: z52.boolean().optional(),
4391
- searchQuery: z52.string().optional(),
4392
- statusFilters: z52.array(z52.string()).optional(),
4433
+ includeChildTags: z62.boolean().optional(),
4434
+ searchQuery: z62.string().optional(),
4435
+ statusFilters: z62.array(z62.string()).optional(),
4393
4436
  // Card types to include. Omitted/empty → defaults to ["task"] in the handler so
4394
4437
  // search doesn't surface incidents/suggestions unless asked. Enum validation lives
4395
4438
  // at the MCP tool layer (mirrors statusFilters).
4396
- typeFilters: z52.array(z52.string()).optional(),
4397
- assigneeId: z52.string().optional(),
4398
- unassigned: z52.boolean().optional(),
4439
+ typeFilters: z62.array(z62.string()).optional(),
4440
+ assigneeId: z62.string().optional(),
4441
+ unassigned: z62.boolean().optional(),
4399
4442
  // Scope to a sub-project board when provided. Unlike the board layer's `?? null`
4400
4443
  // semantics, agents default to seeing the whole project when omitted.
4401
- subProjectId: z52.string().nullable().optional(),
4402
- limit: z52.number().int().positive().optional().default(20)
4444
+ subProjectId: z62.string().nullable().optional(),
4445
+ limit: z62.number().int().positive().optional().default(20)
4403
4446
  }).refine((p) => !(p.unassigned && p.assigneeId), {
4404
4447
  message: "Pass either assigneeId or unassigned, not both"
4405
4448
  });
4406
- var ListProjectTagsRequestSchema = z52.object({
4407
- projectId: z52.string(),
4449
+ var ListProjectTagsRequestSchema = z62.object({
4450
+ projectId: z62.string(),
4408
4451
  /** "summary" (default) omits inline context links; "full" includes them. */
4409
- detail: z52.enum(["summary", "full"]).optional()
4452
+ detail: z62.enum(["summary", "full"]).optional()
4410
4453
  });
4411
- var GetProjectTagRequestSchema = z52.object({
4412
- projectId: z52.string(),
4454
+ var GetProjectTagRequestSchema = z62.object({
4455
+ projectId: z62.string(),
4413
4456
  /** Tag id or exact (case-insensitive) tag name. */
4414
- tag: z52.string().min(1).max(100)
4457
+ tag: z62.string().min(1).max(100)
4415
4458
  });
4416
- var ListProjectTagAttachmentsRequestSchema = z52.object({
4417
- projectId: z52.string(),
4459
+ var ListProjectTagAttachmentsRequestSchema = z62.object({
4460
+ projectId: z62.string(),
4418
4461
  /** Tag id or exact (case-insensitive) tag name. */
4419
- tag: z52.string().min(1).max(100),
4420
- limit: z52.number().int().min(1).max(60).optional(),
4421
- offset: z52.number().int().min(0).optional()
4462
+ tag: z62.string().min(1).max(100),
4463
+ limit: z62.number().int().min(1).max(60).optional(),
4464
+ offset: z62.number().int().min(0).optional()
4422
4465
  });
4423
- var SetProjectFileTagsRequestSchema = z52.object({
4424
- projectId: z52.string(),
4425
- taskId: z52.string(),
4426
- fileId: z52.string(),
4427
- tags: z52.array(z52.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS2),
4428
- requestingUserId: z52.string().optional()
4466
+ var SetProjectFileTagsRequestSchema = z62.object({
4467
+ projectId: z62.string(),
4468
+ taskId: z62.string(),
4469
+ fileId: z62.string(),
4470
+ tags: z62.array(z62.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS2),
4471
+ requestingUserId: z62.string().optional()
4429
4472
  });
4430
- var GetProjectSummaryRequestSchema = z52.object({
4431
- projectId: z52.string()
4473
+ var GetProjectSummaryRequestSchema = z62.object({
4474
+ projectId: z62.string()
4432
4475
  });
4433
- var GetProjectOnboardingStatusRequestSchema = z52.object({
4434
- projectId: z52.string()
4476
+ var GetProjectOnboardingStatusRequestSchema = z62.object({
4477
+ projectId: z62.string()
4435
4478
  });
4436
- var GetProjectOnboardingStepRequestSchema = z52.object({
4437
- projectId: z52.string()
4479
+ var GetProjectOnboardingStepRequestSchema = z62.object({
4480
+ projectId: z62.string()
4438
4481
  });
4439
- var GetProjectConnectUrlsRequestSchema = z52.object({
4440
- projectId: z52.string()
4482
+ var GetProjectConnectUrlsRequestSchema = z62.object({
4483
+ projectId: z62.string()
4441
4484
  });
4442
- var conveyorCapabilitySchema = z52.enum([
4485
+ var conveyorCapabilitySchema = z62.enum([
4443
4486
  "read",
4444
4487
  "create",
4445
4488
  "update",
@@ -4447,604 +4490,604 @@ var conveyorCapabilitySchema = z52.enum([
4447
4490
  "files",
4448
4491
  "build"
4449
4492
  ]);
4450
- var GetConnectionContextRequestSchema = z52.object({
4451
- projectId: z52.string(),
4493
+ var GetConnectionContextRequestSchema = z62.object({
4494
+ projectId: z62.string(),
4452
4495
  // Optional board scope (CONVEYOR_SUBPROJECT_ID). Validated to belong to the
4453
4496
  // project in the handler; an invalid/foreign id is reported, not silently
4454
4497
  // dropped, so a mis-scoped connection is never presented as board-specific.
4455
- subProjectId: z52.string().nullable().optional()
4498
+ subProjectId: z62.string().nullable().optional()
4456
4499
  });
4457
- var VerifyConnectionRequestSchema = z52.object({
4458
- projectId: z52.string(),
4459
- subProjectId: z52.string().nullable().optional(),
4460
- intendedActions: z52.array(conveyorCapabilitySchema).optional()
4500
+ var VerifyConnectionRequestSchema = z62.object({
4501
+ projectId: z62.string(),
4502
+ subProjectId: z62.string().nullable().optional(),
4503
+ intendedActions: z62.array(conveyorCapabilitySchema).optional()
4461
4504
  });
4462
- var ListAccessibleSubprojectsRequestSchema = z52.object({
4463
- projectId: z52.string()
4505
+ var ListAccessibleSubprojectsRequestSchema = z62.object({
4506
+ projectId: z62.string()
4464
4507
  });
4465
- var CreateProjectTaskRequestSchema = z52.object({
4466
- projectId: z52.string(),
4467
- title: z52.string().min(1),
4508
+ var CreateProjectTaskRequestSchema = z62.object({
4509
+ projectId: z62.string(),
4510
+ title: z62.string().min(1),
4468
4511
  description: cardDescription2,
4469
- plan: z52.string().optional(),
4470
- status: z52.string().optional(),
4512
+ plan: z62.string().optional(),
4513
+ status: z62.string().optional(),
4471
4514
  // Assign to a sub-project board. Validated to belong to `projectId` in the handler.
4472
- subProjectId: z52.string().nullable().optional(),
4473
- requestingUserId: z52.string().optional()
4515
+ subProjectId: z62.string().nullable().optional(),
4516
+ requestingUserId: z62.string().optional()
4474
4517
  });
4475
- var SetProjectTaskParentRequestSchema = z52.object({
4476
- projectId: z52.string(),
4518
+ var SetProjectTaskParentRequestSchema = z62.object({
4519
+ projectId: z62.string(),
4477
4520
  /** Card to move — id or slug. */
4478
- taskId: z52.string().min(1),
4521
+ taskId: z62.string().min(1),
4479
4522
  /** New parent (id or slug), or null to detach. */
4480
- parentTaskId: z52.string().min(1).nullable(),
4481
- ordinal: z52.number().int().nonnegative().optional(),
4482
- followParentStatus: z52.boolean().optional(),
4483
- requestingUserId: z52.string().optional()
4523
+ parentTaskId: z62.string().min(1).nullable(),
4524
+ ordinal: z62.number().int().nonnegative().optional(),
4525
+ followParentStatus: z62.boolean().optional(),
4526
+ requestingUserId: z62.string().optional()
4484
4527
  }).strict();
4485
- var UpdateProjectTaskRequestSchema = z52.object({
4486
- projectId: z52.string(),
4487
- taskId: z52.string(),
4488
- title: z52.string().optional(),
4528
+ var UpdateProjectTaskRequestSchema = z62.object({
4529
+ projectId: z62.string(),
4530
+ taskId: z62.string(),
4531
+ title: z62.string().optional(),
4489
4532
  description: cardDescription2,
4490
- plan: z52.string().optional(),
4533
+ plan: z62.string().optional(),
4491
4534
  // Enum validation lives at the MCP tool layer (mirrors createProjectTask);
4492
4535
  // the handler routes through the shared updateStatus core (InProgress
4493
4536
  // dependency check + cleanup/board/Slack side effects), not the stricter
4494
4537
  // card-type-validating path the Socket.IO updateTaskStatus mutation uses.
4495
- status: z52.string().optional(),
4538
+ status: z62.string().optional(),
4496
4539
  // Canonical risk level, or null to clear. Resolved to the project's
4497
4540
  // configured Risk row (by rank) in the handler.
4498
4541
  risk: riskLevelSchema.nullable().optional(),
4499
4542
  // Story-point value, or null to clear. Resolved to the project's configured
4500
4543
  // StoryPoint row in the handler, which rejects an unconfigured value.
4501
- storyPointValue: z52.number().int().positive().nullable().optional(),
4502
- assignedUserId: z52.string().nullish(),
4544
+ storyPointValue: z62.number().int().positive().nullable().optional(),
4545
+ assignedUserId: z62.string().nullish(),
4503
4546
  // Move to a different sub-project board, or null to move to the parent board.
4504
4547
  // Validated to belong to `projectId` in the handler.
4505
- subProjectId: z52.string().nullable().optional(),
4548
+ subProjectId: z62.string().nullable().optional(),
4506
4549
  // Record the task's ACTUAL working branch (e.g. a locally-driven pack's
4507
4550
  // branch, so identification never mints a competing name and pack-child
4508
4551
  // merge handling matches reality), or null to detach. Guarded in the
4509
4552
  // handler: the ref must exist on origin and no live workspace may be bound
4510
4553
  // to a different branch.
4511
- githubBranch: z52.string().min(1).max(GIT_BRANCH_NAME_MAX).refine(isValidGitBranchName, { message: GIT_BRANCH_NAME_MESSAGE }).nullable().optional(),
4554
+ githubBranch: z62.string().min(1).max(GIT_BRANCH_NAME_MAX).refine(isValidGitBranchName, { message: GIT_BRANCH_NAME_MESSAGE }).nullable().optional(),
4512
4555
  // Park the card on hold (true) or return it to the active board (false).
4513
4556
  // The handler mirrors the web path's two side effects: a board re-bucket
4514
4557
  // event, and demotion to Open when an active-work card is parked.
4515
- onHold: z52.boolean().optional(),
4516
- requestingUserId: z52.string().optional()
4558
+ onHold: z62.boolean().optional(),
4559
+ requestingUserId: z62.string().optional()
4517
4560
  }).strict().refine(
4518
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,
4519
4562
  {
4520
4563
  message: "update_task requires at least one field to change (title, description, plan, status, risk, storyPointValue, assignedUserId, subProjectId, githubBranch, or onHold)"
4521
4564
  }
4522
4565
  );
4523
- var TransitionProjectTaskStatusRequestSchema = z52.object({
4524
- projectId: z52.string(),
4525
- taskId: z52.string(),
4526
- toStatus: z52.string(),
4527
- expectedFromStatus: z52.string().optional(),
4566
+ var TransitionProjectTaskStatusRequestSchema = z62.object({
4567
+ projectId: z62.string(),
4568
+ taskId: z62.string(),
4569
+ toStatus: z62.string(),
4570
+ expectedFromStatus: z62.string().optional(),
4528
4571
  // Optional raise-only risk to attempt alongside the transition
4529
4572
  // (approve → low, request_changes → medium by default).
4530
4573
  risk: riskLevelSchema.optional(),
4531
- requestingUserId: z52.string().optional()
4532
- });
4533
- var MoveProjectCardRequestSchema = z52.object({
4534
- projectId: z52.string(),
4535
- taskId: z52.string(),
4536
- destinationProjectId: z52.string(),
4537
- requestingUserId: z52.string().optional()
4538
- });
4539
- var PostToProjectTaskChatRequestSchema = z52.object({
4540
- projectId: z52.string(),
4541
- taskId: z52.string(),
4542
- content: z52.string(),
4543
- requestingUserId: z52.string().optional()
4544
- });
4545
- var GetProjectTaskCliRequestSchema = z52.object({
4546
- projectId: z52.string(),
4547
- taskId: z52.string(),
4548
- limit: z52.number().int().positive().optional().default(50),
4549
- source: z52.string().optional()
4550
- });
4551
- var GetProjectTaskSessionsRequestSchema = z52.object({
4552
- projectId: z52.string(),
4553
- taskId: z52.string()
4554
- });
4555
- var QueryProjectGcpLogsRequestSchema = z52.object({
4556
- projectId: z52.string(),
4557
- env: z52.enum(["prod", "dev", "claudespace"]).optional(),
4558
- severity: z52.enum(["DEBUG", "INFO", "NOTICE", "WARNING", "ERROR", "CRITICAL", "ALERT", "EMERGENCY"]).optional(),
4559
- services: z52.array(z52.string().min(1).max(200)).max(25).optional(),
4560
- sqlInstances: z52.array(z52.string().min(1).max(200)).max(25).optional(),
4561
- allServices: z52.boolean().optional(),
4562
- search: z52.string().max(256).optional(),
4563
- filter: z52.string().max(1e3).optional(),
4564
- startTime: z52.string().optional(),
4565
- endTime: z52.string().optional(),
4566
- limit: z52.number().int().min(1).max(200).optional().default(50),
4567
- pageToken: z52.string().max(4096).optional()
4568
- });
4569
- var QueryProjectGrafanaLogsRequestSchema = z52.object({
4570
- projectId: z52.string(),
4571
- env: z52.enum(["prod", "dev"]).optional(),
4572
- services: z52.array(z52.string().min(1).max(200)).max(25).optional(),
4573
- level: z52.enum(["debug", "info", "warn", "error", "fatal"]).optional(),
4574
- search: z52.string().max(256).optional(),
4575
- logql: z52.string().max(2e3).optional(),
4576
- startTime: z52.string().optional(),
4577
- endTime: z52.string().optional(),
4578
- limit: z52.number().int().min(1).max(200).optional().default(50)
4579
- });
4580
- var driveFileNameSchema = z52.string().min(1).max(255).regex(/^[^/\\\r\n]+$/, "File names cannot contain slashes or line breaks");
4574
+ requestingUserId: z62.string().optional()
4575
+ });
4576
+ var MoveProjectCardRequestSchema = z62.object({
4577
+ projectId: z62.string(),
4578
+ taskId: z62.string(),
4579
+ destinationProjectId: z62.string(),
4580
+ requestingUserId: z62.string().optional()
4581
+ });
4582
+ var PostToProjectTaskChatRequestSchema = z62.object({
4583
+ projectId: z62.string(),
4584
+ taskId: z62.string(),
4585
+ content: z62.string(),
4586
+ requestingUserId: z62.string().optional()
4587
+ });
4588
+ var GetProjectTaskCliRequestSchema = z62.object({
4589
+ projectId: z62.string(),
4590
+ taskId: z62.string(),
4591
+ limit: z62.number().int().positive().optional().default(50),
4592
+ source: z62.string().optional()
4593
+ });
4594
+ var GetProjectTaskSessionsRequestSchema = z62.object({
4595
+ projectId: z62.string(),
4596
+ taskId: z62.string()
4597
+ });
4598
+ var QueryProjectGcpLogsRequestSchema = z62.object({
4599
+ projectId: z62.string(),
4600
+ env: z62.enum(["prod", "dev", "claudespace"]).optional(),
4601
+ severity: z62.enum(["DEBUG", "INFO", "NOTICE", "WARNING", "ERROR", "CRITICAL", "ALERT", "EMERGENCY"]).optional(),
4602
+ services: z62.array(z62.string().min(1).max(200)).max(25).optional(),
4603
+ sqlInstances: z62.array(z62.string().min(1).max(200)).max(25).optional(),
4604
+ allServices: z62.boolean().optional(),
4605
+ search: z62.string().max(256).optional(),
4606
+ filter: z62.string().max(1e3).optional(),
4607
+ startTime: z62.string().optional(),
4608
+ endTime: z62.string().optional(),
4609
+ limit: z62.number().int().min(1).max(200).optional().default(50),
4610
+ pageToken: z62.string().max(4096).optional()
4611
+ });
4612
+ var QueryProjectGrafanaLogsRequestSchema = z62.object({
4613
+ projectId: z62.string(),
4614
+ env: z62.enum(["prod", "dev"]).optional(),
4615
+ services: z62.array(z62.string().min(1).max(200)).max(25).optional(),
4616
+ level: z62.enum(["debug", "info", "warn", "error", "fatal"]).optional(),
4617
+ search: z62.string().max(256).optional(),
4618
+ logql: z62.string().max(2e3).optional(),
4619
+ startTime: z62.string().optional(),
4620
+ endTime: z62.string().optional(),
4621
+ limit: z62.number().int().min(1).max(200).optional().default(50)
4622
+ });
4623
+ var driveFileNameSchema = z62.string().min(1).max(255).regex(/^[^/\\\r\n]+$/, "File names cannot contain slashes or line breaks");
4581
4624
  var DRIVE_MAX_CONTENT_CHARS = 1e6;
4582
- var ListProjectDriveFilesRequestSchema = z52.object({
4583
- projectId: z52.string(),
4584
- folderId: z52.string().max(200).optional(),
4585
- search: z52.string().max(200).optional(),
4586
- limit: z52.number().int().min(1).max(200).optional()
4587
- });
4588
- var ReadProjectDriveFileRequestSchema = z52.object({
4589
- projectId: z52.string(),
4590
- fileId: z52.string().min(1).max(200)
4591
- });
4592
- var CreateProjectDriveFileRequestSchema = z52.object({
4593
- projectId: z52.string(),
4625
+ var ListProjectDriveFilesRequestSchema = z62.object({
4626
+ projectId: z62.string(),
4627
+ folderId: z62.string().max(200).optional(),
4628
+ search: z62.string().max(200).optional(),
4629
+ limit: z62.number().int().min(1).max(200).optional()
4630
+ });
4631
+ var ReadProjectDriveFileRequestSchema = z62.object({
4632
+ projectId: z62.string(),
4633
+ fileId: z62.string().min(1).max(200)
4634
+ });
4635
+ var CreateProjectDriveFileRequestSchema = z62.object({
4636
+ projectId: z62.string(),
4594
4637
  name: driveFileNameSchema,
4595
- content: z52.string().max(DRIVE_MAX_CONTENT_CHARS),
4596
- mimeType: z52.string().max(200).optional(),
4597
- folderId: z52.string().max(200).optional()
4598
- });
4599
- var UpdateProjectDriveFileRequestSchema = z52.object({
4600
- projectId: z52.string(),
4601
- fileId: z52.string().min(1).max(200),
4602
- content: z52.string().max(DRIVE_MAX_CONTENT_CHARS),
4603
- mimeType: z52.string().max(200).optional()
4604
- });
4605
- var DeleteProjectDriveFileRequestSchema = z52.object({
4606
- projectId: z52.string(),
4607
- fileId: z52.string().min(1).max(200)
4608
- });
4609
- var CreateProjectDriveFolderRequestSchema = z52.object({
4610
- projectId: z52.string(),
4638
+ content: z62.string().max(DRIVE_MAX_CONTENT_CHARS),
4639
+ mimeType: z62.string().max(200).optional(),
4640
+ folderId: z62.string().max(200).optional()
4641
+ });
4642
+ var UpdateProjectDriveFileRequestSchema = z62.object({
4643
+ projectId: z62.string(),
4644
+ fileId: z62.string().min(1).max(200),
4645
+ content: z62.string().max(DRIVE_MAX_CONTENT_CHARS),
4646
+ mimeType: z62.string().max(200).optional()
4647
+ });
4648
+ var DeleteProjectDriveFileRequestSchema = z62.object({
4649
+ projectId: z62.string(),
4650
+ fileId: z62.string().min(1).max(200)
4651
+ });
4652
+ var CreateProjectDriveFolderRequestSchema = z62.object({
4653
+ projectId: z62.string(),
4611
4654
  name: driveFileNameSchema,
4612
- folderId: z52.string().max(200).optional()
4655
+ folderId: z62.string().max(200).optional()
4613
4656
  });
4614
- var StartProjectBuildRequestSchema = z52.object({
4615
- projectId: z52.string(),
4616
- taskId: z52.string(),
4617
- requestingUserId: z52.string().optional()
4657
+ var StartProjectBuildRequestSchema = z62.object({
4658
+ projectId: z62.string(),
4659
+ taskId: z62.string(),
4660
+ requestingUserId: z62.string().optional()
4618
4661
  });
4619
- var StopProjectBuildRequestSchema = z52.object({
4620
- projectId: z52.string(),
4621
- taskId: z52.string(),
4622
- requestingUserId: z52.string().optional()
4662
+ var StopProjectBuildRequestSchema = z62.object({
4663
+ projectId: z62.string(),
4664
+ taskId: z62.string(),
4665
+ requestingUserId: z62.string().optional()
4623
4666
  });
4624
- var StartProjectWorkspaceRequestSchema = z52.object({
4625
- projectId: z52.string(),
4626
- requestingUserId: z52.string().optional()
4667
+ var StartProjectWorkspaceRequestSchema = z62.object({
4668
+ projectId: z62.string(),
4669
+ requestingUserId: z62.string().optional()
4627
4670
  });
4628
- var StopProjectWorkspaceRequestSchema = z52.object({
4629
- projectId: z52.string(),
4630
- destroy: z52.boolean().optional(),
4631
- requestingUserId: z52.string().optional()
4671
+ var StopProjectWorkspaceRequestSchema = z62.object({
4672
+ projectId: z62.string(),
4673
+ destroy: z62.boolean().optional(),
4674
+ requestingUserId: z62.string().optional()
4632
4675
  });
4633
- var ListMyLiveSessionsRequestSchema = z52.object({
4634
- projectId: z52.string(),
4676
+ var ListMyLiveSessionsRequestSchema = z62.object({
4677
+ projectId: z62.string(),
4635
4678
  /** Admin-only: list another member's sessions instead of the caller's. */
4636
- targetUserId: z52.string().optional()
4679
+ targetUserId: z62.string().optional()
4637
4680
  });
4638
- var ListProjectSessionGroupsRequestSchema = z52.object({
4639
- projectId: z52.string()
4681
+ var ListProjectSessionGroupsRequestSchema = z62.object({
4682
+ projectId: z62.string()
4640
4683
  });
4641
- var ListMyLiveSessionsAcrossProjectsRequestSchema = z52.object({});
4642
- var ListSessionGroupsAcrossProjectsRequestSchema = z52.object({});
4643
- var GetProjectAvailableTuisRequestSchema = z52.object({
4644
- projectId: z52.string()
4684
+ var ListMyLiveSessionsAcrossProjectsRequestSchema = z62.object({});
4685
+ var ListSessionGroupsAcrossProjectsRequestSchema = z62.object({});
4686
+ var GetProjectAvailableTuisRequestSchema = z62.object({
4687
+ projectId: z62.string()
4645
4688
  });
4646
- var StartAdhocSessionRequestSchema = z52.object({
4647
- projectId: z52.string(),
4648
- label: z52.string().max(200).optional(),
4689
+ var StartAdhocSessionRequestSchema = z62.object({
4690
+ projectId: z62.string(),
4691
+ label: z62.string().max(200).optional(),
4649
4692
  /** Coding-agent key to launch under — validated pick-time (ownership + TUI availability) in the handler. */
4650
- codingAgentKeyId: z52.string().optional(),
4693
+ codingAgentKeyId: z62.string().optional(),
4651
4694
  /** Model override (Claude model id) — overrides the launch key's own model. */
4652
- model: z52.string().max(200).optional(),
4695
+ model: z62.string().max(200).optional(),
4653
4696
  /**
4654
4697
  * Session role. Constrained: other task-less modes fall through to the pm
4655
4698
  * runner in the pod entrypoint, and "review" would crash without a task.
4656
4699
  */
4657
- mode: z52.enum(["adhoc", "pm"]).optional(),
4700
+ mode: z62.enum(["adhoc", "pm"]).optional(),
4658
4701
  /** Base branch to check out (defaults to the project's dev branch). */
4659
- branch: z52.string().max(300).optional(),
4702
+ branch: z62.string().max(300).optional(),
4660
4703
  /**
4661
4704
  * Server-assembled instructions the pod's TUI auto-submits once on first boot
4662
4705
  * (headless kickoff). Used by the onboarding "Set it up for me" flow to seed a
4663
4706
  * setup-driver prompt; the session stays watchable/interactive in the Sessions
4664
4707
  * view. `ensureAdhocWorkspace` persists it and clears it after first submit.
4665
4708
  */
4666
- initialPrompt: z52.string().max(2e4).optional(),
4667
- requestingUserId: z52.string().optional()
4668
- });
4669
- var StopAdhocSessionRequestSchema = z52.object({
4670
- projectId: z52.string(),
4671
- workspaceId: z52.string(),
4672
- destroy: z52.boolean().optional(),
4673
- requestingUserId: z52.string().optional()
4674
- });
4675
- var ResumeAdhocSessionRequestSchema = z52.object({
4676
- projectId: z52.string(),
4677
- workspaceId: z52.string(),
4678
- requestingUserId: z52.string().optional()
4679
- });
4680
- var RefreshCodingAgentKeyUsageRequestSchema = z52.object({
4681
- projectId: z52.string(),
4682
- keyId: z52.string().optional(),
4683
- requestingUserId: z52.string().optional()
4684
- });
4685
- var ListKeysToProbeRequestSchema = z52.object({
4686
- sessionId: z52.string()
4687
- });
4688
- var CreateProjectReleaseRequestSchema = z52.object({
4689
- projectId: z52.string(),
4690
- taskIds: z52.array(z52.string()).optional(),
4691
- requestingUserId: z52.string().optional()
4692
- });
4693
- var AddTasksToProjectReleaseRequestSchema = z52.object({
4694
- projectId: z52.string(),
4695
- taskIds: z52.array(z52.string()).min(1),
4696
- requestingUserId: z52.string().optional()
4697
- });
4698
- var ApproveProjectMergePRRequestSchema = z52.object({
4699
- projectId: z52.string(),
4700
- childTaskId: z52.string(),
4701
- requestingUserId: z52.string().optional()
4702
- });
4703
- var ListProjectSubtasksRequestSchema = z52.object({
4704
- projectId: z52.string(),
4705
- taskId: z52.string()
4706
- });
4707
- var CreateProjectSubtaskRequestSchema = z52.object({
4708
- projectId: z52.string(),
4709
- parentTaskId: z52.string(),
4710
- title: z52.string().min(1),
4709
+ initialPrompt: z62.string().max(2e4).optional(),
4710
+ requestingUserId: z62.string().optional()
4711
+ });
4712
+ var StopAdhocSessionRequestSchema = z62.object({
4713
+ projectId: z62.string(),
4714
+ workspaceId: z62.string(),
4715
+ destroy: z62.boolean().optional(),
4716
+ requestingUserId: z62.string().optional()
4717
+ });
4718
+ var ResumeAdhocSessionRequestSchema = z62.object({
4719
+ projectId: z62.string(),
4720
+ workspaceId: z62.string(),
4721
+ requestingUserId: z62.string().optional()
4722
+ });
4723
+ var RefreshCodingAgentKeyUsageRequestSchema = z62.object({
4724
+ projectId: z62.string(),
4725
+ keyId: z62.string().optional(),
4726
+ requestingUserId: z62.string().optional()
4727
+ });
4728
+ var ListKeysToProbeRequestSchema = z62.object({
4729
+ sessionId: z62.string()
4730
+ });
4731
+ var CreateProjectReleaseRequestSchema = z62.object({
4732
+ projectId: z62.string(),
4733
+ taskIds: z62.array(z62.string()).optional(),
4734
+ requestingUserId: z62.string().optional()
4735
+ });
4736
+ var AddTasksToProjectReleaseRequestSchema = z62.object({
4737
+ projectId: z62.string(),
4738
+ taskIds: z62.array(z62.string()).min(1),
4739
+ requestingUserId: z62.string().optional()
4740
+ });
4741
+ var ApproveProjectMergePRRequestSchema = z62.object({
4742
+ projectId: z62.string(),
4743
+ childTaskId: z62.string(),
4744
+ requestingUserId: z62.string().optional()
4745
+ });
4746
+ var ListProjectSubtasksRequestSchema = z62.object({
4747
+ projectId: z62.string(),
4748
+ taskId: z62.string()
4749
+ });
4750
+ var CreateProjectSubtaskRequestSchema = z62.object({
4751
+ projectId: z62.string(),
4752
+ parentTaskId: z62.string(),
4753
+ title: z62.string().min(1),
4711
4754
  description: cardDescription2,
4712
- plan: z52.string().optional(),
4713
- ordinal: z52.number().int().nonnegative().optional(),
4714
- storyPointValue: z52.number().int().positive().optional(),
4715
- followParentStatus: z52.boolean().optional(),
4755
+ plan: z62.string().optional(),
4756
+ ordinal: z62.number().int().nonnegative().optional(),
4757
+ storyPointValue: z62.number().int().positive().optional(),
4758
+ followParentStatus: z62.boolean().optional(),
4716
4759
  /** Sibling subtask ids or slugs this subtask blocks on (explicit dependency
4717
4760
  * metadata — preferred over encoding order in plan text / ordinal). */
4718
- dependsOn: z52.array(z52.string().min(1)).max(32).optional(),
4719
- requestingUserId: z52.string().optional()
4761
+ dependsOn: z62.array(z62.string().min(1)).max(32).optional(),
4762
+ requestingUserId: z62.string().optional()
4720
4763
  });
4721
- var UpdateProjectSubtaskRequestSchema = z52.object({
4722
- projectId: z52.string(),
4723
- subtaskId: z52.string(),
4724
- title: z52.string().optional(),
4764
+ var UpdateProjectSubtaskRequestSchema = z62.object({
4765
+ projectId: z62.string(),
4766
+ subtaskId: z62.string(),
4767
+ title: z62.string().optional(),
4725
4768
  description: cardDescription2,
4726
- plan: z52.string().optional(),
4727
- status: z52.string().optional(),
4728
- ordinal: z52.number().int().nonnegative().optional(),
4729
- storyPointValue: z52.number().int().positive().optional(),
4730
- followParentStatus: z52.boolean().optional(),
4769
+ plan: z62.string().optional(),
4770
+ status: z62.string().optional(),
4771
+ ordinal: z62.number().int().nonnegative().optional(),
4772
+ storyPointValue: z62.number().int().positive().optional(),
4773
+ followParentStatus: z62.boolean().optional(),
4731
4774
  /** Replace-set of sibling subtask ids/slugs this subtask blocks on ([] clears).
4732
4775
  * Mirrors the in-pod updateSubtask semantics. */
4733
- dependsOn: z52.array(z52.string().min(1)).max(32).optional(),
4734
- requestingUserId: z52.string().optional()
4735
- });
4736
- var DeleteProjectSubtaskRequestSchema = z52.object({
4737
- projectId: z52.string(),
4738
- subtaskId: z52.string(),
4739
- requestingUserId: z52.string().optional()
4740
- });
4741
- var GetProjectTaskChatRequestSchema = z52.object({
4742
- projectId: z52.string(),
4743
- taskId: z52.string(),
4744
- limit: z52.number().int().positive().optional().default(20)
4745
- });
4746
- var AddProjectTaskDependencyRequestSchema = z52.object({
4747
- projectId: z52.string(),
4748
- taskId: z52.string(),
4749
- dependsOnSlugOrId: z52.string(),
4750
- requestingUserId: z52.string().optional()
4751
- });
4752
- var RemoveProjectTaskDependencyRequestSchema = z52.object({
4753
- projectId: z52.string(),
4754
- taskId: z52.string(),
4755
- dependsOnSlugOrId: z52.string(),
4756
- requestingUserId: z52.string().optional()
4757
- });
4758
- var VoteProjectSuggestionRequestSchema = z52.object({
4759
- projectId: z52.string(),
4760
- suggestionId: z52.string(),
4761
- value: z52.union([z52.literal(1), z52.literal(-1)]),
4762
- requestingUserId: z52.string().optional()
4763
- });
4764
- var GetProjectTaskDependenciesRequestSchema = z52.object({
4765
- projectId: z52.string(),
4766
- taskId: z52.string()
4767
- });
4768
- var ListProjectTaskFilesRequestSchema = z52.object({
4769
- projectId: z52.string(),
4770
- taskId: z52.string()
4771
- });
4772
- var GetProjectAttachmentRequestSchema = z52.object({
4773
- projectId: z52.string(),
4774
- taskId: z52.string(),
4775
- fileId: z52.string(),
4776
+ dependsOn: z62.array(z62.string().min(1)).max(32).optional(),
4777
+ requestingUserId: z62.string().optional()
4778
+ });
4779
+ var DeleteProjectSubtaskRequestSchema = z62.object({
4780
+ projectId: z62.string(),
4781
+ subtaskId: z62.string(),
4782
+ requestingUserId: z62.string().optional()
4783
+ });
4784
+ var GetProjectTaskChatRequestSchema = z62.object({
4785
+ projectId: z62.string(),
4786
+ taskId: z62.string(),
4787
+ limit: z62.number().int().positive().optional().default(20)
4788
+ });
4789
+ var AddProjectTaskDependencyRequestSchema = z62.object({
4790
+ projectId: z62.string(),
4791
+ taskId: z62.string(),
4792
+ dependsOnSlugOrId: z62.string(),
4793
+ requestingUserId: z62.string().optional()
4794
+ });
4795
+ var RemoveProjectTaskDependencyRequestSchema = z62.object({
4796
+ projectId: z62.string(),
4797
+ taskId: z62.string(),
4798
+ dependsOnSlugOrId: z62.string(),
4799
+ requestingUserId: z62.string().optional()
4800
+ });
4801
+ var VoteProjectSuggestionRequestSchema = z62.object({
4802
+ projectId: z62.string(),
4803
+ suggestionId: z62.string(),
4804
+ value: z62.union([z62.literal(1), z62.literal(-1)]),
4805
+ requestingUserId: z62.string().optional()
4806
+ });
4807
+ var GetProjectTaskDependenciesRequestSchema = z62.object({
4808
+ projectId: z62.string(),
4809
+ taskId: z62.string()
4810
+ });
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(),
4776
4819
  /** Byte offset into text content (paging large logs/JSON). Default 0. */
4777
- offset: z52.number().int().nonnegative().optional(),
4820
+ offset: z62.number().int().nonnegative().optional(),
4778
4821
  /** Max bytes of text content to return from `offset`. Server default applies. */
4779
- maxBytes: z52.number().int().positive().optional()
4780
- });
4781
- var DeleteProjectTaskFileRequestSchema = z52.object({
4782
- projectId: z52.string(),
4783
- taskId: z52.string(),
4784
- fileId: z52.string(),
4785
- requestingUserId: z52.string().optional()
4786
- });
4787
- var RequestProjectFileUploadRequestSchema = z52.object({
4788
- projectId: z52.string(),
4789
- taskId: z52.string(),
4790
- fileName: z52.string().min(1).max(255),
4791
- mimeType: z52.string().min(1).max(128),
4792
- fileSize: z52.number().int().positive().max(MAX_FILE_SIZE_BYTES2),
4793
- requestingUserId: z52.string().optional()
4794
- });
4795
- var ConfirmProjectFileUploadRequestSchema = z52.object({
4796
- projectId: z52.string(),
4797
- taskId: z52.string(),
4798
- fileId: z52.string(),
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(),
4799
4842
  /** When set, the attachment is also posted to the task chat with this text. */
4800
- comment: z52.string().max(2e3).optional(),
4843
+ comment: z62.string().max(2e3).optional(),
4801
4844
  /** Glossary tag names (or ids) this file is an example of. */
4802
- tags: z52.array(z52.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS2).optional(),
4803
- requestingUserId: z52.string().optional()
4804
- });
4805
- var CreateProjectPullRequestRequestSchema = z52.object({
4806
- projectId: z52.string(),
4807
- taskId: z52.string(),
4808
- title: z52.string().min(1),
4809
- body: z52.string(),
4810
- head: z52.string().optional(),
4811
- base: z52.string().optional(),
4812
- requestingUserId: z52.string().optional()
4813
- });
4814
- var ListProjectMembersRequestSchema = z52.object({
4815
- projectId: z52.string()
4816
- });
4817
- var AddProjectTaskReviewerRequestSchema = z52.object({
4818
- projectId: z52.string(),
4819
- taskId: z52.string(),
4820
- userId: z52.string(),
4821
- requestingUserId: z52.string().optional()
4822
- });
4823
- var RemoveProjectTaskReviewerRequestSchema = z52.object({
4824
- projectId: z52.string(),
4825
- taskId: z52.string(),
4826
- userId: z52.string(),
4827
- requestingUserId: z52.string().optional()
4828
- });
4829
- var ListProjectManualTestsRequestSchema = z52.object({
4830
- projectId: z52.string(),
4831
- taskId: z52.string()
4832
- });
4833
- var QueryProjectManualTestsRequestSchema = z52.object({
4834
- projectId: z52.string(),
4835
- cardStatuses: z52.array(z52.string()).optional(),
4836
- testStatuses: z52.array(z52.enum(["open", "approved", "rejected"])).optional()
4837
- });
4838
- var SetProjectManualTestsRequestSchema = z52.object({
4839
- projectId: z52.string(),
4840
- taskId: z52.string(),
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
+ var CreateProjectPullRequestRequestSchema = z62.object({
4849
+ projectId: z62.string(),
4850
+ taskId: z62.string(),
4851
+ title: z62.string().min(1),
4852
+ body: z62.string(),
4853
+ head: z62.string().optional(),
4854
+ base: z62.string().optional(),
4855
+ requestingUserId: z62.string().optional()
4856
+ });
4857
+ var ListProjectMembersRequestSchema = z62.object({
4858
+ projectId: z62.string()
4859
+ });
4860
+ var AddProjectTaskReviewerRequestSchema = z62.object({
4861
+ projectId: z62.string(),
4862
+ taskId: z62.string(),
4863
+ userId: z62.string(),
4864
+ requestingUserId: z62.string().optional()
4865
+ });
4866
+ var RemoveProjectTaskReviewerRequestSchema = z62.object({
4867
+ projectId: z62.string(),
4868
+ taskId: z62.string(),
4869
+ userId: z62.string(),
4870
+ requestingUserId: z62.string().optional()
4871
+ });
4872
+ var ListProjectManualTestsRequestSchema = z62.object({
4873
+ projectId: z62.string(),
4874
+ taskId: z62.string()
4875
+ });
4876
+ var QueryProjectManualTestsRequestSchema = z62.object({
4877
+ projectId: z62.string(),
4878
+ cardStatuses: z62.array(z62.string()).optional(),
4879
+ testStatuses: z62.array(z62.enum(["open", "approved", "rejected"])).optional()
4880
+ });
4881
+ var SetProjectManualTestsRequestSchema = z62.object({
4882
+ projectId: z62.string(),
4883
+ taskId: z62.string(),
4841
4884
  items: ManualTestItemsSchema,
4842
- requestingUserId: z52.string().optional()
4843
- });
4844
- var EditProjectManualTestRequestSchema = z52.object({
4845
- projectId: z52.string(),
4846
- taskId: z52.string(),
4847
- title: z52.string().min(1),
4848
- newTitle: z52.string().min(1),
4849
- requestingUserId: z52.string().optional()
4850
- });
4851
- var RemoveProjectManualTestRequestSchema = z52.object({
4852
- projectId: z52.string(),
4853
- taskId: z52.string(),
4854
- title: z52.string().min(1),
4855
- requestingUserId: z52.string().optional()
4856
- });
4857
- var ApproveProjectManualTestRequestSchema = z52.object({
4858
- projectId: z52.string(),
4859
- taskId: z52.string(),
4860
- title: z52.string().min(1),
4861
- requestingUserId: z52.string().optional()
4862
- });
4863
- var RejectProjectManualTestRequestSchema = z52.object({
4864
- projectId: z52.string(),
4865
- taskId: z52.string(),
4866
- title: z52.string().min(1),
4867
- reason: z52.string().min(1).max(2e3),
4868
- requestingUserId: z52.string().optional()
4869
- });
4870
- var CreateProjectSuggestionRequestSchema = z52.object({
4871
- projectId: z52.string(),
4872
- title: z52.string().min(1),
4885
+ requestingUserId: z62.string().optional()
4886
+ });
4887
+ var EditProjectManualTestRequestSchema = z62.object({
4888
+ projectId: z62.string(),
4889
+ taskId: z62.string(),
4890
+ title: z62.string().min(1),
4891
+ newTitle: z62.string().min(1),
4892
+ requestingUserId: z62.string().optional()
4893
+ });
4894
+ var RemoveProjectManualTestRequestSchema = z62.object({
4895
+ projectId: z62.string(),
4896
+ taskId: z62.string(),
4897
+ title: z62.string().min(1),
4898
+ requestingUserId: z62.string().optional()
4899
+ });
4900
+ var ApproveProjectManualTestRequestSchema = z62.object({
4901
+ projectId: z62.string(),
4902
+ taskId: z62.string(),
4903
+ title: z62.string().min(1),
4904
+ requestingUserId: z62.string().optional()
4905
+ });
4906
+ var RejectProjectManualTestRequestSchema = z62.object({
4907
+ projectId: z62.string(),
4908
+ taskId: z62.string(),
4909
+ title: z62.string().min(1),
4910
+ reason: z62.string().min(1).max(2e3),
4911
+ requestingUserId: z62.string().optional()
4912
+ });
4913
+ var CreateProjectSuggestionRequestSchema = z62.object({
4914
+ projectId: z62.string(),
4915
+ title: z62.string().min(1),
4873
4916
  description: cardDescription2,
4874
- tagNames: z52.array(z52.string()).optional(),
4875
- requestingUserId: z52.string().optional()
4917
+ tagNames: z62.array(z62.string()).optional(),
4918
+ requestingUserId: z62.string().optional()
4876
4919
  });
4877
- var ListProjectChannelsRequestSchema = z62.object({
4878
- projectId: z62.string()
4920
+ var ListProjectChannelsRequestSchema = z72.object({
4921
+ projectId: z72.string()
4879
4922
  });
4880
4923
  var READ_CHANNEL_MESSAGES_MAX_LIMIT = 50;
4881
- var ReadChannelMessagesRequestSchema = z62.object({
4882
- projectId: z62.string(),
4883
- channelId: z62.string().min(1).max(200),
4884
- limit: z62.number().int().min(1).max(READ_CHANNEL_MESSAGES_MAX_LIMIT).optional(),
4924
+ var ReadChannelMessagesRequestSchema = z72.object({
4925
+ projectId: z72.string(),
4926
+ channelId: z72.string().min(1).max(200),
4927
+ limit: z72.number().int().min(1).max(READ_CHANNEL_MESSAGES_MAX_LIMIT).optional(),
4885
4928
  /** Provider-native cursor: return messages OLDER than this one. */
4886
- before: z62.string().max(100).optional(),
4929
+ before: z72.string().max(100).optional(),
4887
4930
  /** Provider-native cursor: return messages NEWER than this one. */
4888
- after: z62.string().max(100).optional(),
4931
+ after: z72.string().max(100).optional(),
4889
4932
  /**
4890
4933
  * Read one thread instead of the channel surface. Slack calls this a
4891
4934
  * `thread_ts`; on Discord it is the thread channel's id. One field for both,
4892
4935
  * because a caller holding a `threadTs` from a previous read should not have
4893
4936
  * to know which provider produced it.
4894
4937
  */
4895
- threadTs: z62.string().max(100).optional()
4938
+ threadTs: z72.string().max(100).optional()
4896
4939
  });
4897
4940
  var POST_CHANNEL_MESSAGE_MAX_CHARS = 1800;
4898
- var PostChannelMessageRequestSchema = z62.object({
4899
- projectId: z62.string(),
4900
- channelId: z62.string().min(1).max(200),
4901
- text: z62.string().min(1).max(POST_CHANNEL_MESSAGE_MAX_CHARS),
4941
+ var PostChannelMessageRequestSchema = z72.object({
4942
+ projectId: z72.string(),
4943
+ channelId: z72.string().min(1).max(200),
4944
+ text: z72.string().min(1).max(POST_CHANNEL_MESSAGE_MAX_CHARS),
4902
4945
  /** Reply inside a thread rather than to the channel. */
4903
- threadTs: z62.string().max(100).optional()
4946
+ threadTs: z72.string().max(100).optional()
4904
4947
  });
4905
4948
  var GET_ANALYTICS_SUMMARY_MAX_RANGE_DAYS = 90;
4906
- var GetProjectAnalyticsSummaryRequestSchema = z62.object({
4907
- projectId: z62.string(),
4908
- rangeDays: z62.number().int().min(1).max(GET_ANALYTICS_SUMMARY_MAX_RANGE_DAYS).optional(),
4909
- campaign: z62.string().max(200).optional()
4949
+ var GetProjectAnalyticsSummaryRequestSchema = z72.object({
4950
+ projectId: z72.string(),
4951
+ rangeDays: z72.number().int().min(1).max(GET_ANALYTICS_SUMMARY_MAX_RANGE_DAYS).optional(),
4952
+ campaign: z72.string().max(200).optional()
4910
4953
  });
4911
- var RequestWorkspaceRecycleRequestSchema = z72.object({
4912
- sessionId: z72.string(),
4913
- reason: z72.string().max(2e3)
4954
+ var RequestWorkspaceRecycleRequestSchema = z82.object({
4955
+ sessionId: z82.string(),
4956
+ reason: z82.string().max(2e3)
4914
4957
  });
4915
- var ReportApiOutageRequestSchema = z72.object({
4916
- sessionId: z72.string(),
4917
- detail: z72.string().max(2e3),
4918
- attempts: z72.number().int().min(0).max(100)
4958
+ var ReportApiOutageRequestSchema = z82.object({
4959
+ sessionId: z82.string(),
4960
+ detail: z82.string().max(2e3),
4961
+ attempts: z82.number().int().min(0).max(100)
4919
4962
  });
4920
4963
  var CONTEXT_LINK_LOCATOR_MAX2 = 300;
4921
4964
  var TAG_DESCRIPTION_MAX = CARD_DESCRIPTION_MAX;
4922
4965
  var TAG_OVERVIEW_MAX = 32e3;
4923
4966
  var TAG_REASON_MAX = 500;
4924
- var ProjectTagContextPathSchema = z82.object({
4925
- type: z82.enum(["rule", "doc", "file", "folder"]),
4926
- path: z82.string().min(1).max(500),
4927
- label: z82.string().max(100).optional(),
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(),
4928
4971
  /** Verified-link tether — text that must keep existing in the file. */
4929
- locator: z82.string().min(1).max(CONTEXT_LINK_LOCATOR_MAX2).regex(/^[^\r\n]*$/, "Locator cannot contain line breaks").optional(),
4972
+ locator: z92.string().min(1).max(CONTEXT_LINK_LOCATOR_MAX2).regex(/^[^\r\n]*$/, "Locator cannot contain line breaks").optional(),
4930
4973
  /** test = must appear in a real test/describe title; code = any substring. */
4931
- locatorType: z82.enum(["test", "code"]).optional()
4974
+ locatorType: z92.enum(["test", "code"]).optional()
4932
4975
  }).refine((link) => link.locator === void 0 === (link.locatorType === void 0), {
4933
4976
  message: "locator and locatorType must be provided together"
4934
4977
  }).refine((link) => link.locator === void 0 || link.type !== "folder", {
4935
4978
  message: "folder links cannot carry a locator"
4936
4979
  });
4937
- var hexColor = z82.string().regex(/^#[0-9a-fA-F]{6}$/, "Expected #RRGGBB hex color");
4938
- var overviewPathSchema = z82.string().min(1).max(500).regex(/^[^\r\n]*$/, "Overview path cannot contain line breaks");
4939
- var CreateProjectTagRequestSchema = z82.object({
4940
- projectId: z82.string(),
4941
- name: z82.string().min(1).max(50),
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),
4942
4985
  color: hexColor.optional(),
4943
- description: z82.string().max(TAG_DESCRIPTION_MAX).optional(),
4944
- overview: z82.string().max(TAG_OVERVIEW_MAX).optional(),
4986
+ description: z92.string().max(TAG_DESCRIPTION_MAX).optional(),
4987
+ overview: z92.string().max(TAG_OVERVIEW_MAX).optional(),
4945
4988
  /** Source the overview from this repo file (stored overview stays as the pending fallback). */
4946
4989
  overviewPath: overviewPathSchema.optional(),
4947
- contextPaths: z82.array(ProjectTagContextPathSchema).max(20).optional(),
4990
+ contextPaths: z92.array(ProjectTagContextPathSchema).max(20).optional(),
4948
4991
  /** Parents to link at create time (multi-parent DAG). */
4949
- parentTagIds: z82.array(z82.string()).max(25).optional(),
4950
- requestingUserId: z82.string().optional()
4992
+ parentTagIds: z92.array(z92.string()).max(25).optional(),
4993
+ requestingUserId: z92.string().optional()
4951
4994
  });
4952
- var UpdateProjectTagRequestSchema = z82.object({
4953
- projectId: z82.string(),
4954
- tagId: z82.string(),
4955
- name: z82.string().min(1).max(50).optional(),
4995
+ var UpdateProjectTagRequestSchema = z92.object({
4996
+ projectId: z92.string(),
4997
+ tagId: z92.string(),
4998
+ name: z92.string().min(1).max(50).optional(),
4956
4999
  color: hexColor.optional(),
4957
- description: z82.string().max(TAG_DESCRIPTION_MAX).optional(),
5000
+ description: z92.string().max(TAG_DESCRIPTION_MAX).optional(),
4958
5001
  /** Full markdown glossary body; null clears it. Rejected while overviewPath is set. */
4959
- overview: z82.string().max(TAG_OVERVIEW_MAX).nullable().optional(),
5002
+ overview: z92.string().max(TAG_OVERVIEW_MAX).nullable().optional(),
4960
5003
  /** Repo file to source the overview from; null clears back to the stored overview. */
4961
5004
  overviewPath: overviewPathSchema.nullable().optional(),
4962
5005
  /** Full replacement of the tag's context links when provided. */
4963
- contextPaths: z82.array(ProjectTagContextPathSchema).max(20).optional(),
5006
+ contextPaths: z92.array(ProjectTagContextPathSchema).max(20).optional(),
4964
5007
  /** Full-set replacement of the tag's parent tags (multi-parent DAG). */
4965
- parentTagIds: z82.array(z82.string()).max(25).optional(),
5008
+ parentTagIds: z92.array(z92.string()).max(25).optional(),
4966
5009
  /** One-line revision provenance, recorded in the tag's history. */
4967
- reason: z82.string().max(TAG_REASON_MAX).optional(),
5010
+ reason: z92.string().max(TAG_REASON_MAX).optional(),
4968
5011
  /** Card the caller was working in — stamped into the revision history. */
4969
- taskId: z82.string().optional(),
4970
- requestingUserId: z82.string().optional()
5012
+ taskId: z92.string().optional(),
5013
+ requestingUserId: z92.string().optional()
4971
5014
  });
4972
- var PostToProjectChatRequestSchema = z82.object({
4973
- projectId: z82.string(),
4974
- content: z82.string().min(1).max(2e4),
4975
- requestingUserId: z82.string().optional(),
5015
+ var PostToProjectChatRequestSchema = z92.object({
5016
+ projectId: z92.string(),
5017
+ content: z92.string().min(1).max(2e4),
5018
+ requestingUserId: z92.string().optional(),
4976
5019
  /** Marks the post so the server can persist it beyond chat (tag-audit summaries land in tag history). */
4977
- kind: z82.enum(["tag_audit_summary"]).optional()
4978
- });
4979
- var StartTagAuditRequestSchema = z82.object({
4980
- projectId: z82.string(),
4981
- requestingUserId: z82.string().optional()
4982
- });
4983
- var StartTaskAuditRequestSchema = z82.object({
4984
- projectId: z82.string(),
4985
- taskIds: z82.array(z82.string()).min(1).max(20),
4986
- requestingUserId: z82.string().optional()
4987
- });
4988
- var GetActiveAuditSessionsRequestSchema = z82.object({
4989
- projectId: z82.string()
4990
- });
4991
- var ReportTaskAuditResultRequestSchema = z82.object({
4992
- projectId: z82.string(),
4993
- taskId: z82.string(),
4994
- summary: z82.string(),
4995
- turnGrades: z82.array(
4996
- z82.object({
4997
- turnIndex: z82.number(),
4998
- phase: z82.enum(["planning", "building", "human"]),
4999
- grade: z82.enum(["correct", "neutral", "blunder"]),
5000
- reasoning: z82.string(),
5001
- eventType: z82.string(),
5002
- eventSummary: z82.string()
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()
5003
5046
  })
5004
5047
  ),
5005
- planningAccuracy: z82.number().nullable(),
5006
- buildingAccuracy: z82.number().nullable(),
5007
- humanAccuracy: z82.number().nullable(),
5008
- planningCorrect: z82.number(),
5009
- planningNeutral: z82.number(),
5010
- planningBlunder: z82.number(),
5011
- buildingCorrect: z82.number(),
5012
- buildingNeutral: z82.number(),
5013
- buildingBlunder: z82.number(),
5014
- humanCorrect: z82.number(),
5015
- humanNeutral: z82.number(),
5016
- humanBlunder: z82.number(),
5017
- humanEvaluations: z82.array(
5018
- z82.object({
5019
- messageIndex: z82.number(),
5020
- rating: z82.union([z82.literal(-1), z82.literal(0), z82.literal(1)]),
5021
- reasoning: z82.string()
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()
5022
5065
  })
5023
5066
  ).optional(),
5024
- suggestionIds: z82.array(z82.string()),
5025
- auditCostUsd: z82.number().nullable(),
5026
- model: z82.string().nullable(),
5067
+ suggestionIds: z92.array(z92.string()),
5068
+ auditCostUsd: z92.number().nullable(),
5069
+ model: z92.string().nullable(),
5027
5070
  /** When set, the audit is marked failed with this message instead. */
5028
- error: z82.string().optional()
5071
+ error: z92.string().optional()
5029
5072
  });
5030
- var GetTaskAuditsRequestSchema = z82.object({
5031
- projectId: z82.string(),
5032
- limit: z82.number().int().positive().max(200).optional().default(50)
5073
+ var GetTaskAuditsRequestSchema = z92.object({
5074
+ projectId: z92.string(),
5075
+ limit: z92.number().int().positive().max(200).optional().default(50)
5033
5076
  });
5034
- var GetTaskAuditRequestSchema = z82.object({
5035
- projectId: z82.string(),
5036
- auditId: z82.string()
5077
+ var GetTaskAuditRequestSchema = z92.object({
5078
+ projectId: z92.string(),
5079
+ auditId: z92.string()
5037
5080
  });
5038
- var GetTaskAuditAggregatesRequestSchema = z82.object({
5039
- projectId: z82.string()
5081
+ var GetTaskAuditAggregatesRequestSchema = z92.object({
5082
+ projectId: z92.string()
5040
5083
  });
5041
- var DeleteTaskAuditRequestSchema = z82.object({
5042
- projectId: z82.string(),
5043
- auditId: z82.string(),
5044
- requestingUserId: z82.string().optional()
5084
+ var DeleteTaskAuditRequestSchema = z92.object({
5085
+ projectId: z92.string(),
5086
+ auditId: z92.string(),
5087
+ requestingUserId: z92.string().optional()
5045
5088
  });
5046
- var MarkInitialPromptSubmittedRequestSchema = z82.object({
5047
- sessionId: z82.string()
5089
+ var MarkInitialPromptSubmittedRequestSchema = z92.object({
5090
+ sessionId: z92.string()
5048
5091
  });
5049
5092
  var DECISION_STATUS_LABELS = ["Open", "Decided", "Cancelled"];
5050
5093
  var DECISION_OPTION_KINDS = ["current", "planned", "proposed"];
@@ -5059,165 +5102,165 @@ var DECISION_DEADLINE_MIN_HOURS = 1;
5059
5102
  var DECISION_DEADLINE_MAX_DAYS = 30;
5060
5103
  var DECISION_DEADLINE_MAX_HOURS = DECISION_DEADLINE_MAX_DAYS * 24;
5061
5104
  var DECISION_LIST_MAX_LIMIT = 200;
5062
- var decisionIdSchema = z92.string().cuid("Invalid decision ID");
5063
- var optionInputSchema = z92.object({
5064
- label: z92.string().min(1, "Option label is required").max(DECISION_OPTION_LABEL_MAX),
5065
- description: z92.string().min(1, "Describe the option as GIVEN / WHEN / THEN"),
5066
- kind: z92.enum(DECISION_OPTION_KINDS).optional()
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()
5067
5110
  });
5068
- var optionsArraySchema = z92.array(optionInputSchema).min(DECISION_OPTIONS_MIN, `A decision needs at least ${DECISION_OPTIONS_MIN} options`).max(
5111
+ var optionsArraySchema = z10.array(optionInputSchema).min(DECISION_OPTIONS_MIN, `A decision needs at least ${DECISION_OPTIONS_MIN} options`).max(
5069
5112
  DECISION_OPTIONS_MAX,
5070
5113
  `A decision takes at most ${DECISION_OPTIONS_MAX} options \u2014 more than that means the question is not framed yet`
5071
5114
  );
5072
- var CreateDecisionRequestSchema = z92.object({
5073
- projectId: z92.string().cuid("Invalid project ID"),
5115
+ var CreateDecisionRequestSchema = z10.object({
5116
+ projectId: z10.string().cuid("Invalid project ID"),
5074
5117
  /** The question, as one plain sentence. */
5075
- title: z92.string().min(1, "A decision needs a question").max(DECISION_QUESTION_MAX),
5076
- description: z92.string().max(CARD_DESCRIPTION_MAX).optional(),
5077
- context: z92.string().min(1, "Context is required \u2014 say why this is being asked now"),
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"),
5078
5121
  options: optionsArraySchema,
5079
5122
  /** 1-based position of the option that wins on silence. */
5080
- defaultOptionOrdinal: z92.number().int().min(1).max(DECISION_OPTIONS_MAX),
5081
- deadlineHours: z92.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional(),
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(),
5082
5125
  /** Cards this decision blocks, by cuid or slug. */
5083
- impactedCardRefs: z92.array(z92.string().min(1)).max(50).optional(),
5084
- tagNames: z92.array(z92.string().min(1)).max(10).optional(),
5085
- raisedByTaskId: z92.string().min(1).optional(),
5086
- raisedByPrNumber: z92.number().int().positive().optional()
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()
5087
5130
  });
5088
- var VoteDecisionRequestSchema = z92.object({
5131
+ var VoteDecisionRequestSchema = z10.object({
5089
5132
  decisionId: decisionIdSchema,
5090
- optionId: z92.string().cuid("Invalid option ID"),
5091
- reason: z92.string().max(DECISION_VOTE_REASON_MAX).optional(),
5092
- source: z92.enum(DECISION_VOTE_SOURCES).optional()
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()
5093
5136
  });
5094
- var RemoveDecisionVoteRequestSchema = z92.object({
5137
+ var RemoveDecisionVoteRequestSchema = z10.object({
5095
5138
  decisionId: decisionIdSchema
5096
5139
  });
5097
- var ResolveDecisionRequestSchema = z92.object({
5140
+ var ResolveDecisionRequestSchema = z10.object({
5098
5141
  decisionId: decisionIdSchema,
5099
- chosenOptionId: z92.string().cuid("Invalid option ID"),
5100
- resolution: z92.string().min(1, "A resolution is required \u2014 say what was decided").max(DECISION_RESOLUTION_MAX),
5101
- resolutionNotes: z92.string().optional()
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()
5102
5145
  });
5103
- var CancelDecisionRequestSchema = z92.object({
5146
+ var CancelDecisionRequestSchema = z10.object({
5104
5147
  decisionId: decisionIdSchema,
5105
5148
  /** Why it is being dropped. Posted to the decision thread. */
5106
- reason: z92.string().max(DECISION_RESOLUTION_MAX).optional()
5149
+ reason: z10.string().max(DECISION_RESOLUTION_MAX).optional()
5107
5150
  });
5108
- var BulkDecisionIdsRequestSchema = z92.object({
5109
- projectId: z92.string().cuid("Invalid project ID"),
5110
- decisionIds: z92.array(z92.string().cuid()).min(1).max(200)
5151
+ var BulkDecisionIdsRequestSchema = z10.object({
5152
+ projectId: z10.string().cuid("Invalid project ID"),
5153
+ decisionIds: z10.array(z10.string().cuid()).min(1).max(200)
5111
5154
  });
5112
- var ReopenDecisionRequestSchema = z92.object({
5155
+ var ReopenDecisionRequestSchema = z10.object({
5113
5156
  decisionId: decisionIdSchema,
5114
- deadlineHours: z92.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional()
5157
+ deadlineHours: z10.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional()
5115
5158
  });
5116
- var UpdateDecisionRequestSchema = z92.object({
5159
+ var UpdateDecisionRequestSchema = z10.object({
5117
5160
  decisionId: decisionIdSchema,
5118
- title: z92.string().min(1).max(200).optional(),
5119
- description: z92.string().max(CARD_DESCRIPTION_MAX).optional(),
5120
- context: z92.string().min(1).optional(),
5121
- deadlineAt: z92.string().datetime().optional(),
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(),
5122
5165
  /** Only accepted while the decision has zero votes. */
5123
5166
  options: optionsArraySchema.optional(),
5124
- defaultOptionOrdinal: z92.number().int().min(1).max(DECISION_OPTIONS_MAX).optional(),
5125
- addImpactedCardRefs: z92.array(z92.string().min(1)).max(50).optional(),
5126
- removeImpactedCardIds: z92.array(z92.string().min(1)).max(50).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()
5127
5170
  });
5128
- var GetDecisionRequestSchema = z92.object({
5171
+ var GetDecisionRequestSchema = z10.object({
5129
5172
  /** cuid or slug. A slug needs `projectId` to resolve unambiguously. */
5130
- decisionId: z92.string().min(1),
5131
- projectId: z92.string().cuid().optional()
5173
+ decisionId: z10.string().min(1),
5174
+ projectId: z10.string().cuid().optional()
5132
5175
  });
5133
- var ListDecisionsRequestSchema = z92.object({
5134
- projectId: z92.string().cuid("Invalid project ID"),
5135
- status: z92.enum(DECISION_STATUS_LABELS).optional(),
5176
+ var ListDecisionsRequestSchema = z10.object({
5177
+ projectId: z10.string().cuid("Invalid project ID"),
5178
+ status: z10.enum(DECISION_STATUS_LABELS).optional(),
5136
5179
  /** Tag name, not id — an agent knows the tag it is working under. */
5137
- tag: z92.string().min(1).optional(),
5180
+ tag: z10.string().min(1).optional(),
5138
5181
  /** Decisions that this card is blocked by (cuid or slug). */
5139
- cardId: z92.string().min(1).optional(),
5140
- query: z92.string().min(1).optional(),
5141
- limit: z92.number().int().min(1).max(DECISION_LIST_MAX_LIMIT).optional()
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()
5142
5185
  });
5143
- var optionInput = z10.object({
5144
- label: z10.string().min(1).max(DECISION_OPTION_LABEL_MAX),
5145
- description: z10.string().min(1),
5146
- kind: z10.enum(DECISION_OPTION_KINDS).optional()
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()
5147
5190
  });
5148
- var optionsInput = z10.array(optionInput).min(DECISION_OPTIONS_MIN).max(DECISION_OPTIONS_MAX);
5149
- var deadlineHours = z10.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional();
5150
- var CreateProjectDecisionRequestSchema = z10.object({
5151
- projectId: z10.string(),
5152
- question: z10.string().min(1).max(200),
5153
- summary: z10.string().max(CARD_DESCRIPTION_MAX).optional(),
5154
- context: z10.string().min(1),
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),
5155
5198
  options: optionsInput,
5156
- defaultOption: z10.number().int().min(1).max(DECISION_OPTIONS_MAX),
5199
+ defaultOption: z11.number().int().min(1).max(DECISION_OPTIONS_MAX),
5157
5200
  deadlineHours,
5158
- impactedCards: z10.array(z10.string().min(1)).max(50).optional(),
5201
+ impactedCards: z11.array(z11.string().min(1)).max(50).optional(),
5159
5202
  /**
5160
5203
  * Pod surface only: also block the card this session is working on. The
5161
5204
  * session's task id is resolved SERVER-side from `sessionId` — a
5162
5205
  * client-supplied card id would let a pod block any card in the project.
5163
5206
  */
5164
- includeCurrentCard: z10.boolean().optional(),
5165
- sessionId: z10.string().optional(),
5166
- tagNames: z10.array(z10.string().min(1)).max(10).optional(),
5167
- raisedByPr: z10.number().int().positive().optional(),
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(),
5168
5211
  /** Slug or id of the card that raised the question. A link back, not a block. */
5169
- raisedByCard: z10.string().min(1).optional(),
5212
+ raisedByCard: z11.string().min(1).optional(),
5170
5213
  /** Absolute deadline (ISO 8601). Wins over `deadlineHours` when both are sent. */
5171
- deadlineAt: z10.string().datetime({ offset: true }).optional(),
5172
- requestingUserId: z10.string().optional()
5173
- });
5174
- var ListProjectDecisionsRequestSchema = z10.object({
5175
- projectId: z10.string(),
5176
- status: z10.enum(DECISION_STATUS_LABELS).optional(),
5177
- tag: z10.string().min(1).optional(),
5178
- card: z10.string().min(1).optional(),
5179
- query: z10.string().min(1).optional(),
5180
- limit: z10.number().int().min(1).max(DECISION_LIST_MAX_LIMIT).optional(),
5181
- requestingUserId: z10.string().optional()
5214
+ deadlineAt: z11.string().datetime({ offset: true }).optional(),
5215
+ requestingUserId: z11.string().optional()
5182
5216
  });
5183
- var GetProjectDecisionRequestSchema = z10.object({
5184
- projectId: z10.string(),
5185
- decision: z10.string().min(1),
5186
- requestingUserId: z10.string().optional()
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()
5225
+ });
5226
+ var GetProjectDecisionRequestSchema = z11.object({
5227
+ projectId: z11.string(),
5228
+ decision: z11.string().min(1),
5229
+ requestingUserId: z11.string().optional()
5187
5230
  });
5188
- var VoteProjectDecisionRequestSchema = z10.object({
5189
- projectId: z10.string(),
5190
- decision: z10.string().min(1),
5231
+ var VoteProjectDecisionRequestSchema = z11.object({
5232
+ projectId: z11.string(),
5233
+ decision: z11.string().min(1),
5191
5234
  /** An option id, or its 1-based position. */
5192
- option: z10.string().min(1),
5193
- reason: z10.string().max(CARD_DESCRIPTION_MAX).optional(),
5194
- requestingUserId: z10.string().optional()
5195
- });
5196
- var ResolveProjectDecisionRequestSchema = z10.object({
5197
- projectId: z10.string(),
5198
- decision: z10.string().min(1),
5199
- option: z10.string().min(1),
5200
- resolution: z10.string().min(1).max(DECISION_RESOLUTION_MAX),
5201
- notes: z10.string().optional(),
5202
- requestingUserId: z10.string().optional()
5203
- });
5204
- var UpdateProjectDecisionRequestSchema = z10.object({
5205
- projectId: z10.string(),
5206
- decision: z10.string().min(1),
5207
- question: z10.string().min(1).max(200).optional(),
5208
- summary: z10.string().max(CARD_DESCRIPTION_MAX).optional(),
5209
- context: z10.string().min(1).optional(),
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(),
5210
5253
  /** Accepted only while nobody has voted. */
5211
5254
  options: optionsInput.optional(),
5212
- defaultOption: z10.number().int().min(1).max(DECISION_OPTIONS_MAX).optional(),
5213
- tagNames: z10.array(z10.string().min(1)).max(10).optional(),
5255
+ defaultOption: z11.number().int().min(1).max(DECISION_OPTIONS_MAX).optional(),
5256
+ tagNames: z11.array(z11.string().min(1)).max(10).optional(),
5214
5257
  deadlineHours,
5215
5258
  /** Absolute deadline (ISO 8601). Wins over `deadlineHours` when both are sent. */
5216
- deadlineAt: z10.string().datetime({ offset: true }).optional(),
5217
- addImpactedCards: z10.array(z10.string().min(1)).max(50).optional(),
5218
- removeImpactedCards: z10.array(z10.string().min(1)).max(50).optional(),
5219
- status: z10.enum(["Cancelled", "Open"]).optional(),
5220
- requestingUserId: z10.string().optional()
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()
5221
5264
  });
5222
5265
  var EVALUATE_MAX_QUESTIONS = 32;
5223
5266
  var EVALUATE_MAX_ITEMS = 100;
@@ -5225,29 +5268,29 @@ var EVALUATE_ITEM_MAX_CHARS = 8e3;
5225
5268
  var EVALUATE_REQUEST_MAX_CHARS = 4e5;
5226
5269
  var TEXT_MAX = 1e3;
5227
5270
  var QUESTION_KEY = /^[A-Za-z0-9_-]{1,64}$/;
5228
- var EvaluateQuestionSchema = z11.object({
5229
- key: z11.string().regex(QUESTION_KEY, "key must be 1-64 letters, digits, _ or -"),
5230
- type: z11.enum(["noul", "choice", "score"]),
5231
- instructions: z11.string().min(1).max(4e3),
5232
- options: z11.array(
5233
- z11.object({
5234
- key: z11.string().min(1).max(200),
5235
- description: z11.string().min(1).max(TEXT_MAX)
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)
5236
5279
  })
5237
5280
  ).optional(),
5238
- levels: z11.array(z11.string().min(1).max(TEXT_MAX)).optional()
5281
+ levels: z12.array(z12.string().min(1).max(TEXT_MAX)).optional()
5239
5282
  }).superRefine((q, ctx) => {
5240
5283
  if (q.type === "choice") {
5241
5284
  const n = q.options?.length ?? 0;
5242
5285
  if (n < 2 || n > 255) {
5243
5286
  ctx.addIssue({
5244
- code: z11.ZodIssueCode.custom,
5287
+ code: z12.ZodIssueCode.custom,
5245
5288
  path: ["options"],
5246
5289
  message: "a choice question needs 2-255 options"
5247
5290
  });
5248
5291
  } else if (new Set(q.options?.map((o) => o.key)).size !== n) {
5249
5292
  ctx.addIssue({
5250
- code: z11.ZodIssueCode.custom,
5293
+ code: z12.ZodIssueCode.custom,
5251
5294
  path: ["options"],
5252
5295
  message: "option keys must be unique"
5253
5296
  });
@@ -5257,36 +5300,36 @@ var EvaluateQuestionSchema = z11.object({
5257
5300
  const n = q.levels?.length ?? 0;
5258
5301
  if (n < 2 || n > 10) {
5259
5302
  ctx.addIssue({
5260
- code: z11.ZodIssueCode.custom,
5303
+ code: z12.ZodIssueCode.custom,
5261
5304
  path: ["levels"],
5262
5305
  message: "a score question needs 2-10 levels"
5263
5306
  });
5264
5307
  }
5265
5308
  }
5266
5309
  });
5267
- var EvaluateQuestionsRequestSchema = z11.object({
5268
- projectId: z11.string(),
5269
- state: z11.string().max(JEV_STATE_MAX_CHARS).optional(),
5270
- items: z11.array(z11.string().max(EVALUATE_ITEM_MAX_CHARS)).max(EVALUATE_MAX_ITEMS).optional(),
5271
- questions: z11.array(EvaluateQuestionSchema).min(1).max(EVALUATE_MAX_QUESTIONS)
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)
5272
5315
  }).superRefine((req, ctx) => {
5273
5316
  if (req.state === void 0 && (!req.items || req.items.length === 0)) {
5274
5317
  ctx.addIssue({
5275
- code: z11.ZodIssueCode.custom,
5318
+ code: z12.ZodIssueCode.custom,
5276
5319
  path: ["state"],
5277
5320
  message: "pass state, or a non-empty items array"
5278
5321
  });
5279
5322
  }
5280
5323
  if (JSON.stringify(req).length > EVALUATE_REQUEST_MAX_CHARS) {
5281
5324
  ctx.addIssue({
5282
- code: z11.ZodIssueCode.custom,
5325
+ code: z12.ZodIssueCode.custom,
5283
5326
  path: [],
5284
5327
  message: `the request is over ${EVALUATE_REQUEST_MAX_CHARS} characters; split the items across calls`
5285
5328
  });
5286
5329
  }
5287
5330
  if (new Set(req.questions.map((q) => q.key)).size !== req.questions.length) {
5288
5331
  ctx.addIssue({
5289
- code: z11.ZodIssueCode.custom,
5332
+ code: z12.ZodIssueCode.custom,
5290
5333
  path: ["questions"],
5291
5334
  message: "question keys must be unique"
5292
5335
  });
@@ -5324,129 +5367,129 @@ var MEETING_TITLE_MAX = 200;
5324
5367
  var MEETING_OCCURRED_AT_MIN_YEAR = 2e3;
5325
5368
  var MEETING_OCCURRED_AT_MAX_FUTURE_MS = 48 * 60 * 60 * 1e3;
5326
5369
  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.`;
5327
- var MeetingOccurredAtSchema = z12.string().datetime().refine((value) => {
5370
+ var MeetingOccurredAtSchema = z13.string().datetime().refine((value) => {
5328
5371
  const ms = Date.parse(value);
5329
5372
  if (Number.isNaN(ms)) return false;
5330
5373
  if (ms > Date.now() + MEETING_OCCURRED_AT_MAX_FUTURE_MS) return false;
5331
5374
  return new Date(ms).getUTCFullYear() >= MEETING_OCCURRED_AT_MIN_YEAR;
5332
5375
  }, OCCURRED_AT_RANGE_MESSAGE);
5333
- var CreateMeetingFromTranscriptRequestSchema = z12.object({
5334
- projectId: z12.string().cuid(),
5335
- rawText: z12.string().min(1).max(MEETING_TRANSCRIPT_MAX_CHARS),
5336
- title: z12.string().min(1).max(MEETING_TITLE_MAX).optional(),
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(),
5337
5380
  /** ISO 8601. Defaults to now when the source carries no date. */
5338
5381
  occurredAt: MeetingOccurredAtSchema.optional(),
5339
5382
  /** Override auto-detection. Rarely needed; detection handles the three formats. */
5340
- format: z12.enum(["text", "vtt", "srt"]).optional(),
5341
- source: z12.enum(["manual", "slack"]).optional()
5383
+ format: z13.enum(["text", "vtt", "srt"]).optional(),
5384
+ source: z13.enum(["manual", "slack"]).optional()
5342
5385
  });
5343
- var GetMeetingRequestSchema = z12.object({
5344
- projectId: z12.string().cuid(),
5345
- meetingId: z12.string().cuid()
5386
+ var GetMeetingRequestSchema = z13.object({
5387
+ projectId: z13.string().cuid(),
5388
+ meetingId: z13.string().cuid()
5346
5389
  });
5347
- var UpdateMeetingRequestSchema = z12.object({
5348
- projectId: z12.string().cuid(),
5349
- meetingId: z12.string().cuid(),
5350
- title: z12.string().min(1).max(MEETING_TITLE_MAX).optional(),
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(),
5351
5394
  occurredAt: MeetingOccurredAtSchema.optional()
5352
5395
  });
5353
- var RegenerateMeetingSummaryRequestSchema = z12.object({
5354
- projectId: z12.string().cuid(),
5355
- meetingId: z12.string().cuid()
5396
+ var RegenerateMeetingSummaryRequestSchema = z13.object({
5397
+ projectId: z13.string().cuid(),
5398
+ meetingId: z13.string().cuid()
5356
5399
  });
5357
- var DeleteMeetingRequestSchema = z12.object({
5358
- projectId: z12.string().cuid(),
5359
- meetingId: z12.string().cuid()
5400
+ var DeleteMeetingRequestSchema = z13.object({
5401
+ projectId: z13.string().cuid(),
5402
+ meetingId: z13.string().cuid()
5360
5403
  });
5361
- var checklistTitle = z12.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX);
5362
- var ListMeetingChecklistRequestSchema = z12.object({
5363
- projectId: z12.string().cuid(),
5364
- meetingId: z12.string().cuid()
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()
5365
5408
  });
5366
- var AddMeetingChecklistItemsRequestSchema = z12.object({
5367
- projectId: z12.string().cuid(),
5368
- meetingId: z12.string().cuid(),
5369
- items: z12.array(z12.object({ title: checklistTitle })).min(1).max(50)
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)
5370
5413
  });
5371
- var UpdateMeetingChecklistItemRequestSchema = z12.object({
5372
- projectId: z12.string().cuid(),
5373
- meetingId: z12.string().cuid(),
5374
- itemId: z12.string().cuid(),
5414
+ var UpdateMeetingChecklistItemRequestSchema = z13.object({
5415
+ projectId: z13.string().cuid(),
5416
+ meetingId: z13.string().cuid(),
5417
+ itemId: z13.string().cuid(),
5375
5418
  title: checklistTitle.optional(),
5376
- ordinal: z12.number().int().min(0).optional(),
5419
+ ordinal: z13.number().int().min(0).optional(),
5377
5420
  /** Explicit null clears the link; undefined leaves it alone. */
5378
- linkedTaskId: z12.string().cuid().nullable().optional()
5421
+ linkedTaskId: z13.string().cuid().nullable().optional()
5379
5422
  }).refine(
5380
5423
  (v) => v.title !== void 0 || v.ordinal !== void 0 || v.linkedTaskId !== void 0,
5381
5424
  "Pass at least one of title, ordinal, or linkedTaskId."
5382
5425
  );
5383
- var DeleteMeetingChecklistItemRequestSchema = z12.object({
5384
- projectId: z12.string().cuid(),
5385
- meetingId: z12.string().cuid(),
5386
- itemId: z12.string().cuid()
5387
- });
5388
- var SetMeetingChecklistItemCheckedRequestSchema = z12.object({
5389
- projectId: z12.string().cuid(),
5390
- meetingId: z12.string().cuid(),
5391
- itemId: z12.string().cuid(),
5392
- checked: z12.boolean(),
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(),
5393
5436
  /** Attach the card in the same call that ticks the item. */
5394
- linkedTaskId: z12.string().cuid().nullable().optional()
5437
+ linkedTaskId: z13.string().cuid().nullable().optional()
5395
5438
  });
5396
- var ListMeetingsRequestSchema = z12.object({
5397
- projectId: z12.string().cuid(),
5398
- limit: z12.number().int().min(1).max(50).optional(),
5399
- search: z12.string().max(200).optional()
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()
5400
5443
  });
5401
- var ReadMeetingTranscriptRequestSchema = z12.object({
5402
- projectId: z12.string().cuid(),
5403
- meetingId: z12.string().cuid(),
5404
- offset: z12.number().int().min(0).optional(),
5405
- limit: z12.number().int().min(1).max(500).optional()
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()
5406
5449
  });
5407
5450
  var MEETING_SUMMARY_MAX_CHARS = 5e4;
5408
- var AddProjectMeetingChecklistItemsRequestSchema = z12.object({
5409
- projectId: z12.string().cuid(),
5410
- meetingId: z12.string().cuid(),
5411
- items: z12.array(z12.object({ title: z12.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX) })).min(1).max(50),
5412
- requestingUserId: z12.string().optional()
5413
- });
5414
- var CheckProjectMeetingChecklistItemRequestSchema = z12.object({
5415
- projectId: z12.string().cuid(),
5416
- meetingId: z12.string().cuid(),
5417
- title: z12.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
5418
- checked: z12.boolean(),
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(),
5419
5462
  /** Card id or slug. Resolved server-side and required to be in the project. */
5420
- linkedTask: z12.string().min(1).optional(),
5421
- requestingUserId: z12.string().optional()
5422
- });
5423
- var EditProjectMeetingChecklistItemRequestSchema = z12.object({
5424
- projectId: z12.string().cuid(),
5425
- meetingId: z12.string().cuid(),
5426
- title: z12.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
5427
- newTitle: z12.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
5428
- requestingUserId: z12.string().optional()
5429
- });
5430
- var RemoveProjectMeetingChecklistItemRequestSchema = z12.object({
5431
- projectId: z12.string().cuid(),
5432
- meetingId: z12.string().cuid(),
5433
- title: z12.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
5434
- requestingUserId: z12.string().optional()
5435
- });
5436
- var CreateProjectMeetingRequestSchema = z12.object({
5437
- projectId: z12.string().cuid(),
5438
- rawText: z12.string().min(1).max(MEETING_TRANSCRIPT_MAX_CHARS),
5439
- title: z12.string().min(1).max(MEETING_TITLE_MAX).optional(),
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(),
5440
5483
  occurredAt: MeetingOccurredAtSchema.optional(),
5441
- requestingUserId: z12.string().optional()
5484
+ requestingUserId: z13.string().optional()
5442
5485
  });
5443
- var UpdateProjectMeetingRequestSchema = z12.object({
5444
- projectId: z12.string().cuid(),
5445
- meetingId: z12.string().cuid(),
5446
- title: z12.string().min(1).max(MEETING_TITLE_MAX).optional(),
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(),
5447
5490
  occurredAt: MeetingOccurredAtSchema.optional(),
5448
- summary: z12.string().min(1).max(MEETING_SUMMARY_MAX_CHARS).optional(),
5449
- requestingUserId: z12.string().optional()
5491
+ summary: z13.string().min(1).max(MEETING_SUMMARY_MAX_CHARS).optional(),
5492
+ requestingUserId: z13.string().optional()
5450
5493
  }).refine(
5451
5494
  (v) => v.title !== void 0 || v.occurredAt !== void 0 || v.summary !== void 0,
5452
5495
  "Pass at least one of title, occurredAt, or summary."
@@ -5660,14 +5703,19 @@ var CATALOG = {
5660
5703
  lgtm: {
5661
5704
  name: "lgtm",
5662
5705
  image: "grafana/otel-lgtm:0.11.6",
5663
- // The otel-lgtm image's own CMD is ["/otel-lgtm/run-all.sh"] (WORKDIR
5664
- // /otel-lgtm). Declaring it explicitly makes lgtm a command-based service so
5665
- // the lazy start-file gate wraps it like the others — otherwise it launches
5666
- // via image CMD at boot and can't be parked (which is why warm-booting it at
5667
- // a minimal request OOMKilled it). getSidecarSpecs strips this command for a
5668
- // baked lgtm image, so it only applies to the stock image whose launcher is
5669
- // exactly this path.
5670
- command: ["/otel-lgtm/run-all.sh"],
5706
+ // Runs the image's own launcher (/otel-lgtm/run-all.sh) after capping
5707
+ // Tempo's retention. The image ships Tempo with the 14-day default, and its
5708
+ // blocks live on the container's writable layer, which counts against the
5709
+ // 1Gi ephemeral-storage limit below; overrunning it evicts the whole pod.
5710
+ // At 100% sampling a busy dev stack writes up to ~2 GB of traces a day, so
5711
+ // keep 3h (plus 10m before a retired block leaves disk). The grep keeps it
5712
+ // idempotent, and a failed append still starts the stack. lgtm has no bake,
5713
+ // so no baked image ever strips this command.
5714
+ command: [
5715
+ "sh",
5716
+ "-c",
5717
+ "grep -q '^compactor:' /otel-lgtm/tempo-config.yaml || printf '\\ncompactor:\\n compaction:\\n block_retention: 3h\\n compacted_block_retention: 10m\\n' >> /otel-lgtm/tempo-config.yaml; exec /otel-lgtm/run-all.sh"
5718
+ ],
5671
5719
  ports: [
5672
5720
  // OTLP gRPC + HTTP — agents and user code emit telemetry here.
5673
5721
  4317,
@@ -5893,7 +5941,7 @@ function registerChecklistTools(server2, conn2) {
5893
5941
  }
5894
5942
 
5895
5943
  // src/tools/workspace.ts
5896
- import { z as z13 } from "zod";
5944
+ import { z as z14 } from "zod/v3";
5897
5945
 
5898
5946
  // src/workspace-ssh-tunnel.ts
5899
5947
  import net from "net";
@@ -6013,8 +6061,8 @@ function registerAttachInfoTool(server2, conn2) {
6013
6061
  "workspace_attach_info",
6014
6062
  "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.",
6015
6063
  {
6016
- taskId: z13.string().describe("The task ID"),
6017
- sshPublicKey: z13.string().optional().describe("Optional OpenSSH public key to install into the workspace")
6064
+ taskId: z14.string().describe("The task ID"),
6065
+ sshPublicKey: z14.string().optional().describe("Optional OpenSSH public key to install into the workspace")
6018
6066
  },
6019
6067
  async ({ taskId, sshPublicKey }) => {
6020
6068
  const info = await conn2.getWorkspaceAttachInfo(taskId, sshPublicKey);
@@ -6027,7 +6075,7 @@ function registerPreviewUrlsTool(server2, conn2) {
6027
6075
  "workspace_preview_urls",
6028
6076
  "Return the hosted preview URLs and preview ports for a running task Claudespace. This mirrors the web UI preview link metadata.",
6029
6077
  {
6030
- taskId: z13.string().describe("The task ID")
6078
+ taskId: z14.string().describe("The task ID")
6031
6079
  },
6032
6080
  async ({ taskId }) => {
6033
6081
  const info = await conn2.getWorkspaceAttachInfo(taskId);
@@ -6057,10 +6105,10 @@ function registerStartTunnelTool(server2, conn2, startTunnel) {
6057
6105
  "workspace_start_tunnel",
6058
6106
  "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.",
6059
6107
  {
6060
- taskId: z13.string().describe("The task ID"),
6061
- port: z13.number().optional().describe("Remote Claudespace port. Defaults to SSH port 2222."),
6062
- preferredLocalPort: z13.number().optional().describe("Preferred local loopback port. If omitted, the OS chooses one."),
6063
- sshPublicKey: z13.string().optional().describe("Optional OpenSSH public key to install before opening the tunnel")
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")
6064
6112
  },
6065
6113
  async ({ taskId, port, preferredLocalPort, sshPublicKey }) => {
6066
6114
  const info = await conn2.getWorkspaceAttachInfo(taskId, sshPublicKey);
@@ -6120,7 +6168,7 @@ function registerStopTunnelTool(server2) {
6120
6168
  "workspace_stop_tunnel",
6121
6169
  "Stop a local workspace tunnel previously opened by workspace_start_tunnel.",
6122
6170
  {
6123
- tunnelId: z13.string().describe("Tunnel id returned by workspace_start_tunnel")
6171
+ tunnelId: z14.string().describe("Tunnel id returned by workspace_start_tunnel")
6124
6172
  },
6125
6173
  async ({ tunnelId }) => {
6126
6174
  const tunnel = activeTunnels.get(tunnelId);