@ashx-j/lunr-dev 0.2.21-dev.12.1 → 0.2.25-dev.13.1

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 (570) hide show
  1. package/CHANGELOG.md +25 -2
  2. package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
  3. package/dist/builtin-extensions/ashxj-tui.js +2 -2
  4. package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
  5. package/dist/builtin-extensions/index.d.ts.map +1 -1
  6. package/dist/builtin-extensions/index.js +1 -0
  7. package/dist/builtin-extensions/index.js.map +1 -1
  8. package/dist/builtin-extensions/lunr-browser.d.ts +9 -0
  9. package/dist/builtin-extensions/lunr-browser.d.ts.map +1 -0
  10. package/dist/builtin-extensions/lunr-browser.js +169 -0
  11. package/dist/builtin-extensions/lunr-browser.js.map +1 -0
  12. package/dist/builtin-extensions/lunr-computer-use.d.ts.map +1 -1
  13. package/dist/builtin-extensions/lunr-computer-use.js +3 -3
  14. package/dist/builtin-extensions/lunr-computer-use.js.map +1 -1
  15. package/dist/builtin-extensions/lunr-plan-tools.d.ts +7 -7
  16. package/dist/builtin-extensions/lunr-plan-tools.d.ts.map +1 -1
  17. package/dist/builtin-extensions/lunr-plan-tools.js +12 -12
  18. package/dist/builtin-extensions/lunr-plan-tools.js.map +1 -1
  19. package/dist/builtin-extensions/lunr-todos.d.ts.map +1 -1
  20. package/dist/builtin-extensions/lunr-todos.js +15 -0
  21. package/dist/builtin-extensions/lunr-todos.js.map +1 -1
  22. package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
  23. package/dist/builtin-extensions/pi-intercom/index.js +5 -0
  24. package/dist/builtin-extensions/pi-intercom/index.js.map +1 -1
  25. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts.map +1 -1
  26. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js +1 -0
  27. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js.map +1 -1
  28. package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
  29. package/dist/builtin-extensions/pi-mcp-adapter/index.js +1 -1
  30. package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
  31. package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.d.ts +1 -1
  32. package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.d.ts.map +1 -1
  33. package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js +5 -1
  34. package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js.map +1 -1
  35. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +2 -2
  36. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
  37. package/dist/builtin-extensions/pi-subagents/src/extension/index.js +18 -5
  38. package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
  39. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
  40. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +1 -1
  41. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
  42. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +4 -3
  43. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
  44. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +8 -3
  45. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
  46. package/dist/builtin-extensions/pi-subagents/src/intercom/communication.d.ts +17 -0
  47. package/dist/builtin-extensions/pi-subagents/src/intercom/communication.d.ts.map +1 -0
  48. package/dist/builtin-extensions/pi-subagents/src/intercom/communication.js +45 -0
  49. package/dist/builtin-extensions/pi-subagents/src/intercom/communication.js.map +1 -0
  50. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts +2 -0
  51. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts.map +1 -1
  52. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js +10 -14
  53. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js.map +1 -1
  54. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts +4 -1
  55. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts.map +1 -1
  56. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js +167 -53
  57. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js.map +1 -1
  58. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.d.ts.map +1 -1
  59. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js +5 -0
  60. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js.map +1 -1
  61. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts +2 -0
  62. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts.map +1 -1
  63. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js +3 -2
  64. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js.map +1 -1
  65. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts +2 -0
  66. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -1
  67. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js +4 -0
  68. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js.map +1 -1
  69. package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.d.ts +1 -0
  70. package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.d.ts.map +1 -1
  71. package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.js +2 -1
  72. package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.js.map +1 -1
  73. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
  74. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +1 -1
  75. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
  76. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts +3 -0
  77. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts.map +1 -1
  78. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js +11 -0
  79. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js.map +1 -1
  80. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
  81. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +41 -3
  82. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
  83. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts +1 -0
  84. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts.map +1 -1
  85. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js +5 -1
  86. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js.map +1 -1
  87. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
  88. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +3 -2
  89. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
  90. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
  91. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +23 -0
  92. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
  93. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts +1 -1
  94. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts.map +1 -1
  95. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js +1 -1
  96. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js.map +1 -1
  97. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts +2 -0
  98. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts.map +1 -1
  99. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js +20 -15
  100. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js.map +1 -1
  101. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.d.ts +1 -0
  102. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.d.ts.map +1 -1
  103. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.js +3 -0
  104. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.js.map +1 -1
  105. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
  106. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +4 -2
  107. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
  108. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts.map +1 -1
  109. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js +2 -2
  110. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js.map +1 -1
  111. package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +2 -0
  112. package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
  113. package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
  114. package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts +18 -0
  115. package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts.map +1 -0
  116. package/dist/builtin-extensions/pi-subagents/src/tui/communication.js +48 -0
  117. package/dist/builtin-extensions/pi-subagents/src/tui/communication.js.map +1 -0
  118. package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
  119. package/dist/builtin-extensions/pi-web-access/index.js +11 -7
  120. package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
  121. package/dist/cli/args.d.ts.map +1 -1
  122. package/dist/cli/args.js +2 -1
  123. package/dist/cli/args.js.map +1 -1
  124. package/dist/cli/install-cli.d.ts.map +1 -1
  125. package/dist/cli/install-cli.js +15 -45
  126. package/dist/cli/install-cli.js.map +1 -1
  127. package/dist/core/agent-session-runtime.d.ts +9 -0
  128. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  129. package/dist/core/agent-session-runtime.js +126 -29
  130. package/dist/core/agent-session-runtime.js.map +1 -1
  131. package/dist/core/agent-session.d.ts +23 -1
  132. package/dist/core/agent-session.d.ts.map +1 -1
  133. package/dist/core/agent-session.js +255 -109
  134. package/dist/core/agent-session.js.map +1 -1
  135. package/dist/core/browser/network.d.ts +9 -0
  136. package/dist/core/browser/network.d.ts.map +1 -0
  137. package/dist/core/browser/network.js +146 -0
  138. package/dist/core/browser/network.js.map +1 -0
  139. package/dist/core/browser/runtime.d.ts +24 -0
  140. package/dist/core/browser/runtime.d.ts.map +1 -0
  141. package/dist/core/browser/runtime.js +289 -0
  142. package/dist/core/browser/runtime.js.map +1 -0
  143. package/dist/core/browser/schema.d.ts +16 -0
  144. package/dist/core/browser/schema.d.ts.map +1 -0
  145. package/dist/core/browser/schema.js +36 -0
  146. package/dist/core/browser/schema.js.map +1 -0
  147. package/dist/core/browser/settings.d.ts +8 -0
  148. package/dist/core/browser/settings.d.ts.map +1 -0
  149. package/dist/core/browser/settings.js +30 -0
  150. package/dist/core/browser/settings.js.map +1 -0
  151. package/dist/core/browser/setup.d.ts +2 -0
  152. package/dist/core/browser/setup.d.ts.map +1 -0
  153. package/dist/core/browser/setup.js +16 -0
  154. package/dist/core/browser/setup.js.map +1 -0
  155. package/dist/core/catalog-cache-scope.d.ts.map +1 -1
  156. package/dist/core/catalog-cache-scope.js +3 -1
  157. package/dist/core/catalog-cache-scope.js.map +1 -1
  158. package/dist/core/computer-use/image.d.ts +1 -0
  159. package/dist/core/computer-use/image.d.ts.map +1 -1
  160. package/dist/core/computer-use/image.js +8 -0
  161. package/dist/core/computer-use/image.js.map +1 -1
  162. package/dist/core/computer-use/schemas.d.ts +1 -0
  163. package/dist/core/computer-use/schemas.d.ts.map +1 -1
  164. package/dist/core/computer-use/schemas.js +2 -1
  165. package/dist/core/computer-use/schemas.js.map +1 -1
  166. package/dist/core/computer-use/workflow.d.ts.map +1 -1
  167. package/dist/core/computer-use/workflow.js +89 -23
  168. package/dist/core/computer-use/workflow.js.map +1 -1
  169. package/dist/core/customize.d.ts.map +1 -1
  170. package/dist/core/customize.js +15 -14
  171. package/dist/core/customize.js.map +1 -1
  172. package/dist/core/export-html/index.d.ts.map +1 -1
  173. package/dist/core/export-html/index.js +1 -1
  174. package/dist/core/export-html/index.js.map +1 -1
  175. package/dist/core/extensions/loader.d.ts.map +1 -1
  176. package/dist/core/extensions/loader.js +4 -0
  177. package/dist/core/extensions/loader.js.map +1 -1
  178. package/dist/core/extensions/runner.d.ts +1 -0
  179. package/dist/core/extensions/runner.d.ts.map +1 -1
  180. package/dist/core/extensions/runner.js +1 -1
  181. package/dist/core/extensions/runner.js.map +1 -1
  182. package/dist/core/extensions/types.d.ts +1 -1
  183. package/dist/core/extensions/types.d.ts.map +1 -1
  184. package/dist/core/extensions/types.js.map +1 -1
  185. package/dist/core/install-features.d.ts.map +1 -1
  186. package/dist/core/install-features.js +10 -8
  187. package/dist/core/install-features.js.map +1 -1
  188. package/dist/core/memory-cap.d.ts.map +1 -1
  189. package/dist/core/memory-cap.js +5 -3
  190. package/dist/core/memory-cap.js.map +1 -1
  191. package/dist/core/model-runtime.d.ts.map +1 -1
  192. package/dist/core/model-runtime.js +3 -2
  193. package/dist/core/model-runtime.js.map +1 -1
  194. package/dist/core/model-tiers.d.ts.map +1 -1
  195. package/dist/core/model-tiers.js +9 -6
  196. package/dist/core/model-tiers.js.map +1 -1
  197. package/dist/core/permissions.d.ts +16 -23
  198. package/dist/core/permissions.d.ts.map +1 -1
  199. package/dist/core/permissions.js +71 -142
  200. package/dist/core/permissions.js.map +1 -1
  201. package/dist/core/plan-mode.d.ts +10 -12
  202. package/dist/core/plan-mode.d.ts.map +1 -1
  203. package/dist/core/plan-mode.js +20 -19
  204. package/dist/core/plan-mode.js.map +1 -1
  205. package/dist/core/process-registry.d.ts.map +1 -1
  206. package/dist/core/process-registry.js +6 -4
  207. package/dist/core/process-registry.js.map +1 -1
  208. package/dist/core/runtime-bridges.d.ts.map +1 -1
  209. package/dist/core/runtime-bridges.js +2 -0
  210. package/dist/core/runtime-bridges.js.map +1 -1
  211. package/dist/core/runtime-scope.d.ts +11 -0
  212. package/dist/core/runtime-scope.d.ts.map +1 -0
  213. package/dist/core/runtime-scope.js +3 -0
  214. package/dist/core/runtime-scope.js.map +1 -0
  215. package/dist/core/sdk.d.ts.map +1 -1
  216. package/dist/core/sdk.js +26 -6
  217. package/dist/core/sdk.js.map +1 -1
  218. package/dist/core/session-handoff.d.ts +35 -0
  219. package/dist/core/session-handoff.d.ts.map +1 -0
  220. package/dist/core/session-handoff.js +214 -0
  221. package/dist/core/session-handoff.js.map +1 -0
  222. package/dist/core/session-manager.d.ts +20 -0
  223. package/dist/core/session-manager.d.ts.map +1 -1
  224. package/dist/core/session-manager.js +191 -22
  225. package/dist/core/session-manager.js.map +1 -1
  226. package/dist/core/session-ownership.d.ts +28 -0
  227. package/dist/core/session-ownership.d.ts.map +1 -0
  228. package/dist/core/session-ownership.js +138 -0
  229. package/dist/core/session-ownership.js.map +1 -0
  230. package/dist/core/session-retention.d.ts.map +1 -1
  231. package/dist/core/session-retention.js +11 -2
  232. package/dist/core/session-retention.js.map +1 -1
  233. package/dist/core/settings-manager.d.ts +20 -1
  234. package/dist/core/settings-manager.d.ts.map +1 -1
  235. package/dist/core/settings-manager.js +67 -1
  236. package/dist/core/settings-manager.js.map +1 -1
  237. package/dist/core/slash-commands.d.ts.map +1 -1
  238. package/dist/core/slash-commands.js +6 -4
  239. package/dist/core/slash-commands.js.map +1 -1
  240. package/dist/core/subagent-permission-inherit.d.ts +6 -10
  241. package/dist/core/subagent-permission-inherit.d.ts.map +1 -1
  242. package/dist/core/subagent-permission-inherit.js +14 -14
  243. package/dist/core/subagent-permission-inherit.js.map +1 -1
  244. package/dist/core/subagent-wait-interruption.d.ts +11 -0
  245. package/dist/core/subagent-wait-interruption.d.ts.map +1 -0
  246. package/dist/core/subagent-wait-interruption.js +19 -0
  247. package/dist/core/subagent-wait-interruption.js.map +1 -0
  248. package/dist/core/system-prompt.d.ts +2 -0
  249. package/dist/core/system-prompt.d.ts.map +1 -1
  250. package/dist/core/system-prompt.js +14 -4
  251. package/dist/core/system-prompt.js.map +1 -1
  252. package/dist/core/todo-settings.d.ts +5 -0
  253. package/dist/core/todo-settings.d.ts.map +1 -0
  254. package/dist/core/todo-settings.js +7 -0
  255. package/dist/core/todo-settings.js.map +1 -0
  256. package/dist/core/tools/bash.d.ts.map +1 -1
  257. package/dist/core/tools/bash.js +4 -4
  258. package/dist/core/tools/bash.js.map +1 -1
  259. package/dist/core/tools/edit.d.ts.map +1 -1
  260. package/dist/core/tools/edit.js +5 -3
  261. package/dist/core/tools/edit.js.map +1 -1
  262. package/dist/core/tools/find.d.ts.map +1 -1
  263. package/dist/core/tools/find.js +4 -4
  264. package/dist/core/tools/find.js.map +1 -1
  265. package/dist/core/tools/grep.d.ts.map +1 -1
  266. package/dist/core/tools/grep.js +4 -4
  267. package/dist/core/tools/grep.js.map +1 -1
  268. package/dist/core/tools/ls.d.ts.map +1 -1
  269. package/dist/core/tools/ls.js +4 -4
  270. package/dist/core/tools/ls.js.map +1 -1
  271. package/dist/core/tools/read.d.ts.map +1 -1
  272. package/dist/core/tools/read.js +4 -4
  273. package/dist/core/tools/read.js.map +1 -1
  274. package/dist/core/tools/render-utils.d.ts +14 -5
  275. package/dist/core/tools/render-utils.d.ts.map +1 -1
  276. package/dist/core/tools/render-utils.js +34 -7
  277. package/dist/core/tools/render-utils.js.map +1 -1
  278. package/dist/core/tools/write.d.ts.map +1 -1
  279. package/dist/core/tools/write.js +4 -4
  280. package/dist/core/tools/write.js.map +1 -1
  281. package/dist/core/usage-service.d.ts.map +1 -1
  282. package/dist/core/usage-service.js +5 -3
  283. package/dist/core/usage-service.js.map +1 -1
  284. package/dist/gateway/adapters/discord.d.ts +12 -1
  285. package/dist/gateway/adapters/discord.d.ts.map +1 -1
  286. package/dist/gateway/adapters/discord.js +114 -24
  287. package/dist/gateway/adapters/discord.js.map +1 -1
  288. package/dist/gateway/adapters/telegram.d.ts +4 -2
  289. package/dist/gateway/adapters/telegram.d.ts.map +1 -1
  290. package/dist/gateway/adapters/telegram.js +41 -11
  291. package/dist/gateway/adapters/telegram.js.map +1 -1
  292. package/dist/gateway/agent-bridge.d.ts +18 -4
  293. package/dist/gateway/agent-bridge.d.ts.map +1 -1
  294. package/dist/gateway/agent-bridge.js +305 -73
  295. package/dist/gateway/agent-bridge.js.map +1 -1
  296. package/dist/gateway/approval.d.ts +3 -6
  297. package/dist/gateway/approval.d.ts.map +1 -1
  298. package/dist/gateway/approval.js +62 -24
  299. package/dist/gateway/approval.js.map +1 -1
  300. package/dist/gateway/authz.d.ts +2 -0
  301. package/dist/gateway/authz.d.ts.map +1 -1
  302. package/dist/gateway/authz.js +13 -0
  303. package/dist/gateway/authz.js.map +1 -1
  304. package/dist/gateway/buttons.d.ts +3 -1
  305. package/dist/gateway/buttons.d.ts.map +1 -1
  306. package/dist/gateway/buttons.js +45 -20
  307. package/dist/gateway/buttons.js.map +1 -1
  308. package/dist/gateway/command.d.ts.map +1 -1
  309. package/dist/gateway/command.js +49 -4
  310. package/dist/gateway/command.js.map +1 -1
  311. package/dist/gateway/commands.d.ts +2 -0
  312. package/dist/gateway/commands.d.ts.map +1 -1
  313. package/dist/gateway/commands.js +52 -16
  314. package/dist/gateway/commands.js.map +1 -1
  315. package/dist/gateway/config.d.ts +6 -0
  316. package/dist/gateway/config.d.ts.map +1 -1
  317. package/dist/gateway/config.js +7 -0
  318. package/dist/gateway/config.js.map +1 -1
  319. package/dist/gateway/conversations.d.ts +14 -0
  320. package/dist/gateway/conversations.d.ts.map +1 -0
  321. package/dist/gateway/conversations.js +30 -0
  322. package/dist/gateway/conversations.js.map +1 -0
  323. package/dist/gateway/cron.d.ts +1 -1
  324. package/dist/gateway/cron.d.ts.map +1 -1
  325. package/dist/gateway/cron.js +2 -2
  326. package/dist/gateway/cron.js.map +1 -1
  327. package/dist/gateway/download.d.ts +2 -0
  328. package/dist/gateway/download.d.ts.map +1 -0
  329. package/dist/gateway/download.js +36 -0
  330. package/dist/gateway/download.js.map +1 -0
  331. package/dist/gateway/index.d.ts.map +1 -1
  332. package/dist/gateway/index.js +106 -47
  333. package/dist/gateway/index.js.map +1 -1
  334. package/dist/gateway/mobile-commands.d.ts +24 -0
  335. package/dist/gateway/mobile-commands.d.ts.map +1 -0
  336. package/dist/gateway/mobile-commands.js +423 -0
  337. package/dist/gateway/mobile-commands.js.map +1 -0
  338. package/dist/gateway/presenter.d.ts +27 -0
  339. package/dist/gateway/presenter.d.ts.map +1 -0
  340. package/dist/gateway/presenter.js +308 -0
  341. package/dist/gateway/presenter.js.map +1 -0
  342. package/dist/gateway/router.d.ts +6 -5
  343. package/dist/gateway/router.d.ts.map +1 -1
  344. package/dist/gateway/router.js +126 -43
  345. package/dist/gateway/router.js.map +1 -1
  346. package/dist/gateway/service.d.ts +46 -0
  347. package/dist/gateway/service.d.ts.map +1 -0
  348. package/dist/gateway/service.js +404 -0
  349. package/dist/gateway/service.js.map +1 -0
  350. package/dist/gateway/setup.d.ts +9 -0
  351. package/dist/gateway/setup.d.ts.map +1 -0
  352. package/dist/gateway/setup.js +202 -0
  353. package/dist/gateway/setup.js.map +1 -0
  354. package/dist/gateway/stream.d.ts +6 -5
  355. package/dist/gateway/stream.d.ts.map +1 -1
  356. package/dist/gateway/stream.js +24 -11
  357. package/dist/gateway/stream.js.map +1 -1
  358. package/dist/gateway/types.d.ts +4 -2
  359. package/dist/gateway/types.d.ts.map +1 -1
  360. package/dist/gateway/types.js.map +1 -1
  361. package/dist/index.d.ts +2 -0
  362. package/dist/index.d.ts.map +1 -1
  363. package/dist/index.js +2 -0
  364. package/dist/index.js.map +1 -1
  365. package/dist/main.d.ts.map +1 -1
  366. package/dist/main.js +3 -3
  367. package/dist/main.js.map +1 -1
  368. package/dist/modes/interactive/components/assistant-message.d.ts +19 -2
  369. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  370. package/dist/modes/interactive/components/assistant-message.js +78 -17
  371. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  372. package/dist/modes/interactive/components/copyable-text.d.ts +27 -0
  373. package/dist/modes/interactive/components/copyable-text.d.ts.map +1 -0
  374. package/dist/modes/interactive/components/copyable-text.js +156 -0
  375. package/dist/modes/interactive/components/copyable-text.js.map +1 -0
  376. package/dist/modes/interactive/components/custom-entry.d.ts +1 -0
  377. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  378. package/dist/modes/interactive/components/custom-entry.js +8 -0
  379. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  380. package/dist/modes/interactive/components/custom-message.d.ts +1 -0
  381. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  382. package/dist/modes/interactive/components/custom-message.js +8 -0
  383. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  384. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  385. package/dist/modes/interactive/components/session-selector.js +16 -0
  386. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  387. package/dist/modes/interactive/components/settings-selector.d.ts +12 -1
  388. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  389. package/dist/modes/interactive/components/settings-selector.js +74 -3
  390. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  391. package/dist/modes/interactive/components/thinking-tail.d.ts +9 -2
  392. package/dist/modes/interactive/components/thinking-tail.d.ts.map +1 -1
  393. package/dist/modes/interactive/components/thinking-tail.js +43 -1
  394. package/dist/modes/interactive/components/thinking-tail.js.map +1 -1
  395. package/dist/modes/interactive/components/tool-execution.d.ts +5 -3
  396. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  397. package/dist/modes/interactive/components/tool-execution.js +44 -45
  398. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  399. package/dist/modes/interactive/interactive-mode.d.ts +10 -2
  400. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  401. package/dist/modes/interactive/interactive-mode.js +342 -133
  402. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  403. package/dist/modes/interactive/theme/theme.d.ts +1 -0
  404. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  405. package/dist/modes/interactive/theme/theme.js +23 -0
  406. package/dist/modes/interactive/theme/theme.js.map +1 -1
  407. package/dist/node-runtime/agent-session-services-MQUPZSIN.js +51 -0
  408. package/dist/node-runtime/{builtin-extensions-SRCYQPZ6.js → builtin-extensions-4GNDR6U3.js} +7 -6
  409. package/dist/node-runtime/{chunk-LTXUQJI4.js → chunk-24C5IAJ4.js} +1 -6
  410. package/dist/node-runtime/chunk-2BLXLDJR.js +144 -0
  411. package/dist/node-runtime/{chunk-RQ5DNUNG.js → chunk-2CMV4L24.js} +21 -124
  412. package/dist/node-runtime/{chunk-LTYWTR3V.js → chunk-2MI5OPMN.js} +17 -2
  413. package/dist/node-runtime/{chunk-W3CVH5RX.js → chunk-2TKODGBZ.js} +11 -6
  414. package/dist/node-runtime/{chunk-GT5F3OKM.js → chunk-33SIKK3Y.js} +38 -164
  415. package/dist/node-runtime/{chunk-GZQHMEWL.js → chunk-3DKIWPKN.js} +19 -4
  416. package/dist/node-runtime/{chunk-3GHXVUAK.js → chunk-3VEY2IYY.js} +1 -1
  417. package/dist/node-runtime/chunk-4ER2ZV4Z.js +537 -0
  418. package/dist/node-runtime/chunk-4EULYYR4.js +62 -0
  419. package/dist/node-runtime/{chunk-LOYUC2ID.js → chunk-4SBQAI4T.js} +27 -27
  420. package/dist/node-runtime/{chunk-CZUBYPFP.js → chunk-53ARRUHA.js} +674 -257
  421. package/dist/node-runtime/{chunk-VTPM5V35.js → chunk-5Q4A37RB.js} +10 -4
  422. package/dist/node-runtime/{chunk-SWSN6HAB.js → chunk-5UZOPGE3.js} +1 -1
  423. package/dist/node-runtime/{chunk-XSRCAQK2.js → chunk-5Z5PCXGY.js} +263 -222
  424. package/dist/node-runtime/chunk-7JIYPIQU.js +356 -0
  425. package/dist/node-runtime/{chunk-D466UAID.js → chunk-AJ6R5VTV.js} +60 -88
  426. package/dist/node-runtime/chunk-ATIF3RX5.js +352 -0
  427. package/dist/node-runtime/{chunk-A3KMVBZV.js → chunk-BBUVIEZB.js} +1 -10
  428. package/dist/node-runtime/chunk-CCCN2UCX.js +14 -0
  429. package/dist/node-runtime/chunk-CJS4KQFI.js +3412 -0
  430. package/dist/node-runtime/chunk-DO6PALE2.js +205 -0
  431. package/dist/node-runtime/{chunk-N3PNL74S.js → chunk-DRJI7ZSC.js} +63 -163
  432. package/dist/node-runtime/{chunk-VTGEKB7R.js → chunk-E75WFZ33.js} +1 -1
  433. package/dist/node-runtime/{chunk-MJQDX3BA.js → chunk-EBB4BJW4.js} +3 -3
  434. package/dist/node-runtime/{chunk-VQ4UBWSA.js → chunk-EOEAQIJV.js} +63 -6
  435. package/dist/node-runtime/chunk-EOPL2HMM.js +117 -0
  436. package/dist/node-runtime/chunk-H4K3JDRB.js +47 -0
  437. package/dist/node-runtime/{chunk-HRS4HMDX.js → chunk-HT2XEJNP.js} +19 -3
  438. package/dist/node-runtime/chunk-IMLCWLPI.js +9 -0
  439. package/dist/node-runtime/{chunk-BJ6H7DPI.js → chunk-JJWZB7S3.js} +62 -50
  440. package/dist/node-runtime/chunk-KFFOQR4G.js +672 -0
  441. package/dist/node-runtime/chunk-L5LZUGT7.js +40 -0
  442. package/dist/node-runtime/chunk-LV6CEFW2.js +97 -0
  443. package/dist/node-runtime/{chunk-VSELYKWU.js → chunk-LWYIVUGV.js} +2 -1
  444. package/dist/node-runtime/{chunk-BYQ2MOFI.js → chunk-MFV2LOOX.js} +184 -2192
  445. package/dist/node-runtime/{chunk-5SQDLSZJ.js → chunk-MNRO3UCV.js} +2 -2
  446. package/dist/node-runtime/{chunk-JHYKXIMM.js → chunk-MPKSOJBT.js} +1 -1
  447. package/dist/node-runtime/{chunk-C4O2RSQQ.js → chunk-N4TUWAGA.js} +1 -1
  448. package/dist/node-runtime/{chunk-7NBZ5P7I.js → chunk-NAY6UUQZ.js} +1 -1
  449. package/dist/node-runtime/chunk-NKH2QBKF.js +773 -0
  450. package/dist/node-runtime/chunk-O2AT4MEU.js +124 -0
  451. package/dist/node-runtime/chunk-OAR4TYZE.js +146 -0
  452. package/dist/node-runtime/{chunk-DDGMHUOW.js → chunk-OGJN3OZV.js} +2 -1
  453. package/dist/node-runtime/{chunk-MX3GJNXJ.js → chunk-PLGA743X.js} +23 -0
  454. package/dist/node-runtime/chunk-Q3FEOEDA.js +1364 -0
  455. package/dist/node-runtime/{chunk-H2BI7G7T.js → chunk-QFADHUQV.js} +2 -1
  456. package/dist/node-runtime/{chunk-W3SILANP.js → chunk-RBZQU6TJ.js} +12 -9
  457. package/dist/node-runtime/{chunk-ZVSORYRM.js → chunk-RVOQBXTA.js} +10 -6
  458. package/dist/node-runtime/{chunk-HXJS2PJM.js → chunk-RW4PYFNE.js} +14 -94
  459. package/dist/node-runtime/chunk-TP7K7YWS.js +2830 -0
  460. package/dist/node-runtime/{chunk-ZOIIMEN6.js → chunk-TVLBDVTR.js} +32 -21
  461. package/dist/node-runtime/chunk-UAEOTO52.js +119 -0
  462. package/dist/node-runtime/{chunk-MGWCVY6Y.js → chunk-UDKX3PFN.js} +3 -3
  463. package/dist/node-runtime/{chunk-AY6CAJSL.js → chunk-UJOCPOMX.js} +6 -3
  464. package/dist/node-runtime/{chunk-WJVFOIB5.js → chunk-UQUCFAJ3.js} +1 -1
  465. package/dist/node-runtime/chunk-US544NN6.js +13 -0
  466. package/dist/node-runtime/{chunk-7AFOFSDY.js → chunk-V3HK3FE7.js} +1 -1
  467. package/dist/node-runtime/{chunk-6UB6NKA3.js → chunk-VIVYOI7C.js} +130 -27
  468. package/dist/node-runtime/{chunk-MW2XJZIK.js → chunk-XHIRAZ26.js} +1 -1
  469. package/dist/node-runtime/chunk-YPHAIRZT.js +10 -0
  470. package/dist/node-runtime/{chunk-3RCWXWAY.js → chunk-YRUY57IN.js} +1 -1
  471. package/dist/node-runtime/cli-runtime.js +2 -2
  472. package/dist/node-runtime/command-PYBNGLPP.js +45 -0
  473. package/dist/node-runtime/{commands-BZGSLIP7.js → commands-EMBQQVVT.js} +13 -13
  474. package/dist/node-runtime/commands-Y2OUC2T7.js +37 -0
  475. package/dist/node-runtime/config-7DYMNJUO.js +20 -0
  476. package/dist/node-runtime/{customize-LF5VST47.js → customize-VFJV3U6A.js} +2 -1
  477. package/dist/node-runtime/{direct-tool-executor-BSZDHIYR.js → direct-tool-executor-4D7UXYU4.js} +10 -10
  478. package/dist/node-runtime/{export-html-E4DT6ZJQ.js → export-html-ETFOKW3M.js} +4 -3
  479. package/dist/node-runtime/{extension-input-RV5N6APL.js → extension-input-7QODTFAS.js} +4 -4
  480. package/dist/node-runtime/{extension-selector-CPD5LWDD.js → extension-selector-T65JEDJ5.js} +4 -4
  481. package/dist/node-runtime/{extract-XLQSJN4V.js → extract-EQJE7FZZ.js} +2 -2
  482. package/dist/node-runtime/gateway-QENRQA5X.js +1476 -0
  483. package/dist/node-runtime/{gemini-search-U7SUMPQA.js → gemini-search-35OCRFLN.js} +1 -1
  484. package/dist/node-runtime/{gemini-url-context-PXWCBQHK.js → gemini-url-context-UQY3PHHW.js} +2 -2
  485. package/dist/node-runtime/index.js +113 -73
  486. package/dist/node-runtime/{init-DVJUAOUO.js → init-P5AUV77I.js} +5 -5
  487. package/dist/node-runtime/{install-cli-TH7IJJQQ.js → install-cli-KHAXYBOO.js} +21 -82
  488. package/dist/node-runtime/interactive-mode-IN77GQGX.js +74 -0
  489. package/dist/node-runtime/{interactive-view-N6F4KUIT.js → interactive-view-OMWDFGUQ.js} +10 -10
  490. package/dist/node-runtime/lunr-browser-VVPRWC3F.js +174 -0
  491. package/dist/node-runtime/{lunr-computer-use-TJNDAMWM.js → lunr-computer-use-IAUNXSXH.js} +11 -8
  492. package/dist/node-runtime/{lunr-cron-J64I72C6.js → lunr-cron-P6ZJGVEF.js} +21 -7
  493. package/dist/node-runtime/main.js +47 -34
  494. package/dist/node-runtime/{mcp-auth-flow-YL6RWPYG.js → mcp-auth-flow-QVLFVLEO.js} +2 -2
  495. package/dist/node-runtime/{memory-cap-3S4XRLNP.js → memory-cap-EL3KL4JJ.js} +2 -1
  496. package/dist/node-runtime/mobile-commands-WKFSFACZ.js +33 -0
  497. package/dist/node-runtime/model-runtime-YXGJS5OJ.js +16 -0
  498. package/dist/node-runtime/{model-tiers-NJLHUEGK.js → model-tiers-OU3U5CZG.js} +2 -1
  499. package/dist/node-runtime/{package-manager-cli-VMYX4Y2S.js → package-manager-cli-J337RKTI.js} +25 -17
  500. package/dist/node-runtime/{pi-intercom-NV2LW6X7.js → pi-intercom-QM53RLTS.js} +6 -1
  501. package/dist/node-runtime/{pi-mcp-adapter-JLB5YL2F.js → pi-mcp-adapter-3PHF4KZ4.js} +8 -7
  502. package/dist/node-runtime/{pi-subagents-WEHV3W7H.js → pi-subagents-RCHPB6UK.js} +255 -88
  503. package/dist/node-runtime/{pi-web-access-FN5YC5T6.js → pi-web-access-PNG35XW7.js} +15 -15
  504. package/dist/node-runtime/process-registry-PVJ44F7H.js +31 -0
  505. package/dist/node-runtime/{proxy-modes-OR7ISBXK.js → proxy-modes-5FAPSZEZ.js} +11 -11
  506. package/dist/node-runtime/rpc-entry.js +47 -34
  507. package/dist/node-runtime/{rpc-mode-SJNSOA4G.js → rpc-mode-SH7VB4RH.js} +2 -2
  508. package/dist/node-runtime/runtime-4VA6JKNF.js +373 -0
  509. package/dist/node-runtime/runtime-bridges-3CQHWVVY.js +21 -0
  510. package/dist/node-runtime/service-HGGU3STY.js +36 -0
  511. package/dist/node-runtime/session-handoff-IAFIK7QP.js +33 -0
  512. package/dist/node-runtime/{session-manager-QEMZBMTM.js → session-manager-TCEFDKBL.js} +2 -1
  513. package/dist/node-runtime/{session-selector-URVJLOTK.js → session-selector-HG5J4BDZ.js} +5 -4
  514. package/dist/node-runtime/{settings-manager-3CCU326G.js → settings-manager-HIBIUNBK.js} +12 -5
  515. package/dist/node-runtime/setup-JBKOLJ6F.js +18 -0
  516. package/dist/node-runtime/setup-YU5LKRL3.js +215 -0
  517. package/dist/node-runtime/{subagent-executor-CXKXQDHH.js → subagent-executor-2BH76MMS.js} +64 -23
  518. package/dist/node-runtime/theme-WTJWZSGD.js +68 -0
  519. package/dist/node-runtime/trust-manager-6ZQANSBX.js +17 -0
  520. package/dist/node-runtime/{update-cli-NM7B4CKL.js → update-cli-TVTPVUNM.js} +6 -3
  521. package/dist/node-runtime/usage-service-LFB2SWYV.js +37 -0
  522. package/dist/node-runtime/{video-extract-OYT5WKS5.js → video-extract-OOZHR7SU.js} +2 -2
  523. package/dist/node-runtime/{workflow-C26QCUTW.js → workflow-TVJNKKQP.js} +80 -39
  524. package/dist/node-runtime/{youtube-extract-TQYKGFGS.js → youtube-extract-FNPAUNHU.js} +6 -6
  525. package/dist/startup/interactive-view.d.ts.map +1 -1
  526. package/dist/startup/interactive-view.js +5 -1
  527. package/dist/startup/interactive-view.js.map +1 -1
  528. package/dist/utils/image-resize-core.d.ts +2 -0
  529. package/dist/utils/image-resize-core.d.ts.map +1 -1
  530. package/dist/utils/image-resize-core.js +10 -0
  531. package/dist/utils/image-resize-core.js.map +1 -1
  532. package/docs/browser.md +86 -0
  533. package/docs/computer-use.md +134 -48
  534. package/docs/extensions.md +2 -0
  535. package/docs/features.md +108 -27
  536. package/docs/index.md +1 -1
  537. package/docs/interactive-startup.md +2 -1
  538. package/docs/keybindings.md +1 -1
  539. package/docs/providers.md +6 -2
  540. package/docs/quickstart.md +2 -2
  541. package/docs/sessions.md +10 -0
  542. package/docs/settings.md +3 -1
  543. package/docs/tui.md +2 -0
  544. package/docs/usage.md +20 -4
  545. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  546. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  547. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  548. package/examples/extensions/gondolin/package-lock.json +2 -2
  549. package/examples/extensions/gondolin/package.json +1 -1
  550. package/examples/extensions/plan-mode/README.md +1 -1
  551. package/examples/extensions/sandbox/package-lock.json +2 -2
  552. package/examples/extensions/sandbox/package.json +1 -1
  553. package/examples/extensions/with-deps/package-lock.json +2 -2
  554. package/examples/extensions/with-deps/package.json +1 -1
  555. package/install-lock/package-lock.json +39 -25
  556. package/install-lock/package.json +2 -2
  557. package/npm-shrinkwrap.json +36 -22
  558. package/package.json +10 -7
  559. package/scripts/install-browser.mjs +20 -0
  560. package/dist/node-runtime/agent-session-services-QANFGM2V.js +0 -40
  561. package/dist/node-runtime/chunk-LISUTZS3.js +0 -19
  562. package/dist/node-runtime/chunk-VGYZ3APQ.js +0 -59
  563. package/dist/node-runtime/chunk-XAUQOKYK.js +0 -6011
  564. package/dist/node-runtime/command-ZURZJDXF.js +0 -13
  565. package/dist/node-runtime/gateway-FWHRIBK5.js +0 -2139
  566. package/dist/node-runtime/interactive-mode-BBASNWHN.js +0 -62
  567. package/dist/node-runtime/runtime-bridges-2VQTLPOZ.js +0 -12
  568. package/dist/node-runtime/{chunk-U6C7VTR5.js → chunk-7IQGBKBJ.js} +3 -3
  569. package/dist/node-runtime/{mcp-panel-IIGMXQGP.js → mcp-panel-KTTFXJZ4.js} +3 -3
  570. package/dist/node-runtime/{src-BPQFJR76.js → src-IVPNZ2BX.js} +9 -9
