@wjarka/cezarion 0.17.0-dev.5680 → 0.17.0-dev.5736

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 (1903) hide show
  1. package/bin.js +2 -0
  2. package/cez.js +2 -0
  3. package/cezarion.js +2 -0
  4. package/dist/cez.js +1 -2
  5. package/dist/cezarion.js +1 -2
  6. package/dist/hsq.js +1 -2
  7. package/dist/index.js +1 -121
  8. package/dist/server/app-type.d.ts +1 -6
  9. package/dist/server/app-type.js +1 -2
  10. package/hsq.js +2 -0
  11. package/package.json +18 -64
  12. package/web/dist/assets/{activity-motion-CtVYvdRc.js → activity-motion-hhx0e841.js} +1 -1
  13. package/web/dist/assets/{activity-route-BEZr6b9Y.js → activity-route-De0BnSrc.js} +1 -1
  14. package/web/dist/assets/{agent-accounts-Ce9Q2wTj.js → agent-accounts-BCg-578Q.js} +1 -1
  15. package/web/dist/assets/{alert-dialog-BJlarNJS.js → alert-dialog-Dj464rjk.js} +1 -1
  16. package/web/dist/assets/{button-DRCTAIzF.js → button-CHUAMTHK.js} +1 -1
  17. package/web/dist/assets/{centered-state-xPENgUmo.js → centered-state-DGyy0SuA.js} +1 -1
  18. package/web/dist/assets/{commit-diff-panel-B30oa25e.js → commit-diff-panel-DYtYc_dH.js} +1 -1
  19. package/web/dist/assets/{control-locations-Cv_zRDaS.js → control-locations-CA9TMupq.js} +1 -1
  20. package/web/dist/assets/{diff-controls-DGsiUDJ0.js → diff-controls-BR2uqhwG.js} +1 -1
  21. package/web/dist/assets/{diff-CpkTjlLm.js → diff-tVGVhYyc.js} +2 -2
  22. package/web/dist/assets/{diff-view-Bf7YEIF1.js → diff-view-CNM3u77o.js} +1 -1
  23. package/web/dist/assets/{dropdown-menu-C2_BT6YH.js → dropdown-menu-DhrBcVgr.js} +1 -1
  24. package/web/dist/assets/{es2015-Ba_E31c-.js → es2015-D345RR4o.js} +1 -1
  25. package/web/dist/assets/{file-preview-Bdw0qHJB.js → file-preview-C1eTdJLJ.js} +1 -1
  26. package/web/dist/assets/{git-toolbar-DJi8-Bfp.js → git-toolbar-Dwz8p8GW.js} +1 -1
  27. package/web/dist/assets/{github-DPa3UFus.js → github-BSezqH6f.js} +1 -1
  28. package/web/dist/assets/{github-sidebar-model-DcgyXEtm.js → github-sidebar-model-Ct0DltOv.js} +1 -1
  29. package/web/dist/assets/{global-activity-route-CijiH9Gc.js → global-activity-route-BZiYz-B0.js} +1 -1
  30. package/web/dist/assets/{image-preview-Dawt8eiK.js → image-preview-Cq1vDiEo.js} +1 -1
  31. package/web/dist/assets/{index-BDNQ4NIe.js → index-D489J7QW.js} +5 -5
  32. package/web/dist/assets/{live-refetch-XCxoSAGq.js → live-refetch-C0kQc3-z.js} +1 -1
  33. package/web/dist/assets/{markdown-BiGKaTG5.js → markdown-D7DUNWcJ.js} +1 -1
  34. package/web/dist/assets/{nav-row-styles-rWMZ9e0U.js → nav-row-styles-BZUUavOF.js} +1 -1
  35. package/web/dist/assets/{popover-CiVpqps-.js → popover-DRcRI46x.js} +1 -1
  36. package/web/dist/assets/{preview-pane-connected-DJ3e7KtI.js → preview-pane-connected-DGkEs_L3.js} +1 -1
  37. package/web/dist/assets/{project-router-DudcMzJa.js → project-router-1m_VlC22.js} +1 -1
  38. package/web/dist/assets/{project-scope-context-DDZVS0W-.js → project-scope-context-CaUqlAd7.js} +1 -1
  39. package/web/dist/assets/{queries-C6in05vw.js → queries-DYfIpJ-d.js} +1 -1
  40. package/web/dist/assets/{repo-git-DwFyXJVP.js → repo-git-CU1S5P-y.js} +1 -1
  41. package/web/dist/assets/{report-reader-DiG_FZRc.js → report-reader-DlZol2Ux.js} +1 -1
  42. package/web/dist/assets/{reports-CDhnbSD0.js → reports-DIGGjk7C.js} +1 -1
  43. package/web/dist/assets/{run-header-DGWkKFX-.js → run-header-DPjiPKRe.js} +1 -1
  44. package/web/dist/assets/{skills-BvfGIWap.js → skills-BMwanop_.js} +1 -1
  45. package/web/dist/assets/{tab-link-ACcEPANz.js → tab-link-DCUifQ46.js} +1 -1
  46. package/web/dist/assets/{task-changes-Duy_yoTa.js → task-changes-BZXWvQN3.js} +1 -1
  47. package/web/dist/assets/{task-commits-DsZjecLb.js → task-commits-ByI9MSfc.js} +1 -1
  48. package/web/dist/assets/{task-files-WSwRMISh.js → task-files-LJbenpiH.js} +1 -1
  49. package/web/dist/assets/{task-github-item-B89c4yDz.js → task-github-item-B0CU9lGR.js} +1 -1
  50. package/web/dist/assets/{task-thread-BMa8FQJC.js → task-thread-CXCN__1a.js} +1 -1
  51. package/web/dist/assets/{textarea-ffrAeHUi.js → textarea-DlVUfdWG.js} +1 -1
  52. package/web/dist/assets/{thread-state-D_1f2_nG.js → thread-state-BLaCzqeX.js} +1 -1
  53. package/web/dist/assets/{toaster-Dk0xOpec.js → toaster-B1MyeHiE.js} +1 -1
  54. package/web/dist/assets/{use-hand-to-agent-state-eVuuwFpt.js → use-hand-to-agent-state-BkmKad8x.js} +1 -1
  55. package/web/dist/assets/{useInfiniteQuery-DpLjNcbu.js → useInfiniteQuery-qEY8OhKb.js} +1 -1
  56. package/web/dist/assets/useQuery-DOJQOEBO.js +1 -0
  57. package/web/dist/assets/{workflows-iby-hm0Z.js → workflows-Dbxb-d-6.js} +1 -1
  58. package/web/dist/assets/{ws-DKkrIJ6v.js → ws-DvGmrP4z.js} +1 -1
  59. package/web/dist/assets/{zoomable-image-DJmOaz4D.js → zoomable-image-5pOUaPEg.js} +1 -1
  60. package/web/dist/index.html +22 -22
  61. package/LICENSE +0 -22
  62. package/README.md +0 -1832
  63. package/dist/activity/demand.d.ts +0 -21
  64. package/dist/activity/demand.js +0 -49
  65. package/dist/activity/demand.js.map +0 -1
  66. package/dist/activity/publisher.d.ts +0 -48
  67. package/dist/activity/publisher.js +0 -175
  68. package/dist/activity/publisher.js.map +0 -1
  69. package/dist/activity/read-model.d.ts +0 -50
  70. package/dist/activity/read-model.js +0 -142
  71. package/dist/activity/read-model.js.map +0 -1
  72. package/dist/activity/requests.d.ts +0 -27
  73. package/dist/activity/requests.js +0 -81
  74. package/dist/activity/requests.js.map +0 -1
  75. package/dist/activity/text.d.ts +0 -4
  76. package/dist/activity/text.js +0 -13
  77. package/dist/activity/text.js.map +0 -1
  78. package/dist/activity/tool-activity.d.ts +0 -87
  79. package/dist/activity/tool-activity.js +0 -250
  80. package/dist/activity/tool-activity.js.map +0 -1
  81. package/dist/activity/wait.d.ts +0 -19
  82. package/dist/activity/wait.js +0 -91
  83. package/dist/activity/wait.js.map +0 -1
  84. package/dist/agent-config/account-identity.d.ts +0 -28
  85. package/dist/agent-config/account-identity.js +0 -132
  86. package/dist/agent-config/account-identity.js.map +0 -1
  87. package/dist/agent-config/catalog.d.ts +0 -70
  88. package/dist/agent-config/catalog.js +0 -384
  89. package/dist/agent-config/catalog.js.map +0 -1
  90. package/dist/agent-config/files.d.ts +0 -42
  91. package/dist/agent-config/files.js +0 -115
  92. package/dist/agent-config/files.js.map +0 -1
  93. package/dist/agent-config/model-settings/claude.d.ts +0 -2
  94. package/dist/agent-config/model-settings/claude.js +0 -11
  95. package/dist/agent-config/model-settings/claude.js.map +0 -1
  96. package/dist/agent-config/model-settings/codex.d.ts +0 -2
  97. package/dist/agent-config/model-settings/codex.js +0 -16
  98. package/dist/agent-config/model-settings/codex.js.map +0 -1
  99. package/dist/agent-config/model-settings/opencode.d.ts +0 -2
  100. package/dist/agent-config/model-settings/opencode.js +0 -8
  101. package/dist/agent-config/model-settings/opencode.js.map +0 -1
  102. package/dist/agent-config/model-settings/pi.d.ts +0 -2
  103. package/dist/agent-config/model-settings/pi.js +0 -38
  104. package/dist/agent-config/model-settings/pi.js.map +0 -1
  105. package/dist/agent-config/model-settings/shared.d.ts +0 -12
  106. package/dist/agent-config/model-settings/shared.js +0 -100
  107. package/dist/agent-config/model-settings/shared.js.map +0 -1
  108. package/dist/agent-config/model-settings/types.d.ts +0 -9
  109. package/dist/agent-config/model-settings/types.js +0 -2
  110. package/dist/agent-config/model-settings/types.js.map +0 -1
  111. package/dist/agent-config/models.d.ts +0 -9
  112. package/dist/agent-config/models.js +0 -40
  113. package/dist/agent-config/models.js.map +0 -1
  114. package/dist/agent-config/seed.d.ts +0 -15
  115. package/dist/agent-config/seed.js +0 -94
  116. package/dist/agent-config/seed.js.map +0 -1
  117. package/dist/agent-config/service.d.ts +0 -44
  118. package/dist/agent-config/service.js +0 -73
  119. package/dist/agent-config/service.js.map +0 -1
  120. package/dist/agent-config/validate.d.ts +0 -18
  121. package/dist/agent-config/validate.js +0 -82
  122. package/dist/agent-config/validate.js.map +0 -1
  123. package/dist/application-update/bin-recovery.d.ts +0 -5
  124. package/dist/application-update/bin-recovery.js +0 -96
  125. package/dist/application-update/bin-recovery.js.map +0 -1
  126. package/dist/application-update/discovery.d.ts +0 -23
  127. package/dist/application-update/discovery.js +0 -131
  128. package/dist/application-update/discovery.js.map +0 -1
  129. package/dist/application-update/helper.d.ts +0 -58
  130. package/dist/application-update/helper.js +0 -363
  131. package/dist/application-update/helper.js.map +0 -1
  132. package/dist/application-update/launcher.d.ts +0 -12
  133. package/dist/application-update/launcher.js +0 -61
  134. package/dist/application-update/launcher.js.map +0 -1
  135. package/dist/application-update/lock.d.ts +0 -4
  136. package/dist/application-update/lock.js +0 -70
  137. package/dist/application-update/lock.js.map +0 -1
  138. package/dist/application-update/npm-process.d.ts +0 -17
  139. package/dist/application-update/npm-process.js +0 -156
  140. package/dist/application-update/npm-process.js.map +0 -1
  141. package/dist/application-update/runtime-layout.d.ts +0 -20
  142. package/dist/application-update/runtime-layout.js +0 -91
  143. package/dist/application-update/runtime-layout.js.map +0 -1
  144. package/dist/application-update/scoped-recovery.d.ts +0 -32
  145. package/dist/application-update/scoped-recovery.js +0 -210
  146. package/dist/application-update/scoped-recovery.js.map +0 -1
  147. package/dist/application-update/service.d.ts +0 -86
  148. package/dist/application-update/service.js +0 -523
  149. package/dist/application-update/service.js.map +0 -1
  150. package/dist/archive-on-merge-setting.d.ts +0 -15
  151. package/dist/archive-on-merge-setting.js +0 -15
  152. package/dist/archive-on-merge-setting.js.map +0 -1
  153. package/dist/artifacts/cli.d.ts +0 -1
  154. package/dist/artifacts/cli.js +0 -54
  155. package/dist/artifacts/cli.js.map +0 -1
  156. package/dist/artifacts/lifecycle.d.ts +0 -4
  157. package/dist/artifacts/lifecycle.js +0 -42
  158. package/dist/artifacts/lifecycle.js.map +0 -1
  159. package/dist/artifacts/reports-index.d.ts +0 -46
  160. package/dist/artifacts/reports-index.js +0 -278
  161. package/dist/artifacts/reports-index.js.map +0 -1
  162. package/dist/artifacts/reports-watch.d.ts +0 -43
  163. package/dist/artifacts/reports-watch.js +0 -128
  164. package/dist/artifacts/reports-watch.js.map +0 -1
  165. package/dist/artifacts/resolve.d.ts +0 -18
  166. package/dist/artifacts/resolve.js +0 -128
  167. package/dist/artifacts/resolve.js.map +0 -1
  168. package/dist/artifacts/store.d.ts +0 -40
  169. package/dist/artifacts/store.js +0 -513
  170. package/dist/artifacts/store.js.map +0 -1
  171. package/dist/automations/automation-cli.d.ts +0 -61
  172. package/dist/automations/automation-cli.js +0 -519
  173. package/dist/automations/automation-cli.js.map +0 -1
  174. package/dist/automations/builtin-skill.d.ts +0 -7
  175. package/dist/automations/builtin-skill.js +0 -14
  176. package/dist/automations/builtin-skill.js.map +0 -1
  177. package/dist/automations/coordinator.d.ts +0 -53
  178. package/dist/automations/coordinator.js +0 -135
  179. package/dist/automations/coordinator.js.map +0 -1
  180. package/dist/automations/github-baseline.d.ts +0 -3
  181. package/dist/automations/github-baseline.js +0 -17
  182. package/dist/automations/github-baseline.js.map +0 -1
  183. package/dist/automations/github-poller.d.ts +0 -93
  184. package/dist/automations/github-poller.js +0 -303
  185. package/dist/automations/github-poller.js.map +0 -1
  186. package/dist/automations/project-files.d.ts +0 -6
  187. package/dist/automations/project-files.js +0 -43
  188. package/dist/automations/project-files.js.map +0 -1
  189. package/dist/automations/prompts.d.ts +0 -12
  190. package/dist/automations/prompts.js +0 -162
  191. package/dist/automations/prompts.js.map +0 -1
  192. package/dist/automations/schedule-runner.d.ts +0 -153
  193. package/dist/automations/schedule-runner.js +0 -529
  194. package/dist/automations/schedule-runner.js.map +0 -1
  195. package/dist/automations/scheduler.d.ts +0 -95
  196. package/dist/automations/scheduler.js +0 -462
  197. package/dist/automations/scheduler.js.map +0 -1
  198. package/dist/automations/service.d.ts +0 -793
  199. package/dist/automations/service.js +0 -444
  200. package/dist/automations/service.js.map +0 -1
  201. package/dist/automations/store.d.ts +0 -168
  202. package/dist/automations/store.js +0 -805
  203. package/dist/automations/store.js.map +0 -1
  204. package/dist/automations/task-template.d.ts +0 -59
  205. package/dist/automations/task-template.js +0 -285
  206. package/dist/automations/task-template.js.map +0 -1
  207. package/dist/automations/tool-adapter.d.ts +0 -6
  208. package/dist/automations/tool-adapter.js +0 -115
  209. package/dist/automations/tool-adapter.js.map +0 -1
  210. package/dist/automations/types.d.ts +0 -1
  211. package/dist/automations/types.js +0 -2
  212. package/dist/automations/types.js.map +0 -1
  213. package/dist/autosave-cleanup.d.ts +0 -26
  214. package/dist/autosave-cleanup.js +0 -87
  215. package/dist/autosave-cleanup.js.map +0 -1
  216. package/dist/autosave-git.d.ts +0 -23
  217. package/dist/autosave-git.js +0 -210
  218. package/dist/autosave-git.js.map +0 -1
  219. package/dist/autosave-group.d.ts +0 -8
  220. package/dist/autosave-group.js +0 -61
  221. package/dist/autosave-group.js.map +0 -1
  222. package/dist/autosave-holders.d.ts +0 -34
  223. package/dist/autosave-holders.js +0 -228
  224. package/dist/autosave-holders.js.map +0 -1
  225. package/dist/autosave-windows.d.ts +0 -25
  226. package/dist/autosave-windows.js +0 -169
  227. package/dist/autosave-windows.js.map +0 -1
  228. package/dist/cez.d.ts +0 -2
  229. package/dist/cez.js.map +0 -1
  230. package/dist/cezarion.d.ts +0 -2
  231. package/dist/cezarion.js.map +0 -1
  232. package/dist/ci-wait/client.d.ts +0 -28
  233. package/dist/ci-wait/client.js +0 -123
  234. package/dist/ci-wait/client.js.map +0 -1
  235. package/dist/ci-wait/controller.d.ts +0 -824
  236. package/dist/ci-wait/controller.js +0 -305
  237. package/dist/ci-wait/controller.js.map +0 -1
  238. package/dist/ci-wait/errors.d.ts +0 -35
  239. package/dist/ci-wait/errors.js +0 -273
  240. package/dist/ci-wait/errors.js.map +0 -1
  241. package/dist/ci-wait/github.d.ts +0 -105
  242. package/dist/ci-wait/github.js +0 -324
  243. package/dist/ci-wait/github.js.map +0 -1
  244. package/dist/ci-wait/injection.d.ts +0 -3
  245. package/dist/ci-wait/injection.js +0 -13
  246. package/dist/ci-wait/injection.js.map +0 -1
  247. package/dist/ci-wait/mcp.d.ts +0 -3
  248. package/dist/ci-wait/mcp.js +0 -30
  249. package/dist/ci-wait/mcp.js.map +0 -1
  250. package/dist/ci-wait/merge-progress.d.ts +0 -84
  251. package/dist/ci-wait/merge-progress.js +0 -50
  252. package/dist/ci-wait/merge-progress.js.map +0 -1
  253. package/dist/ci-wait/progress.d.ts +0 -56
  254. package/dist/ci-wait/progress.js +0 -100
  255. package/dist/ci-wait/progress.js.map +0 -1
  256. package/dist/ci-wait/resources.d.ts +0 -9
  257. package/dist/ci-wait/resources.js +0 -45
  258. package/dist/ci-wait/resources.js.map +0 -1
  259. package/dist/ci-wait/supervisor.d.ts +0 -47
  260. package/dist/ci-wait/supervisor.js +0 -334
  261. package/dist/ci-wait/supervisor.js.map +0 -1
  262. package/dist/ci-wait/text.d.ts +0 -2
  263. package/dist/ci-wait/text.js +0 -5
  264. package/dist/ci-wait/text.js.map +0 -1
  265. package/dist/ci-wait/tools.d.ts +0 -845
  266. package/dist/ci-wait/tools.js +0 -232
  267. package/dist/ci-wait/tools.js.map +0 -1
  268. package/dist/cli-dispatch.d.ts +0 -33
  269. package/dist/cli-dispatch.js +0 -235
  270. package/dist/cli-dispatch.js.map +0 -1
  271. package/dist/config.d.ts +0 -117
  272. package/dist/config.js +0 -341
  273. package/dist/config.js.map +0 -1
  274. package/dist/contract/active-provider.d.ts +0 -12
  275. package/dist/contract/activity.d.ts +0 -1478
  276. package/dist/contract/agent-config.d.ts +0 -160
  277. package/dist/contract/agent-profiles.d.ts +0 -369
  278. package/dist/contract/application-update.d.ts +0 -32
  279. package/dist/contract/artifacts.d.ts +0 -100
  280. package/dist/contract/ask-schema.d.ts +0 -50
  281. package/dist/contract/ask.d.ts +0 -11
  282. package/dist/contract/attachments.d.ts +0 -35
  283. package/dist/contract/attention.d.ts +0 -99
  284. package/dist/contract/automation-requests.d.ts +0 -314
  285. package/dist/contract/automation-schedule.d.ts +0 -89
  286. package/dist/contract/automation-storage.d.ts +0 -518
  287. package/dist/contract/automations.d.ts +0 -1560
  288. package/dist/contract/ci-wait.d.ts +0 -281
  289. package/dist/contract/config-requests.d.ts +0 -36
  290. package/dist/contract/control-locations.d.ts +0 -10
  291. package/dist/contract/conversations.d.ts +0 -415
  292. package/dist/contract/defined.d.ts +0 -8
  293. package/dist/contract/delegation.d.ts +0 -2168
  294. package/dist/contract/discovery.d.ts +0 -228
  295. package/dist/contract/effort.d.ts +0 -18
  296. package/dist/contract/events.d.ts +0 -324
  297. package/dist/contract/github-requests.d.ts +0 -26
  298. package/dist/contract/github.d.ts +0 -732
  299. package/dist/contract/handoff.d.ts +0 -43
  300. package/dist/contract/health.d.ts +0 -128
  301. package/dist/contract/home-recovery.d.ts +0 -71
  302. package/dist/contract/image-path.d.ts +0 -6
  303. package/dist/contract/index.d.ts +0 -68
  304. package/dist/contract/index.js +0 -6709
  305. package/dist/contract/live-coordination.d.ts +0 -164
  306. package/dist/contract/live-limits.d.ts +0 -8
  307. package/dist/contract/live.d.ts +0 -123
  308. package/dist/contract/pending-ask.d.ts +0 -58
  309. package/dist/contract/per-runner-optional-strings.d.ts +0 -10
  310. package/dist/contract/permissions.d.ts +0 -54
  311. package/dist/contract/preview.d.ts +0 -568
  312. package/dist/contract/project-limits.d.ts +0 -35
  313. package/dist/contract/projects.d.ts +0 -716
  314. package/dist/contract/provider-requests.d.ts +0 -77
  315. package/dist/contract/query-requests.d.ts +0 -52
  316. package/dist/contract/repo-requests.d.ts +0 -12
  317. package/dist/contract/repo.d.ts +0 -515
  318. package/dist/contract/report-title.d.ts +0 -3
  319. package/dist/contract/reports.d.ts +0 -101
  320. package/dist/contract/run-labels.d.ts +0 -8
  321. package/dist/contract/run-limits.d.ts +0 -8
  322. package/dist/contract/run-predicates.d.ts +0 -87
  323. package/dist/contract/run-requests.d.ts +0 -33
  324. package/dist/contract/run-search.d.ts +0 -193
  325. package/dist/contract/runs.d.ts +0 -7108
  326. package/dist/contract/scheduled-tasks.d.ts +0 -188
  327. package/dist/contract/self-update.d.ts +0 -255
  328. package/dist/contract/skill-sources.d.ts +0 -125
  329. package/dist/contract/skills.d.ts +0 -56
  330. package/dist/contract/task-options.d.ts +0 -18
  331. package/dist/contract/team-skill-ref.d.ts +0 -10
  332. package/dist/contract/tool-display.d.ts +0 -25
  333. package/dist/contract/ui-state-requests.d.ts +0 -60
  334. package/dist/contract/version.d.ts +0 -3
  335. package/dist/contract/voice.d.ts +0 -213
  336. package/dist/contract/waits.d.ts +0 -1996
  337. package/dist/contract/workflow-file.d.ts +0 -37
  338. package/dist/contract/workflow-requests.d.ts +0 -7
  339. package/dist/contract/workflows.d.ts +0 -250
  340. package/dist/contract/workspace-events.d.ts +0 -410
  341. package/dist/contract/workspace.d.ts +0 -631
  342. package/dist/contract/zoned-time.d.ts +0 -26
  343. package/dist/core/agent-env.d.ts +0 -34
  344. package/dist/core/agent-env.js +0 -411
  345. package/dist/core/agent-env.js.map +0 -1
  346. package/dist/core/agent-model-policy.d.ts +0 -11
  347. package/dist/core/agent-model-policy.js +0 -38
  348. package/dist/core/agent-model-policy.js.map +0 -1
  349. package/dist/core/agent-profiles.d.ts +0 -50
  350. package/dist/core/agent-profiles.js +0 -105
  351. package/dist/core/agent-profiles.js.map +0 -1
  352. package/dist/core/agent-runner.d.ts +0 -425
  353. package/dist/core/agent-runner.js +0 -98
  354. package/dist/core/agent-runner.js.map +0 -1
  355. package/dist/core/ask.d.ts +0 -26
  356. package/dist/core/ask.js +0 -35
  357. package/dist/core/ask.js.map +0 -1
  358. package/dist/core/backend-detect.d.ts +0 -18
  359. package/dist/core/backend-detect.js +0 -216
  360. package/dist/core/backend-detect.js.map +0 -1
  361. package/dist/core/claude-cli-runner.d.ts +0 -85
  362. package/dist/core/claude-cli-runner.js +0 -899
  363. package/dist/core/claude-cli-runner.js.map +0 -1
  364. package/dist/core/claude-executable.d.ts +0 -2
  365. package/dist/core/claude-executable.js +0 -15
  366. package/dist/core/claude-executable.js.map +0 -1
  367. package/dist/core/claude-model-catalog.d.ts +0 -16
  368. package/dist/core/claude-model-catalog.js +0 -198
  369. package/dist/core/claude-model-catalog.js.map +0 -1
  370. package/dist/core/claude-stream.d.ts +0 -38
  371. package/dist/core/claude-stream.js +0 -77
  372. package/dist/core/claude-stream.js.map +0 -1
  373. package/dist/core/claude-ui-mapper.d.ts +0 -88
  374. package/dist/core/claude-ui-mapper.js +0 -851
  375. package/dist/core/claude-ui-mapper.js.map +0 -1
  376. package/dist/core/codex-app-server-runner.d.ts +0 -76
  377. package/dist/core/codex-app-server-runner.js +0 -1271
  378. package/dist/core/codex-app-server-runner.js.map +0 -1
  379. package/dist/core/codex-app-server-transport.d.ts +0 -52
  380. package/dist/core/codex-app-server-transport.js +0 -200
  381. package/dist/core/codex-app-server-transport.js.map +0 -1
  382. package/dist/core/codex-approvals.d.ts +0 -12
  383. package/dist/core/codex-approvals.js +0 -180
  384. package/dist/core/codex-approvals.js.map +0 -1
  385. package/dist/core/codex-hook-mapper.d.ts +0 -15
  386. package/dist/core/codex-hook-mapper.js +0 -73
  387. package/dist/core/codex-hook-mapper.js.map +0 -1
  388. package/dist/core/codex-model-catalog.d.ts +0 -10
  389. package/dist/core/codex-model-catalog.js +0 -110
  390. package/dist/core/codex-model-catalog.js.map +0 -1
  391. package/dist/core/codex-native-frames.d.ts +0 -35
  392. package/dist/core/codex-native-frames.js +0 -80
  393. package/dist/core/codex-native-frames.js.map +0 -1
  394. package/dist/core/codex-permissions.d.ts +0 -6
  395. package/dist/core/codex-permissions.js +0 -27
  396. package/dist/core/codex-permissions.js.map +0 -1
  397. package/dist/core/codex-stream-error.d.ts +0 -2
  398. package/dist/core/codex-stream-error.js +0 -12
  399. package/dist/core/codex-stream-error.js.map +0 -1
  400. package/dist/core/codex-turn-outcome.d.ts +0 -10
  401. package/dist/core/codex-turn-outcome.js +0 -35
  402. package/dist/core/codex-turn-outcome.js.map +0 -1
  403. package/dist/core/codex-ui-mapper-state.d.ts +0 -84
  404. package/dist/core/codex-ui-mapper-state.js +0 -8
  405. package/dist/core/codex-ui-mapper-state.js.map +0 -1
  406. package/dist/core/codex-ui-mapper.d.ts +0 -44
  407. package/dist/core/codex-ui-mapper.js +0 -799
  408. package/dist/core/codex-ui-mapper.js.map +0 -1
  409. package/dist/core/cursor-cli-flags.d.ts +0 -19
  410. package/dist/core/cursor-cli-flags.js +0 -47
  411. package/dist/core/cursor-cli-flags.js.map +0 -1
  412. package/dist/core/cursor-config-options.d.ts +0 -18
  413. package/dist/core/cursor-config-options.js +0 -31
  414. package/dist/core/cursor-config-options.js.map +0 -1
  415. package/dist/core/cursor-model-catalog.d.ts +0 -50
  416. package/dist/core/cursor-model-catalog.js +0 -306
  417. package/dist/core/cursor-model-catalog.js.map +0 -1
  418. package/dist/core/cursor-print-capabilities.d.ts +0 -14
  419. package/dist/core/cursor-print-capabilities.js +0 -169
  420. package/dist/core/cursor-print-capabilities.js.map +0 -1
  421. package/dist/core/cursor-print-process.d.ts +0 -31
  422. package/dist/core/cursor-print-process.js +0 -117
  423. package/dist/core/cursor-print-process.js.map +0 -1
  424. package/dist/core/cursor-print-runner.d.ts +0 -43
  425. package/dist/core/cursor-print-runner.js +0 -574
  426. package/dist/core/cursor-print-runner.js.map +0 -1
  427. package/dist/core/cursor-print-tool-catalog.d.ts +0 -3
  428. package/dist/core/cursor-print-tool-catalog.js +0 -13
  429. package/dist/core/cursor-print-tool-catalog.js.map +0 -1
  430. package/dist/core/cursor-print-ui-mapper.d.ts +0 -47
  431. package/dist/core/cursor-print-ui-mapper.js +0 -574
  432. package/dist/core/cursor-print-ui-mapper.js.map +0 -1
  433. package/dist/core/cursor-provider-error.d.ts +0 -9
  434. package/dist/core/cursor-provider-error.js +0 -15
  435. package/dist/core/cursor-provider-error.js.map +0 -1
  436. package/dist/core/cursor-runner.d.ts +0 -46
  437. package/dist/core/cursor-runner.js +0 -144
  438. package/dist/core/cursor-runner.js.map +0 -1
  439. package/dist/core/defined.d.ts +0 -1
  440. package/dist/core/defined.js +0 -2
  441. package/dist/core/defined.js.map +0 -1
  442. package/dist/core/disclaim-spawn.d.ts +0 -11
  443. package/dist/core/disclaim-spawn.js +0 -60
  444. package/dist/core/disclaim-spawn.js.map +0 -1
  445. package/dist/core/edit-write-key.d.ts +0 -2
  446. package/dist/core/edit-write-key.js +0 -6
  447. package/dist/core/edit-write-key.js.map +0 -1
  448. package/dist/core/hook-items.d.ts +0 -14
  449. package/dist/core/hook-items.js +0 -13
  450. package/dist/core/hook-items.js.map +0 -1
  451. package/dist/core/host-model-catalog.d.ts +0 -7
  452. package/dist/core/host-model-catalog.js +0 -21
  453. package/dist/core/host-model-catalog.js.map +0 -1
  454. package/dist/core/input-submissions.d.ts +0 -14
  455. package/dist/core/input-submissions.js +0 -26
  456. package/dist/core/input-submissions.js.map +0 -1
  457. package/dist/core/managed-session.d.ts +0 -6
  458. package/dist/core/managed-session.js +0 -116
  459. package/dist/core/managed-session.js.map +0 -1
  460. package/dist/core/model-discovery-options.d.ts +0 -8
  461. package/dist/core/model-discovery-options.js +0 -2
  462. package/dist/core/model-discovery-options.js.map +0 -1
  463. package/dist/core/model-identity.d.ts +0 -108
  464. package/dist/core/model-identity.js +0 -137
  465. package/dist/core/model-identity.js.map +0 -1
  466. package/dist/core/model-presets.d.ts +0 -10
  467. package/dist/core/model-presets.js +0 -77
  468. package/dist/core/model-presets.js.map +0 -1
  469. package/dist/core/model-probe-teardown.d.ts +0 -4
  470. package/dist/core/model-probe-teardown.js +0 -20
  471. package/dist/core/model-probe-teardown.js.map +0 -1
  472. package/dist/core/ndjson.d.ts +0 -6
  473. package/dist/core/ndjson.js +0 -23
  474. package/dist/core/ndjson.js.map +0 -1
  475. package/dist/core/omp-model-catalog.d.ts +0 -39
  476. package/dist/core/omp-model-catalog.js +0 -182
  477. package/dist/core/omp-model-catalog.js.map +0 -1
  478. package/dist/core/omp-runner.d.ts +0 -86
  479. package/dist/core/omp-runner.js +0 -818
  480. package/dist/core/omp-runner.js.map +0 -1
  481. package/dist/core/omp-subagent-rows.d.ts +0 -21
  482. package/dist/core/omp-subagent-rows.js +0 -99
  483. package/dist/core/omp-subagent-rows.js.map +0 -1
  484. package/dist/core/omp-ui-mapper.d.ts +0 -112
  485. package/dist/core/omp-ui-mapper.js +0 -807
  486. package/dist/core/omp-ui-mapper.js.map +0 -1
  487. package/dist/core/opencode-model-catalog.d.ts +0 -27
  488. package/dist/core/opencode-model-catalog.js +0 -189
  489. package/dist/core/opencode-model-catalog.js.map +0 -1
  490. package/dist/core/opencode-permissions.d.ts +0 -52
  491. package/dist/core/opencode-permissions.js +0 -101
  492. package/dist/core/opencode-permissions.js.map +0 -1
  493. package/dist/core/opencode-runtime-config.d.ts +0 -9
  494. package/dist/core/opencode-runtime-config.js +0 -26
  495. package/dist/core/opencode-runtime-config.js.map +0 -1
  496. package/dist/core/opencode-server-runner.d.ts +0 -75
  497. package/dist/core/opencode-server-runner.js +0 -1690
  498. package/dist/core/opencode-server-runner.js.map +0 -1
  499. package/dist/core/opencode-session-error.d.ts +0 -19
  500. package/dist/core/opencode-session-error.js +0 -42
  501. package/dist/core/opencode-session-error.js.map +0 -1
  502. package/dist/core/opencode-task-scope.d.ts +0 -9
  503. package/dist/core/opencode-task-scope.js +0 -19
  504. package/dist/core/opencode-task-scope.js.map +0 -1
  505. package/dist/core/opencode-ui-mapper-state.d.ts +0 -82
  506. package/dist/core/opencode-ui-mapper-state.js +0 -7
  507. package/dist/core/opencode-ui-mapper-state.js.map +0 -1
  508. package/dist/core/opencode-ui-mapper.d.ts +0 -59
  509. package/dist/core/opencode-ui-mapper.js +0 -724
  510. package/dist/core/opencode-ui-mapper.js.map +0 -1
  511. package/dist/core/opencode-usage.d.ts +0 -32
  512. package/dist/core/opencode-usage.js +0 -105
  513. package/dist/core/opencode-usage.js.map +0 -1
  514. package/dist/core/pi-model-catalog.d.ts +0 -34
  515. package/dist/core/pi-model-catalog.js +0 -247
  516. package/dist/core/pi-model-catalog.js.map +0 -1
  517. package/dist/core/pi-rpc-turn.d.ts +0 -179
  518. package/dist/core/pi-rpc-turn.js +0 -370
  519. package/dist/core/pi-rpc-turn.js.map +0 -1
  520. package/dist/core/pi-rpc-wire.d.ts +0 -31
  521. package/dist/core/pi-rpc-wire.js +0 -88
  522. package/dist/core/pi-rpc-wire.js.map +0 -1
  523. package/dist/core/pi-runner.d.ts +0 -58
  524. package/dist/core/pi-runner.js +0 -587
  525. package/dist/core/pi-runner.js.map +0 -1
  526. package/dist/core/pi-ui-mapper.d.ts +0 -52
  527. package/dist/core/pi-ui-mapper.js +0 -408
  528. package/dist/core/pi-ui-mapper.js.map +0 -1
  529. package/dist/core/process-usage.d.ts +0 -74
  530. package/dist/core/process-usage.js +0 -218
  531. package/dist/core/process-usage.js.map +0 -1
  532. package/dist/core/product-env.d.ts +0 -21
  533. package/dist/core/product-env.js +0 -38
  534. package/dist/core/product-env.js.map +0 -1
  535. package/dist/core/provider-auth.d.ts +0 -168
  536. package/dist/core/provider-auth.js +0 -661
  537. package/dist/core/provider-auth.js.map +0 -1
  538. package/dist/core/provider-availability.d.ts +0 -3
  539. package/dist/core/provider-availability.js +0 -14
  540. package/dist/core/provider-availability.js.map +0 -1
  541. package/dist/core/runner-factory.d.ts +0 -11
  542. package/dist/core/runner-factory.js +0 -36
  543. package/dist/core/runner-factory.js.map +0 -1
  544. package/dist/core/runner-facts.d.ts +0 -135
  545. package/dist/core/runner-facts.js +0 -59
  546. package/dist/core/runner-facts.js.map +0 -1
  547. package/dist/core/runner-model-catalog.d.ts +0 -34
  548. package/dist/core/runner-model-catalog.js +0 -109
  549. package/dist/core/runner-model-catalog.js.map +0 -1
  550. package/dist/core/runner-runtime.d.ts +0 -40
  551. package/dist/core/runner-runtime.js +0 -88
  552. package/dist/core/runner-runtime.js.map +0 -1
  553. package/dist/core/runner-stderr.d.ts +0 -2
  554. package/dist/core/runner-stderr.js +0 -20
  555. package/dist/core/runner-stderr.js.map +0 -1
  556. package/dist/core/runner-tool-grants.d.ts +0 -19
  557. package/dist/core/runner-tool-grants.js +0 -54
  558. package/dist/core/runner-tool-grants.js.map +0 -1
  559. package/dist/core/secret-redaction.d.ts +0 -20
  560. package/dist/core/secret-redaction.js +0 -95
  561. package/dist/core/secret-redaction.js.map +0 -1
  562. package/dist/core/session-process.d.ts +0 -43
  563. package/dist/core/session-process.js +0 -363
  564. package/dist/core/session-process.js.map +0 -1
  565. package/dist/core/shell-env.d.ts +0 -17
  566. package/dist/core/shell-env.js +0 -51
  567. package/dist/core/shell-env.js.map +0 -1
  568. package/dist/core/ui-events.d.ts +0 -356
  569. package/dist/core/ui-events.js +0 -13
  570. package/dist/core/ui-events.js.map +0 -1
  571. package/dist/core/usage-limit.d.ts +0 -42
  572. package/dist/core/usage-limit.js +0 -152
  573. package/dist/core/usage-limit.js.map +0 -1
  574. package/dist/core/usage.d.ts +0 -11
  575. package/dist/core/usage.js +0 -15
  576. package/dist/core/usage.js.map +0 -1
  577. package/dist/core/v1-text-coalescer.d.ts +0 -36
  578. package/dist/core/v1-text-coalescer.js +0 -72
  579. package/dist/core/v1-text-coalescer.js.map +0 -1
  580. package/dist/data-gitignore.d.ts +0 -6
  581. package/dist/data-gitignore.js +0 -80
  582. package/dist/data-gitignore.js.map +0 -1
  583. package/dist/delegation/capacity.d.ts +0 -15
  584. package/dist/delegation/capacity.js +0 -30
  585. package/dist/delegation/capacity.js.map +0 -1
  586. package/dist/delegation/cli.d.ts +0 -5
  587. package/dist/delegation/cli.js +0 -572
  588. package/dist/delegation/cli.js.map +0 -1
  589. package/dist/delegation/context.d.ts +0 -40
  590. package/dist/delegation/context.js +0 -398
  591. package/dist/delegation/context.js.map +0 -1
  592. package/dist/delegation/conversation-send.d.ts +0 -64
  593. package/dist/delegation/conversation-send.js +0 -73
  594. package/dist/delegation/conversation-send.js.map +0 -1
  595. package/dist/delegation/conversations.d.ts +0 -2186
  596. package/dist/delegation/conversations.js +0 -285
  597. package/dist/delegation/conversations.js.map +0 -1
  598. package/dist/delegation/credentials.d.ts +0 -21
  599. package/dist/delegation/credentials.js +0 -66
  600. package/dist/delegation/credentials.js.map +0 -1
  601. package/dist/delegation/destroy-observation.d.ts +0 -42
  602. package/dist/delegation/destroy-observation.js +0 -115
  603. package/dist/delegation/destroy-observation.js.map +0 -1
  604. package/dist/delegation/effort.d.ts +0 -1
  605. package/dist/delegation/effort.js +0 -11
  606. package/dist/delegation/effort.js.map +0 -1
  607. package/dist/delegation/execution-identity.d.ts +0 -257
  608. package/dist/delegation/execution-identity.js +0 -253
  609. package/dist/delegation/execution-identity.js.map +0 -1
  610. package/dist/delegation/execution-settings.d.ts +0 -11
  611. package/dist/delegation/execution-settings.js +0 -65
  612. package/dist/delegation/execution-settings.js.map +0 -1
  613. package/dist/delegation/idle-test-app.d.ts +0 -4
  614. package/dist/delegation/idle-test-app.js +0 -185
  615. package/dist/delegation/idle-test-app.js.map +0 -1
  616. package/dist/delegation/input.d.ts +0 -12
  617. package/dist/delegation/input.js +0 -50
  618. package/dist/delegation/input.js.map +0 -1
  619. package/dist/delegation/park-notice.d.ts +0 -45
  620. package/dist/delegation/park-notice.js +0 -80
  621. package/dist/delegation/park-notice.js.map +0 -1
  622. package/dist/delegation/policy.d.ts +0 -27
  623. package/dist/delegation/policy.js +0 -110
  624. package/dist/delegation/policy.js.map +0 -1
  625. package/dist/delegation/process-liveness.d.ts +0 -98
  626. package/dist/delegation/process-liveness.js +0 -213
  627. package/dist/delegation/process-liveness.js.map +0 -1
  628. package/dist/delegation/provision.d.ts +0 -36
  629. package/dist/delegation/provision.js +0 -217
  630. package/dist/delegation/provision.js.map +0 -1
  631. package/dist/delegation/questions.d.ts +0 -24
  632. package/dist/delegation/questions.js +0 -55
  633. package/dist/delegation/questions.js.map +0 -1
  634. package/dist/delegation/readiness.d.ts +0 -13
  635. package/dist/delegation/readiness.js +0 -19
  636. package/dist/delegation/readiness.js.map +0 -1
  637. package/dist/delegation/results.d.ts +0 -13
  638. package/dist/delegation/results.js +0 -153
  639. package/dist/delegation/results.js.map +0 -1
  640. package/dist/delegation/retry-backoff.d.ts +0 -31
  641. package/dist/delegation/retry-backoff.js +0 -26
  642. package/dist/delegation/retry-backoff.js.map +0 -1
  643. package/dist/delegation/routes.d.ts +0 -1017
  644. package/dist/delegation/routes.js +0 -85
  645. package/dist/delegation/routes.js.map +0 -1
  646. package/dist/delegation/scratch-cleanup.d.ts +0 -33
  647. package/dist/delegation/scratch-cleanup.js +0 -155
  648. package/dist/delegation/scratch-cleanup.js.map +0 -1
  649. package/dist/delegation/service.d.ts +0 -264
  650. package/dist/delegation/service.js +0 -806
  651. package/dist/delegation/service.js.map +0 -1
  652. package/dist/delegation/task-discovery.d.ts +0 -6
  653. package/dist/delegation/task-discovery.js +0 -27
  654. package/dist/delegation/task-discovery.js.map +0 -1
  655. package/dist/delegation/transport.d.ts +0 -995
  656. package/dist/delegation/transport.js +0 -22
  657. package/dist/delegation/transport.js.map +0 -1
  658. package/dist/delegation/wait.d.ts +0 -7
  659. package/dist/delegation/wait.js +0 -44
  660. package/dist/delegation/wait.js.map +0 -1
  661. package/dist/delegation/windows-test-app.d.ts +0 -5
  662. package/dist/delegation/windows-test-app.js +0 -63
  663. package/dist/delegation/windows-test-app.js.map +0 -1
  664. package/dist/delegation/windows-workspace-identity.d.ts +0 -3
  665. package/dist/delegation/windows-workspace-identity.js +0 -22
  666. package/dist/delegation/windows-workspace-identity.js.map +0 -1
  667. package/dist/delegation/worker-cleanup.d.ts +0 -53
  668. package/dist/delegation/worker-cleanup.js +0 -330
  669. package/dist/delegation/worker-cleanup.js.map +0 -1
  670. package/dist/delegation/workspace.d.ts +0 -40
  671. package/dist/delegation/workspace.js +0 -592
  672. package/dist/delegation/workspace.js.map +0 -1
  673. package/dist/detached-process.d.ts +0 -125
  674. package/dist/detached-process.js +0 -448
  675. package/dist/detached-process.js.map +0 -1
  676. package/dist/discovery/catalog.d.ts +0 -16
  677. package/dist/discovery/catalog.js +0 -31
  678. package/dist/discovery/catalog.js.map +0 -1
  679. package/dist/discovery/cli.d.ts +0 -8
  680. package/dist/discovery/cli.js +0 -122
  681. package/dist/discovery/cli.js.map +0 -1
  682. package/dist/git-command.d.ts +0 -7
  683. package/dist/git-command.js +0 -8
  684. package/dist/git-command.js.map +0 -1
  685. package/dist/git-diff-base.d.ts +0 -41
  686. package/dist/git-diff-base.js +0 -116
  687. package/dist/git-diff-base.js.map +0 -1
  688. package/dist/git-index-copy.d.ts +0 -4
  689. package/dist/git-index-copy.js +0 -10
  690. package/dist/git-index-copy.js.map +0 -1
  691. package/dist/git-private-index.d.ts +0 -11
  692. package/dist/git-private-index.js +0 -51
  693. package/dist/git-private-index.js.map +0 -1
  694. package/dist/git-refs.d.ts +0 -11
  695. package/dist/git-refs.js +0 -14
  696. package/dist/git-refs.js.map +0 -1
  697. package/dist/git-worktree-lock-helper.d.ts +0 -7
  698. package/dist/git-worktree-lock-helper.js +0 -178
  699. package/dist/git-worktree-lock-helper.js.map +0 -1
  700. package/dist/git-worktree-lock.d.ts +0 -17
  701. package/dist/git-worktree-lock.js +0 -90
  702. package/dist/git-worktree-lock.js.map +0 -1
  703. package/dist/git-worktree-release.d.ts +0 -20
  704. package/dist/git-worktree-release.js +0 -27
  705. package/dist/git-worktree-release.js.map +0 -1
  706. package/dist/git-worktree.d.ts +0 -148
  707. package/dist/git-worktree.js +0 -857
  708. package/dist/git-worktree.js.map +0 -1
  709. package/dist/handoff.d.ts +0 -72
  710. package/dist/handoff.js +0 -212
  711. package/dist/handoff.js.map +0 -1
  712. package/dist/headless-run.d.ts +0 -48
  713. package/dist/headless-run.js +0 -158
  714. package/dist/headless-run.js.map +0 -1
  715. package/dist/home/boundary.d.ts +0 -5
  716. package/dist/home/boundary.js +0 -76
  717. package/dist/home/boundary.js.map +0 -1
  718. package/dist/home/changes.d.ts +0 -3
  719. package/dist/home/changes.js +0 -11
  720. package/dist/home/changes.js.map +0 -1
  721. package/dist/home/command.d.ts +0 -9
  722. package/dist/home/command.js +0 -37
  723. package/dist/home/command.js.map +0 -1
  724. package/dist/home/deprecation.d.ts +0 -9
  725. package/dist/home/deprecation.js +0 -17
  726. package/dist/home/deprecation.js.map +0 -1
  727. package/dist/home/display.d.ts +0 -2
  728. package/dist/home/display.js +0 -7
  729. package/dist/home/display.js.map +0 -1
  730. package/dist/home/entry-authorization.d.ts +0 -17
  731. package/dist/home/entry-authorization.js +0 -39
  732. package/dist/home/entry-authorization.js.map +0 -1
  733. package/dist/home/entry.d.ts +0 -16
  734. package/dist/home/entry.js +0 -95
  735. package/dist/home/entry.js.map +0 -1
  736. package/dist/home/file-location.d.ts +0 -14
  737. package/dist/home/file-location.js +0 -24
  738. package/dist/home/file-location.js.map +0 -1
  739. package/dist/home/home.d.ts +0 -42
  740. package/dist/home/home.js +0 -70
  741. package/dist/home/home.js.map +0 -1
  742. package/dist/home/identity.d.ts +0 -22
  743. package/dist/home/identity.js +0 -25
  744. package/dist/home/identity.js.map +0 -1
  745. package/dist/home/install-marker.d.ts +0 -27
  746. package/dist/home/install-marker.js +0 -77
  747. package/dist/home/install-marker.js.map +0 -1
  748. package/dist/home/kind-roots.d.ts +0 -10
  749. package/dist/home/kind-roots.js +0 -36
  750. package/dist/home/kind-roots.js.map +0 -1
  751. package/dist/home/leases.d.ts +0 -14
  752. package/dist/home/leases.js +0 -55
  753. package/dist/home/leases.js.map +0 -1
  754. package/dist/home/legacy-account-paths.d.ts +0 -4
  755. package/dist/home/legacy-account-paths.js +0 -41
  756. package/dist/home/legacy-account-paths.js.map +0 -1
  757. package/dist/home/legacy-merge.d.ts +0 -3
  758. package/dist/home/legacy-merge.js +0 -45
  759. package/dist/home/legacy-merge.js.map +0 -1
  760. package/dist/home/legacy-recovery.d.ts +0 -5
  761. package/dist/home/legacy-recovery.js +0 -154
  762. package/dist/home/legacy-recovery.js.map +0 -1
  763. package/dist/home/legacy-source.d.ts +0 -15
  764. package/dist/home/legacy-source.js +0 -57
  765. package/dist/home/legacy-source.js.map +0 -1
  766. package/dist/home/migrate.d.ts +0 -19
  767. package/dist/home/migrate.js +0 -321
  768. package/dist/home/migrate.js.map +0 -1
  769. package/dist/home/migration-account-source.d.ts +0 -2
  770. package/dist/home/migration-account-source.js +0 -17
  771. package/dist/home/migration-account-source.js.map +0 -1
  772. package/dist/home/migration-accounts.d.ts +0 -23
  773. package/dist/home/migration-accounts.js +0 -173
  774. package/dist/home/migration-accounts.js.map +0 -1
  775. package/dist/home/migration-boot.d.ts +0 -23
  776. package/dist/home/migration-boot.js +0 -61
  777. package/dist/home/migration-boot.js.map +0 -1
  778. package/dist/home/migration-claim.d.ts +0 -4
  779. package/dist/home/migration-claim.js +0 -69
  780. package/dist/home/migration-claim.js.map +0 -1
  781. package/dist/home/migration-cli.d.ts +0 -3
  782. package/dist/home/migration-cli.js +0 -64
  783. package/dist/home/migration-cli.js.map +0 -1
  784. package/dist/home/migration-files.d.ts +0 -14
  785. package/dist/home/migration-files.js +0 -192
  786. package/dist/home/migration-files.js.map +0 -1
  787. package/dist/home/migration-guard.d.ts +0 -2
  788. package/dist/home/migration-guard.js +0 -19
  789. package/dist/home/migration-guard.js.map +0 -1
  790. package/dist/home/migration-plan.d.ts +0 -20
  791. package/dist/home/migration-plan.js +0 -71
  792. package/dist/home/migration-plan.js.map +0 -1
  793. package/dist/home/migration-record.d.ts +0 -79
  794. package/dist/home/migration-record.js +0 -39
  795. package/dist/home/migration-record.js.map +0 -1
  796. package/dist/home/private-files.d.ts +0 -13
  797. package/dist/home/private-files.js +0 -101
  798. package/dist/home/private-files.js.map +0 -1
  799. package/dist/home/process-identity.d.ts +0 -2
  800. package/dist/home/process-identity.js +0 -8
  801. package/dist/home/process-identity.js.map +0 -1
  802. package/dist/home/protected-roots.d.ts +0 -25
  803. package/dist/home/protected-roots.js +0 -90
  804. package/dist/home/protected-roots.js.map +0 -1
  805. package/dist/home/recovery-watch.d.ts +0 -3
  806. package/dist/home/recovery-watch.js +0 -75
  807. package/dist/home/recovery-watch.js.map +0 -1
  808. package/dist/home/recovery.d.ts +0 -10
  809. package/dist/home/recovery.js +0 -94
  810. package/dist/home/recovery.js.map +0 -1
  811. package/dist/home/registry-content.d.ts +0 -2
  812. package/dist/home/registry-content.js +0 -17
  813. package/dist/home/registry-content.js.map +0 -1
  814. package/dist/home/reset-detection.d.ts +0 -5
  815. package/dist/home/reset-detection.js +0 -22
  816. package/dist/home/reset-detection.js.map +0 -1
  817. package/dist/home/resolve.d.ts +0 -10
  818. package/dist/home/resolve.js +0 -28
  819. package/dist/home/resolve.js.map +0 -1
  820. package/dist/home/store.d.ts +0 -48
  821. package/dist/home/store.js +0 -324
  822. package/dist/home/store.js.map +0 -1
  823. package/dist/home/switch.d.ts +0 -2
  824. package/dist/home/switch.js +0 -3
  825. package/dist/home/switch.js.map +0 -1
  826. package/dist/home/version-log.d.ts +0 -48
  827. package/dist/home/version-log.js +0 -216
  828. package/dist/home/version-log.js.map +0 -1
  829. package/dist/home/write-lock.d.ts +0 -6
  830. package/dist/home/write-lock.js +0 -96
  831. package/dist/home/write-lock.js.map +0 -1
  832. package/dist/hsq.d.ts +0 -2
  833. package/dist/hsq.js.map +0 -1
  834. package/dist/index.d.ts +0 -2
  835. package/dist/index.js.map +0 -1
  836. package/dist/install-as-command.d.ts +0 -32
  837. package/dist/install-as-command.js +0 -55
  838. package/dist/install-as-command.js.map +0 -1
  839. package/dist/jobs/cli.d.ts +0 -2
  840. package/dist/jobs/cli.js +0 -53
  841. package/dist/jobs/cli.js.map +0 -1
  842. package/dist/jobs/command.d.ts +0 -9
  843. package/dist/jobs/command.js +0 -19
  844. package/dist/jobs/command.js.map +0 -1
  845. package/dist/jobs/job.d.ts +0 -77
  846. package/dist/jobs/job.js +0 -252
  847. package/dist/jobs/job.js.map +0 -1
  848. package/dist/merge-observations.d.ts +0 -13
  849. package/dist/merge-observations.js +0 -55
  850. package/dist/merge-observations.js.map +0 -1
  851. package/dist/merged-streams.d.ts +0 -13
  852. package/dist/merged-streams.js +0 -33
  853. package/dist/merged-streams.js.map +0 -1
  854. package/dist/open-url.d.ts +0 -2
  855. package/dist/open-url.js +0 -10
  856. package/dist/open-url.js.map +0 -1
  857. package/dist/pack-check.d.ts +0 -17
  858. package/dist/pack-check.js +0 -27
  859. package/dist/pack-check.js.map +0 -1
  860. package/dist/paths.d.ts +0 -118
  861. package/dist/paths.js +0 -191
  862. package/dist/paths.js.map +0 -1
  863. package/dist/planner.d.ts +0 -30
  864. package/dist/planner.js +0 -270
  865. package/dist/planner.js.map +0 -1
  866. package/dist/preview/agent-address.d.ts +0 -34
  867. package/dist/preview/agent-address.js +0 -52
  868. package/dist/preview/agent-address.js.map +0 -1
  869. package/dist/preview/agent-marker.d.ts +0 -17
  870. package/dist/preview/agent-marker.js +0 -71
  871. package/dist/preview/agent-marker.js.map +0 -1
  872. package/dist/preview/browser-launch.d.ts +0 -28
  873. package/dist/preview/browser-launch.js +0 -64
  874. package/dist/preview/browser-launch.js.map +0 -1
  875. package/dist/preview/cdp-proxy.d.ts +0 -54
  876. package/dist/preview/cdp-proxy.js +0 -152
  877. package/dist/preview/cdp-proxy.js.map +0 -1
  878. package/dist/preview/cdp.d.ts +0 -49
  879. package/dist/preview/cdp.js +0 -167
  880. package/dist/preview/cdp.js.map +0 -1
  881. package/dist/preview/chromium-launch-progress.d.ts +0 -10
  882. package/dist/preview/chromium-launch-progress.js +0 -48
  883. package/dist/preview/chromium-launch-progress.js.map +0 -1
  884. package/dist/preview/chromium.d.ts +0 -91
  885. package/dist/preview/chromium.js +0 -500
  886. package/dist/preview/chromium.js.map +0 -1
  887. package/dist/preview/density.d.ts +0 -17
  888. package/dist/preview/density.js +0 -62
  889. package/dist/preview/density.js.map +0 -1
  890. package/dist/preview/dev-server.d.ts +0 -68
  891. package/dist/preview/dev-server.js +0 -318
  892. package/dist/preview/dev-server.js.map +0 -1
  893. package/dist/preview/host.d.ts +0 -215
  894. package/dist/preview/host.js +0 -954
  895. package/dist/preview/host.js.map +0 -1
  896. package/dist/preview/registration.d.ts +0 -68
  897. package/dist/preview/registration.js +0 -111
  898. package/dist/preview/registration.js.map +0 -1
  899. package/dist/preview/run-tools.d.ts +0 -9
  900. package/dist/preview/run-tools.js +0 -72
  901. package/dist/preview/run-tools.js.map +0 -1
  902. package/dist/preview/session.d.ts +0 -139
  903. package/dist/preview/session.js +0 -479
  904. package/dist/preview/session.js.map +0 -1
  905. package/dist/preview/url.d.ts +0 -6
  906. package/dist/preview/url.js +0 -17
  907. package/dist/preview/url.js.map +0 -1
  908. package/dist/process-wait/exit-file.d.ts +0 -29
  909. package/dist/process-wait/exit-file.js +0 -67
  910. package/dist/process-wait/exit-file.js.map +0 -1
  911. package/dist/process-wait/supervisor.d.ts +0 -30
  912. package/dist/process-wait/supervisor.js +0 -71
  913. package/dist/process-wait/supervisor.js.map +0 -1
  914. package/dist/project-commands.d.ts +0 -14
  915. package/dist/project-commands.js +0 -91
  916. package/dist/project-commands.js.map +0 -1
  917. package/dist/project-migration/answer.d.ts +0 -23
  918. package/dist/project-migration/answer.js +0 -37
  919. package/dist/project-migration/answer.js.map +0 -1
  920. package/dist/project-migration/auto.d.ts +0 -73
  921. package/dist/project-migration/auto.js +0 -161
  922. package/dist/project-migration/auto.js.map +0 -1
  923. package/dist/project-migration/cli.d.ts +0 -18
  924. package/dist/project-migration/cli.js +0 -57
  925. package/dist/project-migration/cli.js.map +0 -1
  926. package/dist/project-migration/containment.d.ts +0 -52
  927. package/dist/project-migration/containment.js +0 -200
  928. package/dist/project-migration/containment.js.map +0 -1
  929. package/dist/project-migration/durable.d.ts +0 -25
  930. package/dist/project-migration/durable.js +0 -69
  931. package/dist/project-migration/durable.js.map +0 -1
  932. package/dist/project-migration/engine.d.ts +0 -47
  933. package/dist/project-migration/engine.js +0 -103
  934. package/dist/project-migration/engine.js.map +0 -1
  935. package/dist/project-migration/fresh.d.ts +0 -4
  936. package/dist/project-migration/fresh.js +0 -25
  937. package/dist/project-migration/fresh.js.map +0 -1
  938. package/dist/project-migration/journal.d.ts +0 -139
  939. package/dist/project-migration/journal.js +0 -69
  940. package/dist/project-migration/journal.js.map +0 -1
  941. package/dist/project-migration/live.d.ts +0 -48
  942. package/dist/project-migration/live.js +0 -148
  943. package/dist/project-migration/live.js.map +0 -1
  944. package/dist/project-migration/offline.d.ts +0 -25
  945. package/dist/project-migration/offline.js +0 -54
  946. package/dist/project-migration/offline.js.map +0 -1
  947. package/dist/project-migration/plan.d.ts +0 -91
  948. package/dist/project-migration/plan.js +0 -466
  949. package/dist/project-migration/plan.js.map +0 -1
  950. package/dist/project-migration/recovery.d.ts +0 -28
  951. package/dist/project-migration/recovery.js +0 -78
  952. package/dist/project-migration/recovery.js.map +0 -1
  953. package/dist/project-migration/steps.d.ts +0 -18
  954. package/dist/project-migration/steps.js +0 -312
  955. package/dist/project-migration/steps.js.map +0 -1
  956. package/dist/project-paths.d.ts +0 -61
  957. package/dist/project-paths.js +0 -185
  958. package/dist/project-paths.js.map +0 -1
  959. package/dist/release/compatibility.d.ts +0 -12
  960. package/dist/release/compatibility.js +0 -62
  961. package/dist/release/compatibility.js.map +0 -1
  962. package/dist/release/manifests.d.ts +0 -112
  963. package/dist/release/manifests.js +0 -104
  964. package/dist/release/manifests.js.map +0 -1
  965. package/dist/release/publication.d.ts +0 -3
  966. package/dist/release/publication.js +0 -34
  967. package/dist/release/publication.js.map +0 -1
  968. package/dist/release/snapshot.d.ts +0 -67
  969. package/dist/release/snapshot.js +0 -97
  970. package/dist/release/snapshot.js.map +0 -1
  971. package/dist/release/stable.d.ts +0 -38
  972. package/dist/release/stable.js +0 -55
  973. package/dist/release/stable.js.map +0 -1
  974. package/dist/remote-settings-cli.d.ts +0 -24
  975. package/dist/remote-settings-cli.js +0 -156
  976. package/dist/remote-settings-cli.js.map +0 -1
  977. package/dist/remote-settings.d.ts +0 -41
  978. package/dist/remote-settings.js +0 -110
  979. package/dist/remote-settings.js.map +0 -1
  980. package/dist/runs/agent-tmpdir-removal.d.ts +0 -15
  981. package/dist/runs/agent-tmpdir-removal.js +0 -60
  982. package/dist/runs/agent-tmpdir-removal.js.map +0 -1
  983. package/dist/runs/agent-tmpdir.d.ts +0 -119
  984. package/dist/runs/agent-tmpdir.js +0 -855
  985. package/dist/runs/agent-tmpdir.js.map +0 -1
  986. package/dist/runs/archive-family.d.ts +0 -33
  987. package/dist/runs/archive-family.js +0 -90
  988. package/dist/runs/archive-family.js.map +0 -1
  989. package/dist/runs/arm-repo-handle.d.ts +0 -10
  990. package/dist/runs/arm-repo-handle.js +0 -45
  991. package/dist/runs/arm-repo-handle.js.map +0 -1
  992. package/dist/runs/auto-name.d.ts +0 -77
  993. package/dist/runs/auto-name.js +0 -179
  994. package/dist/runs/auto-name.js.map +0 -1
  995. package/dist/runs/claim-families.d.ts +0 -37
  996. package/dist/runs/claim-families.js +0 -101
  997. package/dist/runs/claim-families.js.map +0 -1
  998. package/dist/runs/client-request.d.ts +0 -11
  999. package/dist/runs/client-request.js +0 -26
  1000. package/dist/runs/client-request.js.map +0 -1
  1001. package/dist/runs/cold-reads.d.ts +0 -40
  1002. package/dist/runs/cold-reads.js +0 -56
  1003. package/dist/runs/cold-reads.js.map +0 -1
  1004. package/dist/runs/conversation-identity.d.ts +0 -19
  1005. package/dist/runs/conversation-identity.js +0 -31
  1006. package/dist/runs/conversation-identity.js.map +0 -1
  1007. package/dist/runs/delegation-state.d.ts +0 -409
  1008. package/dist/runs/delegation-state.js +0 -22
  1009. package/dist/runs/delegation-state.js.map +0 -1
  1010. package/dist/runs/event-history-agent-context.d.ts +0 -15
  1011. package/dist/runs/event-history-agent-context.js +0 -119
  1012. package/dist/runs/event-history-agent-context.js.map +0 -1
  1013. package/dist/runs/event-history-context.d.ts +0 -15
  1014. package/dist/runs/event-history-context.js +0 -109
  1015. package/dist/runs/event-history-context.js.map +0 -1
  1016. package/dist/runs/event-history.d.ts +0 -53
  1017. package/dist/runs/event-history.js +0 -563
  1018. package/dist/runs/event-history.js.map +0 -1
  1019. package/dist/runs/exit-events.d.ts +0 -32
  1020. package/dist/runs/exit-events.js +0 -40
  1021. package/dist/runs/exit-events.js.map +0 -1
  1022. package/dist/runs/history-compressor.d.ts +0 -29
  1023. package/dist/runs/history-compressor.js +0 -116
  1024. package/dist/runs/history-compressor.js.map +0 -1
  1025. package/dist/runs/history-file.d.ts +0 -36
  1026. package/dist/runs/history-file.js +0 -463
  1027. package/dist/runs/history-file.js.map +0 -1
  1028. package/dist/runs/history-stream.d.ts +0 -2
  1029. package/dist/runs/history-stream.js +0 -62
  1030. package/dist/runs/history-stream.js.map +0 -1
  1031. package/dist/runs/legacy-index.d.ts +0 -49
  1032. package/dist/runs/legacy-index.js +0 -156
  1033. package/dist/runs/legacy-index.js.map +0 -1
  1034. package/dist/runs/legacy-run-rows.d.ts +0 -12
  1035. package/dist/runs/legacy-run-rows.js +0 -33
  1036. package/dist/runs/legacy-run-rows.js.map +0 -1
  1037. package/dist/runs/legacy-waits.d.ts +0 -64
  1038. package/dist/runs/legacy-waits.js +0 -335
  1039. package/dist/runs/legacy-waits.js.map +0 -1
  1040. package/dist/runs/live-item-snapshots.d.ts +0 -15
  1041. package/dist/runs/live-item-snapshots.js +0 -95
  1042. package/dist/runs/live-item-snapshots.js.map +0 -1
  1043. package/dist/runs/loaded-run-exits.d.ts +0 -6
  1044. package/dist/runs/loaded-run-exits.js +0 -32
  1045. package/dist/runs/loaded-run-exits.js.map +0 -1
  1046. package/dist/runs/loaded-run-healing.d.ts +0 -3
  1047. package/dist/runs/loaded-run-healing.js +0 -17
  1048. package/dist/runs/loaded-run-healing.js.map +0 -1
  1049. package/dist/runs/outcome-commit.d.ts +0 -119
  1050. package/dist/runs/outcome-commit.js +0 -155
  1051. package/dist/runs/outcome-commit.js.map +0 -1
  1052. package/dist/runs/owned-run-create.d.ts +0 -33
  1053. package/dist/runs/owned-run-create.js +0 -98
  1054. package/dist/runs/owned-run-create.js.map +0 -1
  1055. package/dist/runs/project-run-connection.d.ts +0 -76
  1056. package/dist/runs/project-run-connection.js +0 -287
  1057. package/dist/runs/project-run-connection.js.map +0 -1
  1058. package/dist/runs/project-run-sources.d.ts +0 -21
  1059. package/dist/runs/project-run-sources.js +0 -85
  1060. package/dist/runs/project-run-sources.js.map +0 -1
  1061. package/dist/runs/pull-requests.d.ts +0 -14
  1062. package/dist/runs/pull-requests.js +0 -96
  1063. package/dist/runs/pull-requests.js.map +0 -1
  1064. package/dist/runs/raw-record.d.ts +0 -40
  1065. package/dist/runs/raw-record.js +0 -133
  1066. package/dist/runs/raw-record.js.map +0 -1
  1067. package/dist/runs/record-write-rules.d.ts +0 -129
  1068. package/dist/runs/record-write-rules.js +0 -326
  1069. package/dist/runs/record-write-rules.js.map +0 -1
  1070. package/dist/runs/report-rows.d.ts +0 -36
  1071. package/dist/runs/report-rows.js +0 -102
  1072. package/dist/runs/report-rows.js.map +0 -1
  1073. package/dist/runs/retention.d.ts +0 -91
  1074. package/dist/runs/retention.js +0 -192
  1075. package/dist/runs/retention.js.map +0 -1
  1076. package/dist/runs/review-gate.d.ts +0 -18
  1077. package/dist/runs/review-gate.js +0 -22
  1078. package/dist/runs/review-gate.js.map +0 -1
  1079. package/dist/runs/run-claims.d.ts +0 -30
  1080. package/dist/runs/run-claims.js +0 -52
  1081. package/dist/runs/run-claims.js.map +0 -1
  1082. package/dist/runs/run-database-peer-page.d.ts +0 -12
  1083. package/dist/runs/run-database-peer-page.js +0 -25
  1084. package/dist/runs/run-database-peer-page.js.map +0 -1
  1085. package/dist/runs/run-database-row.d.ts +0 -39
  1086. package/dist/runs/run-database-row.js +0 -83
  1087. package/dist/runs/run-database-row.js.map +0 -1
  1088. package/dist/runs/run-database-version.d.ts +0 -14
  1089. package/dist/runs/run-database-version.js +0 -19
  1090. package/dist/runs/run-database-version.js.map +0 -1
  1091. package/dist/runs/run-database.d.ts +0 -389
  1092. package/dist/runs/run-database.js +0 -957
  1093. package/dist/runs/run-database.js.map +0 -1
  1094. package/dist/runs/run-exits.d.ts +0 -4510
  1095. package/dist/runs/run-exits.js +0 -191
  1096. package/dist/runs/run-exits.js.map +0 -1
  1097. package/dist/runs/run-index.d.ts +0 -36
  1098. package/dist/runs/run-index.js +0 -261
  1099. package/dist/runs/run-index.js.map +0 -1
  1100. package/dist/runs/run-references.d.ts +0 -61
  1101. package/dist/runs/run-references.js +0 -421
  1102. package/dist/runs/run-references.js.map +0 -1
  1103. package/dist/runs/run-row.d.ts +0 -14
  1104. package/dist/runs/run-row.js +0 -56
  1105. package/dist/runs/run-row.js.map +0 -1
  1106. package/dist/runs/run-summary-page.d.ts +0 -36
  1107. package/dist/runs/run-summary-page.js +0 -46
  1108. package/dist/runs/run-summary-page.js.map +0 -1
  1109. package/dist/runs/run-title.d.ts +0 -8
  1110. package/dist/runs/run-title.js +0 -28
  1111. package/dist/runs/run-title.js.map +0 -1
  1112. package/dist/runs/store-open-error.d.ts +0 -24
  1113. package/dist/runs/store-open-error.js +0 -62
  1114. package/dist/runs/store-open-error.js.map +0 -1
  1115. package/dist/runs/store.d.ts +0 -3974
  1116. package/dist/runs/store.js +0 -3516
  1117. package/dist/runs/store.js.map +0 -1
  1118. package/dist/runs/task-markers.d.ts +0 -29
  1119. package/dist/runs/task-markers.js +0 -78
  1120. package/dist/runs/task-markers.js.map +0 -1
  1121. package/dist/runs/task-refs.d.ts +0 -39
  1122. package/dist/runs/task-refs.js +0 -107
  1123. package/dist/runs/task-refs.js.map +0 -1
  1124. package/dist/runs/transcript-facts-fold.d.ts +0 -64
  1125. package/dist/runs/transcript-facts-fold.js +0 -109
  1126. package/dist/runs/transcript-facts-fold.js.map +0 -1
  1127. package/dist/runs/transcript-facts-load.d.ts +0 -11
  1128. package/dist/runs/transcript-facts-load.js +0 -66
  1129. package/dist/runs/transcript-facts-load.js.map +0 -1
  1130. package/dist/runs/transcript-facts-queue.d.ts +0 -30
  1131. package/dist/runs/transcript-facts-queue.js +0 -227
  1132. package/dist/runs/transcript-facts-queue.js.map +0 -1
  1133. package/dist/runs/transcript-facts-worker.d.ts +0 -15
  1134. package/dist/runs/transcript-facts-worker.js +0 -26
  1135. package/dist/runs/transcript-facts-worker.js.map +0 -1
  1136. package/dist/runs/transcript-facts.d.ts +0 -40
  1137. package/dist/runs/transcript-facts.js +0 -192
  1138. package/dist/runs/transcript-facts.js.map +0 -1
  1139. package/dist/runs/ui-event-sink.d.ts +0 -59
  1140. package/dist/runs/ui-event-sink.js +0 -197
  1141. package/dist/runs/ui-event-sink.js.map +0 -1
  1142. package/dist/runs/wait-capacity.d.ts +0 -8
  1143. package/dist/runs/wait-capacity.js +0 -28
  1144. package/dist/runs/wait-capacity.js.map +0 -1
  1145. package/dist/runs/wait-phases.d.ts +0 -4
  1146. package/dist/runs/wait-phases.js +0 -11
  1147. package/dist/runs/wait-phases.js.map +0 -1
  1148. package/dist/runs/wait-registration-write.d.ts +0 -5
  1149. package/dist/runs/wait-registration-write.js +0 -35
  1150. package/dist/runs/wait-registration-write.js.map +0 -1
  1151. package/dist/runs/webhook.d.ts +0 -193
  1152. package/dist/runs/webhook.js +0 -362
  1153. package/dist/runs/webhook.js.map +0 -1
  1154. package/dist/runs/worker-deletion-proof.d.ts +0 -13
  1155. package/dist/runs/worker-deletion-proof.js +0 -13
  1156. package/dist/runs/worker-deletion-proof.js.map +0 -1
  1157. package/dist/runs/worker-execution.d.ts +0 -22
  1158. package/dist/runs/worker-execution.js +0 -30
  1159. package/dist/runs/worker-execution.js.map +0 -1
  1160. package/dist/runs/worker-resource-holders.d.ts +0 -17
  1161. package/dist/runs/worker-resource-holders.js +0 -34
  1162. package/dist/runs/worker-resource-holders.js.map +0 -1
  1163. package/dist/runs/worker-result-commit.d.ts +0 -26
  1164. package/dist/runs/worker-result-commit.js +0 -121
  1165. package/dist/runs/worker-result-commit.js.map +0 -1
  1166. package/dist/self-update/checkouts.d.ts +0 -46
  1167. package/dist/self-update/checkouts.js +0 -284
  1168. package/dist/self-update/checkouts.js.map +0 -1
  1169. package/dist/self-update/cli.d.ts +0 -19
  1170. package/dist/self-update/cli.js +0 -243
  1171. package/dist/self-update/cli.js.map +0 -1
  1172. package/dist/self-update/installer.d.ts +0 -24
  1173. package/dist/self-update/installer.js +0 -139
  1174. package/dist/self-update/installer.js.map +0 -1
  1175. package/dist/self-update/launcher.d.ts +0 -30
  1176. package/dist/self-update/launcher.js +0 -172
  1177. package/dist/self-update/launcher.js.map +0 -1
  1178. package/dist/self-update/layout.d.ts +0 -108
  1179. package/dist/self-update/layout.js +0 -276
  1180. package/dist/self-update/layout.js.map +0 -1
  1181. package/dist/self-update/pulls.d.ts +0 -30
  1182. package/dist/self-update/pulls.js +0 -128
  1183. package/dist/self-update/pulls.js.map +0 -1
  1184. package/dist/self-update/registry.d.ts +0 -37
  1185. package/dist/self-update/registry.js +0 -86
  1186. package/dist/self-update/registry.js.map +0 -1
  1187. package/dist/self-update/restart.d.ts +0 -25
  1188. package/dist/self-update/restart.js +0 -79
  1189. package/dist/self-update/restart.js.map +0 -1
  1190. package/dist/self-update/semver.d.ts +0 -19
  1191. package/dist/self-update/semver.js +0 -79
  1192. package/dist/self-update/semver.js.map +0 -1
  1193. package/dist/self-update/service.d.ts +0 -115
  1194. package/dist/self-update/service.js +0 -332
  1195. package/dist/self-update/service.js.map +0 -1
  1196. package/dist/self-update/supervisor.d.ts +0 -10
  1197. package/dist/self-update/supervisor.js +0 -52
  1198. package/dist/self-update/supervisor.js.map +0 -1
  1199. package/dist/serve-boot.d.ts +0 -60
  1200. package/dist/serve-boot.js +0 -142
  1201. package/dist/serve-boot.js.map +0 -1
  1202. package/dist/serve-command.d.ts +0 -71
  1203. package/dist/serve-command.js +0 -168
  1204. package/dist/serve-command.js.map +0 -1
  1205. package/dist/serve-listener.d.ts +0 -12
  1206. package/dist/serve-listener.js +0 -52
  1207. package/dist/serve-listener.js.map +0 -1
  1208. package/dist/server/activity-project-topic.d.ts +0 -44
  1209. package/dist/server/activity-project-topic.js +0 -137
  1210. package/dist/server/activity-project-topic.js.map +0 -1
  1211. package/dist/server/activity-routes.d.ts +0 -317
  1212. package/dist/server/activity-routes.js +0 -116
  1213. package/dist/server/activity-routes.js.map +0 -1
  1214. package/dist/server/activity-sources.d.ts +0 -26
  1215. package/dist/server/activity-sources.js +0 -45
  1216. package/dist/server/activity-sources.js.map +0 -1
  1217. package/dist/server/activity-topic.d.ts +0 -33
  1218. package/dist/server/activity-topic.js +0 -48
  1219. package/dist/server/activity-topic.js.map +0 -1
  1220. package/dist/server/app-type.js.map +0 -1
  1221. package/dist/server/archive-on-merge.d.ts +0 -45
  1222. package/dist/server/archive-on-merge.js +0 -242
  1223. package/dist/server/archive-on-merge.js.map +0 -1
  1224. package/dist/server/automation-log-retry.d.ts +0 -27
  1225. package/dist/server/automation-log-retry.js +0 -88
  1226. package/dist/server/automation-log-retry.js.map +0 -1
  1227. package/dist/server/capabilities.d.ts +0 -69
  1228. package/dist/server/capabilities.js +0 -111
  1229. package/dist/server/capabilities.js.map +0 -1
  1230. package/dist/server/checkout-progress.d.ts +0 -10
  1231. package/dist/server/checkout-progress.js +0 -27
  1232. package/dist/server/checkout-progress.js.map +0 -1
  1233. package/dist/server/checkout.d.ts +0 -153
  1234. package/dist/server/checkout.js +0 -323
  1235. package/dist/server/checkout.js.map +0 -1
  1236. package/dist/server/cockpit-ownership.d.ts +0 -112
  1237. package/dist/server/cockpit-ownership.js +0 -419
  1238. package/dist/server/cockpit-ownership.js.map +0 -1
  1239. package/dist/server/cold-repo-handles.d.ts +0 -17
  1240. package/dist/server/cold-repo-handles.js +0 -82
  1241. package/dist/server/cold-repo-handles.js.map +0 -1
  1242. package/dist/server/completion-actions.d.ts +0 -37
  1243. package/dist/server/completion-actions.js +0 -261
  1244. package/dist/server/completion-actions.js.map +0 -1
  1245. package/dist/server/config-merge.d.ts +0 -11
  1246. package/dist/server/config-merge.js +0 -74
  1247. package/dist/server/config-merge.js.map +0 -1
  1248. package/dist/server/create-project.d.ts +0 -71
  1249. package/dist/server/create-project.js +0 -466
  1250. package/dist/server/create-project.js.map +0 -1
  1251. package/dist/server/forge/draft-pr.d.ts +0 -8
  1252. package/dist/server/forge/draft-pr.js +0 -123
  1253. package/dist/server/forge/draft-pr.js.map +0 -1
  1254. package/dist/server/forge/github-filters.d.ts +0 -22
  1255. package/dist/server/forge/github-filters.js +0 -128
  1256. package/dist/server/forge/github-filters.js.map +0 -1
  1257. package/dist/server/forge/github-merge-requirements.d.ts +0 -18
  1258. package/dist/server/forge/github-merge-requirements.js +0 -148
  1259. package/dist/server/forge/github-merge-requirements.js.map +0 -1
  1260. package/dist/server/forge/github-merge-state.d.ts +0 -27
  1261. package/dist/server/forge/github-merge-state.js +0 -248
  1262. package/dist/server/forge/github-merge-state.js.map +0 -1
  1263. package/dist/server/forge/github-timeline.d.ts +0 -117
  1264. package/dist/server/forge/github-timeline.js +0 -273
  1265. package/dist/server/forge/github-timeline.js.map +0 -1
  1266. package/dist/server/forge/github.d.ts +0 -393
  1267. package/dist/server/forge/github.js +0 -2881
  1268. package/dist/server/forge/github.js.map +0 -1
  1269. package/dist/server/forge/index.d.ts +0 -47
  1270. package/dist/server/forge/index.js +0 -81
  1271. package/dist/server/forge/index.js.map +0 -1
  1272. package/dist/server/forge/repo-handle-discovery.d.ts +0 -16
  1273. package/dist/server/forge/repo-handle-discovery.js +0 -2
  1274. package/dist/server/forge/repo-handle-discovery.js.map +0 -1
  1275. package/dist/server/forge/types.d.ts +0 -278
  1276. package/dist/server/forge/types.js +0 -2
  1277. package/dist/server/forge/types.js.map +0 -1
  1278. package/dist/server/fs-browse.d.ts +0 -82
  1279. package/dist/server/fs-browse.js +0 -217
  1280. package/dist/server/fs-browse.js.map +0 -1
  1281. package/dist/server/git-changes.d.ts +0 -205
  1282. package/dist/server/git-changes.js +0 -531
  1283. package/dist/server/git-changes.js.map +0 -1
  1284. package/dist/server/git.d.ts +0 -52
  1285. package/dist/server/git.js +0 -174
  1286. package/dist/server/git.js.map +0 -1
  1287. package/dist/server/home-recovery-routes.d.ts +0 -171
  1288. package/dist/server/home-recovery-routes.js +0 -56
  1289. package/dist/server/home-recovery-routes.js.map +0 -1
  1290. package/dist/server/launch-key.d.ts +0 -5
  1291. package/dist/server/launch-key.js +0 -35
  1292. package/dist/server/launch-key.js.map +0 -1
  1293. package/dist/server/live-routes.d.ts +0 -73
  1294. package/dist/server/live-routes.js +0 -161
  1295. package/dist/server/live-routes.js.map +0 -1
  1296. package/dist/server/open-in-app.d.ts +0 -57
  1297. package/dist/server/open-in-app.js +0 -178
  1298. package/dist/server/open-in-app.js.map +0 -1
  1299. package/dist/server/open-in-targets.d.ts +0 -53
  1300. package/dist/server/open-in-targets.js +0 -112
  1301. package/dist/server/open-in-targets.js.map +0 -1
  1302. package/dist/server/open-in-terminal.d.ts +0 -73
  1303. package/dist/server/open-in-terminal.js +0 -160
  1304. package/dist/server/open-in-terminal.js.map +0 -1
  1305. package/dist/server/preview-cdp-socket.d.ts +0 -21
  1306. package/dist/server/preview-cdp-socket.js +0 -112
  1307. package/dist/server/preview-cdp-socket.js.map +0 -1
  1308. package/dist/server/preview-socket.d.ts +0 -36
  1309. package/dist/server/preview-socket.js +0 -142
  1310. package/dist/server/preview-socket.js.map +0 -1
  1311. package/dist/server/preview-sockets.d.ts +0 -14
  1312. package/dist/server/preview-sockets.js +0 -18
  1313. package/dist/server/preview-sockets.js.map +0 -1
  1314. package/dist/server/project-context.d.ts +0 -218
  1315. package/dist/server/project-context.js +0 -524
  1316. package/dist/server/project-context.js.map +0 -1
  1317. package/dist/server/project-run-files.d.ts +0 -13
  1318. package/dist/server/project-run-files.js +0 -52
  1319. package/dist/server/project-run-files.js.map +0 -1
  1320. package/dist/server/provider-action-gate.d.ts +0 -5
  1321. package/dist/server/provider-action-gate.js +0 -28
  1322. package/dist/server/provider-action-gate.js.map +0 -1
  1323. package/dist/server/provider-auth-runtime.d.ts +0 -34
  1324. package/dist/server/provider-auth-runtime.js +0 -118
  1325. package/dist/server/provider-auth-runtime.js.map +0 -1
  1326. package/dist/server/repo-branch-forge.d.ts +0 -61
  1327. package/dist/server/repo-branch-forge.js +0 -158
  1328. package/dist/server/repo-branch-forge.js.map +0 -1
  1329. package/dist/server/repo-branch-sweep.d.ts +0 -21
  1330. package/dist/server/repo-branch-sweep.js +0 -64
  1331. package/dist/server/repo-branch-sweep.js.map +0 -1
  1332. package/dist/server/repo-branches.d.ts +0 -103
  1333. package/dist/server/repo-branches.js +0 -804
  1334. package/dist/server/repo-branches.js.map +0 -1
  1335. package/dist/server/repo-pull.d.ts +0 -18
  1336. package/dist/server/repo-pull.js +0 -97
  1337. package/dist/server/repo-pull.js.map +0 -1
  1338. package/dist/server/reports-api.d.ts +0 -90
  1339. package/dist/server/reports-api.js +0 -21
  1340. package/dist/server/reports-api.js.map +0 -1
  1341. package/dist/server/reports-topic.d.ts +0 -5
  1342. package/dist/server/reports-topic.js +0 -37
  1343. package/dist/server/reports-topic.js.map +0 -1
  1344. package/dist/server/run-checkout.d.ts +0 -56
  1345. package/dist/server/run-checkout.js +0 -141
  1346. package/dist/server/run-checkout.js.map +0 -1
  1347. package/dist/server/run-event-feed.d.ts +0 -20
  1348. package/dist/server/run-event-feed.js +0 -203
  1349. package/dist/server/run-event-feed.js.map +0 -1
  1350. package/dist/server/self-update-routes.d.ts +0 -308
  1351. package/dist/server/self-update-routes.js +0 -80
  1352. package/dist/server/self-update-routes.js.map +0 -1
  1353. package/dist/server/server-deps.d.ts +0 -40
  1354. package/dist/server/server-deps.js +0 -132
  1355. package/dist/server/server-deps.js.map +0 -1
  1356. package/dist/server/server.d.ts +0 -35332
  1357. package/dist/server/server.js +0 -5046
  1358. package/dist/server/server.js.map +0 -1
  1359. package/dist/server/skill-sources.d.ts +0 -264
  1360. package/dist/server/skill-sources.js +0 -130
  1361. package/dist/server/skill-sources.js.map +0 -1
  1362. package/dist/server/start-run-options.d.ts +0 -84
  1363. package/dist/server/start-run-options.js +0 -114
  1364. package/dist/server/start-run-options.js.map +0 -1
  1365. package/dist/server/static-ui.d.ts +0 -49
  1366. package/dist/server/static-ui.js +0 -99
  1367. package/dist/server/static-ui.js.map +0 -1
  1368. package/dist/server/upgrade-router.d.ts +0 -23
  1369. package/dist/server/upgrade-router.js +0 -53
  1370. package/dist/server/upgrade-router.js.map +0 -1
  1371. package/dist/server/validators.d.ts +0 -80
  1372. package/dist/server/validators.js +0 -85
  1373. package/dist/server/validators.js.map +0 -1
  1374. package/dist/server/workflow-files.d.ts +0 -9
  1375. package/dist/server/workflow-files.js +0 -27
  1376. package/dist/server/workflow-files.js.map +0 -1
  1377. package/dist/server/workspace-config-patch.d.ts +0 -11
  1378. package/dist/server/workspace-config-patch.js +0 -75
  1379. package/dist/server/workspace-config-patch.js.map +0 -1
  1380. package/dist/server/workspace-live-routes.d.ts +0 -222
  1381. package/dist/server/workspace-live-routes.js +0 -8
  1382. package/dist/server/workspace-live-routes.js.map +0 -1
  1383. package/dist/server/workspace-projects.d.ts +0 -51
  1384. package/dist/server/workspace-projects.js +0 -160
  1385. package/dist/server/workspace-projects.js.map +0 -1
  1386. package/dist/server/workspace-run-feed.d.ts +0 -66
  1387. package/dist/server/workspace-run-feed.js +0 -171
  1388. package/dist/server/workspace-run-feed.js.map +0 -1
  1389. package/dist/server/ws.d.ts +0 -80
  1390. package/dist/server/ws.js +0 -280
  1391. package/dist/server/ws.js.map +0 -1
  1392. package/dist/server/wsl.d.ts +0 -25
  1393. package/dist/server/wsl.js +0 -92
  1394. package/dist/server/wsl.js.map +0 -1
  1395. package/dist/server-command.d.ts +0 -53
  1396. package/dist/server-command.js +0 -180
  1397. package/dist/server-command.js.map +0 -1
  1398. package/dist/server-install/engine.d.ts +0 -51
  1399. package/dist/server-install/engine.js +0 -358
  1400. package/dist/server-install/engine.js.map +0 -1
  1401. package/dist/server-install/group-migrate.d.ts +0 -26
  1402. package/dist/server-install/group-migrate.js +0 -241
  1403. package/dist/server-install/group-migrate.js.map +0 -1
  1404. package/dist/server-install/migrate-cli.d.ts +0 -12
  1405. package/dist/server-install/migrate-cli.js +0 -44
  1406. package/dist/server-install/migrate-cli.js.map +0 -1
  1407. package/dist/server-install/migrate-journal.d.ts +0 -15
  1408. package/dist/server-install/migrate-journal.js +0 -48
  1409. package/dist/server-install/migrate-journal.js.map +0 -1
  1410. package/dist/server-install/migration-report.d.ts +0 -3
  1411. package/dist/server-install/migration-report.js +0 -21
  1412. package/dist/server-install/migration-report.js.map +0 -1
  1413. package/dist/server-install/npx-cache.d.ts +0 -34
  1414. package/dist/server-install/npx-cache.js +0 -142
  1415. package/dist/server-install/npx-cache.js.map +0 -1
  1416. package/dist/server-install/platforms/macosx-launchd-files.d.ts +0 -11
  1417. package/dist/server-install/platforms/macosx-launchd-files.js +0 -60
  1418. package/dist/server-install/platforms/macosx-launchd-files.js.map +0 -1
  1419. package/dist/server-install/platforms/macosx-migration.d.ts +0 -17
  1420. package/dist/server-install/platforms/macosx-migration.js +0 -239
  1421. package/dist/server-install/platforms/macosx-migration.js.map +0 -1
  1422. package/dist/server-install/platforms/macosx-ngrok.d.ts +0 -12
  1423. package/dist/server-install/platforms/macosx-ngrok.js +0 -490
  1424. package/dist/server-install/platforms/macosx-ngrok.js.map +0 -1
  1425. package/dist/server-install/platforms/service-env.d.ts +0 -4
  1426. package/dist/server-install/platforms/service-env.js +0 -17
  1427. package/dist/server-install/platforms/service-env.js.map +0 -1
  1428. package/dist/server-install/platforms/ubuntu-vps-files.d.ts +0 -18
  1429. package/dist/server-install/platforms/ubuntu-vps-files.js +0 -43
  1430. package/dist/server-install/platforms/ubuntu-vps-files.js.map +0 -1
  1431. package/dist/server-install/platforms/ubuntu-vps-migration.d.ts +0 -26
  1432. package/dist/server-install/platforms/ubuntu-vps-migration.js +0 -391
  1433. package/dist/server-install/platforms/ubuntu-vps-migration.js.map +0 -1
  1434. package/dist/server-install/platforms/ubuntu-vps-names.d.ts +0 -30
  1435. package/dist/server-install/platforms/ubuntu-vps-names.js +0 -50
  1436. package/dist/server-install/platforms/ubuntu-vps-names.js.map +0 -1
  1437. package/dist/server-install/platforms/ubuntu-vps-redeploy.d.ts +0 -42
  1438. package/dist/server-install/platforms/ubuntu-vps-redeploy.js +0 -127
  1439. package/dist/server-install/platforms/ubuntu-vps-redeploy.js.map +0 -1
  1440. package/dist/server-install/platforms/ubuntu-vps.d.ts +0 -57
  1441. package/dist/server-install/platforms/ubuntu-vps.js +0 -945
  1442. package/dist/server-install/platforms/ubuntu-vps.js.map +0 -1
  1443. package/dist/server-install/state.d.ts +0 -51
  1444. package/dist/server-install/state.js +0 -177
  1445. package/dist/server-install/state.js.map +0 -1
  1446. package/dist/server-install/steps.d.ts +0 -108
  1447. package/dist/server-install/steps.js +0 -348
  1448. package/dist/server-install/steps.js.map +0 -1
  1449. package/dist/server-install/strategies.d.ts +0 -6
  1450. package/dist/server-install/strategies.js +0 -24
  1451. package/dist/server-install/strategies.js.map +0 -1
  1452. package/dist/server-install/types.d.ts +0 -316
  1453. package/dist/server-install/types.js +0 -118
  1454. package/dist/server-install/types.js.map +0 -1
  1455. package/dist/server-install/ui.d.ts +0 -36
  1456. package/dist/server-install/ui.js +0 -130
  1457. package/dist/server-install/ui.js.map +0 -1
  1458. package/dist/session-context.d.ts +0 -66
  1459. package/dist/session-context.js +0 -266
  1460. package/dist/session-context.js.map +0 -1
  1461. package/dist/skills-provision.d.ts +0 -64
  1462. package/dist/skills-provision.js +0 -325
  1463. package/dist/skills-provision.js.map +0 -1
  1464. package/dist/skills-remote.d.ts +0 -144
  1465. package/dist/skills-remote.js +0 -847
  1466. package/dist/skills-remote.js.map +0 -1
  1467. package/dist/skills.d.ts +0 -81
  1468. package/dist/skills.js +0 -288
  1469. package/dist/skills.js.map +0 -1
  1470. package/dist/subcommands.d.ts +0 -12
  1471. package/dist/subcommands.js +0 -59
  1472. package/dist/subcommands.js.map +0 -1
  1473. package/dist/task-cli/cli.d.ts +0 -39
  1474. package/dist/task-cli/cli.js +0 -773
  1475. package/dist/task-cli/cli.js.map +0 -1
  1476. package/dist/task-cli/discovery.d.ts +0 -32
  1477. package/dist/task-cli/discovery.js +0 -133
  1478. package/dist/task-cli/discovery.js.map +0 -1
  1479. package/dist/task-cli/hint.d.ts +0 -20
  1480. package/dist/task-cli/hint.js +0 -15
  1481. package/dist/task-cli/hint.js.map +0 -1
  1482. package/dist/task-cli/http.d.ts +0 -42
  1483. package/dist/task-cli/http.js +0 -110
  1484. package/dist/task-cli/http.js.map +0 -1
  1485. package/dist/task-cli/projections.d.ts +0 -68
  1486. package/dist/task-cli/projections.js +0 -76
  1487. package/dist/task-cli/projections.js.map +0 -1
  1488. package/dist/task-cli/watch.d.ts +0 -119
  1489. package/dist/task-cli/watch.js +0 -494
  1490. package/dist/task-cli/watch.js.map +0 -1
  1491. package/dist/ui-state.d.ts +0 -41
  1492. package/dist/ui-state.js +0 -93
  1493. package/dist/ui-state.js.map +0 -1
  1494. package/dist/update-check.d.ts +0 -2
  1495. package/dist/update-check.js +0 -28
  1496. package/dist/update-check.js.map +0 -1
  1497. package/dist/use-command-notice.d.ts +0 -1
  1498. package/dist/use-command-notice.js +0 -6
  1499. package/dist/use-command-notice.js.map +0 -1
  1500. package/dist/voice/decide.d.ts +0 -35
  1501. package/dist/voice/decide.js +0 -329
  1502. package/dist/voice/decide.js.map +0 -1
  1503. package/dist/voice/decision-log.d.ts +0 -48
  1504. package/dist/voice/decision-log.js +0 -117
  1505. package/dist/voice/decision-log.js.map +0 -1
  1506. package/dist/voice/engine.d.ts +0 -119
  1507. package/dist/voice/engine.js +0 -61
  1508. package/dist/voice/engine.js.map +0 -1
  1509. package/dist/voice/fake-engine.d.ts +0 -10
  1510. package/dist/voice/fake-engine.js +0 -192
  1511. package/dist/voice/fake-engine.js.map +0 -1
  1512. package/dist/voice/jev-engine.d.ts +0 -17
  1513. package/dist/voice/jev-engine.js +0 -110
  1514. package/dist/voice/jev-engine.js.map +0 -1
  1515. package/dist/voice/pending-ask.d.ts +0 -17
  1516. package/dist/voice/pending-ask.js +0 -51
  1517. package/dist/voice/pending-ask.js.map +0 -1
  1518. package/dist/voice/routes.d.ts +0 -115
  1519. package/dist/voice/routes.js +0 -92
  1520. package/dist/voice/routes.js.map +0 -1
  1521. package/dist/voice/sentence.d.ts +0 -21
  1522. package/dist/voice/sentence.js +0 -61
  1523. package/dist/voice/sentence.js.map +0 -1
  1524. package/dist/voice/thresholds.d.ts +0 -28
  1525. package/dist/voice/thresholds.js +0 -29
  1526. package/dist/voice/thresholds.js.map +0 -1
  1527. package/dist/webhooks/cli.d.ts +0 -18
  1528. package/dist/webhooks/cli.js +0 -127
  1529. package/dist/webhooks/cli.js.map +0 -1
  1530. package/dist/webhooks/prompt.d.ts +0 -5
  1531. package/dist/webhooks/prompt.js +0 -26
  1532. package/dist/webhooks/prompt.js.map +0 -1
  1533. package/dist/workflows/active-run.d.ts +0 -46
  1534. package/dist/workflows/active-run.js +0 -46
  1535. package/dist/workflows/active-run.js.map +0 -1
  1536. package/dist/workflows/attachment-path.d.ts +0 -6
  1537. package/dist/workflows/attachment-path.js +0 -40
  1538. package/dist/workflows/attachment-path.js.map +0 -1
  1539. package/dist/workflows/completion-policy.d.ts +0 -98
  1540. package/dist/workflows/completion-policy.js +0 -76
  1541. package/dist/workflows/completion-policy.js.map +0 -1
  1542. package/dist/workflows/continuation-admission.d.ts +0 -1229
  1543. package/dist/workflows/continuation-admission.js +0 -277
  1544. package/dist/workflows/continuation-admission.js.map +0 -1
  1545. package/dist/workflows/execution-account.d.ts +0 -13
  1546. package/dist/workflows/execution-account.js +0 -18
  1547. package/dist/workflows/execution-account.js.map +0 -1
  1548. package/dist/workflows/grouped-command.d.ts +0 -31
  1549. package/dist/workflows/grouped-command.js +0 -147
  1550. package/dist/workflows/grouped-command.js.map +0 -1
  1551. package/dist/workflows/input-acknowledgement.d.ts +0 -233
  1552. package/dist/workflows/input-acknowledgement.js +0 -41
  1553. package/dist/workflows/input-acknowledgement.js.map +0 -1
  1554. package/dist/workflows/line-order.d.ts +0 -5
  1555. package/dist/workflows/line-order.js +0 -25
  1556. package/dist/workflows/line-order.js.map +0 -1
  1557. package/dist/workflows/load.d.ts +0 -19
  1558. package/dist/workflows/load.js +0 -74
  1559. package/dist/workflows/load.js.map +0 -1
  1560. package/dist/workflows/outcome-batches.d.ts +0 -32
  1561. package/dist/workflows/outcome-batches.js +0 -55
  1562. package/dist/workflows/outcome-batches.js.map +0 -1
  1563. package/dist/workflows/pasted-content.d.ts +0 -60
  1564. package/dist/workflows/pasted-content.js +0 -69
  1565. package/dist/workflows/pasted-content.js.map +0 -1
  1566. package/dist/workflows/question-routing.d.ts +0 -16
  1567. package/dist/workflows/question-routing.js +0 -28
  1568. package/dist/workflows/question-routing.js.map +0 -1
  1569. package/dist/workflows/run/attachment-writer.d.ts +0 -34
  1570. package/dist/workflows/run/attachment-writer.js +0 -98
  1571. package/dist/workflows/run/attachment-writer.js.map +0 -1
  1572. package/dist/workflows/run/auto-resume.d.ts +0 -91
  1573. package/dist/workflows/run/auto-resume.js +0 -247
  1574. package/dist/workflows/run/auto-resume.js.map +0 -1
  1575. package/dist/workflows/run/cezar-tools.d.ts +0 -45
  1576. package/dist/workflows/run/cezar-tools.js +0 -117
  1577. package/dist/workflows/run/cezar-tools.js.map +0 -1
  1578. package/dist/workflows/run/completion-gate.d.ts +0 -77
  1579. package/dist/workflows/run/completion-gate.js +0 -93
  1580. package/dist/workflows/run/completion-gate.js.map +0 -1
  1581. package/dist/workflows/run/compose.d.ts +0 -181
  1582. package/dist/workflows/run/compose.js +0 -413
  1583. package/dist/workflows/run/compose.js.map +0 -1
  1584. package/dist/workflows/run/constants.d.ts +0 -48
  1585. package/dist/workflows/run/constants.js +0 -49
  1586. package/dist/workflows/run/constants.js.map +0 -1
  1587. package/dist/workflows/run/continuation-acceptance.d.ts +0 -70
  1588. package/dist/workflows/run/continuation-acceptance.js +0 -188
  1589. package/dist/workflows/run/continuation-acceptance.js.map +0 -1
  1590. package/dist/workflows/run/continuation-session.d.ts +0 -130
  1591. package/dist/workflows/run/continuation-session.js +0 -597
  1592. package/dist/workflows/run/continuation-session.js.map +0 -1
  1593. package/dist/workflows/run/drop-active.d.ts +0 -4
  1594. package/dist/workflows/run/drop-active.js +0 -11
  1595. package/dist/workflows/run/drop-active.js.map +0 -1
  1596. package/dist/workflows/run/family-reconciler.d.ts +0 -78
  1597. package/dist/workflows/run/family-reconciler.js +0 -308
  1598. package/dist/workflows/run/family-reconciler.js.map +0 -1
  1599. package/dist/workflows/run/human-waits.d.ts +0 -85
  1600. package/dist/workflows/run/human-waits.js +0 -162
  1601. package/dist/workflows/run/human-waits.js.map +0 -1
  1602. package/dist/workflows/run/inbox-claims.d.ts +0 -38
  1603. package/dist/workflows/run/inbox-claims.js +0 -107
  1604. package/dist/workflows/run/inbox-claims.js.map +0 -1
  1605. package/dist/workflows/run/input-batch.d.ts +0 -15
  1606. package/dist/workflows/run/input-batch.js +0 -32
  1607. package/dist/workflows/run/input-batch.js.map +0 -1
  1608. package/dist/workflows/run/input-delivery.d.ts +0 -202
  1609. package/dist/workflows/run/input-delivery.js +0 -817
  1610. package/dist/workflows/run/input-delivery.js.map +0 -1
  1611. package/dist/workflows/run/input-receipts.d.ts +0 -65
  1612. package/dist/workflows/run/input-receipts.js +0 -220
  1613. package/dist/workflows/run/input-receipts.js.map +0 -1
  1614. package/dist/workflows/run/input-timers.d.ts +0 -10
  1615. package/dist/workflows/run/input-timers.js +0 -32
  1616. package/dist/workflows/run/input-timers.js.map +0 -1
  1617. package/dist/workflows/run/launch-context.d.ts +0 -62
  1618. package/dist/workflows/run/launch-context.js +0 -119
  1619. package/dist/workflows/run/launch-context.js.map +0 -1
  1620. package/dist/workflows/run/launch-read-resolver.d.ts +0 -510
  1621. package/dist/workflows/run/launch-read-resolver.js +0 -658
  1622. package/dist/workflows/run/launch-read-resolver.js.map +0 -1
  1623. package/dist/workflows/run/launch-settings.d.ts +0 -10
  1624. package/dist/workflows/run/launch-settings.js +0 -11
  1625. package/dist/workflows/run/launch-settings.js.map +0 -1
  1626. package/dist/workflows/run/live-session-state.d.ts +0 -49
  1627. package/dist/workflows/run/live-session-state.js +0 -83
  1628. package/dist/workflows/run/live-session-state.js.map +0 -1
  1629. package/dist/workflows/run/maintenance-claims.d.ts +0 -47
  1630. package/dist/workflows/run/maintenance-claims.js +0 -83
  1631. package/dist/workflows/run/maintenance-claims.js.map +0 -1
  1632. package/dist/workflows/run/memory-guard.d.ts +0 -25
  1633. package/dist/workflows/run/memory-guard.js +0 -64
  1634. package/dist/workflows/run/memory-guard.js.map +0 -1
  1635. package/dist/workflows/run/opening.d.ts +0 -30
  1636. package/dist/workflows/run/opening.js +0 -6
  1637. package/dist/workflows/run/opening.js.map +0 -1
  1638. package/dist/workflows/run/pending-ask-facts.d.ts +0 -10
  1639. package/dist/workflows/run/pending-ask-facts.js +0 -19
  1640. package/dist/workflows/run/pending-ask-facts.js.map +0 -1
  1641. package/dist/workflows/run/prompts.d.ts +0 -74
  1642. package/dist/workflows/run/prompts.js +0 -140
  1643. package/dist/workflows/run/prompts.js.map +0 -1
  1644. package/dist/workflows/run/queued-input.d.ts +0 -108
  1645. package/dist/workflows/run/queued-input.js +0 -249
  1646. package/dist/workflows/run/queued-input.js.map +0 -1
  1647. package/dist/workflows/run/queued-revival.d.ts +0 -44
  1648. package/dist/workflows/run/queued-revival.js +0 -124
  1649. package/dist/workflows/run/queued-revival.js.map +0 -1
  1650. package/dist/workflows/run/readonly-collections.d.ts +0 -24
  1651. package/dist/workflows/run/readonly-collections.js +0 -33
  1652. package/dist/workflows/run/readonly-collections.js.map +0 -1
  1653. package/dist/workflows/run/repo-root-lease.d.ts +0 -34
  1654. package/dist/workflows/run/repo-root-lease.js +0 -71
  1655. package/dist/workflows/run/repo-root-lease.js.map +0 -1
  1656. package/dist/workflows/run/resolved-wait-input-batch.d.ts +0 -7
  1657. package/dist/workflows/run/resolved-wait-input-batch.js +0 -23
  1658. package/dist/workflows/run/resolved-wait-input-batch.js.map +0 -1
  1659. package/dist/workflows/run/run-cancel.d.ts +0 -36
  1660. package/dist/workflows/run/run-cancel.js +0 -130
  1661. package/dist/workflows/run/run-cancel.js.map +0 -1
  1662. package/dist/workflows/run/run-finish.d.ts +0 -72
  1663. package/dist/workflows/run/run-finish.js +0 -255
  1664. package/dist/workflows/run/run-finish.js.map +0 -1
  1665. package/dist/workflows/run/run-guards.d.ts +0 -15
  1666. package/dist/workflows/run/run-guards.js +0 -39
  1667. package/dist/workflows/run/run-guards.js.map +0 -1
  1668. package/dist/workflows/run/run-line.d.ts +0 -187
  1669. package/dist/workflows/run/run-line.js +0 -437
  1670. package/dist/workflows/run/run-line.js.map +0 -1
  1671. package/dist/workflows/run/run-recovery.d.ts +0 -116
  1672. package/dist/workflows/run/run-recovery.js +0 -421
  1673. package/dist/workflows/run/run-recovery.js.map +0 -1
  1674. package/dist/workflows/run/run-settlement.d.ts +0 -177
  1675. package/dist/workflows/run/run-settlement.js +0 -504
  1676. package/dist/workflows/run/run-settlement.js.map +0 -1
  1677. package/dist/workflows/run/run-skills.d.ts +0 -114
  1678. package/dist/workflows/run/run-skills.js +0 -233
  1679. package/dist/workflows/run/run-skills.js.map +0 -1
  1680. package/dist/workflows/run/run-start.d.ts +0 -64
  1681. package/dist/workflows/run/run-start.js +0 -126
  1682. package/dist/workflows/run/run-start.js.map +0 -1
  1683. package/dist/workflows/run/run-workspace.d.ts +0 -25
  1684. package/dist/workflows/run/run-workspace.js +0 -66
  1685. package/dist/workflows/run/run-workspace.js.map +0 -1
  1686. package/dist/workflows/run/session-events.d.ts +0 -155
  1687. package/dist/workflows/run/session-events.js +0 -282
  1688. package/dist/workflows/run/session-events.js.map +0 -1
  1689. package/dist/workflows/run/step-decisions.d.ts +0 -37
  1690. package/dist/workflows/run/step-decisions.js +0 -43
  1691. package/dist/workflows/run/step-decisions.js.map +0 -1
  1692. package/dist/workflows/run/step-loop.d.ts +0 -143
  1693. package/dist/workflows/run/step-loop.js +0 -488
  1694. package/dist/workflows/run/step-loop.js.map +0 -1
  1695. package/dist/workflows/run/step-session.d.ts +0 -65
  1696. package/dist/workflows/run/step-session.js +0 -280
  1697. package/dist/workflows/run/step-session.js.map +0 -1
  1698. package/dist/workflows/run/steps.d.ts +0 -13
  1699. package/dist/workflows/run/steps.js +0 -14
  1700. package/dist/workflows/run/steps.js.map +0 -1
  1701. package/dist/workflows/run/subagent-waits.d.ts +0 -138
  1702. package/dist/workflows/run/subagent-waits.js +0 -304
  1703. package/dist/workflows/run/subagent-waits.js.map +0 -1
  1704. package/dist/workflows/run/tracked-work.d.ts +0 -12
  1705. package/dist/workflows/run/tracked-work.js +0 -29
  1706. package/dist/workflows/run/tracked-work.js.map +0 -1
  1707. package/dist/workflows/run/turn-bookkeeping.d.ts +0 -67
  1708. package/dist/workflows/run/turn-bookkeeping.js +0 -173
  1709. package/dist/workflows/run/turn-bookkeeping.js.map +0 -1
  1710. package/dist/workflows/run/turn-boundary.d.ts +0 -215
  1711. package/dist/workflows/run/turn-boundary.js +0 -329
  1712. package/dist/workflows/run/turn-boundary.js.map +0 -1
  1713. package/dist/workflows/run/turn-markers.d.ts +0 -62
  1714. package/dist/workflows/run/turn-markers.js +0 -86
  1715. package/dist/workflows/run/turn-markers.js.map +0 -1
  1716. package/dist/workflows/run/turn-nudges.d.ts +0 -104
  1717. package/dist/workflows/run/turn-nudges.js +0 -243
  1718. package/dist/workflows/run/turn-nudges.js.map +0 -1
  1719. package/dist/workflows/run/turn-settler.d.ts +0 -161
  1720. package/dist/workflows/run/turn-settler.js +0 -468
  1721. package/dist/workflows/run/turn-settler.js.map +0 -1
  1722. package/dist/workflows/run/types.d.ts +0 -293
  1723. package/dist/workflows/run/types.js +0 -2
  1724. package/dist/workflows/run/types.js.map +0 -1
  1725. package/dist/workflows/run/usage-accounting.d.ts +0 -49
  1726. package/dist/workflows/run/usage-accounting.js +0 -213
  1727. package/dist/workflows/run/usage-accounting.js.map +0 -1
  1728. package/dist/workflows/run/wait-engine.d.ts +0 -1210
  1729. package/dist/workflows/run/wait-engine.js +0 -455
  1730. package/dist/workflows/run/wait-engine.js.map +0 -1
  1731. package/dist/workflows/run/wait-kinds.d.ts +0 -336
  1732. package/dist/workflows/run/wait-kinds.js +0 -470
  1733. package/dist/workflows/run/wait-kinds.js.map +0 -1
  1734. package/dist/workflows/run/wait-registration-tool.d.ts +0 -3
  1735. package/dist/workflows/run/wait-registration-tool.js +0 -68
  1736. package/dist/workflows/run/wait-registration-tool.js.map +0 -1
  1737. package/dist/workflows/run/wait-registration.d.ts +0 -7
  1738. package/dist/workflows/run/wait-registration.js +0 -39
  1739. package/dist/workflows/run/wait-registration.js.map +0 -1
  1740. package/dist/workflows/run/wait-registry.d.ts +0 -120
  1741. package/dist/workflows/run/wait-registry.js +0 -365
  1742. package/dist/workflows/run/wait-registry.js.map +0 -1
  1743. package/dist/workflows/run/wait-watches.d.ts +0 -13
  1744. package/dist/workflows/run/wait-watches.js +0 -12
  1745. package/dist/workflows/run/wait-watches.js.map +0 -1
  1746. package/dist/workflows/run/wake-admission.d.ts +0 -150
  1747. package/dist/workflows/run/wake-admission.js +0 -397
  1748. package/dist/workflows/run/wake-admission.js.map +0 -1
  1749. package/dist/workflows/run/wake-ledger.d.ts +0 -61
  1750. package/dist/workflows/run/wake-ledger.js +0 -78
  1751. package/dist/workflows/run/wake-ledger.js.map +0 -1
  1752. package/dist/workflows/run/wake-retries.d.ts +0 -31
  1753. package/dist/workflows/run/wake-retries.js +0 -93
  1754. package/dist/workflows/run/wake-retries.js.map +0 -1
  1755. package/dist/workflows/run/worker-executions.d.ts +0 -54
  1756. package/dist/workflows/run/worker-executions.js +0 -148
  1757. package/dist/workflows/run/worker-executions.js.map +0 -1
  1758. package/dist/workflows/run/worker-orphans.d.ts +0 -91
  1759. package/dist/workflows/run/worker-orphans.js +0 -275
  1760. package/dist/workflows/run/worker-orphans.js.map +0 -1
  1761. package/dist/workflows/run/worker-questions.d.ts +0 -169
  1762. package/dist/workflows/run/worker-questions.js +0 -462
  1763. package/dist/workflows/run/worker-questions.js.map +0 -1
  1764. package/dist/workflows/run/workflow-position.d.ts +0 -7
  1765. package/dist/workflows/run/workflow-position.js +0 -9
  1766. package/dist/workflows/run/workflow-position.js.map +0 -1
  1767. package/dist/workflows/run/worktree-autosave.d.ts +0 -48
  1768. package/dist/workflows/run/worktree-autosave.js +0 -175
  1769. package/dist/workflows/run/worktree-autosave.js.map +0 -1
  1770. package/dist/workflows/run-scheduling.d.ts +0 -38
  1771. package/dist/workflows/run-scheduling.js +0 -76
  1772. package/dist/workflows/run-scheduling.js.map +0 -1
  1773. package/dist/workflows/run-states.d.ts +0 -73
  1774. package/dist/workflows/run-states.js +0 -233
  1775. package/dist/workflows/run-states.js.map +0 -1
  1776. package/dist/workflows/run.d.ts +0 -275
  1777. package/dist/workflows/run.js +0 -626
  1778. package/dist/workflows/run.js.map +0 -1
  1779. package/dist/workflows/turn-end.d.ts +0 -119
  1780. package/dist/workflows/turn-end.js +0 -74
  1781. package/dist/workflows/turn-end.js.map +0 -1
  1782. package/dist/workflows/types.d.ts +0 -83
  1783. package/dist/workflows/types.js +0 -192
  1784. package/dist/workflows/types.js.map +0 -1
  1785. package/dist/workflows/wait-scope.d.ts +0 -75
  1786. package/dist/workflows/wait-scope.js +0 -115
  1787. package/dist/workflows/wait-scope.js.map +0 -1
  1788. package/dist/workflows/waits.d.ts +0 -58
  1789. package/dist/workflows/waits.js +0 -89
  1790. package/dist/workflows/waits.js.map +0 -1
  1791. package/dist/workspace/agent-accounts.d.ts +0 -135
  1792. package/dist/workspace/agent-accounts.js +0 -352
  1793. package/dist/workspace/agent-accounts.js.map +0 -1
  1794. package/dist/workspace/agent-profiles.d.ts +0 -125
  1795. package/dist/workspace/agent-profiles.js +0 -190
  1796. package/dist/workspace/agent-profiles.js.map +0 -1
  1797. package/dist/workspace/backup-cli.d.ts +0 -9
  1798. package/dist/workspace/backup-cli.js +0 -146
  1799. package/dist/workspace/backup-cli.js.map +0 -1
  1800. package/dist/workspace/backups.d.ts +0 -36
  1801. package/dist/workspace/backups.js +0 -248
  1802. package/dist/workspace/backups.js.map +0 -1
  1803. package/dist/workspace/config.d.ts +0 -179
  1804. package/dist/workspace/config.js +0 -395
  1805. package/dist/workspace/config.js.map +0 -1
  1806. package/dist/workspace/migrations.d.ts +0 -37
  1807. package/dist/workspace/migrations.js +0 -148
  1808. package/dist/workspace/migrations.js.map +0 -1
  1809. package/dist/workspace/projects-cli.d.ts +0 -27
  1810. package/dist/workspace/projects-cli.js +0 -175
  1811. package/dist/workspace/projects-cli.js.map +0 -1
  1812. package/dist/workspace/projects.d.ts +0 -131
  1813. package/dist/workspace/projects.js +0 -274
  1814. package/dist/workspace/projects.js.map +0 -1
  1815. package/dist/workspace/root-probe-cache.d.ts +0 -10
  1816. package/dist/workspace/root-probe-cache.js +0 -43
  1817. package/dist/workspace/root-probe-cache.js.map +0 -1
  1818. package/dist/workspace/semaphore.d.ts +0 -147
  1819. package/dist/workspace/semaphore.js +0 -196
  1820. package/dist/workspace/semaphore.js.map +0 -1
  1821. package/dist/workspace/ui-state.d.ts +0 -17
  1822. package/dist/workspace/ui-state.js +0 -59
  1823. package/dist/workspace/ui-state.js.map +0 -1
  1824. package/dist/workspace/webhooks.d.ts +0 -40
  1825. package/dist/workspace/webhooks.js +0 -146
  1826. package/dist/workspace/webhooks.js.map +0 -1
  1827. package/dist/worktree-manifest.d.ts +0 -165
  1828. package/dist/worktree-manifest.js +0 -535
  1829. package/dist/worktree-manifest.js.map +0 -1
  1830. package/dist/worktree-setup.d.ts +0 -88
  1831. package/dist/worktree-setup.js +0 -170
  1832. package/dist/worktree-setup.js.map +0 -1
  1833. package/scripts/benchmark-family-reconcile.ts +0 -119
  1834. package/scripts/benchmark-home.ts +0 -32
  1835. package/scripts/benchmark-project-probes.mjs +0 -158
  1836. package/scripts/benchmark-run-store-fixture.ts +0 -432
  1837. package/scripts/benchmark-run-store.ts +0 -767
  1838. package/scripts/benchmark-stuck-destroys.ts +0 -144
  1839. package/scripts/benchmark-workspace-events.ts +0 -339
  1840. package/scripts/check-pack.mjs +0 -48
  1841. package/scripts/inline-contract.mjs +0 -165
  1842. package/scripts/install-as-command.mjs +0 -125
  1843. package/scripts/measure-transcript-facts-health.mjs +0 -100
  1844. package/scripts/measure-transcript-facts-lag.mjs +0 -69
  1845. package/scripts/mock-autonomous.mjs +0 -13
  1846. package/scripts/mock-ci-tool.mjs +0 -159
  1847. package/scripts/mock-claude-model-refusal.mjs +0 -76
  1848. package/scripts/mock-claude-subagents.mjs +0 -54
  1849. package/scripts/mock-claude.mjs +0 -800
  1850. package/scripts/mock-codex-app-server.mjs +0 -767
  1851. package/scripts/mock-codex-coalesce-steer.mjs +0 -59
  1852. package/scripts/mock-codex-reverse-steer.mjs +0 -143
  1853. package/scripts/mock-codex-subagents.mjs +0 -52
  1854. package/scripts/mock-controls.d.mts +0 -11
  1855. package/scripts/mock-controls.mjs +0 -13
  1856. package/scripts/mock-cursor-hang-stdin-late.mjs +0 -35
  1857. package/scripts/mock-cursor-hang-stdin.mjs +0 -30
  1858. package/scripts/mock-cursor-print.mjs +0 -237
  1859. package/scripts/mock-deferred-turn-start.mjs +0 -16
  1860. package/scripts/mock-delivery-control.d.mts +0 -23
  1861. package/scripts/mock-delivery-control.mjs +0 -80
  1862. package/scripts/mock-env-record.mjs +0 -11
  1863. package/scripts/mock-failure-control.d.mts +0 -13
  1864. package/scripts/mock-failure-control.mjs +0 -68
  1865. package/scripts/mock-lifecycle.mjs +0 -51
  1866. package/scripts/mock-multi-pr.mjs +0 -10
  1867. package/scripts/mock-nudge.mjs +0 -43
  1868. package/scripts/mock-omp-rpc.mjs +0 -536
  1869. package/scripts/mock-opencode-serve.mjs +0 -1000
  1870. package/scripts/mock-pi-rpc.mjs +0 -421
  1871. package/scripts/mock-publish.mjs +0 -13
  1872. package/scripts/mock-runner-crash.mjs +0 -64
  1873. package/scripts/mock-scenario.d.mts +0 -71
  1874. package/scripts/mock-scenario.mjs +0 -295
  1875. package/scripts/mock-session-context.d.mts +0 -5
  1876. package/scripts/mock-session-context.mjs +0 -56
  1877. package/scripts/mock-silent-tail.mjs +0 -93
  1878. package/scripts/mock-turn-messages.mjs +0 -5
  1879. package/scripts/mock-wire-evidence.config.mjs +0 -12
  1880. package/scripts/mock-wire-recorder.mjs +0 -66
  1881. package/scripts/mock-wire-tools.mjs +0 -7
  1882. package/scripts/omp-ci-wait.mjs +0 -29
  1883. package/scripts/opencode-task-scope.d.mts +0 -18
  1884. package/scripts/opencode-task-scope.mjs +0 -59
  1885. package/scripts/parity-rows.ts +0 -160
  1886. package/scripts/pi-ci-wait.mjs +0 -17
  1887. package/scripts/pi-default-tools.mjs +0 -22
  1888. package/scripts/pi-project-skills.mjs +0 -59
  1889. package/scripts/pi-retry-degraded-service.mjs +0 -16
  1890. package/scripts/probe-cursor-print.mjs +0 -699
  1891. package/scripts/probe-session-env.ts +0 -8
  1892. package/scripts/product-env.mjs +0 -6
  1893. package/scripts/product-identity.mjs +0 -12
  1894. package/scripts/record-mock-wires.mjs +0 -16
  1895. package/scripts/seed-archive-profile.ts +0 -53
  1896. package/scripts/sync-readme.mjs +0 -20
  1897. package/scripts/test-process-usage.mjs +0 -47
  1898. package/scripts/transcript-facts-fixture.mjs +0 -53
  1899. package/scripts/transcript-facts-timing.mjs +0 -42
  1900. package/scripts/voice-replay.ts +0 -50
  1901. package/scripts/windows-workspace-identity.cs +0 -208
  1902. package/scripts/windows-workspace-identity.ps1 +0 -10
  1903. package/web/dist/assets/useQuery-DSoTrqQG.js +0 -1
