@yanglaofish/fishtools 0.5.2 → 0.6.0

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 (871) hide show
  1. package/README.md +24 -12
  2. package/manual/README.md +24 -12
  3. package/manual/docs/deployment.md +3 -3
  4. package/manual/docs/examples/action-plugin/package.json +1 -1
  5. package/manual/docs/modules.md +2 -0
  6. package/manual/docs/plans/2026-10-13-effective-inputs-and-tables.md +39 -0
  7. package/manual/docs/plans/2026-10-13-plugin-defaults.md +45 -0
  8. package/manual/docs/plans/2026-10-14-issue7-recovery.md +33 -0
  9. package/manual/docs/plans/2026-10-14-issue8-10-workflows.md +26 -0
  10. package/manual/docs/plans/2026-10-14-issue9-completion.md +47 -0
  11. package/manual/docs/plans/2026-10-14-managed-execution.md +58 -0
  12. package/manual/docs/plans/2026-10-14-plugin-discovery-history.md +41 -0
  13. package/manual/docs/plans/2026-10-14-structured-reports.md +77 -0
  14. package/manual/docs/plans/2026-10-14-unreleased-review.md +47 -0
  15. package/manual/docs/plugin-development.md +175 -11
  16. package/manual/docs/releases.md +49 -6
  17. package/manual/docs/superpowers/plans/2026-10-13-command-shortcuts.md +3 -2
  18. package/manual/docs/superpowers/plans/2026-10-13-global-plugins.md +56 -0
  19. package/manual/docs/superpowers/plans/2026-10-13-tui-readable-sessions.md +21 -0
  20. package/manual/docs/superpowers/reviews/2026-10-13-0.5.3-review.md +28 -0
  21. package/manual/docs/superpowers/reviews/2026-10-13-command-shortcuts-review.md +7 -0
  22. package/manual/docs/superpowers/reviews/2026-10-13-tui-sessions-review.md +57 -0
  23. package/manual/docs/superpowers/reviews/2026-10-14-0.6.0-release-review.md +19 -0
  24. package/manual/docs/superpowers/specs/2026-10-13-issue-4-workflow-menu.md +23 -0
  25. package/manual/docs/superpowers/specs/2026-10-13-issue-5-results-and-history.md +20 -0
  26. package/manual/docs/terminal-commands.md +8 -0
  27. package/manual/docs/verification.md +47 -0
  28. package/manual/packages/core/README.md +8 -0
  29. package/manual/packages/core/package.json +1 -1
  30. package/manual/packages/core/src/application.js +108 -53
  31. package/manual/packages/core/src/development-watch-worker.js +10 -1
  32. package/manual/packages/core/src/development.js +1 -1
  33. package/manual/packages/core/src/plugin-catalog.js +60 -0
  34. package/manual/packages/core/src/plugin-loading.js +24 -0
  35. package/manual/packages/core/src/version.js +1 -1
  36. package/manual/packages/fst-cli/README.md +8 -0
  37. package/manual/packages/fst-cli/bin/fst.js +7 -6
  38. package/manual/packages/fst-cli/package.json +1 -1
  39. package/manual/packages/fst-cli/src/development.js +6 -1
  40. package/manual/packages/fst-cli/src/terminal/command-menu.js +11 -5
  41. package/manual/packages/fst-cli/src/terminal/file-autocomplete.js +106 -0
  42. package/manual/packages/fst-cli/src/terminal/log-viewer.js +4 -3
  43. package/manual/packages/fst-cli/src/terminal/navigation.js +25 -1
  44. package/manual/packages/fst-cli/src/terminal/presentation.js +5 -3
  45. package/manual/packages/fst-cli/src/terminal/report-presentation.js +38 -0
  46. package/manual/packages/fst-cli/src/terminal/result-table.js +66 -0
  47. package/manual/packages/fst-cli/src/terminal/run-feed.js +104 -23
  48. package/manual/packages/fst-cli/src/terminal/run-presentation.js +91 -14
  49. package/manual/packages/fst-cli/src/terminal/run-viewer.js +34 -15
  50. package/manual/packages/fst-cli/src/terminal/schema.js +114 -4
  51. package/manual/packages/fst-cli/src/terminal/session-history.js +82 -0
  52. package/manual/packages/fst-cli/src/terminal/session.js +158 -54
  53. package/manual/packages/fst-cli/src/terminal/view.js +108 -73
  54. package/manual/packages/fst-cli/src/terminal/workflow-menu.js +17 -10
  55. package/manual/packages/fst-devtools/README.md +2 -0
  56. package/manual/packages/fst-devtools/package.json +2 -2
  57. package/manual/packages/fst-devtools/src/plugin-quality.js +4 -1
  58. package/manual/packages/fst-devtools/src/plugin-tools.js +2 -1
  59. package/manual/packages/fst-devtools/src/process-usage.js +62 -0
  60. package/manual/packages/fst-logs/README.md +23 -2
  61. package/manual/packages/fst-logs/package.json +2 -1
  62. package/manual/packages/fst-logs/src/file-identity.js +23 -0
  63. package/manual/packages/fst-logs/src/markdown-log.js +4 -3
  64. package/manual/packages/fst-logs/src/run-logs.js +3 -2
  65. package/manual/packages/fst-logs/src/session-history.js +180 -0
  66. package/manual/packages/fst-platform/README.md +9 -0
  67. package/manual/packages/fst-platform/package.json +4 -3
  68. package/manual/packages/fst-platform/src/managed-process.js +36 -0
  69. package/manual/packages/fst-platform/src/process.js +11 -3
  70. package/manual/packages/fst-platform/src/shell.js +46 -1
  71. package/manual/packages/fst-plugin/README.md +4 -0
  72. package/manual/packages/fst-plugin/package.json +1 -1
  73. package/manual/packages/fst-plugin/src/contracts.js +3 -0
  74. package/manual/packages/fst-plugin/src/host.js +54 -31
  75. package/manual/packages/fst-plugin/src/runtime.js +14 -8
  76. package/manual/packages/fst-workflow/package.json +1 -1
  77. package/manual/packages/fst-workflow/src/engine.js +1 -1
  78. package/manual/packages/fst-workspace/README.md +6 -0
  79. package/manual/packages/fst-workspace/package.json +2 -1
  80. package/manual/packages/fst-workspace/src/plugin-registry.js +58 -0
  81. package/manual/packages/fst-workspace/src/plugins.js +10 -5
  82. package/manual/packages/fst-workspace/src/workflows.js +32 -12
  83. package/manual/packages/pack/package.json +3 -3
  84. package/manual/packages/pack/runtime-cache.js +26 -0
  85. package/manual/packages/pack/runtime.js +6 -10
  86. package/manual/packages/sdk/README.md +10 -0
  87. package/manual/packages/sdk/inputs.js +53 -0
  88. package/manual/packages/sdk/package.json +2 -0
  89. package/manual/packages/sdk/reports.js +53 -0
  90. package/manual/plugins/commands/package.json +1 -1
  91. package/node_modules/@mytools/commands/package.json +1 -1
  92. package/node_modules/@mytools/core/README.md +8 -0
  93. package/node_modules/@mytools/core/package.json +1 -1
  94. package/node_modules/@mytools/core/src/application.js +108 -53
  95. package/node_modules/@mytools/core/src/development-watch-worker.js +10 -1
  96. package/node_modules/@mytools/core/src/development.js +1 -1
  97. package/node_modules/@mytools/core/src/plugin-catalog.js +60 -0
  98. package/node_modules/@mytools/core/src/plugin-loading.js +24 -0
  99. package/node_modules/@mytools/core/src/version.js +1 -1
  100. package/node_modules/@mytools/fst-cli/README.md +8 -0
  101. package/node_modules/@mytools/fst-cli/bin/fst.js +7 -6
  102. package/node_modules/@mytools/fst-cli/package.json +1 -1
  103. package/node_modules/@mytools/fst-cli/src/development.js +6 -1
  104. package/node_modules/@mytools/fst-cli/src/terminal/command-menu.js +11 -5
  105. package/node_modules/@mytools/fst-cli/src/terminal/file-autocomplete.js +106 -0
  106. package/node_modules/@mytools/fst-cli/src/terminal/log-viewer.js +4 -3
  107. package/node_modules/@mytools/fst-cli/src/terminal/navigation.js +25 -1
  108. package/node_modules/@mytools/fst-cli/src/terminal/presentation.js +5 -3
  109. package/node_modules/@mytools/fst-cli/src/terminal/report-presentation.js +38 -0
  110. package/node_modules/@mytools/fst-cli/src/terminal/result-table.js +66 -0
  111. package/node_modules/@mytools/fst-cli/src/terminal/run-feed.js +104 -23
  112. package/node_modules/@mytools/fst-cli/src/terminal/run-presentation.js +91 -14
  113. package/node_modules/@mytools/fst-cli/src/terminal/run-viewer.js +34 -15
  114. package/node_modules/@mytools/fst-cli/src/terminal/schema.js +114 -4
  115. package/node_modules/@mytools/fst-cli/src/terminal/session-history.js +82 -0
  116. package/node_modules/@mytools/fst-cli/src/terminal/session.js +158 -54
  117. package/node_modules/@mytools/fst-cli/src/terminal/view.js +108 -73
  118. package/node_modules/@mytools/fst-cli/src/terminal/workflow-menu.js +17 -10
  119. package/node_modules/@mytools/fst-devtools/README.md +2 -0
  120. package/node_modules/@mytools/fst-devtools/package.json +2 -2
  121. package/node_modules/@mytools/fst-devtools/src/plugin-quality.js +4 -1
  122. package/node_modules/@mytools/fst-devtools/src/plugin-tools.js +2 -1
  123. package/node_modules/@mytools/fst-devtools/src/process-usage.js +62 -0
  124. package/node_modules/@mytools/fst-logs/README.md +23 -2
  125. package/node_modules/@mytools/fst-logs/package.json +2 -1
  126. package/node_modules/@mytools/fst-logs/src/file-identity.js +23 -0
  127. package/node_modules/@mytools/fst-logs/src/markdown-log.js +4 -3
  128. package/node_modules/@mytools/fst-logs/src/run-logs.js +3 -2
  129. package/node_modules/@mytools/fst-logs/src/session-history.js +180 -0
  130. package/node_modules/@mytools/fst-platform/README.md +9 -0
  131. package/node_modules/@mytools/fst-platform/node_modules/undici/LICENSE +21 -0
  132. package/node_modules/{undici/docs/docs/index.md → @mytools/fst-platform/node_modules/undici/README.md} +85 -137
  133. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Agent.md +84 -0
  134. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/BalancedPool.md +99 -0
  135. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/CacheStorage.md +30 -0
  136. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/CacheStore.md +164 -0
  137. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Client.md +288 -0
  138. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/ClientStats.md +27 -0
  139. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Connector.md +115 -0
  140. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/ContentType.md +57 -0
  141. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Cookies.md +128 -0
  142. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Debug.md +62 -0
  143. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +317 -0
  144. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Dispatcher.md +1393 -0
  145. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +159 -0
  146. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Errors.md +49 -0
  147. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/EventSource.md +45 -0
  148. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Fetch.md +60 -0
  149. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/GlobalInstallation.md +139 -0
  150. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/H2CClient.md +263 -0
  151. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockAgent.md +603 -0
  152. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockCallHistory.md +197 -0
  153. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +43 -0
  154. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockClient.md +81 -0
  155. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockErrors.md +12 -0
  156. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockPool.md +555 -0
  157. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Pool.md +84 -0
  158. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/PoolStats.md +35 -0
  159. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/ProxyAgent.md +229 -0
  160. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/RedirectHandler.md +93 -0
  161. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/RetryAgent.md +50 -0
  162. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/RetryHandler.md +118 -0
  163. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/RoundRobinPool.md +145 -0
  164. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/SnapshotAgent.md +616 -0
  165. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +275 -0
  166. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Util.md +25 -0
  167. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/WebSocket.md +141 -0
  168. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/api-lifecycle.md +91 -0
  169. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/best-practices/client-certificate.md +64 -0
  170. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/docs/docs/best-practices/crawling.md +1 -3
  171. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/best-practices/mocking-request.md +190 -0
  172. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/best-practices/proxy.md +127 -0
  173. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/docs/docs/best-practices/undici-vs-builtin-fetch.md +8 -10
  174. package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/best-practices/writing-tests.md +63 -0
  175. package/node_modules/@mytools/fst-platform/node_modules/undici/index-fetch.js +65 -0
  176. package/node_modules/@mytools/fst-platform/node_modules/undici/index.d.ts +3 -0
  177. package/node_modules/@mytools/fst-platform/node_modules/undici/index.js +234 -0
  178. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/abort-signal.js +59 -0
  179. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-connect.js +110 -0
  180. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-pipeline.js +252 -0
  181. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-request.js +214 -0
  182. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-stream.js +209 -0
  183. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-upgrade.js +111 -0
  184. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/index.js +7 -0
  185. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/readable.js +580 -0
  186. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/cache/memory-cache-store.js +3 -3
  187. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/cache/sqlite-cache-store.js +1 -3
  188. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/connect.js +153 -0
  189. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/constants.js +143 -0
  190. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/diagnostics.js +227 -0
  191. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/errors.js +477 -0
  192. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/request.js +485 -0
  193. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/symbols.js +75 -0
  194. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/tree.js +160 -0
  195. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/util.js +992 -0
  196. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/agent.js +158 -0
  197. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/balanced-pool.js +221 -0
  198. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/client-h1.js +1746 -0
  199. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/client-h2.js +1060 -0
  200. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/client.js +668 -0
  201. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/dispatcher-base.js +184 -0
  202. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/dispatcher.js +48 -0
  203. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +146 -0
  204. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/fixed-queue.js +135 -0
  205. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/dispatcher/h2c-client.js +4 -4
  206. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/pool-base.js +214 -0
  207. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/pool.js +118 -0
  208. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/proxy-agent.js +319 -0
  209. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/retry-agent.js +35 -0
  210. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/dispatcher/round-robin-pool.js +10 -32
  211. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/dispatcher/socks5-proxy-agent.js +63 -153
  212. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/global.js +59 -0
  213. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/handler/cache-handler.js +7 -49
  214. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/handler/cache-revalidation-handler.js +0 -10
  215. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/decorator-handler.js +67 -0
  216. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/handler/deduplication-handler.js +10 -29
  217. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/redirect-handler.js +238 -0
  218. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/retry-handler.js +504 -0
  219. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/unwrap-handler.js +106 -0
  220. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/wrap-handler.js +105 -0
  221. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/interceptor/cache.js +26 -79
  222. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/interceptor/decompress.js +3 -13
  223. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/interceptor/deduplicate.js +4 -5
  224. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/dns.js +571 -0
  225. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/dump.js +99 -0
  226. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/redirect.js +21 -0
  227. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/response-error.js +95 -0
  228. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/retry.js +19 -0
  229. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/.gitkeep +0 -0
  230. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/constants.js +531 -0
  231. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/llhttp-wasm.js +15 -0
  232. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +15 -0
  233. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/utils.js +12 -0
  234. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-agent.js +232 -0
  235. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/mock/mock-call-history.js +1 -1
  236. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-client.js +68 -0
  237. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-errors.js +29 -0
  238. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-interceptor.js +209 -0
  239. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-pool.js +68 -0
  240. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-symbols.js +32 -0
  241. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-utils.js +486 -0
  242. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
  243. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/mock/snapshot-agent.js +7 -25
  244. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/mock/snapshot-recorder.js +3 -38
  245. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/util/cache.js +10 -92
  246. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/util/promise.js +28 -0
  247. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/util/runtime-features.js +34 -3
  248. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/util/timers.js +425 -0
  249. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cache/cache.js +864 -0
  250. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
  251. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cache/util.js +45 -0
  252. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cookies/constants.js +12 -0
  253. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cookies/index.js +199 -0
  254. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cookies/parse.js +314 -0
  255. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cookies/util.js +352 -0
  256. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/eventsource/eventsource-stream.js +494 -0
  257. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/eventsource/eventsource.js +501 -0
  258. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/eventsource/util.js +29 -0
  259. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/LICENSE +21 -0
  260. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/body.js +509 -0
  261. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/constants.js +131 -0
  262. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/data-url.js +596 -0
  263. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/formdata-parser.js +586 -0
  264. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/formdata.js +259 -0
  265. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/global.js +40 -0
  266. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/headers.js +719 -0
  267. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/index.js +2413 -0
  268. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/request.js +1115 -0
  269. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/response.js +641 -0
  270. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/util.js +1522 -0
  271. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/infra/index.js +1 -16
  272. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/webidl/index.js +21 -7
  273. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/connection.js +339 -0
  274. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/constants.js +126 -0
  275. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/events.js +331 -0
  276. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/frame.js +133 -0
  277. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/permessage-deflate.js +105 -0
  278. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/receiver.js +507 -0
  279. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/sender.js +109 -0
  280. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/websocket/stream/websocketerror.js +10 -13
  281. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/websocket/stream/websocketstream.js +14 -29
  282. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/util.js +347 -0
  283. package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/websocket.js +758 -0
  284. package/node_modules/@mytools/fst-platform/node_modules/undici/package.json +152 -0
  285. package/node_modules/@mytools/fst-platform/node_modules/undici/scripts/strip-comments.js +10 -0
  286. package/node_modules/@mytools/fst-platform/node_modules/undici/types/README.md +6 -0
  287. package/node_modules/@mytools/fst-platform/node_modules/undici/types/agent.d.ts +32 -0
  288. package/node_modules/@mytools/fst-platform/node_modules/undici/types/api.d.ts +43 -0
  289. package/node_modules/@mytools/fst-platform/node_modules/undici/types/balanced-pool.d.ts +30 -0
  290. package/node_modules/@mytools/fst-platform/node_modules/undici/types/cache.d.ts +36 -0
  291. package/node_modules/@mytools/fst-platform/node_modules/undici/types/client.d.ts +139 -0
  292. package/node_modules/@mytools/fst-platform/node_modules/undici/types/connector.d.ts +36 -0
  293. package/node_modules/@mytools/fst-platform/node_modules/undici/types/content-type.d.ts +21 -0
  294. package/node_modules/@mytools/fst-platform/node_modules/undici/types/cookies.d.ts +30 -0
  295. package/node_modules/@mytools/fst-platform/node_modules/undici/types/diagnostics-channel.d.ts +74 -0
  296. package/node_modules/@mytools/fst-platform/node_modules/undici/types/dispatcher.d.ts +275 -0
  297. package/node_modules/@mytools/fst-platform/node_modules/undici/types/env-http-proxy-agent.d.ts +22 -0
  298. package/node_modules/@mytools/fst-platform/node_modules/undici/types/errors.d.ts +177 -0
  299. package/node_modules/@mytools/fst-platform/node_modules/undici/types/eventsource.d.ts +66 -0
  300. package/node_modules/@mytools/fst-platform/node_modules/undici/types/fetch.d.ts +231 -0
  301. package/node_modules/@mytools/fst-platform/node_modules/undici/types/formdata.d.ts +114 -0
  302. package/node_modules/@mytools/fst-platform/node_modules/undici/types/global-dispatcher.d.ts +9 -0
  303. package/node_modules/@mytools/fst-platform/node_modules/undici/types/global-origin.d.ts +7 -0
  304. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/h2c-client.d.ts +6 -6
  305. package/node_modules/@mytools/fst-platform/node_modules/undici/types/handlers.d.ts +14 -0
  306. package/node_modules/@mytools/fst-platform/node_modules/undici/types/header.d.ts +160 -0
  307. package/node_modules/@mytools/fst-platform/node_modules/undici/types/index.d.ts +91 -0
  308. package/node_modules/@mytools/fst-platform/node_modules/undici/types/interceptors.d.ts +82 -0
  309. package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-agent.d.ts +68 -0
  310. package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-client.d.ts +27 -0
  311. package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-errors.d.ts +12 -0
  312. package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-interceptor.d.ts +94 -0
  313. package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-pool.d.ts +27 -0
  314. package/node_modules/@mytools/fst-platform/node_modules/undici/types/patch.d.ts +29 -0
  315. package/node_modules/@mytools/fst-platform/node_modules/undici/types/pool-stats.d.ts +19 -0
  316. package/node_modules/@mytools/fst-platform/node_modules/undici/types/pool.d.ts +41 -0
  317. package/node_modules/@mytools/fst-platform/node_modules/undici/types/proxy-agent.d.ts +29 -0
  318. package/node_modules/@mytools/fst-platform/node_modules/undici/types/readable.d.ts +68 -0
  319. package/node_modules/@mytools/fst-platform/node_modules/undici/types/retry-agent.d.ts +8 -0
  320. package/node_modules/@mytools/fst-platform/node_modules/undici/types/retry-handler.d.ts +125 -0
  321. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/round-robin-pool.d.ts +2 -0
  322. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/snapshot-agent.d.ts +0 -4
  323. package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/socks5-proxy-agent.d.ts +2 -4
  324. package/node_modules/@mytools/fst-platform/node_modules/undici/types/util.d.ts +18 -0
  325. package/node_modules/@mytools/fst-platform/node_modules/undici/types/webidl.d.ts +347 -0
  326. package/node_modules/@mytools/fst-platform/node_modules/undici/types/websocket.d.ts +188 -0
  327. package/node_modules/@mytools/fst-platform/package.json +4 -3
  328. package/node_modules/@mytools/fst-platform/src/managed-process.js +36 -0
  329. package/node_modules/@mytools/fst-platform/src/process.js +11 -3
  330. package/node_modules/@mytools/fst-platform/src/shell.js +46 -1
  331. package/node_modules/@mytools/fst-plugin/README.md +4 -0
  332. package/node_modules/@mytools/fst-plugin/package.json +1 -1
  333. package/node_modules/@mytools/fst-plugin/src/contracts.js +3 -0
  334. package/node_modules/@mytools/fst-plugin/src/host.js +54 -31
  335. package/node_modules/@mytools/fst-plugin/src/runtime.js +14 -8
  336. package/node_modules/@mytools/fst-workflow/package.json +1 -1
  337. package/node_modules/@mytools/fst-workflow/src/engine.js +1 -1
  338. package/node_modules/@mytools/fst-workspace/README.md +6 -0
  339. package/node_modules/@mytools/fst-workspace/package.json +2 -1
  340. package/node_modules/@mytools/fst-workspace/src/plugin-registry.js +58 -0
  341. package/node_modules/@mytools/fst-workspace/src/plugins.js +10 -5
  342. package/node_modules/@mytools/fst-workspace/src/workflows.js +32 -12
  343. package/node_modules/@mytools/pack/package.json +3 -3
  344. package/node_modules/@mytools/pack/runtime-cache.js +26 -0
  345. package/node_modules/@mytools/pack/runtime.js +6 -10
  346. package/node_modules/@mytools/sdk/README.md +10 -0
  347. package/node_modules/@mytools/sdk/inputs.js +53 -0
  348. package/node_modules/@mytools/sdk/package.json +2 -0
  349. package/node_modules/@mytools/sdk/reports.js +53 -0
  350. package/node_modules/@mytools/web/public/THIRD_PARTY_NOTICES.txt +1197 -1207
  351. package/node_modules/@npmcli/agent/lib/agents.js +0 -10
  352. package/node_modules/@npmcli/agent/package.json +12 -11
  353. package/node_modules/@npmcli/arborist/README.md +2 -2
  354. package/node_modules/@npmcli/arborist/bin/index.js +2 -1
  355. package/node_modules/@npmcli/arborist/bin/shrinkwrap.js +7 -0
  356. package/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js +25 -159
  357. package/node_modules/@npmcli/arborist/lib/arborist/isolated-reifier.js +49 -11
  358. package/node_modules/@npmcli/arborist/lib/arborist/load-actual.js +0 -67
  359. package/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js +37 -5
  360. package/node_modules/@npmcli/arborist/lib/arborist/rebuild.js +8 -15
  361. package/node_modules/@npmcli/arborist/lib/arborist/reify.js +42 -59
  362. package/node_modules/@npmcli/arborist/lib/consistent-resolve.js +1 -1
  363. package/node_modules/@npmcli/arborist/lib/diff.js +22 -17
  364. package/node_modules/@npmcli/arborist/lib/edge.js +2 -22
  365. package/node_modules/@npmcli/arborist/lib/index.js +0 -2
  366. package/node_modules/@npmcli/arborist/lib/isolated-classes.js +1 -4
  367. package/node_modules/@npmcli/arborist/lib/node.js +9 -13
  368. package/node_modules/@npmcli/arborist/lib/place-dep.js +0 -6
  369. package/node_modules/@npmcli/arborist/lib/printable.js +5 -0
  370. package/node_modules/@npmcli/arborist/lib/shrinkwrap.js +32 -55
  371. package/node_modules/@npmcli/arborist/package.json +26 -32
  372. package/node_modules/@npmcli/fs/lib/move-file.js +5 -5
  373. package/node_modules/@npmcli/fs/package.json +5 -5
  374. package/node_modules/@npmcli/git/package.json +12 -13
  375. package/node_modules/@npmcli/installed-package-contents/package.json +7 -7
  376. package/node_modules/@npmcli/map-workspaces/package.json +7 -7
  377. package/node_modules/@npmcli/metavuln-calculator/package.json +16 -10
  378. package/node_modules/@npmcli/name-from-folder/package.json +16 -13
  379. package/node_modules/@npmcli/node-gyp/package.json +5 -5
  380. package/node_modules/@npmcli/package-json/lib/index.js +1 -2
  381. package/node_modules/@npmcli/package-json/lib/normalize.js +22 -23
  382. package/node_modules/@npmcli/package-json/package.json +10 -11
  383. package/node_modules/@npmcli/promise-spawn/README.md +2 -1
  384. package/node_modules/@npmcli/promise-spawn/package.json +5 -5
  385. package/node_modules/@npmcli/redact/package.json +4 -4
  386. package/node_modules/@npmcli/run-script/lib/is-server-package.js +11 -0
  387. package/node_modules/@npmcli/run-script/lib/make-spawn-args.js +6 -5
  388. package/node_modules/@npmcli/run-script/lib/run-script-pkg.js +13 -4
  389. package/node_modules/@npmcli/run-script/lib/run-script.js +2 -1
  390. package/node_modules/@npmcli/run-script/package.json +11 -12
  391. package/node_modules/@sigstore/bundle/README.md +1 -1
  392. package/node_modules/@sigstore/bundle/dist/error.js +0 -1
  393. package/node_modules/@sigstore/bundle/package.json +2 -2
  394. package/node_modules/@sigstore/core/README.md +1 -1
  395. package/node_modules/@sigstore/core/dist/asn1/length.js +1 -12
  396. package/node_modules/@sigstore/core/dist/asn1/obj.js +7 -25
  397. package/node_modules/@sigstore/core/dist/asn1/parse.js +5 -24
  398. package/node_modules/@sigstore/core/package.json +2 -2
  399. package/node_modules/@sigstore/sign/README.md +1 -1
  400. package/node_modules/@sigstore/sign/dist/signer/fulcio/ephemeral.js +1 -1
  401. package/node_modules/@sigstore/sign/package.json +9 -9
  402. package/node_modules/@sigstore/tuf/README.md +1 -1
  403. package/node_modules/@sigstore/tuf/package.json +4 -4
  404. package/node_modules/@sigstore/tuf/seeds.json +1 -1
  405. package/node_modules/@sigstore/verify/README.md +1 -1
  406. package/node_modules/@sigstore/verify/dist/bundle/dsse.d.ts +0 -1
  407. package/node_modules/@sigstore/verify/dist/bundle/dsse.js +0 -6
  408. package/node_modules/@sigstore/verify/dist/bundle/message.d.ts +0 -1
  409. package/node_modules/@sigstore/verify/dist/bundle/message.js +0 -5
  410. package/node_modules/@sigstore/verify/dist/policy.d.ts +1 -1
  411. package/node_modules/@sigstore/verify/dist/policy.js +2 -0
  412. package/node_modules/@sigstore/verify/dist/shared.types.d.ts +1 -6
  413. package/node_modules/@sigstore/verify/dist/tlog/checkpoint.js +3 -17
  414. package/node_modules/@sigstore/verify/dist/tlog/hashedrekord.js +4 -4
  415. package/node_modules/@sigstore/verify/dist/tlog/index.js +1 -13
  416. package/node_modules/@sigstore/verify/dist/tlog/merkle.js +1 -12
  417. package/node_modules/@sigstore/verify/dist/verifier.js +5 -13
  418. package/node_modules/@sigstore/verify/package.json +5 -5
  419. package/node_modules/@tufjs/models/package.json +3 -3
  420. package/node_modules/abbrev/package.json +8 -9
  421. package/node_modules/agent-base/dist/helpers.d.ts +5 -0
  422. package/node_modules/agent-base/dist/helpers.d.ts.map +1 -1
  423. package/node_modules/agent-base/dist/helpers.js +34 -5
  424. package/node_modules/agent-base/dist/helpers.js.map +1 -1
  425. package/node_modules/agent-base/dist/index.d.ts +5 -1
  426. package/node_modules/agent-base/dist/index.d.ts.map +1 -1
  427. package/node_modules/agent-base/dist/index.js +40 -8
  428. package/node_modules/agent-base/dist/index.js.map +1 -1
  429. package/node_modules/agent-base/package.json +12 -12
  430. package/node_modules/bin-links/README.md +4 -5
  431. package/node_modules/bin-links/lib/fix-bin.js +1 -3
  432. package/node_modules/bin-links/lib/index.js +16 -8
  433. package/node_modules/bin-links/lib/link-mans.js +53 -0
  434. package/node_modules/bin-links/package.json +12 -11
  435. package/node_modules/cacache/lib/content/write.js +0 -2
  436. package/node_modules/cacache/lib/entry-index.js +0 -3
  437. package/node_modules/cacache/lib/rm.js +0 -1
  438. package/node_modules/cacache/lib/util/tmp.js +1 -5
  439. package/node_modules/cacache/lib/verify.js +2 -2
  440. package/node_modules/cacache/package.json +7 -7
  441. package/node_modules/cmd-shim/lib/index.js +32 -67
  442. package/node_modules/cmd-shim/package.json +5 -5
  443. package/node_modules/hosted-git-info/README.md +1 -1
  444. package/node_modules/hosted-git-info/lib/parse-url.js +3 -1
  445. package/node_modules/hosted-git-info/package.json +4 -4
  446. package/node_modules/http-proxy-agent/dist/index.d.ts +5 -8
  447. package/node_modules/http-proxy-agent/dist/index.d.ts.map +1 -1
  448. package/node_modules/http-proxy-agent/dist/index.js +42 -26
  449. package/node_modules/http-proxy-agent/dist/index.js.map +1 -1
  450. package/node_modules/http-proxy-agent/package.json +14 -15
  451. package/node_modules/https-proxy-agent/dist/index.d.ts +5 -9
  452. package/node_modules/https-proxy-agent/dist/index.d.ts.map +1 -1
  453. package/node_modules/https-proxy-agent/dist/index.js +44 -98
  454. package/node_modules/https-proxy-agent/dist/index.js.map +1 -1
  455. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +3 -0
  456. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +1 -1
  457. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +10 -3
  458. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -1
  459. package/node_modules/https-proxy-agent/package.json +15 -16
  460. package/node_modules/ignore-walk/package.json +4 -4
  461. package/node_modules/ini/package.json +5 -5
  462. package/node_modules/ip-address/README.md +70 -70
  463. package/node_modules/ip-address/dist/ipv6.js +7 -4
  464. package/node_modules/ip-address/dist/ipv6.js.map +1 -1
  465. package/node_modules/ip-address/dist/v6/constants.d.ts +3 -0
  466. package/node_modules/ip-address/dist/v6/constants.js +3 -0
  467. package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  468. package/node_modules/ip-address/package.json +2 -1
  469. package/node_modules/json-parse-even-better-errors/lib/index.js +1 -3
  470. package/node_modules/json-parse-even-better-errors/package.json +17 -13
  471. package/node_modules/make-fetch-happen/package.json +11 -11
  472. package/node_modules/minipass-fetch/package.json +4 -4
  473. package/node_modules/node-gyp/.release-please-manifest.json +1 -1
  474. package/node_modules/node-gyp/CHANGELOG.md +0 -102
  475. package/node_modules/node-gyp/README.md +2 -3
  476. package/node_modules/node-gyp/eslint.config.js +1 -4
  477. package/node_modules/node-gyp/gyp/.release-please-manifest.json +1 -1
  478. package/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +19 -14
  479. package/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +2 -7
  480. package/node_modules/node-gyp/gyp/pyproject.toml +1 -1
  481. package/node_modules/node-gyp/lib/build.js +6 -18
  482. package/node_modules/node-gyp/lib/create-config-gypi.js +0 -5
  483. package/node_modules/node-gyp/lib/node-gyp.js +2 -9
  484. package/node_modules/node-gyp/lib/rebuild.js +3 -3
  485. package/node_modules/node-gyp/package.json +9 -11
  486. package/node_modules/nopt/README.md +4 -2
  487. package/node_modules/nopt/lib/debug.js +5 -0
  488. package/node_modules/nopt/lib/nopt-lib.js +43 -7
  489. package/node_modules/nopt/lib/nopt.js +4 -2
  490. package/node_modules/nopt/lib/type-defs.js +13 -8
  491. package/node_modules/nopt/package.json +17 -15
  492. package/node_modules/npm-bundled/package.json +6 -6
  493. package/node_modules/npm-install-checks/package.json +5 -5
  494. package/node_modules/npm-normalize-package-bin/package.json +16 -13
  495. package/node_modules/npm-package-arg/package.json +7 -7
  496. package/node_modules/npm-packlist/README.md +30 -45
  497. package/node_modules/npm-packlist/lib/index.js +47 -115
  498. package/node_modules/npm-packlist/package.json +8 -10
  499. package/node_modules/npm-pick-manifest/package.json +19 -15
  500. package/node_modules/npm-registry-fetch/lib/errors.js +3 -8
  501. package/node_modules/npm-registry-fetch/package.json +12 -12
  502. package/node_modules/pacote/lib/dir.js +5 -60
  503. package/node_modules/pacote/lib/fetcher.js +0 -4
  504. package/node_modules/pacote/lib/git.js +3 -11
  505. package/node_modules/pacote/lib/util/add-git-sha.js +1 -1
  506. package/node_modules/pacote/package.json +18 -19
  507. package/node_modules/parse-conflict-json/package.json +6 -6
  508. package/node_modules/proc-log/package.json +4 -4
  509. package/node_modules/read-cmd-shim/lib/index.js +1 -1
  510. package/node_modules/read-cmd-shim/package.json +18 -14
  511. package/node_modules/sigstore/README.md +1 -1
  512. package/node_modules/sigstore/package.json +10 -10
  513. package/node_modules/socks-proxy-agent/dist/index.d.ts +3 -1
  514. package/node_modules/socks-proxy-agent/dist/index.d.ts.map +1 -1
  515. package/node_modules/socks-proxy-agent/dist/index.js +43 -17
  516. package/node_modules/socks-proxy-agent/dist/index.js.map +1 -1
  517. package/node_modules/socks-proxy-agent/package.json +15 -15
  518. package/node_modules/ssri/package.json +4 -4
  519. package/node_modules/tuf-js/dist/config.d.ts +2 -2
  520. package/node_modules/tuf-js/dist/fetcher.d.ts +4 -4
  521. package/node_modules/tuf-js/dist/fetcher.js +16 -55
  522. package/node_modules/tuf-js/dist/updater.js +2 -2
  523. package/node_modules/tuf-js/package.json +8 -8
  524. package/node_modules/undici/README.md +72 -405
  525. package/node_modules/undici/docs/docs/api/Agent.md +41 -252
  526. package/node_modules/undici/docs/docs/api/BalancedPool.md +48 -246
  527. package/node_modules/undici/docs/docs/api/CacheStorage.md +13 -171
  528. package/node_modules/undici/docs/docs/api/Client.md +139 -395
  529. package/node_modules/undici/docs/docs/api/Connector.md +35 -118
  530. package/node_modules/undici/docs/docs/api/ContentType.md +25 -65
  531. package/node_modules/undici/docs/docs/api/Cookies.md +47 -125
  532. package/node_modules/undici/docs/docs/api/Debug.md +31 -47
  533. package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +97 -409
  534. package/node_modules/undici/docs/docs/api/DispatchInterceptor.md +60 -0
  535. package/node_modules/undici/docs/docs/api/Dispatcher.md +1011 -500
  536. package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +96 -105
  537. package/node_modules/undici/docs/docs/api/Errors.md +28 -528
  538. package/node_modules/undici/docs/docs/api/EventSource.md +13 -326
  539. package/node_modules/undici/docs/docs/api/Fetch.md +24 -693
  540. package/node_modules/undici/docs/docs/api/MockAgent.md +264 -346
  541. package/node_modules/undici/docs/docs/api/MockClient.md +31 -153
  542. package/node_modules/undici/docs/docs/api/MockErrors.md +5 -56
  543. package/node_modules/undici/docs/docs/api/MockPool.md +253 -324
  544. package/node_modules/undici/docs/docs/api/Pool.md +41 -235
  545. package/node_modules/undici/docs/docs/api/PoolStats.md +13 -119
  546. package/node_modules/undici/docs/docs/api/ProxyAgent.md +81 -198
  547. package/node_modules/undici/docs/docs/api/RedirectHandler.md +58 -238
  548. package/node_modules/undici/docs/docs/api/RetryAgent.md +28 -119
  549. package/node_modules/undici/docs/docs/api/RetryHandler.md +78 -161
  550. package/node_modules/undici/docs/docs/api/Util.md +11 -68
  551. package/node_modules/undici/docs/docs/api/WebSocket.md +24 -509
  552. package/node_modules/undici/docs/docs/api/api-lifecycle.md +33 -101
  553. package/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -2
  554. package/node_modules/undici/docs/docs/best-practices/mocking-request.md +2 -58
  555. package/node_modules/undici/docs/docs/best-practices/proxy.md +1 -3
  556. package/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -45
  557. package/node_modules/undici/index-fetch.js +4 -34
  558. package/node_modules/undici/index.d.ts +1 -1
  559. package/node_modules/undici/index.js +20 -87
  560. package/node_modules/undici/lib/api/abort-signal.js +0 -2
  561. package/node_modules/undici/lib/api/api-connect.js +11 -15
  562. package/node_modules/undici/lib/api/api-pipeline.js +19 -33
  563. package/node_modules/undici/lib/api/api-request.js +59 -89
  564. package/node_modules/undici/lib/api/api-stream.js +64 -114
  565. package/node_modules/undici/lib/api/api-upgrade.js +13 -26
  566. package/node_modules/undici/lib/api/readable.js +87 -317
  567. package/node_modules/undici/lib/api/util.js +93 -0
  568. package/node_modules/undici/lib/core/connect.js +125 -77
  569. package/node_modules/undici/lib/core/constants.js +9 -11
  570. package/node_modules/undici/lib/core/diagnostics.js +129 -154
  571. package/node_modules/undici/lib/core/errors.js +50 -122
  572. package/node_modules/undici/lib/core/request.js +87 -172
  573. package/node_modules/undici/lib/core/symbols.js +2 -14
  574. package/node_modules/undici/lib/core/tree.js +2 -10
  575. package/node_modules/undici/lib/core/util.js +190 -481
  576. package/node_modules/undici/lib/dispatcher/agent.js +35 -83
  577. package/node_modules/undici/lib/dispatcher/balanced-pool.js +38 -46
  578. package/node_modules/undici/lib/dispatcher/client-h1.js +199 -492
  579. package/node_modules/undici/lib/dispatcher/client-h2.js +380 -1409
  580. package/node_modules/undici/lib/dispatcher/client.js +130 -253
  581. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +52 -50
  582. package/node_modules/undici/lib/dispatcher/dispatcher.js +24 -17
  583. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +45 -75
  584. package/node_modules/undici/lib/dispatcher/fixed-queue.js +50 -68
  585. package/node_modules/undici/lib/dispatcher/pool-base.js +54 -153
  586. package/node_modules/undici/lib/dispatcher/pool-stats.js +34 -0
  587. package/node_modules/undici/lib/dispatcher/pool.js +16 -135
  588. package/node_modules/undici/lib/dispatcher/proxy-agent.js +41 -175
  589. package/node_modules/undici/lib/dispatcher/retry-agent.js +0 -3
  590. package/node_modules/undici/lib/global.js +9 -59
  591. package/node_modules/undici/lib/handler/decorator-handler.js +15 -43
  592. package/node_modules/undici/lib/handler/redirect-handler.js +116 -127
  593. package/node_modules/undici/lib/handler/retry-handler.js +182 -398
  594. package/node_modules/undici/lib/interceptor/dns.js +47 -254
  595. package/node_modules/undici/lib/interceptor/dump.js +56 -32
  596. package/node_modules/undici/lib/interceptor/redirect-interceptor.js +21 -0
  597. package/node_modules/undici/lib/interceptor/redirect.js +14 -11
  598. package/node_modules/undici/lib/interceptor/response-error.js +22 -31
  599. package/node_modules/undici/lib/llhttp/.gitkeep +0 -0
  600. package/node_modules/undici/lib/llhttp/constants.js +193 -446
  601. package/node_modules/undici/lib/llhttp/llhttp-wasm.js +1 -11
  602. package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +1 -11
  603. package/node_modules/undici/lib/llhttp/utils.js +12 -9
  604. package/node_modules/undici/lib/mock/mock-agent.js +22 -106
  605. package/node_modules/undici/lib/mock/mock-client.js +4 -13
  606. package/node_modules/undici/lib/mock/mock-errors.js +2 -3
  607. package/node_modules/undici/lib/mock/mock-interceptor.js +13 -33
  608. package/node_modules/undici/lib/mock/mock-pool.js +4 -13
  609. package/node_modules/undici/lib/mock/mock-symbols.js +1 -10
  610. package/node_modules/undici/lib/mock/mock-utils.js +51 -404
  611. package/node_modules/undici/lib/mock/pluralizer.js +29 -0
  612. package/node_modules/undici/lib/util/timers.js +9 -11
  613. package/node_modules/undici/lib/web/cache/cache.js +51 -63
  614. package/node_modules/undici/lib/web/cache/cachestorage.js +7 -13
  615. package/node_modules/undici/lib/web/cache/symbols.js +5 -0
  616. package/node_modules/undici/lib/web/cookies/index.js +18 -45
  617. package/node_modules/undici/lib/web/cookies/parse.js +149 -157
  618. package/node_modules/undici/lib/web/cookies/util.js +2 -4
  619. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +9 -37
  620. package/node_modules/undici/lib/web/eventsource/eventsource.js +64 -108
  621. package/node_modules/undici/lib/web/eventsource/util.js +5 -28
  622. package/node_modules/undici/lib/web/fetch/body.js +148 -173
  623. package/node_modules/undici/lib/web/fetch/constants.js +6 -13
  624. package/node_modules/undici/lib/web/fetch/data-url.js +167 -19
  625. package/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +46 -0
  626. package/node_modules/undici/lib/web/fetch/file.js +126 -0
  627. package/node_modules/undici/lib/web/fetch/formdata-parser.js +117 -229
  628. package/node_modules/undici/lib/web/fetch/formdata.js +65 -85
  629. package/node_modules/undici/lib/web/fetch/headers.js +108 -143
  630. package/node_modules/undici/lib/web/fetch/index.js +446 -627
  631. package/node_modules/undici/lib/web/fetch/request.js +115 -217
  632. package/node_modules/undici/lib/web/fetch/response.js +82 -110
  633. package/node_modules/undici/lib/web/fetch/symbols.js +9 -0
  634. package/node_modules/undici/lib/web/fetch/util.js +393 -291
  635. package/node_modules/undici/lib/web/fetch/webidl.js +695 -0
  636. package/node_modules/undici/lib/web/fileapi/encoding.js +290 -0
  637. package/node_modules/undici/lib/web/fileapi/filereader.js +344 -0
  638. package/node_modules/undici/lib/web/fileapi/progressevent.js +78 -0
  639. package/node_modules/undici/lib/web/fileapi/symbols.js +10 -0
  640. package/node_modules/undici/lib/web/fileapi/util.js +391 -0
  641. package/node_modules/undici/lib/web/websocket/connection.js +160 -139
  642. package/node_modules/undici/lib/web/websocket/constants.js +10 -70
  643. package/node_modules/undici/lib/web/websocket/events.js +30 -49
  644. package/node_modules/undici/lib/web/websocket/frame.js +20 -51
  645. package/node_modules/undici/lib/web/websocket/receiver.js +87 -83
  646. package/node_modules/undici/lib/web/websocket/sender.js +13 -18
  647. package/node_modules/undici/lib/web/websocket/symbols.js +12 -0
  648. package/node_modules/undici/lib/web/websocket/util.js +90 -115
  649. package/node_modules/undici/lib/web/websocket/websocket.js +171 -359
  650. package/node_modules/undici/package.json +57 -49
  651. package/node_modules/undici/scripts/strip-comments.js +1 -3
  652. package/node_modules/undici/types/agent.d.ts +13 -12
  653. package/node_modules/undici/types/api.d.ts +26 -26
  654. package/node_modules/undici/types/balanced-pool.d.ts +12 -13
  655. package/node_modules/undici/types/client.d.ts +39 -98
  656. package/node_modules/undici/types/connector.d.ts +2 -5
  657. package/node_modules/undici/types/cookies.d.ts +1 -3
  658. package/node_modules/undici/types/diagnostics-channel.d.ts +11 -20
  659. package/node_modules/undici/types/dispatcher.d.ts +139 -136
  660. package/node_modules/undici/types/env-http-proxy-agent.d.ts +3 -4
  661. package/node_modules/undici/types/errors.d.ts +54 -86
  662. package/node_modules/undici/types/eventsource.d.ts +4 -9
  663. package/node_modules/undici/types/fetch.d.ts +25 -51
  664. package/node_modules/undici/types/file.d.ts +39 -0
  665. package/node_modules/undici/types/filereader.d.ts +54 -0
  666. package/node_modules/undici/types/formdata.d.ts +7 -7
  667. package/node_modules/undici/types/global-dispatcher.d.ts +4 -4
  668. package/node_modules/undici/types/global-origin.d.ts +5 -5
  669. package/node_modules/undici/types/handlers.d.ts +9 -10
  670. package/node_modules/undici/types/header.d.ts +1 -162
  671. package/node_modules/undici/types/index.d.ts +47 -69
  672. package/node_modules/undici/types/interceptors.d.ts +12 -62
  673. package/node_modules/undici/types/mock-agent.d.ts +27 -46
  674. package/node_modules/undici/types/mock-client.d.ts +4 -6
  675. package/node_modules/undici/types/mock-errors.d.ts +3 -3
  676. package/node_modules/undici/types/mock-interceptor.d.ts +21 -26
  677. package/node_modules/undici/types/mock-pool.d.ts +4 -6
  678. package/node_modules/undici/types/patch.d.ts +4 -0
  679. package/node_modules/undici/types/pool-stats.d.ts +8 -8
  680. package/node_modules/undici/types/pool.d.ts +14 -14
  681. package/node_modules/undici/types/proxy-agent.d.ts +6 -13
  682. package/node_modules/undici/types/readable.d.ts +16 -19
  683. package/node_modules/undici/types/retry-agent.d.ts +1 -1
  684. package/node_modules/undici/types/retry-handler.d.ts +9 -18
  685. package/node_modules/undici/types/util.d.ts +3 -3
  686. package/node_modules/undici/types/webidl.d.ts +32 -156
  687. package/node_modules/undici/types/websocket.d.ts +10 -48
  688. package/node_modules/validate-npm-package-name/package.json +4 -4
  689. package/node_modules/which/package.json +4 -4
  690. package/node_modules/write-file-atomic/package.json +4 -4
  691. package/package.json +56 -60
  692. package/node_modules/@npmcli/arborist/lib/npm-extension.js +0 -237
  693. package/node_modules/@npmcli/arborist/lib/package-extensions.js +0 -236
  694. package/node_modules/@npmcli/arborist/lib/patch.js +0 -111
  695. package/node_modules/@npmcli/arborist/lib/patched-dependencies.js +0 -168
  696. package/node_modules/cacache/lib/util/cache-dir.js +0 -29
  697. package/node_modules/diff/CONTRIBUTING.md +0 -28
  698. package/node_modules/diff/LICENSE +0 -29
  699. package/node_modules/diff/README.md +0 -388
  700. package/node_modules/diff/dist/diff.js +0 -1782
  701. package/node_modules/diff/dist/diff.min.js +0 -1
  702. package/node_modules/diff/eslint.config.mjs +0 -182
  703. package/node_modules/diff/libcjs/convert/dmp.d.ts +0 -8
  704. package/node_modules/diff/libcjs/convert/dmp.d.ts.map +0 -1
  705. package/node_modules/diff/libcjs/convert/dmp.js +0 -24
  706. package/node_modules/diff/libcjs/convert/xml.d.ts +0 -6
  707. package/node_modules/diff/libcjs/convert/xml.d.ts.map +0 -1
  708. package/node_modules/diff/libcjs/convert/xml.js +0 -34
  709. package/node_modules/diff/libcjs/diff/array.d.ts +0 -19
  710. package/node_modules/diff/libcjs/diff/array.d.ts.map +0 -1
  711. package/node_modules/diff/libcjs/diff/array.js +0 -40
  712. package/node_modules/diff/libcjs/diff/base.d.ts +0 -20
  713. package/node_modules/diff/libcjs/diff/base.d.ts.map +0 -1
  714. package/node_modules/diff/libcjs/diff/base.js +0 -265
  715. package/node_modules/diff/libcjs/diff/character.d.ts +0 -19
  716. package/node_modules/diff/libcjs/diff/character.d.ts.map +0 -1
  717. package/node_modules/diff/libcjs/diff/character.js +0 -31
  718. package/node_modules/diff/libcjs/diff/css.d.ts +0 -18
  719. package/node_modules/diff/libcjs/diff/css.d.ts.map +0 -1
  720. package/node_modules/diff/libcjs/diff/css.js +0 -34
  721. package/node_modules/diff/libcjs/diff/json.d.ts +0 -24
  722. package/node_modules/diff/libcjs/diff/json.d.ts.map +0 -1
  723. package/node_modules/diff/libcjs/diff/json.js +0 -105
  724. package/node_modules/diff/libcjs/diff/line.d.ts +0 -24
  725. package/node_modules/diff/libcjs/diff/line.d.ts.map +0 -1
  726. package/node_modules/diff/libcjs/diff/line.js +0 -89
  727. package/node_modules/diff/libcjs/diff/sentence.d.ts +0 -21
  728. package/node_modules/diff/libcjs/diff/sentence.d.ts.map +0 -1
  729. package/node_modules/diff/libcjs/diff/sentence.js +0 -67
  730. package/node_modules/diff/libcjs/diff/word.d.ts +0 -35
  731. package/node_modules/diff/libcjs/diff/word.d.ts.map +0 -1
  732. package/node_modules/diff/libcjs/diff/word.js +0 -312
  733. package/node_modules/diff/libcjs/index.d.ts +0 -20
  734. package/node_modules/diff/libcjs/index.d.ts.map +0 -1
  735. package/node_modules/diff/libcjs/index.js +0 -64
  736. package/node_modules/diff/libcjs/package.json +0 -1
  737. package/node_modules/diff/libcjs/patch/apply.d.ts +0 -62
  738. package/node_modules/diff/libcjs/patch/apply.d.ts.map +0 -1
  739. package/node_modules/diff/libcjs/patch/apply.js +0 -267
  740. package/node_modules/diff/libcjs/patch/create.d.ts +0 -122
  741. package/node_modules/diff/libcjs/patch/create.d.ts.map +0 -1
  742. package/node_modules/diff/libcjs/patch/create.js +0 -251
  743. package/node_modules/diff/libcjs/patch/line-endings.d.ts +0 -17
  744. package/node_modules/diff/libcjs/patch/line-endings.d.ts.map +0 -1
  745. package/node_modules/diff/libcjs/patch/line-endings.js +0 -61
  746. package/node_modules/diff/libcjs/patch/parse.d.ts +0 -8
  747. package/node_modules/diff/libcjs/patch/parse.d.ts.map +0 -1
  748. package/node_modules/diff/libcjs/patch/parse.js +0 -150
  749. package/node_modules/diff/libcjs/patch/reverse.d.ts +0 -9
  750. package/node_modules/diff/libcjs/patch/reverse.d.ts.map +0 -1
  751. package/node_modules/diff/libcjs/patch/reverse.js +0 -37
  752. package/node_modules/diff/libcjs/types.d.ts +0 -213
  753. package/node_modules/diff/libcjs/types.d.ts.map +0 -1
  754. package/node_modules/diff/libcjs/types.js +0 -2
  755. package/node_modules/diff/libcjs/util/array.d.ts +0 -3
  756. package/node_modules/diff/libcjs/util/array.d.ts.map +0 -1
  757. package/node_modules/diff/libcjs/util/array.js +0 -21
  758. package/node_modules/diff/libcjs/util/distance-iterator.d.ts +0 -2
  759. package/node_modules/diff/libcjs/util/distance-iterator.d.ts.map +0 -1
  760. package/node_modules/diff/libcjs/util/distance-iterator.js +0 -40
  761. package/node_modules/diff/libcjs/util/params.d.ts +0 -4
  762. package/node_modules/diff/libcjs/util/params.d.ts.map +0 -1
  763. package/node_modules/diff/libcjs/util/params.js +0 -17
  764. package/node_modules/diff/libcjs/util/string.d.ts +0 -30
  765. package/node_modules/diff/libcjs/util/string.d.ts.map +0 -1
  766. package/node_modules/diff/libcjs/util/string.js +0 -200
  767. package/node_modules/diff/libesm/convert/dmp.d.ts +0 -8
  768. package/node_modules/diff/libesm/convert/dmp.d.ts.map +0 -1
  769. package/node_modules/diff/libesm/convert/dmp.js +0 -21
  770. package/node_modules/diff/libesm/convert/xml.d.ts +0 -6
  771. package/node_modules/diff/libesm/convert/xml.d.ts.map +0 -1
  772. package/node_modules/diff/libesm/convert/xml.js +0 -31
  773. package/node_modules/diff/libesm/diff/array.d.ts +0 -19
  774. package/node_modules/diff/libesm/diff/array.d.ts.map +0 -1
  775. package/node_modules/diff/libesm/diff/array.js +0 -16
  776. package/node_modules/diff/libesm/diff/base.d.ts +0 -20
  777. package/node_modules/diff/libesm/diff/base.d.ts.map +0 -1
  778. package/node_modules/diff/libesm/diff/base.js +0 -253
  779. package/node_modules/diff/libesm/diff/character.d.ts +0 -19
  780. package/node_modules/diff/libesm/diff/character.d.ts.map +0 -1
  781. package/node_modules/diff/libesm/diff/character.js +0 -7
  782. package/node_modules/diff/libesm/diff/css.d.ts +0 -18
  783. package/node_modules/diff/libesm/diff/css.d.ts.map +0 -1
  784. package/node_modules/diff/libesm/diff/css.js +0 -10
  785. package/node_modules/diff/libesm/diff/json.d.ts +0 -24
  786. package/node_modules/diff/libesm/diff/json.d.ts.map +0 -1
  787. package/node_modules/diff/libesm/diff/json.js +0 -78
  788. package/node_modules/diff/libesm/diff/line.d.ts +0 -24
  789. package/node_modules/diff/libesm/diff/line.d.ts.map +0 -1
  790. package/node_modules/diff/libesm/diff/line.js +0 -65
  791. package/node_modules/diff/libesm/diff/sentence.d.ts +0 -21
  792. package/node_modules/diff/libesm/diff/sentence.d.ts.map +0 -1
  793. package/node_modules/diff/libesm/diff/sentence.js +0 -43
  794. package/node_modules/diff/libesm/diff/word.d.ts +0 -35
  795. package/node_modules/diff/libesm/diff/word.d.ts.map +0 -1
  796. package/node_modules/diff/libesm/diff/word.js +0 -281
  797. package/node_modules/diff/libesm/index.d.ts +0 -20
  798. package/node_modules/diff/libesm/index.d.ts.map +0 -1
  799. package/node_modules/diff/libesm/index.js +0 -30
  800. package/node_modules/diff/libesm/package.json +0 -1
  801. package/node_modules/diff/libesm/patch/apply.d.ts +0 -62
  802. package/node_modules/diff/libesm/patch/apply.d.ts.map +0 -1
  803. package/node_modules/diff/libesm/patch/apply.js +0 -257
  804. package/node_modules/diff/libesm/patch/create.d.ts +0 -122
  805. package/node_modules/diff/libesm/patch/create.d.ts.map +0 -1
  806. package/node_modules/diff/libesm/patch/create.js +0 -228
  807. package/node_modules/diff/libesm/patch/line-endings.d.ts +0 -17
  808. package/node_modules/diff/libesm/patch/line-endings.d.ts.map +0 -1
  809. package/node_modules/diff/libesm/patch/line-endings.js +0 -44
  810. package/node_modules/diff/libesm/patch/parse.d.ts +0 -8
  811. package/node_modules/diff/libesm/patch/parse.d.ts.map +0 -1
  812. package/node_modules/diff/libesm/patch/parse.js +0 -147
  813. package/node_modules/diff/libesm/patch/reverse.d.ts +0 -9
  814. package/node_modules/diff/libesm/patch/reverse.d.ts.map +0 -1
  815. package/node_modules/diff/libesm/patch/reverse.js +0 -23
  816. package/node_modules/diff/libesm/types.d.ts +0 -213
  817. package/node_modules/diff/libesm/types.d.ts.map +0 -1
  818. package/node_modules/diff/libesm/types.js +0 -1
  819. package/node_modules/diff/libesm/util/array.d.ts +0 -3
  820. package/node_modules/diff/libesm/util/array.d.ts.map +0 -1
  821. package/node_modules/diff/libesm/util/array.js +0 -17
  822. package/node_modules/diff/libesm/util/distance-iterator.d.ts +0 -2
  823. package/node_modules/diff/libesm/util/distance-iterator.d.ts.map +0 -1
  824. package/node_modules/diff/libesm/util/distance-iterator.js +0 -37
  825. package/node_modules/diff/libesm/util/params.d.ts +0 -4
  826. package/node_modules/diff/libesm/util/params.d.ts.map +0 -1
  827. package/node_modules/diff/libesm/util/params.js +0 -14
  828. package/node_modules/diff/libesm/util/string.d.ts +0 -30
  829. package/node_modules/diff/libesm/util/string.d.ts.map +0 -1
  830. package/node_modules/diff/libesm/util/string.js +0 -184
  831. package/node_modules/diff/package.json +0 -130
  832. package/node_modules/diff/release-notes.md +0 -432
  833. package/node_modules/node-gyp/commitlint.config.mjs +0 -3
  834. package/node_modules/node-gyp/gyp/commitlint.config.js +0 -6
  835. package/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake_test.py +0 -105
  836. package/node_modules/node-gyp/zizmor.yml +0 -5
  837. package/node_modules/proxy-agent-negotiate/dist/index.d.ts +0 -14
  838. package/node_modules/proxy-agent-negotiate/dist/index.d.ts.map +0 -1
  839. package/node_modules/proxy-agent-negotiate/dist/index.js +0 -35
  840. package/node_modules/proxy-agent-negotiate/dist/index.js.map +0 -1
  841. package/node_modules/proxy-agent-negotiate/package.json +0 -47
  842. package/node_modules/undici/docs/docs/api/CacheStore.md +0 -360
  843. package/node_modules/undici/docs/docs/api/ClientStats.md +0 -93
  844. package/node_modules/undici/docs/docs/api/GlobalInstallation.md +0 -121
  845. package/node_modules/undici/docs/docs/api/H2CClient.md +0 -385
  846. package/node_modules/undici/docs/docs/api/Interceptors.md +0 -419
  847. package/node_modules/undici/docs/docs/api/MockCallHistory.md +0 -371
  848. package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +0 -206
  849. package/node_modules/undici/docs/docs/api/RoundRobinPool.md +0 -239
  850. package/node_modules/undici/docs/docs/api/SnapshotAgent.md +0 -361
  851. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +0 -256
  852. package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +0 -233
  853. package/node_modules/undici/docs/docs/getting-started.md +0 -281
  854. package/node_modules/undici/docs/docs/site.json +0 -125
  855. package/node_modules/undici/docs/docs/type-map.json +0 -79
  856. package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +0 -110
  857. package/node_modules/undici/types/dispatcher1-wrapper.d.ts +0 -7
  858. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/core/socks5-client.js +0 -0
  859. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/core/socks5-utils.js +0 -0
  860. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/encoding/index.js +0 -0
  861. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/llhttp/constants.d.ts +0 -0
  862. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/llhttp/utils.d.ts +0 -0
  863. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/mock/snapshot-utils.js +0 -0
  864. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/util/date.js +0 -0
  865. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/util/stats.js +0 -0
  866. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/subresource-integrity/Readme.md +0 -0
  867. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/subresource-integrity/subresource-integrity.js +0 -0
  868. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/cache-interceptor.d.ts +0 -0
  869. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/client-stats.d.ts +0 -0
  870. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/mock-call-history.d.ts +0 -0
  871. /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/utility.d.ts +0 -0
