@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 @@
1
+ {"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/server/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;6CAG6C;AAC7C,MAAM,gBAAgB,GAAG,EAAE,GAAG,MAAM,CAAC;AAErC;qDACqD;AACrD,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAiC3B;;;iBAGiB;AACjB,MAAM,YAAY,GAAG,8BAA8B,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,OAAO,KAAK,EAAE,IAAI,OAAO,CAAC,MAAM,GAAG,GAAG;QAAE,OAAO,IAAI,CAAC;IACxD,0EAA0E;IAC1E,6EAA6E;IAC7E,gEAAgE;IAChE,IAAI,IAAI,GAAG,OAAO,CAAC;IACnB,MAAM,GAAG,GAAG,wC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AC;YACxC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAC3D,CAAC;QACD,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QAC/C,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IAC1D,CAAC;IAED,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IACxB,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACpC,CAAC;AAED,SAAS,OAAO,CAAC,GAAY;IAC3B,OAAO,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,513 @@
1
+ import { z } from 'zod';
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>;
12
+ /** One GitHub issue or pull request, flattened for the cockpit's GitHub tab. */
13
+ export type GithubItem = ForgeItem;
14
+ export interface GithubData {
15
+ available: boolean;
16
+ /** Human-readable hint when unavailable (`gh` missing, no remote, offline…). */
17
+ reason?: string;
18
+ /** owner/name, when known. */
19
+ repo?: string;
20
+ syncedAt?: string;
21
+ issues: GithubItem[];
22
+ prs: GithubItem[];
23
+ /** Repo-wide map of label name → 6-hex color (no `#`), so the UI can tint chips like GitHub
24
+ * does. Additive (BACKWARD_COMPATIBILITY): absent on old payloads, chips fall back to neutral. */
25
+ labelColors?: Record<string, string>;
26
+ }
27
+ export declare const ghCheckRunSchema: z.ZodObject<{
28
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
+ conclusion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ }, z.core.$strip>;
32
+ declare const ghStatusCheckRollup: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
33
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ conclusion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ }, z.core.$strip>>>>;
37
+ /** Exported for unit tests (#400) — collapses a zod-validated `statusCheckRollup` array down to
38
+ * the single enum the GitHub tab (list rows + detail badge) renders. */
39
+ export declare function rollupToChecks(rollup: z.infer<typeof ghStatusCheckRollup>): GithubItem['checks'];
40
+ /** Runs a GraphQL query with String variables — injected so pagination is unit-testable
41
+ * without shelling to `gh`. */
42
+ export type GraphqlRunner = (query: string, variables: Record<string, string>) => Promise<string>;
43
+ /** GraphQL's max page size; pagination is capped at 10 pages/kind (1000 rows — the GUI's full
44
+ * background shot). Rows past the window keep `comments: 0`, which the UI reads as "no badge". */
45
+ export declare const GH_COUNTS_MAX_PAGES = 10;
46
+ /** Validate + flatten one gh GraphQL counts response into a `number → count` map plus the page
47
+ * cursor. Exported for unit tests (the zod boundary + shape). Throws on a malformed envelope. */
48
+ export declare function parseCountsPage(out: string, root: 'issues' | 'pullRequests'): {
49
+ counts: Record<number, number>;
50
+ hasNextPage: boolean;
51
+ endCursor: string | null;
52
+ };
53
+ /** Comment counts for open issues and PRs as `number → count` maps. Two independent paginated
54
+ * queries (issues and PRs need separate cursors) run in parallel; any failure degrades the whole
55
+ * thing to empty maps so the tab is never held up by counts. Exported for unit tests. */
56
+ export declare function fetchCommentCounts(runGraphql: GraphqlRunner, owner: string, name: string, maxPages?: number): Promise<{
57
+ issues: Record<number, number>;
58
+ prs: Record<number, number>;
59
+ }>;
60
+ /** `owner/name` → `{ owner, name }`, or null when the handle isn't a clean two-part slug. */
61
+ export declare function parseOwnerName(nameWithOwner: string): {
62
+ owner: string;
63
+ name: string;
64
+ } | null;
65
+ export declare const GH_MAX_LIMIT = 1000;
66
+ export declare function fetchGithub(repoRoot: string, refresh?: boolean, limit?: number): Promise<GithubData>;
67
+ /** The event kinds rendered in v1 — an allowlist, so a new GitHub event type is dropped rather
68
+ * than rendered and can never crash or clutter the thread. Real timelines carry plenty that
69
+ * github.com itself doesn't surface (`subscribed`, `mentioned`, `review_requested`).
70
+ *
71
+ * `reviewed` is deliberately absent: timeline `reviewed` rows DO carry a body and would work,
72
+ * but `/pulls/{n}/reviews` is already normalized, chipped and empty-body-filtered, so sourcing
73
+ * both would render every review twice. */
74
+ export declare const TIMELINE_EVENT_KINDS: Set<ForgeTimelineEventKind>;
75
+ /** Events get their OWN cap, independent of `THREAD_ENTRY_CAP`. A combined cap would mean a
76
+ * thread with 150 comments and 100 events returns ~120 comments — silently removing contents
77
+ * from a §2-protected response. */
78
+ export declare const TIMELINE_EVENT_CAP = 200;
79
+ /** `gh api --paginate` has no page limit, so the timeline fetch hand-rolls a bounded loop. */
80
+ export declare const TIMELINE_MAX_PAGES = 10;
81
+ /** ONE budget shared by every page. `gh()`'s timeout is per invocation, so ten pages at the 15 s
82
+ * default would put the ceiling at 150 s — an order of magnitude worse than the single
83
+ * `--paginate` spawn this replaces. The loop tracks a deadline and passes what's left. */
84
+ export declare const TIMELINE_BUDGET_MS = 15000;
85
+ /** Never spawn a page that cannot finish. A bare `remaining <= 0` guard catches only the exact
86
+ * boundary; the realistic case is 300 ms left, which spawns `gh` with a 300 ms timeout, throws,
87
+ * and is indistinguishable from a real endpoint failure. */
88
+ export declare const TIMELINE_MIN_PAGE_MS = 2000;
89
+ /** One timeline row. `event` stays a loose `z.string()` so unknown kinds parse and are dropped by
90
+ * the allowlist rather than throwing the whole page. Extras are stripped by default — notably
91
+ * `author.email`, which is read for nothing and must not reach the wire type. */
92
+ export declare const ghTimelineEventSchema: z.ZodObject<{
93
+ event: z.ZodString;
94
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
95
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
97
+ actor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
98
+ login: z.ZodString;
99
+ avatar_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
+ }, z.core.$strip>>>;
101
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
+ html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
+ sha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
105
+ author: z.ZodOptional<z.ZodNullable<z.ZodObject<{
106
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
107
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
+ }, z.core.$strip>>>;
109
+ label: z.ZodOptional<z.ZodNullable<z.ZodObject<{
110
+ name: z.ZodString;
111
+ color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
+ }, z.core.$strip>>>;
113
+ assignee: z.ZodOptional<z.ZodNullable<z.ZodObject<{
114
+ login: z.ZodString;
115
+ }, z.core.$strip>>>;
116
+ rename: z.ZodOptional<z.ZodNullable<z.ZodObject<{
117
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
+ to: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
+ }, z.core.$strip>>>;
120
+ source: z.ZodOptional<z.ZodNullable<z.ZodObject<{
121
+ issue: z.ZodOptional<z.ZodNullable<z.ZodObject<{
122
+ number: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
123
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
124
+ html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
+ pull_request: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
126
+ }, z.core.$strip>>>;
127
+ }, z.core.$strip>>>;
128
+ }, z.core.$strip>;
129
+ /** First 200 thread entries, then `truncated`; each body sliced to 8 000 chars (same cap as
130
+ * item bodies). */
131
+ export declare const THREAD_ENTRY_CAP = 200;
132
+ /** `gh api …/issues/{n}/comments` JSON → `ForgeComment[]`. Exported for unit tests. */
133
+ export declare function normalizeComments(raw: unknown): ForgeComment[];
134
+ /** `gh api …/pulls/{n}/reviews` JSON → `ForgeComment[]`. Reviews with an empty body AND state
135
+ * COMMENTED/PENDING carry no signal in a flat thread and are dropped; the rest map to
136
+ * `kind: 'review'` (Q4). Exported for unit tests. */
137
+ export declare function normalizeReviews(raw: unknown): ForgeComment[];
138
+ /**
139
+ * `gh api …/issues/{n}/timeline` JSON → `ForgeTimelineEvent[]`, plus whether the cap fired.
140
+ *
141
+ * Returns `truncated` rather than just the array because the caller has no other way to learn it:
142
+ * `events.length === TIMELINE_EVENT_CAP` is ambiguous on a thread with exactly that many.
143
+ *
144
+ * Three details here are load-bearing and were verified against a real timeline, not assumed:
145
+ *
146
+ * 1. **`committed` rows return `created_at: null`** — the real timestamp is at `author.date`.
147
+ * Mapping `created_at` naively yields `createdAt: null` on every commit, which string-sorts to
148
+ * the top and silently reorders the entire thread.
149
+ * 2. **`committed` carries a git author, not a GitHub actor** — a name, no login, no avatar.
150
+ * 3. **The cap keeps the NEWEST events — `slice(-cap)`**, the opposite of the neighbouring
151
+ * `mergeThread`, which head-slices. The timeline arrives oldest-first, so `slice(0, cap)` would
152
+ * retain 200 stale day-one `labeled` rows and discard the merge and the recent commits — the
153
+ * exact rows #525 asks for.
154
+ *
155
+ * Exported for unit tests.
156
+ */
157
+ export declare function normalizeEvents(raw: unknown, cap?: number): {
158
+ events: ForgeTimelineEvent[];
159
+ truncated: boolean;
160
+ };
161
+ /** Merge comment/review lists chronologically (oldest first) and apply the entry cap. Exported
162
+ * for unit tests. */
163
+ export declare function mergeThread(parts: ForgeComment[][], cap?: number): {
164
+ comments: ForgeComment[];
165
+ truncated: boolean;
166
+ };
167
+ /** Test-only: drop the per-thread cache so cases don't leak state into each other. */
168
+ export declare function __clearCommentsCacheForTests(): void;
169
+ /** Test-only: drop the memoized repo handles. */
170
+ export declare function __clearRepoHandleCacheForTests(): void;
171
+ /** The `owner/name` for `repoRoot`, memoized. Returns null when the handle isn't a clean two-part
172
+ * slug or `gh` failed — the caller then skips checks entirely and commits render unglyphed. */
173
+ export declare function resolveRepoHandle(repoRoot: string): Promise<{
174
+ owner: string;
175
+ name: string;
176
+ } | null>;
177
+ /** What the bounded timeline page loop returns. `stoppedShort` means "the timeline may have more
178
+ * rows than we fetched" and has exactly three causes — the page cap, the budget floor, and a
179
+ * failure on page ≥ 2. All three shorten the `commented` stream the same way, so all three feed
180
+ * `truncated` and arm the comments top-up; the cause does not change the remedy. A short page is
181
+ * the one exit that does NOT set it: that is the timeline genuinely ending. */
182
+ type TimelinePages = {
183
+ rows: unknown[];
184
+ stoppedShort: boolean;
185
+ };
186
+ /**
187
+ * Walk `/issues/{n}/timeline` under ONE shared time budget.
188
+ *
189
+ * `gh api --paginate` is not used here: it pages *"until there are no more pages of results"* and
190
+ * exposes no page-limit flag, so the only way to bound the walk is to hand-roll it. The cap that
191
+ * `paginateCounts` gets comes from being a JS cursor loop, not from a `gh` flag.
192
+ *
193
+ * The budget is a **total**, not a per-page allowance. `gh()` takes its timeout per invocation, so
194
+ * ten sequential spawns at the 15 s default would put the ceiling at 150 s — an order of magnitude
195
+ * worse than the single `--paginate` spawn this replaces. The loop tracks a deadline and passes
196
+ * each page whatever remains.
197
+ *
198
+ * Exported for unit tests; `run` is injected so the loop is testable without shelling out.
199
+ */
200
+ export declare function fetchTimelinePages(run: (page: number, timeoutMs: number) => Promise<string>, opts?: {
201
+ maxPages?: number;
202
+ budgetMs?: number;
203
+ minPageMs?: number;
204
+ now?: () => number;
205
+ }): Promise<TimelinePages>;
206
+ /** SHAs per rollup query. Aliases resolve independently, so a chunk that fails costs only its own
207
+ * glyphs — but an unbounded alias list would eventually blow the query size limit. */
208
+ export declare const COMMIT_CHECKS_CHUNK = 50;
209
+ /**
210
+ * Rolled-up CI state per commit SHA, as a `sha → checks` map.
211
+ *
212
+ * Batched and aliased so a 40-commit PR costs one subprocess, not forty. Verified against the live
213
+ * API: each alias resolves independently and an unknown SHA comes back `null` rather than erroring
214
+ * the batch, so partial results degrade cleanly.
215
+ *
216
+ * Degrades to an empty map on any failure — exactly as `fetchCommentCounts` does for counts. The
217
+ * caller then leaves `checks` **absent**, which the UI renders as no glyph. Exported for tests;
218
+ * `runGraphql` is injected so this is testable without shelling out.
219
+ */
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>;
253
+ /** Where a referenced PR or issue stands. Mirrored by `referenceStatusSchema` in the contract —
254
+ * see there for why PR `closed` and issue `completed` are separate words. */
255
+ export type ReferenceStatus = 'draft' | 'review-required' | 'changes-requested' | 'checks-pending' | 'checks-failing' | 'ready' | 'merged' | 'closed' | 'open' | 'completed' | 'not-planned';
256
+ export type GithubRefStatusData = {
257
+ available: true;
258
+ prs: Record<number, ReferenceStatus>;
259
+ issues: Record<number, ReferenceStatus>;
260
+ /** The OPEN pull requests among them that do not merge into their base — the second axis,
261
+ * never folded into a status. Optional on the wire, and absent means "nothing is known"
262
+ * rather than "no conflicts"; see `conflicts` in the contract. */
263
+ conflicts?: number[];
264
+ /** When to ask again, or `null` when nothing here can change. See `recheckAfterMs` in the
265
+ * contract for why the SERVER answers this. */
266
+ recheckAfterMs: number | null;
267
+ } | {
268
+ available: false;
269
+ reason: string;
270
+ recheckAfterMs: number | null;
271
+ };
272
+ /** Numbers per kind in one ref-status query — the same bound, and for the same reasons, as
273
+ * `GH_CHECKS_MAX`: aliases resolve independently, and the query size stays finite. Taken from the
274
+ * contract rather than restated, because the cockpit caps its batches by the same number and a
275
+ * client that guessed high would have every chip in a batch 400 instead of losing its tail. */
276
+ export declare const GH_REF_STATUS_MAX = 100;
277
+ /**
278
+ * The one place a PR's signals collapse into a single word.
279
+ *
280
+ * The question the chip answers is "what is this waiting on RIGHT NOW", so the ranking is by
281
+ * freshness of the signal, not by how heavy a blocker it is:
282
+ *
283
+ * Read the ranking as **whose move is it**, which is the question a table is scanned for:
284
+ *
285
+ * 1. `merged` / `closed` — nobody's. Terminal, whatever checks or reviews say.
286
+ * 2. `draft` — the author's, and they have said so themselves.
287
+ * 3. `checks-pending` — the machine's. CI running means a commit was JUST pushed, the newest
288
+ * thing that has happened to this PR, so it outranks a requested change unconditionally.
289
+ * 4. `changes-requested` — the AUTHOR's, and only while that is still true: the review must be
290
+ * about the code that is there now, with no re-review already asked for.
291
+ * 5. `checks-failing` — the author's again. A reviewer cannot approve a red PR anyway.
292
+ * 6. `review-required` — the REVIEWER's: they have been asked, or the author has answered and
293
+ * the merge is now blocked on someone coming back to look.
294
+ * 7. `ready` — open, not a draft, nothing failing, nothing running, nobody waited on.
295
+ *
296
+ * The subtle one is (4) → (6), and it is not a preference but a data finding. `reviewDecision`
297
+ * stays `CHANGES_REQUESTED` after the author has responded — GitHub does not clear it until a
298
+ * reviewer submits again — so on its own it points at the author forever. Two signals say the ball
299
+ * has moved back:
300
+ *
301
+ * - **a review request made AFTER the review**, which is the author clicking re-request.
302
+ * Authoritative, and observed live alongside a stale `CHANGES_REQUESTED` and an EMPTY
303
+ * `latestReviews` — the case that has no other tell.
304
+ * - **a non-merge commit newer than the review**, the fallback for an author who pushed without
305
+ * clicking anything. Merges are excluded because GitHub's "Update branch" button writes one,
306
+ * dated now, that answers nothing — the reflexive click on a stale PR must not clear a
307
+ * rejection.
308
+ *
309
+ * The "after" in the first one is load-bearing, and its absence was a reported bug. A request that
310
+ * PREDATES the review is a reviewer who has not looked yet, and on a PR where several people were
311
+ * asked and one of them rejected it the others stay listed forever — so a bare
312
+ * `reviewRequests.totalCount > 0` reads a live "changes requested" as answered and hides it behind
313
+ * "waiting for review" (observed live: three reviewers asked at 10:28, changes requested
314
+ * the next day, one reviewer still pending).
315
+ *
316
+ * Either way the words change from "you owe edits" to "they owe a look", and so does the colour:
317
+ * danger is the author's move, info is the reviewer's.
318
+ *
319
+ * Both timestamps are optional and their ABSENCE is conservative: with no dates to compare and no
320
+ * re-request, a review counts as current, and the chip keeps pointing at the author.
321
+ *
322
+ * `reviewDecision` is null on a repo with no review policy, which is exactly why `ready` is not
323
+ * spelled "approved": on such a repo a green PR IS ready, and no approval will ever arrive — but a
324
+ * requested reviewer still moves it to `review-required`, because someone was explicitly asked.
325
+ */
326
+ export declare function derivePrReferenceStatus(pr: {
327
+ state: string;
328
+ isDraft?: boolean | null;
329
+ reviewDecision?: string | null;
330
+ checks: ChecksGlyph;
331
+ /** ISO-8601 commit date of the head commit. `committedDate`, not a push time: GitHub's
332
+ * `pushedDate` is deprecated and comes back null on new PRs. */
333
+ headCommittedAt?: string | null;
334
+ /** How many parents the head commit has. 2+ means a MERGE — "Update branch" pulling the base in,
335
+ * not work on the review. See `answered` below. Absent reads as an ordinary commit: the push
336
+ * rule is the common path and must not switch off on a field GitHub declined to send. */
337
+ headParentCount?: number | null;
338
+ /** ISO-8601 `committedDate` of the head's FIRST parent, which on a merge is the branch's previous
339
+ * tip — the newest commit that is actual work. Only read when the head is a merge. */
340
+ headFirstParentCommittedAt?: string | null;
341
+ /** ISO-8601 `submittedAt` of the most recent CHANGES_REQUESTED review, when there is one. */
342
+ changesRequestedAt?: string | null;
343
+ /** Is a reviewer currently ON THE HOOK — `reviewRequests.totalCount > 0`? True after the author
344
+ * clicks re-request, which is the one thing that says so while `reviewDecision` still reads
345
+ * `CHANGES_REQUESTED` — but also true of a reviewer asked long ago who never looked, hence
346
+ * `reviewRequestedAt`. */
347
+ reviewRequested?: boolean | null;
348
+ /** ISO-8601 `createdAt` of the most recent `ReviewRequestedEvent`, which is WHEN the standing
349
+ * request was made. Only a request younger than the review can be an answer to it. */
350
+ reviewRequestedAt?: string | null;
351
+ }): ReferenceStatus;
352
+ /**
353
+ * Whether this pull request's branch merges into its base — the OTHER axis, kept out of
354
+ * `derivePrReferenceStatus` on purpose (see `conflicts` in the contract).
355
+ *
356
+ * Three values, and the third is the one that matters. GitHub does not store mergeability; it
357
+ * COMPUTES it when asked, and answers `UNKNOWN` while the background job runs — which is the
358
+ * normal answer for the first seconds after every push, and therefore for exactly the moment a
359
+ * cockpit is most likely to be looking. `UNKNOWN` means *we were not told*, never *it is clean*,
360
+ * and the caller must be able to tell those apart: it is what decides how soon to ask again
361
+ * (`refStatusTtl`), and answering it as "not conflicting" with a one-minute TTL is precisely how a
362
+ * conflicting pull request came to sit there wearing "Ready to merge".
363
+ *
364
+ * `undefined` for anything the question does not apply to: an issue, and a merged or closed pull
365
+ * request (GitHub says `UNKNOWN` for those too, forever, and a terminal PR has no conflict left to
366
+ * resolve — a merged PR wearing a conflict chip is a lie the state alone rules out).
367
+ */
368
+ export type Mergeability = 'mergeable' | 'conflicting' | 'unknown';
369
+ export declare function mergeabilityOf(state: string, mergeable: string | null | undefined): Mergeability | undefined;
370
+ /**
371
+ * An issue's two signals as one word. `NOT_PLANNED` is kept apart from `completed` because they
372
+ * are opposite outcomes — "we did it" vs "we won't" — and a task whose issue was declined must
373
+ * not read as a task that landed.
374
+ */
375
+ export declare function deriveIssueReferenceStatus(issue: {
376
+ state: string;
377
+ stateReason?: string | null;
378
+ }): ReferenceStatus;
379
+ /** What one number turned out to be, and where it stands. `kind` is the forge's answer, not the
380
+ * caller's guess — see `refStatusQuery`. */
381
+ export interface ResolvedReference {
382
+ kind: 'pr' | 'issue';
383
+ status: ReferenceStatus;
384
+ /** Where this pull request stands on the OTHER axis, or absent when the question does not
385
+ * apply (an issue, a merged or closed PR). Deliberately not folded into `status`; see
386
+ * `mergeabilityOf`, and `conflicts` in the contract. `unknown` is kept as a value rather than
387
+ * collapsed into "not conflicting", because it is the difference between an answer and a
388
+ * question GitHub has not finished answering. */
389
+ mergeable?: Mergeability;
390
+ }
391
+ /**
392
+ * The outcome of one batched lookup. `failed` is what separates *this number is not in the
393
+ * repository* from *we could not ask about this number* — an absence and a failure, which look
394
+ * identical in a `number → status` map and mean opposite things to a reader ("that reference is
395
+ * bogus" vs "GitHub is down"). Keeping them apart is what stops a transient error being cached,
396
+ * and shown, as "not found".
397
+ */
398
+ export interface RefStatusBatch {
399
+ resolved: Record<number, ResolvedReference>;
400
+ /** Numbers whose chunk threw. Nothing is known about them either way. */
401
+ failed: number[];
402
+ /** First failure's message, for the payload's `reason`. */
403
+ reason?: string;
404
+ }
405
+ /**
406
+ * Status per NUMBER, resolved to whatever that number actually is.
407
+ *
408
+ * Batched and aliased like `fetchPrChecks`: one subprocess per chunk, each alias resolving
409
+ * independently, and a number the forge does not have simply staying absent from `resolved` (its
410
+ * chip then renders neutral, as it did before this seam existed). A failed chunk costs only its
411
+ * own numbers, and says so rather than letting them look absent. Exported for tests; `runGraphql`
412
+ * is injected so this is testable without shelling out.
413
+ */
414
+ export declare function fetchRefStatuses(runGraphql: GraphqlRunner, owner: string, name: string, numbers: number[], chunkSize?: number): Promise<RefStatusBatch>;
415
+ /** Test-only: drop the per-reference cache so cases don't leak state into each other. */
416
+ export declare function __clearRefStatusCacheForTests(): void;
417
+ /** Test-only: warm the cache the way the lazy route would have, so a reader can be tested
418
+ * without a forge behind it. */
419
+ export declare function __seedRefStatusCacheForTests(repoRoot: string, entries: Array<[number, ResolvedReference]>): void;
420
+ /**
421
+ * Forget what we knew about one reference, so the next read asks GitHub again.
422
+ *
423
+ * Called where cezar itself CHANGES a pull request — it merges one, it opens one — because those
424
+ * are the only forge changes this process can know about without asking. Everything else has to
425
+ * be polled (GitHub cannot push to a cockpit with no public endpoint), but waiting out a TTL to
426
+ * notice our own merge is a self-inflicted staleness: for up to a minute every chip would keep
427
+ * showing the pre-merge status of a pull request the user watched this server merge.
428
+ *
429
+ * Deleting rather than overwriting with a guessed `merged`: the forge is the authority on what a
430
+ * reference is, and a mutation that reports success is still not the same as having read the
431
+ * result. The next reader pays one query and gets the truth — after which the answer is `merged`,
432
+ * `recheckAfterMs` goes null, and the cockpit stops polling that batch entirely. Invalidating here
433
+ * therefore REDUCES long-run traffic rather than adding to it.
434
+ */
435
+ export declare function forgetRefStatus(repoRoot: string, number: number): void;
436
+ /**
437
+ * Everything the cache ALREADY knows about these numbers. Never spawns `gh`, never awaits.
438
+ *
439
+ * This is what lets a status ride along with the rows that carry the references, instead of the
440
+ * cockpit fetching it separately a moment later: the run index reads whatever is warm and ships
441
+ * it, and a cold entry is simply absent — the lazy `/github/ref-status` route stays the thing that
442
+ * actually goes and asks.
443
+ *
444
+ * Because it cannot cost anything, the caller may pass a SUPERSET of the numbers it will really
445
+ * display. That matters: deciding which of a run's references a chip shows is the cockpit's rule
446
+ * (#407, #526), deliberately not duplicated server-side, and a cache read does not need to know —
447
+ * it can look up every number a run mentions and let the client pick.
448
+ */
449
+ export declare function readCachedRefStatuses(repoRoot: string, numbers: Iterable<number>): {
450
+ prs: Record<number, ReferenceStatus>;
451
+ issues: Record<number, ReferenceStatus>;
452
+ };
453
+ /** The `#N` in a forge URL — `…/pull/774` → 774. Null when the tail is not a number, so a URL
454
+ * shape we do not recognise invalidates nothing rather than inventing a key. */
455
+ export declare function refNumberFromUrl(url: string): number | null;
456
+ /**
457
+ * Route-facing reference status. Resolves the repo handle once, serves fresh cache entries,
458
+ * queries only the misses, and degrades to `{ available: false, reason }` when `gh` or the handle
459
+ * is unavailable — never a throw, never a 5xx.
460
+ *
461
+ * The two request lists are merged into ONE set of numbers: issues and pull requests share a
462
+ * repository's numbering space, so a number is one thing and asking about it twice would be asking
463
+ * the same question twice. What comes back is filed by what each number turned out to BE, which is
464
+ * why a chip whose kind the cockpit guessed wrong still gets the right status.
465
+ */
466
+ export declare function fetchGithubRefStatus(repoRoot: string, input: {
467
+ prs?: number[];
468
+ issues?: number[];
469
+ }): Promise<GithubRefStatusData>;
470
+ /**
471
+ * The conversation thread for one issue/PR, lazily. `{owner}`/`{repo}` in the gh api paths are
472
+ * filled from the worktree's remote by gh itself, so no extra handle lookup. Everything degrades:
473
+ * gh missing/offline → `{ available: false, reason }`, a 404 → a "not found" hint — never a throw.
474
+ *
475
+ * Since #525 the thread is sourced from `/issues/{n}/timeline`, which returns comments AND events
476
+ * in one stream: `commented` rows go through the unchanged `normalizeComments`, the rest through
477
+ * `normalizeEvents`. `comments[]` therefore keeps its exact pre-#525 shape, contents and cap
478
+ * (BACKWARD_COMPATIBILITY.md §2) — see the top-up below for the one case that needed defending.
479
+ */
480
+ export declare function fetchGithubComments(repoRoot: string, kind: 'issue' | 'pr', number: number, refresh?: boolean): Promise<ForgeCommentsData>;
481
+ export declare function createDraftPr(input: DraftPrInput): Promise<DraftPrOutcome>;
482
+ /**
483
+ * PR body from the handoff journal: the "## Goal" section (task text as
484
+ * fallback) + the first ~10 lines of "## Progress log" (newest first) +
485
+ * the cezar footer.
486
+ */
487
+ export declare function buildPrBody(handoffText: string, task: string): string;
488
+ /**
489
+ * Non-blocking availability for `GET /api/health` (#major-health-latency): serves the last-known
490
+ * probe immediately (stale-while-revalidate) and only returns `null` on a cold start, before the
491
+ * first probe has ever warmed the cache. It NEVER shells out to `gh` on the request that reads it,
492
+ * so health stays under the bookmarklet's 800 ms port budget (a `gh repo view` round-trip is
493
+ * ~500–650 ms on its own). `null` is contract-safe — the whole `forge` field is additive, so
494
+ * "unknown until warm" is a valid answer.
495
+ *
496
+ * Serving the stale value while revalidating is what keeps the GitHub nav item from flickering:
497
+ * without it, every time the 60 s cache expired this returned `null` for one 5 s health poll,
498
+ * dropping `forge.available` and blinking the sidebar item out until the background probe warmed.
499
+ */
500
+ export declare function detectGithubCached(repoRoot: string): ForgeAvailability | null;
501
+ export declare function normalizeMergeState(raw: unknown, policyRaw: unknown, requirements?: {
502
+ readable: boolean;
503
+ requiredChecks: string[];
504
+ }): ForgePrMergeState;
505
+ export declare function evictGithubProjectCaches(repoRoot: string): void;
506
+ export declare function mergePreflightAllowed(current: ForgePrMergeState, overrideRules?: boolean): boolean;
507
+ /** owner/repo parsed out of the origin remote — feeds `viewUrl`. */
508
+ export interface GithubRepoRef {
509
+ owner: string;
510
+ repo: string;
511
+ }
512
+ export declare function createGithubDriver(repoRoot: string, repoRef: GithubRepoRef | null): ForgeDriver;
513
+ export {};