@open-mercato/cezar 0.20.0-pr2104.4972 → 0.20.0-pr2109.4976

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 (152) hide show
  1. package/dist/contract/index.js +0 -11
  2. package/dist/contract/managers.d.ts +0 -27
  3. package/dist/core/agent-failure-class.d.ts +0 -2
  4. package/dist/core/agent-failure-class.js +0 -4
  5. package/dist/core/agent-failure-class.js.map +1 -1
  6. package/dist/managers/engine.d.ts +0 -4
  7. package/dist/managers/engine.js +22 -58
  8. package/dist/managers/engine.js.map +1 -1
  9. package/dist/managers/store.d.ts +0 -7
  10. package/dist/managers/store.js +0 -7
  11. package/dist/managers/store.js.map +1 -1
  12. package/dist/managers/telemetry.js +0 -1
  13. package/dist/managers/telemetry.js.map +1 -1
  14. package/dist/server/agent-setup-routes.d.ts +14 -14
  15. package/dist/server/dashboard.d.ts +54 -54
  16. package/dist/server/server.d.ts +10 -38
  17. package/dist/server/worktree-lifecycle.d.ts +88 -88
  18. package/package.json +3 -3
  19. package/web/dist/assets/{active-forge-b5W7W0t_.js → active-forge-DVscjGbx.js} +1 -1
  20. package/web/dist/assets/{agent-task-pickers-DWrMzUAC.js → agent-task-pickers-BADTUxoj.js} +1 -1
  21. package/web/dist/assets/{alert-dialog-EJ1uDqbE.js → alert-dialog-CeZS4sVc.js} +1 -1
  22. package/web/dist/assets/arrow-down-B7f_TF9Z.js +1 -0
  23. package/web/dist/assets/arrow-up-BmN55mLg.js +1 -0
  24. package/web/dist/assets/{ask-answer-CciiNc6e.js → ask-answer-B_-vudJl.js} +1 -1
  25. package/web/dist/assets/{ask-card-C4OhJjyK.js → ask-card-BHwsn7jg.js} +1 -1
  26. package/web/dist/assets/{assets-view-OVyiwjVY.js → assets-view-BvDCRocU.js} +1 -1
  27. package/web/dist/assets/{automation-format-Dlvldg6m.js → automation-format-DLL38eOJ.js} +1 -1
  28. package/web/dist/assets/{automations-route-Bw-qCjR1.js → automations-route-CeavyKyX.js} +1 -1
  29. package/web/dist/assets/{bot-DlDjXwGl.js → bot-DAxqi7kU.js} +1 -1
  30. package/web/dist/assets/{button-BfilD-Qw.js → button-DcaenKo9.js} +1 -1
  31. package/web/dist/assets/{centered-state-BjgmOiKD.js → centered-state-DIQOb7td.js} +1 -1
  32. package/web/dist/assets/check-K_BHjh6a.js +1 -0
  33. package/web/dist/assets/chevron-left-BUNTKQVt.js +1 -0
  34. package/web/dist/assets/chevron-right-BWh-2AEu.js +1 -0
  35. package/web/dist/assets/{circle-alert-Dli9eRuO.js → circle-alert-DOaL0mOa.js} +1 -1
  36. package/web/dist/assets/circle-check-Cg5S3UfE.js +1 -0
  37. package/web/dist/assets/{circle-question-mark-DzOh1A9P.js → circle-question-mark-ByICmIFO.js} +1 -1
  38. package/web/dist/assets/{collapsible-wefmQNQW.js → collapsible-DTOUstmx.js} +1 -1
  39. package/web/dist/assets/{command-D-5uw1u1.js → command-JFaFJQZL.js} +1 -1
  40. package/web/dist/assets/{commit-list-D0MZta3X.js → commit-list-2-3oByrL.js} +1 -1
  41. package/web/dist/assets/{compare-variants-Bf_-_PnQ.js → compare-variants-CCBo0cZU.js} +1 -1
  42. package/web/dist/assets/{composer-DU_IO_vt.js → composer-BJ_WCW2c.js} +1 -1
  43. package/web/dist/assets/composer-attachments-B305k_0M.js +3 -0
  44. package/web/dist/assets/{dashboard-DwzIdHUS.js → dashboard-Bp1_Nfry.js} +1 -1
  45. package/web/dist/assets/{diff-BR0W9LrK.js → diff-DHOCUNst.js} +2 -2
  46. package/web/dist/assets/{diff-stat-D5-C7FKV.js → diff-stat-RCVfDh2x.js} +1 -1
  47. package/web/dist/assets/{diff-view-G8ee7Fsn.js → diff-view-DpW1TEXy.js} +1 -1
  48. package/web/dist/assets/{directional-usage-RnJK04N4.js → directional-usage-ClDZ2wqg.js} +1 -1
  49. package/web/dist/assets/{dist-ChbjUusD.js → dist-CLLGvuuF.js} +1 -1
  50. package/web/dist/assets/{download-BBzoMJPS.js → download-CDdrQ5m5.js} +1 -1
  51. package/web/dist/assets/{dropdown-menu-C2WyJ6Hu.js → dropdown-menu-DBVq2ItJ.js} +1 -1
  52. package/web/dist/assets/{external-link-Bl-CEMxK.js → external-link-DVqjPgNH.js} +1 -1
  53. package/web/dist/assets/{file-DteJ-eMp.js → file-DOijWExO.js} +1 -1
  54. package/web/dist/assets/{file-preview-De9f0zo7.js → file-preview-gCB5nWlX.js} +1 -1
  55. package/web/dist/assets/{file-tree-NeyJU3Ao.js → file-tree-CUGow5K7.js} +1 -1
  56. package/web/dist/assets/{folder-D-ALgvCw.js → folder-CHHj6hx-.js} +1 -1
  57. package/web/dist/assets/{follow-up-engine-DdOuj1vD.js → follow-up-engine-CtQET2Gk.js} +1 -1
  58. package/web/dist/assets/{git-pull-request-CpZa7Dp_.js → git-pull-request-Dn6hbJCp.js} +1 -1
  59. package/web/dist/assets/{git-pull-request-draft-B33EWtbV.js → git-pull-request-draft-DMJoWOzT.js} +1 -1
  60. package/web/dist/assets/git-tab-loading-DRzJyl-N.js +1 -0
  61. package/web/dist/assets/{github-BjxwiTwY.js → github-bv8FE28h.js} +1 -1
  62. package/web/dist/assets/{host-usage-CDpnKhpC.js → host-usage-8u1P8Viv.js} +1 -1
  63. package/web/dist/assets/{icon-tooltip-CpsXef-c.js → icon-tooltip-k0lc8_EA.js} +1 -1
  64. package/web/dist/assets/{impact-control-B2GBQQLp.js → impact-control-ooFD5VlK.js} +1 -1
  65. package/web/dist/assets/{impact-model-D4KVLSn6.js → impact-model-DGijTkUy.js} +1 -1
  66. package/web/dist/assets/{index-A6xQzTWj.css → index-1J0WQj4l.css} +1 -1
  67. package/web/dist/assets/{index-Ct9T_tFd.js → index-DoSdB2ET.js} +8 -8
  68. package/web/dist/assets/{input-BSqn6JtL.js → input-Bo1imuXF.js} +1 -1
  69. package/web/dist/assets/{layers-Bug2fAvw.js → layers-Dd2qRgCN.js} +1 -1
  70. package/web/dist/assets/{layout-cards-Cwst8PJw.js → layout-cards-B5JEYmLW.js} +1 -1
  71. package/web/dist/assets/{layout-dashboard-BAubYxnA.js → layout-dashboard-ITAXq6Sy.js} +1 -1
  72. package/web/dist/assets/{layout-grid-MhSVk5qO.js → layout-grid-BiAzEkCb.js} +1 -1
  73. package/web/dist/assets/loader-circle-Cui00Bvo.js +1 -0
  74. package/web/dist/assets/{loading-state-DATJDqBy.js → loading-state-Dhvil8if.js} +1 -1
  75. package/web/dist/assets/manager-chat-CkjgGnDk.js +2 -0
  76. package/web/dist/assets/{manager-index-D_-eDLpM.js → manager-index-CctpPj8L.js} +1 -1
  77. package/web/dist/assets/{manager-new-Cri-amtt.js → manager-new-DpJ3DNQV.js} +1 -1
  78. package/web/dist/assets/{managers-DHBnNJZ4.js → managers-B8Q_qq_V.js} +1 -1
  79. package/web/dist/assets/{markdown-ADbh0HPn.js → markdown-BjrwqaM5.js} +1 -1
  80. package/web/dist/assets/{markdown-CBVEpnsZ.js → markdown-bxQHTAjm.js} +1 -1
  81. package/web/dist/assets/{mascot-picker-C_AQNJ93.js → mascot-picker-C3nV7X8x.js} +1 -1
  82. package/web/dist/assets/{message-square-B7hjyWJt.js → message-square-C1BrnOPB.js} +1 -1
  83. package/web/dist/assets/{new-task-form-BkXdrh7Y.js → new-task-form-BtjyDhgg.js} +1 -1
  84. package/web/dist/assets/{pencil-C2E3Yprp.js → pencil-_xlnGuBd.js} +1 -1
  85. package/web/dist/assets/{picker-pill-CfQUenwy.js → picker-pill-CR3zbU2G.js} +1 -1
  86. package/web/dist/assets/play-BgVRIBuo.js +1 -0
  87. package/web/dist/assets/plus-BFYUEsBF.js +1 -0
  88. package/web/dist/assets/{project-router-DoRww9nV.js → project-router-CsXhOgqw.js} +1 -1
  89. package/web/dist/assets/{queries-Yp3t6lQN.js → queries-asoNxkgM.js} +1 -1
  90. package/web/dist/assets/{reasoning-effort-pill-yGHvDn-K.js → reasoning-effort-pill-Dn21FEr4.js} +1 -1
  91. package/web/dist/assets/{reference-chip-D2Zv3Chy.js → reference-chip-CZLftG5y.js} +1 -1
  92. package/web/dist/assets/{reference-conflict-action-DH3m8Snx.js → reference-conflict-action-BmVFx61F.js} +1 -1
  93. package/web/dist/assets/{refresh-cw-6h6pjapS.js → refresh-cw-uIz11ziI.js} +1 -1
  94. package/web/dist/assets/{repo-git-ByyS4Inr.js → repo-git-CMeb2Inv.js} +1 -1
  95. package/web/dist/assets/{run-actions-DO1L2MJG.js → run-actions-BfR2L33Y.js} +1 -1
  96. package/web/dist/assets/{run-diff-CqEccQNf.js → run-diff-492yZ_ng.js} +1 -1
  97. package/web/dist/assets/{save-T_9Xw_xC.js → save-CfGVClJZ.js} +1 -1
  98. package/web/dist/assets/{scroll-within-CahGdKmK.js → scroll-within-H2hsTWU1.js} +1 -1
  99. package/web/dist/assets/search-CCsNICot.js +1 -0
  100. package/web/dist/assets/{search-x-ddjjfjOR.js → search-x-PEeJJIcD.js} +1 -1
  101. package/web/dist/assets/{settings-2-BVS7ZTIX.js → settings-2-BvfKKVNb.js} +1 -1
  102. package/web/dist/assets/{sheet-CwgVTEns.js → sheet-CFWHl88G.js} +1 -1
  103. package/web/dist/assets/{skills-CZXSTXsC.js → skills-C3vud5eV.js} +1 -1
  104. package/web/dist/assets/square-Celzy2vK.js +1 -0
  105. package/web/dist/assets/{status-dot-Dvhlv1BC.js → status-dot-DLgwOXup.js} +1 -1
  106. package/web/dist/assets/{tabs-DBLdL2FO.js → tabs-lXxDwjOa.js} +1 -1
  107. package/web/dist/assets/{tag-DxHXE-wW.js → tag-8N6lnPs5.js} +1 -1
  108. package/web/dist/assets/{task-commits-_VOh2pQm.js → task-commits-BDQDbgqJ.js} +1 -1
  109. package/web/dist/assets/{task-graph-DdQmtXtW.js → task-graph-Cr7UHyHH.js} +1 -1
  110. package/web/dist/assets/{task-notes-ChoWQxeh.js → task-notes-BLJJHNQs.js} +1 -1
  111. package/web/dist/assets/{task-workspace-DzIyb2Rj.js → task-workspace-CAlMH_wp.js} +9 -9
  112. package/web/dist/assets/terminal-DnHkHT7p.js +1 -0
  113. package/web/dist/assets/{terminal-drawer-D8W-NGRq.js → terminal-drawer-BflnRYVX.js} +1 -1
  114. package/web/dist/assets/{terminal-pane-pCn3tXmN.js → terminal-pane-DatIo97e.js} +1 -1
  115. package/web/dist/assets/{textarea-Pc-9sJOI.js → textarea-Bt3yxj8Z.js} +1 -1
  116. package/web/dist/assets/{toaster-C_y6XzIl.js → toaster-Br0ct9_Z.js} +1 -1
  117. package/web/dist/assets/{tooltip-BqGo-FWe.js → tooltip-Dotb49FS.js} +1 -1
  118. package/web/dist/assets/{tracker-otNdKhnI.js → tracker-DOV--g63.js} +1 -1
  119. package/web/dist/assets/{triangle-alert-DVX_k_m5.js → triangle-alert-Wtp5TYt3.js} +1 -1
  120. package/web/dist/assets/{upload-D-u9O0qw.js → upload-DD7spo_6.js} +1 -1
  121. package/web/dist/assets/{use-now-r58UBOHx.js → use-now-CW7IKKZL.js} +1 -1
  122. package/web/dist/assets/{use-submit-shortcut-DIq9F2cr.js → use-submit-shortcut-BaSey_yZ.js} +1 -1
  123. package/web/dist/assets/user-round-DBkNf1no.js +1 -0
  124. package/web/dist/assets/{utils-ZD7FxkMQ.js → utils-pR7PY6T2.js} +1 -1
  125. package/web/dist/assets/{workflow-OAQZ0r37.js → workflow-BeGfAFZR.js} +1 -1
  126. package/web/dist/assets/{workflow-graph-DZJL1Oap.js → workflow-graph-CTEWZgtS.js} +1 -1
  127. package/web/dist/assets/{worktree-lifecycle-MYvTfeZ4.js → worktree-lifecycle-CxVjHwd0.js} +1 -1
  128. package/web/dist/assets/{worktree-lifecycle-operation-BDQ_KGum.js → worktree-lifecycle-operation-CAxN4OGU.js} +1 -1
  129. package/web/dist/assets/x-BAuyYFAr.js +1 -0
  130. package/web/dist/assets/{zoomable-image-ChQMJhjj.js → zoomable-image-BwxHVjLy.js} +1 -1
  131. package/web/dist/index.html +71 -72
  132. package/dist/managers/failure.d.ts +0 -16
  133. package/dist/managers/failure.js +0 -86
  134. package/dist/managers/failure.js.map +0 -1
  135. package/web/dist/assets/arrow-down-nB3lGbzm.js +0 -1
  136. package/web/dist/assets/arrow-up-BVbLdh-R.js +0 -1
  137. package/web/dist/assets/check-orsvCGyv.js +0 -1
  138. package/web/dist/assets/chevron-left-CG6vKofy.js +0 -1
  139. package/web/dist/assets/chevron-right-B8IOqpGj.js +0 -1
  140. package/web/dist/assets/circle-check-2ALD_33J.js +0 -1
  141. package/web/dist/assets/composer-attachments-CqhCuPRB.js +0 -5
  142. package/web/dist/assets/git-tab-loading-CCgyd2xG.js +0 -1
  143. package/web/dist/assets/loader-circle-BkOVocXc.js +0 -1
  144. package/web/dist/assets/manager-chat-BW3V0FiJ.js +0 -2
  145. package/web/dist/assets/message-square-text-BcSFBtgG.js +0 -1
  146. package/web/dist/assets/play-DIubYIrk.js +0 -1
  147. package/web/dist/assets/plus-CnXWioUC.js +0 -1
  148. package/web/dist/assets/search-BTmt5bTM.js +0 -1
  149. package/web/dist/assets/square-Vyt4hoh9.js +0 -1
  150. package/web/dist/assets/terminal-COzT-Oxe.js +0 -1
  151. package/web/dist/assets/user-round-C5TXrndE.js +0 -1
  152. package/web/dist/assets/x-BG9ACdmv.js +0 -1
