@open-mercato/cezar 0.9.1 → 0.9.2

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 (300) hide show
  1. package/README.md +19 -11
  2. package/dist/agent-config/catalog.d.ts +1 -1
  3. package/dist/agent-config/files.d.ts +1 -1
  4. package/dist/agent-config/service.d.ts +1 -1
  5. package/dist/agent-config/validate.d.ts +1 -1
  6. package/dist/automations/coordinator.d.ts +26 -0
  7. package/dist/automations/coordinator.js +66 -0
  8. package/dist/automations/coordinator.js.map +1 -0
  9. package/dist/automations/github-poller.d.ts +74 -0
  10. package/dist/automations/github-poller.js +234 -0
  11. package/dist/automations/github-poller.js.map +1 -0
  12. package/dist/automations/scheduler.d.ts +42 -0
  13. package/dist/automations/scheduler.js +192 -0
  14. package/dist/automations/scheduler.js.map +1 -0
  15. package/dist/automations/store.d.ts +65 -0
  16. package/dist/automations/store.js +298 -0
  17. package/dist/automations/store.js.map +1 -0
  18. package/dist/automations/task-template.d.ts +18 -0
  19. package/dist/automations/task-template.js +95 -0
  20. package/dist/automations/task-template.js.map +1 -0
  21. package/dist/automations/types.d.ts +251 -0
  22. package/dist/automations/types.js +158 -0
  23. package/dist/automations/types.js.map +1 -0
  24. package/dist/config.d.ts +9 -111
  25. package/dist/contract/agent-config.d.ts +151 -0
  26. package/dist/contract/automations.d.ts +911 -0
  27. package/dist/contract/events.d.ts +45 -0
  28. package/dist/contract/github.d.ts +467 -0
  29. package/dist/contract/health.d.ts +96 -0
  30. package/dist/contract/index.d.ts +15 -0
  31. package/dist/contract/index.js +1421 -0
  32. package/dist/contract/projects.d.ts +182 -0
  33. package/dist/contract/repo.d.ts +234 -0
  34. package/dist/contract/runs.d.ts +1226 -0
  35. package/dist/contract/skills.d.ts +225 -0
  36. package/dist/contract/workflows.d.ts +212 -0
  37. package/dist/contract/workspace.d.ts +442 -0
  38. package/dist/core/agent-env.d.ts +1 -1
  39. package/dist/core/agent-runner.d.ts +12 -1
  40. package/dist/core/agent-runner.js +13 -0
  41. package/dist/core/agent-runner.js.map +1 -1
  42. package/dist/core/ask.d.ts +45 -124
  43. package/dist/core/ask.js +103 -13
  44. package/dist/core/ask.js.map +1 -1
  45. package/dist/core/claude-cli-runner.d.ts +2 -2
  46. package/dist/core/claude-cli-runner.js +52 -9
  47. package/dist/core/claude-cli-runner.js.map +1 -1
  48. package/dist/core/claude-ui-mapper.d.ts +1 -1
  49. package/dist/core/codex-app-server-runner.d.ts +1 -1
  50. package/dist/core/codex-app-server-runner.js +55 -3
  51. package/dist/core/codex-app-server-runner.js.map +1 -1
  52. package/dist/core/codex-app-server-transport.d.ts +6 -1
  53. package/dist/core/codex-app-server-transport.js +12 -3
  54. package/dist/core/codex-app-server-transport.js.map +1 -1
  55. package/dist/core/codex-model-catalog.d.ts +1 -1
  56. package/dist/core/codex-ui-mapper.d.ts +5 -1
  57. package/dist/core/codex-ui-mapper.js +74 -17
  58. package/dist/core/codex-ui-mapper.js.map +1 -1
  59. package/dist/core/model-identity.d.ts +1 -1
  60. package/dist/core/model-presets.d.ts +2 -2
  61. package/dist/core/model-presets.js +1 -1
  62. package/dist/core/opencode-server-runner.d.ts +2 -2
  63. package/dist/core/opencode-ui-mapper.d.ts +4 -1
  64. package/dist/core/opencode-ui-mapper.js +45 -7
  65. package/dist/core/opencode-ui-mapper.js.map +1 -1
  66. package/dist/core/provider-auth.d.ts +62 -0
  67. package/dist/core/provider-auth.js +290 -0
  68. package/dist/core/provider-auth.js.map +1 -0
  69. package/dist/core/provider-availability.d.ts +3 -0
  70. package/dist/core/provider-availability.js +13 -0
  71. package/dist/core/provider-availability.js.map +1 -0
  72. package/dist/core/runner-factory.d.ts +1 -1
  73. package/dist/core/runner-model-catalog.d.ts +1 -1
  74. package/dist/core/tool-display.d.ts +1 -1
  75. package/dist/core/ui-events.d.ts +1 -1
  76. package/dist/core/ui-events.js +1 -1
  77. package/dist/git-diff-base.d.ts +60 -0
  78. package/dist/git-diff-base.js +54 -0
  79. package/dist/git-diff-base.js.map +1 -0
  80. package/dist/git-worktree.d.ts +37 -6
  81. package/dist/git-worktree.js +39 -9
  82. package/dist/git-worktree.js.map +1 -1
  83. package/dist/handoff.d.ts +2 -2
  84. package/dist/handoff.js +1 -1
  85. package/dist/index.js +65 -8
  86. package/dist/index.js.map +1 -1
  87. package/dist/paths.d.ts +16 -1
  88. package/dist/paths.js +24 -1
  89. package/dist/paths.js.map +1 -1
  90. package/dist/planner.d.ts +2 -2
  91. package/dist/planner.js +1 -1
  92. package/dist/planner.js.map +1 -1
  93. package/dist/release/manifests.d.ts +81 -0
  94. package/dist/release/manifests.js +74 -0
  95. package/dist/release/manifests.js.map +1 -0
  96. package/dist/release/snapshot.d.ts +9 -23
  97. package/dist/release/snapshot.js +9 -22
  98. package/dist/release/snapshot.js.map +1 -1
  99. package/dist/release/stable.d.ts +15 -29
  100. package/dist/release/stable.js +14 -27
  101. package/dist/release/stable.js.map +1 -1
  102. package/dist/runs/auto-name.d.ts +1 -1
  103. package/dist/runs/retention.d.ts +1 -1
  104. package/dist/runs/store.d.ts +142 -336
  105. package/dist/runs/store.js +136 -9
  106. package/dist/runs/store.js.map +1 -1
  107. package/dist/runs/ui-event-sink.d.ts +1 -1
  108. package/dist/server/app-type.d.ts +21 -0
  109. package/dist/server/app-type.js +2 -0
  110. package/dist/server/app-type.js.map +1 -0
  111. package/dist/server/capabilities.d.ts +6 -5
  112. package/dist/server/capabilities.js +11 -0
  113. package/dist/server/capabilities.js.map +1 -1
  114. package/dist/server/forge/github.d.ts +58 -151
  115. package/dist/server/forge/github.js +530 -6
  116. package/dist/server/forge/github.js.map +1 -1
  117. package/dist/server/forge/index.d.ts +10 -3
  118. package/dist/server/forge/index.js +14 -1
  119. package/dist/server/forge/index.js.map +1 -1
  120. package/dist/server/forge/types.d.ts +86 -1
  121. package/dist/server/git-changes.d.ts +8 -8
  122. package/dist/server/git-changes.js +14 -17
  123. package/dist/server/git-changes.js.map +1 -1
  124. package/dist/server/git.d.ts +2 -0
  125. package/dist/server/git.js +9 -0
  126. package/dist/server/git.js.map +1 -1
  127. package/dist/server/github.d.ts +3 -3
  128. package/dist/server/github.js +1 -1
  129. package/dist/server/github.js.map +1 -1
  130. package/dist/server/pr.d.ts +2 -2
  131. package/dist/server/project-context.d.ts +20 -3
  132. package/dist/server/project-context.js +30 -1
  133. package/dist/server/project-context.js.map +1 -1
  134. package/dist/server/provider-action-gate.d.ts +8 -0
  135. package/dist/server/provider-action-gate.js +54 -0
  136. package/dist/server/provider-action-gate.js.map +1 -0
  137. package/dist/server/provider-auth-runtime.d.ts +21 -0
  138. package/dist/server/provider-auth-runtime.js +66 -0
  139. package/dist/server/provider-auth-runtime.js.map +1 -0
  140. package/dist/server/server.d.ts +11142 -47
  141. package/dist/server/server.js +1714 -806
  142. package/dist/server/server.js.map +1 -1
  143. package/dist/server/validators.d.ts +97 -0
  144. package/dist/server/validators.js +86 -0
  145. package/dist/server/validators.js.map +1 -0
  146. package/dist/server/ws.d.ts +2 -2
  147. package/dist/server/ws.js +2 -2
  148. package/dist/server/ws.js.map +1 -1
  149. package/dist/server-install/engine.d.ts +1 -1
  150. package/dist/server-install/platforms/macosx-ngrok.d.ts +1 -1
  151. package/dist/server-install/platforms/ubuntu-vps.d.ts +16 -1
  152. package/dist/server-install/platforms/ubuntu-vps.js +83 -1
  153. package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
  154. package/dist/server-install/state.d.ts +1 -1
  155. package/dist/server-install/steps.d.ts +2 -2
  156. package/dist/server-install/strategies.d.ts +1 -1
  157. package/dist/server-install/types.d.ts +38 -424
  158. package/dist/server-install/ui.d.ts +1 -1
  159. package/dist/skills-banner.d.ts +7 -6
  160. package/dist/skills-banner.js +7 -6
  161. package/dist/skills-banner.js.map +1 -1
  162. package/dist/skills-remote.d.ts +2 -2
  163. package/dist/skills-update.d.ts +88 -0
  164. package/dist/skills-update.js +392 -0
  165. package/dist/skills-update.js.map +1 -0
  166. package/dist/skills.d.ts +2 -0
  167. package/dist/skills.js +3 -2
  168. package/dist/skills.js.map +1 -1
  169. package/dist/todos.d.ts +2 -28
  170. package/dist/todos.js +1 -1
  171. package/dist/ui-state.d.ts +16 -2
  172. package/dist/ui-state.js +14 -1
  173. package/dist/ui-state.js.map +1 -1
  174. package/dist/workflows/load.d.ts +1 -1
  175. package/dist/workflows/run.d.ts +53 -12
  176. package/dist/workflows/run.js +436 -64
  177. package/dist/workflows/run.js.map +1 -1
  178. package/dist/workflows/types.d.ts +59 -224
  179. package/dist/workflows/types.js +14 -0
  180. package/dist/workflows/types.js.map +1 -1
  181. package/dist/workspace/config.d.ts +68 -206
  182. package/dist/workspace/config.js +145 -14
  183. package/dist/workspace/config.js.map +1 -1
  184. package/dist/workspace/migrations.d.ts +1 -1
  185. package/dist/workspace/migrations.js +19 -4
  186. package/dist/workspace/migrations.js.map +1 -1
  187. package/dist/workspace/projects.d.ts +8 -2
  188. package/dist/workspace/projects.js +9 -3
  189. package/dist/workspace/projects.js.map +1 -1
  190. package/dist/workspace/semaphore.d.ts +6 -0
  191. package/dist/workspace/semaphore.js +14 -1
  192. package/dist/workspace/semaphore.js.map +1 -1
  193. package/dist/workspace/ui-state.d.ts +13 -3
  194. package/dist/workspace/ui-state.js +15 -5
  195. package/dist/workspace/ui-state.js.map +1 -1
  196. package/package.json +17 -39
  197. package/scripts/inline-contract.mjs +112 -0
  198. package/scripts/mock-claude.mjs +39 -1
  199. package/scripts/sync-readme.mjs +20 -0
  200. package/web/dist/assets/alert-dialog-ghffK6g9.js +1 -0
  201. package/web/dist/assets/arrow-down-Cz8qb71e.js +1 -0
  202. package/web/dist/assets/arrow-left-wcYKQXI_.js +1 -0
  203. package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
  204. package/web/dist/assets/centered-state-ZtnFHA-n.js +43 -0
  205. package/web/dist/assets/chevron-right-G4caF2QV.js +1 -0
  206. package/web/dist/assets/{chunk-BO2N2NFS-DtrdTCWa.js → chunk-BO2N2NFS-DE6qKn3r.js} +8 -8
  207. package/web/dist/assets/circle-check--KvBxXWp.js +1 -0
  208. package/web/dist/assets/circle-x-C3EFZ3xf.js +1 -0
  209. package/web/dist/assets/collapsible-B0JVzd0B.js +1 -0
  210. package/web/dist/assets/commit-list-wm6DPHNs.js +1 -0
  211. package/web/dist/assets/compare-variants-DbdP4Y5T.js +1 -0
  212. package/web/dist/assets/{core-DePtBHcl.js → core-BCsw8oQw.js} +1 -1
  213. package/web/dist/assets/diff-Bizc96qe.js +3 -0
  214. package/web/dist/assets/diff-stat-Dyfg3ltF.js +1 -0
  215. package/web/dist/assets/{diff-view-DCeSegKk.js → diff-view-CG8ek6tC.js} +4 -4
  216. package/web/dist/assets/dropdown-menu-C1Dlf35P.js +1 -0
  217. package/web/dist/assets/editable-title-5rC_QRBZ.js +1 -0
  218. package/web/dist/assets/{ellipsis-vertical-CNnSLn5a.js → ellipsis-vertical-DpGTRqC2.js} +1 -1
  219. package/web/dist/assets/{file-D4GBh1ao.js → file-DlUGpUlb.js} +1 -1
  220. package/web/dist/assets/folder-BAY6Vddy.js +1 -0
  221. package/web/dist/assets/{git-pull-request-DnR8Xh4_.js → git-pull-request-agOG0iGM.js} +1 -1
  222. package/web/dist/assets/git-toolbar-DGiNMmtY.js +1 -0
  223. package/web/dist/assets/github-Vp7lxYGQ.js +1 -0
  224. package/web/dist/assets/highlighted-body-OFNGDK62-BL-MfFgl.js +1 -0
  225. package/web/dist/assets/highlighter-CdHqIwFr.js +3 -0
  226. package/web/dist/assets/image-preview-BWGk5fPX.js +1 -0
  227. package/web/dist/assets/index-DSxyJpuK.css +2 -0
  228. package/web/dist/assets/index-DiawI6RX.js +6 -0
  229. package/web/dist/assets/lib-BQXq3kEf.js +1 -0
  230. package/web/dist/assets/lib-BxQXEXDF.js +1 -0
  231. package/web/dist/assets/markdown-BGBOGCA_.js +2 -0
  232. package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
  233. package/web/dist/assets/new-task-form-BpAw_Dks.js +1 -0
  234. package/web/dist/assets/pill-Dvs-P0xy.js +1 -0
  235. package/web/dist/assets/project-router-Cx8NPoqn.js +1 -0
  236. package/web/dist/assets/prompt-templates-CSBYBR1I.js +15 -0
  237. package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
  238. package/web/dist/assets/{refresh-cw-BT8E96Tm.js → refresh-cw-BoGdAykg.js} +1 -1
  239. package/web/dist/assets/repo-git-PmX-BNMo.js +1 -0
  240. package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
  241. package/web/dist/assets/run-diff-EcOkf3ti.js +3 -0
  242. package/web/dist/assets/run-header-BGiv6_qX.js +1 -0
  243. package/web/dist/assets/{search-x-BDjaMrzG.js → search-x-X3EpVhgs.js} +1 -1
  244. package/web/dist/assets/skill-empty-hint-CZLALx6l.js +1 -0
  245. package/web/dist/assets/skills-BiWfHmCR.js +1 -0
  246. package/web/dist/assets/skills-CC91ouGH.js +1 -0
  247. package/web/dist/assets/sparkles-Dt4q7pbG.js +1 -0
  248. package/web/dist/assets/{square-terminal-Ckjjn0vb.js → square-terminal-hwBL8XsC.js} +1 -1
  249. package/web/dist/assets/tab-link-DIlR5T07.js +1 -0
  250. package/web/dist/assets/task-changes-XkHDxzQA.js +1 -0
  251. package/web/dist/assets/task-commits-BTTA5k5T.js +1 -0
  252. package/web/dist/assets/task-files-Da8_4C9g.js +2 -0
  253. package/web/dist/assets/task-thread-DoNXUsHr.js +9 -0
  254. package/web/dist/assets/textarea-CUdokhkv.js +1 -0
  255. package/web/dist/assets/thread-loading-B8q8ukXJ.js +1 -0
  256. package/web/dist/assets/{trash-2-DAyZ0VSi.js → trash-2-DhVIdWv8.js} +1 -1
  257. package/web/dist/assets/{triangle-alert-Uy8rokUh.js → triangle-alert-XYT0DGCI.js} +1 -1
  258. package/web/dist/assets/{upload-CDdyPPo_.js → upload-BKjN59-1.js} +1 -1
  259. package/web/dist/assets/use-desktop-Bf5LS_P4.js +1 -0
  260. package/web/dist/assets/use-submit-shortcut-CzVyoAMd.js +1 -0
  261. package/web/dist/assets/utils-DsLuRXwV.js +64 -0
  262. package/web/dist/assets/workflows-o2QU_pvU.js +11 -0
  263. package/web/dist/assets/zoomable-image-7WyUiaVD.js +1 -0
  264. package/web/dist/index.html +32 -13
  265. package/scripts/dev.mjs +0 -74
  266. package/scripts/release-snapshot.mjs +0 -130
  267. package/scripts/release.mjs +0 -119
  268. package/web/dist/assets/arrow-left-CnSdp92h.js +0 -1
  269. package/web/dist/assets/bundle-mjs-BegPhL5c.js +0 -1
  270. package/web/dist/assets/centered-state-DOsTcJZF.js +0 -43
  271. package/web/dist/assets/commit-list-BrxBEzRK.js +0 -1
  272. package/web/dist/assets/compare-variants-Bv2c9ORF.js +0 -1
  273. package/web/dist/assets/dist-B6XQOhgM.js +0 -1
  274. package/web/dist/assets/git-toolbar-pIC1ubPM.js +0 -1
  275. package/web/dist/assets/github-DTTSG0ht.js +0 -1
  276. package/web/dist/assets/highlighted-body-OFNGDK62-BuFJwunK.js +0 -1
  277. package/web/dist/assets/image-preview-DEhW0TFz.js +0 -1
  278. package/web/dist/assets/index-Cijmlz7q.js +0 -30
  279. package/web/dist/assets/index-DzroxqBG.css +0 -2
  280. package/web/dist/assets/lib-DPEZDBUN.js +0 -1
  281. package/web/dist/assets/lib-uHpeUPzK.js +0 -1
  282. package/web/dist/assets/mermaid-GHXKKRXX-CN2zQue0.js +0 -1
  283. package/web/dist/assets/open-mercato-toBr6SOa.svg +0 -11
  284. package/web/dist/assets/project-router-BMx4e8m-.js +0 -1
  285. package/web/dist/assets/repo-git-BusYfa3t.js +0 -1
  286. package/web/dist/assets/run-diff-wOJ3odA-.js +0 -3
  287. package/web/dist/assets/run-header-Cg5incil.js +0 -1
  288. package/web/dist/assets/skill-empty-hint-DTUSp6Vl.js +0 -1
  289. package/web/dist/assets/skills-PpP2owbM.js +0 -1
  290. package/web/dist/assets/tab-link-F3uQrdm2.js +0 -1
  291. package/web/dist/assets/task-changes-iD9kS79I.js +0 -1
  292. package/web/dist/assets/task-commits-COkLaUri.js +0 -1
  293. package/web/dist/assets/task-files-Ckttz7XH.js +0 -2
  294. package/web/dist/assets/task-thread-CQD91VPt.js +0 -9
  295. package/web/dist/assets/textarea-Bj_LCreg.js +0 -1
  296. package/web/dist/assets/use-desktop-DUh0STzq.js +0 -3
  297. package/web/dist/assets/utils-B8s5qIcK.js +0 -1
  298. package/web/dist/assets/workflows-BFk8C0co.js +0 -11
  299. package/web/dist/assets/zoomable-image-PEDOqyLQ.js +0 -1
  300. /package/web/{open-mercato.svg → dist/open-mercato.svg} +0 -0
@@ -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;