@ashx-j/lunr 0.2.21 → 0.2.22

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 (438) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +20 -4
  3. package/dist/builtin-extensions/index.d.ts.map +1 -1
  4. package/dist/builtin-extensions/index.js +1 -0
  5. package/dist/builtin-extensions/index.js.map +1 -1
  6. package/dist/builtin-extensions/lunr-browser.d.ts +3 -0
  7. package/dist/builtin-extensions/lunr-browser.d.ts.map +1 -0
  8. package/dist/builtin-extensions/lunr-browser.js +56 -0
  9. package/dist/builtin-extensions/lunr-browser.js.map +1 -0
  10. package/dist/builtin-extensions/lunr-todos.d.ts.map +1 -1
  11. package/dist/builtin-extensions/lunr-todos.js +15 -0
  12. package/dist/builtin-extensions/lunr-todos.js.map +1 -1
  13. package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
  14. package/dist/builtin-extensions/pi-intercom/index.js +3 -0
  15. package/dist/builtin-extensions/pi-intercom/index.js.map +1 -1
  16. package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.d.ts +1 -1
  17. package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.d.ts.map +1 -1
  18. package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js +5 -1
  19. package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js.map +1 -1
  20. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +2 -2
  21. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
  22. package/dist/builtin-extensions/pi-subagents/src/extension/index.js +18 -5
  23. package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
  24. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +4 -3
  25. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
  26. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +3 -0
  27. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
  28. package/dist/builtin-extensions/pi-subagents/src/intercom/communication.d.ts +17 -0
  29. package/dist/builtin-extensions/pi-subagents/src/intercom/communication.d.ts.map +1 -0
  30. package/dist/builtin-extensions/pi-subagents/src/intercom/communication.js +45 -0
  31. package/dist/builtin-extensions/pi-subagents/src/intercom/communication.js.map +1 -0
  32. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts.map +1 -1
  33. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js +4 -11
  34. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js.map +1 -1
  35. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts +4 -1
  36. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts.map +1 -1
  37. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js +160 -51
  38. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js.map +1 -1
  39. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.d.ts.map +1 -1
  40. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js +5 -0
  41. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js.map +1 -1
  42. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts +2 -0
  43. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts.map +1 -1
  44. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js +3 -2
  45. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js.map +1 -1
  46. package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.d.ts +1 -0
  47. package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.d.ts.map +1 -1
  48. package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.js +2 -1
  49. package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.js.map +1 -1
  50. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts +1 -0
  51. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts.map +1 -1
  52. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js +2 -0
  53. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js.map +1 -1
  54. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts.map +1 -1
  55. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js +3 -0
  56. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js.map +1 -1
  57. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.d.ts +1 -0
  58. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.d.ts.map +1 -1
  59. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.js +3 -0
  60. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.js.map +1 -1
  61. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
  62. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +1 -1
  63. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
  64. package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +1 -0
  65. package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
  66. package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
  67. package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts +18 -0
  68. package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts.map +1 -0
  69. package/dist/builtin-extensions/pi-subagents/src/tui/communication.js +47 -0
  70. package/dist/builtin-extensions/pi-subagents/src/tui/communication.js.map +1 -0
  71. package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
  72. package/dist/builtin-extensions/pi-web-access/index.js +11 -7
  73. package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
  74. package/dist/cli/args.d.ts.map +1 -1
  75. package/dist/cli/args.js +2 -1
  76. package/dist/cli/args.js.map +1 -1
  77. package/dist/cli/install-cli.d.ts.map +1 -1
  78. package/dist/cli/install-cli.js +15 -45
  79. package/dist/cli/install-cli.js.map +1 -1
  80. package/dist/core/agent-session-runtime.d.ts +9 -0
  81. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  82. package/dist/core/agent-session-runtime.js +126 -29
  83. package/dist/core/agent-session-runtime.js.map +1 -1
  84. package/dist/core/agent-session.d.ts +3 -0
  85. package/dist/core/agent-session.d.ts.map +1 -1
  86. package/dist/core/agent-session.js +20 -2
  87. package/dist/core/agent-session.js.map +1 -1
  88. package/dist/core/browser/network.d.ts +9 -0
  89. package/dist/core/browser/network.d.ts.map +1 -0
  90. package/dist/core/browser/network.js +146 -0
  91. package/dist/core/browser/network.js.map +1 -0
  92. package/dist/core/browser/runtime.d.ts +24 -0
  93. package/dist/core/browser/runtime.d.ts.map +1 -0
  94. package/dist/core/browser/runtime.js +289 -0
  95. package/dist/core/browser/runtime.js.map +1 -0
  96. package/dist/core/browser/schema.d.ts +16 -0
  97. package/dist/core/browser/schema.d.ts.map +1 -0
  98. package/dist/core/browser/schema.js +36 -0
  99. package/dist/core/browser/schema.js.map +1 -0
  100. package/dist/core/browser/settings.d.ts +8 -0
  101. package/dist/core/browser/settings.d.ts.map +1 -0
  102. package/dist/core/browser/settings.js +30 -0
  103. package/dist/core/browser/settings.js.map +1 -0
  104. package/dist/core/browser/setup.d.ts +2 -0
  105. package/dist/core/browser/setup.d.ts.map +1 -0
  106. package/dist/core/browser/setup.js +16 -0
  107. package/dist/core/browser/setup.js.map +1 -0
  108. package/dist/core/customize.d.ts.map +1 -1
  109. package/dist/core/customize.js +15 -14
  110. package/dist/core/customize.js.map +1 -1
  111. package/dist/core/export-html/index.d.ts.map +1 -1
  112. package/dist/core/export-html/index.js +1 -1
  113. package/dist/core/export-html/index.js.map +1 -1
  114. package/dist/core/extensions/runner.d.ts +1 -0
  115. package/dist/core/extensions/runner.d.ts.map +1 -1
  116. package/dist/core/extensions/runner.js +1 -1
  117. package/dist/core/extensions/runner.js.map +1 -1
  118. package/dist/core/extensions/types.d.ts +1 -1
  119. package/dist/core/extensions/types.d.ts.map +1 -1
  120. package/dist/core/extensions/types.js.map +1 -1
  121. package/dist/core/install-features.d.ts.map +1 -1
  122. package/dist/core/install-features.js +10 -8
  123. package/dist/core/install-features.js.map +1 -1
  124. package/dist/core/memory-cap.d.ts.map +1 -1
  125. package/dist/core/memory-cap.js +5 -3
  126. package/dist/core/memory-cap.js.map +1 -1
  127. package/dist/core/model-tiers.d.ts.map +1 -1
  128. package/dist/core/model-tiers.js +9 -6
  129. package/dist/core/model-tiers.js.map +1 -1
  130. package/dist/core/permissions.d.ts.map +1 -1
  131. package/dist/core/permissions.js +9 -0
  132. package/dist/core/permissions.js.map +1 -1
  133. package/dist/core/plan-mode.d.ts.map +1 -1
  134. package/dist/core/plan-mode.js +3 -0
  135. package/dist/core/plan-mode.js.map +1 -1
  136. package/dist/core/process-registry.d.ts.map +1 -1
  137. package/dist/core/process-registry.js +6 -4
  138. package/dist/core/process-registry.js.map +1 -1
  139. package/dist/core/runtime-scope.d.ts +11 -0
  140. package/dist/core/runtime-scope.d.ts.map +1 -0
  141. package/dist/core/runtime-scope.js +3 -0
  142. package/dist/core/runtime-scope.js.map +1 -0
  143. package/dist/core/sdk.d.ts.map +1 -1
  144. package/dist/core/sdk.js +13 -0
  145. package/dist/core/sdk.js.map +1 -1
  146. package/dist/core/session-handoff.d.ts +35 -0
  147. package/dist/core/session-handoff.d.ts.map +1 -0
  148. package/dist/core/session-handoff.js +214 -0
  149. package/dist/core/session-handoff.js.map +1 -0
  150. package/dist/core/session-manager.d.ts +20 -0
  151. package/dist/core/session-manager.d.ts.map +1 -1
  152. package/dist/core/session-manager.js +184 -22
  153. package/dist/core/session-manager.js.map +1 -1
  154. package/dist/core/session-ownership.d.ts +28 -0
  155. package/dist/core/session-ownership.d.ts.map +1 -0
  156. package/dist/core/session-ownership.js +138 -0
  157. package/dist/core/session-ownership.js.map +1 -0
  158. package/dist/core/session-retention.d.ts.map +1 -1
  159. package/dist/core/session-retention.js +11 -2
  160. package/dist/core/session-retention.js.map +1 -1
  161. package/dist/core/settings-manager.d.ts +7 -0
  162. package/dist/core/settings-manager.d.ts.map +1 -1
  163. package/dist/core/settings-manager.js +18 -0
  164. package/dist/core/settings-manager.js.map +1 -1
  165. package/dist/core/slash-commands.d.ts.map +1 -1
  166. package/dist/core/slash-commands.js +2 -0
  167. package/dist/core/slash-commands.js.map +1 -1
  168. package/dist/core/system-prompt.d.ts.map +1 -1
  169. package/dist/core/system-prompt.js +5 -2
  170. package/dist/core/system-prompt.js.map +1 -1
  171. package/dist/core/todo-settings.d.ts +5 -0
  172. package/dist/core/todo-settings.d.ts.map +1 -0
  173. package/dist/core/todo-settings.js +7 -0
  174. package/dist/core/todo-settings.js.map +1 -0
  175. package/dist/core/tools/bash.d.ts.map +1 -1
  176. package/dist/core/tools/bash.js +4 -4
  177. package/dist/core/tools/bash.js.map +1 -1
  178. package/dist/core/tools/edit.d.ts.map +1 -1
  179. package/dist/core/tools/edit.js +5 -3
  180. package/dist/core/tools/edit.js.map +1 -1
  181. package/dist/core/tools/find.d.ts.map +1 -1
  182. package/dist/core/tools/find.js +4 -4
  183. package/dist/core/tools/find.js.map +1 -1
  184. package/dist/core/tools/grep.d.ts.map +1 -1
  185. package/dist/core/tools/grep.js +4 -4
  186. package/dist/core/tools/grep.js.map +1 -1
  187. package/dist/core/tools/ls.d.ts.map +1 -1
  188. package/dist/core/tools/ls.js +4 -4
  189. package/dist/core/tools/ls.js.map +1 -1
  190. package/dist/core/tools/read.d.ts.map +1 -1
  191. package/dist/core/tools/read.js +4 -4
  192. package/dist/core/tools/read.js.map +1 -1
  193. package/dist/core/tools/render-utils.d.ts +11 -2
  194. package/dist/core/tools/render-utils.d.ts.map +1 -1
  195. package/dist/core/tools/render-utils.js +31 -4
  196. package/dist/core/tools/render-utils.js.map +1 -1
  197. package/dist/core/tools/write.d.ts.map +1 -1
  198. package/dist/core/tools/write.js +4 -4
  199. package/dist/core/tools/write.js.map +1 -1
  200. package/dist/core/usage-service.d.ts.map +1 -1
  201. package/dist/core/usage-service.js +5 -3
  202. package/dist/core/usage-service.js.map +1 -1
  203. package/dist/gateway/adapters/discord.d.ts +12 -1
  204. package/dist/gateway/adapters/discord.d.ts.map +1 -1
  205. package/dist/gateway/adapters/discord.js +112 -17
  206. package/dist/gateway/adapters/discord.js.map +1 -1
  207. package/dist/gateway/adapters/telegram.d.ts +4 -2
  208. package/dist/gateway/adapters/telegram.d.ts.map +1 -1
  209. package/dist/gateway/adapters/telegram.js +34 -11
  210. package/dist/gateway/adapters/telegram.js.map +1 -1
  211. package/dist/gateway/agent-bridge.d.ts +14 -3
  212. package/dist/gateway/agent-bridge.d.ts.map +1 -1
  213. package/dist/gateway/agent-bridge.js +252 -60
  214. package/dist/gateway/agent-bridge.js.map +1 -1
  215. package/dist/gateway/approval.d.ts +1 -0
  216. package/dist/gateway/approval.d.ts.map +1 -1
  217. package/dist/gateway/approval.js +60 -18
  218. package/dist/gateway/approval.js.map +1 -1
  219. package/dist/gateway/authz.d.ts +2 -0
  220. package/dist/gateway/authz.d.ts.map +1 -1
  221. package/dist/gateway/authz.js +13 -0
  222. package/dist/gateway/authz.js.map +1 -1
  223. package/dist/gateway/buttons.d.ts +3 -1
  224. package/dist/gateway/buttons.d.ts.map +1 -1
  225. package/dist/gateway/buttons.js +18 -3
  226. package/dist/gateway/buttons.js.map +1 -1
  227. package/dist/gateway/command.d.ts.map +1 -1
  228. package/dist/gateway/command.js +49 -4
  229. package/dist/gateway/command.js.map +1 -1
  230. package/dist/gateway/commands.d.ts.map +1 -1
  231. package/dist/gateway/commands.js +18 -3
  232. package/dist/gateway/commands.js.map +1 -1
  233. package/dist/gateway/config.d.ts +5 -0
  234. package/dist/gateway/config.d.ts.map +1 -1
  235. package/dist/gateway/config.js +5 -0
  236. package/dist/gateway/config.js.map +1 -1
  237. package/dist/gateway/conversations.d.ts +14 -0
  238. package/dist/gateway/conversations.d.ts.map +1 -0
  239. package/dist/gateway/conversations.js +30 -0
  240. package/dist/gateway/conversations.js.map +1 -0
  241. package/dist/gateway/download.d.ts +2 -0
  242. package/dist/gateway/download.d.ts.map +1 -0
  243. package/dist/gateway/download.js +36 -0
  244. package/dist/gateway/download.js.map +1 -0
  245. package/dist/gateway/index.d.ts.map +1 -1
  246. package/dist/gateway/index.js +85 -26
  247. package/dist/gateway/index.js.map +1 -1
  248. package/dist/gateway/mobile-commands.d.ts +24 -0
  249. package/dist/gateway/mobile-commands.d.ts.map +1 -0
  250. package/dist/gateway/mobile-commands.js +422 -0
  251. package/dist/gateway/mobile-commands.js.map +1 -0
  252. package/dist/gateway/presenter.d.ts +16 -0
  253. package/dist/gateway/presenter.d.ts.map +1 -0
  254. package/dist/gateway/presenter.js +210 -0
  255. package/dist/gateway/presenter.js.map +1 -0
  256. package/dist/gateway/router.d.ts +1 -0
  257. package/dist/gateway/router.d.ts.map +1 -1
  258. package/dist/gateway/router.js +32 -3
  259. package/dist/gateway/router.js.map +1 -1
  260. package/dist/gateway/service.d.ts +46 -0
  261. package/dist/gateway/service.d.ts.map +1 -0
  262. package/dist/gateway/service.js +395 -0
  263. package/dist/gateway/service.js.map +1 -0
  264. package/dist/gateway/setup.d.ts +4 -0
  265. package/dist/gateway/setup.d.ts.map +1 -0
  266. package/dist/gateway/setup.js +146 -0
  267. package/dist/gateway/setup.js.map +1 -0
  268. package/dist/gateway/types.d.ts +4 -2
  269. package/dist/gateway/types.d.ts.map +1 -1
  270. package/dist/gateway/types.js.map +1 -1
  271. package/dist/index.d.ts +2 -0
  272. package/dist/index.d.ts.map +1 -1
  273. package/dist/index.js +2 -0
  274. package/dist/index.js.map +1 -1
  275. package/dist/main.d.ts.map +1 -1
  276. package/dist/main.js +2 -1
  277. package/dist/main.js.map +1 -1
  278. package/dist/modes/interactive/components/assistant-message.d.ts +11 -2
  279. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  280. package/dist/modes/interactive/components/assistant-message.js +53 -16
  281. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  282. package/dist/modes/interactive/components/copyable-text.d.ts +31 -0
  283. package/dist/modes/interactive/components/copyable-text.d.ts.map +1 -0
  284. package/dist/modes/interactive/components/copyable-text.js +165 -0
  285. package/dist/modes/interactive/components/copyable-text.js.map +1 -0
  286. package/dist/modes/interactive/components/custom-entry.d.ts +1 -0
  287. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  288. package/dist/modes/interactive/components/custom-entry.js +8 -0
  289. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  290. package/dist/modes/interactive/components/custom-message.d.ts +1 -0
  291. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  292. package/dist/modes/interactive/components/custom-message.js +8 -0
  293. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  294. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  295. package/dist/modes/interactive/components/session-selector.js +16 -0
  296. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  297. package/dist/modes/interactive/components/settings-selector.d.ts +5 -0
  298. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  299. package/dist/modes/interactive/components/settings-selector.js +38 -0
  300. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  301. package/dist/modes/interactive/interactive-mode.d.ts +3 -0
  302. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  303. package/dist/modes/interactive/interactive-mode.js +151 -7
  304. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  305. package/dist/node-runtime/agent-session-services-NQ6GKOIK.js +49 -0
  306. package/dist/node-runtime/{builtin-extensions-JCOPAAB5.js → builtin-extensions-GVC6IFDU.js} +6 -5
  307. package/dist/node-runtime/{chunk-LTYWTR3V.js → chunk-2MI5OPMN.js} +17 -2
  308. package/dist/node-runtime/{chunk-W3CVH5RX.js → chunk-2TKODGBZ.js} +11 -6
  309. package/dist/node-runtime/chunk-4EULYYR4.js +62 -0
  310. package/dist/node-runtime/chunk-5BNJ4JUH.js +672 -0
  311. package/dist/node-runtime/{chunk-6N22HULO.js → chunk-5D7LC2ZQ.js} +7 -2
  312. package/dist/node-runtime/{chunk-KBKMCJDU.js → chunk-5ZQXRPMC.js} +19 -4
  313. package/dist/node-runtime/{chunk-6KDIOJL3.js → chunk-6427XAWG.js} +3 -3
  314. package/dist/node-runtime/{chunk-BOHIDQT4.js → chunk-6B2POMK7.js} +1 -1
  315. package/dist/node-runtime/{chunk-RNBHABBA.js → chunk-7QWNYZDI.js} +7 -0
  316. package/dist/node-runtime/chunk-AZJHNQKQ.js +205 -0
  317. package/dist/node-runtime/{chunk-A3KMVBZV.js → chunk-BBUVIEZB.js} +1 -10
  318. package/dist/node-runtime/chunk-BFNXONG3.js +521 -0
  319. package/dist/node-runtime/{chunk-IRPJXI6U.js → chunk-BX2RB477.js} +1 -1
  320. package/dist/node-runtime/chunk-CCCN2UCX.js +14 -0
  321. package/dist/node-runtime/{chunk-25I2BHAA.js → chunk-CSUZVNYE.js} +1 -1
  322. package/dist/node-runtime/{chunk-QZMODZQ2.js → chunk-E24EO34J.js} +2 -1
  323. package/dist/node-runtime/{chunk-2BUAYZ7K.js → chunk-EQ63ANHL.js} +422 -123
  324. package/dist/node-runtime/{chunk-GB2MGFLI.js → chunk-GJSAD4AB.js} +216 -201
  325. package/dist/node-runtime/{chunk-W3SILANP.js → chunk-GMHJCCEN.js} +8 -8
  326. package/dist/node-runtime/{chunk-DDWHZ633.js → chunk-GNN7H3B7.js} +1 -1
  327. package/dist/node-runtime/chunk-GS66LV4M.js +2830 -0
  328. package/dist/node-runtime/{chunk-6BEIBLQ3.js → chunk-H3XF4UVQ.js} +1 -1
  329. package/dist/node-runtime/chunk-H4K3JDRB.js +47 -0
  330. package/dist/node-runtime/{chunk-YMEAYRBE.js → chunk-HTFRRDSF.js} +2 -7
  331. package/dist/node-runtime/chunk-IMLCWLPI.js +9 -0
  332. package/dist/node-runtime/{chunk-Y5KOEMBH.js → chunk-IQIEU7SB.js} +9 -674
  333. package/dist/node-runtime/{chunk-OPEK5RRY.js → chunk-IVXYUAJE.js} +1 -1
  334. package/dist/node-runtime/{chunk-PDNXVXMD.js → chunk-IWOWXRWU.js} +58 -48
  335. package/dist/node-runtime/chunk-KKUTQQV7.js +144 -0
  336. package/dist/node-runtime/{chunk-AWVD5IEY.js → chunk-LMBNLFXQ.js} +23 -12
  337. package/dist/node-runtime/{chunk-7NBZ5P7I.js → chunk-NAY6UUQZ.js} +1 -1
  338. package/dist/node-runtime/chunk-OAR4TYZE.js +146 -0
  339. package/dist/node-runtime/{chunk-STERBGUB.js → chunk-OFKSVRV7.js} +2 -2
  340. package/dist/node-runtime/{chunk-JZQ7F36T.js → chunk-ORH324EP.js} +19 -3
  341. package/dist/node-runtime/{chunk-2SJB2AWP.js → chunk-PC2Z5TKZ.js} +3 -3
  342. package/dist/node-runtime/{chunk-SY2TFMLO.js → chunk-QDGKKKUM.js} +46 -151
  343. package/dist/node-runtime/chunk-R3K2F5GI.js +122 -0
  344. package/dist/node-runtime/chunk-RMQZU2YU.js +117 -0
  345. package/dist/node-runtime/{chunk-XI77KVKA.js → chunk-TDL7UWJ7.js} +283 -2999
  346. package/dist/node-runtime/{chunk-G6LRAP36.js → chunk-TQGPP4SC.js} +1 -1
  347. package/dist/node-runtime/chunk-UAEOTO52.js +119 -0
  348. package/dist/node-runtime/{chunk-VZR3NCM7.js → chunk-UAFLNHSH.js} +18 -14
  349. package/dist/node-runtime/{chunk-AY6CAJSL.js → chunk-UJOCPOMX.js} +6 -3
  350. package/dist/node-runtime/chunk-UP2XBVH5.js +40 -0
  351. package/dist/node-runtime/{chunk-WJVFOIB5.js → chunk-UQUCFAJ3.js} +1 -1
  352. package/dist/node-runtime/chunk-URD2SLIT.js +1019 -0
  353. package/dist/node-runtime/chunk-US544NN6.js +13 -0
  354. package/dist/node-runtime/chunk-UWPJL22I.js +341 -0
  355. package/dist/node-runtime/chunk-V2A7CEXK.js +355 -0
  356. package/dist/node-runtime/chunk-VJPTNWAP.js +708 -0
  357. package/dist/node-runtime/{chunk-WKDK4C5P.js → chunk-VSSXXL36.js} +38 -164
  358. package/dist/node-runtime/{chunk-4I23VTC4.js → chunk-VWCE2HSZ.js} +21 -124
  359. package/dist/node-runtime/{chunk-WLLDXJRT.js → chunk-WADV2VDS.js} +22 -1014
  360. package/dist/node-runtime/{chunk-GKLEQ3I4.js → chunk-XLTL257W.js} +126 -27
  361. package/dist/node-runtime/chunk-YPHAIRZT.js +10 -0
  362. package/dist/node-runtime/cli-runtime.js +2 -2
  363. package/dist/node-runtime/command-3JHHXOPX.js +45 -0
  364. package/dist/node-runtime/commands-2JVNFGMQ.js +36 -0
  365. package/dist/node-runtime/{commands-MV5KOZ64.js → commands-KAMO2T6P.js} +10 -10
  366. package/dist/node-runtime/config-RORQUQFG.js +20 -0
  367. package/dist/node-runtime/{customize-LF5VST47.js → customize-VFJV3U6A.js} +2 -1
  368. package/dist/node-runtime/{direct-tool-executor-BK7CLEBX.js → direct-tool-executor-YAVOLDFY.js} +8 -8
  369. package/dist/node-runtime/{export-html-TEXVV5RP.js → export-html-KBFVV63J.js} +4 -3
  370. package/dist/node-runtime/{extension-input-O4HSAEM4.js → extension-input-K24TVKVW.js} +4 -4
  371. package/dist/node-runtime/{extension-selector-X5FCX43D.js → extension-selector-SPNF7EDR.js} +4 -4
  372. package/dist/node-runtime/{extract-XLQSJN4V.js → extract-EQJE7FZZ.js} +2 -2
  373. package/dist/node-runtime/{gateway-BM6NLOH4.js → gateway-VFO6SFKK.js} +275 -994
  374. package/dist/node-runtime/{gemini-search-U7SUMPQA.js → gemini-search-35OCRFLN.js} +1 -1
  375. package/dist/node-runtime/{gemini-url-context-PXWCBQHK.js → gemini-url-context-UQY3PHHW.js} +2 -2
  376. package/dist/node-runtime/index.js +104 -65
  377. package/dist/node-runtime/{init-3C7Z24OI.js → init-X2LIUB2H.js} +3 -3
  378. package/dist/node-runtime/{install-cli-EXMJQESX.js → install-cli-C3CF7O7N.js} +21 -82
  379. package/dist/node-runtime/interactive-mode-LOM6AIF6.js +72 -0
  380. package/dist/node-runtime/{interactive-view-ILS6TAN5.js → interactive-view-IDSCPPK7.js} +8 -8
  381. package/dist/node-runtime/lunr-browser-YNW7FTYX.js +87 -0
  382. package/dist/node-runtime/{lunr-cron-4VHP4E4B.js → lunr-cron-BKHGNBKT.js} +19 -5
  383. package/dist/node-runtime/main.js +44 -31
  384. package/dist/node-runtime/{memory-cap-3S4XRLNP.js → memory-cap-EL3KL4JJ.js} +2 -1
  385. package/dist/node-runtime/mobile-commands-HMP25WBC.js +32 -0
  386. package/dist/node-runtime/model-runtime-PLQKAG4B.js +16 -0
  387. package/dist/node-runtime/{model-tiers-NJLHUEGK.js → model-tiers-OU3U5CZG.js} +2 -1
  388. package/dist/node-runtime/{package-manager-cli-N37546V5.js → package-manager-cli-VCK4E2RC.js} +22 -15
  389. package/dist/node-runtime/{pi-intercom-NV2LW6X7.js → pi-intercom-HBPK5HSJ.js} +4 -1
  390. package/dist/node-runtime/{pi-mcp-adapter-GUFZWW54.js → pi-mcp-adapter-E6WULBKF.js} +4 -4
  391. package/dist/node-runtime/{pi-subagents-6MUIFNDM.js → pi-subagents-FEUDLJOE.js} +201 -78
  392. package/dist/node-runtime/{pi-web-access-2CQGFLT2.js → pi-web-access-WTGMNZ32.js} +15 -15
  393. package/dist/node-runtime/process-registry-4FAKZQOL.js +31 -0
  394. package/dist/node-runtime/{proxy-modes-V6YVFH3C.js → proxy-modes-OSQCWRBI.js} +9 -9
  395. package/dist/node-runtime/rpc-entry.js +44 -31
  396. package/dist/node-runtime/{rpc-mode-W5ZTLTMZ.js → rpc-mode-P5ODXPEG.js} +2 -2
  397. package/dist/node-runtime/runtime-4VA6JKNF.js +373 -0
  398. package/dist/node-runtime/{runtime-bridges-2VQTLPOZ.js → runtime-bridges-3XUQ46XW.js} +6 -5
  399. package/dist/node-runtime/service-ISSP6VHE.js +36 -0
  400. package/dist/node-runtime/session-handoff-HC7R5E24.js +33 -0
  401. package/dist/node-runtime/{session-manager-E7AREDTV.js → session-manager-CFN4UFM2.js} +2 -1
  402. package/dist/node-runtime/{session-selector-FJ7M2AIX.js → session-selector-LHRMJOKT.js} +5 -4
  403. package/dist/node-runtime/{settings-manager-CUGAZWAB.js → settings-manager-UUZ6NUXI.js} +7 -2
  404. package/dist/node-runtime/setup-JBKOLJ6F.js +18 -0
  405. package/dist/node-runtime/setup-NRXVZBLJ.js +155 -0
  406. package/dist/node-runtime/{subagent-executor-MH4A7CCF.js → subagent-executor-MLUMBWCP.js} +22 -18
  407. package/dist/node-runtime/theme-U7IGOA7O.js +68 -0
  408. package/dist/node-runtime/trust-manager-MMISNCYO.js +17 -0
  409. package/dist/node-runtime/{update-cli-XTZMZGOL.js → update-cli-4TP25CNW.js} +7 -2
  410. package/dist/node-runtime/usage-service-LFB2SWYV.js +37 -0
  411. package/dist/node-runtime/{video-extract-OYT5WKS5.js → video-extract-OOZHR7SU.js} +2 -2
  412. package/dist/node-runtime/{youtube-extract-TQYKGFGS.js → youtube-extract-FNPAUNHU.js} +6 -6
  413. package/docs/browser.md +86 -0
  414. package/docs/extensions.md +2 -0
  415. package/docs/features.md +94 -16
  416. package/docs/interactive-startup.md +2 -1
  417. package/docs/sessions.md +10 -0
  418. package/docs/settings.md +1 -0
  419. package/docs/tui.md +2 -0
  420. package/docs/usage.md +16 -0
  421. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  422. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  423. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  424. package/examples/extensions/gondolin/package-lock.json +2 -2
  425. package/examples/extensions/gondolin/package.json +1 -1
  426. package/examples/extensions/sandbox/package-lock.json +2 -2
  427. package/examples/extensions/sandbox/package.json +1 -1
  428. package/examples/extensions/with-deps/package-lock.json +2 -2
  429. package/examples/extensions/with-deps/package.json +1 -1
  430. package/package.json +7 -4
  431. package/scripts/install-browser.mjs +20 -0
  432. package/dist/node-runtime/agent-session-services-C743TYQE.js +0 -37
  433. package/dist/node-runtime/chunk-VGYZ3APQ.js +0 -59
  434. package/dist/node-runtime/command-P4NYCJ2M.js +0 -13
  435. package/dist/node-runtime/interactive-mode-EVVBA64D.js +0 -59
  436. package/dist/node-runtime/{chunk-UWQYRSYQ.js → chunk-YJMMG7C6.js} +25 -25
  437. package/dist/node-runtime/{mcp-panel-IIGMXQGP.js → mcp-panel-KTTFXJZ4.js} +3 -3
  438. package/dist/node-runtime/{src-BPQFJR76.js → src-IVPNZ2BX.js} +9 -9