@@ -1,20 +1,23 @@
1
1
  import { randomUUID } from 'node:crypto';
2
+ import {FlowError} from '@mytools/sdk';
2
3
  import { isDeepStrictEqual } from 'node:util';
3
4
  import path from 'node:path';
4
5
  import { parseCommand, fileReference, readRunInput, newWorkflow, setBinding, stepMetadata, outputSources, stepAt, sequenceAt, pruneRuntimeInputs } from './model.js';
5
6
  import { editCondition } from './conditions.js';
6
7
  import { runStatuses } from './run-viewer.js';
7
- import { editValue, needsJsonEditor } from './schema.js';
8
+ import { editValue, needsJsonEditor, commandInput, inputEntries } from './schema.js';
9
+ import {hasInputRules} from '@mytools/sdk/inputs';
8
10
  import {gettingStarted,pluginStatus,pluginDetails} from './presentation.js';
9
- import {readableValue,readableError} from './run-presentation.js';
10
- import {commandMenu} from './navigation.js';
11
+ import {readableValue,readableError,runCategory,runCategoryNames} from './run-presentation.js';
12
+ import {commandMenu,commandCompletions} from './navigation.js';
11
13
  import {workflowMenu} from './workflow-menu.js';
12
14
  import {commandPresetsMenu,shortcutsMenu,runShortcut} from './command-menu.js';