@@ -1,1690 +0,0 @@
1
- import { productEnv } from './product-env.js';
2
- import { uiAskQuestions } from './ask.js';
3
- import { opencodeSkillWarning } from './opencode-session-error.js';
4
- import { summarizeRunnerStderr } from './runner-stderr.js';
5
- import { finished } from 'node:stream/promises';
6
- import { setTimeout as delay } from 'node:timers/promises';
7
- import { fileURLToPath } from 'node:url';
8
- import { randomUUID } from 'node:crypto';
9
- import { parseEffort } from '../contract/index.js';
10
- import { request as httpRequest } from 'node:http';
11
- import { isSignalTerminationExit, prependSystemPrompt, trackChildExit, } from './agent-runner.js';
12
- import { RUNNER_FACTS } from './runner-facts.js';
13
- import { InputSubmissions } from './input-submissions.js';
14
- import { opencodeToolGrantFields } from './runner-tool-grants.js';
15
- import { signalSession, spawnSessionLeader } from './session-process.js';
16
- import { buildChildEnv } from './agent-env.js';
17
- import { opencodeTaskScopeEnv } from './opencode-task-scope.js';
18
- import { ciOpenCodeEnv } from '../ci-wait/injection.js';
19
- import { parseAskRequest } from './ask.js';
20
- import { boundOutputDrainAfterExit, AUTO_END_DELAY_MS, DEFAULT_RUN_TIMEOUT_MS } from './runner-runtime.js';
21
- import { formatModelIdentity, parseModelIdentity } from './model-identity.js';
22
- import { V1TextCoalescer } from './v1-text-coalescer.js';
23
- import { isOpencodeDefaultAsk, opencodePermissionAskSchema, opencodePermissionBridge, opencodeUserPermissionRules, } from './opencode-permissions.js';
24
- import { createOpencodeUiState, mapOpencodeEvent, opencodeSessionStarted, opencodeTurnStarted, } from './opencode-ui-mapper.js';
25
- const SERVER_START_TIMEOUT_MS = 30_000;
26
- /**
27
- * Pause before the one retry of a server that exited before listening (#872).
28
- * opencode 1.18.33, started within ~2 s of SIGTERM to the previous server on
29
- * the same DB, printed `ServeError` and exited; the next start succeeded. The
30
- * failing start can die well inside that window, so the pause alone spans it;
31
- * it is only ever paid by a start that already failed.
32
- */
33
- export const SERVE_START_RETRY_DELAY_MS = 2_000;
34
- /** The URL wait saw the process exit before it printed a URL. */
35
- class ServeExitedBeforeListening extends Error {
36
- constructor() {
37
- super('opencode serve exited before it started listening');
38
- }
39
- }
40
- /** Grace between the teardown SIGTERM and the SIGKILL that follows it. */
41
- export const KILL_GRACE_MS = 4_000;
42
- /**
43
- * `AgentRunner` over `opencode serve` — a headless HTTP server (the same one
44
- * the opencode TUI talks to) with an SSE event stream. One server per session,
45
- * bound to the run's `cwd` (worktree), gives OpenCode the same multi-turn shape
46
- * as the Claude runner: each `sendMessage` posts another prompt to the same
47
- * session (history is kept server-side), and `session/abort` cancels.
48
- * Continue and restart recovery GET /session/{id} and prompt that session; a 404
49
- * falls back to one fresh session with the full system prompt.
50
- *
51
- * Auth = the host's opencode config/logins. OpenCode's own permission config
52
- * governs tools: cezar answers OpenCode's built-in default asks once and routes
53
- * asks the user configured to the cockpit (hearsay-tools/cezarion#1266); this
54
- * adapter does not map `spec.toolGrant`. Governed delegation adds only a
55
- * supported session-level task deny rule.
56
- * `spec.model` is `provider/model`.
57
- */
58
- /**
59
- * What `opencode serve` receives from each `AgentRunSpec` field (#284).
60
- * OpenCode's own permission config governs tool access and this adapter maps no
61
- * per-tool allowlist, so `toolGrant` is declared dropped rather than mapped (spec
62
- * 2026-07-17-permission-modes). Resume GETs `/session/{id}` and prompts it; a 404 opens one
63
- * fresh session. Held against the recorded HTTP requests by the harness parity matrix.
64
- */
65
- export const OPENCODE_SPEC_SUPPORT = {
66
- cezarTools: { honored: true, via: 'merged OPENCODE_CONFIG_CONTENT local mcp entry' },
67
- systemPrompt: { honored: true, via: 'prepended to the opening prompt_async text through prependSystemPrompt' },
68
- userPrompt: { honored: true, via: 'prompt_async text part' },
69
- images: { honored: false, reason: 'the adapter posts text parts only; image blocks are dropped' },
70
- cwd: { honored: true, via: 'opencode serve spawn cwd; the session is bound to it' },
71
- toolGrant: { honored: false, reason: 'OpenCode permission config governs tool access and bash; cezar answers its built-in default asks and routes configured asks to the cockpit, but maps no per-tool allowlist, so no command-prefix restriction either' },
72
- restrictCrossSessionMessaging: { honored: true, via: 'the opencode-task-scope.mjs plugin appended to the OPENCODE_CONFIG_CONTENT plugin list; its tool.execute.before hook refuses a task call whose task_id names a session outside the caller\'s session tree, and keeps subagents (hearsay-tools/cezarion#2279)' },
73
- additionalDirectories: { honored: false, reason: 'the server works from cwd; no extra-root mapping' },
74
- env: { honored: true, via: 'merged over the child env through buildChildEnv' },
75
- model: { honored: true, via: 'prompt_async model { providerID, modelID }, split from provider/model' },
76
- effort: { honored: true, via: 'prompt_async variant, canonical level' },
77
- timeoutMs: { honored: true, via: 'wall-clock kill switch on the child process' },
78
- sessionId: { honored: true, via: 'GET /session/{id} when resume is set; a fresh POST /session mints its own id' },
79
- resume: { honored: true, via: 'GET /session/{id} in place of POST /session; 404 falls back to a fresh session' },
80
- resumeFallbackSystemPrompt: { honored: true, via: 'opening prependSystemPrompt of a fresh POST /session when GET /session/{id} returns 404 on resume' },
81
- };
82
- /** How long an idle session may sit on steered input before it counts as a lost wake. */
83
- export const OPENCODE_LOST_WAKE_GRACE_MS = 2_000;
84
- export class OpencodeServerRunner {
85
- backend = 'opencode';
86
- specSupport = OPENCODE_SPEC_SUPPORT;
87
- systemPromptOnResume = RUNNER_FACTS.opencode.systemPromptOnResume;
88
- facts = RUNNER_FACTS.opencode;
89
- inputDelivery = RUNNER_FACTS.opencode.inputDelivery;
90
- bin;
91
- timeoutMs;
92
- serverStartTimeoutMs;
93
- lastSession = null;
94
- constructor(opts = {}) {
95
- this.bin = opts.bin ?? productEnv('OPENCODE_BIN') ?? (productEnv('DRY_RUN') === '1'
96
- ? fileURLToPath(new URL('../../scripts/mock-opencode-serve.mjs', import.meta.url)) : 'opencode');
97
- this.timeoutMs = opts.timeoutMs ?? DEFAULT_RUN_TIMEOUT_MS;
98
- this.serverStartTimeoutMs = opts.serverStartTimeoutMs ?? SERVER_START_TIMEOUT_MS;
99
- }
100
- run(spec, onEvent) {
101
- return this.startSession(spec, onEvent, { autoEndAfterFirstTurn: true }).result;
102
- }
103
- async interrupt() {
104
- this.lastSession?.interrupt();
105
- }
106
- startSession(spec, onEvent, opts = {}) {
107
- const session = new OpencodeSession(this.bin, this.timeoutMs, this.serverStartTimeoutMs, spec, onEvent, opts);
108
- this.lastSession = session;
109
- return session;
110
- }
111
- }
112
- /** One live `opencode serve` process driving a single session. */
113
- class OpencodeSession {
114
- bin;
115
- serverStartTimeoutMs;
116
- spec;
117
- onEvent;
118
- opts;
119
- result;
120
- /** The live server process. A start retry replaces it (#872), so every
121
- * liveness, pid, signal and stderr read goes through this field. */
122
- serve;
123
- /** The first start, once the retry spawned for it ALSO exited before
124
- * listening on its own (#872) — the one case that names both attempts. */
125
- failedStart;
126
- /** The retry's own spawn threw synchronously (EAGAIN, EMFILE…), so no second
127
- * process exists and the first start's exit alone would misname the failure. */
128
- retrySpawnError;
129
- /** Aborted by teardown; cancels a pending start retry. */
130
- startRetry = new AbortController();
131
- serverOpen = true;
132
- exitFailure;
133
- baseUrl;
134
- sessionId;
135
- ready;
136
- sse = new AbortController();
137
- toolCalls = [];
138
- textChunks = [];
139
- /** Per text-part cursor so only newly-appended text is buffered (deltas). */
140
- textSeen = new Map();
141
- /** Streamed part deltas buffered per part — v1 `text` is emitted once per
142
- * finished part (claude parity: one event per complete block), never per
143
- * delta, so the persisted transcript and the headless CLI get whole
144
- * paragraphs. Streaming display rides protocol v2's `item.delta`. */
145
- textCoalescer = new V1TextCoalescer((text) => {
146
- this.textChunks.push(text);
147
- this.emit({ type: 'text', text });
148
- });
149
- toolsSeen = new Set();
150
- /** messageID → role. Parts carry no role; only assistant parts are surfaced
151
- * (the user's own message also streams as parts over the same SSE feed). */
152
- msgRole = new Map();
153
- /** Accepted agent prompts, the user message carrying each, and prompts that
154
- * opened their turn (read when that turn goes idle) (#505). */
155
- submissions = new InputSubmissions();
156
- userMessageSubmission = new Map();
157
- turnOpeners = new Set();
158
- refusedBeforeOpening = false;
159
- turnErrored = false;
160
- lostWakeTimer;
161
- /** Steered input an idle left unanswered: the server may still start a follow-on run for it.
162
- * Settles when that run starts, or when the lost-wake grace or a teardown ends the wait. */
163
- followOn;
164
- followOnResolve = () => { };
165
- refusedForFollowOn = false;
166
- tokensUsed = 0;
167
- /** OpenCode reports a cumulative cost for each message, not the session. */
168
- costByMessage = new Map();
169
- /** A prompt was posted and its `session.idle` has not arrived yet. */
170
- turnActive = false;
171
- agentInputReady = false;
172
- agentRequest;
173
- /** Human prompts scheduled behind the active turn, through their HTTP ack. */
174
- pendingPromptRequests = 0;
175
- /** A provider error must not abort its own independently arriving receipt. */
176
- agentAcknowledgement;
177
- providerErrorPending;
178
- /** `finishTurn` ran for the current turn — repeats and stray idles no-op. */
179
- turnEnded = false;
180
- /** Monotonic identity used to reject async work completed by an older turn. */
181
- turnSerial = 0;
182
- /** Settles when the open turn finishes; re-armed at each turn start. The
183
- * gate `prompt` waits on so turns never overlap (see there). */
184
- turnFinished = Promise.resolve();
185
- turnFinishedResolve = () => { };
186
- /** Protocol v2 emission — additive alongside v1 (`onEvent` keeps flowing
187
- * byte-identical); the channel is `opts.onUiEvent` (RunManager wiring
188
- * lands in R2 step 2.1). Both streams take their turn-end from the wire
189
- * `session.idle` (v1 since #4 — see `finishTurn`). */
190
- uiState = createOpencodeUiState();
191
- /** Question tool parts are snapshots. Once capture starts for an identity,
192
- * every later state snapshot for that same part/call is already handled. */
193
- handledQuestionParts = new Set();
194
- pendingQuestion;
195
- questionCapture;
196
- questionReply;
197
- /** User text submitted while a question reply POST is unsettled. It is not
198
- * another answer; deliver it as ordinary prompts only after reply success. */
199
- queuedQuestionMessages = [];
200
- /** Bumped by `discardQueuedMessages` so a `prompt()` waiter that captured
201
- * the previous generation returns instead of posting after idle. */
202
- queuedPromptGeneration = 0;
203
- /** Human prompts of the current generation, held from `sendMessage` until they post (#486). */
204
- humanPromptWaiters = 0;
205
- /** Native ask id → its live state, entered on receipt (hearsay-tools/cezarion#1266). Any
206
- * entry holds agent input and auto-end, like a pending question, until OpenCode settles it. */
207
- pendingPermissions = new Map();
208
- /** Native ask ids already taken. Outlives retirement, so a duplicated frame is handled once. */
209
- handledPermissionIds = new Set();
210
- /** Asks are classified one at a time, in arrival order, after the one config read. */
211
- permissionQueue = Promise.resolve();
212
- permissionRules;
213
- answeredDefaultAsk = false;
214
- autoEndTimer;
215
- timedOut = false;
216
- openingPromptFailed = false;
217
- constructor(bin, timeoutMs, serverStartTimeoutMs, spec, onEvent, opts) {
218
- this.bin = bin;
219
- this.serverStartTimeoutMs = serverStartTimeoutMs;
220
- this.spec = spec;
221
- this.onEvent = onEvent;
222
- this.opts = opts;
223
- this.serve = this.spawnServe();
224
- // The server prints its URL on stdout once listening.
225
- const urlReady = this.startServer();
226
- const limitMs = spec.timeoutMs ?? timeoutMs;
227
- let deadline;
228
- if (limitMs > 0) {
229
- deadline = setTimeout(() => {
230
- this.timedOut = true;
231
- this.interrupt();
232
- }, limitMs);
233
- deadline.unref?.();
234
- }
235
- this.ready = (async () => {
236
- this.baseUrl = await urlReady;
237
- await this.bootstrap();
238
- })();
239
- this.result = this.finishSession(deadline, limitMs);
240
- }
241
- /** Wait out the child, then map its exit onto the v1 result. */
242
- async finishSession(deadline, limitMs) {
243
- try {
244
- await this.ready;
245
- // Live for the whole session; the SSE loop runs until end()/interrupt.
246
- await this.serve.exited;
247
- }
248
- catch (err) {
249
- if (!this.timedOut && !this.openingPromptFailed) {
250
- this.exitFailure = `opencode: ${err instanceof Error ? err.message : String(err)}`;
251
- }
252
- }
253
- finally {
254
- if (deadline)
255
- clearTimeout(deadline);
256
- if (this.autoEndTimer)
257
- clearTimeout(this.autoEndTimer);
258
- this.sse.abort();
259
- this.serverOpen = false;
260
- this.clearLostWakeTimer();
261
- this.agentRequest?.abort();
262
- this.expirePermissions('session ended');
263
- this.terminate();
264
- }
265
- const serve = this.serve;
266
- await serve.exited;
267
- await serve.outputDrained;
268
- if (serve.spawnFailed) {
269
- this.emit({ type: 'error', message: serve.spawnFailed.message });
270
- throw serve.spawnFailed;
271
- }
272
- this.reportServeFailure(serve);
273
- return this.resultFromCleanExit(limitMs);
274
- }
275
- reportServeFailure(serve) {
276
- // SSE closure can precede the process exit event. Choose one authoritative
277
- // error after settlement, before the synthetic turn-end, retaining the code.
278
- const code = serve.child.exitCode;
279
- const signal = serve.child.signalCode;
280
- const crashed = (signal !== null && !serve.signalled)
281
- || (code !== null && code !== 0 && !(serve.signalled && isSignalTerminationExit(code)));
282
- if (this.timedOut || (!crashed && !this.exitFailure))
283
- return;
284
- const stderr = serve.stderrChunks.join('');
285
- const detail = summarizeRunnerStderr(stderr);
286
- if (this.retrySpawnError) {
287
- if (stderr.trim())
288
- this.emit({ type: 'note', message: `opencode serve stderr:\n${stderr}` });
289
- this.emit({ type: 'error', message: `opencode serve exited before listening (${describeEarlyExit(serve)}) and its retry could not start: ${this.retrySpawnError.message}` });
290
- }
291
- else if (this.failedStart) {
292
- // #872: the retry failed too — one error naming both attempts.
293
- const attempts = [this.failedStart, serve];
294
- const notes = attempts.map((attempt, i) => {
295
- const text = attempt.stderrChunks.join('');
296
- return text.trim() ? `opencode serve stderr (attempt ${i + 1}):\n${text}` : '';
297
- }).filter(Boolean);
298
- if (notes.length)
299
- this.emit({ type: 'note', message: notes.join('\n') });
300
- const described = attempts.map((attempt, i) => `attempt ${i + 1}: ${describeEarlyExit(attempt)}`);
301
- this.emit({ type: 'error', message: `opencode serve exited before listening on both attempts — ${described.join('; ')}` });
302
- }
303
- else {
304
- if (stderr.trim())
305
- this.emit({ type: 'note', message: `opencode serve stderr:\n${stderr}` });
306
- this.emit({ type: 'error', message: crashed ? `opencode serve exited with ${describeExit(serve)}${detail ? ` — ${detail}` : ''}` : this.exitFailure });
307
- }
308
- }
309
- resultFromCleanExit(limitMs) {
310
- // Timeout/interrupt can cut the SSE feed before its `session.idle` —
311
- // close the turn (idempotent) so consumers still see the v1 boundary,
312
- // and recover prose buffered mid-part.
313
- this.finishTurn();
314
- this.textCoalescer.flush();
315
- // Chunks are whole blocks now (one per finished part), so newline-join
316
- // like the other runners, not the old delta concatenation.
317
- const base = {
318
- text: this.textChunks.join('\n').trim(), toolCalls: this.toolCalls,
319
- tokensUsed: this.tokensUsed, sessionId: this.sessionId ?? this.spec.sessionId,
320
- };
321
- if (this.timedOut) {
322
- const mins = Math.round((limitMs / 60_000) * 10) / 10;
323
- this.emit({ type: 'error', message: `opencode timed out after ${mins}m and was killed` });
324
- }
325
- this.emit({ type: 'done' });
326
- return base;
327
- }
328
- get open() {
329
- return this.serverOpen;
330
- }
331
- get pid() {
332
- return this.serve.child.pid;
333
- }
334
- sendAgentMessage(content, inputIds = []) {
335
- // #505: a busy session is steered with prompt_async; only a pending native question or
336
- // permission ask, a queued human prompt or an in-flight agent POST refuses.
337
- // Nothing may run ahead of the task: refuse until the opening prompt has started,
338
- // then hint once so the refused input steers the opening turn.
339
- if (this.serverOpen && this.turnSerial === 0) {
340
- this.refusedBeforeOpening = true;
341
- return false;
342
- }
343
- if (!this.serverOpen || !this.sessionId || this.pendingQuestion || this.questionReply || this.pendingPermissions.size > 0 ||
344
- this.pendingPromptRequests > 0 || this.agentRequest)
345
- return false;
346
- // A prompt posted before a due follow-on run would have that run's idle close its turn, and
347
- // its own run would then surface nothing (PR #1291 CI): it waits for that run, as for a turn.
348
- if (this.followOn) {
349
- this.refusedForFollowOn = true;
350
- return false;
351
- }
352
- this.agentInputReady = false;
353
- const request = new AbortController();
354
- this.agentRequest = request;
355
- const text = textOf(content);
356
- const submissionId = randomUUID();
357
- const steering = this.turnActive;
358
- this.submissions.accept(submissionId, inputIds, text);
359
- if (!steering && inputIds.length)
360
- this.turnOpeners.add(submissionId);
361
- const post = steering ? this.steerPrompt(text, request.signal) : this.prompt(text, 'agent', request.signal);
362
- const acknowledgement = post.catch((err) => {
363
- this.submissions.consume(submissionId);
364
- this.turnOpeners.delete(submissionId);
365
- throw err;
366
- }).finally(() => {
367
- if (this.agentRequest === request)
368
- this.agentRequest = undefined;
369
- if (this.serverOpen && !this.providerErrorPending && !this.turnActive && !this.pendingQuestion && !this.questionReply &&
370
- this.pendingPermissions.size === 0) {
371
- this.agentInputReady = true;
372
- this.opts.onAgentInputReady?.();
373
- this.scheduleAutoEnd();
374
- }
375
- });
376
- this.agentAcknowledgement = acknowledgement;
377
- return acknowledgement;
378
- }
379
- sendMessage(content) {
380
- this.agentInputReady = false;
381
- if (!this.serverOpen)
382
- return false;
383
- this.cancelAutoEnd();
384
- const text = textOf(content);
385
- if (!text)
386
- return true;
387
- if (this.questionReply) {
388
- this.queuedQuestionMessages.push(text);
389
- return true;
390
- }
391
- if (this.pendingQuestion) {
392
- const pending = this.pendingQuestion;
393
- const reply = this.replyQuestion(pending, text);
394
- this.questionReply = reply;
395
- const clearReply = () => {
396
- if (this.questionReply === reply)
397
- this.questionReply = undefined;
398
- this.notifyAgentInputReady();
399
- };
400
- void reply.then(clearReply, clearReply);
401
- return true;
402
- }
403
- // `prompt` already emitted the note and closed the turn before rethrowing,
404
- // and a rejected `ready` already failed the session on the result path —
405
- // there is nothing left to report here.
406
- this.deliverPrompt(text);
407
- return true;
408
- }
409
- discardQueuedMessages() {
410
- this.queuedPromptGeneration += 1;
411
- this.queuedQuestionMessages.length = 0;
412
- this.humanPromptWaiters = 0; // #486: must read false immediately, not when waiters resume
413
- }
414
- holdsHumanInput() {
415
- return this.humanPromptWaiters > 0 || this.queuedQuestionMessages.length > 0;
416
- }
417
- heldHumanInputCount() {
418
- return this.humanPromptWaiters + this.queuedQuestionMessages.length;
419
- }
420
- deliverPrompt(text) {
421
- this.pendingPromptRequests += 1;
422
- // Held from admission, not from `ready`; a start that fails releases it (hearsay-tools/cezarion#2991).
423
- const generation = this.queuedPromptGeneration;
424
- this.humanPromptWaiters += 1;
425
- let posting = false;
426
- void this.ready.then(() => { posting = true; return this.prompt(text, 'human', undefined, generation); }).then(() => {
427
- this.pendingPromptRequests -= 1;
428
- this.notifyAgentInputReady();
429
- }, () => {
430
- if (!posting && generation === this.queuedPromptGeneration)
431
- this.humanPromptWaiters = Math.max(0, this.humanPromptWaiters - 1);
432
- this.pendingPromptRequests -= 1;
433
- });
434
- }
435
- notifyAgentInputReady() {
436
- if (this.serverOpen && this.turnEnded && !this.turnActive && !this.pendingQuestion &&
437
- !this.questionReply && this.pendingPermissions.size === 0 && this.pendingPromptRequests === 0) {
438
- this.agentInputReady = true;
439
- this.opts.onAgentInputReady?.();
440
- }
441
- else if (this.serverOpen && this.turnActive && !this.pendingQuestion && !this.questionReply &&
442
- this.pendingPermissions.size === 0 && this.pendingPromptRequests === 0 && !this.agentRequest) {
443
- // A reply or prompt acknowledgement cleared the last barrier mid-turn: held agent
444
- // input can steer the running turn now, not after it (#505 local review).
445
- this.opts.onAgentInputReady?.();
446
- }
447
- }
448
- cancelAutoEnd() {
449
- if (!this.autoEndTimer)
450
- return;
451
- clearTimeout(this.autoEndTimer);
452
- this.autoEndTimer = undefined;
453
- }
454
- scheduleAutoEnd() {
455
- if (!this.opts.autoEndAfterFirstTurn || !this.serverOpen || this.autoEndTimer || this.agentRequest || this.pendingPermissions.size)
456
- return;
457
- this.autoEndTimer = setTimeout(() => {
458
- this.autoEndTimer = undefined;
459
- if (this.opts.shouldAutoEnd?.() !== false)
460
- this.end();
461
- }, AUTO_END_DELAY_MS);
462
- this.autoEndTimer.unref?.();
463
- }
464
- end() {
465
- if (!this.serverOpen)
466
- return;
467
- this.serverOpen = false;
468
- this.clearLostWakeTimer();
469
- this.agentRequest?.abort();
470
- this.expirePermissions('session ended');
471
- this.sse.abort();
472
- this.terminate();
473
- }
474
- interrupt() {
475
- this.serverOpen = false;
476
- this.clearLostWakeTimer();
477
- this.agentRequest?.abort();
478
- this.expirePermissions('session ended');
479
- if (this.baseUrl && this.sessionId) {
480
- void this.http('POST', `/session/${this.sessionId}/abort`, undefined).catch(() => undefined);
481
- }
482
- this.sse.abort();
483
- this.terminate();
484
- }
485
- /**
486
- * The one place either signal is sent: SIGTERM now, SIGKILL once the grace
487
- * window elapses.
488
- *
489
- * Both steps gate on `hasExited()`, never on `child.killed` — the latter
490
- * flips the moment SIGTERM is *delivered*, so the old nested
491
- * `exitCode == null && !killed` guard disarmed the escalation for exactly the
492
- * server it was written for: one that installs its own SIGTERM handler stayed
493
- * alive with `killed = true` and `exitCode === null`, outliving the whole
494
- * window (#858, the same defect #844 fixed for the other two backends). Every
495
- * caller here is followed by `await serve.exited`, so a server that survived
496
- * SIGTERM did not just leak — it hung the session's result forever.
497
- *
498
- * One teardown per session: all three call sites can run for the same session
499
- * (`interrupt()` on the deadline, then the result promise's `finally`), and
500
- * once SIGTERM is out with SIGKILL armed there is nothing a second pass adds.
501
- * The old `!child.killed` test deduplicated this as a side effect of being
502
- * wrong; `signalled` keeps that property on purpose. It lives on the process,
503
- * not the session: only the live one is ever signalled, and a start retry
504
- * (#872) replaces it only after the first exited unsignalled.
505
- *
506
- * Teardown also cancels a pending start retry, so no second server spawns
507
- * after `end()`, `interrupt()` or the deadline.
508
- */
509
- terminate() {
510
- this.startRetry.abort();
511
- const serve = this.serve;
512
- if (serve.signalled || serve.hasExited())
513
- return;
514
- serve.signalled = true;
515
- signalSession(serve.child, 'SIGTERM');
516
- setTimeout(() => {
517
- if (serve.hasExited())
518
- return;
519
- signalSession(serve.child, 'SIGKILL');
520
- }, KILL_GRACE_MS).unref?.();
521
- }
522
- // ---- server lifecycle ---------------------------------------------------
523
- /** Spawn one `opencode serve` on a random high port and wire its lifecycle.
524
- * A synchronous spawn throw is wrapped; an async spawn error is latched on
525
- * the process record. */
526
- spawnServe() {
527
- // Random high port; the actual bound URL is read back from stdout.
528
- const port = 40000 + Math.floor(Math.random() * 20000);
529
- let child;
530
- try {
531
- child = spawnSessionLeader(this.bin, ['serve', '--hostname', '127.0.0.1', '--port', String(port)], {
532
- cwd: this.spec.cwd,
533
- env: buildChildEnv({ backend: 'opencode', extraEnv: opencodeTaskScopeEnv(ciOpenCodeEnv(this.spec), this.spec.restrictCrossSessionMessaging) }),
534
- });
535
- }
536
- catch (err) {
537
- throw wrapSpawnError(err, this.bin);
538
- }
539
- const hasExited = trackChildExit(child);
540
- boundOutputDrainAfterExit(child);
541
- // `exit` settles process liveness, not its pipes. The shared post-exit drain
542
- // bound prevents an inherited descendant pipe from retaining this session.
543
- const outputDrained = Promise.all([child.stdout, child.stderr].map(stream => finished(stream, { cleanup: true }).catch(() => undefined)));
544
- const exited = new Promise((resolve) => {
545
- child.once('exit', () => resolve());
546
- child.once('close', () => resolve());
547
- });
548
- const serve = {
549
- child, hasExited, exited, outputDrained, port,
550
- stderrChunks: [], spawnFailed: null, signalled: false,
551
- };
552
- child.on('error', (err) => {
553
- serve.spawnFailed = wrapSpawnError(err, this.bin);
554
- });
555
- child.stderr.setEncoding('utf8');
556
- child.stderr.on('data', (chunk) => serve.stderrChunks.push(chunk));
557
- return serve;
558
- }
559
- /**
560
- * Wait for the server URL, retrying once — after `SERVE_START_RETRY_DELAY_MS`,
561
- * on a fresh port — when the process exited before it printed one (#872).
562
- * Never retried: a spawn error (the process never ran), the no-URL timeout
563
- * (it falls back to the requested port), and a session already torn down.
564
- */
565
- async startServer() {
566
- try {
567
- return await this.waitForServerUrl(this.serve);
568
- }
569
- catch (err) {
570
- const first = this.serve;
571
- if (!(err instanceof ServeExitedBeforeListening))
572
- throw err;
573
- // Settle the process first: an ENOENT `error` and late stderr both land
574
- // around `exit`, and the retry decision and its note need them.
575
- await first.exited;
576
- await first.outputDrained;
577
- if (first.spawnFailed || first.child.pid === undefined || !this.serverOpen || this.timedOut)
578
- throw err;
579
- const detail = summarizeRunnerStderr(first.stderrChunks.join(''));
580
- this.emit({
581
- type: 'note',
582
- message: `opencode serve exited before listening (${describeExit(first)}); retrying once${detail ? ` — ${detail}` : ''}`,
583
- });
584
- try {
585
- await delay(SERVE_START_RETRY_DELAY_MS, undefined, { signal: this.startRetry.signal });
586
- }
587
- catch {
588
- // Torn down during the pause: report the first start's failure as before.
589
- throw err;
590
- }
591
- if (this.startRetry.signal.aborted || !this.serverOpen || this.timedOut)
592
- throw err;
593
- let next;
594
- try {
595
- next = this.spawnServe();
596
- }
597
- catch (spawnErr) {
598
- this.retrySpawnError = spawnErr instanceof Error ? spawnErr : new Error(String(spawnErr));
599
- throw spawnErr;
600
- }
601
- this.serve = next;
602
- if (next.child.pid !== undefined)
603
- this.opts.onPidChange?.(next.child.pid);
604
- try {
605
- return await this.waitForServerUrl(next);
606
- }
607
- catch (retryErr) {
608
- // Only an unprompted second early exit names both attempts; a retry
609
- // torn down by the session reports through the ordinary paths.
610
- if (retryErr instanceof ServeExitedBeforeListening && !next.signalled)
611
- this.failedStart = first;
612
- throw retryErr;
613
- }
614
- }
615
- }
616
- waitForServerUrl(serve) {
617
- const { child } = serve;
618
- return new Promise((resolve, reject) => {
619
- let buffer = '';
620
- const timer = setTimeout(() => {
621
- cleanup();
622
- // Nothing parsed — try the port we asked for.
623
- resolve(`http://127.0.0.1:${serve.port}`);
624
- }, this.serverStartTimeoutMs);
625
- timer.unref?.();
626
- const onData = (chunk) => {
627
- buffer += chunk;
628
- const m = /https?:\/\/[\d.]+:\d+/.exec(buffer);
629
- if (m) {
630
- cleanup();
631
- resolve(m[0]);
632
- }
633
- };
634
- const onExit = () => { cleanup(); reject(new ServeExitedBeforeListening()); };
635
- // A failed spawn emits `error` and `close`, never `exit` (hearsay-tools/cezarion#895).
636
- const onError = () => { if (child.pid === undefined)
637
- onExit(); };
638
- const cleanup = () => {
639
- clearTimeout(timer);
640
- child.stdout.off('data', onData);
641
- child.off('exit', onExit);
642
- child.off('error', onError);
643
- };
644
- child.stdout.setEncoding('utf8');
645
- child.stdout.on('data', onData);
646
- child.once('exit', onExit);
647
- child.on('error', onError);
648
- if (serve.spawnFailed)
649
- onError();
650
- });
651
- }
652
- /** 404 → `'missing'`. Any other non-OK status fails bootstrap (no fallback). */
653
- async tryGetSession(id) {
654
- if (!this.baseUrl)
655
- throw new Error('opencode server not ready');
656
- const res = await fetch(`${this.baseUrl}/session/${encodeURIComponent(id)}`, { method: 'GET' });
657
- if (res.status === 404)
658
- return 'missing';
659
- if (!res.ok) {
660
- const detail = await res.text().catch(() => '');
661
- throw new Error(`GET /session/${id} → ${res.status} ${detail.slice(0, 200)}`);
662
- }
663
- const text = await res.text();
664
- if (!text)
665
- return { id };
666
- try {
667
- const parsed = JSON.parse(text);
668
- return isRecord(parsed) ? parsed : { id };
669
- }
670
- catch {
671
- return { id };
672
- }
673
- }
674
- attachSession(id) {
675
- this.sessionId = id;
676
- this.emit({ type: 'session', sessionId: id });
677
- this.emitUi((state) => opencodeSessionStarted(id, state));
678
- }
679
- async bootstrap() {
680
- const requested = this.spec.resume ? this.spec.sessionId : undefined;
681
- let resumed = false;
682
- if (requested) {
683
- const existing = await this.tryGetSession(requested);
684
- if (existing === 'missing') {
685
- this.emit({
686
- type: 'note',
687
- message: `OpenCode session ${requested} no longer exists; the continuation runs in a fresh session without the earlier conversation.`,
688
- });
689
- }
690
- else {
691
- // A `task` deny an older cezar added stays on the session: OpenCode appends permission
692
- // rules and has no remove (hearsay-tools/cezarion#2279).
693
- this.attachSession(stringField(existing, 'id') ?? requested);
694
- resumed = true;
695
- }
696
- }
697
- if (!resumed) {
698
- const created = await this.http('POST', '/session', {
699
- title: 'cezar task',
700
- ...opencodeToolGrantFields(this.spec.toolGrant),
701
- });
702
- const sessionId = stringField(created, 'id');
703
- if (!sessionId)
704
- throw new Error('opencode did not return a session id');
705
- this.attachSession(sessionId);
706
- }
707
- // The SSE subscription must be LIVE before the first prompt posts —
708
- // events the server emits while the POST is in flight would otherwise be
709
- // lost (a race this await closes; the bundled mock made it visible).
710
- await this.consumeEvents();
711
- // Lost-session fallback uses the full skill-inclusive prompt Continue
712
- // stashed in resumeFallbackSystemPrompt; a true resume re-prepends only
713
- // extra+handoff (the skill already lives in the thread).
714
- const systemPrompt = !resumed && requested
715
- ? (this.spec.resumeFallbackSystemPrompt ?? this.spec.systemPrompt)
716
- : this.spec.systemPrompt;
717
- const first = prependSystemPrompt(systemPrompt, this.spec.userPrompt);
718
- await this.prompt(first, 'opening');
719
- if (this.refusedBeforeOpening)
720
- queueMicrotask(() => {
721
- this.refusedBeforeOpening = false;
722
- if (this.serverOpen && !this.pendingQuestion && !this.questionReply && this.pendingPermissions.size === 0 && !this.agentRequest) {
723
- this.opts.onAgentInputReady?.();
724
- }
725
- });
726
- }
727
- async prompt(text, origin = 'human', signal, generation = this.queuedPromptGeneration) {
728
- // One turn at a time. `prompt_async` acknowledges before the turn runs,
729
- // so `ready` no longer serializes prompts the way the long-poll did — a
730
- // follow-up posted mid-turn would share the turnActive/turnEnded pair
731
- // with the running turn and let that turn's idle close this one. Waiters
732
- // resume in FIFO order; a teardown (`finishTurn` runs on every exit
733
- // path) releases them into the `serverOpen` check below.
734
- while (this.turnActive || this.followOn)
735
- await (this.turnActive ? this.turnFinished : this.followOn);
736
- if (origin === 'human' && generation === this.queuedPromptGeneration)
737
- this.humanPromptWaiters = Math.max(0, this.humanPromptWaiters - 1);
738
- if (generation !== this.queuedPromptGeneration)
739
- return;
740
- // A queued prompt may have started waiting before the preceding idle armed
741
- // auto-end. Cancel at actual delivery time, not only at sendMessage time.
742
- this.cancelAutoEnd();
743
- if (!this.sessionId || !this.serverOpen)
744
- return;
745
- this.openTurn();
746
- // Turn boundary, v1 and v2 alike — the prompt POST is the turn start
747
- // (§7.1); the end comes from the SSE `session.idle`, never from the HTTP
748
- // response below. `POST /session/:id/message` long-polled the whole turn,
749
- // and undici's default 300s headers timeout ended it as `prompt failed:
750
- // fetch failed` (#4, upstream #897); `prompt_async` returns immediately.
751
- this.emitUi(opencodeTurnStarted);
752
- const body = this.promptBody(text);
753
- try {
754
- await this.http('POST', `/session/${this.sessionId}/prompt_async`, body, signal);
755
- }
756
- catch (err) {
757
- this.reportPromptFailure(origin, err);
758
- throw err;
759
- }
760
- }
761
- reportPromptFailure(origin, err) {
762
- // No turn started server-side, so no `session.idle` will ever close it —
763
- // surface the failure and end the turn here instead of parking the run.
764
- const message = err instanceof Error ? err.message : String(err);
765
- if (origin === 'agent' && this.providerErrorPending) {
766
- // Latch the initiating provider failure before rejection reaches the
767
- // manager's ACK handler (including grace expiry and explicit abort).
768
- this.providerErrorPending.reported = true;
769
- if (this.serverOpen)
770
- this.emit({ type: 'error', message: this.providerErrorPending.message });
771
- }
772
- else if (origin === 'agent') {
773
- // Fatal BEFORE the synthetic boundary: the rejected submission stays
774
- // queued and must not drain more input or settle DONE.
775
- if (this.serverOpen) {
776
- this.emit({ type: 'error', message: `opencode: agent input failed: ${message}` });
777
- this.interrupt();
778
- }
779
- }
780
- else if (origin === 'opening') {
781
- this.emit({ type: 'note', message: `opencode: prompt failed: ${message}` });
782
- // A dropped ACK can be the first sign of a process crash. Retain HTTP
783
- // rejection details, but let settlement choose one error before turn-end.
784
- this.openingPromptFailed = true;
785
- this.exitFailure = `opencode: ${message}`;
786
- this.interrupt();
787
- }
788
- else {
789
- this.emit({ type: 'note', message: `opencode: prompt failed: ${message}` });
790
- }
791
- if (!this.providerErrorPending && origin !== 'opening')
792
- this.finishTurn();
793
- // Bootstrap still rejects; its result path reports the latched opening
794
- // failure. Human follow-ups keep their nonfatal note and turn boundary.
795
- }
796
- promptBody(text) {
797
- const body = { parts: [{ type: 'text', text }] };
798
- // `spec.model` arrives already normalised to canonical `provider/model`
799
- // (the run wiring's fail-loud gate). Split it with the shared parser — the
800
- // one every runner uses — into opencode's `{ providerID, modelID }`.
801
- const id = parseModelIdentity(this.spec.model);
802
- if (id)
803
- body.model = { providerID: id.provider, modelID: id.model };
804
- const effort = parseEffort(this.spec.effort);
805
- if (effort)
806
- body.variant = effort;
807
- return body;
808
- }
809
- /** Busy agent input: the running prompt loop rereads it between steps (1.18.32 probe).
810
- * No new turn opens; the running turn's idle ends it (#505). */
811
- async steerPrompt(text, signal) {
812
- try {
813
- await this.http('POST', `/session/${this.sessionId}/prompt_async`, this.promptBody(text), signal);
814
- }
815
- catch (err) {
816
- if (this.serverOpen) {
817
- this.emit({ type: 'error', message: `opencode: agent input failed: ${err instanceof Error ? err.message : String(err)}` });
818
- this.interrupt();
819
- }
820
- throw err;
821
- }
822
- }
823
- /** The single v1 turn-end: from the session's own `session.idle`, the
824
- * prompt-POST failure path, or the teardown safety net — whichever comes
825
- * first; the guards make every later call a no-op. */
826
- /** Turn bookkeeping for a prompt POST, or for a server run that started on its own
827
- * to answer steered input (#505). */
828
- openTurn() {
829
- this.clearLostWakeTimer();
830
- this.turnActive = true;
831
- this.agentInputReady = false;
832
- this.turnEnded = false;
833
- this.turnSerial += 1;
834
- this.turnFinished = new Promise((resolve) => {
835
- this.turnFinishedResolve = resolve;
836
- });
837
- }
838
- clearLostWakeTimer() {
839
- if (this.lostWakeTimer)
840
- clearTimeout(this.lostWakeTimer);
841
- this.lostWakeTimer = undefined;
842
- this.settleFollowOn();
843
- }
844
- /** The follow-on wait is over. Input it refused is offered again unless a turn took over. */
845
- settleFollowOn() {
846
- if (!this.followOn)
847
- return;
848
- this.followOn = undefined;
849
- this.followOnResolve();
850
- if (!this.refusedForFollowOn)
851
- return;
852
- this.refusedForFollowOn = false;
853
- if (this.turnActive)
854
- return;
855
- queueMicrotask(() => this.notifyAgentInputReady());
856
- }
857
- finishTurn() {
858
- if (!this.turnActive || this.turnEnded)
859
- return;
860
- this.turnEnded = true;
861
- this.turnActive = false;
862
- this.questionCapture = undefined;
863
- // SSE idle can beat the independent reply HTTP response. The active reply
864
- // owns pending-question cleanup; without one, the pending ask is stale.
865
- if (!this.questionReply)
866
- this.pendingQuestion = undefined;
867
- // OpenCode settles its own pending permission requests when the run stops.
868
- this.expirePermissions('turn ended');
869
- this.turnFinishedResolve();
870
- // A part that never saw `time.end` (abort, server quirk) still surfaces
871
- // its prose before the turn boundary (run.ts reads markers there).
872
- this.textCoalescer.flush();
873
- this.agentInputReady = true;
874
- // A prompt that opened this turn was processed by it; steered input the turn never
875
- // answered (no assistant message named it as parentID) is a lost wake (#505).
876
- // A turn that failed may never have reached the model: its opener stays pending, so a
877
- // closing session returns it to the queue (#505 review).
878
- const opened = this.turnErrored ? [] : [...this.turnOpeners].flatMap(id => this.submissions.consume(id));
879
- this.turnOpeners.clear();
880
- this.turnErrored = false;
881
- if (opened.length)
882
- this.opts.onAgentInputConsumed?.(opened);
883
- this.emit({ type: 'turn-end' });
884
- // Steered input the server holds is read by a follow-on run, or stranded by the
885
- // upstream lost wake (anomalyco/opencode#46842). Only a quiet grace window tells
886
- // them apart; then report it so cezar submits it as a new prompt.
887
- if (this.submissions.pending > 0) {
888
- this.clearLostWakeTimer();
889
- this.followOn = new Promise((resolve) => { this.followOnResolve = resolve; });
890
- this.lostWakeTimer = setTimeout(() => {
891
- this.lostWakeTimer = undefined;
892
- if (!this.serverOpen || this.turnActive) {
893
- this.settleFollowOn();
894
- return;
895
- }
896
- const inputIds = this.submissions.takeUnconsumed();
897
- this.userMessageSubmission.clear();
898
- if (inputIds.length)
899
- this.emit({ type: 'input-unconsumed', inputIds });
900
- this.settleFollowOn();
901
- }, OPENCODE_LOST_WAKE_GRACE_MS);
902
- this.lostWakeTimer.unref?.();
903
- }
904
- if (!this.questionReply)
905
- this.scheduleAutoEnd();
906
- }
907
- // ---- SSE stream ---------------------------------------------------------
908
- /** Resolves once the SSE stream is CONNECTED (headers in) — the frames are
909
- * then drained in the background. Callers await the connection so no
910
- * event emitted after this resolves can be missed.
911
- *
912
- * Speaks node:http, not fetch: undici's default Agent cuts a response
913
- * body idle for 300s, which would sever a quiet turn's bus mid-run (#4) —
914
- * node's own client has no idle timeout. (`process.getBuiltinModule`
915
- * cannot fix that: undici is bundled into node but not exposed as a
916
- * built-in, so there is no no-timeout dispatcher to hand fetch without
917
- * taking undici as a real dependency.)
918
- *
919
- * A connection that cannot be established throws, failing `bootstrap`:
920
- * with `prompt_async` this stream is the only source of turn-ends, so a
921
- * session that cannot hear it is dead on arrival, not degraded. */
922
- async consumeEvents() {
923
- if (!this.baseUrl)
924
- return;
925
- let res;
926
- try {
927
- res = await new Promise((resolve, reject) => {
928
- const req = httpRequest(`${this.baseUrl}/event`, { headers: { accept: 'text/event-stream' }, signal: this.sse.signal }, resolve);
929
- req.on('error', reject);
930
- req.end();
931
- });
932
- }
933
- catch (err) {
934
- if (this.sse.signal.aborted)
935
- return; // torn down during bootstrap — not a failure
936
- const message = err instanceof Error ? err.message : String(err);
937
- throw new Error(`event stream failed to connect: ${message}`);
938
- }
939
- // node:http hands over EVERY response, error statuses included — a proxy's
940
- // 401 or a non-SSE 500 body is not an event bus, however well it parses.
941
- const status = res.statusCode ?? 0;
942
- if (status < 200 || status >= 300) {
943
- res.resume(); // discard the body so the socket is released
944
- throw new Error(`event stream failed to connect: HTTP ${status}`);
945
- }
946
- void this.readEvents(res);
947
- }
948
- async readEvents(res) {
949
- // StringDecoder under the hood — multi-byte characters split across
950
- // chunks arrive whole, like the TextDecoder streaming mode did.
951
- res.setEncoding('utf8');
952
- let buffer = '';
953
- try {
954
- for await (const chunk of res) {
955
- this.opts.onActivity?.(); // Includes SSE heartbeat comments.
956
- buffer += chunk;
957
- let sep;
958
- while ((sep = buffer.indexOf('\n\n')) >= 0) {
959
- const frame = buffer.slice(0, sep);
960
- buffer = buffer.slice(sep + 2);
961
- await this.handleFrame(frame);
962
- }
963
- }
964
- }
965
- catch {
966
- // aborted — normal on end()/interrupt
967
- }
968
- finally {
969
- // `session.idle` rides this stream and nothing else — a feed that dies
970
- // while the server is still up would otherwise park the current turn
971
- // forever and leave every later prompt unanswerable. An `error`, not a
972
- // note: the turn's remaining output is lost, so the step must record a
973
- // failure (run.ts classifies from v1 `error` only), never pass as an
974
- // empty success. Then close the turn (flushing what did arrive) and end
975
- // the session; "Continue" GETs this session id on the next server.
976
- if (this.serverOpen && !this.sse.signal.aborted) {
977
- this.exitFailure = 'opencode: event stream closed unexpectedly';
978
- this.end();
979
- }
980
- }
981
- }
982
- async handleFrame(frame) {
983
- const dataLines = frame
984
- .split('\n')
985
- .filter((l) => l.startsWith('data:'))
986
- .map((l) => l.slice(5).trim());
987
- if (dataLines.length === 0)
988
- return;
989
- let evt;
990
- try {
991
- evt = JSON.parse(dataLines.join('\n'));
992
- }
993
- catch {
994
- return;
995
- }
996
- this.emitUi((state) => mapOpencodeEvent(evt, state));
997
- const sid = stringField(evt.properties ?? {}, 'sessionID');
998
- if (evt.type === 'session.error' && !opencodeSkillWarning(evt.properties ?? {}) && (sid === undefined || sid === this.sessionId) && this.agentRequest) {
999
- // HTTP and SSE are independent sockets: the error can overtake a positive
1000
- // prompt ACK. Let that exact request settle before v1 makes RunManager
1001
- // interrupt it. Keep later SSE idle frames behind the same barrier.
1002
- // Reuse the teardown grace as a hard bound: a wedged ACK cannot keep a
1003
- // failed turn alive indefinitely. Explicit end/interrupt still abort now.
1004
- const failure = { message: this.sessionErrorMessage(evt.properties?.error), reported: false };
1005
- this.providerErrorPending = failure;
1006
- const request = this.agentRequest;
1007
- const timer = setTimeout(() => request.abort(), KILL_GRACE_MS);
1008
- try {
1009
- await this.agentAcknowledgement?.catch(() => undefined);
1010
- if (this.serverOpen && !failure.reported)
1011
- this.handleEvent(evt);
1012
- }
1013
- finally {
1014
- clearTimeout(timer);
1015
- this.providerErrorPending = undefined;
1016
- }
1017
- }
1018
- else {
1019
- this.handleEvent(evt);
1020
- }
1021
- }
1022
- /** #53 — a forwarded session error must never read like a missing
1023
- * executable: a bare upstream `Not Found` used to surface as
1024
- * `opencode: Not Found`, indistinguishable from the spawn failure whose
1025
- * PATH/installation guidance lives in `wrapSpawnError`. Name the selected
1026
- * provider/model — only the runner knows it — and keep any structured
1027
- * upstream status or code, so a provider outage is recognizable as one. */
1028
- sessionErrorMessage(error) {
1029
- const id = parseModelIdentity(this.spec.model);
1030
- const context = id ? `provider ${formatModelIdentity(id)}` : 'provider';
1031
- const detail = sessionErrorDetail(error);
1032
- const suffix = detail ? ` (${detail})` : '';
1033
- return `opencode: ${context} request failed: ${sessionErrorText(error)}${suffix}`;
1034
- }
1035
- handleEvent(evt) {
1036
- const type = evt.type ?? '';
1037
- const props = evt.properties ?? {};
1038
- if (type === 'message.updated' || type === 'message.created' || type === 'message.completed') {
1039
- this.handleMessageEvent(props);
1040
- }
1041
- else if (type === 'message.part.updated' || type === 'message.part.created') {
1042
- this.handlePart(props.part ?? props);
1043
- }
1044
- else if (type === 'permission.asked') {
1045
- this.handlePermissionAsked(props);
1046
- }
1047
- else if (type === 'permission.replied') {
1048
- this.handlePermissionReplied(props);
1049
- }
1050
- else if (type === 'session.idle') {
1051
- // THE turn-end signal. The SSE bus is server-wide, so a child session's
1052
- // (sub-agent's) idle must not close the main turn; an idle with no
1053
- // sessionID is treated as ours, like the v2 mapper does.
1054
- const sid = stringField(props, 'sessionID');
1055
- if (sid === undefined || sid === this.sessionId)
1056
- this.finishTurn();
1057
- }
1058
- else if (type === 'session.error') {
1059
- this.handleSessionError(props);
1060
- }
1061
- }
1062
- handleMessageEvent(props) {
1063
- const info = props.info ?? props;
1064
- const mid = stringField(info, 'id');
1065
- const role = stringField(info, 'role');
1066
- if (mid && role)
1067
- this.msgRole.set(mid, role);
1068
- // The model answers a steered user message: it has read it (#505).
1069
- const parent = role === 'assistant' ? stringField(info, 'parentID') : undefined;
1070
- const submission = parent ? this.userMessageSubmission.get(parent) : undefined;
1071
- if (parent && submission) {
1072
- this.userMessageSubmission.delete(parent);
1073
- // After an idle, the server started a new run for steered input: a new turn.
1074
- if (!this.turnActive && this.serverOpen) {
1075
- this.openTurn();
1076
- this.emitUi(opencodeTurnStarted);
1077
- }
1078
- const ids = this.submissions.consume(submission);
1079
- if (ids.length)
1080
- this.opts.onAgentInputConsumed?.(ids);
1081
- }
1082
- this.absorbUsage(info);
1083
- }
1084
- handlePermissionReplied(props) {
1085
- // OpenCode settled the request, in any phase: our own reply, another client's, or its own.
1086
- const nativeId = stringField(props, 'requestID');
1087
- const pending = nativeId === undefined ? undefined : this.pendingPermissions.get(nativeId);
1088
- // OpenCode publishes this before it answers the reply route, so a human reply in flight
1089
- // that it echoes is that human's answer.
1090
- if (!pending)
1091
- return;
1092
- const answered = pending.phase === 'answering' && pending.answer?.reply === stringField(props, 'reply');
1093
- this.settlePermission(pending, answered ? { optionId: pending.answer.optionId } : { reason: 'resolved by OpenCode' });
1094
- }
1095
- handleSessionError(props) {
1096
- const warning = opencodeSkillWarning(props);
1097
- if (warning) {
1098
- this.emit({ type: 'note', message: warning });
1099
- return;
1100
- }
1101
- // The wire's failure signal, now that the prompt POST returns
1102
- // before the turn runs: forward it to v1, whose `error` events are what
1103
- // run.ts records failed steps from — dropped, the terminal idle would
1104
- // file a provider/auth failure as a successful step. The idle that
1105
- // follows still closes the turn.
1106
- const sid = stringField(props, 'sessionID');
1107
- if (sid === undefined || sid === this.sessionId) {
1108
- this.turnErrored = true;
1109
- this.emit({ type: 'error', message: this.sessionErrorMessage(props.error) });
1110
- }
1111
- }
1112
- handlePart(part) {
1113
- if (!this.partBelongsToUs(part))
1114
- return;
1115
- const messageID = stringField(part, 'messageID');
1116
- const kind = stringField(part, 'type');
1117
- const id = stringField(part, 'id') ?? messageID ?? '';
1118
- if (kind === 'text') {
1119
- const full = stringField(part, 'text') ?? '';
1120
- const seen = this.textSeen.get(id) ?? 0;
1121
- if (full.length > seen) {
1122
- this.textSeen.set(id, full.length);
1123
- this.textCoalescer.append(id, full.slice(seen));
1124
- }
1125
- // `time.end` marks the part finished (same signal the v2 mapper uses) —
1126
- // emit the whole block once, preferring the snapshot's full text.
1127
- const time = part.time;
1128
- if (time && typeof time === 'object' && typeof time.end === 'number') {
1129
- this.textCoalescer.complete(id, full);
1130
- }
1131
- }
1132
- else if (kind === 'tool') {
1133
- this.handleToolPart(part, id, messageID);
1134
- }
1135
- }
1136
- partBelongsToUs(part) {
1137
- // The SSE bus carries every session on the server — drop parts that
1138
- // belong to another one (a sub-agent's stream is surfaced by v2 only).
1139
- const partSession = stringField(part, 'sessionID');
1140
- if (partSession !== undefined && this.sessionId !== undefined && partSession !== this.sessionId)
1141
- return false;
1142
- // Only surface parts of assistant messages — the user's own message streams
1143
- // over the same feed. Role is known early (the message.updated event
1144
- // precedes its parts); an unknown role means "not assistant yet" → skip.
1145
- const messageID = stringField(part, 'messageID');
1146
- if (messageID && this.msgRole.get(messageID) !== 'assistant') {
1147
- // A user message carrying submitted agent text: remember which submission it is.
1148
- if (this.msgRole.get(messageID) === 'user' && stringField(part, 'type') === 'text' && !this.userMessageSubmission.has(messageID)) {
1149
- const submission = this.submissions.findByText(stringField(part, 'text') ?? '');
1150
- if (submission && ![...this.userMessageSubmission.values()].includes(submission))
1151
- this.userMessageSubmission.set(messageID, submission);
1152
- }
1153
- return false;
1154
- }
1155
- return true;
1156
- }
1157
- handleToolPart(part, id, messageID) {
1158
- const state = part.state ?? {};
1159
- const status = stringField(state, 'status');
1160
- const name = stringField(part, 'tool') ?? stringField(part, 'name') ?? 'tool';
1161
- this.maybeCaptureQuestion(part, state, status, name, messageID);
1162
- const callId = id || `${name}-${this.toolsSeen.size}`;
1163
- if (!this.toolsSeen.has(callId)) {
1164
- this.toolsSeen.add(callId);
1165
- this.toolCalls.push({ id: callId, name, input: state.input ?? state });
1166
- this.emit({ type: 'tool-call', id: callId, tool: name, input: state.input ?? state });
1167
- }
1168
- if (status === 'completed' || status === 'error') {
1169
- this.emit({ type: 'tool-result', toolCallId: callId, result: safeStringify(state.output ?? state.result ?? state), isError: status === 'error' });
1170
- }
1171
- }
1172
- maybeCaptureQuestion(part, state, status, name, messageID) {
1173
- const questionPartId = stringField(part, 'id') ?? stringField(part, 'callID') ?? messageID;
1174
- const questionInput = state.input ?? state;
1175
- const questionReady = name === 'question' && (toCezarQuestions(questionInput) !== null || status !== 'pending');
1176
- if (!questionReady || !this.turnActive || this.pendingQuestion !== undefined || this.questionCapture !== undefined || this.questionReply !== undefined || (questionPartId !== undefined && this.handledQuestionParts.has(questionPartId)))
1177
- return;
1178
- if (questionPartId)
1179
- this.handledQuestionParts.add(questionPartId);
1180
- const capture = this.captureQuestion(questionInput);
1181
- this.questionCapture = capture;
1182
- const clearCapture = () => { if (this.questionCapture === capture)
1183
- this.questionCapture = undefined; };
1184
- void capture.then(clearCapture, clearCapture);
1185
- }
1186
- /** Pull cumulative tokens/cost out of an assistant message info object. */
1187
- absorbUsage(info) {
1188
- if (!info)
1189
- return;
1190
- const tokens = info.tokens;
1191
- if (tokens) {
1192
- const input = numField(tokens, 'input');
1193
- const output = numField(tokens, 'output');
1194
- const reasoning = numField(tokens, 'reasoning');
1195
- const total = input + output + reasoning;
1196
- if (total > this.tokensUsed) {
1197
- this.tokensUsed = total;
1198
- this.emit({ type: 'token-usage', tokensUsed: this.tokensUsed });
1199
- }
1200
- }
1201
- const messageId = stringField(info, 'id');
1202
- const cost = info.cost;
1203
- if (messageId && info.role === 'assistant' &&
1204
- (info.sessionID === undefined || info.sessionID === this.sessionId) &&
1205
- typeof cost === 'number' && Number.isFinite(cost) && cost >= 0) {
1206
- const previous = this.costByMessage.get(messageId);
1207
- if (previous === undefined || cost > previous) {
1208
- this.emit({ type: 'cost', usd: cost - (previous ?? 0) });
1209
- this.costByMessage.set(messageId, cost);
1210
- }
1211
- }
1212
- }
1213
- async captureQuestion(input) {
1214
- const questions = toCezarQuestions(input);
1215
- const turnSerial = this.turnSerial;
1216
- let requestId;
1217
- for (let attempt = 0; attempt < 8; attempt += 1) {
1218
- if (!this.turnActive || this.turnSerial !== turnSerial)
1219
- return;
1220
- requestId = await this.pendingQuestionId().catch(() => undefined);
1221
- if (requestId)
1222
- break;
1223
- if (attempt < 7)
1224
- await sleep(150);
1225
- }
1226
- if (!this.turnActive || this.turnSerial !== turnSerial)
1227
- return;
1228
- if (!questions) {
1229
- if (!requestId) {
1230
- this.emit({
1231
- type: 'error',
1232
- message: 'opencode: unsupported native question could not be rejected: no pending question id',
1233
- });
1234
- this.finishTurn();
1235
- this.end();
1236
- return;
1237
- }
1238
- try {
1239
- await this.http('POST', `/question/${encodeURIComponent(requestId)}/reject`, undefined);
1240
- this.emit({ type: 'note', message: 'opencode: unsupported native question rejected' });
1241
- }
1242
- catch (err) {
1243
- const message = err instanceof Error ? err.message : String(err);
1244
- this.emit({
1245
- type: 'error',
1246
- message: `opencode: unsupported native question rejection failed: ${message}`,
1247
- });
1248
- this.finishTurn();
1249
- this.end();
1250
- }
1251
- return;
1252
- }
1253
- const pending = {
1254
- requestId,
1255
- askRequestId: requestId ?? `opencode-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
1256
- questions,
1257
- };
1258
- this.pendingQuestion = pending;
1259
- this.emitQuestion(pending);
1260
- }
1261
- emitQuestion(pending) {
1262
- this.emitUi((state) => ({
1263
- state,
1264
- events: [
1265
- {
1266
- type: 'ask.requested',
1267
- requestId: pending.askRequestId,
1268
- questions: uiAskQuestions(pending.questions),
1269
- },
1270
- ],
1271
- }));
1272
- }
1273
- async pendingQuestionId() {
1274
- const value = await this.http('GET', '/question', undefined);
1275
- if (!Array.isArray(value))
1276
- return undefined;
1277
- for (const entry of value) {
1278
- if (!isRecord(entry) || stringField(entry, 'sessionID') !== this.sessionId)
1279
- continue;
1280
- const id = stringField(entry, 'id');
1281
- if (id)
1282
- return id;
1283
- }
1284
- return undefined;
1285
- }
1286
- async replyQuestion(pending, text) {
1287
- try {
1288
- const requestId = pending.requestId ?? (await this.pendingQuestionId());
1289
- if (!requestId)
1290
- throw new Error('no pending question id');
1291
- pending.requestId = requestId;
1292
- await this.http('POST', `/question/${encodeURIComponent(requestId)}/reply`, {
1293
- answers: questionAnswers(pending.questions, text),
1294
- });
1295
- if (this.pendingQuestion === pending)
1296
- this.pendingQuestion = undefined;
1297
- const queued = this.queuedQuestionMessages.splice(0);
1298
- for (const message of queued)
1299
- this.deliverPrompt(message);
1300
- if (queued.length === 0 && this.turnEnded)
1301
- this.scheduleAutoEnd();
1302
- }
1303
- catch (err) {
1304
- const message = err instanceof Error ? err.message : String(err);
1305
- this.emit({ type: 'note', message: `opencode: question reply failed: ${message}` });
1306
- if (this.pendingQuestion === pending)
1307
- this.emitQuestion(pending);
1308
- }
1309
- }
1310
- // ---- permissions (hearsay-tools/cezarion#1266) --------------------------
1311
- /** Any session on this private server may ask, child sessions included. The ask holds agent
1312
- * input and auto-end from receipt until OpenCode settles it, the turn ends or the session does. */
1313
- handlePermissionAsked(props) {
1314
- if (!this.serverOpen)
1315
- return;
1316
- const parsed = opencodePermissionAskSchema.safeParse(props);
1317
- const nativeId = parsed.success ? parsed.data.id : typeof props.id === 'string' && props.id ? props.id : undefined;
1318
- if (nativeId === undefined) {
1319
- // OpenCode blocks the asking tool until a reply names this request: fail closed.
1320
- this.emit({ type: 'error', message: 'opencode: unsupported permission request could not be rejected: no request id' });
1321
- this.finishTurn();
1322
- this.end();
1323
- return;
1324
- }
1325
- if (this.handledPermissionIds.has(nativeId))
1326
- return;
1327
- this.handledPermissionIds.add(nativeId);
1328
- // OpenCode asks only from inside a running session loop, so a main-session ask after the idle
1329
- // means the server started a run: reopen the turn, as a steered follow-on run does. That run's
1330
- // own idle closes it. A child session's ask leaves the main turn alone.
1331
- if (!this.turnActive && this.sessionId !== undefined && stringField(props, 'sessionID') === this.sessionId) {
1332
- this.openTurn();
1333
- this.emitUi(opencodeTurnStarted);
1334
- }
1335
- const pending = parsed.success
1336
- ? { nativeId, ask: parsed.data, phase: 'classifying' }
1337
- : { nativeId, phase: 'rejecting' };
1338
- this.pendingPermissions.set(nativeId, pending);
1339
- this.agentInputReady = false;
1340
- this.cancelAutoEnd();
1341
- if (!parsed.success) {
1342
- this.emit({ type: 'note', message: 'opencode: rejected an OpenCode permission request cezar could not read' });
1343
- void this.rejectPermission(pending, 'cezar could not read this permission request');
1344
- return;
1345
- }
1346
- this.permissionQueue = this.permissionQueue.then(() => this.answerPermission(pending)).catch(() => undefined);
1347
- }
1348
- /** Still the ask OpenCode is waiting on: not settled, expired or torn down since an await. */
1349
- permissionLive(pending) {
1350
- return this.serverOpen && this.pendingPermissions.get(pending.nativeId) === pending;
1351
- }
1352
- async answerPermission(pending) {
1353
- const rules = await this.userPermissionRules();
1354
- if (!this.permissionLive(pending))
1355
- return;
1356
- if (isOpencodeDefaultAsk(pending.ask, rules)) {
1357
- pending.phase = 'auto-replying';
1358
- try {
1359
- // Never `always`: that can persist an approval beyond this run.
1360
- await this.replyPermission(pending.nativeId, { reply: 'once' });
1361
- }
1362
- catch {
1363
- // OpenCode is still waiting: a failed automatic reply asks the human instead.
1364
- if (this.permissionLive(pending))
1365
- this.bridgePermission(pending);
1366
- return;
1367
- }
1368
- if (this.serverOpen && !this.answeredDefaultAsk) {
1369
- this.answeredDefaultAsk = true;
1370
- this.emit({
1371
- type: 'note',
1372
- message: "opencode: answered OpenCode's built-in permission asks (outside-worktree reads, .env reads, repeated-call guard) with allow-once; your own OpenCode permission rules still ask",
1373
- });
1374
- }
1375
- this.settlePermission(pending);
1376
- return;
1377
- }
1378
- this.bridgePermission(pending);
1379
- }
1380
- /** One lazy `GET /config` per session. An unreadable config is unknown provenance: every ask goes to the cockpit. */
1381
- userPermissionRules() {
1382
- this.permissionRules ??= this.readConfig().then(opencodeUserPermissionRules, () => undefined).then((rules) => {
1383
- if (!rules)
1384
- this.emit({ type: 'note', message: 'opencode: could not read the OpenCode config, so every permission prompt goes to the cockpit' });
1385
- return rules;
1386
- });
1387
- return this.permissionRules;
1388
- }
1389
- /** Unlike `http`, an empty or unparsable body is a failure, never an empty config. */
1390
- async readConfig() {
1391
- if (!this.baseUrl)
1392
- throw new Error('opencode server not ready');
1393
- const res = await fetch(`${this.baseUrl}/config`, { method: 'GET' });
1394
- if (!res.ok)
1395
- throw new Error(`GET /config → ${res.status}`);
1396
- return JSON.parse(await res.text());
1397
- }
1398
- bridgePermission(pending) {
1399
- if (!this.opts.onUiEvent) {
1400
- const message = 'no permission UI is attached to this cezar session';
1401
- this.emit({ type: 'note', message: `opencode: rejected the OpenCode ${pending.ask.permission} permission prompt: ${message}` });
1402
- void this.rejectPermission(pending, message);
1403
- return;
1404
- }
1405
- if (!this.showPermissionCard(pending))
1406
- void this.rejectPermission(pending, 'permission UI unavailable');
1407
- }
1408
- /** Emits a fresh cockpit card, with new ids, for the ask. False when the UI threw: that card is resolved again. */
1409
- showPermissionCard(pending) {
1410
- const bridge = opencodePermissionBridge(pending.ask);
1411
- pending.bridge = bridge;
1412
- pending.phase = 'card';
1413
- pending.answer = undefined;
1414
- try {
1415
- this.opts.onUiEvent(bridge.event);
1416
- return true;
1417
- }
1418
- catch {
1419
- // A throwing consumer cannot leave OpenCode waiting on a card nobody sees.
1420
- pending.bridge = undefined;
1421
- this.emitPermissionResolved(bridge.event.requestId, { reason: 'permission UI unavailable' });
1422
- return false;
1423
- }
1424
- }
1425
- /** A reject OpenCode never receives leaves the asking tool blocked: fail closed. */
1426
- async rejectPermission(pending, message) {
1427
- pending.phase = 'rejecting';
1428
- try {
1429
- await this.replyPermission(pending.nativeId, { reply: 'reject', message });
1430
- }
1431
- catch (err) {
1432
- if (!this.permissionLive(pending))
1433
- return;
1434
- this.emit({ type: 'error', message: `opencode: permission rejection failed: ${err instanceof Error ? err.message : String(err)}` });
1435
- this.finishTurn();
1436
- this.end();
1437
- return;
1438
- }
1439
- this.settlePermission(pending);
1440
- }
1441
- /** The card and the input barrier stay until OpenCode accepts the reply; a failed reply shows a fresh card. */
1442
- respondPermission(requestId, optionId) {
1443
- if (!this.serverOpen)
1444
- return false;
1445
- const pending = [...this.pendingPermissions.values()].find((entry) => entry.bridge?.event.requestId === requestId);
1446
- const reply = pending?.bridge?.replies.get(optionId);
1447
- if (!pending || pending.phase !== 'card' || !reply)
1448
- return false;
1449
- const bridge = pending.bridge;
1450
- pending.phase = 'answering';
1451
- pending.answer = { optionId, reply };
1452
- void this.replyPermission(pending.nativeId, { reply }).then(() => {
1453
- if (this.permissionLive(pending) && pending.bridge === bridge)
1454
- this.settlePermission(pending, { optionId });
1455
- }, (err) => {
1456
- if (!this.permissionLive(pending) || pending.bridge !== bridge)
1457
- return;
1458
- this.emit({ type: 'note', message: `opencode: permission reply failed: ${err instanceof Error ? err.message : String(err)}` });
1459
- // The fresh card first, so the run's pending set never empties and it stays parked.
1460
- const shown = this.showPermissionCard(pending);
1461
- this.emitPermissionResolved(bridge.event.requestId, { reason: 'permission reply failed' });
1462
- if (!shown)
1463
- void this.rejectPermission(pending, 'permission UI unavailable');
1464
- });
1465
- return true;
1466
- }
1467
- async replyPermission(nativeId, body) {
1468
- await this.http('POST', `/permission/${encodeURIComponent(nativeId)}/reply`, body);
1469
- }
1470
- /** OpenCode no longer waits on the ask: retire it, resolve its card, and release the barrier. */
1471
- settlePermission(pending, resolution = {}) {
1472
- if (this.pendingPermissions.get(pending.nativeId) !== pending)
1473
- return;
1474
- this.pendingPermissions.delete(pending.nativeId);
1475
- if (pending.bridge)
1476
- this.emitPermissionResolved(pending.bridge.event.requestId, resolution);
1477
- if (this.pendingPermissions.size)
1478
- return;
1479
- this.notifyAgentInputReady();
1480
- // A card that arrived after the turn ended cancelled its auto-end: re-arm it.
1481
- if (this.turnEnded && !this.turnActive && !this.questionReply)
1482
- this.scheduleAutoEnd();
1483
- }
1484
- /** Retires every ask without HTTP: OpenCode settles its own request on idle or abort. The
1485
- * caller owns what follows (turn end or teardown), so the barrier release is not run here. */
1486
- expirePermissions(reason) {
1487
- for (const pending of [...this.pendingPermissions.values()]) {
1488
- this.pendingPermissions.delete(pending.nativeId);
1489
- if (pending.bridge)
1490
- this.emitPermissionResolved(pending.bridge.event.requestId, { reason });
1491
- }
1492
- }
1493
- emitPermissionResolved(requestId, resolution) {
1494
- try {
1495
- this.opts.onUiEvent?.({ type: 'permission.resolved', requestId, ...resolution });
1496
- }
1497
- catch { /* A failed consumer must not strand other pending requests. */ }
1498
- }
1499
- // ---- http ---------------------------------------------------------------
1500
- async http(method, path, body, signal) {
1501
- if (!this.baseUrl)
1502
- throw new Error('opencode server not ready');
1503
- // Plain fetch is fine here: every call is a short round-trip now that
1504
- // prompts go through `prompt_async` — nothing long-polls anymore.
1505
- const res = await fetch(`${this.baseUrl}${path}`, {
1506
- method,
1507
- ...(signal !== undefined ? { signal } : {}),
1508
- headers: body !== undefined ? { 'content-type': 'application/json' } : {},
1509
- ...(body !== undefined ? { body: JSON.stringify(body) } : {}),
1510
- });
1511
- if (!res.ok) {
1512
- const detail = await res.text().catch(() => '');
1513
- throw new Error(`${method} ${path} → ${res.status} ${detail.slice(0, 200)}`);
1514
- }
1515
- const text = await res.text();
1516
- if (!text)
1517
- return {};
1518
- try {
1519
- return JSON.parse(text);
1520
- }
1521
- catch {
1522
- return {};
1523
- }
1524
- }
1525
- emit(event) {
1526
- this.onEvent?.(event);
1527
- }
1528
- /** The mapper never throws, but a defect in it must still never disturb
1529
- * the v1 stream — hence the belt-and-braces try. */
1530
- emitUi(map) {
1531
- try {
1532
- const mapped = map(this.uiState);
1533
- this.uiState = mapped.state;
1534
- if (this.opts.onUiEvent) {
1535
- for (const event of mapped.events)
1536
- this.opts.onUiEvent(event);
1537
- }
1538
- }
1539
- catch {
1540
- // v2 mapping is best-effort; v1 consumers stay unaffected.
1541
- }
1542
- }
1543
- }
1544
- function textOf(content) {
1545
- return content
1546
- .filter((b) => b.type === 'text')
1547
- .map((b) => b.text)
1548
- .join('\n')
1549
- .trim();
1550
- }
1551
- function toCezarQuestions(value) {
1552
- if (!isRecord(value) || !Array.isArray(value.questions))
1553
- return null;
1554
- if (value.questions.length < 1 || value.questions.length > 4)
1555
- return null;
1556
- const questions = [];
1557
- for (const rawQuestion of value.questions) {
1558
- if (!isRecord(rawQuestion))
1559
- return null;
1560
- const header = clippedString(rawQuestion.header, 12);
1561
- const question = clippedString(rawQuestion.question, 400);
1562
- if (!header || !question || !Array.isArray(rawQuestion.options))
1563
- return null;
1564
- const options = [];
1565
- for (const rawOption of rawQuestion.options) {
1566
- if (options.length === 4)
1567
- break;
1568
- if (!isRecord(rawOption))
1569
- continue;
1570
- const label = clippedString(rawOption.label, 60);
1571
- if (!label)
1572
- continue;
1573
- const description = clippedString(rawOption.description, 280);
1574
- options.push({ label, ...(description ? { description } : {}) });
1575
- }
1576
- if (options.length < 2)
1577
- return null;
1578
- questions.push({
1579
- header,
1580
- question,
1581
- options,
1582
- ...(rawQuestion.multiple === true ? { multiSelect: true } : {}),
1583
- });
1584
- }
1585
- return parseAskRequest({ questions })?.questions ?? null;
1586
- }
1587
- function questionAnswers(questions, text) {
1588
- const answers = questions.map(() => []);
1589
- const matched = new Set();
1590
- for (const line of text.split('\n')) {
1591
- const trimmed = line.trim();
1592
- const index = questions.findIndex((question, questionIndex) => !matched.has(questionIndex) && trimmed.startsWith(`${question.header}:`));
1593
- if (index < 0)
1594
- continue;
1595
- matched.add(index);
1596
- answers[index] = trimmed
1597
- .slice(questions[index].header.length + 1)
1598
- .split(',')
1599
- .map((answer) => answer.trim())
1600
- .filter(Boolean);
1601
- }
1602
- if (matched.size === 0 && answers[0])
1603
- answers[0] = [text.trim()];
1604
- return answers;
1605
- }
1606
- function clippedString(value, max) {
1607
- if (typeof value !== 'string')
1608
- return undefined;
1609
- const trimmed = value.trim();
1610
- return trimmed ? trimmed.slice(0, max) : undefined;
1611
- }
1612
- function isRecord(value) {
1613
- return typeof value === 'object' && value !== null && !Array.isArray(value);
1614
- }
1615
- function sleep(ms) {
1616
- return new Promise((resolve) => setTimeout(resolve, ms));
1617
- }
1618
- function stringField(obj, key) {
1619
- const v = obj[key];
1620
- return typeof v === 'string' ? v : undefined;
1621
- }
1622
- /** Same reading of the wire error shape as the v2 mapper's `errorText`
1623
- * (`opencode-ui-mapper.ts`): a bare string, `{message}`, `{data:{message}}`
1624
- * (the real server's `ProviderAuthError` shape), or `{name}` as a last resort. */
1625
- function sessionErrorText(error) {
1626
- if (typeof error === 'string')
1627
- return error;
1628
- if (typeof error !== 'object' || error === null)
1629
- return 'session error';
1630
- const rec = error;
1631
- const data = typeof rec.data === 'object' && rec.data !== null ? rec.data : undefined;
1632
- return (stringField(rec, 'message') ??
1633
- (data && stringField(data, 'message')) ??
1634
- stringField(rec, 'name') ??
1635
- 'session error');
1636
- }
1637
- /** Structured upstream status or code, when the wire error carries one —
1638
- * the AI SDK's `AI_APICallError` exposes a numeric `statusCode`, and some
1639
- * providers nest a `code` inside `data`. Status wins over code; anything
1640
- * else adds nothing (#53). */
1641
- function sessionErrorDetail(error) {
1642
- if (typeof error !== 'object' || error === null)
1643
- return undefined;
1644
- const rec = error;
1645
- const data = isRecord(rec.data) ? rec.data : undefined;
1646
- const status = numField(rec, 'statusCode') ||
1647
- numField(rec, 'status') ||
1648
- (data ? numField(data, 'statusCode') : 0) ||
1649
- (data ? numField(data, 'status') : 0);
1650
- if (status > 0)
1651
- return `HTTP ${status}`;
1652
- const rawCode = rec.code ?? (data ? data.code : undefined);
1653
- if (typeof rawCode === 'string' && rawCode.trim())
1654
- return `code ${rawCode.trim()}`;
1655
- if (typeof rawCode === 'number')
1656
- return `code ${rawCode}`;
1657
- return undefined;
1658
- }
1659
- function numField(obj, key) {
1660
- const v = obj[key];
1661
- return typeof v === 'number' ? v : 0;
1662
- }
1663
- function safeStringify(value) {
1664
- if (typeof value === 'string')
1665
- return value;
1666
- try {
1667
- return JSON.stringify(value);
1668
- }
1669
- catch {
1670
- return String(value);
1671
- }
1672
- }
1673
- /** `code N` or `signal S` for a server process that exited. */
1674
- function describeExit(serve) {
1675
- const { exitCode, signalCode } = serve.child;
1676
- return exitCode !== null ? `code ${exitCode}` : `signal ${signalCode}`;
1677
- }
1678
- /** `code N — <stderr summary>` for one start that exited before listening. */
1679
- function describeEarlyExit(serve) {
1680
- const detail = summarizeRunnerStderr(serve.stderrChunks.join(''));
1681
- return `${describeExit(serve)}${detail ? ` — ${detail}` : ''}`;
1682
- }
1683
- function wrapSpawnError(err, bin) {
1684
- const code = err?.code;
1685
- if (code === 'ENOENT') {
1686
- return new Error(`\`${bin}\` not found on PATH — install OpenCode (https://opencode.ai) and run \`opencode\` once to configure a provider`);
1687
- }
1688
- return err instanceof Error ? err : new Error(String(err));
1689
- }
1690
- //# sourceMappingURL=opencode-server-runner.js.map