@ai-agent-forge/agent-forge 0.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5969 -0
- package/README.md +629 -0
- package/dist/artifacts/artifact-store.d.ts +51 -0
- package/dist/artifacts/artifact-store.d.ts.map +1 -0
- package/dist/artifacts/artifact-store.js +87 -0
- package/dist/artifacts/artifact-store.js.map +1 -0
- package/dist/artifacts/paged-read.d.ts +51 -0
- package/dist/artifacts/paged-read.d.ts.map +1 -0
- package/dist/artifacts/paged-read.js +55 -0
- package/dist/artifacts/paged-read.js.map +1 -0
- package/dist/bun/cli.d.ts +3 -0
- package/dist/bun/cli.d.ts.map +1 -0
- package/dist/bun/cli.js +11 -0
- package/dist/bun/cli.js.map +1 -0
- package/dist/bun/register-bedrock.d.ts +2 -0
- package/dist/bun/register-bedrock.d.ts.map +1 -0
- package/dist/bun/register-bedrock.js +4 -0
- package/dist/bun/register-bedrock.js.map +1 -0
- package/dist/bun/restore-sandbox-env.d.ts +17 -0
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -0
- package/dist/bun/restore-sandbox-env.js +36 -0
- package/dist/bun/restore-sandbox-env.js.map +1 -0
- package/dist/bundle/.build-manifest.json +3566 -0
- package/dist/bundle/chunks/anthropic-messages-RJYU4TCY.js +6 -0
- package/dist/bundle/chunks/anthropic.js +75 -0
- package/dist/bundle/chunks/azure-openai-responses-LESTCUL7.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +78 -0
- package/dist/bundle/chunks/chunk-3QKHSPQL.js +8 -0
- package/dist/bundle/chunks/chunk-4L3WN2XY.js +2 -0
- package/dist/bundle/chunks/chunk-4NKZMFSZ.js +1579 -0
- package/dist/bundle/chunks/chunk-6CYCI3EJ.js +12 -0
- package/dist/bundle/chunks/chunk-6R7UI4IY.js +2 -0
- package/dist/bundle/chunks/chunk-7ZC4UXSL.js +2 -0
- package/dist/bundle/chunks/chunk-7ZY7IXZD.js +4 -0
- package/dist/bundle/chunks/chunk-DRQDKNXA.js +2 -0
- package/dist/bundle/chunks/chunk-DTD7JQ7Y.js +42 -0
- package/dist/bundle/chunks/chunk-EWXX34QG.js +2 -0
- package/dist/bundle/chunks/chunk-GMWCTUPB.js +2 -0
- package/dist/bundle/chunks/chunk-JUUC5AZY.js +2 -0
- package/dist/bundle/chunks/chunk-KQEGUM34.js +2 -0
- package/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
- package/dist/bundle/chunks/chunk-MDOTREMR.js +11 -0
- package/dist/bundle/chunks/chunk-NUHFSC37.js +25 -0
- package/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
- package/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
- package/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
- package/dist/bundle/chunks/chunk-SER2HCLE.js +38 -0
- package/dist/bundle/chunks/chunk-TEPMHNKQ.js +2 -0
- package/dist/bundle/chunks/chunk-V46XUTK3.js +2 -0
- package/dist/bundle/chunks/chunk-WGLBM2BP.js +2 -0
- package/dist/bundle/chunks/chunk-WW3LMV3F.js +2 -0
- package/dist/bundle/chunks/chunk-XDUWOHPL.js +6 -0
- package/dist/bundle/chunks/github-copilot.js +2 -0
- package/dist/bundle/chunks/google-generative-ai-NZ66X6K7.js +2 -0
- package/dist/bundle/chunks/google-vertex-2ZZOFBNQ.js +2 -0
- package/dist/bundle/chunks/https-proxy-agent-UDEHOBGS.js +13 -0
- package/dist/bundle/chunks/image-resize-worker.js +2 -0
- package/dist/bundle/chunks/kimi-coding.js +2 -0
- package/dist/bundle/chunks/lib-HGQMNYVT.js +9 -0
- package/dist/bundle/chunks/mistral-conversations-B6DZRMEK.js +5 -0
- package/dist/bundle/chunks/multipart-parser-SQ6GDJL7.js +3 -0
- package/dist/bundle/chunks/node-O3RIBJRH.js +16 -0
- package/dist/bundle/chunks/node-TWVVAGPO.js +2 -0
- package/dist/bundle/chunks/openai-codex-responses-UFH6O5K6.js +10 -0
- package/dist/bundle/chunks/openai-codex.js +75 -0
- package/dist/bundle/chunks/openai-completions-A55GHA4O.js +7 -0
- package/dist/bundle/chunks/openai-responses-TJLXRAXR.js +2 -0
- package/dist/bundle/chunks/openrouter-images-G3GT5BVT.js +2 -0
- package/dist/bundle/chunks/openrouter.js +75 -0
- package/dist/bundle/chunks/pi-messages-SLF355GF.js +8 -0
- package/dist/bundle/chunks/radius.js +75 -0
- package/dist/bundle/chunks/src-UK77SYZE.js +4 -0
- package/dist/bundle/chunks/xai.js +2 -0
- package/dist/bundle/cli.js +3 -0
- package/dist/bundle/client.js +2 -0
- package/dist/bundle/index.js +8 -0
- package/dist/bundle/rpc-entry.js +3 -0
- package/dist/capabilities/builtin.d.ts +46 -0
- package/dist/capabilities/builtin.d.ts.map +1 -0
- package/dist/capabilities/builtin.js +68 -0
- package/dist/capabilities/builtin.js.map +1 -0
- package/dist/cli/args.d.ts +102 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +712 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/auth-check.d.ts +19 -0
- package/dist/cli/auth-check.d.ts.map +1 -0
- package/dist/cli/auth-check.js +50 -0
- package/dist/cli/auth-check.js.map +1 -0
- package/dist/cli/auth-command.d.ts +24 -0
- package/dist/cli/auth-command.d.ts.map +1 -0
- package/dist/cli/auth-command.js +102 -0
- package/dist/cli/auth-command.js.map +1 -0
- package/dist/cli/config-selector.d.ts +23 -0
- package/dist/cli/config-selector.d.ts.map +1 -0
- package/dist/cli/config-selector.js +51 -0
- package/dist/cli/config-selector.js.map +1 -0
- package/dist/cli/credential-print.d.ts +13 -0
- package/dist/cli/credential-print.d.ts.map +1 -0
- package/dist/cli/credential-print.js +76 -0
- package/dist/cli/credential-print.js.map +1 -0
- package/dist/cli/experimental/auth.d.ts +16 -0
- package/dist/cli/experimental/auth.d.ts.map +1 -0
- package/dist/cli/experimental/auth.js +13 -0
- package/dist/cli/experimental/auth.js.map +1 -0
- package/dist/cli/experimental/cli.d.ts +6 -0
- package/dist/cli/experimental/cli.d.ts.map +1 -0
- package/dist/cli/experimental/cli.js +5 -0
- package/dist/cli/experimental/cli.js.map +1 -0
- package/dist/cli/experimental/command-options.d.ts +17 -0
- package/dist/cli/experimental/command-options.d.ts.map +1 -0
- package/dist/cli/experimental/command-options.js +35 -0
- package/dist/cli/experimental/command-options.js.map +1 -0
- package/dist/cli/experimental/command.d.ts +63 -0
- package/dist/cli/experimental/command.d.ts.map +1 -0
- package/dist/cli/experimental/command.js +130 -0
- package/dist/cli/experimental/command.js.map +1 -0
- package/dist/cli/experimental/commands/client.d.ts +13 -0
- package/dist/cli/experimental/commands/client.d.ts.map +1 -0
- package/dist/cli/experimental/commands/client.js +25 -0
- package/dist/cli/experimental/commands/client.js.map +1 -0
- package/dist/cli/experimental/commands/pi.d.ts +15 -0
- package/dist/cli/experimental/commands/pi.d.ts.map +1 -0
- package/dist/cli/experimental/commands/pi.js +26 -0
- package/dist/cli/experimental/commands/pi.js.map +1 -0
- package/dist/cli/experimental/commands/server.d.ts +13 -0
- package/dist/cli/experimental/commands/server.d.ts.map +1 -0
- package/dist/cli/experimental/commands/server.js +25 -0
- package/dist/cli/experimental/commands/server.js.map +1 -0
- package/dist/cli/experimental/transport-address.d.ts +10 -0
- package/dist/cli/experimental/transport-address.d.ts.map +1 -0
- package/dist/cli/experimental/transport-address.js +38 -0
- package/dist/cli/experimental/transport-address.js.map +1 -0
- package/dist/cli/file-processor.d.ts +15 -0
- package/dist/cli/file-processor.d.ts.map +1 -0
- package/dist/cli/file-processor.js +71 -0
- package/dist/cli/file-processor.js.map +1 -0
- package/dist/cli/initial-message.d.ts +18 -0
- package/dist/cli/initial-message.d.ts.map +1 -0
- package/dist/cli/initial-message.js +22 -0
- package/dist/cli/initial-message.js.map +1 -0
- package/dist/cli/list-models.d.ts +9 -0
- package/dist/cli/list-models.d.ts.map +1 -0
- package/dist/cli/list-models.js +98 -0
- package/dist/cli/list-models.js.map +1 -0
- package/dist/cli/plugin-command.d.ts +50 -0
- package/dist/cli/plugin-command.d.ts.map +1 -0
- package/dist/cli/plugin-command.js +85 -0
- package/dist/cli/plugin-command.js.map +1 -0
- package/dist/cli/plugin-manager-controller.d.ts +59 -0
- package/dist/cli/plugin-manager-controller.d.ts.map +1 -0
- package/dist/cli/plugin-manager-controller.js +183 -0
- package/dist/cli/plugin-manager-controller.js.map +1 -0
- package/dist/cli/plugin-selection-controller.d.ts +57 -0
- package/dist/cli/plugin-selection-controller.d.ts.map +1 -0
- package/dist/cli/plugin-selection-controller.js +159 -0
- package/dist/cli/plugin-selection-controller.js.map +1 -0
- package/dist/cli/serve.d.ts +39 -0
- package/dist/cli/serve.d.ts.map +1 -0
- package/dist/cli/serve.js +124 -0
- package/dist/cli/serve.js.map +1 -0
- package/dist/cli/session-picker.d.ts +30 -0
- package/dist/cli/session-picker.d.ts.map +1 -0
- package/dist/cli/session-picker.js +62 -0
- package/dist/cli/session-picker.js.map +1 -0
- package/dist/cli/startup-ui.d.ts +20 -0
- package/dist/cli/startup-ui.d.ts.map +1 -0
- package/dist/cli/startup-ui.js +185 -0
- package/dist/cli/startup-ui.js.map +1 -0
- package/dist/cli/trace-view.d.ts +86 -0
- package/dist/cli/trace-view.d.ts.map +1 -0
- package/dist/cli/trace-view.js +263 -0
- package/dist/cli/trace-view.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +19 -0
- package/dist/cli.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/remote-session.d.ts +53 -0
- package/dist/client/remote-session.d.ts.map +1 -0
- package/dist/client/remote-session.js +340 -0
- package/dist/client/remote-session.js.map +1 -0
- package/dist/client/transcript.d.ts +12 -0
- package/dist/client/transcript.d.ts.map +1 -0
- package/dist/client/transcript.js +98 -0
- package/dist/client/transcript.js.map +1 -0
- package/dist/config.d.ts +95 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +459 -0
- package/dist/config.js.map +1 -0
- package/dist/core/agent-capability-contract.d.ts +322 -0
- package/dist/core/agent-capability-contract.d.ts.map +1 -0
- package/dist/core/agent-capability-contract.js +1154 -0
- package/dist/core/agent-capability-contract.js.map +1 -0
- package/dist/core/agent-session-bash.d.ts +51 -0
- package/dist/core/agent-session-bash.d.ts.map +1 -0
- package/dist/core/agent-session-bash.js +138 -0
- package/dist/core/agent-session-bash.js.map +1 -0
- package/dist/core/agent-session-compaction.d.ts +188 -0
- package/dist/core/agent-session-compaction.d.ts.map +1 -0
- package/dist/core/agent-session-compaction.js +1071 -0
- package/dist/core/agent-session-compaction.js.map +1 -0
- package/dist/core/agent-session-context.d.ts +43 -0
- package/dist/core/agent-session-context.d.ts.map +1 -0
- package/dist/core/agent-session-context.js +170 -0
- package/dist/core/agent-session-context.js.map +1 -0
- package/dist/core/agent-session-extensions.d.ts +30 -0
- package/dist/core/agent-session-extensions.d.ts.map +1 -0
- package/dist/core/agent-session-extensions.js +74 -0
- package/dist/core/agent-session-extensions.js.map +1 -0
- package/dist/core/agent-session-internal.d.ts +290 -0
- package/dist/core/agent-session-internal.d.ts.map +1 -0
- package/dist/core/agent-session-internal.js +40 -0
- package/dist/core/agent-session-internal.js.map +1 -0
- package/dist/core/agent-session-lifecycle.d.ts +242 -0
- package/dist/core/agent-session-lifecycle.d.ts.map +1 -0
- package/dist/core/agent-session-lifecycle.js +699 -0
- package/dist/core/agent-session-lifecycle.js.map +1 -0
- package/dist/core/agent-session-loop-runner.d.ts +52 -0
- package/dist/core/agent-session-loop-runner.d.ts.map +1 -0
- package/dist/core/agent-session-loop-runner.js +168 -0
- package/dist/core/agent-session-loop-runner.js.map +1 -0
- package/dist/core/agent-session-loop.d.ts +39 -0
- package/dist/core/agent-session-loop.d.ts.map +1 -0
- package/dist/core/agent-session-loop.js +155 -0
- package/dist/core/agent-session-loop.js.map +1 -0
- package/dist/core/agent-session-model.d.ts +49 -0
- package/dist/core/agent-session-model.d.ts.map +1 -0
- package/dist/core/agent-session-model.js +155 -0
- package/dist/core/agent-session-model.js.map +1 -0
- package/dist/core/agent-session-paths.d.ts +3 -0
- package/dist/core/agent-session-paths.d.ts.map +1 -0
- package/dist/core/agent-session-paths.js +14 -0
- package/dist/core/agent-session-paths.js.map +1 -0
- package/dist/core/agent-session-projection.d.ts +53 -0
- package/dist/core/agent-session-projection.d.ts.map +1 -0
- package/dist/core/agent-session-projection.js +195 -0
- package/dist/core/agent-session-projection.js.map +1 -0
- package/dist/core/agent-session-retry.d.ts +28 -0
- package/dist/core/agent-session-retry.d.ts.map +1 -0
- package/dist/core/agent-session-retry.js +141 -0
- package/dist/core/agent-session-retry.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts +181 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -0
- package/dist/core/agent-session-runtime.js +297 -0
- package/dist/core/agent-session-runtime.js.map +1 -0
- package/dist/core/agent-session-services.d.ts +281 -0
- package/dist/core/agent-session-services.d.ts.map +1 -0
- package/dist/core/agent-session-services.js +680 -0
- package/dist/core/agent-session-services.js.map +1 -0
- package/dist/core/agent-session-store.d.ts +47 -0
- package/dist/core/agent-session-store.d.ts.map +1 -0
- package/dist/core/agent-session-store.js +155 -0
- package/dist/core/agent-session-store.js.map +1 -0
- package/dist/core/agent-session-tools.d.ts +36 -0
- package/dist/core/agent-session-tools.d.ts.map +1 -0
- package/dist/core/agent-session-tools.js +305 -0
- package/dist/core/agent-session-tools.js.map +1 -0
- package/dist/core/agent-session.d.ts +1156 -0
- package/dist/core/agent-session.d.ts.map +1 -0
- package/dist/core/agent-session.js +2550 -0
- package/dist/core/agent-session.js.map +1 -0
- package/dist/core/auth-guidance.d.ts +5 -0
- package/dist/core/auth-guidance.d.ts.map +1 -0
- package/dist/core/auth-guidance.js +21 -0
- package/dist/core/auth-guidance.js.map +1 -0
- package/dist/core/auth-storage.d.ts +72 -0
- package/dist/core/auth-storage.d.ts.map +1 -0
- package/dist/core/auth-storage.js +426 -0
- package/dist/core/auth-storage.js.map +1 -0
- package/dist/core/bash-executor.d.ts +32 -0
- package/dist/core/bash-executor.d.ts.map +1 -0
- package/dist/core/bash-executor.js +111 -0
- package/dist/core/bash-executor.js.map +1 -0
- package/dist/core/cache-stats.d.ts +49 -0
- package/dist/core/cache-stats.d.ts.map +1 -0
- package/dist/core/cache-stats.js +101 -0
- package/dist/core/cache-stats.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +88 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/dist/core/compaction/branch-summarization.js +220 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts +178 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -0
- package/dist/core/compaction/compaction.js +608 -0
- package/dist/core/compaction/compaction.js.map +1 -0
- package/dist/core/compaction/index.d.ts +7 -0
- package/dist/core/compaction/index.d.ts.map +1 -0
- package/dist/core/compaction/index.js +7 -0
- package/dist/core/compaction/index.js.map +1 -0
- package/dist/core/compaction/utils.d.ts +49 -0
- package/dist/core/compaction/utils.d.ts.map +1 -0
- package/dist/core/compaction/utils.js +170 -0
- package/dist/core/compaction/utils.js.map +1 -0
- package/dist/core/defaults.d.ts +4 -0
- package/dist/core/defaults.d.ts.map +1 -0
- package/dist/core/defaults.js +11 -0
- package/dist/core/defaults.js.map +1 -0
- package/dist/core/diagnostics.d.ts +15 -0
- package/dist/core/diagnostics.d.ts.map +1 -0
- package/dist/core/diagnostics.js +2 -0
- package/dist/core/diagnostics.js.map +1 -0
- package/dist/core/embedded-sdk.d.ts +96 -0
- package/dist/core/embedded-sdk.d.ts.map +1 -0
- package/dist/core/embedded-sdk.js +395 -0
- package/dist/core/embedded-sdk.js.map +1 -0
- package/dist/core/event-bus.d.ts +9 -0
- package/dist/core/event-bus.d.ts.map +1 -0
- package/dist/core/event-bus.js +25 -0
- package/dist/core/event-bus.js.map +1 -0
- package/dist/core/exec.d.ts +29 -0
- package/dist/core/exec.d.ts.map +1 -0
- package/dist/core/exec.js +75 -0
- package/dist/core/exec.js.map +1 -0
- package/dist/core/experimental.d.ts +2 -0
- package/dist/core/experimental.d.ts.map +1 -0
- package/dist/core/experimental.js +6 -0
- package/dist/core/experimental.js.map +1 -0
- package/dist/core/export-html/ansi-to-html.d.ts +22 -0
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/dist/core/export-html/ansi-to-html.js +249 -0
- package/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/dist/core/export-html/index.d.ts +37 -0
- package/dist/core/export-html/index.d.ts.map +1 -0
- package/dist/core/export-html/index.js +226 -0
- package/dist/core/export-html/index.js.map +1 -0
- package/dist/core/export-html/template.css +1066 -0
- package/dist/core/export-html/template.html +55 -0
- package/dist/core/export-html/template.js +1864 -0
- package/dist/core/export-html/tool-renderer.d.ts +34 -0
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/dist/core/export-html/tool-renderer.js +108 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -0
- package/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/dist/core/export-html/vendor/marked.min.js +78 -0
- package/dist/core/extensions/agent-composition.d.ts +67 -0
- package/dist/core/extensions/agent-composition.d.ts.map +1 -0
- package/dist/core/extensions/agent-composition.js +785 -0
- package/dist/core/extensions/agent-composition.js.map +1 -0
- package/dist/core/extensions/bootstrap-agent-loop.d.ts +203 -0
- package/dist/core/extensions/bootstrap-agent-loop.d.ts.map +1 -0
- package/dist/core/extensions/bootstrap-agent-loop.js +565 -0
- package/dist/core/extensions/bootstrap-agent-loop.js.map +1 -0
- package/dist/core/extensions/bootstrap-branch-summary-policy.d.ts +7 -0
- package/dist/core/extensions/bootstrap-branch-summary-policy.d.ts.map +1 -0
- package/dist/core/extensions/bootstrap-branch-summary-policy.js +28 -0
- package/dist/core/extensions/bootstrap-branch-summary-policy.js.map +1 -0
- package/dist/core/extensions/bootstrap-compaction-policy.d.ts +7 -0
- package/dist/core/extensions/bootstrap-compaction-policy.d.ts.map +1 -0
- package/dist/core/extensions/bootstrap-compaction-policy.js +81 -0
- package/dist/core/extensions/bootstrap-compaction-policy.js.map +1 -0
- package/dist/core/extensions/bootstrap-lifecycle.d.ts +26 -0
- package/dist/core/extensions/bootstrap-lifecycle.d.ts.map +1 -0
- package/dist/core/extensions/bootstrap-lifecycle.js +181 -0
- package/dist/core/extensions/bootstrap-lifecycle.js.map +1 -0
- package/dist/core/extensions/bootstrap-overflow-policy.d.ts +7 -0
- package/dist/core/extensions/bootstrap-overflow-policy.d.ts.map +1 -0
- package/dist/core/extensions/bootstrap-overflow-policy.js +29 -0
- package/dist/core/extensions/bootstrap-overflow-policy.js.map +1 -0
- package/dist/core/extensions/bootstrap-retry-policy.d.ts +7 -0
- package/dist/core/extensions/bootstrap-retry-policy.d.ts.map +1 -0
- package/dist/core/extensions/bootstrap-retry-policy.js +28 -0
- package/dist/core/extensions/bootstrap-retry-policy.js.map +1 -0
- package/dist/core/extensions/bootstrap-skills.d.ts +16 -0
- package/dist/core/extensions/bootstrap-skills.d.ts.map +1 -0
- package/dist/core/extensions/bootstrap-skills.js +119 -0
- package/dist/core/extensions/bootstrap-skills.js.map +1 -0
- package/dist/core/extensions/bootstrap-tools.d.ts +20 -0
- package/dist/core/extensions/bootstrap-tools.d.ts.map +1 -0
- package/dist/core/extensions/bootstrap-tools.js +35 -0
- package/dist/core/extensions/bootstrap-tools.js.map +1 -0
- package/dist/core/extensions/capability-exports.d.ts +5 -0
- package/dist/core/extensions/capability-exports.d.ts.map +1 -0
- package/dist/core/extensions/capability-exports.js +4 -0
- package/dist/core/extensions/capability-exports.js.map +1 -0
- package/dist/core/extensions/capability-plugin.d.ts +69 -0
- package/dist/core/extensions/capability-plugin.d.ts.map +1 -0
- package/dist/core/extensions/capability-plugin.js +485 -0
- package/dist/core/extensions/capability-plugin.js.map +1 -0
- package/dist/core/extensions/capability-runtime-events.d.ts +22 -0
- package/dist/core/extensions/capability-runtime-events.d.ts.map +1 -0
- package/dist/core/extensions/capability-runtime-events.js +381 -0
- package/dist/core/extensions/capability-runtime-events.js.map +1 -0
- package/dist/core/extensions/capability-runtime-guards.d.ts +93 -0
- package/dist/core/extensions/capability-runtime-guards.d.ts.map +1 -0
- package/dist/core/extensions/capability-runtime-guards.js +800 -0
- package/dist/core/extensions/capability-runtime-guards.js.map +1 -0
- package/dist/core/extensions/capability-runtime-inspect.d.ts +12 -0
- package/dist/core/extensions/capability-runtime-inspect.d.ts.map +1 -0
- package/dist/core/extensions/capability-runtime-inspect.js +106 -0
- package/dist/core/extensions/capability-runtime-inspect.js.map +1 -0
- package/dist/core/extensions/capability-runtime-manifest.d.ts +19 -0
- package/dist/core/extensions/capability-runtime-manifest.d.ts.map +1 -0
- package/dist/core/extensions/capability-runtime-manifest.js +218 -0
- package/dist/core/extensions/capability-runtime-manifest.js.map +1 -0
- package/dist/core/extensions/capability-runtime-operation.d.ts +26 -0
- package/dist/core/extensions/capability-runtime-operation.d.ts.map +1 -0
- package/dist/core/extensions/capability-runtime-operation.js +88 -0
- package/dist/core/extensions/capability-runtime-operation.js.map +1 -0
- package/dist/core/extensions/capability-runtime-snapshot.d.ts +11 -0
- package/dist/core/extensions/capability-runtime-snapshot.d.ts.map +1 -0
- package/dist/core/extensions/capability-runtime-snapshot.js +81 -0
- package/dist/core/extensions/capability-runtime-snapshot.js.map +1 -0
- package/dist/core/extensions/capability-runtime-store.d.ts +34 -0
- package/dist/core/extensions/capability-runtime-store.d.ts.map +1 -0
- package/dist/core/extensions/capability-runtime-store.js +153 -0
- package/dist/core/extensions/capability-runtime-store.js.map +1 -0
- package/dist/core/extensions/capability-runtime-tool.d.ts +10 -0
- package/dist/core/extensions/capability-runtime-tool.d.ts.map +1 -0
- package/dist/core/extensions/capability-runtime-tool.js +10 -0
- package/dist/core/extensions/capability-runtime-tool.js.map +1 -0
- package/dist/core/extensions/capability-runtime-types.d.ts +303 -0
- package/dist/core/extensions/capability-runtime-types.d.ts.map +1 -0
- package/dist/core/extensions/capability-runtime-types.js +2 -0
- package/dist/core/extensions/capability-runtime-types.js.map +1 -0
- package/dist/core/extensions/capability-runtime-validation.d.ts +35 -0
- package/dist/core/extensions/capability-runtime-validation.d.ts.map +1 -0
- package/dist/core/extensions/capability-runtime-validation.js +380 -0
- package/dist/core/extensions/capability-runtime-validation.js.map +1 -0
- package/dist/core/extensions/capability-runtime.d.ts +7 -0
- package/dist/core/extensions/capability-runtime.d.ts.map +1 -0
- package/dist/core/extensions/capability-runtime.js +2170 -0
- package/dist/core/extensions/capability-runtime.js.map +1 -0
- package/dist/core/extensions/compaction-memory-failure-mode.d.ts +43 -0
- package/dist/core/extensions/compaction-memory-failure-mode.d.ts.map +1 -0
- package/dist/core/extensions/compaction-memory-failure-mode.js +31 -0
- package/dist/core/extensions/compaction-memory-failure-mode.js.map +1 -0
- package/dist/core/extensions/context-strategy-binding.d.ts +12 -0
- package/dist/core/extensions/context-strategy-binding.d.ts.map +1 -0
- package/dist/core/extensions/context-strategy-binding.js +54 -0
- package/dist/core/extensions/context-strategy-binding.js.map +1 -0
- package/dist/core/extensions/index.d.ts +19 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/index.js +18 -0
- package/dist/core/extensions/index.js.map +1 -0
- package/dist/core/extensions/lifecycle-catalog.d.ts +584 -0
- package/dist/core/extensions/lifecycle-catalog.d.ts.map +1 -0
- package/dist/core/extensions/lifecycle-catalog.js +1903 -0
- package/dist/core/extensions/lifecycle-catalog.js.map +1 -0
- package/dist/core/extensions/lifecycle-delivery-queue.d.ts +48 -0
- package/dist/core/extensions/lifecycle-delivery-queue.d.ts.map +1 -0
- package/dist/core/extensions/lifecycle-delivery-queue.js +164 -0
- package/dist/core/extensions/lifecycle-delivery-queue.js.map +1 -0
- package/dist/core/extensions/microcompact.d.ts +71 -0
- package/dist/core/extensions/microcompact.d.ts.map +1 -0
- package/dist/core/extensions/microcompact.js +123 -0
- package/dist/core/extensions/microcompact.js.map +1 -0
- package/dist/core/extensions/public-api.d.ts +10 -0
- package/dist/core/extensions/public-api.d.ts.map +1 -0
- package/dist/core/extensions/public-api.js +9 -0
- package/dist/core/extensions/public-api.js.map +1 -0
- package/dist/core/facade/coding-agent-facade.d.ts +338 -0
- package/dist/core/facade/coding-agent-facade.d.ts.map +1 -0
- package/dist/core/facade/coding-agent-facade.js +115 -0
- package/dist/core/facade/coding-agent-facade.js.map +1 -0
- package/dist/core/facade/coding-agent-runtime-facade.d.ts +115 -0
- package/dist/core/facade/coding-agent-runtime-facade.d.ts.map +1 -0
- package/dist/core/facade/coding-agent-runtime-facade.js +63 -0
- package/dist/core/facade/coding-agent-runtime-facade.js.map +1 -0
- package/dist/core/facade/index.d.ts +6 -0
- package/dist/core/facade/index.d.ts.map +1 -0
- package/dist/core/facade/index.js +3 -0
- package/dist/core/facade/index.js.map +1 -0
- package/dist/core/footer-data-provider.d.ts +57 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -0
- package/dist/core/footer-data-provider.js +323 -0
- package/dist/core/footer-data-provider.js.map +1 -0
- package/dist/core/http-dispatcher.d.ts +22 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -0
- package/dist/core/http-dispatcher.js +98 -0
- package/dist/core/http-dispatcher.js.map +1 -0
- package/dist/core/index.d.ts +19 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +13 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/input-source.d.ts +9 -0
- package/dist/core/input-source.d.ts.map +1 -0
- package/dist/core/input-source.js +2 -0
- package/dist/core/input-source.js.map +1 -0
- package/dist/core/keybindings.d.ts +442 -0
- package/dist/core/keybindings.d.ts.map +1 -0
- package/dist/core/keybindings.js +329 -0
- package/dist/core/keybindings.js.map +1 -0
- package/dist/core/logger.d.ts +107 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +246 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/messages.d.ts +85 -0
- package/dist/core/messages.d.ts.map +1 -0
- package/dist/core/messages.js +146 -0
- package/dist/core/messages.js.map +1 -0
- package/dist/core/model-config.d.ts +586 -0
- package/dist/core/model-config.d.ts.map +1 -0
- package/dist/core/model-config.js +258 -0
- package/dist/core/model-config.js.map +1 -0
- package/dist/core/model-registry.d.ts +49 -0
- package/dist/core/model-registry.d.ts.map +1 -0
- package/dist/core/model-registry.js +115 -0
- package/dist/core/model-registry.js.map +1 -0
- package/dist/core/model-resolver.d.ts +124 -0
- package/dist/core/model-resolver.d.ts.map +1 -0
- package/dist/core/model-resolver.js +590 -0
- package/dist/core/model-resolver.js.map +1 -0
- package/dist/core/model-runtime.d.ts +100 -0
- package/dist/core/model-runtime.d.ts.map +1 -0
- package/dist/core/model-runtime.js +598 -0
- package/dist/core/model-runtime.js.map +1 -0
- package/dist/core/models-store.d.ts +22 -0
- package/dist/core/models-store.d.ts.map +1 -0
- package/dist/core/models-store.js +115 -0
- package/dist/core/models-store.js.map +1 -0
- package/dist/core/output-guard.d.ts +7 -0
- package/dist/core/output-guard.d.ts.map +1 -0
- package/dist/core/output-guard.js +90 -0
- package/dist/core/output-guard.js.map +1 -0
- package/dist/core/package-install-host.d.ts +23 -0
- package/dist/core/package-install-host.d.ts.map +1 -0
- package/dist/core/package-install-host.js +202 -0
- package/dist/core/package-install-host.js.map +1 -0
- package/dist/core/package-manager.d.ts +93 -0
- package/dist/core/package-manager.d.ts.map +1 -0
- package/dist/core/package-manager.js +947 -0
- package/dist/core/package-manager.js.map +1 -0
- package/dist/core/package-process-runner.d.ts +4 -0
- package/dist/core/package-process-runner.d.ts.map +1 -0
- package/dist/core/package-process-runner.js +47 -0
- package/dist/core/package-process-runner.js.map +1 -0
- package/dist/core/package-resource-collection.d.ts +16 -0
- package/dist/core/package-resource-collection.d.ts.map +1 -0
- package/dist/core/package-resource-collection.js +300 -0
- package/dist/core/package-resource-collection.js.map +1 -0
- package/dist/core/package-resource-discovery.d.ts +33 -0
- package/dist/core/package-resource-discovery.d.ts.map +1 -0
- package/dist/core/package-resource-discovery.js +449 -0
- package/dist/core/package-resource-discovery.js.map +1 -0
- package/dist/core/package-source.d.ts +157 -0
- package/dist/core/package-source.d.ts.map +1 -0
- package/dist/core/package-source.js +179 -0
- package/dist/core/package-source.js.map +1 -0
- package/dist/core/pi-manifest.d.ts +7 -0
- package/dist/core/pi-manifest.d.ts.map +1 -0
- package/dist/core/pi-manifest.js +26 -0
- package/dist/core/pi-manifest.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +54 -0
- package/dist/core/prompt-templates.d.ts.map +1 -0
- package/dist/core/prompt-templates.js +236 -0
- package/dist/core/prompt-templates.js.map +1 -0
- package/dist/core/provider-composer.d.ts +58 -0
- package/dist/core/provider-composer.d.ts.map +1 -0
- package/dist/core/provider-composer.js +403 -0
- package/dist/core/provider-composer.js.map +1 -0
- package/dist/core/radius.d.ts +2 -0
- package/dist/core/radius.d.ts.map +1 -0
- package/dist/core/radius.js +2 -0
- package/dist/core/radius.js.map +1 -0
- package/dist/core/remote-catalog-provider.d.ts +5 -0
- package/dist/core/remote-catalog-provider.d.ts.map +1 -0
- package/dist/core/remote-catalog-provider.js +121 -0
- package/dist/core/remote-catalog-provider.js.map +1 -0
- package/dist/core/resolve-config-value.d.ts +30 -0
- package/dist/core/resolve-config-value.d.ts.map +1 -0
- package/dist/core/resolve-config-value.js +247 -0
- package/dist/core/resolve-config-value.js.map +1 -0
- package/dist/core/resource-loader.d.ts +211 -0
- package/dist/core/resource-loader.d.ts.map +1 -0
- package/dist/core/resource-loader.js +687 -0
- package/dist/core/resource-loader.js.map +1 -0
- package/dist/core/runtime-credentials.d.ts +15 -0
- package/dist/core/runtime-credentials.d.ts.map +1 -0
- package/dist/core/runtime-credentials.js +39 -0
- package/dist/core/runtime-credentials.js.map +1 -0
- package/dist/core/sdk.d.ts +395 -0
- package/dist/core/sdk.d.ts.map +1 -0
- package/dist/core/sdk.js +1112 -0
- package/dist/core/sdk.js.map +1 -0
- package/dist/core/session-cwd.d.ts +19 -0
- package/dist/core/session-cwd.d.ts.map +1 -0
- package/dist/core/session-cwd.js +38 -0
- package/dist/core/session-cwd.js.map +1 -0
- package/dist/core/session-export.d.ts +7 -0
- package/dist/core/session-export.d.ts.map +1 -0
- package/dist/core/session-export.js +48 -0
- package/dist/core/session-export.js.map +1 -0
- package/dist/core/session-manager.d.ts +463 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/session-manager.js +1583 -0
- package/dist/core/session-manager.js.map +1 -0
- package/dist/core/session-start.d.ts +12 -0
- package/dist/core/session-start.d.ts.map +1 -0
- package/dist/core/session-start.js +2 -0
- package/dist/core/session-start.js.map +1 -0
- package/dist/core/session-storage.d.ts +130 -0
- package/dist/core/session-storage.d.ts.map +1 -0
- package/dist/core/session-storage.js +386 -0
- package/dist/core/session-storage.js.map +1 -0
- package/dist/core/settings-diagnostics.d.ts +9 -0
- package/dist/core/settings-diagnostics.d.ts.map +1 -0
- package/dist/core/settings-diagnostics.js +21 -0
- package/dist/core/settings-diagnostics.js.map +1 -0
- package/dist/core/settings-manager.d.ts +352 -0
- package/dist/core/settings-manager.d.ts.map +1 -0
- package/dist/core/settings-manager.js +987 -0
- package/dist/core/settings-manager.js.map +1 -0
- package/dist/core/skills.d.ts +60 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +382 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/slash-commands.d.ts +15 -0
- package/dist/core/slash-commands.d.ts.map +1 -0
- package/dist/core/slash-commands.js +33 -0
- package/dist/core/slash-commands.js.map +1 -0
- package/dist/core/source-info.d.ts +18 -0
- package/dist/core/source-info.d.ts.map +1 -0
- package/dist/core/source-info.js +19 -0
- package/dist/core/source-info.js.map +1 -0
- package/dist/core/system-prompt.d.ts +8 -0
- package/dist/core/system-prompt.d.ts.map +1 -0
- package/dist/core/system-prompt.js +137 -0
- package/dist/core/system-prompt.js.map +1 -0
- package/dist/core/timings.d.ts +11 -0
- package/dist/core/timings.d.ts.map +1 -0
- package/dist/core/timings.js +46 -0
- package/dist/core/timings.js.map +1 -0
- package/dist/core/tools/bash.d.ts +87 -0
- package/dist/core/tools/bash.d.ts.map +1 -0
- package/dist/core/tools/bash.js +409 -0
- package/dist/core/tools/bash.js.map +1 -0
- package/dist/core/tools/edit-diff.d.ts +110 -0
- package/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/dist/core/tools/edit-diff.js +425 -0
- package/dist/core/tools/edit-diff.js.map +1 -0
- package/dist/core/tools/edit.d.ts +55 -0
- package/dist/core/tools/edit.d.ts.map +1 -0
- package/dist/core/tools/edit.js +305 -0
- package/dist/core/tools/edit.js.map +1 -0
- package/dist/core/tools/file-mutation-queue.d.ts +6 -0
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
- package/dist/core/tools/file-mutation-queue.js +52 -0
- package/dist/core/tools/file-mutation-queue.js.map +1 -0
- package/dist/core/tools/find.d.ts +42 -0
- package/dist/core/tools/find.d.ts.map +1 -0
- package/dist/core/tools/find.js +303 -0
- package/dist/core/tools/find.js.map +1 -0
- package/dist/core/tools/grep.d.ts +41 -0
- package/dist/core/tools/grep.d.ts.map +1 -0
- package/dist/core/tools/grep.js +309 -0
- package/dist/core/tools/grep.js.map +1 -0
- package/dist/core/tools/index.d.ts +44 -0
- package/dist/core/tools/index.d.ts.map +1 -0
- package/dist/core/tools/index.js +129 -0
- package/dist/core/tools/index.js.map +1 -0
- package/dist/core/tools/ls.d.ts +41 -0
- package/dist/core/tools/ls.d.ts.map +1 -0
- package/dist/core/tools/ls.js +173 -0
- package/dist/core/tools/ls.js.map +1 -0
- package/dist/core/tools/output-accumulator.d.ts +52 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -0
- package/dist/core/tools/output-accumulator.js +184 -0
- package/dist/core/tools/output-accumulator.js.map +1 -0
- package/dist/core/tools/path-utils.d.ts +10 -0
- package/dist/core/tools/path-utils.d.ts.map +1 -0
- package/dist/core/tools/path-utils.js +99 -0
- package/dist/core/tools/path-utils.js.map +1 -0
- package/dist/core/tools/powershell.d.ts +16 -0
- package/dist/core/tools/powershell.d.ts.map +1 -0
- package/dist/core/tools/powershell.js +39 -0
- package/dist/core/tools/powershell.js.map +1 -0
- package/dist/core/tools/read.d.ts +39 -0
- package/dist/core/tools/read.d.ts.map +1 -0
- package/dist/core/tools/read.js +282 -0
- package/dist/core/tools/read.js.map +1 -0
- package/dist/core/tools/render-utils.d.ts +24 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -0
- package/dist/core/tools/render-utils.js +65 -0
- package/dist/core/tools/render-utils.js.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts +15 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.js +36 -0
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -0
- package/dist/core/tools/tool-definition.d.ts +123 -0
- package/dist/core/tools/tool-definition.d.ts.map +1 -0
- package/dist/core/tools/tool-definition.js +20 -0
- package/dist/core/tools/tool-definition.js.map +1 -0
- package/dist/core/tools/tool-search.d.ts +30 -0
- package/dist/core/tools/tool-search.d.ts.map +1 -0
- package/dist/core/tools/tool-search.js +99 -0
- package/dist/core/tools/tool-search.js.map +1 -0
- package/dist/core/tools/truncate.d.ts +70 -0
- package/dist/core/tools/truncate.d.ts.map +1 -0
- package/dist/core/tools/truncate.js +215 -0
- package/dist/core/tools/truncate.js.map +1 -0
- package/dist/core/tools/write.d.ts +30 -0
- package/dist/core/tools/write.d.ts.map +1 -0
- package/dist/core/tools/write.js +202 -0
- package/dist/core/tools/write.js.map +1 -0
- package/dist/core/trace-retention.d.ts +19 -0
- package/dist/core/trace-retention.d.ts.map +1 -0
- package/dist/core/trace-retention.js +91 -0
- package/dist/core/trace-retention.js.map +1 -0
- package/dist/core/usage-totals.d.ts +21 -0
- package/dist/core/usage-totals.d.ts.map +1 -0
- package/dist/core/usage-totals.js +53 -0
- package/dist/core/usage-totals.js.map +1 -0
- package/dist/durable/durable-service.d.ts +136 -0
- package/dist/durable/durable-service.d.ts.map +1 -0
- package/dist/durable/durable-service.js +710 -0
- package/dist/durable/durable-service.js.map +1 -0
- package/dist/e2e/stdio-launcher.d.ts +25 -0
- package/dist/e2e/stdio-launcher.d.ts.map +1 -0
- package/dist/e2e/stdio-launcher.js +244 -0
- package/dist/e2e/stdio-launcher.js.map +1 -0
- package/dist/host/agent-retry-scheduler.d.ts +65 -0
- package/dist/host/agent-retry-scheduler.d.ts.map +1 -0
- package/dist/host/agent-retry-scheduler.js +52 -0
- package/dist/host/agent-retry-scheduler.js.map +1 -0
- package/dist/host/auto-compaction.d.ts +56 -0
- package/dist/host/auto-compaction.d.ts.map +1 -0
- package/dist/host/auto-compaction.js +62 -0
- package/dist/host/auto-compaction.js.map +1 -0
- package/dist/host/branch-reload.d.ts +56 -0
- package/dist/host/branch-reload.d.ts.map +1 -0
- package/dist/host/branch-reload.js +39 -0
- package/dist/host/branch-reload.js.map +1 -0
- package/dist/host/channel-adapter.d.ts +25 -0
- package/dist/host/channel-adapter.d.ts.map +1 -0
- package/dist/host/channel-adapter.js +45 -0
- package/dist/host/channel-adapter.js.map +1 -0
- package/dist/host/checkpoint-commit.d.ts +74 -0
- package/dist/host/checkpoint-commit.d.ts.map +1 -0
- package/dist/host/checkpoint-commit.js +76 -0
- package/dist/host/checkpoint-commit.js.map +1 -0
- package/dist/host/manual-compaction.d.ts +43 -0
- package/dist/host/manual-compaction.d.ts.map +1 -0
- package/dist/host/manual-compaction.js +63 -0
- package/dist/host/manual-compaction.js.map +1 -0
- package/dist/host/output-projection.d.ts +61 -0
- package/dist/host/output-projection.d.ts.map +1 -0
- package/dist/host/output-projection.js +74 -0
- package/dist/host/output-projection.js.map +1 -0
- package/dist/host/output-reducer.d.ts +43 -0
- package/dist/host/output-reducer.d.ts.map +1 -0
- package/dist/host/output-reducer.js +77 -0
- package/dist/host/output-reducer.js.map +1 -0
- package/dist/host/output-serializer.d.ts +31 -0
- package/dist/host/output-serializer.d.ts.map +1 -0
- package/dist/host/output-serializer.js +120 -0
- package/dist/host/output-serializer.js.map +1 -0
- package/dist/host/overflow-recovery.d.ts +55 -0
- package/dist/host/overflow-recovery.d.ts.map +1 -0
- package/dist/host/overflow-recovery.js +89 -0
- package/dist/host/overflow-recovery.js.map +1 -0
- package/dist/host/retry-common.d.ts +29 -0
- package/dist/host/retry-common.d.ts.map +1 -0
- package/dist/host/retry-common.js +12 -0
- package/dist/host/retry-common.js.map +1 -0
- package/dist/host/session-event-translation.d.ts +26 -0
- package/dist/host/session-event-translation.d.ts.map +1 -0
- package/dist/host/session-event-translation.js +61 -0
- package/dist/host/session-event-translation.js.map +1 -0
- package/dist/host/summary-retry.d.ts +54 -0
- package/dist/host/summary-retry.d.ts.map +1 -0
- package/dist/host/summary-retry.js +66 -0
- package/dist/host/summary-retry.js.map +1 -0
- package/dist/index.d.ts +105 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +176 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +36 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +1630 -0
- package/dist/main.js.map +1 -0
- package/dist/migration/migration-tool.d.ts +56 -0
- package/dist/migration/migration-tool.d.ts.map +1 -0
- package/dist/migration/migration-tool.js +72 -0
- package/dist/migration/migration-tool.js.map +1 -0
- package/dist/migrations.d.ts +33 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +272 -0
- package/dist/migrations.js.map +1 -0
- package/dist/modes/index.d.ts +10 -0
- package/dist/modes/index.d.ts.map +1 -0
- package/dist/modes/index.js +8 -0
- package/dist/modes/index.js.map +1 -0
- package/dist/modes/interactive/assets/clankolas.png +0 -0
- package/dist/modes/interactive/components/armin.d.ts +34 -0
- package/dist/modes/interactive/components/armin.d.ts.map +1 -0
- package/dist/modes/interactive/components/armin.js +336 -0
- package/dist/modes/interactive/components/armin.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +25 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/assistant-message.js +151 -0
- package/dist/modes/interactive/components/assistant-message.js.map +1 -0
- package/dist/modes/interactive/components/bash-execution.d.ts +34 -0
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/bash-execution.js +176 -0
- package/dist/modes/interactive/components/bash-execution.js.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.js +56 -0
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.js +44 -0
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.js +45 -0
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/config-selector.d.ts +113 -0
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/config-selector.js +857 -0
- package/dist/modes/interactive/components/config-selector.js.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.js +33 -0
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -0
- package/dist/modes/interactive/components/custom-editor.d.ts +19 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-editor.js +71 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -0
- package/dist/modes/interactive/components/custom-entry.d.ts +19 -0
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-entry.js +52 -0
- package/dist/modes/interactive/components/custom-entry.js.map +1 -0
- package/dist/modes/interactive/components/custom-message.d.ts +22 -0
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-message.js +87 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -0
- package/dist/modes/interactive/components/daxnuts.d.ts +23 -0
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -0
- package/dist/modes/interactive/components/daxnuts.js +141 -0
- package/dist/modes/interactive/components/daxnuts.js.map +1 -0
- package/dist/modes/interactive/components/dialog-editor.d.ts +21 -0
- package/dist/modes/interactive/components/dialog-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/dialog-editor.js +98 -0
- package/dist/modes/interactive/components/dialog-editor.js.map +1 -0
- package/dist/modes/interactive/components/dialog-input.d.ts +23 -0
- package/dist/modes/interactive/components/dialog-input.d.ts.map +1 -0
- package/dist/modes/interactive/components/dialog-input.js +61 -0
- package/dist/modes/interactive/components/dialog-input.js.map +1 -0
- package/dist/modes/interactive/components/dialog-selector.d.ts +26 -0
- package/dist/modes/interactive/components/dialog-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/dialog-selector.js +83 -0
- package/dist/modes/interactive/components/dialog-selector.js.map +1 -0
- package/dist/modes/interactive/components/diff.d.ts +12 -0
- package/dist/modes/interactive/components/diff.d.ts.map +1 -0
- package/dist/modes/interactive/components/diff.js +133 -0
- package/dist/modes/interactive/components/diff.js.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.js +21 -0
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.js +103 -0
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts +33 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/dist/modes/interactive/components/footer.js +248 -0
- package/dist/modes/interactive/components/footer.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +34 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/dist/modes/interactive/components/index.js +35 -0
- package/dist/modes/interactive/components/index.js.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts +13 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.js +36 -0
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/dist/modes/interactive/components/login-dialog.d.ts +52 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/dist/modes/interactive/components/login-dialog.js +188 -0
- package/dist/modes/interactive/components/login-dialog.js.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.js +19 -0
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
- package/dist/modes/interactive/components/mermaid.d.ts +11 -0
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -0
- package/dist/modes/interactive/components/mermaid.js +75 -0
- package/dist/modes/interactive/components/mermaid.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +67 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/model-selector.js +381 -0
- package/dist/modes/interactive/components/model-selector.js.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts +33 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.js +165 -0
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -0
- package/dist/modes/interactive/components/plugin-manager-entry.d.ts +62 -0
- package/dist/modes/interactive/components/plugin-manager-entry.d.ts.map +1 -0
- package/dist/modes/interactive/components/plugin-manager-entry.js +294 -0
- package/dist/modes/interactive/components/plugin-manager-entry.js.map +1 -0
- package/dist/modes/interactive/components/plugin-selection-entry.d.ts +82 -0
- package/dist/modes/interactive/components/plugin-selection-entry.d.ts.map +1 -0
- package/dist/modes/interactive/components/plugin-selection-entry.js +228 -0
- package/dist/modes/interactive/components/plugin-selection-entry.js.map +1 -0
- package/dist/modes/interactive/components/render-types.d.ts +26 -0
- package/dist/modes/interactive/components/render-types.d.ts.map +1 -0
- package/dist/modes/interactive/components/render-types.js +7 -0
- package/dist/modes/interactive/components/render-types.js.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +46 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.js +328 -0
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.js +158 -0
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -0
- package/dist/modes/interactive/components/session-selector.d.ts +143 -0
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector.js +1053 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +88 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-selector.js +677 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-submenu.js +165 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.js +39 -0
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.js +47 -0
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/dist/modes/interactive/components/status-indicator.d.ts +34 -0
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -0
- package/dist/modes/interactive/components/status-indicator.js +60 -0
- package/dist/modes/interactive/components/status-indicator.js.map +1 -0
- package/dist/modes/interactive/components/theme-selector.d.ts +11 -0
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/theme-selector.js +50 -0
- package/dist/modes/interactive/components/theme-selector.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +23 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.js +109 -0
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +59 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution.js +335 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -0
- package/dist/modes/interactive/components/tree-list.d.ts +67 -0
- package/dist/modes/interactive/components/tree-list.d.ts.map +1 -0
- package/dist/modes/interactive/components/tree-list.js +710 -0
- package/dist/modes/interactive/components/tree-list.js.map +1 -0
- package/dist/modes/interactive/components/tree-render.d.ts +17 -0
- package/dist/modes/interactive/components/tree-render.d.ts.map +1 -0
- package/dist/modes/interactive/components/tree-render.js +316 -0
- package/dist/modes/interactive/components/tree-render.js.map +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts +25 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/tree-selector.js +235 -0
- package/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/dist/modes/interactive/components/tree-types.d.ts +35 -0
- package/dist/modes/interactive/components/tree-types.d.ts.map +1 -0
- package/dist/modes/interactive/components/tree-types.js +2 -0
- package/dist/modes/interactive/components/tree-types.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.js +114 -0
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message.d.ts +16 -0
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message.js +49 -0
- package/dist/modes/interactive/components/user-message.js.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts +24 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.js +33 -0
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -0
- package/dist/modes/interactive/external-editor.d.ts +12 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -0
- package/dist/modes/interactive/external-editor.js +38 -0
- package/dist/modes/interactive/external-editor.js.map +1 -0
- package/dist/modes/interactive/interactive-auth.d.ts +90 -0
- package/dist/modes/interactive/interactive-auth.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-auth.js +492 -0
- package/dist/modes/interactive/interactive-auth.js.map +1 -0
- package/dist/modes/interactive/interactive-commands.d.ts +68 -0
- package/dist/modes/interactive/interactive-commands.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-commands.js +157 -0
- package/dist/modes/interactive/interactive-commands.js.map +1 -0
- package/dist/modes/interactive/interactive-dialog-ui.d.ts +73 -0
- package/dist/modes/interactive/interactive-dialog-ui.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-dialog-ui.js +189 -0
- package/dist/modes/interactive/interactive-dialog-ui.js.map +1 -0
- package/dist/modes/interactive/interactive-format.d.ts +65 -0
- package/dist/modes/interactive/interactive-format.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-format.js +268 -0
- package/dist/modes/interactive/interactive-format.js.map +1 -0
- package/dist/modes/interactive/interactive-helpers.d.ts +25 -0
- package/dist/modes/interactive/interactive-helpers.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-helpers.js +73 -0
- package/dist/modes/interactive/interactive-helpers.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +640 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-mode.js +4107 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/dist/modes/interactive/interactive-selectors.d.ts +95 -0
- package/dist/modes/interactive/interactive-selectors.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-selectors.js +356 -0
- package/dist/modes/interactive/interactive-selectors.js.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts +11 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.js +35 -0
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
- package/dist/modes/interactive/model-search.d.ts +12 -0
- package/dist/modes/interactive/model-search.d.ts.map +1 -0
- package/dist/modes/interactive/model-search.js +15 -0
- package/dist/modes/interactive/model-search.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +90 -0
- package/dist/modes/interactive/theme/light.json +89 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +40 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-controller.js +126 -0
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.json +352 -0
- package/dist/modes/interactive/theme/theme.d.ts +122 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme.js +1093 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -0
- package/dist/modes/json-event.d.ts +34 -0
- package/dist/modes/json-event.d.ts.map +1 -0
- package/dist/modes/json-event.js +29 -0
- package/dist/modes/json-event.js.map +1 -0
- package/dist/modes/print-mode.d.ts +32 -0
- package/dist/modes/print-mode.d.ts.map +1 -0
- package/dist/modes/print-mode.js +205 -0
- package/dist/modes/print-mode.js.map +1 -0
- package/dist/modes/rpc/jsonl.d.ts +17 -0
- package/dist/modes/rpc/jsonl.d.ts.map +1 -0
- package/dist/modes/rpc/jsonl.js +49 -0
- package/dist/modes/rpc/jsonl.js.map +1 -0
- package/dist/modes/rpc/rpc-client.d.ts +254 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client.js +496 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -0
- package/dist/modes/rpc/rpc-mode.d.ts +53 -0
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-mode.js +540 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/dist/modes/rpc/rpc-types.d.ts +486 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-types.js +8 -0
- package/dist/modes/rpc/rpc-types.js.map +1 -0
- package/dist/package-manager-cli.d.ts +18 -0
- package/dist/package-manager-cli.d.ts.map +1 -0
- package/dist/package-manager-cli.js +944 -0
- package/dist/package-manager-cli.js.map +1 -0
- package/dist/plugins/ecosystem/active-bindings.d.ts +92 -0
- package/dist/plugins/ecosystem/active-bindings.d.ts.map +1 -0
- package/dist/plugins/ecosystem/active-bindings.js +198 -0
- package/dist/plugins/ecosystem/active-bindings.js.map +1 -0
- package/dist/plugins/ecosystem/bootstrap-factory-manifest.d.ts +32 -0
- package/dist/plugins/ecosystem/bootstrap-factory-manifest.d.ts.map +1 -0
- package/dist/plugins/ecosystem/bootstrap-factory-manifest.js +32 -0
- package/dist/plugins/ecosystem/bootstrap-factory-manifest.js.map +1 -0
- package/dist/plugins/ecosystem/catalog.d.ts +38 -0
- package/dist/plugins/ecosystem/catalog.d.ts.map +1 -0
- package/dist/plugins/ecosystem/catalog.js +90 -0
- package/dist/plugins/ecosystem/catalog.js.map +1 -0
- package/dist/plugins/ecosystem/cli.d.ts +102 -0
- package/dist/plugins/ecosystem/cli.d.ts.map +1 -0
- package/dist/plugins/ecosystem/cli.js +970 -0
- package/dist/plugins/ecosystem/cli.js.map +1 -0
- package/dist/plugins/ecosystem/default-active-bindings.d.ts +33 -0
- package/dist/plugins/ecosystem/default-active-bindings.d.ts.map +1 -0
- package/dist/plugins/ecosystem/default-active-bindings.js +105 -0
- package/dist/plugins/ecosystem/default-active-bindings.js.map +1 -0
- package/dist/plugins/ecosystem/default-plugin-market.d.ts +68 -0
- package/dist/plugins/ecosystem/default-plugin-market.d.ts.map +1 -0
- package/dist/plugins/ecosystem/default-plugin-market.js +146 -0
- package/dist/plugins/ecosystem/default-plugin-market.js.map +1 -0
- package/dist/plugins/ecosystem/distribution.d.ts +113 -0
- package/dist/plugins/ecosystem/distribution.d.ts.map +1 -0
- package/dist/plugins/ecosystem/distribution.js +371 -0
- package/dist/plugins/ecosystem/distribution.js.map +1 -0
- package/dist/plugins/ecosystem/index.d.ts +56 -0
- package/dist/plugins/ecosystem/index.d.ts.map +1 -0
- package/dist/plugins/ecosystem/index.js +31 -0
- package/dist/plugins/ecosystem/index.js.map +1 -0
- package/dist/plugins/ecosystem/installer.d.ts +130 -0
- package/dist/plugins/ecosystem/installer.d.ts.map +1 -0
- package/dist/plugins/ecosystem/installer.js +316 -0
- package/dist/plugins/ecosystem/installer.js.map +1 -0
- package/dist/plugins/ecosystem/node-disk-registry-source.d.ts +47 -0
- package/dist/plugins/ecosystem/node-disk-registry-source.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-disk-registry-source.js +208 -0
- package/dist/plugins/ecosystem/node-disk-registry-source.js.map +1 -0
- package/dist/plugins/ecosystem/node-distribution-host.d.ts +55 -0
- package/dist/plugins/ecosystem/node-distribution-host.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-distribution-host.js +423 -0
- package/dist/plugins/ecosystem/node-distribution-host.js.map +1 -0
- package/dist/plugins/ecosystem/node-local-package-source.d.ts +10 -0
- package/dist/plugins/ecosystem/node-local-package-source.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-local-package-source.js +97 -0
- package/dist/plugins/ecosystem/node-local-package-source.js.map +1 -0
- package/dist/plugins/ecosystem/node-npm-registry-source.d.ts +58 -0
- package/dist/plugins/ecosystem/node-npm-registry-source.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-npm-registry-source.js +326 -0
- package/dist/plugins/ecosystem/node-npm-registry-source.js.map +1 -0
- package/dist/plugins/ecosystem/node-package-install-host.d.ts +91 -0
- package/dist/plugins/ecosystem/node-package-install-host.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-package-install-host.js +857 -0
- package/dist/plugins/ecosystem/node-package-install-host.js.map +1 -0
- package/dist/plugins/ecosystem/node-package-install-persistence.d.ts +34 -0
- package/dist/plugins/ecosystem/node-package-install-persistence.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-package-install-persistence.js +221 -0
- package/dist/plugins/ecosystem/node-package-install-persistence.js.map +1 -0
- package/dist/plugins/ecosystem/node-package-install-stack.d.ts +28 -0
- package/dist/plugins/ecosystem/node-package-install-stack.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-package-install-stack.js +65 -0
- package/dist/plugins/ecosystem/node-package-install-stack.js.map +1 -0
- package/dist/plugins/ecosystem/node-package-media.d.ts +14 -0
- package/dist/plugins/ecosystem/node-package-media.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-package-media.js +36 -0
- package/dist/plugins/ecosystem/node-package-media.js.map +1 -0
- package/dist/plugins/ecosystem/node-plugin-acquisition-host.d.ts +83 -0
- package/dist/plugins/ecosystem/node-plugin-acquisition-host.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-plugin-acquisition-host.js +423 -0
- package/dist/plugins/ecosystem/node-plugin-acquisition-host.js.map +1 -0
- package/dist/plugins/ecosystem/node-plugin-bootstrap.d.ts +48 -0
- package/dist/plugins/ecosystem/node-plugin-bootstrap.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-plugin-bootstrap.js +191 -0
- package/dist/plugins/ecosystem/node-plugin-bootstrap.js.map +1 -0
- package/dist/plugins/ecosystem/node-plugin-trust-root.d.ts +26 -0
- package/dist/plugins/ecosystem/node-plugin-trust-root.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-plugin-trust-root.js +120 -0
- package/dist/plugins/ecosystem/node-plugin-trust-root.js.map +1 -0
- package/dist/plugins/ecosystem/node-registry-source.d.ts +35 -0
- package/dist/plugins/ecosystem/node-registry-source.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-registry-source.js +286 -0
- package/dist/plugins/ecosystem/node-registry-source.js.map +1 -0
- package/dist/plugins/ecosystem/node-release-package-source.d.ts +47 -0
- package/dist/plugins/ecosystem/node-release-package-source.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-release-package-source.js +336 -0
- package/dist/plugins/ecosystem/node-release-package-source.js.map +1 -0
- package/dist/plugins/ecosystem/node-tar-package.d.ts +11 -0
- package/dist/plugins/ecosystem/node-tar-package.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-tar-package.js +294 -0
- package/dist/plugins/ecosystem/node-tar-package.js.map +1 -0
- package/dist/plugins/ecosystem/node-tar-writer.d.ts +16 -0
- package/dist/plugins/ecosystem/node-tar-writer.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-tar-writer.js +134 -0
- package/dist/plugins/ecosystem/node-tar-writer.js.map +1 -0
- package/dist/plugins/ecosystem/node-url-package-source.d.ts +31 -0
- package/dist/plugins/ecosystem/node-url-package-source.d.ts.map +1 -0
- package/dist/plugins/ecosystem/node-url-package-source.js +159 -0
- package/dist/plugins/ecosystem/node-url-package-source.js.map +1 -0
- package/dist/plugins/ecosystem/plugin-acquisition.d.ts +88 -0
- package/dist/plugins/ecosystem/plugin-acquisition.d.ts.map +1 -0
- package/dist/plugins/ecosystem/plugin-acquisition.js +197 -0
- package/dist/plugins/ecosystem/plugin-acquisition.js.map +1 -0
- package/dist/plugins/ecosystem/plugin-bootstrap.d.ts +87 -0
- package/dist/plugins/ecosystem/plugin-bootstrap.d.ts.map +1 -0
- package/dist/plugins/ecosystem/plugin-bootstrap.js +134 -0
- package/dist/plugins/ecosystem/plugin-bootstrap.js.map +1 -0
- package/dist/plugins/ecosystem/registry-cli-adapter.d.ts +8 -0
- package/dist/plugins/ecosystem/registry-cli-adapter.d.ts.map +1 -0
- package/dist/plugins/ecosystem/registry-cli-adapter.js +16 -0
- package/dist/plugins/ecosystem/registry-cli-adapter.js.map +1 -0
- package/dist/plugins/ecosystem/registry.d.ts +121 -0
- package/dist/plugins/ecosystem/registry.d.ts.map +1 -0
- package/dist/plugins/ecosystem/registry.js +324 -0
- package/dist/plugins/ecosystem/registry.js.map +1 -0
- package/dist/plugins/ecosystem/resolver.d.ts +32 -0
- package/dist/plugins/ecosystem/resolver.d.ts.map +1 -0
- package/dist/plugins/ecosystem/resolver.js +325 -0
- package/dist/plugins/ecosystem/resolver.js.map +1 -0
- package/dist/plugins/ecosystem/selection-store.d.ts +66 -0
- package/dist/plugins/ecosystem/selection-store.d.ts.map +1 -0
- package/dist/plugins/ecosystem/selection-store.js +241 -0
- package/dist/plugins/ecosystem/selection-store.js.map +1 -0
- package/dist/plugins/ecosystem/selection.d.ts +54 -0
- package/dist/plugins/ecosystem/selection.d.ts.map +1 -0
- package/dist/plugins/ecosystem/selection.js +116 -0
- package/dist/plugins/ecosystem/selection.js.map +1 -0
- package/dist/plugins/ecosystem/state.d.ts +96 -0
- package/dist/plugins/ecosystem/state.d.ts.map +1 -0
- package/dist/plugins/ecosystem/state.js +346 -0
- package/dist/plugins/ecosystem/state.js.map +1 -0
- package/dist/plugins/ecosystem/types.d.ts +90 -0
- package/dist/plugins/ecosystem/types.d.ts.map +1 -0
- package/dist/plugins/ecosystem/types.js +8 -0
- package/dist/plugins/ecosystem/types.js.map +1 -0
- package/dist/plugins/ecosystem/updates.d.ts +30 -0
- package/dist/plugins/ecosystem/updates.d.ts.map +1 -0
- package/dist/plugins/ecosystem/updates.js +148 -0
- package/dist/plugins/ecosystem/updates.js.map +1 -0
- package/dist/plugins/integrity-adapter.d.ts +58 -0
- package/dist/plugins/integrity-adapter.d.ts.map +1 -0
- package/dist/plugins/integrity-adapter.js +70 -0
- package/dist/plugins/integrity-adapter.js.map +1 -0
- package/dist/plugins/mcp-http.d.ts +78 -0
- package/dist/plugins/mcp-http.d.ts.map +1 -0
- package/dist/plugins/mcp-http.js +176 -0
- package/dist/plugins/mcp-http.js.map +1 -0
- package/dist/plugins/observability-types.d.ts +9 -0
- package/dist/plugins/observability-types.d.ts.map +1 -0
- package/dist/plugins/observability-types.js +9 -0
- package/dist/plugins/observability-types.js.map +1 -0
- package/dist/plugins/plugin-host.d.ts +46 -0
- package/dist/plugins/plugin-host.d.ts.map +1 -0
- package/dist/plugins/plugin-host.js +80 -0
- package/dist/plugins/plugin-host.js.map +1 -0
- package/dist/plugins/plugin-supervisor.d.ts +77 -0
- package/dist/plugins/plugin-supervisor.d.ts.map +1 -0
- package/dist/plugins/plugin-supervisor.js +82 -0
- package/dist/plugins/plugin-supervisor.js.map +1 -0
- package/dist/plugins/subagent-task/runner-entry.d.ts +35 -0
- package/dist/plugins/subagent-task/runner-entry.d.ts.map +1 -0
- package/dist/plugins/subagent-task/runner-entry.js +39 -0
- package/dist/plugins/subagent-task/runner-entry.js.map +1 -0
- package/dist/plugins/subagent-task/session-factory.d.ts +57 -0
- package/dist/plugins/subagent-task/session-factory.d.ts.map +1 -0
- package/dist/plugins/subagent-task/session-factory.js +51 -0
- package/dist/plugins/subagent-task/session-factory.js.map +1 -0
- package/dist/profile/child-facade.d.ts +44 -0
- package/dist/profile/child-facade.d.ts.map +1 -0
- package/dist/profile/child-facade.js +56 -0
- package/dist/profile/child-facade.js.map +1 -0
- package/dist/profile/dependency-wiring.d.ts +48 -0
- package/dist/profile/dependency-wiring.d.ts.map +1 -0
- package/dist/profile/dependency-wiring.js +56 -0
- package/dist/profile/dependency-wiring.js.map +1 -0
- package/dist/profile/domain-recovery.d.ts +60 -0
- package/dist/profile/domain-recovery.d.ts.map +1 -0
- package/dist/profile/domain-recovery.js +94 -0
- package/dist/profile/domain-recovery.js.map +1 -0
- package/dist/profile/first-roles.d.ts +30 -0
- package/dist/profile/first-roles.d.ts.map +1 -0
- package/dist/profile/first-roles.js +74 -0
- package/dist/profile/first-roles.js.map +1 -0
- package/dist/profile/goal-plugin.d.ts +38 -0
- package/dist/profile/goal-plugin.d.ts.map +1 -0
- package/dist/profile/goal-plugin.js +113 -0
- package/dist/profile/goal-plugin.js.map +1 -0
- package/dist/profile/identity.d.ts +58 -0
- package/dist/profile/identity.d.ts.map +1 -0
- package/dist/profile/identity.js +100 -0
- package/dist/profile/identity.js.map +1 -0
- package/dist/profile/lock.d.ts +59 -0
- package/dist/profile/lock.d.ts.map +1 -0
- package/dist/profile/lock.js +59 -0
- package/dist/profile/lock.js.map +1 -0
- package/dist/profile/plan-plugin.d.ts +44 -0
- package/dist/profile/plan-plugin.d.ts.map +1 -0
- package/dist/profile/plan-plugin.js +144 -0
- package/dist/profile/plan-plugin.js.map +1 -0
- package/dist/profile/plugin-profiles.d.ts +56 -0
- package/dist/profile/plugin-profiles.d.ts.map +1 -0
- package/dist/profile/plugin-profiles.js +192 -0
- package/dist/profile/plugin-profiles.js.map +1 -0
- package/dist/profile/policy-manifest.d.ts +53 -0
- package/dist/profile/policy-manifest.d.ts.map +1 -0
- package/dist/profile/policy-manifest.js +52 -0
- package/dist/profile/policy-manifest.js.map +1 -0
- package/dist/profile/profile-assembly.d.ts +74 -0
- package/dist/profile/profile-assembly.d.ts.map +1 -0
- package/dist/profile/profile-assembly.js +90 -0
- package/dist/profile/profile-assembly.js.map +1 -0
- package/dist/profile/profile-migration.d.ts +56 -0
- package/dist/profile/profile-migration.d.ts.map +1 -0
- package/dist/profile/profile-migration.js +60 -0
- package/dist/profile/profile-migration.js.map +1 -0
- package/dist/profile/profile-registry.d.ts +58 -0
- package/dist/profile/profile-registry.d.ts.map +1 -0
- package/dist/profile/profile-registry.js +74 -0
- package/dist/profile/profile-registry.js.map +1 -0
- package/dist/profile/role-assembly.d.ts +47 -0
- package/dist/profile/role-assembly.d.ts.map +1 -0
- package/dist/profile/role-assembly.js +31 -0
- package/dist/profile/role-assembly.js.map +1 -0
- package/dist/profile/role-catalog.d.ts +44 -0
- package/dist/profile/role-catalog.d.ts.map +1 -0
- package/dist/profile/role-catalog.js +130 -0
- package/dist/profile/role-catalog.js.map +1 -0
- package/dist/profile/role-orchestrator.d.ts +123 -0
- package/dist/profile/role-orchestrator.d.ts.map +1 -0
- package/dist/profile/role-orchestrator.js +194 -0
- package/dist/profile/role-orchestrator.js.map +1 -0
- package/dist/profile/role-runner.d.ts +99 -0
- package/dist/profile/role-runner.d.ts.map +1 -0
- package/dist/profile/role-runner.js +78 -0
- package/dist/profile/role-runner.js.map +1 -0
- package/dist/profile/root-facade.d.ts +36 -0
- package/dist/profile/root-facade.d.ts.map +1 -0
- package/dist/profile/root-facade.js +48 -0
- package/dist/profile/root-facade.js.map +1 -0
- package/dist/profile/skill-discovery-wiring.d.ts +58 -0
- package/dist/profile/skill-discovery-wiring.d.ts.map +1 -0
- package/dist/profile/skill-discovery-wiring.js +75 -0
- package/dist/profile/skill-discovery-wiring.js.map +1 -0
- package/dist/profile/state-store.d.ts +62 -0
- package/dist/profile/state-store.d.ts.map +1 -0
- package/dist/profile/state-store.js +140 -0
- package/dist/profile/state-store.js.map +1 -0
- package/dist/profile/todo-plugin.d.ts +37 -0
- package/dist/profile/todo-plugin.d.ts.map +1 -0
- package/dist/profile/todo-plugin.js +132 -0
- package/dist/profile/todo-plugin.js.map +1 -0
- package/dist/profiles/builtin-suites.d.ts +142 -0
- package/dist/profiles/builtin-suites.d.ts.map +1 -0
- package/dist/profiles/builtin-suites.js +395 -0
- package/dist/profiles/builtin-suites.js.map +1 -0
- package/dist/profiles/resolved-agent-profile.d.ts +83 -0
- package/dist/profiles/resolved-agent-profile.d.ts.map +1 -0
- package/dist/profiles/resolved-agent-profile.js +75 -0
- package/dist/profiles/resolved-agent-profile.js.map +1 -0
- package/dist/profiles/suite-lifecycle.d.ts +158 -0
- package/dist/profiles/suite-lifecycle.d.ts.map +1 -0
- package/dist/profiles/suite-lifecycle.js +447 -0
- package/dist/profiles/suite-lifecycle.js.map +1 -0
- package/dist/profiles/suite-loader.d.ts +410 -0
- package/dist/profiles/suite-loader.d.ts.map +1 -0
- package/dist/profiles/suite-loader.js +823 -0
- package/dist/profiles/suite-loader.js.map +1 -0
- package/dist/remote/server-assembly.d.ts +230 -0
- package/dist/remote/server-assembly.d.ts.map +1 -0
- package/dist/remote/server-assembly.js +1189 -0
- package/dist/remote/server-assembly.js.map +1 -0
- package/dist/remote/server-entry.d.ts +112 -0
- package/dist/remote/server-entry.d.ts.map +1 -0
- package/dist/remote/server-entry.js +239 -0
- package/dist/remote/server-entry.js.map +1 -0
- package/dist/remote/session-source.d.ts +101 -0
- package/dist/remote/session-source.d.ts.map +1 -0
- package/dist/remote/session-source.js +173 -0
- package/dist/remote/session-source.js.map +1 -0
- package/dist/rpc-entry.d.ts +3 -0
- package/dist/rpc-entry.d.ts.map +1 -0
- package/dist/rpc-entry.js +11 -0
- package/dist/rpc-entry.js.map +1 -0
- package/dist/server/create-harness.d.ts +26 -0
- package/dist/server/create-harness.d.ts.map +1 -0
- package/dist/server/create-harness.js +106 -0
- package/dist/server/create-harness.js.map +1 -0
- package/dist/share/session-share.d.ts +98 -0
- package/dist/share/session-share.d.ts.map +1 -0
- package/dist/share/session-share.js +89 -0
- package/dist/share/session-share.js.map +1 -0
- package/dist/share/share-viewer.d.ts +43 -0
- package/dist/share/share-viewer.d.ts.map +1 -0
- package/dist/share/share-viewer.js +103 -0
- package/dist/share/share-viewer.js.map +1 -0
- package/dist/testing/index.d.ts +4 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +6 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/mock-ai-server.d.ts +77 -0
- package/dist/testing/mock-ai-server.d.ts.map +1 -0
- package/dist/testing/mock-ai-server.js +69 -0
- package/dist/testing/mock-ai-server.js.map +1 -0
- package/dist/testing/plugin-testkit.d.ts +148 -0
- package/dist/testing/plugin-testkit.d.ts.map +1 -0
- package/dist/testing/plugin-testkit.js +493 -0
- package/dist/testing/plugin-testkit.js.map +1 -0
- package/dist/testing/runtime-delivery-queue.d.ts +47 -0
- package/dist/testing/runtime-delivery-queue.d.ts.map +1 -0
- package/dist/testing/runtime-delivery-queue.js +158 -0
- package/dist/testing/runtime-delivery-queue.js.map +1 -0
- package/dist/testing/session-plugin-testkit.d.ts +144 -0
- package/dist/testing/session-plugin-testkit.d.ts.map +1 -0
- package/dist/testing/session-plugin-testkit.js +444 -0
- package/dist/testing/session-plugin-testkit.js.map +1 -0
- package/dist/utils/abort.d.ts +5 -0
- package/dist/utils/abort.d.ts.map +1 -0
- package/dist/utils/abort.js +53 -0
- package/dist/utils/abort.js.map +1 -0
- package/dist/utils/agent-forge-user-agent.d.ts +2 -0
- package/dist/utils/agent-forge-user-agent.d.ts.map +1 -0
- package/dist/utils/agent-forge-user-agent.js +5 -0
- package/dist/utils/agent-forge-user-agent.js.map +1 -0
- package/dist/utils/ansi.d.ts +2 -0
- package/dist/utils/ansi.d.ts.map +1 -0
- package/dist/utils/ansi.js +53 -0
- package/dist/utils/ansi.js.map +1 -0
- package/dist/utils/changelog.d.ts +22 -0
- package/dist/utils/changelog.d.ts.map +1 -0
- package/dist/utils/changelog.js +165 -0
- package/dist/utils/changelog.js.map +1 -0
- package/dist/utils/child-process.d.ts +18 -0
- package/dist/utils/child-process.d.ts.map +1 -0
- package/dist/utils/child-process.js +107 -0
- package/dist/utils/child-process.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts +11 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -0
- package/dist/utils/clipboard-image.js +246 -0
- package/dist/utils/clipboard-image.js.map +1 -0
- package/dist/utils/clipboard-native.d.ts +11 -0
- package/dist/utils/clipboard-native.d.ts.map +1 -0
- package/dist/utils/clipboard-native.js +22 -0
- package/dist/utils/clipboard-native.js.map +1 -0
- package/dist/utils/clipboard.d.ts +4 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/clipboard.js +161 -0
- package/dist/utils/clipboard.js.map +1 -0
- package/dist/utils/deprecation.d.ts +4 -0
- package/dist/utils/deprecation.d.ts.map +1 -0
- package/dist/utils/deprecation.js +13 -0
- package/dist/utils/deprecation.js.map +1 -0
- package/dist/utils/exif-orientation.d.ts +5 -0
- package/dist/utils/exif-orientation.d.ts.map +1 -0
- package/dist/utils/exif-orientation.js +158 -0
- package/dist/utils/exif-orientation.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +8 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +27 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/fs-watch.d.ts +5 -0
- package/dist/utils/fs-watch.d.ts.map +1 -0
- package/dist/utils/fs-watch.js +25 -0
- package/dist/utils/fs-watch.js.map +1 -0
- package/dist/utils/git.d.ts +26 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +201 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/html.d.ts +7 -0
- package/dist/utils/html.d.ts.map +1 -0
- package/dist/utils/html.js +40 -0
- package/dist/utils/html.js.map +1 -0
- package/dist/utils/image-convert.d.ts +10 -0
- package/dist/utils/image-convert.d.ts.map +1 -0
- package/dist/utils/image-convert.js +45 -0
- package/dist/utils/image-convert.js.map +1 -0
- package/dist/utils/image-process.d.ts +18 -0
- package/dist/utils/image-process.d.ts.map +1 -0
- package/dist/utils/image-process.js +84 -0
- package/dist/utils/image-process.js.map +1 -0
- package/dist/utils/image-resize-core.d.ts +30 -0
- package/dist/utils/image-resize-core.d.ts.map +1 -0
- package/dist/utils/image-resize-core.js +125 -0
- package/dist/utils/image-resize-core.js.map +1 -0
- package/dist/utils/image-resize-worker.d.ts +2 -0
- package/dist/utils/image-resize-worker.d.ts.map +1 -0
- package/dist/utils/image-resize-worker.js +31 -0
- package/dist/utils/image-resize-worker.js.map +1 -0
- package/dist/utils/image-resize.d.ts +16 -0
- package/dist/utils/image-resize.d.ts.map +1 -0
- package/dist/utils/image-resize.js +100 -0
- package/dist/utils/image-resize.js.map +1 -0
- package/dist/utils/json.d.ts +3 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +8 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/management-http.d.ts +25 -0
- package/dist/utils/management-http.d.ts.map +1 -0
- package/dist/utils/management-http.js +54 -0
- package/dist/utils/management-http.js.map +1 -0
- package/dist/utils/mime.d.ts +3 -0
- package/dist/utils/mime.d.ts.map +1 -0
- package/dist/utils/mime.js +115 -0
- package/dist/utils/mime.js.map +1 -0
- package/dist/utils/open-browser.d.ts +9 -0
- package/dist/utils/open-browser.d.ts.map +1 -0
- package/dist/utils/open-browser.js +22 -0
- package/dist/utils/open-browser.js.map +1 -0
- package/dist/utils/paths.d.ts +34 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +114 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/photon.d.ts +21 -0
- package/dist/utils/photon.d.ts.map +1 -0
- package/dist/utils/photon.js +124 -0
- package/dist/utils/photon.js.map +1 -0
- package/dist/utils/shell.d.ts +34 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +216 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +17 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/sync-sleep.d.ts +2 -0
- package/dist/utils/sync-sleep.d.ts.map +1 -0
- package/dist/utils/sync-sleep.js +11 -0
- package/dist/utils/sync-sleep.js.map +1 -0
- package/dist/utils/syntax-highlight.d.ts +13 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -0
- package/dist/utils/syntax-highlight.js +177 -0
- package/dist/utils/syntax-highlight.js.map +1 -0
- package/dist/utils/text.d.ts +8 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +9 -0
- package/dist/utils/text.js.map +1 -0
- package/dist/utils/tool-result-images.d.ts +19 -0
- package/dist/utils/tool-result-images.d.ts.map +1 -0
- package/dist/utils/tool-result-images.js +45 -0
- package/dist/utils/tool-result-images.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +24 -0
- package/dist/utils/tools-manager.d.ts.map +1 -0
- package/dist/utils/tools-manager.js +437 -0
- package/dist/utils/tools-manager.js.map +1 -0
- package/dist/utils/version-check.d.ts +21 -0
- package/dist/utils/version-check.d.ts.map +1 -0
- package/dist/utils/version-check.js +86 -0
- package/dist/utils/version-check.js.map +1 -0
- package/dist/utils/windows-self-update.d.ts +3 -0
- package/dist/utils/windows-self-update.d.ts.map +1 -0
- package/dist/utils/windows-self-update.js +77 -0
- package/dist/utils/windows-self-update.js.map +1 -0
- package/docs/compaction.md +348 -0
- package/docs/containerization.md +114 -0
- package/docs/development.md +71 -0
- package/docs/docs.json +148 -0
- package/docs/environment-variables.md +96 -0
- package/docs/images/exy.png +0 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/images/tree-view.png +0 -0
- package/docs/index.md +76 -0
- package/docs/json.md +98 -0
- package/docs/keybindings.md +245 -0
- package/docs/llama-cpp.md +101 -0
- package/docs/models.md +576 -0
- package/docs/packages.md +205 -0
- package/docs/prompt-templates.md +96 -0
- package/docs/providers.md +317 -0
- package/docs/quickstart.md +167 -0
- package/docs/rpc.md +1487 -0
- package/docs/sdk.md +1146 -0
- package/docs/security.md +24 -0
- package/docs/session-format.md +438 -0
- package/docs/sessions.md +145 -0
- package/docs/settings.md +355 -0
- package/docs/shell-aliases.md +13 -0
- package/docs/skills.md +231 -0
- package/docs/terminal-setup.md +192 -0
- package/docs/termux.md +127 -0
- package/docs/themes.md +320 -0
- package/docs/tmux.md +63 -0
- package/docs/tui.md +478 -0
- package/docs/usage.md +291 -0
- package/docs/windows.md +39 -0
- package/examples/README.md +21 -0
- package/examples/extensions/README.md +163 -0
- package/examples/extensions/bash-spawn-hook/index.ts +37 -0
- package/examples/extensions/bash-spawn-hook/plugin.json +10 -0
- package/examples/extensions/bookmark/index.ts +67 -0
- package/examples/extensions/bookmark/plugin.json +11 -0
- package/examples/extensions/built-in-tool-renderer/index.ts +262 -0
- package/examples/extensions/built-in-tool-renderer/plugin.json +10 -0
- package/examples/extensions/claude-rules/index.ts +119 -0
- package/examples/extensions/claude-rules/plugin.json +8 -0
- package/examples/extensions/cli-bridge/README.md +27 -0
- package/examples/extensions/cli-bridge/index.ts +320 -0
- package/examples/extensions/cli-bridge/plugin.json +10 -0
- package/examples/extensions/dynamic-resources/SKILL.md +8 -0
- package/examples/extensions/dynamic-resources/dynamic.json +79 -0
- package/examples/extensions/dynamic-resources/dynamic.md +5 -0
- package/examples/extensions/dynamic-resources/index.ts +53 -0
- package/examples/extensions/dynamic-resources/plugin.json +8 -0
- package/examples/extensions/dynamic-tools/index.ts +102 -0
- package/examples/extensions/dynamic-tools/plugin.json +14 -0
- package/examples/extensions/event-bus/index.ts +75 -0
- package/examples/extensions/event-bus/plugin.json +13 -0
- package/examples/extensions/file-trigger/index.ts +65 -0
- package/examples/extensions/file-trigger/plugin.json +13 -0
- package/examples/extensions/goal/README.md +16 -0
- package/examples/extensions/goal/index.ts +134 -0
- package/examples/extensions/goal/plugin.json +12 -0
- package/examples/extensions/hello/index.ts +29 -0
- package/examples/extensions/hello/plugin.json +10 -0
- package/examples/extensions/kimi-deferred-tools/index.ts +93 -0
- package/examples/extensions/kimi-deferred-tools/plugin.json +11 -0
- package/examples/extensions/mcp-stdio/README.md +19 -0
- package/examples/extensions/mcp-stdio/index.d.ts +64 -0
- package/examples/extensions/mcp-stdio/index.d.ts.map +1 -0
- package/examples/extensions/mcp-stdio/index.js +292 -0
- package/examples/extensions/mcp-stdio/index.js.map +1 -0
- package/examples/extensions/mcp-stdio/index.ts +381 -0
- package/examples/extensions/mcp-stdio/plugin.json +10 -0
- package/examples/extensions/memory-backend/index.ts +120 -0
- package/examples/extensions/memory-backend/plugin.json +10 -0
- package/examples/extensions/minimal-mode/index.ts +447 -0
- package/examples/extensions/minimal-mode/plugin.json +10 -0
- package/examples/extensions/multi-agent/README.md +7 -0
- package/examples/extensions/multi-agent/index.ts +592 -0
- package/examples/extensions/multi-agent/plugin.json +13 -0
- package/examples/extensions/notify/index.ts +70 -0
- package/examples/extensions/notify/plugin.json +8 -0
- package/examples/extensions/permission-gate/index.ts +55 -0
- package/examples/extensions/permission-gate/plugin.json +11 -0
- package/examples/extensions/pirate/index.ts +75 -0
- package/examples/extensions/pirate/plugin.json +8 -0
- package/examples/extensions/plan/README.md +16 -0
- package/examples/extensions/plan/index.ts +136 -0
- package/examples/extensions/plan/plugin.json +12 -0
- package/examples/extensions/prompt-customizer/index.ts +117 -0
- package/examples/extensions/prompt-customizer/plugin.json +8 -0
- package/examples/extensions/protected-paths/index.ts +44 -0
- package/examples/extensions/protected-paths/plugin.json +11 -0
- package/examples/extensions/provider-attribution/README.md +12 -0
- package/examples/extensions/provider-attribution/index.ts +86 -0
- package/examples/extensions/provider-attribution/plugin.json +10 -0
- package/examples/extensions/send-user-message/index.ts +118 -0
- package/examples/extensions/send-user-message/plugin.json +11 -0
- package/examples/extensions/session-name/index.ts +31 -0
- package/examples/extensions/session-name/plugin.json +11 -0
- package/examples/extensions/session-share/README.md +15 -0
- package/examples/extensions/session-share/index.ts +170 -0
- package/examples/extensions/session-share/plugin.json +15 -0
- package/examples/extensions/structured-output/index.ts +68 -0
- package/examples/extensions/structured-output/plugin.json +10 -0
- package/examples/extensions/subagent/README.md +177 -0
- package/examples/extensions/subagent/agents/planner.md +37 -0
- package/examples/extensions/subagent/agents/reviewer.md +35 -0
- package/examples/extensions/subagent/agents/scout.md +50 -0
- package/examples/extensions/subagent/agents/worker.md +24 -0
- package/examples/extensions/subagent/agents.ts +157 -0
- package/examples/extensions/subagent/index.ts +1057 -0
- package/examples/extensions/subagent/plugin.json +13 -0
- package/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
- package/examples/extensions/subagent/prompts/implement.md +10 -0
- package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
- package/examples/extensions/suite-manager/README.md +45 -0
- package/examples/extensions/suite-manager/index.ts +182 -0
- package/examples/extensions/suite-manager/plugin.json +13 -0
- package/examples/extensions/timed-confirm/index.ts +93 -0
- package/examples/extensions/timed-confirm/plugin.json +13 -0
- package/examples/extensions/todo-set/README.md +18 -0
- package/examples/extensions/todo-set/index.ts +133 -0
- package/examples/extensions/todo-set/plugin.json +12 -0
- package/examples/extensions/tool-override/index.ts +159 -0
- package/examples/extensions/tool-override/plugin.json +11 -0
- package/examples/extensions/trigger-compact/index.ts +76 -0
- package/examples/extensions/trigger-compact/plugin.json +14 -0
- package/examples/extensions/truncated-tool/index.ts +204 -0
- package/examples/extensions/truncated-tool/plugin.json +10 -0
- package/examples/extensions/with-deps/index.ts +42 -0
- package/examples/extensions/with-deps/package-lock.json +31 -0
- package/examples/extensions/with-deps/package.json +22 -0
- package/examples/extensions/with-deps/plugin.json +10 -0
- package/examples/remote-client.ts +66 -0
- package/examples/rpc-extension-ui.ts +641 -0
- package/examples/sdk/01-minimal.ts +26 -0
- package/examples/sdk/02-custom-model.ts +49 -0
- package/examples/sdk/03-custom-prompt.ts +70 -0
- package/examples/sdk/04-skills.ts +55 -0
- package/examples/sdk/05-tools.ts +48 -0
- package/examples/sdk/07-context-files.ts +42 -0
- package/examples/sdk/08-prompt-templates.ts +51 -0
- package/examples/sdk/09-api-keys-and-oauth.ts +34 -0
- package/examples/sdk/10-settings.ts +53 -0
- package/examples/sdk/11-sessions.ts +52 -0
- package/examples/sdk/12-full-control.ts +72 -0
- package/examples/sdk/13-session-runtime.ts +71 -0
- package/examples/sdk/14-custom-session-storage.ts +132 -0
- package/examples/sdk/README.md +139 -0
- package/package.json +111 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap-factory-manifest.js","sourceRoot":"","sources":["../../../src/plugins/ecosystem/bootstrap-factory-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAeH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAA6C,MAAM,CAAC,MAAM,CAAC;IAC3G,EAAE,QAAQ,EAAE,yBAAyB,EAAE,OAAO,EAAE,6BAA6B,EAAE,KAAK,EAAE,SAAS,EAAE;IACjG,EAAE,QAAQ,EAAE,yBAAyB,EAAE,OAAO,EAAE,6BAA6B,EAAE,KAAK,EAAE,SAAS,EAAE;IACjG,EAAE,QAAQ,EAAE,6BAA6B,EAAE,OAAO,EAAE,iCAAiC,EAAE,KAAK,EAAE,SAAS,EAAE;IACzG,EAAE,QAAQ,EAAE,kCAAkC,EAAE,OAAO,EAAE,sCAAsC,EAAE,KAAK,EAAE,SAAS,EAAE;IACnH,EAAE,QAAQ,EAAE,kCAAkC,EAAE,OAAO,EAAE,sCAAsC,EAAE,KAAK,EAAE,SAAS,EAAE;IACnH;QACC,QAAQ,EAAE,sCAAsC;QAChD,OAAO,EAAE,0CAA0C;QACnD,KAAK,EAAE,SAAS;KAChB;IACD,EAAE,QAAQ,EAAE,2BAA2B,EAAE,OAAO,EAAE,+BAA+B,EAAE,KAAK,EAAE,SAAS,EAAE;CACrG,CAAC,CAAC","sourcesContent":["/**\n * Factory plugin manifest for the startup bootstrap (design\n * `插件独立分发与启动装配设计.md` §4.4). Pure data only: the framework\n * declares which first-party plugin packages a fresh install should end up\n * with, as `pluginId → npm name + version constraint`. It ships with the\n * framework version and is never a code branch.\n *\n * Each S2–S4 migrated package appends one entry here with its publish name\n * (`@ai-agent-forge/plugin-<name>`, §0.8) together with the legacy short-id\n * mapping noted in §4.1.\n */\n\n/** One factory-declared first-party plugin package. */\nexport interface PluginBootstrapFactoryEntryV1 {\n\t/** Ecosystem plugin id (`agent-forge.plugin.<name>` domain, §4.1). */\n\treadonly pluginId: string;\n\t/** npm publish name (`@ai-agent-forge/plugin-<name>`, §0.8). */\n\treadonly npmName: string;\n\t/**\n\t * Minimal range subset shared with npm resolution (`x.y.z`, `^x.y.z`,\n\t * `~x.y.z`, `latest`); omitted means the highest available version.\n\t */\n\treadonly range?: string;\n}\n\n/**\n * Frozen factory manifest consumed by `runPluginBootstrapV1`. D-075 S4 first\n * batch: the goal/plan/todo-set capability packages joined; second batch:\n * session-share and observability joined; third batch: subagent-delegate\n * joined; fourth batch: memory joined (completing the six-package split).\n * Later B-class batches append their entries per package.\n */\nexport const BOOTSTRAP_FACTORY_PLUGIN_MANIFEST_V1: readonly PluginBootstrapFactoryEntryV1[] = Object.freeze([\n\t{ pluginId: \"agent-forge.plugin.goal\", npmName: \"@ai-agent-forge/plugin-goal\", range: \"^0.84.4\" },\n\t{ pluginId: \"agent-forge.plugin.plan\", npmName: \"@ai-agent-forge/plugin-plan\", range: \"^0.84.4\" },\n\t{ pluginId: \"agent-forge.plugin.todo-set\", npmName: \"@ai-agent-forge/plugin-todo-set\", range: \"^0.84.4\" },\n\t{ pluginId: \"agent-forge.plugin.session-share\", npmName: \"@ai-agent-forge/plugin-session-share\", range: \"^0.84.4\" },\n\t{ pluginId: \"agent-forge.plugin.observability\", npmName: \"@ai-agent-forge/plugin-observability\", range: \"^0.84.4\" },\n\t{\n\t\tpluginId: \"agent-forge.plugin.subagent-delegate\",\n\t\tnpmName: \"@ai-agent-forge/plugin-subagent-delegate\",\n\t\trange: \"^0.84.4\",\n\t},\n\t{ pluginId: \"agent-forge.plugin.memory\", npmName: \"@ai-agent-forge/plugin-memory\", range: \"^0.84.4\" },\n]);\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CapabilityRefV1, HostFactsV1, PluginManifestV1, PluginResolutionV1 } from "./types.ts";
|
|
2
|
+
/** A bounded, read-only view consumed by Profile/plugin selection UIs. */
|
|
3
|
+
export interface PluginCatalogEntryV1 {
|
|
4
|
+
readonly pluginId: string;
|
|
5
|
+
readonly pluginVersion: string;
|
|
6
|
+
readonly manifestDigest: string;
|
|
7
|
+
readonly resolution: PluginResolutionV1;
|
|
8
|
+
}
|
|
9
|
+
export interface PluginCatalogSnapshotV1 {
|
|
10
|
+
readonly version: 1;
|
|
11
|
+
readonly entries: readonly PluginCatalogEntryV1[];
|
|
12
|
+
readonly truncated: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type PluginCatalogErrorCodeV1 = "duplicate_plugin_version" | "invalid_limit";
|
|
15
|
+
export declare class PluginCatalogErrorV1 extends Error {
|
|
16
|
+
readonly code: PluginCatalogErrorCodeV1;
|
|
17
|
+
constructor(code: PluginCatalogErrorCodeV1, message: string);
|
|
18
|
+
}
|
|
19
|
+
/** Compare package versions numerically, with prereleases ordered before releases. */
|
|
20
|
+
export declare function comparePluginVersionsV1(left: string, right: string): number;
|
|
21
|
+
/**
|
|
22
|
+
* Build a deterministic catalog projection without exposing adapter objects,
|
|
23
|
+
* file paths, credentials, or plugin-private state to the main session.
|
|
24
|
+
*
|
|
25
|
+
* The catalog is deliberately a pure snapshot. Installation, integrity
|
|
26
|
+
* verification and activation remain explicit operations (`stage/verify/
|
|
27
|
+
* activatePluginUpdateV1`) owned by a host or installer plugin.
|
|
28
|
+
*/
|
|
29
|
+
export declare function buildPluginCatalogV1(input: {
|
|
30
|
+
readonly manifests: readonly PluginManifestV1[];
|
|
31
|
+
readonly host: HostFactsV1;
|
|
32
|
+
readonly required?: boolean;
|
|
33
|
+
readonly disabledPluginIds?: readonly string[];
|
|
34
|
+
readonly availableCapabilities?: readonly CapabilityRefV1[];
|
|
35
|
+
readonly maxEntries?: number;
|
|
36
|
+
}): PluginCatalogSnapshotV1;
|
|
37
|
+
export declare function findPluginCatalogEntryV1(snapshot: PluginCatalogSnapshotV1, pluginId: string, pluginVersion?: string): PluginCatalogEntryV1 | undefined;
|
|
38
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/plugins/ecosystem/catalog.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGrG,0EAA0E;AAC1E,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;CACxC;AAED,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAClD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,wBAAwB,GAAG,0BAA0B,GAAG,eAAe,CAAC;AAEpF,qBAAa,oBAAqB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IAExC,YAAY,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAE,MAAM,EAI1D;CACD;AAKD,sFAAsF;AACtF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAmB3E;AAQD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC3C,QAAQ,CAAC,SAAS,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAChD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,QAAQ,CAAC,qBAAqB,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAC5D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,uBAAuB,CAuC1B;AAED,wBAAgB,wBAAwB,CACvC,QAAQ,EAAE,uBAAuB,EACjC,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,GACpB,oBAAoB,GAAG,SAAS,CAIlC","sourcesContent":["import { VERSION } from \"../../config.ts\";\nimport { resolvePluginCompatibilityV1 } from \"./resolver.ts\";\nimport type { CapabilityRefV1, HostFactsV1, PluginManifestV1, PluginResolutionV1 } from \"./types.ts\";\nimport { pluginManifestDigestV1 } from \"./updates.ts\";\n\n/** A bounded, read-only view consumed by Profile/plugin selection UIs. */\nexport interface PluginCatalogEntryV1 {\n\treadonly pluginId: string;\n\treadonly pluginVersion: string;\n\treadonly manifestDigest: string;\n\treadonly resolution: PluginResolutionV1;\n}\n\nexport interface PluginCatalogSnapshotV1 {\n\treadonly version: 1;\n\treadonly entries: readonly PluginCatalogEntryV1[];\n\treadonly truncated: boolean;\n}\n\nexport type PluginCatalogErrorCodeV1 = \"duplicate_plugin_version\" | \"invalid_limit\";\n\nexport class PluginCatalogErrorV1 extends Error {\n\treadonly code: PluginCatalogErrorCodeV1;\n\n\tconstructor(code: PluginCatalogErrorCodeV1, message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"PluginCatalogErrorV1\";\n\t\tthis.code = code;\n\t}\n}\n\nconst DEFAULT_MAX_ENTRIES = 128;\nconst MAX_ENTRIES = 256;\n\n/** Compare package versions numerically, with prereleases ordered before releases. */\nexport function comparePluginVersionsV1(left: string, right: string): number {\n\tconst parse = (value: string): (number | string)[] =>\n\t\tvalue\n\t\t\t.trim()\n\t\t\t.replace(/^[vV]/u, \"\")\n\t\t\t.split(/[.+-]/u)\n\t\t\t.map((part) => (/^\\d+$/u.test(part) ? Number.parseInt(part, 10) : part));\n\tconst leftParts = parse(left);\n\tconst rightParts = parse(right);\n\tfor (let index = 0; index < Math.max(leftParts.length, rightParts.length); index += 1) {\n\t\tconst a = leftParts[index] ?? 0;\n\t\tconst b = rightParts[index] ?? 0;\n\t\tif (a === b) continue;\n\t\tif (typeof a === \"number\" && typeof b === \"number\") return a < b ? -1 : 1;\n\t\tif (typeof a === \"number\") return 1;\n\t\tif (typeof b === \"number\") return -1;\n\t\treturn a < b ? -1 : 1;\n\t}\n\treturn 0;\n}\n\nfunction compareCatalogEntries(left: PluginManifestV1, right: PluginManifestV1): number {\n\tconst idOrder = left.id.localeCompare(right.id);\n\tif (idOrder !== 0) return idOrder;\n\treturn comparePluginVersionsV1(right.pluginVersion, left.pluginVersion);\n}\n\n/**\n * Build a deterministic catalog projection without exposing adapter objects,\n * file paths, credentials, or plugin-private state to the main session.\n *\n * The catalog is deliberately a pure snapshot. Installation, integrity\n * verification and activation remain explicit operations (`stage/verify/\n * activatePluginUpdateV1`) owned by a host or installer plugin.\n */\nexport function buildPluginCatalogV1(input: {\n\treadonly manifests: readonly PluginManifestV1[];\n\treadonly host: HostFactsV1;\n\treadonly required?: boolean;\n\treadonly disabledPluginIds?: readonly string[];\n\treadonly availableCapabilities?: readonly CapabilityRefV1[];\n\treadonly maxEntries?: number;\n}): PluginCatalogSnapshotV1 {\n\tconst maxEntries = input.maxEntries ?? DEFAULT_MAX_ENTRIES;\n\tif (!Number.isSafeInteger(maxEntries) || maxEntries < 1 || maxEntries > MAX_ENTRIES) {\n\t\tthrow new PluginCatalogErrorV1(\"invalid_limit\", `maxEntries must be an integer between 1 and ${MAX_ENTRIES}`);\n\t}\n\n\tconst manifests = [...input.manifests].sort(compareCatalogEntries);\n\tconst seen = new Set<string>();\n\tfor (const manifest of manifests) {\n\t\tconst identity = `${manifest.id}@${manifest.pluginVersion}`;\n\t\tif (seen.has(identity)) {\n\t\t\tthrow new PluginCatalogErrorV1(\n\t\t\t\t\"duplicate_plugin_version\",\n\t\t\t\t`Catalog contains duplicate plugin version: ${identity}`,\n\t\t\t);\n\t\t}\n\t\tseen.add(identity);\n\t}\n\n\tconst disabled = new Set(input.disabledPluginIds ?? []);\n\tconst entries = manifests.slice(0, maxEntries).map((manifest): PluginCatalogEntryV1 => {\n\t\tconst resolution = resolvePluginCompatibilityV1({\n\t\t\tmanifest,\n\t\t\thost: input.host,\n\t\t\trequired: input.required,\n\t\t\tdisabled: disabled.has(manifest.id),\n\t\t\tavailableCapabilities: input.availableCapabilities,\n\t\t\t// D-073: catalog snapshots enforce the declared host version range;\n\t\t\t// previously this path skipped the check entirely.\n\t\t\thostVersion: VERSION,\n\t\t});\n\t\treturn Object.freeze({\n\t\t\tpluginId: manifest.id,\n\t\t\tpluginVersion: manifest.pluginVersion,\n\t\t\tmanifestDigest: pluginManifestDigestV1(manifest),\n\t\t\tresolution,\n\t\t});\n\t});\n\treturn Object.freeze({ version: 1, entries: Object.freeze(entries), truncated: manifests.length > maxEntries });\n}\n\nexport function findPluginCatalogEntryV1(\n\tsnapshot: PluginCatalogSnapshotV1,\n\tpluginId: string,\n\tpluginVersion?: string,\n): PluginCatalogEntryV1 | undefined {\n\treturn snapshot.entries.find(\n\t\t(entry) => entry.pluginId === pluginId && (pluginVersion === undefined || entry.pluginVersion === pluginVersion),\n\t);\n}\n"]}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { VERSION } from "../../config.js";
|
|
2
|
+
import { resolvePluginCompatibilityV1 } from "./resolver.js";
|
|
3
|
+
import { pluginManifestDigestV1 } from "./updates.js";
|
|
4
|
+
export class PluginCatalogErrorV1 extends Error {
|
|
5
|
+
code;
|
|
6
|
+
constructor(code, message) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.name = "PluginCatalogErrorV1";
|
|
9
|
+
this.code = code;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
const DEFAULT_MAX_ENTRIES = 128;
|
|
13
|
+
const MAX_ENTRIES = 256;
|
|
14
|
+
/** Compare package versions numerically, with prereleases ordered before releases. */
|
|
15
|
+
export function comparePluginVersionsV1(left, right) {
|
|
16
|
+
const parse = (value) => value
|
|
17
|
+
.trim()
|
|
18
|
+
.replace(/^[vV]/u, "")
|
|
19
|
+
.split(/[.+-]/u)
|
|
20
|
+
.map((part) => (/^\d+$/u.test(part) ? Number.parseInt(part, 10) : part));
|
|
21
|
+
const leftParts = parse(left);
|
|
22
|
+
const rightParts = parse(right);
|
|
23
|
+
for (let index = 0; index < Math.max(leftParts.length, rightParts.length); index += 1) {
|
|
24
|
+
const a = leftParts[index] ?? 0;
|
|
25
|
+
const b = rightParts[index] ?? 0;
|
|
26
|
+
if (a === b)
|
|
27
|
+
continue;
|
|
28
|
+
if (typeof a === "number" && typeof b === "number")
|
|
29
|
+
return a < b ? -1 : 1;
|
|
30
|
+
if (typeof a === "number")
|
|
31
|
+
return 1;
|
|
32
|
+
if (typeof b === "number")
|
|
33
|
+
return -1;
|
|
34
|
+
return a < b ? -1 : 1;
|
|
35
|
+
}
|
|
36
|
+
return 0;
|
|
37
|
+
}
|
|
38
|
+
function compareCatalogEntries(left, right) {
|
|
39
|
+
const idOrder = left.id.localeCompare(right.id);
|
|
40
|
+
if (idOrder !== 0)
|
|
41
|
+
return idOrder;
|
|
42
|
+
return comparePluginVersionsV1(right.pluginVersion, left.pluginVersion);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Build a deterministic catalog projection without exposing adapter objects,
|
|
46
|
+
* file paths, credentials, or plugin-private state to the main session.
|
|
47
|
+
*
|
|
48
|
+
* The catalog is deliberately a pure snapshot. Installation, integrity
|
|
49
|
+
* verification and activation remain explicit operations (`stage/verify/
|
|
50
|
+
* activatePluginUpdateV1`) owned by a host or installer plugin.
|
|
51
|
+
*/
|
|
52
|
+
export function buildPluginCatalogV1(input) {
|
|
53
|
+
const maxEntries = input.maxEntries ?? DEFAULT_MAX_ENTRIES;
|
|
54
|
+
if (!Number.isSafeInteger(maxEntries) || maxEntries < 1 || maxEntries > MAX_ENTRIES) {
|
|
55
|
+
throw new PluginCatalogErrorV1("invalid_limit", `maxEntries must be an integer between 1 and ${MAX_ENTRIES}`);
|
|
56
|
+
}
|
|
57
|
+
const manifests = [...input.manifests].sort(compareCatalogEntries);
|
|
58
|
+
const seen = new Set();
|
|
59
|
+
for (const manifest of manifests) {
|
|
60
|
+
const identity = `${manifest.id}@${manifest.pluginVersion}`;
|
|
61
|
+
if (seen.has(identity)) {
|
|
62
|
+
throw new PluginCatalogErrorV1("duplicate_plugin_version", `Catalog contains duplicate plugin version: ${identity}`);
|
|
63
|
+
}
|
|
64
|
+
seen.add(identity);
|
|
65
|
+
}
|
|
66
|
+
const disabled = new Set(input.disabledPluginIds ?? []);
|
|
67
|
+
const entries = manifests.slice(0, maxEntries).map((manifest) => {
|
|
68
|
+
const resolution = resolvePluginCompatibilityV1({
|
|
69
|
+
manifest,
|
|
70
|
+
host: input.host,
|
|
71
|
+
required: input.required,
|
|
72
|
+
disabled: disabled.has(manifest.id),
|
|
73
|
+
availableCapabilities: input.availableCapabilities,
|
|
74
|
+
// D-073: catalog snapshots enforce the declared host version range;
|
|
75
|
+
// previously this path skipped the check entirely.
|
|
76
|
+
hostVersion: VERSION,
|
|
77
|
+
});
|
|
78
|
+
return Object.freeze({
|
|
79
|
+
pluginId: manifest.id,
|
|
80
|
+
pluginVersion: manifest.pluginVersion,
|
|
81
|
+
manifestDigest: pluginManifestDigestV1(manifest),
|
|
82
|
+
resolution,
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
return Object.freeze({ version: 1, entries: Object.freeze(entries), truncated: manifests.length > maxEntries });
|
|
86
|
+
}
|
|
87
|
+
export function findPluginCatalogEntryV1(snapshot, pluginId, pluginVersion) {
|
|
88
|
+
return snapshot.entries.find((entry) => entry.pluginId === pluginId && (pluginVersion === undefined || entry.pluginVersion === pluginVersion));
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../src/plugins/ecosystem/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAkBtD,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IACrC,IAAI,CAA2B;IAExC,YAAY,IAA8B,EAAE,OAAe,EAAE;QAC5D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAAA,CACjB;CACD;AAED,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,WAAW,GAAG,GAAG,CAAC;AAExB,sFAAsF;AACtF,MAAM,UAAU,uBAAuB,CAAC,IAAY,EAAE,KAAa,EAAU;IAC5E,MAAM,KAAK,GAAG,CAAC,KAAa,EAAuB,EAAE,CACpD,KAAK;SACH,IAAI,EAAE;SACN,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,KAAK,CAAC,QAAQ,CAAC;SACf,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3E,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAChC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACvF,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC;YAAE,SAAS;QACtB,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,QAAQ;YAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,IAAI,OAAO,CAAC,KAAK,QAAQ;YAAE,OAAO,CAAC,CAAC;QACpC,IAAI,OAAO,CAAC,KAAK,QAAQ;YAAE,OAAO,CAAC,CAAC,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,CAAC,CAAC;AAAA,CACT;AAED,SAAS,qBAAqB,CAAC,IAAsB,EAAE,KAAuB,EAAU;IACvF,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAChD,IAAI,OAAO,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC;IAClC,OAAO,uBAAuB,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;AAAA,CACxE;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAOpC,EAA2B;IAC3B,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,mBAAmB,CAAC;IAC3D,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,UAAU,GAAG,CAAC,IAAI,UAAU,GAAG,WAAW,EAAE,CAAC;QACrF,MAAM,IAAI,oBAAoB,CAAC,eAAe,EAAE,+CAA+C,WAAW,EAAE,CAAC,CAAC;IAC/G,CAAC;IAED,MAAM,SAAS,GAAG,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACnE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QAClC,MAAM,QAAQ,GAAG,GAAG,QAAQ,CAAC,EAAE,IAAI,QAAQ,CAAC,aAAa,EAAE,CAAC;QAC5D,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,oBAAoB,CAC7B,0BAA0B,EAC1B,8CAA8C,QAAQ,EAAE,CACxD,CAAC;QACH,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACpB,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;IACxD,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAwB,EAAE,CAAC;QACtF,MAAM,UAAU,GAAG,4BAA4B,CAAC;YAC/C,QAAQ;YACR,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,qBAAqB,EAAE,KAAK,CAAC,qBAAqB;YAClD,oEAAoE;YACpE,mDAAmD;YACnD,WAAW,EAAE,OAAO;SACpB,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,MAAM,CAAC;YACpB,QAAQ,EAAE,QAAQ,CAAC,EAAE;YACrB,aAAa,EAAE,QAAQ,CAAC,aAAa;YACrC,cAAc,EAAE,sBAAsB,CAAC,QAAQ,CAAC;YAChD,UAAU;SACV,CAAC,CAAC;IAAA,CACH,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC,CAAC;AAAA,CAChH;AAED,MAAM,UAAU,wBAAwB,CACvC,QAAiC,EACjC,QAAgB,EAChB,aAAsB,EACa;IACnC,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAC3B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,aAAa,KAAK,SAAS,IAAI,KAAK,CAAC,aAAa,KAAK,aAAa,CAAC,CAChH,CAAC;AAAA,CACF","sourcesContent":["import { VERSION } from \"../../config.ts\";\nimport { resolvePluginCompatibilityV1 } from \"./resolver.ts\";\nimport type { CapabilityRefV1, HostFactsV1, PluginManifestV1, PluginResolutionV1 } from \"./types.ts\";\nimport { pluginManifestDigestV1 } from \"./updates.ts\";\n\n/** A bounded, read-only view consumed by Profile/plugin selection UIs. */\nexport interface PluginCatalogEntryV1 {\n\treadonly pluginId: string;\n\treadonly pluginVersion: string;\n\treadonly manifestDigest: string;\n\treadonly resolution: PluginResolutionV1;\n}\n\nexport interface PluginCatalogSnapshotV1 {\n\treadonly version: 1;\n\treadonly entries: readonly PluginCatalogEntryV1[];\n\treadonly truncated: boolean;\n}\n\nexport type PluginCatalogErrorCodeV1 = \"duplicate_plugin_version\" | \"invalid_limit\";\n\nexport class PluginCatalogErrorV1 extends Error {\n\treadonly code: PluginCatalogErrorCodeV1;\n\n\tconstructor(code: PluginCatalogErrorCodeV1, message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"PluginCatalogErrorV1\";\n\t\tthis.code = code;\n\t}\n}\n\nconst DEFAULT_MAX_ENTRIES = 128;\nconst MAX_ENTRIES = 256;\n\n/** Compare package versions numerically, with prereleases ordered before releases. */\nexport function comparePluginVersionsV1(left: string, right: string): number {\n\tconst parse = (value: string): (number | string)[] =>\n\t\tvalue\n\t\t\t.trim()\n\t\t\t.replace(/^[vV]/u, \"\")\n\t\t\t.split(/[.+-]/u)\n\t\t\t.map((part) => (/^\\d+$/u.test(part) ? Number.parseInt(part, 10) : part));\n\tconst leftParts = parse(left);\n\tconst rightParts = parse(right);\n\tfor (let index = 0; index < Math.max(leftParts.length, rightParts.length); index += 1) {\n\t\tconst a = leftParts[index] ?? 0;\n\t\tconst b = rightParts[index] ?? 0;\n\t\tif (a === b) continue;\n\t\tif (typeof a === \"number\" && typeof b === \"number\") return a < b ? -1 : 1;\n\t\tif (typeof a === \"number\") return 1;\n\t\tif (typeof b === \"number\") return -1;\n\t\treturn a < b ? -1 : 1;\n\t}\n\treturn 0;\n}\n\nfunction compareCatalogEntries(left: PluginManifestV1, right: PluginManifestV1): number {\n\tconst idOrder = left.id.localeCompare(right.id);\n\tif (idOrder !== 0) return idOrder;\n\treturn comparePluginVersionsV1(right.pluginVersion, left.pluginVersion);\n}\n\n/**\n * Build a deterministic catalog projection without exposing adapter objects,\n * file paths, credentials, or plugin-private state to the main session.\n *\n * The catalog is deliberately a pure snapshot. Installation, integrity\n * verification and activation remain explicit operations (`stage/verify/\n * activatePluginUpdateV1`) owned by a host or installer plugin.\n */\nexport function buildPluginCatalogV1(input: {\n\treadonly manifests: readonly PluginManifestV1[];\n\treadonly host: HostFactsV1;\n\treadonly required?: boolean;\n\treadonly disabledPluginIds?: readonly string[];\n\treadonly availableCapabilities?: readonly CapabilityRefV1[];\n\treadonly maxEntries?: number;\n}): PluginCatalogSnapshotV1 {\n\tconst maxEntries = input.maxEntries ?? DEFAULT_MAX_ENTRIES;\n\tif (!Number.isSafeInteger(maxEntries) || maxEntries < 1 || maxEntries > MAX_ENTRIES) {\n\t\tthrow new PluginCatalogErrorV1(\"invalid_limit\", `maxEntries must be an integer between 1 and ${MAX_ENTRIES}`);\n\t}\n\n\tconst manifests = [...input.manifests].sort(compareCatalogEntries);\n\tconst seen = new Set<string>();\n\tfor (const manifest of manifests) {\n\t\tconst identity = `${manifest.id}@${manifest.pluginVersion}`;\n\t\tif (seen.has(identity)) {\n\t\t\tthrow new PluginCatalogErrorV1(\n\t\t\t\t\"duplicate_plugin_version\",\n\t\t\t\t`Catalog contains duplicate plugin version: ${identity}`,\n\t\t\t);\n\t\t}\n\t\tseen.add(identity);\n\t}\n\n\tconst disabled = new Set(input.disabledPluginIds ?? []);\n\tconst entries = manifests.slice(0, maxEntries).map((manifest): PluginCatalogEntryV1 => {\n\t\tconst resolution = resolvePluginCompatibilityV1({\n\t\t\tmanifest,\n\t\t\thost: input.host,\n\t\t\trequired: input.required,\n\t\t\tdisabled: disabled.has(manifest.id),\n\t\t\tavailableCapabilities: input.availableCapabilities,\n\t\t\t// D-073: catalog snapshots enforce the declared host version range;\n\t\t\t// previously this path skipped the check entirely.\n\t\t\thostVersion: VERSION,\n\t\t});\n\t\treturn Object.freeze({\n\t\t\tpluginId: manifest.id,\n\t\t\tpluginVersion: manifest.pluginVersion,\n\t\t\tmanifestDigest: pluginManifestDigestV1(manifest),\n\t\t\tresolution,\n\t\t});\n\t});\n\treturn Object.freeze({ version: 1, entries: Object.freeze(entries), truncated: manifests.length > maxEntries });\n}\n\nexport function findPluginCatalogEntryV1(\n\tsnapshot: PluginCatalogSnapshotV1,\n\tpluginId: string,\n\tpluginVersion?: string,\n): PluginCatalogEntryV1 | undefined {\n\treturn snapshot.entries.find(\n\t\t(entry) => entry.pluginId === pluginId && (pluginVersion === undefined || entry.pluginVersion === pluginVersion),\n\t);\n}\n"]}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { PluginDistributionDescriptorV1, PluginDistributionV1 } from "./distribution.ts";
|
|
2
|
+
import { type PluginInstallerV1 } from "./installer.ts";
|
|
3
|
+
import { type PluginAcquisitionPackageV1 } from "./plugin-acquisition.ts";
|
|
4
|
+
import type { PluginSelectionStoreV1 } from "./selection-store.ts";
|
|
5
|
+
import type { PluginStateScopeV1, PluginStateStoreV1 } from "./state.ts";
|
|
6
|
+
import type { HostFactsV1, PluginManifestV1 } from "./types.ts";
|
|
7
|
+
export declare const PLUGIN_ECOSYSTEM_CLI_VERSION_V1: 1;
|
|
8
|
+
export declare const MAX_PLUGIN_ECOSYSTEM_CLI_OUTPUT_BYTES_V1: number;
|
|
9
|
+
export declare const MAX_PLUGIN_ECOSYSTEM_CLI_LIST_ENTRIES_V1 = 128;
|
|
10
|
+
export declare const MAX_PLUGIN_ECOSYSTEM_CLI_ARGS_V1: number;
|
|
11
|
+
export type PluginEcosystemCliOutputFormatV1 = "json" | "text";
|
|
12
|
+
export type PluginEcosystemCliCommandNameV1 = "catalog-list" | "state-list" | "selection-list" | "selection-set" | "selection-clear" | "enable" | "disable" | "remove" | "install" | "update";
|
|
13
|
+
export interface PluginRegistryPackageV1 {
|
|
14
|
+
readonly manifest: PluginManifestV1;
|
|
15
|
+
readonly source: string;
|
|
16
|
+
readonly expectedDigest?: string;
|
|
17
|
+
/** Optional signed package acquisition descriptor. It never contains package bytes or paths. */
|
|
18
|
+
readonly distribution?: PluginDistributionDescriptorV1;
|
|
19
|
+
}
|
|
20
|
+
/** Registry access is intentionally host-injected; this CLI never downloads itself. */
|
|
21
|
+
export interface PluginEcosystemRegistryV1 {
|
|
22
|
+
readonly list?: (input: {
|
|
23
|
+
readonly signal?: AbortSignal;
|
|
24
|
+
}) => readonly PluginManifestV1[] | Promise<readonly PluginManifestV1[]>;
|
|
25
|
+
readonly resolve: (input: {
|
|
26
|
+
readonly pluginId: string;
|
|
27
|
+
readonly pluginVersion?: string;
|
|
28
|
+
readonly signal?: AbortSignal;
|
|
29
|
+
}) => PluginRegistryPackageV1 | undefined | Promise<PluginRegistryPackageV1 | undefined>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Host-injected multi-source acquisition boundary for `plugin install <ref>`
|
|
33
|
+
* (npm / custom URL / local). Like registry access it is host-owned; the CLI
|
|
34
|
+
* never downloads by itself.
|
|
35
|
+
*/
|
|
36
|
+
export interface PluginEcosystemCliAcquisitionV1 {
|
|
37
|
+
readonly resolvePackage: (input: {
|
|
38
|
+
readonly ref: string;
|
|
39
|
+
readonly signal?: AbortSignal;
|
|
40
|
+
}) => Promise<PluginAcquisitionPackageV1>;
|
|
41
|
+
}
|
|
42
|
+
export interface PluginEcosystemCliOptionsV1 {
|
|
43
|
+
readonly host?: HostFactsV1;
|
|
44
|
+
readonly manifests?: readonly PluginManifestV1[];
|
|
45
|
+
readonly registry?: PluginEcosystemRegistryV1;
|
|
46
|
+
/** Optional multi-source acquisition boundary for `install <ref>` targets. */
|
|
47
|
+
readonly acquisition?: PluginEcosystemCliAcquisitionV1;
|
|
48
|
+
readonly installer?: PluginInstallerV1;
|
|
49
|
+
/** Host-owned descriptor verifier and artifact acquisition boundary. */
|
|
50
|
+
readonly distribution?: PluginDistributionV1;
|
|
51
|
+
readonly stateStore?: PluginStateStoreV1;
|
|
52
|
+
/** Alias for hosts that expose the persistence boundary as a state host. */
|
|
53
|
+
readonly stateHost?: PluginStateStoreV1;
|
|
54
|
+
/** Optional project-local state store. Global state remains the default. */
|
|
55
|
+
readonly projectStateStore?: PluginStateStoreV1;
|
|
56
|
+
/** Opaque concrete host namespace for project-scoped installations. */
|
|
57
|
+
readonly projectScopeRef?: string;
|
|
58
|
+
readonly selectionStore?: PluginSelectionStoreV1;
|
|
59
|
+
/** Alias for hosts that expose the persistence boundary as a selection host. */
|
|
60
|
+
readonly selectionHost?: PluginSelectionStoreV1;
|
|
61
|
+
/** Optional project-local selection store. Global selection remains the default. */
|
|
62
|
+
readonly projectSelectionStore?: PluginSelectionStoreV1;
|
|
63
|
+
}
|
|
64
|
+
export interface PluginEcosystemCliRequestV1 {
|
|
65
|
+
readonly argv: readonly string[];
|
|
66
|
+
readonly format?: PluginEcosystemCliOutputFormatV1;
|
|
67
|
+
readonly signal?: AbortSignal;
|
|
68
|
+
}
|
|
69
|
+
export interface PluginEcosystemCliParsedCommandV1 {
|
|
70
|
+
readonly version: typeof PLUGIN_ECOSYSTEM_CLI_VERSION_V1;
|
|
71
|
+
readonly command: PluginEcosystemCliCommandNameV1;
|
|
72
|
+
readonly format: PluginEcosystemCliOutputFormatV1;
|
|
73
|
+
readonly pluginId?: string;
|
|
74
|
+
readonly pluginVersion?: string;
|
|
75
|
+
/** Raw install/update target; kept so ref forms survive the identity split. */
|
|
76
|
+
readonly target?: string;
|
|
77
|
+
readonly profileId?: string;
|
|
78
|
+
readonly selectedPluginIds?: readonly string[];
|
|
79
|
+
readonly scope?: PluginStateScopeV1;
|
|
80
|
+
}
|
|
81
|
+
export type PluginEcosystemCliErrorCodeV1 = "invalid_command" | "unsupported_dependencies" | "not_found" | "not_installed" | "selection_failed" | "registry_failed" | "acquisition_failed" | "distribution_failed" | "incompatible" | "already_installed" | "installer_failed" | "uninstall_failed" | "state_failed" | "cancelled";
|
|
82
|
+
export interface PluginEcosystemCliErrorV1 {
|
|
83
|
+
readonly code: PluginEcosystemCliErrorCodeV1;
|
|
84
|
+
readonly message: string;
|
|
85
|
+
}
|
|
86
|
+
export interface PluginEcosystemCliResponseV1 {
|
|
87
|
+
readonly version: typeof PLUGIN_ECOSYSTEM_CLI_VERSION_V1;
|
|
88
|
+
readonly command: PluginEcosystemCliCommandNameV1 | "invalid";
|
|
89
|
+
readonly format: PluginEcosystemCliOutputFormatV1;
|
|
90
|
+
readonly status: "succeeded" | "failed" | "unsupported" | "cancelled";
|
|
91
|
+
readonly data?: Readonly<Record<string, unknown>>;
|
|
92
|
+
readonly text: string;
|
|
93
|
+
readonly error?: PluginEcosystemCliErrorV1;
|
|
94
|
+
}
|
|
95
|
+
export interface PluginEcosystemCliV1 {
|
|
96
|
+
readonly execute: (input: PluginEcosystemCliRequestV1) => Promise<PluginEcosystemCliResponseV1>;
|
|
97
|
+
}
|
|
98
|
+
/** Parse only the ecosystem command grammar; legacy package commands are not accepted. */
|
|
99
|
+
export declare function parsePluginEcosystemCliCommandV1(argv: readonly string[], defaultFormat?: PluginEcosystemCliOutputFormatV1): PluginEcosystemCliParsedCommandV1;
|
|
100
|
+
export declare function createPluginEcosystemCliV1(options: PluginEcosystemCliOptionsV1): PluginEcosystemCliV1;
|
|
101
|
+
export declare function runPluginEcosystemCliV1(options: PluginEcosystemCliOptionsV1, input: PluginEcosystemCliRequestV1): Promise<PluginEcosystemCliResponseV1>;
|
|
102
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/plugins/ecosystem/cli.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,8BAA8B,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9F,OAAO,EAAsC,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC5F,OAAO,EAGN,KAAK,0BAA0B,EAC/B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAuB,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC9F,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhE,eAAO,MAAM,+BAA+B,GAAa,CAAC;AAC1D,eAAO,MAAM,wCAAwC,QAAY,CAAC;AAClE,eAAO,MAAM,wCAAwC,MAAM,CAAC;AAC5D,eAAO,MAAM,gCAAgC,QAAkC,CAAC;AAEhF,MAAM,MAAM,gCAAgC,GAAG,MAAM,GAAG,MAAM,CAAC;AAC/D,MAAM,MAAM,+BAA+B,GACxC,cAAc,GACd,YAAY,GACZ,gBAAgB,GAChB,eAAe,GACf,iBAAiB,GACjB,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,SAAS,GACT,QAAQ,CAAC;AAEZ,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,gGAAgG;IAChG,QAAQ,CAAC,YAAY,CAAC,EAAE,8BAA8B,CAAC;CACvD;AAED,uFAAuF;AACvF,MAAM,WAAW,yBAAyB;IACzC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;KAC9B,KAAK,SAAS,gBAAgB,EAAE,GAAG,OAAO,CAAC,SAAS,gBAAgB,EAAE,CAAC,CAAC;IACzE,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE;QACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;QAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;KAC9B,KAAK,uBAAuB,GAAG,SAAS,GAAG,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC,CAAC;CACzF;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC/C,QAAQ,CAAC,cAAc,EAAE,CAAC,KAAK,EAAE;QAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;KAC9B,KAAK,OAAO,CAAC,0BAA0B,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,2BAA2B;IAC3C,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACjD,QAAQ,CAAC,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IAC9C,8EAA8E;IAC9E,QAAQ,CAAC,WAAW,CAAC,EAAE,+BAA+B,CAAC;IACvD,QAAQ,CAAC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IACvC,wEAAwE;IACxE,QAAQ,CAAC,YAAY,CAAC,EAAE,oBAAoB,CAAC;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IACzC,4EAA4E;IAC5E,QAAQ,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC;IACxC,4EAA4E;IAC5E,QAAQ,CAAC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IAChD,uEAAuE;IACvE,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACjD,gFAAgF;IAChF,QAAQ,CAAC,aAAa,CAAC,EAAE,sBAAsB,CAAC;IAChD,oFAAoF;IACpF,QAAQ,CAAC,qBAAqB,CAAC,EAAE,sBAAsB,CAAC;CACxD;AAED,MAAM,WAAW,2BAA2B;IAC3C,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,gCAAgC,CAAC;IACnD,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC9B;AAED,MAAM,WAAW,iCAAiC;IACjD,QAAQ,CAAC,OAAO,EAAE,OAAO,+BAA+B,CAAC;IACzD,QAAQ,CAAC,OAAO,EAAE,+BAA+B,CAAC;IAClD,QAAQ,CAAC,MAAM,EAAE,gCAAgC,CAAC;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,QAAQ,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAED,MAAM,MAAM,6BAA6B,GACtC,iBAAiB,GACjB,0BAA0B,GAC1B,WAAW,GACX,eAAe,GACf,kBAAkB,GAClB,iBAAiB,GACjB,oBAAoB,GACpB,qBAAqB,GACrB,cAAc,GACd,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,WAAW,CAAC;AAEf,MAAM,WAAW,yBAAyB;IACzC,QAAQ,CAAC,IAAI,EAAE,6BAA6B,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,4BAA4B;IAC5C,QAAQ,CAAC,OAAO,EAAE,OAAO,+BAA+B,CAAC;IACzD,QAAQ,CAAC,OAAO,EAAE,+BAA+B,GAAG,SAAS,CAAC;IAC9D,QAAQ,CAAC,MAAM,EAAE,gCAAgC,CAAC;IAClD,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,WAAW,CAAC;IACtE,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,yBAAyB,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,OAAO,CAAC,4BAA4B,CAAC,CAAC;CAChG;AA8BD,0FAA0F;AAC1F,wBAAgB,gCAAgC,CAC/C,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,aAAa,GAAE,gCAAyC,GACtD,iCAAiC,CAkInC;AAsSD,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,2BAA2B,GAAG,oBAAoB,CAspBrG;AAED,wBAAsB,uBAAuB,CAC5C,OAAO,EAAE,2BAA2B,EACpC,KAAK,EAAE,2BAA2B,GAChC,OAAO,CAAC,4BAA4B,CAAC,CAEvC","sourcesContent":["import { Buffer } from \"node:buffer\";\nimport { buildPluginCatalogV1 } from \"./catalog.ts\";\nimport type { PluginDistributionDescriptorV1, PluginDistributionV1 } from \"./distribution.ts\";\nimport { DEFAULT_GLOBAL_PLUGIN_SCOPE_REF_V1, type PluginInstallerV1 } from \"./installer.ts\";\nimport {\n\tisPluginAcquisitionRefTargetV1,\n\tPluginAcquisitionErrorV1,\n\ttype PluginAcquisitionPackageV1,\n} from \"./plugin-acquisition.ts\";\nimport { createPluginSelectionV1, MAX_PLUGIN_SELECTION_IDS_V1, type PluginSelectionV1 } from \"./selection.ts\";\nimport type { PluginSelectionStoreV1 } from \"./selection-store.ts\";\nimport type { PluginStateRecordV1, PluginStateScopeV1, PluginStateStoreV1 } from \"./state.ts\";\nimport type { HostFactsV1, PluginManifestV1 } from \"./types.ts\";\n\nexport const PLUGIN_ECOSYSTEM_CLI_VERSION_V1 = 1 as const;\nexport const MAX_PLUGIN_ECOSYSTEM_CLI_OUTPUT_BYTES_V1 = 64 * 1024;\nexport const MAX_PLUGIN_ECOSYSTEM_CLI_LIST_ENTRIES_V1 = 128;\nexport const MAX_PLUGIN_ECOSYSTEM_CLI_ARGS_V1 = MAX_PLUGIN_SELECTION_IDS_V1 + 8;\n\nexport type PluginEcosystemCliOutputFormatV1 = \"json\" | \"text\";\nexport type PluginEcosystemCliCommandNameV1 =\n\t| \"catalog-list\"\n\t| \"state-list\"\n\t| \"selection-list\"\n\t| \"selection-set\"\n\t| \"selection-clear\"\n\t| \"enable\"\n\t| \"disable\"\n\t| \"remove\"\n\t| \"install\"\n\t| \"update\";\n\nexport interface PluginRegistryPackageV1 {\n\treadonly manifest: PluginManifestV1;\n\treadonly source: string;\n\treadonly expectedDigest?: string;\n\t/** Optional signed package acquisition descriptor. It never contains package bytes or paths. */\n\treadonly distribution?: PluginDistributionDescriptorV1;\n}\n\n/** Registry access is intentionally host-injected; this CLI never downloads itself. */\nexport interface PluginEcosystemRegistryV1 {\n\treadonly list?: (input: {\n\t\treadonly signal?: AbortSignal;\n\t}) => readonly PluginManifestV1[] | Promise<readonly PluginManifestV1[]>;\n\treadonly resolve: (input: {\n\t\treadonly pluginId: string;\n\t\treadonly pluginVersion?: string;\n\t\treadonly signal?: AbortSignal;\n\t}) => PluginRegistryPackageV1 | undefined | Promise<PluginRegistryPackageV1 | undefined>;\n}\n\n/**\n * Host-injected multi-source acquisition boundary for `plugin install <ref>`\n * (npm / custom URL / local). Like registry access it is host-owned; the CLI\n * never downloads by itself.\n */\nexport interface PluginEcosystemCliAcquisitionV1 {\n\treadonly resolvePackage: (input: {\n\t\treadonly ref: string;\n\t\treadonly signal?: AbortSignal;\n\t}) => Promise<PluginAcquisitionPackageV1>;\n}\n\nexport interface PluginEcosystemCliOptionsV1 {\n\treadonly host?: HostFactsV1;\n\treadonly manifests?: readonly PluginManifestV1[];\n\treadonly registry?: PluginEcosystemRegistryV1;\n\t/** Optional multi-source acquisition boundary for `install <ref>` targets. */\n\treadonly acquisition?: PluginEcosystemCliAcquisitionV1;\n\treadonly installer?: PluginInstallerV1;\n\t/** Host-owned descriptor verifier and artifact acquisition boundary. */\n\treadonly distribution?: PluginDistributionV1;\n\treadonly stateStore?: PluginStateStoreV1;\n\t/** Alias for hosts that expose the persistence boundary as a state host. */\n\treadonly stateHost?: PluginStateStoreV1;\n\t/** Optional project-local state store. Global state remains the default. */\n\treadonly projectStateStore?: PluginStateStoreV1;\n\t/** Opaque concrete host namespace for project-scoped installations. */\n\treadonly projectScopeRef?: string;\n\treadonly selectionStore?: PluginSelectionStoreV1;\n\t/** Alias for hosts that expose the persistence boundary as a selection host. */\n\treadonly selectionHost?: PluginSelectionStoreV1;\n\t/** Optional project-local selection store. Global selection remains the default. */\n\treadonly projectSelectionStore?: PluginSelectionStoreV1;\n}\n\nexport interface PluginEcosystemCliRequestV1 {\n\treadonly argv: readonly string[];\n\treadonly format?: PluginEcosystemCliOutputFormatV1;\n\treadonly signal?: AbortSignal;\n}\n\nexport interface PluginEcosystemCliParsedCommandV1 {\n\treadonly version: typeof PLUGIN_ECOSYSTEM_CLI_VERSION_V1;\n\treadonly command: PluginEcosystemCliCommandNameV1;\n\treadonly format: PluginEcosystemCliOutputFormatV1;\n\treadonly pluginId?: string;\n\treadonly pluginVersion?: string;\n\t/** Raw install/update target; kept so ref forms survive the identity split. */\n\treadonly target?: string;\n\treadonly profileId?: string;\n\treadonly selectedPluginIds?: readonly string[];\n\treadonly scope?: PluginStateScopeV1;\n}\n\nexport type PluginEcosystemCliErrorCodeV1 =\n\t| \"invalid_command\"\n\t| \"unsupported_dependencies\"\n\t| \"not_found\"\n\t| \"not_installed\"\n\t| \"selection_failed\"\n\t| \"registry_failed\"\n\t| \"acquisition_failed\"\n\t| \"distribution_failed\"\n\t| \"incompatible\"\n\t| \"already_installed\"\n\t| \"installer_failed\"\n\t| \"uninstall_failed\"\n\t| \"state_failed\"\n\t| \"cancelled\";\n\nexport interface PluginEcosystemCliErrorV1 {\n\treadonly code: PluginEcosystemCliErrorCodeV1;\n\treadonly message: string;\n}\n\nexport interface PluginEcosystemCliResponseV1 {\n\treadonly version: typeof PLUGIN_ECOSYSTEM_CLI_VERSION_V1;\n\treadonly command: PluginEcosystemCliCommandNameV1 | \"invalid\";\n\treadonly format: PluginEcosystemCliOutputFormatV1;\n\treadonly status: \"succeeded\" | \"failed\" | \"unsupported\" | \"cancelled\";\n\treadonly data?: Readonly<Record<string, unknown>>;\n\treadonly text: string;\n\treadonly error?: PluginEcosystemCliErrorV1;\n}\n\nexport interface PluginEcosystemCliV1 {\n\treadonly execute: (input: PluginEcosystemCliRequestV1) => Promise<PluginEcosystemCliResponseV1>;\n}\n\ntype ResultData = Readonly<Record<string, unknown>>;\n\nfunction invalidInput(message: string): never {\n\tthrow new Error(message);\n}\n\nfunction validateToken(value: string, label: string): string {\n\tif (value.length === 0 || value.length > 256 || /[\\u0000-\\u001f\\s]/u.test(value))\n\t\tinvalidInput(`${label} is invalid`);\n\treturn value;\n}\n\nfunction parseIdentity(value: string): {\n\treadonly pluginId: string;\n\treadonly pluginVersion?: string;\n} {\n\tconst token = validateToken(value, \"plugin identity\");\n\tconst at = token.lastIndexOf(\"@\");\n\tif (at <= 0) return { pluginId: token };\n\tconst pluginId = token.slice(0, at);\n\tconst pluginVersion = token.slice(at + 1);\n\tif (pluginVersion.length === 0) invalidInput(\"plugin version is invalid\");\n\treturn {\n\t\tpluginId: validateToken(pluginId, \"plugin ID\"),\n\t\tpluginVersion: validateToken(pluginVersion, \"plugin version\"),\n\t};\n}\n\n/** Parse only the ecosystem command grammar; legacy package commands are not accepted. */\nexport function parsePluginEcosystemCliCommandV1(\n\targv: readonly string[],\n\tdefaultFormat: PluginEcosystemCliOutputFormatV1 = \"text\",\n): PluginEcosystemCliParsedCommandV1 {\n\tif (!Array.isArray(argv) || argv.length === 0 || argv.length > MAX_PLUGIN_ECOSYSTEM_CLI_ARGS_V1)\n\t\tinvalidInput(\"ecosystem command is invalid\");\n\tlet format = defaultFormat;\n\tif (format !== \"json\" && format !== \"text\") invalidInput(\"output format is invalid\");\n\tconst args = [...argv];\n\tlet explicitFormat: PluginEcosystemCliOutputFormatV1 | undefined;\n\tlet scope: PluginStateScopeV1 | undefined;\n\tlet pluginIdsOption: readonly string[] | undefined;\n\tfor (let index = args.length - 1; index >= 0; index -= 1) {\n\t\tconst token = args[index];\n\t\tconst inlineScope = token.startsWith(\"--scope=\") ? token.slice(\"--scope=\".length) : undefined;\n\t\tconst selectedScope = inlineScope ?? (token === \"--scope\" ? args[index + 1] : undefined);\n\t\tif (selectedScope !== undefined) {\n\t\t\tif (selectedScope !== \"global\" && selectedScope !== \"project\") invalidInput(\"state scope is invalid\");\n\t\t\tif (scope !== undefined && scope !== selectedScope) invalidInput(\"state scope is specified more than once\");\n\t\t\tscope = selectedScope;\n\t\t\targs.splice(index, token === \"--scope\" ? 2 : 1);\n\t\t\tcontinue;\n\t\t}\n\t\tconst inlineFormat = token.startsWith(\"--format=\") ? token.slice(\"--format=\".length) : undefined;\n\t\tconst selected =\n\t\t\ttoken === \"--json\" || token === \"--text\"\n\t\t\t\t? token === \"--json\"\n\t\t\t\t\t? \"json\"\n\t\t\t\t\t: \"text\"\n\t\t\t\t: (inlineFormat ?? (token === \"--format\" ? args[index + 1] : undefined));\n\t\tif (selected !== undefined) {\n\t\t\tif (selected !== \"json\" && selected !== \"text\") invalidInput(\"output format is invalid\");\n\t\t\tif (explicitFormat !== undefined && explicitFormat !== selected)\n\t\t\t\tinvalidInput(\"output format is specified more than once\");\n\t\t\texplicitFormat = selected as PluginEcosystemCliOutputFormatV1;\n\t\t\tformat = explicitFormat;\n\t\t\targs.splice(index, token === \"--format\" ? 2 : 1);\n\t\t\tcontinue;\n\t\t}\n\t\tconst inlinePlugins = token.startsWith(\"--plugins=\") ? token.slice(\"--plugins=\".length) : undefined;\n\t\tconst selectedPlugins = inlinePlugins ?? (token === \"--plugins\" ? args[index + 1] : undefined);\n\t\tif (selectedPlugins !== undefined) {\n\t\t\tif (pluginIdsOption !== undefined) invalidInput(\"plugin IDs are specified more than once\");\n\t\t\tconst ids = selectedPlugins.split(\",\");\n\t\t\tif (ids.length > MAX_PLUGIN_SELECTION_IDS_V1) invalidInput(\"too many plugin IDs\");\n\t\t\tpluginIdsOption = Object.freeze(ids.map((id: string) => validateToken(id, \"plugin ID\")));\n\t\t\targs.splice(index, token === \"--plugins\" ? 2 : 1);\n\t\t}\n\t}\n\tif (args.length === 0) invalidInput(\"ecosystem command is invalid\");\n\tconst [group, action, target, ...rest] = args;\n\tif (group === \"selection\" && action === \"set\" && target !== undefined) {\n\t\tif (pluginIdsOption !== undefined && rest.length > 0) invalidInput(\"plugin IDs must use one input form\");\n\t\tconst selectedPluginIds = pluginIdsOption ?? Object.freeze(rest.map((id) => validateToken(id, \"plugin ID\")));\n\t\tif (selectedPluginIds.length > MAX_PLUGIN_SELECTION_IDS_V1) invalidInput(\"too many plugin IDs\");\n\t\treturn Object.freeze({\n\t\t\tversion: 1,\n\t\t\tcommand: \"selection-set\",\n\t\t\tformat,\n\t\t\tprofileId: validateToken(target, \"profile ID\"),\n\t\t\tselectedPluginIds,\n\t\t\t...(scope === undefined ? {} : { scope }),\n\t\t});\n\t}\n\tif (rest.length > 0) invalidInput(\"ecosystem command has unsupported arguments\");\n\tif (group === \"catalog\" && action === \"list\" && target === undefined)\n\t\treturn Object.freeze({\n\t\t\tversion: 1,\n\t\t\tcommand: \"catalog-list\",\n\t\t\tformat,\n\t\t\t...(scope === undefined ? {} : { scope }),\n\t\t});\n\tif (group === \"state\" && action === \"list\" && target === undefined)\n\t\treturn Object.freeze({\n\t\t\tversion: 1,\n\t\t\tcommand: \"state-list\",\n\t\t\tformat,\n\t\t\t...(scope === undefined ? {} : { scope }),\n\t\t});\n\tif (group === \"selection\" && action === \"list\" && target === undefined)\n\t\treturn Object.freeze({\n\t\t\tversion: 1,\n\t\t\tcommand: \"selection-list\",\n\t\t\tformat,\n\t\t\t...(scope === undefined ? {} : { scope }),\n\t\t});\n\tif (group === \"selection\" && action === \"clear\" && target !== undefined)\n\t\treturn Object.freeze({\n\t\t\tversion: 1,\n\t\t\tcommand: \"selection-clear\",\n\t\t\tformat,\n\t\t\tprofileId: validateToken(target, \"profile ID\"),\n\t\t\t...(scope === undefined ? {} : { scope }),\n\t\t});\n\tif (group === \"state\" && (action === \"enable\" || action === \"disable\" || action === \"remove\") && target) {\n\t\tconst identity = parseIdentity(target);\n\t\treturn Object.freeze({\n\t\t\tversion: 1,\n\t\t\tcommand: action,\n\t\t\tformat,\n\t\t\t...(scope === undefined ? {} : { scope }),\n\t\t\t...identity,\n\t\t});\n\t}\n\t// Top-level aliases keep the common install/remove workflow concise while\n\t// preserving the explicit `state <action>` grammar for scripts.\n\tif ((group === \"enable\" || group === \"disable\" || group === \"remove\") && action) {\n\t\tconst identity = parseIdentity(action);\n\t\treturn Object.freeze({\n\t\t\tversion: 1,\n\t\t\tcommand: group,\n\t\t\tformat,\n\t\t\t...(scope === undefined ? {} : { scope }),\n\t\t\t...identity,\n\t\t});\n\t}\n\t// Install/update keeps the legacy `pluginId[@version]` identity grammar and\n\t// additionally preserves the raw target: refs with npm/path/URL markers\n\t// (`/`, `:`, `#`, leading `@`, `@^…`/`@~…`/`@latest`) route to the\n\t// acquisition boundary; bare IDs and exact-version identities keep the\n\t// registry resolve path unchanged.\n\tif ((group === \"install\" || group === \"update\") && action) {\n\t\tconst identity = parseIdentity(action);\n\t\treturn Object.freeze({\n\t\t\tversion: 1,\n\t\t\tcommand: group,\n\t\t\tformat,\n\t\t\ttarget: action,\n\t\t\t...(scope === undefined ? {} : { scope }),\n\t\t\t...identity,\n\t\t});\n\t}\n\tinvalidInput(\"ecosystem command is invalid\");\n}\n\nfunction response(\n\tcommand: PluginEcosystemCliResponseV1[\"command\"],\n\tformat: PluginEcosystemCliOutputFormatV1,\n\tstatus: PluginEcosystemCliResponseV1[\"status\"],\n\terror?: PluginEcosystemCliErrorV1,\n\tdata?: ResultData,\n): PluginEcosystemCliResponseV1 {\n\tlet safeData = data === undefined ? undefined : boundData(data);\n\tif (safeData !== undefined && Array.isArray(safeData.entries)) {\n\t\tlet entries = [...safeData.entries];\n\t\tconst originalEntryCount = entries.length;\n\t\twhile (entries.length > 0) {\n\t\t\tconst candidate = {\n\t\t\t\t...safeData,\n\t\t\t\tentries,\n\t\t\t\t...(entries.length < safeData.entries.length ? { truncated: true } : {}),\n\t\t\t};\n\t\t\tif (responseWithinBudget(command, format, status, error, candidate)) {\n\t\t\t\tsafeData = Object.freeze(candidate);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tentries = entries.slice(0, -1);\n\t\t}\n\t\tif (entries.length === 0 && originalEntryCount > 0)\n\t\t\tsafeData = Object.freeze({\n\t\t\t\tentries: Object.freeze([]),\n\t\t\t\ttruncated: true,\n\t\t\t});\n\t}\n\tif (!responseWithinBudget(command, format, status, error, safeData)) safeData = Object.freeze({ truncated: true });\n\tconst base = responseBase(command, format, status, error, safeData);\n\tconst humanText = error ? `${status}: ${error.message}` : formatText(command, status, safeData);\n\tconst text = format === \"json\" ? JSON.stringify(base) : humanText;\n\treturn Object.freeze({\n\t\t...base,\n\t\ttext: boundText(text),\n\t});\n}\n\nfunction responseWithinBudget(\n\tcommand: PluginEcosystemCliResponseV1[\"command\"],\n\tformat: PluginEcosystemCliOutputFormatV1,\n\tstatus: PluginEcosystemCliResponseV1[\"status\"],\n\terror: PluginEcosystemCliErrorV1 | undefined,\n\tdata: ResultData | undefined,\n): boolean {\n\tconst base = responseBase(command, format, status, error, data);\n\tconst humanText = error ? `${status}: ${error.message}` : formatText(command, status, data);\n\tconst text = format === \"json\" ? JSON.stringify(base) : humanText;\n\treturn responseByteLength({ ...base, text: boundText(text) }) <= MAX_PLUGIN_ECOSYSTEM_CLI_OUTPUT_BYTES_V1;\n}\n\nfunction responseBase(\n\tcommand: PluginEcosystemCliResponseV1[\"command\"],\n\tformat: PluginEcosystemCliOutputFormatV1,\n\tstatus: PluginEcosystemCliResponseV1[\"status\"],\n\terror: PluginEcosystemCliErrorV1 | undefined,\n\tdata: ResultData | undefined,\n): Omit<PluginEcosystemCliResponseV1, \"text\"> {\n\treturn {\n\t\tversion: PLUGIN_ECOSYSTEM_CLI_VERSION_V1,\n\t\tcommand,\n\t\tformat,\n\t\tstatus,\n\t\t...(data === undefined ? {} : { data }),\n\t\t...(error === undefined ? {} : { error }),\n\t};\n}\n\nfunction responseByteLength(value: unknown): number {\n\treturn Buffer.byteLength(JSON.stringify(value), \"utf8\");\n}\n\nfunction boundText(value: string): string {\n\tif (Buffer.byteLength(value, \"utf8\") <= MAX_PLUGIN_ECOSYSTEM_CLI_OUTPUT_BYTES_V1) return value;\n\tconst suffix = \"\\n[output truncated]\";\n\tlet lower = 0;\n\tlet upper = value.length;\n\twhile (lower < upper) {\n\t\tconst middle = Math.ceil((lower + upper) / 2);\n\t\tif (Buffer.byteLength(`${value.slice(0, middle)}${suffix}`, \"utf8\") <= MAX_PLUGIN_ECOSYSTEM_CLI_OUTPUT_BYTES_V1)\n\t\t\tlower = middle;\n\t\telse upper = middle - 1;\n\t}\n\treturn `${value.slice(0, lower)}${suffix}`;\n}\n\nfunction boundData(data: ResultData): ResultData {\n\tconst list = data.entries;\n\tif (!Array.isArray(list) || list.length <= MAX_PLUGIN_ECOSYSTEM_CLI_LIST_ENTRIES_V1)\n\t\treturn Object.freeze({ ...data });\n\treturn Object.freeze({\n\t\t...data,\n\t\tentries: Object.freeze(list.slice(0, MAX_PLUGIN_ECOSYSTEM_CLI_LIST_ENTRIES_V1)),\n\t\ttruncated: true,\n\t});\n}\n\nfunction formatText(command: string, status: string, data?: ResultData): string {\n\tif (data === undefined) return `${status}: ${command}`;\n\tconst entries = data.entries;\n\tif (Array.isArray(entries)) {\n\t\tconst lines = entries.map((entry) => {\n\t\t\tif (typeof entry !== \"object\" || entry === null) return String(entry);\n\t\t\tconst item = entry as Record<string, unknown>;\n\t\t\tconst id =\n\t\t\t\ttypeof item.profileId === \"string\"\n\t\t\t\t\t? `profile:${item.profileId}`\n\t\t\t\t\t: typeof item.pluginId === \"string\"\n\t\t\t\t\t\t? item.pluginId\n\t\t\t\t\t\t: \"plugin\";\n\t\t\tconst version = typeof item.pluginVersion === \"string\" ? `@${item.pluginVersion}` : \"\";\n\t\t\tconst state =\n\t\t\t\ttypeof item.status === \"string\"\n\t\t\t\t\t? ` ${item.status}`\n\t\t\t\t\t: typeof item.lifecycle === \"string\"\n\t\t\t\t\t\t? ` ${item.lifecycle}`\n\t\t\t\t\t\t: \"\";\n\t\t\treturn `${id}${version}${state}`;\n\t\t});\n\t\treturn [`${status}: ${command}`, ...lines, ...(data.truncated === true ? [\"[output truncated]\"] : [])].join(\"\\n\");\n\t}\n\tif (typeof data.profileId === \"string\") {\n\t\tconst selected = Array.isArray(data.selectedPluginIds) ? ` selected=${data.selectedPluginIds.join(\",\")}` : \"\";\n\t\tconst disabled = Array.isArray(data.disabledPluginIds) ? ` disabled=${data.disabledPluginIds.join(\",\")}` : \"\";\n\t\treturn `${status}: ${command} profile:${data.profileId}${selected}${disabled}`;\n\t}\n\treturn `${status}: ${command}`;\n}\n\nfunction safeError(code: PluginEcosystemCliErrorCodeV1): PluginEcosystemCliErrorV1 {\n\tconst messages: Record<PluginEcosystemCliErrorCodeV1, string> = {\n\t\tinvalid_command: \"The plugin ecosystem command is invalid\",\n\t\tunsupported_dependencies: \"The plugin ecosystem operation is unavailable on this host\",\n\t\tnot_found: \"The requested plugin was not found\",\n\t\tnot_installed: \"The requested plugin is not installed\",\n\t\tregistry_failed: \"The plugin registry operation failed\",\n\t\tacquisition_failed: \"The plugin package acquisition failed\",\n\t\tdistribution_failed: \"The plugin distribution operation failed\",\n\t\tincompatible: \"The requested plugin is incompatible with this host\",\n\t\talready_installed: \"This plugin version is already installed in the requested scope\",\n\t\tinstaller_failed: \"The plugin installer operation failed\",\n\t\tuninstall_failed: \"The host plugin uninstall operation failed\",\n\t\tstate_failed: \"The plugin state operation failed\",\n\t\tselection_failed: \"The plugin selection operation failed\",\n\t\tcancelled: \"Plugin ecosystem operation was cancelled\",\n\t};\n\treturn Object.freeze({ code, message: messages[code] });\n}\n\nfunction isCancelled(signal: AbortSignal | undefined): boolean {\n\treturn signal?.aborted === true;\n}\n\nfunction stateStoreOf(\n\toptions: PluginEcosystemCliOptionsV1,\n\tscope: PluginStateScopeV1 | undefined,\n): PluginStateStoreV1 | undefined {\n\tif (scope === \"project\") return options.projectStateStore;\n\treturn options.stateStore ?? options.stateHost;\n}\n\nfunction operationScope(scope: PluginStateScopeV1 | undefined): PluginStateScopeV1 {\n\treturn scope ?? \"global\";\n}\n\nfunction scopeRefOf(options: PluginEcosystemCliOptionsV1, scope: PluginStateScopeV1): string | undefined {\n\treturn scope === \"global\" ? DEFAULT_GLOBAL_PLUGIN_SCOPE_REF_V1 : options.projectScopeRef;\n}\n\nfunction installerSupportsScope(installer: PluginInstallerV1 | undefined, scope: PluginStateScopeV1): boolean {\n\treturn installer?.supportedScopes?.includes(scope) === true;\n}\n\nfunction selectionStoreOf(\n\toptions: PluginEcosystemCliOptionsV1,\n\tscope: PluginStateScopeV1 | undefined,\n): PluginSelectionStoreV1 | undefined {\n\tif (scope === \"project\") return options.projectSelectionStore;\n\treturn options.selectionStore ?? options.selectionHost;\n}\n\nfunction stateEntry(record: PluginStateRecordV1): Readonly<Record<string, unknown>> {\n\treturn Object.freeze({\n\t\tpluginId: record.pluginId,\n\t\tpluginVersion: record.pluginVersion,\n\t\tmanifestDigest: record.manifestDigest,\n\t\tscope: record.state.scope,\n\t\tscopeRef: record.state.scopeRef,\n\t\tenabled: record.state.enabled,\n\t\tlifecycle: record.state.lifecycle,\n\t\t...(record.source === undefined ? {} : { source: record.source }),\n\t});\n}\n\nfunction selectionEntry(selection: {\n\treadonly profileId: string;\n\treadonly selectedPluginIds: readonly string[];\n\treadonly disabledPluginIds: readonly string[];\n}): Readonly<Record<string, unknown>> {\n\treturn Object.freeze({\n\t\tprofileId: selection.profileId,\n\t\tselectedPluginIds: Object.freeze([...selection.selectedPluginIds]),\n\t\tdisabledPluginIds: Object.freeze([...selection.disabledPluginIds]),\n\t});\n}\n\nfunction catalogEntry(entry: {\n\treadonly pluginId: string;\n\treadonly pluginVersion: string;\n\treadonly manifestDigest: string;\n\treadonly resolution: {\n\t\treadonly status: string;\n\t\treadonly diagnostics: readonly { readonly code: string }[];\n\t};\n}): Readonly<Record<string, unknown>> {\n\treturn Object.freeze({\n\t\tpluginId: entry.pluginId,\n\t\tpluginVersion: entry.pluginVersion,\n\t\tmanifestDigest: entry.manifestDigest,\n\t\tstatus: entry.resolution.status,\n\t\tdiagnosticCodes: Object.freeze(entry.resolution.diagnostics.map((item) => item.code).slice(0, 16)),\n\t});\n}\n\nfunction findStateRecord(\n\trecords: readonly PluginStateRecordV1[],\n\tpluginId: string,\n\tpluginVersion?: string,\n\tscope?: PluginStateScopeV1,\n\tscopeRef?: string,\n): PluginStateRecordV1 | undefined {\n\treturn records.find(\n\t\t(record) =>\n\t\t\trecord.pluginId === pluginId &&\n\t\t\t(pluginVersion === undefined || record.pluginVersion === pluginVersion) &&\n\t\t\t(scope === undefined || record.state.scope === scope) &&\n\t\t\t(scopeRef === undefined || record.state.scopeRef === scopeRef),\n\t);\n}\n\nfunction findCurrentStateRecord(\n\trecords: readonly PluginStateRecordV1[],\n\tpluginId: string,\n\tscope?: PluginStateScopeV1,\n\tscopeRef?: string,\n): PluginStateRecordV1 | undefined {\n\treturn (\n\t\trecords.find(\n\t\t\t(record) =>\n\t\t\t\trecord.pluginId === pluginId &&\n\t\t\t\t(scope === undefined || record.state.scope === scope) &&\n\t\t\t\t(scopeRef === undefined || record.state.scopeRef === scopeRef) &&\n\t\t\t\trecord.state.lifecycle === \"active\",\n\t\t) ?? findStateRecord(records, pluginId, undefined, scope, scopeRef)\n\t);\n}\n\nfunction requireDependencies(\n\toptions: PluginEcosystemCliOptionsV1,\n\tscope: PluginStateScopeV1 | undefined,\n\tscopeRef: string | undefined,\n): asserts options is PluginEcosystemCliOptionsV1 & {\n\treadonly registry: PluginEcosystemRegistryV1;\n\treadonly installer: PluginInstallerV1;\n\treadonly host: HostFactsV1;\n} {\n\tconst requestedScope = operationScope(scope);\n\tif (\n\t\t!options.registry ||\n\t\t!options.installer ||\n\t\tscopeRef === undefined ||\n\t\t!installerSupportsScope(options.installer, requestedScope) ||\n\t\t!stateStoreOf(options, requestedScope) ||\n\t\t!options.host\n\t)\n\t\tthrow new Error(\"unsupported dependencies\");\n}\n\nasync function listManifests(\n\toptions: PluginEcosystemCliOptionsV1,\n\tsignal?: AbortSignal,\n): Promise<readonly PluginManifestV1[]> {\n\tif (options.registry?.list) return await options.registry.list({ signal });\n\tif (options.manifests) return options.manifests;\n\tthrow new Error(\"unsupported dependencies\");\n}\n\nfunction checkSignal(signal?: AbortSignal): void {\n\tif (isCancelled(signal)) throw new Error(\"cancelled\");\n}\n\nexport function createPluginEcosystemCliV1(options: PluginEcosystemCliOptionsV1): PluginEcosystemCliV1 {\n\t// Host installation and state persistence are a single logical transaction.\n\t// Serializing them prevents two same-version requests from both passing the\n\t// preflight state read and orphaning one physical installation.\n\tlet installTransactionTail: Promise<void> = Promise.resolve();\n\tasync function acquireInstallTransaction(): Promise<() => void> {\n\t\tlet release!: () => void;\n\t\tconst turn = new Promise<void>((resolve) => {\n\t\t\trelease = resolve;\n\t\t});\n\t\tconst previous = installTransactionTail;\n\t\tinstallTransactionTail = previous.then(\n\t\t\t() => turn,\n\t\t\t() => turn,\n\t\t);\n\t\tawait previous;\n\t\treturn release;\n\t}\n\n\tasync function execute(input: PluginEcosystemCliRequestV1): Promise<PluginEcosystemCliResponseV1> {\n\t\tlet parsed: PluginEcosystemCliParsedCommandV1;\n\t\ttry {\n\t\t\tparsed = parsePluginEcosystemCliCommandV1(input.argv, input.format ?? \"text\");\n\t\t} catch {\n\t\t\treturn response(\"invalid\", input.format === \"json\" ? \"json\" : \"text\", \"failed\", safeError(\"invalid_command\"));\n\t\t}\n\t\tconst releaseInstallTransaction =\n\t\t\tparsed.command === \"install\" || parsed.command === \"update\" ? await acquireInstallTransaction() : undefined;\n\t\ttry {\n\t\t\tconst signal = input.signal;\n\t\t\tconst requestedScope = operationScope(parsed.scope);\n\t\t\tconst scopeRef = scopeRefOf(options, requestedScope);\n\t\t\tif (isCancelled(signal)) return response(parsed.command, parsed.format, \"cancelled\", safeError(\"cancelled\"));\n\t\t\tif (scopeRef === undefined)\n\t\t\t\treturn response(parsed.command, parsed.format, \"unsupported\", safeError(\"unsupported_dependencies\"));\n\t\t\tlet phase: \"registry\" | \"distribution\" | \"state\" | \"selection\" | \"installer\" = \"registry\";\n\t\t\ttry {\n\t\t\t\tif (parsed.command === \"catalog-list\") {\n\t\t\t\t\tif (!options.host)\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"unsupported\", safeError(\"unsupported_dependencies\"));\n\t\t\t\t\tconst manifests = await listManifests(options, signal);\n\t\t\t\t\tcheckSignal(signal);\n\t\t\t\t\tconst snapshot = buildPluginCatalogV1({\n\t\t\t\t\t\tmanifests,\n\t\t\t\t\t\thost: options.host,\n\t\t\t\t\t\tmaxEntries: MAX_PLUGIN_ECOSYSTEM_CLI_LIST_ENTRIES_V1,\n\t\t\t\t\t});\n\t\t\t\t\treturn response(parsed.command, parsed.format, \"succeeded\", undefined, {\n\t\t\t\t\t\tversion: snapshot.version,\n\t\t\t\t\t\tentries: snapshot.entries.map(catalogEntry),\n\t\t\t\t\t\ttruncated: snapshot.truncated,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (parsed.command === \"selection-list\") {\n\t\t\t\t\tphase = \"selection\";\n\t\t\t\t\tconst selectionStore = selectionStoreOf(options, parsed.scope);\n\t\t\t\t\tif (!selectionStore)\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"unsupported\", safeError(\"unsupported_dependencies\"));\n\t\t\t\t\tconst result = await selectionStore.read({ signal });\n\t\t\t\t\tif (result.status === \"cancelled\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"cancelled\", safeError(\"cancelled\"));\n\t\t\t\t\tif (result.status === \"invalid\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"selection_failed\"));\n\t\t\t\t\treturn response(parsed.command, parsed.format, \"succeeded\", undefined, {\n\t\t\t\t\t\tversion: result.snapshot.version,\n\t\t\t\t\t\tscope: parsed.scope ?? \"global\",\n\t\t\t\t\t\tentries: result.snapshot.selections.map(selectionEntry),\n\t\t\t\t\t\ttruncated: false,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (parsed.command === \"selection-set\") {\n\t\t\t\t\tphase = \"selection\";\n\t\t\t\t\tconst selectionStore = selectionStoreOf(options, parsed.scope);\n\t\t\t\t\tif (!selectionStore)\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"unsupported\", safeError(\"unsupported_dependencies\"));\n\t\t\t\t\tlet selection: PluginSelectionV1;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tselection = createPluginSelectionV1({\n\t\t\t\t\t\t\tprofileId: parsed.profileId as string,\n\t\t\t\t\t\t\tselectedPluginIds: parsed.selectedPluginIds ?? [],\n\t\t\t\t\t\t\tdisabledPluginIds: [],\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch {\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"selection_failed\"));\n\t\t\t\t\t}\n\t\t\t\t\tconst result = await selectionStore.set({ selection, signal });\n\t\t\t\t\tif (result.status === \"cancelled\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"cancelled\", safeError(\"cancelled\"));\n\t\t\t\t\tif (result.status !== \"ok\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"selection_failed\"));\n\t\t\t\t\treturn response(parsed.command, parsed.format, \"succeeded\", undefined, {\n\t\t\t\t\t\tprofileId: selection.profileId,\n\t\t\t\t\t\tscope: parsed.scope ?? \"global\",\n\t\t\t\t\t\tselectedPluginIds: selection.selectedPluginIds,\n\t\t\t\t\t\tdisabledPluginIds: selection.disabledPluginIds,\n\t\t\t\t\t\tchanged: result.changed,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (parsed.command === \"selection-clear\") {\n\t\t\t\t\tphase = \"selection\";\n\t\t\t\t\tconst selectionStore = selectionStoreOf(options, parsed.scope);\n\t\t\t\t\tif (!selectionStore)\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"unsupported\", safeError(\"unsupported_dependencies\"));\n\t\t\t\t\tconst result = await selectionStore.clear({\n\t\t\t\t\t\tprofileId: parsed.profileId as string,\n\t\t\t\t\t\tsignal,\n\t\t\t\t\t});\n\t\t\t\t\tif (result.status === \"cancelled\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"cancelled\", safeError(\"cancelled\"));\n\t\t\t\t\tif (result.status !== \"ok\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"selection_failed\"));\n\t\t\t\t\treturn response(parsed.command, parsed.format, \"succeeded\", undefined, {\n\t\t\t\t\t\tprofileId: parsed.profileId,\n\t\t\t\t\t\tscope: parsed.scope ?? \"global\",\n\t\t\t\t\t\tchanged: result.changed,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (parsed.command === \"state-list\") {\n\t\t\t\t\tphase = \"state\";\n\t\t\t\t\tconst stateStore = stateStoreOf(options, requestedScope);\n\t\t\t\t\tif (!stateStore)\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"unsupported\", safeError(\"unsupported_dependencies\"));\n\t\t\t\t\tconst result = await stateStore.read({ signal });\n\t\t\t\t\tif (result.status === \"cancelled\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"cancelled\", safeError(\"cancelled\"));\n\t\t\t\t\tif (result.status === \"invalid\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"state_failed\"));\n\t\t\t\t\tconst records = result.snapshot.records.filter(\n\t\t\t\t\t\t(record) => record.state.scope === requestedScope && record.state.scopeRef === scopeRef,\n\t\t\t\t\t);\n\t\t\t\t\treturn response(parsed.command, parsed.format, \"succeeded\", undefined, {\n\t\t\t\t\t\tversion: result.snapshot.version,\n\t\t\t\t\t\tentries: records.map(stateEntry),\n\t\t\t\t\t\ttruncated: false,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (parsed.command === \"enable\" || parsed.command === \"disable\" || parsed.command === \"remove\") {\n\t\t\t\t\tphase = \"state\";\n\t\t\t\t\tif (\n\t\t\t\t\t\tparsed.command === \"remove\" &&\n\t\t\t\t\t\trequestedScope === \"project\" &&\n\t\t\t\t\t\t!installerSupportsScope(options.installer, requestedScope)\n\t\t\t\t\t)\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"unsupported\", safeError(\"unsupported_dependencies\"));\n\t\t\t\t\tconst stateStore = stateStoreOf(options, requestedScope);\n\t\t\t\t\tif (!stateStore)\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"unsupported\", safeError(\"unsupported_dependencies\"));\n\t\t\t\t\tconst current = await stateStore.read({ signal });\n\t\t\t\t\tif (current.status === \"cancelled\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"cancelled\", safeError(\"cancelled\"));\n\t\t\t\t\tif (current.status === \"invalid\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"state_failed\"));\n\t\t\t\t\tconst record =\n\t\t\t\t\t\tparsed.pluginVersion === undefined\n\t\t\t\t\t\t\t? findCurrentStateRecord(\n\t\t\t\t\t\t\t\t\tcurrent.snapshot.records,\n\t\t\t\t\t\t\t\t\tparsed.pluginId as string,\n\t\t\t\t\t\t\t\t\trequestedScope,\n\t\t\t\t\t\t\t\t\tscopeRef,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t: findStateRecord(\n\t\t\t\t\t\t\t\t\tcurrent.snapshot.records,\n\t\t\t\t\t\t\t\t\tparsed.pluginId as string,\n\t\t\t\t\t\t\t\t\tparsed.pluginVersion,\n\t\t\t\t\t\t\t\t\trequestedScope,\n\t\t\t\t\t\t\t\t\tscopeRef,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\tif (!record) return response(parsed.command, parsed.format, \"failed\", safeError(\"not_installed\"));\n\t\t\t\t\tif (parsed.command === \"remove\") {\n\t\t\t\t\t\t// Global state-only removal remains available for repairing stale records.\n\t\t\t\t\t\t// Project removal requires a scope-capable installer and host cleanup first.\n\t\t\t\t\t\tif (options.installer !== undefined) {\n\t\t\t\t\t\t\tlet removedFromHost: Awaited<ReturnType<PluginInstallerV1[\"remove\"]>>;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tremovedFromHost = await options.installer.remove({\n\t\t\t\t\t\t\t\t\tinstallation: {\n\t\t\t\t\t\t\t\t\t\tversion: 1,\n\t\t\t\t\t\t\t\t\t\tpluginId: record.pluginId,\n\t\t\t\t\t\t\t\t\t\tpluginVersion: record.pluginVersion,\n\t\t\t\t\t\t\t\t\t\tmanifestDigest: record.manifestDigest,\n\t\t\t\t\t\t\t\t\t\tscope: record.state.scope,\n\t\t\t\t\t\t\t\t\t\tscopeRef: record.state.scopeRef,\n\t\t\t\t\t\t\t\t\t\tinstallationRef: record.installationRef,\n\t\t\t\t\t\t\t\t\t\tstate: record.state.lifecycle,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tscope: requestedScope,\n\t\t\t\t\t\t\t\t\tscopeRef,\n\t\t\t\t\t\t\t\t\tsignal,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"uninstall_failed\"));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (removedFromHost.status !== \"succeeded\")\n\t\t\t\t\t\t\t\treturn response(\n\t\t\t\t\t\t\t\t\tparsed.command,\n\t\t\t\t\t\t\t\t\tparsed.format,\n\t\t\t\t\t\t\t\t\tremovedFromHost.status === \"cancelled\" ? \"cancelled\" : \"failed\",\n\t\t\t\t\t\t\t\t\tsafeError(removedFromHost.status === \"cancelled\" ? \"cancelled\" : \"uninstall_failed\"),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst removed = await stateStore.remove({\n\t\t\t\t\t\t\tpluginId: record.pluginId,\n\t\t\t\t\t\t\tpluginVersion: record.pluginVersion,\n\t\t\t\t\t\t\tscope: requestedScope,\n\t\t\t\t\t\t\tscopeRef,\n\t\t\t\t\t\t\tsignal,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (removed.status === \"cancelled\")\n\t\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"cancelled\", safeError(\"cancelled\"));\n\t\t\t\t\t\tif (removed.status !== \"ok\")\n\t\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"state_failed\"));\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"succeeded\", undefined, {\n\t\t\t\t\t\t\tpluginId: record.pluginId,\n\t\t\t\t\t\t\tpluginVersion: record.pluginVersion,\n\t\t\t\t\t\t\t...(options.installer === undefined ? {} : { hostRemoved: true }),\n\t\t\t\t\t\t\tchanged: removed.changed,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tconst enabled = parsed.command === \"enable\";\n\t\t\t\t\tconst updated = await stateStore.upsert({\n\t\t\t\t\t\tinstallation: {\n\t\t\t\t\t\t\tversion: 1,\n\t\t\t\t\t\t\tpluginId: record.pluginId,\n\t\t\t\t\t\t\tpluginVersion: record.pluginVersion,\n\t\t\t\t\t\t\tmanifestDigest: record.manifestDigest,\n\t\t\t\t\t\t\tscope: record.state.scope,\n\t\t\t\t\t\t\tscopeRef: record.state.scopeRef,\n\t\t\t\t\t\t\tinstallationRef: record.installationRef,\n\t\t\t\t\t\t\tstate: record.state.lifecycle,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tscope: requestedScope,\n\t\t\t\t\t\tenabled,\n\t\t\t\t\t\t...(record.source === undefined ? {} : { source: record.source }),\n\t\t\t\t\t\tsignal,\n\t\t\t\t\t});\n\t\t\t\t\tif (updated.status === \"cancelled\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"cancelled\", safeError(\"cancelled\"));\n\t\t\t\t\tif (updated.status !== \"ok\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"state_failed\"));\n\t\t\t\t\treturn response(parsed.command, parsed.format, \"succeeded\", undefined, {\n\t\t\t\t\t\tpluginId: record.pluginId,\n\t\t\t\t\t\tpluginVersion: record.pluginVersion,\n\t\t\t\t\t\tenabled,\n\t\t\t\t\t\tchanged: updated.changed,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t// install/update must have every host boundary injected. They never claim success with partial services.\n\t\t\t\tconst stateStore = stateStoreOf(options, requestedScope);\n\t\t\t\t// Const locals keep the narrowing alive inside the shared install flow closure.\n\t\t\t\tconst installer = options.installer;\n\t\t\t\tconst host = options.host;\n\t\t\t\tconst acquisitionTarget =\n\t\t\t\t\tparsed.command === \"install\" &&\n\t\t\t\t\tparsed.target !== undefined &&\n\t\t\t\t\tisPluginAcquisitionRefTargetV1(parsed.target)\n\t\t\t\t\t\t? parsed.target\n\t\t\t\t\t\t: undefined;\n\t\t\t\tif (\n\t\t\t\t\t!stateStore ||\n\t\t\t\t\t!installer ||\n\t\t\t\t\t!host ||\n\t\t\t\t\t!installerSupportsScope(installer, requestedScope) ||\n\t\t\t\t\t(acquisitionTarget === undefined && !options.registry)\n\t\t\t\t)\n\t\t\t\t\treturn response(parsed.command, parsed.format, \"unsupported\", safeError(\"unsupported_dependencies\"));\n\t\t\t\t// One shared install transaction serves both resolutions: the legacy\n\t\t\t\t// registry resolve path and the multi-source acquisition ref path.\n\t\t\t\tconst runInstallFlow = async (resolved: {\n\t\t\t\t\treadonly manifest: PluginManifestV1;\n\t\t\t\t\treadonly source: string;\n\t\t\t\t\treadonly expectedDigest?: string;\n\t\t\t\t\treadonly distribution?: PluginDistributionDescriptorV1;\n\t\t\t\t\treadonly acquired?: PluginAcquisitionPackageV1;\n\t\t\t\t}): Promise<PluginEcosystemCliResponseV1> => {\n\t\t\t\t\tphase = \"state\";\n\t\t\t\t\tconst current = await stateStore.read({ signal });\n\t\t\t\t\tif (current.status === \"cancelled\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"cancelled\", safeError(\"cancelled\"));\n\t\t\t\t\tif (current.status === \"invalid\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"state_failed\"));\n\t\t\t\t\tconst previous = findCurrentStateRecord(\n\t\t\t\t\t\tcurrent.snapshot.records,\n\t\t\t\t\t\tresolved.manifest.id,\n\t\t\t\t\t\trequestedScope,\n\t\t\t\t\t\tscopeRef,\n\t\t\t\t\t);\n\t\t\t\t\tconst installedVersion = findStateRecord(\n\t\t\t\t\t\tcurrent.snapshot.records,\n\t\t\t\t\t\tresolved.manifest.id,\n\t\t\t\t\t\tresolved.manifest.pluginVersion,\n\t\t\t\t\t\trequestedScope,\n\t\t\t\t\t\tscopeRef,\n\t\t\t\t\t);\n\t\t\t\t\tif (installedVersion !== undefined)\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"already_installed\"));\n\t\t\t\t\tif (parsed.command === \"update\" && (!previous || previous.state.lifecycle !== \"active\"))\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"not_installed\"));\n\t\t\t\t\tphase = \"installer\";\n\t\t\t\t\tconst verified = installer.prepare({\n\t\t\t\t\t\tmanifest: resolved.manifest,\n\t\t\t\t\t\tsource: resolved.source,\n\t\t\t\t\t\thost,\n\t\t\t\t\t\t...(resolved.expectedDigest === undefined ? {} : { expectedDigest: resolved.expectedDigest }),\n\t\t\t\t\t});\n\t\t\t\t\tif (verified.status !== \"verified\")\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"incompatible\"));\n\t\t\t\t\tlet artifact: Awaited<ReturnType<PluginDistributionV1[\"acquireArtifact\"]>> | undefined =\n\t\t\t\t\t\tresolved.acquired?.artifact;\n\t\t\t\t\tif (resolved.distribution !== undefined) {\n\t\t\t\t\t\tif (options.distribution === undefined)\n\t\t\t\t\t\t\treturn response(\n\t\t\t\t\t\t\t\tparsed.command,\n\t\t\t\t\t\t\t\tparsed.format,\n\t\t\t\t\t\t\t\t\"unsupported\",\n\t\t\t\t\t\t\t\tsafeError(\"unsupported_dependencies\"),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tphase = \"distribution\";\n\t\t\t\t\t\tconst descriptor = options.distribution.validateDescriptor(resolved.distribution);\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tdescriptor.pluginId !== verified.record.pluginId ||\n\t\t\t\t\t\t\tdescriptor.pluginVersion !== verified.record.pluginVersion ||\n\t\t\t\t\t\t\tdescriptor.manifestDigest !== verified.record.manifestDigest\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"incompatible\"));\n\t\t\t\t\t\tartifact = await options.distribution.acquireArtifact({\n\t\t\t\t\t\t\tdescriptor,\n\t\t\t\t\t\t\tsignal,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tlet artifactReleased = false;\n\t\t\t\t\tconst releaseArtifact = async (): Promise<boolean> => {\n\t\t\t\t\t\tif (artifact === undefined || artifactReleased) return true;\n\t\t\t\t\t\tconst previousPhase = phase;\n\t\t\t\t\t\tphase = \"distribution\";\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (resolved.acquired !== undefined) {\n\t\t\t\t\t\t\t\t// Acquisition artifacts are owned by the acquisition boundary.\n\t\t\t\t\t\t\t\tconst released = await resolved.acquired.release();\n\t\t\t\t\t\t\t\tif (!released) return false;\n\t\t\t\t\t\t\t\tartifactReleased = true;\n\t\t\t\t\t\t\t\tphase = previousPhase;\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Cleanup must complete even after the caller has cancelled the workflow.\n\t\t\t\t\t\t\tif (options.distribution === undefined) return false;\n\t\t\t\t\t\t\tawait options.distribution.releaseArtifact({ artifact });\n\t\t\t\t\t\t\tartifactReleased = true;\n\t\t\t\t\t\t\tphase = previousPhase;\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tlet transactionResponse: PluginEcosystemCliResponseV1 | undefined;\n\t\t\t\t\tlet transactionError: unknown;\n\t\t\t\t\tlet artifactCleanupFailed = false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttransactionResponse = await (async (): Promise<PluginEcosystemCliResponseV1> => {\n\t\t\t\t\t\t\tcheckSignal(signal);\n\t\t\t\t\t\t\tphase = \"installer\";\n\t\t\t\t\t\t\tconst installed = await installer.install({\n\t\t\t\t\t\t\t\trecord: verified.record,\n\t\t\t\t\t\t\t\tscope: requestedScope,\n\t\t\t\t\t\t\t\tscopeRef,\n\t\t\t\t\t\t\t\t...(artifact === undefined ? {} : { artifact }),\n\t\t\t\t\t\t\t\tsignal,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (installed.status !== \"succeeded\") {\n\t\t\t\t\t\t\t\tif (!(await releaseArtifact()))\n\t\t\t\t\t\t\t\t\treturn response(\n\t\t\t\t\t\t\t\t\t\tparsed.command,\n\t\t\t\t\t\t\t\t\t\tparsed.format,\n\t\t\t\t\t\t\t\t\t\tisCancelled(signal) ? \"cancelled\" : \"failed\",\n\t\t\t\t\t\t\t\t\t\tsafeError(isCancelled(signal) ? \"cancelled\" : \"distribution_failed\"),\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\treturn response(\n\t\t\t\t\t\t\t\t\tparsed.command,\n\t\t\t\t\t\t\t\t\tparsed.format,\n\t\t\t\t\t\t\t\t\tinstalled.status === \"cancelled\" ? \"cancelled\" : \"failed\",\n\t\t\t\t\t\t\t\t\tsafeError(installed.status === \"cancelled\" ? \"cancelled\" : \"installer_failed\"),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst activated = await installer.activate({\n\t\t\t\t\t\t\t\tinstallation: installed.installation,\n\t\t\t\t\t\t\t\trecord: verified.record,\n\t\t\t\t\t\t\t\tscope: requestedScope,\n\t\t\t\t\t\t\t\tscopeRef,\n\t\t\t\t\t\t\t\tsignal,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (activated.status !== \"succeeded\") {\n\t\t\t\t\t\t\t\tif (previous && previous.state.lifecycle === \"active\") {\n\t\t\t\t\t\t\t\t\tconst rollback = await installer.rollback({\n\t\t\t\t\t\t\t\t\t\tfailed: installed.installation,\n\t\t\t\t\t\t\t\t\t\tprevious: {\n\t\t\t\t\t\t\t\t\t\t\tversion: 1,\n\t\t\t\t\t\t\t\t\t\t\tpluginId: previous.pluginId,\n\t\t\t\t\t\t\t\t\t\t\tpluginVersion: previous.pluginVersion,\n\t\t\t\t\t\t\t\t\t\t\tmanifestDigest: previous.manifestDigest,\n\t\t\t\t\t\t\t\t\t\t\tscope: previous.state.scope,\n\t\t\t\t\t\t\t\t\t\t\tscopeRef: previous.state.scopeRef,\n\t\t\t\t\t\t\t\t\t\t\tinstallationRef: previous.installationRef,\n\t\t\t\t\t\t\t\t\t\t\tstate: \"active\",\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tscope: requestedScope,\n\t\t\t\t\t\t\t\t\t\tscopeRef,\n\t\t\t\t\t\t\t\t\t\tsignal: undefined,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tif (rollback.status !== \"succeeded\")\n\t\t\t\t\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"installer_failed\"));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tconst removed = await installer.remove({\n\t\t\t\t\t\t\t\t\tinstallation: installed.installation,\n\t\t\t\t\t\t\t\t\tscope: requestedScope,\n\t\t\t\t\t\t\t\t\tscopeRef,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tif (removed.status !== \"succeeded\")\n\t\t\t\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"installer_failed\"));\n\t\t\t\t\t\t\t\tif (!(await releaseArtifact()))\n\t\t\t\t\t\t\t\t\treturn response(\n\t\t\t\t\t\t\t\t\t\tparsed.command,\n\t\t\t\t\t\t\t\t\t\tparsed.format,\n\t\t\t\t\t\t\t\t\t\tisCancelled(signal) ? \"cancelled\" : \"failed\",\n\t\t\t\t\t\t\t\t\t\tsafeError(isCancelled(signal) ? \"cancelled\" : \"distribution_failed\"),\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\treturn response(\n\t\t\t\t\t\t\t\t\tparsed.command,\n\t\t\t\t\t\t\t\t\tparsed.format,\n\t\t\t\t\t\t\t\t\tactivated.status === \"cancelled\" ? \"cancelled\" : \"failed\",\n\t\t\t\t\t\t\t\t\tsafeError(activated.status === \"cancelled\" ? \"cancelled\" : \"installer_failed\"),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst restoreActivatedInstallation = async (): Promise<boolean> => {\n\t\t\t\t\t\t\t\tconst replacesPrevious =\n\t\t\t\t\t\t\t\t\tprevious !== undefined &&\n\t\t\t\t\t\t\t\t\t`${previous.pluginId}@${previous.pluginVersion}` !==\n\t\t\t\t\t\t\t\t\t\t`${activated.installation.pluginId}@${activated.installation.pluginVersion}`;\n\t\t\t\t\t\t\t\tif (replacesPrevious && previous.state.lifecycle === \"active\") {\n\t\t\t\t\t\t\t\t\tconst rollback = await installer.rollback({\n\t\t\t\t\t\t\t\t\t\tfailed: activated.installation,\n\t\t\t\t\t\t\t\t\t\tprevious: {\n\t\t\t\t\t\t\t\t\t\t\tversion: 1,\n\t\t\t\t\t\t\t\t\t\t\tpluginId: previous.pluginId,\n\t\t\t\t\t\t\t\t\t\t\tpluginVersion: previous.pluginVersion,\n\t\t\t\t\t\t\t\t\t\t\tmanifestDigest: previous.manifestDigest,\n\t\t\t\t\t\t\t\t\t\t\tscope: previous.state.scope,\n\t\t\t\t\t\t\t\t\t\t\tscopeRef: previous.state.scopeRef,\n\t\t\t\t\t\t\t\t\t\t\tinstallationRef: previous.installationRef,\n\t\t\t\t\t\t\t\t\t\t\tstate: \"active\",\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tscope: requestedScope,\n\t\t\t\t\t\t\t\t\t\tscopeRef,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tif (rollback.status !== \"succeeded\") return false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (previous !== undefined && !replacesPrevious) return true;\n\t\t\t\t\t\t\t\tconst removed = await installer.remove({\n\t\t\t\t\t\t\t\t\tinstallation: activated.installation,\n\t\t\t\t\t\t\t\t\tscope: requestedScope,\n\t\t\t\t\t\t\t\t\tscopeRef,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\treturn removed.status === \"succeeded\";\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tconst restoreState = async (): Promise<boolean> => {\n\t\t\t\t\t\t\t\tconst replacesPrevious =\n\t\t\t\t\t\t\t\t\tprevious !== undefined &&\n\t\t\t\t\t\t\t\t\t`${previous.pluginId}@${previous.pluginVersion}` !==\n\t\t\t\t\t\t\t\t\t\t`${activated.installation.pluginId}@${activated.installation.pluginVersion}`;\n\t\t\t\t\t\t\t\tlet restored = true;\n\t\t\t\t\t\t\t\tif (previous === undefined || replacesPrevious) {\n\t\t\t\t\t\t\t\t\tconst removed = await stateStore\n\t\t\t\t\t\t\t\t\t\t.remove({\n\t\t\t\t\t\t\t\t\t\t\tpluginId: activated.installation.pluginId,\n\t\t\t\t\t\t\t\t\t\t\tpluginVersion: activated.installation.pluginVersion,\n\t\t\t\t\t\t\t\t\t\t\tscope: requestedScope,\n\t\t\t\t\t\t\t\t\t\t\tscopeRef,\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch(() => undefined);\n\t\t\t\t\t\t\t\t\trestored = removed?.status === \"ok\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (previous !== undefined) {\n\t\t\t\t\t\t\t\t\tconst restoredPrevious = await stateStore\n\t\t\t\t\t\t\t\t\t\t.upsert({\n\t\t\t\t\t\t\t\t\t\t\tinstallation: {\n\t\t\t\t\t\t\t\t\t\t\t\tversion: 1,\n\t\t\t\t\t\t\t\t\t\t\t\tpluginId: previous.pluginId,\n\t\t\t\t\t\t\t\t\t\t\t\tpluginVersion: previous.pluginVersion,\n\t\t\t\t\t\t\t\t\t\t\t\tmanifestDigest: previous.manifestDigest,\n\t\t\t\t\t\t\t\t\t\t\t\tscope: previous.state.scope,\n\t\t\t\t\t\t\t\t\t\t\t\tscopeRef: previous.state.scopeRef,\n\t\t\t\t\t\t\t\t\t\t\t\tinstallationRef: previous.installationRef,\n\t\t\t\t\t\t\t\t\t\t\t\tstate: \"active\",\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\tscope: requestedScope,\n\t\t\t\t\t\t\t\t\t\t\tenabled: previous.state.enabled,\n\t\t\t\t\t\t\t\t\t\t\t...(previous.source === undefined ? {} : { source: previous.source }),\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t.catch(() => undefined);\n\t\t\t\t\t\t\t\t\trestored = restored && restoredPrevious?.status === \"ok\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn restored;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tconst stateFailure = async (\n\t\t\t\t\t\t\t\tstatus: \"failed\" | \"cancelled\",\n\t\t\t\t\t\t\t): Promise<PluginEcosystemCliResponseV1> => {\n\t\t\t\t\t\t\t\tconst [hostRestored, stateRestored] = await Promise.all([\n\t\t\t\t\t\t\t\t\trestoreActivatedInstallation().catch(() => false),\n\t\t\t\t\t\t\t\t\trestoreState().catch(() => false),\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\treturn response(\n\t\t\t\t\t\t\t\t\tparsed.command,\n\t\t\t\t\t\t\t\t\tparsed.format,\n\t\t\t\t\t\t\t\t\thostRestored && stateRestored ? status : \"failed\",\n\t\t\t\t\t\t\t\t\tsafeError(\n\t\t\t\t\t\t\t\t\t\thostRestored && stateRestored\n\t\t\t\t\t\t\t\t\t\t\t? status === \"cancelled\"\n\t\t\t\t\t\t\t\t\t\t\t\t? \"cancelled\"\n\t\t\t\t\t\t\t\t\t\t\t\t: \"state_failed\"\n\t\t\t\t\t\t\t\t\t\t\t: \"installer_failed\",\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tif (!(await releaseArtifact())) {\n\t\t\t\t\t\t\t\tphase = \"installer\";\n\t\t\t\t\t\t\t\tconst restored = await restoreActivatedInstallation().catch(() => false);\n\t\t\t\t\t\t\t\treturn response(\n\t\t\t\t\t\t\t\t\tparsed.command,\n\t\t\t\t\t\t\t\t\tparsed.format,\n\t\t\t\t\t\t\t\t\t\"failed\",\n\t\t\t\t\t\t\t\t\tsafeError(restored ? \"distribution_failed\" : \"installer_failed\"),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tphase = \"state\";\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tprevious &&\n\t\t\t\t\t\t\t\t`${previous.pluginId}@${previous.pluginVersion}` !==\n\t\t\t\t\t\t\t\t\t`${installed.installation.pluginId}@${installed.installation.pluginVersion}`\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tconst retained = await stateStore.upsert({\n\t\t\t\t\t\t\t\t\tinstallation: {\n\t\t\t\t\t\t\t\t\t\tversion: 1,\n\t\t\t\t\t\t\t\t\t\tpluginId: previous.pluginId,\n\t\t\t\t\t\t\t\t\t\tpluginVersion: previous.pluginVersion,\n\t\t\t\t\t\t\t\t\t\tmanifestDigest: previous.manifestDigest,\n\t\t\t\t\t\t\t\t\t\tscope: previous.state.scope,\n\t\t\t\t\t\t\t\t\t\tscopeRef: previous.state.scopeRef,\n\t\t\t\t\t\t\t\t\t\tinstallationRef: previous.installationRef,\n\t\t\t\t\t\t\t\t\t\tstate: \"retained\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tscope: requestedScope,\n\t\t\t\t\t\t\t\t\tenabled: previous.state.enabled,\n\t\t\t\t\t\t\t\t\t...(previous.source === undefined ? {} : { source: previous.source }),\n\t\t\t\t\t\t\t\t\tsignal: undefined,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tif (retained.status !== \"ok\") return await stateFailure(\"failed\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst persisted = await stateStore.upsert({\n\t\t\t\t\t\t\t\tinstallation: activated.installation,\n\t\t\t\t\t\t\t\tscope: requestedScope,\n\t\t\t\t\t\t\t\tenabled: previous?.state.enabled ?? true,\n\t\t\t\t\t\t\t\t...(resolved.acquired === undefined ? {} : { source: resolved.source }),\n\t\t\t\t\t\t\t\tsignal,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (persisted.status === \"cancelled\") return await stateFailure(\"cancelled\");\n\t\t\t\t\t\t\tif (persisted.status !== \"ok\") return await stateFailure(\"failed\");\n\t\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"succeeded\", undefined, {\n\t\t\t\t\t\t\t\tpluginId: activated.installation.pluginId,\n\t\t\t\t\t\t\t\tpluginVersion: activated.installation.pluginVersion,\n\t\t\t\t\t\t\t\tlifecycle: \"active\",\n\t\t\t\t\t\t\t\tchanged: persisted.changed,\n\t\t\t\t\t\t\t\t...(resolved.acquired === undefined ? {} : { source: resolved.source }),\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t})();\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\ttransactionError = error;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tartifactCleanupFailed = !(await releaseArtifact());\n\t\t\t\t\t}\n\t\t\t\t\tif (artifactCleanupFailed)\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"distribution_failed\"));\n\t\t\t\t\tif (transactionError !== undefined) throw transactionError;\n\t\t\t\t\tif (transactionResponse === undefined)\n\t\t\t\t\t\tthrow new Error(\"plugin installation transaction did not complete\");\n\t\t\t\t\treturn transactionResponse;\n\t\t\t\t};\n\t\t\t\tif (acquisitionTarget !== undefined) {\n\t\t\t\t\t// Ref installs consult the acquisition boundary instead of the\n\t\t\t\t\t// registry; the shared guard above already verified installer,\n\t\t\t\t\t// host, state store, and scope support.\n\t\t\t\t\tif (options.acquisition === undefined)\n\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"unsupported\", safeError(\"unsupported_dependencies\"));\n\t\t\t\t\tphase = \"distribution\";\n\t\t\t\t\tlet acquired: PluginAcquisitionPackageV1;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tacquired = await options.acquisition.resolvePackage({ ref: acquisitionTarget, signal });\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tif (isCancelled(signal) || (error instanceof PluginAcquisitionErrorV1 && error.code === \"cancelled\"))\n\t\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"cancelled\", safeError(\"cancelled\"));\n\t\t\t\t\t\tif (error instanceof PluginAcquisitionErrorV1)\n\t\t\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", {\n\t\t\t\t\t\t\t\tcode: \"acquisition_failed\",\n\t\t\t\t\t\t\t\tmessage: error.message,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\t\t\t\t\tcheckSignal(signal);\n\t\t\t\t\treturn await runInstallFlow({\n\t\t\t\t\t\tmanifest: acquired.manifest,\n\t\t\t\t\t\tsource: acquired.source,\n\t\t\t\t\t\tacquired,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\trequireDependencies(options, requestedScope, scopeRef);\n\t\t\t\t} catch {\n\t\t\t\t\treturn response(parsed.command, parsed.format, \"unsupported\", safeError(\"unsupported_dependencies\"));\n\t\t\t\t}\n\t\t\t\tconst identity = parsed.pluginId as string;\n\t\t\t\tconst packageValue = await options.registry.resolve({\n\t\t\t\t\tpluginId: identity,\n\t\t\t\t\tpluginVersion: parsed.pluginVersion,\n\t\t\t\t\tsignal,\n\t\t\t\t});\n\t\t\t\tcheckSignal(signal);\n\t\t\t\tif (!packageValue) return response(parsed.command, parsed.format, \"failed\", safeError(\"not_found\"));\n\t\t\t\tif (\n\t\t\t\t\tpackageValue.manifest.id !== identity ||\n\t\t\t\t\t(parsed.pluginVersion !== undefined && packageValue.manifest.pluginVersion !== parsed.pluginVersion)\n\t\t\t\t)\n\t\t\t\t\treturn response(parsed.command, parsed.format, \"failed\", safeError(\"not_found\"));\n\t\t\t\treturn await runInstallFlow({\n\t\t\t\t\tmanifest: packageValue.manifest,\n\t\t\t\t\tsource: packageValue.source,\n\t\t\t\t\t...(packageValue.expectedDigest === undefined ? {} : { expectedDigest: packageValue.expectedDigest }),\n\t\t\t\t\t...(packageValue.distribution === undefined ? {} : { distribution: packageValue.distribution }),\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tif (isCancelled(signal) || (error instanceof Error && error.message === \"cancelled\"))\n\t\t\t\t\treturn response(parsed.command, parsed.format, \"cancelled\", safeError(\"cancelled\"));\n\t\t\t\tif (error instanceof Error && error.message === \"unsupported dependencies\")\n\t\t\t\t\treturn response(parsed.command, parsed.format, \"unsupported\", safeError(\"unsupported_dependencies\"));\n\t\t\t\treturn response(\n\t\t\t\t\tparsed.command,\n\t\t\t\t\tparsed.format,\n\t\t\t\t\t\"failed\",\n\t\t\t\t\tsafeError(\n\t\t\t\t\t\tphase === \"registry\"\n\t\t\t\t\t\t\t? \"registry_failed\"\n\t\t\t\t\t\t\t: phase === \"distribution\"\n\t\t\t\t\t\t\t\t? \"distribution_failed\"\n\t\t\t\t\t\t\t\t: phase === \"state\"\n\t\t\t\t\t\t\t\t\t? \"state_failed\"\n\t\t\t\t\t\t\t\t\t: phase === \"selection\"\n\t\t\t\t\t\t\t\t\t\t? \"selection_failed\"\n\t\t\t\t\t\t\t\t\t\t: \"installer_failed\",\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t} finally {\n\t\t\treleaseInstallTransaction?.();\n\t\t}\n\t}\n\treturn { execute };\n}\n\nexport async function runPluginEcosystemCliV1(\n\toptions: PluginEcosystemCliOptionsV1,\n\tinput: PluginEcosystemCliRequestV1,\n): Promise<PluginEcosystemCliResponseV1> {\n\treturn await createPluginEcosystemCliV1(options).execute(input);\n}\n"]}
|