@cortex-agent/server 2026.10.21 → 2026.10.27

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 (1815) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +10 -6
  3. package/THIRD_PARTY_NOTICES.txt +16546 -0
  4. package/defaults/context/projects/AGENTS.md +1 -1
  5. package/defaults/gitignore +3 -3
  6. package/defaults/hooks/new-session-hook.mjs +1 -1
  7. package/defaults/hooks/status-md-guard.mjs +6 -6
  8. package/defaults/plugins/cortex-system/plugin.json +1 -1
  9. package/defaults/plugins/cortex-system/skills/client-manage/SKILL.md +16 -9
  10. package/defaults/plugins/cortex-system/skills/project-init/SKILL.md +2 -2
  11. package/defaults/prompts/clean-workspace.md +21 -0
  12. package/defaults/rules/agents-md.md +1 -1
  13. package/defaults/rules/issues-md.md +1 -1
  14. package/defaults/rules/meta-conventions.md +3 -3
  15. package/defaults/rules/mission-md.md +1 -1
  16. package/defaults/rules/status-md.md +1 -1
  17. package/dist/agent-adapter/claude/remote-mcp-proxy.js +4 -66
  18. package/dist/build-info.json +1 -0
  19. package/dist/chunks/anthropic-SUZWKBRW.js +4 -0
  20. package/dist/chunks/anthropic-messages-M3SMXACA.js +8 -0
  21. package/dist/chunks/api-GM53PHIL-GFHEXXE6.js +4 -0
  22. package/dist/chunks/azure-openai-responses-76YWXHSB.js +4 -0
  23. package/dist/chunks/bedrock-converse-stream-5UPX4NTQ.js +58 -0
  24. package/dist/chunks/child-runner-3GHOWGZP.js +4 -0
  25. package/dist/chunks/chunk-23PRJECN.js +4 -0
  26. package/dist/chunks/chunk-2ZNLUY2U.js +128 -0
  27. package/dist/chunks/chunk-3F6WW7HR.js +13 -0
  28. package/dist/chunks/chunk-3OKHUVEM.js +7 -0
  29. package/dist/chunks/chunk-3TGQSGG4.js +8 -0
  30. package/dist/chunks/chunk-3THJYAEF.js +4 -0
  31. package/dist/chunks/chunk-3YHOCPQU.js +10 -0
  32. package/dist/chunks/chunk-4EX2JJWB.js +4 -0
  33. package/dist/chunks/chunk-4LLH5OWM.js +10 -0
  34. package/dist/chunks/chunk-4U7XXM4W.js +4 -0
  35. package/dist/chunks/chunk-52T37Y47.js +8 -0
  36. package/dist/chunks/chunk-5M4PFLRW.js +4 -0
  37. package/dist/chunks/chunk-5NRGVROY.js +4 -0
  38. package/dist/chunks/chunk-5T7IX5KN.js +4 -0
  39. package/dist/chunks/chunk-6AKUD3CF.js +4 -0
  40. package/dist/chunks/chunk-6LZK4DDH.js +4 -0
  41. package/dist/chunks/chunk-6R73ICDB.js +4 -0
  42. package/dist/chunks/chunk-7MU2AKNM.js +4 -0
  43. package/dist/chunks/chunk-A34TDMIC.js +7 -0
  44. package/dist/chunks/chunk-AAA3UBIS.js +4 -0
  45. package/dist/chunks/chunk-ASYQHJVQ.js +9 -0
  46. package/dist/chunks/chunk-AWFUHWQK.js +4 -0
  47. package/dist/chunks/chunk-B3XBQEFM.js +4 -0
  48. package/dist/chunks/chunk-BGVHA2D4.js +4 -0
  49. package/dist/chunks/chunk-BGYR4ID3.js +4 -0
  50. package/dist/chunks/chunk-BKHDWCRT.js +79 -0
  51. package/dist/chunks/chunk-BR7A5SWM.js +23 -0
  52. package/dist/chunks/chunk-CQLH4UVX.js +4 -0
  53. package/dist/chunks/chunk-CVC66CFV.js +33 -0
  54. package/dist/chunks/chunk-CXT5IR5T.js +4 -0
  55. package/dist/chunks/chunk-D3NXKK2L.js +4 -0
  56. package/dist/chunks/chunk-D6UA4BZC.js +19 -0
  57. package/dist/chunks/chunk-D6VMBA4C.js +4 -0
  58. package/dist/chunks/chunk-DGMNI4AO.js +4 -0
  59. package/dist/chunks/chunk-DHSA5ACV.js +125 -0
  60. package/dist/chunks/chunk-DPQPXBTP.js +68 -0
  61. package/dist/chunks/chunk-DQJ6LLAS.js +4 -0
  62. package/dist/chunks/chunk-DXBSQXJL.js +18 -0
  63. package/dist/chunks/chunk-E6BYRULL.js +4 -0
  64. package/dist/chunks/chunk-E7ZMYIY6.js +30 -0
  65. package/dist/chunks/chunk-EQIMHXC4.js +5 -0
  66. package/dist/chunks/chunk-EQITBTJC.js +10 -0
  67. package/dist/chunks/chunk-EXJA5RIX.js +357 -0
  68. package/dist/chunks/chunk-FF7UELTU.js +4 -0
  69. package/dist/chunks/chunk-FH74NME3.js +115 -0
  70. package/dist/chunks/chunk-FOJQXLL2.js +6 -0
  71. package/dist/chunks/chunk-FOQ7VLIL.js +17 -0
  72. package/dist/chunks/chunk-FX6MOGLR.js +11 -0
  73. package/dist/chunks/chunk-FXDIR3SQ.js +4 -0
  74. package/dist/chunks/chunk-G2V65UBA.js +4 -0
  75. package/dist/chunks/chunk-H2FP6DG4.js +5 -0
  76. package/dist/chunks/chunk-HALUQ7ZF.js +4 -0
  77. package/dist/chunks/chunk-HGPBHTVD.js +6 -0
  78. package/dist/chunks/chunk-HU6UIDEJ.js +6 -0
  79. package/dist/chunks/chunk-I6OPDRVF.js +4 -0
  80. package/dist/chunks/chunk-ILEML5IP.js +4 -0
  81. package/dist/chunks/chunk-IRWZ7UPF.js +77 -0
  82. package/dist/chunks/chunk-J5DVLUKY.js +6 -0
  83. package/dist/chunks/chunk-JERCOLY3.js +142 -0
  84. package/dist/chunks/chunk-JW2HFMTF.js +4 -0
  85. package/dist/chunks/chunk-JXFG66UN.js +4 -0
  86. package/dist/chunks/chunk-K4NTZEDJ.js +4 -0
  87. package/dist/chunks/chunk-KDYEGGMW.js +4 -0
  88. package/dist/chunks/chunk-KENCMLRE.js +4 -0
  89. package/dist/chunks/chunk-KGJZAYQD.js +4 -0
  90. package/dist/chunks/chunk-KIGMAATV.js +23 -0
  91. package/dist/chunks/chunk-KIU5FAPY.js +5 -0
  92. package/dist/chunks/chunk-KIWMQPH7.js +739 -0
  93. package/dist/chunks/chunk-KRXTI4JO.js +3 -0
  94. package/dist/chunks/chunk-L6VCIGWS.js +11 -0
  95. package/dist/chunks/chunk-LACGULCN.js +10 -0
  96. package/dist/chunks/chunk-LCKVYFMD.js +4 -0
  97. package/dist/chunks/chunk-LEUENXI2.js +6 -0
  98. package/dist/chunks/chunk-LMDWRRX4.js +4 -0
  99. package/dist/chunks/chunk-LMSQZ6TQ.js +4 -0
  100. package/dist/chunks/chunk-MEPASGPP.js +6 -0
  101. package/dist/chunks/chunk-MFAEUHMV.js +28 -0
  102. package/dist/chunks/chunk-N6BTQN7R.js +8 -0
  103. package/dist/chunks/chunk-NAA7GF6Q.js +5 -0
  104. package/dist/chunks/chunk-NHD2ESHA.js +4 -0
  105. package/dist/chunks/chunk-NKDMKRSB.js +68 -0
  106. package/dist/chunks/chunk-NKXV32S6.js +4 -0
  107. package/dist/chunks/chunk-NR6U3WIZ.js +4 -0
  108. package/dist/chunks/chunk-NT32UURL.js +4 -0
  109. package/dist/chunks/chunk-NVX5IPRN.js +4 -0
  110. package/dist/chunks/chunk-O3JW2F7D.js +8 -0
  111. package/dist/chunks/chunk-OE4KH3NJ.js +4 -0
  112. package/dist/chunks/chunk-OISO5JXB.js +4 -0
  113. package/dist/chunks/chunk-OKRK6JPY.js +4 -0
  114. package/dist/chunks/chunk-OPYXNSMY.js +4 -0
  115. package/dist/chunks/chunk-OSEIQ7SS.js +4 -0
  116. package/dist/chunks/chunk-OZGBWAT2.js +4 -0
  117. package/dist/chunks/chunk-P52RMIYX.js +6 -0
  118. package/dist/chunks/chunk-PBJ5MPPX.js +60 -0
  119. package/dist/chunks/chunk-PFMEUFJ7.js +4 -0
  120. package/dist/chunks/chunk-PMG4YGDU.js +7 -0
  121. package/dist/chunks/chunk-PXS5SHOV.js +4 -0
  122. package/dist/chunks/chunk-PZMGBKUR.js +13 -0
  123. package/dist/chunks/chunk-PZMXHA6X.js +9 -0
  124. package/dist/chunks/chunk-Q4UGYGU5.js +4 -0
  125. package/dist/chunks/chunk-Q7CE3UIE.js +133 -0
  126. package/dist/chunks/chunk-QBKCAIJG.js +4 -0
  127. package/dist/chunks/chunk-QEOFEETJ.js +4 -0
  128. package/dist/chunks/chunk-QN44UXQR.js +11 -0
  129. package/dist/chunks/chunk-QUUEQRIT.js +4 -0
  130. package/dist/chunks/chunk-QWAQHHRS.js +4 -0
  131. package/dist/chunks/chunk-RA6HKFBV.js +4 -0
  132. package/dist/chunks/chunk-REBNWCKI.js +4 -0
  133. package/dist/chunks/chunk-REPYBMQS.js +4 -0
  134. package/dist/chunks/chunk-RO4C2MJP.js +4 -0
  135. package/dist/chunks/chunk-SKHLZ6XY.js +9 -0
  136. package/dist/chunks/chunk-STUHNKQS.js +4 -0
  137. package/dist/chunks/chunk-SUFW24P4.js +7 -0
  138. package/dist/chunks/chunk-TAWLERZA.js +4 -0
  139. package/dist/chunks/chunk-TCAEECDI.js +4 -0
  140. package/dist/chunks/chunk-TJ4GQRT6.js +8 -0
  141. package/dist/chunks/chunk-TURBFBYN.js +4 -0
  142. package/dist/chunks/chunk-TWAEABGG.js +52 -0
  143. package/dist/chunks/chunk-TZFLHVOQ.js +7 -0
  144. package/dist/chunks/chunk-TZGNSHOL.js +4 -0
  145. package/dist/chunks/chunk-UD3NMUHR.js +12 -0
  146. package/dist/chunks/chunk-UNVEZI57.js +4 -0
  147. package/dist/chunks/chunk-USBJFDJ6.js +4 -0
  148. package/dist/chunks/chunk-V3AQJSWR.js +4 -0
  149. package/dist/chunks/chunk-VQUPKMDR.js +4 -0
  150. package/dist/chunks/chunk-W25TB3PU.js +4 -0
  151. package/dist/chunks/chunk-W5LGYSPZ.js +4 -0
  152. package/dist/chunks/chunk-WEZWKMYU.js +4 -0
  153. package/dist/chunks/chunk-WHC7AYZD.js +4 -0
  154. package/dist/chunks/chunk-X2GYYRVM.js +22 -0
  155. package/dist/chunks/chunk-XAJLZR7C.js +28 -0
  156. package/dist/chunks/chunk-XAXWLYH5.js +4 -0
  157. package/dist/chunks/chunk-XBJOYU5Y.js +4 -0
  158. package/dist/chunks/chunk-XH6FMP3N.js +71 -0
  159. package/dist/chunks/chunk-XIECJESP.js +4 -0
  160. package/dist/chunks/chunk-XNSSUVT6.js +4 -0
  161. package/dist/chunks/chunk-XSRZHN63.js +4 -0
  162. package/dist/chunks/chunk-Y3GFB5XM.js +8 -0
  163. package/dist/chunks/chunk-Y6ZEVVL5.js +4 -0
  164. package/dist/chunks/chunk-YAEVYJAR.js +4 -0
  165. package/dist/chunks/chunk-YG7OEPR2.js +6 -0
  166. package/dist/chunks/chunk-YHIWOGVL.js +4 -0
  167. package/dist/chunks/chunk-YKKEI5GI.js +4 -0
  168. package/dist/chunks/chunk-YPK2CAIZ.js +8 -0
  169. package/dist/chunks/chunk-YZSHTWNM.js +92 -0
  170. package/dist/chunks/chunk-Z2Q2NR46.js +34 -0
  171. package/dist/chunks/chunk-Z4H3VDHI.js +4 -0
  172. package/dist/chunks/chunk-ZFPMIQA3.js +6 -0
  173. package/dist/chunks/chunk-ZNZFWSPH.js +4 -0
  174. package/dist/chunks/chunk-ZQ7LGTSN.js +8 -0
  175. package/dist/chunks/chunk-ZSV6TO7Q.js +4 -0
  176. package/dist/chunks/cli-5DBTRMHU.js +53 -0
  177. package/dist/chunks/client-XOGYH5UR.js +4 -0
  178. package/dist/chunks/cloudflare-workers-ai-system-one-32JCFHI3.js +4 -0
  179. package/dist/chunks/config-DJSQI77S-335IXHSM.js +4 -0
  180. package/dist/chunks/context-VCQH5OB6.js +4 -0
  181. package/dist/chunks/cost-PGGFI7QJ.js +5 -0
  182. package/dist/chunks/dist-7RWW7YH4.js +11 -0
  183. package/dist/chunks/dist-PUKMZ7GW.js +4 -0
  184. package/dist/chunks/easter-egg-3d-MO4MOEVF.js +4 -0
  185. package/dist/chunks/es5-VNTQPCKX.js +4 -0
  186. package/dist/chunks/event-streams-3JSFPOTZ.js +4 -0
  187. package/dist/chunks/execution-repo-ZLJTBWFC.js +4 -0
  188. package/dist/chunks/executions-6ARGR3IO.js +9 -0
  189. package/dist/chunks/file-7BN7RCAY.js +4 -0
  190. package/dist/chunks/gateway-UCRPMR75.js +36 -0
  191. package/dist/chunks/github-copilot-HAI2DA62.js +4 -0
  192. package/dist/chunks/google-generative-ai-2VXWLHWI.js +4 -0
  193. package/dist/chunks/google-vertex-UA36QP2U.js +4 -0
  194. package/dist/chunks/init-HA7FAQ73.js +4 -0
  195. package/dist/chunks/install-cli-4IZCSDFZ.js +16 -0
  196. package/dist/chunks/interaction-ask-G5T3H3CG.js +9 -0
  197. package/dist/chunks/interaction-plan-E5V42MUP.js +11 -0
  198. package/dist/chunks/jiti-loader-WANUXUDO.js +4 -0
  199. package/dist/chunks/jiti-static-loader-W3QZ4GDS.js +476 -0
  200. package/dist/chunks/kimi-coding-HMJRKCPA.js +4 -0
  201. package/dist/chunks/lib-RSOU34HQ.js +11 -0
  202. package/dist/chunks/llama-cpp-classify-OTXZWCMW.js +24 -0
  203. package/dist/chunks/local-client-stop-SQRU7ZZM.js +4 -0
  204. package/dist/chunks/memory-cli-PYOILNN5.js +11 -0
  205. package/dist/chunks/meta-KY3LNFV2.js +4 -0
  206. package/dist/chunks/mistral-conversations-34F66L3O.js +7 -0
  207. package/dist/chunks/model-resolver-N3DTAQ2S.js +4 -0
  208. package/dist/chunks/models-L5VF4I5O-XXNJYQMQ.js +4 -0
  209. package/dist/chunks/multipart-parser-GEHG6YAR.js +5 -0
  210. package/dist/chunks/node-PTK2HCDV.js +18 -0
  211. package/dist/chunks/node-VLVSZ76W.js +4 -0
  212. package/dist/chunks/openai-chatgpt-PETGIJOZ.js +4 -0
  213. package/dist/chunks/openai-codex-2REL6UQU.js +4 -0
  214. package/dist/chunks/openai-codex-responses-ZBVHREB3.js +12 -0
  215. package/dist/chunks/openai-completions-VVIB26SH.js +9 -0
  216. package/dist/chunks/openai-decisions-2N6ZRPZC.js +7 -0
  217. package/dist/chunks/openai-responses-735XA2ZX.js +6 -0
  218. package/dist/chunks/openrouter-GDY3BLT2.js +4 -0
  219. package/dist/chunks/openrouter-images-3IKETHAC.js +4 -0
  220. package/dist/chunks/pi-messages-I3E4ZFHA.js +10 -0
  221. package/dist/chunks/radius-HXRZVBDB.js +4 -0
  222. package/dist/chunks/remote-ops-BALZYKH6.js +14 -0
  223. package/dist/chunks/runner-PLVZDGHB.js +4 -0
  224. package/dist/chunks/runtime-6YLTA2ZD.js +4 -0
  225. package/dist/chunks/schedule-cli-OLASBBYJ.js +4 -0
  226. package/dist/chunks/slack-WAGSPZUX.js +4 -0
  227. package/dist/chunks/src-CCI7P7AI.js +6 -0
  228. package/dist/chunks/start-ui-http-QALT7C3P.js +43 -0
  229. package/dist/chunks/subagent-E3UC7ZHC.js +4 -0
  230. package/dist/chunks/time-KEHDQT6K.js +4 -0
  231. package/dist/chunks/tool-shims-Q6P6UXVC.js +4 -0
  232. package/dist/chunks/typesafe-system-one-6ULACYD4.js +4 -0
  233. package/dist/chunks/ui-board-4GYW6KKW.js +5 -0
  234. package/dist/chunks/ui-decision-U2FXSEC2.js +4 -0
  235. package/dist/chunks/ui-file-GVH53O3X.js +5 -0
  236. package/dist/chunks/ui-view-O7PLANT7.js +4 -0
  237. package/dist/chunks/virtual-modules-IDC5YKZJ.js +4 -0
  238. package/dist/chunks/waitpoint-2FGQBIAC.js +5 -0
  239. package/dist/chunks/workers-XN4PSTH6.js +4 -0
  240. package/dist/chunks/xai-KEVUJTFV.js +4 -0
  241. package/dist/client-bundle/client.mjs +10 -5
  242. package/dist/client-bundle/manifest.json +2 -2
  243. package/dist/core/pi-sdk.js +4 -73
  244. package/dist/domain/auth/cc-auth-cli.js +4 -248
  245. package/dist/domain/mcp/bundled-server.js +4 -146
  246. package/dist/entry/app.js +601 -593
  247. package/dist/entry/browser-cli.js +14 -316
  248. package/dist/entry/cli.js +4 -587
  249. package/dist/entry/cortex-cli.js +4 -2
  250. package/dist/entry/daemon.js +7 -895
  251. package/dist/entry/hook-cli.js +6 -401
  252. package/dist/entry/production-app-bootstrap.js +5 -42
  253. package/dist/entry/production-evidence-export-cli.js +12 -99
  254. package/dist/entry/signal-cli.js +6 -201
  255. package/dist/tui/index.js +114 -306
  256. package/package.json +11 -50
  257. package/scripts/bundle-prune-browser.mjs +52 -0
  258. package/scripts/postinstall-restart-trigger.mjs +8 -0
  259. package/vendor/aistatus/gateway-cli.js +21 -0
  260. package/vendor/pi/CHANGELOG.md +6365 -0
  261. package/vendor/pi/README.md +95 -0
  262. package/vendor/pi/dist/codemode-worker.js +478 -0
  263. package/vendor/pi/dist/core/export-html/ansi-to-html.js +249 -0
  264. package/vendor/pi/dist/core/export-html/index.js +228 -0
  265. package/vendor/pi/dist/core/export-html/template.css +1076 -0
  266. package/vendor/pi/dist/core/export-html/template.html +56 -0
  267. package/vendor/pi/dist/core/export-html/template.js +1924 -0
  268. package/vendor/pi/dist/core/export-html/tool-renderer.js +110 -0
  269. package/vendor/pi/dist/core/export-html/vendor/highlight.min.js +1213 -0
  270. package/vendor/pi/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
  271. package/vendor/pi/dist/core/export-html/vendor/marked.min.js +79 -0
  272. package/vendor/pi/dist/core/extensions/loader.js +4 -0
  273. package/vendor/pi/dist/extensions/codemode/execute.js +507 -0
  274. package/vendor/pi/dist/modes/interactive/assets/clankolas.png +0 -0
  275. package/vendor/pi/dist/modes/interactive/theme/dark.json +78 -0
  276. package/vendor/pi/dist/modes/interactive/theme/light.json +78 -0
  277. package/vendor/pi/dist/modes/interactive/theme/system-theme.js +546 -0
  278. package/vendor/pi/dist/modes/interactive/theme/theme-controller.js +210 -0
  279. package/vendor/pi/dist/modes/interactive/theme/theme-schema.js +105 -0
  280. package/vendor/pi/dist/modes/interactive/theme/theme-tokens.js +94 -0
  281. package/vendor/pi/dist/modes/interactive/theme/theme.js +905 -0
  282. package/vendor/pi/dist/utils/image-resize-worker.js +4 -0
  283. package/vendor/pi/dist/utils/image-resize.js +4 -0
  284. package/vendor/pi/docs/cli-integration.md +106 -0
  285. package/vendor/pi/docs/cli.md +333 -0
  286. package/vendor/pi/docs/codemode.md +230 -0
  287. package/vendor/pi/docs/compaction.md +463 -0
  288. package/vendor/pi/docs/configuration.md +47 -0
  289. package/vendor/pi/docs/containerization.md +183 -0
  290. package/vendor/pi/docs/custom-provider.md +225 -0
  291. package/vendor/pi/docs/docs.json +220 -0
  292. package/vendor/pi/docs/environment-variables.md +101 -0
  293. package/vendor/pi/docs/extensions.md +400 -0
  294. package/vendor/pi/docs/how-pi-works.md +49 -0
  295. package/vendor/pi/docs/images/doom-extension.png +0 -0
  296. package/vendor/pi/docs/images/exy.png +0 -0
  297. package/vendor/pi/docs/images/interactive-mode.png +0 -0
  298. package/vendor/pi/docs/images/tree-view.png +0 -0
  299. package/vendor/pi/docs/index.md +39 -0
  300. package/vendor/pi/docs/json.md +226 -0
  301. package/vendor/pi/docs/keybindings.md +195 -0
  302. package/vendor/pi/docs/llama-cpp.md +121 -0
  303. package/vendor/pi/docs/mcp.md +272 -0
  304. package/vendor/pi/docs/message-types.md +279 -0
  305. package/vendor/pi/docs/models-configuration.md +196 -0
  306. package/vendor/pi/docs/models.md +225 -0
  307. package/vendor/pi/docs/nvidia-rtx-llama-cpp.md +96 -0
  308. package/vendor/pi/docs/packages.md +129 -0
  309. package/vendor/pi/docs/prompt-templates.md +59 -0
  310. package/vendor/pi/docs/providers.md +247 -0
  311. package/vendor/pi/docs/quickstart.md +136 -0
  312. package/vendor/pi/docs/rpc-commands.md +860 -0
  313. package/vendor/pi/docs/rpc-extension-ui.md +200 -0
  314. package/vendor/pi/docs/rpc.md +193 -0
  315. package/vendor/pi/docs/sdk.md +147 -0
  316. package/vendor/pi/docs/security.md +99 -0
  317. package/vendor/pi/docs/session-format.md +293 -0
  318. package/vendor/pi/docs/sessions.md +66 -0
  319. package/vendor/pi/docs/settings.md +172 -0
  320. package/vendor/pi/docs/shell-aliases.md +93 -0
  321. package/vendor/pi/docs/skills.md +93 -0
  322. package/vendor/pi/docs/slash-commands.md +60 -0
  323. package/vendor/pi/docs/terminal-setup.md +233 -0
  324. package/vendor/pi/docs/termux.md +117 -0
  325. package/vendor/pi/docs/themes.md +138 -0
  326. package/vendor/pi/docs/tmux.md +55 -0
  327. package/vendor/pi/docs/tui.md +195 -0
  328. package/vendor/pi/docs/usage.md +94 -0
  329. package/vendor/pi/docs/virtual-models.md +114 -0
  330. package/vendor/pi/docs/windows.md +81 -0
  331. package/vendor/pi/examples/README.md +36 -0
  332. package/vendor/pi/examples/extensions/README.md +214 -0
  333. package/vendor/pi/examples/extensions/auto-commit-on-exit.ts +49 -0
  334. package/vendor/pi/examples/extensions/bash-spawn-hook.ts +30 -0
  335. package/vendor/pi/examples/extensions/bookmark.ts +50 -0
  336. package/vendor/pi/examples/extensions/border-status-editor.ts +150 -0
  337. package/vendor/pi/examples/extensions/built-in-tool-renderer.ts +225 -0
  338. package/vendor/pi/examples/extensions/claude-rules.ts +86 -0
  339. package/vendor/pi/examples/extensions/commands.ts +72 -0
  340. package/vendor/pi/examples/extensions/confirm-destructive.ts +59 -0
  341. package/vendor/pi/examples/extensions/custom-compaction.ts +117 -0
  342. package/vendor/pi/examples/extensions/custom-footer.ts +64 -0
  343. package/vendor/pi/examples/extensions/custom-header.ts +73 -0
  344. package/vendor/pi/examples/extensions/custom-provider-anthropic/index.ts +617 -0
  345. package/vendor/pi/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
  346. package/vendor/pi/examples/extensions/custom-provider-anthropic/package.json +19 -0
  347. package/vendor/pi/examples/extensions/custom-provider-gitlab-duo/index.ts +405 -0
  348. package/vendor/pi/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
  349. package/vendor/pi/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
  350. package/vendor/pi/examples/extensions/debug-provider.ts +90 -0
  351. package/vendor/pi/examples/extensions/dirty-repo-guard.ts +56 -0
  352. package/vendor/pi/examples/extensions/doom-overlay/README.md +46 -0
  353. package/vendor/pi/examples/extensions/doom-overlay/doom/build/doom.js +21 -0
  354. package/vendor/pi/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
  355. package/vendor/pi/examples/extensions/doom-overlay/doom/build.sh +152 -0
  356. package/vendor/pi/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +72 -0
  357. package/vendor/pi/examples/extensions/doom-overlay/doom-component.ts +132 -0
  358. package/vendor/pi/examples/extensions/doom-overlay/doom-engine.ts +173 -0
  359. package/vendor/pi/examples/extensions/doom-overlay/doom-keys.ts +104 -0
  360. package/vendor/pi/examples/extensions/doom-overlay/index.ts +74 -0
  361. package/vendor/pi/examples/extensions/doom-overlay/wad-finder.ts +55 -0
  362. package/vendor/pi/examples/extensions/dynamic-resources/SKILL.md +8 -0
  363. package/vendor/pi/examples/extensions/dynamic-resources/dynamic.json +81 -0
  364. package/vendor/pi/examples/extensions/dynamic-resources/dynamic.md +5 -0
  365. package/vendor/pi/examples/extensions/dynamic-resources/index.ts +15 -0
  366. package/vendor/pi/examples/extensions/dynamic-tools.ts +74 -0
  367. package/vendor/pi/examples/extensions/entry-renderer.ts +41 -0
  368. package/vendor/pi/examples/extensions/event-bus.ts +43 -0
  369. package/vendor/pi/examples/extensions/file-trigger.ts +41 -0
  370. package/vendor/pi/examples/extensions/git-checkpoint.ts +53 -0
  371. package/vendor/pi/examples/extensions/git-merge-and-resolve.ts +115 -0
  372. package/vendor/pi/examples/extensions/github-issue-autocomplete.ts +185 -0
  373. package/vendor/pi/examples/extensions/gondolin/index.ts +531 -0
  374. package/vendor/pi/examples/extensions/gondolin/package-lock.json +185 -0
  375. package/vendor/pi/examples/extensions/gondolin/package.json +19 -0
  376. package/vendor/pi/examples/extensions/handoff.ts +190 -0
  377. package/vendor/pi/examples/extensions/hello.ts +26 -0
  378. package/vendor/pi/examples/extensions/hidden-thinking-label.ts +53 -0
  379. package/vendor/pi/examples/extensions/inline-bash.ts +94 -0
  380. package/vendor/pi/examples/extensions/input-transform-streaming.ts +39 -0
  381. package/vendor/pi/examples/extensions/input-transform.ts +43 -0
  382. package/vendor/pi/examples/extensions/interactive-shell.ts +196 -0
  383. package/vendor/pi/examples/extensions/jev-router.ts +113 -0
  384. package/vendor/pi/examples/extensions/mac-system-theme.ts +47 -0
  385. package/vendor/pi/examples/extensions/message-renderer.ts +59 -0
  386. package/vendor/pi/examples/extensions/minimal-mode.ts +353 -0
  387. package/vendor/pi/examples/extensions/modal-editor.ts +85 -0
  388. package/vendor/pi/examples/extensions/model-status.ts +31 -0
  389. package/vendor/pi/examples/extensions/notify.ts +57 -0
  390. package/vendor/pi/examples/extensions/overlay-qa-tests.ts +1450 -0
  391. package/vendor/pi/examples/extensions/overlay-test.ts +153 -0
  392. package/vendor/pi/examples/extensions/permission-gate.ts +34 -0
  393. package/vendor/pi/examples/extensions/pirate.ts +47 -0
  394. package/vendor/pi/examples/extensions/plan-mode/README.md +66 -0
  395. package/vendor/pi/examples/extensions/plan-mode/index.ts +394 -0
  396. package/vendor/pi/examples/extensions/plan-mode/utils.ts +168 -0
  397. package/vendor/pi/examples/extensions/preset.ts +436 -0
  398. package/vendor/pi/examples/extensions/project-trust.ts +64 -0
  399. package/vendor/pi/examples/extensions/prompt-customizer.ts +49 -0
  400. package/vendor/pi/examples/extensions/protected-paths.ts +30 -0
  401. package/vendor/pi/examples/extensions/provider-payload.ts +18 -0
  402. package/vendor/pi/examples/extensions/qna.ts +118 -0
  403. package/vendor/pi/examples/extensions/question.ts +286 -0
  404. package/vendor/pi/examples/extensions/questionnaire.ts +448 -0
  405. package/vendor/pi/examples/extensions/rainbow-editor.ts +88 -0
  406. package/vendor/pi/examples/extensions/reload-runtime.ts +37 -0
  407. package/vendor/pi/examples/extensions/rpc-demo.ts +118 -0
  408. package/vendor/pi/examples/extensions/sandbox/index.ts +321 -0
  409. package/vendor/pi/examples/extensions/sandbox/package-lock.json +92 -0
  410. package/vendor/pi/examples/extensions/sandbox/package.json +19 -0
  411. package/vendor/pi/examples/extensions/send-user-message.ts +97 -0
  412. package/vendor/pi/examples/extensions/session-name.ts +27 -0
  413. package/vendor/pi/examples/extensions/shutdown-command.ts +63 -0
  414. package/vendor/pi/examples/extensions/snake.ts +343 -0
  415. package/vendor/pi/examples/extensions/space-invaders.ts +560 -0
  416. package/vendor/pi/examples/extensions/ssh.ts +220 -0
  417. package/vendor/pi/examples/extensions/status-line.ts +32 -0
  418. package/vendor/pi/examples/extensions/structured-output.ts +65 -0
  419. package/vendor/pi/examples/extensions/subagent/README.md +177 -0
  420. package/vendor/pi/examples/extensions/subagent/agents/planner.md +37 -0
  421. package/vendor/pi/examples/extensions/subagent/agents/reviewer.md +35 -0
  422. package/vendor/pi/examples/extensions/subagent/agents/scout.md +50 -0
  423. package/vendor/pi/examples/extensions/subagent/agents/worker.md +24 -0
  424. package/vendor/pi/examples/extensions/subagent/agents.ts +157 -0
  425. package/vendor/pi/examples/extensions/subagent/index.ts +1036 -0
  426. package/vendor/pi/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
  427. package/vendor/pi/examples/extensions/subagent/prompts/implement.md +10 -0
  428. package/vendor/pi/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
  429. package/vendor/pi/examples/extensions/summarize.ts +199 -0
  430. package/vendor/pi/examples/extensions/system-prompt-header.ts +17 -0
  431. package/vendor/pi/examples/extensions/tic-tac-toe.ts +1008 -0
  432. package/vendor/pi/examples/extensions/timed-confirm.ts +70 -0
  433. package/vendor/pi/examples/extensions/titlebar-spinner.ts +58 -0
  434. package/vendor/pi/examples/extensions/todo.ts +297 -0
  435. package/vendor/pi/examples/extensions/tool-override.ts +144 -0
  436. package/vendor/pi/examples/extensions/tools.ts +146 -0
  437. package/vendor/pi/examples/extensions/trigger-compact.ts +50 -0
  438. package/vendor/pi/examples/extensions/truncated-tool.ts +195 -0
  439. package/vendor/pi/examples/extensions/widget-placement.ts +9 -0
  440. package/vendor/pi/examples/extensions/with-deps/index.ts +32 -0
  441. package/vendor/pi/examples/extensions/with-deps/package-lock.json +31 -0
  442. package/vendor/pi/examples/extensions/with-deps/package.json +22 -0
  443. package/vendor/pi/examples/extensions/working-indicator.ts +123 -0
  444. package/vendor/pi/examples/extensions/working-message-test.ts +25 -0
  445. package/vendor/pi/examples/rpc-client.ts +35 -0
  446. package/vendor/pi/examples/rpc-extension-ui.ts +661 -0
  447. package/vendor/pi/examples/sdk/01-minimal.ts +26 -0
  448. package/vendor/pi/examples/sdk/02-custom-model.ts +49 -0
  449. package/vendor/pi/examples/sdk/03-custom-prompt.ts +75 -0
  450. package/vendor/pi/examples/sdk/04-skills.ts +55 -0
  451. package/vendor/pi/examples/sdk/05-tools.ts +48 -0
  452. package/vendor/pi/examples/sdk/06-extensions.ts +99 -0
  453. package/vendor/pi/examples/sdk/07-context-files.ts +47 -0
  454. package/vendor/pi/examples/sdk/08-prompt-templates.ts +51 -0
  455. package/vendor/pi/examples/sdk/09-api-keys-and-oauth.ts +34 -0
  456. package/vendor/pi/examples/sdk/10-settings.ts +53 -0
  457. package/vendor/pi/examples/sdk/11-sessions.ts +52 -0
  458. package/vendor/pi/examples/sdk/12-full-control.ts +74 -0
  459. package/vendor/pi/examples/sdk/13-session-runtime.ts +67 -0
  460. package/vendor/pi/examples/sdk/14-codemode-mcp.ts +61 -0
  461. package/vendor/pi/examples/sdk/README.md +141 -0
  462. package/vendor/pi/package.json +98 -0
  463. package/vendor/pi/schemas/keybindings.schema.json +393 -0
  464. package/vendor/pi/schemas/models.schema.json +1211 -0
  465. package/vendor/pi/schemas/settings.schema.json +783 -0
  466. package/vendor/pi/schemas/theme.schema.json +365 -0
  467. package/vendor/pi-ai/bedrock.js +4 -0
  468. package/vendor/pi-ai/oauth-load.js +4 -0
  469. package/vendor/quickjs.wasm +0 -0
  470. package/web/dist/assets/board-math-css-BmiXB1z5.js +2 -0
  471. package/web/dist/assets/index-DqWMdMkh.css +1 -0
  472. package/web/dist/assets/index-XBRXpnC5.js +1 -0
  473. package/web/dist/assets/index-btKNdkvc.js +525 -0
  474. package/web/dist/index.html +2 -2
  475. package/dist/agent-adapter/bg-wait.d.ts +0 -11
  476. package/dist/agent-adapter/bg-wait.js +0 -32
  477. package/dist/agent-adapter/capabilities.d.ts +0 -18
  478. package/dist/agent-adapter/capabilities.js +0 -39
  479. package/dist/agent-adapter/claude/active-capture-registry.d.ts +0 -7
  480. package/dist/agent-adapter/claude/active-capture-registry.js +0 -42
  481. package/dist/agent-adapter/claude/adapter.d.ts +0 -170
  482. package/dist/agent-adapter/claude/adapter.js +0 -459
  483. package/dist/agent-adapter/claude/assistant-blocks.d.ts +0 -5
  484. package/dist/agent-adapter/claude/assistant-blocks.js +0 -61
  485. package/dist/agent-adapter/claude/bg-task-tracker.d.ts +0 -103
  486. package/dist/agent-adapter/claude/bg-task-tracker.js +0 -164
  487. package/dist/agent-adapter/claude/cache-refresh.d.ts +0 -58
  488. package/dist/agent-adapter/claude/cache-refresh.js +0 -145
  489. package/dist/agent-adapter/claude/cache-touch.d.ts +0 -12
  490. package/dist/agent-adapter/claude/cache-touch.js +0 -75
  491. package/dist/agent-adapter/claude/compact-window.d.ts +0 -18
  492. package/dist/agent-adapter/claude/compact-window.js +0 -49
  493. package/dist/agent-adapter/claude/context-usage.d.ts +0 -28
  494. package/dist/agent-adapter/claude/context-usage.js +0 -173
  495. package/dist/agent-adapter/claude/defaults.d.ts +0 -42
  496. package/dist/agent-adapter/claude/defaults.js +0 -59
  497. package/dist/agent-adapter/claude/engine.d.ts +0 -75
  498. package/dist/agent-adapter/claude/engine.js +0 -139
  499. package/dist/agent-adapter/claude/event-parser.d.ts +0 -60
  500. package/dist/agent-adapter/claude/event-parser.js +0 -259
  501. package/dist/agent-adapter/claude/event-translator.d.ts +0 -45
  502. package/dist/agent-adapter/claude/event-translator.js +0 -98
  503. package/dist/agent-adapter/claude/hooks-builder.d.ts +0 -19
  504. package/dist/agent-adapter/claude/hooks-builder.js +0 -57
  505. package/dist/agent-adapter/claude/mcp-config.d.ts +0 -11
  506. package/dist/agent-adapter/claude/mcp-config.js +0 -131
  507. package/dist/agent-adapter/claude/remote-mcp-proxy.d.ts +0 -1
  508. package/dist/agent-adapter/claude/session-options.d.ts +0 -70
  509. package/dist/agent-adapter/claude/session-options.js +0 -148
  510. package/dist/agent-adapter/claude/spawn-args.d.ts +0 -70
  511. package/dist/agent-adapter/claude/spawn-args.js +0 -367
  512. package/dist/agent-adapter/claude/tool-summarizers.d.ts +0 -2
  513. package/dist/agent-adapter/claude/tool-summarizers.js +0 -20
  514. package/dist/agent-adapter/claude/transcript-clear.d.ts +0 -42
  515. package/dist/agent-adapter/claude/transcript-clear.js +0 -217
  516. package/dist/agent-adapter/claude/transcript-path.d.ts +0 -39
  517. package/dist/agent-adapter/claude/transcript-path.js +0 -114
  518. package/dist/agent-adapter/claude/turn-machine.d.ts +0 -219
  519. package/dist/agent-adapter/claude/turn-machine.js +0 -728
  520. package/dist/agent-adapter/claude/window-warmup.d.ts +0 -13
  521. package/dist/agent-adapter/claude/window-warmup.js +0 -38
  522. package/dist/agent-adapter/continuation-phase.d.ts +0 -128
  523. package/dist/agent-adapter/continuation-phase.js +0 -340
  524. package/dist/agent-adapter/engine-injections.d.ts +0 -47
  525. package/dist/agent-adapter/engine-injections.js +0 -80
  526. package/dist/agent-adapter/mcp-remote-fetch.d.ts +0 -1
  527. package/dist/agent-adapter/mcp-remote-fetch.js +0 -32
  528. package/dist/agent-adapter/normalize/event-types.d.ts +0 -125
  529. package/dist/agent-adapter/normalize/event-types.js +0 -1
  530. package/dist/agent-adapter/normalize/prompt-builder.d.ts +0 -22
  531. package/dist/agent-adapter/normalize/prompt-builder.js +0 -41
  532. package/dist/agent-adapter/normalize/tool-result-images.d.ts +0 -11
  533. package/dist/agent-adapter/normalize/tool-result-images.js +0 -32
  534. package/dist/agent-adapter/pi/adapter.d.ts +0 -125
  535. package/dist/agent-adapter/pi/adapter.js +0 -275
  536. package/dist/agent-adapter/pi/agent-dir.d.ts +0 -57
  537. package/dist/agent-adapter/pi/agent-dir.js +0 -154
  538. package/dist/agent-adapter/pi/background-subagent.d.ts +0 -26
  539. package/dist/agent-adapter/pi/background-subagent.js +0 -1
  540. package/dist/agent-adapter/pi/child-events.d.ts +0 -13
  541. package/dist/agent-adapter/pi/child-events.js +0 -96
  542. package/dist/agent-adapter/pi/child-runner.d.ts +0 -31
  543. package/dist/agent-adapter/pi/child-runner.js +0 -133
  544. package/dist/agent-adapter/pi/child-session.d.ts +0 -28
  545. package/dist/agent-adapter/pi/child-session.js +0 -70
  546. package/dist/agent-adapter/pi/custom-catalog.d.ts +0 -10
  547. package/dist/agent-adapter/pi/custom-catalog.js +0 -38
  548. package/dist/agent-adapter/pi/defaults.d.ts +0 -7
  549. package/dist/agent-adapter/pi/defaults.js +0 -11
  550. package/dist/agent-adapter/pi/discovery.d.ts +0 -37
  551. package/dist/agent-adapter/pi/discovery.js +0 -33
  552. package/dist/agent-adapter/pi/engine.d.ts +0 -66
  553. package/dist/agent-adapter/pi/engine.js +0 -180
  554. package/dist/agent-adapter/pi/event-parser.d.ts +0 -43
  555. package/dist/agent-adapter/pi/event-parser.js +0 -446
  556. package/dist/agent-adapter/pi/extensions.d.ts +0 -33
  557. package/dist/agent-adapter/pi/extensions.js +0 -58
  558. package/dist/agent-adapter/pi/hook-bridge.d.ts +0 -54
  559. package/dist/agent-adapter/pi/hook-bridge.js +0 -394
  560. package/dist/agent-adapter/pi/image-first.d.ts +0 -3
  561. package/dist/agent-adapter/pi/image-first.js +0 -31
  562. package/dist/agent-adapter/pi/mcp-bridge-logic.d.ts +0 -32
  563. package/dist/agent-adapter/pi/mcp-bridge-logic.js +0 -63
  564. package/dist/agent-adapter/pi/mcp-bridge.d.ts +0 -65
  565. package/dist/agent-adapter/pi/mcp-bridge.js +0 -389
  566. package/dist/agent-adapter/pi/native-tool-policy.d.ts +0 -3
  567. package/dist/agent-adapter/pi/native-tool-policy.js +0 -11
  568. package/dist/agent-adapter/pi/pi-session.d.ts +0 -185
  569. package/dist/agent-adapter/pi/pi-session.js +0 -656
  570. package/dist/agent-adapter/pi/providers-config.d.ts +0 -60
  571. package/dist/agent-adapter/pi/providers-config.js +0 -96
  572. package/dist/agent-adapter/pi/quota-probe.d.ts +0 -12
  573. package/dist/agent-adapter/pi/quota-probe.js +0 -33
  574. package/dist/agent-adapter/pi/quota-sink.d.ts +0 -33
  575. package/dist/agent-adapter/pi/quota-sink.js +0 -57
  576. package/dist/agent-adapter/pi/runtime-settings.d.ts +0 -9
  577. package/dist/agent-adapter/pi/runtime-settings.js +0 -53
  578. package/dist/agent-adapter/pi/runtime.d.ts +0 -48
  579. package/dist/agent-adapter/pi/runtime.js +0 -163
  580. package/dist/agent-adapter/pi/session-files.d.ts +0 -2
  581. package/dist/agent-adapter/pi/session-files.js +0 -15
  582. package/dist/agent-adapter/pi/session-options.d.ts +0 -86
  583. package/dist/agent-adapter/pi/session-options.js +0 -162
  584. package/dist/agent-adapter/pi/session-support.d.ts +0 -54
  585. package/dist/agent-adapter/pi/session-support.js +0 -101
  586. package/dist/agent-adapter/pi/subagent-bridge.d.ts +0 -17
  587. package/dist/agent-adapter/pi/subagent-bridge.js +0 -1
  588. package/dist/agent-adapter/pi/subagent.d.ts +0 -100
  589. package/dist/agent-adapter/pi/subagent.js +0 -199
  590. package/dist/agent-adapter/pi/tool-shims.d.ts +0 -32
  591. package/dist/agent-adapter/pi/tool-shims.js +0 -148
  592. package/dist/agent-adapter/pi/ui-context.d.ts +0 -20
  593. package/dist/agent-adapter/pi/ui-context.js +0 -92
  594. package/dist/agent-adapter/pi/web-fetch.d.ts +0 -13
  595. package/dist/agent-adapter/pi/web-fetch.js +0 -196
  596. package/dist/agent-adapter/pi/web-search.d.ts +0 -9
  597. package/dist/agent-adapter/pi/web-search.js +0 -517
  598. package/dist/agent-adapter/run-events.d.ts +0 -165
  599. package/dist/agent-adapter/run-events.js +0 -119
  600. package/dist/agent-adapter/types.d.ts +0 -323
  601. package/dist/agent-adapter/types.js +0 -3
  602. package/dist/core/agents/roles.d.ts +0 -50
  603. package/dist/core/agents/roles.js +0 -176
  604. package/dist/core/agents/subagent/attribution.d.ts +0 -15
  605. package/dist/core/agents/subagent/attribution.js +0 -60
  606. package/dist/core/agents/subagent/catalog.d.ts +0 -65
  607. package/dist/core/agents/subagent/catalog.js +0 -200
  608. package/dist/core/agents/subagent/model-spec.d.ts +0 -28
  609. package/dist/core/agents/subagent/model-spec.js +0 -39
  610. package/dist/core/agents/subagent/orchestrate.d.ts +0 -25
  611. package/dist/core/agents/subagent/orchestrate.js +0 -92
  612. package/dist/core/agents/subagent/schema.d.ts +0 -12
  613. package/dist/core/agents/subagent/schema.js +0 -51
  614. package/dist/core/agents/subagent/types.d.ts +0 -84
  615. package/dist/core/agents/subagent/types.js +0 -1
  616. package/dist/core/agents/subagent/usage.d.ts +0 -8
  617. package/dist/core/agents/subagent/usage.js +0 -32
  618. package/dist/core/anthropic-model-discovery.d.ts +0 -54
  619. package/dist/core/anthropic-model-discovery.js +0 -156
  620. package/dist/core/anthropic-models.d.ts +0 -1
  621. package/dist/core/anthropic-models.js +0 -13
  622. package/dist/core/async-mutex.d.ts +0 -6
  623. package/dist/core/async-mutex.js +0 -32
  624. package/dist/core/atomic-write.d.ts +0 -9
  625. package/dist/core/atomic-write.js +0 -104
  626. package/dist/core/auth.d.ts +0 -40
  627. package/dist/core/auth.js +0 -94
  628. package/dist/core/board-action.d.ts +0 -19
  629. package/dist/core/board-action.js +0 -24
  630. package/dist/core/builtin-layer.d.ts +0 -22
  631. package/dist/core/builtin-layer.js +0 -45
  632. package/dist/core/cached-scan.d.ts +0 -42
  633. package/dist/core/cached-scan.js +0 -95
  634. package/dist/core/calver.d.ts +0 -1
  635. package/dist/core/calver.js +0 -25
  636. package/dist/core/claude-credentials.d.ts +0 -85
  637. package/dist/core/claude-credentials.js +0 -231
  638. package/dist/core/cli-utils.d.ts +0 -56
  639. package/dist/core/cli-utils.js +0 -70
  640. package/dist/core/codex-quota.d.ts +0 -27
  641. package/dist/core/codex-quota.js +0 -55
  642. package/dist/core/codex-token.d.ts +0 -4
  643. package/dist/core/codex-token.js +0 -26
  644. package/dist/core/config-generator.d.ts +0 -17
  645. package/dist/core/config-generator.js +0 -181
  646. package/dist/core/debug-mode.d.ts +0 -15
  647. package/dist/core/debug-mode.js +0 -22
  648. package/dist/core/exec-async.d.ts +0 -28
  649. package/dist/core/exec-async.js +0 -48
  650. package/dist/core/file-lock.d.ts +0 -15
  651. package/dist/core/file-lock.js +0 -164
  652. package/dist/core/format-duration.d.ts +0 -7
  653. package/dist/core/format-duration.js +0 -23
  654. package/dist/core/gateway-generator.d.ts +0 -135
  655. package/dist/core/gateway-generator.js +0 -521
  656. package/dist/core/git-availability.d.ts +0 -2
  657. package/dist/core/git-availability.js +0 -43
  658. package/dist/core/hook-bus.d.ts +0 -25
  659. package/dist/core/hook-bus.js +0 -106
  660. package/dist/core/hook-exec.d.ts +0 -15
  661. package/dist/core/hook-exec.js +0 -86
  662. package/dist/core/hook-scripts.d.ts +0 -19
  663. package/dist/core/hook-scripts.js +0 -30
  664. package/dist/core/i18n.d.ts +0 -19
  665. package/dist/core/i18n.js +0 -42
  666. package/dist/core/icons.d.ts +0 -72
  667. package/dist/core/icons.js +0 -71
  668. package/dist/core/json-repository.d.ts +0 -78
  669. package/dist/core/json-repository.js +0 -154
  670. package/dist/core/locales/en.d.ts +0 -910
  671. package/dist/core/locales/en.js +0 -32
  672. package/dist/core/locales/slices/commands.d.ts +0 -301
  673. package/dist/core/locales/slices/commands.js +0 -634
  674. package/dist/core/locales/slices/init.d.ts +0 -152
  675. package/dist/core/locales/slices/init.js +0 -429
  676. package/dist/core/locales/slices/interactions.d.ts +0 -47
  677. package/dist/core/locales/slices/interactions.js +0 -99
  678. package/dist/core/locales/slices/lang.d.ts +0 -8
  679. package/dist/core/locales/slices/lang.js +0 -15
  680. package/dist/core/locales/slices/notices.d.ts +0 -78
  681. package/dist/core/locales/slices/notices.js +0 -156
  682. package/dist/core/locales/slices/providers.d.ts +0 -43
  683. package/dist/core/locales/slices/providers.js +0 -87
  684. package/dist/core/locales/slices/scheduling.d.ts +0 -33
  685. package/dist/core/locales/slices/scheduling.js +0 -65
  686. package/dist/core/locales/slices/startup.d.ts +0 -10
  687. package/dist/core/locales/slices/startup.js +0 -19
  688. package/dist/core/locales/slices/status.d.ts +0 -48
  689. package/dist/core/locales/slices/status.js +0 -109
  690. package/dist/core/locales/slices/tui.d.ts +0 -93
  691. package/dist/core/locales/slices/tui.js +0 -192
  692. package/dist/core/locales/slices/uiextra.d.ts +0 -49
  693. package/dist/core/locales/slices/uiextra.js +0 -102
  694. package/dist/core/locales/slices/uimsg.d.ts +0 -74
  695. package/dist/core/locales/slices/uimsg.js +0 -158
  696. package/dist/core/locales/zh.d.ts +0 -5
  697. package/dist/core/locales/zh.js +0 -30
  698. package/dist/core/log.d.ts +0 -13
  699. package/dist/core/log.js +0 -157
  700. package/dist/core/loopback-http.d.ts +0 -6
  701. package/dist/core/loopback-http.js +0 -43
  702. package/dist/core/mcp-bundles.d.ts +0 -8
  703. package/dist/core/mcp-bundles.js +0 -47
  704. package/dist/core/mcp-timeout.d.ts +0 -1
  705. package/dist/core/mcp-timeout.js +0 -1
  706. package/dist/core/mcp-tool-gate.d.ts +0 -25
  707. package/dist/core/mcp-tool-gate.js +0 -97
  708. package/dist/core/media-types.d.ts +0 -20
  709. package/dist/core/media-types.js +0 -63
  710. package/dist/core/models-generator.d.ts +0 -29
  711. package/dist/core/models-generator.js +0 -82
  712. package/dist/core/native-name.d.ts +0 -4
  713. package/dist/core/native-name.js +0 -57
  714. package/dist/core/paths.d.ts +0 -63
  715. package/dist/core/paths.js +0 -105
  716. package/dist/core/pi-sdk.d.ts +0 -38
  717. package/dist/core/pi-session-filename.d.ts +0 -10
  718. package/dist/core/pi-session-filename.js +0 -49
  719. package/dist/core/platform-settings-spec.d.ts +0 -47
  720. package/dist/core/platform-settings-spec.js +0 -28
  721. package/dist/core/private-dir.d.ts +0 -13
  722. package/dist/core/private-dir.js +0 -48
  723. package/dist/core/process-command-line.d.ts +0 -6
  724. package/dist/core/process-command-line.js +0 -39
  725. package/dist/core/prompt-template.d.ts +0 -14
  726. package/dist/core/prompt-template.js +0 -29
  727. package/dist/core/rebuild-progress.d.ts +0 -59
  728. package/dist/core/rebuild-progress.js +0 -106
  729. package/dist/core/resilient-watch.d.ts +0 -28
  730. package/dist/core/resilient-watch.js +0 -108
  731. package/dist/core/resume-reminder.d.ts +0 -5
  732. package/dist/core/resume-reminder.js +0 -12
  733. package/dist/core/run-registry.d.ts +0 -134
  734. package/dist/core/run-registry.js +0 -256
  735. package/dist/core/runtime-env.d.ts +0 -1
  736. package/dist/core/runtime-env.js +0 -11
  737. package/dist/core/session-holds.d.ts +0 -88
  738. package/dist/core/session-holds.js +0 -168
  739. package/dist/core/session-state.d.ts +0 -32
  740. package/dist/core/session-state.js +0 -39
  741. package/dist/core/session-todos.d.ts +0 -12
  742. package/dist/core/session-todos.js +0 -44
  743. package/dist/core/settings-migration.d.ts +0 -5
  744. package/dist/core/settings-migration.js +0 -128
  745. package/dist/core/settings-spec.d.ts +0 -296
  746. package/dist/core/settings-spec.js +0 -305
  747. package/dist/core/settings.d.ts +0 -19
  748. package/dist/core/settings.js +0 -492
  749. package/dist/core/short-session-id.d.ts +0 -2
  750. package/dist/core/short-session-id.js +0 -4
  751. package/dist/core/singleton-lock.d.ts +0 -39
  752. package/dist/core/singleton-lock.js +0 -127
  753. package/dist/core/status-format.d.ts +0 -70
  754. package/dist/core/status-format.js +0 -59
  755. package/dist/core/subagent-spawn.d.ts +0 -40
  756. package/dist/core/subagent-spawn.js +0 -47
  757. package/dist/core/team-action.d.ts +0 -28
  758. package/dist/core/team-action.js +0 -65
  759. package/dist/core/todo.d.ts +0 -18
  760. package/dist/core/todo.js +0 -79
  761. package/dist/core/tool-names.d.ts +0 -12
  762. package/dist/core/tool-names.js +0 -65
  763. package/dist/core/types/agent-types.d.ts +0 -171
  764. package/dist/core/types/agent-types.js +0 -1
  765. package/dist/core/types/environment-types.d.ts +0 -50
  766. package/dist/core/types/environment-types.js +0 -1
  767. package/dist/core/utils.d.ts +0 -72
  768. package/dist/core/utils.js +0 -176
  769. package/dist/core/version.d.ts +0 -6
  770. package/dist/core/version.js +0 -11
  771. package/dist/core/workspace-filenames.d.ts +0 -9
  772. package/dist/core/workspace-filenames.js +0 -61
  773. package/dist/domain/agents/agent-state.d.ts +0 -19
  774. package/dist/domain/agents/agent-state.js +0 -73
  775. package/dist/domain/agents/agent-switch.d.ts +0 -16
  776. package/dist/domain/agents/agent-switch.js +0 -30
  777. package/dist/domain/agents/config.d.ts +0 -20
  778. package/dist/domain/agents/config.js +0 -89
  779. package/dist/domain/agents/engine-selection.d.ts +0 -21
  780. package/dist/domain/agents/engine-selection.js +0 -37
  781. package/dist/domain/agents/environments/entities.d.ts +0 -50
  782. package/dist/domain/agents/environments/entities.js +0 -94
  783. package/dist/domain/agents/environments/file-refs.d.ts +0 -20
  784. package/dist/domain/agents/environments/file-refs.js +0 -51
  785. package/dist/domain/agents/environments/index.d.ts +0 -7
  786. package/dist/domain/agents/environments/index.js +0 -9
  787. package/dist/domain/agents/environments/paths.d.ts +0 -7
  788. package/dist/domain/agents/environments/paths.js +0 -9
  789. package/dist/domain/agents/environments/prompt-includes.d.ts +0 -1
  790. package/dist/domain/agents/environments/prompt-includes.js +0 -91
  791. package/dist/domain/agents/environments/registry.d.ts +0 -17
  792. package/dist/domain/agents/environments/registry.js +0 -162
  793. package/dist/domain/agents/environments/resolve.d.ts +0 -11
  794. package/dist/domain/agents/environments/resolve.js +0 -36
  795. package/dist/domain/agents/environments/schema.d.ts +0 -68
  796. package/dist/domain/agents/environments/schema.js +0 -114
  797. package/dist/domain/agents/environments/schema.parity.d.ts +0 -1
  798. package/dist/domain/agents/environments/schema.parity.js +0 -7
  799. package/dist/domain/agents/environments/system-prompt.d.ts +0 -37
  800. package/dist/domain/agents/environments/system-prompt.js +0 -110
  801. package/dist/domain/agents/index.d.ts +0 -6
  802. package/dist/domain/agents/index.js +0 -7
  803. package/dist/domain/agents/model-selection.d.ts +0 -30
  804. package/dist/domain/agents/model-selection.js +0 -111
  805. package/dist/domain/agents/models.d.ts +0 -12
  806. package/dist/domain/agents/models.js +0 -94
  807. package/dist/domain/agents/provider-run-lifecycle.d.ts +0 -11
  808. package/dist/domain/agents/provider-run-lifecycle.js +0 -17
  809. package/dist/domain/agents/subagent/background-spend.d.ts +0 -17
  810. package/dist/domain/agents/subagent/background-spend.js +0 -42
  811. package/dist/domain/agents/subagent/foreign.d.ts +0 -13
  812. package/dist/domain/agents/subagent/foreign.js +0 -30
  813. package/dist/domain/agents/subagent/registry.d.ts +0 -106
  814. package/dist/domain/agents/subagent/registry.js +0 -272
  815. package/dist/domain/agents/subagent/runner.d.ts +0 -61
  816. package/dist/domain/agents/subagent/runner.js +0 -301
  817. package/dist/domain/agents/subagent/service.d.ts +0 -26
  818. package/dist/domain/agents/subagent/service.js +0 -68
  819. package/dist/domain/auth/anthropic-env.d.ts +0 -20
  820. package/dist/domain/auth/anthropic-env.js +0 -132
  821. package/dist/domain/auth/auth-events.d.ts +0 -18
  822. package/dist/domain/auth/auth-events.js +0 -34
  823. package/dist/domain/auth/auth-format.d.ts +0 -2
  824. package/dist/domain/auth/auth-format.js +0 -53
  825. package/dist/domain/auth/auth-status.d.ts +0 -63
  826. package/dist/domain/auth/auth-status.js +0 -286
  827. package/dist/domain/auth/auth-watch.d.ts +0 -16
  828. package/dist/domain/auth/auth-watch.js +0 -136
  829. package/dist/domain/auth/cc-auth-cli.d.ts +0 -30
  830. package/dist/domain/auth/cc-login.d.ts +0 -7
  831. package/dist/domain/auth/cc-login.js +0 -20
  832. package/dist/domain/auth/cc-subscription.d.ts +0 -18
  833. package/dist/domain/auth/cc-subscription.js +0 -54
  834. package/dist/domain/auth/claude-account-credentials.d.ts +0 -13
  835. package/dist/domain/auth/claude-account-credentials.js +0 -22
  836. package/dist/domain/auth/claude-user-settings.d.ts +0 -22
  837. package/dist/domain/auth/claude-user-settings.js +0 -104
  838. package/dist/domain/auth/codex-credentials.d.ts +0 -13
  839. package/dist/domain/auth/codex-credentials.js +0 -25
  840. package/dist/domain/auth/gateway-sync.d.ts +0 -19
  841. package/dist/domain/auth/gateway-sync.js +0 -46
  842. package/dist/domain/auth/index.d.ts +0 -14
  843. package/dist/domain/auth/index.js +0 -14
  844. package/dist/domain/auth/login-flow.d.ts +0 -141
  845. package/dist/domain/auth/login-flow.js +0 -339
  846. package/dist/domain/auth/login-service.d.ts +0 -33
  847. package/dist/domain/auth/login-service.js +0 -65
  848. package/dist/domain/auth/logout.d.ts +0 -32
  849. package/dist/domain/auth/logout.js +0 -156
  850. package/dist/domain/auth/pi-login.d.ts +0 -26
  851. package/dist/domain/auth/pi-login.js +0 -70
  852. package/dist/domain/auth/pi-oauth.d.ts +0 -26
  853. package/dist/domain/auth/pi-oauth.js +0 -85
  854. package/dist/domain/auth/pi-runtime.d.ts +0 -82
  855. package/dist/domain/auth/pi-runtime.js +0 -40
  856. package/dist/domain/benchmark/accounting-reconciliation.d.ts +0 -117
  857. package/dist/domain/benchmark/accounting-reconciliation.js +0 -174
  858. package/dist/domain/benchmark/atif.d.ts +0 -42
  859. package/dist/domain/benchmark/atif.js +0 -263
  860. package/dist/domain/benchmark/attempt-record.d.ts +0 -167
  861. package/dist/domain/benchmark/attempt-record.js +0 -113
  862. package/dist/domain/benchmark/benchmark-types.d.ts +0 -17
  863. package/dist/domain/benchmark/benchmark-types.js +0 -1
  864. package/dist/domain/benchmark/composite-manifest.d.ts +0 -117
  865. package/dist/domain/benchmark/composite-manifest.js +0 -477
  866. package/dist/domain/benchmark/decimal-text.d.ts +0 -22
  867. package/dist/domain/benchmark/decimal-text.js +0 -42
  868. package/dist/domain/benchmark/identity.d.ts +0 -39
  869. package/dist/domain/benchmark/identity.js +0 -70
  870. package/dist/domain/benchmark/journal.d.ts +0 -47
  871. package/dist/domain/benchmark/journal.js +0 -254
  872. package/dist/domain/benchmark/manifest-contract.d.ts +0 -30
  873. package/dist/domain/benchmark/manifest-contract.js +0 -118
  874. package/dist/domain/benchmark/production-attempt-identity.d.ts +0 -73
  875. package/dist/domain/benchmark/production-attempt-identity.js +0 -372
  876. package/dist/domain/benchmark/production-attempt-journal.d.ts +0 -38
  877. package/dist/domain/benchmark/production-attempt-journal.js +0 -267
  878. package/dist/domain/benchmark/production-benchmark-evidence.d.ts +0 -2
  879. package/dist/domain/benchmark/production-benchmark-evidence.js +0 -67
  880. package/dist/domain/benchmark/production-evidence-export.d.ts +0 -14
  881. package/dist/domain/benchmark/production-evidence-export.js +0 -134
  882. package/dist/domain/benchmark/production-evidence-journal.d.ts +0 -11
  883. package/dist/domain/benchmark/production-evidence-journal.js +0 -81
  884. package/dist/domain/benchmark/production-evidence-projection.d.ts +0 -39
  885. package/dist/domain/benchmark/production-evidence-projection.js +0 -392
  886. package/dist/domain/benchmark/role-surface.d.ts +0 -4
  887. package/dist/domain/benchmark/role-surface.js +0 -117
  888. package/dist/domain/benchmark/session-evidence.d.ts +0 -7
  889. package/dist/domain/benchmark/session-evidence.js +0 -34
  890. package/dist/domain/boards/board-context.d.ts +0 -17
  891. package/dist/domain/boards/board-context.js +0 -11
  892. package/dist/domain/boards/board-paths.d.ts +0 -18
  893. package/dist/domain/boards/board-paths.js +0 -32
  894. package/dist/domain/boards/board-service.d.ts +0 -50
  895. package/dist/domain/boards/board-service.js +0 -146
  896. package/dist/domain/boards/board-watcher.d.ts +0 -36
  897. package/dist/domain/boards/board-watcher.js +0 -284
  898. package/dist/domain/boards/decision-projection.d.ts +0 -46
  899. package/dist/domain/boards/decision-projection.js +0 -44
  900. package/dist/domain/browser/broker.d.ts +0 -99
  901. package/dist/domain/browser/broker.js +0 -487
  902. package/dist/domain/costs/account-reset.d.ts +0 -30
  903. package/dist/domain/costs/account-reset.js +0 -98
  904. package/dist/domain/costs/aistatus-config.d.ts +0 -27
  905. package/dist/domain/costs/aistatus-config.js +0 -56
  906. package/dist/domain/costs/claude-account.d.ts +0 -34
  907. package/dist/domain/costs/claude-account.js +0 -170
  908. package/dist/domain/costs/codex-account.d.ts +0 -55
  909. package/dist/domain/costs/codex-account.js +0 -155
  910. package/dist/domain/costs/cost-tracker.d.ts +0 -181
  911. package/dist/domain/costs/cost-tracker.js +0 -350
  912. package/dist/domain/costs/gateway-manager.d.ts +0 -6
  913. package/dist/domain/costs/gateway-manager.js +0 -225
  914. package/dist/domain/costs/rate-limit-throttle.d.ts +0 -78
  915. package/dist/domain/costs/rate-limit-throttle.js +0 -502
  916. package/dist/domain/costs/reset-account.d.ts +0 -36
  917. package/dist/domain/costs/reset-account.js +0 -5
  918. package/dist/domain/costs/resume-registry.d.ts +0 -30
  919. package/dist/domain/costs/resume-registry.js +0 -108
  920. package/dist/domain/costs/usage-service.d.ts +0 -80
  921. package/dist/domain/costs/usage-service.js +0 -618
  922. package/dist/domain/costs/usage-store.d.ts +0 -83
  923. package/dist/domain/costs/usage-store.js +0 -104
  924. package/dist/domain/executions/registry.d.ts +0 -47
  925. package/dist/domain/executions/registry.js +0 -100
  926. package/dist/domain/hooks/hook-view.d.ts +0 -22
  927. package/dist/domain/hooks/hook-view.js +0 -34
  928. package/dist/domain/mcp/bundled-server.d.ts +0 -19
  929. package/dist/domain/mcp/feishu/client.d.ts +0 -46
  930. package/dist/domain/mcp/feishu/client.js +0 -91
  931. package/dist/domain/mcp/feishu/file.d.ts +0 -14
  932. package/dist/domain/mcp/feishu/file.js +0 -88
  933. package/dist/domain/mcp/feishu/types.d.ts +0 -31
  934. package/dist/domain/mcp/feishu/types.js +0 -34
  935. package/dist/domain/mcp/feishu/user-auth.d.ts +0 -140
  936. package/dist/domain/mcp/feishu/user-auth.js +0 -278
  937. package/dist/domain/mcp/tools/agents-md.d.ts +0 -16
  938. package/dist/domain/mcp/tools/agents-md.js +0 -34
  939. package/dist/domain/mcp/tools/catalog-owner.d.ts +0 -3
  940. package/dist/domain/mcp/tools/catalog-owner.js +0 -23
  941. package/dist/domain/mcp/tools/context.d.ts +0 -70
  942. package/dist/domain/mcp/tools/context.js +0 -107
  943. package/dist/domain/mcp/tools/cost.d.ts +0 -2
  944. package/dist/domain/mcp/tools/cost.js +0 -56
  945. package/dist/domain/mcp/tools/executions.d.ts +0 -2
  946. package/dist/domain/mcp/tools/executions.js +0 -71
  947. package/dist/domain/mcp/tools/interaction-ask.d.ts +0 -37
  948. package/dist/domain/mcp/tools/interaction-ask.js +0 -131
  949. package/dist/domain/mcp/tools/interaction-plan.d.ts +0 -34
  950. package/dist/domain/mcp/tools/interaction-plan.js +0 -116
  951. package/dist/domain/mcp/tools/remote-devices.d.ts +0 -9
  952. package/dist/domain/mcp/tools/remote-devices.js +0 -28
  953. package/dist/domain/mcp/tools/remote-file.d.ts +0 -24
  954. package/dist/domain/mcp/tools/remote-file.js +0 -52
  955. package/dist/domain/mcp/tools/remote-ops.d.ts +0 -3
  956. package/dist/domain/mcp/tools/remote-ops.js +0 -359
  957. package/dist/domain/mcp/tools/slack.d.ts +0 -23
  958. package/dist/domain/mcp/tools/slack.js +0 -106
  959. package/dist/domain/mcp/tools/subagent.d.ts +0 -23
  960. package/dist/domain/mcp/tools/subagent.js +0 -179
  961. package/dist/domain/mcp/tools/time.d.ts +0 -2
  962. package/dist/domain/mcp/tools/time.js +0 -62
  963. package/dist/domain/mcp/tools/ui-board.d.ts +0 -12
  964. package/dist/domain/mcp/tools/ui-board.js +0 -48
  965. package/dist/domain/mcp/tools/ui-decision.d.ts +0 -3
  966. package/dist/domain/mcp/tools/ui-decision.js +0 -37
  967. package/dist/domain/mcp/tools/ui-file.d.ts +0 -3
  968. package/dist/domain/mcp/tools/ui-file.js +0 -70
  969. package/dist/domain/mcp/tools/ui-view.d.ts +0 -3
  970. package/dist/domain/mcp/tools/ui-view.js +0 -44
  971. package/dist/domain/mcp/tools/waitpoint.d.ts +0 -28
  972. package/dist/domain/mcp/tools/waitpoint.js +0 -109
  973. package/dist/domain/mcp/tools/workers.d.ts +0 -5
  974. package/dist/domain/mcp/tools/workers.js +0 -77
  975. package/dist/domain/memory/agents-md-injector.d.ts +0 -25
  976. package/dist/domain/memory/agents-md-injector.js +0 -58
  977. package/dist/domain/memory/consolidate.d.ts +0 -56
  978. package/dist/domain/memory/consolidate.js +0 -419
  979. package/dist/domain/memory/index-regen.d.ts +0 -30
  980. package/dist/domain/memory/index-regen.js +0 -334
  981. package/dist/domain/memory/rules-loader.d.ts +0 -6
  982. package/dist/domain/memory/rules-loader.js +0 -13
  983. package/dist/domain/memory/user-context.d.ts +0 -5
  984. package/dist/domain/memory/user-context.js +0 -32
  985. package/dist/domain/memory/watcher.d.ts +0 -8
  986. package/dist/domain/memory/watcher.js +0 -135
  987. package/dist/domain/monitor/disk-monitor.d.ts +0 -17
  988. package/dist/domain/monitor/disk-monitor.js +0 -117
  989. package/dist/domain/monitor/event-loop-monitor.d.ts +0 -33
  990. package/dist/domain/monitor/event-loop-monitor.js +0 -60
  991. package/dist/domain/monitor/gpu-monitor.d.ts +0 -26
  992. package/dist/domain/monitor/gpu-monitor.js +0 -132
  993. package/dist/domain/pi-providers/custom-provider-model.d.ts +0 -49
  994. package/dist/domain/pi-providers/custom-provider-model.js +0 -116
  995. package/dist/domain/pi-providers/custom-provider-service.d.ts +0 -57
  996. package/dist/domain/pi-providers/custom-provider-service.js +0 -153
  997. package/dist/domain/pi-providers/gateway-route-store.d.ts +0 -23
  998. package/dist/domain/pi-providers/gateway-route-store.js +0 -74
  999. package/dist/domain/pi-providers/index.d.ts +0 -3
  1000. package/dist/domain/pi-providers/index.js +0 -3
  1001. package/dist/domain/pi-providers/models-json-store.d.ts +0 -6
  1002. package/dist/domain/pi-providers/models-json-store.js +0 -73
  1003. package/dist/domain/plugins/agent-plugins-v1.d.ts +0 -58
  1004. package/dist/domain/plugins/agent-plugins-v1.js +0 -84
  1005. package/dist/domain/plugins/authoring.d.ts +0 -39
  1006. package/dist/domain/plugins/authoring.js +0 -320
  1007. package/dist/domain/plugins/builtin.d.ts +0 -25
  1008. package/dist/domain/plugins/builtin.js +0 -44
  1009. package/dist/domain/plugins/catalog-types.d.ts +0 -89
  1010. package/dist/domain/plugins/catalog-types.js +0 -39
  1011. package/dist/domain/plugins/catalog.d.ts +0 -39
  1012. package/dist/domain/plugins/catalog.js +0 -482
  1013. package/dist/domain/plugins/conversation-skills.d.ts +0 -10
  1014. package/dist/domain/plugins/conversation-skills.js +0 -22
  1015. package/dist/domain/plugins/fs-helpers.d.ts +0 -9
  1016. package/dist/domain/plugins/fs-helpers.js +0 -107
  1017. package/dist/domain/plugins/mcp.d.ts +0 -6
  1018. package/dist/domain/plugins/mcp.js +0 -223
  1019. package/dist/domain/plugins/runtime-gc.d.ts +0 -10
  1020. package/dist/domain/plugins/runtime-gc.js +0 -68
  1021. package/dist/domain/plugins/runtime.d.ts +0 -21
  1022. package/dist/domain/plugins/runtime.js +0 -554
  1023. package/dist/domain/plugins/skill-projection.d.ts +0 -19
  1024. package/dist/domain/plugins/skill-projection.js +0 -193
  1025. package/dist/domain/plugins/skill.d.ts +0 -14
  1026. package/dist/domain/plugins/skill.js +0 -145
  1027. package/dist/domain/projects/index.d.ts +0 -3
  1028. package/dist/domain/projects/index.js +0 -3
  1029. package/dist/domain/projects/project-store.d.ts +0 -72
  1030. package/dist/domain/projects/project-store.js +0 -240
  1031. package/dist/domain/projects/project-types.d.ts +0 -11
  1032. package/dist/domain/projects/project-types.js +0 -1
  1033. package/dist/domain/remote/client-bootstrap.d.ts +0 -1
  1034. package/dist/domain/remote/client-bootstrap.js +0 -126
  1035. package/dist/domain/remote/client-hot-reload.d.ts +0 -40
  1036. package/dist/domain/remote/client-hot-reload.js +0 -269
  1037. package/dist/domain/remote/client-lifecycle.d.ts +0 -32
  1038. package/dist/domain/remote/client-lifecycle.js +0 -382
  1039. package/dist/domain/remote/client-manager.d.ts +0 -54
  1040. package/dist/domain/remote/client-manager.js +0 -320
  1041. package/dist/domain/remote/client-pids.d.ts +0 -13
  1042. package/dist/domain/remote/client-pids.js +0 -43
  1043. package/dist/domain/remote/client-protocol.d.ts +0 -1
  1044. package/dist/domain/remote/client-protocol.js +0 -1
  1045. package/dist/domain/remote/client-remove.d.ts +0 -61
  1046. package/dist/domain/remote/client-remove.js +0 -129
  1047. package/dist/domain/remote/client-ssh-tunnel.d.ts +0 -79
  1048. package/dist/domain/remote/client-ssh-tunnel.js +0 -352
  1049. package/dist/domain/remote/device-browser.d.ts +0 -38
  1050. package/dist/domain/remote/device-browser.js +0 -158
  1051. package/dist/domain/remote/device-chrome-commands.d.ts +0 -18
  1052. package/dist/domain/remote/device-chrome-commands.js +0 -125
  1053. package/dist/domain/remote/device-file.d.ts +0 -51
  1054. package/dist/domain/remote/device-file.js +0 -193
  1055. package/dist/domain/remote/device-port.d.ts +0 -23
  1056. package/dist/domain/remote/device-port.js +0 -192
  1057. package/dist/domain/remote/local-client-install.d.ts +0 -32
  1058. package/dist/domain/remote/local-client-install.js +0 -168
  1059. package/dist/domain/remote/local-client-stop.d.ts +0 -37
  1060. package/dist/domain/remote/local-client-stop.js +0 -101
  1061. package/dist/domain/remote/machine-registry.d.ts +0 -54
  1062. package/dist/domain/remote/machine-registry.js +0 -184
  1063. package/dist/domain/remote/owned-local-launch.d.ts +0 -22
  1064. package/dist/domain/remote/owned-local-launch.js +0 -75
  1065. package/dist/domain/remote/package-client-bundle.d.ts +0 -14
  1066. package/dist/domain/remote/package-client-bundle.js +0 -37
  1067. package/dist/domain/remote/reverse-stream.d.ts +0 -42
  1068. package/dist/domain/remote/reverse-stream.js +0 -95
  1069. package/dist/domain/remote/ssh-exec.d.ts +0 -10
  1070. package/dist/domain/remote/ssh-exec.js +0 -25
  1071. package/dist/domain/runs/adapters.d.ts +0 -15
  1072. package/dist/domain/runs/adapters.js +0 -59
  1073. package/dist/domain/runs/attempt.d.ts +0 -37
  1074. package/dist/domain/runs/attempt.js +0 -232
  1075. package/dist/domain/runs/builders.d.ts +0 -27
  1076. package/dist/domain/runs/builders.js +0 -47
  1077. package/dist/domain/runs/compact.d.ts +0 -30
  1078. package/dist/domain/runs/compact.js +0 -43
  1079. package/dist/domain/runs/config-resolver.d.ts +0 -26
  1080. package/dist/domain/runs/config-resolver.js +0 -38
  1081. package/dist/domain/runs/engine-spec.d.ts +0 -40
  1082. package/dist/domain/runs/engine-spec.js +0 -215
  1083. package/dist/domain/runs/engines.d.ts +0 -71
  1084. package/dist/domain/runs/engines.js +0 -181
  1085. package/dist/domain/runs/events.d.ts +0 -2
  1086. package/dist/domain/runs/events.js +0 -1
  1087. package/dist/domain/runs/fallback.d.ts +0 -11
  1088. package/dist/domain/runs/fallback.js +0 -18
  1089. package/dist/domain/runs/mode-env.d.ts +0 -16
  1090. package/dist/domain/runs/mode-env.js +0 -48
  1091. package/dist/domain/runs/notices.d.ts +0 -44
  1092. package/dist/domain/runs/notices.js +0 -109
  1093. package/dist/domain/runs/observers/resume-recorder.d.ts +0 -26
  1094. package/dist/domain/runs/observers/resume-recorder.js +0 -27
  1095. package/dist/domain/runs/prompt.d.ts +0 -78
  1096. package/dist/domain/runs/prompt.js +0 -98
  1097. package/dist/domain/runs/request.d.ts +0 -99
  1098. package/dist/domain/runs/request.js +0 -1
  1099. package/dist/domain/runs/retryable-errors.d.ts +0 -5
  1100. package/dist/domain/runs/retryable-errors.js +0 -22
  1101. package/dist/domain/runs/run.d.ts +0 -238
  1102. package/dist/domain/runs/run.js +0 -574
  1103. package/dist/domain/runs/service.d.ts +0 -12
  1104. package/dist/domain/runs/service.js +0 -49
  1105. package/dist/domain/runs/spec-loader.d.ts +0 -75
  1106. package/dist/domain/runs/spec-loader.js +0 -58
  1107. package/dist/domain/runs/spend.d.ts +0 -16
  1108. package/dist/domain/runs/spend.js +0 -31
  1109. package/dist/domain/scheduling/builtin-job-controller.d.ts +0 -19
  1110. package/dist/domain/scheduling/builtin-job-controller.js +0 -103
  1111. package/dist/domain/scheduling/builtin-job-migration.d.ts +0 -23
  1112. package/dist/domain/scheduling/builtin-job-migration.js +0 -64
  1113. package/dist/domain/scheduling/builtin-jobs.d.ts +0 -2
  1114. package/dist/domain/scheduling/builtin-jobs.js +0 -37
  1115. package/dist/domain/scheduling/job-registry.d.ts +0 -22
  1116. package/dist/domain/scheduling/job-registry.js +0 -16
  1117. package/dist/domain/scheduling/jobs/auth-expiry-scan.d.ts +0 -15
  1118. package/dist/domain/scheduling/jobs/auth-expiry-scan.js +0 -75
  1119. package/dist/domain/scheduling/jobs/scheduled-task.d.ts +0 -24
  1120. package/dist/domain/scheduling/jobs/scheduled-task.js +0 -112
  1121. package/dist/domain/scheduling/jobs/sync-public.d.ts +0 -4
  1122. package/dist/domain/scheduling/jobs/sync-public.js +0 -40
  1123. package/dist/domain/scheduling/run-guards.d.ts +0 -6
  1124. package/dist/domain/scheduling/run-guards.js +0 -18
  1125. package/dist/domain/scheduling/runner.d.ts +0 -17
  1126. package/dist/domain/scheduling/runner.js +0 -22
  1127. package/dist/domain/scheduling/schedule-ops.d.ts +0 -15
  1128. package/dist/domain/scheduling/schedule-ops.js +0 -43
  1129. package/dist/domain/scheduling/schedule-selection.d.ts +0 -3
  1130. package/dist/domain/scheduling/schedule-selection.js +0 -16
  1131. package/dist/domain/scheduling/schedule-spec.d.ts +0 -79
  1132. package/dist/domain/scheduling/schedule-spec.js +0 -169
  1133. package/dist/domain/scheduling/scheduler.d.ts +0 -75
  1134. package/dist/domain/scheduling/scheduler.js +0 -303
  1135. package/dist/domain/sessions/session-backup.d.ts +0 -44
  1136. package/dist/domain/sessions/session-backup.js +0 -138
  1137. package/dist/domain/sessions/session-hooks.d.ts +0 -130
  1138. package/dist/domain/sessions/session-hooks.js +0 -347
  1139. package/dist/domain/sessions/session-lifecycle.d.ts +0 -91
  1140. package/dist/domain/sessions/session-lifecycle.js +0 -82
  1141. package/dist/domain/sessions/session-retention.d.ts +0 -50
  1142. package/dist/domain/sessions/session-retention.js +0 -466
  1143. package/dist/domain/sessions/session-use.d.ts +0 -28
  1144. package/dist/domain/sessions/session-use.js +0 -45
  1145. package/dist/domain/sessions/session.d.ts +0 -3
  1146. package/dist/domain/sessions/session.js +0 -13
  1147. package/dist/domain/sessions/team.d.ts +0 -26
  1148. package/dist/domain/sessions/team.js +0 -30
  1149. package/dist/domain/system/doctor.d.ts +0 -82
  1150. package/dist/domain/system/doctor.js +0 -484
  1151. package/dist/domain/system/github-release.d.ts +0 -16
  1152. package/dist/domain/system/github-release.js +0 -101
  1153. package/dist/domain/system/install-cli.d.ts +0 -7
  1154. package/dist/domain/system/install-cli.js +0 -107
  1155. package/dist/domain/system/notice-history.d.ts +0 -18
  1156. package/dist/domain/system/notice-history.js +0 -23
  1157. package/dist/domain/system/own-bin-path.d.ts +0 -13
  1158. package/dist/domain/system/own-bin-path.js +0 -36
  1159. package/dist/domain/system/preferences.d.ts +0 -30
  1160. package/dist/domain/system/preferences.js +0 -59
  1161. package/dist/domain/system/rebuild-hold.d.ts +0 -36
  1162. package/dist/domain/system/rebuild-hold.js +0 -83
  1163. package/dist/domain/system/server-update-check.d.ts +0 -24
  1164. package/dist/domain/system/server-update-check.js +0 -88
  1165. package/dist/domain/system/server-update-coordinator.d.ts +0 -46
  1166. package/dist/domain/system/server-update-coordinator.js +0 -155
  1167. package/dist/domain/system/server-update-install.d.ts +0 -16
  1168. package/dist/domain/system/server-update-install.js +0 -65
  1169. package/dist/domain/system/system-notice.d.ts +0 -24
  1170. package/dist/domain/system/system-notice.js +0 -31
  1171. package/dist/domain/system/terminal-cli/index.d.ts +0 -58
  1172. package/dist/domain/system/terminal-cli/index.js +0 -100
  1173. package/dist/domain/system/terminal-cli/posix-profiles.d.ts +0 -23
  1174. package/dist/domain/system/terminal-cli/posix-profiles.js +0 -74
  1175. package/dist/domain/system/terminal-cli/registrar.d.ts +0 -12
  1176. package/dist/domain/system/terminal-cli/registrar.js +0 -1
  1177. package/dist/domain/system/terminal-cli/shims.d.ts +0 -27
  1178. package/dist/domain/system/terminal-cli/shims.js +0 -108
  1179. package/dist/domain/system/terminal-cli/state.d.ts +0 -7
  1180. package/dist/domain/system/terminal-cli/state.js +0 -36
  1181. package/dist/domain/system/terminal-cli/windows-user-path.d.ts +0 -13
  1182. package/dist/domain/system/terminal-cli/windows-user-path.js +0 -67
  1183. package/dist/domain/system/update-prompt.d.ts +0 -8
  1184. package/dist/domain/system/update-prompt.js +0 -1
  1185. package/dist/domain/system/update-state.d.ts +0 -9
  1186. package/dist/domain/system/update-state.js +0 -22
  1187. package/dist/domain/system/update-ui-state.d.ts +0 -39
  1188. package/dist/domain/system/update-ui-state.js +0 -70
  1189. package/dist/domain/tui-session/index.d.ts +0 -2
  1190. package/dist/domain/tui-session/index.js +0 -1
  1191. package/dist/domain/tui-session/tui-session-service.d.ts +0 -2
  1192. package/dist/domain/tui-session/tui-session-service.js +0 -85
  1193. package/dist/domain/tui-session/types.d.ts +0 -40
  1194. package/dist/domain/tui-session/types.js +0 -1
  1195. package/dist/domain/ui-service/app-router.d.ts +0 -1136
  1196. package/dist/domain/ui-service/app-router.js +0 -305
  1197. package/dist/domain/ui-service/assistant-snapshots.d.ts +0 -10
  1198. package/dist/domain/ui-service/assistant-snapshots.js +0 -45
  1199. package/dist/domain/ui-service/contract.parity.d.ts +0 -19
  1200. package/dist/domain/ui-service/contract.parity.js +0 -1
  1201. package/dist/domain/ui-service/index.d.ts +0 -4
  1202. package/dist/domain/ui-service/index.js +0 -1
  1203. package/dist/domain/ui-service/inline-media-types.d.ts +0 -18
  1204. package/dist/domain/ui-service/inline-media-types.js +0 -1
  1205. package/dist/domain/ui-service/input-schemas.d.ts +0 -1068
  1206. package/dist/domain/ui-service/input-schemas.js +0 -702
  1207. package/dist/domain/ui-service/mutate/approvals.d.ts +0 -32
  1208. package/dist/domain/ui-service/mutate/approvals.js +0 -133
  1209. package/dist/domain/ui-service/mutate/auth.d.ts +0 -15
  1210. package/dist/domain/ui-service/mutate/auth.js +0 -103
  1211. package/dist/domain/ui-service/mutate/config.d.ts +0 -18
  1212. package/dist/domain/ui-service/mutate/config.js +0 -108
  1213. package/dist/domain/ui-service/mutate/custom-providers.d.ts +0 -8
  1214. package/dist/domain/ui-service/mutate/custom-providers.js +0 -33
  1215. package/dist/domain/ui-service/mutate/environments.d.ts +0 -27
  1216. package/dist/domain/ui-service/mutate/environments.js +0 -66
  1217. package/dist/domain/ui-service/mutate/errors.d.ts +0 -7
  1218. package/dist/domain/ui-service/mutate/errors.js +0 -14
  1219. package/dist/domain/ui-service/mutate/executions.d.ts +0 -4
  1220. package/dist/domain/ui-service/mutate/executions.js +0 -15
  1221. package/dist/domain/ui-service/mutate/hooks.d.ts +0 -12
  1222. package/dist/domain/ui-service/mutate/hooks.js +0 -110
  1223. package/dist/domain/ui-service/mutate/issues.d.ts +0 -18
  1224. package/dist/domain/ui-service/mutate/issues.js +0 -100
  1225. package/dist/domain/ui-service/mutate/models.d.ts +0 -13
  1226. package/dist/domain/ui-service/mutate/models.js +0 -137
  1227. package/dist/domain/ui-service/mutate/notes.d.ts +0 -6
  1228. package/dist/domain/ui-service/mutate/notes.js +0 -32
  1229. package/dist/domain/ui-service/mutate/platform-settings.d.ts +0 -6
  1230. package/dist/domain/ui-service/mutate/platform-settings.js +0 -17
  1231. package/dist/domain/ui-service/mutate/plugin-packages.d.ts +0 -10
  1232. package/dist/domain/ui-service/mutate/plugin-packages.js +0 -152
  1233. package/dist/domain/ui-service/mutate/plugins.d.ts +0 -2
  1234. package/dist/domain/ui-service/mutate/plugins.js +0 -38
  1235. package/dist/domain/ui-service/mutate/projects.d.ts +0 -4
  1236. package/dist/domain/ui-service/mutate/projects.js +0 -7
  1237. package/dist/domain/ui-service/mutate/resolve-media.d.ts +0 -4
  1238. package/dist/domain/ui-service/mutate/resolve-media.js +0 -17
  1239. package/dist/domain/ui-service/mutate/schedules.d.ts +0 -12
  1240. package/dist/domain/ui-service/mutate/schedules.js +0 -75
  1241. package/dist/domain/ui-service/mutate/session-metadata.d.ts +0 -3
  1242. package/dist/domain/ui-service/mutate/session-metadata.js +0 -22
  1243. package/dist/domain/ui-service/mutate/sessions.d.ts +0 -19
  1244. package/dist/domain/ui-service/mutate/sessions.js +0 -307
  1245. package/dist/domain/ui-service/mutate/system.d.ts +0 -10
  1246. package/dist/domain/ui-service/mutate/system.js +0 -120
  1247. package/dist/domain/ui-service/mutate/usage-sharing.d.ts +0 -8
  1248. package/dist/domain/ui-service/mutate/usage-sharing.js +0 -16
  1249. package/dist/domain/ui-service/mutate/waitpoints.d.ts +0 -2
  1250. package/dist/domain/ui-service/mutate/waitpoints.js +0 -13
  1251. package/dist/domain/ui-service/platform-settings.d.ts +0 -5
  1252. package/dist/domain/ui-service/platform-settings.js +0 -72
  1253. package/dist/domain/ui-service/plugins-shared.d.ts +0 -29
  1254. package/dist/domain/ui-service/plugins-shared.js +0 -176
  1255. package/dist/domain/ui-service/query/approvals.d.ts +0 -10
  1256. package/dist/domain/ui-service/query/approvals.js +0 -118
  1257. package/dist/domain/ui-service/query/auth.d.ts +0 -6
  1258. package/dist/domain/ui-service/query/auth.js +0 -8
  1259. package/dist/domain/ui-service/query/boards.d.ts +0 -14
  1260. package/dist/domain/ui-service/query/boards.js +0 -111
  1261. package/dist/domain/ui-service/query/config.d.ts +0 -9
  1262. package/dist/domain/ui-service/query/config.js +0 -167
  1263. package/dist/domain/ui-service/query/cost.d.ts +0 -3
  1264. package/dist/domain/ui-service/query/cost.js +0 -3
  1265. package/dist/domain/ui-service/query/custom-providers.d.ts +0 -8
  1266. package/dist/domain/ui-service/query/custom-providers.js +0 -9
  1267. package/dist/domain/ui-service/query/environments.d.ts +0 -12
  1268. package/dist/domain/ui-service/query/environments.js +0 -73
  1269. package/dist/domain/ui-service/query/executions.d.ts +0 -3
  1270. package/dist/domain/ui-service/query/executions.js +0 -61
  1271. package/dist/domain/ui-service/query/hooks.d.ts +0 -9
  1272. package/dist/domain/ui-service/query/hooks.js +0 -92
  1273. package/dist/domain/ui-service/query/issues.d.ts +0 -14
  1274. package/dist/domain/ui-service/query/issues.js +0 -78
  1275. package/dist/domain/ui-service/query/machine-detail.d.ts +0 -2
  1276. package/dist/domain/ui-service/query/machine-detail.js +0 -30
  1277. package/dist/domain/ui-service/query/machine-probe.d.ts +0 -18
  1278. package/dist/domain/ui-service/query/machine-probe.js +0 -132
  1279. package/dist/domain/ui-service/query/machines.d.ts +0 -2
  1280. package/dist/domain/ui-service/query/machines.js +0 -21
  1281. package/dist/domain/ui-service/query/memory.d.ts +0 -7
  1282. package/dist/domain/ui-service/query/memory.js +0 -191
  1283. package/dist/domain/ui-service/query/models.d.ts +0 -24
  1284. package/dist/domain/ui-service/query/models.js +0 -108
  1285. package/dist/domain/ui-service/query/notes.d.ts +0 -3
  1286. package/dist/domain/ui-service/query/notes.js +0 -15
  1287. package/dist/domain/ui-service/query/plugin-source.d.ts +0 -4
  1288. package/dist/domain/ui-service/query/plugin-source.js +0 -57
  1289. package/dist/domain/ui-service/query/plugins.d.ts +0 -2
  1290. package/dist/domain/ui-service/query/plugins.js +0 -28
  1291. package/dist/domain/ui-service/query/projects.d.ts +0 -2
  1292. package/dist/domain/ui-service/query/projects.js +0 -27
  1293. package/dist/domain/ui-service/query/schedules.d.ts +0 -5
  1294. package/dist/domain/ui-service/query/schedules.js +0 -28
  1295. package/dist/domain/ui-service/query/sessions.d.ts +0 -6
  1296. package/dist/domain/ui-service/query/sessions.js +0 -429
  1297. package/dist/domain/ui-service/query/skills.d.ts +0 -5
  1298. package/dist/domain/ui-service/query/skills.js +0 -16
  1299. package/dist/domain/ui-service/query/system.d.ts +0 -6
  1300. package/dist/domain/ui-service/query/system.js +0 -120
  1301. package/dist/domain/ui-service/query/usage-sharing.d.ts +0 -4
  1302. package/dist/domain/ui-service/query/usage-sharing.js +0 -5
  1303. package/dist/domain/ui-service/query/waitpoints.d.ts +0 -10
  1304. package/dist/domain/ui-service/query/waitpoints.js +0 -37
  1305. package/dist/domain/ui-service/query-input-schemas.d.ts +0 -73
  1306. package/dist/domain/ui-service/query-input-schemas.js +0 -70
  1307. package/dist/domain/ui-service/session-metadata-schemas.d.ts +0 -13
  1308. package/dist/domain/ui-service/session-metadata-schemas.js +0 -9
  1309. package/dist/domain/ui-service/subscribe.d.ts +0 -6
  1310. package/dist/domain/ui-service/subscribe.js +0 -125
  1311. package/dist/domain/ui-service/trpc.d.ts +0 -47
  1312. package/dist/domain/ui-service/trpc.js +0 -43
  1313. package/dist/domain/ui-service/types.d.ts +0 -1790
  1314. package/dist/domain/ui-service/types.js +0 -1
  1315. package/dist/domain/ui-service/ui-service.d.ts +0 -512
  1316. package/dist/domain/ui-service/ui-service.js +0 -234
  1317. package/dist/domain/waitpoints/notices.d.ts +0 -25
  1318. package/dist/domain/waitpoints/notices.js +0 -125
  1319. package/dist/domain/waitpoints/service.d.ts +0 -107
  1320. package/dist/domain/waitpoints/service.js +0 -276
  1321. package/dist/domain/waitpoints/view.d.ts +0 -29
  1322. package/dist/domain/waitpoints/view.js +0 -97
  1323. package/dist/entry/admin-channel-hot-reload.d.ts +0 -4
  1324. package/dist/entry/admin-channel-hot-reload.js +0 -17
  1325. package/dist/entry/app.d.ts +0 -1
  1326. package/dist/entry/auth-cli.d.ts +0 -9
  1327. package/dist/entry/auth-cli.js +0 -55
  1328. package/dist/entry/auth-login-cli.d.ts +0 -20
  1329. package/dist/entry/auth-login-cli.js +0 -153
  1330. package/dist/entry/auth-login-terminal.d.ts +0 -16
  1331. package/dist/entry/auth-login-terminal.js +0 -59
  1332. package/dist/entry/boot-jobs.d.ts +0 -7
  1333. package/dist/entry/boot-jobs.js +0 -16
  1334. package/dist/entry/browser-cli.d.ts +0 -39
  1335. package/dist/entry/cli-help.d.ts +0 -10
  1336. package/dist/entry/cli-help.js +0 -277
  1337. package/dist/entry/cli.d.ts +0 -19
  1338. package/dist/entry/client-cli.d.ts +0 -4
  1339. package/dist/entry/client-cli.js +0 -62
  1340. package/dist/entry/cortex-cli.d.ts +0 -1
  1341. package/dist/entry/daemon-notice.d.ts +0 -26
  1342. package/dist/entry/daemon-notice.js +0 -38
  1343. package/dist/entry/daemon.d.ts +0 -120
  1344. package/dist/entry/doctor-cli.d.ts +0 -8
  1345. package/dist/entry/doctor-cli.js +0 -70
  1346. package/dist/entry/draft-attachments.d.ts +0 -8
  1347. package/dist/entry/draft-attachments.js +0 -79
  1348. package/dist/entry/fast-install.d.ts +0 -49
  1349. package/dist/entry/fast-install.js +0 -192
  1350. package/dist/entry/feishu-login.d.ts +0 -21
  1351. package/dist/entry/feishu-login.js +0 -209
  1352. package/dist/entry/hook-cli.d.ts +0 -14
  1353. package/dist/entry/init-auth.d.ts +0 -4
  1354. package/dist/entry/init-auth.js +0 -42
  1355. package/dist/entry/init-git.d.ts +0 -6
  1356. package/dist/entry/init-git.js +0 -36
  1357. package/dist/entry/init-local-client.d.ts +0 -11
  1358. package/dist/entry/init-local-client.js +0 -34
  1359. package/dist/entry/init.d.ts +0 -148
  1360. package/dist/entry/init.js +0 -1270
  1361. package/dist/entry/local-ui.d.ts +0 -38
  1362. package/dist/entry/local-ui.js +0 -107
  1363. package/dist/entry/memory-cli.d.ts +0 -3
  1364. package/dist/entry/memory-cli.js +0 -79
  1365. package/dist/entry/path-cli.d.ts +0 -4
  1366. package/dist/entry/path-cli.js +0 -65
  1367. package/dist/entry/platform-connect.d.ts +0 -23
  1368. package/dist/entry/platform-connect.js +0 -94
  1369. package/dist/entry/production-app-bootstrap.d.ts +0 -1
  1370. package/dist/entry/production-evidence-export-cli.d.ts +0 -13
  1371. package/dist/entry/provider-cli.d.ts +0 -12
  1372. package/dist/entry/provider-cli.js +0 -199
  1373. package/dist/entry/schedule-cli.d.ts +0 -10
  1374. package/dist/entry/schedule-cli.js +0 -166
  1375. package/dist/entry/shutdown.d.ts +0 -32
  1376. package/dist/entry/shutdown.js +0 -81
  1377. package/dist/entry/signal-cli.d.ts +0 -25
  1378. package/dist/entry/start-ui-http.d.ts +0 -24
  1379. package/dist/entry/start-ui-http.js +0 -166
  1380. package/dist/entry/startup-helpers.d.ts +0 -2
  1381. package/dist/entry/startup-helpers.js +0 -15
  1382. package/dist/entry/startup-notify.d.ts +0 -6
  1383. package/dist/entry/startup-notify.js +0 -18
  1384. package/dist/entry/ui-cli.d.ts +0 -13
  1385. package/dist/entry/ui-cli.js +0 -78
  1386. package/dist/entry/ui-http-gate.d.ts +0 -17
  1387. package/dist/entry/ui-http-gate.js +0 -17
  1388. package/dist/entry/ui-service-wiring.d.ts +0 -12
  1389. package/dist/entry/ui-service-wiring.js +0 -144
  1390. package/dist/events/event-bus.d.ts +0 -47
  1391. package/dist/events/event-bus.js +0 -83
  1392. package/dist/events/event-logger.d.ts +0 -12
  1393. package/dist/events/event-logger.js +0 -144
  1394. package/dist/events/event-types.d.ts +0 -262
  1395. package/dist/events/event-types.js +0 -1
  1396. package/dist/events/index.d.ts +0 -5
  1397. package/dist/events/index.js +0 -2
  1398. package/dist/orchestration/agent-decision-send.d.ts +0 -42
  1399. package/dist/orchestration/agent-decision-send.js +0 -62
  1400. package/dist/orchestration/agent-file-send.d.ts +0 -58
  1401. package/dist/orchestration/agent-file-send.js +0 -69
  1402. package/dist/orchestration/agent-runner.d.ts +0 -52
  1403. package/dist/orchestration/agent-runner.js +0 -230
  1404. package/dist/orchestration/agent-view-send.d.ts +0 -66
  1405. package/dist/orchestration/agent-view-send.js +0 -103
  1406. package/dist/orchestration/attachments-store.d.ts +0 -31
  1407. package/dist/orchestration/attachments-store.js +0 -156
  1408. package/dist/orchestration/benchmark-session-webhook.d.ts +0 -19
  1409. package/dist/orchestration/benchmark-session-webhook.js +0 -142
  1410. package/dist/orchestration/board-webhook.d.ts +0 -7
  1411. package/dist/orchestration/board-webhook.js +0 -38
  1412. package/dist/orchestration/browser-webhook.d.ts +0 -11
  1413. package/dist/orchestration/browser-webhook.js +0 -28
  1414. package/dist/orchestration/busy-tracker.d.ts +0 -15
  1415. package/dist/orchestration/busy-tracker.js +0 -38
  1416. package/dist/orchestration/cache-keep-warm.d.ts +0 -77
  1417. package/dist/orchestration/cache-keep-warm.js +0 -213
  1418. package/dist/orchestration/claude-window-warmup.d.ts +0 -40
  1419. package/dist/orchestration/claude-window-warmup.js +0 -126
  1420. package/dist/orchestration/conduit-queue.d.ts +0 -14
  1421. package/dist/orchestration/conduit-queue.js +0 -53
  1422. package/dist/orchestration/conversation-request.d.ts +0 -163
  1423. package/dist/orchestration/conversation-request.js +0 -276
  1424. package/dist/orchestration/delta-coalescer.d.ts +0 -69
  1425. package/dist/orchestration/delta-coalescer.js +0 -120
  1426. package/dist/orchestration/durable-helpers.d.ts +0 -3
  1427. package/dist/orchestration/durable-helpers.js +0 -38
  1428. package/dist/orchestration/edit-retry.d.ts +0 -35
  1429. package/dist/orchestration/edit-retry.js +0 -127
  1430. package/dist/orchestration/injection-ledger.d.ts +0 -56
  1431. package/dist/orchestration/injection-ledger.js +0 -270
  1432. package/dist/orchestration/inline-media-eager.d.ts +0 -13
  1433. package/dist/orchestration/inline-media-eager.js +0 -58
  1434. package/dist/orchestration/inline-media.d.ts +0 -22
  1435. package/dist/orchestration/inline-media.js +0 -151
  1436. package/dist/orchestration/interactions/answer-question.d.ts +0 -16
  1437. package/dist/orchestration/interactions/answer-question.js +0 -38
  1438. package/dist/orchestration/interactions/ask-user-question.d.ts +0 -34
  1439. package/dist/orchestration/interactions/ask-user-question.js +0 -179
  1440. package/dist/orchestration/interactions/ask-user-resume.d.ts +0 -11
  1441. package/dist/orchestration/interactions/ask-user-resume.js +0 -57
  1442. package/dist/orchestration/interactions/command-action-router.d.ts +0 -31
  1443. package/dist/orchestration/interactions/command-action-router.js +0 -48
  1444. package/dist/orchestration/interactions/interaction-handlers.d.ts +0 -5
  1445. package/dist/orchestration/interactions/interaction-handlers.js +0 -288
  1446. package/dist/orchestration/interactions/interaction-records.d.ts +0 -57
  1447. package/dist/orchestration/interactions/interaction-records.js +0 -142
  1448. package/dist/orchestration/interactions/plan-approvals.d.ts +0 -38
  1449. package/dist/orchestration/interactions/plan-approvals.js +0 -73
  1450. package/dist/orchestration/interactions/plan-handler.d.ts +0 -3
  1451. package/dist/orchestration/interactions/plan-handler.js +0 -13
  1452. package/dist/orchestration/interactions/plan-response.d.ts +0 -9
  1453. package/dist/orchestration/interactions/plan-response.js +0 -23
  1454. package/dist/orchestration/interactions/ui-update-prompt.d.ts +0 -8
  1455. package/dist/orchestration/interactions/ui-update-prompt.js +0 -39
  1456. package/dist/orchestration/interactions/update-prompt.d.ts +0 -6
  1457. package/dist/orchestration/interactions/update-prompt.js +0 -150
  1458. package/dist/orchestration/mid-turn-inject.d.ts +0 -64
  1459. package/dist/orchestration/mid-turn-inject.js +0 -103
  1460. package/dist/orchestration/orchestrator.d.ts +0 -23
  1461. package/dist/orchestration/orchestrator.js +0 -12
  1462. package/dist/orchestration/outputs-store.d.ts +0 -40
  1463. package/dist/orchestration/outputs-store.js +0 -83
  1464. package/dist/orchestration/pending-injection-recovery.d.ts +0 -36
  1465. package/dist/orchestration/pending-injection-recovery.js +0 -88
  1466. package/dist/orchestration/pi-background-subagent.d.ts +0 -15
  1467. package/dist/orchestration/pi-background-subagent.js +0 -34
  1468. package/dist/orchestration/resume-dispatcher.d.ts +0 -20
  1469. package/dist/orchestration/resume-dispatcher.js +0 -97
  1470. package/dist/orchestration/resume-target-sink.d.ts +0 -37
  1471. package/dist/orchestration/resume-target-sink.js +0 -68
  1472. package/dist/orchestration/routing/commands/cancel.d.ts +0 -58
  1473. package/dist/orchestration/routing/commands/cancel.js +0 -212
  1474. package/dist/orchestration/routing/commands/channel.d.ts +0 -7
  1475. package/dist/orchestration/routing/commands/channel.js +0 -229
  1476. package/dist/orchestration/routing/commands/command-context.d.ts +0 -14
  1477. package/dist/orchestration/routing/commands/command-context.js +0 -1
  1478. package/dist/orchestration/routing/commands/compact.d.ts +0 -6
  1479. package/dist/orchestration/routing/commands/compact.js +0 -22
  1480. package/dist/orchestration/routing/commands/cost.d.ts +0 -11
  1481. package/dist/orchestration/routing/commands/cost.js +0 -101
  1482. package/dist/orchestration/routing/commands/device.d.ts +0 -4
  1483. package/dist/orchestration/routing/commands/device.js +0 -70
  1484. package/dist/orchestration/routing/commands/index.d.ts +0 -22
  1485. package/dist/orchestration/routing/commands/index.js +0 -160
  1486. package/dist/orchestration/routing/commands/lang.d.ts +0 -9
  1487. package/dist/orchestration/routing/commands/lang.js +0 -34
  1488. package/dist/orchestration/routing/commands/login-custom.d.ts +0 -26
  1489. package/dist/orchestration/routing/commands/login-custom.js +0 -85
  1490. package/dist/orchestration/routing/commands/login-notice.d.ts +0 -23
  1491. package/dist/orchestration/routing/commands/login-notice.js +0 -84
  1492. package/dist/orchestration/routing/commands/login.d.ts +0 -12
  1493. package/dist/orchestration/routing/commands/login.js +0 -560
  1494. package/dist/orchestration/routing/commands/mode.d.ts +0 -10
  1495. package/dist/orchestration/routing/commands/mode.js +0 -302
  1496. package/dist/orchestration/routing/commands/nvtop.d.ts +0 -3
  1497. package/dist/orchestration/routing/commands/nvtop.js +0 -107
  1498. package/dist/orchestration/routing/commands/orient.d.ts +0 -2
  1499. package/dist/orchestration/routing/commands/orient.js +0 -5
  1500. package/dist/orchestration/routing/commands/restart.d.ts +0 -18
  1501. package/dist/orchestration/routing/commands/restart.js +0 -31
  1502. package/dist/orchestration/routing/commands/schedule.d.ts +0 -6
  1503. package/dist/orchestration/routing/commands/schedule.js +0 -206
  1504. package/dist/orchestration/routing/commands/sendfile.d.ts +0 -2
  1505. package/dist/orchestration/routing/commands/sendfile.js +0 -97
  1506. package/dist/orchestration/routing/commands/session.d.ts +0 -18
  1507. package/dist/orchestration/routing/commands/session.js +0 -131
  1508. package/dist/orchestration/routing/commands/status.d.ts +0 -5
  1509. package/dist/orchestration/routing/commands/status.js +0 -165
  1510. package/dist/orchestration/routing/commands/tail.d.ts +0 -2
  1511. package/dist/orchestration/routing/commands/tail.js +0 -79
  1512. package/dist/orchestration/routing/commands/time-ago.d.ts +0 -2
  1513. package/dist/orchestration/routing/commands/time-ago.js +0 -14
  1514. package/dist/orchestration/routing/commands/usage-format.d.ts +0 -5
  1515. package/dist/orchestration/routing/commands/usage-format.js +0 -107
  1516. package/dist/orchestration/routing/commands/usage-reset.d.ts +0 -20
  1517. package/dist/orchestration/routing/commands/usage-reset.js +0 -123
  1518. package/dist/orchestration/routing/commands/usage.d.ts +0 -10
  1519. package/dist/orchestration/routing/commands/usage.js +0 -54
  1520. package/dist/orchestration/routing/edit-handler.d.ts +0 -27
  1521. package/dist/orchestration/routing/edit-handler.js +0 -205
  1522. package/dist/orchestration/routing/file-handler.d.ts +0 -15
  1523. package/dist/orchestration/routing/file-handler.js +0 -39
  1524. package/dist/orchestration/routing/hook-bridge-subscribers.d.ts +0 -14
  1525. package/dist/orchestration/routing/hook-bridge-subscribers.js +0 -174
  1526. package/dist/orchestration/routing/hook-bridge.d.ts +0 -28
  1527. package/dist/orchestration/routing/hook-bridge.js +0 -104
  1528. package/dist/orchestration/routing/message-router.d.ts +0 -6
  1529. package/dist/orchestration/routing/message-router.js +0 -60
  1530. package/dist/orchestration/routing/webhook.d.ts +0 -10
  1531. package/dist/orchestration/routing/webhook.js +0 -432
  1532. package/dist/orchestration/runtime.d.ts +0 -30
  1533. package/dist/orchestration/runtime.js +0 -37
  1534. package/dist/orchestration/session-compact.d.ts +0 -50
  1535. package/dist/orchestration/session-compact.js +0 -84
  1536. package/dist/orchestration/session-events.d.ts +0 -173
  1537. package/dist/orchestration/session-events.js +0 -140
  1538. package/dist/orchestration/session-gateway.d.ts +0 -52
  1539. package/dist/orchestration/session-gateway.js +0 -87
  1540. package/dist/orchestration/session-retention-controller.d.ts +0 -14
  1541. package/dist/orchestration/session-retention-controller.js +0 -88
  1542. package/dist/orchestration/session-retention-liveness.d.ts +0 -13
  1543. package/dist/orchestration/session-retention-liveness.js +0 -31
  1544. package/dist/orchestration/session-rewind.d.ts +0 -79
  1545. package/dist/orchestration/session-rewind.js +0 -147
  1546. package/dist/orchestration/status-helpers.d.ts +0 -40
  1547. package/dist/orchestration/status-helpers.js +0 -177
  1548. package/dist/orchestration/subagent-adopt.d.ts +0 -20
  1549. package/dist/orchestration/subagent-adopt.js +0 -43
  1550. package/dist/orchestration/subagent-attribution.d.ts +0 -42
  1551. package/dist/orchestration/subagent-attribution.js +0 -130
  1552. package/dist/orchestration/subagent-delivery.d.ts +0 -43
  1553. package/dist/orchestration/subagent-delivery.js +0 -112
  1554. package/dist/orchestration/subagent-rows.d.ts +0 -11
  1555. package/dist/orchestration/subagent-rows.js +0 -16
  1556. package/dist/orchestration/subagent-webhook.d.ts +0 -6
  1557. package/dist/orchestration/subagent-webhook.js +0 -89
  1558. package/dist/orchestration/team-delivery.d.ts +0 -81
  1559. package/dist/orchestration/team-delivery.js +0 -284
  1560. package/dist/orchestration/team-inbox.d.ts +0 -18
  1561. package/dist/orchestration/team-inbox.js +0 -49
  1562. package/dist/orchestration/team-state.d.ts +0 -74
  1563. package/dist/orchestration/team-state.js +0 -219
  1564. package/dist/orchestration/team-webhook.d.ts +0 -57
  1565. package/dist/orchestration/team-webhook.js +0 -293
  1566. package/dist/orchestration/transcript-sink.d.ts +0 -77
  1567. package/dist/orchestration/transcript-sink.js +0 -250
  1568. package/dist/orchestration/turn/active-turns.d.ts +0 -49
  1569. package/dist/orchestration/turn/active-turns.js +0 -76
  1570. package/dist/orchestration/turn/background-hold.d.ts +0 -158
  1571. package/dist/orchestration/turn/background-hold.js +0 -240
  1572. package/dist/orchestration/turn/hold-render-platform.d.ts +0 -35
  1573. package/dist/orchestration/turn/hold-render-platform.js +0 -105
  1574. package/dist/orchestration/turn/hold-render-web.d.ts +0 -17
  1575. package/dist/orchestration/turn/hold-render-web.js +0 -51
  1576. package/dist/orchestration/turn/terminal.d.ts +0 -105
  1577. package/dist/orchestration/turn/terminal.js +0 -194
  1578. package/dist/orchestration/turn/turn-prep.d.ts +0 -33
  1579. package/dist/orchestration/turn/turn-prep.js +0 -44
  1580. package/dist/orchestration/turn/turn-tracking.d.ts +0 -22
  1581. package/dist/orchestration/turn/turn-tracking.js +0 -89
  1582. package/dist/orchestration/turn/turn.d.ts +0 -199
  1583. package/dist/orchestration/turn/turn.js +0 -586
  1584. package/dist/orchestration/turn-mutation-lock.d.ts +0 -3
  1585. package/dist/orchestration/turn-mutation-lock.js +0 -32
  1586. package/dist/orchestration/turn-notify.d.ts +0 -22
  1587. package/dist/orchestration/turn-notify.js +0 -50
  1588. package/dist/orchestration/waitpoint-ingress.d.ts +0 -36
  1589. package/dist/orchestration/waitpoint-ingress.js +0 -180
  1590. package/dist/orchestration/waitpoint-notifier.d.ts +0 -32
  1591. package/dist/orchestration/waitpoint-notifier.js +0 -140
  1592. package/dist/orchestration/waitpoint-remote-drain.d.ts +0 -22
  1593. package/dist/orchestration/waitpoint-remote-drain.js +0 -134
  1594. package/dist/orchestration/waitpoint-sweep.d.ts +0 -43
  1595. package/dist/orchestration/waitpoint-sweep.js +0 -84
  1596. package/dist/platform/adapter.d.ts +0 -48
  1597. package/dist/platform/adapter.js +0 -1
  1598. package/dist/platform/adapters/chunked-output-stream.d.ts +0 -71
  1599. package/dist/platform/adapters/chunked-output-stream.js +0 -382
  1600. package/dist/platform/adapters/composite-adapter.d.ts +0 -99
  1601. package/dist/platform/adapters/composite-adapter.js +0 -369
  1602. package/dist/platform/adapters/feishu-http.d.ts +0 -46
  1603. package/dist/platform/adapters/feishu-http.js +0 -108
  1604. package/dist/platform/adapters/feishu-image.d.ts +0 -19
  1605. package/dist/platform/adapters/feishu-image.js +0 -64
  1606. package/dist/platform/adapters/feishu-output-stream.d.ts +0 -11
  1607. package/dist/platform/adapters/feishu-output-stream.js +0 -29
  1608. package/dist/platform/adapters/feishu.d.ts +0 -167
  1609. package/dist/platform/adapters/feishu.js +0 -1059
  1610. package/dist/platform/adapters/index.d.ts +0 -19
  1611. package/dist/platform/adapters/index.js +0 -108
  1612. package/dist/platform/adapters/project-conduits.d.ts +0 -9
  1613. package/dist/platform/adapters/project-conduits.js +0 -36
  1614. package/dist/platform/adapters/slack-output-stream.d.ts +0 -15
  1615. package/dist/platform/adapters/slack-output-stream.js +0 -33
  1616. package/dist/platform/adapters/slack.d.ts +0 -106
  1617. package/dist/platform/adapters/slack.js +0 -733
  1618. package/dist/platform/adapters/tui/index.d.ts +0 -2
  1619. package/dist/platform/adapters/tui/index.js +0 -2
  1620. package/dist/platform/adapters/tui/ports.d.ts +0 -46
  1621. package/dist/platform/adapters/tui/ports.js +0 -1
  1622. package/dist/platform/adapters/tui/tui-connection.d.ts +0 -20
  1623. package/dist/platform/adapters/tui/tui-connection.js +0 -44
  1624. package/dist/platform/adapters/tui/tui-gateway.d.ts +0 -90
  1625. package/dist/platform/adapters/tui/tui-gateway.js +0 -884
  1626. package/dist/platform/adapters/tui/tui-output-stream.d.ts +0 -35
  1627. package/dist/platform/adapters/tui/tui-output-stream.js +0 -94
  1628. package/dist/platform/adapters/tui/tui-transcript.d.ts +0 -8
  1629. package/dist/platform/adapters/tui/tui-transcript.js +0 -42
  1630. package/dist/platform/browser/agent-browser.d.ts +0 -50
  1631. package/dist/platform/browser/agent-browser.js +0 -165
  1632. package/dist/platform/browser/display.d.ts +0 -48
  1633. package/dist/platform/browser/display.js +0 -188
  1634. package/dist/platform/browser/managed-browser.d.ts +0 -23
  1635. package/dist/platform/browser/managed-browser.js +0 -357
  1636. package/dist/platform/index.d.ts +0 -10
  1637. package/dist/platform/index.js +0 -6
  1638. package/dist/platform/interactive-builder.d.ts +0 -34
  1639. package/dist/platform/interactive-builder.js +0 -138
  1640. package/dist/platform/output-stream-chunk.d.ts +0 -6
  1641. package/dist/platform/output-stream-chunk.js +0 -42
  1642. package/dist/platform/output-stream-helpers.d.ts +0 -8
  1643. package/dist/platform/output-stream-helpers.js +0 -19
  1644. package/dist/platform/output-stream.d.ts +0 -35
  1645. package/dist/platform/output-stream.js +0 -1
  1646. package/dist/platform/testing.d.ts +0 -136
  1647. package/dist/platform/testing.js +0 -286
  1648. package/dist/platform/tool-trace.d.ts +0 -35
  1649. package/dist/platform/tool-trace.js +0 -287
  1650. package/dist/platform/tui/protocol.d.ts +0 -352
  1651. package/dist/platform/tui/protocol.js +0 -146
  1652. package/dist/platform/types.d.ts +0 -223
  1653. package/dist/platform/types.js +0 -22
  1654. package/dist/platform/ui-http/access-jwt.d.ts +0 -28
  1655. package/dist/platform/ui-http/access-jwt.js +0 -53
  1656. package/dist/platform/ui-http/app-update.d.ts +0 -69
  1657. package/dist/platform/ui-http/app-update.js +0 -143
  1658. package/dist/platform/ui-http/browser-stream.d.ts +0 -110
  1659. package/dist/platform/ui-http/browser-stream.js +0 -447
  1660. package/dist/platform/ui-http/device-ports.d.ts +0 -34
  1661. package/dist/platform/ui-http/device-ports.js +0 -102
  1662. package/dist/platform/ui-http/file-routes.d.ts +0 -23
  1663. package/dist/platform/ui-http/file-routes.js +0 -224
  1664. package/dist/platform/ui-http/http-json.d.ts +0 -24
  1665. package/dist/platform/ui-http/http-json.js +0 -109
  1666. package/dist/platform/ui-http/listening-ports.d.ts +0 -98
  1667. package/dist/platform/ui-http/listening-ports.js +0 -239
  1668. package/dist/platform/ui-http/port-forward.d.ts +0 -40
  1669. package/dist/platform/ui-http/port-forward.js +0 -130
  1670. package/dist/platform/ui-http/ui-auth-routes.d.ts +0 -49
  1671. package/dist/platform/ui-http/ui-auth-routes.js +0 -113
  1672. package/dist/platform/ui-http/ui-http-server.d.ts +0 -93
  1673. package/dist/platform/ui-http/ui-http-server.js +0 -306
  1674. package/dist/platform/ui-http/ui-ota.d.ts +0 -22
  1675. package/dist/platform/ui-http/ui-ota.js +0 -151
  1676. package/dist/platform/ui-http/ui-session.d.ts +0 -33
  1677. package/dist/platform/ui-http/ui-session.js +0 -124
  1678. package/dist/platform/ui-http/zip-writer.d.ts +0 -13
  1679. package/dist/platform/ui-http/zip-writer.js +0 -93
  1680. package/dist/platform/utils/rate-limiter.d.ts +0 -90
  1681. package/dist/platform/utils/rate-limiter.js +0 -203
  1682. package/dist/platform/utils/reaction-diagnostics.d.ts +0 -9
  1683. package/dist/platform/utils/reaction-diagnostics.js +0 -19
  1684. package/dist/platform/utils/readable-file.d.ts +0 -9
  1685. package/dist/platform/utils/readable-file.js +0 -18
  1686. package/dist/store/board-migration.d.ts +0 -21
  1687. package/dist/store/board-migration.js +0 -217
  1688. package/dist/store/board-repo.d.ts +0 -35
  1689. package/dist/store/board-repo.js +0 -62
  1690. package/dist/store/builtin-overlay-migration.d.ts +0 -11
  1691. package/dist/store/builtin-overlay-migration.js +0 -308
  1692. package/dist/store/claude-transcript-migration.d.ts +0 -32
  1693. package/dist/store/claude-transcript-migration.js +0 -119
  1694. package/dist/store/conversation-display-projection.d.ts +0 -36
  1695. package/dist/store/conversation-display-projection.js +0 -180
  1696. package/dist/store/conversation-history-reader.d.ts +0 -30
  1697. package/dist/store/conversation-history-reader.js +0 -440
  1698. package/dist/store/conversation-history-repo.d.ts +0 -449
  1699. package/dist/store/conversation-history-repo.js +0 -632
  1700. package/dist/store/conversation-ledger-repo.d.ts +0 -76
  1701. package/dist/store/conversation-ledger-repo.js +0 -219
  1702. package/dist/store/cost-repo.d.ts +0 -88
  1703. package/dist/store/cost-repo.js +0 -233
  1704. package/dist/store/execution-repo.d.ts +0 -169
  1705. package/dist/store/execution-repo.js +0 -329
  1706. package/dist/store/hook-registry.d.ts +0 -101
  1707. package/dist/store/hook-registry.js +0 -314
  1708. package/dist/store/hook-writer.d.ts +0 -43
  1709. package/dist/store/hook-writer.js +0 -133
  1710. package/dist/store/models-repo.d.ts +0 -18
  1711. package/dist/store/models-repo.js +0 -74
  1712. package/dist/store/outbound-queue.d.ts +0 -67
  1713. package/dist/store/outbound-queue.js +0 -284
  1714. package/dist/store/pending-injection-repo.d.ts +0 -29
  1715. package/dist/store/pending-injection-repo.js +0 -52
  1716. package/dist/store/project-dir-repo.d.ts +0 -17
  1717. package/dist/store/project-dir-repo.js +0 -44
  1718. package/dist/store/project-notes-repo.d.ts +0 -27
  1719. package/dist/store/project-notes-repo.js +0 -219
  1720. package/dist/store/prompt-migration-replacements.d.ts +0 -3
  1721. package/dist/store/prompt-migration-replacements.js +0 -96
  1722. package/dist/store/provider-state-repo.d.ts +0 -22
  1723. package/dist/store/provider-state-repo.js +0 -115
  1724. package/dist/store/retention-candidate-repo.d.ts +0 -12
  1725. package/dist/store/retention-candidate-repo.js +0 -47
  1726. package/dist/store/retire-profiles-migration.d.ts +0 -28
  1727. package/dist/store/retire-profiles-migration.js +0 -335
  1728. package/dist/store/schedule-repo.d.ts +0 -53
  1729. package/dist/store/schedule-repo.js +0 -121
  1730. package/dist/store/session-registry-import.d.ts +0 -34
  1731. package/dist/store/session-registry-import.js +0 -173
  1732. package/dist/store/session-registry-journal.d.ts +0 -195
  1733. package/dist/store/session-registry-journal.js +0 -868
  1734. package/dist/store/session-registry-repo.d.ts +0 -169
  1735. package/dist/store/session-registry-repo.js +0 -530
  1736. package/dist/store/session-totals-repo.d.ts +0 -45
  1737. package/dist/store/session-totals-repo.js +0 -104
  1738. package/dist/store/session-totals.d.ts +0 -69
  1739. package/dist/store/session-totals.js +0 -93
  1740. package/dist/store/team-inbox-repo.d.ts +0 -34
  1741. package/dist/store/team-inbox-repo.js +0 -72
  1742. package/dist/store/team-outbox-repo.d.ts +0 -20
  1743. package/dist/store/team-outbox-repo.js +0 -39
  1744. package/dist/store/tool-image-files.d.ts +0 -12
  1745. package/dist/store/tool-image-files.js +0 -40
  1746. package/dist/store/version-migrations.d.ts +0 -115
  1747. package/dist/store/version-migrations.js +0 -1371
  1748. package/dist/store/waitpoint-repo.d.ts +0 -111
  1749. package/dist/store/waitpoint-repo.js +0 -83
  1750. package/dist/tui/App.d.ts +0 -27
  1751. package/dist/tui/App.js +0 -406
  1752. package/dist/tui/components/AskUserModal.d.ts +0 -10
  1753. package/dist/tui/components/AskUserModal.js +0 -362
  1754. package/dist/tui/components/ConfirmModal.d.ts +0 -12
  1755. package/dist/tui/components/ConfirmModal.js +0 -29
  1756. package/dist/tui/components/Dashboard.d.ts +0 -24
  1757. package/dist/tui/components/Dashboard.js +0 -88
  1758. package/dist/tui/components/DashboardCostTab.d.ts +0 -7
  1759. package/dist/tui/components/DashboardCostTab.js +0 -32
  1760. package/dist/tui/components/DashboardExecutionsTab.d.ts +0 -11
  1761. package/dist/tui/components/DashboardExecutionsTab.js +0 -112
  1762. package/dist/tui/components/DashboardSchedulesTab.d.ts +0 -11
  1763. package/dist/tui/components/DashboardSchedulesTab.js +0 -132
  1764. package/dist/tui/components/InputBox.d.ts +0 -26
  1765. package/dist/tui/components/InputBox.js +0 -266
  1766. package/dist/tui/components/Notifications.d.ts +0 -12
  1767. package/dist/tui/components/Notifications.js +0 -59
  1768. package/dist/tui/components/ProjectSwitcher.d.ts +0 -17
  1769. package/dist/tui/components/ProjectSwitcher.js +0 -40
  1770. package/dist/tui/components/SessionPicker.d.ts +0 -13
  1771. package/dist/tui/components/SessionPicker.js +0 -42
  1772. package/dist/tui/components/SidePanel.d.ts +0 -19
  1773. package/dist/tui/components/SidePanel.js +0 -8
  1774. package/dist/tui/components/SlashMenu.d.ts +0 -8
  1775. package/dist/tui/components/SlashMenu.js +0 -15
  1776. package/dist/tui/components/StatusLine.d.ts +0 -19
  1777. package/dist/tui/components/StatusLine.js +0 -39
  1778. package/dist/tui/components/Transcript.d.ts +0 -21
  1779. package/dist/tui/components/Transcript.js +0 -150
  1780. package/dist/tui/components/dashboard-constants.d.ts +0 -1
  1781. package/dist/tui/components/dashboard-constants.js +0 -1
  1782. package/dist/tui/hooks/useDashboardData.d.ts +0 -24
  1783. package/dist/tui/hooks/useDashboardData.js +0 -75
  1784. package/dist/tui/hooks/useKeybindings.d.ts +0 -19
  1785. package/dist/tui/hooks/useKeybindings.js +0 -75
  1786. package/dist/tui/hooks/useMouseHandler.d.ts +0 -15
  1787. package/dist/tui/hooks/useMouseHandler.js +0 -90
  1788. package/dist/tui/hooks/useMutate.d.ts +0 -22
  1789. package/dist/tui/hooks/useMutate.js +0 -54
  1790. package/dist/tui/hooks/useNotifications.d.ts +0 -26
  1791. package/dist/tui/hooks/useNotifications.js +0 -60
  1792. package/dist/tui/hooks/useTranscript.d.ts +0 -42
  1793. package/dist/tui/hooks/useTranscript.js +0 -277
  1794. package/dist/tui/index.d.ts +0 -2
  1795. package/dist/tui/logic.d.ts +0 -144
  1796. package/dist/tui/logic.js +0 -388
  1797. package/dist/tui/raf-batch.d.ts +0 -31
  1798. package/dist/tui/raf-batch.js +0 -89
  1799. package/dist/tui/render/inline-markdown.d.ts +0 -22
  1800. package/dist/tui/render/inline-markdown.js +0 -99
  1801. package/dist/tui/render/markdown.d.ts +0 -10
  1802. package/dist/tui/render/markdown.js +0 -35
  1803. package/dist/tui/render-output.d.ts +0 -42
  1804. package/dist/tui/render-output.js +0 -81
  1805. package/dist/tui/slash-commands.d.ts +0 -21
  1806. package/dist/tui/slash-commands.js +0 -71
  1807. package/dist/tui/turn-status.d.ts +0 -10
  1808. package/dist/tui/turn-status.js +0 -48
  1809. package/dist/tui/ws-client.d.ts +0 -39
  1810. package/dist/tui/ws-client.js +0 -139
  1811. package/scripts/install-bundled-dependencies.mjs +0 -54
  1812. package/web/dist/assets/board-math-css-CB4GJ6qO.js +0 -2
  1813. package/web/dist/assets/index-CaSZPg_H.css +0 -1
  1814. package/web/dist/assets/index-CzOR7Edh.js +0 -522
  1815. package/web/dist/assets/index-cIGFv27z.js +0 -1