13
15
  import {validate} from '@mytools/sdk/schema';
14
16
  import {resolvePrivilegeRequirement,checkStaticPrivilege} from '@mytools/fst-plugin/privileges';
17
+ import {TerminalHistory,sessionPageText} from './session-history.js';
15
18
 
16
19
  export class TerminalSession{
17
- constructor(app,ui,{baseDir=process.cwd(),webOptions={}}={}){this.app=app;this.ui=ui;this.baseDir=baseDir;this.webOptions=webOptions;this.flow=null;this.dirty=false;this.exiting=false;this.web=null;ui.activeRuns=()=>app.listRuns().filter(run=>run.status==='running').length;}
20
+ constructor(app,ui,{baseDir=process.cwd(),webOptions={}}={}){this.app=app;this.ui=ui;this.baseDir=baseDir;this.webOptions=webOptions;this.flow=null;this.savedFlow=null;this.dirty=false;this.exiting=false;this.web=null;ui.activeRuns=()=>app.listRuns().filter(run=>run.status==='running').length;}
18
21
  writable(){if(this.app.project.readOnly)throw new Error('这是只读运行包,请在完整工作区中编排、安装或打包');}
19
22
  async withMaintenance(operation,options={}){
20
23
  try{return await operation(options);}
@@ -26,7 +29,10 @@ export class TerminalSession{
26
29
  }
27
30
  }
28
31
  current(){if(!this.flow)throw new Error('先用 /workflows 打开或新建工作流');return this.flow;}
32
+ loadWorkflow(flow){this.flow=structuredClone(flow);this.savedFlow=structuredClone(flow);this.dirty=false;}
33
+ updateWorkflow(flow){this.flow=flow;this.dirty=!isDeepStrictEqual(flow,this.savedFlow);}
29
34
  commands(){return commandMenu(this.app.listPlugins?.()??[],this.app.listCommands(),this.app.listShortcuts?.()??[]);}
35
+ completions(){return commandCompletions(this.app.listPlugins?.()??[],this.app.listCommands(),this.app.listShortcuts?.()??[]);}
30
36
  async discard(){return !this.dirty||await this.ui.confirm('当前修改未保存,是否放弃修改?');}
31
37
  async mayExit(){
32
38
  if(!await this.discard())return false;
@@ -38,17 +44,53 @@ export class TerminalSession{
38
44
  return true;
39
45
  }
40
46
  async run(){
41
- this.ui.show(gettingStarted(await this.app.listWorkflows(),this.app.project),{kind:'welcome'});
47
+ await this.startHistory();
48
+ const workflows=await this.app.listWorkflows();
49
+ this.ui.show(gettingStarted(workflows.filter(flow=>flow.status!=='invalid'),this.app.project),{kind:'welcome'});
50
+ for(const flow of workflows.filter(flow=>flow.status==='invalid'))this.ui.show(`工作流不可用:${flow.diagnostic.message}`);
51
+ for(const warning of this.app.host?.warnings??[])this.ui.show(`声明提示:${warning.message}`);
42
52
  try{
43
53
  while(!this.exiting){
44
54
  this.ui.summary(`欢迎使用 Fishtools · 插件编排工作台\n当前工作区:${this.app.projectDir}\n${this.app.listPlugins().length} 个插件 · ${(await this.app.listWorkflows()).length} 个工作流${this.flow?` · ${this.flow.title??this.flow.id} · ${this.dirty?'未保存':'已保存'}`:''}`);
45
55
  let text;
46
- try{text=await this.ui.input('fst > / 操作 · ! 系统命令 · Shift+Enter 换行 · Enter 提交',{commands:this.commands(),workflows:await this.app.listWorkflows(),multiline:true});}
56
+ try{text=await this.ui.input('fst > / 操作 · ! 系统命令 · Shift+Enter 换行 · Enter 提交',{commands:this.completions(),workflows:await this.app.listWorkflows(),multiline:true});}
47
57
  catch(e){if(e.code!=='PROMPT_CANCELLED')throw e;try{if(await this.mayExit())break;}catch{}continue;}
48
58
  if(!text.trim())continue;
49
59
  try{await this.execute(text);}catch(e){if(e.code!=='PROMPT_CANCELLED'||!this.ui.endCommand)this.ui.show(e.code==='PROMPT_CANCELLED'?'已返回主面板。':`${e.code==='COMMAND_INPUT'?'输入提示':'操作失败'}:${e.message}`);}
50
60
  }
51
- }finally{if(this.web)await this.web.close();}
61
+ }finally{
62
+ if(this.web)await this.web.close();
63
+ await Promise.allSettled([...this.ui.feed?.runs.values()??[]].map(item=>item.done).filter(Boolean));
64
+ await this.history?.close();
65
+ }
66
+ }
67
+ async startHistory(){
68
+ if(!this.ui.feed?.exportState||this.history)return;
69
+ try{this.history=new TerminalHistory(this.app,this.ui);await this.history.start();}
70
+ catch(error){this.history=null;this.ui.show(`历史会话暂不可用:${error.message}`);}
71
+ }
72
+ async sessions(){
73
+ if(!this.history)throw new Error('历史会话保存尚未启用,请重开终端工作台。');
74
+ await this.history.flush();const records=(await this.history.store.list()).filter(record=>record.id!==this.history.id);
75
+ if(!records.length){this.ui.show('还没有旧会话。本次输入、反馈和执行结果会自动保存,下次可从 /history 恢复。');return;}
76
+ const choice=await this.ui.select('历史会话 · 恢复不会重新执行旧命令',[
77
+ ...records.map(record=>({value:'session:'+record.id,label:new Date(record.startedAt).toLocaleString(),description:`${record.commandCount} 条近期输入 · ${record.id.slice(0,8)} · 更新于 ${new Date(record.updatedAt).toLocaleString()}`})),{value:'back',label:'返回'},
78
+ ]);
79
+ if(choice==='back')return;const record=await this.history.store.read(choice.slice(8));
80
+ const action=await this.ui.select('历史会话操作',[{value:'restore',label:'恢复完整会话并继续',description:'恢复近期面板和输入;完整交互可分页查看'},{value:'read',label:'查看完整交互记录'},{value:'back',label:'返回'}]);
81
+ if(action==='restore'){await this.history.restore(record);this.ui.show('历史会话已恢复,可继续输入。较早的交互在 /history → 查看完整交互记录;/logs 查看各次执行详情。');}
82
+ if(action==='read')await this.sessionPages(record.id);
83
+ }
84
+ async sessionPages(id){
85
+ let cursor=0;const previous=[];
86
+ for(;;){
87
+ const page=await this.history.store.page(id,{cursor,limit:100});
88
+ await this.ui.viewMarkdown(`完整会话 · ${cursor}–${page.nextCursor} / ${page.totalBytes} 字节`,sessionPageText(page.entries)||'暂无交互记录');
89
+ const choice=await this.ui.select('会话分页',[
90
+ ...(page.hasMore?[{value:'next',label:'下一页'}]:[]),...(previous.length?[{value:'previous',label:'上一页'}]:[]),{value:'back',label:'返回'},
91
+ ]);
92
+ if(choice==='back')return;if(choice==='next'){previous.push(cursor);cursor=page.nextCursor;}if(choice==='previous')cursor=previous.pop()??0;
93
+ }
52
94
  }
53
95
  async execute(text){
54
96
  // 只记录用户提交的入口;菜单内部调用 /save 等动作不制造伪命令。
@@ -63,7 +105,7 @@ export class TerminalSession{
63
105
  const [command,...args]=parseCommand(text);
64
106
  const shortcut=this.app.listShortcuts?.().find(entry=>entry.name===command);
65
107
  if(shortcut)return runShortcut(this,shortcut,args);
66
- const entry=this.commands().find(c=>c.name===command&&c.plugin);
108
+ const entry=this.completions().find(c=>c.name===command&&c.plugin);
67
109
  if(entry){if(args.length)throw new Error(`/${command} 请从二级菜单选择能力`);return this.pluginSkills(entry.plugin);}
68
110
  const pluginCommand=this.app.listCommands().find(c=>c.name===command);
69
111
  if(pluginCommand)return this.pluginCommand(pluginCommand,args);
@@ -78,11 +120,11 @@ export class TerminalSession{
78
120
  `文件路径起点:${this.baseDir}`,
79
121
  '## 常用操作',gettingStarted(await this.app.listWorkflows(),this.app.project),
80
122
  '## 系统命令与快捷名称','输入 ! 后接系统命令可直接执行,输出和状态保留在主面板;/commands 注册常用命令供快捷执行与工作流编排,/shortcuts 给任意插件动作或命令设置中文快捷名称。主输入框和命令编辑框使用 Shift+Enter 换行、Enter 提交,Alt+Enter 为备用换行;支持多行粘贴。系统命令按当前 Shell 语法执行,目标机器需要已安装相应外部程序。',
81
- '## 编排工作流','/workflows 浏览、新建、打开工作流,进入后添加步骤、编辑参数、设置输出、保存或删除。删除会保留备份,仍被其他流程引用时不能删除。/run 选择已保存的工作流,或补全工作流 ID/中文标题后执行已保存版本,不会要求保存编辑草稿。要执行未保存修改,在工作流编辑菜单选择运行,再选择保存并运行;返回编辑会保留草稿。',
82
- '## 主面板','运行期间可以继续输入命令,打开配置、管理插件或执行其他工作流。↑/↓ 回看本次启动已提交的命令,回到底部恢复草稿;补全菜单打开时仍用于选择候选。Ctrl+O 展开或收起执行详情,PgUp/PgDn 或滚轮浏览执行过程;/logs 回看各次执行的步骤、输入输出和日志。关闭菜单不会清空运行内容。',
123
+ '## 编排工作流','/workflows 浏览、新建、打开工作流,进入后添加步骤、编辑参数、设置输出、保存或删除。删除时选择备份后删除、直接删除或取消;仍被其他流程引用时不能删除。/run 选择已保存的工作流,或补全工作流 ID/中文标题后执行已保存版本,不会要求保存编辑草稿。要执行未保存修改,在工作流编辑菜单选择运行,再选择保存并运行;返回编辑会保留草稿。',
124
+ '## 主面板','运行期间可以继续输入命令,打开配置、管理插件或执行其他工作流。↑/↓ 回看已提交和已恢复的命令,回到底部恢复草稿;补全菜单打开时仍用于选择候选。Ctrl+O 展开或收起执行详情,PgUp/PgDn 或滚轮浏览执行过程;/logs 回看各次执行的步骤、输入输出和日志。关闭菜单不会清空运行内容。/history 恢复旧会话并继续输入,也可从 /tools 打开;恢复不重跑旧指令。',
83
125
  '## 命令分层','/config 配置 Fishtools,/plugin 管理插件及各插件配置。输入 /插件入口名 后进入该插件的能力菜单;补全列表标明 [内置] 或 [插件]。/tools 包含 Web 与离线文档。旧 /new、/add、/steps、/outputs、/save、/plugins 以及插件的原始命令仍可直接输入。',
84
126
  '## 观察运行','输入 /logs 打开执行记录。列表包含多个工作流的每次执行,运行中任务排在前面;选择后查看进度、结果和日志。从详情返回后可选择另一条记录,本次启动期间每条记录分别保留阅读位置。重启后仍可查看保留下来的执行记录。',
85
- '1 / 2 / 3 切换总览、输入输出和日志,Enter 查看步骤详情,[ / ] 切换步骤,j 查看原始诊断数据。↑↓、PgUp/PgDn 或滚轮浏览;End 恢复尾部跟随。q / Esc 返回,正在执行的任务在后台继续,x 后 y 明确取消。',
127
+ '1 / 2 / 3 切换总览、输入输出和日志,Enter 查看步骤详情,[ / ] 切换步骤,j 查看原始诊断数据,m 单独格式化阅读输出。↑↓、PgUp/PgDn 或滚轮浏览;End 恢复尾部跟随。q / Esc 返回,正在执行的任务在后台继续,x 后 y 明确取消。',
86
128
  '## 文件与运行参数','输入 @ 后按 Tab 选择文件;@@ 表示字面量 @。运行命令的 @参数.json 会读取 JSON 对象作为输入。',
87
129
  '/run 工作流ID @"参数 文件.json"',
88
130
  '## 离线文档','输入 /docs 阅读插件开发、部署、控制流与服务文档。独立命令 fst docs --path 查看资料位置,fst docs --export 目标目录 导出资料。',
@@ -101,20 +143,25 @@ export class TerminalSession{
101
143
  this.writable();if(!await this.discard())return false;
102
144
  const title=(await this.ui.input('工作流名称',{files:false})).trim();if(!title)throw new Error('名称不能为空');
103
145
  const description=await this.ui.input('用途说明(可留空)',{files:false});
104
- this.flow=newWorkflow(title,description);this.dirty=true;this.ui.show('工作流草稿已创建,可以在编辑菜单添加步骤。');return true;
146
+ this.savedFlow=null;this.updateWorkflow(newWorkflow(title,description));this.ui.show('工作流草稿已创建,可以在编辑菜单添加步骤。');return true;
105
147
  }
106
148
  case 'add':return this.add();
107
149
  case 'steps':return this.steps();
108
150
  case 'outputs':return this.outputs();
109
- case 'save':this.writable();await this.app.saveWorkflow(this.current());this.dirty=false;this.ui.show(`已保存:${this.flow.title}`);return;
151
+ case 'save':{
152
+ this.writable();const flow=this.current();
153
+ if(isDeepStrictEqual(flow,this.savedFlow)){this.ui.show('工作流未修改。');return;}
154
+ await this.app.saveWorkflow(flow);this.loadWorkflow(flow);this.ui.show(`已保存:${this.flow.title}`);return;
155
+ }
110
156
  case 'run':return this.startRun(args);
111
157
  case 'runs':return this.logs();
112
158
  case 'logs':return this.logs();
159
+ case 'history':return this.sessions();
113
160
  case 'plugin':case 'plugins':return this.plugins();
114
161
  case 'config':return this.toolConfig();
115
162
  case 'tools':{
116
- const choice=await this.ui.select('工具',[{value:'web',label:'启动 Web 工作台'},{value:'docs',label:'阅读离线文档'},{value:'back',label:'返回主面板'}]);
117
- if(choice!=='back')await this.execute('/'+choice);return;
163
+ const choice=await this.ui.select('工具',[{value:'history',label:'历史会话:恢复输入、反馈与结果'},{value:'web',label:'启动 Web 工作台'},{value:'docs',label:'阅读离线文档'},{value:'back',label:'返回主面板'}]);
164
+ if(choice==='history')await this.sessions();else if(choice!=='back')await this.execute('/'+choice);return;
118
165
  }
119
166
  case 'pack':return this.pack();
120
167
  case 'web':{
@@ -124,17 +171,31 @@ export class TerminalSession{
124
171
  default:throw new Error(`未知操作 /${command},输入 /help 查看可用操作`);
125
172
  }
126
173
  }
127
- async pluginCommand(command,args){
174
+ async pluginCommand(command,args,{fromMenu=false}={}){
128
175
  if(args.length>1)throw new Error(`用法:/${command.name} [@参数.json]`);
129
176
  let input;
130
177
  if(args.length)input=await readRunInput(args[0],this.baseDir);
131
178
  else{
132
179
  const initial=structuredClone(command.shortcutInput??{});
180
+ const target=command.actionId??`/${command.targetName??command.name}`;
181
+ const preview=this.app.previewInput?value=>this.app.previewInput(target,value):undefined;
133
182
  const empty=command.input?.type==='object'&&command.input.properties&&Object.keys(command.input.properties).length===0;
134
- if(command.shortcutInput!==undefined||empty){
135
- try{input=validate(command.input,initial,command.description??command.name);}
136
- catch{input=await editValue(this.ui,command.input,initial,{baseDir:this.baseDir,required:true,label:command.description});}
137
- }else input=command.input?await editValue(this.ui,command.input,initial,{baseDir:this.baseDir,required:true,label:command.description}):initial;
183
+ if(command.shortcutInput!==undefined||empty||!command.input){
184
+ try{
185
+ if(hasInputRules(command.input)&&preview){validate(command.input,preview(initial).value,command.description??command.name,{useDefaults:false});input=initial;}
186
+ else input=validate(command.input,initial,command.description??command.name);
187
+ }
188
+ catch{
189
+ if(hasInputRules(command.input)){
190
+ const result=await commandInput(this.ui,command.input,initial,{baseDir:this.baseDir,label:command.description,preview});
191
+ if(result.cancelled)return;input=result.value;
192
+ }else input=await editValue(this.ui,command.input,initial,{baseDir:this.baseDir,required:true,label:command.description});
193
+ }
194
+ }else{
195
+ const result=await commandInput(this.ui,command.input,initial,{baseDir:this.baseDir,label:command.description??command.name,preview});
196
+ if(result.cancelled)return;
197
+ input=result.value;
198
+ }
138
199
  }
139
200
  const ui=Object.fromEntries(['input','select','show','confirm'].map(name=>[name,this.ui[name].bind(this.ui)]));
140
201
  const definition=this.app.host.definitions.get(command.plugin);
@@ -146,8 +207,9 @@ export class TerminalSession{
146
207
  const targetName=command.targetName??command.name;
147
208
  if(!command.actionId&&!this.app.listCommands().some(current=>current.name===targetName&&current.plugin===command.plugin))throw new Error('命令目标插件已变更,请重新选择目标后执行');
148
209
  const run=command.actionId?await this.app.startAction(command.actionId,input,{ui,allowUnknownPrivileges}):await this.app.startCommand(targetName,input,{ui,allowUnknownPrivileges,expectedPlugin:command.plugin});
210
+ if(fromMenu)this.ui.recordCommand?.(`/${targetName}`,{display:true});
149
211
  if(this.ui.trackRun){
150
- this.ui.clearMessages?.();this.ui.trackRun({app:this.app,runId:run.id,title:command.description??command.name,input});
212
+ this.ui.clearMessages?.();this.ui.trackRun({app:this.app,runId:run.id,title:command.description??command.name,input,done:run.done});
151
213
  if(command.action){void run.done.catch(error=>{if(!this.ui.closed)this.ui.show(`运行记录保存失败:${error.message}`);});return;}
152
214
  }
153
215
  const unsubscribe=this.ui.trackRun?()=>{}:this.app.subscribe(e=>{if(e.runId===run.id&&e.type==='log')this.ui.show(e.message);});
@@ -158,7 +220,7 @@ export class TerminalSession{
158
220
  async shellCommand(script){
159
221
  const run=await this.app.startShell(script);
160
222
  if(this.ui.trackRun){
161
- this.ui.clearMessages?.();this.ui.trackRun({app:this.app,runId:run.id,title:'系统命令'});
223
+ this.ui.clearMessages?.();this.ui.trackRun({app:this.app,runId:run.id,title:'系统命令',done:run.done});
162
224
  void run.done.catch(error=>{if(!this.ui.closed)this.ui.show(`运行记录保存失败:${error.message}`);});return;
163
225
  }
164
226
  const unsubscribe=this.app.subscribe(event=>{if(event.runId===run.id&&event.type==='log')this.ui.show(event.message);});
@@ -172,22 +234,39 @@ export class TerminalSession{
172
234
  if(!plugins.length){this.ui.show('当前插件没有声明可配置字段。');return;}
173
235
  const id=selectedId??await this.ui.select('选择要配置的插件',plugins.map(p=>({value:p.id,label:p.title??p.id})));
174
236
  const plugin=plugins.find(p=>p.id===id);
175
- const value=await editValue(this.ui,plugin.config,this.app.project.config?.[id]??{}, {baseDir:this.baseDir,required:true,label:plugin.title??id});
237
+ let current=structuredClone(this.app.project.config?.[id]??{});
238
+ try{current=validate(plugin.config,current,`${id} 配置`);}
239
+ catch(error){if(!plugin.configurationError||error.code!=='VALIDATION')throw error;}
240
+ const value=await editValue(this.ui,plugin.config,current, {baseDir:this.baseDir,required:true,label:plugin.title??id});
241
+ if(isDeepStrictEqual(value,current)){this.ui.show('插件配置未修改。');return;}
176
242
  const result=await this.withMaintenance(options=>this.app.configurePlugin(id,value,options));
177
243
  this.ui.show(result===null?'已取消修改。':`插件配置已保存到当前工作区。原项目配置备份:${result.backup}`);
178
244
  }
179
245
  async logs(){
180
246
  const statuses=runStatuses;
247
+ let filter='all',limit=20;
181
248
  while(true){
182
- const history=(await this.app.listRunHistory()).sort((a,b)=>(b.status==='running')-(a.status==='running'));
183
- if(!history.length)this.ui.show('还没有执行记录。运行工作流后,可在 /logs 回看。');
249
+ const records=(await this.app.listRunHistory()).sort((a,b)=>(b.status==='running')-(a.status==='running'));
250
+ const history=records.filter(run=>filter==='all'||filter==='session'&&run.sessionId===this.app.sessionId||filter==='plugins'&&['action','command'].includes(runCategory(run))||filter===runCategory(run));
251
+ const scope={all:'全部记录',session:'本次启动',plugins:'插件调用',workflow:'工作流',shell:'系统命令'}[filter];
252
+ if(!history.length)this.ui.show(records.length?'当前筛选没有执行记录。':'还没有执行记录。运行工作流或调用插件后,可在 /logs 回看。');
184
253
  const titles=new Map((await this.app.listWorkflows()).map(flow=>[flow.id,flow.title??flow.id]));
185
- const choice=await this.ui.select('执行记录 · 选择一次执行,查看步骤、输入输出与日志',[
186
- ...history.map(r=>({value:`run:${r.id}`,label:`${statuses[r.status]??r.status} · ${titles.get(r.workflowId)??r.workflowId}`,description:`${new Date(r.startedAt).toLocaleString()} · ${r.id.slice(0,8)}`})),
254
+ const choice=await this.ui.select(`执行记录 · ${scope} · ${history.length} 次执行${history.length>limit?`(显示前 ${limit} 次)`:''}`, [
255
+ ...history.slice(0,limit).map(r=>({value:`run:${r.id}`,label:`${statuses[r.status]??r.status} · ${runCategoryNames[runCategory(r)]} · ${r.title??titles.get(r.workflowId)??r.workflowId}`,description:`${new Date(r.startedAt).toLocaleString()} · ${r.id.slice(0,8)}${r.sessionId?` · ${r.sessionId===this.app.sessionId?'本次启动':'历史启动'}`:''}`})),
256
+ {value:'filter',label:'筛选记录'},
257
+ ...(history.length>limit?[{value:'more',label:'显示更多记录'}]:[]),
187
258
  {value:'usage',label:'查看日志体积',description:'按需统计,不清理文件'},
188
259
  {value:'back',label:'返回'},
189
260
  ]);
190
261
  if(choice==='back')return;
262
+ if(choice==='filter'){
263
+ const selected=await this.ui.select('筛选执行记录',[
264
+ {value:'all',label:'全部记录'},...(this.app.sessionId?[{value:'session',label:'本次启动'}]:[]),
265
+ {value:'workflow',label:'工作流执行'},{value:'plugins',label:'插件动作与命令'},{value:'shell',label:'系统命令'},{value:'back',label:'返回'},
266
+ ]);
267
+ if(selected!=='back'){filter=selected;limit=20;}continue;
268
+ }
269
+ if(choice==='more'){limit+=20;continue;}
191
270
  if(choice==='usage'){await this.logUsage();continue;}
192
271
  const id=choice.slice(4),record=history.find(r=>r.id===id);
193
272
  try{
@@ -200,7 +279,7 @@ export class TerminalSession{
200
279
  async add(){
201
280
  this.writable();const flow=structuredClone(this.current()),catalog=this.app.catalog(),workflows=await this.app.listWorkflows();
202
281
  await this.addNode(flow,[],catalog,workflows);
203
- this.flow=flow;this.dirty=true;this.ui.show('步骤已添加,可在工作流菜单继续调整或保存。');
282
+ this.updateWorkflow(flow);this.ui.show('步骤已添加,可在工作流菜单继续调整或保存。');
204
283
  }
205
284
  async addNode(flow,parent,catalog,workflows){
206
285
  this.writable();
@@ -223,15 +302,20 @@ export class TerminalSession{
223
302
  if(step.parallel){
224
303
  const value=Number(await this.ui.input('最大并发数(1–32)',{value:String(step.parallel.concurrency??4),files:false}));
225
304
  if(!Number.isInteger(value)||value<1||value>32)throw new Error('并发数必须为 1–32 的整数');
226
- step.parallel.concurrency=value;await this.editSequence(flow,[...index,'parallel','steps'],catalog,workflows);return;
305
+ if(step.parallel.concurrency!==undefined||value!==4)step.parallel.concurrency=value;
306
+ await this.editSequence(flow,[...index,'parallel','steps'],catalog,workflows);return;
227
307
  }
228
308
  if(step.branch){
229
- step.branch.else??=[];
230
309
  while(true){
231
- const choice=await this.ui.select('条件分支', [{value:'condition',label:'修改判断条件'},{value:'then',label:`条件成立 · ${step.branch.then.length} 步`},{value:'else',label:`条件不成立 · ${step.branch.else.length} 步`},{value:'done',label:'完成分支编辑'}]);
310
+ const choice=await this.ui.select('条件分支', [{value:'condition',label:'修改判断条件'},{value:'then',label:`条件成立 · ${step.branch.then.length} 步`},{value:'else',label:`条件不成立 · ${step.branch.else?.length??0} 步`},{value:'done',label:'完成分支编辑'}]);
232
311
  if(choice==='done')return;
233
312
  if(choice==='condition')step.branch.condition=await editCondition(this.ui,flow,index,catalog,workflows,{baseDir:this.baseDir,current:step.branch.condition});
234
- else await this.editSequence(flow,[...index,'branch',choice],catalog,workflows);
313
+ else{
314
+ const absent=choice==='else'&&step.branch.else===undefined;
315
+ if(absent)step.branch.else=[];
316
+ await this.editSequence(flow,[...index,'branch',choice],catalog,workflows);
317
+ if(absent&&!step.branch.else.length)delete step.branch.else;
318
+ }
235
319
  }
236
320
  }
237
321
  return this.editBindings(flow,index,catalog,workflows);
@@ -252,7 +336,7 @@ export class TerminalSession{
252
336
  else if(action==='when')step.when=await editCondition(this.ui,flow,index,catalog,workflows,{baseDir:this.baseDir,current:step.when});
253
337
  else if(action==='clear-when')delete step.when;
254
338
  else if(action==='remove'){
255
- if(!await this.ui.confirm('删除此步骤?引用它的步骤或输出需要重新设置。'))return;
339
+ if(!await this.ui.confirm('删除此步骤?'))return;
256
340
  for(const key of Object.keys(step.with??{}))setBinding(flow,index,key,'fixed',{},undefined);
257
341
  sequence.splice(position,1);
258
342
  pruneRuntimeInputs(flow);
@@ -266,8 +350,10 @@ export class TerminalSession{
266
350
  }
267
351
  const props=Object.entries(meta.input?.properties??{});if(!props.length)return;
268
352
  while(true){
353
+ const effective=step.action&&hasInputRules(meta.input)&&this.app.previewInput?this.app.previewInput(step.action,step.with??{}):undefined;
354
+ const descriptions=effective?inputEntries(meta.input,effective.value,effective.fields):undefined;
269
355
  const selection=await this.ui.select(`${meta.title} · 选择要设置的参数`,[
270
- ...props.map(([key,s])=>({value:`field:${key}`,label:`${s.title??key}${meta.input.required?.includes(key)?' *':''}`,description:JSON.stringify(step.with?.[key]??s.default)??'未填写'})),
356
+ ...props.map(([key,s],index)=>({value:`field:${key}`,label:`${s.title??key}${meta.input.required?.includes(key)?' *':''}`,description:step.with?.[key]?.$ref?`运行时绑定:${step.with[key].$ref}`:descriptions?.[index]??JSON.stringify(step.with?.[key]??s.default)??'未填写'})),
271
357
  {value:'done',label:'完成参数设置'},
272
358
  ]);
273
359
  if(selection==='done')return;
@@ -276,7 +362,7 @@ export class TerminalSession{
276
362
  const choices=outputSources(flow,index,catalog,workflows).filter(s=>!schema.type||!s.schema?.type||schema.type===s.schema.type);
277
363
  const mode=await this.ui.select(`${schema.title??key} · 输入来源`,[
278
364
  {value:'fixed',label:'填写固定值 / @本地文件路径'},{value:'runtime',label:'每次运行时填写'},
279
- ...choices.map(({value,label})=>({value,label})),...(!required?[{value:'unset',label:'不传此参数,使用插件默认值'}]:[]),
365
+ ...choices.map(({value,label})=>({value,label})),...(!required||schema.default!==undefined||schema['x-fst']?.fromConfig?[{value:'unset',label:schema['x-fst']?.fromConfig?'恢复继承插件配置':`不传此参数${schema.default!==undefined?',使用已声明的默认值':''}`}]:[]),
280
366
  ]);
281
367
  if(mode==='unset')setBinding(flow,index,key,'fixed',schema,undefined);
282
368
  else if(mode==='fixed'){
@@ -294,7 +380,7 @@ export class TerminalSession{
294
380
  if(this.app.project.readOnly){this.ui.show(JSON.stringify(flow.steps[index],null,2));return;}
295
381
  await this.stepOperation(flow,[index],catalog,workflows);
296
382
  if(isDeepStrictEqual(flow,this.flow))return;
297
- this.flow=flow;this.dirty=true;this.ui.show('步骤已更新,保存前可继续调整。');
383
+ this.updateWorkflow(flow);this.ui.show(this.dirty?'步骤已更新,保存前可继续调整。':'修改已还原,与已保存版本一致。');
298
384
  }
299
385
  async outputs(){
300
386
  this.writable();const flow=structuredClone(this.current());flow.outputs??={};
@@ -307,7 +393,7 @@ export class TerminalSession{
307
393
  if(Object.hasOwn(flow.outputs,name))throw new Error('输出名称已存在,请使用另一个名称');
308
394
  flow.outputs[name]={$ref:source};
309
395
  }else delete flow.outputs[action.slice(7)];
310
- this.flow=flow;this.dirty=true;this.ui.show('汇总输出已更新。');
396
+ this.updateWorkflow(flow);this.ui.show(this.dirty?'汇总输出已更新。':'修改已还原,与已保存版本一致。');
311
397
  }
312
398
  async startRun(args,{draft=false}={}){
313
399
  if(args.length>2)throw new Error('用法:/run [工作流ID] [@参数.json]');
@@ -341,7 +427,7 @@ export class TerminalSession{
341
427
  const input=reference?await readRunInput(reference,this.baseDir):(needsJsonEditor(flow.inputs)||Object.keys(flow.inputs?.properties??{}).length)?await editValue(this.ui,flow.inputs,{}, {baseDir:this.baseDir,label:'本次运行参数',required:true}):{};
342
428
  const run=await this.app.startRun(flow.id,input,{allowUnknownPrivileges});
343
429
  if(this.ui.trackRun){
344
- this.ui.clearMessages?.();this.ui.trackRun({app:this.app,runId:run.id,title:flow.title??flow.id,input});
430
+ this.ui.clearMessages?.();this.ui.trackRun({app:this.app,runId:run.id,title:flow.title??flow.id,input,done:run.done});
345
431
  void run.done.catch(error=>{if(!this.ui.closed)this.ui.show(`运行记录保存失败:${error.message}`);});return true;
346
432
  }
347
433
  if(this.ui.observeRun){
@@ -355,7 +441,8 @@ export class TerminalSession{
355
441
  const result=await run.done;
356
442
  this.ui.show(`运行${runStatuses[result.status]??result.status}\n${JSON.stringify(result.reason??(result.status==='succeeded'?result.output:result.error),null,2)}`);
357
443
  if(result.status==='succeeded'&&!Object.keys(result.output??{}).length)this.ui.show(JSON.stringify(result.events.filter(e=>e.type==='step.succeeded').map(e=>({step:e.callPath,output:e.output})),null,2));
358
- this.ui.show(`输入 /logs 在终端内查看日志\n可读日志:${path.join(this.app.outputDir,run.id,'run.md')}\n结果目录:${path.join(this.app.outputDir,run.id)}`);
444
+ const record=this.app.getRun(run.id);
445
+ this.ui.show(`输入 /logs 在终端内查看日志\n可读日志:${path.join(this.app.outputDir,run.id,'run.md')}${record?.resultDir?`\n生成文件:${record.resultDir}`:''}`);
359
446
  }finally{unsubscribe();done();}
360
447
  return true;
361
448
  }
@@ -364,7 +451,7 @@ export class TerminalSession{
364
451
  const choice=await this.ui.select(`[插件] ${plugin?.title??id} · 选择能力`,[
365
452
  ...commands.map(c=>({value:`command:${c.name}`,label:c.description??c.name,description:`/${c.name}`})),{value:'back',label:'返回主面板'},
366
453
  ]);
367
- if(choice!=='back')await this.pluginCommand(commands.find(c=>`command:${c.name}`===choice),[]);
454
+ if(choice!=='back')await this.pluginCommand(commands.find(c=>`command:${c.name}`===choice),[],{fromMenu:true});
368
455
  }
369
456
  async toolConfig(){
370
457
  while(true){
@@ -377,7 +464,7 @@ export class TerminalSession{
377
464
  {value:'back',label:'返回主面板'},
378
465
  ]);
379
466
  if(choice==='back')return;
380
- if(choice==='info')this.ui.show(`工作区:${this.app.projectDir}\n日志目录:${this.app.outputDir}\n模式:${this.app.project.readOnly?'只读运行包':'可编辑工作区'}`);
467
+ if(choice==='info')this.ui.show(`工作区:${this.app.projectDir}\n生成文件目录:${this.app.resultsDir}\n日志目录:${this.app.outputDir}\n模式:${this.app.project.readOnly?'只读运行包':'可编辑工作区'}`);
381
468
  else if(choice==='network')await this.networkSettings();
382
469
  else if(choice==='usage')await this.logUsage();
383
470
  else await this.logSettings();
@@ -398,15 +485,16 @@ export class TerminalSession{
398
485
  while(true){
399
486
  const policy=this.app.networkPolicy(),profiles=policy.profiles??{};
400
487
  const choice=await this.ui.select('代理配置(地址可用环境变量引用,凭据请勿写入项目)',[
401
- ...Object.keys(profiles).map(name=>({value:`edit:${name}`,label:`修改 ${name}`})),
488
+ ...Object.keys(profiles).map(name=>({value:`${this.app.project.readOnly?'view':'edit'}:${name}`,label:`${this.app.project.readOnly?'查看':'修改'} ${name}`})),
402
489
  ...(!this.app.project.readOnly?[{value:'create',label:'+ 新建代理配置'},...Object.keys(profiles).map(name=>({value:`delete:${name}`,label:`删除 ${name}`}))]:[]),
403
490
  {value:'back',label:'返回'},
404
491
  ]);
405
492
  if(choice==='back')return;
493
+ if(choice.startsWith('view:')){this.ui.show(JSON.stringify(profiles[choice.slice(5)],null,2));continue;}
406
494
  this.writable();
407
495
  if(choice.startsWith('delete:')){
408
496
  const name=choice.slice(7);
409
- if(await this.ui.confirm(`删除代理配置 ${name}?引用它的规则需要先改为其他模式。`)){
497
+ if(await this.ui.confirm(`删除代理配置 ${name}?`)){
410
498
  delete profiles[name];const saved=await this.app.configureNetworkPolicy({...policy,profiles});
411
499
  this.ui.show(`代理配置 ${name} 已删除。原项目配置备份:${saved.backup}`);
412
500
  }
@@ -423,6 +511,7 @@ export class TerminalSession{
423
511
  next[key]=(await this.ui.input(source==='env'?'环境变量名称':label,{value:current[key]??'',files:false})).trim();
424
512
  }
425
513
  }
514
+ if(Object.hasOwn(profiles,name)&&isDeepStrictEqual(next,current)){this.ui.show('代理配置未修改。');continue;}
426
515
  const saved=await this.app.configureNetworkPolicy({...policy,profiles:{...profiles,[name]:next}});
427
516
  this.ui.show(`代理配置 ${name} 已保存。原项目配置备份:${saved.backup}`);
428
517
  }
@@ -466,6 +555,7 @@ export class TerminalSession{
466
555
  next.plugins[id].actions??={};next.plugins[id].actions[action]=rule;
467
556
  }
468
557
  }
558
+ if(isDeepStrictEqual(next,policy)){this.ui.show('代理规则未修改。');continue;}
469
559
  const saved=await this.app.configureNetworkPolicy(next);this.ui.show(`代理规则已保存。原项目配置备份:${saved.backup}`);
470
560
  }
471
561
  }
@@ -473,13 +563,14 @@ export class TerminalSession{
473
563
  const usage=await this.app.logUsage(),keep=this.app.logSettings().keepRuns;
474
564
  const units=['B','KiB','MiB','GiB','TiB'];let size=usage.bytes,index=0;
475
565
  while(size>=1024&&index<units.length-1){size/=1024;index++;}
476
- this.ui.show(`日志目录:${usage.directory}\n日志文件体积:${index?size.toFixed(2):size} ${units[index]}(${usage.bytes} 字节,${usage.files} 个文件)${usage.incomplete?',部分路径无法读取,统计不完整':''}\n统计该目录中所有运行的 run.md / events.jsonl / result.json,包含进行中的运行;不含业务文件,不跟随链接。共享目录可能包含其他项目。\n这是文件长度快照,运行中可能继续增长;并非磁盘实际分配空间。\n本项目保留策略:${keep===null?'不自动清理':`最近 ${keep} 次已结束运行`};没有单次运行体积上限。`);
566
+ this.ui.show(`日志目录:${usage.directory}\n日志文件体积:${index?size.toFixed(2):size} ${units[index]}(${usage.bytes} 字节,${usage.files} 个文件)${usage.incomplete?',部分路径无法读取,统计不完整':''}\n统计目录内所有 run.md / events.jsonl / result.json 的当前文件长度,不含业务文件、不跟随链接;并非磁盘实际分配空间。\n本项目保留策略:${keep===null?'不自动清理':`最近 ${keep} 次已结束运行`};没有单次运行体积上限。`);
477
567
  }
478
568
  async logSettings(){
479
569
  const keep=this.app.logSettings().keepRuns;
480
570
  const mode=await this.ui.select('保留策略(整个项目合计,仅清理日志,保留业务文件)',[{value:'count',label:'仅保留最近 N 次已结束运行'},{value:'all',label:'不自动清理'},{value:'back',label:'返回'}]);
481
571
  if(mode==='back')return;
482
572
  const count=mode==='all'?null:Number(await this.ui.input('保留次数(例如 10)',{value:String(keep??10),files:false}));
573
+ if(count===keep){this.ui.show('日志保留设置未修改。');return;}
483
574
  const saved=await this.app.configureLogs(count);this.ui.show(`日志保留设置已保存。原项目配置备份:${saved.backup}${saved.warning?`\n${saved.warning.message}`:''}`);
484
575
  }
485
576
  async openRun(entry,{initialView}={}){
@@ -490,9 +581,9 @@ export class TerminalSession{
490
581
  this.ui.clearMessages?.();
491
582
  while(true){
492
583
  const plugins=this.app.listPlugins();
493
- const action=await this.ui.select(`已安装插件(${plugins.length})· ↑↓ 选择插件查看能力与配置`,[
494
- ...plugins.map(p=>({value:`plugin:${p.id}`,label:`${p.title??p.id} · v${p.version} · ${pluginStatus(p)}`,description:p.description??p.id})),
495
- ...(!this.app.project.readOnly?[{value:'local',label:'+ 安装本地插件 / @路径'},{value:'npm',label:'+ 安装 npm 插件包'},{value:'maintenance',label:this.app.maintenance?'恢复插件服务':'进入维护模式(停止有状态服务)'},...(this.web?[{value:'stop-web',label:'停止 Web 工作台'}]:[])]:[]),{value:'back',label:'返回工作台'},
584
+ const action=await this.ui.select(`插件(${plugins.length})· ${this.app.pluginScope==='global'?'全局安装,配置保存在当前工作区':'工作区插件'} · ↑↓ 选择插件查看能力与配置`,[
585
+ ...plugins.map(p=>({value:`plugin:${p.id}`,label:`${p.title??p.id} · v${p.version} · ${pluginStatus(p)} · ${({global:'全局',workspace:'工作区',preset:'预置'})[p.scope]??'预置'}`,description:p.description??p.id})),
586
+ ...(!this.app.project.readOnly?[{value:'local',label:'+ 安装本地插件 / @路径'},{value:'npm',label:'+ 安装 npm 插件包'},{value:'maintenance',label:this.app.maintenance?'恢复插件服务':'进入维护模式(停止插件运行时服务)'},...(this.web?[{value:'stop-web',label:'停止 Web 工作台'}]:[])]:[]),{value:'back',label:'返回工作台'},
496
587
  ]);
497
588
  if(action.startsWith('plugin:')){
498
589
  try{await this.pluginPage(action.slice(7));}catch(error){if(error.code!=='PROMPT_CANCELLED')throw error;}
@@ -505,7 +596,7 @@ export class TerminalSession{
505
596
  if(action==='local'||action==='npm'){
506
597
  const text=await this.ui.input(action==='npm'?'npm 包名(支持 @scope/name)':'输入 @ 并选择插件目录或 .tgz',{files:action==='local'});
507
598
  const source=action==='local'?fileReference(text,this.baseDir):text.trim();if(!source)throw new Error('插件来源不能为空');
508
- if(!await this.ui.confirm(`安装并加载可信插件:${source}?`))return;
599
+ if(!await this.ui.confirm(`${this.app.pluginScope==='global'?'全局安装,各工作区可用':'安装到当前工作区'}:${source}?`))return;
509
600
  const done=this.ui.busy('正在安装插件…');let result;try{result=await this.withMaintenance(options=>this.app.installPlugin(source,options));}finally{done();}
510
601
  if(result===null){this.ui.show('已取消安装。');continue;}
511
602
  }
@@ -515,7 +606,7 @@ export class TerminalSession{
515
606
  async pluginPage(id){
516
607
  while(true){
517
608
  const plugin=this.app.listPlugins().find(p=>p.id===id);if(!plugin)return;
518
- const definition=this.app.host.definitions.get(id);
609
+ const definition=this.app.pluginDefinition?.(id)??this.app.host.definitions.get(id);
519
610
  // 详情显示作者声明;维护模式只停止执行,不能让能力说明消失。
520
611
  const actions=Object.entries(definition.actions??{}).map(([name,a])=>({...a,id:`${id}:${name}`}));
521
612
  const declaredCommands=Object.entries(definition.commands??{}).map(([name,c])=>({...c,name}));
@@ -530,14 +621,14 @@ export class TerminalSession{
530
621
  if(choice==='back')return;
531
622
  if(choice==='details')await this.ui.viewMarkdown(plugin.title??id,pluginDetails(plugin,actions,declaredCommands));
532
623
  else if(choice==='configure')await this.configure(id);
533
- else if(choice.startsWith('command:'))await this.pluginCommand(commands.find(c=>c.name===choice.slice(8)),[]);
624
+ else if(choice.startsWith('command:'))await this.pluginCommand(commands.find(c=>c.name===choice.slice(8)),[],{fromMenu:true});
534
625
  else if(choice==='remove'){
535
- this.writable();if(await this.ui.confirm(`移除 ${id}?`)){
626
+ this.writable();if(await this.ui.confirm(`${plugin.scope==='global'?'全局卸载(影响所有工作区)':'移除'} ${id}?`)){
536
627
  let removed;
537
628
  try{removed=await this.withMaintenance(options=>this.app.removePlugin(id,options));}
538
629
  catch(error){
539
630
  if(error.code!=='PLUGIN_IN_USE'||!error.details?.workflows?.length)throw error;
540
- const names=error.details.workflows.map(w=>w.title??w.id).join('、');
631
+ const names=error.details.workflows.map(w=>`${w.title??w.id}${w.projectDir&&w.projectDir!==this.app.projectDir?`(${w.projectDir})`:''}`).join('、');
541
632
  if(!await this.ui.confirm(`以下工作流仍使用 ${id}:${names}。移除后这些工作流将无法运行,仍要移除吗?`))continue;
542
633
  removed=await this.withMaintenance(options=>this.app.removePlugin(id,options),{force:true});
543
634
  }
@@ -547,7 +638,7 @@ export class TerminalSession{
547
638
  }
548
639
  }
549
640
  async pack(){
550
- this.writable();if(this.dirty){if(!await this.ui.confirm('先保存当前工作流再选择打包?'))return;await this.execute('/save');}
641
+ this.writable();
551
642
  const flows=await this.app.listWorkflows(),entries=new Set();if(!flows.length)throw new Error('没有可打包的工作流');
552
643
  while(true){
553
644
  const selection=await this.ui.select('选择入口工作流(Enter 切换勾选)',[...flows.map(w=>({value:`workflow:${w.id}`,label:`${entries.has(w.id)?'[x]':'[ ]'} ${w.title??w.id}`})),{value:'done',label:'完成选择'}]);
@@ -555,6 +646,16 @@ export class TerminalSession{
555
646
  const id=selection.slice(9);
556
647
  if(entries.has(id))entries.delete(id);else entries.add(id);
557
648
  }
649
+ if(this.dirty){
650
+ const closures=await Promise.all([...entries].map(id=>this.app.checkWorkflow(id)));
651
+ if(closures.some(closure=>closure.workflows.some(flow=>flow.id===this.flow.id))){
652
+ const choice=await this.ui.select(`${this.flow.title??this.flow.id} 有未保存修改,已选入打包范围`,[
653
+ {value:'cancel',label:'返回,不打包'},{value:'saved',label:'打包已保存版本,保留当前草稿'},{value:'save',label:'保存修改后打包'},
654
+ ]);
655
+ if(choice==='cancel')return;
656
+ if(choice==='save')await this.execute('/save');
657
+ }
658
+ }
558
659
  const target=await this.ui.select('目标运行平台',[{value:'win32-x64',label:'Windows x64 ZIP'},{value:'linux-x64-glibc',label:'Linux x64 / Linux 容器 tar.gz'}]);
559
660
  const includeWeb=await this.ui.confirm('包含可选 Web 运行界面?(终端界面始终可用)');
560
661
  const readOnly=await this.ui.select('导出用途',[{value:'editable',label:'完整工具,可编辑工作区(含内部 npm)'},{value:'readonly',label:'只读精简运行包'}])==='readonly';
@@ -593,5 +694,8 @@ export async function startTerminal(app,options={}){
593
694
  const ui=new TerminalView({baseDir:options.baseDir??process.cwd(),previewLabel:options.previewLabel}),session=new TerminalSession(app,ui,options);
594
695
  const terminate=()=>{session.exiting=true;ui.pending?.reject(Object.assign(new Error('退出'),{code:'PROMPT_CANCELLED'}));for(const r of app.listRuns())if(r.status==='running')app.cancelRun(r.id);};
595
696
  process.once('SIGTERM',terminate);
596
- try{ui.start();await session.run();}finally{process.removeListener('SIGTERM',terminate);await ui.close();}
697
+ try{ui.start();await session.run();}finally{
698
+ process.removeListener('SIGTERM',terminate);const cleanup=await ui.close();
699
+ if(cleanup?.incomplete)throw new FlowError(`终端已关闭,但仍有 ${cleanup.unreaped} 个文件探测进程未回收`,{code:'FS_CLEANUP_INCOMPLETE',details:cleanup});
700
+ }
597
701
  }