@@ -1,13 +1,20 @@
1
1
  import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ browserEnabledDefault,
4
+ notifyBrowserEnabledChange
5
+ } from "./chunk-UP2XBVH5.js";
2
6
  import {
3
7
  DEFAULT_SUBAGENT_SPINNER,
4
8
  isSubagentSpinnerName
5
9
  } from "./chunk-LISUTZS3.js";
10
+ import {
11
+ require_proper_lockfile
12
+ } from "./chunk-URD2SLIT.js";
6
13
  import {
7
14
  MEMORY_CHAR_CAP_DEFAULT,
8
15
  MEMORY_CHAR_CAP_MAX,
9
16
  MEMORY_CHAR_CAP_MIN
10
- } from "./chunk-AY6CAJSL.js";
17
+ } from "./chunk-UJOCPOMX.js";
11
18
  import {
12
19
  CONFIG_DIR_NAME,
13
20
  getAgentDir,
@@ -20,1016 +27,6 @@ import {
20
27
  __toESM
21
28
  } from "./chunk-BRJX2PRC.js";
22
29
 
23
- // node_modules/graceful-fs/polyfills.js
24
- var require_polyfills = __commonJS({
25
- "node_modules/graceful-fs/polyfills.js"(exports, module) {
26
- var constants = __require("constants"), origCwd = process.cwd, cwd = null, platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
27
- process.cwd = function() {
28
- return cwd || (cwd = origCwd.call(process)), cwd;
29
- };
30
- try {
31
- process.cwd();
32
- } catch {
33
- }
34
- typeof process.chdir == "function" && (chdir = process.chdir, process.chdir = function(d) {
35
- cwd = null, chdir.call(process, d);
36
- }, Object.setPrototypeOf && Object.setPrototypeOf(process.chdir, chdir));
37
- var chdir;
38
- module.exports = patch;
39
- function patch(fs) {
40
- constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) && patchLchmod(fs), fs.lutimes || patchLutimes(fs), fs.chown = chownFix(fs.chown), fs.fchown = chownFix(fs.fchown), fs.lchown = chownFix(fs.lchown), fs.chmod = chmodFix(fs.chmod), fs.fchmod = chmodFix(fs.fchmod), fs.lchmod = chmodFix(fs.lchmod), fs.chownSync = chownFixSync(fs.chownSync), fs.fchownSync = chownFixSync(fs.fchownSync), fs.lchownSync = chownFixSync(fs.lchownSync), fs.chmodSync = chmodFixSync(fs.chmodSync), fs.fchmodSync = chmodFixSync(fs.fchmodSync), fs.lchmodSync = chmodFixSync(fs.lchmodSync), fs.stat = statFix(fs.stat), fs.fstat = statFix(fs.fstat), fs.lstat = statFix(fs.lstat), fs.statSync = statFixSync(fs.statSync), fs.fstatSync = statFixSync(fs.fstatSync), fs.lstatSync = statFixSync(fs.lstatSync), fs.chmod && !fs.lchmod && (fs.lchmod = function(path, mode, cb) {
41
- cb && process.nextTick(cb);
42
- }, fs.lchmodSync = function() {
43
- }), fs.chown && !fs.lchown && (fs.lchown = function(path, uid, gid, cb) {
44
- cb && process.nextTick(cb);
45
- }, fs.lchownSync = function() {
46
- }), platform === "win32" && (fs.rename = typeof fs.rename != "function" ? fs.rename : (function(fs$rename) {
47
- function rename(from, to, cb) {
48
- var start = Date.now(), backoff = 0;
49
- fs$rename(from, to, function CB(er) {
50
- if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
51
- setTimeout(function() {
52
- fs.stat(to, function(stater, st) {
53
- stater && stater.code === "ENOENT" ? fs$rename(from, to, CB) : cb(er);
54
- });
55
- }, backoff), backoff < 100 && (backoff += 10);
56
- return;
57
- }
58
- cb && cb(er);
59
- });
60
- }
61
- return Object.setPrototypeOf && Object.setPrototypeOf(rename, fs$rename), rename;
62
- })(fs.rename)), fs.read = typeof fs.read != "function" ? fs.read : (function(fs$read) {
63
- function read(fd, buffer, offset, length, position, callback_) {
64
- var callback;
65
- if (callback_ && typeof callback_ == "function") {
66
- var eagCounter = 0;
67
- callback = function(er, _, __) {
68
- if (er && er.code === "EAGAIN" && eagCounter < 10)
69
- return eagCounter++, fs$read.call(fs, fd, buffer, offset, length, position, callback);
70
- callback_.apply(this, arguments);
71
- };
72
- }
73
- return fs$read.call(fs, fd, buffer, offset, length, position, callback);
74
- }
75
- return Object.setPrototypeOf && Object.setPrototypeOf(read, fs$read), read;
76
- })(fs.read), fs.readSync = typeof fs.readSync != "function" ? fs.readSync : /* @__PURE__ */ (function(fs$readSync) {
77
- return function(fd, buffer, offset, length, position) {
78
- for (var eagCounter = 0; ; )
79
- try {
80
- return fs$readSync.call(fs, fd, buffer, offset, length, position);
81
- } catch (er) {
82
- if (er.code === "EAGAIN" && eagCounter < 10) {
83
- eagCounter++;
84
- continue;
85
- }
86
- throw er;
87
- }
88
- };
89
- })(fs.readSync);
90
- function patchLchmod(fs2) {
91
- fs2.lchmod = function(path, mode, callback) {
92
- fs2.open(
93
- path,
94
- constants.O_WRONLY | constants.O_SYMLINK,
95
- mode,
96
- function(err, fd) {
97
- if (err) {
98
- callback && callback(err);
99
- return;
100
- }
101
- fs2.fchmod(fd, mode, function(err2) {
102
- fs2.close(fd, function(err22) {
103
- callback && callback(err2 || err22);
104
- });
105
- });
106
- }
107
- );
108
- }, fs2.lchmodSync = function(path, mode) {
109
- var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode), threw = !0, ret;
110
- try {
111
- ret = fs2.fchmodSync(fd, mode), threw = !1;
112
- } finally {
113
- if (threw)
114
- try {
115
- fs2.closeSync(fd);
116
- } catch {
117
- }
118
- else
119
- fs2.closeSync(fd);
120
- }
121
- return ret;
122
- };
123
- }
124
- function patchLutimes(fs2) {
125
- constants.hasOwnProperty("O_SYMLINK") && fs2.futimes ? (fs2.lutimes = function(path, at, mt, cb) {
126
- fs2.open(path, constants.O_SYMLINK, function(er, fd) {
127
- if (er) {
128
- cb && cb(er);
129
- return;
130
- }
131
- fs2.futimes(fd, at, mt, function(er2) {
132
- fs2.close(fd, function(er22) {
133
- cb && cb(er2 || er22);
134
- });
135
- });
136
- });
137
- }, fs2.lutimesSync = function(path, at, mt) {
138
- var fd = fs2.openSync(path, constants.O_SYMLINK), ret, threw = !0;
139
- try {
140
- ret = fs2.futimesSync(fd, at, mt), threw = !1;
141
- } finally {
142
- if (threw)
143
- try {
144
- fs2.closeSync(fd);
145
- } catch {
146
- }
147
- else
148
- fs2.closeSync(fd);
149
- }
150
- return ret;
151
- }) : fs2.futimes && (fs2.lutimes = function(_a, _b, _c, cb) {
152
- cb && process.nextTick(cb);
153
- }, fs2.lutimesSync = function() {
154
- });
155
- }
156
- function chmodFix(orig) {
157
- return orig && function(target, mode, cb) {
158
- return orig.call(fs, target, mode, function(er) {
159
- chownErOk(er) && (er = null), cb && cb.apply(this, arguments);
160
- });
161
- };
162
- }
163
- function chmodFixSync(orig) {
164
- return orig && function(target, mode) {
165
- try {
166
- return orig.call(fs, target, mode);
167
- } catch (er) {
168
- if (!chownErOk(er)) throw er;
169
- }
170
- };
171
- }
172
- function chownFix(orig) {
173
- return orig && function(target, uid, gid, cb) {
174
- return orig.call(fs, target, uid, gid, function(er) {
175
- chownErOk(er) && (er = null), cb && cb.apply(this, arguments);
176
- });
177
- };
178
- }
179
- function chownFixSync(orig) {
180
- return orig && function(target, uid, gid) {
181
- try {
182
- return orig.call(fs, target, uid, gid);
183
- } catch (er) {
184
- if (!chownErOk(er)) throw er;
185
- }
186
- };
187
- }
188
- function statFix(orig) {
189
- return orig && function(target, options, cb) {
190
- typeof options == "function" && (cb = options, options = null);
191
- function callback(er, stats) {
192
- stats && (stats.uid < 0 && (stats.uid += 4294967296), stats.gid < 0 && (stats.gid += 4294967296)), cb && cb.apply(this, arguments);
193
- }
194
- return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback);
195
- };
196
- }
197
- function statFixSync(orig) {
198
- return orig && function(target, options) {
199
- var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
200
- return stats && (stats.uid < 0 && (stats.uid += 4294967296), stats.gid < 0 && (stats.gid += 4294967296)), stats;
201
- };
202
- }
203
- function chownErOk(er) {
204
- if (!er || er.code === "ENOSYS")
205
- return !0;
206
- var nonroot = !process.getuid || process.getuid() !== 0;
207
- return !!(nonroot && (er.code === "EINVAL" || er.code === "EPERM"));
208
- }
209
- }
210
- }
211
- });
212
-
213
- // node_modules/graceful-fs/legacy-streams.js
214
- var require_legacy_streams = __commonJS({
215
- "node_modules/graceful-fs/legacy-streams.js"(exports, module) {
216
- var Stream = __require("stream").Stream;
217
- module.exports = legacy;
218
- function legacy(fs) {
219
- return {
220
- ReadStream,
221
- WriteStream
222
- };
223
- function ReadStream(path, options) {
224
- if (!(this instanceof ReadStream)) return new ReadStream(path, options);
225
- Stream.call(this);
226
- var self = this;
227
- this.path = path, this.fd = null, this.readable = !0, this.paused = !1, this.flags = "r", this.mode = 438, this.bufferSize = 64 * 1024, options = options || {};
228
- for (var keys = Object.keys(options), index = 0, length = keys.length; index < length; index++) {
229
- var key = keys[index];
230
- this[key] = options[key];
231
- }
232
- if (this.encoding && this.setEncoding(this.encoding), this.start !== void 0) {
233
- if (typeof this.start != "number")
234
- throw TypeError("start must be a Number");
235
- if (this.end === void 0)
236
- this.end = 1 / 0;
237
- else if (typeof this.end != "number")
238
- throw TypeError("end must be a Number");
239
- if (this.start > this.end)
240
- throw new Error("start must be <= end");
241
- this.pos = this.start;
242
- }
243
- if (this.fd !== null) {
244
- process.nextTick(function() {
245
- self._read();
246
- });
247
- return;
248
- }
249
- fs.open(this.path, this.flags, this.mode, function(err, fd) {
250
- if (err) {
251
- self.emit("error", err), self.readable = !1;
252
- return;
253
- }
254
- self.fd = fd, self.emit("open", fd), self._read();
255
- });
256
- }
257
- function WriteStream(path, options) {
258
- if (!(this instanceof WriteStream)) return new WriteStream(path, options);
259
- Stream.call(this), this.path = path, this.fd = null, this.writable = !0, this.flags = "w", this.encoding = "binary", this.mode = 438, this.bytesWritten = 0, options = options || {};
260
- for (var keys = Object.keys(options), index = 0, length = keys.length; index < length; index++) {
261
- var key = keys[index];
262
- this[key] = options[key];
263
- }
264
- if (this.start !== void 0) {
265
- if (typeof this.start != "number")
266
- throw TypeError("start must be a Number");
267
- if (this.start < 0)
268
- throw new Error("start must be >= zero");
269
- this.pos = this.start;
270
- }
271
- this.busy = !1, this._queue = [], this.fd === null && (this._open = fs.open, this._queue.push([this._open, this.path, this.flags, this.mode, void 0]), this.flush());
272
- }
273
- }
274
- }
275
- });
276
-
277
- // node_modules/graceful-fs/clone.js
278
- var require_clone = __commonJS({
279
- "node_modules/graceful-fs/clone.js"(exports, module) {
280
- "use strict";
281
- module.exports = clone;
282
- var getPrototypeOf = Object.getPrototypeOf || function(obj) {
283
- return obj.__proto__;
284
- };
285
- function clone(obj) {
286
- if (obj === null || typeof obj != "object")
287
- return obj;
288
- if (obj instanceof Object)
289
- var copy = { __proto__: getPrototypeOf(obj) };
290
- else
291
- var copy = /* @__PURE__ */ Object.create(null);
292
- return Object.getOwnPropertyNames(obj).forEach(function(key) {
293
- Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
294
- }), copy;
295
- }
296
- }
297
- });
298
-
299
- // node_modules/graceful-fs/graceful-fs.js
300
- var require_graceful_fs = __commonJS({
301
- "node_modules/graceful-fs/graceful-fs.js"(exports, module) {
302
- var fs = __require("fs"), polyfills = require_polyfills(), legacy = require_legacy_streams(), clone = require_clone(), util = __require("util"), gracefulQueue, previousSymbol;
303
- typeof Symbol == "function" && typeof Symbol.for == "function" ? (gracefulQueue = /* @__PURE__ */ Symbol.for("graceful-fs.queue"), previousSymbol = /* @__PURE__ */ Symbol.for("graceful-fs.previous")) : (gracefulQueue = "___graceful-fs.queue", previousSymbol = "___graceful-fs.previous");
304
- function noop() {
305
- }
306
- function publishQueue(context, queue2) {
307
- Object.defineProperty(context, gracefulQueue, {
308
- get: function() {
309
- return queue2;
310
- }
311
- });
312
- }
313
- var debug = noop;
314
- util.debuglog ? debug = util.debuglog("gfs4") : /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && (debug = function() {
315
- var m = util.format.apply(util, arguments);
316
- m = "GFS4: " + m.split(/\n/).join(`
317
- GFS4: `), console.error(m);
318
- });
319
- fs[gracefulQueue] || (queue = global[gracefulQueue] || [], publishQueue(fs, queue), fs.close = (function(fs$close) {
320
- function close(fd, cb) {
321
- return fs$close.call(fs, fd, function(err) {
322
- err || resetQueue(), typeof cb == "function" && cb.apply(this, arguments);
323
- });
324
- }
325
- return Object.defineProperty(close, previousSymbol, {
326
- value: fs$close
327
- }), close;
328
- })(fs.close), fs.closeSync = (function(fs$closeSync) {
329
- function closeSync(fd) {
330
- fs$closeSync.apply(fs, arguments), resetQueue();
331
- }
332
- return Object.defineProperty(closeSync, previousSymbol, {
333
- value: fs$closeSync
334
- }), closeSync;
335
- })(fs.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
336
- debug(fs[gracefulQueue]), __require("assert").equal(fs[gracefulQueue].length, 0);
337
- }));
338
- var queue;
339
- global[gracefulQueue] || publishQueue(global, fs[gracefulQueue]);
340
- module.exports = patch(clone(fs));
341
- process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched && (module.exports = patch(fs), fs.__patched = !0);
342
- function patch(fs2) {
343
- polyfills(fs2), fs2.gracefulify = patch, fs2.createReadStream = createReadStream, fs2.createWriteStream = createWriteStream;
344
- var fs$readFile = fs2.readFile;
345
- fs2.readFile = readFile;
346
- function readFile(path, options, cb) {
347
- return typeof options == "function" && (cb = options, options = null), go$readFile(path, options, cb);
348
- function go$readFile(path2, options2, cb2, startTime) {
349
- return fs$readFile(path2, options2, function(err) {
350
- err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
351
- });
352
- }
353
- }
354
- var fs$writeFile = fs2.writeFile;
355
- fs2.writeFile = writeFile;
356
- function writeFile(path, data, options, cb) {
357
- return typeof options == "function" && (cb = options, options = null), go$writeFile(path, data, options, cb);
358
- function go$writeFile(path2, data2, options2, cb2, startTime) {
359
- return fs$writeFile(path2, data2, options2, function(err) {
360
- err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
361
- });
362
- }
363
- }
364
- var fs$appendFile = fs2.appendFile;
365
- fs$appendFile && (fs2.appendFile = appendFile);
366
- function appendFile(path, data, options, cb) {
367
- return typeof options == "function" && (cb = options, options = null), go$appendFile(path, data, options, cb);
368
- function go$appendFile(path2, data2, options2, cb2, startTime) {
369
- return fs$appendFile(path2, data2, options2, function(err) {
370
- err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
371
- });
372
- }
373
- }
374
- var fs$copyFile = fs2.copyFile;
375
- fs$copyFile && (fs2.copyFile = copyFile);
376
- function copyFile(src, dest, flags, cb) {
377
- return typeof flags == "function" && (cb = flags, flags = 0), go$copyFile(src, dest, flags, cb);
378
- function go$copyFile(src2, dest2, flags2, cb2, startTime) {
379
- return fs$copyFile(src2, dest2, flags2, function(err) {
380
- err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
381
- });
382
- }
383
- }
384
- var fs$readdir = fs2.readdir;
385
- fs2.readdir = readdir;
386
- var noReaddirOptionVersions = /^v[0-5]\./;
387
- function readdir(path, options, cb) {
388
- typeof options == "function" && (cb = options, options = null);
389
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function(path2, options2, cb2, startTime) {
390
- return fs$readdir(path2, fs$readdirCallback(
391
- path2,
392
- options2,
393
- cb2,
394
- startTime
395
- ));
396
- } : function(path2, options2, cb2, startTime) {
397
- return fs$readdir(path2, options2, fs$readdirCallback(
398
- path2,
399
- options2,
400
- cb2,
401
- startTime
402
- ));
403
- };
404
- return go$readdir(path, options, cb);
405
- function fs$readdirCallback(path2, options2, cb2, startTime) {
406
- return function(err, files) {
407
- err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([
408
- go$readdir,
409
- [path2, options2, cb2],
410
- err,
411
- startTime || Date.now(),
412
- Date.now()
413
- ]) : (files && files.sort && files.sort(), typeof cb2 == "function" && cb2.call(this, err, files));
414
- };
415
- }
416
- }
417
- if (process.version.substr(0, 4) === "v0.8") {
418
- var legStreams = legacy(fs2);
419
- ReadStream = legStreams.ReadStream, WriteStream = legStreams.WriteStream;
420
- }
421
- var fs$ReadStream = fs2.ReadStream;
422
- fs$ReadStream && (ReadStream.prototype = Object.create(fs$ReadStream.prototype), ReadStream.prototype.open = ReadStream$open);
423
- var fs$WriteStream = fs2.WriteStream;
424
- fs$WriteStream && (WriteStream.prototype = Object.create(fs$WriteStream.prototype), WriteStream.prototype.open = WriteStream$open), Object.defineProperty(fs2, "ReadStream", {
425
- get: function() {
426
- return ReadStream;
427
- },
428
- set: function(val) {
429
- ReadStream = val;
430
- },
431
- enumerable: !0,
432
- configurable: !0
433
- }), Object.defineProperty(fs2, "WriteStream", {
434
- get: function() {
435
- return WriteStream;
436
- },
437
- set: function(val) {
438
- WriteStream = val;
439
- },
440
- enumerable: !0,
441
- configurable: !0
442
- });
443
- var FileReadStream = ReadStream;
444
- Object.defineProperty(fs2, "FileReadStream", {
445
- get: function() {
446
- return FileReadStream;
447
- },
448
- set: function(val) {
449
- FileReadStream = val;
450
- },
451
- enumerable: !0,
452
- configurable: !0
453
- });
454
- var FileWriteStream = WriteStream;
455
- Object.defineProperty(fs2, "FileWriteStream", {
456
- get: function() {
457
- return FileWriteStream;
458
- },
459
- set: function(val) {
460
- FileWriteStream = val;
461
- },
462
- enumerable: !0,
463
- configurable: !0
464
- });
465
- function ReadStream(path, options) {
466
- return this instanceof ReadStream ? (fs$ReadStream.apply(this, arguments), this) : ReadStream.apply(Object.create(ReadStream.prototype), arguments);
467
- }
468
- function ReadStream$open() {
469
- var that = this;
470
- open(that.path, that.flags, that.mode, function(err, fd) {
471
- err ? (that.autoClose && that.destroy(), that.emit("error", err)) : (that.fd = fd, that.emit("open", fd), that.read());
472
- });
473
- }
474
- function WriteStream(path, options) {
475
- return this instanceof WriteStream ? (fs$WriteStream.apply(this, arguments), this) : WriteStream.apply(Object.create(WriteStream.prototype), arguments);
476
- }
477
- function WriteStream$open() {
478
- var that = this;
479
- open(that.path, that.flags, that.mode, function(err, fd) {
480
- err ? (that.destroy(), that.emit("error", err)) : (that.fd = fd, that.emit("open", fd));
481
- });
482
- }
483
- function createReadStream(path, options) {
484
- return new fs2.ReadStream(path, options);
485
- }
486
- function createWriteStream(path, options) {
487
- return new fs2.WriteStream(path, options);
488
- }
489
- var fs$open = fs2.open;
490
- fs2.open = open;
491
- function open(path, flags, mode, cb) {
492
- return typeof mode == "function" && (cb = mode, mode = null), go$open(path, flags, mode, cb);
493
- function go$open(path2, flags2, mode2, cb2, startTime) {
494
- return fs$open(path2, flags2, mode2, function(err, fd) {
495
- err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
496
- });
497
- }
498
- }
499
- return fs2;
500
- }
501
- function enqueue(elem) {
502
- debug("ENQUEUE", elem[0].name, elem[1]), fs[gracefulQueue].push(elem), retry();
503
- }
504
- var retryTimer;
505
- function resetQueue() {
506
- for (var now = Date.now(), i = 0; i < fs[gracefulQueue].length; ++i)
507
- fs[gracefulQueue][i].length > 2 && (fs[gracefulQueue][i][3] = now, fs[gracefulQueue][i][4] = now);
508
- retry();
509
- }
510
- function retry() {
511
- if (clearTimeout(retryTimer), retryTimer = void 0, fs[gracefulQueue].length !== 0) {
512
- var elem = fs[gracefulQueue].shift(), fn = elem[0], args = elem[1], err = elem[2], startTime = elem[3], lastTime = elem[4];
513
- if (startTime === void 0)
514
- debug("RETRY", fn.name, args), fn.apply(null, args);
515
- else if (Date.now() - startTime >= 6e4) {
516
- debug("TIMEOUT", fn.name, args);
517
- var cb = args.pop();
518
- typeof cb == "function" && cb.call(null, err);
519
- } else {
520
- var sinceAttempt = Date.now() - lastTime, sinceStart = Math.max(lastTime - startTime, 1), desiredDelay = Math.min(sinceStart * 1.2, 100);
521
- sinceAttempt >= desiredDelay ? (debug("RETRY", fn.name, args), fn.apply(null, args.concat([startTime]))) : fs[gracefulQueue].push(elem);
522
- }
523
- retryTimer === void 0 && (retryTimer = setTimeout(retry, 0));
524
- }
525
- }
526
- }
527
- });
528
-
529
- // node_modules/proper-lockfile/node_modules/retry/lib/retry_operation.js
530
- var require_retry_operation = __commonJS({
531
- "node_modules/proper-lockfile/node_modules/retry/lib/retry_operation.js"(exports, module) {
532
- function RetryOperation(timeouts, options) {
533
- typeof options == "boolean" && (options = { forever: options }), this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)), this._timeouts = timeouts, this._options = options || {}, this._maxRetryTime = options && options.maxRetryTime || 1 / 0, this._fn = null, this._errors = [], this._attempts = 1, this._operationTimeout = null, this._operationTimeoutCb = null, this._timeout = null, this._operationStart = null, this._options.forever && (this._cachedTimeouts = this._timeouts.slice(0));
534
- }
535
- module.exports = RetryOperation;
536
- RetryOperation.prototype.reset = function() {
537
- this._attempts = 1, this._timeouts = this._originalTimeouts;
538
- };
539
- RetryOperation.prototype.stop = function() {
540
- this._timeout && clearTimeout(this._timeout), this._timeouts = [], this._cachedTimeouts = null;
541
- };
542
- RetryOperation.prototype.retry = function(err) {
543
- if (this._timeout && clearTimeout(this._timeout), !err)
544
- return !1;
545
- var currentTime = (/* @__PURE__ */ new Date()).getTime();
546
- if (err && currentTime - this._operationStart >= this._maxRetryTime)
547
- return this._errors.unshift(new Error("RetryOperation timeout occurred")), !1;
548
- this._errors.push(err);
549
- var timeout = this._timeouts.shift();
550
- if (timeout === void 0)
551
- if (this._cachedTimeouts)
552
- this._errors.splice(this._errors.length - 1, this._errors.length), this._timeouts = this._cachedTimeouts.slice(0), timeout = this._timeouts.shift();
553
- else
554
- return !1;
555
- var self = this, timer = setTimeout(function() {
556
- self._attempts++, self._operationTimeoutCb && (self._timeout = setTimeout(function() {
557
- self._operationTimeoutCb(self._attempts);
558
- }, self._operationTimeout), self._options.unref && self._timeout.unref()), self._fn(self._attempts);
559
- }, timeout);
560
- return this._options.unref && timer.unref(), !0;
561
- };
562
- RetryOperation.prototype.attempt = function(fn, timeoutOps) {
563
- this._fn = fn, timeoutOps && (timeoutOps.timeout && (this._operationTimeout = timeoutOps.timeout), timeoutOps.cb && (this._operationTimeoutCb = timeoutOps.cb));
564
- var self = this;
565
- this._operationTimeoutCb && (this._timeout = setTimeout(function() {
566
- self._operationTimeoutCb();
567
- }, self._operationTimeout)), this._operationStart = (/* @__PURE__ */ new Date()).getTime(), this._fn(this._attempts);
568
- };
569
- RetryOperation.prototype.try = function(fn) {
570
- console.log("Using RetryOperation.try() is deprecated"), this.attempt(fn);
571
- };
572
- RetryOperation.prototype.start = function(fn) {
573
- console.log("Using RetryOperation.start() is deprecated"), this.attempt(fn);
574
- };
575
- RetryOperation.prototype.start = RetryOperation.prototype.try;
576
- RetryOperation.prototype.errors = function() {
577
- return this._errors;
578
- };
579
- RetryOperation.prototype.attempts = function() {
580
- return this._attempts;
581
- };
582
- RetryOperation.prototype.mainError = function() {
583
- if (this._errors.length === 0)
584
- return null;
585
- for (var counts = {}, mainError = null, mainErrorCount = 0, i = 0; i < this._errors.length; i++) {
586
- var error = this._errors[i], message = error.message, count = (counts[message] || 0) + 1;
587
- counts[message] = count, count >= mainErrorCount && (mainError = error, mainErrorCount = count);
588
- }
589
- return mainError;
590
- };
591
- }
592
- });
593
-
594
- // node_modules/proper-lockfile/node_modules/retry/lib/retry.js
595
- var require_retry = __commonJS({
596
- "node_modules/proper-lockfile/node_modules/retry/lib/retry.js"(exports) {
597
- var RetryOperation = require_retry_operation();
598
- exports.operation = function(options) {
599
- var timeouts = exports.timeouts(options);
600
- return new RetryOperation(timeouts, {
601
- forever: options && options.forever,
602
- unref: options && options.unref,
603
- maxRetryTime: options && options.maxRetryTime
604
- });
605
- };
606
- exports.timeouts = function(options) {
607
- if (options instanceof Array)
608
- return [].concat(options);
609
- var opts = {
610
- retries: 10,
611
- factor: 2,
612
- minTimeout: 1 * 1e3,
613
- maxTimeout: 1 / 0,
614
- randomize: !1
615
- };
616
- for (var key in options)
617
- opts[key] = options[key];
618
- if (opts.minTimeout > opts.maxTimeout)
619
- throw new Error("minTimeout is greater than maxTimeout");
620
- for (var timeouts = [], i = 0; i < opts.retries; i++)
621
- timeouts.push(this.createTimeout(i, opts));
622
- return options && options.forever && !timeouts.length && timeouts.push(this.createTimeout(i, opts)), timeouts.sort(function(a, b) {
623
- return a - b;
624
- }), timeouts;
625
- };
626
- exports.createTimeout = function(attempt, opts) {
627
- var random = opts.randomize ? Math.random() + 1 : 1, timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));
628
- return timeout = Math.min(timeout, opts.maxTimeout), timeout;
629
- };
630
- exports.wrap = function(obj, options, methods) {
631
- if (options instanceof Array && (methods = options, options = null), !methods) {
632
- methods = [];
633
- for (var key in obj)
634
- typeof obj[key] == "function" && methods.push(key);
635
- }
636
- for (var i = 0; i < methods.length; i++) {
637
- var method = methods[i], original = obj[method];
638
- obj[method] = function(original2) {
639
- var op = exports.operation(options), args = Array.prototype.slice.call(arguments, 1), callback = args.pop();
640
- args.push(function(err) {
641
- op.retry(err) || (err && (arguments[0] = op.mainError()), callback.apply(this, arguments));
642
- }), op.attempt(function() {
643
- original2.apply(obj, args);
644
- });
645
- }.bind(obj, original), obj[method].options = options;
646
- }
647
- };
648
- }
649
- });
650
-
651
- // node_modules/proper-lockfile/node_modules/retry/index.js
652
- var require_retry2 = __commonJS({
653
- "node_modules/proper-lockfile/node_modules/retry/index.js"(exports, module) {
654
- module.exports = require_retry();
655
- }
656
- });
657
-
658
- // node_modules/signal-exit/signals.js
659
- var require_signals = __commonJS({
660
- "node_modules/signal-exit/signals.js"(exports, module) {
661
- module.exports = [
662
- "SIGABRT",
663
- "SIGALRM",
664
- "SIGHUP",
665
- "SIGINT",
666
- "SIGTERM"
667
- ];
668
- process.platform !== "win32" && module.exports.push(
669
- "SIGVTALRM",
670
- "SIGXCPU",
671
- "SIGXFSZ",
672
- "SIGUSR2",
673
- "SIGTRAP",
674
- "SIGSYS",
675
- "SIGQUIT",
676
- "SIGIOT"
677
- // should detect profiler and enable/disable accordingly.
678
- // see #21
679
- // 'SIGPROF'
680
- );
681
- process.platform === "linux" && module.exports.push(
682
- "SIGIO",
683
- "SIGPOLL",
684
- "SIGPWR",
685
- "SIGSTKFLT",
686
- "SIGUNUSED"
687
- );
688
- }
689
- });
690
-
691
- // node_modules/signal-exit/index.js
692
- var require_signal_exit = __commonJS({
693
- "node_modules/signal-exit/index.js"(exports, module) {
694
- var process2 = global.process, processOk = function(process3) {
695
- return process3 && typeof process3 == "object" && typeof process3.removeListener == "function" && typeof process3.emit == "function" && typeof process3.reallyExit == "function" && typeof process3.listeners == "function" && typeof process3.kill == "function" && typeof process3.pid == "number" && typeof process3.on == "function";
696
- };
697
- processOk(process2) ? (assert = __require("assert"), signals = require_signals(), isWin = /^win/i.test(process2.platform), EE = __require("events"), typeof EE != "function" && (EE = EE.EventEmitter), process2.__signal_exit_emitter__ ? emitter = process2.__signal_exit_emitter__ : (emitter = process2.__signal_exit_emitter__ = new EE(), emitter.count = 0, emitter.emitted = {}), emitter.infinite || (emitter.setMaxListeners(1 / 0), emitter.infinite = !0), module.exports = function(cb, opts) {
698
- if (!processOk(global.process))
699
- return function() {
700
- };
701
- assert.equal(typeof cb, "function", "a callback must be provided for exit handler"), loaded === !1 && load();
702
- var ev = "exit";
703
- opts && opts.alwaysLast && (ev = "afterexit");
704
- var remove = function() {
705
- emitter.removeListener(ev, cb), emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0 && unload();
706
- };
707
- return emitter.on(ev, cb), remove;
708
- }, unload = function() {
709
- !loaded || !processOk(global.process) || (loaded = !1, signals.forEach(function(sig) {
710
- try {
711
- process2.removeListener(sig, sigListeners[sig]);
712
- } catch {
713
- }
714
- }), process2.emit = originalProcessEmit, process2.reallyExit = originalProcessReallyExit, emitter.count -= 1);
715
- }, module.exports.unload = unload, emit = function(event, code, signal) {
716
- emitter.emitted[event] || (emitter.emitted[event] = !0, emitter.emit(event, code, signal));
717
- }, sigListeners = {}, signals.forEach(function(sig) {
718
- sigListeners[sig] = function() {
719
- if (processOk(global.process)) {
720
- var listeners = process2.listeners(sig);
721
- listeners.length === emitter.count && (unload(), emit("exit", null, sig), emit("afterexit", null, sig), isWin && sig === "SIGHUP" && (sig = "SIGINT"), process2.kill(process2.pid, sig));
722
- }
723
- };
724
- }), module.exports.signals = function() {
725
- return signals;
726
- }, loaded = !1, load = function() {
727
- loaded || !processOk(global.process) || (loaded = !0, emitter.count += 1, signals = signals.filter(function(sig) {
728
- try {
729
- return process2.on(sig, sigListeners[sig]), !0;
730
- } catch {
731
- return !1;
732
- }
733
- }), process2.emit = processEmit, process2.reallyExit = processReallyExit);
734
- }, module.exports.load = load, originalProcessReallyExit = process2.reallyExit, processReallyExit = function(code) {
735
- processOk(global.process) && (process2.exitCode = code || /* istanbul ignore next */
736
- 0, emit("exit", process2.exitCode, null), emit("afterexit", process2.exitCode, null), originalProcessReallyExit.call(process2, process2.exitCode));
737
- }, originalProcessEmit = process2.emit, processEmit = function(ev, arg) {
738
- if (ev === "exit" && processOk(global.process)) {
739
- arg !== void 0 && (process2.exitCode = arg);
740
- var ret = originalProcessEmit.apply(this, arguments);
741
- return emit("exit", process2.exitCode, null), emit("afterexit", process2.exitCode, null), ret;
742
- } else
743
- return originalProcessEmit.apply(this, arguments);
744
- }) : module.exports = function() {
745
- return function() {
746
- };
747
- };
748
- var assert, signals, isWin, EE, emitter, unload, emit, sigListeners, loaded, load, originalProcessReallyExit, processReallyExit, originalProcessEmit, processEmit;
749
- }
750
- });
751
-
752
- // node_modules/proper-lockfile/lib/mtime-precision.js
753
- var require_mtime_precision = __commonJS({
754
- "node_modules/proper-lockfile/lib/mtime-precision.js"(exports, module) {
755
- "use strict";
756
- var cacheSymbol = /* @__PURE__ */ Symbol();
757
- function probe(file, fs, callback) {
758
- let cachedPrecision = fs[cacheSymbol];
759
- if (cachedPrecision)
760
- return fs.stat(file, (err, stat) => {
761
- if (err)
762
- return callback(err);
763
- callback(null, stat.mtime, cachedPrecision);
764
- });
765
- let mtime = new Date(Math.ceil(Date.now() / 1e3) * 1e3 + 5);
766
- fs.utimes(file, mtime, mtime, (err) => {
767
- if (err)
768
- return callback(err);
769
- fs.stat(file, (err2, stat) => {
770
- if (err2)
771
- return callback(err2);
772
- let precision = stat.mtime.getTime() % 1e3 === 0 ? "s" : "ms";
773
- Object.defineProperty(fs, cacheSymbol, { value: precision }), callback(null, stat.mtime, precision);
774
- });
775
- });
776
- }
777
- function getMtime(precision) {
778
- let now = Date.now();
779
- return precision === "s" && (now = Math.ceil(now / 1e3) * 1e3), new Date(now);
780
- }
781
- module.exports.probe = probe;
782
- module.exports.getMtime = getMtime;
783
- }
784
- });
785
-
786
- // node_modules/proper-lockfile/lib/lockfile.js
787
- var require_lockfile = __commonJS({
788
- "node_modules/proper-lockfile/lib/lockfile.js"(exports, module) {
789
- "use strict";
790
- var path = __require("path"), fs = require_graceful_fs(), retry = require_retry2(), onExit = require_signal_exit(), mtimePrecision = require_mtime_precision(), locks = {};
791
- function getLockFile(file, options) {
792
- return options.lockfilePath || `${file}.lock`;
793
- }
794
- function resolveCanonicalPath(file, options, callback) {
795
- if (!options.realpath)
796
- return callback(null, path.resolve(file));
797
- options.fs.realpath(file, callback);
798
- }
799
- function acquireLock(file, options, callback) {
800
- let lockfilePath = getLockFile(file, options);
801
- options.fs.mkdir(lockfilePath, (err) => {
802
- if (!err)
803
- return mtimePrecision.probe(lockfilePath, options.fs, (err2, mtime, mtimePrecision2) => {
804
- if (err2)
805
- return options.fs.rmdir(lockfilePath, () => {
806
- }), callback(err2);
807
- callback(null, mtime, mtimePrecision2);
808
- });
809
- if (err.code !== "EEXIST")
810
- return callback(err);
811
- if (options.stale <= 0)
812
- return callback(Object.assign(new Error("Lock file is already being held"), { code: "ELOCKED", file }));
813
- options.fs.stat(lockfilePath, (err2, stat) => {
814
- if (err2)
815
- return err2.code === "ENOENT" ? acquireLock(file, { ...options, stale: 0 }, callback) : callback(err2);
816
- if (!isLockStale(stat, options))
817
- return callback(Object.assign(new Error("Lock file is already being held"), { code: "ELOCKED", file }));
818
- removeLock(file, options, (err3) => {
819
- if (err3)
820
- return callback(err3);
821
- acquireLock(file, { ...options, stale: 0 }, callback);
822
- });
823
- });
824
- });
825
- }
826
- function isLockStale(stat, options) {
827
- return stat.mtime.getTime() < Date.now() - options.stale;
828
- }
829
- function removeLock(file, options, callback) {
830
- options.fs.rmdir(getLockFile(file, options), (err) => {
831
- if (err && err.code !== "ENOENT")
832
- return callback(err);
833
- callback();
834
- });
835
- }
836
- function updateLock(file, options) {
837
- let lock2 = locks[file];
838
- lock2.updateTimeout || (lock2.updateDelay = lock2.updateDelay || options.update, lock2.updateTimeout = setTimeout(() => {
839
- lock2.updateTimeout = null, options.fs.stat(lock2.lockfilePath, (err, stat) => {
840
- let isOverThreshold = lock2.lastUpdate + options.stale < Date.now();
841
- if (err)
842
- return err.code === "ENOENT" || isOverThreshold ? setLockAsCompromised(file, lock2, Object.assign(err, { code: "ECOMPROMISED" })) : (lock2.updateDelay = 1e3, updateLock(file, options));
843
- if (!(lock2.mtime.getTime() === stat.mtime.getTime()))
844
- return setLockAsCompromised(
845
- file,
846
- lock2,
847
- Object.assign(
848
- new Error("Unable to update lock within the stale threshold"),
849
- { code: "ECOMPROMISED" }
850
- )
851
- );
852
- let mtime = mtimePrecision.getMtime(lock2.mtimePrecision);
853
- options.fs.utimes(lock2.lockfilePath, mtime, mtime, (err2) => {
854
- let isOverThreshold2 = lock2.lastUpdate + options.stale < Date.now();
855
- if (!lock2.released) {
856
- if (err2)
857
- return err2.code === "ENOENT" || isOverThreshold2 ? setLockAsCompromised(file, lock2, Object.assign(err2, { code: "ECOMPROMISED" })) : (lock2.updateDelay = 1e3, updateLock(file, options));
858
- lock2.mtime = mtime, lock2.lastUpdate = Date.now(), lock2.updateDelay = null, updateLock(file, options);
859
- }
860
- });
861
- });
862
- }, lock2.updateDelay), lock2.updateTimeout.unref && lock2.updateTimeout.unref());
863
- }
864
- function setLockAsCompromised(file, lock2, err) {
865
- lock2.released = !0, lock2.updateTimeout && clearTimeout(lock2.updateTimeout), locks[file] === lock2 && delete locks[file], lock2.options.onCompromised(err);
866
- }
867
- function lock(file, options, callback) {
868
- options = {
869
- stale: 1e4,
870
- update: null,
871
- realpath: !0,
872
- retries: 0,
873
- fs,
874
- onCompromised: (err) => {
875
- throw err;
876
- },
877
- ...options
878
- }, options.retries = options.retries || 0, options.retries = typeof options.retries == "number" ? { retries: options.retries } : options.retries, options.stale = Math.max(options.stale || 0, 2e3), options.update = options.update == null ? options.stale / 2 : options.update || 0, options.update = Math.max(Math.min(options.update, options.stale / 2), 1e3), resolveCanonicalPath(file, options, (err, file2) => {
879
- if (err)
880
- return callback(err);
881
- let operation = retry.operation(options.retries);
882
- operation.attempt(() => {
883
- acquireLock(file2, options, (err2, mtime, mtimePrecision2) => {
884
- if (operation.retry(err2))
885
- return;
886
- if (err2)
887
- return callback(operation.mainError());
888
- let lock2 = locks[file2] = {
889
- lockfilePath: getLockFile(file2, options),
890
- mtime,
891
- mtimePrecision: mtimePrecision2,
892
- options,
893
- lastUpdate: Date.now()
894
- };
895
- updateLock(file2, options), callback(null, (releasedCallback) => {
896
- if (lock2.released)
897
- return releasedCallback && releasedCallback(Object.assign(new Error("Lock is already released"), { code: "ERELEASED" }));
898
- unlock(file2, { ...options, realpath: !1 }, releasedCallback);
899
- });
900
- });
901
- });
902
- });
903
- }
904
- function unlock(file, options, callback) {
905
- options = {
906
- fs,
907
- realpath: !0,
908
- ...options
909
- }, resolveCanonicalPath(file, options, (err, file2) => {
910
- if (err)
911
- return callback(err);
912
- let lock2 = locks[file2];
913
- if (!lock2)
914
- return callback(Object.assign(new Error("Lock is not acquired/owned by you"), { code: "ENOTACQUIRED" }));
915
- lock2.updateTimeout && clearTimeout(lock2.updateTimeout), lock2.released = !0, delete locks[file2], removeLock(file2, options, callback);
916
- });
917
- }
918
- function check(file, options, callback) {
919
- options = {
920
- stale: 1e4,
921
- realpath: !0,
922
- fs,
923
- ...options
924
- }, options.stale = Math.max(options.stale || 0, 2e3), resolveCanonicalPath(file, options, (err, file2) => {
925
- if (err)
926
- return callback(err);
927
- options.fs.stat(getLockFile(file2, options), (err2, stat) => err2 ? err2.code === "ENOENT" ? callback(null, !1) : callback(err2) : callback(null, !isLockStale(stat, options)));
928
- });
929
- }
930
- function getLocks() {
931
- return locks;
932
- }
933
- onExit(() => {
934
- for (let file in locks) {
935
- let options = locks[file].options;
936
- try {
937
- options.fs.rmdirSync(getLockFile(file, options));
938
- } catch {
939
- }
940
- }
941
- });
942
- module.exports.lock = lock;
943
- module.exports.unlock = unlock;
944
- module.exports.check = check;
945
- module.exports.getLocks = getLocks;
946
- }
947
- });
948
-
949
- // node_modules/proper-lockfile/lib/adapter.js
950
- var require_adapter = __commonJS({
951
- "node_modules/proper-lockfile/lib/adapter.js"(exports, module) {
952
- "use strict";
953
- var fs = require_graceful_fs();
954
- function createSyncFs(fs2) {
955
- let methods = ["mkdir", "realpath", "stat", "rmdir", "utimes"], newFs = { ...fs2 };
956
- return methods.forEach((method) => {
957
- newFs[method] = (...args) => {
958
- let callback = args.pop(), ret;
959
- try {
960
- ret = fs2[`${method}Sync`](...args);
961
- } catch (err) {
962
- return callback(err);
963
- }
964
- callback(null, ret);
965
- };
966
- }), newFs;
967
- }
968
- function toPromise(method) {
969
- return (...args) => new Promise((resolve, reject) => {
970
- args.push((err, result) => {
971
- err ? reject(err) : resolve(result);
972
- }), method(...args);
973
- });
974
- }
975
- function toSync(method) {
976
- return (...args) => {
977
- let err, result;
978
- if (args.push((_err, _result) => {
979
- err = _err, result = _result;
980
- }), method(...args), err)
981
- throw err;
982
- return result;
983
- };
984
- }
985
- function toSyncOptions(options) {
986
- if (options = { ...options }, options.fs = createSyncFs(options.fs || fs), typeof options.retries == "number" && options.retries > 0 || options.retries && typeof options.retries.retries == "number" && options.retries.retries > 0)
987
- throw Object.assign(new Error("Cannot use retries with the sync api"), { code: "ESYNC" });
988
- return options;
989
- }
990
- module.exports = {
991
- toPromise,
992
- toSync,
993
- toSyncOptions
994
- };
995
- }
996
- });
997
-
998
- // node_modules/proper-lockfile/index.js
999
- var require_proper_lockfile = __commonJS({
1000
- "node_modules/proper-lockfile/index.js"(exports, module) {
1001
- "use strict";
1002
- var lockfile2 = require_lockfile(), { toPromise, toSync, toSyncOptions } = require_adapter();
1003
- async function lock(file, options) {
1004
- let release = await toPromise(lockfile2.lock)(file, options);
1005
- return toPromise(release);
1006
- }
1007
- function lockSync(file, options) {
1008
- let release = toSync(lockfile2.lock)(file, toSyncOptions(options));
1009
- return toSync(release);
1010
- }
1011
- function unlock(file, options) {
1012
- return toPromise(lockfile2.unlock)(file, options);
1013
- }
1014
- function unlockSync(file, options) {
1015
- return toSync(lockfile2.unlock)(file, toSyncOptions(options));
1016
- }
1017
- function check(file, options) {
1018
- return toPromise(lockfile2.check)(file, options);
1019
- }
1020
- function checkSync(file, options) {
1021
- return toSync(lockfile2.check)(file, toSyncOptions(options));
1022
- }
1023
- module.exports = lock;
1024
- module.exports.lock = lock;
1025
- module.exports.unlock = unlock;
1026
- module.exports.lockSync = lockSync;
1027
- module.exports.unlockSync = unlockSync;
1028
- module.exports.check = check;
1029
- module.exports.checkSync = checkSync;
1030
- }
1031
- });
1032
-
1033
30
  // node_modules/undici/lib/core/symbols.js
