@open-mercato/cezar 0.9.1 → 0.9.2-pr710.1256

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 (393) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +157 -32
  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 +9 -1
  7. package/dist/agent-config/catalog.js +18 -0
  8. package/dist/agent-config/catalog.js.map +1 -1
  9. package/dist/agent-config/files.d.ts +1 -1
  10. package/dist/agent-config/model-settings/claude.d.ts +2 -0
  11. package/dist/agent-config/model-settings/claude.js +11 -0
  12. package/dist/agent-config/model-settings/claude.js.map +1 -0
  13. package/dist/agent-config/model-settings/codex.d.ts +2 -0
  14. package/dist/agent-config/model-settings/codex.js +16 -0
  15. package/dist/agent-config/model-settings/codex.js.map +1 -0
  16. package/dist/agent-config/model-settings/opencode.d.ts +2 -0
  17. package/dist/agent-config/model-settings/opencode.js +8 -0
  18. package/dist/agent-config/model-settings/opencode.js.map +1 -0
  19. package/dist/agent-config/model-settings/pi.d.ts +12 -0
  20. package/dist/agent-config/model-settings/pi.js +18 -0
  21. package/dist/agent-config/model-settings/pi.js.map +1 -0
  22. package/dist/agent-config/model-settings/shared.d.ts +9 -0
  23. package/dist/agent-config/model-settings/shared.js +93 -0
  24. package/dist/agent-config/model-settings/shared.js.map +1 -0
  25. package/dist/agent-config/model-settings/types.d.ts +9 -0
  26. package/dist/agent-config/model-settings/types.js +2 -0
  27. package/dist/agent-config/model-settings/types.js.map +1 -0
  28. package/dist/agent-config/models.d.ts +9 -0
  29. package/dist/agent-config/models.js +32 -0
  30. package/dist/agent-config/models.js.map +1 -0
  31. package/dist/agent-config/service.d.ts +1 -1
  32. package/dist/agent-config/service.js +4 -4
  33. package/dist/agent-config/service.js.map +1 -1
  34. package/dist/agent-config/validate.d.ts +1 -1
  35. package/dist/automations/coordinator.d.ts +26 -0
  36. package/dist/automations/coordinator.js +66 -0
  37. package/dist/automations/coordinator.js.map +1 -0
  38. package/dist/automations/github-poller.d.ts +74 -0
  39. package/dist/automations/github-poller.js +234 -0
  40. package/dist/automations/github-poller.js.map +1 -0
  41. package/dist/automations/scheduler.d.ts +42 -0
  42. package/dist/automations/scheduler.js +192 -0
  43. package/dist/automations/scheduler.js.map +1 -0
  44. package/dist/automations/store.d.ts +65 -0
  45. package/dist/automations/store.js +298 -0
  46. package/dist/automations/store.js.map +1 -0
  47. package/dist/automations/task-template.d.ts +18 -0
  48. package/dist/automations/task-template.js +95 -0
  49. package/dist/automations/task-template.js.map +1 -0
  50. package/dist/automations/types.d.ts +255 -0
  51. package/dist/automations/types.js +159 -0
  52. package/dist/automations/types.js.map +1 -0
  53. package/dist/config.d.ts +19 -112
  54. package/dist/config.js +48 -5
  55. package/dist/config.js.map +1 -1
  56. package/dist/contract/agent-config.d.ts +153 -0
  57. package/dist/contract/agent-profiles.d.ts +347 -0
  58. package/dist/contract/automations.d.ts +935 -0
  59. package/dist/contract/events.d.ts +104 -0
  60. package/dist/contract/github.d.ts +467 -0
  61. package/dist/contract/health.d.ts +102 -0
  62. package/dist/contract/index.d.ts +16 -0
  63. package/dist/contract/index.js +1830 -0
  64. package/dist/contract/projects.d.ts +210 -0
  65. package/dist/contract/repo.d.ts +234 -0
  66. package/dist/contract/runs.d.ts +1407 -0
  67. package/dist/contract/skills.d.ts +232 -0
  68. package/dist/contract/workflows.d.ts +218 -0
  69. package/dist/contract/workspace.d.ts +577 -0
  70. package/dist/core/agent-env.d.ts +1 -1
  71. package/dist/core/agent-env.js +41 -16
  72. package/dist/core/agent-env.js.map +1 -1
  73. package/dist/core/agent-model-policy.d.ts +10 -0
  74. package/dist/core/agent-model-policy.js +36 -0
  75. package/dist/core/agent-model-policy.js.map +1 -0
  76. package/dist/core/agent-profiles.d.ts +62 -0
  77. package/dist/core/agent-profiles.js +90 -0
  78. package/dist/core/agent-profiles.js.map +1 -0
  79. package/dist/core/agent-runner.d.ts +49 -7
  80. package/dist/core/agent-runner.js +48 -3
  81. package/dist/core/agent-runner.js.map +1 -1
  82. package/dist/core/ask.d.ts +45 -124
  83. package/dist/core/ask.js +103 -13
  84. package/dist/core/ask.js.map +1 -1
  85. package/dist/core/backend-detect.d.ts +5 -5
  86. package/dist/core/backend-detect.js +44 -7
  87. package/dist/core/backend-detect.js.map +1 -1
  88. package/dist/core/claude-cli-runner.d.ts +2 -2
  89. package/dist/core/claude-cli-runner.js +61 -13
  90. package/dist/core/claude-cli-runner.js.map +1 -1
  91. package/dist/core/claude-ui-mapper.d.ts +1 -1
  92. package/dist/core/codex-app-server-runner.d.ts +1 -1
  93. package/dist/core/codex-app-server-runner.js +65 -3
  94. package/dist/core/codex-app-server-runner.js.map +1 -1
  95. package/dist/core/codex-app-server-transport.d.ts +6 -1
  96. package/dist/core/codex-app-server-transport.js +17 -3
  97. package/dist/core/codex-app-server-transport.js.map +1 -1
  98. package/dist/core/codex-model-catalog.d.ts +1 -1
  99. package/dist/core/codex-ui-mapper.d.ts +5 -1
  100. package/dist/core/codex-ui-mapper.js +74 -17
  101. package/dist/core/codex-ui-mapper.js.map +1 -1
  102. package/dist/core/model-identity.d.ts +24 -12
  103. package/dist/core/model-identity.js +41 -24
  104. package/dist/core/model-identity.js.map +1 -1
  105. package/dist/core/model-presets.d.ts +10 -4
  106. package/dist/core/model-presets.js +52 -9
  107. package/dist/core/model-presets.js.map +1 -1
  108. package/dist/core/opencode-model-catalog.d.ts +30 -0
  109. package/dist/core/opencode-model-catalog.js +126 -0
  110. package/dist/core/opencode-model-catalog.js.map +1 -0
  111. package/dist/core/opencode-server-runner.d.ts +2 -2
  112. package/dist/core/opencode-ui-mapper.d.ts +4 -1
  113. package/dist/core/opencode-ui-mapper.js +45 -7
  114. package/dist/core/opencode-ui-mapper.js.map +1 -1
  115. package/dist/core/pi-runner.d.ts +24 -0
  116. package/dist/core/pi-runner.js +349 -0
  117. package/dist/core/pi-runner.js.map +1 -0
  118. package/dist/core/pi-ui-mapper.d.ts +34 -0
  119. package/dist/core/pi-ui-mapper.js +270 -0
  120. package/dist/core/pi-ui-mapper.js.map +1 -0
  121. package/dist/core/provider-auth.d.ts +154 -0
  122. package/dist/core/provider-auth.js +509 -0
  123. package/dist/core/provider-auth.js.map +1 -0
  124. package/dist/core/provider-availability.d.ts +3 -0
  125. package/dist/core/provider-availability.js +14 -0
  126. package/dist/core/provider-availability.js.map +1 -0
  127. package/dist/core/runner-factory.d.ts +1 -1
  128. package/dist/core/runner-factory.js +3 -0
  129. package/dist/core/runner-factory.js.map +1 -1
  130. package/dist/core/runner-model-catalog.d.ts +1 -1
  131. package/dist/core/shell-env.d.ts +28 -0
  132. package/dist/core/shell-env.js +56 -0
  133. package/dist/core/shell-env.js.map +1 -0
  134. package/dist/core/tool-display.d.ts +1 -1
  135. package/dist/core/ui-events.d.ts +2 -2
  136. package/dist/core/ui-events.js +1 -1
  137. package/dist/core/usage-limit.d.ts +42 -0
  138. package/dist/core/usage-limit.js +209 -0
  139. package/dist/core/usage-limit.js.map +1 -0
  140. package/dist/git-diff-base.d.ts +85 -0
  141. package/dist/git-diff-base.js +180 -0
  142. package/dist/git-diff-base.js.map +1 -0
  143. package/dist/git-worktree.d.ts +46 -6
  144. package/dist/git-worktree.js +46 -9
  145. package/dist/git-worktree.js.map +1 -1
  146. package/dist/handoff.d.ts +2 -2
  147. package/dist/handoff.js +1 -1
  148. package/dist/index.js +66 -8
  149. package/dist/index.js.map +1 -1
  150. package/dist/paths.d.ts +69 -6
  151. package/dist/paths.js +86 -9
  152. package/dist/paths.js.map +1 -1
  153. package/dist/planner.d.ts +2 -2
  154. package/dist/planner.js +7 -1
  155. package/dist/planner.js.map +1 -1
  156. package/dist/release/manifests.d.ts +81 -0
  157. package/dist/release/manifests.js +74 -0
  158. package/dist/release/manifests.js.map +1 -0
  159. package/dist/release/snapshot.d.ts +9 -23
  160. package/dist/release/snapshot.js +9 -22
  161. package/dist/release/snapshot.js.map +1 -1
  162. package/dist/release/stable.d.ts +15 -29
  163. package/dist/release/stable.js +14 -27
  164. package/dist/release/stable.js.map +1 -1
  165. package/dist/runs/agent-tmpdir.d.ts +41 -0
  166. package/dist/runs/agent-tmpdir.js +183 -0
  167. package/dist/runs/agent-tmpdir.js.map +1 -0
  168. package/dist/runs/auto-name.d.ts +1 -1
  169. package/dist/runs/auto-name.js +6 -1
  170. package/dist/runs/auto-name.js.map +1 -1
  171. package/dist/runs/event-history.d.ts +50 -0
  172. package/dist/runs/event-history.js +613 -0
  173. package/dist/runs/event-history.js.map +1 -0
  174. package/dist/runs/retention.d.ts +1 -1
  175. package/dist/runs/run-index.d.ts +19 -0
  176. package/dist/runs/run-index.js +43 -0
  177. package/dist/runs/run-index.js.map +1 -0
  178. package/dist/runs/store.d.ts +209 -344
  179. package/dist/runs/store.js +298 -39
  180. package/dist/runs/store.js.map +1 -1
  181. package/dist/runs/ui-event-sink.d.ts +1 -1
  182. package/dist/server/app-type.d.ts +21 -0
  183. package/dist/server/app-type.js +2 -0
  184. package/dist/server/app-type.js.map +1 -0
  185. package/dist/server/capabilities.d.ts +21 -6
  186. package/dist/server/capabilities.js +27 -1
  187. package/dist/server/capabilities.js.map +1 -1
  188. package/dist/server/forge/github.d.ts +58 -151
  189. package/dist/server/forge/github.js +530 -6
  190. package/dist/server/forge/github.js.map +1 -1
  191. package/dist/server/forge/index.d.ts +19 -3
  192. package/dist/server/forge/index.js +28 -1
  193. package/dist/server/forge/index.js.map +1 -1
  194. package/dist/server/forge/types.d.ts +86 -1
  195. package/dist/server/git-changes.d.ts +10 -8
  196. package/dist/server/git-changes.js +19 -17
  197. package/dist/server/git-changes.js.map +1 -1
  198. package/dist/server/git.d.ts +2 -0
  199. package/dist/server/git.js +9 -0
  200. package/dist/server/git.js.map +1 -1
  201. package/dist/server/github.d.ts +3 -3
  202. package/dist/server/github.js +1 -1
  203. package/dist/server/github.js.map +1 -1
  204. package/dist/server/open-in-app.d.ts +2 -1
  205. package/dist/server/open-in-app.js +3 -1
  206. package/dist/server/open-in-app.js.map +1 -1
  207. package/dist/server/open-in-terminal.d.ts +46 -1
  208. package/dist/server/open-in-terminal.js +72 -13
  209. package/dist/server/open-in-terminal.js.map +1 -1
  210. package/dist/server/pr.d.ts +2 -2
  211. package/dist/server/project-context.d.ts +20 -3
  212. package/dist/server/project-context.js +30 -1
  213. package/dist/server/project-context.js.map +1 -1
  214. package/dist/server/provider-action-gate.d.ts +8 -0
  215. package/dist/server/provider-action-gate.js +56 -0
  216. package/dist/server/provider-action-gate.js.map +1 -0
  217. package/dist/server/provider-auth-runtime.d.ts +21 -0
  218. package/dist/server/provider-auth-runtime.js +66 -0
  219. package/dist/server/provider-auth-runtime.js.map +1 -0
  220. package/dist/server/server.d.ts +12802 -47
  221. package/dist/server/server.js +2857 -949
  222. package/dist/server/server.js.map +1 -1
  223. package/dist/server/validators.d.ts +97 -0
  224. package/dist/server/validators.js +86 -0
  225. package/dist/server/validators.js.map +1 -0
  226. package/dist/server/ws.d.ts +2 -2
  227. package/dist/server/ws.js +2 -2
  228. package/dist/server/ws.js.map +1 -1
  229. package/dist/server-install/engine.d.ts +1 -1
  230. package/dist/server-install/engine.js +5 -18
  231. package/dist/server-install/engine.js.map +1 -1
  232. package/dist/server-install/platforms/macosx-ngrok.d.ts +1 -1
  233. package/dist/server-install/platforms/ubuntu-vps.d.ts +16 -1
  234. package/dist/server-install/platforms/ubuntu-vps.js +83 -1
  235. package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
  236. package/dist/server-install/state.d.ts +1 -1
  237. package/dist/server-install/steps.d.ts +2 -2
  238. package/dist/server-install/steps.js +6 -2
  239. package/dist/server-install/steps.js.map +1 -1
  240. package/dist/server-install/strategies.d.ts +1 -1
  241. package/dist/server-install/types.d.ts +38 -424
  242. package/dist/server-install/ui.d.ts +1 -1
  243. package/dist/skills-banner.d.ts +7 -6
  244. package/dist/skills-banner.js +7 -6
  245. package/dist/skills-banner.js.map +1 -1
  246. package/dist/skills-remote.d.ts +2 -2
  247. package/dist/skills-update.d.ts +88 -0
  248. package/dist/skills-update.js +392 -0
  249. package/dist/skills-update.js.map +1 -0
  250. package/dist/skills.d.ts +2 -0
  251. package/dist/skills.js +7 -2
  252. package/dist/skills.js.map +1 -1
  253. package/dist/todos.d.ts +2 -28
  254. package/dist/todos.js +1 -1
  255. package/dist/ui-state.d.ts +16 -2
  256. package/dist/ui-state.js +14 -1
  257. package/dist/ui-state.js.map +1 -1
  258. package/dist/workflows/load.d.ts +1 -1
  259. package/dist/workflows/run.d.ts +276 -15
  260. package/dist/workflows/run.js +1261 -159
  261. package/dist/workflows/run.js.map +1 -1
  262. package/dist/workflows/types.d.ts +62 -224
  263. package/dist/workflows/types.js +25 -2
  264. package/dist/workflows/types.js.map +1 -1
  265. package/dist/workspace/agent-accounts.d.ts +153 -0
  266. package/dist/workspace/agent-accounts.js +304 -0
  267. package/dist/workspace/agent-accounts.js.map +1 -0
  268. package/dist/workspace/agent-profiles.d.ts +78 -0
  269. package/dist/workspace/agent-profiles.js +115 -0
  270. package/dist/workspace/agent-profiles.js.map +1 -0
  271. package/dist/workspace/config.d.ts +94 -206
  272. package/dist/workspace/config.js +226 -14
  273. package/dist/workspace/config.js.map +1 -1
  274. package/dist/workspace/migrations.d.ts +1 -1
  275. package/dist/workspace/migrations.js +19 -4
  276. package/dist/workspace/migrations.js.map +1 -1
  277. package/dist/workspace/projects-cli.js +54 -4
  278. package/dist/workspace/projects-cli.js.map +1 -1
  279. package/dist/workspace/projects.d.ts +26 -2
  280. package/dist/workspace/projects.js +42 -3
  281. package/dist/workspace/projects.js.map +1 -1
  282. package/dist/workspace/semaphore.d.ts +51 -0
  283. package/dist/workspace/semaphore.js +53 -3
  284. package/dist/workspace/semaphore.js.map +1 -1
  285. package/dist/workspace/ui-state.d.ts +16 -5
  286. package/dist/workspace/ui-state.js +18 -7
  287. package/dist/workspace/ui-state.js.map +1 -1
  288. package/package.json +17 -39
  289. package/scripts/inline-contract.mjs +112 -0
  290. package/scripts/mock-claude.mjs +59 -1
  291. package/scripts/mock-pi-rpc.mjs +83 -0
  292. package/scripts/sync-readme.mjs +20 -0
  293. package/web/dist/assets/alert-dialog-BVs3QSmP.js +1 -0
  294. package/web/dist/assets/arrow-down-D7T7XuF6.js +1 -0
  295. package/web/dist/assets/arrow-left-B1dRFd8y.js +1 -0
  296. package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
  297. package/web/dist/assets/centered-state-DdRLYi9u.js +43 -0
  298. package/web/dist/assets/chevron-right-Dh0t3AL8.js +1 -0
  299. package/web/dist/assets/{chunk-BO2N2NFS-DtrdTCWa.js → chunk-BO2N2NFS-DE6qKn3r.js} +8 -8
  300. package/web/dist/assets/circle-check-4FDOlh9u.js +1 -0
  301. package/web/dist/assets/circle-x-CgTVbqX5.js +1 -0
  302. package/web/dist/assets/collapsible-BoADzTok.js +1 -0
  303. package/web/dist/assets/commit-list-BCcCkRbU.js +1 -0
  304. package/web/dist/assets/compare-variants-B7gTgGqR.js +1 -0
  305. package/web/dist/assets/{core-DePtBHcl.js → core-BCsw8oQw.js} +1 -1
  306. package/web/dist/assets/diff-ecfV3-op.js +3 -0
  307. package/web/dist/assets/diff-stat-C2KGLVnZ.js +1 -0
  308. package/web/dist/assets/{diff-view-DCeSegKk.js → diff-view-CQtonQ4L.js} +4 -4
  309. package/web/dist/assets/dropdown-menu-WcGoirf2.js +1 -0
  310. package/web/dist/assets/editable-title-SqNK-wuI.js +1 -0
  311. package/web/dist/assets/{ellipsis-vertical-CNnSLn5a.js → ellipsis-vertical-ClTFrwit.js} +1 -1
  312. package/web/dist/assets/{file-D4GBh1ao.js → file-BU0mWida.js} +1 -1
  313. package/web/dist/assets/folder-rsgCF0aw.js +1 -0
  314. package/web/dist/assets/{git-pull-request-DnR8Xh4_.js → git-pull-request-BFhIKb83.js} +1 -1
  315. package/web/dist/assets/git-toolbar-CF1_tzqz.js +1 -0
  316. package/web/dist/assets/github-CyjPz-Ks.js +1 -0
  317. package/web/dist/assets/highlighted-body-OFNGDK62-BL-MfFgl.js +1 -0
  318. package/web/dist/assets/highlighter-CdHqIwFr.js +3 -0
  319. package/web/dist/assets/image-preview-iEzCyEmz.js +1 -0
  320. package/web/dist/assets/index-BN09RpYY.css +2 -0
  321. package/web/dist/assets/index-CyG7aE1W.js +7 -0
  322. package/web/dist/assets/lib-BQXq3kEf.js +1 -0
  323. package/web/dist/assets/lib-BxQXEXDF.js +1 -0
  324. package/web/dist/assets/markdown-CNAa22LB.js +2 -0
  325. package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
  326. package/web/dist/assets/new-task-form-CWhQZbsX.js +1 -0
  327. package/web/dist/assets/pill-BO5s2x3N.js +1 -0
  328. package/web/dist/assets/project-router-Dm4OhAPE.js +1 -0
  329. package/web/dist/assets/prompt-templates-CP__OCDQ.js +15 -0
  330. package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
  331. package/web/dist/assets/{refresh-cw-BT8E96Tm.js → refresh-cw-DyiysCoP.js} +1 -1
  332. package/web/dist/assets/repo-git-B1WM6N8T.js +1 -0
  333. package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
  334. package/web/dist/assets/run-diff-CKx4d9Oo.js +3 -0
  335. package/web/dist/assets/run-header-DpbfOtNi.js +1 -0
  336. package/web/dist/assets/{search-x-BDjaMrzG.js → search-x-DRvk-6x4.js} +1 -1
  337. package/web/dist/assets/skill-empty-hint-D5vsHfMr.js +1 -0
  338. package/web/dist/assets/skills-BiWfHmCR.js +1 -0
  339. package/web/dist/assets/skills-XGltyIJ_.js +1 -0
  340. package/web/dist/assets/sparkles-BugkDxWO.js +1 -0
  341. package/web/dist/assets/{square-terminal-Ckjjn0vb.js → square-terminal-Drp2h-o8.js} +1 -1
  342. package/web/dist/assets/tab-link-CiRLRlnY.js +1 -0
  343. package/web/dist/assets/task-changes-C2hKkEtc.js +1 -0
  344. package/web/dist/assets/task-commits-CwGs_Opa.js +1 -0
  345. package/web/dist/assets/task-files-5KUgFzX3.js +2 -0
  346. package/web/dist/assets/task-thread-B3AFO3SS.js +9 -0
  347. package/web/dist/assets/textarea-Dn90Eun6.js +1 -0
  348. package/web/dist/assets/thread-loading-_1hPuk76.js +1 -0
  349. package/web/dist/assets/{trash-2-DAyZ0VSi.js → trash-2-BKEc5Sp2.js} +1 -1
  350. package/web/dist/assets/{triangle-alert-Uy8rokUh.js → triangle-alert-BGGPY2C2.js} +1 -1
  351. package/web/dist/assets/{upload-CDdyPPo_.js → upload-B0AQw-mO.js} +1 -1
  352. package/web/dist/assets/use-desktop-CegyTp3X.js +1 -0
  353. package/web/dist/assets/use-submit-shortcut-Mle-9uJp.js +1 -0
  354. package/web/dist/assets/utils-D9GHDNza.js +64 -0
  355. package/web/dist/assets/workflows-3PCz57Z6.js +11 -0
  356. package/web/dist/assets/zoomable-image-DTq7s8CZ.js +1 -0
  357. package/web/dist/index.html +33 -13
  358. package/scripts/dev.mjs +0 -74
  359. package/scripts/release-snapshot.mjs +0 -130
  360. package/scripts/release.mjs +0 -119
  361. package/web/dist/assets/arrow-left-CnSdp92h.js +0 -1
  362. package/web/dist/assets/bundle-mjs-BegPhL5c.js +0 -1
  363. package/web/dist/assets/centered-state-DOsTcJZF.js +0 -43
  364. package/web/dist/assets/commit-list-BrxBEzRK.js +0 -1
  365. package/web/dist/assets/compare-variants-Bv2c9ORF.js +0 -1
  366. package/web/dist/assets/dist-B6XQOhgM.js +0 -1
  367. package/web/dist/assets/git-toolbar-pIC1ubPM.js +0 -1
  368. package/web/dist/assets/github-DTTSG0ht.js +0 -1
  369. package/web/dist/assets/highlighted-body-OFNGDK62-BuFJwunK.js +0 -1
  370. package/web/dist/assets/image-preview-DEhW0TFz.js +0 -1
  371. package/web/dist/assets/index-Cijmlz7q.js +0 -30
  372. package/web/dist/assets/index-DzroxqBG.css +0 -2
  373. package/web/dist/assets/lib-DPEZDBUN.js +0 -1
  374. package/web/dist/assets/lib-uHpeUPzK.js +0 -1
  375. package/web/dist/assets/mermaid-GHXKKRXX-CN2zQue0.js +0 -1
  376. package/web/dist/assets/open-mercato-toBr6SOa.svg +0 -11
  377. package/web/dist/assets/project-router-BMx4e8m-.js +0 -1
  378. package/web/dist/assets/repo-git-BusYfa3t.js +0 -1
  379. package/web/dist/assets/run-diff-wOJ3odA-.js +0 -3
  380. package/web/dist/assets/run-header-Cg5incil.js +0 -1
  381. package/web/dist/assets/skill-empty-hint-DTUSp6Vl.js +0 -1
  382. package/web/dist/assets/skills-PpP2owbM.js +0 -1
  383. package/web/dist/assets/tab-link-F3uQrdm2.js +0 -1
  384. package/web/dist/assets/task-changes-iD9kS79I.js +0 -1
  385. package/web/dist/assets/task-commits-COkLaUri.js +0 -1
  386. package/web/dist/assets/task-files-Ckttz7XH.js +0 -2
  387. package/web/dist/assets/task-thread-CQD91VPt.js +0 -9
  388. package/web/dist/assets/textarea-Bj_LCreg.js +0 -1
  389. package/web/dist/assets/use-desktop-DUh0STzq.js +0 -3
  390. package/web/dist/assets/utils-B8s5qIcK.js +0 -1
  391. package/web/dist/assets/workflows-BFk8C0co.js +0 -11
  392. package/web/dist/assets/zoomable-image-PEDOqyLQ.js +0 -1
  393. /package/web/{open-mercato.svg → dist/open-mercato.svg} +0 -0
