@ashx-j/lunr-dev 0.2.16-dev.9.1 → 0.2.19-dev.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/CHANGELOG.md +32 -1
  2. package/README.md +7 -1
  3. package/dist/builtin-extensions/ashxj-thinking.d.ts +1 -0
  4. package/dist/builtin-extensions/ashxj-thinking.d.ts.map +1 -1
  5. package/dist/builtin-extensions/ashxj-thinking.js +44 -19
  6. package/dist/builtin-extensions/ashxj-thinking.js.map +1 -1
  7. package/dist/builtin-extensions/index.d.ts.map +1 -1
  8. package/dist/builtin-extensions/index.js +1 -0
  9. package/dist/builtin-extensions/index.js.map +1 -1
  10. package/dist/builtin-extensions/lunr-computer-use.d.ts +3 -0
  11. package/dist/builtin-extensions/lunr-computer-use.d.ts.map +1 -0
  12. package/dist/builtin-extensions/lunr-computer-use.js +157 -0
  13. package/dist/builtin-extensions/lunr-computer-use.js.map +1 -0
  14. package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts.map +1 -1
  15. package/dist/builtin-extensions/pi-lsp-extension/src/index.js +10 -3
  16. package/dist/builtin-extensions/pi-lsp-extension/src/index.js.map +1 -1
  17. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts +5 -1
  18. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts.map +1 -1
  19. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js +26 -4
  20. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js.map +1 -1
  21. package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
  22. package/dist/builtin-extensions/pi-mcp-adapter/index.js +37 -27
  23. package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
  24. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts +6 -1
  25. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts.map +1 -1
  26. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js +33 -8
  27. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js.map +1 -1
  28. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
  29. package/dist/builtin-extensions/pi-subagents/src/extension/index.js +52 -23
  30. package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
  31. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
  32. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +6 -2
  33. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
  34. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts +1 -1
  35. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
  36. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +5 -2
  37. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
  38. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.d.ts +10 -0
  39. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.d.ts.map +1 -0
  40. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.js +38 -0
  41. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.js.map +1 -0
  42. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
  43. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +3 -16
  44. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
  45. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts +1 -1
  46. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts.map +1 -1
  47. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js +2 -0
  48. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js.map +1 -1
  49. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +1 -0
  50. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
  51. package/dist/builtin-extensions/pi-subagents/src/tui/render.js +70 -30
  52. package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
  53. package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
  54. package/dist/builtin-extensions/pi-web-access/index.js +103 -102
  55. package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
  56. package/dist/core/agent-session-services.d.ts.map +1 -1
  57. package/dist/core/agent-session-services.js +1 -1
  58. package/dist/core/agent-session-services.js.map +1 -1
  59. package/dist/core/computer-use/adapter.d.ts +23 -0
  60. package/dist/core/computer-use/adapter.d.ts.map +1 -0
  61. package/dist/core/computer-use/adapter.js +116 -0
  62. package/dist/core/computer-use/adapter.js.map +1 -0
  63. package/dist/core/computer-use/lease.d.ts +18 -0
  64. package/dist/core/computer-use/lease.d.ts.map +1 -0
  65. package/dist/core/computer-use/lease.js +129 -0
  66. package/dist/core/computer-use/lease.js.map +1 -0
  67. package/dist/core/computer-use/macos-runtime.d.ts +14 -0
  68. package/dist/core/computer-use/macos-runtime.d.ts.map +1 -0
  69. package/dist/core/computer-use/macos-runtime.js +148 -0
  70. package/dist/core/computer-use/macos-runtime.js.map +1 -0
  71. package/dist/core/computer-use/policy.d.ts +19 -0
  72. package/dist/core/computer-use/policy.d.ts.map +1 -0
  73. package/dist/core/computer-use/policy.js +66 -0
  74. package/dist/core/computer-use/policy.js.map +1 -0
  75. package/dist/core/computer-use/release.generated.d.ts +31 -0
  76. package/dist/core/computer-use/release.generated.d.ts.map +1 -0
  77. package/dist/core/computer-use/release.generated.js +36 -0
  78. package/dist/core/computer-use/release.generated.js.map +1 -0
  79. package/dist/core/computer-use/runtime.d.ts +13 -0
  80. package/dist/core/computer-use/runtime.d.ts.map +1 -0
  81. package/dist/core/computer-use/runtime.js +158 -0
  82. package/dist/core/computer-use/runtime.js.map +1 -0
  83. package/dist/core/computer-use/schemas.d.ts +88 -0
  84. package/dist/core/computer-use/schemas.d.ts.map +1 -0
  85. package/dist/core/computer-use/schemas.js +80 -0
  86. package/dist/core/computer-use/schemas.js.map +1 -0
  87. package/dist/core/computer-use/windows-desktop.d.ts +3 -0
  88. package/dist/core/computer-use/windows-desktop.d.ts.map +1 -0
  89. package/dist/core/computer-use/windows-desktop.js +48 -0
  90. package/dist/core/computer-use/windows-desktop.js.map +1 -0
  91. package/dist/core/computer-use/workflow.d.ts +24 -0
  92. package/dist/core/computer-use/workflow.d.ts.map +1 -0
  93. package/dist/core/computer-use/workflow.js +330 -0
  94. package/dist/core/computer-use/workflow.js.map +1 -0
  95. package/dist/core/keybindings.d.ts +2 -2
  96. package/dist/core/keybindings.d.ts.map +1 -1
  97. package/dist/core/keybindings.js +2 -2
  98. package/dist/core/keybindings.js.map +1 -1
  99. package/dist/core/model-runtime.d.ts +0 -3
  100. package/dist/core/model-runtime.d.ts.map +1 -1
  101. package/dist/core/model-runtime.js +1 -10
  102. package/dist/core/model-runtime.js.map +1 -1
  103. package/dist/core/package-manager.d.ts.map +1 -1
  104. package/dist/core/package-manager.js +1 -1
  105. package/dist/core/package-manager.js.map +1 -1
  106. package/dist/core/permissions.d.ts +1 -1
  107. package/dist/core/permissions.d.ts.map +1 -1
  108. package/dist/core/permissions.js +23 -7
  109. package/dist/core/permissions.js.map +1 -1
  110. package/dist/core/plan-mode.d.ts.map +1 -1
  111. package/dist/core/plan-mode.js +9 -0
  112. package/dist/core/plan-mode.js.map +1 -1
  113. package/dist/core/rollback.d.ts.map +1 -1
  114. package/dist/core/rollback.js +13 -90
  115. package/dist/core/rollback.js.map +1 -1
  116. package/dist/core/session-manager.d.ts +0 -1
  117. package/dist/core/session-manager.d.ts.map +1 -1
  118. package/dist/core/session-manager.js +21 -79
  119. package/dist/core/session-manager.js.map +1 -1
  120. package/dist/core/settings-manager.d.ts +6 -0
  121. package/dist/core/settings-manager.d.ts.map +1 -1
  122. package/dist/core/settings-manager.js +19 -0
  123. package/dist/core/settings-manager.js.map +1 -1
  124. package/dist/dev-cli.js +0 -0
  125. package/dist/gateway/agent-bridge.d.ts +6 -1
  126. package/dist/gateway/agent-bridge.d.ts.map +1 -1
  127. package/dist/gateway/agent-bridge.js +23 -6
  128. package/dist/gateway/agent-bridge.js.map +1 -1
  129. package/dist/gateway/cron.d.ts +1 -1
  130. package/dist/gateway/cron.d.ts.map +1 -1
  131. package/dist/gateway/cron.js +23 -7
  132. package/dist/gateway/cron.js.map +1 -1
  133. package/dist/modes/interactive/components/footer.d.ts +4 -2
  134. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  135. package/dist/modes/interactive/components/footer.js +23 -32
  136. package/dist/modes/interactive/components/footer.js.map +1 -1
  137. package/dist/modes/interactive/components/processes-selector.d.ts +2 -3
  138. package/dist/modes/interactive/components/processes-selector.d.ts.map +1 -1
  139. package/dist/modes/interactive/components/processes-selector.js +5 -10
  140. package/dist/modes/interactive/components/processes-selector.js.map +1 -1
  141. package/dist/modes/interactive/components/settings-selector.d.ts +4 -0
  142. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  143. package/dist/modes/interactive/components/settings-selector.js +20 -0
  144. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  145. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  146. package/dist/modes/interactive/interactive-mode.js +18 -8
  147. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  148. package/dist/modes/interactive/thinking-level-slash.d.ts +4 -0
  149. package/dist/modes/interactive/thinking-level-slash.d.ts.map +1 -0
  150. package/dist/modes/interactive/thinking-level-slash.js +23 -0
  151. package/dist/modes/interactive/thinking-level-slash.js.map +1 -0
  152. package/dist/node-runtime/adapter-AZMY335J.js +279 -0
  153. package/dist/node-runtime/{agent-session-services-IFJMSX7Z.js → agent-session-services-RSGP5GDN.js} +15 -12
  154. package/dist/node-runtime/{builtin-extensions-LYZ3BFWQ.js → builtin-extensions-7STLFW3A.js} +4 -3
  155. package/dist/node-runtime/chunk-2IDTZAG5.js +1415 -0
  156. package/dist/node-runtime/{chunk-7NBZ5P7I.js → chunk-4SJWFTUP.js} +1 -1
  157. package/dist/node-runtime/{chunk-AJX357CL.js → chunk-5NWQCSKR.js} +20 -1013
  158. package/dist/node-runtime/chunk-5OLJGVCB.js +68 -0
  159. package/dist/node-runtime/chunk-5Q45AVQG.js +108 -0
  160. package/dist/node-runtime/{chunk-TQNSPERU.js → chunk-5SQDLSZJ.js} +1 -1
  161. package/dist/node-runtime/{chunk-F4VQFJI2.js → chunk-6SPPH4FY.js} +4 -4
  162. package/dist/node-runtime/{chunk-PBC2Y6GS.js → chunk-6UB6NKA3.js} +29 -72
  163. package/dist/node-runtime/{chunk-A2KQXUJD.js → chunk-7AFOFSDY.js} +1 -1
  164. package/dist/node-runtime/chunk-BKAZ6BKX.js +2185 -0
  165. package/dist/node-runtime/{chunk-AHSTJBIB.js → chunk-EH2LJQPM.js} +4 -4
  166. package/dist/node-runtime/{chunk-N77MY65L.js → chunk-FLYMHKCS.js} +25 -25
  167. package/dist/node-runtime/{chunk-5P7PZMRU.js → chunk-HRS4HMDX.js} +1 -1
  168. package/dist/node-runtime/{chunk-IPA627GP.js → chunk-ISQDQIZN.js} +4 -4
  169. package/dist/node-runtime/{chunk-WJVFOIB5.js → chunk-J7QGQD45.js} +1 -1
  170. package/dist/node-runtime/{chunk-WOVTOV5P.js → chunk-JT6YCS5B.js} +29 -34
  171. package/dist/node-runtime/chunk-JZHEUQRL.js +180 -0
  172. package/dist/node-runtime/{chunk-ZKMFUD3Q.js → chunk-K72NVGUB.js} +3 -3
  173. package/dist/node-runtime/{chunk-ECD5L7YI.js → chunk-LCACDWHJ.js} +389 -15
  174. package/dist/node-runtime/{chunk-2QKLKMKC.js → chunk-LTXUQJI4.js} +1 -1
  175. package/dist/node-runtime/{chunk-MKKH27PH.js → chunk-LWJXTA6Z.js} +274 -2416
  176. package/dist/node-runtime/{chunk-EDBJNRSM.js → chunk-MGSB2C3M.js} +1 -1
  177. package/dist/node-runtime/{chunk-CDFZEWPU.js → chunk-MUMMMTW4.js} +6 -2
  178. package/dist/node-runtime/{chunk-YF63P5ZT.js → chunk-OTT6JMPU.js} +10 -67
  179. package/dist/node-runtime/{chunk-PGAJ5MO5.js → chunk-T5GM5BFH.js} +1 -1
  180. package/dist/node-runtime/{chunk-PCGNAY2O.js → chunk-TAP7QTUT.js} +38 -16
  181. package/dist/node-runtime/{chunk-4TLO4PO2.js → chunk-U6C7VTR5.js} +7 -1401
  182. package/dist/node-runtime/chunk-URD2SLIT.js +1019 -0
  183. package/dist/node-runtime/{chunk-QH42CDX3.js → chunk-W7S2REEG.js} +111 -84
  184. package/dist/node-runtime/{chunk-LZAW4ZX3.js → chunk-ZRDIMBEQ.js} +27 -9
  185. package/dist/node-runtime/{chunk-AD6VXAO7.js → chunk-ZSEZY3II.js} +5 -100
  186. package/dist/node-runtime/cli-runtime.js +1 -1
  187. package/dist/node-runtime/{command-L3LAHDIH.js → command-6UXQ6XZN.js} +1 -1
  188. package/dist/node-runtime/{commands-RL5YBW5I.js → commands-LGR5VT5X.js} +6 -4
  189. package/dist/node-runtime/{direct-tool-executor-JVDXTO7A.js → direct-tool-executor-TDJS7TBD.js} +9 -6
  190. package/dist/node-runtime/{export-html-KR26FOUZ.js → export-html-E4DT6ZJQ.js} +1 -1
  191. package/dist/node-runtime/{extract-XLQSJN4V.js → extract-IUCVZCWC.js} +2 -2
  192. package/dist/node-runtime/{gateway-X2TI5X7F.js → gateway-3OLC4GQN.js} +22 -367
  193. package/dist/node-runtime/{gemini-search-U7SUMPQA.js → gemini-search-NCIDF7NE.js} +1 -1
  194. package/dist/node-runtime/{gemini-url-context-PXWCBQHK.js → gemini-url-context-OKIN7AIP.js} +2 -2
  195. package/dist/node-runtime/image-resize-6ZPBFMWW.js +11 -0
  196. package/dist/node-runtime/index.js +53 -49
  197. package/dist/node-runtime/{init-NJV2T55N.js → init-EKE277AG.js} +6 -4
  198. package/dist/node-runtime/{interactive-mode-KOM35YF2.js → interactive-mode-S5M26CQ7.js} +20 -17
  199. package/dist/node-runtime/{interactive-view-U6OILKF3.js → interactive-view-N6F4KUIT.js} +3 -5
  200. package/dist/node-runtime/lunr-computer-use-4X3KUNF4.js +206 -0
  201. package/dist/node-runtime/{lunr-cron-YJ5UHYRD.js → lunr-cron-KKBOGAEF.js} +7 -1
  202. package/dist/node-runtime/main.js +24 -21
  203. package/dist/node-runtime/{mcp-auth-flow-QIXHW6QN.js → mcp-auth-flow-YL6RWPYG.js} +2 -1
  204. package/dist/node-runtime/{package-manager-cli-TZZHJCVI.js → package-manager-cli-C4EJOO5Q.js} +8 -6
  205. package/dist/node-runtime/{pi-mcp-adapter-QFB37AVN.js → pi-mcp-adapter-DPTJGAAL.js} +33 -27
  206. package/dist/node-runtime/{pi-subagents-7XJ4H53P.js → pi-subagents-VKCLYIBY.js} +103 -76
  207. package/dist/node-runtime/{pi-web-access-DPGAVKOA.js → pi-web-access-BV6DSZOP.js} +72 -69
  208. package/dist/node-runtime/{proxy-modes-HEEFK4KC.js → proxy-modes-R64LU6WZ.js} +12 -9
  209. package/dist/node-runtime/rpc-entry.js +24 -21
  210. package/dist/node-runtime/runtime-3SB5ATHQ.js +21 -0
  211. package/dist/node-runtime/{runtime-bridges-PPHNBFWL.js → runtime-bridges-UJ5WJJLN.js} +3 -3
  212. package/dist/node-runtime/{session-manager-MQNBYACL.js → session-manager-QEMZBMTM.js} +3 -5
  213. package/dist/node-runtime/{session-selector-5AZLJS6U.js → session-selector-URVJLOTK.js} +2 -2
  214. package/dist/node-runtime/{settings-manager-5LF2VQWC.js → settings-manager-K6IPIQTI.js} +3 -1
  215. package/dist/node-runtime/{src-Y7JSCK64.js → src-GPFAU3N6.js} +30 -10
  216. package/dist/node-runtime/{subagent-executor-5RNDEPIJ.js → subagent-executor-EFLTO32A.js} +39 -21
  217. package/dist/node-runtime/{update-cli-A253SZ7P.js → update-cli-I6OVDRPL.js} +3 -1
  218. package/dist/node-runtime/{video-extract-OYT5WKS5.js → video-extract-ETA5RA7U.js} +2 -2
  219. package/dist/node-runtime/workflow-SA34S4VX.js +325 -0
  220. package/dist/node-runtime/{youtube-extract-TQYKGFGS.js → youtube-extract-SRVGNN26.js} +2 -2
  221. package/dist/rpc.d.ts +3 -0
  222. package/dist/rpc.d.ts.map +1 -0
  223. package/dist/rpc.js +18 -0
  224. package/dist/rpc.js.map +1 -0
  225. package/dist/startup/interactive-view.d.ts.map +1 -1
  226. package/dist/startup/interactive-view.js +1 -2
  227. package/dist/startup/interactive-view.js.map +1 -1
  228. package/docs/computer-use.md +277 -0
  229. package/docs/development.md +0 -32
  230. package/docs/features.md +2 -2
  231. package/docs/interactive-startup.md +10 -3
  232. package/docs/keybindings.md +2 -2
  233. package/docs/terminal-setup.md +1 -1
  234. package/docs/usage.md +1 -1
  235. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  236. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  237. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  238. package/examples/extensions/gondolin/package-lock.json +2 -2
  239. package/examples/extensions/gondolin/package.json +1 -1
  240. package/examples/extensions/hidden-thinking-label.ts +1 -1
  241. package/examples/extensions/sandbox/package-lock.json +2 -2
  242. package/examples/extensions/sandbox/package.json +1 -1
  243. package/examples/extensions/with-deps/package-lock.json +2 -2
  244. package/examples/extensions/with-deps/package.json +1 -1
  245. package/install-lock/package-lock.json +3827 -0
  246. package/install-lock/package.json +18 -0
  247. package/native/computer-use/LICENSE.md +21 -0
  248. package/npm-shrinkwrap.json +3808 -0
  249. package/package.json +16 -10
  250. package/dist/startup/interactive-shell.d.ts +0 -55
  251. package/dist/startup/interactive-shell.d.ts.map +0 -1
  252. package/dist/startup/interactive-shell.js +0 -264
  253. package/dist/startup/interactive-shell.js.map +0 -1
  254. package/dist/node-runtime/{chunk-YSKSB3BJ.js → chunk-CH6OL6P2.js} +2 -2
  255. package/dist/node-runtime/{chunk-VSELYKWU.js → chunk-EHMBW7FA.js} +3 -3
