@open-mercato/cezar 0.19.0-pr1893.4321 → 0.19.0-pr1894.4317

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 (143) hide show
  1. package/dist/contract/index.js +1343 -1354
  2. package/dist/contract/managers.d.ts +0 -12
  3. package/dist/contract/workspace.d.ts +0 -10
  4. package/dist/managers/engine.d.ts +0 -1
  5. package/dist/managers/engine.js +2 -3
  6. package/dist/managers/engine.js.map +1 -1
  7. package/dist/server/server.d.ts +68 -93
  8. package/dist/server/server.js +3 -8
  9. package/dist/server/server.js.map +1 -1
  10. package/dist/server/static-ui.d.ts +0 -2
  11. package/dist/server/static-ui.js +2 -12
  12. package/dist/server/static-ui.js.map +1 -1
  13. package/package.json +3 -3
  14. package/web/dist/assets/{active-forge-C-_PdZgg.js → active-forge-B_IA2ipk.js} +1 -1
  15. package/web/dist/assets/{agent-task-pickers-KKwKivxO.js → agent-task-pickers-DHEHuq9k.js} +1 -1
  16. package/web/dist/assets/{alert-dialog-DzQLw5to.js → alert-dialog-k_YIy_xW.js} +1 -1
  17. package/web/dist/assets/arrow-down-CaEwyR2D.js +1 -0
  18. package/web/dist/assets/arrow-left-DiYgEuyz.js +1 -0
  19. package/web/dist/assets/arrow-up-DPdr6JWI.js +1 -0
  20. package/web/dist/assets/{ask-answer-D5siM2hW.js → ask-answer-CfhnEDkL.js} +1 -1
  21. package/web/dist/assets/{ask-card-B3jWKF62.js → ask-card-Du8rlSXb.js} +1 -1
  22. package/web/dist/assets/{automation-format-w8_9nvYJ.js → automation-format-1_vkTAMN.js} +1 -1
  23. package/web/dist/assets/automations-route-CwTwJyHM.js +1 -0
  24. package/web/dist/assets/{bot-Cs9MQd2C.js → bot-2rLlHZLz.js} +1 -1
  25. package/web/dist/assets/{button-D5FFOAeu.js → button-BPLs7Ni5.js} +1 -1
  26. package/web/dist/assets/{centered-state-CP55386O.js → centered-state-Drqbgf6Y.js} +1 -1
  27. package/web/dist/assets/check-DfBZcWsC.js +1 -0
  28. package/web/dist/assets/chevron-left-Cqfz_RKR.js +1 -0
  29. package/web/dist/assets/chevron-right-B4o_y0g6.js +1 -0
  30. package/web/dist/assets/{circle-alert-5MWttBkd.js → circle-alert-V-ePAxN5.js} +1 -1
  31. package/web/dist/assets/circle-check-Fufe2jju.js +1 -0
  32. package/web/dist/assets/{collapsible-DCjeSotW.js → collapsible-B20jM72x.js} +1 -1
  33. package/web/dist/assets/{commit-list-BbqlO4aH.js → commit-list-C3xl-vED.js} +1 -1
  34. package/web/dist/assets/{compare-variants-CRXWB-Lt.js → compare-variants-CnXPXFKF.js} +1 -1
  35. package/web/dist/assets/composer-attachments-BqiG-y87.js +3 -0
  36. package/web/dist/assets/composer-d8c3Oprn.js +18 -0
  37. package/web/dist/assets/dashboard-CoxfRQNB.js +44 -0
  38. package/web/dist/assets/{diff-CogrXJWG.js → diff-BiLyjond.js} +2 -2
  39. package/web/dist/assets/{diff-view-Byno8b8N.js → diff-view-B4FfSGEZ.js} +1 -1
  40. package/web/dist/assets/{directional-usage-BsXaIJKW.js → directional-usage-Ck_VdnOc.js} +1 -1
  41. package/web/dist/assets/{download-B3DkC-bv.js → download-DL-p-CdX.js} +1 -1
  42. package/web/dist/assets/{external-link-zzDZyHwY.js → external-link-BAkpw290.js} +1 -1
  43. package/web/dist/assets/{file-mweNu-_v.js → file-Bd73eLyj.js} +1 -1
  44. package/web/dist/assets/{file-preview-ByHC9ehC.js → file-preview-G6NdWFfs.js} +1 -1
  45. package/web/dist/assets/{folder-CApLhnHY.js → folder-nCtyW93T.js} +1 -1
  46. package/web/dist/assets/{git-pull-request-draft-CsckKRgM.js → git-pull-request-draft-Cw47Oiez.js} +1 -1
  47. package/web/dist/assets/git-tab-loading-CuWrziI7.js +1 -0
  48. package/web/dist/assets/{git-toolbar-u3bSozbj.js → git-toolbar-Zfj6XALd.js} +1 -1
  49. package/web/dist/assets/{github-yoo-2ZT0.js → github-iboX5htr.js} +1 -1
  50. package/web/dist/assets/{host-usage-BKVevGLj.js → host-usage-c1_bp-yd.js} +1 -1
  51. package/web/dist/assets/{icon-tooltip-DcLjMBtU.js → icon-tooltip-Czu88L3j.js} +1 -1
  52. package/web/dist/assets/index-2RZbpWnm.css +2 -0
  53. package/web/dist/assets/index-9WaeiDIP.js +31 -0
  54. package/web/dist/assets/{input-oDwCK3fd.js → input-_UbE82za.js} +1 -1
  55. package/web/dist/assets/layout-cards-e9ze8cz7.js +1 -0
  56. package/web/dist/assets/{layout-grid-GA_0wTEU.js → layout-grid-BNGIkXwR.js} +1 -1
  57. package/web/dist/assets/{lib-D2liL_SJ.js → lib-DQmgrh-y.js} +1 -1
  58. package/web/dist/assets/loader-circle-5PoHCCxl.js +1 -0
  59. package/web/dist/assets/manager-chat-s6eW_BEW.js +1 -0
  60. package/web/dist/assets/manager-index-Bcqw3PY0.js +1 -0
  61. package/web/dist/assets/{manager-new-CcJNGB9V.js → manager-new-CqBFZWUZ.js} +2 -2
  62. package/web/dist/assets/manager-pickers-BXpbHj_B.js +1 -0
  63. package/web/dist/assets/managers-BLNokFDx.js +1 -0
  64. package/web/dist/assets/{markdown-BQeRxp3e.js → markdown-CRCa4UnR.js} +1 -1
  65. package/web/dist/assets/{markdown--tMxrFYe.js → markdown-CoDcLzoP.js} +1 -1
  66. package/web/dist/assets/{message-square-BrT83MDu.js → message-square-ConO1oFN.js} +1 -1
  67. package/web/dist/assets/{pencil-BmXvj5kf.js → pencil-a4mWsVEv.js} +1 -1
  68. package/web/dist/assets/{picker-pill-BVPvpdFn.js → picker-pill-BAEE0Pvl.js} +1 -1
  69. package/web/dist/assets/play-CtQxQy6p.js +1 -0
  70. package/web/dist/assets/plus-BYl0pOQe.js +1 -0
  71. package/web/dist/assets/popover-D7P7mAVa.js +1 -0
  72. package/web/dist/assets/{project-router-BchsWVNj.js → project-router-CAQ_Oxe6.js} +1 -1
  73. package/web/dist/assets/queries-6U5mJN-u.js +1 -0
  74. package/web/dist/assets/{reference-chip-DxkzPL-2.js → reference-chip-B6H2WTLe.js} +1 -1
  75. package/web/dist/assets/reference-conflict-action-CKo21AZF.js +1 -0
  76. package/web/dist/assets/{repo-git-jjLnTklO.js → repo-git-e-ua08-q.js} +1 -1
  77. package/web/dist/assets/{run-diff-BM164jU0.js → run-diff-Cev0aSKj.js} +1 -1
  78. package/web/dist/assets/{save-MznB2ixm.js → save-vGn0_gUH.js} +1 -1
  79. package/web/dist/assets/{scroll-within-DVA5bRyy.js → scroll-within-CIVvrh_T.js} +1 -1
  80. package/web/dist/assets/{search-x-DWxsCXf5.js → search-x-CZpY0d-w.js} +1 -1
  81. package/web/dist/assets/{settings-2-fXumKqyK.js → settings-2-CAkED2Sn.js} +1 -1
  82. package/web/dist/assets/{sheet-B6WMHVIq.js → sheet-Bwefh6Is.js} +1 -1
  83. package/web/dist/assets/skills-CwVuNP0U.js +1 -0
  84. package/web/dist/assets/{sortable.esm-C2C8OJfV.js → sortable.esm-D2imYWx4.js} +2 -2
  85. package/web/dist/assets/square-D7-aiMX1.js +1 -0
  86. package/web/dist/assets/{status-dot-8NQgUcGm.js → status-dot-C3INcwZx.js} +1 -1
  87. package/web/dist/assets/{tabs-RXufwIjt.js → tabs-CqSY3r9x.js} +1 -1
  88. package/web/dist/assets/{tag-CweXKIph.js → tag-CrX4pEQM.js} +1 -1
  89. package/web/dist/assets/{task-commits-BM0_KToY.js → task-commits-D-HUT0AP.js} +1 -1
  90. package/web/dist/assets/{task-graph-dw351M25.js → task-graph-LreYHXlp.js} +1 -1
  91. package/web/dist/assets/{task-notes-pImKVBNi.js → task-notes-DBlBzj3M.js} +1 -1
  92. package/web/dist/assets/{task-workspace-DJv24mb3.js → task-workspace-evclEDtn.js} +9 -9
  93. package/web/dist/assets/terminal-DqxbUQi-.js +1 -0
  94. package/web/dist/assets/{terminal-drawer-Sg9C5JGu.js → terminal-drawer-QtaC0hpQ.js} +1 -1
  95. package/web/dist/assets/{terminal-pane-B1I-ifaB.js → terminal-pane-C-BJS-9d.js} +1 -1
  96. package/web/dist/assets/{textarea-Cq7DDtfD.js → textarea-BcmyYGl9.js} +1 -1
  97. package/web/dist/assets/{toaster-Wa7F4iyv.js → toaster-CDohXgRs.js} +1 -1
  98. package/web/dist/assets/{tooltip-DtKnqzDA.js → tooltip-B5d2yF1i.js} +1 -1
  99. package/web/dist/assets/{tracker--eJvMq2y.js → tracker-B_ohRSic.js} +1 -1
  100. package/web/dist/assets/{triangle-alert-GmfaRcJN.js → triangle-alert-CtapCifw.js} +1 -1
  101. package/web/dist/assets/{upload-D3ets0xI.js → upload-D8sHqu-Q.js} +1 -1
  102. package/web/dist/assets/{use-now-ASrNOof2.js → use-now-Dva0mB3h.js} +1 -1
  103. package/web/dist/assets/{utils-DvM_XxkX.js → utils-dHlstY23.js} +1 -1
  104. package/web/dist/assets/{workflow-CQDl4-8z.js → workflow-B1yIQCWW.js} +1 -1
  105. package/web/dist/assets/{workflow-graph-YBHJoPgB.js → workflow-graph-DLZrKQmm.js} +1 -1
  106. package/web/dist/assets/{worktree-lifecycle-DEPkStwL.js → worktree-lifecycle-jju-ILyi.js} +1 -1
  107. package/web/dist/assets/{worktree-lifecycle-operation-Ds8wfeoc.js → worktree-lifecycle-operation-B_2rwDPu.js} +1 -1
  108. package/web/dist/assets/x-YsTtXjpS.js +1 -0
  109. package/web/dist/assets/{zoomable-image-CdOa3uR9.js → zoomable-image-UNot1hYV.js} +1 -1
  110. package/web/dist/index.html +60 -71
  111. package/web/dist/apple-touch-icon.png +0 -0
  112. package/web/dist/assets/arrow-down-CmqCCyer.js +0 -1
  113. package/web/dist/assets/arrow-left-GMAZTo9J.js +0 -1
  114. package/web/dist/assets/arrow-up-BXq9W_db.js +0 -1
  115. package/web/dist/assets/automations-route-BOxtN2HL.js +0 -1
  116. package/web/dist/assets/check-CdQxse6D.js +0 -1
  117. package/web/dist/assets/chevron-left-ChcO824y.js +0 -1
  118. package/web/dist/assets/chevron-right-Bju7cOoN.js +0 -1
  119. package/web/dist/assets/circle-check-CiFQQrr7.js +0 -1
  120. package/web/dist/assets/composer-CM2zU1kg.js +0 -18
  121. package/web/dist/assets/composer-attachments-Cm_UaXht.js +0 -3
  122. package/web/dist/assets/dashboard-Ba_HDzNi.js +0 -44
  123. package/web/dist/assets/git-tab-loading-DqmJV1ZG.js +0 -1
  124. package/web/dist/assets/index-BCWvvPAv.css +0 -2
  125. package/web/dist/assets/index-gDOowls7.js +0 -31
  126. package/web/dist/assets/layout-cards-CGpFi-NX.js +0 -1
  127. package/web/dist/assets/loader-circle-C4NULY2C.js +0 -1
  128. package/web/dist/assets/manager-chat-DHnV7liI.js +0 -1
  129. package/web/dist/assets/manager-index-wFeR3v3L.js +0 -1
  130. package/web/dist/assets/manager-pickers-BdcqExo1.js +0 -1
  131. package/web/dist/assets/managers-C6rZIgcS.js +0 -1
  132. package/web/dist/assets/play-YB3b07Ma.js +0 -1
  133. package/web/dist/assets/plus-4qpaGAmL.js +0 -1
  134. package/web/dist/assets/popover-D5AXgA0O.js +0 -1
  135. package/web/dist/assets/queries-C-tAKRCi.js +0 -1
  136. package/web/dist/assets/reference-conflict-action-RTCKJRKI.js +0 -1
  137. package/web/dist/assets/skills-CWN4OvTJ.js +0 -1
  138. package/web/dist/assets/square-DaoIWJi2.js +0 -1
  139. package/web/dist/assets/terminal-rv57Weq5.js +0 -1
  140. package/web/dist/assets/x-DFmQiiud.js +0 -1
  141. package/web/dist/icon-192.png +0 -0
  142. package/web/dist/icon-512.png +0 -0
  143. package/web/dist/manifest.webmanifest +0 -16
@@ -2682,406 +2682,80 @@ var launchKeyResponseSchema = z15.object({
2682
2682
  });
2683
2683
 
2684
2684
  // ../contract/src/workspace.ts
2685
- import { z as z18 } from "zod";
2686
-
2687
- // ../contract/src/managers.ts
2688
- import { z as z16 } from "zod";
2689
- var managerIdSchema = z16.string().regex(/^[a-z0-9-]{1,64}$/);
2690
- var managerIdParamSchema = z16.object({ id: managerIdSchema });
2691
- var managerAttachmentParamSchema = z16.object({
2692
- id: managerIdSchema,
2693
- file: z16.string().regex(/^pasted-[a-z0-9-]+\.[a-z0-9]+$/)
2694
- });
2695
- var managerActionParamSchema = z16.object({ id: managerIdSchema, actionId: z16.string().min(1).max(64) });
2696
- var managerJobParamSchema = z16.object({ id: managerIdSchema, jobId: z16.string().min(1).max(64) });
2697
- var boundedId = z16.string().min(1).max(200);
2698
- var runnerInput = z16.string().max(64);
2699
- var modelInput = z16.string().max(200);
2700
- var managerProjectsSchema = z16.union([z16.literal("all"), z16.array(z16.string().min(1).max(200)).min(1).max(200)]);
2701
- var managerAccessSchema = z16.enum(["read", "write"]);
2702
- var managerProjectAccessSchema = z16.record(z16.string().min(1).max(200), managerAccessSchema);
2703
- function managerAccessOf(manager, projectId) {
2704
- return manager.projectAccess?.[projectId] ?? manager.access ?? "write";
2705
- }
2706
- var managerEffortSchema = z16.enum(["low", "medium", "high"]);
2707
- var MANAGER_CRON_MINUTES = [0, 5, 15, 30, 60, 240, 1440];
2708
- var managerCronMinutesSchema = z16.union([
2709
- z16.literal(0),
2710
- z16.literal(5),
2711
- z16.literal(15),
2712
- z16.literal(30),
2713
- z16.literal(60),
2714
- z16.literal(240),
2715
- z16.literal(1440)
2716
- ]);
2717
- var MANAGER_DEFAULT_CRON_MINUTES = 15;
2718
- var managerJobSchema = z16.object({
2719
- id: z16.string().min(1).max(64),
2720
- name: z16.string().trim().min(1).max(80),
2721
- prompt: z16.string().trim().min(1).max(2e4),
2722
- everyMinutes: z16.number().int().min(5).max(10080),
2723
- enabled: z16.boolean(),
2724
- lastRunAt: z16.string().optional()
2725
- });
2726
- var managerJobInputSchema = managerJobSchema.omit({ id: true, lastRunAt: true }).extend({
2727
- id: z16.string().min(1).max(64).optional()
2728
- });
2729
- var managerSchema = z16.object({
2730
- id: managerIdSchema,
2731
- name: z16.string().trim().min(1).max(80),
2732
- /** What the manager is for. Becomes part of its system prompt. */
2733
- instructions: z16.string().max(2e4),
2734
- /** Index into the cockpit's avatar set; stable across renames. */
2735
- avatar: z16.number().int().min(0).max(63),
2736
- projects: managerProjectsSchema,
2737
- /** Every connected project's access unless `projectAccess` names it. Absent = write. */
2738
- access: managerAccessSchema.optional(),
2739
- projectAccess: managerProjectAccessSchema.optional(),
2740
- runner: z16.string().optional(),
2741
- model: z16.string().optional(),
2742
- effort: managerEffortSchema.optional(),
2743
- /** Agent account id ("Account" in the design); absent = the runner's default. */
2744
- agentProfile: z16.string().max(64).optional(),
2745
- cronMinutes: managerCronMinutesSchema,
2746
- /** false silences system notifications; the chat and unread dot stay. Absent = on. */
2747
- notify: z16.boolean().optional(),
2748
- jobs: z16.array(managerJobSchema).max(32),
2749
- createdAt: z16.string(),
2750
- updatedAt: z16.string()
2751
- });
2752
- var managerStatusSchema = z16.enum(["idle", "working", "error"]);
2753
- var managerSummarySchema = managerSchema.extend({
2754
- status: managerStatusSchema,
2755
- /** The registered projects `projects` resolves to right now — `all` included. */
2756
- connectedProjectIds: z16.array(z16.string()),
2757
- lastActivityAt: z16.string().optional(),
2758
- /** One plain-text line for the sidebar row. */
2759
- preview: z16.string().optional(),
2760
- /** Messages the manager produced since the user last opened this chat. */
2761
- unread: z16.number().int().min(0),
2762
- /** Those of them it judged worth interrupting the user for. */
2763
- important: z16.number().int().min(0),
2764
- /** The newest important message's one line, for a browser notification. */
2765
- headline: z16.string().optional(),
2766
- pendingActions: z16.number().int().min(0),
2767
- /** Question cards still waiting for an answer. */
2768
- pendingQuestions: z16.number().int().min(0),
2769
- lastCheckAt: z16.string().optional(),
2770
- /** Absent when `cronMinutes` is 0. */
2771
- nextCheckAt: z16.string().optional(),
2772
- /** Spend across this manager's own turns. Excludes tasks it started: they bill to the task. */
2773
- costUsd: z16.number().min(0)
2774
- });
2775
- var createManagerInputSchema = z16.object({
2776
- name: z16.string().trim().min(1).max(80).optional(),
2777
- instructions: z16.string().max(2e4),
2778
- projects: managerProjectsSchema,
2779
- access: managerAccessSchema.optional(),
2780
- projectAccess: managerProjectAccessSchema.optional(),
2781
- runner: runnerInput.optional(),
2782
- model: modelInput.optional(),
2783
- effort: managerEffortSchema.optional(),
2784
- agentProfile: z16.string().max(64).optional(),
2785
- cronMinutes: managerCronMinutesSchema.optional(),
2786
- avatar: z16.number().int().min(0).max(63).optional()
2787
- });
2788
- var updateManagerInputSchema = z16.object({
2789
- name: z16.string().trim().min(1).max(80).optional(),
2790
- instructions: z16.string().max(2e4).optional(),
2791
- projects: managerProjectsSchema.optional(),
2792
- access: managerAccessSchema.optional(),
2793
- /** Replaces the whole map. */
2794
- projectAccess: managerProjectAccessSchema.optional(),
2795
- runner: runnerInput.nullable().optional(),
2796
- model: modelInput.nullable().optional(),
2797
- effort: managerEffortSchema.nullable().optional(),
2798
- agentProfile: z16.string().max(64).nullable().optional(),
2799
- cronMinutes: managerCronMinutesSchema.optional(),
2800
- avatar: z16.number().int().min(0).max(63).optional(),
2801
- notify: z16.boolean().optional(),
2802
- jobs: z16.array(managerJobInputSchema).max(32).optional()
2803
- });
2804
- var managerListResponseSchema = z16.object({ managers: z16.array(managerSummarySchema) });
2805
- var managerTurnKindSchema = z16.enum(["chat", "watch", "job"]);
2806
- var managerCommandSchema = z16.object({
2807
- id: z16.string(),
2808
- tool: z16.string(),
2809
- /** A short human label, e.g. the shell command. */
2810
- summary: z16.string(),
2811
- output: z16.string().optional(),
2812
- isError: z16.boolean().optional()
2813
- });
2814
- var managerActionRequestSchema = z16.discriminatedUnion("type", [
2815
- z16.object({
2816
- type: z16.literal("merge-pr"),
2817
- projectId: boundedId,
2818
- number: z16.number().int().positive(),
2819
- title: z16.string().max(1e3).optional(),
2820
- method: z16.enum(["merge", "squash", "rebase"]).optional(),
2821
- /** Stamped by the server at proposal: a push after it makes the approval refuse, not merge. */
2822
- headSha: z16.string().max(200).optional()
2823
- }),
2824
- z16.object({
2825
- type: z16.literal("enable-automation"),
2826
- projectId: boundedId,
2827
- automationId: boundedId,
2828
- name: z16.string().max(1e3).optional(),
2829
- /** Stamped by the server at proposal, with what the card shows: an edit after it refuses. */
2830
- revision: z16.number().int().optional(),
2831
- summary: z16.string().max(2e4).optional()
2832
- }),
2833
- /** A job runs unattended, so one the agent asks for waits for the user too. */
2834
- z16.object({
2835
- type: z16.literal("add-job"),
2836
- name: z16.string().trim().min(1).max(80),
2837
- prompt: z16.string().trim().min(1).max(2e4),
2838
- everyMinutes: z16.number().int().min(5).max(10080)
2839
- })
2840
- ]);
2841
- var managerConfirmSchema = z16.looseObject({
2842
- "merge-pr": z16.boolean().optional(),
2843
- "enable-automation": z16.boolean().optional(),
2844
- "add-job": z16.boolean().optional()
2845
- });
2846
- var managerActionStatusSchema = z16.enum(["pending", "running", "done", "rejected", "failed"]);
2847
- var managerAskSchema = z16.object({
2848
- questions: z16.array(z16.object({
2849
- id: z16.string().optional(),
2850
- header: z16.string(),
2851
- question: z16.string(),
2852
- multiSelect: z16.boolean().optional(),
2853
- options: z16.array(z16.object({ label: z16.string(), description: z16.string().optional() }))
2854
- }))
2855
- });
2856
- var managerAttachmentSchema = z16.object({
2857
- file: z16.string(),
2858
- mediaType: z16.string(),
2859
- /** The user's own filename; a pasted screenshot has none. */
2860
- name: z16.string().optional()
2861
- });
2862
- var managerMessageBase = { id: z16.string(), seq: z16.number().int().min(0), at: z16.string() };
2863
- var managerMessageSchema = z16.discriminatedUnion("kind", [
2864
- z16.object({ ...managerMessageBase, kind: z16.literal("user"), text: z16.string(), attachments: z16.array(managerAttachmentSchema).optional() }),
2865
- z16.object({
2866
- ...managerMessageBase,
2867
- kind: z16.literal("assistant"),
2868
- /** Markdown. `[[task:<projectId>/<runId>]]` and `[[pr:<projectId>/<number>]]` render as cards. */
2869
- text: z16.string(),
2870
- turn: managerTurnKindSchema,
2871
- jobName: z16.string().optional(),
2872
- streaming: z16.boolean(),
2873
- /** The manager's own judgement that this should interrupt the user. */
2874
- important: z16.boolean().optional(),
2875
- headline: z16.string().optional(),
2876
- ask: managerAskSchema.optional(),
2877
- /** What the user answered; the next message they send answers an open card. */
2878
- askAnswer: z16.string().optional(),
2879
- commands: z16.array(managerCommandSchema),
2880
- stopped: z16.boolean().optional(),
2881
- error: z16.string().optional(),
2882
- costUsd: z16.number().optional()
2883
- }),
2884
- z16.object({
2885
- ...managerMessageBase,
2886
- kind: z16.literal("action"),
2887
- action: managerActionRequestSchema,
2888
- /** The manager's reason, shown on the approval card. */
2889
- reason: z16.string().optional(),
2890
- status: managerActionStatusSchema,
2891
- /** The outcome sentence once it left `pending`. */
2892
- result: z16.string().optional()
2893
- }),
2894
- /** A quiet system line: "Connected to meblohand", "Merged #12". */
2895
- z16.object({ ...managerMessageBase, kind: z16.literal("notice"), text: z16.string() })
2896
- ]);
2897
- var managerMessagesQuerySchema = z16.object({
2898
- /** Page older history: only messages with a lower `seq`. */
2899
- before: z16.coerce.number().int().min(0).optional(),
2900
- limit: z16.coerce.number().int().min(1).max(500).optional(),
2901
- /** `1` keeps only `action` messages still waiting for the user; `before` and `limit` still apply. */
2902
- pending: z16.literal("1").optional()
2903
- });
2904
- var managerMessagesResponseSchema = z16.object({
2905
- messages: z16.array(managerMessageSchema),
2906
- hasMore: z16.boolean()
2907
- });
2908
- var sendManagerMessageInputSchema = z16.strictObject({ text: z16.string().trim().max(1e5), images: attachmentListSchema.optional() }).refine((input) => input.text !== "" || (input.images?.length ?? 0) > 0, {
2909
- message: "write a message or attach a file",
2910
- path: ["text"]
2911
- });
2912
- var managerActionDecisionInputSchema = z16.object({ decision: z16.enum(["approve", "reject"]) });
2913
- var managerOkResponseSchema = z16.object({ ok: z16.literal(true) });
2914
- var managerSendResponseSchema = z16.object({ ok: z16.literal(true), attachments: z16.number().int().min(0) });
2915
- var managerAttentionKindSchema = z16.enum([
2916
- "task-needs-you",
2917
- "task-failed",
2918
- "task-review",
2919
- "task-finished",
2920
- "task-stalled",
2921
- "pr-ready",
2922
- "pr-checks-failing",
2923
- "pr-conflict",
2924
- "pr-review-requested",
2925
- "automation-failing"
2926
- ]);
2927
- var managerAttentionItemSchema = z16.object({
2928
- /** Stable identity: the watch check speaks only about keys it has not reported yet. */
2929
- key: z16.string(),
2930
- kind: managerAttentionKindSchema,
2931
- projectId: z16.string(),
2932
- title: z16.string(),
2933
- detail: z16.string().optional(),
2934
- runId: z16.string().optional(),
2935
- number: z16.number().int().optional(),
2936
- url: z16.string().optional(),
2937
- since: z16.string().optional()
2938
- });
2939
- var managerSnapshotTaskSchema = z16.object({
2940
- runId: z16.string(),
2941
- title: z16.string(),
2942
- status: z16.string(),
2943
- workflow: z16.string(),
2944
- branch: z16.string().optional(),
2945
- parentRunId: z16.string().optional(),
2946
- /** Direct dispatched children; a big tree reads as its root. */
2947
- childCount: z16.number().int().min(0),
2948
- additions: z16.number().int().optional(),
2949
- deletions: z16.number().int().optional(),
2950
- costUsd: z16.number().optional(),
2951
- lastActivityAt: z16.string().optional()
2952
- });
2953
- var managerSnapshotPrSchema = z16.object({
2954
- number: z16.number().int(),
2955
- title: z16.string(),
2956
- author: z16.string().optional(),
2957
- url: z16.string().optional(),
2958
- draft: z16.boolean().optional(),
2959
- status: z16.string().optional(),
2960
- mergeable: z16.boolean().optional()
2961
- });
2962
- var managerSnapshotProjectSchema = z16.object({
2963
- projectId: z16.string(),
2964
- name: z16.string(),
2965
- available: z16.boolean(),
2966
- /** Why GitHub facts are absent; the rest of the project is still reported. */
2967
- prsUnavailable: z16.string().optional(),
2968
- tasks: z16.array(managerSnapshotTaskSchema),
2969
- prs: z16.array(managerSnapshotPrSchema)
2970
- });
2971
- var managerSnapshotSchema = z16.object({
2972
- generatedAt: z16.string(),
2973
- projects: z16.array(managerSnapshotProjectSchema),
2974
- attention: z16.array(managerAttentionItemSchema)
2975
- });
2976
- var managerCreateTaskInputSchema = z16.object({
2977
- projectId: boundedId,
2978
- task: z16.string().trim().min(1).max(1e5),
2979
- title: z16.string().trim().min(1).max(200).optional(),
2980
- workflow: boundedId.optional(),
2981
- runner: runnerInput.optional(),
2982
- model: modelInput.optional(),
2983
- dispatch: z16.boolean().optional()
2984
- });
2985
- var managerCreateTaskResponseSchema = z16.object({ projectId: z16.string(), runId: z16.string() });
2986
- var managerTaskMessageInputSchema = z16.object({
2987
- projectId: boundedId,
2988
- runId: boundedId,
2989
- text: z16.string().trim().min(1).max(1e5)
2990
- });
2991
- var managerProposeActionInputSchema = z16.object({
2992
- action: managerActionRequestSchema,
2993
- reason: z16.string().max(2e3).optional()
2994
- });
2995
- var managerProposeActionResponseSchema = z16.object({ actionId: z16.string(), status: managerActionStatusSchema });
2996
- var managerTaskDetailQuerySchema = z16.object({
2997
- projectId: boundedId,
2998
- runId: boundedId
2999
- });
3000
- var managerTaskDetailSchema = z16.object({
3001
- task: managerSnapshotTaskSchema,
3002
- /** The tail of the task's assistant text — what the manager quotes back. */
3003
- lastMessage: z16.string().optional(),
3004
- children: z16.array(managerSnapshotTaskSchema)
3005
- });
3006
- var managerChangeEventSchema = z16.object({
3007
- id: z16.string(),
3008
- manager: managerSummarySchema.optional(),
3009
- deleted: z16.boolean().optional()
3010
- });
3011
- var managerMessageEventSchema = z16.object({ managerId: z16.string(), message: managerMessageSchema });
2685
+ import { z as z17 } from "zod";
3012
2686
 