1034
31
  var require_symbols = __commonJS({
1035
32
  "node_modules/undici/lib/core/symbols.js"(exports, module) {
@@ -11849,7 +10846,7 @@ var require_response_error = __commonJS({
11849
10846
  });
11850
10847
 
11851
10848
  // node_modules/undici/lib/interceptor/retry.js
11852
- var require_retry3 = __commonJS({
10849
+ var require_retry = __commonJS({
11853
10850
  "node_modules/undici/lib/interceptor/retry.js"(exports, module) {
11854
10851
  "use strict";
11855
10852
  var RetryHandler = require_retry_handler();
@@ -19240,7 +18237,7 @@ var require_undici = __commonJS({
19240
18237
  module.exports.interceptors = {
19241
18238
  redirect: require_redirect(),
19242
18239
  responseError: require_response_error(),
19243
- retry: require_retry3(),
18240
+ retry: require_retry(),
19244
18241
  dump: require_dump(),
19245
18242
  dns: require_dns(),
19246
18243
  cache: require_cache2(),
@@ -19845,12 +18842,24 @@ var FileSettingsStorage = class {
19845
18842
  let value = this.settings.memoryCharCap;
19846
18843
  return typeof value == "number" && Number.isFinite(value) ? Math.min(MEMORY_CHAR_CAP_MAX, Math.max(MEMORY_CHAR_CAP_MIN, Math.floor(value))) : MEMORY_CHAR_CAP_DEFAULT;
19847
18844
  }
18845
+ getBrowserEnabled() {
18846
+ return this.globalSettings.browserEnabled ?? browserEnabledDefault();
18847
+ }
18848
+ setBrowserEnabled(enabled) {
18849
+ this.globalSettings.browserEnabled = enabled, this.markModified("browserEnabled"), this.save(), notifyBrowserEnabledChange(enabled);
18850
+ }
19848
18851
  getMemoryEnabled() {
19849
18852
  return this.globalSettings.memoryEnabled ?? !0;
19850
18853
  }
19851
18854
  setMemoryEnabled(enabled) {
19852
18855
  this.globalSettings.memoryEnabled = enabled, this.markModified("memoryEnabled"), this.save();
19853
18856
  }
18857
+ getTodosEnabled() {
18858
+ return this.globalSettings.todosEnabled ?? !0;
18859
+ }
18860
+ setTodosEnabled(enabled) {
18861
+ this.globalSettings.todosEnabled = enabled, this.markModified("todosEnabled"), this.save();
18862
+ }
19854
18863
  setMemoryCharCap(cap) {
19855
18864
  this.globalSettings.memoryCharCap = Math.min(MEMORY_CHAR_CAP_MAX, Math.max(MEMORY_CHAR_CAP_MIN, Math.floor(cap))), this.markModified("memoryCharCap"), this.save();
19856
18865
  }
@@ -20199,7 +19208,6 @@ function tierThinkingKey(tier) {
20199
19208
  }
20200
19209
 
20201
19210
  export {
20202
- require_proper_lockfile,
20203
19211
  HTTP_IDLE_TIMEOUT_CHOICES,
20204
19212
  formatHttpIdleTimeoutMs,
20205
19213
  applyHttpProxySettings,