@open-mercato/cezar 0.9.1 → 0.9.2-pr772.1071

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 (355) hide show
  1. package/README.md +36 -17
  2. package/dist/agent-config/account-identity.d.ts +44 -0
  3. package/dist/agent-config/account-identity.js +128 -0
  4. package/dist/agent-config/account-identity.js.map +1 -0
  5. package/dist/agent-config/catalog.d.ts +9 -1
  6. package/dist/agent-config/catalog.js +18 -0
  7. package/dist/agent-config/catalog.js.map +1 -1
  8. package/dist/agent-config/files.d.ts +1 -1
  9. package/dist/agent-config/model-settings/claude.d.ts +2 -0
  10. package/dist/agent-config/model-settings/claude.js +11 -0
  11. package/dist/agent-config/model-settings/claude.js.map +1 -0
  12. package/dist/agent-config/model-settings/codex.d.ts +2 -0
  13. package/dist/agent-config/model-settings/codex.js +16 -0
  14. package/dist/agent-config/model-settings/codex.js.map +1 -0
  15. package/dist/agent-config/model-settings/opencode.d.ts +2 -0
  16. package/dist/agent-config/model-settings/opencode.js +8 -0
  17. package/dist/agent-config/model-settings/opencode.js.map +1 -0
  18. package/dist/agent-config/model-settings/shared.d.ts +9 -0
  19. package/dist/agent-config/model-settings/shared.js +93 -0
  20. package/dist/agent-config/model-settings/shared.js.map +1 -0
  21. package/dist/agent-config/model-settings/types.d.ts +9 -0
  22. package/dist/agent-config/model-settings/types.js +2 -0
  23. package/dist/agent-config/model-settings/types.js.map +1 -0
  24. package/dist/agent-config/models.d.ts +9 -0
  25. package/dist/agent-config/models.js +30 -0
  26. package/dist/agent-config/models.js.map +1 -0
  27. package/dist/agent-config/service.d.ts +1 -1
  28. package/dist/agent-config/service.js +4 -4
  29. package/dist/agent-config/service.js.map +1 -1
  30. package/dist/agent-config/validate.d.ts +1 -1
  31. package/dist/automations/coordinator.d.ts +26 -0
  32. package/dist/automations/coordinator.js +66 -0
  33. package/dist/automations/coordinator.js.map +1 -0
  34. package/dist/automations/github-poller.d.ts +74 -0
  35. package/dist/automations/github-poller.js +234 -0
  36. package/dist/automations/github-poller.js.map +1 -0
  37. package/dist/automations/scheduler.d.ts +42 -0
  38. package/dist/automations/scheduler.js +192 -0
  39. package/dist/automations/scheduler.js.map +1 -0
  40. package/dist/automations/store.d.ts +65 -0
  41. package/dist/automations/store.js +298 -0
  42. package/dist/automations/store.js.map +1 -0
  43. package/dist/automations/task-template.d.ts +18 -0
  44. package/dist/automations/task-template.js +95 -0
  45. package/dist/automations/task-template.js.map +1 -0
  46. package/dist/automations/types.d.ts +251 -0
  47. package/dist/automations/types.js +158 -0
  48. package/dist/automations/types.js.map +1 -0
  49. package/dist/config.d.ts +17 -112
  50. package/dist/config.js +45 -4
  51. package/dist/config.js.map +1 -1
  52. package/dist/contract/agent-config.d.ts +151 -0
  53. package/dist/contract/agent-profiles.d.ts +332 -0
  54. package/dist/contract/automations.d.ts +919 -0
  55. package/dist/contract/events.d.ts +45 -0
  56. package/dist/contract/github.d.ts +467 -0
  57. package/dist/contract/health.d.ts +96 -0
  58. package/dist/contract/index.d.ts +16 -0
  59. package/dist/contract/index.js +1614 -0
  60. package/dist/contract/projects.d.ts +185 -0
  61. package/dist/contract/repo.d.ts +234 -0
  62. package/dist/contract/runs.d.ts +1261 -0
  63. package/dist/contract/skills.d.ts +229 -0
  64. package/dist/contract/workflows.d.ts +212 -0
  65. package/dist/contract/workspace.d.ts +490 -0
  66. package/dist/core/agent-env.d.ts +1 -1
  67. package/dist/core/agent-model-policy.d.ts +10 -0
  68. package/dist/core/agent-model-policy.js +36 -0
  69. package/dist/core/agent-model-policy.js.map +1 -0
  70. package/dist/core/agent-profiles.d.ts +59 -0
  71. package/dist/core/agent-profiles.js +83 -0
  72. package/dist/core/agent-profiles.js.map +1 -0
  73. package/dist/core/agent-runner.d.ts +12 -1
  74. package/dist/core/agent-runner.js +13 -0
  75. package/dist/core/agent-runner.js.map +1 -1
  76. package/dist/core/ask.d.ts +45 -124
  77. package/dist/core/ask.js +103 -13
  78. package/dist/core/ask.js.map +1 -1
  79. package/dist/core/backend-detect.js +7 -2
  80. package/dist/core/backend-detect.js.map +1 -1
  81. package/dist/core/claude-cli-runner.d.ts +2 -2
  82. package/dist/core/claude-cli-runner.js +52 -9
  83. package/dist/core/claude-cli-runner.js.map +1 -1
  84. package/dist/core/claude-ui-mapper.d.ts +1 -1
  85. package/dist/core/codex-app-server-runner.d.ts +1 -1
  86. package/dist/core/codex-app-server-runner.js +60 -3
  87. package/dist/core/codex-app-server-runner.js.map +1 -1
  88. package/dist/core/codex-app-server-transport.d.ts +6 -1
  89. package/dist/core/codex-app-server-transport.js +12 -3
  90. package/dist/core/codex-app-server-transport.js.map +1 -1
  91. package/dist/core/codex-model-catalog.d.ts +1 -1
  92. package/dist/core/codex-ui-mapper.d.ts +5 -1
  93. package/dist/core/codex-ui-mapper.js +74 -17
  94. package/dist/core/codex-ui-mapper.js.map +1 -1
  95. package/dist/core/model-identity.d.ts +13 -6
  96. package/dist/core/model-identity.js +32 -17
  97. package/dist/core/model-identity.js.map +1 -1
  98. package/dist/core/model-presets.d.ts +2 -2
  99. package/dist/core/model-presets.js +1 -1
  100. package/dist/core/opencode-server-runner.d.ts +2 -2
  101. package/dist/core/opencode-ui-mapper.d.ts +4 -1
  102. package/dist/core/opencode-ui-mapper.js +45 -7
  103. package/dist/core/opencode-ui-mapper.js.map +1 -1
  104. package/dist/core/provider-auth.d.ts +154 -0
  105. package/dist/core/provider-auth.js +488 -0
  106. package/dist/core/provider-auth.js.map +1 -0
  107. package/dist/core/provider-availability.d.ts +3 -0
  108. package/dist/core/provider-availability.js +14 -0
  109. package/dist/core/provider-availability.js.map +1 -0
  110. package/dist/core/runner-factory.d.ts +1 -1
  111. package/dist/core/runner-model-catalog.d.ts +1 -1
  112. package/dist/core/shell-env.d.ts +28 -0
  113. package/dist/core/shell-env.js +56 -0
  114. package/dist/core/shell-env.js.map +1 -0
  115. package/dist/core/tool-display.d.ts +1 -1
  116. package/dist/core/ui-events.d.ts +1 -1
  117. package/dist/core/ui-events.js +1 -1
  118. package/dist/core/usage-limit.d.ts +42 -0
  119. package/dist/core/usage-limit.js +209 -0
  120. package/dist/core/usage-limit.js.map +1 -0
  121. package/dist/git-diff-base.d.ts +60 -0
  122. package/dist/git-diff-base.js +54 -0
  123. package/dist/git-diff-base.js.map +1 -0
  124. package/dist/git-worktree.d.ts +37 -6
  125. package/dist/git-worktree.js +39 -9
  126. package/dist/git-worktree.js.map +1 -1
  127. package/dist/handoff.d.ts +2 -2
  128. package/dist/handoff.js +1 -1
  129. package/dist/index.js +65 -8
  130. package/dist/index.js.map +1 -1
  131. package/dist/paths.d.ts +69 -6
  132. package/dist/paths.js +86 -9
  133. package/dist/paths.js.map +1 -1
  134. package/dist/planner.d.ts +2 -2
  135. package/dist/planner.js +7 -1
  136. package/dist/planner.js.map +1 -1
  137. package/dist/release/manifests.d.ts +81 -0
  138. package/dist/release/manifests.js +74 -0
  139. package/dist/release/manifests.js.map +1 -0
  140. package/dist/release/snapshot.d.ts +9 -23
  141. package/dist/release/snapshot.js +9 -22
  142. package/dist/release/snapshot.js.map +1 -1
  143. package/dist/release/stable.d.ts +15 -29
  144. package/dist/release/stable.js +14 -27
  145. package/dist/release/stable.js.map +1 -1
  146. package/dist/runs/auto-name.d.ts +1 -1
  147. package/dist/runs/auto-name.js +6 -1
  148. package/dist/runs/auto-name.js.map +1 -1
  149. package/dist/runs/retention.d.ts +1 -1
  150. package/dist/runs/store.d.ts +149 -336
  151. package/dist/runs/store.js +187 -9
  152. package/dist/runs/store.js.map +1 -1
  153. package/dist/runs/ui-event-sink.d.ts +1 -1
  154. package/dist/server/app-type.d.ts +21 -0
  155. package/dist/server/app-type.js +2 -0
  156. package/dist/server/app-type.js.map +1 -0
  157. package/dist/server/capabilities.d.ts +6 -5
  158. package/dist/server/capabilities.js +11 -0
  159. package/dist/server/capabilities.js.map +1 -1
  160. package/dist/server/forge/github.d.ts +58 -151
  161. package/dist/server/forge/github.js +530 -6
  162. package/dist/server/forge/github.js.map +1 -1
  163. package/dist/server/forge/index.d.ts +10 -3
  164. package/dist/server/forge/index.js +14 -1
  165. package/dist/server/forge/index.js.map +1 -1
  166. package/dist/server/forge/types.d.ts +86 -1
  167. package/dist/server/git-changes.d.ts +8 -8
  168. package/dist/server/git-changes.js +14 -17
  169. package/dist/server/git-changes.js.map +1 -1
  170. package/dist/server/git.d.ts +2 -0
  171. package/dist/server/git.js +9 -0
  172. package/dist/server/git.js.map +1 -1
  173. package/dist/server/github.d.ts +3 -3
  174. package/dist/server/github.js +1 -1
  175. package/dist/server/github.js.map +1 -1
  176. package/dist/server/open-in-terminal.d.ts +8 -1
  177. package/dist/server/open-in-terminal.js +16 -8
  178. package/dist/server/open-in-terminal.js.map +1 -1
  179. package/dist/server/pr.d.ts +2 -2
  180. package/dist/server/project-context.d.ts +20 -3
  181. package/dist/server/project-context.js +30 -1
  182. package/dist/server/project-context.js.map +1 -1
  183. package/dist/server/provider-action-gate.d.ts +8 -0
  184. package/dist/server/provider-action-gate.js +54 -0
  185. package/dist/server/provider-action-gate.js.map +1 -0
  186. package/dist/server/provider-auth-runtime.d.ts +21 -0
  187. package/dist/server/provider-auth-runtime.js +66 -0
  188. package/dist/server/provider-auth-runtime.js.map +1 -0
  189. package/dist/server/server.d.ts +12128 -47
  190. package/dist/server/server.js +2652 -917
  191. package/dist/server/server.js.map +1 -1
  192. package/dist/server/validators.d.ts +97 -0
  193. package/dist/server/validators.js +86 -0
  194. package/dist/server/validators.js.map +1 -0
  195. package/dist/server/ws.d.ts +2 -2
  196. package/dist/server/ws.js +2 -2
  197. package/dist/server/ws.js.map +1 -1
  198. package/dist/server-install/engine.d.ts +1 -1
  199. package/dist/server-install/platforms/macosx-ngrok.d.ts +1 -1
  200. package/dist/server-install/platforms/ubuntu-vps.d.ts +16 -1
  201. package/dist/server-install/platforms/ubuntu-vps.js +83 -1
  202. package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
  203. package/dist/server-install/state.d.ts +1 -1
  204. package/dist/server-install/steps.d.ts +2 -2
  205. package/dist/server-install/strategies.d.ts +1 -1
  206. package/dist/server-install/types.d.ts +38 -424
  207. package/dist/server-install/ui.d.ts +1 -1
  208. package/dist/skills-banner.d.ts +7 -6
  209. package/dist/skills-banner.js +7 -6
  210. package/dist/skills-banner.js.map +1 -1
  211. package/dist/skills-remote.d.ts +2 -2
  212. package/dist/skills-update.d.ts +88 -0
  213. package/dist/skills-update.js +392 -0
  214. package/dist/skills-update.js.map +1 -0
  215. package/dist/skills.d.ts +2 -0
  216. package/dist/skills.js +7 -2
  217. package/dist/skills.js.map +1 -1
  218. package/dist/todos.d.ts +2 -28
  219. package/dist/todos.js +1 -1
  220. package/dist/ui-state.d.ts +16 -2
  221. package/dist/ui-state.js +14 -1
  222. package/dist/ui-state.js.map +1 -1
  223. package/dist/workflows/load.d.ts +1 -1
  224. package/dist/workflows/run.d.ts +238 -12
  225. package/dist/workflows/run.js +1103 -115
  226. package/dist/workflows/run.js.map +1 -1
  227. package/dist/workflows/types.d.ts +59 -224
  228. package/dist/workflows/types.js +14 -0
  229. package/dist/workflows/types.js.map +1 -1
  230. package/dist/workspace/agent-accounts.d.ts +149 -0
  231. package/dist/workspace/agent-accounts.js +303 -0
  232. package/dist/workspace/agent-accounts.js.map +1 -0
  233. package/dist/workspace/agent-profiles.d.ts +78 -0
  234. package/dist/workspace/agent-profiles.js +115 -0
  235. package/dist/workspace/agent-profiles.js.map +1 -0
  236. package/dist/workspace/config.d.ts +82 -206
  237. package/dist/workspace/config.js +183 -14
  238. package/dist/workspace/config.js.map +1 -1
  239. package/dist/workspace/migrations.d.ts +1 -1
  240. package/dist/workspace/migrations.js +19 -4
  241. package/dist/workspace/migrations.js.map +1 -1
  242. package/dist/workspace/projects.d.ts +8 -2
  243. package/dist/workspace/projects.js +9 -3
  244. package/dist/workspace/projects.js.map +1 -1
  245. package/dist/workspace/semaphore.d.ts +45 -0
  246. package/dist/workspace/semaphore.js +45 -1
  247. package/dist/workspace/semaphore.js.map +1 -1
  248. package/dist/workspace/ui-state.d.ts +13 -3
  249. package/dist/workspace/ui-state.js +15 -5
  250. package/dist/workspace/ui-state.js.map +1 -1
  251. package/package.json +17 -39
  252. package/scripts/inline-contract.mjs +112 -0
  253. package/scripts/mock-claude.mjs +59 -1
  254. package/scripts/sync-readme.mjs +20 -0
  255. package/web/dist/assets/alert-dialog-LMDsWZ8t.js +1 -0
  256. package/web/dist/assets/arrow-down-CDJD8f8N.js +1 -0
  257. package/web/dist/assets/arrow-left-DUirK4gC.js +1 -0
  258. package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
  259. package/web/dist/assets/centered-state-CX0EhxaQ.js +43 -0
  260. package/web/dist/assets/chevron-right-B70aoBYh.js +1 -0
  261. package/web/dist/assets/{chunk-BO2N2NFS-DtrdTCWa.js → chunk-BO2N2NFS-DE6qKn3r.js} +8 -8
  262. package/web/dist/assets/circle-check-C6IhUojk.js +1 -0
  263. package/web/dist/assets/circle-x-hV9f6Ypp.js +1 -0
  264. package/web/dist/assets/collapsible-D2igywSh.js +1 -0
  265. package/web/dist/assets/commit-list-ocsM8XZs.js +1 -0
  266. package/web/dist/assets/compare-variants-CYdYsQBv.js +1 -0
  267. package/web/dist/assets/{core-DePtBHcl.js → core-BCsw8oQw.js} +1 -1
  268. package/web/dist/assets/diff-3y-HnHEH.js +3 -0
  269. package/web/dist/assets/diff-stat-OeTa1MCD.js +1 -0
  270. package/web/dist/assets/{diff-view-DCeSegKk.js → diff-view-D8VBKGxl.js} +4 -4
  271. package/web/dist/assets/dropdown-menu-B9UHiJFv.js +1 -0
  272. package/web/dist/assets/editable-title-C9aK-GCt.js +1 -0
  273. package/web/dist/assets/{ellipsis-vertical-CNnSLn5a.js → ellipsis-vertical-BVp0AyW4.js} +1 -1
  274. package/web/dist/assets/{file-D4GBh1ao.js → file-D1v6Cb9Q.js} +1 -1
  275. package/web/dist/assets/folder-HNaOtP70.js +1 -0
  276. package/web/dist/assets/{git-pull-request-DnR8Xh4_.js → git-pull-request-C6KuSF45.js} +1 -1
  277. package/web/dist/assets/git-toolbar-DpRPWLaM.js +1 -0
  278. package/web/dist/assets/github-UumAmuAM.js +1 -0
  279. package/web/dist/assets/highlighted-body-OFNGDK62-BL-MfFgl.js +1 -0
  280. package/web/dist/assets/highlighter-CdHqIwFr.js +3 -0
  281. package/web/dist/assets/image-preview-M1y8lBCU.js +1 -0
  282. package/web/dist/assets/index-BNgqhk51.js +6 -0
  283. package/web/dist/assets/index-De7KdVHL.css +2 -0
  284. package/web/dist/assets/lib-BQXq3kEf.js +1 -0
  285. package/web/dist/assets/lib-BxQXEXDF.js +1 -0
  286. package/web/dist/assets/markdown-DfljSy6W.js +2 -0
  287. package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
  288. package/web/dist/assets/new-task-form-CkgsW8GC.js +1 -0
  289. package/web/dist/assets/pill-DWy7Dbv3.js +1 -0
  290. package/web/dist/assets/project-router-BJR_8pfk.js +1 -0
  291. package/web/dist/assets/prompt-templates-CKbMbly-.js +15 -0
  292. package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
  293. package/web/dist/assets/{refresh-cw-BT8E96Tm.js → refresh-cw-Bs4wU0JM.js} +1 -1
  294. package/web/dist/assets/repo-git-CBbpvexr.js +1 -0
  295. package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
  296. package/web/dist/assets/run-diff-CzrO-R7P.js +3 -0
  297. package/web/dist/assets/run-header-BQDPFKUM.js +1 -0
  298. package/web/dist/assets/{search-x-BDjaMrzG.js → search-x-sxnYXz0H.js} +1 -1
  299. package/web/dist/assets/skill-empty-hint-CMfCEn9L.js +1 -0
  300. package/web/dist/assets/skills-BiWfHmCR.js +1 -0
  301. package/web/dist/assets/skills-DrG0KcAJ.js +1 -0
  302. package/web/dist/assets/sparkles-CL1cbhb_.js +1 -0
  303. package/web/dist/assets/{square-terminal-Ckjjn0vb.js → square-terminal-5JEPtGG-.js} +1 -1
  304. package/web/dist/assets/tab-link-DVT33Q2m.js +1 -0
  305. package/web/dist/assets/task-changes-BuuNjQ_C.js +1 -0
  306. package/web/dist/assets/task-commits-CVjZWXuP.js +1 -0
  307. package/web/dist/assets/task-files-f7USaQD1.js +2 -0
  308. package/web/dist/assets/task-thread-Cc7rMyer.js +9 -0
  309. package/web/dist/assets/textarea-BieGhkR-.js +1 -0
  310. package/web/dist/assets/thread-loading-CwfY_3r7.js +1 -0
  311. package/web/dist/assets/{trash-2-DAyZ0VSi.js → trash-2-Cmbuh3Q9.js} +1 -1
  312. package/web/dist/assets/{triangle-alert-Uy8rokUh.js → triangle-alert-dswtPk4F.js} +1 -1
  313. package/web/dist/assets/{upload-CDdyPPo_.js → upload-BY1qMAxW.js} +1 -1
  314. package/web/dist/assets/use-desktop-DrxT9b31.js +1 -0
  315. package/web/dist/assets/use-submit-shortcut-CULpfw9y.js +1 -0
  316. package/web/dist/assets/utils-C5bzdO9U.js +64 -0
  317. package/web/dist/assets/workflows-D6GsX0A9.js +11 -0
  318. package/web/dist/assets/zoomable-image-CEjRqsuW.js +1 -0
  319. package/web/dist/index.html +33 -13
  320. package/scripts/dev.mjs +0 -74
  321. package/scripts/release-snapshot.mjs +0 -130
  322. package/scripts/release.mjs +0 -119
  323. package/web/dist/assets/arrow-left-CnSdp92h.js +0 -1
  324. package/web/dist/assets/bundle-mjs-BegPhL5c.js +0 -1
  325. package/web/dist/assets/centered-state-DOsTcJZF.js +0 -43
  326. package/web/dist/assets/commit-list-BrxBEzRK.js +0 -1
  327. package/web/dist/assets/compare-variants-Bv2c9ORF.js +0 -1
  328. package/web/dist/assets/dist-B6XQOhgM.js +0 -1
  329. package/web/dist/assets/git-toolbar-pIC1ubPM.js +0 -1
  330. package/web/dist/assets/github-DTTSG0ht.js +0 -1
  331. package/web/dist/assets/highlighted-body-OFNGDK62-BuFJwunK.js +0 -1
  332. package/web/dist/assets/image-preview-DEhW0TFz.js +0 -1
  333. package/web/dist/assets/index-Cijmlz7q.js +0 -30
  334. package/web/dist/assets/index-DzroxqBG.css +0 -2
  335. package/web/dist/assets/lib-DPEZDBUN.js +0 -1
  336. package/web/dist/assets/lib-uHpeUPzK.js +0 -1
  337. package/web/dist/assets/mermaid-GHXKKRXX-CN2zQue0.js +0 -1
  338. package/web/dist/assets/open-mercato-toBr6SOa.svg +0 -11
  339. package/web/dist/assets/project-router-BMx4e8m-.js +0 -1
  340. package/web/dist/assets/repo-git-BusYfa3t.js +0 -1
  341. package/web/dist/assets/run-diff-wOJ3odA-.js +0 -3
  342. package/web/dist/assets/run-header-Cg5incil.js +0 -1
  343. package/web/dist/assets/skill-empty-hint-DTUSp6Vl.js +0 -1
  344. package/web/dist/assets/skills-PpP2owbM.js +0 -1
  345. package/web/dist/assets/tab-link-F3uQrdm2.js +0 -1
  346. package/web/dist/assets/task-changes-iD9kS79I.js +0 -1
  347. package/web/dist/assets/task-commits-COkLaUri.js +0 -1
  348. package/web/dist/assets/task-files-Ckttz7XH.js +0 -2
  349. package/web/dist/assets/task-thread-CQD91VPt.js +0 -9
  350. package/web/dist/assets/textarea-Bj_LCreg.js +0 -1
  351. package/web/dist/assets/use-desktop-DUh0STzq.js +0 -3
  352. package/web/dist/assets/utils-B8s5qIcK.js +0 -1
  353. package/web/dist/assets/workflows-BFk8C0co.js +0 -11
  354. package/web/dist/assets/zoomable-image-PEDOqyLQ.js +0 -1
  355. /package/web/{open-mercato.svg → dist/open-mercato.svg} +0 -0