@@ -19,12 +19,22 @@
19
19
  * deliberately constrained to the launch project when `CEZ_SINGLE_PROJECT=1`.
20
20
  * Like the other opt-in capabilities, activation is strict: no other spelling
21
21
  * enables it.
22
+ *
23
+ * `automations` (spec 2026-07-25-github-automations, #801): GitHub automations
24
+ * are **opt-in** via `CEZ_AUTOMATIONS=1` and off by default. Off, the
25
+ * `Automations` nav item is gone everywhere it is rendered, the
26
+ * `/automations*` endpoints refuse, and the workspace scheduler never polls
27
+ * GitHub — the flag removes the behavior, not only the UI. Activation is
28
+ * strict, like the two capabilities above. Nothing on disk is touched:
29
+ * definitions, receipts and high-watermarks survive the flag being off, so
30
+ * unsetting it and restarting restores the feature wholesale.
31
+ *
32
+ * Usage presentation: token counts and monetary cost stay visible by default.
33
+ * `CEZ_HIDE_TOKEN_USAGE=1` and `CEZ_HIDE_COST=1` hide them independently;
34
+ * legacy `CEZ_HIDE_TOKEN_METRICS=1` remains the master hide-all switch. None
35
+ * changes collection, persistence, events, or API run records.
22
36
  */
23
- export interface Capabilities {
24
- localHandoff: boolean;
25
- followups: boolean;
26
- singleProject: boolean;
27
- }
37
+ import type { Capabilities } from '../contract/index.js';
28
38
  /** Canonical hostname of an authority: port and IPv6 brackets removed, IPv6
29
39
  * expanded, zone id and FQDN trailing dot dropped, lowercased.
30
40
  * `[::1]:4321` → `0:0:0:0:0:0:0:1`, `localhost.:4321` → `localhost`.
@@ -46,10 +56,15 @@ export declare function isLoopbackHost(host: string | undefined): boolean;
46
56
  export declare function isLoopbackHostHeader(host: string | null | undefined): boolean;
47
57
  /** `CEZ_REMOTE=1` or a non-loopback bind host ⇒ hosted mode (no local handoff).
48
58
  * `CEZ_FOLLOWUPS=1` ⇒ the follow-up inbox exists (#471).
59
+ * `CEZ_AUTOMATIONS=1` ⇒ GitHub automations exist (#801).
49
60
  *
50
61
  * Read per request — cheap, and tests/ops can flip `CEZ_REMOTE` live. `followups` is honest
51
62
  * per request too, but flipping it ON at runtime is only half a switch: the per-dataDir
52
63
  * todos watch (step 2.3) is created by an SSE subscription, so connections opened while the
53
64
  * flag was off never subscribed and get no live inbox updates until they reconnect. Hence
54
- * the UI's "set CEZ_FOLLOWUPS=1 and restart cezar" wording — treat it as a boot-time flag. */
65
+ * the UI's "set CEZ_FOLLOWUPS=1 and restart cezar" wording — treat it as a boot-time flag.
66
+ *
67
+ * `automations` carries the same caveat and for the same reason: the workspace scheduler is
68
+ * started once, on the server's `listening` event, so flipping the flag on afterwards gates
69
+ * the routes open without ever starting the poller. Boot-time flag, same wording. */
55
70
  export declare function resolveCapabilities(env?: NodeJS.ProcessEnv, bindHost?: string): Capabilities;
@@ -19,6 +19,20 @@
19
19
  * deliberately constrained to the launch project when `CEZ_SINGLE_PROJECT=1`.
20
20
  * Like the other opt-in capabilities, activation is strict: no other spelling
21
21
  * enables it.
22
+ *
23
+ * `automations` (spec 2026-07-25-github-automations, #801): GitHub automations
24
+ * are **opt-in** via `CEZ_AUTOMATIONS=1` and off by default. Off, the
25
+ * `Automations` nav item is gone everywhere it is rendered, the
26
+ * `/automations*` endpoints refuse, and the workspace scheduler never polls
27
+ * GitHub — the flag removes the behavior, not only the UI. Activation is
28
+ * strict, like the two capabilities above. Nothing on disk is touched:
29
+ * definitions, receipts and high-watermarks survive the flag being off, so
30
+ * unsetting it and restarting restores the feature wholesale.
31
+ *
32
+ * Usage presentation: token counts and monetary cost stay visible by default.
33
+ * `CEZ_HIDE_TOKEN_USAGE=1` and `CEZ_HIDE_COST=1` hide them independently;
34
+ * legacy `CEZ_HIDE_TOKEN_METRICS=1` remains the master hide-all switch. None
35
+ * changes collection, persistence, events, or API run records.
22
36
  */
23
37
  import { followupsEnabled } from '../handoff.js';
24
38
  /** Every IPv4 address in 127.0.0.0/8, anchored. Anchoring is load-bearing: a
@@ -108,19 +122,31 @@ export function isLoopbackHostHeader(host) {
108
122
  }
109
123
  /** `CEZ_REMOTE=1` or a non-loopback bind host ⇒ hosted mode (no local handoff).
110
124
  * `CEZ_FOLLOWUPS=1` ⇒ the follow-up inbox exists (#471).
125
+ * `CEZ_AUTOMATIONS=1` ⇒ GitHub automations exist (#801).
111
126
  *
112
127
  * Read per request — cheap, and tests/ops can flip `CEZ_REMOTE` live. `followups` is honest
113
128
  * per request too, but flipping it ON at runtime is only half a switch: the per-dataDir
114
129
  * todos watch (step 2.3) is created by an SSE subscription, so connections opened while the
115
130
  * flag was off never subscribed and get no live inbox updates until they reconnect. Hence
116
- * the UI's "set CEZ_FOLLOWUPS=1 and restart cezar" wording — treat it as a boot-time flag. */
131
+ * the UI's "set CEZ_FOLLOWUPS=1 and restart cezar" wording — treat it as a boot-time flag.
132
+ *
133
+ * `automations` carries the same caveat and for the same reason: the workspace scheduler is
134
+ * started once, on the server's `listening` event, so flipping the flag on afterwards gates
135
+ * the routes open without ever starting the poller. Boot-time flag, same wording. */
117
136
  export function resolveCapabilities(env = process.env, bindHost) {
137
+ const hideAllUsage = env.CEZ_HIDE_TOKEN_METRICS === '1';
138
+ const tokenUsageMetrics = !hideAllUsage && env.CEZ_HIDE_TOKEN_USAGE !== '1';
139
+ const costMetrics = !hideAllUsage && env.CEZ_HIDE_COST !== '1';
118
140
  return {
119
141
  localHandoff: env.CEZ_REMOTE !== '1' && isLoopbackHost(bindHost),
120
142
  // Deliberately not re-derived here: RunManager enforces the same predicate,
121
143
  // and two spellings of "is the inbox on" would eventually disagree.
122
144
  followups: followupsEnabled(env),
123
145
  singleProject: env.CEZ_SINGLE_PROJECT === '1',
146
+ automations: env.CEZ_AUTOMATIONS === '1',
147
+ tokenMetrics: tokenUsageMetrics && costMetrics,
148
+ tokenUsageMetrics,
149
+ costMetrics,
124
150
  };
125
151
  }
126
152
  //# sourceMappingURL=capabilities.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/server/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAQjD;;;0CAG0C;AAC1C,MAAM,WAAW,GAAG,4CAA4C,CAAC;AAEjE,kEAAkE;AAClE,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAEtC;;;;;;YAMY;AACZ,SAAS,UAAU,CAAC,CAAS;IAC3B,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACnC,IAAI,MAAgB,CAAC;IACrB,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC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AAG,CAAC;QAChC,aAAa,EAAE,GAAG,CAAC,kBAAkB,KAAK,GAAG;QAC7C,WAAW,EAAE,GAAG,CAAC,eAAe,KAAK,GAAG;QACxC,YAAY,EAAE,iBAAiB,IAAI,WAAW;QAC9C,iBAAiB;QACjB,WAAW;KACZ,CAAC;AACJ,CAAC"}
@@ -1,5 +1,14 @@
1
1
  import { z } from 'zod';
2
- import type { DraftPrInput, DraftPrOutcome, ForgeAvailability, ForgeComment, ForgeCommentsData, ForgeDriver, ForgeItem, ForgeTimelineEvent, ForgeTimelineEventKind } from './types.js';
2
+ import type { DraftPrInput, DraftPrOutcome, ForgeAvailability, ForgeComment, ForgeCommentsData, ForgeDriver, ForgeItem, ForgePrMergeState, ForgePrDiffResult, ForgeTimelineEvent, ForgeTimelineEventKind } from './types.ts';
3
+ export declare const GH_PR_DIFF_FILE_CAP = 300;
4
+ export declare const GH_PR_PATCH_CAP: number;
5
+ export declare const GH_PR_DIFF_JSON_CAP: number;
6
+ export declare class GithubPrNotFoundError extends Error {
7
+ }
8
+ export type PrFilesPageRunner = (page: number) => Promise<string>;
9
+ /** Fetch no more than the three GitHub pages represented by the public 300-file response cap. */
10
+ export declare function fetchPrFilePages(runPage: PrFilesPageRunner): Promise<unknown[]>;
11
+ export declare function fetchGithubPrDiff(repoRoot: string, number: number, refresh?: boolean): Promise<ForgePrDiffResult>;
3
12
  /** One GitHub issue or pull request, flattened for the cockpit's GitHub tab. */
4
13
  export type GithubItem = ForgeItem;
5
14
  export interface GithubData {
@@ -19,28 +28,12 @@ export declare const ghCheckRunSchema: z.ZodObject<{
19
28
  state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
29
  status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
30
  conclusion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
- }, "strip", z.ZodTypeAny, {
23
- state?: string | null | undefined;
24
- status?: string | null | undefined;
25
- conclusion?: string | null | undefined;
26
- }, {
27
- state?: string | null | undefined;
28
- status?: string | null | undefined;
29
- conclusion?: string | null | undefined;
30
- }>;
31
+ }, z.core.$strip>;
31
32
  declare const ghStatusCheckRollup: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
32
33
  state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
34
  status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
35
  conclusion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
- }, "strip", z.ZodTypeAny, {
36
- state?: string | null | undefined;
37
- status?: string | null | undefined;
38
- conclusion?: string | null | undefined;
39
- }, {
40
- state?: string | null | undefined;
41
- status?: string | null | undefined;
42
- conclusion?: string | null | undefined;
43
- }>, "many">>>;
36
+ }, z.core.$strip>>>>;
44
37
  /** Exported for unit tests (#400) — collapses a zod-validated `statusCheckRollup` array down to
45
38
  * the single enum the GitHub tab (list rows + detail badge) renders. */