@@ -1,4 +1,10 @@
1
1
  import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ require_proper_lockfile
4
+ } from "./chunk-URD2SLIT.js";
5
+ import {
6
+ computerSettingsChanged
7
+ } from "./chunk-5OLJGVCB.js";
2
8
  import {
3
9
  MEMORY_CHAR_CAP_DEFAULT,
4
10
  MEMORY_CHAR_CAP_MAX,
@@ -16,1016 +22,6 @@ import {
16
22
  __toESM
17
23
  } from "./chunk-BRJX2PRC.js";
18
24
 
19
- // node_modules/graceful-fs/polyfills.js
20
- var require_polyfills = __commonJS({
21
- "node_modules/graceful-fs/polyfills.js"(exports, module) {
22
- var constants = __require("constants"), origCwd = process.cwd, cwd = null, platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
23
- process.cwd = function() {
24
- return cwd || (cwd = origCwd.call(process)), cwd;
25
- };
26
- try {
27
- process.cwd();
28
- } catch {
29
- }
30
- typeof process.chdir == "function" && (chdir = process.chdir, process.chdir = function(d) {
31
- cwd = null, chdir.call(process, d);
32
- }, Object.setPrototypeOf && Object.setPrototypeOf(process.chdir, chdir));
33
- var chdir;
34
- module.exports = patch;
35
- function patch(fs) {
36
- 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) {
37
- cb && process.nextTick(cb);
38
- }, fs.lchmodSync = function() {
39
- }), fs.chown && !fs.lchown && (fs.lchown = function(path, uid, gid, cb) {
40
- cb && process.nextTick(cb);
41
- }, fs.lchownSync = function() {
42
- }), platform === "win32" && (fs.rename = typeof fs.rename != "function" ? fs.rename : (function(fs$rename) {
43
- function rename(from, to, cb) {
44
- var start = Date.now(), backoff = 0;
45
- fs$rename(from, to, function CB(er) {
46
- if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
47
- setTimeout(function() {
48
- fs.stat(to, function(stater, st) {
49
- stater && stater.code === "ENOENT" ? fs$rename(from, to, CB) : cb(er);
50
- });
51
- }, backoff), backoff < 100 && (backoff += 10);
52
- return;
53
- }
54
- cb && cb(er);
55
- });
56
- }
57
- return Object.setPrototypeOf && Object.setPrototypeOf(rename, fs$rename), rename;
58
- })(fs.rename)), fs.read = typeof fs.read != "function" ? fs.read : (function(fs$read) {
59
- function read(fd, buffer, offset, length, position, callback_) {
60
- var callback;
61
- if (callback_ && typeof callback_ == "function") {
62
- var eagCounter = 0;
63
- callback = function(er, _, __) {
64
- if (er && er.code === "EAGAIN" && eagCounter < 10)
65
- return eagCounter++, fs$read.call(fs, fd, buffer, offset, length, position, callback);
66
- callback_.apply(this, arguments);
67
- };
68
- }
69
- return fs$read.call(fs, fd, buffer, offset, length, position, callback);
70
- }
71
- return Object.setPrototypeOf && Object.setPrototypeOf(read, fs$read), read;
72
- })(fs.read), fs.readSync = typeof fs.readSync != "function" ? fs.readSync : /* @__PURE__ */ (function(fs$readSync) {
73
- return function(fd, buffer, offset, length, position) {
74
- for (var eagCounter = 0; ; )
75
- try {
76
- return fs$readSync.call(fs, fd, buffer, offset, length, position);
77
- } catch (er) {
78
- if (er.code === "EAGAIN" && eagCounter < 10) {
79
- eagCounter++;
80
- continue;
81
- }
82
- throw er;
83
- }
84
- };
85
- })(fs.readSync);
86
- function patchLchmod(fs2) {
87
- fs2.lchmod = function(path, mode, callback) {
88
- fs2.open(
89
- path,
90
- constants.O_WRONLY | constants.O_SYMLINK,
91
- mode,
92
- function(err, fd) {
93
- if (err) {
94
- callback && callback(err);
95
- return;
96
- }
97
- fs2.fchmod(fd, mode, function(err2) {
98
- fs2.close(fd, function(err22) {
99
- callback && callback(err2 || err22);
100
- });
101
- });
102
- }
103
- );
104
- }, fs2.lchmodSync = function(path, mode) {
105
- var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode), threw = !0, ret;
106
- try {
107
- ret = fs2.fchmodSync(fd, mode), threw = !1;
108
- } finally {
109
- if (threw)
110
- try {
111
- fs2.closeSync(fd);
112
- } catch {
113
- }
114
- else
115
- fs2.closeSync(fd);
116
- }
117
- return ret;
118
- };
119
- }
120
- function patchLutimes(fs2) {
121
- constants.hasOwnProperty("O_SYMLINK") && fs2.futimes ? (fs2.lutimes = function(path, at, mt, cb) {
122
- fs2.open(path, constants.O_SYMLINK, function(er, fd) {
123
- if (er) {
124
- cb && cb(er);
125
- return;
126
- }
127
- fs2.futimes(fd, at, mt, function(er2) {
128
- fs2.close(fd, function(er22) {
129
- cb && cb(er2 || er22);
130
- });
131
- });
132
- });
133
- }, fs2.lutimesSync = function(path, at, mt) {
134
- var fd = fs2.openSync(path, constants.O_SYMLINK), ret, threw = !0;
135
- try {
136
- ret = fs2.futimesSync(fd, at, mt), threw = !1;
137
- } finally {
138
- if (threw)
139
- try {
140
- fs2.closeSync(fd);
141
- } catch {
142
- }
143
- else
144
- fs2.closeSync(fd);
145
- }
146
- return ret;
147
- }) : fs2.futimes && (fs2.lutimes = function(_a, _b, _c, cb) {
148
- cb && process.nextTick(cb);
149
- }, fs2.lutimesSync = function() {
150
- });
151
- }
152
- function chmodFix(orig) {
153
- return orig && function(target, mode, cb) {
154
- return orig.call(fs, target, mode, function(er) {
155
- chownErOk(er) && (er = null), cb && cb.apply(this, arguments);
156
- });
157
- };
158
- }
159
- function chmodFixSync(orig) {
160
- return orig && function(target, mode) {
161
- try {
162
- return orig.call(fs, target, mode);
163
- } catch (er) {
164
- if (!chownErOk(er)) throw er;
165
- }
166
- };
167
- }
168
- function chownFix(orig) {
169
- return orig && function(target, uid, gid, cb) {
170
- return orig.call(fs, target, uid, gid, function(er) {
171
- chownErOk(er) && (er = null), cb && cb.apply(this, arguments);
172
- });
173
- };
174
- }
175
- function chownFixSync(orig) {
176
- return orig && function(target, uid, gid) {
177
- try {
178
- return orig.call(fs, target, uid, gid);
179
- } catch (er) {
180
- if (!chownErOk(er)) throw er;
181
- }
182
- };
183
- }
184
- function statFix(orig) {
185
- return orig && function(target, options, cb) {
186
- typeof options == "function" && (cb = options, options = null);
187
- function callback(er, stats) {
188
- stats && (stats.uid < 0 && (stats.uid += 4294967296), stats.gid < 0 && (stats.gid += 4294967296)), cb && cb.apply(this, arguments);
189
- }
190
- return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback);
191
- };
192
- }
193
- function statFixSync(orig) {
194
- return orig && function(target, options) {
195
- var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
196
- return stats && (stats.uid < 0 && (stats.uid += 4294967296), stats.gid < 0 && (stats.gid += 4294967296)), stats;
197
- };
198
- }
199
- function chownErOk(er) {
200
- if (!er || er.code === "ENOSYS")
201
- return !0;
202
- var nonroot = !process.getuid || process.getuid() !== 0;
203
- return !!(nonroot && (er.code === "EINVAL" || er.code === "EPERM"));
204
- }
205
- }
206
- }
207
- });
208
-
209
- // node_modules/graceful-fs/legacy-streams.js
210
- var require_legacy_streams = __commonJS({
211
- "node_modules/graceful-fs/legacy-streams.js"(exports, module) {
212
- var Stream = __require("stream").Stream;
213
- module.exports = legacy;
214
- function legacy(fs) {
215
- return {
216
- ReadStream,
217
- WriteStream
218
- };
219
- function ReadStream(path, options) {
220
- if (!(this instanceof ReadStream)) return new ReadStream(path, options);
221
- Stream.call(this);
222
- var self = this;
223
- this.path = path, this.fd = null, this.readable = !0, this.paused = !1, this.flags = "r", this.mode = 438, this.bufferSize = 64 * 1024, options = options || {};
224
- for (var keys = Object.keys(options), index = 0, length = keys.length; index < length; index++) {
225
- var key = keys[index];
226
- this[key] = options[key];
227
- }
228
- if (this.encoding && this.setEncoding(this.encoding), this.start !== void 0) {
229
- if (typeof this.start != "number")
230
- throw TypeError("start must be a Number");
231
- if (this.end === void 0)
232
- this.end = 1 / 0;
233
- else if (typeof this.end != "number")
234
- throw TypeError("end must be a Number");
235
- if (this.start > this.end)
236
- throw new Error("start must be <= end");
237
- this.pos = this.start;
238
- }
239
- if (this.fd !== null) {
240
- process.nextTick(function() {
241
- self._read();
242
- });
243
- return;
244
- }
245
- fs.open(this.path, this.flags, this.mode, function(err, fd) {
246
- if (err) {
247
- self.emit("error", err), self.readable = !1;
248
- return;
249
- }
250
- self.fd = fd, self.emit("open", fd), self._read();
251
- });
252
- }
253
- function WriteStream(path, options) {
254
- if (!(this instanceof WriteStream)) return new WriteStream(path, options);
255
- 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 || {};
256
- for (var keys = Object.keys(options), index = 0, length = keys.length; index < length; index++) {
257
- var key = keys[index];
258
- this[key] = options[key];
259
- }
260
- if (this.start !== void 0) {
261
- if (typeof this.start != "number")
262
- throw TypeError("start must be a Number");
263
- if (this.start < 0)
264
- throw new Error("start must be >= zero");
265
- this.pos = this.start;
266
- }
267
- 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());
268
- }
269
- }
270
- }
271
- });
272
-
273
- // node_modules/graceful-fs/clone.js
274
- var require_clone = __commonJS({
275
- "node_modules/graceful-fs/clone.js"(exports, module) {
276
- "use strict";
277
- module.exports = clone;
278
- var getPrototypeOf = Object.getPrototypeOf || function(obj) {
279
- return obj.__proto__;
280
- };
281
- function clone(obj) {
282
- if (obj === null || typeof obj != "object")
283
- return obj;
284
- if (obj instanceof Object)
285
- var copy = { __proto__: getPrototypeOf(obj) };
286
- else
287
- var copy = /* @__PURE__ */ Object.create(null);
288
- return Object.getOwnPropertyNames(obj).forEach(function(key) {
289
- Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
290
- }), copy;
291
- }
292
- }
293
- });
294
-
295
- // node_modules/graceful-fs/graceful-fs.js
296
- var require_graceful_fs = __commonJS({
297
- "node_modules/graceful-fs/graceful-fs.js"(exports, module) {
298
- var fs = __require("fs"), polyfills = require_polyfills(), legacy = require_legacy_streams(), clone = require_clone(), util = __require("util"), gracefulQueue, previousSymbol;
299
- 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");
300
- function noop() {
301
- }
302
- function publishQueue(context, queue2) {
303
- Object.defineProperty(context, gracefulQueue, {
304
- get: function() {
305
- return queue2;
306
- }
307
- });
308
- }
309
- var debug = noop;
310
- util.debuglog ? debug = util.debuglog("gfs4") : /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && (debug = function() {
311
- var m = util.format.apply(util, arguments);
312
- m = "GFS4: " + m.split(/\n/).join(`
313
- GFS4: `), console.error(m);
314
- });
315
- fs[gracefulQueue] || (queue = global[gracefulQueue] || [], publishQueue(fs, queue), fs.close = (function(fs$close) {
316
- function close(fd, cb) {
317
- return fs$close.call(fs, fd, function(err) {
318
- err || resetQueue(), typeof cb == "function" && cb.apply(this, arguments);
319
- });
320
- }
321
- return Object.defineProperty(close, previousSymbol, {
322
- value: fs$close
323
- }), close;
324
- })(fs.close), fs.closeSync = (function(fs$closeSync) {
325
- function closeSync(fd) {
326
- fs$closeSync.apply(fs, arguments), resetQueue();
327
- }
328
- return Object.defineProperty(closeSync, previousSymbol, {
329
- value: fs$closeSync
330
- }), closeSync;
331
- })(fs.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
332
- debug(fs[gracefulQueue]), __require("assert").equal(fs[gracefulQueue].length, 0);
333
- }));
334
- var queue;
335
- global[gracefulQueue] || publishQueue(global, fs[gracefulQueue]);
336
- module.exports = patch(clone(fs));
337
- process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched && (module.exports = patch(fs), fs.__patched = !0);
338
- function patch(fs2) {
339
- polyfills(fs2), fs2.gracefulify = patch, fs2.createReadStream = createReadStream, fs2.createWriteStream = createWriteStream;
340
- var fs$readFile = fs2.readFile;
341
- fs2.readFile = readFile;
342
- function readFile(path, options, cb) {
343
- return typeof options == "function" && (cb = options, options = null), go$readFile(path, options, cb);
344
- function go$readFile(path2, options2, cb2, startTime) {
345
- return fs$readFile(path2, options2, function(err) {
346
- 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);
347
- });
348
- }
349
- }
350
- var fs$writeFile = fs2.writeFile;
351
- fs2.writeFile = writeFile;
352
- function writeFile(path, data, options, cb) {
353
- return typeof options == "function" && (cb = options, options = null), go$writeFile(path, data, options, cb);
354
- function go$writeFile(path2, data2, options2, cb2, startTime) {
355
- return fs$writeFile(path2, data2, options2, function(err) {
356
- 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);
357
- });
358
- }
359
- }
360
- var fs$appendFile = fs2.appendFile;
361
- fs$appendFile && (fs2.appendFile = appendFile);
362
- function appendFile(path, data, options, cb) {
363
- return typeof options == "function" && (cb = options, options = null), go$appendFile(path, data, options, cb);
364
- function go$appendFile(path2, data2, options2, cb2, startTime) {
365
- return fs$appendFile(path2, data2, options2, function(err) {
366
- 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);
367
- });
368
- }
369
- }
370
- var fs$copyFile = fs2.copyFile;
371
- fs$copyFile && (fs2.copyFile = copyFile);
372
- function copyFile(src, dest, flags, cb) {
373
- return typeof flags == "function" && (cb = flags, flags = 0), go$copyFile(src, dest, flags, cb);
374
- function go$copyFile(src2, dest2, flags2, cb2, startTime) {
375
- return fs$copyFile(src2, dest2, flags2, function(err) {
376
- 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);
377
- });
378
- }
379
- }
380
- var fs$readdir = fs2.readdir;
381
- fs2.readdir = readdir;
382
- var noReaddirOptionVersions = /^v[0-5]\./;
383
- function readdir(path, options, cb) {
384
- typeof options == "function" && (cb = options, options = null);
385
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function(path2, options2, cb2, startTime) {
386
- return fs$readdir(path2, fs$readdirCallback(
387
- path2,
388
- options2,
389
- cb2,
390
- startTime
391
- ));
392
- } : function(path2, options2, cb2, startTime) {
393
- return fs$readdir(path2, options2, fs$readdirCallback(
394
- path2,
395
- options2,
396
- cb2,
397
- startTime
398
- ));
399
- };
400
- return go$readdir(path, options, cb);
401
- function fs$readdirCallback(path2, options2, cb2, startTime) {
402
- return function(err, files) {
403
- err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([
404
- go$readdir,
405
- [path2, options2, cb2],
406
- err,
407
- startTime || Date.now(),
408
- Date.now()
409
- ]) : (files && files.sort && files.sort(), typeof cb2 == "function" && cb2.call(this, err, files));
410
- };
411
- }
412
- }
413
- if (process.version.substr(0, 4) === "v0.8") {
414
- var legStreams = legacy(fs2);
415
- ReadStream = legStreams.ReadStream, WriteStream = legStreams.WriteStream;
416
- }
417
- var fs$ReadStream = fs2.ReadStream;
418
- fs$ReadStream && (ReadStream.prototype = Object.create(fs$ReadStream.prototype), ReadStream.prototype.open = ReadStream$open);
419
- var fs$WriteStream = fs2.WriteStream;
420
- fs$WriteStream && (WriteStream.prototype = Object.create(fs$WriteStream.prototype), WriteStream.prototype.open = WriteStream$open), Object.defineProperty(fs2, "ReadStream", {
421
- get: function() {
422
- return ReadStream;
423
- },
424
- set: function(val) {
425
- ReadStream = val;
426
- },
427
- enumerable: !0,
428
- configurable: !0
429
- }), Object.defineProperty(fs2, "WriteStream", {
430
- get: function() {
431
- return WriteStream;
432
- },
433
- set: function(val) {
434
- WriteStream = val;
435
- },
436
- enumerable: !0,
437
- configurable: !0
438
- });
439
- var FileReadStream = ReadStream;
440
- Object.defineProperty(fs2, "FileReadStream", {
441
- get: function() {
442
- return FileReadStream;
443
- },
444
- set: function(val) {
445
- FileReadStream = val;
446
- },
447
- enumerable: !0,
448
- configurable: !0
449
- });
450
- var FileWriteStream = WriteStream;
451
- Object.defineProperty(fs2, "FileWriteStream", {
452
- get: function() {
453
- return FileWriteStream;
454
- },
455
- set: function(val) {
456
- FileWriteStream = val;
457
- },
458
- enumerable: !0,
459
- configurable: !0
460
- });
461
- function ReadStream(path, options) {
462
- return this instanceof ReadStream ? (fs$ReadStream.apply(this, arguments), this) : ReadStream.apply(Object.create(ReadStream.prototype), arguments);
463
- }
464
- function ReadStream$open() {
465
- var that = this;
466
- open(that.path, that.flags, that.mode, function(err, fd) {
467
- err ? (that.autoClose && that.destroy(), that.emit("error", err)) : (that.fd = fd, that.emit("open", fd), that.read());
468
- });
469
- }
470
- function WriteStream(path, options) {
471
- return this instanceof WriteStream ? (fs$WriteStream.apply(this, arguments), this) : WriteStream.apply(Object.create(WriteStream.prototype), arguments);
472
- }
473
- function WriteStream$open() {
474
- var that = this;
475
- open(that.path, that.flags, that.mode, function(err, fd) {
476
- err ? (that.destroy(), that.emit("error", err)) : (that.fd = fd, that.emit("open", fd));
477
- });
478
- }
479
- function createReadStream(path, options) {
480
- return new fs2.ReadStream(path, options);
481
- }
482
- function createWriteStream(path, options) {
483
- return new fs2.WriteStream(path, options);
484
- }
485
- var fs$open = fs2.open;
486
- fs2.open = open;
487
- function open(path, flags, mode, cb) {
488
- return typeof mode == "function" && (cb = mode, mode = null), go$open(path, flags, mode, cb);
489
- function go$open(path2, flags2, mode2, cb2, startTime) {
490
- return fs$open(path2, flags2, mode2, function(err, fd) {
491
- 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);
492
- });
493
- }
494
- }
495
- return fs2;
496
- }
497
- function enqueue(elem) {
498
- debug("ENQUEUE", elem[0].name, elem[1]), fs[gracefulQueue].push(elem), retry();
499
- }
500
- var retryTimer;
501
- function resetQueue() {
502
- for (var now = Date.now(), i = 0; i < fs[gracefulQueue].length; ++i)
503
- fs[gracefulQueue][i].length > 2 && (fs[gracefulQueue][i][3] = now, fs[gracefulQueue][i][4] = now);
504
- retry();
505
- }
506
- function retry() {
507
- if (clearTimeout(retryTimer), retryTimer = void 0, fs[gracefulQueue].length !== 0) {
508
- var elem = fs[gracefulQueue].shift(), fn = elem[0], args = elem[1], err = elem[2], startTime = elem[3], lastTime = elem[4];
509
- if (startTime === void 0)
510
- debug("RETRY", fn.name, args), fn.apply(null, args);
511
- else if (Date.now() - startTime >= 6e4) {
512
- debug("TIMEOUT", fn.name, args);
513
- var cb = args.pop();
514
- typeof cb == "function" && cb.call(null, err);
515
- } else {
516
- var sinceAttempt = Date.now() - lastTime, sinceStart = Math.max(lastTime - startTime, 1), desiredDelay = Math.min(sinceStart * 1.2, 100);
517
- sinceAttempt >= desiredDelay ? (debug("RETRY", fn.name, args), fn.apply(null, args.concat([startTime]))) : fs[gracefulQueue].push(elem);
518
- }
519
- retryTimer === void 0 && (retryTimer = setTimeout(retry, 0));
520
- }
521
- }
522
- }
523
- });
524
-
525
- // node_modules/proper-lockfile/node_modules/retry/lib/retry_operation.js
526
- var require_retry_operation = __commonJS({
527
- "node_modules/proper-lockfile/node_modules/retry/lib/retry_operation.js"(exports, module) {
528
- function RetryOperation(timeouts, options) {
529
- 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));
530
- }
531
- module.exports = RetryOperation;
532
- RetryOperation.prototype.reset = function() {
533
- this._attempts = 1, this._timeouts = this._originalTimeouts;
534
- };
535
- RetryOperation.prototype.stop = function() {
536
- this._timeout && clearTimeout(this._timeout), this._timeouts = [], this._cachedTimeouts = null;
537
- };
538
- RetryOperation.prototype.retry = function(err) {
539
- if (this._timeout && clearTimeout(this._timeout), !err)
540
- return !1;
541
- var currentTime = (/* @__PURE__ */ new Date()).getTime();
542
- if (err && currentTime - this._operationStart >= this._maxRetryTime)
543
- return this._errors.unshift(new Error("RetryOperation timeout occurred")), !1;
544
- this._errors.push(err);
545
- var timeout = this._timeouts.shift();
546
- if (timeout === void 0)
547
- if (this._cachedTimeouts)
548
- this._errors.splice(this._errors.length - 1, this._errors.length), this._timeouts = this._cachedTimeouts.slice(0), timeout = this._timeouts.shift();
549
- else
550
- return !1;
551
- var self = this, timer = setTimeout(function() {
552
- self._attempts++, self._operationTimeoutCb && (self._timeout = setTimeout(function() {
553
- self._operationTimeoutCb(self._attempts);
554
- }, self._operationTimeout), self._options.unref && self._timeout.unref()), self._fn(self._attempts);
555
- }, timeout);
556
- return this._options.unref && timer.unref(), !0;
557
- };
558
- RetryOperation.prototype.attempt = function(fn, timeoutOps) {
559
- this._fn = fn, timeoutOps && (timeoutOps.timeout && (this._operationTimeout = timeoutOps.timeout), timeoutOps.cb && (this._operationTimeoutCb = timeoutOps.cb));
560
- var self = this;
561
- this._operationTimeoutCb && (this._timeout = setTimeout(function() {
562
- self._operationTimeoutCb();
563
- }, self._operationTimeout)), this._operationStart = (/* @__PURE__ */ new Date()).getTime(), this._fn(this._attempts);
564
- };
565
- RetryOperation.prototype.try = function(fn) {
566
- console.log("Using RetryOperation.try() is deprecated"), this.attempt(fn);
567
- };
568
- RetryOperation.prototype.start = function(fn) {
569
- console.log("Using RetryOperation.start() is deprecated"), this.attempt(fn);
570
- };
571
- RetryOperation.prototype.start = RetryOperation.prototype.try;
572
- RetryOperation.prototype.errors = function() {
573
- return this._errors;
574
- };
575
- RetryOperation.prototype.attempts = function() {
576
- return this._attempts;
577
- };
578
- RetryOperation.prototype.mainError = function() {
579
- if (this._errors.length === 0)
580
- return null;
581
- for (var counts = {}, mainError = null, mainErrorCount = 0, i = 0; i < this._errors.length; i++) {
582
- var error = this._errors[i], message = error.message, count = (counts[message] || 0) + 1;
583
- counts[message] = count, count >= mainErrorCount && (mainError = error, mainErrorCount = count);
584
- }
585
- return mainError;
586
- };
587
- }
588
- });
589
-
590
- // node_modules/proper-lockfile/node_modules/retry/lib/retry.js
591
- var require_retry = __commonJS({
592
- "node_modules/proper-lockfile/node_modules/retry/lib/retry.js"(exports) {
593
- var RetryOperation = require_retry_operation();
594
- exports.operation = function(options) {
595
- var timeouts = exports.timeouts(options);
596
- return new RetryOperation(timeouts, {
597
- forever: options && options.forever,
598
- unref: options && options.unref,
599
- maxRetryTime: options && options.maxRetryTime
600
- });
601
- };
602
- exports.timeouts = function(options) {
603
- if (options instanceof Array)
604
- return [].concat(options);
605
- var opts = {
606
- retries: 10,
607
- factor: 2,
608
- minTimeout: 1 * 1e3,
609
- maxTimeout: 1 / 0,
610
- randomize: !1
611
- };
612
- for (var key in options)
613
- opts[key] = options[key];
614
- if (opts.minTimeout > opts.maxTimeout)
615
- throw new Error("minTimeout is greater than maxTimeout");
616
- for (var timeouts = [], i = 0; i < opts.retries; i++)
617
- timeouts.push(this.createTimeout(i, opts));
618
- return options && options.forever && !timeouts.length && timeouts.push(this.createTimeout(i, opts)), timeouts.sort(function(a, b) {
619
- return a - b;
620
- }), timeouts;
621
- };
622
- exports.createTimeout = function(attempt, opts) {
623
- var random = opts.randomize ? Math.random() + 1 : 1, timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));
624
- return timeout = Math.min(timeout, opts.maxTimeout), timeout;
625
- };
626
- exports.wrap = function(obj, options, methods) {
627
- if (options instanceof Array && (methods = options, options = null), !methods) {
628
- methods = [];
629
- for (var key in obj)
630
- typeof obj[key] == "function" && methods.push(key);
631
- }
632
- for (var i = 0; i < methods.length; i++) {
633
- var method = methods[i], original = obj[method];
634
- obj[method] = function(original2) {
635
- var op = exports.operation(options), args = Array.prototype.slice.call(arguments, 1), callback = args.pop();
636
- args.push(function(err) {
637
- op.retry(err) || (err && (arguments[0] = op.mainError()), callback.apply(this, arguments));
638
- }), op.attempt(function() {
639
- original2.apply(obj, args);
640
- });
641
- }.bind(obj, original), obj[method].options = options;
642
- }
643
- };
644
- }
645
- });
646
-
647
- // node_modules/proper-lockfile/node_modules/retry/index.js
648
- var require_retry2 = __commonJS({
649
- "node_modules/proper-lockfile/node_modules/retry/index.js"(exports, module) {
650
- module.exports = require_retry();
651
- }
652
- });
653
-
654
- // node_modules/signal-exit/signals.js
655
- var require_signals = __commonJS({
656
- "node_modules/signal-exit/signals.js"(exports, module) {
657
- module.exports = [
658
- "SIGABRT",
659
- "SIGALRM",
660
- "SIGHUP",
661
- "SIGINT",
662
- "SIGTERM"
663
- ];
664
- process.platform !== "win32" && module.exports.push(
665
- "SIGVTALRM",
666
- "SIGXCPU",
667
- "SIGXFSZ",
668
- "SIGUSR2",
669
- "SIGTRAP",
670
- "SIGSYS",
671
- "SIGQUIT",
672
- "SIGIOT"
673
- // should detect profiler and enable/disable accordingly.
674
- // see #21
675
- // 'SIGPROF'
676
- );
677
- process.platform === "linux" && module.exports.push(
678
- "SIGIO",
679
- "SIGPOLL",
680
- "SIGPWR",
681
- "SIGSTKFLT",
682
- "SIGUNUSED"
683
- );
684
- }
685
- });
686
-
687
- // node_modules/signal-exit/index.js
688
- var require_signal_exit = __commonJS({
689
- "node_modules/signal-exit/index.js"(exports, module) {
690
- var process2 = global.process, processOk = function(process3) {
691
- 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";
692
- };
693
- 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) {
694
- if (!processOk(global.process))
695
- return function() {
696
- };
697
- assert.equal(typeof cb, "function", "a callback must be provided for exit handler"), loaded === !1 && load();
698
- var ev = "exit";
699
- opts && opts.alwaysLast && (ev = "afterexit");
700
- var remove = function() {
701
- emitter.removeListener(ev, cb), emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0 && unload();
702
- };
703
- return emitter.on(ev, cb), remove;
704
- }, unload = function() {
705
- !loaded || !processOk(global.process) || (loaded = !1, signals.forEach(function(sig) {
706
- try {
707
- process2.removeListener(sig, sigListeners[sig]);
708
- } catch {
709
- }
710
- }), process2.emit = originalProcessEmit, process2.reallyExit = originalProcessReallyExit, emitter.count -= 1);
711
- }, module.exports.unload = unload, emit = function(event, code, signal) {
712
- emitter.emitted[event] || (emitter.emitted[event] = !0, emitter.emit(event, code, signal));
713
- }, sigListeners = {}, signals.forEach(function(sig) {
714
- sigListeners[sig] = function() {
715
- if (processOk(global.process)) {
716
- var listeners = process2.listeners(sig);
717
- listeners.length === emitter.count && (unload(), emit("exit", null, sig), emit("afterexit", null, sig), isWin && sig === "SIGHUP" && (sig = "SIGINT"), process2.kill(process2.pid, sig));
718
- }
719
- };
720
- }), module.exports.signals = function() {
721
- return signals;
722
- }, loaded = !1, load = function() {
723
- loaded || !processOk(global.process) || (loaded = !0, emitter.count += 1, signals = signals.filter(function(sig) {
724
- try {
725
- return process2.on(sig, sigListeners[sig]), !0;
726
- } catch {
727
- return !1;
728
- }
729
- }), process2.emit = processEmit, process2.reallyExit = processReallyExit);
730
- }, module.exports.load = load, originalProcessReallyExit = process2.reallyExit, processReallyExit = function(code) {
731
- processOk(global.process) && (process2.exitCode = code || /* istanbul ignore next */
732
- 0, emit("exit", process2.exitCode, null), emit("afterexit", process2.exitCode, null), originalProcessReallyExit.call(process2, process2.exitCode));
733
- }, originalProcessEmit = process2.emit, processEmit = function(ev, arg) {
734
- if (ev === "exit" && processOk(global.process)) {
735
- arg !== void 0 && (process2.exitCode = arg);
736
- var ret = originalProcessEmit.apply(this, arguments);
737
- return emit("exit", process2.exitCode, null), emit("afterexit", process2.exitCode, null), ret;
738
- } else
739
- return originalProcessEmit.apply(this, arguments);
740
- }) : module.exports = function() {
741
- return function() {
742
- };
743
- };
744
- var assert, signals, isWin, EE, emitter, unload, emit, sigListeners, loaded, load, originalProcessReallyExit, processReallyExit, originalProcessEmit, processEmit;
745
- }
746
- });
747
-
748
- // node_modules/proper-lockfile/lib/mtime-precision.js
749
- var require_mtime_precision = __commonJS({
750
- "node_modules/proper-lockfile/lib/mtime-precision.js"(exports, module) {
751
- "use strict";
752
- var cacheSymbol = /* @__PURE__ */ Symbol();
753
- function probe(file, fs, callback) {
754
- let cachedPrecision = fs[cacheSymbol];
755
- if (cachedPrecision)
756
- return fs.stat(file, (err, stat) => {
757
- if (err)
758
- return callback(err);
759
- callback(null, stat.mtime, cachedPrecision);
760
- });
761
- let mtime = new Date(Math.ceil(Date.now() / 1e3) * 1e3 + 5);
762
- fs.utimes(file, mtime, mtime, (err) => {
763
- if (err)
764
- return callback(err);
765
- fs.stat(file, (err2, stat) => {
766
- if (err2)
767
- return callback(err2);
768
- let precision = stat.mtime.getTime() % 1e3 === 0 ? "s" : "ms";
769
- Object.defineProperty(fs, cacheSymbol, { value: precision }), callback(null, stat.mtime, precision);
770
- });
771
- });
772
- }
773
- function getMtime(precision) {
774
- let now = Date.now();
775
- return precision === "s" && (now = Math.ceil(now / 1e3) * 1e3), new Date(now);
776
- }
777
- module.exports.probe = probe;
778
- module.exports.getMtime = getMtime;
779
- }
780
- });
781
-
782
- // node_modules/proper-lockfile/lib/lockfile.js
783
- var require_lockfile = __commonJS({
784
- "node_modules/proper-lockfile/lib/lockfile.js"(exports, module) {
785
- "use strict";
786
- var path = __require("path"), fs = require_graceful_fs(), retry = require_retry2(), onExit = require_signal_exit(), mtimePrecision = require_mtime_precision(), locks = {};
787
- function getLockFile(file, options) {
788
- return options.lockfilePath || `${file}.lock`;
789
- }
790
- function resolveCanonicalPath(file, options, callback) {
791
- if (!options.realpath)
792
- return callback(null, path.resolve(file));
793
- options.fs.realpath(file, callback);
794
- }
795
- function acquireLock(file, options, callback) {
796
- let lockfilePath = getLockFile(file, options);
797
- options.fs.mkdir(lockfilePath, (err) => {
798
- if (!err)
799
- return mtimePrecision.probe(lockfilePath, options.fs, (err2, mtime, mtimePrecision2) => {
800
- if (err2)
801
- return options.fs.rmdir(lockfilePath, () => {
802
- }), callback(err2);
803
- callback(null, mtime, mtimePrecision2);
804
- });
805
- if (err.code !== "EEXIST")
806
- return callback(err);
807
- if (options.stale <= 0)
808
- return callback(Object.assign(new Error("Lock file is already being held"), { code: "ELOCKED", file }));
809
- options.fs.stat(lockfilePath, (err2, stat) => {
810
- if (err2)
811
- return err2.code === "ENOENT" ? acquireLock(file, { ...options, stale: 0 }, callback) : callback(err2);
812
- if (!isLockStale(stat, options))
813
- return callback(Object.assign(new Error("Lock file is already being held"), { code: "ELOCKED", file }));
814
- removeLock(file, options, (err3) => {
815
- if (err3)
816
- return callback(err3);
817
- acquireLock(file, { ...options, stale: 0 }, callback);
818
- });
819
- });
820
- });
821
- }
822
- function isLockStale(stat, options) {
823
- return stat.mtime.getTime() < Date.now() - options.stale;
824
- }
825
- function removeLock(file, options, callback) {
826
- options.fs.rmdir(getLockFile(file, options), (err) => {
827
- if (err && err.code !== "ENOENT")
828
- return callback(err);
829
- callback();
830
- });
831
- }
832
- function updateLock(file, options) {
833
- let lock2 = locks[file];
834
- lock2.updateTimeout || (lock2.updateDelay = lock2.updateDelay || options.update, lock2.updateTimeout = setTimeout(() => {
835
- lock2.updateTimeout = null, options.fs.stat(lock2.lockfilePath, (err, stat) => {
836
- let isOverThreshold = lock2.lastUpdate + options.stale < Date.now();
837
- if (err)
838
- return err.code === "ENOENT" || isOverThreshold ? setLockAsCompromised(file, lock2, Object.assign(err, { code: "ECOMPROMISED" })) : (lock2.updateDelay = 1e3, updateLock(file, options));
839
- if (!(lock2.mtime.getTime() === stat.mtime.getTime()))
840
- return setLockAsCompromised(
841
- file,
842
- lock2,
843
- Object.assign(
844
- new Error("Unable to update lock within the stale threshold"),
845
- { code: "ECOMPROMISED" }
846
- )
847
- );
848
- let mtime = mtimePrecision.getMtime(lock2.mtimePrecision);
849
- options.fs.utimes(lock2.lockfilePath, mtime, mtime, (err2) => {
850
- let isOverThreshold2 = lock2.lastUpdate + options.stale < Date.now();
851
- if (!lock2.released) {
852
- if (err2)
853
- return err2.code === "ENOENT" || isOverThreshold2 ? setLockAsCompromised(file, lock2, Object.assign(err2, { code: "ECOMPROMISED" })) : (lock2.updateDelay = 1e3, updateLock(file, options));
854
- lock2.mtime = mtime, lock2.lastUpdate = Date.now(), lock2.updateDelay = null, updateLock(file, options);
855
- }
856
- });
857
- });
858
- }, lock2.updateDelay), lock2.updateTimeout.unref && lock2.updateTimeout.unref());
859
- }
860
- function setLockAsCompromised(file, lock2, err) {
861
- lock2.released = !0, lock2.updateTimeout && clearTimeout(lock2.updateTimeout), locks[file] === lock2 && delete locks[file], lock2.options.onCompromised(err);
862
- }
863
- function lock(file, options, callback) {
864
- options = {
865
- stale: 1e4,
866
- update: null,
867
- realpath: !0,
868
- retries: 0,
869
- fs,
870
- onCompromised: (err) => {
871
- throw err;
872
- },
873
- ...options
874
- }, 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) => {
875
- if (err)
876
- return callback(err);
877
- let operation = retry.operation(options.retries);
878
- operation.attempt(() => {
879
- acquireLock(file2, options, (err2, mtime, mtimePrecision2) => {
880
- if (operation.retry(err2))
881
- return;
882
- if (err2)
883
- return callback(operation.mainError());
884
- let lock2 = locks[file2] = {
885
- lockfilePath: getLockFile(file2, options),
886
- mtime,
887
- mtimePrecision: mtimePrecision2,
888
- options,
889
- lastUpdate: Date.now()
890
- };
891
- updateLock(file2, options), callback(null, (releasedCallback) => {
892
- if (lock2.released)
893
- return releasedCallback && releasedCallback(Object.assign(new Error("Lock is already released"), { code: "ERELEASED" }));
894
- unlock(file2, { ...options, realpath: !1 }, releasedCallback);
895
- });
896
- });
897
- });
898
- });
899
- }
900
- function unlock(file, options, callback) {
901
- options = {
902
- fs,
903
- realpath: !0,
904
- ...options
905
- }, resolveCanonicalPath(file, options, (err, file2) => {
906
- if (err)
907
- return callback(err);
908
- let lock2 = locks[file2];
909
- if (!lock2)
910
- return callback(Object.assign(new Error("Lock is not acquired/owned by you"), { code: "ENOTACQUIRED" }));
911
- lock2.updateTimeout && clearTimeout(lock2.updateTimeout), lock2.released = !0, delete locks[file2], removeLock(file2, options, callback);
912
- });
913
- }
914
- function check(file, options, callback) {
915
- options = {
916
- stale: 1e4,
917
- realpath: !0,
918
- fs,
919
- ...options
920
- }, options.stale = Math.max(options.stale || 0, 2e3), resolveCanonicalPath(file, options, (err, file2) => {
921
- if (err)
922
- return callback(err);
923
- options.fs.stat(getLockFile(file2, options), (err2, stat) => err2 ? err2.code === "ENOENT" ? callback(null, !1) : callback(err2) : callback(null, !isLockStale(stat, options)));
924
- });
925
- }
926
- function getLocks() {
927
- return locks;
928
- }
929
- onExit(() => {
930
- for (let file in locks) {
931
- let options = locks[file].options;
932
- try {
933
- options.fs.rmdirSync(getLockFile(file, options));
934
- } catch {
935
- }
936
- }
937
- });
938
- module.exports.lock = lock;
939
- module.exports.unlock = unlock;
940
- module.exports.check = check;
941
- module.exports.getLocks = getLocks;
942
- }
943
- });
944
-
945
- // node_modules/proper-lockfile/lib/adapter.js
946
- var require_adapter = __commonJS({
947
- "node_modules/proper-lockfile/lib/adapter.js"(exports, module) {
948
- "use strict";
949
- var fs = require_graceful_fs();
950
- function createSyncFs(fs2) {
951
- let methods = ["mkdir", "realpath", "stat", "rmdir", "utimes"], newFs = { ...fs2 };
952
- return methods.forEach((method) => {
953
- newFs[method] = (...args) => {
954
- let callback = args.pop(), ret;
955
- try {
956
- ret = fs2[`${method}Sync`](...args);
957
- } catch (err) {
958
- return callback(err);
959
- }
960
- callback(null, ret);
961
- };
962
- }), newFs;
963
- }
964
- function toPromise(method) {
965
- return (...args) => new Promise((resolve, reject) => {
966
- args.push((err, result) => {
967
- err ? reject(err) : resolve(result);
968
- }), method(...args);
969
- });
970
- }
971
- function toSync(method) {
972
- return (...args) => {
973
- let err, result;
974
- if (args.push((_err, _result) => {
975
- err = _err, result = _result;
976
- }), method(...args), err)
977
- throw err;
978
- return result;
979
- };
980
- }
981
- function toSyncOptions(options) {
982
- 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)
983
- throw Object.assign(new Error("Cannot use retries with the sync api"), { code: "ESYNC" });
984
- return options;
985
- }
986
- module.exports = {
987
- toPromise,
988
- toSync,
989
- toSyncOptions
990
- };
991
- }
992
- });
993
-
994
- // node_modules/proper-lockfile/index.js
995
- var require_proper_lockfile = __commonJS({
996
- "node_modules/proper-lockfile/index.js"(exports, module) {
997
- "use strict";
998
- var lockfile2 = require_lockfile(), { toPromise, toSync, toSyncOptions } = require_adapter();
999
- async function lock(file, options) {
1000
- let release = await toPromise(lockfile2.lock)(file, options);
1001
- return toPromise(release);
1002
- }
1003
- function lockSync(file, options) {
1004
- let release = toSync(lockfile2.lock)(file, toSyncOptions(options));
1005
- return toSync(release);
1006
- }
1007
- function unlock(file, options) {
1008
- return toPromise(lockfile2.unlock)(file, options);
1009
- }
1010
- function unlockSync(file, options) {
1011
- return toSync(lockfile2.unlock)(file, toSyncOptions(options));
1012
- }
1013
- function check(file, options) {
1014
- return toPromise(lockfile2.check)(file, options);
1015
- }
1016
- function checkSync(file, options) {
1017
- return toSync(lockfile2.check)(file, toSyncOptions(options));
1018
- }
1019
- module.exports = lock;
1020
- module.exports.lock = lock;
1021
- module.exports.unlock = unlock;
1022
- module.exports.lockSync = lockSync;
1023
- module.exports.unlockSync = unlockSync;
1024
- module.exports.check = check;
1025
- module.exports.checkSync = checkSync;
1026
- }
1027
- });
1028
-
1029
25
  // node_modules/undici/lib/core/symbols.js
