@open-mercato/cezar 0.13.0 → 0.14.0

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 (294) hide show
  1. package/README.md +3 -2
  2. package/dist/agent-config/catalog.d.ts +4 -0
  3. package/dist/agent-config/catalog.js +85 -3
  4. package/dist/agent-config/catalog.js.map +1 -1
  5. package/dist/agent-config/model-settings/copilot.d.ts +15 -0
  6. package/dist/agent-config/model-settings/copilot.js +25 -0
  7. package/dist/agent-config/model-settings/copilot.js.map +1 -0
  8. package/dist/agent-config/model-settings/junie.d.ts +12 -0
  9. package/dist/agent-config/model-settings/junie.js +18 -0
  10. package/dist/agent-config/model-settings/junie.js.map +1 -0
  11. package/dist/agent-config/models.js +4 -0
  12. package/dist/agent-config/models.js.map +1 -1
  13. package/dist/automations/prompts.d.ts +2 -2
  14. package/dist/automations/prompts.js +1 -1
  15. package/dist/automations/types.d.ts +12 -0
  16. package/dist/config.d.ts +4 -0
  17. package/dist/config.js +2 -0
  18. package/dist/config.js.map +1 -1
  19. package/dist/contract/agent-config.d.ts +4 -0
  20. package/dist/contract/agent-profiles.d.ts +30 -0
  21. package/dist/contract/automations.d.ts +32 -0
  22. package/dist/contract/dashboard-insights.d.ts +186 -0
  23. package/dist/contract/dashboard.d.ts +88 -0
  24. package/dist/contract/dispatch.d.ts +6 -0
  25. package/dist/contract/health.d.ts +8 -0
  26. package/dist/contract/index.d.ts +2 -0
  27. package/dist/contract/index.js +249 -72
  28. package/dist/contract/runs.d.ts +144 -0
  29. package/dist/contract/self-update.d.ts +111 -2
  30. package/dist/contract/skills.d.ts +19 -0
  31. package/dist/contract/star-count.d.ts +18 -0
  32. package/dist/contract/workflows.d.ts +12 -0
  33. package/dist/contract/workspace.d.ts +42 -2
  34. package/dist/core/acp-client.d.ts +99 -0
  35. package/dist/core/acp-client.js +198 -0
  36. package/dist/core/acp-client.js.map +1 -0
  37. package/dist/core/acp-ui-mapper.d.ts +95 -0
  38. package/dist/core/acp-ui-mapper.js +444 -0
  39. package/dist/core/acp-ui-mapper.js.map +1 -0
  40. package/dist/core/agent-env.js +10 -0
  41. package/dist/core/agent-env.js.map +1 -1
  42. package/dist/core/agent-profiles.d.ts +10 -0
  43. package/dist/core/agent-profiles.js +16 -0
  44. package/dist/core/agent-profiles.js.map +1 -1
  45. package/dist/core/agent-runner.d.ts +5 -3
  46. package/dist/core/agent-runner.js +5 -3
  47. package/dist/core/agent-runner.js.map +1 -1
  48. package/dist/core/backend-detect.d.ts +3 -3
  49. package/dist/core/backend-detect.js +61 -2
  50. package/dist/core/backend-detect.js.map +1 -1
  51. package/dist/core/claude-cli-runner.d.ts +5 -2
  52. package/dist/core/claude-cli-runner.js +11 -6
  53. package/dist/core/claude-cli-runner.js.map +1 -1
  54. package/dist/core/claude-ui-mapper.d.ts +14 -0
  55. package/dist/core/claude-ui-mapper.js +102 -11
  56. package/dist/core/claude-ui-mapper.js.map +1 -1
  57. package/dist/core/codex-app-server-transport.js +8 -4
  58. package/dist/core/codex-app-server-transport.js.map +1 -1
  59. package/dist/core/copilot-acp-runner.d.ts +60 -0
  60. package/dist/core/copilot-acp-runner.js +528 -0
  61. package/dist/core/copilot-acp-runner.js.map +1 -0
  62. package/dist/core/copilot-ui-mapper.d.ts +47 -0
  63. package/dist/core/copilot-ui-mapper.js +111 -0
  64. package/dist/core/copilot-ui-mapper.js.map +1 -0
  65. package/dist/core/cursor-agent-runner.js +4 -4
  66. package/dist/core/cursor-agent-runner.js.map +1 -1
  67. package/dist/core/disclaim-spawn.d.ts +9 -0
  68. package/dist/core/disclaim-spawn.js +53 -0
  69. package/dist/core/disclaim-spawn.js.map +1 -0
  70. package/dist/core/junie-acp-transport.d.ts +58 -0
  71. package/dist/core/junie-acp-transport.js +179 -0
  72. package/dist/core/junie-acp-transport.js.map +1 -0
  73. package/dist/core/junie-auth-probe.d.ts +12 -0
  74. package/dist/core/junie-auth-probe.js +30 -0
  75. package/dist/core/junie-auth-probe.js.map +1 -0
  76. package/dist/core/junie-model-catalog.d.ts +10 -0
  77. package/dist/core/junie-model-catalog.js +104 -0
  78. package/dist/core/junie-model-catalog.js.map +1 -0
  79. package/dist/core/junie-runner.d.ts +45 -0
  80. package/dist/core/junie-runner.js +533 -0
  81. package/dist/core/junie-runner.js.map +1 -0
  82. package/dist/core/junie-ui-mapper.d.ts +132 -0
  83. package/dist/core/junie-ui-mapper.js +459 -0
  84. package/dist/core/junie-ui-mapper.js.map +1 -0
  85. package/dist/core/model-identity.js +17 -0
  86. package/dist/core/model-identity.js.map +1 -1
  87. package/dist/core/model-presets.js +10 -0
  88. package/dist/core/model-presets.js.map +1 -1
  89. package/dist/core/opencode-server-runner.js +4 -4
  90. package/dist/core/opencode-server-runner.js.map +1 -1
  91. package/dist/core/pi-runner.js +4 -4
  92. package/dist/core/pi-runner.js.map +1 -1
  93. package/dist/core/provider-auth.d.ts +16 -2
  94. package/dist/core/provider-auth.js +113 -7
  95. package/dist/core/provider-auth.js.map +1 -1
  96. package/dist/core/runner-factory.js +6 -0
  97. package/dist/core/runner-factory.js.map +1 -1
  98. package/dist/core/runner-model-catalog.js +12 -8
  99. package/dist/core/runner-model-catalog.js.map +1 -1
  100. package/dist/core/tool-display.js +6 -1
  101. package/dist/core/tool-display.js.map +1 -1
  102. package/dist/core/ui-events.d.ts +6 -2
  103. package/dist/git-diff-base.js +23 -2
  104. package/dist/git-diff-base.js.map +1 -1
  105. package/dist/git-worktree.d.ts +21 -2
  106. package/dist/git-worktree.js +68 -5
  107. package/dist/git-worktree.js.map +1 -1
  108. package/dist/index.js +14 -4
  109. package/dist/index.js.map +1 -1
  110. package/dist/paths.js +2 -0
  111. package/dist/paths.js.map +1 -1
  112. package/dist/runs/event-history.js +3 -0
  113. package/dist/runs/event-history.js.map +1 -1
  114. package/dist/runs/store.d.ts +42 -3
  115. package/dist/runs/store.js +112 -6
  116. package/dist/runs/store.js.map +1 -1
  117. package/dist/self-update/checkouts.d.ts +53 -0
  118. package/dist/self-update/checkouts.js +268 -0
  119. package/dist/self-update/checkouts.js.map +1 -0
  120. package/dist/self-update/cli.d.ts +5 -3
  121. package/dist/self-update/cli.js +75 -8
  122. package/dist/self-update/cli.js.map +1 -1
  123. package/dist/self-update/layout.d.ts +33 -1
  124. package/dist/self-update/layout.js +102 -3
  125. package/dist/self-update/layout.js.map +1 -1
  126. package/dist/self-update/pulls.d.ts +40 -0
  127. package/dist/self-update/pulls.js +127 -0
  128. package/dist/self-update/pulls.js.map +1 -0
  129. package/dist/self-update/service.d.ts +26 -3
  130. package/dist/self-update/service.js +85 -9
  131. package/dist/self-update/service.js.map +1 -1
  132. package/dist/server/dashboard.d.ts +107 -0
  133. package/dist/server/dashboard.js +2 -1
  134. package/dist/server/dashboard.js.map +1 -1
  135. package/dist/server/forge/github.js +4 -1
  136. package/dist/server/forge/github.js.map +1 -1
  137. package/dist/server/fs-browse.d.ts +3 -1
  138. package/dist/server/fs-browse.js +27 -5
  139. package/dist/server/fs-browse.js.map +1 -1
  140. package/dist/server/open-in-app.js +2 -0
  141. package/dist/server/open-in-app.js.map +1 -1
  142. package/dist/server/provider-action-gate.js +5 -1
  143. package/dist/server/provider-action-gate.js.map +1 -1
  144. package/dist/server/server.d.ts +880 -511
  145. package/dist/server/server.js +40 -5
  146. package/dist/server/server.js.map +1 -1
  147. package/dist/server/star-count.d.ts +67 -0
  148. package/dist/server/star-count.js +186 -0
  149. package/dist/server/star-count.js.map +1 -0
  150. package/dist/skills-banner.d.ts +19 -0
  151. package/dist/skills-banner.js +24 -0
  152. package/dist/skills-banner.js.map +1 -1
  153. package/dist/workflows/run.d.ts +0 -2
  154. package/dist/workflows/run.js +45 -29
  155. package/dist/workflows/run.js.map +1 -1
  156. package/dist/workflows/types.d.ts +6 -0
  157. package/dist/workspace/agent-accounts.d.ts +9 -1
  158. package/dist/workspace/agent-accounts.js +2 -0
  159. package/dist/workspace/agent-accounts.js.map +1 -1
  160. package/dist/workspace/agent-profiles.d.ts +2 -2
  161. package/dist/workspace/agent-profiles.js +25 -6
  162. package/dist/workspace/agent-profiles.js.map +1 -1
  163. package/dist/workspace/config.d.ts +9 -1
  164. package/dist/workspace/config.js +10 -3
  165. package/dist/workspace/config.js.map +1 -1
  166. package/dist/workspace/dashboard-insights.d.ts +42 -0
  167. package/dist/workspace/dashboard-insights.js +220 -0
  168. package/dist/workspace/dashboard-insights.js.map +1 -0
  169. package/dist/workspace/dashboard.d.ts +71 -1
  170. package/dist/workspace/dashboard.js +14 -1
  171. package/dist/workspace/dashboard.js.map +1 -1
  172. package/dist/workspace/semaphore.d.ts +3 -0
  173. package/dist/workspace/semaphore.js +8 -1
  174. package/dist/workspace/semaphore.js.map +1 -1
  175. package/package.json +3 -3
  176. package/scripts/mock-claude.mjs +34 -1
  177. package/scripts/mock-copilot-acp.mjs +190 -0
  178. package/scripts/mock-junie-acp.mjs +208 -0
  179. package/web/dist/assets/agent-task-pickers-BeQi-UTm.js +1 -0
  180. package/web/dist/assets/alert-dialog-CnRAuqwb.js +1 -0
  181. package/web/dist/assets/arrow-down-Da0kNRNH.js +1 -0
  182. package/web/dist/assets/arrow-left-BIZHhBIP.js +1 -0
  183. package/web/dist/assets/automation-format-CfPmkcsg.js +1 -0
  184. package/web/dist/assets/automations-route-AMJbFP53.js +1 -0
  185. package/web/dist/assets/centered-state-3r2Kaar_.js +1 -0
  186. package/web/dist/assets/chevron-left-DLAUPC66.js +1 -0
  187. package/web/dist/assets/chevron-right-KVZcXiPL.js +1 -0
  188. package/web/dist/assets/{circle-x-C9UoMP1V.js → circle-x-C0Jm5Ppb.js} +1 -1
  189. package/web/dist/assets/collapsible-DG_SIWqU.js +1 -0
  190. package/web/dist/assets/command-Dfln3D4A.js +1 -0
  191. package/web/dist/assets/{commit-list-BSfPsVsu.js → commit-list-_RA72yB_.js} +1 -1
  192. package/web/dist/assets/compare-variants-D6Ji6od4.js +1 -0
  193. package/web/dist/assets/dashboard-B3-tPimG.js +44 -0
  194. package/web/dist/assets/dialog-CiDREdUK.js +1 -0
  195. package/web/dist/assets/{diff-I0xowULh.js → diff-CxdyRumG.js} +2 -2
  196. package/web/dist/assets/diff-controls-DqJMMV4z.js +1 -0
  197. package/web/dist/assets/{diff-stat-yKn7joEr.js → diff-stat-Hupj4hxh.js} +1 -1
  198. package/web/dist/assets/{diff-view-DjvMeW1M.js → diff-view-BBYT5k6c.js} +1 -1
  199. package/web/dist/assets/dist-BqMwqJFX.js +1 -0
  200. package/web/dist/assets/dist-DpiX6WjA.js +1 -0
  201. package/web/dist/assets/{download-BcgZ2yk4.js → download-BR7EN9gW.js} +1 -1
  202. package/web/dist/assets/dropdown-menu-Ci4HFML0.js +1 -0
  203. package/web/dist/assets/editable-title-DDtUgRKZ.js +1 -0
  204. package/web/dist/assets/{ellipsis-vertical-g4O4NlLV.js → ellipsis-vertical-DBklom4U.js} +1 -1
  205. package/web/dist/assets/facet-filter-CfI4QvOd.js +1 -0
  206. package/web/dist/assets/{file-wXNeZwi7.js → file-CZb7cKNH.js} +1 -1
  207. package/web/dist/assets/{file-text-DV1gE2L6.js → file-text-Dm6CrEGW.js} +1 -1
  208. package/web/dist/assets/{folder-wjVId5un.js → folder-zQj-FYOo.js} +1 -1
  209. package/web/dist/assets/{git-pull-request-BBEDdTLK.js → git-pull-request-AhwzJc7s.js} +1 -1
  210. package/web/dist/assets/git-toolbar-j7gKkhGL.js +1 -0
  211. package/web/dist/assets/github-De-DFy8s.js +1 -0
  212. package/web/dist/assets/{image-preview-u1f-wzxC.js → image-preview-Dd3NVB7N.js} +1 -1
  213. package/web/dist/assets/index-HS1hr5Sz.js +12 -0
  214. package/web/dist/assets/index-YwgrLyBj.css +2 -0
  215. package/web/dist/assets/loader-circle-sk4vKJKp.js +1 -0
  216. package/web/dist/assets/{markdown-Bnm47qUl.js → markdown-DjNR-1p8.js} +2 -2
  217. package/web/dist/assets/new-task-form-vLs2G1_z.js +1 -0
  218. package/web/dist/assets/picker-pill-VW-M1ZiV.js +1 -0
  219. package/web/dist/assets/{pill-7dm3vWF7.js → pill-CPl6sysj.js} +1 -1
  220. package/web/dist/assets/popover-CNGONAql.js +1 -0
  221. package/web/dist/assets/project-router-dCZQu1wQ.js +1 -0
  222. package/web/dist/assets/{prompt-templates-BMZ5q5H_.js → prompt-templates-jNjVTAws.js} +1 -1
  223. package/web/dist/assets/{refresh-cw-C69euZ2H.js → refresh-cw-BfkEydKA.js} +1 -1
  224. package/web/dist/assets/repo-git-BZWZ6_pR.js +1 -0
  225. package/web/dist/assets/{run-diff-CoNVGn23.js → run-diff-u_roDsAJ.js} +2 -2
  226. package/web/dist/assets/run-header-Br1yJR0m.js +1 -0
  227. package/web/dist/assets/{search-x-BNLFOxI6.js → search-x-CT0NTqK1.js} +1 -1
  228. package/web/dist/assets/segmented-IDD4ucht.js +1 -0
  229. package/web/dist/assets/skills-Dsi5YdLG.js +1 -0
  230. package/web/dist/assets/{sparkles-ChorK-gZ.js → sparkles-CvOeAoyJ.js} +1 -1
  231. package/web/dist/assets/{square-terminal-C7KCPznz.js → square-terminal-eSs8YYZe.js} +1 -1
  232. package/web/dist/assets/{tab-link-E5O2Cesc.js → tab-link-CPF6ORha.js} +1 -1
  233. package/web/dist/assets/task-changes-DIT9Y1rh.js +1 -0
  234. package/web/dist/assets/task-commits-B4VvdiHH.js +1 -0
  235. package/web/dist/assets/task-files-BMm9C0DW.js +2 -0
  236. package/web/dist/assets/task-thread-RXabJAt0.js +9 -0
  237. package/web/dist/assets/{textarea-DLAfWPb0.js → textarea-DtBqPhIs.js} +1 -1
  238. package/web/dist/assets/thread-loading-Dnxb6Ar-.js +1 -0
  239. package/web/dist/assets/toaster-CfRVb8vH.js +43 -0
  240. package/web/dist/assets/token-metrics-DldVlr6m.js +1 -0
  241. package/web/dist/assets/tooltip-_O50N3pt.js +1 -0
  242. package/web/dist/assets/tracker-J0fdcH1G.js +4 -0
  243. package/web/dist/assets/{trash-2-_vwSMdPG.js → trash-2-CUH7GOVh.js} +1 -1
  244. package/web/dist/assets/{triangle-alert-fBRUkB46.js → triangle-alert-D5K_zyD3.js} +1 -1
  245. package/web/dist/assets/{upload-B4OIpdyq.js → upload-D7_n-9cl.js} +1 -1
  246. package/web/dist/assets/{use-now-sqAvRMna.js → use-now-3lElDuTi.js} +1 -1
  247. package/web/dist/assets/utils-BXvEm7Ve.js +64 -0
  248. package/web/dist/assets/workflows-D-dx9c_0.js +7 -0
  249. package/web/dist/assets/x-kLybIvX4.js +1 -0
  250. package/web/dist/assets/{zoomable-image-X81SApIg.js → zoomable-image-CnyQ9wyw.js} +1 -1
  251. package/web/dist/index.html +38 -36
  252. package/web/dist/assets/agent-task-pickers-DQ1qvgrD.js +0 -1
  253. package/web/dist/assets/alert-dialog-B_2uU4Bg.js +0 -1
  254. package/web/dist/assets/arrow-down-DieVZxSE.js +0 -1
  255. package/web/dist/assets/arrow-left-C8M0efjn.js +0 -1
  256. package/web/dist/assets/automation-format-CzinzpHK.js +0 -1
  257. package/web/dist/assets/automations-route-DYHUjV9R.js +0 -1
  258. package/web/dist/assets/centered-state-DJLgwvA4.js +0 -43
  259. package/web/dist/assets/chevron-left-BhXrOEE3.js +0 -1
  260. package/web/dist/assets/chevron-right-B3Ta8VKK.js +0 -1
  261. package/web/dist/assets/collapsible-BcKvItwg.js +0 -1
  262. package/web/dist/assets/command-BvGGv2_u.js +0 -1
  263. package/web/dist/assets/compare-variants-DBvMYMs3.js +0 -1
  264. package/web/dist/assets/dashboard-CGaFh4RV.js +0 -44
  265. package/web/dist/assets/dialog-B6NgKh0-.js +0 -1
  266. package/web/dist/assets/diff-controls-DskkZqmD.js +0 -1
  267. package/web/dist/assets/dist-BvXEdcbG.js +0 -1
  268. package/web/dist/assets/dist-CTksUkKh.js +0 -1
  269. package/web/dist/assets/dropdown-menu-B7HeKCfN.js +0 -1
  270. package/web/dist/assets/editable-title-BHbHmSIK.js +0 -1
  271. package/web/dist/assets/facet-filter-DZ3wfvN9.js +0 -1
  272. package/web/dist/assets/git-toolbar-EZuX4Cuz.js +0 -1
  273. package/web/dist/assets/github-zcLRxv77.js +0 -1
  274. package/web/dist/assets/index-BrZhA4_u.css +0 -2
  275. package/web/dist/assets/index-CSNFuBvj.js +0 -12
  276. package/web/dist/assets/loader-circle-Cwgo6onL.js +0 -1
  277. package/web/dist/assets/new-task-form-CQODCzBP.js +0 -1
  278. package/web/dist/assets/picker-pill-DNB9ETjS.js +0 -1
  279. package/web/dist/assets/popover-BRq6QnwI.js +0 -1
  280. package/web/dist/assets/project-router-I8Pbsrxy.js +0 -1
  281. package/web/dist/assets/repo-git-G436Abni.js +0 -1
  282. package/web/dist/assets/run-header-CxdaA86t.js +0 -1
  283. package/web/dist/assets/skills-C_kBDesq.js +0 -1
  284. package/web/dist/assets/task-changes-Bhw4Ysvg.js +0 -1
  285. package/web/dist/assets/task-commits-DBuGXuGm.js +0 -1
  286. package/web/dist/assets/task-files-CYDbeffM.js +0 -2
  287. package/web/dist/assets/task-thread-RuxHMJgN.js +0 -9
  288. package/web/dist/assets/thread-loading-BAuVAbcA.js +0 -1
  289. package/web/dist/assets/token-metrics-rVl4kXe_.js +0 -1
  290. package/web/dist/assets/tooltip-Bdl8mQG8.js +0 -1
  291. package/web/dist/assets/tracker-DJ8JW59-.js +0 -4
  292. package/web/dist/assets/utils-DoBmOlX3.js +0 -64
  293. package/web/dist/assets/workflows-C54D7mlm.js +0 -7
  294. package/web/dist/assets/x-HXr9KZBr.js +0 -1
