@ashx-j/lunr 0.2.26 → 0.2.28

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 (697) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/LICENSE +22 -0
  3. package/dist/builtin-extensions/ashxj-thinking.d.ts +1 -1
  4. package/dist/builtin-extensions/ashxj-thinking.d.ts.map +1 -1
  5. package/dist/builtin-extensions/ashxj-thinking.js +1 -1
  6. package/dist/builtin-extensions/ashxj-thinking.js.map +1 -1
  7. package/dist/builtin-extensions/ashxj-tui.d.ts +11 -1
  8. package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
  9. package/dist/builtin-extensions/ashxj-tui.js +6 -10
  10. package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
  11. package/dist/builtin-extensions/lunr-cron.d.ts +4 -5
  12. package/dist/builtin-extensions/lunr-cron.d.ts.map +1 -1
  13. package/dist/builtin-extensions/lunr-cron.js +94 -108
  14. package/dist/builtin-extensions/lunr-cron.js.map +1 -1
  15. package/dist/builtin-extensions/lunr-local-providers/local-servers.d.ts.map +1 -1
  16. package/dist/builtin-extensions/lunr-local-providers/local-servers.js +3 -1
  17. package/dist/builtin-extensions/lunr-local-providers/local-servers.js.map +1 -1
  18. package/dist/builtin-extensions/narumiruna-pi-goal/src/accounting.d.ts.map +1 -1
  19. package/dist/builtin-extensions/narumiruna-pi-goal/src/accounting.js +5 -2
  20. package/dist/builtin-extensions/narumiruna-pi-goal/src/accounting.js.map +1 -1
  21. package/dist/builtin-extensions/narumiruna-pi-goal/src/commands.d.ts.map +1 -1
  22. package/dist/builtin-extensions/narumiruna-pi-goal/src/commands.js +2 -2
  23. package/dist/builtin-extensions/narumiruna-pi-goal/src/commands.js.map +1 -1
  24. package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.d.ts.map +1 -1
  25. package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js +1 -1
  26. package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js.map +1 -1
  27. package/dist/builtin-extensions/narumiruna-pi-goal/src/runtime.d.ts.map +1 -1
  28. package/dist/builtin-extensions/narumiruna-pi-goal/src/runtime.js +1 -1
  29. package/dist/builtin-extensions/narumiruna-pi-goal/src/runtime.js.map +1 -1
  30. package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
  31. package/dist/builtin-extensions/pi-intercom/index.js +2 -2
  32. package/dist/builtin-extensions/pi-intercom/index.js.map +1 -1
  33. package/dist/builtin-extensions/pi-lsp-extension/bemol-extension/index.d.ts +1 -1
  34. package/dist/builtin-extensions/pi-lsp-extension/bemol-extension/index.d.ts.map +1 -1
  35. package/dist/builtin-extensions/pi-lsp-extension/bemol-extension/index.js +1 -1
  36. package/dist/builtin-extensions/pi-lsp-extension/bemol-extension/index.js.map +1 -1
  37. package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts.map +1 -1
  38. package/dist/builtin-extensions/pi-lsp-extension/src/index.js +1 -15
  39. package/dist/builtin-extensions/pi-lsp-extension/src/index.js.map +1 -1
  40. package/dist/builtin-extensions/pi-lsp-extension/src/lsp-client.d.ts +6 -0
  41. package/dist/builtin-extensions/pi-lsp-extension/src/lsp-client.d.ts.map +1 -1
  42. package/dist/builtin-extensions/pi-lsp-extension/src/lsp-client.js +187 -132
  43. package/dist/builtin-extensions/pi-lsp-extension/src/lsp-client.js.map +1 -1
  44. package/dist/builtin-extensions/pi-lsp-extension/src/lsp-manager.d.ts +8 -0
  45. package/dist/builtin-extensions/pi-lsp-extension/src/lsp-manager.d.ts.map +1 -1
  46. package/dist/builtin-extensions/pi-lsp-extension/src/lsp-manager.js +142 -112
  47. package/dist/builtin-extensions/pi-lsp-extension/src/lsp-manager.js.map +1 -1
  48. package/dist/builtin-extensions/pi-lsp-extension/src/tools/code-rewrite.d.ts +12 -1
  49. package/dist/builtin-extensions/pi-lsp-extension/src/tools/code-rewrite.d.ts.map +1 -1
  50. package/dist/builtin-extensions/pi-lsp-extension/src/tools/code-rewrite.js +14 -7
  51. package/dist/builtin-extensions/pi-lsp-extension/src/tools/code-rewrite.js.map +1 -1
  52. package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/rewrite-engine.d.ts +11 -3
  53. package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/rewrite-engine.d.ts.map +1 -1
  54. package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/rewrite-engine.js +67 -41
  55. package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/rewrite-engine.js.map +1 -1
  56. package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/search-engine.d.ts +4 -2
  57. package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/search-engine.d.ts.map +1 -1
  58. package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/search-engine.js +3 -0
  59. package/dist/builtin-extensions/pi-lsp-extension/src/tree-sitter/search-engine.js.map +1 -1
  60. package/dist/builtin-extensions/pi-mcp-adapter/commands.d.ts +2 -1
  61. package/dist/builtin-extensions/pi-mcp-adapter/commands.d.ts.map +1 -1
  62. package/dist/builtin-extensions/pi-mcp-adapter/commands.js +6 -6
  63. package/dist/builtin-extensions/pi-mcp-adapter/commands.js.map +1 -1
  64. package/dist/builtin-extensions/pi-mcp-adapter/config.d.ts +1 -1
  65. package/dist/builtin-extensions/pi-mcp-adapter/config.d.ts.map +1 -1
  66. package/dist/builtin-extensions/pi-mcp-adapter/config.js +11 -5
  67. package/dist/builtin-extensions/pi-mcp-adapter/config.js.map +1 -1
  68. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts.map +1 -1
  69. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js +2 -2
  70. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js.map +1 -1
  71. package/dist/builtin-extensions/pi-mcp-adapter/host-html-template.d.ts.map +1 -1
  72. package/dist/builtin-extensions/pi-mcp-adapter/host-html-template.js +1 -1
  73. package/dist/builtin-extensions/pi-mcp-adapter/host-html-template.js.map +1 -1
  74. package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
  75. package/dist/builtin-extensions/pi-mcp-adapter/index.js +48 -40
  76. package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
  77. package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts.map +1 -1
  78. package/dist/builtin-extensions/pi-mcp-adapter/init.js +3 -1
  79. package/dist/builtin-extensions/pi-mcp-adapter/init.js.map +1 -1
  80. package/dist/builtin-extensions/pi-mcp-adapter/mcp-auth-flow.d.ts +12 -40
  81. package/dist/builtin-extensions/pi-mcp-adapter/mcp-auth-flow.d.ts.map +1 -1
  82. package/dist/builtin-extensions/pi-mcp-adapter/mcp-auth-flow.js +166 -235
  83. package/dist/builtin-extensions/pi-mcp-adapter/mcp-auth-flow.js.map +1 -1
  84. package/dist/builtin-extensions/pi-mcp-adapter/mcp-callback-server.d.ts +5 -0
  85. package/dist/builtin-extensions/pi-mcp-adapter/mcp-callback-server.d.ts.map +1 -1
  86. package/dist/builtin-extensions/pi-mcp-adapter/mcp-callback-server.js +43 -13
  87. package/dist/builtin-extensions/pi-mcp-adapter/mcp-callback-server.js.map +1 -1
  88. package/dist/builtin-extensions/pi-mcp-adapter/mcp-oauth-provider.d.ts +14 -3
  89. package/dist/builtin-extensions/pi-mcp-adapter/mcp-oauth-provider.d.ts.map +1 -1
  90. package/dist/builtin-extensions/pi-mcp-adapter/mcp-oauth-provider.js +73 -21
  91. package/dist/builtin-extensions/pi-mcp-adapter/mcp-oauth-provider.js.map +1 -1
  92. package/dist/builtin-extensions/pi-mcp-adapter/proxy-modes.d.ts.map +1 -1
  93. package/dist/builtin-extensions/pi-mcp-adapter/proxy-modes.js +4 -4
  94. package/dist/builtin-extensions/pi-mcp-adapter/proxy-modes.js.map +1 -1
  95. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts.map +1 -1
  96. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js +2 -2
  97. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js.map +1 -1
  98. package/dist/builtin-extensions/pi-mcp-adapter/state.d.ts +2 -0
  99. package/dist/builtin-extensions/pi-mcp-adapter/state.d.ts.map +1 -1
  100. package/dist/builtin-extensions/pi-mcp-adapter/state.js.map +1 -1
  101. package/dist/builtin-extensions/pi-ollama-cloud/index.d.ts +1 -1
  102. package/dist/builtin-extensions/pi-ollama-cloud/index.d.ts.map +1 -1
  103. package/dist/builtin-extensions/pi-ollama-cloud/index.js +1 -1
  104. package/dist/builtin-extensions/pi-ollama-cloud/index.js.map +1 -1
  105. package/dist/builtin-extensions/pi-ollama-cloud/models.d.ts +11 -5
  106. package/dist/builtin-extensions/pi-ollama-cloud/models.d.ts.map +1 -1
  107. package/dist/builtin-extensions/pi-ollama-cloud/models.js +12 -32
  108. package/dist/builtin-extensions/pi-ollama-cloud/models.js.map +1 -1
  109. package/dist/builtin-extensions/pi-prompt-template-model/index.d.ts.map +1 -1
  110. package/dist/builtin-extensions/pi-prompt-template-model/index.js +5 -3
  111. package/dist/builtin-extensions/pi-prompt-template-model/index.js.map +1 -1
  112. package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.d.ts +2 -1
  113. package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.d.ts.map +1 -1
  114. package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js +21 -12
  115. package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js.map +1 -1
  116. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts.map +1 -1
  117. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js +7 -24
  118. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js.map +1 -1
  119. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
  120. package/dist/builtin-extensions/pi-subagents/src/extension/index.js +39 -77
  121. package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
  122. package/dist/builtin-extensions/pi-subagents/src/runs/background/chain-root-attachment.d.ts +4 -1
  123. package/dist/builtin-extensions/pi-subagents/src/runs/background/chain-root-attachment.d.ts.map +1 -1
  124. package/dist/builtin-extensions/pi-subagents/src/runs/background/chain-root-attachment.js +2 -0
  125. package/dist/builtin-extensions/pi-subagents/src/runs/background/chain-root-attachment.js.map +1 -1
  126. package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.d.ts +6 -1
  127. package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.d.ts.map +1 -1
  128. package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.js +17 -31
  129. package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.js.map +1 -1
  130. package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.d.ts.map +1 -1
  131. package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.js +7 -2
  132. package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.js.map +1 -1
  133. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts +5 -1
  134. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
  135. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +78 -42
  136. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
  137. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts.map +1 -1
  138. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js +8 -1
  139. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js.map +1 -1
  140. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts +0 -3
  141. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
  142. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +134 -28
  143. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
  144. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
  145. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +26 -5
  146. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
  147. package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.d.ts +1 -1
  148. package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.d.ts.map +1 -1
  149. package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.js +1 -1
  150. package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.js.map +1 -1
  151. package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts +7 -8
  152. package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +1 -1
  153. package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js +60 -32
  154. package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js.map +1 -1
  155. package/dist/builtin-extensions/pi-subagents/src/shared/session-tokens.d.ts +7 -1
  156. package/dist/builtin-extensions/pi-subagents/src/shared/session-tokens.d.ts.map +1 -1
  157. package/dist/builtin-extensions/pi-subagents/src/shared/session-tokens.js +70 -38
  158. package/dist/builtin-extensions/pi-subagents/src/shared/session-tokens.js.map +1 -1
  159. package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +9 -0
  160. package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
  161. package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
  162. package/dist/builtin-extensions/pi-subagents/src/shared/utils.d.ts +1 -1
  163. package/dist/builtin-extensions/pi-subagents/src/shared/utils.d.ts.map +1 -1
  164. package/dist/builtin-extensions/pi-subagents/src/shared/utils.js +15 -5
  165. package/dist/builtin-extensions/pi-subagents/src/shared/utils.js.map +1 -1
  166. package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts.map +1 -1
  167. package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js +4 -3
  168. package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js.map +1 -1
  169. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
  170. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +13 -62
  171. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
  172. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +1 -1
  173. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
  174. package/dist/builtin-extensions/pi-subagents/src/tui/render.js +18 -9
  175. package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
  176. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts.map +1 -1
  177. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js +3 -3
  178. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js.map +1 -1
  179. package/dist/builtin-extensions/pi-tps.d.ts.map +1 -1
  180. package/dist/builtin-extensions/pi-tps.js +28 -17
  181. package/dist/builtin-extensions/pi-tps.js.map +1 -1
  182. package/dist/builtin-extensions/pi-web-access/activity.d.ts +1 -0
  183. package/dist/builtin-extensions/pi-web-access/activity.d.ts.map +1 -1
  184. package/dist/builtin-extensions/pi-web-access/activity.js +27 -5
  185. package/dist/builtin-extensions/pi-web-access/activity.js.map +1 -1
  186. package/dist/builtin-extensions/pi-web-access/bounded-body.d.ts +3 -0
  187. package/dist/builtin-extensions/pi-web-access/bounded-body.d.ts.map +1 -0
  188. package/dist/builtin-extensions/pi-web-access/bounded-body.js +43 -0
  189. package/dist/builtin-extensions/pi-web-access/bounded-body.js.map +1 -0
  190. package/dist/builtin-extensions/pi-web-access/content-page.d.ts +24 -0
  191. package/dist/builtin-extensions/pi-web-access/content-page.d.ts.map +1 -0
  192. package/dist/builtin-extensions/pi-web-access/content-page.js +57 -0
  193. package/dist/builtin-extensions/pi-web-access/content-page.js.map +1 -0
  194. package/dist/builtin-extensions/pi-web-access/extract.d.ts.map +1 -1
  195. package/dist/builtin-extensions/pi-web-access/extract.js +7 -2
  196. package/dist/builtin-extensions/pi-web-access/extract.js.map +1 -1
  197. package/dist/builtin-extensions/pi-web-access/github-extract.d.ts +0 -1
  198. package/dist/builtin-extensions/pi-web-access/github-extract.d.ts.map +1 -1
  199. package/dist/builtin-extensions/pi-web-access/github-extract.js +147 -36
  200. package/dist/builtin-extensions/pi-web-access/github-extract.js.map +1 -1
  201. package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
  202. package/dist/builtin-extensions/pi-web-access/index.js +48 -73
  203. package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
  204. package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts +12 -4
  205. package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts.map +1 -1
  206. package/dist/builtin-extensions/pi-web-access/session-cleanup.js +35 -12
  207. package/dist/builtin-extensions/pi-web-access/session-cleanup.js.map +1 -1
  208. package/dist/builtin-extensions/pi-web-access/storage.d.ts +9 -6
  209. package/dist/builtin-extensions/pi-web-access/storage.d.ts.map +1 -1
  210. package/dist/builtin-extensions/pi-web-access/storage.js +36 -24
  211. package/dist/builtin-extensions/pi-web-access/storage.js.map +1 -1
  212. package/dist/builtin-extensions/simple-pi-memory.d.ts +1 -1
  213. package/dist/builtin-extensions/simple-pi-memory.d.ts.map +1 -1
  214. package/dist/builtin-extensions/simple-pi-memory.js +1 -1
  215. package/dist/builtin-extensions/simple-pi-memory.js.map +1 -1
  216. package/dist/catalog/models.json +1 -1
  217. package/dist/catalog/providers/google-vertex.json +1 -1
  218. package/dist/catalog/providers/google.json +1 -1
  219. package/dist/catalog/publication.json +3 -3
  220. package/dist/cli/install-cli.d.ts.map +1 -1
  221. package/dist/cli/install-cli.js +38 -30
  222. package/dist/cli/install-cli.js.map +1 -1
  223. package/dist/core/agent-session-runtime.d.ts +13 -0
  224. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  225. package/dist/core/agent-session-runtime.js +75 -11
  226. package/dist/core/agent-session-runtime.js.map +1 -1
  227. package/dist/core/agent-session-services.d.ts +1 -0
  228. package/dist/core/agent-session-services.d.ts.map +1 -1
  229. package/dist/core/agent-session-services.js +1 -0
  230. package/dist/core/agent-session-services.js.map +1 -1
  231. package/dist/core/agent-session.d.ts +46 -21
  232. package/dist/core/agent-session.d.ts.map +1 -1
  233. package/dist/core/agent-session.js +344 -126
  234. package/dist/core/agent-session.js.map +1 -1
  235. package/dist/core/browser/runtime.d.ts +2 -0
  236. package/dist/core/browser/runtime.d.ts.map +1 -1
  237. package/dist/core/browser/runtime.js +80 -45
  238. package/dist/core/browser/runtime.js.map +1 -1
  239. package/dist/core/browser/setup.d.ts.map +1 -1
  240. package/dist/core/browser/setup.js +12 -1
  241. package/dist/core/browser/setup.js.map +1 -1
  242. package/dist/core/cache-stats.d.ts +1 -1
  243. package/dist/core/cache-stats.d.ts.map +1 -1
  244. package/dist/core/cache-stats.js +1 -1
  245. package/dist/core/cache-stats.js.map +1 -1
  246. package/dist/core/compaction/branch-summarization.d.ts +2 -1
  247. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  248. package/dist/core/compaction/branch-summarization.js +1 -0
  249. package/dist/core/compaction/branch-summarization.js.map +1 -1
  250. package/dist/core/compaction/compaction.d.ts +5 -11
  251. package/dist/core/compaction/compaction.d.ts.map +1 -1
  252. package/dist/core/compaction/compaction.js +38 -92
  253. package/dist/core/compaction/compaction.js.map +1 -1
  254. package/dist/core/computer-use/adapter.d.ts.map +1 -1
  255. package/dist/core/computer-use/adapter.js +7 -2
  256. package/dist/core/computer-use/adapter.js.map +1 -1
  257. package/dist/core/computer-use/image.d.ts.map +1 -1
  258. package/dist/core/computer-use/image.js +17 -5
  259. package/dist/core/computer-use/image.js.map +1 -1
  260. package/dist/core/computer-use/schemas.d.ts.map +1 -1
  261. package/dist/core/computer-use/schemas.js +23 -6
  262. package/dist/core/computer-use/schemas.js.map +1 -1
  263. package/dist/core/computer-use/workflow.d.ts.map +1 -1
  264. package/dist/core/computer-use/workflow.js +459 -119
  265. package/dist/core/computer-use/workflow.js.map +1 -1
  266. package/dist/core/context-breakdown.d.ts +2 -2
  267. package/dist/core/context-breakdown.d.ts.map +1 -1
  268. package/dist/core/context-breakdown.js +22 -20
  269. package/dist/core/context-breakdown.js.map +1 -1
  270. package/dist/core/cron/jobs.d.ts +26 -8
  271. package/dist/core/cron/jobs.d.ts.map +1 -1
  272. package/dist/core/cron/jobs.js +357 -232
  273. package/dist/core/cron/jobs.js.map +1 -1
  274. package/dist/core/cron/origin-context.d.ts +1 -0
  275. package/dist/core/cron/origin-context.d.ts.map +1 -1
  276. package/dist/core/cron/origin-context.js.map +1 -1
  277. package/dist/core/cron/scheduler.d.ts +22 -17
  278. package/dist/core/cron/scheduler.d.ts.map +1 -1
  279. package/dist/core/cron/scheduler.js +153 -73
  280. package/dist/core/cron/scheduler.js.map +1 -1
  281. package/dist/core/extensions/index.d.ts +1 -1
  282. package/dist/core/extensions/index.d.ts.map +1 -1
  283. package/dist/core/extensions/index.js.map +1 -1
  284. package/dist/core/extensions/runner.d.ts +1 -0
  285. package/dist/core/extensions/runner.d.ts.map +1 -1
  286. package/dist/core/extensions/runner.js +8 -0
  287. package/dist/core/extensions/runner.js.map +1 -1
  288. package/dist/core/extensions/types.d.ts +11 -1
  289. package/dist/core/extensions/types.d.ts.map +1 -1
  290. package/dist/core/extensions/types.js.map +1 -1
  291. package/dist/core/footer-data-provider.d.ts +4 -0
  292. package/dist/core/footer-data-provider.d.ts.map +1 -1
  293. package/dist/core/footer-data-provider.js +22 -1
  294. package/dist/core/footer-data-provider.js.map +1 -1
  295. package/dist/core/large-subagent-launch.d.ts +1 -1
  296. package/dist/core/large-subagent-launch.d.ts.map +1 -1
  297. package/dist/core/large-subagent-launch.js +7 -7
  298. package/dist/core/large-subagent-launch.js.map +1 -1
  299. package/dist/core/model-registry.d.ts +2 -0
  300. package/dist/core/model-registry.d.ts.map +1 -1
  301. package/dist/core/model-registry.js +5 -0
  302. package/dist/core/model-registry.js.map +1 -1
  303. package/dist/core/model-runtime.d.ts +4 -1
  304. package/dist/core/model-runtime.d.ts.map +1 -1
  305. package/dist/core/model-runtime.js +40 -4
  306. package/dist/core/model-runtime.js.map +1 -1
  307. package/dist/core/package-manager.d.ts.map +1 -1
  308. package/dist/core/package-manager.js.map +1 -1
  309. package/dist/core/permissions.d.ts +3 -3
  310. package/dist/core/permissions.d.ts.map +1 -1
  311. package/dist/core/permissions.js +11 -35
  312. package/dist/core/permissions.js.map +1 -1
  313. package/dist/core/plan-mode.d.ts +5 -13
  314. package/dist/core/plan-mode.d.ts.map +1 -1
  315. package/dist/core/plan-mode.js +126 -116
  316. package/dist/core/plan-mode.js.map +1 -1
  317. package/dist/core/project-trust.d.ts.map +1 -1
  318. package/dist/core/project-trust.js +1 -1
  319. package/dist/core/project-trust.js.map +1 -1
  320. package/dist/core/prompt-resource-bridge.d.ts +12 -0
  321. package/dist/core/prompt-resource-bridge.d.ts.map +1 -0
  322. package/dist/core/prompt-resource-bridge.js +9 -0
  323. package/dist/core/prompt-resource-bridge.js.map +1 -0
  324. package/dist/core/protected-targets.d.ts +6 -0
  325. package/dist/core/protected-targets.d.ts.map +1 -0
  326. package/dist/core/protected-targets.js +45 -0
  327. package/dist/core/protected-targets.js.map +1 -0
  328. package/dist/core/resource-loader.d.ts.map +1 -1
  329. package/dist/core/resource-loader.js +7 -0
  330. package/dist/core/resource-loader.js.map +1 -1
  331. package/dist/core/rollback.d.ts +19 -3
  332. package/dist/core/rollback.d.ts.map +1 -1
  333. package/dist/core/rollback.js +172 -56
  334. package/dist/core/rollback.js.map +1 -1
  335. package/dist/core/runtime-credentials.d.ts +3 -0
  336. package/dist/core/runtime-credentials.d.ts.map +1 -1
  337. package/dist/core/runtime-credentials.js +14 -1
  338. package/dist/core/runtime-credentials.js.map +1 -1
  339. package/dist/core/sdk.d.ts +3 -0
  340. package/dist/core/sdk.d.ts.map +1 -1
  341. package/dist/core/sdk.js +1 -0
  342. package/dist/core/sdk.js.map +1 -1
  343. package/dist/core/session-manager.d.ts +11 -1
  344. package/dist/core/session-manager.d.ts.map +1 -1
  345. package/dist/core/session-manager.js +111 -33
  346. package/dist/core/session-manager.js.map +1 -1
  347. package/dist/core/session-ownership.d.ts.map +1 -1
  348. package/dist/core/session-ownership.js +8 -3
  349. package/dist/core/session-ownership.js.map +1 -1
  350. package/dist/core/session-retention.d.ts.map +1 -1
  351. package/dist/core/session-retention.js +18 -7
  352. package/dist/core/session-retention.js.map +1 -1
  353. package/dist/core/session-startup-settings.d.ts +10 -0
  354. package/dist/core/session-startup-settings.d.ts.map +1 -0
  355. package/dist/core/session-startup-settings.js +70 -0
  356. package/dist/core/session-startup-settings.js.map +1 -0
  357. package/dist/core/subscriptions.d.ts +16 -7
  358. package/dist/core/subscriptions.d.ts.map +1 -1
  359. package/dist/core/subscriptions.js +96 -55
  360. package/dist/core/subscriptions.js.map +1 -1
  361. package/dist/core/trust-manager.d.ts +2 -1
  362. package/dist/core/trust-manager.d.ts.map +1 -1
  363. package/dist/core/trust-manager.js +6 -1
  364. package/dist/core/trust-manager.js.map +1 -1
  365. package/dist/core/update-check.d.ts.map +1 -1
  366. package/dist/core/update-check.js.map +1 -1
  367. package/dist/core/usage-accounting.d.ts +47 -0
  368. package/dist/core/usage-accounting.d.ts.map +1 -0
  369. package/dist/core/usage-accounting.js +205 -0
  370. package/dist/core/usage-accounting.js.map +1 -0
  371. package/dist/core/usage-adapters/kimi-coding.d.ts +2 -2
  372. package/dist/core/usage-adapters/kimi-coding.d.ts.map +1 -1
  373. package/dist/core/usage-adapters/kimi-coding.js +2 -2
  374. package/dist/core/usage-adapters/kimi-coding.js.map +1 -1
  375. package/dist/core/usage-adapters/openai-codex.d.ts +3 -2
  376. package/dist/core/usage-adapters/openai-codex.d.ts.map +1 -1
  377. package/dist/core/usage-adapters/openai-codex.js +3 -3
  378. package/dist/core/usage-adapters/openai-codex.js.map +1 -1
  379. package/dist/core/usage-adapters/xai.d.ts +2 -2
  380. package/dist/core/usage-adapters/xai.d.ts.map +1 -1
  381. package/dist/core/usage-adapters/xai.js +3 -3
  382. package/dist/core/usage-adapters/xai.js.map +1 -1
  383. package/dist/core/usage-adapters/zai.d.ts +2 -2
  384. package/dist/core/usage-adapters/zai.d.ts.map +1 -1
  385. package/dist/core/usage-adapters/zai.js +2 -2
  386. package/dist/core/usage-adapters/zai.js.map +1 -1
  387. package/dist/core/usage-history.d.ts +1 -18
  388. package/dist/core/usage-history.d.ts.map +1 -1
  389. package/dist/core/usage-history.js +46 -114
  390. package/dist/core/usage-history.js.map +1 -1
  391. package/dist/core/usage-service.d.ts +9 -2
  392. package/dist/core/usage-service.d.ts.map +1 -1
  393. package/dist/core/usage-service.js +95 -50
  394. package/dist/core/usage-service.js.map +1 -1
  395. package/dist/gateway/agent-bridge.d.ts +9 -1
  396. package/dist/gateway/agent-bridge.d.ts.map +1 -1
  397. package/dist/gateway/agent-bridge.js +91 -37
  398. package/dist/gateway/agent-bridge.js.map +1 -1
  399. package/dist/gateway/buttons.d.ts +8 -1
  400. package/dist/gateway/buttons.d.ts.map +1 -1
  401. package/dist/gateway/buttons.js +76 -18
  402. package/dist/gateway/buttons.js.map +1 -1
  403. package/dist/gateway/commands.d.ts +1 -0
  404. package/dist/gateway/commands.d.ts.map +1 -1
  405. package/dist/gateway/commands.js +10 -4
  406. package/dist/gateway/commands.js.map +1 -1
  407. package/dist/gateway/cron.d.ts +12 -11
  408. package/dist/gateway/cron.d.ts.map +1 -1
  409. package/dist/gateway/cron.js +65 -56
  410. package/dist/gateway/cron.js.map +1 -1
  411. package/dist/gateway/index.d.ts.map +1 -1
  412. package/dist/gateway/index.js +2 -1
  413. package/dist/gateway/index.js.map +1 -1
  414. package/dist/gateway/mobile-commands.d.ts +1 -0
  415. package/dist/gateway/mobile-commands.d.ts.map +1 -1
  416. package/dist/gateway/mobile-commands.js +69 -15
  417. package/dist/gateway/mobile-commands.js.map +1 -1
  418. package/dist/gateway/presenter.d.ts +12 -2
  419. package/dist/gateway/presenter.d.ts.map +1 -1
  420. package/dist/gateway/presenter.js +73 -38
  421. package/dist/gateway/presenter.js.map +1 -1
  422. package/dist/gateway/router.d.ts +2 -2
  423. package/dist/gateway/router.d.ts.map +1 -1
  424. package/dist/gateway/router.js +17 -2
  425. package/dist/gateway/router.js.map +1 -1
  426. package/dist/gateway/service.d.ts +2 -0
  427. package/dist/gateway/service.d.ts.map +1 -1
  428. package/dist/gateway/service.js +153 -0
  429. package/dist/gateway/service.js.map +1 -1
  430. package/dist/main.d.ts.map +1 -1
  431. package/dist/main.js +86 -33
  432. package/dist/main.js.map +1 -1
  433. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  434. package/dist/modes/interactive/components/assistant-message.js +6 -4
  435. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  436. package/dist/modes/interactive/components/context-view.d.ts.map +1 -1
  437. package/dist/modes/interactive/components/context-view.js +2 -2
  438. package/dist/modes/interactive/components/context-view.js.map +1 -1
  439. package/dist/modes/interactive/components/copyable-text.d.ts.map +1 -1
  440. package/dist/modes/interactive/components/copyable-text.js +3 -2
  441. package/dist/modes/interactive/components/copyable-text.js.map +1 -1
  442. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  443. package/dist/modes/interactive/components/extension-editor.js +1 -1
  444. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  445. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  446. package/dist/modes/interactive/components/footer.js +8 -12
  447. package/dist/modes/interactive/components/footer.js.map +1 -1
  448. package/dist/modes/interactive/components/usage-view.d.ts +5 -0
  449. package/dist/modes/interactive/components/usage-view.d.ts.map +1 -1
  450. package/dist/modes/interactive/components/usage-view.js +21 -6
  451. package/dist/modes/interactive/components/usage-view.js.map +1 -1
  452. package/dist/modes/interactive/interactive-mode.d.ts +3 -7
  453. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  454. package/dist/modes/interactive/interactive-mode.js +151 -131
  455. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  456. package/dist/modes/interactive/smooth-streaming.d.ts.map +1 -1
  457. package/dist/modes/interactive/smooth-streaming.js.map +1 -1
  458. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  459. package/dist/modes/rpc/rpc-mode.js +2 -1
  460. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  461. package/dist/node-runtime/{adapter-VFG7WNPX.js → adapter-247RTYLS.js} +4 -5
  462. package/dist/node-runtime/agent-session-services-RTUGP3XR.js +54 -0
  463. package/dist/node-runtime/{brave-UWDA3I22.js → brave-2AFFAXNN.js} +1 -1
  464. package/dist/node-runtime/{builtin-extensions-I2HIFEMY.js → builtin-extensions-N4EUD6SB.js} +8 -7
  465. package/dist/node-runtime/{chunk-QH6YL7VK.js → chunk-252ZVPPF.js} +3 -3
  466. package/dist/node-runtime/{chunk-PCEW76PM.js → chunk-2OIPYKLZ.js} +6 -6
  467. package/dist/node-runtime/{chunk-XBWPBZBN.js → chunk-2SWW7KMW.js} +1 -1
  468. package/dist/node-runtime/{chunk-UQUCFAJ3.js → chunk-2VIW3IMF.js} +40 -7
  469. package/dist/node-runtime/{chunk-UOEDI7RP.js → chunk-4KNKQGHM.js} +2 -2
  470. package/dist/node-runtime/chunk-4QRUZ64T.js +1203 -0
  471. package/dist/node-runtime/{chunk-FQMM2EZ2.js → chunk-64XTQNLA.js} +29 -7
  472. package/dist/node-runtime/{chunk-SPVDBUOS.js → chunk-6O3IW3IA.js} +2 -2
  473. package/dist/node-runtime/{chunk-5ZQXRPMC.js → chunk-6ZZHGUSA.js} +2 -2
  474. package/dist/node-runtime/{chunk-WIF24I7G.js → chunk-APVM5NEU.js} +149 -144
  475. package/dist/node-runtime/{chunk-LWYIVUGV.js → chunk-B2IBAXNX.js} +48 -31
  476. package/dist/node-runtime/{chunk-M3LZLQW2.js → chunk-BDRGN3L2.js} +1 -0
  477. package/dist/node-runtime/{chunk-LJTIVM7I.js → chunk-BMRXLQWQ.js} +464 -160
  478. package/dist/node-runtime/{chunk-GJ2RDBRL.js → chunk-BYC6RKCN.js} +4 -2
  479. package/dist/node-runtime/{chunk-T4DA4XE7.js → chunk-DFMPRAQQ.js} +162 -82
  480. package/dist/node-runtime/{chunk-SN2KSMPQ.js → chunk-DQSCFU7R.js} +13 -7
  481. package/dist/node-runtime/{chunk-UVWCDQYF.js → chunk-E5DQGNJI.js} +455 -278
  482. package/dist/node-runtime/{chunk-4SBQAI4T.js → chunk-EBLAZVSA.js} +2058 -73
  483. package/dist/node-runtime/{chunk-CSFI6YXL.js → chunk-ES6PBSIE.js} +1 -1
  484. package/dist/node-runtime/{chunk-IF24A3FH.js → chunk-EVM653DD.js} +4 -4
  485. package/dist/node-runtime/{chunk-HTFRRDSF.js → chunk-F2SMQ6ES.js} +3 -2
  486. package/dist/node-runtime/chunk-F2V2F4ZG.js +114 -0
  487. package/dist/node-runtime/{chunk-IKU6Y7DL.js → chunk-FE3WZI7F.js} +9 -6
  488. package/dist/node-runtime/{chunk-6VYZ5UFP.js → chunk-FLGEEH27.js} +1 -1
  489. package/dist/node-runtime/{chunk-5EFIU3OM.js → chunk-FTKEZL27.js} +1 -1
  490. package/dist/node-runtime/{chunk-RGQAEOM5.js → chunk-FYIFPFXE.js} +23 -6
  491. package/dist/node-runtime/{chunk-HMBGROQK.js → chunk-GLDXBBL6.js} +3 -3
  492. package/dist/node-runtime/{chunk-KWA4OC2J.js → chunk-H6YBCWKG.js} +1 -1
  493. package/dist/node-runtime/{chunk-2MI5OPMN.js → chunk-HNNHHJAB.js} +68 -50
  494. package/dist/node-runtime/{chunk-I74LN5JG.js → chunk-HUD2RFJW.js} +2 -2
  495. package/dist/node-runtime/{chunk-XHIRAZ26.js → chunk-IAZSK7KK.js} +1 -1
  496. package/dist/node-runtime/{chunk-GYIXXQAO.js → chunk-ICKGAKWX.js} +23 -59
  497. package/dist/node-runtime/{chunk-X3PGBLQ7.js → chunk-IHHTWSXN.js} +9 -9
  498. package/dist/node-runtime/{chunk-DAPBPCBP.js → chunk-IPP5BIV5.js} +25 -3
  499. package/dist/node-runtime/{chunk-QFWG2RVL.js → chunk-IXG6F4NT.js} +11 -0
  500. package/dist/node-runtime/{chunk-L24TPBS4.js → chunk-JEK35V2M.js} +45 -31
  501. package/dist/node-runtime/{chunk-RDDAZOMU.js → chunk-JL4HYQXK.js} +1 -1
  502. package/dist/node-runtime/{chunk-2HMIRK7W.js → chunk-LHV3V67B.js} +5 -5
  503. package/dist/node-runtime/{chunk-UAEOTO52.js → chunk-MNQXDFPV.js} +6 -2
  504. package/dist/node-runtime/{chunk-MPKSOJBT.js → chunk-NHATCSOI.js} +4 -7
  505. package/dist/node-runtime/{chunk-RMQZU2YU.js → chunk-NNNR3QIY.js} +1 -1
  506. package/dist/node-runtime/{chunk-2KIPT4HJ.js → chunk-PWHTSQC4.js} +83 -21
  507. package/dist/node-runtime/{chunk-RWTKOC3B.js → chunk-QBTJG3UM.js} +1 -1
  508. package/dist/node-runtime/{chunk-RCR3XAQY.js → chunk-QT3F6UEV.js} +233 -169
  509. package/dist/node-runtime/{chunk-GS42T6MX.js → chunk-QW3AAHWN.js} +1 -1
  510. package/dist/node-runtime/{chunk-DVQSHCVP.js → chunk-R4WSB2MQ.js} +5 -5
  511. package/dist/node-runtime/{chunk-B4HP6ZWM.js → chunk-RHCGYWO7.js} +1 -1
  512. package/dist/node-runtime/{chunk-2CFDTH5B.js → chunk-RLGY2QIL.js} +45 -59
  513. package/dist/node-runtime/{chunk-CDVHZOOK.js → chunk-RY3FJ6WI.js} +29 -27
  514. package/dist/node-runtime/{chunk-KKUTQQV7.js → chunk-RYRGL7P4.js} +1 -1
  515. package/dist/node-runtime/{chunk-I54LGHWM.js → chunk-STMX7W5I.js} +3 -3
  516. package/dist/node-runtime/chunk-SWWHZ2RI.js +158 -0
  517. package/dist/node-runtime/{chunk-5Q4A37RB.js → chunk-TCT6PCUR.js} +32 -11
  518. package/dist/node-runtime/{chunk-P7XBVXGT.js → chunk-U3YVZ6UC.js} +18 -14
  519. package/dist/node-runtime/{chunk-D5UCKPBQ.js → chunk-UBWW2PID.js} +1 -1
  520. package/dist/node-runtime/{chunk-E75WFZ33.js → chunk-UNUZICC4.js} +3 -3
  521. package/dist/node-runtime/{chunk-RAK2QA2B.js → chunk-UYRKUKFE.js} +4 -4
  522. package/dist/node-runtime/{chunk-LWJXTA6Z.js → chunk-VSUEAI7O.js} +1377 -45
  523. package/dist/node-runtime/{chunk-NAY6UUQZ.js → chunk-WDIVLMOH.js} +1 -1
  524. package/dist/node-runtime/{chunk-E24EO34J.js → chunk-WPXUR3HE.js} +1 -1
  525. package/dist/node-runtime/{chunk-SLVOAQOY.js → chunk-WXYNALHD.js} +113 -1
  526. package/dist/node-runtime/{chunk-KJ6DWS3K.js → chunk-XEOCUEUJ.js} +121 -60
  527. package/dist/node-runtime/chunk-YD3IZAZ7.js +47 -0
  528. package/dist/node-runtime/chunk-YSB6URMT.js +41 -0
  529. package/dist/node-runtime/{chunk-YWOJIGFY.js → chunk-ZEVFBFNF.js} +95 -142
  530. package/dist/node-runtime/{chunk-5B6VKFEV.js → chunk-ZIQUS5QO.js} +1 -1
  531. package/dist/node-runtime/cli-runtime.js +4 -4
  532. package/dist/node-runtime/{command-FSBU2EVZ.js → command-YRT7I2BW.js} +5 -5
  533. package/dist/node-runtime/{commands-NAAL7KNT.js → commands-2ETOWWRA.js} +16 -16
  534. package/dist/node-runtime/{commands-EMBQQVVT.js → commands-D6A6H4TS.js} +11 -18
  535. package/dist/node-runtime/{config-QDD5PUE2.js → config-CU7M7BTK.js} +1 -1
  536. package/dist/node-runtime/{config-D4QUPAHX.js → config-DS7XLMEM.js} +2 -2
  537. package/dist/node-runtime/{direct-tool-executor-4D7UXYU4.js → direct-tool-executor-2QJXVQD2.js} +6 -11
  538. package/dist/node-runtime/{exa-LL64QZR2.js → exa-6VBZNPGE.js} +1 -1
  539. package/dist/node-runtime/{export-html-VM4J2MNR.js → export-html-DBQRRMAY.js} +4 -4
  540. package/dist/node-runtime/{extension-input-E7BJZ35H.js → extension-input-VBBMX7YV.js} +5 -5
  541. package/dist/node-runtime/{extension-selector-WU42XDTU.js → extension-selector-T5AOG5XB.js} +5 -5
  542. package/dist/node-runtime/{extract-EQJE7FZZ.js → extract-BFX2N35A.js} +3 -3
  543. package/dist/node-runtime/{gateway-DQM333YV.js → gateway-V6K2CDWN.js} +51 -42
  544. package/dist/node-runtime/{gemini-search-35OCRFLN.js → gemini-search-C66QHDT6.js} +2 -2
  545. package/dist/node-runtime/{gemini-url-context-UQY3PHHW.js → gemini-url-context-T7DEK73R.js} +3 -3
  546. package/dist/node-runtime/{github-extract-F64RZOEA.js → github-extract-HOGE3D6F.js} +107 -38
  547. package/dist/node-runtime/{goal-NJEE5CTU.js → goal-J7TYMOBK.js} +14 -8
  548. package/dist/node-runtime/index.js +51 -48
  549. package/dist/node-runtime/{init-P5AUV77I.js → init-JBQJIPYI.js} +3 -6
  550. package/dist/node-runtime/{install-cli-NN4YAU44.js → install-cli-INGHIVBY.js} +30 -25
  551. package/dist/node-runtime/interactive-mode-ASZ7APYP.js +75 -0
  552. package/dist/node-runtime/{interactive-view-NGFAMHPW.js → interactive-view-K33PM4OS.js} +8 -8
  553. package/dist/node-runtime/{lsp-manager-3ASUSO4T.js → lsp-manager-S554V5HR.js} +240 -155
  554. package/dist/node-runtime/{lunr-browser-IR7TL3J7.js → lunr-browser-H4FDOR3C.js} +7 -7
  555. package/dist/node-runtime/{lunr-computer-use-Y23CCDIJ.js → lunr-computer-use-VDP2QNRQ.js} +9 -9
  556. package/dist/node-runtime/{lunr-cron-USHC4LXH.js → lunr-cron-WD3YH4CR.js} +93 -80
  557. package/dist/node-runtime/main.js +43 -41
  558. package/dist/node-runtime/{mobile-commands-O5LCHL32.js → mobile-commands-ICUXFW5V.js} +12 -12
  559. package/dist/node-runtime/{model-runtime-OO5HFLWE.js → model-runtime-MZ2JMDV4.js} +4 -4
  560. package/dist/node-runtime/{openai-search-B3MSNCQA.js → openai-search-K72LJDYN.js} +1 -1
  561. package/dist/node-runtime/{package-manager-cli-Q7BL6KZO.js → package-manager-cli-CYM262SI.js} +20 -20
  562. package/dist/node-runtime/{parallel-AI2MNSCU.js → parallel-X724NCNU.js} +1 -1
  563. package/dist/node-runtime/{perplexity-QVJW3I35.js → perplexity-RDHQHVMK.js} +2 -2
  564. package/dist/node-runtime/{pi-intercom-QM53RLTS.js → pi-intercom-NHHEPBMI.js} +2 -2
  565. package/dist/node-runtime/{pi-mcp-adapter-3PHF4KZ4.js → pi-mcp-adapter-PP3GQJQ2.js} +98 -94
  566. package/dist/node-runtime/{pi-ollama-cloud-2F3Y2QNM.js → pi-ollama-cloud-4MNWIMFN.js} +11 -24
  567. package/dist/node-runtime/{pi-prompt-template-model-QWTCGLJU.js → pi-prompt-template-model-FTGELLS5.js} +32 -36
  568. package/dist/node-runtime/{pi-subagents-7IBSSGEW.js → pi-subagents-QPU3OXE4.js} +114 -167
  569. package/dist/node-runtime/{pi-web-access-WTGMNZ32.js → pi-web-access-Z3LP246C.js} +144 -108
  570. package/dist/node-runtime/{print-mode-XQ76CYMT.js → print-mode-2XHN5SUA.js} +3 -3
  571. package/dist/node-runtime/{process-registry-4FAKZQOL.js → process-registry-Q4QWIU33.js} +3 -3
  572. package/dist/node-runtime/{proxy-modes-5FAPSZEZ.js → proxy-modes-VEGC6QG5.js} +8 -15
  573. package/dist/node-runtime/rpc-entry.js +43 -41
  574. package/dist/node-runtime/{rpc-mode-O3XV4SID.js → rpc-mode-32DHJPEJ.js} +4 -4
  575. package/dist/node-runtime/{runtime-4VA6JKNF.js → runtime-EDUUGAQD.js} +56 -46
  576. package/dist/node-runtime/{runtime-EFPPD2UW.js → runtime-UGXM4NPQ.js} +2 -2
  577. package/dist/node-runtime/{runtime-bridges-7WVCLI76.js → runtime-bridges-DNKMNJCF.js} +7 -7
  578. package/dist/node-runtime/{service-MDQIPQ26.js → service-IHLGFLBT.js} +6 -4
  579. package/dist/node-runtime/{session-handoff-GWARVEWT.js → session-handoff-LYH53ESV.js} +4 -4
  580. package/dist/node-runtime/{session-manager-JB5J6XBN.js → session-manager-ZJ3N5Q74.js} +3 -3
  581. package/dist/node-runtime/{session-selector-GIM4DHQ2.js → session-selector-I73U3EIO.js} +7 -7
  582. package/dist/node-runtime/{settings-manager-DJDM5AHM.js → settings-manager-P2TKGYTR.js} +5 -5
  583. package/dist/node-runtime/{setup-JBKOLJ6F.js → setup-H7CCELIL.js} +15 -1
  584. package/dist/node-runtime/{setup-PFBWRNUI.js → setup-OLQ4GXWS.js} +17 -17
  585. package/dist/node-runtime/{src-IVPNZ2BX.js → src-6RV4PXKJ.js} +64 -36
  586. package/dist/node-runtime/{subagent-executor-LPZ4BHWE.js → subagent-executor-UI6SHG3X.js} +412 -288
  587. package/dist/node-runtime/{tavily-WEZFVFP7.js → tavily-KZBFYQB6.js} +1 -1
  588. package/dist/node-runtime/{theme-UOO5RVFN.js → theme-YLVZKKZD.js} +2 -2
  589. package/dist/node-runtime/{trust-manager-MMISNCYO.js → trust-manager-ZCU76D23.js} +2 -2
  590. package/dist/node-runtime/{update-cli-HNMOTNGX.js → update-cli-F3XXJANQ.js} +6 -6
  591. package/dist/node-runtime/{usage-service-LFB2SWYV.js → usage-service-CPAGBED5.js} +1 -1
  592. package/dist/node-runtime/{video-extract-OOZHR7SU.js → video-extract-UPKYIBW3.js} +3 -3
  593. package/dist/node-runtime/{workflow-OHPBEFO4.js → workflow-ICDI4N3J.js} +208 -78
  594. package/dist/node-runtime/{youtube-extract-FNPAUNHU.js → youtube-extract-77NT7FWH.js} +4 -4
  595. package/dist/utils/clipboard-image.d.ts.map +1 -1
  596. package/dist/utils/clipboard-image.js.map +1 -1
  597. package/dist/utils/exif-orientation.d.ts.map +1 -1
  598. package/dist/utils/exif-orientation.js +25 -10
  599. package/dist/utils/exif-orientation.js.map +1 -1
  600. package/dist/utils/image-resize-core.d.ts.map +1 -1
  601. package/dist/utils/image-resize-core.js +2 -0
  602. package/dist/utils/image-resize-core.js.map +1 -1
  603. package/dist/utils/paths.d.ts +4 -0
  604. package/dist/utils/paths.d.ts.map +1 -1
  605. package/dist/utils/paths.js +33 -2
  606. package/dist/utils/paths.js.map +1 -1
  607. package/dist/utils/sanitize-terminal-text.d.ts +7 -0
  608. package/dist/utils/sanitize-terminal-text.d.ts.map +1 -0
  609. package/dist/utils/sanitize-terminal-text.js +67 -0
  610. package/dist/utils/sanitize-terminal-text.js.map +1 -0
  611. package/docs/browser.md +1 -1
  612. package/docs/custom-provider.md +3 -3
  613. package/docs/extensions.md +8 -4
  614. package/docs/features.md +25 -7
  615. package/docs/keybindings.md +1 -1
  616. package/docs/models.md +5 -5
  617. package/docs/packages.md +1 -1
  618. package/docs/providers.md +2 -2
  619. package/docs/rpc.md +7 -7
  620. package/docs/security.md +10 -5
  621. package/docs/sessions.md +2 -2
  622. package/docs/skills.md +1 -1
  623. package/docs/terminal-setup.md +7 -7
  624. package/docs/themes.md +1 -1
  625. package/docs/usage.md +1 -1
  626. package/examples/extensions/auto-commit-on-exit.ts +1 -1
  627. package/examples/extensions/bash-spawn-hook.ts +1 -1
  628. package/examples/extensions/built-in-tool-renderer.ts +1 -1
  629. package/examples/extensions/claude-rules.ts +1 -1
  630. package/examples/extensions/commands.ts +1 -1
  631. package/examples/extensions/custom-compaction.ts +1 -1
  632. package/examples/extensions/custom-provider-anthropic/index.ts +3 -3
  633. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  634. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  635. package/examples/extensions/custom-provider-gitlab-duo/index.ts +1 -1
  636. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  637. package/examples/extensions/doom-overlay/index.ts +1 -1
  638. package/examples/extensions/git-merge-and-resolve.ts +2 -2
  639. package/examples/extensions/gondolin/index.ts +1 -1
  640. package/examples/extensions/gondolin/package-lock.json +2 -2
  641. package/examples/extensions/gondolin/package.json +1 -1
  642. package/examples/extensions/hidden-thinking-label.ts +1 -1
  643. package/examples/extensions/inline-bash.ts +2 -2
  644. package/examples/extensions/input-transform-streaming.ts +2 -2
  645. package/examples/extensions/input-transform.ts +2 -2
  646. package/examples/extensions/interactive-shell.ts +1 -1
  647. package/examples/extensions/kimi-deferred-tools.ts +1 -1
  648. package/examples/extensions/mac-system-theme.ts +1 -1
  649. package/examples/extensions/minimal-mode.ts +1 -1
  650. package/examples/extensions/modal-editor.ts +1 -1
  651. package/examples/extensions/model-status.ts +1 -1
  652. package/examples/extensions/notify.ts +3 -3
  653. package/examples/extensions/overlay-qa-tests.ts +1 -1
  654. package/examples/extensions/overlay-test.ts +1 -1
  655. package/examples/extensions/pirate.ts +1 -1
  656. package/examples/extensions/preset.ts +3 -3
  657. package/examples/extensions/project-trust.ts +4 -4
  658. package/examples/extensions/prompt-customizer.ts +1 -1
  659. package/examples/extensions/rainbow-editor.ts +1 -1
  660. package/examples/extensions/rpc-demo.ts +1 -1
  661. package/examples/extensions/sandbox/index.ts +7 -7
  662. package/examples/extensions/sandbox/package-lock.json +2 -2
  663. package/examples/extensions/sandbox/package.json +1 -1
  664. package/examples/extensions/shutdown-command.ts +5 -5
  665. package/examples/extensions/ssh.ts +2 -2
  666. package/examples/extensions/subagent/README.md +3 -3
  667. package/examples/extensions/subagent/index.ts +2 -2
  668. package/examples/extensions/titlebar-spinner.ts +1 -1
  669. package/examples/extensions/tool-override.ts +1 -1
  670. package/examples/extensions/tools.ts +1 -1
  671. package/examples/extensions/with-deps/package-lock.json +2 -2
  672. package/examples/extensions/with-deps/package.json +1 -1
  673. package/examples/extensions/working-indicator.ts +1 -1
  674. package/examples/extensions/working-message-test.ts +1 -1
  675. package/examples/sdk/01-minimal.ts +1 -1
  676. package/examples/sdk/03-custom-prompt.ts +1 -1
  677. package/examples/sdk/04-skills.ts +1 -1
  678. package/examples/sdk/06-extensions.ts +2 -2
  679. package/examples/sdk/08-prompt-templates.ts +1 -1
  680. package/install-lock/package-lock.json +24 -24
  681. package/install-lock/package.json +2 -2
  682. package/npm-shrinkwrap.json +60 -24
  683. package/package.json +9 -9
  684. package/dist/modes/interactive/components/exit-card.d.ts +0 -22
  685. package/dist/modes/interactive/components/exit-card.d.ts.map +0 -1
  686. package/dist/modes/interactive/components/exit-card.js +0 -69
  687. package/dist/modes/interactive/components/exit-card.js.map +0 -1
  688. package/dist/node-runtime/agent-session-services-5YXS2PLF.js +0 -51
  689. package/dist/node-runtime/chunk-2IDTZAG5.js +0 -1415
  690. package/dist/node-runtime/chunk-3MISGG4S.js +0 -769
  691. package/dist/node-runtime/chunk-4HXHDDCF.js +0 -16
  692. package/dist/node-runtime/chunk-5B5QN3ZQ.js +0 -356
  693. package/dist/node-runtime/chunk-7IQGBKBJ.js +0 -2033
  694. package/dist/node-runtime/chunk-AUXVGBO4.js +0 -19
  695. package/dist/node-runtime/chunk-PTFBPO3C.js +0 -50
  696. package/dist/node-runtime/interactive-mode-YOHZVMKX.js +0 -74
  697. package/dist/node-runtime/mcp-auth-flow-QVLFVLEO.js +0 -33