@@ -0,0 +1,1614 @@
1
+ // ../contract/src/events.ts
2
+ import { z } from "zod";
3
+ var runEventSchema = z.looseObject({
4
+ seq: z.number(),
5
+ ts: z.string(),
6
+ stepId: z.string().optional(),
7
+ type: z.string()
8
+ });
9
+ var checkoutProgressEventSchema = z.object({
10
+ checkoutId: z.string().optional(),
11
+ name: z.string(),
12
+ phase: z.enum(["cloning", "done", "error"]),
13
+ line: z.string().optional(),
14
+ error: z.string().optional()
15
+ });
16
+
17
+ // ../contract/src/health.ts
18
+ import { z as z2 } from "zod";
19
+ var runnerSchema = z2.enum(["claude", "codex", "opencode"]);
20
+ var repoInfoSchema = z2.object({
21
+ root: z2.string(),
22
+ branch: z2.string(),
23
+ remote: z2.string().optional()
24
+ });
25
+ var backendCheckSchema = z2.object({
26
+ name: z2.enum(["claude", "codex", "opencode", "gh", "git"]),
27
+ available: z2.boolean(),
28
+ version: z2.string().optional(),
29
+ hint: z2.string().optional()
30
+ });
31
+ var forgeInfoSchema = z2.object({
32
+ kind: z2.literal("github"),
33
+ /**
34
+ * Whether the forge is reachable — **absent until the availability probe has warmed**.
35
+ *
36
+ * Health must never pay a `gh` shell-out, so it serves whatever the cache holds. Absent means
37
+ * "not determined yet", which is not the same as `false`, and the cockpit renders the two
38
+ * differently. Declaring it required is what made an earlier hand-written mirror wrong.
39
+ */
40
+ available: z2.boolean().optional(),
41
+ reason: z2.string().optional()
42
+ });
43
+ var capabilitiesSchema = z2.object({
44
+ localHandoff: z2.boolean(),
45
+ followups: z2.boolean(),
46
+ singleProject: z2.boolean(),
47
+ /**
48
+ * `false` means `CEZ_HIDE_TOKEN_METRICS=1` asks the browser to omit token counts and monetary
49
+ * cost (#481). The telemetry itself still rides in run/event payloads — this is presentation
50
+ * only.
51
+ *
52
+ * REQUIRED, because this server always sends it (`capabilities.ts` computes it from the env on
53
+ * every read) and this contract describes THIS server's wire. The DTO it replaces declared it
54
+ * optional so a newer cockpit could read an OLDER server, which is version skew a contract
55
+ * versioned in lockstep with the server cannot model. That tolerance lives where it belongs, in
56
+ * `web/src/lib/token-metrics.ts`, whose `!== false` read still treats an absent field as
57
+ * visible.
58
+ */
59
+ tokenMetrics: z2.boolean(),
60
+ /** Current token-count presentation policy. Required on current servers;
61
+ * older payload tolerance belongs in the browser resolver. */
62
+ tokenUsageMetrics: z2.boolean(),
63
+ /** Current backend-reported-cost presentation policy. */
64
+ costMetrics: z2.boolean()
65
+ });
66
+ var healthResponseSchema = z2.object({
67
+ version: z2.string(),
68
+ latestVersion: z2.string().optional(),
69
+ repoRoot: z2.string(),
70
+ repo: repoInfoSchema.nullable(),
71
+ checks: z2.array(backendCheckSchema),
72
+ defaultRunner: runnerSchema,
73
+ forge: forgeInfoSchema.nullable(),
74
+ capabilities: capabilitiesSchema,
75
+ // Always sent: `workspaceSummary()` returns both unconditionally, and an unreadable workspace
76
+ // degrades to `projects: []` rather than to an absent key. The hand-written DTO declared them
77
+ // optional, which was wider than the server has ever been.
78
+ projects: z2.array(z2.object({ id: z2.string(), name: z2.string() })),
79
+ bootProject: z2.string()
80
+ });
81
+
82
+ // ../contract/src/runs.ts
83
+ import { z as z4 } from "zod";
84
+
85
+ // ../contract/src/workflows.ts
86
+ import { z as z3 } from "zod";
87
+ var workflowStepDefSchema = z3.object({
88
+ id: z3.string().min(1),
89
+ name: z3.string().optional(),
90
+ // agent step
91
+ prompt: z3.string().optional(),
92
+ skill: z3.string().optional(),
93
+ model: z3.string().optional(),
94
+ /** Per-step agent backend override (falls back to the task / config default). */
95
+ runner: runnerSchema.optional(),
96
+ allowedTools: z3.array(z3.string()).optional(),
97
+ bashAllowlist: z3.array(z3.string()).optional(),
98
+ // check step
99
+ command: z3.string().optional(),
100
+ onFail: z3.object({
101
+ retry: z3.string().min(1),
102
+ max: z3.number().int().positive().default(2)
103
+ }).optional()
104
+ }).refine((s) => Boolean(s.command) !== Boolean(s.prompt ?? s.skill), {
105
+ message: "a step is either an agent step (prompt/skill) or a check step (command), not both"
106
+ });
107
+ var workflowDefSchema = z3.object({
108
+ name: z3.string(),
109
+ description: z3.string().optional(),
110
+ steps: z3.array(workflowStepDefSchema),
111
+ source: z3.enum(["built-in", "file"]),
112
+ /** Absent on built-ins — which is exactly what makes them undeletable. */
113
+ path: z3.string().optional()
114
+ });
115
+ var workflowLoadIssueSchema = z3.object({
116
+ path: z3.string(),
117
+ message: z3.string()
118
+ });
119
+ var workflowsResponseSchema = z3.object({
120
+ workflows: z3.array(workflowDefSchema),
121
+ issues: z3.array(workflowLoadIssueSchema)
122
+ });
123
+ var saveWorkflowInputSchema = z3.object({
124
+ name: z3.string().trim().min(1).max(80),
125
+ description: z3.string().max(2e3, "must be at most 2000 characters").optional(),
126
+ steps: z3.array(workflowStepDefSchema).min(1).max(8).optional(),
127
+ skills: z3.array(z3.string().trim().min(1)).min(1).max(8).optional(),
128
+ overwrite: z3.boolean().optional()
129
+ }).refine((b) => Boolean(b.steps) !== Boolean(b.skills), {
130
+ message: 'provide either "steps" or "skills", not both'
131
+ });
132
+ var saveWorkflowResponseSchema = z3.object({
133
+ path: z3.string(),
134
+ name: z3.string()
135
+ });
136
+ var parsedWorkflowSchema = z3.object({
137
+ name: z3.string(),
138
+ description: z3.string().optional(),
139
+ steps: z3.array(workflowStepDefSchema)
140
+ });
141
+ var deleteWorkflowResponseSchema = z3.object({
142
+ ok: z3.literal(true),
143
+ path: z3.string()
144
+ });
145
+ var planResponseSchema = z3.object({
146
+ /** The kebab-case workflow title the planner proposed. Absent on the degraded fallback. */
147
+ name: z3.string().optional(),
148
+ steps: z3.array(workflowStepDefSchema),
149
+ rationale: z3.string(),
150
+ fallback: z3.boolean()
151
+ });
152
+
153
+ // ../contract/src/runs.ts
154
+ var runStatusSchema = z4.enum([
155
+ "queued",
156
+ "running",
157
+ "waiting",
158
+ "review",
159
+ "done",
160
+ "failed",
161
+ "cancelled"
162
+ ]);
163
+ var runActivitySchema = z4.enum(["monitoring"]);
164
+ var stepStatusSchema = z4.enum([
165
+ "pending",
166
+ "running",
167
+ "waiting",
168
+ "review",
169
+ "done",
170
+ "failed",
171
+ "cancelled",
172
+ "skipped"
173
+ ]);
174
+ var usageCounterSchema = z4.number().finite().nonnegative();
175
+ var stepStateSchema = z4.object({
176
+ id: z4.string(),
177
+ name: z4.string(),
178
+ kind: z4.enum(["agent", "check"]),
179
+ status: stepStatusSchema,
180
+ iterations: z4.number(),
181
+ tokensUsed: z4.number(),
182
+ inputTokens: usageCounterSchema.optional(),
183
+ outputTokens: usageCounterSchema.optional(),
184
+ usageInvocationsStarted: usageCounterSchema.optional(),
185
+ usageInvocationsObserved: usageCounterSchema.optional(),
186
+ usageTurnsStarted: usageCounterSchema.optional(),
187
+ usageTurnsRecorded: usageCounterSchema.optional(),
188
+ usageInvocationEpoch: usageCounterSchema.optional(),
189
+ startedAt: z4.string().optional(),
190
+ finishedAt: z4.string().optional(),
191
+ error: z4.string().optional(),
192
+ /** Latest agent session id — `claude --resume <id>` and friends. */
193
+ sessionId: z4.string().optional(),
194
+ /** Backend that owns `sessionId`; absent on records written before backend affinity. */
195
+ backend: runnerSchema.optional(),
196
+ /** Agent account (spec 2026-07-29-agent-profiles) that owns `sessionId` — `default`, or a
197
+ * stored profile id. The two are a PAIR: a session id only resolves inside the config dir
198
+ * that created it, so resume and Continue read this rather than the project's current
199
+ * selection. Absent on records written before accounts existed. */
200
+ profileId: z4.string().optional(),
201
+ costUsd: z4.number().optional()
202
+ });
203
+ var diffStatSchema = z4.object({
204
+ adds: z4.number(),
205
+ dels: z4.number(),
206
+ files: z4.number(),
207
+ /** Additive since #751, and present ONLY when true: the numbers cover uncommitted work
208
+ * alone, because the worktree's HEAD had been repointed off the task's own branch (every
209
+ * review/QA run does this) and the merge-base anchor would otherwise have reported the
210
+ * checked-out branch's entire diff as this task's. Absent on every normal run and on every
211
+ * record written before #751 — a consumer that ignores it sees exactly the old shape. */
212
+ repointed: z4.boolean().optional()
213
+ });
214
+ var queuedMessageSchema = z4.object({
215
+ id: z4.string(),
216
+ text: z4.string(),
217
+ /** `/api/v1/runs/:id/images/…` URLs — attachments are persisted, never inlined. */
218
+ images: z4.array(z4.string()).optional(),
219
+ createdAt: z4.string()
220
+ });
221
+ var processUsageSchema = z4.object({
222
+ /** Sum of `%cpu` across the tree — can exceed 100 on multi-core work. */
223
+ cpuPct: z4.number(),
224
+ rssBytes: z4.number(),
225
+ procCount: z4.number()
226
+ });
227
+ var runRecordSchema = z4.object({
228
+ id: z4.string(),
229
+ title: z4.string(),
230
+ /** Display title (#389): auto-derived from the first agent turn, or the user's inline edit
231
+ * (`PATCH /runs/:id` sets it together with `title`). Show `titleSummary ?? title`. */
232
+ titleSummary: z4.string().optional(),
233
+ /** Refreshed on every turn-end; absent until the first turn ends (and on worktree-less runs). */
234
+ diffStat: diffStatSchema.optional(),
235
+ workflow: z4.string(),
236
+ task: z4.string(),
237
+ /** Prompt messages stacked onto the run while it waited for a free agent slot (#472). Folded
238
+ * into the prompt at dequeue — never delivered as their own turns. Absent on pre-#472 runs. */
239
+ queuedMessages: z4.array(queuedMessageSchema).optional(),
240
+ /** URLs of images attached to the initial task prompt (#image-display). */
241
+ taskImages: z4.array(z4.string()).optional(),
242
+ model: z4.string().optional(),
243
+ /** Normalized provider/model identity used for attribution and reproducible replay. */
244
+ modelIdentity: z4.string().optional(),
245
+ runner: runnerSchema.optional(),
246
+ /** The composer's per-task agent account (spec 2026-07-29-agent-profiles), applying to steps
247
+ * on `runner`. Absent = the run follows the project's own selection. */
248
+ agentProfile: z4.string().optional(),
249
+ /** Echo of the extra system prompt the run used (POST override or config default). */
250
+ systemPrompt: z4.string().optional(),
251
+ /** false when the run deliberately disabled follow-up todo generation. Absent means enabled. */
252
+ generateFollowups: z4.boolean().optional(),
253
+ /** Autonomous mode (#autonomous): the run never parks at `waiting` or the terminal `review`
254
+ * gate. Absent = falsy = not autonomous. */
255
+ autonomous: z4.boolean().optional(),
256
+ /**
257
+ * Provenance for a task a project GitHub automation launched (#694). Absent on every ordinary
258
+ * run, which is what makes it additive — the cockpit shows the "from automation" link only when
259
+ * it is there.
260
+ *
261
+ * `event` is a plain string rather than `automationEventSchema`: it is the event NAME the
262
+ * launching definition matched, recorded on the run for the audit trail, and `src/runs/store.ts`
263
+ * persists it as free text so an older cezar can still read a record written by a newer one.
264
+ */
265
+ automation: z4.object({
266
+ automationId: z4.string(),
267
+ automationRevision: z4.number(),
268
+ receiptId: z4.string(),
269
+ event: z4.string(),
270
+ githubUrl: z4.string()
271
+ }).optional(),
272
+ status: runStatusSchema,
273
+ /** `monitoring` while `status === 'running'` and the agent is working on downstream work.
274
+ * Absent on old runs; cleared on resume/end. */
275
+ activity: runActivitySchema.optional(),
276
+ /** Exact ISO-8601 deadline for the next automatic monitoring check. */
277
+ monitoringWakeAt: z4.string().optional(),
278
+ /** The current live monitoring epoch exhausted its 40 automatic checks. */
279
+ monitoringWakeCapReached: z4.boolean().optional(),
280
+ /** Exact ISO-8601 instant this run resumes itself after a provider usage limit stopped it
281
+ * (spec 2026-08-03-auto-resume-after-usage-limit). Present only on a `failed` run with a
282
+ * pending automatic resume — its absence is what "no resume is scheduled" looks like. */
283
+ autoResumeAt: z4.string().optional(),
284
+ /** Consecutive automatic resumes since the last human turn, against the safety cap. */
285
+ autoResumeAttempts: z4.number().optional(),
286
+ createdAt: z4.string(),
287
+ startedAt: z4.string().optional(),
288
+ finishedAt: z4.string().optional(),
289
+ tokensUsed: z4.number(),
290
+ inputTokens: usageCounterSchema.optional(),
291
+ outputTokens: usageCounterSchema.optional(),
292
+ costUsd: z4.number().optional(),
293
+ pullRequestUrl: z4.string().optional(),
294
+ /** The PR this task is ABOUT (#407) — auto-discovered from conversation references. Display
295
+ * tier only: `pullRequestUrl` (the PR this task CREATED) wins, and the action gates ignore it. */
296
+ referencedPullRequestUrl: z4.string().optional(),
297
+ /** The PR/issue number this task is ABOUT (task auto-naming spec) — display tier only. */
298
+ prNumber: z4.number().optional(),
299
+ issueNumber: z4.number().optional(),
300
+ /** Server-side provenance: referenced-issue discovery currently owns `issueNumber`. */
301
+ referencedIssueNumberSeeded: z4.boolean().optional(),
302
+ /** 'user' = renamed via PATCH, never auto-overwritten; 'marker' = agent-declared via
303
+ * CEZ:TITLE (spec 2026-07-18-task-ref-markers); 'auto' = namer-owned. */
304
+ titleOrigin: z4.enum(["user", "auto", "marker"]).optional(),
305
+ /** References the agent declared via CEZ:PR/CEZ:ISSUE markers — authoritative over the namer
306
+ * for the matching kind. */
307
+ markerRefs: z4.object({ pr: z4.number().optional(), issue: z4.number().optional() }).optional(),
308
+ /** The referenced tier's working set (distinct PR URLs spotted, capped server-side). */
309
+ referencedPrCandidates: z4.array(z4.string()).optional(),
310
+ /** The issue this task is ABOUT (spec 2026-07-21-report-ref-discovery). Display-only. */
311
+ referencedIssueUrl: z4.string().optional(),
312
+ /** The referenced-issue working set, persisted like `referencedPrCandidates`. Capped. */
313
+ referencedIssueCandidates: z4.array(z4.string()).optional(),
314
+ /** Explicit execution policy. `false` means the run intentionally uses the repo root;
315
+ * absent on older runs and for the default isolated-worktree mode. */
316
+ worktree: z4.literal(false).optional(),
317
+ /** Absent for in-place runs and after an isolated worktree is removed. */
318
+ worktreePath: z4.string().optional(),
319
+ branch: z4.string().optional(),
320
+ /** Stable baseline for session git views: a worktree's fork ref, or an in-place run's starting commit. */
321
+ baseBranch: z4.string().optional(),
322
+ /** Set when count-based retention (#483) reclaimed the worktree DIRECTORY (the branch is
323
+ * kept): the dir is gone but recoverable. */
324
+ worktreeReclaimedAt: z4.string().optional(),
325
+ /** Parallel variants (spec 010): runs sharing a groupId are one group. */
326
+ groupId: z4.string().optional(),
327
+ /** Variant letter within the group — 'A' | 'B' | 'C'. */
328
+ variant: z4.string().optional(),
329
+ peakRssBytes: z4.number().optional(),
330
+ peakProcCount: z4.number().optional(),
331
+ archived: z4.boolean(),
332
+ archivedAt: z4.string().optional(),
333
+ /** Read receipt (#unread-done-items): ISO time the cockpit last opened this run's
334
+ * thread. A finished (`done`/`failed`) run reads as *unread* until seen since it
335
+ * finished — see `isUnread()` in the cockpit's `lib/read-state.ts`. Absent on old
336
+ * runs and on any run not yet opened, both of which count as unread. */
337
+ seenAt: z4.string().optional(),
338
+ currentStepId: z4.string().optional(),
339
+ error: z4.string().optional(),
340
+ steps: z4.array(stepStateSchema),
341
+ /**
342
+ * The persisted workflow definition, so a `queued` run survives a restart — including the ad-hoc
343
+ * "(planned)" chains that exist nowhere else.
344
+ *
345
+ * The definition schema and NOT `z.record(z.string(), z.unknown())`: this key comes off the wire,
346
+ * so its values are whatever `JSON.parse` can produce and nothing else. `unknown` was wider than
347
+ * the server can serialize, and it made the route type unrepresentable here — hono maps `unknown`
348
+ * to its own `JSONValue`, whose index signature admits `object | symbol | undefined`. The fix was
349
+ * at the source: `src/runs/store.ts` persists a typed `workflowDefSchema` now, so the route's own
350
+ * type is this shape and the two-way check in `src/server/contract-parity.runs.test.ts` covers it
351
+ * like every other key.
352
+ */
353
+ workflowDef: workflowDefSchema.optional()
354
+ });
355
+ var apiRunSchema = runRecordSchema.extend({
356
+ usage: processUsageSchema.optional()
357
+ });
358
+ var createRunResponseSchema = z4.union([
359
+ runRecordSchema,
360
+ z4.object({ runs: z4.array(runRecordSchema) })
361
+ ]);
362
+ var cancelResponseSchema = z4.object({ cancelled: z4.boolean() });
363
+ var cancelAutoResumeResponseSchema = z4.object({ cancelled: z4.literal(true) });
364
+ var archiveFinishedResponseSchema = z4.object({ archived: z4.number() });
365
+ var markAllReadResponseSchema = z4.object({ read: z4.number() });
366
+ var deleteRunResponseSchema = z4.object({ deleted: z4.literal(true) });
367
+ var finishResponseSchema = z4.object({ finished: z4.literal(true) });
368
+ var continueResponseSchema = z4.object({ continued: z4.literal(true) });
369
+ var createPrResponseSchema = z4.object({
370
+ url: z4.string(),
371
+ dryRun: z4.boolean()
372
+ });
373
+ var messageResponseSchema = z4.union([
374
+ z4.object({ delivered: z4.literal(true) }),
375
+ z4.object({ queued: z4.literal(true), message: queuedMessageSchema }),
376
+ z4.object({ deferred: z4.literal(true) })
377
+ ]);
378
+ var editQueuedMessageResponseSchema = z4.object({ message: queuedMessageSchema });
379
+ var removeQueuedMessageResponseSchema = z4.object({ removed: z4.literal(true) });
380
+ var openInCliResponseSchema = z4.object({
381
+ opened: z4.literal(true),
382
+ command: z4.string()
383
+ });
384
+ var removeWorktreeResponseSchema = z4.object({ removed: z4.literal(true) });
385
+ var gitCommitResponseSchema = z4.object({
386
+ committed: z4.literal(true),
387
+ sha: z4.string()
388
+ });
389
+ var gitPushResponseSchema = z4.object({
390
+ pushed: z4.literal(true),
391
+ branch: z4.string(),
392
+ remote: z4.string(),
393
+ upstreamSet: z4.boolean()
394
+ });
395
+ var runCommitSchema = z4.object({
396
+ sha: z4.string(),
397
+ subject: z4.string(),
398
+ author: z4.string(),
399
+ /** Relative time ("3 hours ago") — git's `%cr`. */
400
+ when: z4.string()
401
+ });
402
+ var runCommitsResponseSchema = z4.object({ commits: z4.array(runCommitSchema) });
403
+ var groupVariantSchema = z4.object({
404
+ id: z4.string(),
405
+ /** 'A' | 'B' | 'C' in practice; `'?'` for a record that lost its letter. */
406
+ variant: z4.string(),
407
+ title: z4.string(),
408
+ status: runStatusSchema,
409
+ archived: z4.boolean(),
410
+ tokensUsed: z4.number(),
411
+ inputTokens: usageCounterSchema.optional(),
412
+ outputTokens: usageCounterSchema.optional(),
413
+ costUsd: z4.number().optional(),
414
+ diffStat: z4.string(),
415
+ /** First lines of the handoff journal's "## Progress log" section, as markdown. */
416
+ handoffExcerpt: z4.string()
417
+ });
418
+ var groupResponseSchema = z4.object({
419
+ groupId: z4.string(),
420
+ runs: z4.array(groupVariantSchema)
421
+ });
422
+ var pickVariantResponseSchema = z4.object({
423
+ winner: runRecordSchema.optional()
424
+ });
425
+ var imageInputSchema = z4.object({
426
+ mediaType: z4.string().regex(/^image\//),
427
+ data: z4.string().min(1).max(7e6)
428
+ });
429
+ var createRunInputBaseSchema = z4.object({
430
+ workflow: z4.string().min(1).optional(),
431
+ /** An inline chain (spec 008 — an approved plan runs as an ad-hoc workflow, never written to
432
+ * a file). The catalog's own step shape, not a copy of it. */
433
+ steps: z4.array(workflowStepDefSchema).min(1).max(8).optional(),
434
+ task: z4.string().min(1).max(1e5, "must be at most 100000 characters"),
435
+ model: z4.string().optional(),
436
+ runner: runnerSchema.optional(),
437
+ /** Agent account for this task (spec 2026-07-29-agent-profiles). Omit to follow the
438
+ * project's own selection; an id that no longer exists is a 400, not a silent default. */
439
+ agentProfile: z4.string().max(64).optional(),
440
+ /** 1–3. Above 1 the response is `{ runs }` rather than a single record. */
441
+ variants: z4.number().int().min(1).max(3).optional(),
442
+ /** false → run in the repo working tree instead of an isolated worktree (read-only skills).
443
+ * Omit for the default. Ignored server-side when variants > 1. */
444
+ worktree: z4.boolean().optional(),
445
+ /** true → autonomous run: never parks at "waiting"; auto-continues until done. */
446
+ autonomous: z4.boolean().optional(),
447
+ /** false → keep the handoff journal but do not expose or request a follow-up todos file.
448
+ * Omit for the default (enabled); a server with the capability off pins it to false. */
449
+ generateFollowups: z4.boolean().optional(),
450
+ /** Per-run system-prompt override (R2 2.3) — programmatic callers only. Wins over the
451
+ * config.json default; whitespace-only degrades to absent. */
452
+ systemPrompt: z4.string().trim().max(2e4, "must be at most 20000 characters").optional().transform((s) => s ? s : void 0),
453
+ /** Screenshots pasted into the new-task form; delivered with the first agent step. */
454
+ images: z4.array(imageInputSchema).max(4).optional(),
455
+ /** The inbox entry this task came from (#374). Best-effort bookkeeping: an unknown or
456
+ * already-started id never fails the run. For ×2/×3 the FIRST variant is recorded. */
457
+ todoId: z4.string().min(1).max(200, "must be at most 200 characters").optional()
458
+ });
459
+ var createRunInputSchema = createRunInputBaseSchema.refine(
460
+ (b) => Boolean(b.workflow) !== Boolean(b.steps),
461
+ { message: 'provide either "workflow" or "steps", not both' }
462
+ );
463
+ var messageInputSchema = z4.object({
464
+ text: z4.string().max(1e5).default(""),
465
+ images: z4.array(imageInputSchema).max(4).default([])
466
+ }).refine((m) => m.text.trim().length > 0 || m.images.length > 0, {
467
+ message: "message needs text or at least one image"
468
+ });
469
+ var patchRunInputSchema = z4.object({
470
+ title: z4.string().trim().min(1).max(300).optional(),
471
+ task: z4.string().trim().min(1).max(1e5).optional()
472
+ });
473
+
474
+ // ../contract/src/repo.ts
475
+ import { z as z5 } from "zod";
476
+ var statusEntrySchema = z5.object({
477
+ status: z5.string(),
478
+ path: z5.string()
479
+ });
480
+ var logEntrySchema = z5.object({
481
+ hash: z5.string(),
482
+ subject: z5.string(),
483
+ author: z5.string(),
484
+ when: z5.string()
485
+ });
486
+ var repoResponseSchema = z5.union([
487
+ z5.object({
488
+ info: z5.null(),
489
+ status: z5.array(z5.never()),
490
+ log: z5.array(z5.never()),
491
+ branches: z5.array(z5.never()),
492
+ baseBranch: z5.null()
493
+ }),
494
+ z5.object({
495
+ info: repoInfoSchema,
496
+ status: z5.array(statusEntrySchema),
497
+ log: z5.array(logEntrySchema),
498
+ branches: z5.array(z5.string()),
499
+ baseBranch: z5.string().nullable()
500
+ })
501
+ ]);
502
+ var repoBranchResponseSchema = z5.object({
503
+ branch: z5.string(),
504
+ created: z5.boolean()
505
+ });
506
+ var diffStatSchema2 = z5.object({
507
+ adds: z5.number(),
508
+ dels: z5.number(),
509
+ files: z5.number()
510
+ });
511
+ var changedFileSchema = z5.object({
512
+ path: z5.string(),
513
+ /** Rename/copy source — present only when `status` is renamed/copied. */
514
+ oldPath: z5.string().optional(),
515
+ status: z5.enum(["added", "modified", "deleted", "renamed", "copied"]),
516
+ adds: z5.number(),
517
+ dels: z5.number(),
518
+ /** Binary per numstat — there is no text patch to render. */
519
+ binary: z5.boolean(),
520
+ /** True when the path is one the raw-bytes route serves as an `<img>` (#365) — present only
521
+ * when true, so old clients that never read it stay correct. */
522
+ image: z5.boolean().optional(),
523
+ /** This file's unified-diff section; possibly `… (patch truncated)`, possibly empty. */
524
+ patch: z5.string()
525
+ });
526
+ var changesPayloadSchema = z5.object({
527
+ files: z5.array(changedFileSchema),
528
+ stat: diffStatSchema2,
529
+ /** Additive context for review tasks whose worktree HEAD no longer matches their own branch. */
530
+ repointedHead: z5.object({ headBranch: z5.string(), taskBranch: z5.string() }).optional()
531
+ });
532
+ var repoCommitPayloadSchema = z5.object({
533
+ sha: z5.string(),
534
+ subject: z5.string(),
535
+ author: z5.string(),
536
+ /** Relative time ("3 hours ago") — same `%cr` format as the /api/v1/repo log. */
537
+ when: z5.string(),
538
+ files: z5.array(changedFileSchema),
539
+ stat: diffStatSchema2
540
+ });
541
+ var worktreeDirEntrySchema = z5.object({
542
+ name: z5.string(),
543
+ type: z5.enum(["dir", "file"]),
544
+ size: z5.number().optional()
545
+ });
546
+ var worktreeEntrySchema = z5.discriminatedUnion("type", [
547
+ z5.object({
548
+ type: z5.literal("dir"),
549
+ path: z5.string(),
550
+ entries: z5.array(worktreeDirEntrySchema)
551
+ }),
552
+ z5.object({
553
+ type: z5.literal("file"),
554
+ path: z5.string(),
555
+ size: z5.number(),
556
+ binary: z5.boolean(),
557
+ tooLarge: z5.boolean(),
558
+ content: z5.string().optional()
559
+ })
560
+ ]);
561
+ var worktreeRunStatusSchema = z5.enum([
562
+ "queued",
563
+ "running",
564
+ "waiting",
565
+ "review",
566
+ "done",
567
+ "failed",
568
+ "cancelled"
569
+ ]);
570
+ var worktreeInfoSchema = z5.object({
571
+ runId: z5.string(),
572
+ title: z5.string(),
573
+ status: worktreeRunStatusSchema,
574
+ branch: z5.string().nullable(),
575
+ sizeBytes: z5.number().nullable(),
576
+ finishedAt: z5.string().nullable(),
577
+ reclaimable: z5.boolean()
578
+ });
579
+ var worktreesResponseSchema = z5.object({
580
+ worktrees: z5.array(worktreeInfoSchema),
581
+ totalBytes: z5.number().nullable(),
582
+ keep: z5.number()
583
+ });
584
+ var reclaimWorktreesResponseSchema = z5.object({
585
+ reclaimed: z5.array(z5.string())
586
+ });
587
+
588
+ // ../contract/src/github.ts
589
+ import { z as z6 } from "zod";
590
+ var checksGlyphSchema = z6.enum(["passing", "failing", "pending"]).nullable();
591
+ var githubItemSchema = z6.object({
592
+ kind: z6.enum(["issue", "pr"]),
593
+ number: z6.number(),
594
+ title: z6.string(),
595
+ author: z6.string(),
596
+ createdAt: z6.string(),
597
+ labels: z6.array(z6.string()),
598
+ body: z6.string(),
599
+ url: z6.string(),
600
+ comments: z6.number(),
601
+ /** PRs only. */
602
+ isDraft: z6.boolean().optional(),
603
+ additions: z6.number().optional(),
604
+ deletions: z6.number().optional(),
605
+ checks: checksGlyphSchema.optional()
606
+ });
607
+ var githubDataSchema = z6.object({
608
+ available: z6.boolean(),
609
+ /** Why it is unavailable (`gh` missing, no remote, offline…). Never an error — a hint. */
610
+ reason: z6.string().optional(),
611
+ /** owner/name, when known. */
612
+ repo: z6.string().optional(),
613
+ syncedAt: z6.string().optional(),
614
+ issues: z6.array(githubItemSchema),
615
+ prs: z6.array(githubItemSchema),
616
+ /** Repo-wide label name → 6-hex color (no `#`); lets chips tint like GitHub. Additive. */
617
+ labelColors: z6.record(z6.string(), z6.string()).optional()
618
+ });
619
+ var githubChecksDataSchema = z6.discriminatedUnion("available", [
620
+ z6.object({
621
+ available: z6.literal(true),
622
+ checks: z6.record(z6.number(), checksGlyphSchema)
623
+ }),
624
+ z6.object({
625
+ available: z6.literal(false),
626
+ reason: z6.string()
627
+ })
628
+ ]);
629
+ var githubCommentSchema = z6.object({
630
+ id: z6.number(),
631
+ /** Author login, `'?'` fallback when gh omits the user. */
632
+ author: z6.string(),
633
+ avatarUrl: z6.string().optional(),
634
+ createdAt: z6.string(),
635
+ body: z6.string(),
636
+ kind: z6.enum(["comment", "review"]),
637
+ /** Reviews only — drives the state chip. */
638
+ reviewState: z6.enum(["approved", "changes_requested", "commented", "dismissed"]).optional(),
639
+ url: z6.string()
640
+ });
641
+ var githubTimelineEventKindSchema = z6.enum([
642
+ "committed",
643
+ "labeled",
644
+ "unlabeled",
645
+ "assigned",
646
+ "unassigned",
647
+ "merged",
648
+ "closed",
649
+ "reopened",
650
+ "head_ref_force_pushed",
651
+ "cross-referenced",
652
+ "renamed"
653
+ ]);
654
+ var githubTimelineEventSchema = z6.object({
655
+ id: z6.string(),
656
+ kind: githubTimelineEventKindSchema,
657
+ /** Login — or the git author name for `committed`, which carries no GitHub actor. */
658
+ actor: z6.string(),
659
+ /** Absent for `committed`. */
660
+ avatarUrl: z6.string().optional(),
661
+ createdAt: z6.string(),
662
+ url: z6.string().optional(),
663
+ /** `committed` — full 40-char SHA. */
664
+ sha: z6.string().optional(),
665
+ /** `committed` — first line, capped at 120 chars. */
666
+ message: z6.string().optional(),
667
+ /** `committed` — **absent** (lookup failed/skipped) and **`null`** (no CI configured) both
668
+ * render no glyph, but stay distinct values. */
669
+ checks: checksGlyphSchema.optional(),
670
+ label: z6.object({ name: z6.string(), color: z6.string().optional() }).optional(),
671
+ /** `assigned`/`unassigned` login, or the new title for `renamed`. */
672
+ subject: z6.string().optional(),
673
+ refNumber: z6.number().optional(),
674
+ refTitle: z6.string().optional(),
675
+ refIsPr: z6.boolean().optional()
676
+ });
677
+ var githubCommentsDataSchema = z6.object({
678
+ available: z6.boolean(),
679
+ reason: z6.string().optional(),
680
+ /** Chronological, oldest first. */
681
+ comments: z6.array(githubCommentSchema),
682
+ /** True when either stream hit its cap, or the timeline fetch stopped short. */
683
+ truncated: z6.boolean().optional(),
684
+ /** Timeline events (#525) — additive; absent when the server degraded to the legacy
685
+ * comments-only fetch. Capped independently of `comments`. */
686
+ events: z6.array(githubTimelineEventSchema).optional()
687
+ });
688
+ var githubMergeMethodSchema = z6.enum(["merge", "squash", "rebase"]);
689
+ var githubPrCheckSchema = z6.object({
690
+ name: z6.string(),
691
+ state: z6.enum(["passing", "failing", "pending", "unknown"]),
692
+ required: z6.boolean().nullable(),
693
+ url: z6.string().optional()
694
+ });
695
+ var githubPrMergeStateSchema = z6.object({
696
+ number: z6.number(),
697
+ title: z6.string(),
698
+ url: z6.string(),
699
+ state: z6.enum(["open", "closed", "merged"]),
700
+ isDraft: z6.boolean(),
701
+ headRef: z6.string(),
702
+ baseRef: z6.string(),
703
+ headSha: z6.string(),
704
+ mergeable: z6.enum(["mergeable", "conflicting", "unknown"]),
705
+ reviewDecision: z6.enum(["approved", "changes-requested", "review-required", "unknown"]),
706
+ checks: z6.array(githubPrCheckSchema),
707
+ methods: z6.array(githubMergeMethodSchema),
708
+ defaultMethod: githubMergeMethodSchema.nullable(),
709
+ eligibility: z6.enum(["ready", "blocked", "pending", "unauthorized", "terminal", "unknown"]),
710
+ blockers: z6.array(z6.object({ code: z6.string(), message: z6.string() })),
711
+ canMerge: z6.boolean(),
712
+ canOverride: z6.boolean()
713
+ });
714
+ var githubPrMergeStateResponseSchema = z6.discriminatedUnion("available", [
715
+ z6.object({ available: z6.literal(true), mergeState: githubPrMergeStateSchema }),
716
+ z6.object({ available: z6.literal(false), reason: z6.string() })
717
+ ]);
718
+ var githubMergeResponseSchema = z6.object({
719
+ merged: z6.literal(true),
720
+ number: z6.number(),
721
+ url: z6.string(),
722
+ method: githubMergeMethodSchema,
723
+ mergeCommitSha: z6.string().optional()
724
+ });
725
+ var githubPrChangeSchema = z6.object({
726
+ path: z6.string(),
727
+ previousPath: z6.string().optional(),
728
+ status: z6.enum(["added", "modified", "removed", "renamed", "copied", "changed"]),
729
+ additions: z6.number(),
730
+ deletions: z6.number(),
731
+ patch: z6.string().optional(),
732
+ patchUnavailableReason: z6.enum(["binary", "too-large", "not-provided"]).optional(),
733
+ truncated: z6.boolean().optional()
734
+ });
735
+ var githubPrChangesDataSchema = z6.discriminatedUnion("available", [
736
+ z6.object({
737
+ available: z6.literal(true),
738
+ number: z6.number(),
739
+ headSha: z6.string(),
740
+ files: z6.array(githubPrChangeSchema),
741
+ additions: z6.number(),
742
+ deletions: z6.number(),
743
+ truncated: z6.boolean(),
744
+ /** Present when the payload is complete but partial in some other way (a capped patch). */
745
+ reason: z6.string().optional()
746
+ }),
747
+ z6.object({ available: z6.literal(false), reason: z6.string() })
748
+ ]);
749
+
750
+ // ../contract/src/projects.ts
751
+ import { z as z7 } from "zod";
752
+ var projectListEntrySchema = z7.object({
753
+ id: z7.string(),
754
+ name: z7.string(),
755
+ /** Absolute, realpath-normalized repo root. */
756
+ root: z7.string(),
757
+ addedAt: z7.string(),
758
+ lastOpenedAt: z7.string(),
759
+ source: z7.enum(["local", "checkout"]),
760
+ /** `not-git` is fully usable (degraded single-queue mode); only `missing` blocks. */
761
+ status: z7.enum(["ok", "missing", "not-git"]),
762
+ /** Current branch when cheaply available (omitted e.g. on an unborn HEAD). */
763
+ branch: z7.string().optional(),
764
+ /** Which forge this project's remote belongs to (#698) — classified server-side from the
765
+ * remote URL alone. Gates the project group's GitHub nav item; omitted = no forge remote. */
766
+ forge: z7.literal("github").optional(),
767
+ /** Per-project cap on concurrently running tasks (spec 2026-07-22). Omitted = inherit the
768
+ * workspace `resources.maxParallel`; a number pins this project. */
769
+ maxParallel: z7.number().optional()
770
+ });
771
+ var projectsResponseSchema = z7.object({
772
+ projects: z7.array(projectListEntrySchema),
773
+ bootProject: z7.string(),
774
+ projectsDir: z7.string()
775
+ });
776
+ var registerProjectResponseSchema = z7.object({
777
+ project: projectListEntrySchema,
778
+ error: z7.string().optional()
779
+ });
780
+ var removeProjectResponseSchema = z7.object({
781
+ removed: z7.literal(true),
782
+ id: z7.string()
783
+ });
784
+ var updateProjectResponseSchema = z7.object({
785
+ project: projectListEntrySchema
786
+ });
787
+ var updateProjectInputSchema = z7.object({
788
+ maxParallel: z7.number().int().min(1).max(16).nullable()
789
+ });
790
+ var checkoutProjectInputSchema = z7.object({
791
+ url: z7.string().trim().min(1).max(512),
792
+ name: z7.string().trim().max(128).optional(),
793
+ checkoutId: z7.string().trim().max(128).optional()
794
+ });
795
+ var fsBrowseDirSchema = z7.object({
796
+ name: z7.string(),
797
+ path: z7.string(),
798
+ /** Has a `.git` entry — drives the "git" badge. A non-repo folder is still selectable. */
799
+ isRepo: z7.boolean()
800
+ });
801
+ var fsBrowseResponseSchema = z7.object({
802
+ /** The realpath'd directory actually listed — never the spelling asked for, so the breadcrumb
803
+ * shows where the picker really is. */
804
+ path: z7.string(),
805
+ /** `null` AT the browse root: there is no "up" out of it, and the dialog must render no parent
806
+ * row rather than one that 400s. */
807
+ parent: z7.string().nullable(),
808
+ dirs: z7.array(fsBrowseDirSchema),
809
+ /** True when the listing was capped server-side — surfaced honestly instead of showing a
810
+ * silently short list. */
811
+ truncated: z7.boolean()
812
+ });
813
+ var launchKeyResponseSchema = z7.object({
814
+ key: z7.string()
815
+ });
816
+
817
+ // ../contract/src/workspace.ts
818
+ import { z as z8 } from "zod";
819
+ var workspaceConfigResponseSchema = z8.object({
820
+ /** Root exposed by the Add-project directory browser — stored as written (`~` kept). */
821
+ browseRoot: z8.string(),
822
+ /** Checkout root for GUI-cloned projects — stored as written (`~` kept). */
823
+ projectsDir: z8.string(),
824
+ /** Stored override; `null` means inherit `CEZ_SKILLS_AUTO_UPDATE`, then true. */
825
+ skillsAutoUpdate: z8.boolean().nullable(),
826
+ effectiveSkillsAutoUpdate: z8.boolean(),
827
+ composerDefaults: z8.object({
828
+ autonomous: z8.boolean().nullable(),
829
+ worktree: z8.boolean().nullable(),
830
+ /** `'source-dependent'` when no `CEZ_AUTONOMOUS_DEFAULT` pins it either way. */
831
+ inheritedAutonomous: z8.union([z8.boolean(), z8.literal("source-dependent")]),
832
+ inheritedWorktree: z8.boolean()
833
+ }),
834
+ resources: z8.object({
835
+ maxParallel: z8.number(),
836
+ maxMonitoringSessions: z8.number(),
837
+ monitoringWakeIntervalMinutes: z8.number().nullable(),
838
+ /** Resume a run a provider usage limit stopped, once the limit resets. Default `true`. */
839
+ autoResumeOnUsageLimit: z8.boolean(),
840
+ memoryLimitMb: z8.number().nullable(),
841
+ worktreeRetentionDefault: z8.number()
842
+ }),
843
+ /**
844
+ * What a repo that has set none of its own runs (spec 2026-07-29-agent-profiles).
845
+ *
846
+ * Both keys are OPTIONAL on the wire, and that is load-bearing rather than lax: absent means
847
+ * "this machine has no opinion, the built-in default applies", and it has to stay distinguishable
848
+ * from a value someone chose or the fallback collapses into "always claude". Consulted only where
849
+ * the repo's own `.ai/cezar/config.json` is silent — a repo that chose is never overruled.
850
+ */
851
+ agentDefaults: z8.object({
852
+ runner: runnerSchema.optional(),
853
+ models: z8.object({
854
+ claude: z8.string().optional(),
855
+ codex: z8.string().optional(),
856
+ opencode: z8.string().optional()
857
+ }).optional()
858
+ })
859
+ });
860
+ var setWorkspaceConfigInputSchema = z8.object({
861
+ browseRoot: z8.string().trim().min(1).max(4096).optional(),
862
+ projectsDir: z8.string().trim().min(1).max(4096).optional(),
863
+ skillsAutoUpdate: z8.boolean().nullable().optional(),
864
+ composerDefaults: z8.object({
865
+ autonomous: z8.boolean().nullable().optional(),
866
+ worktree: z8.boolean().nullable().optional()
867
+ }).optional(),
868
+ /** Machine-wide agent defaults. `null` on a key CLEARS it back to "no opinion", which a bare
869
+ * absent key cannot say in a partial patch. */
870
+ agentDefaults: z8.object({
871
+ runner: runnerSchema.nullable().optional(),
872
+ models: z8.object({
873
+ claude: z8.string().trim().min(1).max(200).nullable().optional(),
874
+ codex: z8.string().trim().min(1).max(200).nullable().optional(),
875
+ opencode: z8.string().trim().min(1).max(200).nullable().optional()
876
+ }).optional()
877
+ }).optional(),
878
+ resources: z8.object({
879
+ maxParallel: z8.number().int().min(1).max(16).optional(),
880
+ maxMonitoringSessions: z8.number().int().min(0).max(16).optional(),
881
+ monitoringWakeIntervalMinutes: z8.number().int().min(1).max(60).nullable().optional(),
882
+ autoResumeOnUsageLimit: z8.boolean().optional(),
883
+ memoryLimitMb: z8.number().int().min(0).max(1048576).nullable().optional(),
884
+ worktreeRetentionDefault: z8.number().int().min(0).max(1e3).optional()
885
+ }).optional()
886
+ });
887
+ var appearanceSchema = z8.object({
888
+ accent: z8.enum(["lime", "violet"]).optional(),
889
+ density: z8.enum(["comfortable", "compact", "ultra"]).optional()
890
+ });
891
+ var uiStateSchema = z8.looseObject({
892
+ lastTask: z8.object({ source: z8.enum(["workflow", "skill"]), ref: z8.string() }).optional(),
893
+ /** Most-recently-run sources, newest first (deduped, capped). Feeds the composer picker's
894
+ * recency sort. */
895
+ recentSources: z8.array(z8.object({ source: z8.enum(["workflow", "skill"]), ref: z8.string() })).optional(),
896
+ /** The last worktree choice for a single-skill run. Absent → the default (isolated worktree). */
897
+ lastWorktree: z8.boolean().optional(),
898
+ /** The last autonomous choice — remembered like `lastWorktree`. Absent → off. */
899
+ lastAutonomous: z8.boolean().optional(),
900
+ /** Whether new runs should ask agents to append follow-up work. Absent → on. */
901
+ lastGenerateFollowups: z8.boolean().optional(),
902
+ /** Skill selection frequency (#408): name → times chosen, across BOTH composers. */
903
+ skillUsage: z8.record(z8.string(), z8.number()).optional(),
904
+ runsView: z8.enum(["list", "table"]).optional(),
905
+ /** The GitHub tab's last-selected sub-tab (#417). Absent → issues. */
906
+ githubView: z8.enum(["issues", "prs"]).optional(),
907
+ /** Settings → Appearance. The theme itself stays in localStorage (`cez-theme`) — it must
908
+ * pre-paint, and it is per-browser by design. */
909
+ appearance: appearanceSchema.optional(),
910
+ /** Follow-up prompt templates (#413). Absent → the built-in defaults; present (even `[]`) is
911
+ * the user's own edited list. `skills` are the skill names the template auto-applies for. */
912
+ promptTemplates: z8.array(
913
+ z8.object({
914
+ id: z8.string(),
915
+ label: z8.string(),
916
+ text: z8.string(),
917
+ skills: z8.array(z8.string()).optional()
918
+ })
919
+ ).optional(),
920
+ /** The open-mercato/skills promo banner (#391), dismissed for good. Legacy — the banner is
921
+ * gone, replaced by `WorkspaceUiState.importedSkills`; retained so old files round-trip. */
922
+ dismissedSkillsBanner: z8.boolean().optional()
923
+ });
924
+ var workspaceLastLocationSchema = z8.strictObject({
925
+ projectId: z8.string().min(1).max(64),
926
+ pathname: z8.string().min(1).max(2048).startsWith("/p/"),
927
+ search: z8.string().max(4096).startsWith("?").optional(),
928
+ hash: z8.string().max(2048).startsWith("#").optional()
929
+ });
930
+ var workspaceUiStateSchema = z8.looseObject({
931
+ /** The sidebar's per-project collapse map (step 3.3) — `true` collapses a group, `false` pins
932
+ * it open, absent means the default (the active project expands, the rest collapse). Loose for
933
+ * the same round-trip reason as its parent. */
934
+ sidebar: z8.looseObject({ collapsed: z8.record(z8.string(), z8.boolean()).optional() }).optional(),
935
+ /** Dismissed runtime-auth incident IDs, keyed by provider. An ID is only dismissed until the
936
+ * provider reports a different incident, so this stays workspace-global with the browser
937
+ * rather than one project checkout. */
938
+ dismissedProviderAuthFailures: z8.object({
939
+ claude: z8.string().optional(),
940
+ codex: z8.string().optional(),
941
+ opencode: z8.string().optional()
942
+ }).optional(),
943
+ /** Settings → Appearance, GLOBAL since step 3.5: accent + density describe the person at the
944
+ * keyboard, not a repo. */
945
+ appearance: appearanceSchema.optional(),
946
+ /** Settings → Notifications, GLOBAL since step 3.5 — one answer for the whole workspace, since
947
+ * the delivering browser is one browser whichever project you are looking at. */
948
+ notifications: z8.looseObject({ enabled: z8.boolean().optional() }).optional(),
949
+ /** Last settled project-scoped page. Used only when entering at the exact bare root;
950
+ * explicit deep links always win. */
951
+ lastLocation: workspaceLastLocationSchema.optional(),
952
+ /** The user's curated selection of default (vendor) skills. Tri-state: ABSENT means "not
953
+ * curated", so every default skill shows; a PRESENT array (even `[]`) means only those names
954
+ * show from that repo. */
955
+ importedSkills: z8.array(z8.string()).optional()
956
+ });
957
+ var runnerModelsSchema = z8.object({
958
+ claude: z8.string().optional(),
959
+ codex: z8.string().optional(),
960
+ opencode: z8.string().optional()
961
+ });
962
+ var configResponseSchema = z8.object({
963
+ baseBranch: z8.string().nullable(),
964
+ defaultRunner: runnerSchema,
965
+ systemPrompt: z8.string().nullable(),
966
+ defaultModels: runnerModelsSchema,
967
+ /** True when native coding-agent settings are authoritative and model picks are read-only. */
968
+ modelsLocked: z8.boolean(),
969
+ /** How many tasks run at once (1–16). */
970
+ maxParallel: z8.number(),
971
+ /** Per-task memory ceiling in MiB (whole process tree); null = no limit. */
972
+ memoryLimitMb: z8.number().nullable(),
973
+ /** Keep the last N finished worktrees on disk (#483); 0 = unlimited. Older ones are reclaimed
974
+ * (directory only — branch kept, so work is recoverable). */
975
+ worktreeRetention: z8.number(),
976
+ /** Live title updates: null = no config key, the `CEZ_TITLE_UPDATES` env default (ON) decides. */
977
+ liveTitleUpdates: z8.boolean().nullable(),
978
+ /** Optional review gate (#489): null = no config key, the `CEZ_REVIEW_GATE` env default (OFF)
979
+ * decides. */
980
+ reviewGate: z8.boolean().nullable()
981
+ });
982
+ var setConfigResponseSchema = configResponseSchema;
983
+ var setConfigInputSchema = z8.object({
984
+ baseBranch: z8.string().trim().min(1).max(200).nullable().optional(),
985
+ defaultRunner: runnerSchema.optional(),
986
+ systemPrompt: z8.string().trim().max(2e4).nullable().optional(),
987
+ defaultModels: z8.object({
988
+ claude: z8.string().trim().max(200).nullable().optional(),
989
+ codex: z8.string().trim().max(200).nullable().optional(),
990
+ opencode: z8.string().trim().max(200).nullable().optional()
991
+ }).optional(),
992
+ maxParallel: z8.number().int().min(1).max(16).optional(),
993
+ /** null or 0 clears the ceiling back to "no limit". */
994
+ memoryLimitMb: z8.number().int().min(0).max(1048576).nullable().optional(),
995
+ /** Keep last N finished worktrees (#483); 0 = unlimited, null clears back to the default (10). */
996
+ worktreeRetention: z8.number().int().min(0).max(1e3).nullable().optional(),
997
+ /** null clears the key back to the env-default behavior. */
998
+ liveTitleUpdates: z8.boolean().nullable().optional(),
999
+ /** null clears the key back to the env-default behavior (OFF). */
1000
+ reviewGate: z8.boolean().nullable().optional()
1001
+ });
1002
+ var skillsUpdateStatusSchema = z8.enum([
1003
+ "idle",
1004
+ "checking",
1005
+ "available",
1006
+ "updating",
1007
+ "current",
1008
+ "unavailable",
1009
+ "error"
1010
+ ]);
1011
+ var skillsUpdateScopeStateSchema = z8.object({
1012
+ scope: z8.enum(["project", "global"]),
1013
+ status: skillsUpdateStatusSchema,
1014
+ available: z8.boolean(),
1015
+ skills: z8.array(z8.string()),
1016
+ checkedAt: z8.string().nullable(),
1017
+ updatedAt: z8.string().nullable(),
1018
+ reason: z8.string().optional()
1019
+ });
1020
+ var skillsUpdateStateSchema = z8.object({
1021
+ status: skillsUpdateStatusSchema,
1022
+ available: z8.boolean(),
1023
+ autoUpdateEnabled: z8.boolean(),
1024
+ inherited: z8.boolean(),
1025
+ checkedAt: z8.string().nullable(),
1026
+ updatedAt: z8.string().nullable(),
1027
+ scopes: z8.array(skillsUpdateScopeStateSchema),
1028
+ needsUpgradeNotes: z8.boolean()
1029
+ });
1030
+ var providerIdSchema = runnerSchema;
1031
+ var providerConnectionStateSchema = z8.enum([
1032
+ "connected",
1033
+ "disconnected",
1034
+ "not-installed",
1035
+ "unknown"
1036
+ ]);
1037
+ var providerStatusSchema = z8.object({
1038
+ provider: providerIdSchema,
1039
+ status: providerConnectionStateSchema,
1040
+ enabled: z8.boolean().optional(),
1041
+ hint: z8.string().optional(),
1042
+ authFailureId: z8.string().optional(),
1043
+ /** Which agent account this row describes (spec 2026-07-29-agent-profiles). ABSENT on
1044
+ * `GET /api/v1/providers/status`, which deliberately keeps answering exactly one row per
1045
+ * provider — the discovered default — so an older client sees no change at all. Per-account
1046
+ * rows are carried by `GET /api/v1/workspace/agent-profiles` instead. */
1047
+ profileId: z8.string().optional()
1048
+ });
1049
+ var providerStatusResponseSchema = z8.object({
1050
+ providers: z8.array(providerStatusSchema)
1051
+ });
1052
+ var providerConnectResponseSchema = z8.discriminatedUnion("opened", [
1053
+ z8.object({ opened: z8.literal(true), command: z8.string() }),
1054
+ z8.object({ opened: z8.literal(false), connected: z8.literal(true), command: z8.string() })
1055
+ ]);
1056
+ var runnerModelOptionSchema = z8.object({
1057
+ id: z8.string(),
1058
+ label: z8.string(),
1059
+ description: z8.string()
1060
+ });
1061
+ var runnerModelCatalogResponseSchema = z8.object({
1062
+ runner: runnerSchema,
1063
+ models: z8.array(runnerModelOptionSchema),
1064
+ source: z8.enum(["live", "cache", "unavailable"]),
1065
+ stale: z8.boolean(),
1066
+ reason: z8.string().optional()
1067
+ });
1068
+ var openTargetSchema = z8.object({
1069
+ id: z8.string(),
1070
+ label: z8.string(),
1071
+ /** A stable icon key (#361) the UI maps to a concrete icon. Optional: an older server omitting
1072
+ * it just renders the generic fallback icon. */
1073
+ icon: z8.string().optional()
1074
+ });
1075
+ var openTargetsResponseSchema = z8.object({
1076
+ targets: z8.array(openTargetSchema)
1077
+ });
1078
+ var openProjectInSchema = z8.object({
1079
+ // A short bound (#429): matched against a downstream allowlist, so an app id is never long.
1080
+ target: z8.string().trim().min(1, "target required").max(200)
1081
+ });
1082
+ var openProjectInResponseSchema = z8.object({
1083
+ opened: z8.literal(true),
1084
+ path: z8.string()
1085
+ });
1086
+
1087
+ // ../contract/src/skills.ts
1088
+ import { z as z9 } from "zod";
1089
+ var skillSchema = z9.object({
1090
+ name: z9.string(),
1091
+ description: z9.string().optional(),
1092
+ /** Advisory hint for untouched composer run-mode choices. */
1093
+ interactive: z9.literal(true).optional(),
1094
+ body: z9.string(),
1095
+ path: z9.string(),
1096
+ source: z9.enum(["ai", "cezar", "agents", "global", "team"]),
1097
+ /** Team skills only: where the definition lives in its skills repo. */
1098
+ team: z9.object({
1099
+ repo: z9.string(),
1100
+ ref: z9.string(),
1101
+ path: z9.string(),
1102
+ /** True for the `SKILL.md` convention — a whole directory (references/…). */
1103
+ dir: z9.boolean(),
1104
+ /**
1105
+ * The exact commit `ref` resolved to when the skill was read (#428).
1106
+ *
1107
+ * The hand-written DTO omitted this field entirely — it was NARROWER than the route,
1108
+ * which has served it since #428.
1109
+ */
1110
+ commit: z9.string().optional()
1111
+ }).optional()
1112
+ });
1113
+ var importableSkillSchema = z9.object({
1114
+ name: z9.string(),
1115
+ description: z9.string().optional()
1116
+ });
1117
+ var todoItemSchema = z9.object({
1118
+ id: z9.string(),
1119
+ ts: z9.string().optional(),
1120
+ taskId: z9.string().optional(),
1121
+ summary: z9.string().min(1),
1122
+ action: z9.string().optional(),
1123
+ prUrl: z9.string().optional(),
1124
+ suggestedSkill: z9.string().optional(),
1125
+ suggestedArgs: z9.string().optional(),
1126
+ suggestedPrompt: z9.string().optional(),
1127
+ /** Explicit intent; missing infers from suggestedSkill/suggestedPrompt for old files. */
1128
+ runnable: z9.boolean().optional(),
1129
+ /** Set once a task was started from this entry — it then leaves the inbox and stays as
1130
+ * the audit trail. A later launch never overwrites the first. */
1131
+ startedTaskId: z9.string().optional()
1132
+ });
1133
+ var removeTodoResponseSchema = z9.object({
1134
+ removed: z9.literal(true)
1135
+ });
1136
+ var startTodoResponseSchema = z9.object({
1137
+ run: runRecordSchema
1138
+ });
1139
+
1140
+ // ../contract/src/agent-config.ts
1141
+ import { z as z10 } from "zod";
1142
+ var agentConfigFormatSchema = z10.enum(["json", "jsonc", "toml", "markdown"]);
1143
+ var agentConfigScopeSchema = z10.enum(["user", "project", "local"]);
1144
+ var agentConfigKindSchema = z10.enum(["settings", "memory", "mcp"]);
1145
+ var agentConfigTrackedSchema = z10.enum(["tracked", "gitignored", "outside-repo"]);
1146
+ var agentConfigFileSchema = z10.object({
1147
+ /** Stable, opaque, URL-safe — the ONLY thing a client may name (traversal-proof). */
1148
+ id: z10.string(),
1149
+ /** Every runner that reads this file: `<repo>/AGENTS.md` is one file, two readers. */
1150
+ runners: z10.array(runnerSchema),
1151
+ kind: agentConfigKindSchema,
1152
+ scope: agentConfigScopeSchema,
1153
+ label: z10.string(),
1154
+ path: z10.string(),
1155
+ format: agentConfigFormatSchema,
1156
+ tracked: agentConfigTrackedSchema,
1157
+ seeded: z10.boolean(),
1158
+ holdsMcp: z10.boolean(),
1159
+ /** VERBATIM from the vendor docs. Never computed, never generic. */
1160
+ precedence: z10.string(),
1161
+ /** Documented mid-run reload behaviour, or absent when the vendor is silent. */
1162
+ hotReload: z10.string().optional(),
1163
+ docsUrl: z10.string(),
1164
+ exists: z10.boolean(),
1165
+ size: z10.number(),
1166
+ /** sha256 of the bytes, or null when absent. */
1167
+ version: z10.string().nullable(),
1168
+ /** False in hosted mode (whole feature) — the client renders read-only up front. */
1169
+ writable: z10.boolean(),
1170
+ readOnlyReason: z10.string().optional()
1171
+ });
1172
+ var userMcpListingSchema = z10.object({
1173
+ path: z10.string(),
1174
+ servers: z10.array(z10.string()),
1175
+ readable: z10.boolean()
1176
+ });
1177
+ var agentConfigListingSchema = z10.object({
1178
+ editable: z10.boolean(),
1179
+ files: z10.array(agentConfigFileSchema),
1180
+ /** null in hosted mode (host-state disclosure guard). */
1181
+ userMcp: userMcpListingSchema.nullable()
1182
+ });
1183
+ var agentConfigFileContentSchema = z10.object({
1184
+ id: z10.string(),
1185
+ path: z10.string(),
1186
+ exists: z10.boolean(),
1187
+ content: z10.string(),
1188
+ /** sha256 of the bytes, or null when the file does not exist yet. */
1189
+ version: z10.string().nullable()
1190
+ });
1191
+ var setAgentConfigInputSchema = z10.object({
1192
+ content: z10.string().max(2e6),
1193
+ version: z10.string().nullable()
1194
+ });
1195
+
1196
+ // ../contract/src/agent-profiles.ts
1197
+ import { z as z11 } from "zod";
1198
+ var DEFAULT_AGENT_ACCOUNT_ID = "default";
1199
+ var agentAccountFileSchema = z11.object({
1200
+ id: z11.string(),
1201
+ /** e.g. `settings.json` — the file's own name, since the folder is shown once on the account. */
1202
+ label: z11.string(),
1203
+ /** Absolute, resolved inside this account's config folder. */
1204
+ path: z11.string(),
1205
+ exists: z11.boolean()
1206
+ });
1207
+ var agentProfileSchema = z11.object({
1208
+ /** `default` for the discovered profile, else the stored slug. */
1209
+ id: z11.string(),
1210
+ provider: providerIdSchema,
1211
+ label: z11.string(),
1212
+ /** As the user wrote it — a literal `~` is preserved, matching `browseRoot`/`projectsDir`. */
1213
+ configDir: z11.string(),
1214
+ /** Expanded absolute path. Same-origin route, like `ProjectListEntry.root`. */
1215
+ path: z11.string(),
1216
+ /** False for a dir the CLI has not created yet — legitimate, and NOT a reason to fall back
1217
+ * to another account at run time (that would silently bill the wrong subscription). */
1218
+ exists: z11.boolean(),
1219
+ /** Whether the dir carries this agent's own marker files. ADVISORY: an unrecognised dir is
1220
+ * still accepted, because "add profile → Connect → the CLI creates it" is the real flow. */
1221
+ looksValid: z11.boolean(),
1222
+ /** True for the profile cezar discovers from the environment. Never stored, never deletable. */
1223
+ isDefault: z11.boolean(),
1224
+ /** This account's own authentication state — two Claude logins answer independently.
1225
+ *
1226
+ * **Absent until the probe has warmed.** Every probe shells out to an agent CLI, and this
1227
+ * listing refuses to pay that (it would be one spawn per provider plus one per account, on
1228
+ * every cold load); it serves only what is already cached, exactly as `GET /api/v1/health`
1229
+ * serves a cached forge answer. Absent means "not determined yet" — NOT `unknown`, which is a
1230
+ * real probe result — and the cockpit fills it in from `…/:id/status`. */
1231
+ status: providerStatusSchema.optional(),
1232
+ /** This agent's own user-scope config files, resolved inside THIS account's folder — so a
1233
+ * second login's `settings.json` is the one you open, not the default account's. */
1234
+ files: z11.array(agentAccountFileSchema)
1235
+ });
1236
+ function agentAccountRouteId(profile) {
1237
+ return profile.isDefault ? `default:${profile.provider}` : profile.id;
1238
+ }
1239
+ var agentAccountSelectionSchema = z11.object({
1240
+ claude: z11.string().optional(),
1241
+ codex: z11.string().optional(),
1242
+ opencode: z11.string().optional()
1243
+ });
1244
+ var agentProfilesResponseSchema = z11.object({
1245
+ editable: z11.boolean(),
1246
+ profiles: z11.array(agentProfileSchema),
1247
+ /** Providers that can carry more than one account at all — what "Add account" is offered for.
1248
+ * OpenCode is absent: its credentials live in a SQLite DB behind a separate `OPENCODE_DB`, so
1249
+ * a config-dir profile would swap settings while still billing the other account. */
1250
+ profileCapableProviders: z11.array(providerIdSchema),
1251
+ /** Which account each project uses, keyed by the project's realpath'd ROOT.
1252
+ *
1253
+ * Served here rather than on `GET /api/v1/projects` because it is stored beside the accounts it
1254
+ * names (`~/.cezar/agent-accounts.json`) — one file, so deleting an account and scrubbing every
1255
+ * reference to it is one atomic write, and neither can be dropped by a cezar version that never
1256
+ * heard of accounts. Empty in hosted mode, where the whole family is withheld. */
1257
+ selections: z11.record(z11.string(), agentAccountSelectionSchema),
1258
+ /** The machine-wide fallback account per provider, used by any repo that has chosen none. */
1259
+ defaults: agentAccountSelectionSchema
1260
+ });
1261
+ var selectAgentProfileInputSchema = z11.object({
1262
+ /**
1263
+ * Registry slug, or the reserved `default` boot alias. Resolved to a root server-side.
1264
+ *
1265
+ * `null` targets the MACHINE-WIDE default instead of one repo — the account a repo that has
1266
+ * chosen nothing uses, so a second login is set up once rather than per checkout. A repo's own
1267
+ * choice always wins over it, which is what keeps this a default and not an override.
1268
+ */
1269
+ projectId: z11.string().min(1).max(64).nullable(),
1270
+ provider: providerIdSchema,
1271
+ profileId: z11.string().max(64).nullable()
1272
+ });
1273
+ var agentProfileSelectionsResponseSchema = z11.object({
1274
+ selections: z11.record(z11.string(), agentAccountSelectionSchema),
1275
+ /** The machine-wide fallback, for repos with no selection of their own. */
1276
+ defaults: agentAccountSelectionSchema
1277
+ });
1278
+ var agentAccountStatusResponseSchema = z11.object({ status: providerStatusSchema });
1279
+ var agentAccountDetailsResponseSchema = z11.object({
1280
+ available: z11.boolean(),
1281
+ reason: z11.string().optional(),
1282
+ fields: z11.array(z11.object({ label: z11.string(), value: z11.string() }))
1283
+ });
1284
+ var openAgentAccountFileInputSchema = z11.object({
1285
+ file: z11.string().min(1).max(200),
1286
+ target: z11.string().min(1).max(64).optional()
1287
+ });
1288
+ var openAgentAccountFileResponseSchema = z11.object({
1289
+ opened: z11.literal(true),
1290
+ path: z11.string()
1291
+ });
1292
+ var createAgentProfileInputSchema = z11.object({
1293
+ provider: providerIdSchema,
1294
+ label: z11.string().trim().max(200).optional(),
1295
+ /** Stored as written; validated absolute after `~` expansion, server-side. */
1296
+ configDir: z11.string().trim().min(1).max(4096)
1297
+ });
1298
+ var agentProfileResponseSchema = z11.object({ profile: agentProfileSchema });
1299
+ var updateAgentProfileInputSchema = z11.object({
1300
+ label: z11.string().trim().max(200).optional(),
1301
+ configDir: z11.string().trim().min(1).max(4096).optional()
1302
+ });
1303
+ var removeAgentProfileResponseSchema = z11.object({
1304
+ removed: z11.literal(true),
1305
+ id: z11.string()
1306
+ });
1307
+
1308
+ // ../contract/src/automations.ts
1309
+ import { z as z12 } from "zod";
1310
+ var automationEventSchema = z12.enum([
1311
+ "pull_request.opened",
1312
+ "issue.opened",
1313
+ "issue.labeled",
1314
+ "issue.unlabeled"
1315
+ ]);
1316
+ var automationFiltersSchema = z12.object({
1317
+ authors: z12.array(z12.string()).optional(),
1318
+ assignees: z12.array(z12.string()).optional(),
1319
+ allLabels: z12.array(z12.string()).optional(),
1320
+ anyLabels: z12.array(z12.string()).optional(),
1321
+ excludeLabels: z12.array(z12.string()).optional(),
1322
+ /** Required for the two label events — the server rejects a definition without it. */
1323
+ changedLabels: z12.array(z12.string()).optional(),
1324
+ lookbackDays: z12.number(),
1325
+ maxRecords: z12.number()
1326
+ });
1327
+ var automationTaskSchema = createRunInputBaseSchema.omit({ task: true, images: true, todoId: true, systemPrompt: true }).extend({
1328
+ /** The prompt template. `{{github.number}}`, `{{github.title}}`, `{{github.url}}` and
1329
+ * `{{github.labels}}` are substituted per match; GitHub content is appended as untrusted
1330
+ * context, never interpolated into instructions. */
1331
+ prompt: z12.string(),
1332
+ variants: z12.union([z12.literal(1), z12.literal(2), z12.literal(3)]).optional(),
1333
+ systemPrompt: z12.string().optional()
1334
+ });
1335
+ var automationDefinitionSchema = z12.object({
1336
+ id: z12.string(),
1337
+ /** Bumped on every edit; a PUT must echo the revision it read (optimistic concurrency). */
1338
+ revision: z12.number(),
1339
+ name: z12.string(),
1340
+ description: z12.string().optional(),
1341
+ /** Always present: the storage schema defaults it to `false`, so a definition is created
1342
+ * PAUSED and enabling it is a separate, baseline-establishing act. */
1343
+ enabled: z12.boolean(),
1344
+ events: z12.array(automationEventSchema),
1345
+ intervalSeconds: z12.number(),
1346
+ filters: automationFiltersSchema,
1347
+ task: automationTaskSchema,
1348
+ createdAt: z12.string(),
1349
+ updatedAt: z12.string()
1350
+ });
1351
+ var automationCursorSchema = z12.object({
1352
+ timestamp: z12.string(),
1353
+ tieBreaker: z12.string().optional()
1354
+ });
1355
+ var automationRuntimeStateSchema = z12.object({
1356
+ /** The definition revision this state belongs to; a bumped revision re-baselines. */
1357
+ revision: z12.number().optional(),
1358
+ /** Enabling establishes a CURRENT-TIME baseline: records older than this never launch. */
1359
+ baselineAt: z12.string().optional(),
1360
+ cursor: automationCursorSchema.optional(),
1361
+ frozenHighWatermark: automationCursorSchema.extend({ tieBreaker: z12.string() }).optional(),
1362
+ backlogAfter: automationCursorSchema.extend({ tieBreaker: z12.string() }).optional(),
1363
+ nextCheckAt: z12.string().optional(),
1364
+ lastSuccessAt: z12.string().optional(),
1365
+ /** Per-query GitHub ETags, so an unchanged page costs no rate-limit budget. */
1366
+ etags: z12.record(z12.string(), z12.string()).optional(),
1367
+ backoffUntil: z12.string().optional(),
1368
+ consecutiveFailures: z12.number().optional()
1369
+ });
1370
+ var automationLogResultSchema = z12.enum([
1371
+ "launched",
1372
+ "no-match",
1373
+ "duplicate",
1374
+ "rate-limited",
1375
+ "error",
1376
+ "baseline",
1377
+ "preview"
1378
+ ]);
1379
+ var automationLogRecordSchema = z12.object({
1380
+ seq: z12.number(),
1381
+ ts: z12.string(),
1382
+ automationId: z12.string(),
1383
+ revision: z12.number(),
1384
+ event: automationEventSchema.optional(),
1385
+ result: automationLogResultSchema,
1386
+ reason: z12.string().optional(),
1387
+ durationMs: z12.number().optional(),
1388
+ receiptId: z12.string().optional(),
1389
+ runId: z12.string().optional(),
1390
+ githubNumber: z12.number().optional(),
1391
+ githubTitle: z12.string().optional(),
1392
+ githubUrl: z12.string().optional(),
1393
+ rateLimit: z12.object({
1394
+ bucket: z12.enum(["core", "search"]),
1395
+ remaining: z12.number().optional(),
1396
+ resetAt: z12.string().optional()
1397
+ }).optional()
1398
+ });
1399
+ var automationCountsSchema = z12.object({
1400
+ matches: z12.number(),
1401
+ launched: z12.number(),
1402
+ duplicates: z12.number(),
1403
+ errors: z12.number()
1404
+ });
1405
+ var automationListEntrySchema = automationDefinitionSchema.extend({
1406
+ state: automationRuntimeStateSchema.optional(),
1407
+ latestLog: automationLogRecordSchema.optional(),
1408
+ counts: automationCountsSchema
1409
+ });
1410
+ var automationsResponseSchema = z12.object({
1411
+ available: z12.boolean(),
1412
+ reason: z12.string().optional(),
1413
+ scheduler: z12.object({
1414
+ state: z12.enum(["scheduled", "idle"]),
1415
+ nextDue: z12.string().optional()
1416
+ }),
1417
+ automations: z12.array(automationListEntrySchema)
1418
+ });
1419
+ var automationResponseSchema = z12.object({ automation: automationDefinitionSchema });
1420
+ var automationDetailResponseSchema = z12.object({
1421
+ automation: automationDefinitionSchema,
1422
+ state: automationRuntimeStateSchema.optional(),
1423
+ latestLog: automationLogRecordSchema.optional()
1424
+ });
1425
+ var automationCheckSchema = z12.object({
1426
+ id: z12.string(),
1427
+ automationId: z12.string(),
1428
+ mode: z12.enum(["preview", "execute"]),
1429
+ status: z12.enum(["queued", "running", "complete", "error"]),
1430
+ createdAt: z12.string(),
1431
+ completedAt: z12.string().optional(),
1432
+ matches: z12.number().optional(),
1433
+ truncated: z12.boolean().optional(),
1434
+ error: z12.string().optional()
1435
+ });
1436
+ var automationCheckQueuedResponseSchema = z12.object({ checkId: z12.string() });
1437
+ var automationLogResponseSchema = z12.object({
1438
+ records: z12.array(automationLogRecordSchema)
1439
+ });
1440
+ var automationRetryResponseSchema = z12.object({
1441
+ receiptId: z12.string(),
1442
+ runId: z12.string()
1443
+ });
1444
+ var createAutomationInputSchema = automationDefinitionSchema.omit({ id: true, revision: true, createdAt: true, updatedAt: true, enabled: true }).extend({ enable: z12.boolean().optional() });
1445
+ var updateAutomationInputSchema = createAutomationInputSchema.omit({ enable: true }).extend({
1446
+ enabled: z12.boolean().optional(),
1447
+ expectedRevision: z12.number()
1448
+ });
1449
+ var automationCheckInputSchema = z12.object({
1450
+ mode: z12.enum(["preview", "execute"])
1451
+ });
1452
+ export {
1453
+ DEFAULT_AGENT_ACCOUNT_ID,
1454
+ agentAccountDetailsResponseSchema,
1455
+ agentAccountFileSchema,
1456
+ agentAccountRouteId,
1457
+ agentAccountSelectionSchema,
1458
+ agentAccountStatusResponseSchema,
1459
+ agentConfigFileContentSchema,
1460
+ agentConfigFileSchema,
1461
+ agentConfigFormatSchema,
1462
+ agentConfigKindSchema,
1463
+ agentConfigListingSchema,
1464
+ agentConfigScopeSchema,
1465
+ agentConfigTrackedSchema,
1466
+ agentProfileResponseSchema,
1467
+ agentProfileSchema,
1468
+ agentProfileSelectionsResponseSchema,
1469
+ agentProfilesResponseSchema,
1470
+ apiRunSchema,
1471
+ archiveFinishedResponseSchema,
1472
+ automationCheckInputSchema,
1473
+ automationCheckQueuedResponseSchema,
1474
+ automationCheckSchema,
1475
+ automationCountsSchema,
1476
+ automationCursorSchema,
1477
+ automationDefinitionSchema,
1478
+ automationDetailResponseSchema,
1479
+ automationEventSchema,
1480
+ automationFiltersSchema,
1481
+ automationListEntrySchema,
1482
+ automationLogRecordSchema,
1483
+ automationLogResponseSchema,
1484
+ automationLogResultSchema,
1485
+ automationResponseSchema,
1486
+ automationRetryResponseSchema,
1487
+ automationRuntimeStateSchema,
1488
+ automationTaskSchema,
1489
+ automationsResponseSchema,
1490
+ backendCheckSchema,
1491
+ cancelAutoResumeResponseSchema,
1492
+ cancelResponseSchema,
1493
+ capabilitiesSchema,
1494
+ changedFileSchema,
1495
+ changesPayloadSchema,
1496
+ checkoutProgressEventSchema,
1497
+ checkoutProjectInputSchema,
1498
+ configResponseSchema,
1499
+ continueResponseSchema,
1500
+ createAgentProfileInputSchema,
1501
+ createAutomationInputSchema,
1502
+ createPrResponseSchema,
1503
+ createRunInputBaseSchema,
1504
+ createRunInputSchema,
1505
+ createRunResponseSchema,
1506
+ deleteRunResponseSchema,
1507
+ deleteWorkflowResponseSchema,
1508
+ diffStatSchema,
1509
+ editQueuedMessageResponseSchema,
1510
+ finishResponseSchema,
1511
+ forgeInfoSchema,
1512
+ fsBrowseDirSchema,
1513
+ fsBrowseResponseSchema,
1514
+ gitCommitResponseSchema,
1515
+ gitPushResponseSchema,
1516
+ githubChecksDataSchema,
1517
+ githubCommentSchema,
1518
+ githubCommentsDataSchema,
1519
+ githubDataSchema,
1520
+ githubItemSchema,
1521
+ githubMergeMethodSchema,
1522
+ githubMergeResponseSchema,
1523
+ githubPrChangeSchema,
1524
+ githubPrChangesDataSchema,
1525
+ githubPrCheckSchema,
1526
+ githubPrMergeStateResponseSchema,
1527
+ githubPrMergeStateSchema,
1528
+ githubTimelineEventKindSchema,
1529
+ githubTimelineEventSchema,
1530
+ groupResponseSchema,
1531
+ groupVariantSchema,
1532
+ healthResponseSchema,
1533
+ imageInputSchema,
1534
+ importableSkillSchema,
1535
+ launchKeyResponseSchema,
1536
+ logEntrySchema,
1537
+ markAllReadResponseSchema,
1538
+ messageInputSchema,
1539
+ messageResponseSchema,
1540
+ openAgentAccountFileInputSchema,
1541
+ openAgentAccountFileResponseSchema,
1542
+ openInCliResponseSchema,
1543
+ openProjectInResponseSchema,
1544
+ openProjectInSchema,
1545
+ openTargetSchema,
1546
+ openTargetsResponseSchema,
1547
+ parsedWorkflowSchema,
1548
+ patchRunInputSchema,
1549
+ pickVariantResponseSchema,
1550
+ planResponseSchema,
1551
+ processUsageSchema,
1552
+ projectListEntrySchema,
1553
+ projectsResponseSchema,
1554
+ providerConnectResponseSchema,
1555
+ providerConnectionStateSchema,
1556
+ providerIdSchema,
1557
+ providerStatusResponseSchema,
1558
+ providerStatusSchema,
1559
+ queuedMessageSchema,
1560
+ reclaimWorktreesResponseSchema,
1561
+ registerProjectResponseSchema,
1562
+ removeAgentProfileResponseSchema,
1563
+ removeProjectResponseSchema,
1564
+ removeQueuedMessageResponseSchema,
1565
+ removeTodoResponseSchema,
1566
+ removeWorktreeResponseSchema,
1567
+ repoBranchResponseSchema,
1568
+ repoCommitPayloadSchema,
1569
+ repoInfoSchema,
1570
+ repoResponseSchema,
1571
+ runActivitySchema,
1572
+ runCommitSchema,
1573
+ runCommitsResponseSchema,
1574
+ runEventSchema,
1575
+ runRecordSchema,
1576
+ runStatusSchema,
1577
+ runnerModelCatalogResponseSchema,
1578
+ runnerModelOptionSchema,
1579
+ runnerModelsSchema,
1580
+ runnerSchema,
1581
+ saveWorkflowInputSchema,
1582
+ saveWorkflowResponseSchema,
1583
+ selectAgentProfileInputSchema,
1584
+ setAgentConfigInputSchema,
1585
+ setConfigInputSchema,
1586
+ setConfigResponseSchema,
1587
+ setWorkspaceConfigInputSchema,
1588
+ skillSchema,
1589
+ skillsUpdateScopeStateSchema,
1590
+ skillsUpdateStateSchema,
1591
+ skillsUpdateStatusSchema,
1592
+ startTodoResponseSchema,
1593
+ statusEntrySchema,
1594
+ stepStateSchema,
1595
+ stepStatusSchema,
1596
+ todoItemSchema,
1597
+ uiStateSchema,
1598
+ updateAgentProfileInputSchema,
1599
+ updateAutomationInputSchema,
1600
+ updateProjectInputSchema,
1601
+ updateProjectResponseSchema,
1602
+ userMcpListingSchema,
1603
+ workflowDefSchema,
1604
+ workflowLoadIssueSchema,
1605
+ workflowStepDefSchema,
1606
+ workflowsResponseSchema,
1607
+ workspaceConfigResponseSchema,
1608
+ workspaceLastLocationSchema,
1609
+ workspaceUiStateSchema,
1610
+ worktreeDirEntrySchema,
1611
+ worktreeEntrySchema,
1612
+ worktreeInfoSchema,
1613
+ worktreesResponseSchema
1614
+ };