@@ -0,0 +1,144 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ getShellConfig,
4
+ killProcessTree
5
+ } from "./chunk-ZCHMJ34K.js";
6
+
7
+ // packages/coding-agent/dist/core/process-registry.js
8
+ import { spawn } from "node:child_process";
9
+ var isWin32 = process.platform === "win32", EXIT_NOISE_GATE_MS = 3e3, EXIT_TTL_MS = 300 * 1e3, MAX_TRACKED = 100, processes = /* @__PURE__ */ new Map();
10
+ function register(pid, command, cwd, sessionId) {
11
+ if (pid) {
12
+ if (processes.size >= MAX_TRACKED) {
13
+ let oldest;
14
+ for (let [p, entry] of processes) {
15
+ if (entry.status === "exited") {
16
+ oldest = { pid: p, entry };
17
+ break;
18
+ }
19
+ (!oldest || entry.startedAt < oldest.entry.startedAt) && (oldest = { pid: p, entry });
20
+ }
21
+ oldest && processes.delete(oldest.pid);
22
+ }
23
+ processes.set(pid, { pid, command, cwd, startedAt: Date.now(), status: "running", sessionId });
24
+ }
25
+ }
26
+ function unregister(pid) {
27
+ pid && processes.delete(pid);
28
+ }
29
+ function markExited(pid, exitCode) {
30
+ if (!pid)
31
+ return;
32
+ let entry = processes.get(pid);
33
+ if (!entry)
34
+ return;
35
+ if (Date.now() - entry.startedAt < EXIT_NOISE_GATE_MS) {
36
+ processes.delete(pid);
37
+ return;
38
+ }
39
+ entry.status = "exited", entry.exitCode = exitCode ?? void 0, entry.exitedAt = Date.now();
40
+ }
41
+ function list(sessionId) {
42
+ return prune(), [...processes.values()].filter((p) => sessionId === void 0 || p.sessionId === sessionId);
43
+ }
44
+ function prune() {
45
+ for (let [pid, entry] of processes) {
46
+ if (entry.status === "exited") {
47
+ (!entry.exitedAt || Date.now() - entry.exitedAt > EXIT_TTL_MS) && processes.delete(pid);
48
+ continue;
49
+ }
50
+ isAlive(pid) || markExited(pid, null);
51
+ }
52
+ }
53
+ function isAlive(pid) {
54
+ try {
55
+ return process.kill(pid, 0), !0;
56
+ } catch (error) {
57
+ return error.code !== "ESRCH";
58
+ }
59
+ }
60
+ function kill(pid) {
61
+ processes.has(pid) && (killProcessTree(pid), isAlive(pid) || markExited(pid, null));
62
+ }
63
+ function killAll(sessionId) {
64
+ for (let [pid, entry] of processes)
65
+ if (!(sessionId !== void 0 && entry.sessionId !== sessionId)) {
66
+ try {
67
+ killProcessTree(pid);
68
+ } catch {
69
+ }
70
+ isAlive(pid) || markExited(pid, null);
71
+ }
72
+ }
73
+ function pause(pid) {
74
+ if (isWin32)
75
+ throw new Error("Pause/resume is unsupported on Windows.");
76
+ if (!processes.has(pid))
77
+ throw new Error(`Process ${pid} is not tracked.`);
78
+ try {
79
+ process.kill(pid, "SIGSTOP");
80
+ let entry = processes.get(pid);
81
+ entry && (entry.status = "paused");
82
+ } catch {
83
+ processes.delete(pid);
84
+ }
85
+ }
86
+ function resume(pid) {
87
+ if (isWin32)
88
+ throw new Error("Pause/resume is unsupported on Windows.");
89
+ if (!processes.has(pid))
90
+ throw new Error(`Process ${pid} is not tracked.`);
91
+ try {
92
+ process.kill(pid, "SIGCONT");
93
+ let entry = processes.get(pid);
94
+ entry && (entry.status = "running");
95
+ } catch {
96
+ processes.delete(pid);
97
+ }
98
+ }
99
+ function restart(pid) {
100
+ let entry = processes.get(pid);
101
+ if (entry) {
102
+ try {
103
+ killProcessTree(pid);
104
+ } catch {
105
+ }
106
+ processes.delete(pid);
107
+ try {
108
+ let shellConfig = getShellConfig(), child = spawn(shellConfig.shell, [...shellConfig.args, entry.command], {
109
+ cwd: entry.cwd,
110
+ detached: !0,
111
+ stdio: "ignore",
112
+ windowsHide: !0
113
+ });
114
+ if (child.pid)
115
+ return register(child.pid, entry.command, entry.cwd, entry.sessionId), child.unref(), child.pid;
116
+ } catch {
117
+ }
118
+ }
119
+ }
120
+ function isWindows() {
121
+ return isWin32;
122
+ }
123
+ function clearRegistry(sessionId) {
124
+ if (sessionId === void 0) {
125
+ processes.clear();
126
+ return;
127
+ }
128
+ for (let [pid, entry] of processes)
129
+ entry.sessionId === sessionId && processes.delete(pid);
130
+ }
131
+
132
+ export {
133
+ register,
134
+ unregister,
135
+ markExited,
136
+ list,
137
+ kill,
138
+ killAll,
139
+ pause,
140
+ resume,
141
+ restart,
142
+ isWindows,
143
+ clearRegistry
144
+ };
@@ -1,118 +1,17 @@
1
1
  import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ loadGatewayConfig,