@@ -1,1790 +0,0 @@
1
- import type { PlatformSettingsSnapshot } from '../../core/platform-settings-spec.js';
2
- export type { PlatformSettingsPatch, PlatformSettingsSnapshot, PlatformFieldSnapshot, PlatformFieldKey } from '../../core/platform-settings-spec.js';
3
- import type { ResolveMediaInput, ResolveMediaResult } from './inline-media-types.js';
4
- export type { InlineMediaErrorCode, ResolveMediaInput, ResolveMediaResult } from './inline-media-types.js';
5
- import type { SessionsSetStarredReturn, SessionsRenameReturn } from './session-metadata-schemas.js';
6
- export type { SessionsSetStarredArgs, SessionsSetStarredReturn, SessionsRenameArgs, SessionsRenameReturn, } from './session-metadata-schemas.js';
7
- import type { z } from 'zod';
8
- import type { EngineSelection, ModelRef } from '../agents/engine-selection.js';
9
- export type { EngineSelection, ModelRef } from '../agents/engine-selection.js';
10
- import type { queryInputSchemas, mutateInputSchemas } from './input-schemas.js';
11
- import type { Project, CreateProjectResult } from '../projects/index.js';
12
- import type { CostSummary } from '../costs/cost-tracker.js';
13
- import type { ProviderUsage } from '../costs/usage-store.js';
14
- export type { ProviderUsage, UsageBilling, UsageFreshness, UsageResetCredit, UsageResetCredits, UsageWindow, } from '../costs/usage-store.js';
15
- import type { UsageResetResult } from '../costs/account-reset.js';
16
- export type { UsageResetResult } from '../costs/account-reset.js';
17
- export type { ResetProvider, ResetStatus } from '../costs/reset-account.js';
18
- import type { ServerUpdateStatus } from '../system/update-ui-state.js';
19
- import type { SystemUpdateCheckResult } from '../system/server-update-coordinator.js';
20
- export type { SystemUpdateCheckResult } from '../system/server-update-coordinator.js';
21
- export type { ServerUpdateState, ServerUpdateStatus } from '../system/update-ui-state.js';
22
- import type { EventBus } from '../../events/index.js';
23
- import type { SessionStateReader } from '../../core/session-state.js';
24
- import type { SettingSnapshotEntry } from '../../core/settings-spec.js';
25
- import type { EnvironmentSystemPrompt } from '../agents/environments/system-prompt.js';
26
- export type { EnvironmentSystemPrompt, SystemPromptKind } from '../agents/environments/system-prompt.js';
27
- import type { AttachmentMeta, AuthNoticeAction, ChatNoticeLevel, NoticeAction, SessionContextUsage, SystemTurnOrigin, TodoSnapshot } from '../../core/types/agent-types.js';
28
- export type { AuthNoticeAction, ChatNoticeLevel, NoticeAction, SessionContextUsage, SystemTurnOrigin, TodoItem, TodoSnapshot, TodoStatus, } from '../../core/types/agent-types.js';
29
- import type { PlatformAdapter } from '../../platform/adapter.js';
30
- import type { SubagentSpawnRef } from '../../core/subagent-spawn.js';
31
- import type { TeamActionRef, TeamWorkerRef } from '../../core/team-action.js';
32
- export type { TeamActionRef, TeamWorkerRef } from '../../core/team-action.js';
33
- import type { BoardActionRef } from '../../core/board-action.js';
34
- export type { BoardActionRef } from '../../core/board-action.js';
35
- import type { HookBackend, HookEvent, HookFilterValue, HookResultMode, HookSource } from '../../store/hook-registry.js';
36
- import type { HookApplyTime, HookMountTarget } from '../hooks/hook-view.js';
37
- import type { LayerOrigin } from '../../core/builtin-layer.js';
38
- export type { HookApplyTime, HookMountTarget } from '../hooks/hook-view.js';
39
- import type { Session } from '../../store/session-registry-repo.js';
40
- import type { ExecutionRecord } from '../../store/execution-repo.js';
41
- import type { Waitpoint } from '../../store/waitpoint-repo.js';
42
- import type { SessionTotals } from '../../store/session-totals.js';
43
- export type { SessionTotals } from '../../store/session-totals.js';
44
- import type { ScheduleTask } from '../../store/schedule-repo.js';
45
- import type { ScheduleSpec, SchedulePatch } from '../scheduling/schedule-spec.js';
46
- import type { BoardRecord } from '../../store/board-repo.js';
47
- import type { SessionHistory } from '../../store/conversation-history-repo.js';
48
- import type { Backend } from '../../agent-adapter/types.js';
49
- import type { ProjectNote } from '../../store/project-notes-repo.js';
50
- import type { AuthLoginService, AuthLogoutResult, AuthLogoutSuccess, AuthStatusSnapshot, LoginFlowState, LogoutAccountInput } from '../auth/index.js';
51
- export type { AuthAccountState, AuthAccountStatus, AuthCredentialStatus, AuthStatusSnapshot, AuthType, LoginFlowNotice, LoginFlowState, LoginFlowStep, LoginOutcome, LoginPendingPrompt, LoginPromptOption, } from '../auth/index.js';
52
- import type { CustomProviderStores, CustomProviderView } from '../pi-providers/index.js';
53
- export type { CustomProviderApi, CustomProviderModelSpec, CustomProviderView, } from '../pi-providers/index.js';
54
- import type { UsageSharingSettings } from '../costs/aistatus-config.js';
55
- export type { UsageSharingSettings } from '../costs/aistatus-config.js';
56
- export type { ProviderRateLimitPolicyOverride, ProviderRateLimitWindowPolicyOverride, ProviderRateLimits, } from '../../core/settings-spec.js';
57
- export type Ok<T> = {
58
- ok: true;
59
- data: T;
60
- };
61
- export type Err = {
62
- ok: false;
63
- code: string;
64
- message: string;
65
- };
66
- export type Result<T> = Ok<T> | Err;
67
- type QueryInputSchemas = typeof queryInputSchemas;
68
- type MutateInputSchemas = typeof mutateInputSchemas;
69
- /** Every query scope — the keys of `queryInputSchemas` (mirrored by `QueryReturnMap`). */
70
- export type QueryScope = keyof QueryInputSchemas;
71
- /** Every mutate op — the keys of `mutateInputSchemas` (mirrored by `MutateReturnMap`). */
72
- export type MutateOp = keyof MutateInputSchemas;
73
- export interface SubscribeFilter {
74
- events: string[];
75
- projectId?: string | null;
76
- /** Scope `session.message` events to a single session (S4 chat live stream). REQUIRED for
77
- * `session.message.delta`: token-level previews are delivered to session-scoped subscriptions
78
- * only, so an app-wide stream is never flooded with another session's deltas. */
79
- sessionId?: string | null;
80
- }
81
- export interface UiEvent {
82
- type: string;
83
- ts: string;
84
- payload: unknown;
85
- }
86
- export interface SessionsPendingInteraction {
87
- askUser: {
88
- requestId: string;
89
- questions: {
90
- question: string;
91
- header: string;
92
- options: {
93
- label: string;
94
- description?: string;
95
- }[];
96
- multiSelect: boolean;
97
- }[];
98
- blocking: boolean;
99
- } | null;
100
- plan: {
101
- requestId: string;
102
- planContent: string;
103
- planFilePath: string | null;
104
- } | null;
105
- }
106
- export type AuthLogoutReturn = AuthLogoutSuccess;
107
- export interface AuthSyncGatewayReturn {
108
- /** False when nothing was written (see `reason`); not an error. */
109
- configured: boolean;
110
- endpoints: number;
111
- defaultSet: boolean;
112
- favorites: ModelRef[];
113
- reason?: string;
114
- }
115
- export interface AuthRemoveCustomProviderReturn {
116
- removed: boolean;
117
- }
118
- export type { AttachmentMeta } from '../../core/types/agent-types.js';
119
- export interface SessionsMarkManyReadReturn {
120
- /** How many of the requested sessions were stamped — ids that no longer resolve (purged runs)
121
- * are skipped rather than failing the batch. */
122
- marked: number;
123
- }
124
- /** Return of sessions.answerQuestion / sessions.respondPlan. 'already-resolved' means another
125
- * client (or Slack / timeout) resolved the interaction first — not an error; the caller
126
- * refetches the transcript to show the final state. */
127
- export interface SessionsInteractionMutateReturn {
128
- outcome: 'resolved' | 'already-resolved';
129
- }
130
- /** `already-approved` = a repeated approve (another device or a double-click) — idempotent,
131
- * not an error; the card simply shows the recorded state. */
132
- export interface SessionsRespondDecisionReturn {
133
- outcome: 'recorded' | 'already-approved';
134
- }
135
- /** `cancelled: false` means nothing was queued any more — the window reset and the turn
136
- * already resumed. A late click is a no-op, not an error. */
137
- export interface SessionsCancelResumeReturn {
138
- cancelled: boolean;
139
- }
140
- /** Fire-and-forget like sessions.send — the regenerated reply streams over `session.message`. */
141
- export interface SessionsRewindReturn {
142
- accepted: true;
143
- }
144
- export interface BudgetValue {
145
- daily_usd: number;
146
- monthly_usd: number;
147
- }
148
- export interface ProviderRateLimitPolicy {
149
- provider: string;
150
- windowType?: string;
151
- windowLabel?: string;
152
- enabled: boolean;
153
- threshold: number | null;
154
- }
155
- export interface ModelsMutationReturn {
156
- changed: boolean;
157
- }
158
- export interface ProjectConduitInfo {
159
- id: string;
160
- kind: 'research' | 'general';
161
- contextDir: string;
162
- hasMission: boolean;
163
- conduits: Record<string, string>;
164
- }
165
- export interface SessionInfo {
166
- /** The stable TRACK id (Cortex UI identity): registry key, `session.*` events, transcript, and every
167
- * ui-service op key. Since the track/backend session-id decoupling this is NO LONGER the backend CLI
168
- * resume target — use `backendSessionId` for that. */
169
- sessionId: string;
170
- /** The backend CLI resume target (`--resume`/`--session-id`) and session-backup file name — the id
171
- * the "Session ID" surface shows as the backend UUID. Null on a fresh session before its first turn
172
- * completes (no backend id assigned yet — never fabricated). Legacy records that predate the
173
- * decoupling fall back to `sessionId` (where the conflated id WAS the backend id). */
174
- backendSessionId: string | null;
175
- projectId: string;
176
- backend: string;
177
- kind: 'local' | 'scheduled';
178
- /** How the session was initiated: 'direct' (user chat), 'thread' (pipeline/dispatch
179
- * step), or 'scheduled' (scheduled job). The workbench session list shows only 'direct'. */
180
- origin: 'direct' | 'thread' | 'scheduled';
181
- /** The schedule (ScheduleInfo.id) whose fire produced this session — drives the left rail's
182
- * per-schedule run grouping and the chat trigger card. Survives a reply converting the run to
183
- * a direct session (provenance). Null for sessions with no schedule origin / legacy records. */
184
- scheduleId: string | null;
185
- /** The board (BoardInfo.id) this session is bound to, or null. At most one per session. */
186
- boardId: string | null;
187
- /** Team mode: the lead session that owns this worker; non-null means this session is a worker. */
188
- teamLeadId: string | null;
189
- /** The worker's short name within its team; null outside team mode. */
190
- workerName: string | null;
191
- /** Team mode: what the lead spawned this worker to do (first line of its spawn prompt, capped).
192
- * Null for ordinary sessions and for workers spawned before the record carried it. */
193
- workerBrief?: string | null;
194
- createdAt: string;
195
- lastUsedAt: string;
196
- resumable: boolean;
197
- label: string | null;
198
- /** Optional for older fixtures/clients; sessions.list always supplies a boolean. */
199
- starred?: boolean;
200
- /** Explicitly renamed labels take precedence over generated scheduled-run titles. */
201
- labelRenamed?: boolean;
202
- /** Complete engine choice persisted with the session. */
203
- selection: EngineSelection | null;
204
- /** The agent template the session runs as — its environment (prompt, tools, skills, rules), the
205
- * other half of "what will the next turn be". Null when the session follows its channel's
206
- * selection and, beneath that, the global default. Kept in sync by the agent-switch rule. */
207
- agentName?: string | null;
208
- /** Latest backend context occupancy, or null until a supported backend reports one. Optional only
209
- * for rolling compatibility with older servers/fixtures; current sessions.list always supplies it. */
210
- contextUsage?: SessionContextUsage | null;
211
- /** Whether this backend supports manual context compaction. */
212
- contextCompactionSupported?: boolean;
213
- /** The agent's latest task list, or null when it has not written one. Queryable snapshot half of
214
- * snapshot+delta — `session.todos` is the delta. Live state, not persisted: a server restart
215
- * ends the run that owned the list, so an absent list after boot is the truth. */
216
- todos?: TodoSnapshot | null;
217
- /** Live running snapshot: true while an interactive turn (a non-thread execution) is live on the
218
- * session's channel. Authoritative at query time — the client uses this as the snapshot and the
219
- * `session.status` event stream as the delta (snapshot + delta), so running state survives
220
- * session switches, page reloads, and SSE reconnects. */
221
- running: boolean;
222
- /** Background-hold snapshot (web bg-hold): true while the session's foreground turn has ended but
223
- * a background task (run_in_background Bash / background subagent) still holds it — `running`
224
- * stays true throughout. Mirrors the `session.status` `backgroundRunning` delta via the in-memory
225
- * bg-held registry (snapshot + delta, same pattern as `running`), so the state survives session
226
- * switches, page reloads, and app restarts. False while a live foreground turn is on the channel. */
227
- backgroundRunning: boolean;
228
- /** Awaiting-user-action snapshot: true while the session is blocked on a pending interaction that
229
- * needs the user to act — an ask-user question or a plan approval — resolved from the in-memory
230
- * pending maps keyed by the session's channel (`getPendingAskUser`/`getPendingPlan`). This is the
231
- * ONLY state that drives the rail's amber「需要你」dot; plain running and web bg-hold both render
232
- * blue. False when nothing is pending, and false when the pending-interaction deps are absent
233
- * (fixtures / TUI). Snapshot-only, mirrored live via the `session.interaction` event stream. */
234
- awaitingInput: boolean;
235
- /** How many waitpoints this session is still waiting on — external "wake me when X finishes"
236
- * objects that are still `armed` (docs/waitpoints.md). Distinct from `awaitingInput`: that one
237
- * means "blocked on YOU", this one means "blocked on a machine, nothing for you to do", which is
238
- * why it must never drive the amber dot. Counted with the ownership union documented on
239
- * WaitpointInfo (own sessionId OR own channel), deduped per waitpoint. 0 when nothing is pending
240
- * and 0 when the waitpoint dep is absent (fixtures / TUI). Optional for rolling compatibility
241
- * with older servers, like `totals` below — consumers read it as `?? 0`. */
242
- waitingOn?: number;
243
- /** Team mode: a worker's blocking questions and plans that were routed to its lead (counted here,
244
- * not in `awaitingInput`, because the lead answers them). 0 for every other session. */
245
- waitingOnLead?: number;
246
- /** Real agent-turn count for the composer (NOT the number of user-message rounds). While running,
247
- * the live count of the in-flight turn (from the running execution); while idle, the last run's
248
- * final turn count (from the most recent non-thread execution on the session's channel). Null when
249
- * unknown (a running turn before its first progress event, or a session that never ran). The client
250
- * uses this as the snapshot and the `session.turn` event stream as the delta (snapshot + delta). */
251
- numTurns: number | null;
252
- /** Last run's total cost in USD for the composer status line. Sourced from the most recent
253
- * non-thread execution on the session's channel (`metrics.costUsd`), the same run whose turn count
254
- * drives `numTurns`. Null while running (cost is only finalized at turn end — there is no live
255
- * in-memory cost source, so a running turn never falls back to the previous run's cost) and null
256
- * when the session never ran. Snapshot-only (no live delta event); refreshed when sessions.list
257
- * refetches on a turn-end status edge. */
258
- costUsd: number | null;
259
- /** WHOLE-SESSION cumulative stats — the counterpart of `numTurns`/`costUsd` above, which describe
260
- * only the last run. Null when the session has never finished a run. Carries its own semantics
261
- * (see SessionTotals): time and turns count the session's own runs, cost also includes the
262
- * Agent-tool children those runs spawned. Optional for rolling compatibility with older servers.
263
- * Snapshot-only, like `costUsd`: refreshed when sessions.list refetches on a turn-end edge. */
264
- totals?: SessionTotals | null;
265
- /** Unread: the session had activity (lastUsedAt, bumped at turn end) AFTER the user last viewed
266
- * it (`sessions.markRead` → registry lastReadAt). Legacy records with no lastReadAt are treated
267
- * as read (no unread flood on first deploy). */
268
- unread: boolean;
269
- }
270
- export type InteractionKind = 'ask-user' | 'plan-approval';
271
- export type InteractionStatus = 'pending' | 'answered' | 'approved' | 'rejected' | 'expired' | 'cancelled';
272
- export interface InteractionQuestion {
273
- question: string;
274
- header: string;
275
- options: {
276
- label: string;
277
- description?: string;
278
- }[];
279
- multiSelect: boolean;
280
- }
281
- export type DecisionActionKind = 'approve' | 'explain' | 'revise';
282
- export interface DecisionAction {
283
- action: DecisionActionKind;
284
- /** The chat message sent for explain/revise; absent for approve (nothing goes to the agent). */
285
- message?: string;
286
- ts: string;
287
- }
288
- export interface DecisionItem {
289
- id: string;
290
- title: string;
291
- decision: string;
292
- context: string;
293
- reasoning: string;
294
- actions: DecisionAction[];
295
- }
296
- export interface TranscriptInteractionDetail {
297
- id: string;
298
- kind: InteractionKind;
299
- status: InteractionStatus;
300
- payload: {
301
- questions?: InteractionQuestion[];
302
- /** Severity of an ask-user card ('info'|'warning'|'error') — absent = neutral look. */
303
- level?: ChatNoticeLevel;
304
- /** False only on a non-blocking ask-user card (the agent did not wait for it). */
305
- blocking?: boolean;
306
- planContent?: string;
307
- planFilePath?: string | null;
308
- };
309
- result?: {
310
- answers?: Record<string, string>;
311
- feedback?: string;
312
- };
313
- resolvedVia?: string;
314
- }
315
- export interface TranscriptDebugDetails {
316
- /** Exact message sent to the agent for a user turn. */
317
- agentMessage?: string;
318
- /** Opaque reference for fetching one tool's full DEBUG payload. */
319
- toolRef?: string;
320
- /** Unabridged structured tool-call input. */
321
- toolInput?: unknown;
322
- /** Full correlated normalized tool result. */
323
- toolResult?: {
324
- content: string;
325
- isError: boolean;
326
- };
327
- /** Derived at query time from the agent-server warning threshold; never persisted. */
328
- overCharacterThreshold?: true;
329
- }
330
- export interface TranscriptMessage {
331
- /** `worker-progress`: a team worker's final reply for a turn that ended while it still had work
332
- * pending (queued message, background task, open waitpoint or interaction). Recorded in the
333
- * LEAD's history for display only: it never reaches the lead model and is not a user turn. */
334
- type: 'user' | 'assistant' | 'thinking' | 'tool' | 'interaction' | 'worker-progress';
335
- blockId?: string;
336
- /** user / assistant / interaction / worker-progress text; null for tool events. */
337
- text: string | null;
338
- /** tool name (tool events only). */
339
- toolName: string | null;
340
- /** compact tool input summary (tool events only). */
341
- toolInput: string | null;
342
- /** Remote execution target (remote tool events only). */
343
- toolDevice?: string;
344
- /** What a lead's worker tool call did (worker_spawn/send/answer/stop tool rows only). */
345
- teamAction?: TeamActionRef;
346
- /** What a successful `board_open` call did (its tool row only; absent on failed calls and on
347
- * rows written before this field existed). */
348
- boardAction?: BoardActionRef;
349
- /** The worker a `worker-progress` row came from (worker-progress rows only). */
350
- worker?: TeamWorkerRef;
351
- /** User rows only: Cortex authored this turn — a resume signal, a task/thread callback, a
352
- * subtask's question, a backgrounded agent's result — rather than a human typing it. Chat
353
- * surfaces render it as a one-line hint instead of a user bubble. Absent = human. */
354
- systemOrigin?: SystemTurnOrigin;
355
- /** Sensitive lossless data. Present only in responses produced while server DEBUG is enabled. */
356
- debug?: TranscriptDebugDetails;
357
- /** Semantic chat-notice styling for system-authored assistant messages. */
358
- noticeLevel?: ChatNoticeLevel;
359
- /** Control the notice offers (e.g. declining a promised auto-resume). */
360
- noticeAction?: NoticeAction;
361
- /** Secret-free one-click target carried only by authentication notices. */
362
- authAction?: AuthNoticeAction;
363
- /** interaction subtype: 'ask-user-answered' | 'plan-approved' | 'plan-rejected' (legacy rows)
364
- * or derived from kind+status for entity rows (display compat). */
365
- subtype?: string;
366
- /** Structured interaction entity (interaction rows with an id). Absent on legacy rows. */
367
- interaction?: TranscriptInteractionDetail;
368
- /** File attachments: user uploads via the web composer (15a, user messages), agent-sent
369
- * files via the `send_file` MCP tool (20a, assistant messages), or the images a tool call
370
- * returned to the model (tool messages). */
371
- attachments?: AttachmentMeta[];
372
- /** Agent-announced decisions via the `send_decision` MCP tool (assistant messages). */
373
- decisions?: DecisionItem[];
374
- /** Present on a user message that replaced an earlier one via edit+rewind (sessions.rewind):
375
- * the original text/ts backing the「已编辑」badge + hover/tap original-message card. */
376
- edited?: {
377
- originalText: string;
378
- originalTs: string;
379
- };
380
- /** Native-subagent grouping key on rows produced by one child. Absent = main agent. */
381
- subagentId?: string;
382
- /** Complete prompts for every child spawned by this main-agent tool row. */
383
- subagentSpawns?: SubagentSpawnRef[];
384
- /** Declared subagent type, e.g. `explore`. Reported on the subagent's rows, not the anchor. */
385
- subagentType?: string;
386
- /** The spawning call's task description as the backend reports it. */
387
- subagentDescription?: string;
388
- /** The model that produced this row, as the subagent's own messages report it. Absent on the
389
- * anchor and on history written before the field existed — absent means unknown. */
390
- subagentModel?: string;
391
- /** Terminal state the backend reported for the subagent named by `subagentId`. Live-only: it
392
- * corrects that block's status while the session is held open and is never persisted, because
393
- * a session that is no longer live re-derives every block as done anyway. */
394
- subagentEnded?: 'completed' | 'failed' | 'killed';
395
- ts: string;
396
- /**
397
- * Real elapsed since the previous message in the session's chronological stream, in ms
398
- * (derived from `ts` deltas). Null for the first message and when either ts is unparseable.
399
- * Per-message cost has no real attribution source (conversation-history carries no cost; the
400
- * cost store is keyed by project/trigger, not session/turn/message) — deliberately absent, not
401
- * a fabricated null field.
402
- */
403
- elapsedMs: number | null;
404
- }
405
- export interface TranscriptTurn {
406
- turnIndex: number;
407
- messages: TranscriptMessage[];
408
- }
409
- export interface PendingTranscriptUserMessage {
410
- id: string;
411
- text: string;
412
- ts: string;
413
- attachments?: AttachmentMeta[];
414
- /** Same signal as `TranscriptMessage.systemOrigin`, on a row that is not committed yet. */
415
- systemOrigin?: SystemTurnOrigin;
416
- }
417
- export interface TranscriptSubagentSummary {
418
- id: string;
419
- type?: string;
420
- description?: string;
421
- model?: string;
422
- toolCount: number;
423
- hasDetails: boolean;
424
- structurallyOpen: boolean;
425
- /** Explicit per-child lifecycle authority; absent for legacy structural inference. */
426
- status?: 'running' | 'completed' | 'failed' | 'killed';
427
- }
428
- /** Rows that changed since a client's cursor, addressed by flat position across the transcript. */
429
- export interface TranscriptDeltaRow {
430
- /** Position in the flattened row stream (turns concatenated in order). */
431
- index: number;
432
- turnIndex: number;
433
- message: TranscriptMessage;
434
- }
435
- export interface TranscriptDelta {
436
- changed: TranscriptDeltaRow[];
437
- /** Row count now. A client drops anything at or past it, which is how a rewind shortens. */
438
- total: number;
439
- }
440
- export interface SessionTranscript {
441
- sessionId: string;
442
- turns: TranscriptTurn[];
443
- /** Durable messages accepted into a live backend turn but not consumed by the model yet.
444
- * Optional for rolling compatibility with older servers; current servers always return it. */
445
- pendingUserMessages?: PendingTranscriptUserMessage[];
446
- /** Compact opt-in only. Present even when empty; absent on full transcript responses. */
447
- subagentSummaries?: TranscriptSubagentSummary[];
448
- /** Compact opt-in only. Pass back as `since` to get the next response as a delta. Absent when
449
- * the server cannot serve deltas for this read. */
450
- cursor?: string;
451
- /** Present INSTEAD of a populated `turns` when the response answers a `since` cursor. A client
452
- * that does not understand it must not send `since`. */
453
- delta?: TranscriptDelta;
454
- }
455
- export interface SessionSubagentTranscript {
456
- sessionId: string;
457
- subagentId: string;
458
- messages: TranscriptMessage[];
459
- }
460
- export interface ScheduleInfo {
461
- id: string;
462
- type: 'interval' | 'daily' | 'weekly' | 'once';
463
- message: string;
464
- projectId: string;
465
- /** Complete engine choice materialized when the schedule is created. */
466
- selection: EngineSelection | null;
467
- nextRun: string | null;
468
- lastRun: string | null;
469
- paused: boolean;
470
- pausedBy: string | null;
471
- /** Timing spec — only the field(s) matching `type` are set; the rest are null.
472
- * Drives cadence labels ("daily 07:30") and edit-form prefill. */
473
- intervalMs: number | null;
474
- time: string | null;
475
- dayOfWeek: number | null;
476
- }
477
- export interface BoardInfo {
478
- id: string;
479
- projectId: string;
480
- /** Directory name under `<project context>/boards/`. */
481
- slug: string;
482
- title: string;
483
- createdAt: string;
484
- updatedAt: string;
485
- }
486
- /** One decision card in a board's stream: a projected send_decision item with its user responses
487
- * merged in (same DecisionItem shape the transcript renders), plus provenance. */
488
- export interface BoardDecisionEntry {
489
- /** ISO ts of the send_decision call — the stream's ordering key. */
490
- ts: string;
491
- /** The session that announced the decision (source row on the board card). */
492
- sessionId: string;
493
- item: DecisionItem;
494
- }
495
- /** `boards.style`: the preset stylesheet shipped with the server plus the user's optional
496
- * override (`<cortex home>/config/board.css`, null when absent). Clients stack them as
497
- * theme variables → defaultCss → userCss → board body. */
498
- export interface BoardStyle {
499
- defaultCss: string;
500
- userCss: string | null;
501
- }
502
- /** One signal that has landed on a waitpoint. `message`/`member`/`source` are written by the
503
- * external process — plain text only, never interpreted. */
504
- export interface WaitpointSignalInfo {
505
- at: number;
506
- status: 'ok' | 'fail' | 'progress';
507
- member: string | null;
508
- message: string | null;
509
- source: string;
510
- }
511
- /** One waitpoint a session is still waiting on (docs/waitpoints.md). Only `armed` ones are returned:
512
- * a fired or expired waitpoint has already posted its own notice into the transcript, so repeating
513
- * it in a panel would tell the same story twice.
514
- *
515
- * OWNERSHIP — a waitpoint belongs to a session when EITHER holds:
516
- * `owner.sessionId === session.sessionId` the session armed it, or
517
- * `owner.channel === session's channel` the wake will be delivered HERE.
518
- * Both clauses are needed. The first survives a channel rebind (`bindChannel` does not rewrite
519
- * `record.channel`); the second survives the session being recreated (`!new`, a scheduled re-run),
520
- * because delivery is channel-addressed and find-or-creates a session. A consequence worth knowing:
521
- * the second clause can legitimately surface a waitpoint armed by an EARLIER session on the same
522
- * channel — that is honest, since its wake really will land on the current one.
523
- *
524
- * SECURITY: built field-by-field from the stored record, never by spreading it, so the capability
525
- * secret hash cannot leak by omission. `signals[].data` is deliberately absent — externally written
526
- * and capped at 16 KB per signal, it would bloat every list response. */
527
- export interface WaitpointInfo {
528
- /** `wp_<12 hex>` — public, appears in notices and in the signal command line. */
529
- id: string;
530
- /** Agent-written short name. */
531
- label: string;
532
- /** What the agent said it was waiting for, in its own words. */
533
- intent: string;
534
- /** Always `armed` today; the wider union is carried so the shape survives if settled waitpoints
535
- * are ever surfaced. */
536
- state: 'armed' | 'fired' | 'expired' | 'cancelled';
537
- /** Where the signal is expected from. `device` names the machine whose spool dir the sweep drains. */
538
- emitFrom: {
539
- kind: 'local';
540
- } | {
541
- kind: 'device';
542
- device: string;
543
- };
544
- /** Quorum progress. `got` counts distinct REPORTER KEYS, not signals: named members are deduped,
545
- * anonymous signals take synthetic slots. So `got` can exceed `members.length`, and a per-member
546
- * checklist must never be rendered from `members` alone. */
547
- quorum: {
548
- need: number;
549
- got: number;
550
- members: string[];
551
- };
552
- /** A single `fail` resolves it with the quorum unmet — which is why a resolved waitpoint can
553
- * legitimately read "1 of 3". */
554
- failFast: boolean;
555
- /** Mailbox mode. After each fire below `maxSignals` the quorum counter resets, so progress
556
- * appearing to go backwards is not a bug — `fires`/`maxSignals` is what disambiguates it. */
557
- fires: number;
558
- maxSignals: number;
559
- createdAt: number;
560
- expiresAt: number;
561
- /** Signals received so far, oldest first. Includes `progress` reports, which never resolve. */
562
- signals: WaitpointSignalInfo[];
563
- /** Delivery write-ahead bit. `pending && attempts > 1 && lastError` is the silent failure
564
- * "the signal landed but the wake did not, and it is being retried" — invisible everywhere else.
565
- * `lastError` is a locally generated message, not attacker input. */
566
- delivery: {
567
- pending: boolean;
568
- attempts: number;
569
- lastError: string | null;
570
- lastAt: number | null;
571
- };
572
- /** Wakes spent in the trailing hour, and the cap they are counted against. */
573
- wakesLastHour: number;
574
- wakeLimit: number;
575
- /** True while the hourly cap is holding a wake back: the signals are recorded and the wake is
576
- * delivered once the trailing hour has room again. */
577
- rateLimited: boolean;
578
- }
579
- export interface ExecutionInfo {
580
- id: string;
581
- status: 'running' | 'completed' | 'failed' | 'cancelled' | 'stale';
582
- sessionId: string | null;
583
- projectId: string | null;
584
- startedAt: string;
585
- finishedAt: string | null;
586
- durationMs: number | null;
587
- cost: number | null;
588
- }
589
- export interface ExecutionDetailInfo {
590
- id: string;
591
- /** Android shells up to 2026.10.6 require this field (and `threadId`) when parsing the detail;
592
- * newer shells read only status, sessionId and projectId. */
593
- kind: string;
594
- status: 'running' | 'completed' | 'failed' | 'cancelled' | 'stale';
595
- projectId: string | null;
596
- sessionId: string | null;
597
- /** Always null. Kept for the released Android shells noted on `kind`. */
598
- threadId: null;
599
- runtime: {
600
- startedAt: string;
601
- updatedAt: string;
602
- endedAt: string | null;
603
- };
604
- metrics: {
605
- costUsd: number | null;
606
- numTurns: number | null;
607
- durationS: number | null;
608
- };
609
- text: {
610
- label: string | null;
611
- finalOutput: string | null;
612
- error: string | null;
613
- };
614
- }
615
- export interface ConfigBudget {
616
- daily_usd: number | null;
617
- monthly_usd: number | null;
618
- /** Per-project overrides keyed by project id. Empty when every project inherits the globals.
619
- * Entries are pair-only by construction — a malformed half-pair on disk is dropped, not
620
- * surfaced as a partially-null override. */
621
- projects: Record<string, BudgetValue>;
622
- }
623
- export interface ConfigModels {
624
- default: EngineSelection | null;
625
- favorites: ModelRef[];
626
- memory: Record<string, {
627
- thinking: string | null;
628
- mode: string;
629
- }>;
630
- }
631
- export interface ModelCatalogRoute {
632
- /** Gateway endpoint group: 'anthropic' for claude, the PI provider name otherwise. */
633
- endpoint: string;
634
- backend: Backend;
635
- /** PI `--provider`; null for claude. */
636
- provider: string | null;
637
- /** Mode names gateway.yaml actually declares for this endpoint, in file order. Never empty: an
638
- * endpoint with no gateway section falls back to the name `discoverEndpoints` would generate. */
639
- modes: string[];
640
- /** Selectable model ids. Empty means "known route, unknown models" — free text, not an error. */
641
- models: string[];
642
- /** Where the route was first seen: the built-in Anthropic table, PI's scan of logged-in
643
- * providers, a user-defined provider, or gateway.yaml alone (⇒ likely not logged in). */
644
- source: 'builtin' | 'pi' | 'custom' | 'gateway';
645
- /** Thinking levels keyed by model id, for the models whose source could tell — PI reports each
646
- * model's own ladder. A model absent from this map accepts `thinkingLevels` below: the catalog
647
- * never narrows what it cannot vouch for. Optional while clients and servers roll
648
- * independently; an older server omits it and every model gets the backend's whole ladder. */
649
- modelThinking?: Record<string, string[]>;
650
- }
651
- export interface ModelCatalogSnapshot {
652
- routes: ModelCatalogRoute[];
653
- /** True while PI's first model scan is still in flight — the client may refetch shortly. */
654
- piPending: boolean;
655
- /** The backend-wide thinking ladders, served so a picker does not keep a second copy of the
656
- * table the selection validator already enforces. Optional for the same roll-skew reason as
657
- * `modelThinking`. */
658
- thinkingLevels?: Record<Backend, string[]>;
659
- }
660
- export interface ConfigMachine {
661
- name: string;
662
- cortexPath: string | null;
663
- gpuCount: number | null;
664
- ssh: boolean;
665
- win: boolean;
666
- }
667
- export interface ConfigMcp {
668
- servers: string[];
669
- }
670
- /** One execution environment (`config/environments/`) offered by the picker. */
671
- export interface ConfigAgentEntry {
672
- name: string;
673
- description?: string;
674
- }
675
- export interface ConfigEnvEntry {
676
- key: string;
677
- enabled?: boolean;
678
- present: boolean;
679
- masked: string;
680
- }
681
- export type ConfigSettingEntry = SettingSnapshotEntry;
682
- export interface ConfigHook {
683
- id: string;
684
- event: HookEvent;
685
- enabled: boolean;
686
- source: HookSource;
687
- /** A built-in entry the user has switched away from its shipped state. */
688
- overridden: boolean;
689
- }
690
- /** `run` flattened for the editor: exactly one of script/command is non-null. */
691
- export interface HookRunInfo {
692
- script: string | null;
693
- command: string | null;
694
- /** Registry timeout in SECONDS. */
695
- timeoutSec: number | null;
696
- }
697
- export interface HookScopeInfo {
698
- backends: HookBackend[] | null;
699
- requiresTool: string | null;
700
- }
701
- export interface HookDetail {
702
- id: string;
703
- event: HookEvent;
704
- /** Regex matcher for agent:/cc:/pi: events; null when the event uses filters or has no matcher. */
705
- matcher: string | null;
706
- /** Equality filters for cortex:* events; null otherwise. */
707
- matcherFilters: Record<string, HookFilterValue> | null;
708
- run: HookRunInfo;
709
- scope: HookScopeInfo | null;
710
- blocking: {
711
- mode: 'webhook';
712
- ttlMin: number;
713
- } | null;
714
- result: HookResultMode | null;
715
- enabled: boolean;
716
- source: HookSource;
717
- /** A built-in entry the user has switched away from its shipped state. */
718
- overridden: boolean;
719
- /** The declaration's own `version` field, if it carries one; null otherwise. */
720
- version: string | null;
721
- /** Declaration filename. Typed nullable for clients built against the older shape. */
722
- fileName: string | null;
723
- /** Position in load order — which is also execution order within one event. */
724
- order: number;
725
- /** Where the declaration actually installs once compiled. */
726
- mountsOn: HookMountTarget[];
727
- /** Result modes the loader accepts for this event, for a constrained editor choice. */
728
- legalResults: HookResultMode[];
729
- appliesAt: HookApplyTime;
730
- /** Whether run.script resolves on disk; null when the hook is command-based. */
731
- scriptExists: boolean | null;
732
- /** True only for user entries; a built-in is changed only through its switch. */
733
- editable: boolean;
734
- /** Always null. Kept so released mobile clients that still read them keep parsing the detail. */
735
- template: null;
736
- phase: null;
737
- }
738
- export interface HookScriptInfo {
739
- name: string;
740
- usedBy: string[];
741
- /** Shipped, shipped but replaced by the user's copy, or the user's own. */
742
- origin: LayerOrigin;
743
- }
744
- export interface HooksOverview {
745
- hooks: HookDetail[];
746
- scripts: HookScriptInfo[];
747
- hooksDir: string;
748
- }
749
- /** The editable surface of a declaration, flattened so the form binds one field per control. */
750
- export interface HookDraftInput {
751
- event: string;
752
- matcher?: string;
753
- matcherFilters?: Record<string, HookFilterValue>;
754
- script?: string;
755
- command?: string;
756
- timeoutSec?: number;
757
- backends?: HookBackend[];
758
- requiresTool?: string;
759
- result?: HookResultMode;
760
- enabled?: boolean;
761
- }
762
- export interface HooksCreateReturn {
763
- id: string;
764
- fileName: string;
765
- }
766
- export interface HooksUpdateReturn {
767
- changed: boolean;
768
- }
769
- export interface HooksSetEnabledReturn {
770
- changed: boolean;
771
- /** Always null. Kept so released clients that still read it keep parsing the result. */
772
- warning: string | null;
773
- }
774
- export interface HooksRemoveReturn {
775
- removed: boolean;
776
- }
777
- export interface HooksTestReturn {
778
- ok: boolean;
779
- exitCode: number | null;
780
- stdout: string;
781
- stderr: string;
782
- error: string | null;
783
- }
784
- /** Last composer choice; absent state falls back to models.default. */
785
- export interface ConfigSelectionDefault extends EngineSelection {
786
- agentName?: string;
787
- }
788
- export interface ConfigSnapshot {
789
- platforms?: PlatformSettingsSnapshot[];
790
- budget: ConfigBudget | null;
791
- models: ConfigModels;
792
- machines: ConfigMachine[];
793
- mcp: ConfigMcp | null;
794
- /** The execution environments a composer may pick from, with what each one is and pins. Always
795
- * emitted by current servers; optional while clients and servers roll independently. */
796
- agents?: ConfigAgentEntry[];
797
- hooks: ConfigHook[];
798
- env: ConfigEnvEntry[];
799
- /** Always emitted by current servers; optional while clients and servers roll independently. */
800
- settings?: ConfigSettingEntry[];
801
- /**
802
- * The ONE language knob: it is what every server-side t() string renders in AND what the Web UI
803
- * picks its vocabulary from. `value` is the live process locale (what Cortex is speaking right
804
- * now), not merely what is on disk — a !lang switch is reflected before any restart.
805
- * Optional while clients and servers roll independently: an older server omits it and the SPA
806
- * falls back to its local cache.
807
- */
808
- lang?: ConfigLang;
809
- /** Seed for a draft composer — see {@link ConfigSelectionDefault}. */
810
- selectionDefault: ConfigSelectionDefault | null;
811
- }
812
- export interface ConfigLang {
813
- value: 'en' | 'zh';
814
- /** Where that value came from — 'env' means CORTEX_LANG re-wins on the next restart. */
815
- source: 'env' | 'file' | 'default';
816
- }
817
- export interface MachineInfo {
818
- /** Machine name (key from machines.json). */
819
- name: string;
820
- /** Absolute path to the cortex data directory on the machine; null when unset. */
821
- cortexPath: string | null;
822
- /** Number of GPUs on the machine; null when unset. */
823
- gpuCount: number | null;
824
- /** True when an SSH string is configured (presence flag — raw value never exposed). */
825
- sshConfigured: boolean;
826
- /** Platform family derived from the `win` flag in machines.json. */
827
- os: 'windows' | 'unix';
828
- /** True when the machine's cortex-client is connected via WebSocket right now. */
829
- online: boolean;
830
- /** ISO timestamp of the WebSocket connection; null when offline. */
831
- connectedAt: string | null;
832
- /** ISO timestamp of the last heartbeat received; null when offline. */
833
- lastHeartbeat: string | null;
834
- /** Capabilities advertised by the cortex-client on connect; [] when offline. */
835
- capabilities: string[];
836
- }
837
- /** A compute process holding memory on a GPU (from `nvidia-smi --query-compute-apps`). */
838
- export interface MachineGpuProcess {
839
- pid: string;
840
- /** Process name as reported by nvidia-smi (may be a bare name or a full path). */
841
- name: string;
842
- memoryMb: number;
843
- }
844
- export interface MachineGpu {
845
- /** CUDA device ordinal. */
846
- index: number;
847
- name: string;
848
- utilPercent: number;
849
- memUsedMb: number;
850
- memTotalMb: number;
851
- tempC: number;
852
- powerW: number;
853
- processes: MachineGpuProcess[];
854
- }
855
- /** Host vitals in absolute units; every field is null when the host did not report it. */
856
- export interface MachineVitals {
857
- cpuCores: number | null;
858
- loadAvg1: number | null;
859
- memUsedMb: number | null;
860
- memTotalMb: number | null;
861
- /** Free/total space on the filesystem holding the machine's cortexPath. */
862
- diskFreeGb: number | null;
863
- diskTotalGb: number | null;
864
- uptimeSec: number | null;
865
- }
866
- export interface MachineDetail {
867
- name: string;
868
- online: boolean;
869
- /** null when the machine is offline or the probe failed. */
870
- vitals: MachineVitals | null;
871
- /** Empty when the machine is offline, has no nvidia-smi, or the probe failed. */
872
- gpus: MachineGpu[];
873
- /** Always empty. Kept so SPAs still awaiting their OTA update, which map it, keep rendering. */
874
- liveRuns: never[];
875
- /** ISO timestamp of the successful probe; null when no probe ran or it failed. */
876
- probedAt: string | null;
877
- /** Human-readable probe failure reason; null when the probe succeeded or was skipped. */
878
- probeError: string | null;
879
- }
880
- /** 'stock' = byte-identical to the shipped default, 'modified' = a shipped name that differs,
881
- * 'custom' = no shipped default of that name. */
882
- export type EnvironmentOrigin = 'stock' | 'modified' | 'custom';
883
- export interface EnvironmentEntry {
884
- /** Basename without .json extension. */
885
- name: string;
886
- /** Top-level `description` field from the file; null if absent. */
887
- description: string | null;
888
- /** Full parsed JSON body; null when the file cannot be parsed. */
889
- body: Record<string, unknown> | null;
890
- /** False when the validator reports blocking errors — the row is flagged in the list. */
891
- valid: boolean;
892
- /** Count of blocking errors; 0 when valid. */
893
- errorCount: number;
894
- /** Relationship to the shipped defaults. Defaults are copy-if-missing and never overwrite, so
895
- * editing a `stock` environment forks it from upstream permanently. */
896
- origin: EnvironmentOrigin;
897
- }
898
- export interface EnvironmentIssue {
899
- /** Field anchor, e.g. `pluginDirs[0]`. */
900
- path: string;
901
- message: string;
902
- }
903
- export interface EnvironmentDetail {
904
- name: string;
905
- description: string | null;
906
- body: Record<string, unknown> | null;
907
- /** Absolute path of the backing file. */
908
- filePath: string;
909
- origin: EnvironmentOrigin;
910
- /** Hash of the bytes on disk — pass back as `baseHash` on save to detect a concurrent edit. */
911
- sha256: string;
912
- errors: EnvironmentIssue[];
913
- warnings: EnvironmentIssue[];
914
- /** The `systemPrompt` field as its editor shows it. */
915
- systemPrompt: EnvironmentSystemPrompt;
916
- }
917
- export interface EnvironmentsValidateReturn {
918
- ok: boolean;
919
- errors: EnvironmentIssue[];
920
- warnings: EnvironmentIssue[];
921
- }
922
- export interface EnvironmentsSaveReturn {
923
- changed: boolean;
924
- sha256: string;
925
- warnings: EnvironmentIssue[];
926
- }
927
- export interface EnvironmentsDeleteReturn {
928
- removed: boolean;
929
- }
930
- export interface EnvironmentsSavePromptReturn {
931
- changed: boolean;
932
- /** The prompt file now backing the environment; null when it uses the backend default. */
933
- file: string | null;
934
- }
935
- export interface SkillGroup {
936
- /** Plugin id (e.g. 'cortex-common'). */
937
- plugin: string;
938
- /** Sorted list of skill names in this group */
939
- skills: string[];
940
- }
941
- /** One skill a conversation loads (skills.session), in plugin selection order. */
942
- export interface SessionSkill {
943
- plugin: string;
944
- /** Claude invokes it as `/<namespace>:<name>`; PI as `/skill:<name>`. */
945
- namespace: string;
946
- name: string;
947
- description: string;
948
- }
949
- export interface UiPluginCatalogIssue {
950
- code: string;
951
- scope: 'plugin' | 'manifest' | 'skill' | 'mcp' | 'server';
952
- path: string | null;
953
- message: string;
954
- }
955
- export interface UiPluginManifest {
956
- source: 'root' | 'legacy' | 'none';
957
- name?: string;
958
- schema?: string;
959
- version?: string;
960
- description?: string;
961
- }
962
- export interface UiPluginSkill {
963
- name: string;
964
- /** Frontmatter description, '' when a legacy skill has none. */
965
- description: string;
966
- /** `builtin` as Cortex ships it, `overridden` by the user's edited copy (revertible), `local` the
967
- * user's own. Built-in skills can be edited but not moved or deleted. */
968
- origin: LayerOrigin;
969
- }
970
- export interface UiPluginMcpStdioSummary {
971
- command: string;
972
- argsCount: number;
973
- envKeys: string[];
974
- }
975
- export interface UiPluginMcpRemoteSummary {
976
- origin: string;
977
- headerKeys: string[];
978
- }
979
- export type UiPluginMcpServer = {
980
- name: string;
981
- type: 'stdio';
982
- summary: UiPluginMcpStdioSummary;
983
- } | {
984
- name: string;
985
- type: 'streamable-http' | 'sse';
986
- summary: UiPluginMcpRemoteSummary;
987
- };
988
- export interface UiPluginCatalogEntry {
989
- id: string;
990
- kind: 'portable' | 'legacy' | 'unknown';
991
- /** Whether spawn-time filtering restricts this plugin to some sessions. 'always' means assignment
992
- * is the only gate; 'channel' mirrors filterScopedPlugins. */
993
- scope: 'always' | 'channel';
994
- /** Channel prefix a 'channel'-scoped plugin requires, e.g. 'feishu:'. */
995
- scopePrefix?: string;
996
- /** 'builtin' when Cortex ships this plugin (on by default in every environment that loads skills,
997
- * and not removable); 'local' when it is the user's own. */
998
- origin: 'builtin' | 'local';
999
- rootDir: string;
1000
- valid: boolean;
1001
- assignable: boolean;
1002
- manifest: UiPluginManifest;
1003
- skills: UiPluginSkill[];
1004
- mcp: {
1005
- status: 'missing' | 'valid' | 'invalid';
1006
- servers: UiPluginMcpServer[];
1007
- };
1008
- issues: UiPluginCatalogIssue[];
1009
- }
1010
- export interface PluginAgentTarget {
1011
- kind: 'agent';
1012
- name: string;
1013
- editable: true;
1014
- baseHash: string;
1015
- managedPluginIds: string[];
1016
- unmanagedPluginCount: number;
1017
- }
1018
- export type PluginAssignmentTarget = PluginAgentTarget;
1019
- export interface PluginsListReturn {
1020
- plugins: UiPluginCatalogEntry[];
1021
- targets: PluginAssignmentTarget[];
1022
- }
1023
- export interface PluginsAssignReturn {
1024
- changed: boolean;
1025
- baseHash: string;
1026
- }
1027
- export interface PluginsSkillFile {
1028
- pluginId: string;
1029
- skill: string;
1030
- /** Plugins-root-relative path, for display only. */
1031
- path: string;
1032
- content: string;
1033
- /** Where the text comes from; saving a `builtin` skill makes it `overridden`. */
1034
- origin: LayerOrigin;
1035
- baseHash: string;
1036
- }
1037
- /** One MCP server as the editor needs it. Unlike the catalog summary this carries the real command,
1038
- * args, cwd and url — a form cannot round-trip a value it never received. Secrets stay behind:
1039
- * env and header VALUES are never sent, only their key names. */
1040
- export type UiPluginMcpDraft = {
1041
- name: string;
1042
- type: 'stdio';
1043
- command: string;
1044
- args: string[];
1045
- cwd?: string;
1046
- envKeys: string[];
1047
- } | {
1048
- name: string;
1049
- type: 'streamable-http' | 'sse';
1050
- url: string;
1051
- headerKeys: string[];
1052
- };
1053
- export interface PluginsMcpRead {
1054
- pluginId: string;
1055
- /** False when the plugin is legacy, where mcp.json is never loaded however it is written. */
1056
- supported: boolean;
1057
- servers: UiPluginMcpDraft[];
1058
- }
1059
- /** Secret maps are patches, not replacements: `null` keeps whatever is on disk under that key, a
1060
- * string sets a new value, and an omitted key is dropped. That is what lets the browser edit a
1061
- * server without ever having been told its current token. */
1062
- export interface PluginsMcpServerInput {
1063
- name: string;
1064
- type: 'stdio' | 'streamable-http' | 'sse';
1065
- command?: string;
1066
- args?: string[];
1067
- cwd?: string;
1068
- url?: string;
1069
- env?: Record<string, string | null>;
1070
- headers?: Record<string, string | null>;
1071
- }
1072
- export interface PluginsSkillWriteReturn {
1073
- baseHash: string;
1074
- }
1075
- export interface PluginsSkillReturn {
1076
- pluginId: string;
1077
- skill: string;
1078
- }
1079
- export interface PluginsPackageReturn {
1080
- id: string;
1081
- }
1082
- export interface MemoryFileEntry {
1083
- name: string;
1084
- sizeBytes: number;
1085
- modifiedAt: string;
1086
- }
1087
- export interface MemoryDirEntry {
1088
- name: string;
1089
- /** Number of `*.md` entry files, excluding the auto-generated `index.md` and `AGENTS.md`. */
1090
- entryCount: number;
1091
- /**
1092
- * The dir's `*.md` entry files (same filter as `entryCount` — excludes `index.md` / `AGENTS.md`),
1093
- * sorted by name. Lets a client enumerate + open the files under each memory dir (mobile 1j
1094
- * accordion) without a second round-trip. `entryCount === entries.length`.
1095
- */
1096
- entries: MemoryFileEntry[];
1097
- }
1098
- export interface MemoryTree {
1099
- projectId: string;
1100
- files: MemoryFileEntry[];
1101
- dirs: MemoryDirEntry[];
1102
- }
1103
- /** Real per-file line-level diff counts vs HEAD (`git diff --numstat`). */
1104
- export interface MemoryLineDiff {
1105
- added: number;
1106
- removed: number;
1107
- }
1108
- /** Real per-line `git blame` attribution for one line of a memory file. */
1109
- export interface MemoryBlameLine {
1110
- /** 1-based line number, aligned 1:1 with the file's content lines. */
1111
- line: number;
1112
- /** Short commit hash (8 hex) that last touched this line, from `git blame`. */
1113
- commit: string;
1114
- /**
1115
- * Task reference parsed from that commit's subject (a 4-hex id after a `task`/`manager`/`gate`
1116
- * keyword). `null` (honest placeholder, never fabricated) when the subject carries no such tag.
1117
- */
1118
- taskRef: string | null;
1119
- }
1120
- export interface MemoryFile {
1121
- projectId: string;
1122
- /** Project-root-relative path echoed back. */
1123
- path: string;
1124
- content: string;
1125
- sizeBytes: number;
1126
- modifiedAt: string;
1127
- /**
1128
- * Working-tree-vs-HEAD line counts from `git diff --numstat`. `null` (honest placeholder, never
1129
- * fabricated) when the project dir is not in a git work tree, git is unavailable, or the diff is
1130
- * binary/unresolvable.
1131
- */
1132
- lineDiff: MemoryLineDiff | null;
1133
- /**
1134
- * Per-line `git blame` attribution (real commit hash + parsed task ref), aligned 1:1 with the
1135
- * content lines. `null` (honest placeholder, never fabricated) when the project dir is not a git
1136
- * work tree, git is unavailable, or the file is binary/unblameable.
1137
- */
1138
- blame: MemoryBlameLine[] | null;
1139
- }
1140
- export type ApprovalStatus = 'pending' | 'approved' | 'rejected' | 'failed';
1141
- export interface ApprovalInfo {
1142
- /** Stable id derived from the heading line (no explicit id exists in the markdown). */
1143
- id: string;
1144
- title: string;
1145
- /**
1146
- * Owning project from the `- **Project**:` bullet (need-approval skill template). `null` (honest
1147
- * placeholder, never fabricated) for legacy entries and system-level operations — the UI renders
1148
- * those as "global".
1149
- */
1150
- projectId: string | null;
1151
- operation: string | null;
1152
- reason: string | null;
1153
- impact: string | null;
1154
- /** From the `Command/Action` bullet. */
1155
- command: string | null;
1156
- status: ApprovalStatus;
1157
- /** Date from the `## <YYYY-MM-DD> <title>` heading, null if unparseable. */
1158
- queuedAt: string | null;
1159
- /** Timestamp parsed from an approved/rejected Status line, null otherwise. */
1160
- decidedAt: string | null;
1161
- /** Parenthetical feedback captured from a rejected Status line, null otherwise. */
1162
- feedback: string | null;
1163
- /**
1164
- * Verbatim `Provenance` bullet — the only real "who raised this / origin" carrier in the queue
1165
- * (§12 C item 13). Project attribution now has its own structured `Project` bullet (projectId),
1166
- * but origin/from remains this freeform bullet only a subset of entries add. `null` (honest
1167
- * placeholder, never fabricated) when absent. Backs the approval-center origin/from slots.
1168
- */
1169
- provenance: string | null;
1170
- /**
1171
- * 4-hex task/manager/gate ref parsed from `provenance` (parseTaskRef semantics, shared with
1172
- * memory blame). `null` (honest placeholder, never fabricated) when the provenance bullet is
1173
- * absent or carries no anchored ref. Backs the approval-center `task` slot.
1174
- * NOTE: the prototype's `ttl` slot has ZERO source (the markdown queue has no expiry concept) →
1175
- * deliberately NOT a DTO field, never fabricated.
1176
- */
1177
- taskRef: string | null;
1178
- }
1179
- export interface IssueInfo {
1180
- /** Stable id derived from the raw title line (no explicit id exists in the markdown). */
1181
- id: string;
1182
- /** Bold title text of the entry bullet. */
1183
- title: string;
1184
- /** First `YYYY-MM-DD` found in the title line's trailing parens; honest null when absent. */
1185
- date: string | null;
1186
- /** Raw markdown body lines (freeform sub-bullets), verbatim; '' when the entry has no body. */
1187
- body: string;
1188
- }
1189
- export type NoteInfo = ProjectNote;
1190
- import type { RebuildProgress as DaemonRebuildProgress, RebuildStepState as DaemonRebuildStep, RebuildStepName as DaemonRebuildStepName, RebuildStepStatus as DaemonRebuildStepStatus, RebuildStatus as DaemonRebuildStatus } from '../../core/rebuild-progress.js';
1191
- export type { DaemonRebuildProgress, DaemonRebuildStep, DaemonRebuildStepName, DaemonRebuildStepStatus, DaemonRebuildStatus, };
1192
- export interface DaemonProcessInfo {
1193
- name: string;
1194
- label: string;
1195
- status: 'running' | 'stopped' | 'unknown';
1196
- pid: number | null;
1197
- uptime: string | null;
1198
- port: number | null;
1199
- }
1200
- export interface SystemDaemonStatus {
1201
- processes: DaemonProcessInfo[];
1202
- lastRestart: {
1203
- at: string | null;
1204
- };
1205
- /** The supervisor's hot-rebuild pipeline: the run in flight, or the last one it finished. Null
1206
- * when no rebuild has run (production installs never rebuild) or when the record belongs to a
1207
- * supervisor that is no longer alive. */
1208
- rebuild: DaemonRebuildProgress | null;
1209
- }
1210
- export interface SystemNoticeEntry {
1211
- id: string;
1212
- ts: string;
1213
- level: 'info' | 'warning' | 'error';
1214
- title?: string;
1215
- text: string;
1216
- }
1217
- export interface SystemNotices {
1218
- entries: SystemNoticeEntry[];
1219
- /** Ring buffer capacity, so the UI can label "showing N of cap" honestly. */
1220
- cap: number;
1221
- }
1222
- export interface RateLimitWindowInfo {
1223
- type: string;
1224
- label?: string;
1225
- utilization: number | null;
1226
- resetsAt: number;
1227
- activatedAt: number;
1228
- }
1229
- export interface RateLimitProviderInfo {
1230
- provider: string;
1231
- displayName: string;
1232
- waitingSessions: number;
1233
- windows: RateLimitWindowInfo[];
1234
- }
1235
- export interface SystemRateLimitStatus {
1236
- providers: RateLimitProviderInfo[];
1237
- }
1238
- export type SystemUsageStatus = ProviderUsage[];
1239
- export type SystemRefreshUsageReturn = ProviderUsage[];
1240
- export type SystemRedeemUsageResetReturn = UsageResetResult;
1241
- export interface SystemRestartReturn {
1242
- ok: boolean;
1243
- message: string;
1244
- }
1245
- export type SystemUpdateStatus = ServerUpdateStatus;
1246
- export interface SystemUpdateDecisionReturn {
1247
- /** false when no prompt was pending — a stale dialog whose answer arrived too late. */
1248
- accepted: boolean;
1249
- status: SystemUpdateStatus;
1250
- }
1251
- export interface SystemClearRateLimitReturn {
1252
- /** Providers whose throttle was lifted early. */
1253
- cleared: {
1254
- provider: string;
1255
- displayName: string;
1256
- /** Window types cleared (e.g. five_hour / outage). */
1257
- types: string[];
1258
- /** Latest resetsAt among the cleared windows (epoch sec). */
1259
- resetsAt: number;
1260
- }[];
1261
- }
1262
- export interface ProjectCreateReturn {
1263
- /** The id of the newly created project (equals its directory name). */
1264
- id: string;
1265
- }
1266
- export interface SessionsCreateReturn {
1267
- /** The id of the newly created direct session. */
1268
- sessionId: string;
1269
- }
1270
- export interface SessionsSendReturn {
1271
- /** The message was accepted and routed. Assistant output returns via the `session.message`
1272
- * stream event, NOT this return (fire-and-forget). */
1273
- accepted: boolean;
1274
- /** Server clock at acceptance, taken BEFORE the message is routed — so every timestamp the
1275
- * message later carries (history row, pending injection record) is at or after it. A client
1276
- * whose own clock differs from the server's uses this to order its optimistic row against
1277
- * server-written rows instead of trusting the browser clock. */
1278
- acceptedAt: string;
1279
- }
1280
- export interface SessionsCancelReturn {
1281
- /** True when at least one running execution on the session's channel was cancelled. */
1282
- cancelled: boolean;
1283
- /** How many live executions were cancelled on the session's channel. */
1284
- count: number;
1285
- }
1286
- export interface SessionsCompactReturn {
1287
- status: 'compacted' | 'not-needed';
1288
- contextUsage: SessionContextUsage | null;
1289
- }
1290
- export interface SessionsSetAgentReturn {
1291
- /** The selected environment; null follows the global default agent. */
1292
- agentName: string | null;
1293
- }
1294
- /** Effective engine choice after the mutation. */
1295
- export interface SessionsSetSelectionReturn extends EngineSelection {
1296
- backendChanged: boolean;
1297
- }
1298
- export interface SessionsCreateAndSendReturn {
1299
- /** The id of the newly created session (the client transitions from draft to this session). */
1300
- sessionId: string;
1301
- /** Server clock at acceptance — see `SessionsSendReturn.acceptedAt`. */
1302
- acceptedAt: string;
1303
- }
1304
- export interface ExecutionsCancelReturn {
1305
- cancelled: boolean;
1306
- }
1307
- export interface WaitpointsCancelReturn {
1308
- cancelled: boolean;
1309
- /** The state that blocked the cancel when `cancelled` is false (already fired/expired/cancelled). */
1310
- state: string | null;
1311
- }
1312
- export interface ConfigSetReturn {
1313
- written: true;
1314
- section: 'budget' | 'settings' | 'preferences';
1315
- }
1316
- export interface ConfigSetProviderRateLimitPolicyReturn {
1317
- written: true;
1318
- policy: ProviderRateLimitPolicy;
1319
- }
1320
- export interface ApprovalMutateReturn {
1321
- id: string;
1322
- status: ApprovalStatus;
1323
- }
1324
- export interface IssuesDeleteReturn {
1325
- id: string;
1326
- deleted: true;
1327
- }
1328
- export interface IssuesHandleReturn {
1329
- /** The freshly created direct session now carrying the issue as its first user turn. */
1330
- sessionId: string;
1331
- }
1332
- export interface NotesDeleteReturn {
1333
- id: string;
1334
- deleted: true;
1335
- }
1336
- export interface NotesClearCompletedReturn {
1337
- cleared: number;
1338
- }
1339
- export interface ApprovalsRequestReturn {
1340
- queued: true;
1341
- /** headingId of the newly appended PENDING entry (stable, hashed from the heading line). */
1342
- id: string;
1343
- }
1344
- /** Query params are exactly what the scope's zod schema parses to. */
1345
- export type QueryParamMap = {
1346
- [S in QueryScope]: z.output<QueryInputSchemas[S]>;
1347
- };
1348
- export interface QueryReturnMap {
1349
- 'projects.list': ProjectConduitInfo[];
1350
- 'sessions.list': SessionInfo[];
1351
- 'sessions.transcript': SessionTranscript;
1352
- 'sessions.subagentTranscript': SessionSubagentTranscript;
1353
- 'sessions.debugDetails': TranscriptDebugDetails | null;
1354
- 'sessions.pendingInteraction': SessionsPendingInteraction;
1355
- 'schedules.list': ScheduleInfo[];
1356
- 'boards.list': BoardInfo[];
1357
- 'boards.get': BoardInfo;
1358
- 'boards.decisions': BoardDecisionEntry[];
1359
- 'boards.style': BoardStyle;
1360
- 'executions.list': ExecutionInfo[];
1361
- 'waitpoints.list': WaitpointInfo[];
1362
- 'executions.get': ExecutionDetailInfo;
1363
- 'memory.tree': MemoryTree;
1364
- 'memory.file': MemoryFile;
1365
- 'approvals.list': ApprovalInfo[];
1366
- 'issues.list': IssueInfo[];
1367
- 'notes.list': NoteInfo[];
1368
- 'cost.summary': CostSummary;
1369
- 'config.get': ConfigSnapshot;
1370
- 'auth.status': AuthStatusSnapshot;
1371
- 'auth.flowState': LoginFlowState | null;
1372
- 'auth.customProviders': CustomProviderView[];
1373
- 'usageSharing.get': UsageSharingSettings;
1374
- 'models.catalog': ModelCatalogSnapshot;
1375
- 'hooks.list': HooksOverview;
1376
- 'machines.list': MachineInfo[];
1377
- 'machines.detail': MachineDetail;
1378
- 'skills.list': SkillGroup[];
1379
- 'skills.session': SessionSkill[];
1380
- 'plugins.list': PluginsListReturn;
1381
- 'plugins.skillFile': PluginsSkillFile;
1382
- 'plugins.mcpRead': PluginsMcpRead;
1383
- 'environments.list': EnvironmentEntry[];
1384
- 'environments.get': EnvironmentDetail;
1385
- 'system.daemonStatus': SystemDaemonStatus;
1386
- 'system.rateLimitStatus': SystemRateLimitStatus;
1387
- 'system.usageStatus': SystemUsageStatus;
1388
- 'system.notices': SystemNotices;
1389
- 'system.updateStatus': SystemUpdateStatus;
1390
- }
1391
- /** Mutate args are exactly what the op's zod schema parses to. */
1392
- export type MutateArgsMap = {
1393
- [O in MutateOp]: z.output<MutateInputSchemas[O]>;
1394
- };
1395
- export interface MutateReturnMap {
1396
- 'projects.create': ProjectCreateReturn;
1397
- 'sessions.create': SessionsCreateReturn;
1398
- 'sessions.send': SessionsSendReturn;
1399
- 'sessions.cancel': SessionsCancelReturn;
1400
- 'sessions.compact': SessionsCompactReturn;
1401
- 'sessions.setAgent': SessionsSetAgentReturn;
1402
- 'sessions.setSelection': SessionsSetSelectionReturn;
1403
- 'sessions.createAndSend': SessionsCreateAndSendReturn;
1404
- 'sessions.setStarred': SessionsSetStarredReturn;
1405
- 'sessions.rename': SessionsRenameReturn;
1406
- 'sessions.markRead': void;
1407
- 'sessions.markManyRead': SessionsMarkManyReadReturn;
1408
- 'sessions.answerQuestion': SessionsInteractionMutateReturn;
1409
- 'sessions.respondPlan': SessionsInteractionMutateReturn;
1410
- 'sessions.respondDecision': SessionsRespondDecisionReturn;
1411
- 'sessions.cancelResume': SessionsCancelResumeReturn;
1412
- 'sessions.rewind': SessionsRewindReturn;
1413
- 'sessions.resolveMedia': ResolveMediaResult;
1414
- 'executions.cancel': ExecutionsCancelReturn;
1415
- 'waitpoints.cancel': WaitpointsCancelReturn;
1416
- 'schedules.pause': void;
1417
- 'schedules.resume': void;
1418
- 'schedules.remove': void;
1419
- 'schedules.add': ScheduleInfo;
1420
- 'schedules.update': ScheduleInfo;
1421
- 'approvals.approve': ApprovalMutateReturn;
1422
- 'approvals.reject': ApprovalMutateReturn;
1423
- 'approvals.request': ApprovalsRequestReturn;
1424
- 'issues.handle': IssuesHandleReturn;
1425
- 'issues.delete': IssuesDeleteReturn;
1426
- 'notes.add': NoteInfo;
1427
- 'notes.update': NoteInfo;
1428
- 'notes.setCompleted': NoteInfo;
1429
- 'notes.delete': NotesDeleteReturn;
1430
- 'notes.clearCompleted': NotesClearCompletedReturn;
1431
- 'config.set': ConfigSetReturn;
1432
- 'config.setPlatform': {
1433
- written: true;
1434
- restartRequired: true;
1435
- };
1436
- 'config.setProviderRateLimitPolicy': ConfigSetProviderRateLimitPolicyReturn;
1437
- 'auth.startLogin': LoginFlowState;
1438
- 'auth.respondPrompt': LoginFlowState;
1439
- 'auth.cancelFlow': LoginFlowState;
1440
- 'auth.logout': AuthLogoutReturn;
1441
- 'auth.syncGateway': AuthSyncGatewayReturn;
1442
- 'auth.upsertCustomProvider': CustomProviderView;
1443
- 'auth.removeCustomProvider': AuthRemoveCustomProviderReturn;
1444
- 'usageSharing.set': UsageSharingSettings;
1445
- 'hooks.create': HooksCreateReturn;
1446
- 'hooks.update': HooksUpdateReturn;
1447
- 'hooks.setEnabled': HooksSetEnabledReturn;
1448
- 'hooks.remove': HooksRemoveReturn;
1449
- 'hooks.test': HooksTestReturn;
1450
- 'models.favorites.add': ModelsMutationReturn;
1451
- 'models.favorites.remove': ModelsMutationReturn;
1452
- 'models.setDefault': ModelsMutationReturn;
1453
- 'models.setThinking': ModelsMutationReturn;
1454
- 'plugins.assign': PluginsAssignReturn;
1455
- 'plugins.skillWrite': PluginsSkillWriteReturn;
1456
- 'plugins.skillCreate': PluginsSkillReturn;
1457
- 'plugins.skillMove': PluginsSkillReturn;
1458
- 'plugins.skillRemove': PluginsSkillReturn;
1459
- 'plugins.skillRevert': PluginsSkillReturn;
1460
- 'plugins.create': PluginsPackageReturn;
1461
- 'plugins.remove': PluginsPackageReturn;
1462
- 'plugins.convertToPortable': PluginsPackageReturn;
1463
- 'plugins.mcpWrite': PluginsMcpRead;
1464
- 'environments.validate': EnvironmentsValidateReturn;
1465
- 'environments.save': EnvironmentsSaveReturn;
1466
- 'environments.delete': EnvironmentsDeleteReturn;
1467
- 'environments.savePrompt': EnvironmentsSavePromptReturn;
1468
- 'system.restart': SystemRestartReturn;
1469
- 'system.clearRateLimit': SystemClearRateLimitReturn;
1470
- 'system.refreshUsage': SystemRefreshUsageReturn;
1471
- 'system.redeemUsageReset': SystemRedeemUsageResetReturn;
1472
- 'system.checkUpdate': SystemUpdateCheckResult;
1473
- 'system.applyUpdate': SystemUpdateDecisionReturn;
1474
- 'system.skipUpdate': SystemUpdateDecisionReturn;
1475
- }
1476
- export type QueryParams<S extends QueryScope> = QueryParamMap[S];
1477
- export type QueryReturn<S extends QueryScope> = QueryReturnMap[S];
1478
- export type MutateArgs<O extends MutateOp> = MutateArgsMap[O];
1479
- export type MutateReturn<O extends MutateOp> = MutateReturnMap[O];
1480
- export interface UiService {
1481
- query<S extends QueryScope>(scope: S, params: QueryParams<S>): Promise<Result<QueryReturn<S>>>;
1482
- mutate<O extends MutateOp>(op: O, args: MutateArgs<O>): Promise<Result<MutateReturn<O>>>;
1483
- subscribe(filter: SubscribeFilter): AsyncIterable<UiEvent> & {
1484
- close(): void;
1485
- };
1486
- }
1487
- export interface UiServiceDeps {
1488
- /** Entry-layer callback: domain handlers never import orchestration. */
1489
- resolveMedia: (input: ResolveMediaInput) => Promise<ResolveMediaResult>;
1490
- /** Shared with background timers; bounded discovery, never waits for update consent. */
1491
- checkServerUpdate: () => Promise<SystemUpdateCheckResult>;
1492
- /** Optional seams for deterministic authentication dispatch tests. */
1493
- getAuthStatus?: () => Promise<AuthStatusSnapshot>;
1494
- authLogin?: AuthLoginService;
1495
- logoutAccount?: (input: LogoutAccountInput) => Promise<AuthLogoutResult>;
1496
- /** Re-derives gateway routes and favorites; defaults to discovery-backed sync. */
1497
- syncGateway?: (options: {
1498
- backends?: string[];
1499
- }) => Promise<AuthSyncGatewayReturn>;
1500
- /** Files custom providers are read from and written to; defaults to the host's own two files. */
1501
- customProviderStores?: CustomProviderStores;
1502
- /** Directory holding the aistatus `config.yaml`; defaults to `~/.aistatus`. */
1503
- usageSharingDir?: string;
1504
- projectStore: {
1505
- list(): Project[];
1506
- get(id: string): Project | undefined;
1507
- exists(id: string): boolean;
1508
- getDefault(): Project;
1509
- createProject(name: string): CreateProjectResult;
1510
- };
1511
- sessionStore: {
1512
- listByProject(projectId: string): Promise<Session[]>;
1513
- listByOrigin(origin: 'direct' | 'thread' | 'scheduled', projectId?: string): Promise<Session[]>;
1514
- listResumable(projectId?: string): Promise<Session[]>;
1515
- getById(sessionId: string): Promise<Session | null>;
1516
- /** Admission-only liveness touch for fire-and-forget send. Updates lastUsedAt and returns false
1517
- * when the session is already pending deletion or missing. */
1518
- touchSessionUse(sessionId: string): Promise<boolean>;
1519
- /** Stamp lastReadAt=now (unread tracking; backs `sessions.markRead`). */
1520
- markRead(sessionId: string): Promise<void>;
1521
- /** Atomic metadata-only writes. */
1522
- setStarred(sessionId: string, starred: boolean): Promise<Session | null>;
1523
- rename(sessionId: string, label: string): Promise<Session | null>;
1524
- };
1525
- /** Capability hint for sessions.list; execution revalidates inside orchestration. */
1526
- supportsSessionCompaction: (session: Pick<Session, 'backend'>) => boolean;
1527
- /** Latest task-list snapshot for a session (in-memory registry). */
1528
- getSessionTodos: (sessionId: string) => TodoSnapshot | null;
1529
- /** Idle-only manual context compaction, injected at the entry layer. */
1530
- compactSession: (opts: {
1531
- sessionId: string;
1532
- }) => Promise<{
1533
- ok: true;
1534
- status: 'compacted' | 'not-needed';
1535
- contextUsage: SessionContextUsage | null;
1536
- } | {
1537
- ok: false;
1538
- reason: 'not-found' | 'unsupported' | 'running';
1539
- }>;
1540
- /** Snapshot of started Cortex-managed children only; native CLI tasks use their own tracker. */
1541
- getSubagentChildStatuses: (sessionId: string) => ReadonlyMap<string, NonNullable<TranscriptSubagentSummary['status']>>;
1542
- /** Backend-independent conversation history — read source for `sessions.transcript` (S4 chat). */
1543
- conversationHistory: {
1544
- getHistory(sessionId: string, options?: {
1545
- includeToolDebug?: boolean;
1546
- }): Promise<SessionHistory | null>;
1547
- /** Compact history plus the cursor that makes the next read a delta. */
1548
- getCompactHistoryAt(sessionId: string): Promise<{
1549
- value: import('../../store/conversation-history-repo.js').CompactConversationHistory | null;
1550
- cursor: string;
1551
- }>;
1552
- getSubagentHistory(sessionId: string, subagentId: string): Promise<import('../../store/conversation-history-repo.js').SubagentConversationHistory>;
1553
- getToolDebugDetails(sessionId: string, toolRef: string): Promise<TranscriptDebugDetails | null>;
1554
- /** First user message text — used to title a label-less session in `sessions.list`. */
1555
- getFirstUserText(sessionId: string): Promise<string | null>;
1556
- /** Append-only decision-action line (`sessions.respondDecision`). */
1557
- appendDecisionAction(sessionId: string, opts: {
1558
- decisionId: string;
1559
- action: DecisionActionKind;
1560
- message?: string;
1561
- ts?: string;
1562
- }): Promise<void>;
1563
- };
1564
- /** Durable active pending-injection snapshot joined into `sessions.transcript`. */
1565
- pendingInjections: {
1566
- listBySession(sessionId: string): Promise<{
1567
- id: string;
1568
- text: string;
1569
- createdAt: string;
1570
- attachments?: AttachmentMeta[];
1571
- systemOrigin?: SystemTurnOrigin;
1572
- }[]>;
1573
- };
1574
- /**
1575
- * Inject a genuine user turn into a session and route it through the agent (S4 chat send).
1576
- * Fire-and-forget: assistant output returns via the `session.message` stream event, not here.
1577
- * Wired in the entry layer (app.ts) to the orchestration send path — kept as an injected
1578
- * callback so the ui-service domain never imports orchestration (layer safety / depcruise).
1579
- */
1580
- sendSessionMessage: (opts: {
1581
- channel: string;
1582
- text: string;
1583
- attachments?: AttachmentMeta[];
1584
- }) => void;
1585
- /**
1586
- * Cancel every live execution running on a session's channel (S4 chat Stop). Wired in the entry
1587
- * layer to the orchestration channel-cancel path (`cancelChannelRuns`), which kills the live agent
1588
- * handle, preserves the session, and tears the execution down as `cancelled`. Returns the number
1589
- * cancelled. Kept as an injected callback so the ui-service domain never imports orchestration
1590
- * (layer safety / depcruise).
1591
- */
1592
- cancelSessionRun: (opts: {
1593
- channel: string;
1594
- }) => Promise<number>;
1595
- /** Kill one live execution and tear it down as `cancelled` (Web "Kill run"). Wired to the
1596
- * orchestration `cancelLiveExecution`. False when no live execution has that id. */
1597
- cancelLiveExecution: (executionId: string) => Promise<boolean>;
1598
- /**
1599
- * Message edit + rewind: roll the session back to `turnIndex` and re-send the edited text
1600
- * (orchestration `rewindWebSession` — ledger rollback + backend backup restore + pooled-CLI
1601
- * close + display-history truncate + resend). Wired in the entry layer (app.ts) so the
1602
- * ui-service domain never imports orchestration.
1603
- */
1604
- rewindSession: (opts: {
1605
- sessionId: string;
1606
- channel: string;
1607
- turnIndex: number;
1608
- text: string;
1609
- }) => Promise<{
1610
- ok: true;
1611
- } | {
1612
- ok: false;
1613
- reason: 'running' | 'not-found';
1614
- }>;
1615
- /**
1616
- * Create a fresh, live user-initiated (origin='direct') session for the workbench and return its
1617
- * id. Injected in the entry layer (app.ts) to the domain `createDirectSession` primitive with the
1618
- * real session/ledger singletons, so the ui-service domain never imports store internals.
1619
- */
1620
- createDirectSession: (opts: {
1621
- projectId: string;
1622
- sessionId?: string;
1623
- agentName?: string | null;
1624
- selection?: EngineSelection;
1625
- }) => Promise<{
1626
- sessionId: string;
1627
- channel: string;
1628
- }>;
1629
- /**
1630
- * Convert a scheduled run's session into a normal direct web session before a reply is sent
1631
- * (design 27b: replying adopts the run — it leaves the schedule grouping and becomes a normal
1632
- * conversation; the next fire starts a fresh session). Injected in the entry layer (app.ts) to
1633
- * the domain `adoptScheduledSession` primitive. Returns the adopted channel, or null when the
1634
- * session is unknown.
1635
- */
1636
- adoptScheduledSession: (opts: {
1637
- sessionId: string;
1638
- }) => Promise<{
1639
- channel: string;
1640
- } | null>;
1641
- /**
1642
- * Move files uploaded under a draft upload id to the real session's attachment directory
1643
- * and return updated AttachmentMeta with corrected paths. No-op when draftUploadId is null.
1644
- */
1645
- moveDraftAttachments: (opts: {
1646
- draftUploadId: string | null;
1647
- sessionId: string;
1648
- attachments: AttachmentMeta[];
1649
- }) => Promise<AttachmentMeta[]>;
1650
- /** Switch execution environment without changing the engine. */
1651
- switchSessionAgent: (opts: {
1652
- channel: string;
1653
- name: string | null;
1654
- }) => Promise<{
1655
- ok: boolean;
1656
- agentName: string | null;
1657
- reason?: 'unknown-agent';
1658
- }>;
1659
- /** Shared domain selection rule, wired at the entry layer. */
1660
- applySessionSelection: (opts: EngineSelection & {
1661
- channel: string;
1662
- }) => Promise<EngineSelection & {
1663
- ok: boolean;
1664
- backendChanged: boolean;
1665
- reason?: string;
1666
- currentBackend?: string;
1667
- targetBackend?: string;
1668
- allowed?: readonly string[];
1669
- }>;
1670
- getModelMemory: () => ConfigModels['memory'];
1671
- /** The last composer pick on this host, which a draft conversation starts from. Injected for the
1672
- * same reason as the two above. */
1673
- getSelectionDefault: () => ConfigSelectionDefault | null;
1674
- scheduler: {
1675
- list(): Promise<ScheduleTask[]>;
1676
- get(id: string): Promise<ScheduleTask | null>;
1677
- pause(id: string): Promise<ScheduleTask | null>;
1678
- resume(id: string): Promise<ScheduleTask | null>;
1679
- remove(id: string): Promise<boolean>;
1680
- add(spec: ScheduleSpec): Promise<ScheduleTask>;
1681
- update(id: string, patch: SchedulePatch): Promise<ScheduleTask | null>;
1682
- };
1683
- executionRegistry: {
1684
- getExecution(id: string): ExecutionRecord | null;
1685
- getAll(): ExecutionRecord[];
1686
- cancelExecution(id: string): ExecutionRecord | null;
1687
- };
1688
- /** Waitpoint seam (`waitpoints.*` ops and SessionInfo.waitingOn). Injected at the entry layer so
1689
- * the ui-service domain never reaches into the waitpoint store itself. Queries include armed records and pending deliveries; settled records are hidden. */
1690
- waitpointRegistry: {
1691
- list(): Promise<Waitpoint[]>;
1692
- cancel(id: string): Promise<{
1693
- cancelled: boolean;
1694
- state?: string;
1695
- }>;
1696
- };
1697
- /** Board registry seam (boards.* ops). Optional — handlers fall back to the boardRepo
1698
- * singleton when absent; tests inject it for determinism. */
1699
- boardStore?: {
1700
- list(projectId?: string): Promise<BoardRecord[]>;
1701
- find(id: string): Promise<BoardRecord | null>;
1702
- };
1703
- /** Stylesheet sources for boards.style. Optional — defaults to the shipped preset and
1704
- * `<cortex home>/config/board.css`; tests point it at temp files. */
1705
- boardStylePaths?: {
1706
- defaultCss: string;
1707
- userCss: string;
1708
- };
1709
- /** Absolute path to PENDING_APPROVALS.md (the approval-center 7a markdown queue). */
1710
- approvalsPath: string;
1711
- /** The one busy answer (core/session-state.ts): sessions.list joins on it rather than
1712
- * re-deriving "running" from the executions index and the hold registry separately. */
1713
- runningExecutions: SessionStateReader;
1714
- costSummary: (projectId?: string | null) => Promise<CostSummary>;
1715
- /**
1716
- * Registry of connected cortex-client devices (from remote/client-manager) plus the
1717
- * static machine config (from remote/machine-registry getMachineRegistry). Injected at the
1718
- * entry layer so the ui-service domain never imports the remote layer directly.
1719
- * SECURITY: the raw ssh user@host string is NOT surfaced — only sshConfigured:boolean.
1720
- */
1721
- clientRegistry: {
1722
- getOnlineDevices(): Array<{
1723
- device: string;
1724
- platform: string;
1725
- connectedAt: Date;
1726
- lastHeartbeat: Date;
1727
- capabilities: string[];
1728
- }>;
1729
- isDeviceOnline(device: string): boolean;
1730
- getMachineRegistry(): Record<string, {
1731
- cortexPath: string;
1732
- gpuCount: number;
1733
- ssh?: string;
1734
- win?: boolean;
1735
- }>;
1736
- /**
1737
- * Run a read-only shell probe on a connected device and return its stdout (machines.detail).
1738
- * The command is built server-side — callers never forward user input into it.
1739
- */
1740
- probeMachine(device: string, command: string, timeoutMs: number): Promise<string>;
1741
- };
1742
- bus: EventBus;
1743
- adapter: PlatformAdapter;
1744
- /**
1745
- * Return the pending ask-user question group for a channel, if any (web UI pending query).
1746
- * Reads from the in-memory pendingAskUserQuestionGroups Map.
1747
- */
1748
- getPendingAskUser: (channel: string) => {
1749
- requestId: string;
1750
- questions: {
1751
- question: string;
1752
- header: string;
1753
- options: {
1754
- label: string;
1755
- description?: string;
1756
- }[];
1757
- multiSelect: boolean;
1758
- }[];
1759
- blocking: boolean;
1760
- } | null;
1761
- /**
1762
- * Return the pending plan approval for a channel, if any (web UI pending query).
1763
- * Reads from the in-memory planApprovals Map.
1764
- */
1765
- getPendingPlan: (channel: string) => {
1766
- requestId: string;
1767
- planContent: string;
1768
- planFilePath: string | null;
1769
- } | null;
1770
- /**
1771
- * Resolve a pending ask-user-question interaction (web UI path). The injected impl (app.ts)
1772
- * looks up the hook group, collects answers, updates the interaction entity, and calls
1773
- * tryResolveHook/resolveHookRequest so the blocked MCP tool receives its response.
1774
- * Three-way outcome: 'resolved' | 'already-resolved' (another client won the race) |
1775
- * 'not-found' (no such interaction).
1776
- */
1777
- answerQuestion: (requestId: string, answers: Record<string, string>) => 'resolved' | 'already-resolved' | 'not-found';
1778
- /**
1779
- * Resolve a pending plan-approval interaction (web UI path). Same three-way outcome as
1780
- * answerQuestion; the impl calls planApprovals.resolve/reject + entity resolve +
1781
- * resolveHookRequest.
1782
- */
1783
- respondPlan: (requestId: string, approved: boolean, feedback?: string) => 'resolved' | 'already-resolved' | 'not-found';
1784
- /**
1785
- * Liveness signal for transcript materialization: true only while the interaction is a live,
1786
- * un-expired pending entry in the in-process index. After a restart the index is empty, so
1787
- * still-`pending` persisted rows derive to `expired` at read time.
1788
- */
1789
- isInteractionPending: (id: string) => boolean;
1790
- }