@@ -23,7 +23,9 @@ export declare const workflowStepDefSchema: z.ZodObject<{
23
23
  runner: z.ZodOptional<z.ZodEnum<{
24
24
  claude: "claude";
25
25
  codex: "codex";
26
+ copilot: "copilot";
26
27
  cursor: "cursor";
28
+ junie: "junie";
27
29
  opencode: "opencode";
28
30
  pi: "pi";
29
31
  }>>;
@@ -49,7 +51,9 @@ export declare const workflowDefSchema: z.ZodObject<{
49
51
  runner: z.ZodOptional<z.ZodEnum<{
50
52
  claude: "claude";
51
53
  codex: "codex";
54
+ copilot: "copilot";
52
55
  cursor: "cursor";
56
+ junie: "junie";
53
57
  opencode: "opencode";
54
58
  pi: "pi";
55
59
  }>>;
@@ -88,7 +92,9 @@ export declare const workflowsResponseSchema: z.ZodObject<{
88
92
  runner: z.ZodOptional<z.ZodEnum<{
89
93
  claude: "claude";
90
94
  codex: "codex";
95
+ copilot: "copilot";
91
96
  cursor: "cursor";
97
+ junie: "junie";
92
98
  opencode: "opencode";
93
99
  pi: "pi";
94
100
  }>>;
@@ -130,7 +136,9 @@ export declare const saveWorkflowInputSchema: z.ZodObject<{
130
136
  runner: z.ZodOptional<z.ZodEnum<{
131
137
  claude: "claude";
132
138
  codex: "codex";
139
+ copilot: "copilot";
133
140
  cursor: "cursor";
141
+ junie: "junie";
134
142
  opencode: "opencode";
135
143
  pi: "pi";
136
144
  }>>;
@@ -165,7 +173,9 @@ export declare const parsedWorkflowSchema: z.ZodObject<{
165
173
  runner: z.ZodOptional<z.ZodEnum<{
166
174
  claude: "claude";
167
175
  codex: "codex";
176
+ copilot: "copilot";
168
177
  cursor: "cursor";
178
+ junie: "junie";
169
179
  opencode: "opencode";
170
180
  pi: "pi";
171
181
  }>>;
@@ -206,7 +216,9 @@ export declare const planResponseSchema: z.ZodObject<{
206
216
  runner: z.ZodOptional<z.ZodEnum<{
207
217
  claude: "claude";
208
218
  codex: "codex";
219
+ copilot: "copilot";
209
220
  cursor: "cursor";
221
+ junie: "junie";
210
222
  opencode: "opencode";
211
223
  pi: "pi";
212
224
  }>>;
@@ -35,6 +35,7 @@ export declare const workspaceConfigResponseSchema: z.ZodObject<{
35
35
  resources: z.ZodObject<{
36
36
  maxParallel: z.ZodNumber;
37
37
  maxMonitoringSessions: z.ZodNumber;
38
+ idleTimeoutMinutes: z.ZodNullable<z.ZodNumber>;
38
39
  monitoringWakeIntervalMinutes: z.ZodNullable<z.ZodNumber>;
39
40
  autoResumeOnUsageLimit: z.ZodBoolean;
40
41
  memoryLimitMb: z.ZodNullable<z.ZodNumber>;
@@ -44,7 +45,9 @@ export declare const workspaceConfigResponseSchema: z.ZodObject<{
44
45
  runner: z.ZodOptional<z.ZodEnum<{
45
46
  claude: "claude";
46
47
  codex: "codex";
48
+ copilot: "copilot";
47
49
  cursor: "cursor";
50
+ junie: "junie";
48
51
  opencode: "opencode";
49
52
  pi: "pi";
50
53
  }>>;
@@ -54,6 +57,8 @@ export declare const workspaceConfigResponseSchema: z.ZodObject<{
54
57
  opencode: z.ZodOptional<z.ZodString>;
55
58
  cursor: z.ZodOptional<z.ZodString>;
56
59
  pi: z.ZodOptional<z.ZodString>;
60
+ junie: z.ZodOptional<z.ZodString>;
61
+ copilot: z.ZodOptional<z.ZodString>;
57
62
  }, z.core.$strip>>;
58
63
  }, z.core.$strip>;
59
64
  }, z.core.$strip>;
@@ -77,7 +82,9 @@ export declare const setWorkspaceConfigInputSchema: z.ZodObject<{
77
82
  runner: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
78
83
  claude: "claude";
79
84
  codex: "codex";
85
+ copilot: "copilot";
80
86
  cursor: "cursor";
87
+ junie: "junie";
81
88
  opencode: "opencode";
82
89
  pi: "pi";
83
90
  }>>>;
@@ -85,13 +92,16 @@ export declare const setWorkspaceConfigInputSchema: z.ZodObject<{
85
92
  claude: z.ZodOptional<z.ZodNullable<z.ZodString>>;
86
93
  codex: z.ZodOptional<z.ZodNullable<z.ZodString>>;
87
94
  opencode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
+ junie: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
96
  cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
97
  pi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ copilot: z.ZodOptional<z.ZodNullable<z.ZodString>>;
90
99
  }, z.core.$strip>>;
91
100
  }, z.core.$strip>>;
92
101
  resources: z.ZodOptional<z.ZodObject<{
93
102
  maxParallel: z.ZodOptional<z.ZodNumber>;
94
103
  maxMonitoringSessions: z.ZodOptional<z.ZodNumber>;
104
+ idleTimeoutMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
95
105
  monitoringWakeIntervalMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
96
106
  autoResumeOnUsageLimit: z.ZodOptional<z.ZodBoolean>;
97
107
  memoryLimitMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -140,6 +150,10 @@ export declare const uiStateSchema: z.ZodObject<{
140
150
  issues: "issues";
141
151
  prs: "prs";
142
152
  }>>;
153
+ githubSort: z.ZodOptional<z.ZodEnum<{
154
+ newest: "newest";
155
+ oldest: "oldest";
156
+ }>>;
143
157
  appearance: z.ZodOptional<z.ZodObject<{
144
158
  accent: z.ZodOptional<z.ZodEnum<{
145
159
  lime: "lime";
@@ -223,6 +237,8 @@ export declare const workspaceUiStateSchema: z.ZodObject<{
223
237
  opencode: z.ZodOptional<z.ZodString>;
224
238
  cursor: z.ZodOptional<z.ZodString>;
225
239
  pi: z.ZodOptional<z.ZodString>;
240
+ junie: z.ZodOptional<z.ZodString>;
241
+ copilot: z.ZodOptional<z.ZodString>;
226
242
  }, z.core.$strip>>;
227
243
  appearance: z.ZodOptional<z.ZodObject<{
228
244
  accent: z.ZodOptional<z.ZodEnum<{
@@ -304,6 +320,8 @@ export declare const setWorkspaceUiStateInputSchema: z.ZodObject<{
304
320
  codex: z.ZodOptional<z.ZodString>;
305
321
  opencode: z.ZodOptional<z.ZodString>;
306
322
  pi: z.ZodOptional<z.ZodString>;
323
+ junie: z.ZodOptional<z.ZodString>;
324
+ copilot: z.ZodOptional<z.ZodString>;
307
325
  }, z.core.$strict>>;
308
326
  importedSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
309
327
  taskTable: z.ZodOptional<z.ZodObject<{
@@ -318,9 +336,11 @@ export type SetWorkspaceUiStateInput = z.infer<typeof setWorkspaceUiStateInputSc
318
336
  export declare const runnerModelsSchema: z.ZodObject<{
319
337
  claude: z.ZodOptional<z.ZodString>;
320
338
  codex: z.ZodOptional<z.ZodString>;
339
+ junie: z.ZodOptional<z.ZodString>;
321
340
  opencode: z.ZodOptional<z.ZodString>;
322
341
  cursor: z.ZodOptional<z.ZodString>;
323
342
  pi: z.ZodOptional<z.ZodString>;
343
+ copilot: z.ZodOptional<z.ZodString>;
324
344
  }, z.core.$strip>;
325
345
  export type RunnerModels = z.infer<typeof runnerModelsSchema>;
326
346
  /** `GET /api/v1/config` — every Settings → Agents knob in one read. */
@@ -329,7 +349,9 @@ export declare const configResponseSchema: z.ZodObject<{
329
349
  defaultRunner: z.ZodEnum<{
330
350
  claude: "claude";
331
351
  codex: "codex";
352
+ copilot: "copilot";
332
353
  cursor: "cursor";
354
+ junie: "junie";
333
355
  opencode: "opencode";
334
356
  pi: "pi";
335
357
  }>;
@@ -337,9 +359,11 @@ export declare const configResponseSchema: z.ZodObject<{
337
359
  defaultModels: z.ZodObject<{
338
360
  claude: z.ZodOptional<z.ZodString>;
339
361
  codex: z.ZodOptional<z.ZodString>;
362
+ junie: z.ZodOptional<z.ZodString>;
340
363
  opencode: z.ZodOptional<z.ZodString>;
341
364
  cursor: z.ZodOptional<z.ZodString>;
342
365
  pi: z.ZodOptional<z.ZodString>;
366
+ copilot: z.ZodOptional<z.ZodString>;
343
367
  }, z.core.$strip>;
344
368
  modelsLocked: z.ZodBoolean;
345
369
  maxParallel: z.ZodNumber;
@@ -355,7 +379,9 @@ export declare const setConfigResponseSchema: z.ZodObject<{
355
379
  defaultRunner: z.ZodEnum<{
356
380
  claude: "claude";
357
381
  codex: "codex";
382
+ copilot: "copilot";
358
383
  cursor: "cursor";
384
+ junie: "junie";
359
385
  opencode: "opencode";
360
386
  pi: "pi";
361
387
  }>;
@@ -363,9 +389,11 @@ export declare const setConfigResponseSchema: z.ZodObject<{
363
389
  defaultModels: z.ZodObject<{
364
390
  claude: z.ZodOptional<z.ZodString>;
365
391
  codex: z.ZodOptional<z.ZodString>;
392
+ junie: z.ZodOptional<z.ZodString>;
366
393
  opencode: z.ZodOptional<z.ZodString>;
367
394
  cursor: z.ZodOptional<z.ZodString>;
368
395
  pi: z.ZodOptional<z.ZodString>;
396
+ copilot: z.ZodOptional<z.ZodString>;
369
397
  }, z.core.$strip>;
370
398
  modelsLocked: z.ZodBoolean;
371
399
  maxParallel: z.ZodNumber;
@@ -387,7 +415,9 @@ export declare const setConfigInputSchema: z.ZodObject<{
387
415
  defaultRunner: z.ZodOptional<z.ZodEnum<{
388
416
  claude: "claude";
389
417
  codex: "codex";
418
+ copilot: "copilot";
390
419
  cursor: "cursor";
420
+ junie: "junie";
391
421
  opencode: "opencode";
392
422
  pi: "pi";
393
423
  }>>;
@@ -398,6 +428,7 @@ export declare const setConfigInputSchema: z.ZodObject<{
398
428
  opencode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
399
429
  cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
400
430
  pi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
431
+ copilot: z.ZodOptional<z.ZodNullable<z.ZodString>>;
401
432
  }, z.core.$strip>>;
402
433
  maxParallel: z.ZodOptional<z.ZodNumber>;
403
434
  memoryLimitMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -482,7 +513,9 @@ export type SkillsUpdateState = z.infer<typeof skillsUpdateStateSchema>;
482
513
  export declare const providerIdSchema: z.ZodEnum<{
483
514
  claude: "claude";
484
515
  codex: "codex";
516
+ copilot: "copilot";
485
517
  cursor: "cursor";
518
+ junie: "junie";
486
519
  opencode: "opencode";
487
520
  pi: "pi";
488
521
  }>;
@@ -507,7 +540,9 @@ export declare const providerStatusSchema: z.ZodObject<{
507
540
  provider: z.ZodEnum<{
508
541
  claude: "claude";
509
542
  codex: "codex";
543
+ copilot: "copilot";
510
544
  cursor: "cursor";
545
+ junie: "junie";
511
546
  opencode: "opencode";
512
547
  pi: "pi";
513
548
  }>;
@@ -529,7 +564,9 @@ export declare const providerStatusResponseSchema: z.ZodObject<{
529
564
  provider: z.ZodEnum<{
530
565
  claude: "claude";
531
566
  codex: "codex";
567
+ copilot: "copilot";
532
568
  cursor: "cursor";
569
+ junie: "junie";
533
570
  opencode: "opencode";
534
571
  pi: "pi";
535
572
  }>;
@@ -561,7 +598,7 @@ export type ProviderConnectResponse = z.infer<typeof providerConnectResponseSche
561
598
  /**
562
599
  * The runners whose model list is discovered from the host rather than hard-coded: Codex through
563
600
  * its app-server protocol, OpenCode through its own `models` listing (#794), Claude through the
564
- * CLI's `list_models` control request (#784), and Cursor through its CLI model listing. A runner absent here has no discovery path and
601
+ * CLI's `list_models` control request (#784), Cursor through its CLI model listing, and Junie through ACP session config options. A runner absent here has no discovery path and
565
602
  * 400s, so the client compiles against exactly what the route accepts. One definition, used by
566
603
  * the route's query validator and by the cockpit's picker.
567
604
  */
@@ -569,6 +606,7 @@ export declare const modelDiscoveryRunnerSchema: z.ZodEnum<{
569
606
  claude: "claude";
570
607
  codex: "codex";
571
608
  cursor: "cursor";
609
+ junie: "junie";
572
610
  opencode: "opencode";
573
611
  }>;
574
612
  export type ModelDiscoveryRunner = z.infer<typeof modelDiscoveryRunnerSchema>;
@@ -581,14 +619,16 @@ export declare const runnerModelOptionSchema: z.ZodObject<{
581
619
  description: z.ZodString;
582
620
  }, z.core.$strip>;
583
621
  export type RunnerModelOption = z.infer<typeof runnerModelOptionSchema>;
584
- /** `GET /api/v1/models?runner=claude|codex|opencode|cursor` — the models discovered from that runner's
622
+ /** `GET /api/v1/models?runner=claude|codex|opencode|cursor|junie` — the models discovered from that runner's
585
623
  * own host installation, plus how fresh the answer is. Never an error: an unavailable CLI
586
624
  * degrades to `source: 'unavailable'` with a `reason`. */
587
625
  export declare const runnerModelCatalogResponseSchema: z.ZodObject<{
588
626
  runner: z.ZodEnum<{
589
627
  claude: "claude";
590
628
  codex: "codex";
629
+ copilot: "copilot";
591
630
  cursor: "cursor";
631
+ junie: "junie";
592
632
  opencode: "opencode";
593
633
  pi: "pi";
594
634
  }>;
@@ -0,0 +1,99 @@
1
+ /** One JSON-RPC 2.0 message, in either direction. Everything is optional: it came off a wire. */
2
+ export interface AcpMessage {
3
+ jsonrpc?: string;
4
+ id?: number | string;
5
+ method?: string;
6
+ params?: unknown;
7
+ result?: unknown;
8
+ error?: unknown;
9
+ }
10
+ export type AcpDirection = 'in' | 'out';
11
+ /** A JSON-RPC error answer, with the agent's own code and data kept for classification. */
12
+ export declare class AcpRpcError extends Error {
13
+ readonly code?: number | undefined;
14
+ readonly data?: unknown;
15
+ constructor(message: string, code?: number | undefined, data?: unknown);
16
+ }
17
+ /** The client's side of `initialize`: cezar proxies no file system and no terminal, so the agent
18
+ * uses its own tools inside the session's `cwd` (spec § "The shared ACP layer"). */
19
+ export declare const ACP_PROTOCOL_VERSION = 1;
20
+ export declare const ACP_CLIENT_CAPABILITIES: {
21
+ readonly fs: {
22
+ readonly readTextFile: false;
23
+ readonly writeTextFile: false;
24
+ };
25
+ readonly terminal: false;
26
+ };
27
+ /** Answer to an inbound request: `result` on success, or a JSON-RPC `error`. */
28
+ export type AcpRequestAnswer = {
29
+ result: unknown;
30
+ } | {
31
+ error: {
32
+ code: number;
33
+ message: string;
34
+ };
35
+ };
36
+ export interface AcpClientOptions {
37
+ /** Every parsed frame, in wire order, before it takes effect. */
38
+ onFrame?: (direction: AcpDirection, message: AcpMessage) => void;
39
+ /** Inbound notifications (`session/update`, …). */
40
+ onNotification?: (message: AcpMessage) => void;
41
+ /**
42
+ * Inbound requests (`session/request_permission`, …). The answer is written back under the
43
+ * request's id. Without a handler — or when it throws — the agent gets `-32601`, so a request
44
+ * cezar does not understand can never leave the agent waiting on an answer that never comes.
45
+ */
46
+ onRequest?: (message: AcpMessage) => AcpRequestAnswer | Promise<AcpRequestAnswer>;
47
+ /** A stdout line that is not a JSON object. Skipped either way; this only reports it. */
48
+ onUnparseable?: (line: string) => void;
49
+ }
50
+ export declare class AcpClient {
51
+ private readonly input;
52
+ private readonly output;
53
+ private readonly opts;
54
+ private nextId;
55
+ private readonly pending;
56
+ private closedReason;
57
+ constructor(input: NodeJS.WritableStream & {
58
+ destroyed?: boolean;
59
+ writable?: boolean;
60
+ }, output: NodeJS.ReadableStream, opts?: AcpClientOptions);
61
+ /**
62
+ * The read loop. Resolves when the agent's stdout ends — the agent exited or closed it — and
63
+ * rejects every request still waiting, because nothing can answer it any more. Never throws on
64
+ * wire content: unparseable lines are skipped, unknown ids are ignored.
65
+ */
66
+ run(): Promise<void>;
67
+ /** True once the connection is gone; every later request rejects at once. */
68
+ get closed(): boolean;
69
+ /**
70
+ * Send a request and wait for its answer. `timeoutMs` bounds handshake-style calls; a
71
+ * `session/prompt` is a whole agent turn and is left unbounded here (the run's own deadline
72
+ * owns it).
73
+ */
74
+ request(method: string, params: unknown, options?: {
75
+ timeoutMs?: number;
76
+ }): Promise<Record<string, unknown>>;
77
+ notify(method: string, params: unknown): void;
78
+ /** Reject everything still waiting, and refuse new requests. Idempotent. */
79
+ close(reason: string): void;
80
+ initialize(timeoutMs?: number): Promise<Record<string, unknown>>;
81
+ newSession(cwd: string, timeoutMs?: number): Promise<Record<string, unknown>>;
82
+ loadSession(sessionId: string, cwd: string, timeoutMs?: number): Promise<Record<string, unknown>>;
83
+ prompt(sessionId: string, prompt: AcpContentBlock[]): Promise<Record<string, unknown>>;
84
+ cancel(sessionId: string): void;
85
+ setModel(sessionId: string, modelId: string, timeoutMs?: number): Promise<Record<string, unknown>>;
86
+ setMode(sessionId: string, modeId: string, timeoutMs?: number): Promise<Record<string, unknown>>;
87
+ private receive;
88
+ private answer;
89
+ private write;
90
+ }
91
+ /** An ACP prompt content block (the subset cezar sends: text and base64 images). */
92
+ export type AcpContentBlock = {
93
+ type: 'text';
94
+ text: string;
95
+ } | {
96
+ type: 'image';
97
+ data: string;
98
+ mimeType: string;
99
+ };
@@ -0,0 +1,198 @@
1
+ /**
2
+ * Agent Client Protocol (ACP) client — the transport shared by every ACP runner (spec
3
+ * `2026-09-19-runner-seam-native-backends` § "The shared ACP layer"). Transport only: JSON-RPC 2.0
4
+ * over NDJSON on a child's stdio, request-id bookkeeping and timeouts. It knows no vendor: which
5
+ * binary speaks ACP, which flags start it and how its frames become `UiEvent`s all live in the
6
+ * runner and its dialect.
7
+ *
8
+ * Wire schema: the ACP SDK (`PROTOCOL_VERSION = 1`, https://agentclientprotocol.com), as bundled in
9
+ * `@google/gemini-cli` 0.60.0 and verified against it — see `__fixtures__/gemini/README.md`.
10
+ *
11
+ * Every frame in either direction is handed to `onFrame` BEFORE it takes effect (an inbound
12
+ * response is tapped before its promise settles), so a mapper fed from that tap sees the wire in
13
+ * wire order. That is the whole contract the golden fixtures replay.
14
+ */
15
+ import { readNdjson } from './ndjson.js';
16
+ /** A JSON-RPC error answer, with the agent's own code and data kept for classification. */
17
+ export class AcpRpcError extends Error {
18
+ code;
19
+ data;
20
+ constructor(message, code, data) {
21
+ super(message);
22
+ this.code = code;
23
+ this.data = data;
24
+ this.name = 'AcpRpcError';
25
+ }
26
+ }
27
+ /** The client's side of `initialize`: cezar proxies no file system and no terminal, so the agent
28
+ * uses its own tools inside the session's `cwd` (spec § "The shared ACP layer"). */
29
+ export const ACP_PROTOCOL_VERSION = 1;
30
+ export const ACP_CLIENT_CAPABILITIES = {
31
+ fs: { readTextFile: false, writeTextFile: false },
32
+ terminal: false,
33
+ };
34
+ export class AcpClient {
35
+ input;
36
+ output;
37
+ opts;
38
+ nextId = 0;
39
+ pending = new Map();
40
+ closedReason = null;
41
+ constructor(input, output, opts = {}) {
42
+ this.input = input;
43
+ this.output = output;
44
+ this.opts = opts;
45
+ }
46
+ /**
47
+ * The read loop. Resolves when the agent's stdout ends — the agent exited or closed it — and
48
+ * rejects every request still waiting, because nothing can answer it any more. Never throws on
49
+ * wire content: unparseable lines are skipped, unknown ids are ignored.
50
+ */
51
+ async run() {
52
+ try {
53
+ for await (const line of readNdjson(this.output))
54
+ this.receive(line);
55
+ }
56
+ finally {
57
+ this.close('ACP agent closed its output');
58
+ }
59
+ }
60
+ /** True once the connection is gone; every later request rejects at once. */
61
+ get closed() {
62
+ return this.closedReason !== null;
63
+ }
64
+ /**
65
+ * Send a request and wait for its answer. `timeoutMs` bounds handshake-style calls; a
66
+ * `session/prompt` is a whole agent turn and is left unbounded here (the run's own deadline
67
+ * owns it).
68
+ */
69
+ request(method, params, options = {}) {
70
+ if (this.closedReason !== null)
71
+ return Promise.reject(new Error(this.closedReason));
72
+ const id = this.nextId++;
73
+ const promise = new Promise((resolve, reject) => {
74
+ const entry = { method, resolve, reject };
75
+ if (options.timeoutMs && options.timeoutMs > 0) {
76
+ entry.timer = setTimeout(() => {
77
+ if (!this.pending.delete(id))
78
+ return;
79
+ reject(new Error(`ACP ${method} timed out after ${Math.round(options.timeoutMs / 1000)}s`));
80
+ }, options.timeoutMs);
81
+ entry.timer.unref?.();
82
+ }
83
+ this.pending.set(id, entry);
84
+ });
85
+ this.write({ jsonrpc: '2.0', id, method, params });
86
+ return promise;
87
+ }
88
+ notify(method, params) {
89
+ this.write({ jsonrpc: '2.0', method, params });
90
+ }
91
+ /** Reject everything still waiting, and refuse new requests. Idempotent. */
92
+ close(reason) {
93
+ if (this.closedReason === null)
94
+ this.closedReason = reason;
95
+ for (const entry of this.pending.values()) {
96
+ if (entry.timer)
97
+ clearTimeout(entry.timer);
98
+ entry.reject(new Error(reason));
99
+ }
100
+ this.pending.clear();
101
+ }
102
+ // ---- the ACP methods cezar uses -------------------------------------------------------
103
+ initialize(timeoutMs) {
104
+ return this.request('initialize', { protocolVersion: ACP_PROTOCOL_VERSION, clientCapabilities: ACP_CLIENT_CAPABILITIES }, { timeoutMs });
105
+ }
106
+ newSession(cwd, timeoutMs) {
107
+ return this.request('session/new', { cwd, mcpServers: [] }, { timeoutMs });
108
+ }
109
+ loadSession(sessionId, cwd, timeoutMs) {
110
+ return this.request('session/load', { sessionId, cwd, mcpServers: [] }, { timeoutMs });
111
+ }
112
+ prompt(sessionId, prompt) {
113
+ return this.request('session/prompt', { sessionId, prompt });
114
+ }
115
+ cancel(sessionId) {
116
+ this.notify('session/cancel', { sessionId });
117
+ }
118
+ setModel(sessionId, modelId, timeoutMs) {
119
+ return this.request('session/set_model', { sessionId, modelId }, { timeoutMs });
120
+ }
121
+ setMode(sessionId, modeId, timeoutMs) {
122
+ return this.request('session/set_mode', { sessionId, modeId }, { timeoutMs });
123
+ }
124
+ // ---- internals -------------------------------------------------------------------------
125
+ receive(line) {
126
+ let message;
127
+ try {
128
+ message = JSON.parse(line);
129
+ }
130
+ catch {
131
+ this.opts.onUnparseable?.(line);
132
+ return;
133
+ }
134
+ if (!isRecord(message)) {
135
+ this.opts.onUnparseable?.(line);
136
+ return;
137
+ }
138
+ const frame = message;
139
+ this.opts.onFrame?.('in', frame);
140
+ if (typeof frame.method === 'string') {
141
+ if (frame.id !== undefined)
142
+ void this.answer(frame);
143
+ else
144
+ this.opts.onNotification?.(frame);
145
+ return;
146
+ }
147
+ if (typeof frame.id !== 'number')
148
+ return;
149
+ const entry = this.pending.get(frame.id);
150
+ if (!entry)
151
+ return;
152
+ this.pending.delete(frame.id);
153
+ if (entry.timer)
154
+ clearTimeout(entry.timer);
155
+ if (frame.error !== undefined)
156
+ entry.reject(rpcError(frame.error));
157
+ else
158
+ entry.resolve(isRecord(frame.result) ? frame.result : {});
159
+ }
160
+ async answer(request) {
161
+ let answer;
162
+ try {
163
+ answer = this.opts.onRequest
164
+ ? await this.opts.onRequest(request)
165
+ : { error: { code: -32601, message: `Method not found: ${request.method}` } };
166
+ }
167
+ catch (error) {
168
+ answer = { error: { code: -32603, message: error instanceof Error ? error.message : String(error) } };
169
+ }
170
+ this.write({ jsonrpc: '2.0', id: request.id, ...answer });
171
+ }
172
+ write(message) {
173
+ this.opts.onFrame?.('out', message);
174
+ if (this.input.destroyed || this.input.writable === false)
175
+ return;
176
+ try {
177
+ this.input.write(`${JSON.stringify(message)}\n`);
178
+ }
179
+ catch {
180
+ // The read loop and the child's exit own settlement when stdin disappears.
181
+ }
182
+ }
183
+ }
184
+ function rpcError(error) {
185
+ if (isRecord(error)) {
186
+ const message = typeof error.message === 'string' ? error.message : JSON.stringify(error);
187
+ const code = typeof error.code === 'number' ? error.code : undefined;
188
+ // Gemini puts the useful part of an internal error in `data.details` (an unknown session id,
189
+ // for one — `__fixtures__/gemini/session-controls.ndjson`).
190
+ const details = isRecord(error.data) && typeof error.data.details === 'string' ? error.data.details : undefined;
191
+ return new AcpRpcError(details ? `${message}: ${details}` : message, code, error.data);
192
+ }
193
+ return new AcpRpcError(typeof error === 'string' ? error : JSON.stringify(error));
194
+ }
195
+ function isRecord(value) {
196
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
197
+ }
198
+ //# sourceMappingURL=acp-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acp-client.js","sourceRoot":"","sources":["../../src/core/acp-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAczC,2FAA2F;AAC3F,MAAM,OAAO,WAAY,SAAQ,KAAK;IAGzB,IAAI;IACJ,IAAI;IAHf,YACE,OAAe,EACN,IAAa,EACb,IAAc;QAEvB,KAAK,CAAC,OAAO,CAAC,CAAC;oBAHN,IAAI;oBACJ,IAAI;QAGb,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AAED;qFACqF;AACrF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AACtC,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;IACjD,QAAQ,EAAE,KAAK;CACP,CAAC;AA2BX,MAAM,OAAO,SAAS;IAMD,KAAK;IACL,MAAM;IACN,IAAI;IAPf,MAAM,GAAG,CAAC,CAAC;IACF,OAAO,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC9C,YAAY,GAAkB,IAAI,CAAC;IAE3C,YACmB,KAA0E,EAC1E,MAA6B,EAC7B,IAAI,GAAqB,EAAE;qBAF3B,KAAK;sBACL,MAAM;oBACN,IAAI;IACpB,CA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