46
39
  export declare function rollupToChecks(rollup: z.infer<typeof ghStatusCheckRollup>): GithubItem['checks'];
@@ -104,13 +97,7 @@ export declare const ghTimelineEventSchema: z.ZodObject<{
104
97
  actor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
105
98
  login: z.ZodString;
106
99
  avatar_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
107
- }, "strip", z.ZodTypeAny, {
108
- login: string;
109
- avatar_url?: string | null | undefined;
110
- }, {
111
- login: string;
112
- avatar_url?: string | null | undefined;
113
- }>>>;
100
+ }, z.core.$strip>>>;
114
101
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
115
102
  html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
116
103
  sha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -118,145 +105,27 @@ export declare const ghTimelineEventSchema: z.ZodObject<{
118
105
  author: z.ZodOptional<z.ZodNullable<z.ZodObject<{
119
106
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
107
  date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
- }, "strip", z.ZodTypeAny, {
122
- name?: string | null | undefined;
123
- date?: string | null | undefined;
124
- }, {
125
- name?: string | null | undefined;
126
- date?: string | null | undefined;
127
- }>>>;
108
+ }, z.core.$strip>>>;
128
109
  label: z.ZodOptional<z.ZodNullable<z.ZodObject<{
129
110
  name: z.ZodString;
130
111
  color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
131
- }, "strip", z.ZodTypeAny, {
132
- name: string;
133
- color?: string | null | undefined;
134
- }, {
135
- name: string;
136
- color?: string | null | undefined;
137
- }>>>;
112
+ }, z.core.$strip>>>;
138
113
  assignee: z.ZodOptional<z.ZodNullable<z.ZodObject<{
139
114
  login: z.ZodString;
140
- }, "strip", z.ZodTypeAny, {
141
- login: string;
142
- }, {
143
- login: string;
144
- }>>>;
115
+ }, z.core.$strip>>>;
145
116
  rename: z.ZodOptional<z.ZodNullable<z.ZodObject<{
146
117
  from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
118
  to: z.ZodOptional<z.ZodNullable<z.ZodString>>;
148
- }, "strip", z.ZodTypeAny, {
149
- from?: string | null | undefined;
150
- to?: string | null | undefined;
151
- }, {
152
- from?: string | null | undefined;
153
- to?: string | null | undefined;
154
- }>>>;
119
+ }, z.core.$strip>>>;
155
120
  source: z.ZodOptional<z.ZodNullable<z.ZodObject<{
156
121
  issue: z.ZodOptional<z.ZodNullable<z.ZodObject<{
157
122
  number: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
158
123
  title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
159
124
  html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
160
125
  pull_request: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
161
- }, "strip", z.ZodTypeAny, {
162
- number?: number | null | undefined;
163
- title?: string | null | undefined;
164
- html_url?: string | null | undefined;
165
- pull_request?: unknown;
166
- }, {
167
- number?: number | null | undefined;
168
- title?: string | null | undefined;
169
- html_url?: string | null | undefined;
170
- pull_request?: unknown;
171
- }>>>;
172
- }, "strip", z.ZodTypeAny, {
173
- issue?: {
174
- number?: number | null | undefined;
175
- title?: string | null | undefined;
176
- html_url?: string | null | undefined;
177
- pull_request?: unknown;
178
- } | null | undefined;
179
- }, {
180
- issue?: {
181
- number?: number | null | undefined;
182
- title?: string | null | undefined;
183
- html_url?: string | null | undefined;
184
- pull_request?: unknown;
185
- } | null | undefined;
186
- }>>>;
187
- }, "strip", z.ZodTypeAny, {
188
- event: string;
189
- id?: number | null | undefined;
190
- node_id?: string | null | undefined;
191
- created_at?: string | null | undefined;
192
- actor?: {
193
- login: string;
194
- avatar_url?: string | null | undefined;
195
- } | null | undefined;
196
- url?: string | null | undefined;
197
- html_url?: string | null | undefined;
198
- sha?: string | null | undefined;
199
- message?: string | null | undefined;
200
- author?: {
201
- name?: string | null | undefined;
202
- date?: string | null | undefined;
203
- } | null | undefined;
204
- label?: {
205
- name: string;
206
- color?: string | null | undefined;
207
- } | null | undefined;
208
- assignee?: {
209
- login: string;
210
- } | null | undefined;
211
- rename?: {
212
- from?: string | null | undefined;
213
- to?: string | null | undefined;
214
- } | null | undefined;
215
- source?: {
216
- issue?: {
217
- number?: number | null | undefined;
218
- title?: string | null | undefined;
219
- html_url?: string | null | undefined;
220
- pull_request?: unknown;
221
- } | null | undefined;
222
- } | null | undefined;
223
- }, {
224
- event: string;
225
- id?: number | null | undefined;
226
- node_id?: string | null | undefined;
227
- created_at?: string | null | undefined;
228
- actor?: {
229
- login: string;
230
- avatar_url?: string | null | undefined;
231
- } | null | undefined;
232
- url?: string | null | undefined;
233
- html_url?: string | null | undefined;
234
- sha?: string | null | undefined;
235
- message?: string | null | undefined;
236
- author?: {
237
- name?: string | null | undefined;
238
- date?: string | null | undefined;
239
- } | null | undefined;
240
- label?: {
241
- name: string;
242
- color?: string | null | undefined;
243
- } | null | undefined;
244
- assignee?: {
245
- login: string;
246
- } | null | undefined;
247
- rename?: {
248
- from?: string | null | undefined;
249
- to?: string | null | undefined;
250
- } | null | undefined;
251
- source?: {
252
- issue?: {
253
- number?: number | null | undefined;
254
- title?: string | null | undefined;
255
- html_url?: string | null | undefined;
256
- pull_request?: unknown;
257
- } | null | undefined;
258
- } | null | undefined;
259
- }>;
126
+ }, z.core.$strip>>>;
127
+ }, z.core.$strip>>>;
128
+ }, z.core.$strip>;
260
129
  /** First 200 thread entries, then `truncated`; each body sliced to 8 000 chars (same cap as
261
130
  * item bodies). */
