@yanglaofish/fishtools 0.5.2 → 0.5.3

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