@wjarka/cezarion 0.10.0-pr30.54

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