@@ -1,769 +0,0 @@
1
- import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
- import {
3
- createPairingStore
4
- } from "./chunk-RMQZU2YU.js";
5
- import {
6
- atomicJson
7
- } from "./chunk-SLVOAQOY.js";
8
- import {
9
- noOpUIContext
10
- } from "./chunk-GJ2RDBRL.js";
11
- import {
12
- NO_HANDLER_REASON,
13
- registerApprovalHandler,
14
- setPermissionMode
15
- } from "./chunk-WIF24I7G.js";
16
- import {
17
- gatewayConfigPath,
18
- loadGatewayConfig,
19
- platformConfigFor,
20
- saveGatewayConfig
21
- } from "./chunk-B4HP6ZWM.js";
22
- import {
23
- getAgentDir
24
- } from "./chunk-FQMM2EZ2.js";
25
-
26
- // packages/coding-agent/dist/gateway/authz.js
27
- function envFlagEnabled(name) {
28
- let raw = process.env[name];
29
- return raw === void 0 ? !1 : ["1", "true", "yes", "on"].includes(raw.toLowerCase());
30
- }
31
- function globalAllowedUsers() {
32
- let raw = process.env.LUNR_GATEWAY_ALLOWED_USERS;
33
- return raw ? raw.split(",").map((u) => u.trim()).filter((u) => u.length > 0) : [];
34
- }
35
- function requireAuthorized(source, cfg = loadGatewayConfig()) {
36
- if (!isAuthorized(source, cfg))
37
- throw new Error("Gateway access is not approved for this user or chat.");
38
- }
39
- function isAuthorized(source, cfg, pairing = createPairingStore()) {
40
- if ((source.platform === "telegram" || source.platform === "discord") && cfg.owners?.[source.platform].includes(source.userId) || envFlagEnabled("LUNR_GATEWAY_ALLOW_ALL_USERS"))
41
- return !0;
42
- let platformCfg = platformConfigFor(cfg, source.platform);
43
- return !!(platformCfg?.allowedChats.includes(source.chatId) || source.roleAuthorized === !0 || source.userId && pairing.isPaired(source.platform, source.userId) || source.userId && (platformCfg?.allowedUsers.includes(source.userId) || globalAllowedUsers().includes(source.userId)));
44
- }
45
- function addAllowedUser(platform, userId) {
46
- let cfg = loadGatewayConfig(), platformCfg = platformConfigFor(cfg, platform);
47
- if (!platformCfg)
48
- throw new Error(`Unknown platform "${platform}"`);
49
- platformCfg.allowedUsers.includes(userId) || (platformCfg.allowedUsers.push(userId), saveGatewayConfig(cfg));
50
- }
51
-
52
- // packages/coding-agent/dist/gateway/conversations.js
53
- import { existsSync, readFileSync } from "node:fs";
54
- import { join } from "node:path";
55
- var path = () => join(getAgentDir(), "gateway-conversations.json");
56
- function conversationBindings() {
57
- if (!existsSync(path()))
58
- return {};
59
- let raw = JSON.parse(readFileSync(path(), "utf8"));
60
- if (!raw || typeof raw != "object" || Array.isArray(raw))
61
- throw new Error("Invalid gateway conversation store. Restore it before continuing.");
62
- return raw;
63
- }
64
- function conversationBinding(key) {
65
- return conversationBindings()[key];
66
- }
67
- function bindConversation(key, source, options = {}) {
68
- let all = conversationBindings(), old = all[key];
69
- all[key] = {
70
- ...old,
71
- ...options,
72
- source,
73
- recentProjects: options.cwd ? [.../* @__PURE__ */ new Set([options.cwd, ...old?.recentProjects ?? []])].slice(0, 12) : old?.recentProjects ?? []
74
- }, atomicJson(path(), all);
75
- }
76
-
77
- // packages/coding-agent/dist/gateway/store.js
78
- import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, renameSync, writeFileSync } from "node:fs";
79
- import { dirname, join as join2 } from "node:path";
80
- var storePathOverride;
81
- function storePath() {
82
- return storePathOverride ?? join2(getAgentDir(), "gateway-sessions.json");
83
- }
84
- function readStore() {
85
- let path3 = storePath();
86
- if (!existsSync2(path3))
87
- return {};
88
- try {
89
- let parsed = JSON.parse(readFileSync2(path3, "utf-8"));
90
- if (parsed == null || typeof parsed != "object" || Array.isArray(parsed))
91
- return {};
92
- let out = {};
93
- for (let [key, value] of Object.entries(parsed)) {
94
- if (value == null || typeof value != "object")
95
- continue;
96
- let v = value;
97
- typeof v.sessionId != "string" || typeof v.sessionFile != "string" || (out[key] = {
98
- sessionId: v.sessionId,
99
- sessionFile: v.sessionFile,
100
- createdAt: typeof v.createdAt == "string" ? v.createdAt : (/* @__PURE__ */ new Date(0)).toISOString(),
101
- lastActiveAt: typeof v.lastActiveAt == "string" ? v.lastActiveAt : (/* @__PURE__ */ new Date(0)).toISOString()
102
- });
103
- }
104
- return out;
105
- } catch {
106
- return {};
107
- }
108
- }
109
- function writeStore(data) {
110
- let path3 = storePath(), dir = dirname(path3);
111
- existsSync2(dir) || mkdirSync(dir, { recursive: !0 });
112
- let tmp = `${path3}.tmp-${process.pid}`;
113
- writeFileSync(tmp, `${JSON.stringify(data, null, 2)}
114
- `, "utf-8"), renameSync(tmp, path3);
115
- }
116
- function getSession(key) {
117
- return readStore()[key];
118
- }
119
- function putSession(key, entry) {
120
- let data = readStore(), existing = data[key], stored = {
121
- sessionId: entry.sessionId,
122
- sessionFile: entry.sessionFile,
123
- createdAt: existing?.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
124
- lastActiveAt: (/* @__PURE__ */ new Date()).toISOString()
125
- };
126
- return data[key] = stored, writeStore(data), stored;
127
- }
128
- function touchSession(key) {
129
- let data = readStore(), existing = data[key];
130
- existing && (existing.lastActiveAt = (/* @__PURE__ */ new Date()).toISOString(), writeStore(data));
131
- }
132
- function removeSession(key) {
133
- let data = readStore();
134
- return key in data ? (delete data[key], writeStore(data), !0) : !1;
135
- }
136
- function listSessions() {
137
- return readStore();
138
- }
139
-
140
- // packages/coding-agent/dist/gateway/approval.js
141
- import { AsyncLocalStorage } from "node:async_hooks";
142
- import { randomBytes } from "node:crypto";
143
- var CALLBACK_PREFIX = "ap:", ID_LENGTH = 8, CODE_ALPHABET = "ABCDEFGHJKMNPQRSTUVWXYZ23456789", DEFAULT_TIMEOUT_MS = 300 * 1e3, approvalContext = new AsyncLocalStorage(), pending = /* @__PURE__ */ new Map();
144
- function generateId() {
145
- let id = "", bytes = randomBytes(ID_LENGTH);
146
- for (let i = 0; i < ID_LENGTH; i++)
147
- id += CODE_ALPHABET[bytes[i] % CODE_ALPHABET.length];
148
- return id;
149
- }
150
- function makeCallbackData(id, action) {
151
- return `${CALLBACK_PREFIX}${id}:${action}`;
152
- }
153
- function parseCallbackData(data) {
154
- if (!data.startsWith(CALLBACK_PREFIX))
155
- return null;
156
- let rest = data.slice(CALLBACK_PREFIX.length), colon = rest.indexOf(":");
157
- if (colon === -1)
158
- return null;
159
- let id = rest.slice(0, colon), action = rest.slice(colon + 1);
160
- return action === "once" || action === "session" || action === "reject" || action === "cancel" ? { id, action } : null;
161
- }
162
- function runWithApprovalContext(ctx, fn) {
163
- return approvalContext.run(ctx, fn);
164
- }
165
- async function createApprovalPrompt(adapter, source, req, timeoutMs = DEFAULT_TIMEOUT_MS, key) {
166
- let id = generateId(), title = req.kind === "large-subagent-launch" ? `Approve large subagent launch?
167
- ${req.detail}` : `Approve ${req.toolName}?
168
- ${req.detail}`, rows = [
169
- [
170
- { label: "\u2713 Approve once", data: makeCallbackData(id, "once") },
171
- { label: "\u2713 Approve session", data: makeCallbackData(id, "session") }
172
- ],
173
- [{ label: "\u2717 Reject", data: makeCallbackData(id, "reject") }]
174
- ];
175
- return new Promise((resolve, reject) => {
176
- let messageId, timeout = setTimeout(() => {
177
- pending.delete(id), reject(new Error("Approval request timed out")), messageId && adapter.editMessage(source.chatId, messageId, "\u23F1 Approval expired.", []).catch(() => {
178
- });
179
- }, timeoutMs), entry = {
180
- key,
181
- source,
182
- plan: req.kind === "plan",
183
- resolve,
184
- reject,
185
- timeout,
186
- adapter,
187
- chatId: source.chatId,
188
- threadId: source.threadId,
189
- userId: source.userId
190
- };
191
- pending.set(id, entry), (async () => {
192
- try {
193
- let result = await adapter.sendButtons(source.chatId, title, rows, { threadId: source.threadId });
194
- if (!result.success || !result.messageId)
195
- throw new Error(result.error ?? "Failed to send approval prompt");
196
- if (messageId = result.messageId, pending.get(id) !== entry) {
197
- await adapter.editMessage(source.chatId, messageId, "Approval cancelled or expired.", []).catch(() => {
198
- });
199
- return;
200
- }
201
- entry.messageId = messageId;
202
- } catch (err) {
203
- clearTimeout(timeout), pending.delete(id), reject(err);
204
- }
205
- })();
206
- });
207
- }
208
- async function createGatewayApprovalRequest(req) {
209
- let ctx = approvalContext.getStore();
210
- if (!ctx)
211
- throw new Error(NO_HANDLER_REASON);
212
- return createApprovalPrompt(ctx.adapter, ctx.source, req, ctx.timeoutMs, ctx.key);
213
- }
214
- function registerGatewayApprovalHandler() {
215
- registerApprovalHandler(createGatewayApprovalRequest);
216
- }
217
- async function handleApprovalCallback(event, adapter) {
218
- let parsed = parseCallbackData(event.data);
219
- if (!parsed)
220
- return !1;
221
- let entry = pending.get(parsed.id);
222
- if (!entry)
223
- return await adapter?.answerCallback(event.id, "Approval expired.").catch(() => {
224
- }), !0;
225
- if (event.userId !== entry.userId || event.chatId !== entry.chatId || event.threadId !== entry.threadId || adapter && adapter.platform !== entry.adapter.platform)
226
- return await entry.adapter.answerCallback(event.id, "\u26D4 Not your approval.").catch(() => {
227
- }), !0;
228
- clearTimeout(entry.timeout), pending.delete(parsed.id);
229
- let response = parsed.action === "reject" || parsed.action === "cancel" ? "reject" : parsed.action, binding = entry.key ? conversationBinding(entry.key) : void 0;
230
- if (binding?.owner && binding.owner !== event.userId)
231
- return entry.resolve("reject"), await entry.adapter.answerCallback(event.id, "This session belongs to a different user.").catch(() => {
232
- }), !0;
233
- if (binding && !isAuthorized(entry.source, loadGatewayConfig(), createPairingStore()))
234
- return entry.resolve("reject"), !0;
235
- if (entry.plan && response !== "reject" && entry.key) {
236
- let sessionId = getSession(entry.key)?.sessionId;
237
- sessionId && setPermissionMode("yolo", sessionId);
238
- }
239
- entry.resolve(response);
240
- let label = parsed.action === "reject" || parsed.action === "cancel" ? "Rejected." : `Approved (${parsed.action}).`;
241
- return await entry.adapter.editMessage(entry.chatId, entry.messageId ?? "", label, []).catch(() => {
242
- }), await entry.adapter.answerCallback(event.id).catch(() => {
243
- }), !0;
244
- }
245
- function cancelGatewayApprovals(key) {
246
- for (let [id, entry] of pending)
247
- entry.key === key && (clearTimeout(entry.timeout), pending.delete(id), entry.resolve("reject"), entry.messageId && entry.adapter.editMessage(entry.chatId, entry.messageId, "Approval cancelled.", []).catch(() => {
248
- }));
249
- }
250
-
251
- // packages/coding-agent/dist/gateway/buttons.js
252
- import { randomBytes as randomBytes2 } from "node:crypto";
253
- var PICKER_TTL_MS = 900 * 1e3, SWEEP_INTERVAL_MS = 60 * 1e3, DEFAULT_PER_PAGE = 8, BUTTONS_PER_ROW = 2, CODE_ALPHABET2 = "ABCDEFGHJKMNPQRSTUVWXYZ23456789", CODE_LENGTH = 8, CALLBACK_PREFIX2 = "cp:", registry = /* @__PURE__ */ new Map(), sweeper;
254
- function generatePickerId() {
255
- let id = "", bytes = randomBytes2(CODE_LENGTH);
256
- for (let i = 0; i < CODE_LENGTH; i++)
257
- id += CODE_ALPHABET2[bytes[i] % CODE_ALPHABET2.length];
258
- return id;
259
- }
260
- function makeCallbackData2(id, action, payload) {
261
- return action === "noop" ? `${CALLBACK_PREFIX2}${id}:` : action === "cancel" ? `${CALLBACK_PREFIX2}${id}:x` : action === "page" ? `${CALLBACK_PREFIX2}${id}:p${payload ?? "0"}` : `${CALLBACK_PREFIX2}${id}:${payload ?? ""}`;
262
- }
263
- function parseCallbackData2(data) {
264
- if (!data.startsWith(CALLBACK_PREFIX2))
265
- return null;
266
- let rest = data.slice(CALLBACK_PREFIX2.length), colon = rest.indexOf(":");
267
- if (colon === -1)
268
- return null;
269
- let id = rest.slice(0, colon), tail = rest.slice(colon + 1);
270
- return tail === "" ? { id, action: "noop" } : tail === "x" ? { id, action: "cancel" } : tail.startsWith("p") ? { id, action: "page", payload: tail.slice(1) } : { id, action: "select", payload: tail };
271
- }
272
- function isSameChat(a, b) {
273
- return a.platform === b.platform && a.chatId === b.chatId && a.threadId === b.threadId;
274
- }
275
- function sourceForAuth(picker, cb) {
276
- return {
277
- platform: picker.source.platform,
278
- chatId: cb.chatId,
279
- chatType: picker.source.chatType,
280
- userId: cb.userId,
281
- userName: cb.userName,
282
- threadId: cb.threadId,
283
- // Do NOT inherit the original invoker's role authorization.
284
- roleAuthorized: void 0
285
- };
286
- }
287
- function renderPage(picker) {
288
- let { id, title, breadcrumbs, items, page, perPage } = picker, totalPages = Math.max(1, Math.ceil(items.length / perPage)), clampedPage = Math.max(0, Math.min(page, totalPages - 1)), start = clampedPage * perPage, pageItems = items.slice(start, start + perPage), rows = [];
289
- for (let i = 0; i < pageItems.length; i += BUTTONS_PER_ROW) {
290
- let row = [];
291
- for (let j = 0; j < BUTTONS_PER_ROW && i + j < pageItems.length; j++) {
292
- let index = start + i + j;
293
- row.push({ label: pageItems[i + j].label, data: makeCallbackData2(id, "select", String(index)) });
294
- }
295
- rows.push(row);
296
- }
297
- if (totalPages > 1) {
298
- let nav = [];
299
- clampedPage > 0 && nav.push({ label: "\u25C0 Prev", data: makeCallbackData2(id, "page", String(clampedPage - 1)) }), nav.push({ label: `${clampedPage + 1}/${totalPages}`, data: makeCallbackData2(id, "noop") }), clampedPage < totalPages - 1 && nav.push({ label: "Next \u25B6", data: makeCallbackData2(id, "page", String(clampedPage + 1)) }), rows.push(nav);
300
- }
301
- rows.push([{ label: "\u2717 Cancel", data: makeCallbackData2(id, "cancel") }]);
302
- let header = breadcrumbs ? `${title} \xB7 ${breadcrumbs}` : title;
303
- return { text: items.length === 0 ? `${header}
304
-
305
- No options available.` : `${header} (${clampedPage + 1}/${totalPages}):`, buttons: rows };
306
- }
307
- async function createPicker(adapter, source, spec, opts) {
308
- let id = generatePickerId(), pending2 = {
309
- ...spec,
310
- id,
311
- chatId: source.chatId,
312
- source,
313
- adapter,
314
- messageId: "",
315
- page: 0,
316
- perPage: spec.perPage ?? DEFAULT_PER_PAGE,
317
- createdAt: Date.now()
318
- }, { text, buttons } = renderPage(pending2), result = await adapter.sendButtons(source.chatId, text, buttons, opts);
319
- return result.success && result.messageId && (pending2.messageId = result.messageId, registry.set(id, pending2)), result;
320
- }
321
- async function answerExpired(adapter, cb) {
322
- await adapter.answerCallback(cb.id, "Picker expired \u2014 run the command again.").catch(() => {
323
- });
324
- }
325
- async function answerUnauthorized(adapter, cb) {
326
- await adapter.answerCallback(cb.id, "\u26D4 Not authorized.").catch(() => {
327
- });
328
- }
329
- async function answerNotYourPicker(adapter, cb) {
330
- await adapter.answerCallback(cb.id, "\u26D4 Not your picker.").catch(() => {
331
- });
332
- }
333
- async function handleCallback(cb, deps) {
334
- let { adapter, cfg, pairing } = deps, parsed = parseCallbackData2(cb.data);
335
- if (!parsed)
336
- return;
337
- let picker = registry.get(parsed.id);
338
- if (!picker) {
339
- await answerExpired(adapter, cb);
340
- return;
341
- }
342
- if (!picker.completed && picker.validate && !picker.validate()) {
343
- registry.delete(parsed.id), picker.onCancel?.(), await answerExpired(adapter, cb);
344
- return;
345
- }
346
- if (Date.now() > picker.createdAt + PICKER_TTL_MS) {
347
- picker.completed || picker.onCancel?.(), registry.delete(parsed.id);
348
- try {
349
- await picker.adapter.editMessage(picker.chatId, picker.messageId, "\u23F1 Expired \u2014 run the command again.", []);
350
- } catch {
351
- }
352
- await answerExpired(adapter, cb);
353
- return;
354
- }
355
- if (!isSameChat(picker.source, sourceForAuth(picker, cb))) {
356
- await answerExpired(adapter, cb);
357
- return;
358
- }
359
- if (cb.userId !== picker.invokerId) {
360
- await answerNotYourPicker(adapter, cb);
361
- return;
362
- }
363
- if (!isAuthorized(sourceForAuth(picker, cb), cfg, pairing)) {
364
- await answerUnauthorized(adapter, cb);
365
- return;
366
- }
367
- if (picker.completed !== void 0) {
368
- await adapter.answerCallback(cb.id, "Already completed.").catch(() => {
369
- });
370
- return;
371
- }
372
- if (parsed.action === "cancel") {
373
- registry.delete(parsed.id), picker.onCancel?.();
374
- try {
375
- await picker.adapter.editMessage(picker.chatId, picker.messageId, "Cancelled.", []);
376
- } catch {
377
- }
378
- await adapter.answerCallback(cb.id).catch(() => {
379
- });
380
- return;
381
- }
382
- if (parsed.action === "noop") {
383
- await adapter.answerCallback(cb.id).catch(() => {
384
- });
385
- return;
386
- }
387
- if (parsed.action === "page") {
388
- let page = Number.parseInt(parsed.payload ?? "0", 10), totalPages = Math.max(1, Math.ceil(picker.items.length / picker.perPage));
389
- picker.page = Math.max(0, Math.min(page, totalPages - 1));
390
- let { text, buttons } = renderPage(picker);
391
- try {
392
- await picker.adapter.editMessage(picker.chatId, picker.messageId, text, buttons);
393
- } catch {
394
- }
395
- await adapter.answerCallback(cb.id).catch(() => {
396
- });
397
- return;
398
- }
399
- let index = Number.parseInt(parsed.payload ?? "", 10), item = picker.items[index];
400
- if (!item) {
401
- await adapter.answerCallback(cb.id, "Invalid selection.").catch(() => {
402
- });
403
- return;
404
- }
405
- if (picker.resolving) {
406
- await adapter.answerCallback(cb.id, "Selection is still running.").catch(() => {
407
- });
408
- return;
409
- }
410
- picker.resolving = !0, await adapter.answerCallback(cb.id).catch(() => {
411
- });
412
- try {
413
- let result = await picker.resolve(item);
414
- if (!result.done) {
415
- picker.items = result.items, picker.title = result.title, picker.breadcrumbs = result.breadcrumbs, picker.page = 0;
416
- let { text, buttons } = renderPage(picker);
417
- try {
418
- await picker.adapter.editMessage(picker.chatId, picker.messageId, text, buttons);
419
- } catch {
420
- }
421
- return;
422
- }
423
- picker.completed = result.text, await confirmPicker(picker, result.text);
424
- } catch (err) {
425
- let message = err instanceof Error ? err.message : String(err);
426
- picker.completed = `\u26A0 ${message}`, await confirmPicker(picker, picker.completed);
427
- } finally {
428
- picker.resolving = !1;
429
- }
430
- }
431
- async function confirmPicker(picker, text) {
432
- if ((await picker.adapter.editMessage(picker.chatId, picker.messageId, text, []).catch(() => ({ success: !1 }))).success)
433
- return;
434
- (await picker.adapter.send(picker.chatId, text, { threadId: picker.source.threadId }).catch(() => ({ success: !1 }))).success || console.error(`[gateway] picker confirmation failed on ${picker.adapter.platform}`);
435
- }
436
- function startButtonSweeper() {
437
- sweeper || (sweeper = setInterval(() => {
438
- let cutoff = Date.now() - PICKER_TTL_MS;
439
- for (let [id, entry] of registry)
440
- entry.createdAt > cutoff || (registry.delete(id), !entry.completed && (entry.onCancel?.(), entry.adapter.editMessage(entry.chatId, entry.messageId, "\u23F1 Expired \u2014 run the command again.", []).catch(() => {
441
- })));
442
- }, SWEEP_INTERVAL_MS), sweeper.unref?.());
443
- }
444
- function stopButtonSweeper() {
445
- sweeper && (clearInterval(sweeper), sweeper = void 0);
446
- }
447
-
448
- // packages/coding-agent/dist/gateway/presenter.js
449
- import { randomUUID } from "node:crypto";
450
- import { existsSync as existsSync3, readFileSync as readFileSync3 } from "node:fs";
451
- import { join as join3 } from "node:path";
452
-
453
- // packages/coding-agent/dist/gateway/text.js
454
- function utf16Len(s) {
455
- return s.length;
456
- }
457
- var graphemeSegmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
458
- function surrogateSafeCut(s, cut) {
459
- if (cut > 0) {
460
- let code = s.charCodeAt(cut - 1);
461
- if (code >= 55296 && code <= 56319)
462
- return cut - 1;
463
- }
464
- return cut;
465
- }
466
- function graphemeSafeCut(s, maxIndex) {
467
- if (maxIndex <= 0)
468
- return 0;
469
- let end = 0;
470
- for (let segment of graphemeSegmenter.segment(s)) {
471
- let nextEnd = segment.index + segment.segment.length;
472
- if (nextEnd > maxIndex)
473
- break;
474
- end = nextEnd;
475
- }
476
- return surrogateSafeCut(s, end);
477
- }
478
- function findSplitPoint(window, limit) {
479
- let blank = window.lastIndexOf(`
480
-
481
- `);
482
- if (blank > 0)
483
- return blank + 1;
484
- let newline = window.lastIndexOf(`
485
- `);
486
- if (newline > 0)
487
- return newline + 1;
488
- let space = window.lastIndexOf(" ");
489
- return space > 0 ? space + 1 : graphemeSafeCut(window, limit);
490
- }
491
- var FENCE_RE = /^\s*```/;
492
- function openFenceAtEnd(chunk) {
493
- let opener;
494
- for (let line of chunk.split(`
495
- `))
496
- FENCE_RE.test(line) && (opener = opener === void 0 ? line.trim() : void 0);
497
- return opener;
498
- }
499
- var FENCE_CLOSE = "\n```";
500
- function splitRaw(text, limit) {
501
- let chunks = [], rest = text;
502
- for (; utf16Len(rest) > limit; ) {
503
- let cut = findSplitPoint(rest.slice(0, limit), limit), chunk = rest.slice(0, cut).replace(/\s+$/, ""), opener = openFenceAtEnd(chunk);
504
- for (; opener !== void 0 && chunk.length + FENCE_CLOSE.length > limit; )
505
- cut = findSplitPoint(rest.slice(0, limit - FENCE_CLOSE.length), limit - FENCE_CLOSE.length), chunk = rest.slice(0, cut).replace(/\s+$/, ""), opener = openFenceAtEnd(chunk);
506
- opener !== void 0 && chunk === opener && (cut = graphemeSafeCut(rest, Math.max(1, limit - FENCE_CLOSE.length)), chunk = rest.slice(0, cut), opener = openFenceAtEnd(chunk), opener !== void 0 && chunk === opener && (cut = graphemeSafeCut(rest, limit), chunk = rest.slice(0, cut), opener = void 0)), rest = rest.slice(cut).replace(/^\n+/, ""), opener !== void 0 && (chunk += FENCE_CLOSE, rest = `${opener}
507
- ${rest}`), chunk.length > 0 && chunks.push(chunk);
508
- }
509
- return rest.length > 0 && chunks.push(rest), chunks;
510
- }
511
- function indicatorReserve(m) {
512
- return 4 + 2 * String(m).length;
513
- }
514
- function splitMessage(text, max) {
515
- if (max < 1)
516
- throw new RangeError("max must be >= 1");
517
- if (utf16Len(text) <= max)
518
- return [text];
519
- let chunks = splitRaw(text, max);
520
- if (chunks.length > 1 && max - indicatorReserve(chunks.length) >= 1) {
521
- let reserve = indicatorReserve(chunks.length), adjusted = splitRaw(text, max - reserve);
522
- chunks = indicatorReserve(adjusted.length) === reserve ? adjusted : splitRaw(text, max - indicatorReserve(adjusted.length));
523
- }
524
- return chunks.length <= 1 ? chunks : chunks.map((chunk, i) => `${chunk} (${i + 1}/${chunks.length})`);
525
- }
526
-
527
- // packages/coding-agent/dist/gateway/presenter.js
528
- var epochs = /* @__PURE__ */ new Map(), inputs = /* @__PURE__ */ new Map(), dialogs = /* @__PURE__ */ new Map(), adapters = /* @__PURE__ */ new Map(), deliveryConfigs = /* @__PURE__ */ new Map(), roleGrants = /* @__PURE__ */ new Map(), timer, activeDeliveries = /* @__PURE__ */ new Map(), MAX_ATTEMPTS = 5, path2 = () => join3(getAgentDir(), "gateway-outbox.json"), outbox = [];
529
- function sourceWithCurrentRole(key, source) {
530
- let grant = roleGrants.get(key);
531
- return {
532
- ...source,
533
- roleAuthorized: grant?.userId === source.userId && grant.chatId === source.chatId && grant.threadId === source.threadId
534
- };
535
- }
536
- function rememberGatewayRole(key, source) {
537
- source.roleAuthorized === !0 ? roleGrants.set(key, { userId: source.userId, chatId: source.chatId, threadId: source.threadId }) : roleGrants.delete(key);
538
- }
539
- function canDeliver(key) {
540
- let binding = conversationBinding(key);
541
- if (!binding)
542
- return !1;
543
- let cfg = loadGatewayConfig();
544
- return binding.owner && binding.owner !== binding.source.userId ? !1 : isAuthorized(sourceWithCurrentRole(key, binding.source), cfg, createPairingStore());
545
- }
546
- function gatewayDestination(key) {
547
- let binding = conversationBinding(key), adapter = binding && adapters.get(binding.source.platform);
548
- if (!binding || !adapter || !canDeliver(key))
549
- throw new Error("This chat is no longer authorized or its platform is disconnected.");
550
- return { adapter, source: binding.source };
551
- }
552
- function withGatewayPresentation(key, run) {
553
- let { adapter, source } = gatewayDestination(key);
554
- return runWithApprovalContext({ adapter, source, key }, run);
555
- }
556
- function startGatewayPresenter(connected) {
557
- if (adapters = connected, existsSync3(path2()))
558
- try {
559
- let raw = JSON.parse(readFileSync3(path2(), "utf8"));
560
- if (!Array.isArray(raw) || !raw.every((item) => item && typeof item.id == "string" && typeof item.key == "string" && typeof item.text == "string"))
561
- throw new Error("Invalid outbox");
562
- outbox = raw;
563
- } catch {
564
- throw new Error("Gateway outbox is invalid. Restore it before starting.");
565
- }
566
- else
567
- outbox = [];
568
- for (let item of outbox)
569
- item.kind === "notice" && epochs.set(item.key, Math.max(epochs.get(item.key) ?? 0, item.epoch ?? 0));
570
- timer && clearInterval(timer), timer = setInterval(() => {
571
- flushOutbox().catch((error) => console.error("[gateway] outbox flush failed:", error));
572
- }, 3e3), timer.unref(), flushOutbox().catch((error) => console.error("[gateway] outbox flush failed:", error));
573
- }
574
- function stopGatewayPresenter() {
575
- timer && clearInterval(timer), timer = void 0;
576
- for (let key of dialogs.keys())
577
- invalidateGatewayDialogs(key);
578
- adapters = /* @__PURE__ */ new Map(), deliveryConfigs.clear(), roleGrants.clear();
579
- }
580
- function gatewayEpoch(key) {
581
- return epochs.get(key) ?? 0;
582
- }
583
- async function sendGatewayNotice(key, text, kind = "notice", epoch = gatewayEpoch(key)) {
584
- let clean = text.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, "").trim();
585
- if (!clean || !canDeliver(key))
586
- return;
587
- let { adapter, source } = gatewayDestination(key);
588
- await queueGatewayText(key, source, adapter, clean, { kind, epoch });
589
- }
590
- async function queueGatewayText(key, source, adapter, text, options) {
591
- if (!text || options.kind === "notice" && options.epoch !== void 0 && options.epoch !== gatewayEpoch(key))
592
- return;
593
- adapters.set(source.platform, adapter), options.cfg && deliveryConfigs.set(key, options.cfg);
594
- let chunks = options.chunks ?? splitMessage(text, adapter.maxMessageLength), batchId = randomUUID();
595
- for (let [index, chunk] of chunks.entries())
596
- outbox.push({
597
- id: randomUUID(),
598
- batchId,
599
- key,
600
- source: { ...source, roleAuthorized: void 0 },
601
- epoch: options.epoch ?? gatewayEpoch(key),
602
- text: chunk,
603
- kind: options.kind,
604
- replyTo: index === 0 ? options.replyTo : void 0
605
- });
606
- atomicJson(path2(), outbox), activeDeliveries.has(key) && await activeDeliveries.get(key), await flushKey(key);
607
- }
608
- function flushOutbox() {
609
- return Promise.all([...new Set(outbox.map((item) => item.key))].map(flushKey)).then(() => {
610
- });
611
- }
612
- function flushKey(key) {
613
- let current = activeDeliveries.get(key);
614
- if (current)
615
- return current;
616
- let running = drainKey(key).finally(() => {
617
- activeDeliveries.delete(key);
618
- });
619
- return activeDeliveries.set(key, running), running;
620
- }
621
- async function drainKey(key) {
622
- let failedBatches = new Set(outbox.filter((item) => item.failed && item.batchId).map((item) => item.batchId));
623
- for (let item of [...outbox].filter((item2) => item2.key === key)) {
624
- if (item.failed || item.batchId && failedBatches.has(item.batchId))
625
- continue;
626
- if (item.kind === "notice" && item.epoch !== (epochs.get(item.key) ?? 0)) {
627
- outbox = outbox.filter((v) => v.id !== item.id), atomicJson(path2(), outbox);
628
- continue;
629
- }
630
- let binding = conversationBinding(item.key), source = item.source ?? binding?.source;
631
- if (!source)
632
- break;
633
- let cfg = existsSync3(gatewayConfigPath()) ? loadGatewayConfig() : deliveryConfigs.get(item.key) ?? loadGatewayConfig();
634
- if (binding && (binding.source.platform !== source.platform || binding.source.chatId !== source.chatId || binding.source.userId !== source.userId || binding.source.threadId !== source.threadId) || !isAuthorized(sourceWithCurrentRole(key, source), cfg, createPairingStore()) || binding?.owner && binding.owner !== source.userId) {
635
- outbox = outbox.filter((v) => v.id !== item.id), atomicJson(path2(), outbox);
636
- continue;
637
- }
638
- let adapter = adapters.get(source.platform);
639
- if (!adapter || (item.nextAttempt ?? 0) > Date.now())
640
- break;
641
- let opts = { threadId: source.threadId, replyTo: item.replyTo }, result = await adapter.send(source.chatId, item.text, opts).catch((error) => ({ success: !1, error: String(error), retryable: !0 }));
642
- if (result.success)
643
- outbox = outbox.filter((v) => v.id !== item.id), atomicJson(path2(), outbox);
644
- else {
645
- if (item.attempts = (item.attempts ?? 0) + 1, item.failed = result.retryable === !1 || item.attempts >= MAX_ATTEMPTS, item.nextAttempt = Date.now() + Math.min(6e4, 3e3 * 2 ** (item.attempts - 1)), item.failed && item.batchId) {
646
- failedBatches.add(item.batchId);
647
- for (let pending2 of outbox)
648
- pending2.batchId === item.batchId && (pending2.failed = !0);
649
- }
650
- atomicJson(path2(), outbox), console.error(`[gateway] delivery ${item.failed ? "failed permanently" : "retry scheduled"} for ${source.platform}: ${result.error ?? "unknown error"}`);
651
- break;
652
- }
653
- }
654
- }
655
- function invalidateGatewayDialogs(key) {
656
- epochs.set(key, (epochs.get(key) ?? 0) + 1);
657
- let remaining = outbox.filter((item) => item.key !== key || item.kind !== "notice");
658
- remaining.length !== outbox.length && (outbox = remaining, atomicJson(path2(), outbox));
659
- for (let cancel of dialogs.get(key) ?? [])
660
- cancel();
661
- dialogs.delete(key), inputs.delete(key);
662
- }
663
- function acceptGatewayInput(key, event) {
664
- let input = inputs.get(key);
665
- return !input || input.userId !== event.source.userId || !canDeliver(key) || event.text.startsWith("/") && event.text !== "/cancel" ? !1 : (input.resolve(event.text === "/cancel" ? void 0 : event.text), !0);
666
- }
667
- function dialog(key, opts, show) {
668
- let epoch = epochs.get(key) ?? 0;
669
- return new Promise((resolve, reject) => {
670
- let settled = !1, finish = (value, error) => {
671
- settled || (settled = !0, clearTimeout(timeout), opts?.signal?.removeEventListener("abort", cancel), inputs.delete(key), dialogs.get(key)?.delete(cancel), error !== void 0 ? reject(error) : resolve(value));
672
- }, done = (value) => finish(value), cancel = () => done(void 0), timeout = setTimeout(cancel, opts?.timeout ?? 3e5), set = dialogs.get(key) ?? /* @__PURE__ */ new Set();
673
- if (set.add(cancel), dialogs.set(key, set), opts?.signal?.addEventListener("abort", cancel, { once: !0 }), opts?.signal?.aborted) {
674
- cancel();
675
- return;
676
- }
677
- show(done, () => !settled && (epochs.get(key) ?? 0) === epoch && canDeliver(key)).catch((error) => {
678
- finish(void 0, error);
679
- });
680
- });
681
- }
682
- function gatewaySelect(key, title, options, opts) {
683
- return dialog(key, opts, async (done, valid) => {
684
- let { adapter, source } = gatewayDestination(key), result = await createPicker(adapter, source, {
685
- kind: "dialog",
686
- sessionKey: key,
687
- invokerId: source.userId,
688
- title,
689
- items: options.map((value) => ({ label: value, value })),
690
- validate: valid,
691
- onCancel: () => done(void 0),
692
- resolve: async (item) => (done(item.value), { done: !0, text: `${title}
693
- ${item.value}` })
694
- }, { threadId: source.threadId });
695
- if (!result.success)
696
- throw new Error(result.error ?? "Could not send picker.");
697
- });
698
- }
699
- function gatewayInput(key, title, placeholder, opts) {
700
- if (inputs.has(key))
701
- return Promise.reject(new Error("Answer or cancel the existing question first."));
702
- let epoch = gatewayEpoch(key);
703
- return dialog(key, opts, async (done) => {
704
- let { source } = gatewayDestination(key);
705
- inputs.set(key, { userId: source.userId, resolve: done }), await sendGatewayNotice(key, `${title}${placeholder ? `
706
- ${placeholder}` : ""}
707
- Reply with text, or /cancel.`, "notice", epoch);
708
- });
709
- }
710
- function createGatewayUI(key) {
711
- let epoch = gatewayEpoch(key);
712
- return {
713
- ...noOpUIContext,
714
- select: (title, options, opts) => gatewayEpoch(key) === epoch ? gatewaySelect(key, title, options, opts) : Promise.resolve(void 0),
715
- confirm: async (title, message, opts) => gatewayEpoch(key) === epoch && await gatewaySelect(key, `${title}
716
- ${message}`, ["Approve", "Decline"], opts) === "Approve",
717
- input: (title, placeholder, opts) => gatewayEpoch(key) === epoch ? gatewayInput(key, title, placeholder, opts) : Promise.resolve(void 0),
718
- editor: (title, prefill) => gatewayEpoch(key) === epoch ? gatewayInput(key, title, prefill) : Promise.resolve(void 0),
719
- notify: (message) => {
720
- sendGatewayNotice(key, message, "notice", epoch).catch(() => {
721
- });
722
- },
723
- custom: async () => {
724
- throw new Error("This command requires the terminal interface. Use the gateway's text commands or button pickers.");
725
- },
726
- pasteToEditor: (text) => {
727
- sendGatewayNotice(key, text, "notice", epoch).catch(() => {
728
- });
729
- },
730
- setEditorText: (text) => {
731
- sendGatewayNotice(key, text, "notice", epoch).catch(() => {
732
- });
733
- }
734
- };
735
- }
736
-
737
- export {
738
- requireAuthorized,
739
- isAuthorized,
740
- addAllowedUser,
741
- conversationBinding,
742
- bindConversation,
743
- getSession,
744
- putSession,
745
- touchSession,
746
- removeSession,
747
- listSessions,
748
- runWithApprovalContext,
749
- registerGatewayApprovalHandler,
750
- handleApprovalCallback,
751
- cancelGatewayApprovals,
752
- createPicker,
753
- handleCallback,
754
- startButtonSweeper,
755
- stopButtonSweeper,
756
- splitMessage,
757
- rememberGatewayRole,
758
- withGatewayPresentation,
759
- startGatewayPresenter,
760
- stopGatewayPresenter,
761
- gatewayEpoch,
762
- sendGatewayNotice,
763
- queueGatewayText,
764
- invalidateGatewayDialogs,
765
- acceptGatewayInput,
766
- gatewaySelect,
767
- gatewayInput,
768
- createGatewayUI
769
- };