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