1030
26
  var require_symbols = __commonJS({
1031
27
  "node_modules/undici/lib/core/symbols.js"(exports, module) {
@@ -11845,7 +10841,7 @@ var require_response_error = __commonJS({
11845
10841
  });
11846
10842
 
11847
10843
  // node_modules/undici/lib/interceptor/retry.js
11848
- var require_retry3 = __commonJS({
10844
+ var require_retry = __commonJS({
11849
10845
  "node_modules/undici/lib/interceptor/retry.js"(exports, module) {
11850
10846
  "use strict";
11851
10847
  var RetryHandler = require_retry_handler();
@@ -19236,7 +18232,7 @@ var require_undici = __commonJS({
19236
18232
  module.exports.interceptors = {
19237
18233
  redirect: require_redirect(),
19238
18234
  responseError: require_response_error(),
19239
- retry: require_retry3(),
18235
+ retry: require_retry(),
19240
18236
  dump: require_dump(),
19241
18237
  dns: require_dns(),
19242
18238
  cache: require_cache2(),
@@ -19835,6 +18831,18 @@ var FileSettingsStorage = class {
19835
18831
  let value = this.settings.memoryCharCap;
19836
18832
  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;
19837
18833
  }
18834
+ getComputerUse() {
18835
+ return this.globalSettings.computerUse ?? !0;
18836
+ }
18837
+ setComputerUse(enabled) {
18838
+ this.globalSettings.computerUse = enabled, this.markModified("computerUse"), this.save(), computerSettingsChanged({ enabled, foreground: this.getComputerForeground() });
18839
+ }
18840
+ getComputerForeground() {
18841
+ return this.globalSettings.computerForeground ?? !0;
18842
+ }
18843
+ setComputerForeground(enabled) {
18844
+ this.globalSettings.computerForeground = enabled, this.markModified("computerForeground"), this.save(), computerSettingsChanged({ enabled: this.getComputerUse(), foreground: enabled });
18845
+ }
19838
18846
  getMemoryEnabled() {
19839
18847
  return this.globalSettings.memoryEnabled ?? !0;
19840
18848
  }
@@ -20189,7 +19197,6 @@ function tierThinkingKey(tier) {
20189
19197
  }
20190
19198
 
20191
19199
  export {
20192
- require_proper_lockfile,
20193
19200
  HTTP_IDLE_TIMEOUT_CHOICES,
20194
19201
  formatHttpIdleTimeoutMs,
20195
19202
  applyHttpProxySettings,