3013
2687
  // ../contract/src/workspace-layouts.ts
3014
- import { z as z17 } from "zod";
3015
- var workspaceViewSchema = z17.enum(["session", "changes", "commits", "files", "browser", "graph", "terminal"]);
2688
+ import { z as z16 } from "zod";
2689
+ var workspaceViewSchema = z16.enum(["session", "changes", "commits", "files", "browser", "graph", "terminal"]);
3016
2690
  var MAX_WORKSPACE_COLUMNS = 3;
3017
2691
  var MAX_WORKSPACE_BROWSER_TABS = 12;
3018
2692
  var MAX_WORKSPACE_TAB_URL_LENGTH = 2048;
3019
2693
  var MAX_WORKSPACE_LAYOUT_NAME_LENGTH = 80;
3020
- var workspaceBrowserSchema = z17.object({
3021
- tabs: z17.array(z17.string().max(MAX_WORKSPACE_TAB_URL_LENGTH)).max(MAX_WORKSPACE_BROWSER_TABS),
3022
- active: z17.number().int().min(0).max(MAX_WORKSPACE_BROWSER_TABS - 1)
2694
+ var workspaceBrowserSchema = z16.object({
2695
+ tabs: z16.array(z16.string().max(MAX_WORKSPACE_TAB_URL_LENGTH)).max(MAX_WORKSPACE_BROWSER_TABS),
2696
+ active: z16.number().int().min(0).max(MAX_WORKSPACE_BROWSER_TABS - 1)
3023
2697
  });
3024
- var workspaceColumnSchema = z17.object({
2698
+ var workspaceColumnSchema = z16.object({
3025
2699
  view: workspaceViewSchema,
3026
2700
  /** Percent of the row. The cockpit normalises these on read, so a stored set that does not sum
3027
2701
  * to 100 is recoverable rather than rejected. */
3028
- width: z17.number().finite().min(0).max(100),
2702
+ width: z16.number().finite().min(0).max(100),
3029
2703
  browser: workspaceBrowserSchema.optional()
3030
2704
  });
3031
- var workspaceLayoutSchema = z17.object({
3032
- name: z17.string().min(1).max(MAX_WORKSPACE_LAYOUT_NAME_LENGTH),
3033
- columns: z17.array(workspaceColumnSchema).max(MAX_WORKSPACE_COLUMNS)
2705
+ var workspaceLayoutSchema = z16.object({
2706
+ name: z16.string().min(1).max(MAX_WORKSPACE_LAYOUT_NAME_LENGTH),
2707
+ columns: z16.array(workspaceColumnSchema).max(MAX_WORKSPACE_COLUMNS)
3034
2708
  });
3035
2709
  var MAX_WORKSPACE_LAYOUTS = 50;
3036
- var workspaceLayoutsSchema = z17.object({
3037
- layouts: z17.array(workspaceLayoutSchema).max(MAX_WORKSPACE_LAYOUTS),
2710
+ var workspaceLayoutsSchema = z16.object({
2711
+ layouts: z16.array(workspaceLayoutSchema).max(MAX_WORKSPACE_LAYOUTS),
3038
2712
  /** The active card's name. May name a layout that is gone — the cockpit recovers rather than
3039
2713
  * failing, so this is not cross-validated here. */
3040
- active: z17.string().max(MAX_WORKSPACE_LAYOUT_NAME_LENGTH)
2714
+ active: z16.string().max(MAX_WORKSPACE_LAYOUT_NAME_LENGTH)
3041
2715
  });
3042
- var workspaceLayoutsResponseSchema = z17.object({
2716
+ var workspaceLayoutsResponseSchema = z16.object({
3043
2717
  layouts: workspaceLayoutsSchema.nullable()
3044
2718
  });
3045
2719
  var MAX_SAVED_WORKSPACE_LAYOUTS = 50;
3046
- var savedWorkspaceLayoutSchema = z17.object({
3047
- name: z17.string().trim().min(1).max(MAX_WORKSPACE_LAYOUT_NAME_LENGTH),
3048
- columns: z17.array(z17.object({ view: workspaceViewSchema, width: z17.number().finite().min(0).max(100) })).min(1).max(MAX_WORKSPACE_COLUMNS)
2720
+ var savedWorkspaceLayoutSchema = z16.object({
2721
+ name: z16.string().trim().min(1).max(MAX_WORKSPACE_LAYOUT_NAME_LENGTH),
2722
+ columns: z16.array(z16.object({ view: workspaceViewSchema, width: z16.number().finite().min(0).max(100) })).min(1).max(MAX_WORKSPACE_COLUMNS)
3049
2723
  });
3050
2724
 
3051
2725
  // ../contract/src/workspace.ts
3052
- var workspaceConfigResponseSchema = z18.object({
3053
- branding: z18.object({
3054
- name: z18.string(),
3055
- logoUrl: z18.string().nullable()
2726
+ var workspaceConfigResponseSchema = z17.object({
2727
+ branding: z17.object({
2728
+ name: z17.string(),
2729
+ logoUrl: z17.string().nullable()
3056
2730
  }),
3057
2731
  /** Root exposed by the Add-project directory browser — stored as written (`~` kept). */
3058
- browseRoot: z18.string(),
2732
+ browseRoot: z17.string(),
3059
2733
  /** Checkout root for GUI-cloned projects — stored as written (`~` kept). */
3060
- projectsDir: z18.string(),
2734
+ projectsDir: z17.string(),
3061
2735
  /** Stored override; `null` means inherit `CEZ_SKILLS_AUTO_UPDATE`, then true. */
3062
- skillsAutoUpdate: z18.boolean().nullable(),
3063
- effectiveSkillsAutoUpdate: z18.boolean(),
2736
+ skillsAutoUpdate: z17.boolean().nullable(),
2737
+ effectiveSkillsAutoUpdate: z17.boolean(),
3064
2738
  /** Skills repos added in Global settings; every project loads them as team skills. */
3065
- orgSkillsRepos: z18.array(z18.object({ repo: z18.string(), ref: z18.string() })),
2739
+ orgSkillsRepos: z17.array(z17.object({ repo: z17.string(), ref: z17.string() })),
3066
2740
  /** Global instructions for every task in every project; `null` = none. A project's own system
3067
2741
  * prompt is appended after it and wins where they conflict. */
3068
- systemPrompt: z18.string().nullable(),
3069
- composerDefaults: z18.object({
3070
- autonomous: z18.boolean().nullable(),
3071
- worktree: z18.boolean().nullable(),
2742
+ systemPrompt: z17.string().nullable(),
2743
+ composerDefaults: z17.object({
2744
+ autonomous: z17.boolean().nullable(),
2745
+ worktree: z17.boolean().nullable(),
3072
2746
  /** `'source-dependent'` when no `CEZ_AUTONOMOUS_DEFAULT` pins it either way. */
3073
- inheritedAutonomous: z18.union([z18.boolean(), z18.literal("source-dependent")]),
3074
- inheritedWorktree: z18.boolean()
2747
+ inheritedAutonomous: z17.union([z17.boolean(), z17.literal("source-dependent")]),
2748
+ inheritedWorktree: z17.boolean()
3075
2749
  }),
3076
- resources: z18.object({
3077
- maxParallel: z18.number(),
3078
- maxMonitoringSessions: z18.number(),
3079
- idleTimeoutMinutes: z18.number().nullable(),
3080
- monitoringWakeIntervalMinutes: z18.number().nullable(),
2750
+ resources: z17.object({
2751
+ maxParallel: z17.number(),
2752
+ maxMonitoringSessions: z17.number(),
2753
+ idleTimeoutMinutes: z17.number().nullable(),
2754
+ monitoringWakeIntervalMinutes: z17.number().nullable(),
3081
2755
  /** Resume a run a provider usage limit stopped, once the limit resets. Default `true`. */
3082
- autoResumeOnUsageLimit: z18.boolean(),
3083
- memoryLimitMb: z18.number().nullable(),
3084
- worktreeRetentionDefault: z18.number()
2756
+ autoResumeOnUsageLimit: z17.boolean(),
2757
+ memoryLimitMb: z17.number().nullable(),
2758
+ worktreeRetentionDefault: z17.number()
3085
2759
  }),
3086
2760
  /**
3087
2761
  * What a repo that has set none of its own runs (spec 2026-07-29-agent-profiles).
@@ -3091,100 +2765,100 @@ var workspaceConfigResponseSchema = z18.object({
3091
2765
  * from a value someone chose or the fallback collapses into "always claude". Consulted only where
3092
2766
  * the repo's own `.ai/cezar/config.json` is silent — a repo that chose is never overruled.
3093
2767
  */
3094
- agentDefaults: z18.object({
2768
+ agentDefaults: z17.object({
3095
2769
  runner: runnerSchema.optional(),
3096
- models: z18.object({
3097
- claude: z18.string().optional(),
3098
- codex: z18.string().optional(),
3099
- opencode: z18.string().optional(),
3100
- cursor: z18.string().optional(),
3101
- pi: z18.string().optional(),
3102
- junie: z18.string().optional(),
3103
- copilot: z18.string().optional(),
3104
- antigravity: z18.string().optional()
2770
+ models: z17.object({
2771
+ claude: z17.string().optional(),
2772
+ codex: z17.string().optional(),
2773
+ opencode: z17.string().optional(),
2774
+ cursor: z17.string().optional(),
2775
+ pi: z17.string().optional(),
2776
+ junie: z17.string().optional(),
2777
+ copilot: z17.string().optional(),
2778
+ antigravity: z17.string().optional()
3105
2779
  }).optional()
3106
2780
  })
3107
2781
  });
3108
- var setWorkspaceConfigInputSchema = z18.object({
3109
- branding: z18.object({
3110
- name: z18.string().trim().min(1).max(80).nullable().optional()
2782
+ var setWorkspaceConfigInputSchema = z17.object({
2783
+ branding: z17.object({
2784
+ name: z17.string().trim().min(1).max(80).nullable().optional()
3111
2785
  }).optional(),
3112
- browseRoot: z18.string().trim().min(1).max(4096).optional(),
3113
- projectsDir: z18.string().trim().min(1).max(4096).optional(),
3114
- skillsAutoUpdate: z18.boolean().nullable().optional(),
2786
+ browseRoot: z17.string().trim().min(1).max(4096).optional(),
2787
+ projectsDir: z17.string().trim().min(1).max(4096).optional(),
2788
+ skillsAutoUpdate: z17.boolean().nullable().optional(),
3115
2789
  /** Replaces the whole list; entries keep unknown keys (a newer cezar's metadata). The server
3116
2790
  * rejects an unsafe `repo`/`ref` with a 400. */
3117
- orgSkillsRepos: z18.array(z18.object({ repo: z18.string().trim().min(1).max(500), ref: z18.string().trim().min(1).max(200).default("main") }).passthrough()).max(20).optional(),
2791
+ orgSkillsRepos: z17.array(z17.object({ repo: z17.string().trim().min(1).max(500), ref: z17.string().trim().min(1).max(200).default("main") }).passthrough()).max(20).optional(),
3118
2792
  /** Clears on `null` or `''`, like the project `systemPrompt`. */
3119
- systemPrompt: z18.string().trim().max(2e4).nullable().optional(),
3120
- composerDefaults: z18.object({
3121
- autonomous: z18.boolean().nullable().optional(),
3122
- worktree: z18.boolean().nullable().optional()
2793
+ systemPrompt: z17.string().trim().max(2e4).nullable().optional(),
2794
+ composerDefaults: z17.object({
2795
+ autonomous: z17.boolean().nullable().optional(),
2796
+ worktree: z17.boolean().nullable().optional()
3123
2797
  }).optional(),
3124
2798
  /** Machine-wide agent defaults. `null` on a key CLEARS it back to "no opinion", which a bare
3125
2799
  * absent key cannot say in a partial patch. */
3126
- agentDefaults: z18.object({
2800
+ agentDefaults: z17.object({
3127
2801
  runner: runnerSchema.nullable().optional(),
3128
- models: z18.object({
3129
- claude: z18.string().trim().min(1).max(200).nullable().optional(),
3130
- codex: z18.string().trim().min(1).max(200).nullable().optional(),
3131
- opencode: z18.string().trim().min(1).max(200).nullable().optional(),
3132
- junie: z18.string().trim().min(1).max(200).nullable().optional(),
3133
- cursor: z18.string().trim().min(1).max(200).nullable().optional(),
3134
- pi: z18.string().trim().min(1).max(200).nullable().optional(),
3135
- copilot: z18.string().trim().min(1).max(200).nullable().optional(),
3136
- antigravity: z18.string().trim().min(1).max(200).nullable().optional()
2802
+ models: z17.object({
2803
+ claude: z17.string().trim().min(1).max(200).nullable().optional(),
2804
+ codex: z17.string().trim().min(1).max(200).nullable().optional(),
2805
+ opencode: z17.string().trim().min(1).max(200).nullable().optional(),
2806
+ junie: z17.string().trim().min(1).max(200).nullable().optional(),
2807
+ cursor: z17.string().trim().min(1).max(200).nullable().optional(),
2808
+ pi: z17.string().trim().min(1).max(200).nullable().optional(),
2809
+ copilot: z17.string().trim().min(1).max(200).nullable().optional(),
2810
+ antigravity: z17.string().trim().min(1).max(200).nullable().optional()
3137
2811
  }).optional()
3138
2812
  }).optional(),
3139
- resources: z18.object({
3140
- maxParallel: z18.number().int().min(1).max(16).optional(),
3141
- maxMonitoringSessions: z18.number().int().min(0).max(16).optional(),
3142
- idleTimeoutMinutes: z18.number().int().min(0).max(1440).nullable().optional(),
3143
- monitoringWakeIntervalMinutes: z18.number().int().min(1).max(60).nullable().optional(),
3144
- autoResumeOnUsageLimit: z18.boolean().optional(),
3145
- memoryLimitMb: z18.number().int().min(0).max(1048576).nullable().optional(),
3146
- worktreeRetentionDefault: z18.number().int().min(0).max(1e3).optional()
2813
+ resources: z17.object({
2814
+ maxParallel: z17.number().int().min(1).max(16).optional(),
2815
+ maxMonitoringSessions: z17.number().int().min(0).max(16).optional(),
2816
+ idleTimeoutMinutes: z17.number().int().min(0).max(1440).nullable().optional(),
2817
+ monitoringWakeIntervalMinutes: z17.number().int().min(1).max(60).nullable().optional(),
2818
+ autoResumeOnUsageLimit: z17.boolean().optional(),
2819
+ memoryLimitMb: z17.number().int().min(0).max(1048576).nullable().optional(),
2820
+ worktreeRetentionDefault: z17.number().int().min(0).max(1e3).optional()
3147
2821
  }).optional()
3148
2822
  });
3149
- var workspaceBrandingLogoResponseSchema = z18.object({ logoUrl: z18.string().nullable() });
3150
- var appearanceSchema = z18.object({
3151
- accent: z18.enum(["lime", "violet"]).optional(),
3152
- density: z18.enum(["comfortable", "compact", "ultra"]).optional(),
3153
- width: z18.enum(["narrow", "wide"]).optional()
2823
+ var workspaceBrandingLogoResponseSchema = z17.object({ logoUrl: z17.string().nullable() });
2824
+ var appearanceSchema = z17.object({
2825
+ accent: z17.enum(["lime", "violet"]).optional(),
2826
+ density: z17.enum(["comfortable", "compact", "ultra"]).optional(),
2827
+ width: z17.enum(["narrow", "wide"]).optional()
3154
2828
  });
3155
- var taskTableUiStateSchema = z18.looseObject({
2829
+ var taskTableUiStateSchema = z17.looseObject({
3156
2830
  /** Explicit user choices only. Missing ids keep the registry-owned default. */
3157
- expandedColumns: z18.record(z18.string(), z18.boolean()).optional()
2831
+ expandedColumns: z17.record(z17.string(), z17.boolean()).optional()
3158
2832
  });
3159
2833
  var AUTOMATION_ORDER_LIMIT = 200;
3160
- var automationListPreferencesSchema = z18.looseObject({
3161
- sort: z18.enum(["manual", "name", "nextRun"]).optional(),
3162
- order: z18.array(z18.string().trim().min(1).max(200)).max(AUTOMATION_ORDER_LIMIT).optional()
2834
+ var automationListPreferencesSchema = z17.looseObject({
2835
+ sort: z17.enum(["manual", "name", "nextRun"]).optional(),
2836
+ order: z17.array(z17.string().trim().min(1).max(200)).max(AUTOMATION_ORDER_LIMIT).optional()
3163
2837
  });
3164
- var uiStateSchema = z18.looseObject({
2838
+ var uiStateSchema = z17.looseObject({
3165
2839
  /** What the last started run used. `null` is a VALUE, not an absence: it records a run that
3166
2840
  * chose neither a skill nor a workflow (the plain built-in `quick-task`), which the composer
3167
2841
  * can now express since the source picker grew an empty state. Absent still means "no
3168
2842
  * run has been recorded here" — a cockpit reading either one selects nothing. */
3169
- lastTask: z18.object({ source: z18.enum(["workflow", "skill"]), ref: z18.string() }).nullable().optional(),
2843
+ lastTask: z17.object({ source: z17.enum(["workflow", "skill"]), ref: z17.string() }).nullable().optional(),
3170
2844
  /** Most-recently-run sources, newest first (deduped, capped). Feeds the composer picker's
3171
2845
  * recency sort. */
3172
- recentSources: z18.array(z18.object({ source: z18.enum(["workflow", "skill"]), ref: z18.string() })).optional(),
2846
+ recentSources: z17.array(z17.object({ source: z17.enum(["workflow", "skill"]), ref: z17.string() })).optional(),
3173
2847
  /** The last worktree choice for a single-skill run. Absent → the default (isolated worktree). */
3174
- lastWorktree: z18.boolean().optional(),
2848
+ lastWorktree: z17.boolean().optional(),
3175
2849
  /** The last autonomous choice — remembered like `lastWorktree`. Absent → off. */
3176
- lastAutonomous: z18.boolean().optional(),
2850
+ lastAutonomous: z17.boolean().optional(),
3177
2851
  /** Whether new runs should ask agents to append follow-up work. Absent → on. */
3178
- lastGenerateFollowups: z18.boolean().optional(),
2852
+ lastGenerateFollowups: z17.boolean().optional(),
3179
2853
  /** The selected default team skills for this repo. Absent means all default skills remain available. */
3180
- importedSkills: z18.array(z18.string().min(1).max(200)).max(200).optional(),
2854
+ importedSkills: z17.array(z17.string().min(1).max(200)).max(200).optional(),
3181
2855
  /** Skill selection frequency (#408): name → times chosen, across BOTH composers. */
3182
- skillUsage: z18.record(z18.string(), z18.number()).optional(),
3183
- runsView: z18.enum(["list", "table"]).optional(),
2856
+ skillUsage: z17.record(z17.string(), z17.number()).optional(),
2857
+ runsView: z17.enum(["list", "table"]).optional(),
3184
2858
  /** The GitHub tab's last-selected sub-tab (#417). Absent → issues. */
3185
- githubView: z18.enum(["issues", "prs"]).optional(),
2859
+ githubView: z17.enum(["issues", "prs"]).optional(),
3186
2860
  /** The GitHub tab's list order. Absent → newest first, which is what `gh` already returns. */
3187
- githubSort: z18.enum(["newest", "oldest"]).optional(),
2861
+ githubSort: z17.enum(["newest", "oldest"]).optional(),
3188
2862
  /** List presentation only (#1819); absent preserves alphabetical order. */
3189
2863
  automationList: automationListPreferencesSchema.optional(),
3190
2864
  /** Settings → Appearance. The theme itself stays in localStorage (`cez-theme`) — it must
@@ -3192,51 +2866,51 @@ var uiStateSchema = z18.looseObject({
3192
2866
  appearance: appearanceSchema.optional(),
3193
2867
  /** Follow-up prompt templates (#413). Absent → the built-in defaults; present (even `[]`) is
3194
2868
  * the user's own edited list. `skills` are the skill names the template auto-applies for. */
3195
- promptTemplates: z18.array(
3196
- z18.object({
3197
- id: z18.string(),
3198
- label: z18.string(),
3199
- text: z18.string(),
3200
- skills: z18.array(z18.string()).optional()
2869
+ promptTemplates: z17.array(
2870
+ z17.object({
2871
+ id: z17.string(),
2872
+ label: z17.string(),
2873
+ text: z17.string(),
2874
+ skills: z17.array(z17.string()).optional()
3201
2875
  })
3202
2876
  ).optional(),
3203
2877
  /** The open-mercato/skills promo banner (#391), dismissed for good. Legacy — retained so old files round-trip. */
3204
- dismissedSkillsBanner: z18.boolean().optional()
2878
+ dismissedSkillsBanner: z17.boolean().optional()
3205
2879
  });
3206
2880
  var PROMPT_TEMPLATE_TEXT_MAX = 2e4;
3207
- var workspaceLastLocationSchema = z18.strictObject({
3208
- projectId: z18.string().min(1).max(64),
3209
- pathname: z18.string().min(1).max(2048).startsWith("/p/"),
3210
- search: z18.string().max(4096).startsWith("?").optional(),
3211
- hash: z18.string().max(2048).startsWith("#").optional()
2881
+ var workspaceLastLocationSchema = z17.strictObject({
2882
+ projectId: z17.string().min(1).max(64),
2883
+ pathname: z17.string().min(1).max(2048).startsWith("/p/"),
2884
+ search: z17.string().max(4096).startsWith("?").optional(),
2885
+ hash: z17.string().max(2048).startsWith("#").optional()
3212
2886
  });
3213
2887
  var dashboardKnownTileIds = /* @__PURE__ */ new Set(["fleet", "needsYou", "recent", "usage", "trends", "overview", "portfolio", "automations"]);
3214
- var dashboardTileOrderSchema = z18.array(z18.string().min(1).max(64)).max(200 + dashboardKnownTileIds.size).refine((items) => items.filter((id2) => !dashboardKnownTileIds.has(id2)).length <= 200, "Too many unknown dashboard tiles").refine((items) => new Set(items).size === items.length, "Duplicate dashboard tile");
3215
- var dashboardPreferencesInputSchema = z18.looseObject({
2888
+ var dashboardTileOrderSchema = z17.array(z17.string().min(1).max(64)).max(200 + dashboardKnownTileIds.size).refine((items) => items.filter((id2) => !dashboardKnownTileIds.has(id2)).length <= 200, "Too many unknown dashboard tiles").refine((items) => new Set(items).size === items.length, "Duplicate dashboard tile");
2889
+ var dashboardPreferencesInputSchema = z17.looseObject({
3216
2890
  order: dashboardTileOrderSchema.optional(),
3217
- tiles: z18.looseObject({ automations: z18.boolean().optional(), fleet: z18.boolean().optional(), needsYou: z18.boolean().optional(), recent: z18.boolean().optional(), usage: z18.boolean().optional(), trends: z18.boolean().optional() }).optional()
2891
+ tiles: z17.looseObject({ automations: z17.boolean().optional(), fleet: z17.boolean().optional(), needsYou: z17.boolean().optional(), recent: z17.boolean().optional(), usage: z17.boolean().optional(), trends: z17.boolean().optional() }).optional()
3218
2892
  });
3219
- var dashboardPreferencesSchema = z18.looseObject({
2893
+ var dashboardPreferencesSchema = z17.looseObject({
3220
2894
  order: dashboardTileOrderSchema.catch([]).optional(),
3221
- tiles: z18.looseObject({
3222
- automations: z18.boolean().catch(true).optional(),
3223
- fleet: z18.boolean().catch(true).optional(),
3224
- needsYou: z18.boolean().catch(true).optional(),
3225
- recent: z18.boolean().catch(true).optional(),
3226
- usage: z18.boolean().catch(true).optional(),
3227
- trends: z18.boolean().catch(true).optional()
2895
+ tiles: z17.looseObject({
2896
+ automations: z17.boolean().catch(true).optional(),
2897
+ fleet: z17.boolean().catch(true).optional(),
2898
+ needsYou: z17.boolean().catch(true).optional(),
2899
+ recent: z17.boolean().catch(true).optional(),
2900
+ usage: z17.boolean().catch(true).optional(),
2901
+ trends: z17.boolean().catch(true).optional()
3228
2902
  }).catch({}).optional()
3229
2903
  }).catch({});
3230
- var workspaceUiStateSchema = z18.looseObject({
2904
+ var workspaceUiStateSchema = z17.looseObject({
3231
2905
  dashboard: dashboardPreferencesSchema.optional(),
3232
- sidebar: z18.looseObject({
2906
+ sidebar: z17.looseObject({
3233
2907
  /** LEGACY — the sidebar's per-project collapse map (step 3.3). Still accepted and still
3234
2908
  * round-tripped so an older cockpit sharing this home keeps working, but the current
3235
2909
  * cockpit neither reads nor writes it: which groups are shut describes the WINDOW, not the
3236
2910
  * workspace, so it lives in that browser's localStorage
3237
2911
  * (`packages/web/src/lib/sidebar-collapse.ts`). One shared answer meant a phone collapsing
3238
2912
  * a group collapsed it on the desktop too. */
3239
- collapsed: z18.record(z18.string(), z18.boolean()).optional(),
2913
+ collapsed: z17.record(z17.string(), z17.boolean()).optional(),
3240
2914
  /** The user's hand-picked project-group order (#952), most-wanted first — WORKSPACE state
3241
2915
  * on purpose, unlike `collapsed` above. Which order your repos sit in is a considered
3242
2916
  * choice made once, so redoing it on the phone is the annoyance; which groups are shut
@@ -3246,32 +2920,32 @@ var workspaceUiStateSchema = z18.looseObject({
3246
2920
  * Ids that are no longer registered are ignored on read; registered projects missing from
3247
2921
  * the list are not dropped — they sort in by `lastOpenedAt` ahead of the picked ones
3248
2922
  * (`packages/web/src/lib/project-order.ts`). */
3249
- projectOrder: z18.array(z18.string()).optional()
2923
+ projectOrder: z17.array(z17.string()).optional()
3250
2924
  }).optional(),
3251
2925
  /** Dismissed runtime-auth incident IDs, keyed by provider. An ID is only dismissed until the
3252
2926
  * provider reports a different incident, so this stays workspace-global with the browser
3253
2927
  * rather than one project checkout. */
3254
- dismissedProviderAuthFailures: z18.object({
3255
- claude: z18.string().optional(),
3256
- codex: z18.string().optional(),
3257
- opencode: z18.string().optional(),
3258
- cursor: z18.string().optional(),
3259
- pi: z18.string().optional(),
3260
- junie: z18.string().optional(),
3261
- copilot: z18.string().optional(),
3262
- antigravity: z18.string().optional()
2928
+ dismissedProviderAuthFailures: z17.object({
2929
+ claude: z17.string().optional(),
2930
+ codex: z17.string().optional(),
2931
+ opencode: z17.string().optional(),
2932
+ cursor: z17.string().optional(),
2933
+ pi: z17.string().optional(),
2934
+ junie: z17.string().optional(),
2935
+ copilot: z17.string().optional(),
2936
+ antigravity: z17.string().optional()
3263
2937
  }).optional(),
3264
2938
  /** Settings → Appearance, GLOBAL since step 3.5: accent + density describe the person at the
3265
2939
  * keyboard, not a repo. */
3266
2940
  appearance: appearanceSchema.optional(),
3267
2941
  /** Settings → Notifications, GLOBAL since step 3.5 — one answer for the whole workspace, since
3268
2942
  * the delivering browser is one browser whichever project you are looking at. */
3269
- notifications: z18.looseObject({ enabled: z18.boolean().optional() }).optional(),
2943
+ notifications: z17.looseObject({ enabled: z17.boolean().optional() }).optional(),
3270
2944
  /** Desktop Tasks-table density, shared across every project in this workspace. */
3271
2945
  taskTable: taskTableUiStateSchema.optional(),
3272
2946
  /** Keyboard shortcuts the user changed (spec 2026-10-17-task-palette): task-palette command id →
3273
2947
  * chord (`Mod+Shift+P`), or `null` to unbind a default. Absent ids keep the shipped default. */
3274
- keybindings: z18.record(z18.string(), z18.string().nullable()).optional(),
2948
+ keybindings: z17.record(z17.string(), z17.string().nullable()).optional(),
3275
2949
  /** LEGACY, exactly like `sidebar` above — the last settled project-scoped page, restored when
3276
2950
  * entering at the exact bare root. The shape is unchanged and still accepted, but the current
3277
2951
  * cockpit keeps it in localStorage (`packages/web/src/lib/last-location.ts`): stored here, the
@@ -3279,67 +2953,64 @@ var workspaceUiStateSchema = z18.looseObject({
3279
2953
  lastLocation: workspaceLastLocationSchema.optional(),
3280
2954
  /** Legacy source for default team-skill selections. New choices are project-scoped; this stays
3281
2955
  * typed so projects without a local choice preserve selections from older cockpit versions. */
3282
- importedSkills: z18.array(z18.string()).optional(),
2956
+ importedSkills: z17.array(z17.string()).optional(),
3283
2957
  /** Layouts the user saved by name in a task's Layout menu — offered in every task of every
3284
2958
  * project. One bad entry drops the list rather than the whole file. */
3285
- savedLayouts: z18.array(savedWorkspaceLayoutSchema).catch([]).optional(),
3286
- /** Which approval types ask for confirmation; one value per server (mobile spec, Q13). */
3287
- managerConfirm: managerConfirmSchema.optional(),
2959
+ savedLayouts: z17.array(savedWorkspaceLayoutSchema).catch([]).optional(),
3288
2960
  /** First-run onboarding (spec 2026-10-26-first-run-onboarding). Workspace-wide — the same
3289
2961
  * person sets up every project. */
3290
- onboarding: z18.looseObject({
3291
- setupDismissed: z18.boolean().optional(),
2962
+ onboarding: z17.looseObject({
2963
+ setupDismissed: z17.boolean().optional(),
3292
2964
  /** "Continue anyway" past the sign-in screen: provider detection can miss a working login. */
3293
- agentCheckSkipped: z18.boolean().optional(),
2965
+ agentCheckSkipped: z17.boolean().optional(),
3294
2966
  /** Feature announcements the user closed, by id — a new announcement shows once. */
3295
- dismissedAnnouncements: z18.array(z18.string().max(64)).max(50).optional(),
2967
+ dismissedAnnouncements: z17.array(z17.string().max(64)).max(50).optional(),
3296
2968
  /** Coming back after a while: the first and the latest visit, written at most hourly. */
3297
- firstVisitAt: z18.string().max(40).optional(),
3298
- lastVisitAt: z18.string().max(40).optional(),
2969
+ firstVisitAt: z17.string().max(40).optional(),
2970
+ lastVisitAt: z17.string().max(40).optional(),
3299
2971
  /** Set when a visit follows a long absence: the visit before it, and when the user came
3300
2972
  * back. The tasks page greets them with what they left and what changed since. */
3301
- returnedFrom: z18.string().max(40).optional(),
3302
- returnedAt: z18.string().max(40).optional(),
3303
- welcomeBackClosedAt: z18.string().max(40).optional(),
2973
+ returnedFrom: z17.string().max(40).optional(),
2974
+ returnedAt: z17.string().max(40).optional(),
2975
+ welcomeBackClosedAt: z17.string().max(40).optional(),
3304
2976
  /** The last time the user opened "What's new" — its sidebar dot counts from here. */
3305
- whatsNewSeenAt: z18.string().max(40).optional(),
2977
+ whatsNewSeenAt: z17.string().max(40).optional(),
3306
2978
  /** Composer tips on `/new` (one or two controls explained per visit): the ones already
3307
2979
  * shown, by id, and whether the user turned them off. */
3308
- composerTipsSeen: z18.array(z18.string().max(64)).max(50).optional(),
3309
- composerTipsOff: z18.boolean().optional()
2980
+ composerTipsSeen: z17.array(z17.string().max(64)).max(50).optional(),
2981
+ composerTipsOff: z17.boolean().optional()
3310
2982
  }).optional()
3311
2983
  });
3312
2984
  var WORKSPACE_UI_STATE_MAX_KEYS = 200;
3313
2985
  var TASK_TABLE_MAX_COLUMNS = 50;
3314
- var setWorkspaceUiStateInputSchema = z18.looseObject({
2986
+ var setWorkspaceUiStateInputSchema = z17.looseObject({
3315
2987
  ...workspaceUiStateSchema.shape,
3316
2988
  dashboard: dashboardPreferencesInputSchema.optional(),
3317
- sidebar: z18.looseObject({
3318
- collapsed: z18.record(z18.string().min(1).max(64), z18.boolean()).refine((map) => Object.keys(map).length <= WORKSPACE_UI_STATE_MAX_KEYS, {
2989
+ sidebar: z17.looseObject({
2990
+ collapsed: z17.record(z17.string().min(1).max(64), z17.boolean()).refine((map) => Object.keys(map).length <= WORKSPACE_UI_STATE_MAX_KEYS, {
3319
2991
  message: `sidebar.collapsed must have at most ${WORKSPACE_UI_STATE_MAX_KEYS} entries`
3320
2992
  }).optional(),
3321
2993
  // Project ids, so the same 64-char bound the registry's slug rule and `collapsed`'s keys
3322
2994
  // already use. Duplicates are not rejected — the cockpit dedupes on read, and a 400 on a
3323
2995
  // sidebar drag would be a worse answer than a self-healing one.
3324
- projectOrder: z18.array(z18.string().min(1).max(64)).max(WORKSPACE_UI_STATE_MAX_KEYS).optional()
2996
+ projectOrder: z17.array(z17.string().min(1).max(64)).max(WORKSPACE_UI_STATE_MAX_KEYS).optional()
3325
2997
  }).optional(),
3326
- dismissedProviderAuthFailures: z18.strictObject({
3327
- claude: z18.string().min(1).max(128).optional(),
3328
- codex: z18.string().min(1).max(128).optional(),
3329
- opencode: z18.string().min(1).max(128).optional(),
3330
- pi: z18.string().min(1).max(128).optional(),
3331
- junie: z18.string().min(1).max(128).optional(),
3332
- copilot: z18.string().min(1).max(128).optional(),
3333
- antigravity: z18.string().min(1).max(128).optional()
2998
+ dismissedProviderAuthFailures: z17.strictObject({
2999
+ claude: z17.string().min(1).max(128).optional(),
3000
+ codex: z17.string().min(1).max(128).optional(),
3001
+ opencode: z17.string().min(1).max(128).optional(),
3002
+ pi: z17.string().min(1).max(128).optional(),
3003
+ junie: z17.string().min(1).max(128).optional(),
3004
+ copilot: z17.string().min(1).max(128).optional(),
3005
+ antigravity: z17.string().min(1).max(128).optional()
3334
3006
  }).optional(),
3335
- importedSkills: z18.array(z18.string().min(1).max(200)).max(WORKSPACE_UI_STATE_MAX_KEYS).optional(),
3336
- savedLayouts: z18.array(savedWorkspaceLayoutSchema).max(MAX_SAVED_WORKSPACE_LAYOUTS).optional(),
3337
- managerConfirm: managerConfirmSchema.strict().optional(),
3338
- keybindings: z18.record(z18.string().min(1).max(120), z18.string().min(1).max(40).nullable()).refine((map) => Object.keys(map).length <= WORKSPACE_UI_STATE_MAX_KEYS, {
3007
+ importedSkills: z17.array(z17.string().min(1).max(200)).max(WORKSPACE_UI_STATE_MAX_KEYS).optional(),
3008
+ savedLayouts: z17.array(savedWorkspaceLayoutSchema).max(MAX_SAVED_WORKSPACE_LAYOUTS).optional(),
3009
+ keybindings: z17.record(z17.string().min(1).max(120), z17.string().min(1).max(40).nullable()).refine((map) => Object.keys(map).length <= WORKSPACE_UI_STATE_MAX_KEYS, {
3339
3010
  message: `keybindings must have at most ${WORKSPACE_UI_STATE_MAX_KEYS} entries`
3340
3011
  }).optional(),
3341
3012
  taskTable: taskTableUiStateSchema.extend({
3342
- expandedColumns: z18.record(z18.string().min(1).max(64), z18.boolean()).refine((map) => Object.keys(map).length <= TASK_TABLE_MAX_COLUMNS, {
3013
+ expandedColumns: z17.record(z17.string().min(1).max(64), z17.boolean()).refine((map) => Object.keys(map).length <= TASK_TABLE_MAX_COLUMNS, {
3343
3014
  message: `taskTable.expandedColumns must have at most ${TASK_TABLE_MAX_COLUMNS} entries`
3344
3015
  }).optional()
3345
3016
  }).optional()
@@ -3351,102 +3022,102 @@ var setWorkspaceUiStateInputSchema = z18.looseObject({
3351
3022
  });
3352
3023
  }
3353
3024
  });
3354
- var runnerModelsSchema = z18.object({
3355
- claude: z18.string().optional(),
3356
- codex: z18.string().optional(),
3357
- junie: z18.string().optional(),
3358
- opencode: z18.string().optional(),
3359
- cursor: z18.string().optional(),
3360
- pi: z18.string().optional(),
3361
- copilot: z18.string().optional(),
3362
- antigravity: z18.string().optional()
3363
- });
3364
- var configResponseSchema = z18.object({
3025
+ var runnerModelsSchema = z17.object({
3026
+ claude: z17.string().optional(),
3027
+ codex: z17.string().optional(),
3028
+ junie: z17.string().optional(),
3029
+ opencode: z17.string().optional(),
3030
+ cursor: z17.string().optional(),
3031
+ pi: z17.string().optional(),
3032
+ copilot: z17.string().optional(),
3033
+ antigravity: z17.string().optional()
3034
+ });
3035
+ var configResponseSchema = z17.object({
3365
3036
  worktreeLifecycle: worktreeLifecycleConfigSchema.optional(),
3366
- worktreeLifecycleRevision: z18.string().optional(),
3367
- baseBranch: z18.string().nullable(),
3037
+ worktreeLifecycleRevision: z17.string().optional(),
3038
+ baseBranch: z17.string().nullable(),
3368
3039
  defaultRunner: runnerSchema,
3369
- systemPrompt: z18.string().nullable(),
3040
+ systemPrompt: z17.string().nullable(),
3370
3041
  /** Free-text branch naming instructions (spec 2026-10-11-branch-naming-instructions); null =
3371
3042
  * task branches stay `cez/<id8>`. */
3372
- branchNaming: z18.string().nullable(),
3043
+ branchNaming: z17.string().nullable(),
3373
3044
  defaultModels: runnerModelsSchema,
3374
3045
  /** True when native coding-agent settings are authoritative and model picks are read-only. */
3375
- modelsLocked: z18.boolean(),
3046
+ modelsLocked: z17.boolean(),
3376
3047
  /** How many tasks run at once (1–16). */
3377
- maxParallel: z18.number(),
3048
+ maxParallel: z17.number(),
3378
3049
  /** Per-task memory ceiling in MiB (whole process tree); null = no limit. */
3379
- memoryLimitMb: z18.number().nullable(),
3050
+ memoryLimitMb: z17.number().nullable(),
3380
3051
  /** Keep the last N finished worktrees on disk (#483); 0 = unlimited. Older ones are reclaimed
3381
3052
  * (directory only — branch kept, so work is recoverable). */
3382
- worktreeRetention: z18.number(),
3053
+ worktreeRetention: z17.number(),
3383
3054
  /** Live title updates: null = no config key, the `CEZ_TITLE_UPDATES` env default (ON) decides. */
3384
- liveTitleUpdates: z18.boolean().nullable(),
3055
+ liveTitleUpdates: z17.boolean().nullable(),
3385
3056
  /** Optional review gate (#489): null = no config key, the `CEZ_REVIEW_GATE` env default (OFF)
3386
3057
  * decides. */
3387
- reviewGate: z18.boolean().nullable(),
3058
+ reviewGate: z17.boolean().nullable(),
3388
3059
  /** Trunk-based projects (spec 2026-10-20-trunk-based-projects); null = the key is unset
3389
3060
  * and the branch-per-task default applies. */
3390
- profile: z18.enum(["branches", "trunk"]).nullable(),
3391
- taskWorkspace: z18.enum(["worktree", "in-place"]).nullable(),
3392
- landing: z18.enum(["review", "auto"]).nullable(),
3061
+ profile: z17.enum(["branches", "trunk"]).nullable(),
3062
+ taskWorkspace: z17.enum(["worktree", "in-place"]).nullable(),
3063
+ landing: z17.enum(["review", "auto"]).nullable(),
3393
3064
  /** Why `landing: auto` is not honored here (a git-tracked config.json), or null. */
3394
- landingBlocked: z18.string().nullable(),
3395
- requiredChecks: z18.array(z18.string()),
3396
- defaultSkill: z18.string().nullable(),
3397
- askSkill: z18.string().nullable(),
3065
+ landingBlocked: z17.string().nullable(),
3066
+ requiredChecks: z17.array(z17.string()),
3067
+ defaultSkill: z17.string().nullable(),
3068
+ askSkill: z17.string().nullable(),
3398
3069
  /** False when `skillsRepos` is `[]` — team skill repositories are off for this project. */
3399
- teamSkills: z18.boolean()
3070
+ teamSkills: z17.boolean()
3400
3071
  });
3401
3072
  var setConfigResponseSchema = configResponseSchema;
3402
- var setConfigInputSchema = z18.object({
3073
+ var setConfigInputSchema = z17.object({
3403
3074
  worktreeLifecycle: worktreeLifecycleConfigSchema.nullable().optional(),
3404
- worktreeLifecycleRevision: z18.string().nullable().optional(),
3405
- baseBranch: z18.string().trim().min(1).max(200).nullable().optional(),
3075
+ worktreeLifecycleRevision: z17.string().nullable().optional(),
3076
+ baseBranch: z17.string().trim().min(1).max(200).nullable().optional(),
3406
3077
  defaultRunner: runnerSchema.optional(),
3407
- systemPrompt: z18.string().trim().max(2e4).nullable().optional(),
3078
+ systemPrompt: z17.string().trim().max(2e4).nullable().optional(),
3408
3079
  /** Clears on `null` or `''` like `systemPrompt`. */
3409
- branchNaming: z18.string().trim().max(4e3).nullable().optional(),
3410
- defaultModels: z18.object({
3411
- claude: z18.string().trim().max(200).nullable().optional(),
3412
- codex: z18.string().trim().max(200).nullable().optional(),
3413
- opencode: z18.string().trim().max(200).nullable().optional(),
3414
- cursor: z18.string().trim().max(200).nullable().optional(),
3415
- pi: z18.string().trim().max(200).nullable().optional(),
3416
- copilot: z18.string().trim().max(200).nullable().optional(),
3417
- antigravity: z18.string().trim().max(200).nullable().optional()
3080
+ branchNaming: z17.string().trim().max(4e3).nullable().optional(),
3081
+ defaultModels: z17.object({
3082
+ claude: z17.string().trim().max(200).nullable().optional(),
3083
+ codex: z17.string().trim().max(200).nullable().optional(),
3084
+ opencode: z17.string().trim().max(200).nullable().optional(),
3085
+ cursor: z17.string().trim().max(200).nullable().optional(),
3086
+ pi: z17.string().trim().max(200).nullable().optional(),
3087
+ copilot: z17.string().trim().max(200).nullable().optional(),
3088
+ antigravity: z17.string().trim().max(200).nullable().optional()
3418
3089
  }).optional(),
3419
3090
  /** Per-runner "auto is the default" override (#906), additive: clearing a `defaultModels` preset
3420
3091
  * cannot express an explicit auto, because the answer then falls through to the coding agent's
3421
3092
  * own settings file. `true` sets auto; `false`/`null` clears the override back to no opinion.
3422
3093
  * Merges per runner exactly like `defaultModels`. */
3423
- defaultModelsAuto: z18.object({
3424
- claude: z18.boolean().nullable().optional(),
3425
- codex: z18.boolean().nullable().optional(),
3426
- opencode: z18.boolean().nullable().optional(),
3427
- pi: z18.boolean().nullable().optional()
3094
+ defaultModelsAuto: z17.object({
3095
+ claude: z17.boolean().nullable().optional(),
3096
+ codex: z17.boolean().nullable().optional(),
3097
+ opencode: z17.boolean().nullable().optional(),
3098
+ pi: z17.boolean().nullable().optional()
3428
3099
  }).optional(),
3429
- maxParallel: z18.number().int().min(1).max(16).optional(),
3100
+ maxParallel: z17.number().int().min(1).max(16).optional(),
3430
3101
  /** null or 0 clears the ceiling back to "no limit". */
3431
- memoryLimitMb: z18.number().int().min(0).max(1048576).nullable().optional(),
3102
+ memoryLimitMb: z17.number().int().min(0).max(1048576).nullable().optional(),
3432
3103
  /** Keep last N finished worktrees (#483); 0 = unlimited, null clears back to the default (10). */
3433
- worktreeRetention: z18.number().int().min(0).max(1e3).nullable().optional(),
3104
+ worktreeRetention: z17.number().int().min(0).max(1e3).nullable().optional(),
3434
3105
  /** null clears the key back to the env-default behavior. */
3435
- liveTitleUpdates: z18.boolean().nullable().optional(),
3106
+ liveTitleUpdates: z17.boolean().nullable().optional(),
3436
3107
  /** null clears the key back to the env-default behavior (OFF). */
3437
- reviewGate: z18.boolean().nullable().optional(),
3108
+ reviewGate: z17.boolean().nullable().optional(),
3438
3109
  /** Trunk-based keys (spec 2026-10-20-trunk-based-projects): `null` clears each back to
3439
3110
  * the branch-per-task default. */
3440
- profile: z18.enum(["branches", "trunk"]).nullable().optional(),
3441
- taskWorkspace: z18.enum(["worktree", "in-place"]).nullable().optional(),
3442
- landing: z18.enum(["review", "auto"]).nullable().optional(),
3443
- requiredChecks: z18.array(z18.string().trim().min(1).max(2e3)).max(10).nullable().optional(),
3444
- defaultSkill: z18.string().trim().max(200).nullable().optional(),
3445
- askSkill: z18.string().trim().max(200).nullable().optional(),
3111
+ profile: z17.enum(["branches", "trunk"]).nullable().optional(),
3112
+ taskWorkspace: z17.enum(["worktree", "in-place"]).nullable().optional(),
3113
+ landing: z17.enum(["review", "auto"]).nullable().optional(),
3114
+ requiredChecks: z17.array(z17.string().trim().min(1).max(2e3)).max(10).nullable().optional(),
3115
+ defaultSkill: z17.string().trim().max(200).nullable().optional(),
3116
+ askSkill: z17.string().trim().max(200).nullable().optional(),
3446
3117
  /** `false` writes `skillsRepos: []`; `true` drops that override back to the default repos. */
3447
- teamSkills: z18.boolean().optional()
3118
+ teamSkills: z17.boolean().optional()
3448
3119
  });
3449
- var skillsUpdateStatusSchema = z18.enum([
3120
+ var skillsUpdateStatusSchema = z17.enum([
3450
3121
  "idle",
3451
3122
  "checking",
3452
3123
  "available",
@@ -3455,227 +3126,227 @@ var skillsUpdateStatusSchema = z18.enum([
3455
3126
  "unavailable",
3456
3127
  "error"
3457
3128
  ]);
3458
- var skillsUpdateScopeStateSchema = z18.object({
3459
- scope: z18.enum(["project", "global"]),
3129
+ var skillsUpdateScopeStateSchema = z17.object({
3130
+ scope: z17.enum(["project", "global"]),
3460
3131
  status: skillsUpdateStatusSchema,
3461
- available: z18.boolean(),
3462
- skills: z18.array(z18.string()),
3463
- checkedAt: z18.string().nullable(),
3464
- updatedAt: z18.string().nullable(),
3465
- reason: z18.string().optional()
3132
+ available: z17.boolean(),
3133
+ skills: z17.array(z17.string()),
3134
+ checkedAt: z17.string().nullable(),
3135
+ updatedAt: z17.string().nullable(),
3136
+ reason: z17.string().optional()
3466
3137
  });
3467
- var skillsUpdateStateSchema = z18.object({
3138
+ var skillsUpdateStateSchema = z17.object({
3468
3139
  status: skillsUpdateStatusSchema,
3469
- available: z18.boolean(),
3470
- autoUpdateEnabled: z18.boolean(),
3471
- inherited: z18.boolean(),
3472
- checkedAt: z18.string().nullable(),
3473
- updatedAt: z18.string().nullable(),
3474
- scopes: z18.array(skillsUpdateScopeStateSchema),
3475
- needsUpgradeNotes: z18.boolean()
3140
+ available: z17.boolean(),
3141
+ autoUpdateEnabled: z17.boolean(),
3142
+ inherited: z17.boolean(),
3143
+ checkedAt: z17.string().nullable(),
3144
+ updatedAt: z17.string().nullable(),
3145
+ scopes: z17.array(skillsUpdateScopeStateSchema),
3146
+ needsUpgradeNotes: z17.boolean()
3476
3147
  });
3477
3148
  var providerIdSchema = runnerSchema;
3478
- var providerConnectionStateSchema = z18.enum([
3149
+ var providerConnectionStateSchema = z17.enum([
3479
3150
  "connected",
3480
3151
  "disconnected",
3481
3152
  "not-installed",
3482
3153
  "unknown"
3483
3154
  ]);
3484
- var providerStatusSchema = z18.object({
3155
+ var providerStatusSchema = z17.object({
3485
3156
  provider: providerIdSchema,
3486
3157
  status: providerConnectionStateSchema,
3487
- enabled: z18.boolean().optional(),
3488
- hint: z18.string().optional(),
3489
- authFailureId: z18.string().optional(),
3158
+ enabled: z17.boolean().optional(),
3159
+ hint: z17.string().optional(),
3160
+ authFailureId: z17.string().optional(),
3490
3161
  /** Which agent account this row describes (spec 2026-07-29-agent-profiles). ABSENT on
3491
3162
  * `GET /api/v1/providers/status`, which deliberately keeps answering exactly one row per
3492
3163
  * provider — the discovered default — so an older client sees no change at all. Per-account
3493
3164
  * rows are carried by `GET /api/v1/workspace/agent-profiles` instead. */
3494
- profileId: z18.string().optional()
3165
+ profileId: z17.string().optional()
3495
3166
  });
3496
- var providerStatusResponseSchema = z18.object({
3497
- providers: z18.array(providerStatusSchema)
3167
+ var providerStatusResponseSchema = z17.object({
3168
+ providers: z17.array(providerStatusSchema)
3498
3169
  });
3499
- var providerConnectResponseSchema = z18.discriminatedUnion("opened", [
3500
- z18.object({ opened: z18.literal(true), command: z18.string() }),
3501
- z18.object({ opened: z18.literal(false), connected: z18.literal(true), command: z18.string() })
3170
+ var providerConnectResponseSchema = z17.discriminatedUnion("opened", [
3171
+ z17.object({ opened: z17.literal(true), command: z17.string() }),
3172
+ z17.object({ opened: z17.literal(false), connected: z17.literal(true), command: z17.string() })
3502
3173
  ]);
3503
- var providerUpdateResponseSchema = z18.object({ opened: z18.literal(true), command: z18.string() });
3504
- var modelDiscoveryRunnerSchema = z18.enum(["claude", "codex", "opencode", "cursor", "junie", "antigravity"]);
3174
+ var providerUpdateResponseSchema = z17.object({ opened: z17.literal(true), command: z17.string() });
3175
+ var modelDiscoveryRunnerSchema = z17.enum(["claude", "codex", "opencode", "cursor", "junie", "antigravity"]);
3505
3176
  var MODEL_DISCOVERY_RUNNERS = modelDiscoveryRunnerSchema.options;
3506
3177
  function runnerDiscoversModels(runner) {
3507
3178
  return MODEL_DISCOVERY_RUNNERS.includes(runner);
3508
3179
  }
3509
- var runnerModelOptionSchema = z18.object({
3510
- id: z18.string(),
3511
- label: z18.string(),
3512
- description: z18.string()
3180
+ var runnerModelOptionSchema = z17.object({
3181
+ id: z17.string(),
3182
+ label: z17.string(),
3183
+ description: z17.string()
3513
3184
  });
3514
- var runnerModelCatalogResponseSchema = z18.object({
3185
+ var runnerModelCatalogResponseSchema = z17.object({
3515
3186
  runner: runnerSchema,
3516
- models: z18.array(runnerModelOptionSchema),
3517
- source: z18.enum(["live", "cache", "unavailable"]),
3518
- stale: z18.boolean(),
3519
- reason: z18.string().optional()
3520
- });
3521
- var openTargetSchema = z18.object({
3522
- id: z18.string(),
3523
- label: z18.string(),
3187
+ models: z17.array(runnerModelOptionSchema),
3188
+ source: z17.enum(["live", "cache", "unavailable"]),
3189
+ stale: z17.boolean(),
3190
+ reason: z17.string().optional()
3191
+ });
3192
+ var openTargetSchema = z17.object({
3193
+ id: z17.string(),
3194
+ label: z17.string(),
3524
3195
  /** A stable icon key (#361) the UI maps to a concrete icon. Optional: an older server omitting
3525
3196
  * it just renders the generic fallback icon. */
3526
- icon: z18.string().optional()
3197
+ icon: z17.string().optional()
3527
3198
  });
3528
- var openTargetsResponseSchema = z18.object({
3529
- targets: z18.array(openTargetSchema)
3199
+ var openTargetsResponseSchema = z17.object({
3200
+ targets: z17.array(openTargetSchema)
3530
3201
  });
3531
- var openProjectInSchema = z18.object({
3202
+ var openProjectInSchema = z17.object({
3532
3203
  // A short bound (#429): matched against a downstream allowlist, so an app id is never long.
3533
- target: z18.string().trim().min(1, "target required").max(200)
3204
+ target: z17.string().trim().min(1, "target required").max(200)
3534
3205
  });
3535
- var openProjectInResponseSchema = z18.object({
3536
- opened: z18.literal(true),
3537
- path: z18.string()
3206
+ var openProjectInResponseSchema = z17.object({
3207
+ opened: z17.literal(true),
3208
+ path: z17.string()
3538
3209
  });
3539
3210
 
3540
3211
  // ../contract/src/skills.ts
3541
- import { z as z19 } from "zod";
3542
- var skillSchema = z19.object({
3543
- name: z19.string(),
3544
- description: z19.string().optional(),
3212
+ import { z as z18 } from "zod";
3213
+ var skillSchema = z18.object({
3214
+ name: z18.string(),
3215
+ description: z18.string().optional(),
3545
3216
  /** Advisory hint for untouched composer run-mode choices. */
3546
- interactive: z19.literal(true).optional(),
3547
- body: z19.string(),
3548
- path: z19.string(),
3217
+ interactive: z18.literal(true).optional(),
3218
+ body: z18.string(),
3219
+ path: z18.string(),
3549
3220
  /** `builtin`: the one skill cezar ships itself (`create-cezar-automation`), served only while
3550
3221
  * GitHub automations are on and reachable (spec 2026-09-13-automations-from-prompt). */
3551
- source: z19.enum(["ai", "cezar", "agents", "global", "team", "builtin"]),
3222
+ source: z18.enum(["ai", "cezar", "agents", "global", "team", "builtin"]),
3552
3223
  /** Team skills only: where the definition lives in its skills repo. */
3553
- team: z19.object({
3554
- repo: z19.string(),
3555
- ref: z19.string(),
3556
- path: z19.string(),
3224
+ team: z18.object({
3225
+ repo: z18.string(),
3226
+ ref: z18.string(),
3227
+ path: z18.string(),
3557
3228
  /** True for the `SKILL.md` convention — a whole directory (references/…). */
3558
- dir: z19.boolean(),
3229
+ dir: z18.boolean(),
3559
3230
  /**
3560
3231
  * The exact commit `ref` resolved to when the skill was read (#428).
3561
3232
  *
3562
3233
  * The hand-written DTO omitted this field entirely — it was NARROWER than the route,
3563
3234
  * which has served it since #428.
3564
3235
  */
3565
- commit: z19.string().optional()
3236
+ commit: z18.string().optional()
3566
3237
  }).optional()
3567
3238
  });
3568
3239
  var importableSkillSchema = skillSchema;
3569
- var todoItemSchema = z19.object({
3570
- id: z19.string(),
3571
- ts: z19.string().optional(),
3572
- taskId: z19.string().optional(),
3573
- summary: z19.string().min(1),
3574
- action: z19.string().optional(),
3575
- prUrl: z19.string().optional(),
3576
- suggestedSkill: z19.string().optional(),
3577
- suggestedArgs: z19.string().optional(),
3578
- suggestedPrompt: z19.string().optional(),
3240
+ var todoItemSchema = z18.object({
3241
+ id: z18.string(),
3242
+ ts: z18.string().optional(),
3243
+ taskId: z18.string().optional(),
3244
+ summary: z18.string().min(1),
3245
+ action: z18.string().optional(),
3246
+ prUrl: z18.string().optional(),
3247
+ suggestedSkill: z18.string().optional(),
3248
+ suggestedArgs: z18.string().optional(),
3249
+ suggestedPrompt: z18.string().optional(),
3579
3250
  /** Explicit intent; missing infers from suggestedSkill/suggestedPrompt for old files. */
3580
- runnable: z19.boolean().optional(),
3251
+ runnable: z18.boolean().optional(),
3581
3252
  /** Set once a task was started from this entry — it then leaves the inbox and stays as
3582
3253
  * the audit trail. A later launch never overwrites the first. */
3583
- startedTaskId: z19.string().optional()
3254
+ startedTaskId: z18.string().optional()
3584
3255
  });
3585
- var removeTodoResponseSchema = z19.object({
3586
- removed: z19.literal(true)
3256
+ var removeTodoResponseSchema = z18.object({
3257
+ removed: z18.literal(true)
3587
3258
  });
3588
- var startTodoResponseSchema = z19.object({
3259
+ var startTodoResponseSchema = z18.object({
3589
3260
  run: runRecordSchema
3590
3261
  });
3591
3262
 
3592
3263
  // ../contract/src/agent-config.ts
3593
- import { z as z20 } from "zod";
3594
- var agentConfigFormatSchema = z20.enum(["json", "jsonc", "toml", "markdown"]);
3595
- var agentConfigScopeSchema = z20.enum(["user", "project", "local"]);
3596
- var agentConfigKindSchema = z20.enum(["settings", "memory", "mcp"]);
3597
- var agentConfigTrackedSchema = z20.enum(["tracked", "gitignored", "outside-repo"]);
3598
- var agentConfigFileSchema = z20.object({
3264
+ import { z as z19 } from "zod";
3265
+ var agentConfigFormatSchema = z19.enum(["json", "jsonc", "toml", "markdown"]);
3266
+ var agentConfigScopeSchema = z19.enum(["user", "project", "local"]);
3267
+ var agentConfigKindSchema = z19.enum(["settings", "memory", "mcp"]);
3268
+ var agentConfigTrackedSchema = z19.enum(["tracked", "gitignored", "outside-repo"]);
3269
+ var agentConfigFileSchema = z19.object({
3599
3270
  /** Stable, opaque, URL-safe — the ONLY thing a client may name (traversal-proof). */
3600
- id: z20.string(),
3271
+ id: z19.string(),
3601
3272
  /** Every runner that reads this file: `<repo>/AGENTS.md` is one file, two readers. */
3602
- runners: z20.array(runnerSchema),
3273
+ runners: z19.array(runnerSchema),
3603
3274
  kind: agentConfigKindSchema,
3604
3275
  scope: agentConfigScopeSchema,
3605
- label: z20.string(),
3606
- path: z20.string(),
3276
+ label: z19.string(),
3277
+ path: z19.string(),
3607
3278
  format: agentConfigFormatSchema,
3608
3279
  tracked: agentConfigTrackedSchema,
3609
- seeded: z20.boolean(),
3610
- holdsMcp: z20.boolean(),
3280
+ seeded: z19.boolean(),
3281
+ holdsMcp: z19.boolean(),
3611
3282
  /** cezar's own private, per-project file (`.ai/cezar/mcp.local.json`) — injected into every run
3612
3283
  * at launch, never committed. */
3613
- private: z20.boolean(),
3284
+ private: z19.boolean(),
3614
3285
  /** VERBATIM from the vendor docs. Never computed, never generic. */
3615
- precedence: z20.string(),
3286
+ precedence: z19.string(),
3616
3287
  /** Documented mid-run reload behaviour, or absent when the vendor is silent. */
3617
- hotReload: z20.string().optional(),
3618
- docsUrl: z20.string(),
3619
- exists: z20.boolean(),
3620
- size: z20.number(),
3288
+ hotReload: z19.string().optional(),
3289
+ docsUrl: z19.string(),
3290
+ exists: z19.boolean(),
3291
+ size: z19.number(),
3621
3292
  /** sha256 of the bytes, or null when absent. */
3622
- version: z20.string().nullable(),
3293
+ version: z19.string().nullable(),
3623
3294
  /** False in hosted mode (whole feature) — the client renders read-only up front. */
3624
- writable: z20.boolean(),
3625
- readOnlyReason: z20.string().optional()
3295
+ writable: z19.boolean(),
3296
+ readOnlyReason: z19.string().optional()
3626
3297
  });
3627
- var userMcpListingSchema = z20.object({
3628
- path: z20.string(),
3629
- servers: z20.array(z20.string()),
3630
- readable: z20.boolean()
3298
+ var userMcpListingSchema = z19.object({
3299
+ path: z19.string(),
3300
+ servers: z19.array(z19.string()),
3301
+ readable: z19.boolean()
3631
3302
  });
3632
- var agentConfigListingSchema = z20.object({
3633
- editable: z20.boolean(),
3634
- files: z20.array(agentConfigFileSchema),
3303
+ var agentConfigListingSchema = z19.object({
3304
+ editable: z19.boolean(),
3305
+ files: z19.array(agentConfigFileSchema),
3635
3306
  /** null in hosted mode (host-state disclosure guard). */
3636
3307
  userMcp: userMcpListingSchema.nullable()
3637
3308
  });
3638
- var agentConfigFileContentSchema = z20.object({
3639
- id: z20.string(),
3640
- path: z20.string(),
3641
- exists: z20.boolean(),
3642
- content: z20.string(),
3309
+ var agentConfigFileContentSchema = z19.object({
3310
+ id: z19.string(),
3311
+ path: z19.string(),
3312
+ exists: z19.boolean(),
3313
+ content: z19.string(),
3643
3314
  /** sha256 of the bytes, or null when the file does not exist yet. */
3644
- version: z20.string().nullable()
3315
+ version: z19.string().nullable()
3645
3316
  });
3646
- var setAgentConfigInputSchema = z20.object({
3647
- content: z20.string().max(2e6),
3648
- version: z20.string().nullable()
3317
+ var setAgentConfigInputSchema = z19.object({
3318
+ content: z19.string().max(2e6),
3319
+ version: z19.string().nullable()
3649
3320
  });
3650
3321
 
3651
3322
  // ../contract/src/agent-profiles.ts
3652
- import { z as z21 } from "zod";
3323
+ import { z as z20 } from "zod";
3653
3324
  var DEFAULT_AGENT_ACCOUNT_ID = "default";
3654
- var agentAccountFileSchema = z21.object({
3655
- id: z21.string(),
3325
+ var agentAccountFileSchema = z20.object({
3326
+ id: z20.string(),
3656
3327
  /** e.g. `settings.json` — the file's own name, since the folder is shown once on the account. */
3657
- label: z21.string(),
3328
+ label: z20.string(),
3658
3329
  /** Absolute, resolved inside this account's config folder. */
3659
- path: z21.string(),
3660
- exists: z21.boolean()
3330
+ path: z20.string(),
3331
+ exists: z20.boolean()
3661
3332
  });
3662
- var agentProfileSchema = z21.object({
3333
+ var agentProfileSchema = z20.object({
3663
3334
  /** `default` for the discovered profile, else the stored slug. */
3664
- id: z21.string(),
3335
+ id: z20.string(),
3665
3336
  provider: providerIdSchema,
3666
- label: z21.string(),
3337
+ label: z20.string(),
3667
3338
  /** As the user wrote it — a literal `~` is preserved, matching `browseRoot`/`projectsDir`. */
3668
- configDir: z21.string(),
3339
+ configDir: z20.string(),
3669
3340
  /** Expanded absolute path. Same-origin route, like `ProjectListEntry.root`. */
3670
- path: z21.string(),
3341
+ path: z20.string(),
3671
3342
  /** False for a dir the CLI has not created yet — legitimate, and NOT a reason to fall back
3672
3343
  * to another account at run time (that would silently bill the wrong subscription). */
3673
- exists: z21.boolean(),
3344
+ exists: z20.boolean(),
3674
3345
  /** Whether the dir carries this agent's own marker files. ADVISORY: an unrecognised dir is
3675
3346
  * still accepted, because "add profile → Connect → the CLI creates it" is the real flow. */
3676
- looksValid: z21.boolean(),
3347
+ looksValid: z20.boolean(),
3677
3348
  /** True for the profile cezar discovers from the environment. Never stored, never deletable. */
3678
- isDefault: z21.boolean(),
3349
+ isDefault: z20.boolean(),
3679
3350
  /** This account's own authentication state — two Claude logins answer independently.
3680
3351
  *
3681
3352
  * **Absent until the probe has warmed.** Every probe shells out to an agent CLI, and this
@@ -3686,39 +3357,39 @@ var agentProfileSchema = z21.object({
3686
3357
  status: providerStatusSchema.optional(),
3687
3358
  /** This agent's own user-scope config files, resolved inside THIS account's folder — so a
3688
3359
  * second login's `settings.json` is the one you open, not the default account's. */
3689
- files: z21.array(agentAccountFileSchema)
3360
+ files: z20.array(agentAccountFileSchema)
3690
3361
  });
3691
3362
  function agentAccountRouteId(profile) {
3692
3363
  return profile.isDefault ? `default:${profile.provider}` : profile.id;
3693
3364
  }
3694
- var agentAccountSelectionSchema = z21.object({
3695
- claude: z21.string().optional(),
3696
- codex: z21.string().optional(),
3697
- opencode: z21.string().optional(),
3698
- junie: z21.string().optional(),
3699
- cursor: z21.string().optional(),
3700
- pi: z21.string().optional(),
3701
- copilot: z21.string().optional(),
3702
- antigravity: z21.string().optional()
3703
- });
3704
- var agentProfilesResponseSchema = z21.object({
3705
- editable: z21.boolean(),
3706
- profiles: z21.array(agentProfileSchema),
3365
+ var agentAccountSelectionSchema = z20.object({
3366
+ claude: z20.string().optional(),
3367
+ codex: z20.string().optional(),
3368
+ opencode: z20.string().optional(),
3369
+ junie: z20.string().optional(),
3370
+ cursor: z20.string().optional(),
3371
+ pi: z20.string().optional(),
3372
+ copilot: z20.string().optional(),
3373
+ antigravity: z20.string().optional()
3374
+ });
3375
+ var agentProfilesResponseSchema = z20.object({
3376
+ editable: z20.boolean(),
3377
+ profiles: z20.array(agentProfileSchema),
3707
3378
  /** Providers that can carry more than one account at all — what "Add account" is offered for.
3708
3379
  * OpenCode is absent: its credentials live in a SQLite DB behind a separate `OPENCODE_DB`, so
3709
3380
  * a config-dir profile would swap settings while still billing the other account. */
3710
- profileCapableProviders: z21.array(providerIdSchema),
3381
+ profileCapableProviders: z20.array(providerIdSchema),
3711
3382
  /** Which account each project uses, keyed by the project's realpath'd ROOT.
3712
3383
  *
3713
3384
  * Served here rather than on `GET /api/v1/projects` because it is stored beside the accounts it
3714
3385
  * names (`~/.cezar/agent-accounts.json`) — one file, so deleting an account and scrubbing every
3715
3386
  * reference to it is one atomic write, and neither can be dropped by a cezar version that never
3716
3387
  * heard of accounts. Empty when remote account management is withheld. */
3717
- selections: z21.record(z21.string(), agentAccountSelectionSchema),
3388
+ selections: z20.record(z20.string(), agentAccountSelectionSchema),
3718
3389
  /** The machine-wide fallback account per provider, used by any repo that has chosen none. */
3719
3390
  defaults: agentAccountSelectionSchema
3720
3391
  });
3721
- var selectAgentProfileInputSchema = z21.object({
3392
+ var selectAgentProfileInputSchema = z20.object({
3722
3393
  /**
3723
3394
  * Registry slug, or the reserved `default` boot alias. Resolved to a root server-side.
3724
3395
  *
@@ -3726,36 +3397,36 @@ var selectAgentProfileInputSchema = z21.object({
3726
3397
  * chosen nothing uses, so a second login is set up once rather than per checkout. A repo's own
3727
3398
  * choice always wins over it, which is what keeps this a default and not an override.
3728
3399
  */
3729
- projectId: z21.string().min(1).max(64).nullable(),
3400
+ projectId: z20.string().min(1).max(64).nullable(),
3730
3401
  provider: providerIdSchema,
3731
- profileId: z21.string().max(64).nullable()
3402
+ profileId: z20.string().max(64).nullable()
3732
3403
  });
3733
- var agentProfileSelectionsResponseSchema = z21.object({
3734
- selections: z21.record(z21.string(), agentAccountSelectionSchema),
3404
+ var agentProfileSelectionsResponseSchema = z20.object({
3405
+ selections: z20.record(z20.string(), agentAccountSelectionSchema),
3735
3406
  /** The machine-wide fallback, for repos with no selection of their own. */
3736
3407
  defaults: agentAccountSelectionSchema
3737
3408
  });
3738
- var agentFallbackCandidateSchema = z21.object({
3409
+ var agentFallbackCandidateSchema = z20.object({
3739
3410
  provider: providerIdSchema,
3740
- profileId: z21.string().min(1).max(64).default(DEFAULT_AGENT_ACCOUNT_ID),
3741
- model: z21.string().min(1).max(200).optional()
3742
- });
3743
- var agentFallbackPolicySchema = z21.object({
3744
- enabled: z21.boolean(),
3745
- candidates: z21.array(agentFallbackCandidateSchema).max(10),
3746
- revision: z21.number().int().nonnegative(),
3747
- incarnation: z21.string().nullable(),
3748
- revocation: z21.string().nullable()
3749
- });
3750
- var getAgentFallbackPolicyQuerySchema = z21.object({
3751
- projectId: z21.string().min(1).max(64)
3752
- });
3753
- var putAgentFallbackPolicySchema = z21.object({
3754
- projectId: z21.string().min(1).max(64),
3755
- expectedRevision: z21.number().int().nonnegative(),
3756
- expectedIncarnation: z21.string().nullable(),
3757
- enabled: z21.boolean(),
3758
- candidates: z21.array(agentFallbackCandidateSchema).max(10).superRefine((items, ctx) => {
3411
+ profileId: z20.string().min(1).max(64).default(DEFAULT_AGENT_ACCOUNT_ID),
3412
+ model: z20.string().min(1).max(200).optional()
3413
+ });
3414
+ var agentFallbackPolicySchema = z20.object({
3415
+ enabled: z20.boolean(),
3416
+ candidates: z20.array(agentFallbackCandidateSchema).max(10),
3417
+ revision: z20.number().int().nonnegative(),
3418
+ incarnation: z20.string().nullable(),
3419
+ revocation: z20.string().nullable()
3420
+ });
3421
+ var getAgentFallbackPolicyQuerySchema = z20.object({
3422
+ projectId: z20.string().min(1).max(64)
3423
+ });
3424
+ var putAgentFallbackPolicySchema = z20.object({
3425
+ projectId: z20.string().min(1).max(64),
3426
+ expectedRevision: z20.number().int().nonnegative(),
3427
+ expectedIncarnation: z20.string().nullable(),
3428
+ enabled: z20.boolean(),
3429
+ candidates: z20.array(agentFallbackCandidateSchema).max(10).superRefine((items, ctx) => {
3759
3430
  const seen = /* @__PURE__ */ new Set();
3760
3431
  items.forEach((item, index) => {
3761
3432
  const key = `${item.provider}:${item.profileId}`;
@@ -3768,34 +3439,34 @@ var putAgentFallbackPolicySchema = z21.object({
3768
3439
  ctx.addIssue({ code: "custom", path: ["candidates"], message: "enabled fallback policy requires at least one candidate" });
3769
3440
  }
3770
3441
  });
3771
- var agentAccountStatusResponseSchema = z21.object({ status: providerStatusSchema });
3772
- var agentAccountDetailsResponseSchema = z21.object({
3773
- available: z21.boolean(),
3774
- reason: z21.string().optional(),
3775
- fields: z21.array(z21.object({ label: z21.string(), value: z21.string() }))
3442
+ var agentAccountStatusResponseSchema = z20.object({ status: providerStatusSchema });
3443
+ var agentAccountDetailsResponseSchema = z20.object({
3444
+ available: z20.boolean(),
3445
+ reason: z20.string().optional(),
3446
+ fields: z20.array(z20.object({ label: z20.string(), value: z20.string() }))
3776
3447
  });
3777
- var openAgentAccountFileInputSchema = z21.object({
3778
- file: z21.string().min(1).max(200),
3779
- target: z21.string().min(1).max(64).optional()
3448
+ var openAgentAccountFileInputSchema = z20.object({
3449
+ file: z20.string().min(1).max(200),
3450
+ target: z20.string().min(1).max(64).optional()
3780
3451
  });
3781
- var openAgentAccountFileResponseSchema = z21.object({
3782
- opened: z21.literal(true),
3783
- path: z21.string()
3452
+ var openAgentAccountFileResponseSchema = z20.object({
3453
+ opened: z20.literal(true),
3454
+ path: z20.string()
3784
3455
  });
3785
- var createAgentProfileInputSchema = z21.object({
3456
+ var createAgentProfileInputSchema = z20.object({
3786
3457
  provider: providerIdSchema,
3787
- label: z21.string().trim().max(200).optional(),
3458
+ label: z20.string().trim().max(200).optional(),
3788
3459
  /** Stored as written; validated absolute after `~` expansion, server-side. */
3789
- configDir: z21.string().trim().min(1).max(4096)
3460
+ configDir: z20.string().trim().min(1).max(4096)
3790
3461
  });
3791
- var agentProfileResponseSchema = z21.object({ profile: agentProfileSchema });
3792
- var updateAgentProfileInputSchema = z21.object({
3793
- label: z21.string().trim().max(200).optional(),
3794
- configDir: z21.string().trim().min(1).max(4096).optional()
3462
+ var agentProfileResponseSchema = z20.object({ profile: agentProfileSchema });
3463
+ var updateAgentProfileInputSchema = z20.object({
3464
+ label: z20.string().trim().max(200).optional(),
3465
+ configDir: z20.string().trim().min(1).max(4096).optional()
3795
3466
  });
3796
- var removeAgentProfileResponseSchema = z21.object({
3797
- removed: z21.literal(true),
3798
- id: z21.string()
3467
+ var removeAgentProfileResponseSchema = z20.object({
3468
+ removed: z20.literal(true),
3469
+ id: z20.string()
3799
3470
  });
3800
3471
 
3801
3472
  // ../contract/src/zoned-time.ts
@@ -3878,35 +3549,35 @@ function localTimeZone() {
3878
3549
  }
3879
3550
 
3880
3551
  // ../contract/src/automation-schedule.ts
3881
- import { z as z22 } from "zod";
3552
+ import { z as z21 } from "zod";
3882
3553
  var SCHEDULE_TYPES = ["daily", "weekdays", "weekly", "hours", "once"];
3883
3554
  var SCHEDULE_HOURS_OPTIONS = [1, 2, 3, 4, 6, 8, 12];
3884
3555
  var WEEKDAY_NAMES = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
3885
3556
  var WEEKDAY_LONG = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
3886
- var scheduleDateSchema = z22.string().regex(/^\d{4}-\d{2}-\d{2}$/).refine((value) => parseScheduleDate(value) !== null, "not a calendar date");
3887
- var automationScheduleSchema = z22.object({
3888
- type: z22.enum(SCHEDULE_TYPES),
3557
+ var scheduleDateSchema = z21.string().regex(/^\d{4}-\d{2}-\d{2}$/).refine((value) => parseScheduleDate(value) !== null, "not a calendar date");
3558
+ var automationScheduleSchema = z21.object({
3559
+ type: z21.enum(SCHEDULE_TYPES),
3889
3560
  /** 0–23; `daily`, `weekdays`, `weekly`, `once`. Default 4. */
3890
- hour: z22.number().int().min(0).max(23).optional(),
3561
+ hour: z21.number().int().min(0).max(23).optional(),
3891
3562
  /** 0–59; `daily`, `weekdays`, `weekly`, `once`. Default 0. */
3892
- minute: z22.number().int().min(0).max(59).optional(),
3563
+ minute: z21.number().int().min(0).max(59).optional(),
3893
3564
  /** ISO weekday, Monday = 1 … Sunday = 7; `weekly`. Default 1. */
3894
- day: z22.number().int().min(1).max(7).optional(),
3565
+ day: z21.number().int().min(1).max(7).optional(),
3895
3566
  /** Hours between runs, from 00:00; `hours`. Default 6. */
3896
- every: z22.union([
3897
- z22.literal(1),
3898
- z22.literal(2),
3899
- z22.literal(3),
3900
- z22.literal(4),
3901
- z22.literal(6),
3902
- z22.literal(8),
3903
- z22.literal(12)
3567
+ every: z21.union([
3568
+ z21.literal(1),
3569
+ z21.literal(2),
3570
+ z21.literal(3),
3571
+ z21.literal(4),
3572
+ z21.literal(6),
3573
+ z21.literal(8),
3574
+ z21.literal(12)
3904
3575
  ]).optional(),
3905
3576
  /** The calendar day in the schedule's zone; `once`, where it is required. */
3906
3577
  date: scheduleDateSchema.optional()
3907
3578
  });
3908
3579
  var MAX_AUTOMATION_SCHEDULES = 16;
3909
- var automationSchedulesSchema = z22.array(automationScheduleSchema).min(1).max(MAX_AUTOMATION_SCHEDULES).superRefine((schedules, ctx) => {
3580
+ var automationSchedulesSchema = z21.array(automationScheduleSchema).min(1).max(MAX_AUTOMATION_SCHEDULES).superRefine((schedules, ctx) => {
3910
3581
  if (schedules.length > 1 && schedules.some((schedule) => schedule.type === "once")) {
3911
3582
  ctx.addIssue({ code: "custom", message: "a one-time schedule cannot be combined with other schedules" });
3912
3583
  }
@@ -4077,8 +3748,8 @@ function nextOccurrence(schedule, afterMs, timeZone) {
4077
3748
  }
4078
3749
 
4079
3750
  // ../contract/src/automations.ts
4080
- import { z as z23 } from "zod";
4081
- var automationEventSchema = z23.enum([
3751
+ import { z as z22 } from "zod";
3752
+ var automationEventSchema = z22.enum([
4082
3753
  "pull_request.opened",
4083
3754
  "issue.opened",
4084
3755
  "issue.labeled",
@@ -4089,77 +3760,77 @@ var automationEventSchema = z23.enum([
4089
3760
  "pull_request.closed",
4090
3761
  "pull_request.merged"
4091
3762
  ]);
4092
- var trackerTriggerSchema = z23.object({
3763
+ var trackerTriggerSchema = z22.object({
4093
3764
  access: trackerAccessSchema.optional(),
4094
- events: z23.array(trackerAutomationEventSchema).min(1).max(4),
4095
- targetStatusIds: z23.array(z23.string().min(1)).max(100).optional(),
4096
- changedLabelIds: z23.array(z23.string().min(1)).max(100).optional(),
3765
+ events: z22.array(trackerAutomationEventSchema).min(1).max(4),
3766
+ targetStatusIds: z22.array(z22.string().min(1)).max(100).optional(),
3767
+ changedLabelIds: z22.array(z22.string().min(1)).max(100).optional(),
4097
3768
  /** All exact label names must be present in the polled issue snapshot. */
4098
- requiredLabels: z23.array(z23.string().trim().min(1).max(200)).max(100).optional(),
3769
+ requiredLabels: z22.array(z22.string().trim().min(1).max(200)).max(100).optional(),
4099
3770
  association: trackerAssociationSchema
4100
3771
  });
4101
- var trackerAutomationOptionsQuerySchema = z23.object({ search: z23.string().max(200).optional(), cursor: z23.string().max(4096).optional() });
4102
- var trackerAutomationOptionsSchema = z23.discriminatedUnion("available", [
4103
- z23.object({
4104
- available: z23.literal(true),
3772
+ var trackerAutomationOptionsQuerySchema = z22.object({ search: z22.string().max(200).optional(), cursor: z22.string().max(4096).optional() });
3773
+ var trackerAutomationOptionsSchema = z22.discriminatedUnion("available", [
3774
+ z22.object({
3775
+ available: z22.literal(true),
4105
3776
  association: trackerAssociationSchema,
4106
- events: z23.array(trackerAutomationEventSchema),
4107
- limitations: z23.array(z23.string()),
4108
- statuses: z23.array(z23.object({ id: z23.string(), name: z23.string() })),
4109
- labels: z23.array(z23.object({ id: z23.string(), name: z23.string() })),
4110
- nextCursor: z23.string().optional()
3777
+ events: z22.array(trackerAutomationEventSchema),
3778
+ limitations: z22.array(z22.string()),
3779
+ statuses: z22.array(z22.object({ id: z22.string(), name: z22.string() })),
3780
+ labels: z22.array(z22.object({ id: z22.string(), name: z22.string() })),
3781
+ nextCursor: z22.string().optional()
4111
3782
  }),
4112
3783
  trackerFailureSchema
4113
3784
  ]);
4114
- var automationFiltersSchema = z23.object({
4115
- authors: z23.array(z23.string()).optional(),
4116
- assignees: z23.array(z23.string()).optional(),
4117
- allLabels: z23.array(z23.string()).optional(),
4118
- anyLabels: z23.array(z23.string()).optional(),
4119
- excludeLabels: z23.array(z23.string()).optional(),
3785
+ var automationFiltersSchema = z22.object({
3786
+ authors: z22.array(z22.string()).optional(),
3787
+ assignees: z22.array(z22.string()).optional(),
3788
+ allLabels: z22.array(z22.string()).optional(),
3789
+ anyLabels: z22.array(z22.string()).optional(),
3790
+ excludeLabels: z22.array(z22.string()).optional(),
4120
3791
  /** Required for the two label events — the server rejects a definition without it. */
4121
- changedLabels: z23.array(z23.string()).optional(),
3792
+ changedLabels: z22.array(z22.string()).optional(),
4122
3793
  /** The GitHub logins a review event must name — the reviewer for `pull_request.reviewed`, the
4123
3794
  * requested reviewer for the two `review_requested` events. Optional: an empty filter means
4124
3795
  * "any reviewer". */
4125
- reviewers: z23.array(z23.string()).optional(),
4126
- status: z23.string().optional(),
4127
- lookbackDays: z23.number(),
4128
- maxRecords: z23.number()
3796
+ reviewers: z22.array(z22.string()).optional(),
3797
+ status: z22.string().optional(),
3798
+ lookbackDays: z22.number(),
3799
+ maxRecords: z22.number()
4129
3800
  });
4130
- var automationKindSchema = z23.enum(["github", "schedule", "tracker"]);
4131
- var automationDispatchSchema = z23.object({
4132
- maxSubtasks: z23.number().int().min(1).max(DISPATCH_MAX_SUBTASKS).optional(),
4133
- reviewChild: z23.boolean().optional()
3801
+ var automationKindSchema = z22.enum(["github", "schedule", "tracker"]);
3802
+ var automationDispatchSchema = z22.object({
3803
+ maxSubtasks: z22.number().int().min(1).max(DISPATCH_MAX_SUBTASKS).optional(),
3804
+ reviewChild: z22.boolean().optional()
4134
3805
  });
4135
3806
  var automationTaskSchema = createRunInputBaseSchema.omit({ task: true, images: true, todoId: true, systemPrompt: true }).extend({
4136
3807
  /** The prompt template. `{{github.number}}`, `{{github.title}}`, `{{github.url}}` and
4137
3808
  * `{{github.labels}}` are substituted per match; GitHub content is appended as untrusted
4138
3809
  * context, never interpolated into instructions. */
4139
- prompt: z23.string(),
4140
- variants: z23.union([z23.literal(1), z23.literal(2), z23.literal(3)]).optional(),
4141
- systemPrompt: z23.string().optional(),
3810
+ prompt: z22.string(),
3811
+ variants: z22.union([z22.literal(1), z22.literal(2), z22.literal(3)]).optional(),
3812
+ systemPrompt: z22.string().optional(),
4142
3813
  dispatch: automationDispatchSchema.optional(),
4143
3814
  /** Where the launched run's worktree forks from (spec 2026-10-06-agentic-e2e-checks Phase 3):
4144
3815
  * omitted/`'base'` = the configured base; `'pr-head'` = the matched pull request's head.
4145
3816
  * GitHub automations whose events are all `pull_request.*` only. */
4146
- checkout: z23.enum(["base", "pr-head"]).optional(),
3817
+ checkout: z22.enum(["base", "pr-head"]).optional(),
4147
3818
  /** With `checkout: 'pr-head'`: admit a head from a fork (untrusted; no secrets). */
4148
- allowForkHeads: z23.boolean().optional()
3819
+ allowForkHeads: z22.boolean().optional()
4149
3820
  });
4150
- var automationDefinitionSchema = z23.object({
4151
- id: z23.string(),
3821
+ var automationDefinitionSchema = z22.object({
3822
+ id: z22.string(),
4152
3823
  /** Bumped on every edit; a PUT must echo the revision it read (optimistic concurrency). */
4153
- revision: z23.number(),
4154
- name: z23.string(),
4155
- description: z23.string().optional(),
3824
+ revision: z22.number(),
3825
+ name: z22.string(),
3826
+ description: z22.string().optional(),
4156
3827
  /** Always present: the storage schema defaults it to `false`, so a definition is created
4157
3828
  * PAUSED and enabling it is a separate, baseline-establishing act. */
4158
- enabled: z23.boolean(),
3829
+ enabled: z22.boolean(),
4159
3830
  kind: automationKindSchema,
4160
3831
  /** `github` kind: always present. `schedule` kind: absent. */
4161
- events: z23.array(automationEventSchema).optional(),
4162
- intervalSeconds: z23.number().optional(),
3832
+ events: z22.array(automationEventSchema).optional(),
3833
+ intervalSeconds: z22.number().optional(),
4163
3834
  filters: automationFiltersSchema.optional(),
4164
3835
  /** `schedule` kind: always present. `github` kind: absent. */
4165
3836
  trackerTrigger: trackerTriggerSchema.optional(),
@@ -4168,38 +3839,38 @@ var automationDefinitionSchema = z23.object({
4168
3839
  // Composer-deferred tasks retain the full run dispatch intent. Keep this response-only:
4169
3840
  // ordinary automation inputs and templates still expose only their own dispatch settings.
4170
3841
  task: automationTaskSchema.extend({
4171
- dispatch: z23.object({ ...dispatchIntentSchema.shape, ...automationDispatchSchema.shape }).optional()
3842
+ dispatch: z22.object({ ...dispatchIntentSchema.shape, ...automationDispatchSchema.shape }).optional()
4172
3843
  }),
4173
3844
  deferredStart: deferredStartStateSchema.optional(),
4174
- createdAt: z23.string(),
4175
- updatedAt: z23.string()
3845
+ createdAt: z22.string(),
3846
+ updatedAt: z22.string()
4176
3847
  });
4177
- var automationCursorSchema = z23.object({
4178
- timestamp: z23.string(),
4179
- tieBreaker: z23.string().optional()
3848
+ var automationCursorSchema = z22.object({
3849
+ timestamp: z22.string(),
3850
+ tieBreaker: z22.string().optional()
4180
3851
  });
4181
- var automationRuntimeStateSchema = z23.object({
3852
+ var automationRuntimeStateSchema = z22.object({
4182
3853
  /** The definition revision this state belongs to; a bumped revision re-baselines. */
4183
- revision: z23.number().optional(),
3854
+ revision: z22.number().optional(),
4184
3855
  /** Enabling establishes a CURRENT-TIME baseline: records older than this never launch. */
4185
- baselineAt: z23.string().optional(),
3856
+ baselineAt: z22.string().optional(),
4186
3857
  cursor: automationCursorSchema.optional(),
4187
- checkpoint: z23.string().optional(),
4188
- frozenHighWatermark: automationCursorSchema.extend({ tieBreaker: z23.string() }).optional(),
4189
- backlogAfter: automationCursorSchema.extend({ tieBreaker: z23.string() }).optional(),
3858
+ checkpoint: z22.string().optional(),
3859
+ frozenHighWatermark: automationCursorSchema.extend({ tieBreaker: z22.string() }).optional(),
3860
+ backlogAfter: automationCursorSchema.extend({ tieBreaker: z22.string() }).optional(),
4190
3861
  /** The cursor a widening re-poll could not get past even at the search ceiling (#982). */
4191
3862
  pinnedCursor: automationCursorSchema.optional(),
4192
- nextCheckAt: z23.string().optional(),
4193
- lastSuccessAt: z23.string().optional(),
3863
+ nextCheckAt: z22.string().optional(),
3864
+ lastSuccessAt: z22.string().optional(),
4194
3865
  /** `schedule` kind: the next occurrence's instant and the last fired one's. */
4195
- nextRunAt: z23.string().optional(),
4196
- lastRunAt: z23.string().optional(),
3866
+ nextRunAt: z22.string().optional(),
3867
+ lastRunAt: z22.string().optional(),
4197
3868
  /** Per-query GitHub ETags, so an unchanged page costs no rate-limit budget. */
4198
- etags: z23.record(z23.string(), z23.string()).optional(),
4199
- backoffUntil: z23.string().optional(),
4200
- consecutiveFailures: z23.number().optional()
3869
+ etags: z22.record(z22.string(), z22.string()).optional(),
3870
+ backoffUntil: z22.string().optional(),
3871
+ consecutiveFailures: z22.number().optional()
4201
3872
  });
4202
- var automationLogResultSchema = z23.enum([
3873
+ var automationLogResultSchema = z22.enum([
4203
3874
  "launched",
4204
3875
  "no-match",
4205
3876
  "duplicate",
@@ -4214,41 +3885,41 @@ var automationLogResultSchema = z23.enum([
4214
3885
  "skipped",
4215
3886
  "failed"
4216
3887
  ]);
4217
- var automationLogRecordSchema = z23.object({
4218
- seq: z23.number(),
4219
- ts: z23.string(),
4220
- automationId: z23.string(),
4221
- revision: z23.number(),
4222
- event: z23.union([automationEventSchema, trackerAutomationEventSchema]).optional(),
3888
+ var automationLogRecordSchema = z22.object({
3889
+ seq: z22.number(),
3890
+ ts: z22.string(),
3891
+ automationId: z22.string(),
3892
+ revision: z22.number(),
3893
+ event: z22.union([automationEventSchema, trackerAutomationEventSchema]).optional(),
4223
3894
  result: automationLogResultSchema,
4224
- reason: z23.string().optional(),
4225
- durationMs: z23.number().optional(),
4226
- receiptId: z23.string().optional(),
4227
- runId: z23.string().optional(),
4228
- trackerKey: z23.string().optional(),
4229
- trackerTitle: z23.string().optional(),
4230
- trackerUrl: z23.string().optional(),
4231
- githubNumber: z23.number().optional(),
4232
- githubTitle: z23.string().optional(),
4233
- githubUrl: z23.string().optional(),
4234
- rateLimit: z23.object({
4235
- bucket: z23.enum(["core", "search"]),
4236
- remaining: z23.number().optional(),
4237
- resetAt: z23.string().optional()
3895
+ reason: z22.string().optional(),
3896
+ durationMs: z22.number().optional(),
3897
+ receiptId: z22.string().optional(),
3898
+ runId: z22.string().optional(),
3899
+ trackerKey: z22.string().optional(),
3900
+ trackerTitle: z22.string().optional(),
3901
+ trackerUrl: z22.string().optional(),
3902
+ githubNumber: z22.number().optional(),
3903
+ githubTitle: z22.string().optional(),
3904
+ githubUrl: z22.string().optional(),
3905
+ rateLimit: z22.object({
3906
+ bucket: z22.enum(["core", "search"]),
3907
+ remaining: z22.number().optional(),
3908
+ resetAt: z22.string().optional()
4238
3909
  }).optional()
4239
3910
  });
4240
- var automationCountsSchema = z23.object({
4241
- matches: z23.number(),
4242
- launched: z23.number(),
4243
- duplicates: z23.number(),
4244
- errors: z23.number()
3911
+ var automationCountsSchema = z22.object({
3912
+ matches: z22.number(),
3913
+ launched: z22.number(),
3914
+ duplicates: z22.number(),
3915
+ errors: z22.number()
4245
3916
  });
4246
- var automationLastRunSchema = z23.object({
4247
- runId: z23.string(),
3917
+ var automationLastRunSchema = z22.object({
3918
+ runId: z22.string(),
4248
3919
  status: runStatusSchema,
4249
3920
  /** When the log recorded the launch. */
4250
- ts: z23.string(),
4251
- costUsd: z23.number().optional()
3921
+ ts: z22.string(),
3922
+ costUsd: z22.number().optional()
4252
3923
  });
4253
3924
  var automationListEntrySchema = automationDefinitionSchema.extend({
4254
3925
  state: automationRuntimeStateSchema.optional(),
@@ -4256,116 +3927,116 @@ var automationListEntrySchema = automationDefinitionSchema.extend({
4256
3927
  counts: automationCountsSchema,
4257
3928
  /** When it fires next: `state.nextRunAt` for a schedule, `state.nextCheckAt` for a poll;
4258
3929
  * absent while paused or never armed. */
4259
- nextRunAt: z23.string().optional(),
3930
+ nextRunAt: z22.string().optional(),
4260
3931
  lastRun: automationLastRunSchema.optional(),
4261
3932
  /** Launches in the last 7 × 24 h, from the log. */
4262
- runs7d: z23.number(),
3933
+ runs7d: z22.number(),
4263
3934
  /** Spend of the runs launched in the last 7 × 24 h; absent when `capabilities.costMetrics` is off. */
4264
- costUsd7d: z23.number().optional()
3935
+ costUsd7d: z22.number().optional()
4265
3936
  });
4266
- var automationStatsSchema = z23.object({
4267
- runs: z23.number(),
4268
- failed: z23.number(),
4269
- agentSeconds: z23.number(),
3937
+ var automationStatsSchema = z22.object({
3938
+ runs: z22.number(),
3939
+ failed: z22.number(),
3940
+ agentSeconds: z22.number(),
4270
3941
  /** Absent when `capabilities.costMetrics` is off. */
4271
- costUsd: z23.number().optional()
4272
- });
4273
- var automationsResponseSchema = z23.object({
4274
- available: z23.boolean(),
4275
- reason: z23.string().optional(),
4276
- scheduler: z23.object({
4277
- state: z23.enum(["scheduled", "idle"]),
4278
- nextDue: z23.string().optional()
3942
+ costUsd: z22.number().optional()
3943
+ });
3944
+ var automationsResponseSchema = z22.object({
3945
+ available: z22.boolean(),
3946
+ reason: z22.string().optional(),
3947
+ scheduler: z22.object({
3948
+ state: z22.enum(["scheduled", "idle"]),
3949
+ nextDue: z22.string().optional()
4279
3950
  }),
4280
3951
  /** The server's IANA zone — what every schedule is evaluated in and every time is shown in. */
4281
- timeZone: z23.string(),
3952
+ timeZone: z22.string(),
4282
3953
  stats: automationStatsSchema,
4283
- automations: z23.array(automationListEntrySchema)
3954
+ automations: z22.array(automationListEntrySchema)
4284
3955
  });
4285
- var automationResponseSchema = z23.object({ automation: automationDefinitionSchema });
4286
- var automationDetailResponseSchema = z23.object({
3956
+ var automationResponseSchema = z22.object({ automation: automationDefinitionSchema });
3957
+ var automationDetailResponseSchema = z22.object({
4287
3958
  automation: automationDefinitionSchema,
4288
3959
  state: automationRuntimeStateSchema.optional(),
4289
3960
  latestLog: automationLogRecordSchema.optional()
4290
3961
  });
4291
- var automationCheckSchema = z23.object({
4292
- id: z23.string(),
4293
- automationId: z23.string(),
4294
- mode: z23.enum(["preview", "execute"]),
4295
- status: z23.enum(["queued", "running", "complete", "error"]),
4296
- createdAt: z23.string(),
4297
- completedAt: z23.string().optional(),
4298
- matches: z23.number().optional(),
4299
- truncated: z23.boolean().optional(),
4300
- error: z23.string().optional()
4301
- });
4302
- var automationCheckQueuedResponseSchema = z23.object({ checkId: z23.string() });
4303
- var automationLogRunSchema = z23.object({
4304
- title: z23.string(),
3962
+ var automationCheckSchema = z22.object({
3963
+ id: z22.string(),
3964
+ automationId: z22.string(),
3965
+ mode: z22.enum(["preview", "execute"]),
3966
+ status: z22.enum(["queued", "running", "complete", "error"]),
3967
+ createdAt: z22.string(),
3968
+ completedAt: z22.string().optional(),
3969
+ matches: z22.number().optional(),
3970
+ truncated: z22.boolean().optional(),
3971
+ error: z22.string().optional()
3972
+ });
3973
+ var automationCheckQueuedResponseSchema = z22.object({ checkId: z22.string() });
3974
+ var automationLogRunSchema = z22.object({
3975
+ title: z22.string(),
4305
3976
  status: runStatusSchema,
4306
- costUsd: z23.number().optional(),
4307
- children: z23.array(z23.object({
4308
- runId: z23.string(),
3977
+ costUsd: z22.number().optional(),
3978
+ children: z22.array(z22.object({
3979
+ runId: z22.string(),
4309
3980
  kind: dispatchKindSchema.optional(),
4310
- title: z23.string(),
3981
+ title: z22.string(),
4311
3982
  status: runStatusSchema,
4312
- costUsd: z23.number().optional()
3983
+ costUsd: z22.number().optional()
4313
3984
  }))
4314
3985
  });
4315
- var automationLogResponseSchema = z23.object({
4316
- records: z23.array(automationLogRecordSchema),
3986
+ var automationLogResponseSchema = z22.object({
3987
+ records: z22.array(automationLogRecordSchema),
4317
3988
  /** Keyed by every `runId` the records name. */
4318
- runs: z23.record(z23.string(), automationLogRunSchema)
3989
+ runs: z22.record(z22.string(), automationLogRunSchema)
4319
3990
  });
4320
- var automationRetryResponseSchema = z23.object({
4321
- receiptId: z23.string(),
4322
- runId: z23.string()
3991
+ var automationRetryResponseSchema = z22.object({
3992
+ receiptId: z22.string(),
3993
+ runId: z22.string()
4323
3994
  });
4324
- var automationRunResponseSchema = z23.object({ runId: z23.string() });
4325
- var automationTemplateSchema = z23.object({
4326
- project: z23.object({ id: z23.string(), name: z23.string() }),
4327
- id: z23.string(),
4328
- name: z23.string(),
3995
+ var automationRunResponseSchema = z22.object({ runId: z22.string() });
3996
+ var automationTemplateSchema = z22.object({
3997
+ project: z22.object({ id: z22.string(), name: z22.string() }),
3998
+ id: z22.string(),
3999
+ name: z22.string(),
4329
4000
  /** Not `automationKindSchema`: a template is only ever used to PRE-FILL the create form, which
4330
4001
  * does not accept `tracker` (2026-09-19) — see `createAutomationInputSchema`. The server never
4331
4002
  * offers a tracker automation as a template (`automationTemplatesOf` skips it). */
4332
- kind: z23.enum(["github", "schedule"]),
4003
+ kind: z22.enum(["github", "schedule"]),
4333
4004
  trackerTrigger: trackerTriggerSchema.optional(),
4334
4005
  schedule: automationScheduleSchema.optional(),
4335
4006
  schedules: automationSchedulesSchema.optional(),
4336
- events: z23.array(automationEventSchema).optional(),
4337
- intervalSeconds: z23.number().optional(),
4007
+ events: z22.array(automationEventSchema).optional(),
4008
+ intervalSeconds: z22.number().optional(),
4338
4009
  /** `github` kind only. A copy without them would launch for every item. */
4339
4010
  filters: automationFiltersSchema.optional(),
4340
- task: z23.object({
4341
- prompt: z23.string(),
4342
- workflow: z23.string().optional(),
4011
+ task: z22.object({
4012
+ prompt: z22.string(),
4013
+ workflow: z22.string().optional(),
4343
4014
  steps: automationTaskSchema.shape.steps,
4344
- runner: z23.string().optional(),
4345
- model: z23.string().optional(),
4346
- autonomous: z23.boolean().optional(),
4015
+ runner: z22.string().optional(),
4016
+ model: z22.string().optional(),
4017
+ autonomous: z22.boolean().optional(),
4347
4018
  dispatch: automationDispatchSchema.optional(),
4348
4019
  checkout: automationTaskSchema.shape.checkout,
4349
4020
  allowForkHeads: automationTaskSchema.shape.allowForkHeads
4350
4021
  })
4351
4022
  });
4352
- var automationTemplatesResponseSchema = z23.object({
4353
- templates: z23.array(automationTemplateSchema)
4023
+ var automationTemplatesResponseSchema = z22.object({
4024
+ templates: z22.array(automationTemplateSchema)
4354
4025
  });
4355
4026
  var createAutomationInputSchema = automationDefinitionSchema.omit({ id: true, revision: true, createdAt: true, updatedAt: true, enabled: true, kind: true, deferredStart: true }).extend({
4356
4027
  task: automationTaskSchema,
4357
4028
  /** Omitted = `github`, the shape every pre-schedule client sends. */
4358
4029
  kind: automationKindSchema.optional(),
4359
- enable: z23.boolean().optional()
4030
+ enable: z22.boolean().optional()
4360
4031
  });
4361
4032
  var updateAutomationInputSchema = createAutomationInputSchema.omit({ enable: true }).extend({
4362
- enabled: z23.boolean().optional(),
4363
- expectedRevision: z23.number()
4033
+ enabled: z22.boolean().optional(),
4034
+ expectedRevision: z22.number()
4364
4035
  });
4365
- var automationCheckInputSchema = z23.object({
4366
- mode: z23.enum(["preview", "execute"])
4036
+ var automationCheckInputSchema = z22.object({
4037
+ mode: z22.enum(["preview", "execute"])
4367
4038
  });
4368
- var dashboardAutomationsQuerySchema = z23.object({ projectId: z23.string().min(1).max(200) });
4039
+ var dashboardAutomationsQuerySchema = z22.object({ projectId: z22.string().min(1).max(200) });
4369
4040
  var dashboardAutomationSchema = automationListEntrySchema.pick({
4370
4041
  id: true,
4371
4042
  name: true,
@@ -4375,24 +4046,24 @@ var dashboardAutomationSchema = automationListEntrySchema.pick({
4375
4046
  }).extend({
4376
4047
  state: automationRuntimeStateSchema.pick({ backoffUntil: true, consecutiveFailures: true }).optional()
4377
4048
  });
4378
- var dashboardAutomationsSchema = z23.object({
4379
- timeZone: z23.string(),
4380
- automations: z23.array(dashboardAutomationSchema)
4049
+ var dashboardAutomationsSchema = z22.object({
4050
+ timeZone: z22.string(),
4051
+ automations: z22.array(dashboardAutomationSchema)
4381
4052
  });
4382
4053
 
4383
4054
  // ../contract/src/dashboard.ts
4384
- import { z as z24 } from "zod";
4385
- var count2 = z24.number().int().nonnegative();
4386
- var iso = z24.iso.datetime();
4055
+ import { z as z23 } from "zod";
4056
+ var count2 = z23.number().int().nonnegative();
4057
+ var iso = z23.iso.datetime();
4387
4058
  var dashboardTaskRowSchema = runIndexEntrySchema.omit({ usage: true });
4388
- var dashboardProjectCoverageSchema = z24.object({
4389
- projectId: z24.string(),
4390
- state: z24.enum(["complete", "partial", "unavailable"]),
4059
+ var dashboardProjectCoverageSchema = z23.object({
4060
+ projectId: z23.string(),
4061
+ state: z23.enum(["complete", "partial", "unavailable"]),
4391
4062
  omittedRuns: count2,
4392
- reason: z24.string().optional()
4063
+ reason: z23.string().optional()
4393
4064
  });
4394
- var dashboardCoverageSchema = z24.object({ projects: z24.array(dashboardProjectCoverageSchema) });
4395
- var dashboardCountsSchema = z24.object({
4065
+ var dashboardCoverageSchema = z23.object({ projects: z23.array(dashboardProjectCoverageSchema) });
4066
+ var dashboardCountsSchema = z23.object({
4396
4067
  running: count2,
4397
4068
  monitoring: count2,
4398
4069
  questions: count2,
@@ -4400,9 +4071,9 @@ var dashboardCountsSchema = z24.object({
4400
4071
  queued: count2,
4401
4072
  scheduled: count2
4402
4073
  });
4403
- var dashboardPageSchema = z24.object({ rows: z24.array(dashboardTaskRowSchema).max(20), total: count2, nextOffset: count2.nullable() });
4404
- var dashboardSnapshotSchema = z24.object({
4405
- snapshotId: z24.string().min(1),
4074
+ var dashboardPageSchema = z23.object({ rows: z23.array(dashboardTaskRowSchema).max(20), total: count2, nextOffset: count2.nullable() });
4075
+ var dashboardSnapshotSchema = z23.object({
4076
+ snapshotId: z23.string().min(1),
4406
4077
  asOf: iso,
4407
4078
  expiresAt: iso,
4408
4079
  coverage: dashboardCoverageSchema,
@@ -4410,178 +4081,178 @@ var dashboardSnapshotSchema = z24.object({
4410
4081
  questions: dashboardPageSchema,
4411
4082
  reviews: dashboardPageSchema
4412
4083
  });
4413
- var dashboardGroupSchema = z24.enum(["running", "queued", "scheduled", "questions", "reviews", "needs-you"]);
4414
- var dashboardTasksQuerySchema = z24.object({
4415
- snapshotId: z24.string().min(1).max(128),
4084
+ var dashboardGroupSchema = z23.enum(["running", "queued", "scheduled", "questions", "reviews", "needs-you"]);
4085
+ var dashboardTasksQuerySchema = z23.object({
4086
+ snapshotId: z23.string().min(1).max(128),
4416
4087
  group: dashboardGroupSchema,
4417
- offset: z24.coerce.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).default(0),
4418
- limit: z24.coerce.number().int().min(1).max(20).default(20)
4088
+ offset: z23.coerce.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).default(0),
4089
+ limit: z23.coerce.number().int().min(1).max(20).default(20)
4419
4090
  });
4420
- var dashboardTasksPageSchema = z24.object({
4421
- snapshotId: z24.string(),
4091
+ var dashboardTasksPageSchema = z23.object({
4092
+ snapshotId: z23.string(),
4422
4093
  asOf: iso,
4423
4094
  coverage: dashboardCoverageSchema,
4424
4095
  page: dashboardPageSchema
4425
4096
  });
4426
- var dashboardSnapshotExpiredSchema = z24.object({ error: z24.literal("Dashboard changed; refresh the list"), code: z24.literal("snapshot-expired") });
4427
- var dashboardTelemetrySampleSchema = z24.object({
4428
- projectId: z24.string(),
4429
- runId: z24.string(),
4097
+ var dashboardSnapshotExpiredSchema = z23.object({ error: z23.literal("Dashboard changed; refresh the list"), code: z23.literal("snapshot-expired") });
4098
+ var dashboardTelemetrySampleSchema = z23.object({
4099
+ projectId: z23.string(),
4100
+ runId: z23.string(),
4430
4101
  sampledAt: iso,
4431
- cpuPct: z24.number().nonnegative().nullable(),
4102
+ cpuPct: z23.number().nonnegative().nullable(),
4432
4103
  rssBytes: count2,
4433
4104
  procCount: count2
4434
4105
  });
4435
- var dashboardTelemetrySchema = z24.object({ asOf: iso, samples: z24.array(dashboardTelemetrySampleSchema) });
4436
- var dashboardTaskResultSchema = z24.object({ kind: z24.literal("task-result"), key: z24.string().min(1), at: iso, run: dashboardTaskRowSchema });
4437
- var dashboardForgeCreatedSchema = z24.object({
4438
- kind: z24.literal("github-created"),
4439
- key: z24.string().min(1),
4106
+ var dashboardTelemetrySchema = z23.object({ asOf: iso, samples: z23.array(dashboardTelemetrySampleSchema) });
4107
+ var dashboardTaskResultSchema = z23.object({ kind: z23.literal("task-result"), key: z23.string().min(1), at: iso, run: dashboardTaskRowSchema });
4108
+ var dashboardForgeCreatedSchema = z23.object({
4109
+ kind: z23.literal("github-created"),
4110
+ key: z23.string().min(1),
4440
4111
  at: iso,
4441
- repo: z24.string(),
4442
- projectIds: z24.array(z24.string()),
4443
- itemKind: z24.enum(["issue", "pr"]),
4444
- number: z24.number().int().positive(),
4445
- title: z24.string(),
4446
- url: z24.url().refine((s) => /^https?:\/\//.test(s), "Expected an HTTP(S) URL")
4112
+ repo: z23.string(),
4113
+ projectIds: z23.array(z23.string()),
4114
+ itemKind: z23.enum(["issue", "pr"]),
4115
+ number: z23.number().int().positive(),
4116
+ title: z23.string(),
4117
+ url: z23.url().refine((s) => /^https?:\/\//.test(s), "Expected an HTTP(S) URL")
4447
4118
  });
4448
- var dashboardFeedRowSchema = z24.discriminatedUnion("kind", [dashboardTaskResultSchema, dashboardForgeCreatedSchema]);
4449
- var dashboardFeedSourceSchema = z24.object({
4450
- key: z24.string().min(1),
4451
- state: z24.enum(["ready", "stale", "unavailable"]),
4119
+ var dashboardFeedRowSchema = z23.discriminatedUnion("kind", [dashboardTaskResultSchema, dashboardForgeCreatedSchema]);
4120
+ var dashboardFeedSourceSchema = z23.object({
4121
+ key: z23.string().min(1),
4122
+ state: z23.enum(["ready", "stale", "unavailable"]),
4452
4123
  fetchedAt: iso.optional(),
4453
- truncated: z24.boolean(),
4454
- reason: z24.string().optional()
4124
+ truncated: z23.boolean(),
4125
+ reason: z23.string().optional()
4455
4126
  });
4456
- var dashboardFeedFilterSchema = z24.enum(["all", "tasks", "github"]);
4457
- var dashboardFeedQuerySchema = z24.object({ filter: dashboardFeedFilterSchema.default("all") });
4458
- var dashboardFeedSchema = z24.object({
4127
+ var dashboardFeedFilterSchema = z23.enum(["all", "tasks", "github"]);
4128
+ var dashboardFeedQuerySchema = z23.object({ filter: dashboardFeedFilterSchema.default("all") });
4129
+ var dashboardFeedSchema = z23.object({
4459
4130
  asOf: iso,
4460
4131
  windowStart: iso,
4461
4132
  filter: dashboardFeedFilterSchema,
4462
- rows: z24.array(dashboardFeedRowSchema).max(60),
4463
- sources: z24.array(dashboardFeedSourceSchema),
4133
+ rows: z23.array(dashboardFeedRowSchema).max(60),
4134
+ sources: z23.array(dashboardFeedSourceSchema),
4464
4135
  coverage: dashboardCoverageSchema,
4465
- truncated: z24.boolean()
4136
+ truncated: z23.boolean()
4466
4137
  });
4467
- var dashboardWorkspaceUsageSchema = z24.object({
4468
- project: z24.string(),
4469
- usage: z24.record(z24.string(), processUsageSchema),
4470
- samples: z24.array(dashboardTelemetrySampleSchema).optional(),
4138
+ var dashboardWorkspaceUsageSchema = z23.object({
4139
+ project: z23.string(),
4140
+ usage: z23.record(z23.string(), processUsageSchema),
4141
+ samples: z23.array(dashboardTelemetrySampleSchema).optional(),
4471
4142
  sentAt: iso.optional()
4472
4143
  });
4473
4144
 
4474
4145
  // ../contract/src/dashboard-costs.ts
4475
- import { z as z25 } from "zod";
4476
- var count3 = z25.number().int().nonnegative();
4477
- var amount = z25.number().finite().nonnegative();
4478
- var dashboardCostPeriodSchema = z25.enum(["all", "7d", "30d"]);
4479
- var dashboardCostSortSchema = z25.enum(["cost", "input", "output"]);
4480
- var dashboardCostVisibilitySchema = z25.object({
4481
- tokens: z25.boolean(),
4482
- cost: z25.boolean()
4483
- });
4484
- var dashboardCostMetricSchema = z25.object({
4146
+ import { z as z24 } from "zod";
4147
+ var count3 = z24.number().int().nonnegative();
4148
+ var amount = z24.number().finite().nonnegative();
4149
+ var dashboardCostPeriodSchema = z24.enum(["all", "7d", "30d"]);
4150
+ var dashboardCostSortSchema = z24.enum(["cost", "input", "output"]);
4151
+ var dashboardCostVisibilitySchema = z24.object({
4152
+ tokens: z24.boolean(),
4153
+ cost: z24.boolean()
4154
+ });
4155
+ var dashboardCostMetricSchema = z24.object({
4485
4156
  value: amount.nullable(),
4486
4157
  reportedTasks: count3
4487
4158
  });
4488
- var dashboardCostTotalsSchema = z25.object({
4159
+ var dashboardCostTotalsSchema = z24.object({
4489
4160
  tasks: count3,
4490
4161
  inputTokens: dashboardCostMetricSchema.optional(),
4491
4162
  outputTokens: dashboardCostMetricSchema.optional(),
4492
4163
  costUsd: dashboardCostMetricSchema.optional()
4493
4164
  });
4494
- var dashboardCostTaskSchema = z25.object({
4495
- projectId: z25.string(),
4496
- id: z25.string(),
4497
- title: z25.string(),
4165
+ var dashboardCostTaskSchema = z24.object({
4166
+ projectId: z24.string(),
4167
+ id: z24.string(),
4168
+ title: z24.string(),
4498
4169
  status: runStatusSchema,
4499
4170
  /** Carried so a `failed` run still awaiting an answer reads as "needs you" here too — and so
4500
4171
  * reconciling the dashboard's live overlay from cost rows never erases it. */
4501
- awaitingAnswerSince: z25.string().optional(),
4502
- archived: z25.boolean(),
4503
- subtask: z25.boolean(),
4504
- createdAt: z25.string(),
4505
- startedAt: z25.string().optional(),
4506
- finishedAt: z25.string().optional(),
4172
+ awaitingAnswerSince: z24.string().optional(),
4173
+ archived: z24.boolean(),
4174
+ subtask: z24.boolean(),
4175
+ createdAt: z24.string(),
4176
+ startedAt: z24.string().optional(),
4177
+ finishedAt: z24.string().optional(),
4507
4178
  inputTokens: amount.optional(),
4508
4179
  outputTokens: amount.optional(),
4509
4180
  costUsd: amount.optional()
4510
4181
  });
4511
- var dashboardCostSeriesPointSchema = z25.object({
4512
- date: z25.string(),
4182
+ var dashboardCostSeriesPointSchema = z24.object({
4183
+ date: z24.string(),
4513
4184
  tasks: count3,
4514
4185
  inputTokens: dashboardCostMetricSchema.optional(),
4515
4186
  outputTokens: dashboardCostMetricSchema.optional(),
4516
4187
  costUsd: dashboardCostMetricSchema.optional(),
4517
4188
  completed: count3,
4518
4189
  cycleReportedTasks: count3.optional(),
4519
- avgCycleHours: z25.number().finite().nonnegative().nullable(),
4520
- medianCycleHours: z25.number().finite().nonnegative().nullable()
4190
+ avgCycleHours: z24.number().finite().nonnegative().nullable(),
4191
+ medianCycleHours: z24.number().finite().nonnegative().nullable()
4521
4192
  });
4522
4193
  var dashboardCostProjectSchema = dashboardCostTotalsSchema.extend({
4523
- projectId: z25.string()
4194
+ projectId: z24.string()
4524
4195
  });
4525
- var dashboardCostsQuerySchema = z25.object({
4196
+ var dashboardCostsQuerySchema = z24.object({
4526
4197
  period: dashboardCostPeriodSchema.default("all"),
4527
4198
  sort: dashboardCostSortSchema.default("cost"),
4528
- projectId: z25.string().min(1).max(128).optional(),
4529
- snapshotId: z25.string().min(1).max(128).optional(),
4199
+ projectId: z24.string().min(1).max(128).optional(),
4200
+ snapshotId: z24.string().min(1).max(128).optional(),
4530
4201
  /** `Date.prototype.getTimezoneOffset()` from the requesting browser — the day boundaries for
4531
4202
  * `series` follow the viewer's local calendar, not UTC. Absent (older clients, tests) buckets
4532
4203
  * in UTC. */
4533
- tzOffsetMinutes: z25.coerce.number().int().min(-840).max(720).optional(),
4534
- offset: z25.coerce.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).default(0),
4535
- limit: z25.coerce.number().int().min(1).max(20).default(20)
4204
+ tzOffsetMinutes: z24.coerce.number().int().min(-840).max(720).optional(),
4205
+ offset: z24.coerce.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).default(0),
4206
+ limit: z24.coerce.number().int().min(1).max(20).default(20)
4536
4207
  });
4537
- var dashboardCostsSchema = z25.object({
4538
- snapshotId: z25.string().min(1),
4539
- asOf: z25.iso.datetime(),
4540
- expiresAt: z25.iso.datetime(),
4541
- scope: z25.literal("retained-task-lifetime"),
4208
+ var dashboardCostsSchema = z24.object({
4209
+ snapshotId: z24.string().min(1),
4210
+ asOf: z24.iso.datetime(),
4211
+ expiresAt: z24.iso.datetime(),
4212
+ scope: z24.literal("retained-task-lifetime"),
4542
4213
  period: dashboardCostPeriodSchema,
4543
- windowStart: z25.iso.datetime().nullable(),
4214
+ windowStart: z24.iso.datetime().nullable(),
4544
4215
  /** Captured calendar offset; optional for clients reading older servers. */
4545
- tzOffsetMinutes: z25.number().int().min(-840).max(720).optional(),
4216
+ tzOffsetMinutes: z24.number().int().min(-840).max(720).optional(),
4546
4217
  sort: dashboardCostSortSchema,
4547
4218
  visibility: dashboardCostVisibilitySchema,
4548
4219
  coverage: dashboardCoverageSchema,
4549
4220
  invalidDateTasks: count3,
4550
4221
  totals: dashboardCostTotalsSchema,
4551
- series: z25.array(dashboardCostSeriesPointSchema).max(31),
4552
- projects: z25.array(dashboardCostProjectSchema),
4553
- tasks: z25.object({
4554
- rows: z25.array(dashboardCostTaskSchema).max(20),
4222
+ series: z24.array(dashboardCostSeriesPointSchema).max(31),
4223
+ projects: z24.array(dashboardCostProjectSchema),
4224
+ tasks: z24.object({
4225
+ rows: z24.array(dashboardCostTaskSchema).max(20),
4555
4226
  total: count3,
4556
4227
  nextOffset: count3.nullable()
4557
4228
  })
4558
4229
  });
4559
4230
 
4560
4231
  // ../contract/src/dashboard-overview.ts
4561
- import { z as z26 } from "zod";
4562
- var count4 = z26.number().int().nonnegative();
4563
- var dashboardOverviewGroupSchema = z26.enum([
4232
+ import { z as z25 } from "zod";
4233
+ var count4 = z25.number().int().nonnegative();
4234
+ var dashboardOverviewGroupSchema = z25.enum([
4564
4235
  "running",
4565
4236
  "needs-you",
4566
4237
  "completed",
4567
4238
  "failed"
4568
4239
  ]);
4569
- var dashboardOverviewQuerySchema = z26.object({
4570
- period: z26.enum(["7d", "30d"]).default("7d"),
4571
- tzOffsetMinutes: z26.coerce.number().int().min(-840).max(720).default(0),
4572
- snapshotId: z26.string().min(1).max(128).optional(),
4573
- projectId: z26.string().min(1).max(128).optional(),
4240
+ var dashboardOverviewQuerySchema = z25.object({
4241
+ period: z25.enum(["7d", "30d"]).default("7d"),
4242
+ tzOffsetMinutes: z25.coerce.number().int().min(-840).max(720).default(0),
4243
+ snapshotId: z25.string().min(1).max(128).optional(),
4244
+ projectId: z25.string().min(1).max(128).optional(),
4574
4245
  group: dashboardOverviewGroupSchema.default("completed"),
4575
- offset: z26.coerce.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).default(0),
4576
- limit: z26.coerce.number().int().min(1).max(20).default(20)
4246
+ offset: z25.coerce.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).default(0),
4247
+ limit: z25.coerce.number().int().min(1).max(20).default(20)
4577
4248
  });
4578
- var dashboardOutcomeMetricsSchema = z26.object({
4249
+ var dashboardOutcomeMetricsSchema = z25.object({
4579
4250
  running: count4,
4580
4251
  needsYou: count4,
4581
4252
  completed: count4,
4582
4253
  failed: count4,
4583
4254
  timedTasks: count4,
4584
- medianCycleHours: z26.number().finite().nonnegative().nullable()
4255
+ medianCycleHours: z25.number().finite().nonnegative().nullable()
4585
4256
  });
4586
4257
  var dashboardOverviewTaskSchema = dashboardTaskRowSchema.pick({
4587
4258
  projectId: true,
@@ -4594,31 +4265,31 @@ var dashboardOverviewTaskSchema = dashboardTaskRowSchema.pick({
4594
4265
  startedAt: true,
4595
4266
  finishedAt: true
4596
4267
  });
4597
- var dashboardOverviewSchema = z26.object({
4598
- snapshotId: z26.string(),
4599
- asOf: z26.iso.datetime(),
4600
- windowStart: z26.iso.datetime(),
4601
- period: z26.enum(["7d", "30d"]),
4268
+ var dashboardOverviewSchema = z25.object({
4269
+ snapshotId: z25.string(),
4270
+ asOf: z25.iso.datetime(),
4271
+ windowStart: z25.iso.datetime(),
4272
+ period: z25.enum(["7d", "30d"]),
4602
4273
  coverage: dashboardCoverageSchema,
4603
4274
  metrics: dashboardOutcomeMetricsSchema,
4604
- projects: z26.array(dashboardOutcomeMetricsSchema.extend({ projectId: z26.string() })),
4605
- page: z26.object({
4606
- rows: z26.array(dashboardOverviewTaskSchema).max(20),
4275
+ projects: z25.array(dashboardOutcomeMetricsSchema.extend({ projectId: z25.string() })),
4276
+ page: z25.object({
4277
+ rows: z25.array(dashboardOverviewTaskSchema).max(20),
4607
4278
  total: count4,
4608
4279
  nextOffset: count4.nullable()
4609
4280
  })
4610
4281
  });
4611
4282
 
4612
4283
  // ../contract/src/dashboard-insights.ts
4613
- import { z as z27 } from "zod";
4614
- var count5 = z27.number().int().nonnegative();
4615
- var iso2 = z27.iso.datetime();
4616
- var dashboardInsightsQuerySchema = z27.object({
4617
- period: z27.enum(["7d", "30d"]).default("7d"),
4284
+ import { z as z26 } from "zod";
4285
+ var count5 = z26.number().int().nonnegative();
4286
+ var iso2 = z26.iso.datetime();
4287
+ var dashboardInsightsQuerySchema = z26.object({
4288
+ period: z26.enum(["7d", "30d"]).default("7d"),
4618
4289
  /** `Date.prototype.getTimezoneOffset()` — the window starts at the viewer's local midnight. */
4619
- tzOffsetMinutes: z27.coerce.number().int().min(-840).max(720).default(0)
4290
+ tzOffsetMinutes: z26.coerce.number().int().min(-840).max(720).default(0)
4620
4291
  });
4621
- var dashboardDeliveredSchema = z27.object({
4292
+ var dashboardDeliveredSchema = z26.object({
4622
4293
  completedTasks: count5,
4623
4294
  /** PRs cezar itself opened for those tasks (`prRefs` origin `created`, or a legacy URL). */
4624
4295
  prsOpened: count5,
@@ -4631,7 +4302,7 @@ var dashboardDeliveredSchema = z27.object({
4631
4302
  /** Completed tasks that carry a stored diff stat — the denominator of the three above. */
4632
4303
  measuredTasks: count5
4633
4304
  });
4634
- var dashboardFailureCategorySchema = z27.enum([
4305
+ var dashboardFailureCategorySchema = z26.enum([
4635
4306
  "usage-limit",
4636
4307
  "auth",
4637
4308
  "agent-unavailable",
@@ -4640,33 +4311,33 @@ var dashboardFailureCategorySchema = z27.enum([
4640
4311
  "git",
4641
4312
  "other"
4642
4313
  ]);
4643
- var dashboardFailureReasonSchema = z27.object({
4314
+ var dashboardFailureReasonSchema = z26.object({
4644
4315
  category: dashboardFailureCategorySchema,
4645
- label: z27.string(),
4316
+ label: z26.string(),
4646
4317
  count: count5,
4647
- latest: z27.object({
4648
- projectId: z27.string(),
4649
- id: z27.string(),
4650
- title: z27.string(),
4318
+ latest: z26.object({
4319
+ projectId: z26.string(),
4320
+ id: z26.string(),
4321
+ title: z26.string(),
4651
4322
  at: iso2,
4652
- step: z27.string().optional(),
4653
- message: z27.string().max(240)
4323
+ step: z26.string().optional(),
4324
+ message: z26.string().max(240)
4654
4325
  })
4655
4326
  });
4656
- var dashboardBackendStatSchema = z27.object({
4657
- backend: z27.string(),
4658
- model: z27.string().optional(),
4327
+ var dashboardBackendStatSchema = z26.object({
4328
+ backend: z26.string(),
4329
+ model: z26.string().optional(),
4659
4330
  finished: count5,
4660
4331
  done: count5,
4661
4332
  failed: count5,
4662
4333
  timedTasks: count5,
4663
- medianCycleHours: z27.number().finite().nonnegative().nullable(),
4334
+ medianCycleHours: z26.number().finite().nonnegative().nullable(),
4664
4335
  /** Omitted when workspace settings hide cost. */
4665
4336
  costUsd: dashboardCostMetricSchema.optional()
4666
4337
  });
4667
- var dashboardAutomationStatSchema = z27.object({
4668
- projectId: z27.string(),
4669
- automationId: z27.string(),
4338
+ var dashboardAutomationStatSchema = z26.object({
4339
+ projectId: z26.string(),
4340
+ automationId: z26.string(),
4670
4341
  tasks: count5,
4671
4342
  done: count5,
4672
4343
  failed: count5,
@@ -4676,52 +4347,52 @@ var dashboardAutomationStatSchema = z27.object({
4676
4347
  lastStatus: runStatusSchema.optional(),
4677
4348
  costUsd: dashboardCostMetricSchema.optional()
4678
4349
  });
4679
- var dashboardInsightsSchema = z27.object({
4350
+ var dashboardInsightsSchema = z26.object({
4680
4351
  asOf: iso2,
4681
4352
  windowStart: iso2,
4682
- period: z27.enum(["7d", "30d"]),
4353
+ period: z26.enum(["7d", "30d"]),
4683
4354
  visibility: dashboardCostVisibilitySchema,
4684
4355
  coverage: dashboardCoverageSchema,
4685
4356
  delivered: dashboardDeliveredSchema,
4686
- failures: z27.object({ total: count5, reasons: z27.array(dashboardFailureReasonSchema).max(8) }),
4687
- backends: z27.array(dashboardBackendStatSchema),
4688
- automations: z27.array(dashboardAutomationStatSchema)
4357
+ failures: z26.object({ total: count5, reasons: z26.array(dashboardFailureReasonSchema).max(8) }),
4358
+ backends: z26.array(dashboardBackendStatSchema),
4359
+ automations: z26.array(dashboardAutomationStatSchema)
4689
4360
  });
4690
4361
 
4691
4362
  // ../contract/src/host.ts
4692
- import { z as z28 } from "zod";
4693
- var hostUsageContainerSchema = z28.object({
4363
+ import { z as z27 } from "zod";
4364
+ var hostUsageContainerSchema = z27.object({
4694
4365
  /** Which hierarchy the numbers came from; a systemd-limited host service is v2 too. */
4695
- source: z28.enum(["cgroup-v2", "cgroup-v1"]),
4366
+ source: z27.enum(["cgroup-v2", "cgroup-v1"]),
4696
4367
  /** Finite `cpu.max`/`cpu.cfs_quota_us` quota in cores; absent when unlimited or unreadable. */
4697
- cpuQuotaCores: z28.number().positive().optional(),
4368
+ cpuQuotaCores: z27.number().positive().optional(),
4698
4369
  /** Finite cpuset pin (`cpuset.cpus.effective`) below the host core count, in cores. */
4699
- cpuAffinityCores: z28.number().positive().optional(),
4370
+ cpuAffinityCores: z27.number().positive().optional(),
4700
4371
  /** Finite memory limit below the host total; a zero limit is not representable and is absent. */
4701
- memLimitBytes: z28.number().positive().optional(),
4372
+ memLimitBytes: z27.number().positive().optional(),
4702
4373
  /** Emitted only WITH `memLimitBytes`, and cache-excluded when `inactive_file` is readable. */
4703
- memUsedBytes: z28.number().nonnegative().optional(),
4374
+ memUsedBytes: z27.number().nonnegative().optional(),
4704
4375
  /** Emitted only with a finite CPU limit; the delta is relative to the effective cores. */
4705
- cpuPct: z28.number().min(0).max(100).optional()
4376
+ cpuPct: z27.number().min(0).max(100).optional()
4706
4377
  });
4707
- var hostUsageSchema = z28.object({
4378
+ var hostUsageSchema = z27.object({
4708
4379
  /** ISO-8601 instant this sample was read (server clock). */
4709
- sampledAt: z28.string(),
4380
+ sampledAt: z27.string(),
4710
4381
  /** Aggregate CPU utilization 0–100 across all cores; absent without a usable delta window. */
4711
- cpuPct: z28.number().min(0).max(100).optional(),
4382
+ cpuPct: z27.number().min(0).max(100).optional(),
4712
4383
  /** Logical cores (`os.availableParallelism()`), always ≥ 1. */
4713
- cpuCount: z28.number().int().positive(),
4714
- memTotalBytes: z28.number().nonnegative(),
4715
- memUsedBytes: z28.number().nonnegative(),
4384
+ cpuCount: z27.number().int().positive(),
4385
+ memTotalBytes: z27.number().nonnegative(),
4386
+ memUsedBytes: z27.number().nonnegative(),
4716
4387
  /** Headroom left for new work: `MemAvailable` on Linux, total minus Activity Monitor's "Memory Used" on macOS. */
4717
- memAvailableBytes: z28.number().nonnegative(),
4718
- swapTotalBytes: z28.number().nonnegative().optional(),
4719
- swapUsedBytes: z28.number().nonnegative().optional(),
4720
- loadAvg: z28.object({ one: z28.number(), five: z28.number(), fifteen: z28.number() }).optional(),
4388
+ memAvailableBytes: z27.number().nonnegative(),
4389
+ swapTotalBytes: z27.number().nonnegative().optional(),
4390
+ swapUsedBytes: z27.number().nonnegative().optional(),
4391
+ loadAvg: z27.object({ one: z27.number(), five: z27.number(), fifteen: z27.number() }).optional(),
4721
4392
  /** The process's own cgroup, when a finite limit exists; absent on a plain host. */
4722
4393
  container: hostUsageContainerSchema.optional(),
4723
4394
  /** `os.cpus().length`, emitted only together with `container` and omitted when 0. */
4724
- hostCpuCount: z28.number().int().positive().optional(),
4395
+ hostCpuCount: z27.number().int().positive().optional(),
4725
4396
  /**
4726
4397
  * Why there is no `container`, when the answer is "unknown" rather than "none":
4727
4398
  * `'unavailable'` means the probe could not read `/proc/self/cgroup` or the mount table at all
@@ -4730,135 +4401,135 @@ var hostUsageSchema = z28.object({
4730
4401
  * pre-container payload says, deliberately, so a plain host stays byte-identical to v1.
4731
4402
  * (`'unconstrained'` is reserved for a future producer that wants to say it explicitly.)
4732
4403
  */
4733
- cgroupProbe: z28.enum(["unavailable", "unconstrained"]).optional()
4404
+ cgroupProbe: z27.enum(["unavailable", "unconstrained"]).optional()
4734
4405
  });
4735
4406
 
4736
4407
  // ../contract/src/self-update.ts
4737
- import { z as z29 } from "zod";
4738
- var updateChannelSchema = z29.enum(["stable", "nightly", "development"]);
4739
- var installKindSchema = z29.enum(["managed", "global-npm", "npx", "checkout", "unknown"]);
4740
- var installedVersionSchema = z29.object({
4741
- id: z29.string(),
4742
- version: z29.string(),
4743
- source: z29.enum(["registry", "local", "link"]),
4744
- installedAt: z29.string(),
4745
- active: z29.boolean(),
4408
+ import { z as z28 } from "zod";
4409
+ var updateChannelSchema = z28.enum(["stable", "nightly", "development"]);
4410
+ var installKindSchema = z28.enum(["managed", "global-npm", "npx", "checkout", "unknown"]);
4411
+ var installedVersionSchema = z28.object({
4412
+ id: z28.string(),
4413
+ version: z28.string(),
4414
+ source: z28.enum(["registry", "local", "link"]),
4415
+ installedAt: z28.string(),
4416
+ active: z28.boolean(),
4746
4417
  /** `link` only: the checkout's branch, and its package root (absent in hosted mode). */
4747
- branch: z29.string().optional(),
4748
- checkout: z29.string().optional()
4418
+ branch: z28.string().optional(),
4419
+ checkout: z28.string().optional()
4749
4420
  });
4750
- var availableVersionSchema = z29.object({
4751
- version: z29.string(),
4752
- channel: z29.enum(["stable", "nightly", "preview"]),
4753
- publishedAt: z29.string().nullable(),
4754
- installed: z29.boolean()
4421
+ var availableVersionSchema = z28.object({
4422
+ version: z28.string(),
4423
+ channel: z28.enum(["stable", "nightly", "preview"]),
4424
+ publishedAt: z28.string().nullable(),
4425
+ installed: z28.boolean()
4755
4426
  });
4756
- var selfUpdateJobStatusSchema = z29.enum(["running", "failed", "restarting"]);
4757
- var selfUpdateJobSchema = z29.object({
4427
+ var selfUpdateJobStatusSchema = z28.enum(["running", "failed", "restarting"]);
4428
+ var selfUpdateJobSchema = z28.object({
4758
4429
  status: selfUpdateJobStatusSchema,
4759
- target: z29.string(),
4760
- startedAt: z29.string(),
4761
- finishedAt: z29.string().nullable(),
4762
- log: z29.array(z29.string()),
4763
- error: z29.string().optional()
4764
- });
4765
- var selfUpdateScheduledSchema = z29.object({
4766
- target: z29.string(),
4767
- requestedAt: z29.string()
4768
- });
4769
- var selfUpdateStatusSchema = z29.object({
4770
- version: z29.string(),
4430
+ target: z28.string(),
4431
+ startedAt: z28.string(),
4432
+ finishedAt: z28.string().nullable(),
4433
+ log: z28.array(z28.string()),
4434
+ error: z28.string().optional()
4435
+ });
4436
+ var selfUpdateScheduledSchema = z28.object({
4437
+ target: z28.string(),
4438
+ requestedAt: z28.string()
4439
+ });
4440
+ var selfUpdateStatusSchema = z28.object({
4441
+ version: z28.string(),
4771
4442
  installKind: installKindSchema,
4772
4443
  /** Absolute entry file the process runs; hosted mode trims it to its basename. */
4773
- entry: z29.string(),
4774
- canSelfUpdate: z29.boolean(),
4444
+ entry: z28.string(),
4445
+ canSelfUpdate: z28.boolean(),
4775
4446
  /** Why `canSelfUpdate` is false, phrased for the dialog. Absent when it is true. */
4776
- reason: z29.string().optional(),
4447
+ reason: z28.string().optional(),
4777
4448
  channel: updateChannelSchema,
4778
4449
  /** How the process will come back: re-exec itself, or exit and let the supervisor (desktop
4779
4450
  * shell, systemd, launchd) relaunch it. */
4780
- restartMode: z29.enum(["reexec", "supervisor"]),
4781
- latest: z29.object({
4782
- stable: z29.string().nullable(),
4783
- nightly: z29.string().nullable()
4451
+ restartMode: z28.enum(["reexec", "supervisor"]),
4452
+ latest: z28.object({
4453
+ stable: z28.string().nullable(),
4454
+ nightly: z28.string().nullable()
4784
4455
  }),
4785
4456
  /** The channel's newest version when it is newer than `version`, else null. */
4786
- updateAvailable: z29.string().nullable(),
4457
+ updateAvailable: z28.string().nullable(),
4787
4458
  /** When the registry was last read successfully; null when it never answered (offline). */
4788
- checkedAt: z29.string().nullable(),
4789
- installed: z29.array(installedVersionSchema),
4790
- available: z29.array(availableVersionSchema),
4459
+ checkedAt: z28.string().nullable(),
4460
+ installed: z28.array(installedVersionSchema),
4461
+ available: z28.array(availableVersionSchema),
4791
4462
  job: selfUpdateJobSchema.nullable(),
4792
4463
  /** "Update when idle": the version this process installs and restarts into as soon as no task
4793
4464
  * is running or queued. In memory only — a restart for any other reason forgets it. */
4794
4465
  scheduled: selfUpdateScheduledSchema.nullable(),
4795
4466
  /** Runs in flight across the workspace — a restart interrupts them (boot recovery re-queues). */
4796
- activeRuns: z29.number().int().min(0)
4467
+ activeRuns: z28.number().int().min(0)
4797
4468
  });
4798
- var selfUpdateApplyRequestSchema = z29.object({
4799
- version: z29.string().min(1).max(64).regex(/^[0-9A-Za-z.+-]+$/, "version must be a plain version string"),
4469
+ var selfUpdateApplyRequestSchema = z28.object({
4470
+ version: z28.string().min(1).max(64).regex(/^[0-9A-Za-z.+-]+$/, "version must be a plain version string"),
4800
4471
  /** Wait until no task is running or queued, then apply (`scheduled` on the status). */
4801
- whenIdle: z29.boolean().optional()
4472
+ whenIdle: z28.boolean().optional()
4802
4473
  }).strict();
4803
- var selfUpdateChannelRequestSchema = z29.object({ channel: updateChannelSchema }).strict();
4804
- var checkoutTaskSchema = z29.object({
4805
- id: z29.string(),
4806
- title: z29.string(),
4807
- status: z29.string()
4808
- });
4809
- var cezarCheckoutSchema = z29.object({
4810
- id: z29.string(),
4811
- branch: z29.string(),
4812
- version: z29.string(),
4813
- worktree: z29.string(),
4814
- built: z29.boolean(),
4815
- linked: z29.boolean(),
4474
+ var selfUpdateChannelRequestSchema = z28.object({ channel: updateChannelSchema }).strict();
4475
+ var checkoutTaskSchema = z28.object({
4476
+ id: z28.string(),
4477
+ title: z28.string(),
4478
+ status: z28.string()
4479
+ });
4480
+ var cezarCheckoutSchema = z28.object({
4481
+ id: z28.string(),
4482
+ branch: z28.string(),
4483
+ version: z28.string(),
4484
+ worktree: z28.string(),
4485
+ built: z28.boolean(),
4486
+ linked: z28.boolean(),
4816
4487
  /** Last commit on the worktree's HEAD; null when git could not say. */
4817
- commit: z29.object({ sha: z29.string(), subject: z29.string(), at: z29.string() }).nullable(),
4488
+ commit: z28.object({ sha: z28.string(), subject: z28.string(), at: z28.string() }).nullable(),
4818
4489
  /** When `dist/index.js` was last written; null when not built. */
4819
- builtAt: z29.string().nullable(),
4490
+ builtAt: z28.string().nullable(),
4820
4491
  /** Built, but the last commit is newer than the build. */
4821
- stale: z29.boolean(),
4492
+ stale: z28.boolean(),
4822
4493
  /** The task that owns this worktree, when it is one of cezar's own. */
4823
4494
  task: checkoutTaskSchema.nullable(),
4824
4495
  /** The open pull request whose head is this branch, when one is known. */
4825
- pr: z29.number().int().nullable()
4826
- });
4827
- var pullBuildSchema = z29.object({
4828
- number: z29.number().int(),
4829
- title: z29.string(),
4830
- author: z29.string().nullable(),
4831
- branch: z29.string(),
4832
- draft: z29.boolean(),
4833
- updatedAt: z29.string(),
4834
- url: z29.string(),
4835
- version: z29.string().nullable(),
4836
- publishedAt: z29.string().nullable(),
4837
- installed: z29.boolean()
4838
- });
4839
- var selfUpdateDevelopmentQuerySchema = z29.object({ refresh: z29.literal("1").optional() }).strict();
4840
- var selfUpdateDevelopmentSchema = z29.object({
4496
+ pr: z28.number().int().nullable()
4497
+ });
4498
+ var pullBuildSchema = z28.object({
4499
+ number: z28.number().int(),
4500
+ title: z28.string(),
4501
+ author: z28.string().nullable(),
4502
+ branch: z28.string(),
4503
+ draft: z28.boolean(),
4504
+ updatedAt: z28.string(),
4505
+ url: z28.string(),
4506
+ version: z28.string().nullable(),
4507
+ publishedAt: z28.string().nullable(),
4508
+ installed: z28.boolean()
4509
+ });
4510
+ var selfUpdateDevelopmentQuerySchema = z28.object({ refresh: z28.literal("1").optional() }).strict();
4511
+ var selfUpdateDevelopmentSchema = z28.object({
4841
4512
  /** Newest commit first. Always empty in hosted mode. */
4842
- checkouts: z29.array(cezarCheckoutSchema),
4843
- pulls: z29.object({
4844
- available: z29.boolean(),
4513
+ checkouts: z28.array(cezarCheckoutSchema),
4514
+ pulls: z28.object({
4515
+ available: z28.boolean(),
4845
4516
  /** Why the list is empty or partial (`gh` missing, offline…). Absent when it is complete. */
4846
- reason: z29.string().optional(),
4847
- repo: z29.string(),
4517
+ reason: z28.string().optional(),
4518
+ repo: z28.string(),
4848
4519
  /** Most recently updated first. */
4849
- items: z29.array(pullBuildSchema)
4520
+ items: z28.array(pullBuildSchema)
4850
4521
  })
4851
4522
  });
4852
4523
 
4853
4524
  // ../contract/src/telemetry.ts
4854
- import { z as z30 } from "zod";
4855
- var telemetryConsentSchema = z30.object({
4856
- consent: z30.enum(["unknown", "granted", "denied"]),
4857
- policyVersion: z30.number().int(),
4858
- blockedBy: z30.enum(["env", "automation"]).nullable(),
4859
- endpoint: z30.string()
4525
+ import { z as z29 } from "zod";
4526
+ var telemetryConsentSchema = z29.object({
4527
+ consent: z29.enum(["unknown", "granted", "denied"]),
4528
+ policyVersion: z29.number().int(),
4529
+ blockedBy: z29.enum(["env", "automation"]).nullable(),
4530
+ endpoint: z29.string()
4860
4531
  });
4861
- var setTelemetryConsentInputSchema = z30.object({ consent: z30.enum(["granted", "denied"]) });
4532
+ var setTelemetryConsentInputSchema = z29.object({ consent: z29.enum(["granted", "denied"]) });
4862
4533
  var TELEMETRY_ROUTE_SEGMENTS = [
4863
4534
  "p",
4864
4535
  "new",
@@ -4901,24 +4572,24 @@ var TELEMETRY_ROUTE_SEGMENTS = [
4901
4572
  "instructions",
4902
4573
  "global-instructions"
4903
4574
  ];
4904
- var telemetryRouteSchema = z30.string().max(64).refine(
4575
+ var telemetryRouteSchema = z29.string().max(64).refine(
4905
4576
  (route) => route.startsWith("/") && route.split("/").slice(1).every(
4906
4577
  (segment, i, all) => segment === "" ? all.length === 1 : segment === ":param" || TELEMETRY_ROUTE_SEGMENTS.includes(segment)
4907
4578
  ),
4908
4579
  { message: "a route shape: known segments and :param only" }
4909
4580
  );
4910
- var telemetryPageInputSchema = z30.object({ route: telemetryRouteSchema });
4911
- var telemetryContextValueSchema = z30.union([z30.string().max(1024), z30.number(), z30.boolean(), z30.null()]);
4912
- var telemetryErrorInputSchema = z30.object({
4913
- type: z30.string().max(128),
4914
- message: z30.string().max(2048),
4915
- stack: z30.string().max(16384).optional(),
4916
- handler: z30.string().max(64).optional(),
4581
+ var telemetryPageInputSchema = z29.object({ route: telemetryRouteSchema });
4582
+ var telemetryContextValueSchema = z29.union([z29.string().max(1024), z29.number(), z29.boolean(), z29.null()]);
4583
+ var telemetryErrorInputSchema = z29.object({
4584
+ type: z29.string().max(128),
4585
+ message: z29.string().max(2048),
4586
+ stack: z29.string().max(16384).optional(),
4587
+ handler: z29.string().max(64).optional(),
4917
4588
  /** Stable machine-readable code, e.g. `chunk_load_failed`. */
4918
- code: z30.string().max(128).optional(),
4589
+ code: z29.string().max(128).optional(),
4919
4590
  /** Custom grouping key, for errors whose stack/message differ per engine. */
4920
- fingerprint: z30.string().max(128).optional(),
4921
- context: z30.record(z30.string().max(64), telemetryContextValueSchema).refine((ctx) => Object.keys(ctx).length <= 32, { message: "at most 32 context keys" }).optional()
4591
+ fingerprint: z29.string().max(128).optional(),
4592
+ context: z29.record(z29.string().max(64), telemetryContextValueSchema).refine((ctx) => Object.keys(ctx).length <= 32, { message: "at most 32 context keys" }).optional()
4922
4593
  });
4923
4594
  var MESSAGE_SURFACES = [
4924
4595
  "new_task",
@@ -4934,11 +4605,11 @@ var MESSAGE_SURFACES = [
4934
4605
  "skills_import",
4935
4606
  "cli"
4936
4607
  ];
4937
- var messageSurfaceSchema = z30.enum(MESSAGE_SURFACES);
4608
+ var messageSurfaceSchema = z29.enum(MESSAGE_SURFACES);
4938
4609
  var ADD_PROJECT_DIALOGS = ["new", "clone", "folder"];
4939
- var addProjectDialogSchema = z30.enum(ADD_PROJECT_DIALOGS);
4610
+ var addProjectDialogSchema = z29.enum(ADD_PROJECT_DIALOGS);
4940
4611
  var ATTACHMENT_COUNT_BUCKETS = ["1", "2-4", "5-10", "11-20"];
4941
- var attachmentCountBucketSchema = z30.enum(ATTACHMENT_COUNT_BUCKETS);
4612
+ var attachmentCountBucketSchema = z29.enum(ATTACHMENT_COUNT_BUCKETS);
4942
4613
  function attachmentCountBucket(count6) {
4943
4614
  if (count6 <= 1) return "1";
4944
4615
  if (count6 <= 4) return "2-4";
@@ -4946,7 +4617,7 @@ function attachmentCountBucket(count6) {
4946
4617
  return "11-20";
4947
4618
  }
4948
4619
  var TASK_ACTION_SURFACES = ["sidebar", "tasks_table", "all_tasks", "task_view", "palette", "shortcut"];
4949
- var taskActionSurfaceSchema = z30.enum(TASK_ACTION_SURFACES);
4620
+ var taskActionSurfaceSchema = z29.enum(TASK_ACTION_SURFACES);
4950
4621
  var TASK_COMMAND_LABELS = [
4951
4622
  "reply",
4952
4623
  "toggle-read",
@@ -4990,7 +4661,7 @@ var TASK_COMMAND_LABELS = [
4990
4661
  "copy:pr",
4991
4662
  "copy:id"
4992
4663
  ];
4993
- var taskCommandLabelSchema = z30.enum(TASK_COMMAND_LABELS);
4664
+ var taskCommandLabelSchema = z29.enum(TASK_COMMAND_LABELS);
4994
4665
  function taskCommandLabel(id2) {
4995
4666
  if (id2.startsWith("tab:")) return "tab";
4996
4667
  if (id2.startsWith("layout:") && id2 !== "layout:new") return "layout";
@@ -5002,279 +4673,598 @@ var TASK_SWITCH_WAYS = ["enter", "cycle", "tab", "cmdk", "cmdk_tab", "arrow"];
5002
4673
  var PALETTE_MODES = ["tasks", "commands", "files", "pr_number", "automation"];
5003
4674
  var PALETTE_DISMISS_VIEWS = ["command", "actions", "tasks", "files"];
5004
4675
  var START_OPTIONS = ["now", "at", "usage_reset"];
5005
- var batchedValue = z30.number().int().min(1).max(1e3).optional();
4676
+ var batchedValue = z29.number().int().min(1).max(1e3).optional();
5006
4677
  var SKILLS_UPDATE_DROP_OUTCOMES = ["recovered", "not_applied", "unreachable", "timed_out"];
5007
- var skillsUpdateDropOutcomeSchema = z30.enum(SKILLS_UPDATE_DROP_OUTCOMES);
5008
- var telemetryEventInputSchema = z30.discriminatedUnion("event", [
5009
- z30.object({ event: z30.literal("message_sent"), label: messageSurfaceSchema.exclude(["cli"]) }),
4678
+ var skillsUpdateDropOutcomeSchema = z29.enum(SKILLS_UPDATE_DROP_OUTCOMES);
4679
+ var telemetryEventInputSchema = z29.discriminatedUnion("event", [
4680
+ z29.object({ event: z29.literal("message_sent"), label: messageSurfaceSchema.exclude(["cli"]) }),
5010
4681
  /** A review comment left on the Changes tab's diff: on one line, or on a selected range. */
5011
- z30.object({ event: z30.literal("diff_comment_added"), label: z30.enum(["single_line", "multi_line"]) }),
4682
+ z29.object({ event: z29.literal("diff_comment_added"), label: z29.enum(["single_line", "multi_line"]) }),
5012
4683
  /** One of the sidebar's "Add project" dialogs was opened: New project, Clone from GitHub, or
5013
4684
  * Open local folder. With `project_added`, the funnel of each add flow. */
5014
- z30.object({ event: z30.literal("add_project_opened"), label: addProjectDialogSchema }),
4685
+ z29.object({ event: z29.literal("add_project_opened"), label: addProjectDialogSchema }),
5015
4686
  /** A sent message carried attachments, bucketed by how many. */
5016
- z30.object({ event: z30.literal("attachments_sent"), label: attachmentCountBucketSchema }),
4687
+ z29.object({ event: z29.literal("attachments_sent"), label: attachmentCountBucketSchema }),
5017
4688
  /** A send hit an expired staged upload; the composer re-staged and resent once — the outcome. */
5018
- z30.object({ event: z30.literal("attachments_restaged"), label: z30.enum(["recovered", "failed"]) }),
4689
+ z29.object({ event: z29.literal("attachments_restaged"), label: z29.enum(["recovered", "failed"]) }),
5019
4690
  /** A skills-update apply lost its connection, and how following the server's state ended. */
5020
- z30.object({ event: z30.literal("skills_update_apply_dropped"), label: skillsUpdateDropOutcomeSchema }),
4691
+ z29.object({ event: z29.literal("skills_update_apply_dropped"), label: skillsUpdateDropOutcomeSchema }),
5021
4692
  /** ⌘K or ⌘P opened (spec 2026-10-17-task-palette). */
5022
- z30.object({ event: z30.literal("palette_opened"), label: z30.enum(PALETTE_KINDS) }),
4693
+ z29.object({ event: z29.literal("palette_opened"), label: z29.enum(PALETTE_KINDS) }),
5023
4694
  /** A ⌘P command ran from the palette — batched. */
5024
- z30.object({ event: z30.literal("task_command_run"), label: taskCommandLabelSchema, value: batchedValue }),
4695
+ z29.object({ event: z29.literal("task_command_run"), label: taskCommandLabelSchema, value: batchedValue }),
5025
4696
  /** A task command ran from its keyboard shortcut — batched. */
5026
- z30.object({ event: z30.literal("task_shortcut_used"), label: taskCommandLabelSchema, value: batchedValue }),
4697
+ z29.object({ event: z29.literal("task_shortcut_used"), label: taskCommandLabelSchema, value: batchedValue }),
5027
4698
  /** The user moved to another task from a palette. */
5028
- z30.object({ event: z30.literal("task_switched"), label: z30.enum(TASK_SWITCH_WAYS) }),
4699
+ z29.object({ event: z29.literal("task_switched"), label: z29.enum(TASK_SWITCH_WAYS) }),
5029
4700
  /** A palette session searched this way (once per session per mode). */
5030
- z30.object({ event: z30.literal("palette_mode_used"), label: z30.enum(PALETTE_MODES) }),
4701
+ z29.object({ event: z29.literal("palette_mode_used"), label: z29.enum(PALETTE_MODES) }),
5031
4702
  /** A palette closed with nothing chosen — the search failed, or the list did not help. */
5032
- z30.object({ event: z30.literal("palette_dismissed"), label: z30.enum(PALETTE_DISMISS_VIEWS) }),
4703
+ z29.object({ event: z29.literal("palette_dismissed"), label: z29.enum(PALETTE_DISMISS_VIEWS) }),
5033
4704
  /** A task command got a new shortcut (or lost one) — which defaults people change. */
5034
- z30.object({ event: z30.literal("shortcut_rebound"), label: taskCommandLabelSchema }),
4705
+ z29.object({ event: z29.literal("shortcut_rebound"), label: taskCommandLabelSchema }),
5035
4706
  /** The new-task composer's start-time menu (the arrow beside Send) was opened. */
5036
- z30.object({ event: z30.literal("schedule_menu_opened"), label: z30.enum(["new_task"]) }),
4707
+ z29.object({ event: z29.literal("schedule_menu_opened"), label: z29.enum(["new_task"]) }),
5037
4708
  /** A start option was picked in that menu. */
5038
- z30.object({ event: z30.literal("start_option_picked"), label: z30.enum(START_OPTIONS) }),
4709
+ z29.object({ event: z29.literal("start_option_picked"), label: z29.enum(START_OPTIONS) }),
5039
4710
  /** A task was scheduled from the composer, by the kind of start it waits for. */
5040
- z30.object({ event: z30.literal("task_scheduled"), label: z30.enum(["at", "usage_reset"]) }),
4711
+ z29.object({ event: z29.literal("task_scheduled"), label: z29.enum(["at", "usage_reset"]) }),
5041
4712
  /** Design Mode was switched on in a task's Preview — by its button or by ⌥D. */
5042
- z30.object({ event: z30.literal("design_mode_enabled"), label: z30.enum(["button", "shortcut"]) })
4713
+ z29.object({ event: z29.literal("design_mode_enabled"), label: z29.enum(["button", "shortcut"]) })
5043
4714
  ]);
5044
4715
 
5045
4716
  // ../contract/src/star-count.ts
5046
- import { z as z31 } from "zod";
5047
- var starCountSchema = z31.object({
5048
- available: z31.boolean(),
5049
- count: z31.number().int().nonnegative().optional(),
5050
- url: z31.string()
4717
+ import { z as z30 } from "zod";
4718
+ var starCountSchema = z30.object({
4719
+ available: z30.boolean(),
4720
+ count: z30.number().int().nonnegative().optional(),
4721
+ url: z30.string()
5051
4722
  });
5052
4723
 
5053
4724
  // ../contract/src/preview.ts
5054
- import { z as z32 } from "zod";
5055
- var designProxyRequestSchema = z32.object({
5056
- target: z32.string().min(1).max(2048),
5057
- parentOrigin: z32.string().min(1).max(512)
4725
+ import { z as z31 } from "zod";
4726
+ var designProxyRequestSchema = z31.object({
4727
+ target: z31.string().min(1).max(2048),
4728
+ parentOrigin: z31.string().min(1).max(512)
5058
4729
  });
5059
- var designProxyResponseSchema = z32.object({
5060
- origin: z32.string()
4730
+ var designProxyResponseSchema = z31.object({
4731
+ origin: z31.string()
5061
4732
  });
5062
4733
 
5063
4734
  // ../contract/src/start-app.ts
5064
- import { z as z33 } from "zod";
5065
- var startAppRecipeSchema = z33.object({
5066
- services: z33.array(z33.string().trim().min(1).max(500)).min(1).max(5),
5067
- url: z33.string().trim().max(2048).regex(/^https?:\/\/\S+$/, "an http:// or https:// address").optional()
4735
+ import { z as z32 } from "zod";
4736
+ var startAppRecipeSchema = z32.object({
4737
+ services: z32.array(z32.string().trim().min(1).max(500)).min(1).max(5),
4738
+ url: z32.string().trim().max(2048).regex(/^https?:\/\/\S+$/, "an http:// or https:// address").optional()
5068
4739
  });
5069
4740
  var START_APP_SCOPES = ["project", "personal"];
5070
- var startAppScopeSchema = z33.enum(START_APP_SCOPES);
5071
- var startAppStateSchema = z33.object({
4741
+ var startAppScopeSchema = z32.enum(START_APP_SCOPES);
4742
+ var startAppStateSchema = z32.object({
5072
4743
  project: startAppRecipeSchema.nullable(),
5073
4744
  personal: startAppRecipeSchema.nullable(),
5074
4745
  /** False where this project has no entry in the user's registry to hold a personal recipe. */
5075
- personalAvailable: z33.boolean()
4746
+ personalAvailable: z32.boolean()
5076
4747
  });
5077
- var startAppSetSchema = z33.object({
4748
+ var startAppSetSchema = z32.object({
5078
4749
  scope: startAppScopeSchema,
5079
4750
  recipe: startAppRecipeSchema.nullable()
5080
4751
  });
5081
4752
  var effectiveStartAppSchema = startAppRecipeSchema.extend({ scope: startAppScopeSchema });
5082
4753
 
5083
4754
  // ../contract/src/e2e.ts
5084
- import { z as z34 } from "zod";
4755
+ import { z as z33 } from "zod";
5085
4756
  var E2E_SETUP_WORKFLOW_NAME = "e2e-setup";
5086
4757
  var E2E_CREDENTIAL_NAMES = ["AI_GATEWAY_API_KEY", "OPENAI_API_KEY", "ANTHROPIC_API_KEY", "OPENROUTER_API_KEY"];
5087
- var e2eCredentialNameSchema = z34.enum(E2E_CREDENTIAL_NAMES);
5088
- var e2eStatusSchema = z34.object({
4758
+ var e2eCredentialNameSchema = z33.enum(E2E_CREDENTIAL_NAMES);
4759
+ var e2eStatusSchema = z33.object({
5089
4760
  /** The `e2e.config.*` file at the repository root, or `null`. */
5090
- configFile: z34.string().nullable(),
4761
+ configFile: z33.string().nullable(),
5091
4762
  /** `.ai/cezar/workflows/implement-and-e2e.yaml` exists. */
5092
- workflow: z34.boolean(),
4763
+ workflow: z33.boolean(),
5093
4764
  /** Which of `E2E_CREDENTIAL_NAMES` the project's check steps can read (project or workspace secrets). */
5094
- credentials: z34.array(e2eCredentialNameSchema),
4765
+ credentials: z33.array(e2eCredentialNameSchema),
5095
4766
  /** The most recent setup run, or `null` when none was started. */
5096
- setup: z34.object({ runId: z34.string(), status: runStatusSchema }).nullable()
4767
+ setup: z33.object({ runId: z33.string(), status: runStatusSchema }).nullable()
5097
4768
  });
5098
- var e2eSetupInputSchema = z34.object({
5099
- credential: z34.object({ name: e2eCredentialNameSchema, value: z34.string().min(1) }).strict().optional()
4769
+ var e2eSetupInputSchema = z33.object({
4770
+ credential: z33.object({ name: e2eCredentialNameSchema, value: z33.string().min(1) }).strict().optional()
5100
4771
  });
5101
- var e2eSetupResponseSchema = z34.object({ runId: z34.string() });
5102
- var e2eErrorSchema = z34.object({ error: z34.string() }).strict();
4772
+ var e2eSetupResponseSchema = z33.object({ runId: z33.string() });
4773
+ var e2eErrorSchema = z33.object({ error: z33.string() }).strict();
5103
4774
 
5104
4775
  // ../contract/src/terminal.ts
5105
- import { z as z35 } from "zod";
5106
- var terminalSessionSchema = z35.object({
5107
- id: z35.string(),
5108
- runId: z35.string(),
4776
+ import { z as z34 } from "zod";
4777
+ var terminalSessionSchema = z34.object({
4778
+ id: z34.string(),
4779
+ runId: z34.string(),
5109
4780
  /** The worktree the shell was started in — shown so a user can see WHICH tree they are typing into. */
5110
- cwd: z35.string(),
5111
- shell: z35.string(),
5112
- cols: z35.number().int(),
5113
- rows: z35.number().int(),
5114
- startedAt: z35.string(),
4781
+ cwd: z34.string(),
4782
+ shell: z34.string(),
4783
+ cols: z34.number().int(),
4784
+ rows: z34.number().int(),
4785
+ startedAt: z34.string(),
5115
4786
  /** Null while the shell is alive; the exit status once it is gone. */
5116
- exitCode: z35.number().int().nullable(),
4787
+ exitCode: z34.number().int().nullable(),
5117
4788
  /** The tab's name: the running (or last-run) command, else `Terminal N` (spec §6). */
5118
- label: z35.string(),
4789
+ label: z34.string(),
5119
4790
  /** The shell has a live child — something would be lost by closing this tab. */
5120
4791
  /** `null` = this host cannot read its process table (no `ps`), so busy-ness is unknown. The
5121
4792
  * cockpit treats anything but `false` as "something may be running". */
5122
- busy: z35.boolean().nullable(),
4793
+ busy: z34.boolean().nullable(),
5123
4794
  /** The WebSocket topic that wakes on new output. Local cockpits subscribe; hosted ones poll,
5124
4795
  * because a browser WebSocket cannot carry reverse-proxy credentials. */
5125
- topic: z35.string()
4796
+ topic: z34.string()
5126
4797
  });
5127
- var terminalStateSchema = z35.object({
5128
- available: z35.boolean(),
5129
- reason: z35.string().optional(),
5130
- sessions: z35.array(terminalSessionSchema),
4798
+ var terminalStateSchema = z34.object({
4799
+ available: z34.boolean(),
4800
+ reason: z34.string().optional(),
4801
+ sessions: z34.array(terminalSessionSchema),
5131
4802
  /** What this host will open, default first. The cockpit offers exactly these and nothing
5132
4803
  * else; an older server that does not send them leaves the picker out. */
5133
- shells: z35.array(z35.string()).optional()
4804
+ shells: z34.array(z34.string()).optional()
5134
4805
  });
5135
- var terminalCreateSchema = z35.object({
5136
- cols: z35.number().int().min(1).max(500).optional(),
5137
- rows: z35.number().int().min(1).max(500).optional(),
4806
+ var terminalCreateSchema = z34.object({
4807
+ cols: z34.number().int().min(1).max(500).optional(),
4808
+ rows: z34.number().int().min(1).max(500).optional(),
5138
4809
  /** One of the shells the host offers (`shells` on the state response). The server refuses
5139
4810
  * anything else rather than spawning it — the executable a request starts is the one thing
5140
4811
  * the worktree discipline does not cover, so it comes from an allowlist, never from the body
5141
4812
  * verbatim. The length cap is a parse bound, not the check. */
5142
- shell: z35.string().min(1).max(512).optional()
4813
+ shell: z34.string().min(1).max(512).optional()
5143
4814
  });
5144
- var terminalInputSchema = z35.object({
5145
- data: z35.string().max(65536)
4815
+ var terminalInputSchema = z34.object({
4816
+ data: z34.string().max(65536)
5146
4817
  });
5147
- var terminalResizeSchema = z35.object({
5148
- cols: z35.number().int().min(1).max(500),
5149
- rows: z35.number().int().min(1).max(500)
4818
+ var terminalResizeSchema = z34.object({
4819
+ cols: z34.number().int().min(1).max(500),
4820
+ rows: z34.number().int().min(1).max(500)
5150
4821
  });
5151
- var terminalOutputQuerySchema = z35.object({
5152
- cursor: z35.coerce.number().int().min(0).optional()
4822
+ var terminalOutputQuerySchema = z34.object({
4823
+ cursor: z34.coerce.number().int().min(0).optional()
5153
4824
  });
5154
- var terminalOutputSchema = z35.object({
5155
- data: z35.string(),
4825
+ var terminalOutputSchema = z34.object({
4826
+ data: z34.string(),
5156
4827
  /** Pass back on the next read. */
5157
- cursor: z35.number().int(),
4828
+ cursor: z34.number().int(),
5158
4829
  /** The requested cursor was older than the retained scrollback, so output was missed. The
5159
4830
  * emulator says so rather than splicing a gap into the screen silently. */
5160
- truncated: z35.boolean(),
5161
- exitCode: z35.number().int().nullable()
4831
+ truncated: z34.boolean(),
4832
+ exitCode: z34.number().int().nullable()
5162
4833
  });
5163
- var detectedUrlSchema = z35.object({
5164
- url: z35.string(),
5165
- lastSeenAt: z35.string(),
4834
+ var detectedUrlSchema = z34.object({
4835
+ url: z34.string(),
4836
+ lastSeenAt: z34.string(),
5166
4837
  /** Null until probed. Distinct from `false`, which means "probed, nothing listening". */
5167
- running: z35.boolean().nullable()
4838
+ running: z34.boolean().nullable()
5168
4839
  });
5169
- var detectedUrlsSchema = z35.object({ urls: z35.array(detectedUrlSchema) });
5170
- var discoveredCommandSchema = z35.object({
5171
- command: z35.string(),
4840
+ var detectedUrlsSchema = z34.object({ urls: z34.array(detectedUrlSchema) });
4841
+ var discoveredCommandSchema = z34.object({
4842
+ command: z34.string(),
5172
4843
  /** The file it came from, so `dev` from a Makefile is never confused with `dev` from npm. */
5173
- source: z35.string(),
5174
- detail: z35.string().optional()
4844
+ source: z34.string(),
4845
+ detail: z34.string().optional()
5175
4846
  });
5176
- var discoveredCommandsSchema = z35.object({
5177
- commands: z35.array(discoveredCommandSchema),
4847
+ var discoveredCommandsSchema = z34.object({
4848
+ commands: z34.array(discoveredCommandSchema),
5178
4849
  /** What installs the worktree's dependencies, present only when it has a `package.json` and no
5179
4850
  * `node_modules` of its own. "Run the app" runs it first. */
5180
- install: z35.string().optional(),
4851
+ install: z34.string().optional(),
5181
4852
  /** The project's start recipe, when one is defined — personal over project. */
5182
4853
  recipe: effectiveStartAppSchema.optional()
5183
4854
  });
5184
- var terminalSessionParamsSchema = z35.object({
5185
- id: z35.string(),
5186
- sessionId: z35.string()
4855
+ var terminalSessionParamsSchema = z34.object({
4856
+ id: z34.string(),
4857
+ sessionId: z34.string()
5187
4858
  });
5188
4859
 
5189
4860
  // ../contract/src/agent-setup.ts
5190
- import { z as z36 } from "zod";
5191
- var agentSetupProviderSchema = z36.enum(["claude", "codex", "opencode", "cursor", "copilot"]);
5192
- var agentSetupActionSchema = z36.enum(["install", "login"]);
5193
- var agentSetupEntrySchema = z36.object({
4861
+ import { z as z35 } from "zod";
4862
+ var agentSetupProviderSchema = z35.enum(["claude", "codex", "opencode", "cursor", "copilot"]);
4863
+ var agentSetupActionSchema = z35.enum(["install", "login"]);
4864
+ var agentSetupEntrySchema = z35.object({
5194
4865
  provider: agentSetupProviderSchema,
5195
4866
  /** Null when nothing on this machine can install it (no npm, no curl); `installHint` says what to do. */
5196
- installCommand: z36.string().nullable(),
5197
- installHint: z36.string(),
5198
- loginCommand: z36.string().nullable()
4867
+ installCommand: z35.string().nullable(),
4868
+ installHint: z35.string(),
4869
+ loginCommand: z35.string().nullable()
5199
4870
  });
5200
4871
  var agentSetupSessionSchema = terminalSessionSchema.extend({
5201
4872
  provider: agentSetupProviderSchema,
5202
4873
  action: agentSetupActionSchema,
5203
4874
  /** What this session runs, shown above its screen. */
5204
- command: z36.string()
4875
+ command: z35.string()
5205
4876
  });
5206
- var agentSetupStateSchema = z36.discriminatedUnion("available", [
5207
- z36.object({ available: z36.literal(false), reason: z36.string() }),
5208
- z36.object({
5209
- available: z36.literal(true),
5210
- agents: z36.array(agentSetupEntrySchema),
4877
+ var agentSetupStateSchema = z35.discriminatedUnion("available", [
4878
+ z35.object({ available: z35.literal(false), reason: z35.string() }),
4879
+ z35.object({
4880
+ available: z35.literal(true),
4881
+ agents: z35.array(agentSetupEntrySchema),
5211
4882
  /** The running or just-finished session, so a reload reattaches instead of starting another install. */
5212
4883
  session: agentSetupSessionSchema.nullable()
5213
4884
  })
5214
4885
  ]);
5215
- var agentSetupStartSchema = z36.object({
4886
+ var agentSetupStartSchema = z35.object({
5216
4887
  provider: agentSetupProviderSchema,
5217
4888
  action: agentSetupActionSchema,
5218
- cols: z36.number().int().min(1).max(500).optional(),
5219
- rows: z36.number().int().min(1).max(500).optional()
4889
+ cols: z35.number().int().min(1).max(500).optional(),
4890
+ rows: z35.number().int().min(1).max(500).optional()
5220
4891
  });
5221
- var agentSetupSessionParamsSchema = z36.object({ sessionId: z36.string() });
4892
+ var agentSetupSessionParamsSchema = z35.object({ sessionId: z35.string() });
5222
4893
 
5223
4894
  // ../contract/src/deferred-start.ts
5224
- import { z as z37 } from "zod";
5225
- var startConditionSchema = z37.discriminatedUnion("kind", [
5226
- z37.object({ kind: z37.literal("at"), date: z37.string().regex(/^\d{4}-\d{2}-\d{2}$/), hour: z37.number().int().min(0).max(23), minute: z37.number().int().min(0).max(59) }),
5227
- z37.object({ kind: z37.literal("usage-reset") })
4895
+ import { z as z36 } from "zod";
4896
+ var startConditionSchema = z36.discriminatedUnion("kind", [
4897
+ z36.object({ kind: z36.literal("at"), date: z36.string().regex(/^\d{4}-\d{2}-\d{2}$/), hour: z36.number().int().min(0).max(23), minute: z36.number().int().min(0).max(59) }),
4898
+ z36.object({ kind: z36.literal("usage-reset") })
5228
4899
  ]);
5229
- var deferredPreviewInputSchema = z37.object({ task: createRunInputSchema, start: startConditionSchema });
5230
- var deferredCreateInputSchema = deferredPreviewInputSchema.extend({ previewRevision: z37.string().min(1).max(128), idempotencyKey: z37.string().uuid() });
5231
- var deferredPreviewSchema = z37.discriminatedUnion("available", [
5232
- z37.object({ available: z37.literal(true), notBefore: z37.string().datetime(), timeZone: z37.string(), previewRevision: z37.string(), observation: z37.string().optional() }),
5233
- z37.object({ available: z37.literal(false), reason: z37.string(), message: z37.string() })
4900
+ var deferredPreviewInputSchema = z36.object({ task: createRunInputSchema, start: startConditionSchema });
4901
+ var deferredCreateInputSchema = deferredPreviewInputSchema.extend({ previewRevision: z36.string().min(1).max(128), idempotencyKey: z36.string().uuid() });
4902
+ var deferredPreviewSchema = z36.discriminatedUnion("available", [
4903
+ z36.object({ available: z36.literal(true), notBefore: z36.string().datetime(), timeZone: z36.string(), previewRevision: z36.string(), observation: z36.string().optional() }),
4904
+ z36.object({ available: z36.literal(false), reason: z36.string(), message: z36.string() })
5234
4905
  ]);
5235
- var deferredCreateResponseSchema = z37.object({ scheduled: deferredCreationRecordSchema });
5236
- var deferredMutationQuerySchema = z37.object({ expectedRevision: z37.coerce.number().int().positive().optional() });
5237
- var deferredAlreadyStartedSchema = z37.object({ error: z37.string(), runIds: z37.array(z37.string()) });
4906
+ var deferredCreateResponseSchema = z36.object({ scheduled: deferredCreationRecordSchema });
4907
+ var deferredMutationQuerySchema = z36.object({ expectedRevision: z36.coerce.number().int().positive().optional() });
4908
+ var deferredAlreadyStartedSchema = z36.object({ error: z36.string(), runIds: z36.array(z36.string()) });
5238
4909
  var deferredCancellationConflictSchema = deferredAlreadyStartedSchema.partial({ runIds: true });
5239
- var deferredOptionsInputSchema = z37.object({ task: createRunInputSchema });
5240
- var deferredOptionsSchema = z37.object({
5241
- timeZone: z37.string(),
5242
- usageReset: z37.discriminatedUnion("available", [
5243
- z37.object({ available: z37.literal(true), provider: z37.enum(["claude", "codex"]) }),
5244
- z37.object({ available: z37.literal(false), reason: z37.string(), message: z37.string() })
4910
+ var deferredOptionsInputSchema = z36.object({ task: createRunInputSchema });
4911
+ var deferredOptionsSchema = z36.object({
4912
+ timeZone: z36.string(),
4913
+ usageReset: z36.discriminatedUnion("available", [
4914
+ z36.object({ available: z36.literal(true), provider: z36.enum(["claude", "codex"]) }),
4915
+ z36.object({ available: z36.literal(false), reason: z36.string(), message: z36.string() })
5245
4916
  ])
5246
4917
  });
5247
4918
 
5248
4919
  // ../contract/src/usage-windows.ts
5249
- import { z as z38 } from "zod";
5250
- var usageWindowSchema = z38.object({
5251
- id: z38.string().min(1).max(256),
5252
- kind: z38.enum(["five-hour", "weekly", "primary", "secondary", "other"]),
5253
- limitId: z38.string().max(128).optional(),
5254
- applicability: z38.enum(["all", "models", "unknown"]),
5255
- models: z38.array(z38.string().min(1).max(128)).max(32).default([]),
5256
- resetsAt: z38.number().int().positive().max(864e13).nullable(),
5257
- durationMinutes: z38.number().positive().finite().nullable(),
5258
- usedPercent: z38.number().nonnegative().finite().nullable(),
5259
- status: z38.enum(["allowed", "blocked", "unknown"]),
5260
- observedAt: z38.number().int().nonnegative()
5261
- });
5262
- var usageWindowsObservationSchema = z38.object({
5263
- provider: z38.enum(["claude", "codex"]),
5264
- source: z38.enum(["claude-stream", "codex-notification", "codex-read"]),
5265
- observedAt: z38.number().int().nonnegative(),
5266
- windows: z38.array(usageWindowSchema).max(128)
5267
- });
5268
- var usageAccountBindingSchema = z38.object({
5269
- provider: z38.enum(["claude", "codex"]),
5270
- accountId: z38.string().min(1).max(256),
5271
- profilePath: z38.string().min(1).max(4096),
4920
+ import { z as z37 } from "zod";
4921
+ var usageWindowSchema = z37.object({
4922
+ id: z37.string().min(1).max(256),
4923
+ kind: z37.enum(["five-hour", "weekly", "primary", "secondary", "other"]),
4924
+ limitId: z37.string().max(128).optional(),
4925
+ applicability: z37.enum(["all", "models", "unknown"]),
4926
+ models: z37.array(z37.string().min(1).max(128)).max(32).default([]),
4927
+ resetsAt: z37.number().int().positive().max(864e13).nullable(),
4928
+ durationMinutes: z37.number().positive().finite().nullable(),
4929
+ usedPercent: z37.number().nonnegative().finite().nullable(),
4930
+ status: z37.enum(["allowed", "blocked", "unknown"]),
4931
+ observedAt: z37.number().int().nonnegative()
4932
+ });
4933
+ var usageWindowsObservationSchema = z37.object({
4934
+ provider: z37.enum(["claude", "codex"]),
4935
+ source: z37.enum(["claude-stream", "codex-notification", "codex-read"]),
4936
+ observedAt: z37.number().int().nonnegative(),
4937
+ windows: z37.array(usageWindowSchema).max(128)
4938
+ });
4939
+ var usageAccountBindingSchema = z37.object({
4940
+ provider: z37.enum(["claude", "codex"]),
4941
+ accountId: z37.string().min(1).max(256),
4942
+ profilePath: z37.string().min(1).max(4096),
5272
4943
  /** SHA-256 of provider identity metadata, never an auth token. */
5273
- identity: z38.string().regex(/^[a-f0-9]{64}$/).optional()
4944
+ identity: z37.string().regex(/^[a-f0-9]{64}$/).optional()
5274
4945
  });
5275
4946
  var usageWindowsSnapshotSchema = usageWindowsObservationSchema.extend({
5276
4947
  binding: usageAccountBindingSchema
5277
4948
  }).refine((s) => s.provider === s.binding.provider, "Provider must match account binding");
4949
+
4950
+ // ../contract/src/managers.ts
4951
+ import { z as z38 } from "zod";
4952
+ var managerIdSchema = z38.string().regex(/^[a-z0-9-]{1,64}$/);
4953
+ var managerIdParamSchema = z38.object({ id: managerIdSchema });
4954
+ var managerAttachmentParamSchema = z38.object({
4955
+ id: managerIdSchema,
4956
+ file: z38.string().regex(/^pasted-[a-z0-9-]+\.[a-z0-9]+$/)
4957
+ });
4958
+ var managerActionParamSchema = z38.object({ id: managerIdSchema, actionId: z38.string().min(1).max(64) });
4959
+ var managerJobParamSchema = z38.object({ id: managerIdSchema, jobId: z38.string().min(1).max(64) });
4960
+ var boundedId = z38.string().min(1).max(200);
4961
+ var runnerInput = z38.string().max(64);
4962
+ var modelInput = z38.string().max(200);
4963
+ var managerProjectsSchema = z38.union([z38.literal("all"), z38.array(z38.string().min(1).max(200)).min(1).max(200)]);
4964
+ var managerAccessSchema = z38.enum(["read", "write"]);
4965
+ var managerProjectAccessSchema = z38.record(z38.string().min(1).max(200), managerAccessSchema);
4966
+ function managerAccessOf(manager, projectId) {
4967
+ return manager.projectAccess?.[projectId] ?? manager.access ?? "write";
4968
+ }
4969
+ var managerEffortSchema = z38.enum(["low", "medium", "high"]);
4970
+ var MANAGER_CRON_MINUTES = [0, 5, 15, 30, 60, 240, 1440];
4971
+ var managerCronMinutesSchema = z38.union([
4972
+ z38.literal(0),
4973
+ z38.literal(5),
4974
+ z38.literal(15),
4975
+ z38.literal(30),
4976
+ z38.literal(60),
4977
+ z38.literal(240),
4978
+ z38.literal(1440)
4979
+ ]);
4980
+ var MANAGER_DEFAULT_CRON_MINUTES = 15;
4981
+ var managerJobSchema = z38.object({
4982
+ id: z38.string().min(1).max(64),
4983
+ name: z38.string().trim().min(1).max(80),
4984
+ prompt: z38.string().trim().min(1).max(2e4),
4985
+ everyMinutes: z38.number().int().min(5).max(10080),
4986
+ enabled: z38.boolean(),
4987
+ lastRunAt: z38.string().optional()
4988
+ });
4989
+ var managerJobInputSchema = managerJobSchema.omit({ id: true, lastRunAt: true }).extend({
4990
+ id: z38.string().min(1).max(64).optional()
4991
+ });
4992
+ var managerSchema = z38.object({
4993
+ id: managerIdSchema,
4994
+ name: z38.string().trim().min(1).max(80),
4995
+ /** What the manager is for. Becomes part of its system prompt. */
4996
+ instructions: z38.string().max(2e4),
4997
+ /** Index into the cockpit's avatar set; stable across renames. */
4998
+ avatar: z38.number().int().min(0).max(63),
4999
+ projects: managerProjectsSchema,
5000
+ /** Every connected project's access unless `projectAccess` names it. Absent = write. */
5001
+ access: managerAccessSchema.optional(),
5002
+ projectAccess: managerProjectAccessSchema.optional(),
5003
+ runner: z38.string().optional(),
5004
+ model: z38.string().optional(),
5005
+ effort: managerEffortSchema.optional(),
5006
+ /** Agent account id ("Account" in the design); absent = the runner's default. */
5007
+ agentProfile: z38.string().max(64).optional(),
5008
+ cronMinutes: managerCronMinutesSchema,
5009
+ /** false silences system notifications; the chat and unread dot stay. Absent = on. */
5010
+ notify: z38.boolean().optional(),
5011
+ jobs: z38.array(managerJobSchema).max(32),
5012
+ createdAt: z38.string(),
5013
+ updatedAt: z38.string()
5014
+ });
5015
+ var managerStatusSchema = z38.enum(["idle", "working", "error"]);
5016
+ var managerSummarySchema = managerSchema.extend({
5017
+ status: managerStatusSchema,
5018
+ /** The registered projects `projects` resolves to right now — `all` included. */
5019
+ connectedProjectIds: z38.array(z38.string()),
5020
+ lastActivityAt: z38.string().optional(),
5021
+ /** One plain-text line for the sidebar row. */
5022
+ preview: z38.string().optional(),
5023
+ /** Messages the manager produced since the user last opened this chat. */
5024
+ unread: z38.number().int().min(0),
5025
+ /** Those of them it judged worth interrupting the user for. */
5026
+ important: z38.number().int().min(0),
5027
+ /** The newest important message's one line, for a browser notification. */
5028
+ headline: z38.string().optional(),
5029
+ pendingActions: z38.number().int().min(0),
5030
+ /** Question cards still waiting for an answer. */
5031
+ pendingQuestions: z38.number().int().min(0),
5032
+ lastCheckAt: z38.string().optional(),
5033
+ /** Absent when `cronMinutes` is 0. */
5034
+ nextCheckAt: z38.string().optional(),
5035
+ /** Spend across this manager's own turns. Excludes tasks it started: they bill to the task. */
5036
+ costUsd: z38.number().min(0)
5037
+ });
5038
+ var createManagerInputSchema = z38.object({
5039
+ name: z38.string().trim().min(1).max(80).optional(),
5040
+ instructions: z38.string().max(2e4),
5041
+ projects: managerProjectsSchema,
5042
+ access: managerAccessSchema.optional(),
5043
+ projectAccess: managerProjectAccessSchema.optional(),
5044
+ runner: runnerInput.optional(),
5045
+ model: modelInput.optional(),
5046
+ effort: managerEffortSchema.optional(),
5047
+ agentProfile: z38.string().max(64).optional(),
5048
+ cronMinutes: managerCronMinutesSchema.optional(),
5049
+ avatar: z38.number().int().min(0).max(63).optional()
5050
+ });
5051
+ var updateManagerInputSchema = z38.object({
5052
+ name: z38.string().trim().min(1).max(80).optional(),
5053
+ instructions: z38.string().max(2e4).optional(),
5054
+ projects: managerProjectsSchema.optional(),
5055
+ access: managerAccessSchema.optional(),
5056
+ /** Replaces the whole map. */
5057
+ projectAccess: managerProjectAccessSchema.optional(),
5058
+ runner: runnerInput.nullable().optional(),
5059
+ model: modelInput.nullable().optional(),
5060
+ effort: managerEffortSchema.nullable().optional(),
5061
+ agentProfile: z38.string().max(64).nullable().optional(),
5062
+ cronMinutes: managerCronMinutesSchema.optional(),
5063
+ avatar: z38.number().int().min(0).max(63).optional(),
5064
+ notify: z38.boolean().optional(),
5065
+ jobs: z38.array(managerJobInputSchema).max(32).optional()
5066
+ });
5067
+ var managerListResponseSchema = z38.object({ managers: z38.array(managerSummarySchema) });
5068
+ var managerTurnKindSchema = z38.enum(["chat", "watch", "job"]);
5069
+ var managerCommandSchema = z38.object({
5070
+ id: z38.string(),
5071
+ tool: z38.string(),
5072
+ /** A short human label, e.g. the shell command. */
5073
+ summary: z38.string(),
5074
+ output: z38.string().optional(),
5075
+ isError: z38.boolean().optional()
5076
+ });
5077
+ var managerActionRequestSchema = z38.discriminatedUnion("type", [
5078
+ z38.object({
5079
+ type: z38.literal("merge-pr"),
5080
+ projectId: boundedId,
5081
+ number: z38.number().int().positive(),
5082
+ title: z38.string().max(1e3).optional(),
5083
+ method: z38.enum(["merge", "squash", "rebase"]).optional(),
5084
+ /** Stamped by the server at proposal: a push after it makes the approval refuse, not merge. */
5085
+ headSha: z38.string().max(200).optional()
5086
+ }),
5087
+ z38.object({
5088
+ type: z38.literal("enable-automation"),
5089
+ projectId: boundedId,
5090
+ automationId: boundedId,
5091
+ name: z38.string().max(1e3).optional(),
5092
+ /** Stamped by the server at proposal, with what the card shows: an edit after it refuses. */
5093
+ revision: z38.number().int().optional(),
5094
+ summary: z38.string().max(2e4).optional()
5095
+ }),
5096
+ /** A job runs unattended, so one the agent asks for waits for the user too. */
5097
+ z38.object({
5098
+ type: z38.literal("add-job"),
5099
+ name: z38.string().trim().min(1).max(80),
5100
+ prompt: z38.string().trim().min(1).max(2e4),
5101
+ everyMinutes: z38.number().int().min(5).max(10080)
5102
+ })
5103
+ ]);
5104
+ var managerActionStatusSchema = z38.enum(["pending", "running", "done", "rejected", "failed"]);
5105
+ var managerAskSchema = z38.object({
5106
+ questions: z38.array(z38.object({
5107
+ id: z38.string().optional(),
5108
+ header: z38.string(),
5109
+ question: z38.string(),
5110
+ multiSelect: z38.boolean().optional(),
5111
+ options: z38.array(z38.object({ label: z38.string(), description: z38.string().optional() }))
5112
+ }))
5113
+ });
5114
+ var managerAttachmentSchema = z38.object({
5115
+ file: z38.string(),
5116
+ mediaType: z38.string(),
5117
+ /** The user's own filename; a pasted screenshot has none. */
5118
+ name: z38.string().optional()
5119
+ });
5120
+ var managerMessageBase = { id: z38.string(), seq: z38.number().int().min(0), at: z38.string() };
5121
+ var managerMessageSchema = z38.discriminatedUnion("kind", [
5122
+ z38.object({ ...managerMessageBase, kind: z38.literal("user"), text: z38.string(), attachments: z38.array(managerAttachmentSchema).optional() }),
5123
+ z38.object({
5124
+ ...managerMessageBase,
5125
+ kind: z38.literal("assistant"),
5126
+ /** Markdown. `[[task:<projectId>/<runId>]]` and `[[pr:<projectId>/<number>]]` render as cards. */
5127
+ text: z38.string(),
5128
+ turn: managerTurnKindSchema,
5129
+ jobName: z38.string().optional(),
5130
+ streaming: z38.boolean(),
5131
+ /** The manager's own judgement that this should interrupt the user. */
5132
+ important: z38.boolean().optional(),
5133
+ headline: z38.string().optional(),
5134
+ ask: managerAskSchema.optional(),
5135
+ /** What the user answered; the next message they send answers an open card. */
5136
+ askAnswer: z38.string().optional(),
5137
+ commands: z38.array(managerCommandSchema),
5138
+ stopped: z38.boolean().optional(),
5139
+ error: z38.string().optional(),
5140
+ costUsd: z38.number().optional()
5141
+ }),
5142
+ z38.object({
5143
+ ...managerMessageBase,
5144
+ kind: z38.literal("action"),
5145
+ action: managerActionRequestSchema,
5146
+ /** The manager's reason, shown on the approval card. */
5147
+ reason: z38.string().optional(),
5148
+ status: managerActionStatusSchema,
5149
+ /** The outcome sentence once it left `pending`. */
5150
+ result: z38.string().optional()
5151
+ }),
5152
+ /** A quiet system line: "Connected to meblohand", "Merged #12". */
5153
+ z38.object({ ...managerMessageBase, kind: z38.literal("notice"), text: z38.string() })
5154
+ ]);
5155
+ var managerMessagesQuerySchema = z38.object({
5156
+ /** Page older history: only messages with a lower `seq`. */
5157
+ before: z38.coerce.number().int().min(0).optional(),
5158
+ limit: z38.coerce.number().int().min(1).max(500).optional()
5159
+ });
5160
+ var managerMessagesResponseSchema = z38.object({
5161
+ messages: z38.array(managerMessageSchema),
5162
+ hasMore: z38.boolean()
5163
+ });
5164
+ var sendManagerMessageInputSchema = z38.strictObject({ text: z38.string().trim().max(1e5), images: attachmentListSchema.optional() }).refine((input) => input.text !== "" || (input.images?.length ?? 0) > 0, {
5165
+ message: "write a message or attach a file",
5166
+ path: ["text"]
5167
+ });
5168
+ var managerActionDecisionInputSchema = z38.object({ decision: z38.enum(["approve", "reject"]) });
5169
+ var managerOkResponseSchema = z38.object({ ok: z38.literal(true) });
5170
+ var managerSendResponseSchema = z38.object({ ok: z38.literal(true), attachments: z38.number().int().min(0) });
5171
+ var managerAttentionKindSchema = z38.enum([
5172
+ "task-needs-you",
5173
+ "task-failed",
5174
+ "task-review",
5175
+ "task-finished",
5176
+ "task-stalled",
5177
+ "pr-ready",
5178
+ "pr-checks-failing",
5179
+ "pr-conflict",
5180
+ "pr-review-requested",
5181
+ "automation-failing"
5182
+ ]);
5183
+ var managerAttentionItemSchema = z38.object({
5184
+ /** Stable identity: the watch check speaks only about keys it has not reported yet. */
5185
+ key: z38.string(),
5186
+ kind: managerAttentionKindSchema,
5187
+ projectId: z38.string(),
5188
+ title: z38.string(),
5189
+ detail: z38.string().optional(),
5190
+ runId: z38.string().optional(),
5191
+ number: z38.number().int().optional(),
5192
+ url: z38.string().optional(),
5193
+ since: z38.string().optional()
5194
+ });
5195
+ var managerSnapshotTaskSchema = z38.object({
5196
+ runId: z38.string(),
5197
+ title: z38.string(),
5198
+ status: z38.string(),
5199
+ workflow: z38.string(),
5200
+ branch: z38.string().optional(),
5201
+ parentRunId: z38.string().optional(),
5202
+ /** Direct dispatched children; a big tree reads as its root. */
5203
+ childCount: z38.number().int().min(0),
5204
+ additions: z38.number().int().optional(),
5205
+ deletions: z38.number().int().optional(),
5206
+ costUsd: z38.number().optional(),
5207
+ lastActivityAt: z38.string().optional()
5208
+ });
5209
+ var managerSnapshotPrSchema = z38.object({
5210
+ number: z38.number().int(),
5211
+ title: z38.string(),
5212
+ author: z38.string().optional(),
5213
+ url: z38.string().optional(),
5214
+ draft: z38.boolean().optional(),
5215
+ status: z38.string().optional(),
5216
+ mergeable: z38.boolean().optional()
5217
+ });
5218
+ var managerSnapshotProjectSchema = z38.object({
5219
+ projectId: z38.string(),
5220
+ name: z38.string(),
5221
+ available: z38.boolean(),
5222
+ /** Why GitHub facts are absent; the rest of the project is still reported. */
5223
+ prsUnavailable: z38.string().optional(),
5224
+ tasks: z38.array(managerSnapshotTaskSchema),
5225
+ prs: z38.array(managerSnapshotPrSchema)
5226
+ });
5227
+ var managerSnapshotSchema = z38.object({
5228
+ generatedAt: z38.string(),
5229
+ projects: z38.array(managerSnapshotProjectSchema),
5230
+ attention: z38.array(managerAttentionItemSchema)
5231
+ });
5232
+ var managerCreateTaskInputSchema = z38.object({
5233
+ projectId: boundedId,
5234
+ task: z38.string().trim().min(1).max(1e5),
5235
+ title: z38.string().trim().min(1).max(200).optional(),
5236
+ workflow: boundedId.optional(),
5237
+ runner: runnerInput.optional(),
5238
+ model: modelInput.optional(),
5239
+ dispatch: z38.boolean().optional()
5240
+ });
5241
+ var managerCreateTaskResponseSchema = z38.object({ projectId: z38.string(), runId: z38.string() });
5242
+ var managerTaskMessageInputSchema = z38.object({
5243
+ projectId: boundedId,
5244
+ runId: boundedId,
5245
+ text: z38.string().trim().min(1).max(1e5)
5246
+ });
5247
+ var managerProposeActionInputSchema = z38.object({
5248
+ action: managerActionRequestSchema,
5249
+ reason: z38.string().max(2e3).optional()
5250
+ });
5251
+ var managerProposeActionResponseSchema = z38.object({ actionId: z38.string(), status: managerActionStatusSchema });
5252
+ var managerTaskDetailQuerySchema = z38.object({
5253
+ projectId: boundedId,
5254
+ runId: boundedId
5255
+ });
5256
+ var managerTaskDetailSchema = z38.object({
5257
+ task: managerSnapshotTaskSchema,
5258
+ /** The tail of the task's assistant text — what the manager quotes back. */
5259
+ lastMessage: z38.string().optional(),
5260
+ children: z38.array(managerSnapshotTaskSchema)
5261
+ });
5262
+ var managerChangeEventSchema = z38.object({
5263
+ id: z38.string(),
5264
+ manager: managerSummarySchema.optional(),
5265
+ deleted: z38.boolean().optional()
5266
+ });
5267
+ var managerMessageEventSchema = z38.object({ managerId: z38.string(), message: managerMessageSchema });
5278
5268
  export {
5279
5269
  ADD_PROJECT_DIALOGS,
5280
5270
  ATTACHMENT_COUNT_BUCKETS,
@@ -5602,7 +5592,6 @@ export {
5602
5592
  managerAttentionKindSchema,
5603
5593
  managerChangeEventSchema,
5604
5594
  managerCommandSchema,
5605
- managerConfirmSchema,
5606
5595
  managerCreateTaskInputSchema,
5607
5596
  managerCreateTaskResponseSchema,
5608
5597
  managerCronMinutesSchema,