262
131
  export declare const THREAD_ENTRY_CAP = 200;
@@ -349,6 +218,38 @@ export declare const COMMIT_CHECKS_CHUNK = 50;
349
218
  * `runGraphql` is injected so this is testable without shelling out.
350
219
  */
351
220
  export declare function fetchCommitChecks(runGraphql: GraphqlRunner, owner: string, name: string, shas: string[], chunkSize?: number): Promise<Record<string, ForgeTimelineEvent['checks']>>;
221
+ /** The single enum a PR row's checks glyph renders (never `undefined` on the wire). */
222
+ export type ChecksGlyph = 'passing' | 'failing' | 'pending' | null;
223
+ export type GithubChecksData = {
224
+ available: true;
225
+ checks: Record<number, ChecksGlyph>;
226
+ } | {
227
+ available: false;
228
+ reason: string;
229
+ };
230
+ /** PR numbers per checks query. Aliases resolve independently (a failed chunk costs only its own
231
+ * glyphs); bounded so an unbounded number list can't blow the query size limit. Also the route's
232
+ * hard cap on how many PRs one request may ask about. */
233
+ export declare const GH_CHECKS_MAX = 100;
234
+ /**
235
+ * Rolled-up CI state per PR number, as a `number → glyph` map.
236
+ *
237
+ * Batched and aliased so a 100-PR window costs one subprocess, not a hundred. Each alias resolves
238
+ * independently and an unknown number comes back `null` (alias resolved null → left absent), so
239
+ * partial results degrade cleanly. Degrades to an empty map on any failure — exactly as
240
+ * `fetchCommitChecks` does. Exported for tests; `runGraphql` is injected so this is testable
241
+ * without shelling out.
242
+ */
243
+ export declare function fetchPrChecks(runGraphql: GraphqlRunner, owner: string, name: string, numbers: number[], chunkSize?: number): Promise<Record<number, ChecksGlyph>>;
244
+ /** Test hook — the per-PR checks cache would otherwise leak state across cases in one process. */
245
+ export declare function __clearChecksCacheForTests(): void;
246
+ /**
247
+ * Lazy checks glyphs for the given PR numbers (route-facing). Resolves the repo handle once,
248
+ * serves fresh cache entries, queries only the misses, and degrades to `{ available: false,
249
+ * reason }` when `gh` or the handle is unavailable — never a throw, never a 5xx (plan rule 7).
250
+ * Numbers are de-duplicated, validated, and capped at `GH_CHECKS_MAX`.
251
+ */
252
+ export declare function fetchGithubChecks(repoRoot: string, numbers: number[]): Promise<GithubChecksData>;
352
253
  /**
353
254
  * The conversation thread for one issue/PR, lazily. `{owner}`/`{repo}` in the gh api paths are
354
255
  * filled from the worktree's remote by gh itself, so no extra handle lookup. Everything degrades:
@@ -380,6 +281,12 @@ export declare function buildPrBody(handoffText: string, task: string): string;
380
281
  * dropping `forge.available` and blinking the sidebar item out until the background probe warmed.
381
282
  */
382
283
  export declare function detectGithubCached(repoRoot: string): ForgeAvailability | null;
284
+ export declare function normalizeMergeState(raw: unknown, policyRaw: unknown, requirements?: {
285
+ readable: boolean;
286
+ requiredChecks: string[];
287
+ }): ForgePrMergeState;
288
+ export declare function evictGithubProjectCaches(repoRoot: string): void;
289
+ export declare function mergePreflightAllowed(current: ForgePrMergeState, overrideRules?: boolean): boolean;
383
290
  /** owner/repo parsed out of the origin remote — feeds `viewUrl`. */
384
291
  export interface GithubRepoRef {
385
292
  owner: string;