@@ -2853,11 +2853,6 @@ var managerJobSchema = z19.object({
2853
2853
  var managerJobInputSchema = managerJobSchema.omit({ id: true, lastRunAt: true }).extend({
2854
2854
  id: z19.string().min(1).max(64).optional()
2855
2855
  });
2856
- var managerQuickPromptSchema = z19.object({
2857
- label: z19.string().trim().min(1).max(24),
2858
- prompt: z19.string().trim().min(1).max(2e3)
2859
- });
2860
- var MANAGER_QUICK_PROMPTS_MAX = 6;
2861
2856
  var managerMascotSchema = z19.enum([
2862
2857
  "base",
2863
2858
  "builder",
@@ -2890,8 +2885,6 @@ var managerSchema = z19.object({
2890
2885
  cronMinutes: managerCronMinutesSchema,
2891
2886
  /** false silences system notifications; the chat and unread dot stay. Absent = on. */
2892
2887
  notify: z19.boolean().optional(),
2893
- /** Absent or empty: no chip row at all. */
2894
- quickPrompts: z19.array(managerQuickPromptSchema).max(MANAGER_QUICK_PROMPTS_MAX).optional(),
2895
2888
  jobs: z19.array(managerJobSchema).max(32),
2896
2889
  createdAt: z19.string(),
2897
2890
  updatedAt: z19.string()
@@ -2948,8 +2941,6 @@ var updateManagerInputSchema = z19.object({
2948
2941
  avatar: z19.number().int().min(0).max(63).optional(),
2949
2942
  mascot: managerMascotSchema.optional(),
2950
2943
  notify: z19.boolean().optional(),
2951
- /** Replaces the whole list; `[]` removes every chip. */
2952
- quickPrompts: z19.array(managerQuickPromptSchema).max(MANAGER_QUICK_PROMPTS_MAX).optional(),
2953
2944
  jobs: z19.array(managerJobInputSchema).max(32).optional()
2954
2945
  });
2955
2946
  var managerListResponseSchema = z19.object({ managers: z19.array(managerSummarySchema) });
@@ -5740,7 +5731,6 @@ export {
5740
5731
  MANAGER_MESSAGE_LABELS,
5741
5732
  MANAGER_MESSAGE_VIAS,
5742
5733
  MANAGER_NOTIFICATION_KINDS,
5743
- MANAGER_QUICK_PROMPTS_MAX,
5744
5734
  MAX_ATTACHMENTS_PER_MESSAGE,
5745
5735
  MAX_ATTACHMENTS_TOTAL_BASE64,
5746
5736
  MAX_AUTOMATION_SCHEDULES,
@@ -6110,7 +6100,6 @@ export {
6110
6100
  managerProjectsSchema,
6111
6101
  managerProposeActionInputSchema,
6112
6102
  managerProposeActionResponseSchema,
6113
- managerQuickPromptSchema,
6114
6103
  managerSchema,
6115
6104
  managerSendResponseSchema,
6116
6105
  managerSnapshotPrSchema,
@@ -60,13 +60,6 @@ export declare const managerJobInputSchema: z.ZodObject<{
60
60
  enabled: z.ZodBoolean;
61
61
  id: z.ZodOptional<z.ZodString>;
62
62
  }, z.core.$strip>;
63
- /** A chip above the chat composer that sends its prompt. Only the user's own: there are no defaults. */
64
- export declare const managerQuickPromptSchema: z.ZodObject<{
65
- label: z.ZodString;
66
- prompt: z.ZodString;
67
- }, z.core.$strip>;
68
- export type ManagerQuickPrompt = z.infer<typeof managerQuickPromptSchema>;
69
- export declare const MANAGER_QUICK_PROMPTS_MAX = 6;
70
63
  /** Stable visual identities, independent of a manager's instructions and permissions. */
71
64
  export declare const managerMascotSchema: z.ZodEnum<{
72
65
  analyst: "analyst";
@@ -116,10 +109,6 @@ export declare const managerSchema: z.ZodObject<{
116
109
  agentProfile: z.ZodOptional<z.ZodString>;
117
110
  cronMinutes: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<5>, z.ZodLiteral<15>, z.ZodLiteral<30>, z.ZodLiteral<60>, z.ZodLiteral<240>, z.ZodLiteral<1440>]>;
118
111
  notify: z.ZodOptional<z.ZodBoolean>;
119
- quickPrompts: z.ZodOptional<z.ZodArray<z.ZodObject<{
120
- label: z.ZodString;
121
- prompt: z.ZodString;
122
- }, z.core.$strip>>>;
123
112
  jobs: z.ZodArray<z.ZodObject<{
124
113
  id: z.ZodString;
125
114
  name: z.ZodString;
@@ -174,10 +163,6 @@ export declare const managerSummarySchema: z.ZodObject<{
174
163
  agentProfile: z.ZodOptional<z.ZodString>;
175
164
  cronMinutes: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<5>, z.ZodLiteral<15>, z.ZodLiteral<30>, z.ZodLiteral<60>, z.ZodLiteral<240>, z.ZodLiteral<1440>]>;
176
165
  notify: z.ZodOptional<z.ZodBoolean>;
177
- quickPrompts: z.ZodOptional<z.ZodArray<z.ZodObject<{
178
- label: z.ZodString;
179
- prompt: z.ZodString;
180
- }, z.core.$strip>>>;
181
166
  jobs: z.ZodArray<z.ZodObject<{
182
167
  id: z.ZodString;
183
168
  name: z.ZodString;
@@ -276,10 +261,6 @@ export declare const updateManagerInputSchema: z.ZodObject<{
276
261
  scout: "scout";
277
262
  }>>;
278
263
  notify: z.ZodOptional<z.ZodBoolean>;
279
- quickPrompts: z.ZodOptional<z.ZodArray<z.ZodObject<{
280
- label: z.ZodString;
281
- prompt: z.ZodString;
282
- }, z.core.$strip>>>;
283
264
  jobs: z.ZodOptional<z.ZodArray<z.ZodObject<{
284
265
  name: z.ZodString;
285
266
  prompt: z.ZodString;
@@ -325,10 +306,6 @@ export declare const managerListResponseSchema: z.ZodObject<{
325
306
  agentProfile: z.ZodOptional<z.ZodString>;
326
307
  cronMinutes: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<5>, z.ZodLiteral<15>, z.ZodLiteral<30>, z.ZodLiteral<60>, z.ZodLiteral<240>, z.ZodLiteral<1440>]>;
327
308
  notify: z.ZodOptional<z.ZodBoolean>;
328
- quickPrompts: z.ZodOptional<z.ZodArray<z.ZodObject<{
329
- label: z.ZodString;
330
- prompt: z.ZodString;
331
- }, z.core.$strip>>>;
332
309
  jobs: z.ZodArray<z.ZodObject<{
333
310
  id: z.ZodString;
334
311
  name: z.ZodString;
@@ -975,10 +952,6 @@ export declare const managerChangeEventSchema: z.ZodObject<{
975
952
  agentProfile: z.ZodOptional<z.ZodString>;
976
953
  cronMinutes: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<5>, z.ZodLiteral<15>, z.ZodLiteral<30>, z.ZodLiteral<60>, z.ZodLiteral<240>, z.ZodLiteral<1440>]>;
977
954
  notify: z.ZodOptional<z.ZodBoolean>;
978
- quickPrompts: z.ZodOptional<z.ZodArray<z.ZodObject<{
979
- label: z.ZodString;
980
- prompt: z.ZodString;
981
- }, z.core.$strip>>>;
982
955
  jobs: z.ZodArray<z.ZodObject<{
983
956
  id: z.ZodString;
984
957
  name: z.ZodString;
@@ -18,8 +18,6 @@ export declare function transientRetryDelayMs(attempt: number, error: string | u
18
18
  export declare function transientRetryCap(error: string | undefined): number;
19
19
  /** Whether the failure is the OAuth refresh race — its exhaustion message names the cause. */
20
20
  export declare function isOauthRefreshRace(error: string | undefined): boolean;
21
- /** The product name a user knows a backend by, or undefined for one without a fixed name. */
22
- export declare function agentBackendName(backend: string | undefined): string | undefined;
23
21
  /**
24
22
  * What the user can do about an account- or conversation-state failure, or undefined when the
25
23
  * class has nothing to add (a transient failure, a bug, a usage limit whose reset the provider named —
@@ -89,10 +89,6 @@ export function isOauthRefreshRace(error) {
89
89
  const BACKEND_NAMES = {
90
90
  claude: 'Claude Code', codex: 'Codex', opencode: 'OpenCode', cursor: 'Cursor', copilot: 'Copilot',
91
91
  };
92
- /** The product name a user knows a backend by, or undefined for one without a fixed name. */
93
- export function agentBackendName(backend) {
94
- return BACKEND_NAMES[backend ?? ''];
95
- }
96
92
  /**
97
93
  * What the user can do about an account- or conversation-state failure, or undefined when the
98
94
  * class has nothing to add (a transient failure, a bug, a usage limit whose reset the provider named —
@@ -1 +1 @@
1
- {"version":3,"file":"agent-failure-class.js","sourceRoot":"","sources":["../../src/core/agent-failure-class.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,oEAAoE;AACpE,MAAM,mBAAmB,GAAG,8CAA8C,CAAC;AAE3E;yFACyF;AACzF,MAAM,qBAAqB,GAAG,gDAAgD,CAAC;AAE/E,MAAM,WAAW,GAAG;IAClB,gCAAgC,EAAE,oBAAoB;IACtD,6BAA6B,EAAE,+BAA+B;IAC9D,kCAAkC;IAClC,iDAAiD,EAAE,gDAAgD;CAC3F,CAAC;AAEX,MAAM,qBAAqB,GAAG;IAC5B,uCAAuC,EAAE,oBAAoB;IAC7D,yBAAyB,EAAE,SAAS;IACpC,8BAA8B,EAAE,+BAA+B;IAC/D,iCAAiC;CACzB,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,mCAAmC,EAAE,oBAAoB;IACzD,uBAAuB;IACvB,iEAAiE,EAAE,wBAAwB;IAC3F,2BAA2B,EAAE,oBAAoB;IACjD,0CAA0C,EAAE,mBAAmB;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C;AAED,MAAM,aAAa,GAA2B;IAC5C,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS;CAClG,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAA0B,EAC1B,OAA2B,EAC3B,IAAI,GAA6B,EAAE;IAEnC,MAAM,IAAI,GAAG,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IAC1C,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,MAAM;YACT,OAAO,GAAG,IAAI,IAAI,WAAW,6JAA6J,CAAC;QAC7L,KAAK,SAAS;YACZ,OAAO,OAAO,IAAI,IAAI,OAAO,2GAA2G,CAAC;QAC3I,KAAK,aAAa;YAChB,OAAO,IAAI,CAAC,UAAU;gBACpB,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,OAAO,IAAI,IAAI,OAAO,yIAAyI,CAAC;QACtK,KAAK,mBAAmB;YACtB,OAAO,oCAAoC,IAAI,IAAI,WAAW,wIAAwI,CAAC;QACzM;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC"}
@@ -34,8 +34,6 @@ export interface ManagerEngineDeps {
34
34
  now?: () => number;
35
35
  /** Test seam for `TURN_LIMIT_MS`. */
36
36
  turnLimitMs?: number;
37
- /** Test seam for `RETRY_BACKOFF_MS`. */
38
- retryDelayMs?: number;
39
37
  }
40
38
  export declare const MANAGER_ALLOWED_TOOLS: string[];
41
39
  /** Write and Edit inside `files/` only: the workdir itself holds `.claude/`, which would widen the fence. */
@@ -123,8 +121,6 @@ export declare class ManagerEngine {
123
121
  private watchTurn;
124
122
  /** `manager_turn_completed`, and the turn's duration as a timing (stopped turns time nothing). */
125
123
  private reportTurn;
126
- /** Keeps a failed turn's real cause in the cockpit log and the manager's state; returns the line a user may see. */
127
- private recordFailure;
128
124
  private addCost;
129
125
  /** One agent session, resumed when there is one; a failed resume restarts from a recap once. */
130
126
  private drive;
@@ -13,7 +13,6 @@ import { parseUsageLimit } from '../core/usage-limit.js';
13
13
  import { assertCezarHomeWriteIsSandboxed, managersDir } from '../paths.js';
14
14
  import { resolveProfileEnvForRoot } from '../workspace/agent-profiles.js';
15
15
  import { changedSettingFields, managerActionLabel, managerAgeLabel, managerCreatedLabel, MANAGER_TURN_TRIGGER, managerWorkflowLabel, } from './telemetry.js';
16
- import { classifyManagerFailure, failureCause, managerFailureMessage, retryPlan } from './failure.js';
17
16
  import { placeholderIn, placeholderRefusal, withForwarded } from './forward.js';
18
17
  import { chatPrompt, jobPrompt, MANAGER_IMPORTANT, managerSystemPrompt, MANAGER_QUIET, recapPrompt, watchPrompt } from './prompts.js';
19
18
  import { buildSnapshot, gateAttention, taskDetailRows } from './snapshot.js';
@@ -30,10 +29,6 @@ const LEASE_RETRY_LIMIT = 24;
30
29
  const TICK_FLOOR_MS = 5_000;
31
30
  const MAX_TIMER_MS = 2 ** 31 - 1;
32
31
  const MAX_WATCH_BACKOFF = 4;
33
- /** The pause before the one retry a passing failure (network, busy servers) earns. */
34
- const RETRY_BACKOFF_MS = 5_000;
35
- /** Failed watch checks in a row before the chat hears about them; fewer are logged quietly. */
36
- const WATCH_NOTICE_AFTER = 3;
37
32
  const OUTPUT_LIMIT = 4_000;
38
33
  const TAIL_BYTES = 256 * 1024;
39
34
  const PREVIEW_LIMIT = 120;
@@ -472,9 +467,7 @@ export class ManagerEngine {
472
467
  const kept = value ?? current[key];
473
468
  return kept === undefined ? {} : { [key]: kept };
474
469
  };
475
- const { runner: _runner, model: _model, effort: _effort, agentProfile: _agentProfile, quickPrompts: _quickPrompts, ...base } = current;
476
- // An emptied list is stored as no list.
477
- const quickPrompts = input.quickPrompts ?? current.quickPrompts;
470
+ const { runner: _runner, model: _model, effort: _effort, agentProfile: _agentProfile, ...base } = current;
478
471
  const previousJobs = new Map(current.jobs.map((job) => [job.id, job]));
479
472
  const next = {
480
473
  ...base,
@@ -487,7 +480,6 @@ export class ManagerEngine {
487
480
  ...(input.avatar !== undefined ? { avatar: input.avatar } : {}),
488
481
  ...(input.mascot !== undefined ? { mascot: input.mascot } : {}),
489
482
  ...(input.notify !== undefined ? { notify: input.notify } : {}),
490
- ...(quickPrompts?.length ? { quickPrompts } : {}),
491
483
  ...(input.jobs
492
484
  ? {
493
485
  jobs: input.jobs.map((job) => {
@@ -859,11 +851,7 @@ export class ManagerEngine {
859
851
  return 'failed';
860
852
  this.addCost(id, result.costUsd);
861
853
  const resetAt = this.usageLimit(result, turn);
862
- const cause = result.error ? failureCause(result.error, result.text) : undefined;
863
- const failed = cause && !turn.stopped && !resetAt ? this.recordFailure(id, kind, cause, result.runner) : undefined;
864
- // The CLI's own error line, echoed as the reply, is the cause the human line replaces.
865
- const reply = failed && result.text.trim() === cause?.trim() ? '' : result.text;
866
- const judgement = judged(reply.replace(QUIET_LINE, '').trim());
854
+ const judgement = judged(result.text.replace(QUIET_LINE, '').trim());
867
855
  this.publish(id, {
868
856
  ...base,
869
857
  text: judgement.text,
@@ -871,7 +859,7 @@ export class ManagerEngine {
871
859
  streaming: false,
872
860
  commands: result.commands,
873
861
  ...(turn.timedOut ? { error: TURN_LIMIT_ERROR } : turn.stopped ? { stopped: true } : {}),
874
- ...(resetAt ? { resumeAt: resetAt.toISOString() } : failed ? { error: failed } : {}),
862
+ ...(resetAt ? { resumeAt: resetAt.toISOString() } : result.error && !turn.stopped ? { error: result.error } : {}),
875
863
  ...(this.deps.costVisible() && result.costUsd > 0 ? { costUsd: result.costUsd } : {}),
876
864
  }, true);
877
865
  if (resetAt) {
@@ -935,27 +923,26 @@ export class ManagerEngine {
935
923
  return;
936
924
  }
937
925
  if (error) {
938
- // Nobody asked for this turn: the cause goes to diagnostics, and the chat hears only of a streak.
939
- const advice = turn.timedOut ? TURN_LIMIT_ERROR : this.recordFailure(id, 'watch', failureCause(error, result.text), result.runner);
940
- const failures = store.updateState(id, (state) => ({ ...state, watchFailures: state.watchFailures + 1 })).watchFailures;
941
- if (failures < WATCH_NOTICE_AFTER)
942
- return;
943
- const text = `Background checks keep failing. ${advice}`;
944
- // One line for the whole streak: a dead login must not add a message every check.
945
- const noticeId = store.state(id).watchNoticeId;
946
- const repeat = lastMessage?.kind === 'notice' && lastMessage.id === noticeId ? lastMessage : undefined;
947
- if (repeat?.text === text)
948
- return;
949
- const notice = { id: repeat?.id ?? randomUUID(), seq: repeat?.seq ?? store.nextSeq(id), at: this.iso(), kind: 'notice', text };
950
- this.publish(id, notice, true);
951
- store.updateState(id, (state) => ({ ...state, watchNoticeId: notice.id }));
926
+ store.updateState(id, (state) => ({ ...state, watchFailures: state.watchFailures + 1 }));
927
+ // One line for a run of failures: a dead login must not add a message every 15 minutes.
928
+ const repeat = lastMessage?.kind === 'assistant' && lastMessage.turn === 'watch' && lastMessage.error ? lastMessage : undefined;
929
+ this.publish(id, {
930
+ id: repeat?.id ?? randomUUID(),
931
+ seq: repeat?.seq ?? store.nextSeq(id),
932
+ at: this.iso(),
933
+ kind: 'assistant',
934
+ turn: 'watch',
935
+ text: '',
936
+ streaming: false,
937
+ commands: [],
938
+ error,
939
+ }, true);
952
940
  return;
953
941
  }
954
942
  const reportedAt = this.iso();
955
943
  store.updateState(id, (state) => ({
956
944
  ...state,
957
945
  watchFailures: 0,
958
- watchNoticeId: undefined,
959
946
  reported: { ...state.reported, ...Object.fromEntries(snapshot.attention.map((item) => [item.key, reportedAt])) },
960
947
  }));
961
948
  const raw = result.text.trim();
@@ -997,13 +984,6 @@ export class ManagerEngine {
997
984
  outcome: turn.timedOut ? 'timeout' : outcome === 'error' ? 'error' : 'ok',
998
985
  });
999
986
  }
1000
- /** Keeps a failed turn's real cause in the cockpit log and the manager's state; returns the line a user may see. */
1001
- recordFailure(id, turn, cause, runner) {
1002
- const kind = classifyManagerFailure(cause);
1003
- console.warn(`[cezar] manager ${id}: ${turn} turn failed (${kind}): ${cause}`);
1004
- this.deps.store.updateState(id, (state) => ({ ...state, lastFailure: { at: this.iso(), turn, kind, cause: cause.slice(0, OUTPUT_LIMIT) } }));
1005
- return managerFailureMessage(kind, cause, runner, kind === 'usage-limit' ? parseUsageLimit(cause, this.now())?.resetAt : undefined);
1006
- }
1007
987
  addCost(id, usd) {
1008
988
  if (usd > 0)
1009
989
  this.deps.store.updateState(id, (state) => ({ ...state, costUsd: state.costUsd + usd }));
@@ -1072,30 +1052,15 @@ export class ManagerEngine {
1072
1052
  ...(manager.effort && runnerSupportsReasoningEffort(runner) ? { reasoningEffort: manager.effort } : {}),
1073
1053
  };
1074
1054
  const first = await this.session(id, base, sessionKey, runner, resumeId, turn, onProgress);
1075
- // A turn that ran a command may have acted: running it twice could act twice.
1076
- if (!first.error || turn.stopped || turn.timedOut || first.commands.length > 0)
1077
- return { ...first, runner };
1078
- const cause = failureCause(first.error, first.text);
1079
- // A reply the user already read stays: a retry would replace it and bill it twice. The CLI's echo of its error is no reply.
1080
- const replied = first.text.trim() !== '' && first.text.trim() !== cause.trim();
1081
- if (replied)
1082
- return { ...first, runner };
1083
- const plan = retryPlan(classifyManagerFailure(cause), resumable);
1084
- if (plan === 'none')
1085
- return { ...first, runner };
1086
- if (plan === 'again') {
1087
- await new Promise((resolve) => setTimeout(resolve, this.deps.retryDelayMs ?? RETRY_BACKOFF_MS).unref?.());
1088
- if (turn.stopped || !store.get(id))
1089
- return { ...first, runner };
1090
- const again = await this.session(id, base, sessionKey, runner, resumeId, turn, onProgress);
1091
- return { ...again, costUsd: again.costUsd + first.costUsd, runner };
1092
- }
1055
+ const silent = !first.text && first.commands.length === 0;
1056
+ if (!resumable || !first.error || !silent || turn.stopped)
1057
+ return first;
1093
1058
  // Only a chat gets the transcript back: it holds what watches read.
1094
1059
  const recap = turn.kind === 'chat'
1095
1060
  ? recapPrompt(store.messages(id).filter((message) => !(message.kind === 'assistant' && message.streaming)))
1096
1061
  : '';
1097
1062
  const fresh = await this.session(id, { ...base, userPrompt: `${recap}${prompt}` }, sessionKey, runner, undefined, turn, onProgress);
1098
- return { ...fresh, costUsd: fresh.costUsd + first.costUsd, runner };
1063
+ return { ...fresh, costUsd: fresh.costUsd + first.costUsd };
1099
1064
  }
1100
1065
  async session(id, base, sessionKey, runnerId, resumeId, turn, onProgress) {
1101
1066
  const { store } = this.deps;
@@ -1155,9 +1120,8 @@ export class ManagerEngine {
1155
1120
  case 'cost':
1156
1121
  costUsd += event.usd;
1157
1122
  break;
1158
- // The first is the cause; the CLI's "exited with code 1" that follows it is only the effect.
1159
1123
  case 'error':
1160
- error ??= event.message;
1124
+ error = event.message;
1161
1125
  break;
1162
1126
  default:
1163
1127
  break;