4
+ saveGatewayConfig
5
+ } from "./chunk-O2AT4MEU.js";
2
6
  import {
3
7
  VERSION,
4
8
  appendDebugLog,
5
9
  getAgentDir
6
10
  } from "./chunk-PCIGF2XK.js";
7
11
 
8
- // packages/coding-agent/dist/gateway/config.js
12
+ // packages/coding-agent/dist/core/install-features.js
9
13
  import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
10
14
  import { join } from "node:path";
11
- function gatewayConfigPath() {
12
- return join(getAgentDir(), "gateway.json");
13
- }
14
- function defaultPlatformConfig(requireMention) {
15
- return {
16
- enabled: !1,
17
- allowedUsers: [],
18
- allowedChats: [],
19
- requireMention,
20
- freeResponseChats: []
21
- };
22
- }
23
- function defaultGatewayConfig() {
24
- return {
25
- telegram: defaultPlatformConfig(!1),
26
- discord: { ...defaultPlatformConfig(!0), ignoredChannels: [], autoThread: !0 },
27
- groupSessionsPerUser: !0,
28
- unauthorizedDmBehavior: "pair",
29
- streaming: { enabled: !0, editIntervalMs: 800, bufferThreshold: 24 }
30
- };
31
- }
32
- function asStringArray(value) {
33
- if (Array.isArray(value))
34
- return value.every((v) => typeof v == "string") ? value : void 0;
35
- }
36
- function asBoolean(value) {
37
- return typeof value == "boolean" ? value : void 0;
38
- }
39
- function asNumber(value) {
40
- return typeof value == "number" && Number.isFinite(value) ? value : void 0;
41
- }
42
- function sanitizePlatform(raw, base) {
43
- if (raw == null || typeof raw != "object" || Array.isArray(raw))
44
- return base;
45
- let r = raw;
46
- return {
47
- enabled: asBoolean(r.enabled) ?? base.enabled,
48
- token: typeof r.token == "string" ? r.token : base.token,
49
- allowedUsers: asStringArray(r.allowedUsers) ?? base.allowedUsers,
50
- allowedChats: asStringArray(r.allowedChats) ?? base.allowedChats,
51
- requireMention: asBoolean(r.requireMention) ?? base.requireMention,
52
- freeResponseChats: asStringArray(r.freeResponseChats) ?? base.freeResponseChats,
53
- homeChannel: typeof r.homeChannel == "string" ? r.homeChannel : base.homeChannel
54
- };
55
- }
56
- function sanitizeDiscord(raw, base) {
57
- let platform = sanitizePlatform(raw, base), r = raw != null && typeof raw == "object" && !Array.isArray(raw) ? raw : {};
58
- return {
59
- ...platform,
60
- ignoredChannels: asStringArray(r.ignoredChannels) ?? base.ignoredChannels,
61
- autoThread: asBoolean(r.autoThread) ?? base.autoThread
62
- };
63
- }
64
- function sanitizeConfig(raw) {
65
- let base = defaultGatewayConfig();
66
- if (raw == null || typeof raw != "object" || Array.isArray(raw))
67
- return base;
68
- let r = raw, streamingRaw = r.streaming != null && typeof r.streaming == "object" && !Array.isArray(r.streaming) ? r.streaming : {};
69
- return {
70
- telegram: sanitizePlatform(r.telegram, base.telegram),
71
- discord: sanitizeDiscord(r.discord, base.discord),
72
- groupSessionsPerUser: asBoolean(r.groupSessionsPerUser) ?? base.groupSessionsPerUser,
73
- unauthorizedDmBehavior: r.unauthorizedDmBehavior === "ignore" ? "ignore" : "pair",
74
- streaming: {
75
- enabled: asBoolean(streamingRaw.enabled) ?? base.streaming.enabled,
76
- editIntervalMs: asNumber(streamingRaw.editIntervalMs) ?? base.streaming.editIntervalMs,
77
- bufferThreshold: asNumber(streamingRaw.bufferThreshold) ?? base.streaming.bufferThreshold
78
- }
79
- };
80
- }
81
- function loadGatewayConfig() {
82
- let path = gatewayConfigPath();
83
- if (!existsSync(path))
84
- return defaultGatewayConfig();
85
- try {
86
- return sanitizeConfig(JSON.parse(readFileSync(path, "utf-8")));
87
- } catch (err) {
88
- return console.error(`[gateway] Failed to load config from ${path}: ${err}`), defaultGatewayConfig();
89
- }
90
- }
91
- function saveGatewayConfig(config) {
92
- let path = gatewayConfigPath(), dir = getAgentDir();
93
- existsSync(dir) || mkdirSync(dir, { recursive: !0 });
94
- let tmp = `${path}.tmp-${process.pid}`;
95
- writeFileSync(tmp, `${JSON.stringify(config, null, 2)}
96
- `, "utf-8"), renameSync(tmp, path);
97
- try {
98
- chmodSync(path, 384);
99
- } catch {
100
- }
101
- }
102
- function resolvePlatformToken(platform, platformCfg) {
103
- let upper = platform.toUpperCase();
104
- return process.env[`LUNR_${upper}_BOT_TOKEN`] ?? process.env[`${upper}_BOT_TOKEN`] ?? platformCfg.token;
105
- }
106
- function platformConfigFor(cfg, platform) {
107
- if (platform === "telegram")
108
- return cfg.telegram;
109
- if (platform === "discord")
110
- return cfg.discord;
111
- }
112
-
113
- // packages/coding-agent/dist/core/install-features.js
114
- import { chmodSync as chmodSync2, existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
115
- import { join as join2 } from "node:path";
116
15
  var FEATURE_CATALOG = [
117
16
  {
118
17
  id: "chat-platforms",
@@ -143,7 +42,7 @@ var FEATURE_CATALOG = [
143
42
  }
144
43
  ], CHAT_PLATFORMS_INFER_UNTIL = "0.2.0";
145
44
  function installFeaturesPath() {
146
- return join2(getAgentDir(), "install-features.json");
45
+ return join(getAgentDir(), "install-features.json");
147
46
  }
148
47
  function getFeatureSpec(id) {
149
48
  return FEATURE_CATALOG.find((f) => f.id === id);
@@ -229,22 +128,22 @@ function inferFromGateway() {
229
128
  }
230
129
  function loadInstallFeatures() {
231
130
  let path = installFeaturesPath();
232
- if (!existsSync2(path))
131
+ if (!existsSync(path))
233
132
  return inferFromGateway() ?? emptyFile();
234
133
  try {
235
- return sanitizeFile(JSON.parse(readFileSync2(path, "utf-8"))) ?? inferFromGateway() ?? emptyFile();
134
+ return sanitizeFile(JSON.parse(readFileSync(path, "utf-8"))) ?? inferFromGateway() ?? emptyFile();
236
135
  } catch {
237
136
  return inferFromGateway() ?? emptyFile();
238
137
  }
239
138
  }
240
139
  function saveInstallFeatures(file) {
241
140
  let path = installFeaturesPath(), dir = getAgentDir();
242
- existsSync2(dir) || mkdirSync2(dir, { recursive: !0 });
141
+ existsSync(dir) || mkdirSync(dir, { recursive: !0 });
243
142
  let tmp = `${path}.tmp-${process.pid}`;
244
- writeFileSync2(tmp, `${JSON.stringify(file, null, 2)}
245
- `, "utf-8"), renameSync2(tmp, path);
143
+ writeFileSync(tmp, `${JSON.stringify(file, null, 2)}
144
+ `, "utf-8"), renameSync(tmp, path);
246
145
  try {
247
- chmodSync2(path, 420);
146
+ chmodSync(path, 420);
248
147
  } catch {
249
148
  }
250
149
  }
@@ -373,11 +272,14 @@ var chatPlatformsHandler = {
373
272
  persistEnvAndSecretTokens(ctx.secrets);
374
273
  let cfg = loadGatewayConfig();
375
274
  if (cfg.telegram.token && (cfg.telegram.enabled = !0), cfg.discord.token && (cfg.discord.enabled = !0), saveGatewayConfig(cfg), ctx.next.options.autostart === !0) {
376
- let hasFileToken = !!(cfg.telegram.token || cfg.discord.token);
377
- console.error(hasFileToken ? "chat-platforms: autostart recorded; login item install is not in this build yet." : "chat-platforms: autostart requested but no file token in gateway.json \u2014 unit not enabled.");
378
- }
275
+ if (!cfg.telegram.token && !cfg.discord.token)
276
+ throw new Error("Configure a bot token with lunr gateway setup before enabling automatic startup.");
277
+ await (await import("./service-HGGU3STY.js")).configureStartup("login");
278
+ } else ctx.previous?.options.autostart === !0 && await (await import("./service-HGGU3STY.js")).configureStartup("off");
379
279
  },
380
280
  async disable(opts) {
281
+ let service = await import("./service-HGGU3STY.js");
282
+ service.loadServiceSettings().startup !== "off" && await service.configureStartup("off"), await service.stopGatewayService();
381
283
  let cfg = loadGatewayConfig();
382
284
  cfg.telegram.enabled = !1, cfg.discord.enabled = !1, opts.purgeSecrets && (delete cfg.telegram.token, delete cfg.discord.token), saveGatewayConfig(cfg);
383
285
  }
@@ -387,9 +289,9 @@ var chatPlatformsHandler = {
387
289
  function appendInstallLog(line) {
388
290
  try {
389
291
  let dir = getAgentDir();
390
- existsSync2(dir) || mkdirSync2(dir, { recursive: !0 });
391
- let path = join2(dir, "install.log");
392
- writeFileSync2(path, `${(/* @__PURE__ */ new Date()).toISOString()} ${line}
292
+ existsSync(dir) || mkdirSync(dir, { recursive: !0 });
293
+ let path = join(dir, "install.log");
294
+ writeFileSync(path, `${(/* @__PURE__ */ new Date()).toISOString()} ${line}
393
295
  `, { encoding: "utf-8", flag: "a" });
394
296
  } catch {
395
297
  }
@@ -409,11 +311,6 @@ function chatPlatformDeliverBlockedMessage() {
409
311
  }
410
312
 
411
313
  export {
412
- gatewayConfigPath,
413
- loadGatewayConfig,
414
- saveGatewayConfig,
415
- resolvePlatformToken,
416
- platformConfigFor,
417
314
  FEATURE_CATALOG,
418
315
  getFeatureSpec,
419
316
  loadInstallFeatures,
@@ -1,4 +1,7 @@
1
1
  import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ runtimeScope
4
+ } from "./chunk-IMLCWLPI.js";
2
5
 
3
6
  // packages/coding-agent/dist/core/usage-adapters/shared.js
4
7
  async function fetchWithTimeout(url, init, timeoutMs = 1e4) {
@@ -403,14 +406,15 @@ function clearPlanUsageCache() {
403
406
  }
404
407
  var USAGE_SERVICE_BRIDGE_SYMBOL = /* @__PURE__ */ Symbol.for("@lunr/usage-service"), activeRuntime, activeUsageSettings, onUsageUpdate;
405
408
  function preferredWindow() {
406
- return activeUsageSettings?.getPlanUsageWindow() ?? "weekly";
409
+ return (runtimeScope.getStore()?.settingsManager ?? activeUsageSettings)?.getPlanUsageWindow() ?? "weekly";
407
410
  }
408
411
  var usageBridge = {
409
412
  peek(providerId) {
410
413
  return peekPlanUsage(providerId);
411
414
  },
412
415
  prefetch(providerId) {
413
- !activeRuntime || !hasPlanUsageAdapter(providerId) || getPlanUsage(providerId, activeRuntime).then(() => onUsageUpdate?.());
416
+ let runtime = runtimeScope.getStore()?.modelRuntime ?? activeRuntime;
417
+ !runtime || !hasPlanUsageAdapter(providerId) || getPlanUsage(providerId, runtime).then(() => onUsageUpdate?.());
414
418
  },
415
419
  setOnUpdate(fn) {
416
420
  onUsageUpdate = fn;
@@ -432,8 +436,19 @@ function getUsageServiceBridge() {
432
436
  }
433
437
 
434
438
  export {
439
+ planUsageAuthError,
440
+ PLAN_USAGE_CACHE_TTL_MS,
441
+ isWeeklyPlanWindow,
442
+ isFiveHourPlanWindow,
443
+ pickPlanWindow,
444
+ footerPlanLabel,
445
+ hasPlanUsageAdapter,
446
+ getPlanUsage,
447
+ getPlanUsageResult,
435
448
  getAllPlanUsageResults,
449
+ peekPlanUsage,
436
450
  clearPlanUsageCache,
451
+ USAGE_SERVICE_BRIDGE_SYMBOL,
437
452
  registerUsageServiceBridge,
438
453
  getUsageServiceBridge
439
454
  };
@@ -1,4 +1,7 @@
1
1
  import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ runtimeScope
4
+ } from "./chunk-IMLCWLPI.js";
2
5
 
3
6
  // packages/coding-agent/dist/core/model-tiers.js
4
7
  var TIER_NAMES = ["light", "standard", "heavy"], MODEL_TIERS_BRIDGE_SYMBOL = /* @__PURE__ */ Symbol.for("@lunr/model-tiers");
@@ -7,21 +10,23 @@ function isModelTierName(tier) {
7
10
  }
8
11
  var activeSettingsManager, toolDescriptionRefresher, parentThinkingProvider, bridge = {
9
12
  getTierModel(tier) {
10
- if (!(!activeSettingsManager || !isModelTierName(tier)))
11
- return activeSettingsManager.getTierModel(tier);
13
+ let settings = runtimeScope.getStore()?.settingsManager ?? activeSettingsManager;
14
+ if (!(!settings || !isModelTierName(tier)))
15
+ return settings.getTierModel(tier);
12
16
  },
13
17
  getTierThinking(tier) {
14
- if (!(!activeSettingsManager || !isModelTierName(tier)))
15
- return activeSettingsManager.getTierThinking(tier);
18
+ let settings = runtimeScope.getStore()?.settingsManager ?? activeSettingsManager;
19
+ if (!(!settings || !isModelTierName(tier)))
20
+ return settings.getTierThinking(tier);
16
21
  },
17
22
  getParentThinking() {
18
- return parentThinkingProvider?.();
23
+ return runtimeScope.getStore()?.thinking?.() ?? parentThinkingProvider?.();
19
24
  },
20
25
  setParentThinkingProvider(provider) {
21
26
  parentThinkingProvider = provider;
22
27
  },
23
28
  isTierModeEnabled() {
24
- return activeSettingsManager?.getModelTiersEnabled() ?? !1;
29
+ return (runtimeScope.getStore()?.settingsManager ?? activeSettingsManager)?.getModelTiersEnabled() ?? !1;
25
30
  },
26
31
  refreshToolDescription() {
27
32
  if (toolDescriptionRefresher)