@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.
- package/README.md +23 -11
- package/manual/README.md +23 -11
- package/manual/docs/deployment.md +3 -3
- package/manual/docs/examples/action-plugin/package.json +1 -1
- package/manual/docs/plugin-development.md +15 -4
- package/manual/docs/releases.md +24 -0
- package/manual/docs/superpowers/plans/2026-10-13-command-shortcuts.md +3 -2
- package/manual/docs/superpowers/plans/2026-10-13-global-plugins.md +56 -0
- package/manual/docs/superpowers/plans/2026-10-13-tui-readable-sessions.md +21 -0
- package/manual/docs/superpowers/reviews/2026-10-13-0.5.3-review.md +28 -0
- package/manual/docs/superpowers/reviews/2026-10-13-command-shortcuts-review.md +7 -0
- package/manual/docs/superpowers/reviews/2026-10-13-tui-sessions-review.md +55 -0
- package/manual/docs/superpowers/specs/2026-10-13-issue-4-workflow-menu.md +23 -0
- package/manual/docs/superpowers/specs/2026-10-13-issue-5-results-and-history.md +20 -0
- package/manual/docs/terminal-commands.md +8 -0
- package/manual/docs/verification.md +30 -0
- package/manual/packages/core/README.md +2 -0
- package/manual/packages/core/package.json +1 -1
- package/manual/packages/core/src/application.js +100 -51
- package/manual/packages/core/src/development-watch-worker.js +10 -1
- package/manual/packages/core/src/development.js +1 -1
- package/manual/packages/core/src/plugin-catalog.js +42 -0
- package/manual/packages/core/src/version.js +1 -1
- package/manual/packages/fst-cli/README.md +4 -0
- package/manual/packages/fst-cli/bin/fst.js +7 -6
- package/manual/packages/fst-cli/package.json +1 -1
- package/manual/packages/fst-cli/src/development.js +6 -1
- package/manual/packages/fst-cli/src/terminal/command-menu.js +8 -3
- package/manual/packages/fst-cli/src/terminal/navigation.js +2 -0
- package/manual/packages/fst-cli/src/terminal/presentation.js +4 -3
- package/manual/packages/fst-cli/src/terminal/run-feed.js +69 -13
- package/manual/packages/fst-cli/src/terminal/run-presentation.js +55 -12
- package/manual/packages/fst-cli/src/terminal/run-viewer.js +26 -10
- package/manual/packages/fst-cli/src/terminal/session-history.js +82 -0
- package/manual/packages/fst-cli/src/terminal/session.js +119 -40
- package/manual/packages/fst-cli/src/terminal/view.js +31 -8
- package/manual/packages/fst-cli/src/terminal/workflow-menu.js +14 -9
- package/manual/packages/fst-devtools/package.json +2 -2
- package/manual/packages/fst-devtools/src/plugin-tools.js +1 -1
- package/manual/packages/fst-logs/README.md +23 -2
- package/manual/packages/fst-logs/package.json +2 -1
- package/manual/packages/fst-logs/src/file-identity.js +23 -0
- package/manual/packages/fst-logs/src/markdown-log.js +4 -3
- package/manual/packages/fst-logs/src/run-logs.js +3 -2
- package/manual/packages/fst-logs/src/session-history.js +180 -0
- package/manual/packages/fst-platform/README.md +4 -0
- package/manual/packages/fst-platform/package.json +3 -3
- package/manual/packages/fst-platform/src/process.js +4 -1
- package/manual/packages/fst-platform/src/shell.js +46 -1
- package/manual/packages/fst-plugin/package.json +1 -1
- package/manual/packages/fst-plugin/src/host.js +31 -23
- package/manual/packages/fst-workflow/package.json +1 -1
- package/manual/packages/fst-workflow/src/engine.js +1 -1
- package/manual/packages/fst-workspace/README.md +2 -0
- package/manual/packages/fst-workspace/package.json +2 -1
- package/manual/packages/fst-workspace/src/plugin-registry.js +58 -0
- package/manual/packages/fst-workspace/src/plugins.js +7 -4
- package/manual/packages/fst-workspace/src/workflows.js +5 -3
- package/manual/packages/pack/package.json +3 -3
- package/manual/packages/pack/runtime-cache.js +26 -0
- package/manual/packages/pack/runtime.js +6 -10
- package/manual/plugins/commands/package.json +1 -1
- package/node_modules/@mytools/commands/package.json +1 -1
- package/node_modules/@mytools/core/README.md +2 -0
- package/node_modules/@mytools/core/package.json +1 -1
- package/node_modules/@mytools/core/src/application.js +100 -51
- package/node_modules/@mytools/core/src/development-watch-worker.js +10 -1
- package/node_modules/@mytools/core/src/development.js +1 -1
- package/node_modules/@mytools/core/src/plugin-catalog.js +42 -0
- package/node_modules/@mytools/core/src/version.js +1 -1
- package/node_modules/@mytools/fst-cli/README.md +4 -0
- package/node_modules/@mytools/fst-cli/bin/fst.js +7 -6
- package/node_modules/@mytools/fst-cli/package.json +1 -1
- package/node_modules/@mytools/fst-cli/src/development.js +6 -1
- package/node_modules/@mytools/fst-cli/src/terminal/command-menu.js +8 -3
- package/node_modules/@mytools/fst-cli/src/terminal/navigation.js +2 -0
- package/node_modules/@mytools/fst-cli/src/terminal/presentation.js +4 -3
- package/node_modules/@mytools/fst-cli/src/terminal/run-feed.js +69 -13
- package/node_modules/@mytools/fst-cli/src/terminal/run-presentation.js +55 -12
- package/node_modules/@mytools/fst-cli/src/terminal/run-viewer.js +26 -10
- package/node_modules/@mytools/fst-cli/src/terminal/session-history.js +82 -0
- package/node_modules/@mytools/fst-cli/src/terminal/session.js +119 -40
- package/node_modules/@mytools/fst-cli/src/terminal/view.js +31 -8
- package/node_modules/@mytools/fst-cli/src/terminal/workflow-menu.js +14 -9
- package/node_modules/@mytools/fst-devtools/package.json +2 -2
- package/node_modules/@mytools/fst-devtools/src/plugin-tools.js +1 -1
- package/node_modules/@mytools/fst-logs/README.md +23 -2
- package/node_modules/@mytools/fst-logs/package.json +2 -1
- package/node_modules/@mytools/fst-logs/src/file-identity.js +23 -0
- package/node_modules/@mytools/fst-logs/src/markdown-log.js +4 -3
- package/node_modules/@mytools/fst-logs/src/run-logs.js +3 -2
- package/node_modules/@mytools/fst-logs/src/session-history.js +180 -0
- package/node_modules/@mytools/fst-platform/README.md +4 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/LICENSE +21 -0
- package/node_modules/{undici/docs/docs/index.md → @mytools/fst-platform/node_modules/undici/README.md} +85 -137
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Agent.md +84 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/BalancedPool.md +99 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/CacheStorage.md +30 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/CacheStore.md +164 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Client.md +288 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/ClientStats.md +27 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Connector.md +115 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/ContentType.md +57 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Cookies.md +128 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Debug.md +62 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +317 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Dispatcher.md +1393 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +159 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Errors.md +49 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/EventSource.md +45 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Fetch.md +60 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/GlobalInstallation.md +139 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/H2CClient.md +263 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockAgent.md +603 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockCallHistory.md +197 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +43 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockClient.md +81 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockErrors.md +12 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockPool.md +555 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Pool.md +84 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/PoolStats.md +35 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/ProxyAgent.md +229 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/RedirectHandler.md +93 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/RetryAgent.md +50 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/RetryHandler.md +118 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/RoundRobinPool.md +145 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/SnapshotAgent.md +616 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +275 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Util.md +25 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/WebSocket.md +141 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/api-lifecycle.md +91 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/best-practices/client-certificate.md +64 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/docs/docs/best-practices/crawling.md +1 -3
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/best-practices/mocking-request.md +190 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/best-practices/proxy.md +127 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/docs/docs/best-practices/undici-vs-builtin-fetch.md +8 -10
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/best-practices/writing-tests.md +63 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/index-fetch.js +65 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/index.d.ts +3 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/index.js +234 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/abort-signal.js +59 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-connect.js +110 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-pipeline.js +252 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-request.js +214 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-stream.js +209 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-upgrade.js +111 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/index.js +7 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/readable.js +580 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/cache/memory-cache-store.js +3 -3
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/cache/sqlite-cache-store.js +1 -3
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/connect.js +153 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/constants.js +143 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/diagnostics.js +227 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/errors.js +477 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/request.js +485 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/symbols.js +75 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/tree.js +160 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/util.js +992 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/agent.js +158 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/balanced-pool.js +221 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/client-h1.js +1746 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/client-h2.js +1060 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/client.js +668 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/dispatcher-base.js +184 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/dispatcher.js +48 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +146 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/fixed-queue.js +135 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/dispatcher/h2c-client.js +4 -4
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/pool-base.js +214 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/pool.js +118 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/proxy-agent.js +319 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/retry-agent.js +35 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/dispatcher/round-robin-pool.js +10 -32
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/dispatcher/socks5-proxy-agent.js +63 -153
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/global.js +59 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/handler/cache-handler.js +7 -49
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/handler/cache-revalidation-handler.js +0 -10
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/decorator-handler.js +67 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/handler/deduplication-handler.js +10 -29
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/redirect-handler.js +238 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/retry-handler.js +504 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/unwrap-handler.js +106 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/wrap-handler.js +105 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/interceptor/cache.js +26 -79
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/interceptor/decompress.js +3 -13
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/interceptor/deduplicate.js +4 -5
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/dns.js +571 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/dump.js +99 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/redirect.js +21 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/response-error.js +95 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/retry.js +19 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/constants.js +531 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/llhttp-wasm.js +15 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +15 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/utils.js +12 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-agent.js +232 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/mock/mock-call-history.js +1 -1
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-client.js +68 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-errors.js +29 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-interceptor.js +209 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-pool.js +68 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-symbols.js +32 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-utils.js +486 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/mock/snapshot-agent.js +7 -25
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/mock/snapshot-recorder.js +3 -38
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/util/cache.js +10 -92
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/util/promise.js +28 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/util/runtime-features.js +34 -3
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/util/timers.js +425 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cache/cache.js +864 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cache/util.js +45 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cookies/constants.js +12 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cookies/index.js +199 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cookies/parse.js +314 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cookies/util.js +352 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/eventsource/eventsource-stream.js +494 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/eventsource/eventsource.js +501 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/eventsource/util.js +29 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/LICENSE +21 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/body.js +509 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/constants.js +131 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/data-url.js +596 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/formdata-parser.js +586 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/formdata.js +259 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/global.js +40 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/headers.js +719 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/index.js +2413 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/request.js +1115 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/response.js +641 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/util.js +1522 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/infra/index.js +1 -16
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/webidl/index.js +21 -7
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/connection.js +339 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/constants.js +126 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/events.js +331 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/frame.js +133 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/permessage-deflate.js +105 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/receiver.js +507 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/sender.js +109 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/websocket/stream/websocketerror.js +10 -13
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/websocket/stream/websocketstream.js +14 -29
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/util.js +347 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/websocket.js +758 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/package.json +152 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/scripts/strip-comments.js +10 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/README.md +6 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/agent.d.ts +32 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/api.d.ts +43 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/balanced-pool.d.ts +30 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/cache.d.ts +36 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/client.d.ts +139 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/connector.d.ts +36 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/content-type.d.ts +21 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/cookies.d.ts +30 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/diagnostics-channel.d.ts +74 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/dispatcher.d.ts +275 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/errors.d.ts +177 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/eventsource.d.ts +66 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/fetch.d.ts +231 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/formdata.d.ts +114 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/global-dispatcher.d.ts +9 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/global-origin.d.ts +7 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/h2c-client.d.ts +6 -6
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/handlers.d.ts +14 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/header.d.ts +160 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/index.d.ts +91 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/interceptors.d.ts +82 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-agent.d.ts +68 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-client.d.ts +27 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-errors.d.ts +12 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-interceptor.d.ts +94 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-pool.d.ts +27 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/patch.d.ts +29 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/pool-stats.d.ts +19 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/pool.d.ts +41 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/proxy-agent.d.ts +29 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/readable.d.ts +68 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/retry-agent.d.ts +8 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/retry-handler.d.ts +125 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/round-robin-pool.d.ts +2 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/snapshot-agent.d.ts +0 -4
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/socks5-proxy-agent.d.ts +2 -4
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/util.d.ts +18 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/webidl.d.ts +347 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/websocket.d.ts +188 -0
- package/node_modules/@mytools/fst-platform/package.json +3 -3
- package/node_modules/@mytools/fst-platform/src/process.js +4 -1
- package/node_modules/@mytools/fst-platform/src/shell.js +46 -1
- package/node_modules/@mytools/fst-plugin/package.json +1 -1
- package/node_modules/@mytools/fst-plugin/src/host.js +31 -23
- package/node_modules/@mytools/fst-workflow/package.json +1 -1
- package/node_modules/@mytools/fst-workflow/src/engine.js +1 -1
- package/node_modules/@mytools/fst-workspace/README.md +2 -0
- package/node_modules/@mytools/fst-workspace/package.json +2 -1
- package/node_modules/@mytools/fst-workspace/src/plugin-registry.js +58 -0
- package/node_modules/@mytools/fst-workspace/src/plugins.js +7 -4
- package/node_modules/@mytools/fst-workspace/src/workflows.js +5 -3
- package/node_modules/@mytools/pack/package.json +3 -3
- package/node_modules/@mytools/pack/runtime-cache.js +26 -0
- package/node_modules/@mytools/pack/runtime.js +6 -10
- package/node_modules/@mytools/web/public/THIRD_PARTY_NOTICES.txt +953 -963
- package/node_modules/@npmcli/agent/lib/agents.js +0 -10
- package/node_modules/@npmcli/agent/package.json +12 -11
- package/node_modules/@npmcli/arborist/README.md +2 -2
- package/node_modules/@npmcli/arborist/bin/index.js +2 -1
- package/node_modules/@npmcli/arborist/bin/shrinkwrap.js +7 -0
- package/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js +25 -159
- package/node_modules/@npmcli/arborist/lib/arborist/isolated-reifier.js +49 -11
- package/node_modules/@npmcli/arborist/lib/arborist/load-actual.js +0 -67
- package/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js +37 -5
- package/node_modules/@npmcli/arborist/lib/arborist/rebuild.js +8 -15
- package/node_modules/@npmcli/arborist/lib/arborist/reify.js +42 -59
- package/node_modules/@npmcli/arborist/lib/consistent-resolve.js +1 -1
- package/node_modules/@npmcli/arborist/lib/diff.js +22 -17
- package/node_modules/@npmcli/arborist/lib/edge.js +2 -22
- package/node_modules/@npmcli/arborist/lib/index.js +0 -2
- package/node_modules/@npmcli/arborist/lib/isolated-classes.js +1 -4
- package/node_modules/@npmcli/arborist/lib/node.js +9 -13
- package/node_modules/@npmcli/arborist/lib/place-dep.js +0 -6
- package/node_modules/@npmcli/arborist/lib/printable.js +5 -0
- package/node_modules/@npmcli/arborist/lib/shrinkwrap.js +32 -55
- package/node_modules/@npmcli/arborist/package.json +26 -32
- package/node_modules/@npmcli/fs/lib/move-file.js +5 -5
- package/node_modules/@npmcli/fs/package.json +5 -5
- package/node_modules/@npmcli/git/package.json +12 -13
- package/node_modules/@npmcli/installed-package-contents/package.json +7 -7
- package/node_modules/@npmcli/map-workspaces/package.json +7 -7
- package/node_modules/@npmcli/metavuln-calculator/package.json +16 -10
- package/node_modules/@npmcli/name-from-folder/package.json +16 -13
- package/node_modules/@npmcli/node-gyp/package.json +5 -5
- package/node_modules/@npmcli/package-json/lib/index.js +1 -2
- package/node_modules/@npmcli/package-json/lib/normalize.js +22 -23
- package/node_modules/@npmcli/package-json/package.json +10 -11
- package/node_modules/@npmcli/promise-spawn/README.md +2 -1
- package/node_modules/@npmcli/promise-spawn/package.json +5 -5
- package/node_modules/@npmcli/redact/package.json +4 -4
- package/node_modules/@npmcli/run-script/lib/is-server-package.js +11 -0
- package/node_modules/@npmcli/run-script/lib/make-spawn-args.js +6 -5
- package/node_modules/@npmcli/run-script/lib/run-script-pkg.js +13 -4
- package/node_modules/@npmcli/run-script/lib/run-script.js +2 -1
- package/node_modules/@npmcli/run-script/package.json +11 -12
- package/node_modules/@sigstore/bundle/README.md +1 -1
- package/node_modules/@sigstore/bundle/dist/error.js +0 -1
- package/node_modules/@sigstore/bundle/package.json +2 -2
- package/node_modules/@sigstore/core/README.md +1 -1
- package/node_modules/@sigstore/core/dist/asn1/length.js +1 -12
- package/node_modules/@sigstore/core/dist/asn1/obj.js +7 -25
- package/node_modules/@sigstore/core/dist/asn1/parse.js +5 -24
- package/node_modules/@sigstore/core/package.json +2 -2
- package/node_modules/@sigstore/sign/README.md +1 -1
- package/node_modules/@sigstore/sign/dist/signer/fulcio/ephemeral.js +1 -1
- package/node_modules/@sigstore/sign/package.json +9 -9
- package/node_modules/@sigstore/tuf/README.md +1 -1
- package/node_modules/@sigstore/tuf/package.json +4 -4
- package/node_modules/@sigstore/tuf/seeds.json +1 -1
- package/node_modules/@sigstore/verify/README.md +1 -1
- package/node_modules/@sigstore/verify/dist/bundle/dsse.d.ts +0 -1
- package/node_modules/@sigstore/verify/dist/bundle/dsse.js +0 -6
- package/node_modules/@sigstore/verify/dist/bundle/message.d.ts +0 -1
- package/node_modules/@sigstore/verify/dist/bundle/message.js +0 -5
- package/node_modules/@sigstore/verify/dist/policy.d.ts +1 -1
- package/node_modules/@sigstore/verify/dist/policy.js +2 -0
- package/node_modules/@sigstore/verify/dist/shared.types.d.ts +1 -6
- package/node_modules/@sigstore/verify/dist/tlog/checkpoint.js +3 -17
- package/node_modules/@sigstore/verify/dist/tlog/hashedrekord.js +4 -4
- package/node_modules/@sigstore/verify/dist/tlog/index.js +1 -13
- package/node_modules/@sigstore/verify/dist/tlog/merkle.js +1 -12
- package/node_modules/@sigstore/verify/dist/verifier.js +5 -13
- package/node_modules/@sigstore/verify/package.json +5 -5
- package/node_modules/@tufjs/models/package.json +3 -3
- package/node_modules/abbrev/package.json +8 -9
- package/node_modules/agent-base/dist/helpers.d.ts +5 -0
- package/node_modules/agent-base/dist/helpers.d.ts.map +1 -1
- package/node_modules/agent-base/dist/helpers.js +34 -5
- package/node_modules/agent-base/dist/helpers.js.map +1 -1
- package/node_modules/agent-base/dist/index.d.ts +5 -1
- package/node_modules/agent-base/dist/index.d.ts.map +1 -1
- package/node_modules/agent-base/dist/index.js +40 -8
- package/node_modules/agent-base/dist/index.js.map +1 -1
- package/node_modules/agent-base/package.json +12 -12
- package/node_modules/bin-links/README.md +4 -5
- package/node_modules/bin-links/lib/fix-bin.js +1 -3
- package/node_modules/bin-links/lib/index.js +16 -8
- package/node_modules/bin-links/lib/link-mans.js +53 -0
- package/node_modules/bin-links/package.json +12 -11
- package/node_modules/cacache/lib/content/write.js +0 -2
- package/node_modules/cacache/lib/entry-index.js +0 -3
- package/node_modules/cacache/lib/rm.js +0 -1
- package/node_modules/cacache/lib/util/tmp.js +1 -5
- package/node_modules/cacache/lib/verify.js +2 -2
- package/node_modules/cacache/package.json +7 -7
- package/node_modules/cmd-shim/lib/index.js +32 -67
- package/node_modules/cmd-shim/package.json +5 -5
- package/node_modules/hosted-git-info/README.md +1 -1
- package/node_modules/hosted-git-info/lib/parse-url.js +3 -1
- package/node_modules/hosted-git-info/package.json +4 -4
- package/node_modules/http-proxy-agent/dist/index.d.ts +5 -8
- package/node_modules/http-proxy-agent/dist/index.d.ts.map +1 -1
- package/node_modules/http-proxy-agent/dist/index.js +42 -26
- package/node_modules/http-proxy-agent/dist/index.js.map +1 -1
- package/node_modules/http-proxy-agent/package.json +14 -15
- package/node_modules/https-proxy-agent/dist/index.d.ts +5 -9
- package/node_modules/https-proxy-agent/dist/index.d.ts.map +1 -1
- package/node_modules/https-proxy-agent/dist/index.js +44 -98
- package/node_modules/https-proxy-agent/dist/index.js.map +1 -1
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +3 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +1 -1
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +10 -3
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -1
- package/node_modules/https-proxy-agent/package.json +15 -16
- package/node_modules/ignore-walk/package.json +4 -4
- package/node_modules/ini/package.json +5 -5
- package/node_modules/ip-address/README.md +70 -70
- package/node_modules/ip-address/dist/ipv6.js +7 -4
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/dist/v6/constants.d.ts +3 -0
- package/node_modules/ip-address/dist/v6/constants.js +3 -0
- package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/ip-address/package.json +2 -1
- package/node_modules/json-parse-even-better-errors/lib/index.js +1 -3
- package/node_modules/json-parse-even-better-errors/package.json +17 -13
- package/node_modules/make-fetch-happen/package.json +11 -11
- package/node_modules/minipass-fetch/package.json +4 -4
- package/node_modules/node-gyp/.release-please-manifest.json +1 -1
- package/node_modules/node-gyp/CHANGELOG.md +0 -102
- package/node_modules/node-gyp/README.md +2 -3
- package/node_modules/node-gyp/eslint.config.js +1 -4
- package/node_modules/node-gyp/gyp/.release-please-manifest.json +1 -1
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +19 -14
- package/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +2 -7
- package/node_modules/node-gyp/gyp/pyproject.toml +1 -1
- package/node_modules/node-gyp/lib/build.js +6 -18
- package/node_modules/node-gyp/lib/create-config-gypi.js +0 -5
- package/node_modules/node-gyp/lib/node-gyp.js +2 -9
- package/node_modules/node-gyp/lib/rebuild.js +3 -3
- package/node_modules/node-gyp/package.json +9 -11
- package/node_modules/nopt/README.md +4 -2
- package/node_modules/nopt/lib/debug.js +5 -0
- package/node_modules/nopt/lib/nopt-lib.js +43 -7
- package/node_modules/nopt/lib/nopt.js +4 -2
- package/node_modules/nopt/lib/type-defs.js +13 -8
- package/node_modules/nopt/package.json +17 -15
- package/node_modules/npm-bundled/package.json +6 -6
- package/node_modules/npm-install-checks/package.json +5 -5
- package/node_modules/npm-normalize-package-bin/package.json +16 -13
- package/node_modules/npm-package-arg/package.json +7 -7
- package/node_modules/npm-packlist/README.md +30 -45
- package/node_modules/npm-packlist/lib/index.js +47 -115
- package/node_modules/npm-packlist/package.json +8 -10
- package/node_modules/npm-pick-manifest/package.json +19 -15
- package/node_modules/npm-registry-fetch/lib/errors.js +3 -8
- package/node_modules/npm-registry-fetch/package.json +12 -12
- package/node_modules/pacote/lib/dir.js +5 -60
- package/node_modules/pacote/lib/fetcher.js +0 -4
- package/node_modules/pacote/lib/git.js +3 -11
- package/node_modules/pacote/lib/util/add-git-sha.js +1 -1
- package/node_modules/pacote/package.json +18 -19
- package/node_modules/parse-conflict-json/package.json +6 -6
- package/node_modules/proc-log/package.json +4 -4
- package/node_modules/read-cmd-shim/lib/index.js +1 -1
- package/node_modules/read-cmd-shim/package.json +18 -14
- package/node_modules/sigstore/README.md +1 -1
- package/node_modules/sigstore/package.json +10 -10
- package/node_modules/socks-proxy-agent/dist/index.d.ts +3 -1
- package/node_modules/socks-proxy-agent/dist/index.d.ts.map +1 -1
- package/node_modules/socks-proxy-agent/dist/index.js +43 -17
- package/node_modules/socks-proxy-agent/dist/index.js.map +1 -1
- package/node_modules/socks-proxy-agent/package.json +15 -15
- package/node_modules/ssri/package.json +4 -4
- package/node_modules/tuf-js/dist/config.d.ts +2 -2
- package/node_modules/tuf-js/dist/fetcher.d.ts +4 -4
- package/node_modules/tuf-js/dist/fetcher.js +16 -55
- package/node_modules/tuf-js/dist/updater.js +2 -2
- package/node_modules/tuf-js/package.json +8 -8
- package/node_modules/undici/README.md +72 -405
- package/node_modules/undici/docs/docs/api/Agent.md +41 -252
- package/node_modules/undici/docs/docs/api/BalancedPool.md +48 -246
- package/node_modules/undici/docs/docs/api/CacheStorage.md +13 -171
- package/node_modules/undici/docs/docs/api/Client.md +139 -395
- package/node_modules/undici/docs/docs/api/Connector.md +35 -118
- package/node_modules/undici/docs/docs/api/ContentType.md +25 -65
- package/node_modules/undici/docs/docs/api/Cookies.md +47 -125
- package/node_modules/undici/docs/docs/api/Debug.md +31 -47
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +97 -409
- package/node_modules/undici/docs/docs/api/DispatchInterceptor.md +60 -0
- package/node_modules/undici/docs/docs/api/Dispatcher.md +1011 -500
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +96 -105
- package/node_modules/undici/docs/docs/api/Errors.md +28 -528
- package/node_modules/undici/docs/docs/api/EventSource.md +13 -326
- package/node_modules/undici/docs/docs/api/Fetch.md +24 -693
- package/node_modules/undici/docs/docs/api/MockAgent.md +264 -346
- package/node_modules/undici/docs/docs/api/MockClient.md +31 -153
- package/node_modules/undici/docs/docs/api/MockErrors.md +5 -56
- package/node_modules/undici/docs/docs/api/MockPool.md +253 -324
- package/node_modules/undici/docs/docs/api/Pool.md +41 -235
- package/node_modules/undici/docs/docs/api/PoolStats.md +13 -119
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +81 -198
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +58 -238
- package/node_modules/undici/docs/docs/api/RetryAgent.md +28 -119
- package/node_modules/undici/docs/docs/api/RetryHandler.md +78 -161
- package/node_modules/undici/docs/docs/api/Util.md +11 -68
- package/node_modules/undici/docs/docs/api/WebSocket.md +24 -509
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +33 -101
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -2
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +2 -58
- package/node_modules/undici/docs/docs/best-practices/proxy.md +1 -3
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -45
- package/node_modules/undici/index-fetch.js +4 -34
- package/node_modules/undici/index.d.ts +1 -1
- package/node_modules/undici/index.js +20 -87
- package/node_modules/undici/lib/api/abort-signal.js +0 -2
- package/node_modules/undici/lib/api/api-connect.js +11 -15
- package/node_modules/undici/lib/api/api-pipeline.js +19 -33
- package/node_modules/undici/lib/api/api-request.js +59 -89
- package/node_modules/undici/lib/api/api-stream.js +64 -114
- package/node_modules/undici/lib/api/api-upgrade.js +13 -26
- package/node_modules/undici/lib/api/readable.js +87 -317
- package/node_modules/undici/lib/api/util.js +93 -0
- package/node_modules/undici/lib/core/connect.js +125 -77
- package/node_modules/undici/lib/core/constants.js +9 -11
- package/node_modules/undici/lib/core/diagnostics.js +129 -154
- package/node_modules/undici/lib/core/errors.js +50 -122
- package/node_modules/undici/lib/core/request.js +87 -172
- package/node_modules/undici/lib/core/symbols.js +2 -14
- package/node_modules/undici/lib/core/tree.js +2 -10
- package/node_modules/undici/lib/core/util.js +190 -481
- package/node_modules/undici/lib/dispatcher/agent.js +35 -83
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +38 -46
- package/node_modules/undici/lib/dispatcher/client-h1.js +199 -492
- package/node_modules/undici/lib/dispatcher/client-h2.js +380 -1409
- package/node_modules/undici/lib/dispatcher/client.js +130 -253
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +52 -50
- package/node_modules/undici/lib/dispatcher/dispatcher.js +24 -17
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +45 -75
- package/node_modules/undici/lib/dispatcher/fixed-queue.js +50 -68
- package/node_modules/undici/lib/dispatcher/pool-base.js +54 -153
- package/node_modules/undici/lib/dispatcher/pool-stats.js +34 -0
- package/node_modules/undici/lib/dispatcher/pool.js +16 -135
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +41 -175
- package/node_modules/undici/lib/dispatcher/retry-agent.js +0 -3
- package/node_modules/undici/lib/global.js +9 -59
- package/node_modules/undici/lib/handler/decorator-handler.js +15 -43
- package/node_modules/undici/lib/handler/redirect-handler.js +116 -127
- package/node_modules/undici/lib/handler/retry-handler.js +182 -398
- package/node_modules/undici/lib/interceptor/dns.js +47 -254
- package/node_modules/undici/lib/interceptor/dump.js +56 -32
- package/node_modules/undici/lib/interceptor/redirect-interceptor.js +21 -0
- package/node_modules/undici/lib/interceptor/redirect.js +14 -11
- package/node_modules/undici/lib/interceptor/response-error.js +22 -31
- package/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/node_modules/undici/lib/llhttp/constants.js +193 -446
- package/node_modules/undici/lib/llhttp/llhttp-wasm.js +1 -11
- package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +1 -11
- package/node_modules/undici/lib/llhttp/utils.js +12 -9
- package/node_modules/undici/lib/mock/mock-agent.js +22 -106
- package/node_modules/undici/lib/mock/mock-client.js +4 -13
- package/node_modules/undici/lib/mock/mock-errors.js +2 -3
- package/node_modules/undici/lib/mock/mock-interceptor.js +13 -33
- package/node_modules/undici/lib/mock/mock-pool.js +4 -13
- package/node_modules/undici/lib/mock/mock-symbols.js +1 -10
- package/node_modules/undici/lib/mock/mock-utils.js +51 -404
- package/node_modules/undici/lib/mock/pluralizer.js +29 -0
- package/node_modules/undici/lib/util/timers.js +9 -11
- package/node_modules/undici/lib/web/cache/cache.js +51 -63
- package/node_modules/undici/lib/web/cache/cachestorage.js +7 -13
- package/node_modules/undici/lib/web/cache/symbols.js +5 -0
- package/node_modules/undici/lib/web/cookies/index.js +18 -45
- package/node_modules/undici/lib/web/cookies/parse.js +149 -157
- package/node_modules/undici/lib/web/cookies/util.js +2 -4
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +9 -37
- package/node_modules/undici/lib/web/eventsource/eventsource.js +64 -108
- package/node_modules/undici/lib/web/eventsource/util.js +5 -28
- package/node_modules/undici/lib/web/fetch/body.js +148 -173
- package/node_modules/undici/lib/web/fetch/constants.js +6 -13
- package/node_modules/undici/lib/web/fetch/data-url.js +167 -19
- package/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +46 -0
- package/node_modules/undici/lib/web/fetch/file.js +126 -0
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +117 -229
- package/node_modules/undici/lib/web/fetch/formdata.js +65 -85
- package/node_modules/undici/lib/web/fetch/headers.js +108 -143
- package/node_modules/undici/lib/web/fetch/index.js +446 -627
- package/node_modules/undici/lib/web/fetch/request.js +115 -217
- package/node_modules/undici/lib/web/fetch/response.js +82 -110
- package/node_modules/undici/lib/web/fetch/symbols.js +9 -0
- package/node_modules/undici/lib/web/fetch/util.js +393 -291
- package/node_modules/undici/lib/web/fetch/webidl.js +695 -0
- package/node_modules/undici/lib/web/fileapi/encoding.js +290 -0
- package/node_modules/undici/lib/web/fileapi/filereader.js +344 -0
- package/node_modules/undici/lib/web/fileapi/progressevent.js +78 -0
- package/node_modules/undici/lib/web/fileapi/symbols.js +10 -0
- package/node_modules/undici/lib/web/fileapi/util.js +391 -0
- package/node_modules/undici/lib/web/websocket/connection.js +160 -139
- package/node_modules/undici/lib/web/websocket/constants.js +10 -70
- package/node_modules/undici/lib/web/websocket/events.js +30 -49
- package/node_modules/undici/lib/web/websocket/frame.js +20 -51
- package/node_modules/undici/lib/web/websocket/receiver.js +87 -83
- package/node_modules/undici/lib/web/websocket/sender.js +13 -18
- package/node_modules/undici/lib/web/websocket/symbols.js +12 -0
- package/node_modules/undici/lib/web/websocket/util.js +90 -115
- package/node_modules/undici/lib/web/websocket/websocket.js +171 -359
- package/node_modules/undici/package.json +57 -49
- package/node_modules/undici/scripts/strip-comments.js +1 -3
- package/node_modules/undici/types/agent.d.ts +13 -12
- package/node_modules/undici/types/api.d.ts +26 -26
- package/node_modules/undici/types/balanced-pool.d.ts +12 -13
- package/node_modules/undici/types/client.d.ts +39 -98
- package/node_modules/undici/types/connector.d.ts +2 -5
- package/node_modules/undici/types/cookies.d.ts +1 -3
- package/node_modules/undici/types/diagnostics-channel.d.ts +11 -20
- package/node_modules/undici/types/dispatcher.d.ts +139 -136
- package/node_modules/undici/types/env-http-proxy-agent.d.ts +3 -4
- package/node_modules/undici/types/errors.d.ts +54 -86
- package/node_modules/undici/types/eventsource.d.ts +4 -9
- package/node_modules/undici/types/fetch.d.ts +25 -51
- package/node_modules/undici/types/file.d.ts +39 -0
- package/node_modules/undici/types/filereader.d.ts +54 -0
- package/node_modules/undici/types/formdata.d.ts +7 -7
- package/node_modules/undici/types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici/types/global-origin.d.ts +5 -5
- package/node_modules/undici/types/handlers.d.ts +9 -10
- package/node_modules/undici/types/header.d.ts +1 -162
- package/node_modules/undici/types/index.d.ts +47 -69
- package/node_modules/undici/types/interceptors.d.ts +12 -62
- package/node_modules/undici/types/mock-agent.d.ts +27 -46
- package/node_modules/undici/types/mock-client.d.ts +4 -6
- package/node_modules/undici/types/mock-errors.d.ts +3 -3
- package/node_modules/undici/types/mock-interceptor.d.ts +21 -26
- package/node_modules/undici/types/mock-pool.d.ts +4 -6
- package/node_modules/undici/types/patch.d.ts +4 -0
- package/node_modules/undici/types/pool-stats.d.ts +8 -8
- package/node_modules/undici/types/pool.d.ts +14 -14
- package/node_modules/undici/types/proxy-agent.d.ts +6 -13
- package/node_modules/undici/types/readable.d.ts +16 -19
- package/node_modules/undici/types/retry-agent.d.ts +1 -1
- package/node_modules/undici/types/retry-handler.d.ts +9 -18
- package/node_modules/undici/types/util.d.ts +3 -3
- package/node_modules/undici/types/webidl.d.ts +32 -156
- package/node_modules/undici/types/websocket.d.ts +10 -48
- package/node_modules/validate-npm-package-name/package.json +4 -4
- package/node_modules/which/package.json +4 -4
- package/node_modules/write-file-atomic/package.json +4 -4
- package/package.json +56 -60
- package/node_modules/@npmcli/arborist/lib/npm-extension.js +0 -237
- package/node_modules/@npmcli/arborist/lib/package-extensions.js +0 -236
- package/node_modules/@npmcli/arborist/lib/patch.js +0 -111
- package/node_modules/@npmcli/arborist/lib/patched-dependencies.js +0 -168
- package/node_modules/cacache/lib/util/cache-dir.js +0 -29
- package/node_modules/diff/CONTRIBUTING.md +0 -28
- package/node_modules/diff/LICENSE +0 -29
- package/node_modules/diff/README.md +0 -388
- package/node_modules/diff/dist/diff.js +0 -1782
- package/node_modules/diff/dist/diff.min.js +0 -1
- package/node_modules/diff/eslint.config.mjs +0 -182
- package/node_modules/diff/libcjs/convert/dmp.d.ts +0 -8
- package/node_modules/diff/libcjs/convert/dmp.d.ts.map +0 -1
- package/node_modules/diff/libcjs/convert/dmp.js +0 -24
- package/node_modules/diff/libcjs/convert/xml.d.ts +0 -6
- package/node_modules/diff/libcjs/convert/xml.d.ts.map +0 -1
- package/node_modules/diff/libcjs/convert/xml.js +0 -34
- package/node_modules/diff/libcjs/diff/array.d.ts +0 -19
- package/node_modules/diff/libcjs/diff/array.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/array.js +0 -40
- package/node_modules/diff/libcjs/diff/base.d.ts +0 -20
- package/node_modules/diff/libcjs/diff/base.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/base.js +0 -265
- package/node_modules/diff/libcjs/diff/character.d.ts +0 -19
- package/node_modules/diff/libcjs/diff/character.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/character.js +0 -31
- package/node_modules/diff/libcjs/diff/css.d.ts +0 -18
- package/node_modules/diff/libcjs/diff/css.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/css.js +0 -34
- package/node_modules/diff/libcjs/diff/json.d.ts +0 -24
- package/node_modules/diff/libcjs/diff/json.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/json.js +0 -105
- package/node_modules/diff/libcjs/diff/line.d.ts +0 -24
- package/node_modules/diff/libcjs/diff/line.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/line.js +0 -89
- package/node_modules/diff/libcjs/diff/sentence.d.ts +0 -21
- package/node_modules/diff/libcjs/diff/sentence.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/sentence.js +0 -67
- package/node_modules/diff/libcjs/diff/word.d.ts +0 -35
- package/node_modules/diff/libcjs/diff/word.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/word.js +0 -312
- package/node_modules/diff/libcjs/index.d.ts +0 -20
- package/node_modules/diff/libcjs/index.d.ts.map +0 -1
- package/node_modules/diff/libcjs/index.js +0 -64
- package/node_modules/diff/libcjs/package.json +0 -1
- package/node_modules/diff/libcjs/patch/apply.d.ts +0 -62
- package/node_modules/diff/libcjs/patch/apply.d.ts.map +0 -1
- package/node_modules/diff/libcjs/patch/apply.js +0 -267
- package/node_modules/diff/libcjs/patch/create.d.ts +0 -122
- package/node_modules/diff/libcjs/patch/create.d.ts.map +0 -1
- package/node_modules/diff/libcjs/patch/create.js +0 -251
- package/node_modules/diff/libcjs/patch/line-endings.d.ts +0 -17
- package/node_modules/diff/libcjs/patch/line-endings.d.ts.map +0 -1
- package/node_modules/diff/libcjs/patch/line-endings.js +0 -61
- package/node_modules/diff/libcjs/patch/parse.d.ts +0 -8
- package/node_modules/diff/libcjs/patch/parse.d.ts.map +0 -1
- package/node_modules/diff/libcjs/patch/parse.js +0 -150
- package/node_modules/diff/libcjs/patch/reverse.d.ts +0 -9
- package/node_modules/diff/libcjs/patch/reverse.d.ts.map +0 -1
- package/node_modules/diff/libcjs/patch/reverse.js +0 -37
- package/node_modules/diff/libcjs/types.d.ts +0 -213
- package/node_modules/diff/libcjs/types.d.ts.map +0 -1
- package/node_modules/diff/libcjs/types.js +0 -2
- package/node_modules/diff/libcjs/util/array.d.ts +0 -3
- package/node_modules/diff/libcjs/util/array.d.ts.map +0 -1
- package/node_modules/diff/libcjs/util/array.js +0 -21
- package/node_modules/diff/libcjs/util/distance-iterator.d.ts +0 -2
- package/node_modules/diff/libcjs/util/distance-iterator.d.ts.map +0 -1
- package/node_modules/diff/libcjs/util/distance-iterator.js +0 -40
- package/node_modules/diff/libcjs/util/params.d.ts +0 -4
- package/node_modules/diff/libcjs/util/params.d.ts.map +0 -1
- package/node_modules/diff/libcjs/util/params.js +0 -17
- package/node_modules/diff/libcjs/util/string.d.ts +0 -30
- package/node_modules/diff/libcjs/util/string.d.ts.map +0 -1
- package/node_modules/diff/libcjs/util/string.js +0 -200
- package/node_modules/diff/libesm/convert/dmp.d.ts +0 -8
- package/node_modules/diff/libesm/convert/dmp.d.ts.map +0 -1
- package/node_modules/diff/libesm/convert/dmp.js +0 -21
- package/node_modules/diff/libesm/convert/xml.d.ts +0 -6
- package/node_modules/diff/libesm/convert/xml.d.ts.map +0 -1
- package/node_modules/diff/libesm/convert/xml.js +0 -31
- package/node_modules/diff/libesm/diff/array.d.ts +0 -19
- package/node_modules/diff/libesm/diff/array.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/array.js +0 -16
- package/node_modules/diff/libesm/diff/base.d.ts +0 -20
- package/node_modules/diff/libesm/diff/base.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/base.js +0 -253
- package/node_modules/diff/libesm/diff/character.d.ts +0 -19
- package/node_modules/diff/libesm/diff/character.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/character.js +0 -7
- package/node_modules/diff/libesm/diff/css.d.ts +0 -18
- package/node_modules/diff/libesm/diff/css.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/css.js +0 -10
- package/node_modules/diff/libesm/diff/json.d.ts +0 -24
- package/node_modules/diff/libesm/diff/json.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/json.js +0 -78
- package/node_modules/diff/libesm/diff/line.d.ts +0 -24
- package/node_modules/diff/libesm/diff/line.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/line.js +0 -65
- package/node_modules/diff/libesm/diff/sentence.d.ts +0 -21
- package/node_modules/diff/libesm/diff/sentence.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/sentence.js +0 -43
- package/node_modules/diff/libesm/diff/word.d.ts +0 -35
- package/node_modules/diff/libesm/diff/word.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/word.js +0 -281
- package/node_modules/diff/libesm/index.d.ts +0 -20
- package/node_modules/diff/libesm/index.d.ts.map +0 -1
- package/node_modules/diff/libesm/index.js +0 -30
- package/node_modules/diff/libesm/package.json +0 -1
- package/node_modules/diff/libesm/patch/apply.d.ts +0 -62
- package/node_modules/diff/libesm/patch/apply.d.ts.map +0 -1
- package/node_modules/diff/libesm/patch/apply.js +0 -257
- package/node_modules/diff/libesm/patch/create.d.ts +0 -122
- package/node_modules/diff/libesm/patch/create.d.ts.map +0 -1
- package/node_modules/diff/libesm/patch/create.js +0 -228
- package/node_modules/diff/libesm/patch/line-endings.d.ts +0 -17
- package/node_modules/diff/libesm/patch/line-endings.d.ts.map +0 -1
- package/node_modules/diff/libesm/patch/line-endings.js +0 -44
- package/node_modules/diff/libesm/patch/parse.d.ts +0 -8
- package/node_modules/diff/libesm/patch/parse.d.ts.map +0 -1
- package/node_modules/diff/libesm/patch/parse.js +0 -147
- package/node_modules/diff/libesm/patch/reverse.d.ts +0 -9
- package/node_modules/diff/libesm/patch/reverse.d.ts.map +0 -1
- package/node_modules/diff/libesm/patch/reverse.js +0 -23
- package/node_modules/diff/libesm/types.d.ts +0 -213
- package/node_modules/diff/libesm/types.d.ts.map +0 -1
- package/node_modules/diff/libesm/types.js +0 -1
- package/node_modules/diff/libesm/util/array.d.ts +0 -3
- package/node_modules/diff/libesm/util/array.d.ts.map +0 -1
- package/node_modules/diff/libesm/util/array.js +0 -17
- package/node_modules/diff/libesm/util/distance-iterator.d.ts +0 -2
- package/node_modules/diff/libesm/util/distance-iterator.d.ts.map +0 -1
- package/node_modules/diff/libesm/util/distance-iterator.js +0 -37
- package/node_modules/diff/libesm/util/params.d.ts +0 -4
- package/node_modules/diff/libesm/util/params.d.ts.map +0 -1
- package/node_modules/diff/libesm/util/params.js +0 -14
- package/node_modules/diff/libesm/util/string.d.ts +0 -30
- package/node_modules/diff/libesm/util/string.d.ts.map +0 -1
- package/node_modules/diff/libesm/util/string.js +0 -184
- package/node_modules/diff/package.json +0 -130
- package/node_modules/diff/release-notes.md +0 -432
- package/node_modules/node-gyp/commitlint.config.mjs +0 -3
- package/node_modules/node-gyp/gyp/commitlint.config.js +0 -6
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake_test.py +0 -105
- package/node_modules/node-gyp/zizmor.yml +0 -5
- package/node_modules/proxy-agent-negotiate/dist/index.d.ts +0 -14
- package/node_modules/proxy-agent-negotiate/dist/index.d.ts.map +0 -1
- package/node_modules/proxy-agent-negotiate/dist/index.js +0 -35
- package/node_modules/proxy-agent-negotiate/dist/index.js.map +0 -1
- package/node_modules/proxy-agent-negotiate/package.json +0 -47
- package/node_modules/undici/docs/docs/api/CacheStore.md +0 -360
- package/node_modules/undici/docs/docs/api/ClientStats.md +0 -93
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +0 -121
- package/node_modules/undici/docs/docs/api/H2CClient.md +0 -385
- package/node_modules/undici/docs/docs/api/Interceptors.md +0 -419
- package/node_modules/undici/docs/docs/api/MockCallHistory.md +0 -371
- package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +0 -206
- package/node_modules/undici/docs/docs/api/RoundRobinPool.md +0 -239
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +0 -361
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +0 -256
- package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +0 -233
- package/node_modules/undici/docs/docs/getting-started.md +0 -281
- package/node_modules/undici/docs/docs/site.json +0 -125
- package/node_modules/undici/docs/docs/type-map.json +0 -79
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +0 -110
- package/node_modules/undici/types/dispatcher1-wrapper.d.ts +0 -7
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/core/socks5-client.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/core/socks5-utils.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/encoding/index.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/llhttp/constants.d.ts +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/llhttp/utils.d.ts +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/mock/snapshot-utils.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/util/date.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/util/stats.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/subresource-integrity/Readme.md +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/subresource-integrity/subresource-integrity.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/cache-interceptor.d.ts +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/client-stats.d.ts +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/mock-call-history.d.ts +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/utility.d.ts +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import {randomUUID} from 'node:crypto';
|
|
3
|
+
import {createSessionHistory} from '@mytools/fst-logs/sessions';
|
|
4
|
+
import {readableValue,readableError,runCategory,runCategoryNames} from './run-presentation.js';
|
|
5
|
+
|
|
6
|
+
// 完整交互追加落盘,快照只保存可立即恢复的近期窗口,不重复保存运行日志全文。
|
|
7
|
+
export class TerminalHistory{
|
|
8
|
+
constructor(app,ui){
|
|
9
|
+
this.app=app;this.ui=ui;this.id=app.sessionId??randomUUID();this.startedAt=new Date().toISOString();this.pending=Promise.resolve();
|
|
10
|
+
const directory=app.project.readOnly?path.join(app.outputDir,'sessions'):path.join(app.projectDir,'.flow','sessions');
|
|
11
|
+
this.store=createSessionHistory(directory,{projectDir:app.projectDir});
|
|
12
|
+
}
|
|
13
|
+
snapshot(){
|
|
14
|
+
const commands=[];let bytes=0;
|
|
15
|
+
for(const command of [...this.ui.commandHistory].reverse()){
|
|
16
|
+
const size=Buffer.byteLength(JSON.stringify(command));if(bytes+size>256*1024)continue;
|
|
17
|
+
commands.unshift(command);bytes+=size;if(commands.length===100)break;
|
|
18
|
+
}
|
|
19
|
+
return {schemaVersion:1,id:this.id,startedAt:this.startedAt,updatedAt:new Date().toISOString(),...(this.resumedFrom?{resumedFrom:this.resumedFrom}:{}),commandHistory:commands,feed:this.ui.feed.exportState()};
|
|
20
|
+
}
|
|
21
|
+
report(error){
|
|
22
|
+
if(this.reported)return;this.reported=true;this.reporting=true;
|
|
23
|
+
try{this.ui.show(`历史会话保存失败:${error.message}。当前操作可继续,退出前的会话可能无法完整恢复。`);}
|
|
24
|
+
finally{this.reporting=false;}
|
|
25
|
+
}
|
|
26
|
+
async start(){
|
|
27
|
+
await this.store.save(this.snapshot());
|
|
28
|
+
this.ui.feed.onEntry=entry=>this.append(entry);
|
|
29
|
+
this.ui.onHistoryChange=()=>this.schedule();
|
|
30
|
+
}
|
|
31
|
+
append(entry){
|
|
32
|
+
if(this.reporting||this.closed)return;
|
|
33
|
+
const entries=[];
|
|
34
|
+
if(entry.type==='message'){
|
|
35
|
+
// 按字符切分完整命令及反馈,避免单条 JSON 或待写内存无限增长。
|
|
36
|
+
for(let offset=0;offset<entry.text.length;){
|
|
37
|
+
let end=Math.min(offset+8192,entry.text.length);
|
|
38
|
+
if(end<entry.text.length&&entry.text.charCodeAt(end-1)>=0xd800&&entry.text.charCodeAt(end-1)<=0xdbff&&entry.text.charCodeAt(end)>=0xdc00&&entry.text.charCodeAt(end)<=0xdfff)end--;
|
|
39
|
+
entries.push({...entry,text:entry.text.slice(offset,end),continuation:offset>0});offset=end;
|
|
40
|
+
}
|
|
41
|
+
}else entries.push(entry);
|
|
42
|
+
for(const value of entries){
|
|
43
|
+
const saved={...value,time:new Date().toISOString()};
|
|
44
|
+
// 直接进入 logs 的有界队列,不能在界面层用无限 Promise 链藏住待写数据。
|
|
45
|
+
const job=this.store.append(this.id,saved).catch(error=>this.report(error));this.pending=Promise.all([this.pending,job]).then(()=>{});
|
|
46
|
+
}
|
|
47
|
+
this.schedule();
|
|
48
|
+
}
|
|
49
|
+
schedule(){
|
|
50
|
+
if(this.closed||this.reporting||this.timer)return;
|
|
51
|
+
this.timer=setTimeout(()=>{this.timer=null;void this.flush();},250);this.timer.unref?.();
|
|
52
|
+
}
|
|
53
|
+
async flush(){
|
|
54
|
+
if(this.timer){clearTimeout(this.timer);this.timer=null;}
|
|
55
|
+
// 快照在调用时复制,保存排在已收到的交互之后;关闭时可等待同一条队列。
|
|
56
|
+
const snapshot=this.snapshot(),job=this.store.save(snapshot).catch(error=>this.report(error));this.pending=Promise.all([this.pending,job]).then(()=>{});await this.pending;
|
|
57
|
+
}
|
|
58
|
+
async restore(record){
|
|
59
|
+
if(this.app.listRuns().some(run=>run.status==='running'))throw new Error('当前有运行中的任务,完成后再恢复历史会话。');
|
|
60
|
+
await this.flush();this.resumedFrom=record.id;
|
|
61
|
+
this.ui.commandHistory=[...record.commandHistory];this.ui.commandHistoryIndex=null;
|
|
62
|
+
this.ui.feed.restoreState(record.feed,{catalog:this.app.catalog?.()??[]});
|
|
63
|
+
this.append({type:'restored',sessionId:record.id});await this.flush();
|
|
64
|
+
}
|
|
65
|
+
async close(){await this.flush();this.closed=true;this.ui.feed.onEntry=null;this.ui.onHistoryChange=null;}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function sessionPageText(entries){
|
|
69
|
+
const joined=[];
|
|
70
|
+
for(const entry of entries){
|
|
71
|
+
const previous=joined.at(-1);
|
|
72
|
+
if(entry.type==='message'&&entry.continuation&&previous?.type==='message')previous.text+=entry.text;
|
|
73
|
+
else joined.push({...entry});
|
|
74
|
+
}
|
|
75
|
+
return joined.map(entry=>{
|
|
76
|
+
if(entry.type==='message')return entry.text;
|
|
77
|
+
if(entry.type==='restored')return `恢复并继续会话:${entry.sessionId}`;
|
|
78
|
+
const run=entry.run;if(!run)return '';
|
|
79
|
+
const header=`${entry.type==='start'?'开始':'结果'} · ${runCategoryNames[runCategory(run)]} · ${run.title??run.workflowId} · ${run.id}`;
|
|
80
|
+
return [header,run.input!==undefined?'输入\n'+readableValue(run.input):'',run.output!==undefined?'输出\n'+readableValue(run.output):'',run.error&&readableError(run.error),`/logs 可查看该次运行的完整日志和步骤详情`].filter(Boolean).join('\n');
|
|
81
|
+
}).filter(Boolean).join('\n\n');
|
|
82
|
+
}
|
|
@@ -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{
|
|
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
|
|
82
|
-
'## 主面板','运行期间可以继续输入命令,打开配置、管理插件或执行其他工作流。↑/↓
|
|
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
|
|
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.
|
|
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':
|
|
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&¤t.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
|
-
|
|
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
|
|
183
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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('
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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(
|
|
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?'恢复插件服务':'
|
|
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(
|
|
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(
|
|
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
|
|
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();
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
214
|
-
Object.assign(
|
|
215
|
-
if(initialView!==undefined){
|
|
216
|
-
|
|
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());});}
|