@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,165 @@
|
|
|
1
|
+
import { Container, fuzzyFilter, getKeybindings, Input, Spacer, TruncatedText } from "@agent-forge/tui";
|
|
2
|
+
import { theme } from "../theme/theme.js";
|
|
3
|
+
import { DynamicBorder } from "./dynamic-border.js";
|
|
4
|
+
export function formatAuthSelectorProviderType(authType) {
|
|
5
|
+
return authType === "oauth" ? "subscription" : "API key";
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Component that renders an auth provider selector
|
|
9
|
+
*/
|
|
10
|
+
export class OAuthSelectorComponent extends Container {
|
|
11
|
+
searchInput;
|
|
12
|
+
// Focusable implementation - propagate to search input for IME cursor positioning
|
|
13
|
+
_focused = false;
|
|
14
|
+
get focused() {
|
|
15
|
+
return this._focused;
|
|
16
|
+
}
|
|
17
|
+
set focused(value) {
|
|
18
|
+
this._focused = value;
|
|
19
|
+
this.searchInput.focused = value;
|
|
20
|
+
}
|
|
21
|
+
listContainer;
|
|
22
|
+
allProviders;
|
|
23
|
+
filteredProviders;
|
|
24
|
+
selectedIndex = 0;
|
|
25
|
+
mode;
|
|
26
|
+
onSelectCallback;
|
|
27
|
+
onCancelCallback;
|
|
28
|
+
showAuthTypeLabels;
|
|
29
|
+
constructor(mode, providers, onSelect, onCancel, initialSearchInput) {
|
|
30
|
+
super();
|
|
31
|
+
this.mode = mode;
|
|
32
|
+
this.allProviders = providers;
|
|
33
|
+
this.filteredProviders = providers;
|
|
34
|
+
this.showAuthTypeLabels = new Set(providers.map((provider) => provider.authType)).size > 1;
|
|
35
|
+
this.onSelectCallback = onSelect;
|
|
36
|
+
this.onCancelCallback = onCancel;
|
|
37
|
+
// Add top border
|
|
38
|
+
this.addChild(new DynamicBorder());
|
|
39
|
+
this.addChild(new Spacer(1));
|
|
40
|
+
// Add title
|
|
41
|
+
const title = mode === "login" ? "Select provider to configure:" : "Select provider to logout:";
|
|
42
|
+
this.addChild(new TruncatedText(theme.fg("accent", theme.bold(title)), 1, 0));
|
|
43
|
+
this.addChild(new Spacer(1));
|
|
44
|
+
this.searchInput = new Input();
|
|
45
|
+
if (initialSearchInput) {
|
|
46
|
+
this.searchInput.setValue(initialSearchInput);
|
|
47
|
+
}
|
|
48
|
+
this.searchInput.onSubmit = () => {
|
|
49
|
+
const selectedProvider = this.filteredProviders[this.selectedIndex];
|
|
50
|
+
// v8 ignore next -- the search input never receives the confirm key; the list intercepts it
|
|
51
|
+
if (selectedProvider) {
|
|
52
|
+
this.onSelectCallback(selectedProvider.id, selectedProvider.authType);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
this.addChild(this.searchInput);
|
|
56
|
+
this.addChild(new Spacer(1));
|
|
57
|
+
// Create list container
|
|
58
|
+
this.listContainer = new Container();
|
|
59
|
+
this.addChild(this.listContainer);
|
|
60
|
+
this.addChild(new Spacer(1));
|
|
61
|
+
// Add bottom border
|
|
62
|
+
this.addChild(new DynamicBorder());
|
|
63
|
+
// Initial render
|
|
64
|
+
this.filterProviders(initialSearchInput ?? "");
|
|
65
|
+
}
|
|
66
|
+
filterProviders(query) {
|
|
67
|
+
this.filteredProviders = query
|
|
68
|
+
? fuzzyFilter(this.allProviders, query, (provider) => `${provider.name} ${provider.id} ${provider.authType} ${provider.method?.name ?? ""}`)
|
|
69
|
+
: this.allProviders;
|
|
70
|
+
this.selectedIndex = Math.max(0, Math.min(this.selectedIndex, Math.max(0, this.filteredProviders.length - 1)));
|
|
71
|
+
this.updateList();
|
|
72
|
+
}
|
|
73
|
+
updateList() {
|
|
74
|
+
this.listContainer.clear();
|
|
75
|
+
const maxVisible = 8;
|
|
76
|
+
const startIndex = Math.max(0, Math.min(this.selectedIndex - Math.floor(maxVisible / 2), this.filteredProviders.length - maxVisible));
|
|
77
|
+
const endIndex = Math.min(startIndex + maxVisible, this.filteredProviders.length);
|
|
78
|
+
for (let i = startIndex; i < endIndex; i++) {
|
|
79
|
+
const provider = this.filteredProviders[i];
|
|
80
|
+
// v8 ignore next -- the visible slice is always within the filtered provider bounds
|
|
81
|
+
if (!provider)
|
|
82
|
+
continue;
|
|
83
|
+
const isSelected = i === this.selectedIndex;
|
|
84
|
+
const statusIndicator = this.formatStatusIndicator(provider);
|
|
85
|
+
const authTypeLabel = this.showAuthTypeLabels
|
|
86
|
+
? theme.fg("muted", ` [${formatAuthSelectorProviderType(provider.authType)}]`)
|
|
87
|
+
: "";
|
|
88
|
+
let line = "";
|
|
89
|
+
if (isSelected) {
|
|
90
|
+
const prefix = theme.fg("accent", "→ ");
|
|
91
|
+
const text = theme.fg("accent", provider.name);
|
|
92
|
+
line = prefix + text + authTypeLabel + statusIndicator;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
const text = ` ${theme.fg("text", provider.name)}`;
|
|
96
|
+
line = text + authTypeLabel + statusIndicator;
|
|
97
|
+
}
|
|
98
|
+
this.listContainer.addChild(new TruncatedText(line, 1, 0));
|
|
99
|
+
}
|
|
100
|
+
if (startIndex > 0 || endIndex < this.filteredProviders.length) {
|
|
101
|
+
const scrollInfo = theme.fg("muted", ` (${this.selectedIndex + 1}/${this.filteredProviders.length})`);
|
|
102
|
+
this.listContainer.addChild(new TruncatedText(scrollInfo, 1, 0));
|
|
103
|
+
}
|
|
104
|
+
// Show "no providers" if empty
|
|
105
|
+
if (this.filteredProviders.length === 0) {
|
|
106
|
+
const message = this.allProviders.length === 0
|
|
107
|
+
? this.mode === "login"
|
|
108
|
+
? "No providers available"
|
|
109
|
+
: "No providers logged in. Use /login first."
|
|
110
|
+
: "No matching providers";
|
|
111
|
+
this.listContainer.addChild(new TruncatedText(theme.fg("muted", ` ${message}`), 1, 0));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
formatStatusIndicator(provider) {
|
|
115
|
+
if (!provider.status)
|
|
116
|
+
return theme.fg("muted", " • unconfigured");
|
|
117
|
+
if (provider.status.type !== provider.authType) {
|
|
118
|
+
const label = provider.status.type === "oauth" ? "subscription configured" : "API key configured";
|
|
119
|
+
return theme.fg("muted", " • ") + theme.fg("warning", label);
|
|
120
|
+
}
|
|
121
|
+
if (!provider.status.source ||
|
|
122
|
+
provider.status.source === "OAuth" ||
|
|
123
|
+
provider.status.source === "stored credential") {
|
|
124
|
+
return theme.fg("success", " ✓ configured");
|
|
125
|
+
}
|
|
126
|
+
const source = /^[A-Z][A-Z0-9_]*(?:, [A-Z][A-Z0-9_]*)*$/.test(provider.status.source)
|
|
127
|
+
? `env: ${provider.status.source}`
|
|
128
|
+
: provider.status.source;
|
|
129
|
+
return theme.fg("success", ` ✓ ${source}`);
|
|
130
|
+
}
|
|
131
|
+
handleInput(keyData) {
|
|
132
|
+
const kb = getKeybindings();
|
|
133
|
+
// Up arrow
|
|
134
|
+
if (kb.matches(keyData, "tui.select.up")) {
|
|
135
|
+
if (this.filteredProviders.length === 0)
|
|
136
|
+
return;
|
|
137
|
+
this.selectedIndex = Math.max(0, this.selectedIndex - 1);
|
|
138
|
+
this.updateList();
|
|
139
|
+
}
|
|
140
|
+
// Down arrow
|
|
141
|
+
else if (kb.matches(keyData, "tui.select.down")) {
|
|
142
|
+
if (this.filteredProviders.length === 0)
|
|
143
|
+
return;
|
|
144
|
+
this.selectedIndex = Math.min(this.filteredProviders.length - 1, this.selectedIndex + 1);
|
|
145
|
+
this.updateList();
|
|
146
|
+
}
|
|
147
|
+
// Enter
|
|
148
|
+
else if (kb.matches(keyData, "tui.select.confirm")) {
|
|
149
|
+
const selectedProvider = this.filteredProviders[this.selectedIndex];
|
|
150
|
+
if (selectedProvider) {
|
|
151
|
+
this.onSelectCallback(selectedProvider.id, selectedProvider.authType);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// Escape or Ctrl+C
|
|
155
|
+
else if (kb.matches(keyData, "tui.select.cancel")) {
|
|
156
|
+
this.onCancelCallback();
|
|
157
|
+
}
|
|
158
|
+
// Pass everything else to search input
|
|
159
|
+
else {
|
|
160
|
+
this.searchInput.handleInput(keyData);
|
|
161
|
+
this.filterProviders(this.searchInput.getValue());
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=oauth-selector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-selector.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/oauth-selector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAkB,WAAW,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACxH,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAUpD,MAAM,UAAU,8BAA8B,CAAC,QAA0C,EAAU;IAClG,OAAO,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;AAAA,CACzD;AAED;;GAEG;AACH,MAAM,OAAO,sBAAuB,SAAQ,SAAS;IAC5C,WAAW,CAAQ;IAE3B,kFAAkF;IAC1E,QAAQ,GAAG,KAAK,CAAC;IACzB,IAAI,OAAO,GAAY;QACtB,OAAO,IAAI,CAAC,QAAQ,CAAC;IAAA,CACrB;IACD,IAAI,OAAO,CAAC,KAAc,EAAE;QAC3B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,WAAW,CAAC,OAAO,GAAG,KAAK,CAAC;IAAA,CACjC;IAEO,aAAa,CAAY;IACzB,YAAY,CAAyB;IACrC,iBAAiB,CAAyB;IAC1C,aAAa,GAAW,CAAC,CAAC;IAC1B,IAAI,CAAqB;IACzB,gBAAgB,CAA2E;IAC3F,gBAAgB,CAAa;IAC7B,kBAAkB,CAAU;IAEpC,YACC,IA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C,QAAQ,EAAE,CAAC,CAAC;QACnD,CAAC;IAAA,CACD;CACD","sourcesContent":["import type { ApiKeyAuth, AuthCheck, OAuthAuth } from \"@agent-forge/ai\";\nimport { Container, type Focusable, fuzzyFilter, getKeybindings, Input, Spacer, TruncatedText } from \"@agent-forge/tui\";\nimport { theme } from \"../theme/theme.ts\";\nimport { DynamicBorder } from \"./dynamic-border.ts\";\n\nexport type AuthSelectorProvider = {\n\tid: string;\n\tname: string;\n\tauthType: \"oauth\" | \"api_key\";\n\tmethod?: ApiKeyAuth | OAuthAuth;\n\tstatus?: AuthCheck;\n};\n\nexport function formatAuthSelectorProviderType(authType: AuthSelectorProvider[\"authType\"]): string {\n\treturn authType === \"oauth\" ? \"subscription\" : \"API key\";\n}\n\n/**\n * Component that renders an auth provider selector\n */\nexport class OAuthSelectorComponent extends Container implements Focusable {\n\tprivate searchInput: Input;\n\n\t// Focusable implementation - propagate to search input for IME cursor positioning\n\tprivate _focused = false;\n\tget focused(): boolean {\n\t\treturn this._focused;\n\t}\n\tset focused(value: boolean) {\n\t\tthis._focused = value;\n\t\tthis.searchInput.focused = value;\n\t}\n\n\tprivate listContainer: Container;\n\tprivate allProviders: AuthSelectorProvider[];\n\tprivate filteredProviders: AuthSelectorProvider[];\n\tprivate selectedIndex: number = 0;\n\tprivate mode: \"login\" | \"logout\";\n\tprivate onSelectCallback: (providerId: string, authType: AuthSelectorProvider[\"authType\"]) => void;\n\tprivate onCancelCallback: () => void;\n\tprivate showAuthTypeLabels: boolean;\n\n\tconstructor(\n\t\tmode: \"login\" | \"logout\",\n\t\tproviders: AuthSelectorProvider[],\n\t\tonSelect: (providerId: string, authType: AuthSelectorProvider[\"authType\"]) => void,\n\t\tonCancel: () => void,\n\t\tinitialSearchInput?: string,\n\t) {\n\t\tsuper();\n\n\t\tthis.mode = mode;\n\t\tthis.allProviders = providers;\n\t\tthis.filteredProviders = providers;\n\t\tthis.showAuthTypeLabels = new Set(providers.map((provider) => provider.authType)).size > 1;\n\t\tthis.onSelectCallback = onSelect;\n\t\tthis.onCancelCallback = onCancel;\n\n\t\t// Add top border\n\t\tthis.addChild(new DynamicBorder());\n\t\tthis.addChild(new Spacer(1));\n\n\t\t// Add title\n\t\tconst title = mode === \"login\" ? \"Select provider to configure:\" : \"Select provider to logout:\";\n\t\tthis.addChild(new TruncatedText(theme.fg(\"accent\", theme.bold(title)), 1, 0));\n\t\tthis.addChild(new Spacer(1));\n\n\t\tthis.searchInput = new Input();\n\t\tif (initialSearchInput) {\n\t\t\tthis.searchInput.setValue(initialSearchInput);\n\t\t}\n\t\tthis.searchInput.onSubmit = () => {\n\t\t\tconst selectedProvider = this.filteredProviders[this.selectedIndex];\n\t\t\t// v8 ignore next -- the search input never receives the confirm key; the list intercepts it\n\t\t\tif (selectedProvider) {\n\t\t\t\tthis.onSelectCallback(selectedProvider.id, selectedProvider.authType);\n\t\t\t}\n\t\t};\n\t\tthis.addChild(this.searchInput);\n\t\tthis.addChild(new Spacer(1));\n\n\t\t// Create list container\n\t\tthis.listContainer = new Container();\n\t\tthis.addChild(this.listContainer);\n\n\t\tthis.addChild(new Spacer(1));\n\n\t\t// Add bottom border\n\t\tthis.addChild(new DynamicBorder());\n\n\t\t// Initial render\n\t\tthis.filterProviders(initialSearchInput ?? \"\");\n\t}\n\n\tprivate filterProviders(query: string): void {\n\t\tthis.filteredProviders = query\n\t\t\t? fuzzyFilter(\n\t\t\t\t\tthis.allProviders,\n\t\t\t\t\tquery,\n\t\t\t\t\t(provider) => `${provider.name} ${provider.id} ${provider.authType} ${provider.method?.name ?? \"\"}`,\n\t\t\t\t)\n\t\t\t: this.allProviders;\n\t\tthis.selectedIndex = Math.max(0, Math.min(this.selectedIndex, Math.max(0, this.filteredProviders.length - 1)));\n\t\tthis.updateList();\n\t}\n\n\tprivate updateList(): void {\n\t\tthis.listContainer.clear();\n\n\t\tconst maxVisible = 8;\n\t\tconst startIndex = Math.max(\n\t\t\t0,\n\t\t\tMath.min(this.selectedIndex - Math.floor(maxVisible / 2), this.filteredProviders.length - maxVisible),\n\t\t);\n\t\tconst endIndex = Math.min(startIndex + maxVisible, this.filteredProviders.length);\n\n\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\tconst provider = this.filteredProviders[i];\n\t\t\t// v8 ignore next -- the visible slice is always within the filtered provider bounds\n\t\t\tif (!provider) continue;\n\n\t\t\tconst isSelected = i === this.selectedIndex;\n\n\t\t\tconst statusIndicator = this.formatStatusIndicator(provider);\n\t\t\tconst authTypeLabel = this.showAuthTypeLabels\n\t\t\t\t? theme.fg(\"muted\", ` [${formatAuthSelectorProviderType(provider.authType)}]`)\n\t\t\t\t: \"\";\n\t\t\tlet line = \"\";\n\t\t\tif (isSelected) {\n\t\t\t\tconst prefix = theme.fg(\"accent\", \"→ \");\n\t\t\t\tconst text = theme.fg(\"accent\", provider.name);\n\t\t\t\tline = prefix + text + authTypeLabel + statusIndicator;\n\t\t\t} else {\n\t\t\t\tconst text = ` ${theme.fg(\"text\", provider.name)}`;\n\t\t\t\tline = text + authTypeLabel + statusIndicator;\n\t\t\t}\n\n\t\t\tthis.listContainer.addChild(new TruncatedText(line, 1, 0));\n\t\t}\n\n\t\tif (startIndex > 0 || endIndex < this.filteredProviders.length) {\n\t\t\tconst scrollInfo = theme.fg(\"muted\", ` (${this.selectedIndex + 1}/${this.filteredProviders.length})`);\n\t\t\tthis.listContainer.addChild(new TruncatedText(scrollInfo, 1, 0));\n\t\t}\n\n\t\t// Show \"no providers\" if empty\n\t\tif (this.filteredProviders.length === 0) {\n\t\t\tconst message =\n\t\t\t\tthis.allProviders.length === 0\n\t\t\t\t\t? this.mode === \"login\"\n\t\t\t\t\t\t? \"No providers available\"\n\t\t\t\t\t\t: \"No providers logged in. Use /login first.\"\n\t\t\t\t\t: \"No matching providers\";\n\t\t\tthis.listContainer.addChild(new TruncatedText(theme.fg(\"muted\", ` ${message}`), 1, 0));\n\t\t}\n\t}\n\n\tprivate formatStatusIndicator(provider: AuthSelectorProvider): string {\n\t\tif (!provider.status) return theme.fg(\"muted\", \" • unconfigured\");\n\t\tif (provider.status.type !== provider.authType) {\n\t\t\tconst label = provider.status.type === \"oauth\" ? \"subscription configured\" : \"API key configured\";\n\t\t\treturn theme.fg(\"muted\", \" • \") + theme.fg(\"warning\", label);\n\t\t}\n\t\tif (\n\t\t\t!provider.status.source ||\n\t\t\tprovider.status.source === \"OAuth\" ||\n\t\t\tprovider.status.source === \"stored credential\"\n\t\t) {\n\t\t\treturn theme.fg(\"success\", \" ✓ configured\");\n\t\t}\n\t\tconst source = /^[A-Z][A-Z0-9_]*(?:, [A-Z][A-Z0-9_]*)*$/.test(provider.status.source)\n\t\t\t? `env: ${provider.status.source}`\n\t\t\t: provider.status.source;\n\t\treturn theme.fg(\"success\", ` ✓ ${source}`);\n\t}\n\n\thandleInput(keyData: string): void {\n\t\tconst kb = getKeybindings();\n\t\t// Up arrow\n\t\tif (kb.matches(keyData, \"tui.select.up\")) {\n\t\t\tif (this.filteredProviders.length === 0) return;\n\t\t\tthis.selectedIndex = Math.max(0, this.selectedIndex - 1);\n\t\t\tthis.updateList();\n\t\t}\n\t\t// Down arrow\n\t\telse if (kb.matches(keyData, \"tui.select.down\")) {\n\t\t\tif (this.filteredProviders.length === 0) return;\n\t\t\tthis.selectedIndex = Math.min(this.filteredProviders.length - 1, this.selectedIndex + 1);\n\t\t\tthis.updateList();\n\t\t}\n\t\t// Enter\n\t\telse if (kb.matches(keyData, \"tui.select.confirm\")) {\n\t\t\tconst selectedProvider = this.filteredProviders[this.selectedIndex];\n\t\t\tif (selectedProvider) {\n\t\t\t\tthis.onSelectCallback(selectedProvider.id, selectedProvider.authType);\n\t\t\t}\n\t\t}\n\t\t// Escape or Ctrl+C\n\t\telse if (kb.matches(keyData, \"tui.select.cancel\")) {\n\t\t\tthis.onCancelCallback();\n\t\t}\n\t\t// Pass everything else to search input\n\t\telse {\n\t\t\tthis.searchInput.handleInput(keyData);\n\t\t\tthis.filterProviders(this.searchInput.getValue());\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host-owned plugin installation/update entry for the config screen.
|
|
3
|
+
*
|
|
4
|
+
* This component deliberately projects the manager snapshot to a small UI
|
|
5
|
+
* view. Registry sources, paths, signatures, package bytes, credentials and
|
|
6
|
+
* host response text never participate in rendering or action selection.
|
|
7
|
+
*/
|
|
8
|
+
import { type Component, type Focusable } from "@agent-forge/tui";
|
|
9
|
+
import type { PluginManagerControllerErrorCodeV1, PluginManagerControllerV1, PluginManagerSnapshotV1 } from "../../../cli/plugin-manager-controller.ts";
|
|
10
|
+
type PluginManagerActionV1 = "install" | "update" | "remove";
|
|
11
|
+
type PluginManagerViewStatusV1 = "ready" | "error";
|
|
12
|
+
export interface PluginManagerEntryOptionsV1 {
|
|
13
|
+
readonly controller: PluginManagerControllerV1;
|
|
14
|
+
readonly snapshot?: PluginManagerSnapshotV1;
|
|
15
|
+
/** Called when the entry is closed after keyboard focus was transferred to it. */
|
|
16
|
+
readonly onClose?: () => void;
|
|
17
|
+
/** Request a render after an asynchronous host operation completes. */
|
|
18
|
+
readonly requestRender?: () => void;
|
|
19
|
+
}
|
|
20
|
+
export interface PluginManagerEntryOpenContextV1 {
|
|
21
|
+
readonly status: PluginManagerViewStatusV1;
|
|
22
|
+
readonly entryCount: number;
|
|
23
|
+
readonly truncated: boolean;
|
|
24
|
+
readonly diagnosticCode?: PluginManagerControllerErrorCodeV1;
|
|
25
|
+
}
|
|
26
|
+
export type PluginManagerEntryOpenResultV1 = PluginManagerEntryOpenContextV1;
|
|
27
|
+
/**
|
|
28
|
+
* Focusable manager surface. The outer config selector owns navigation to this
|
|
29
|
+
* entry; this surface owns confirmation and only emits stable host codes.
|
|
30
|
+
*/
|
|
31
|
+
export declare class PluginManagerEntryComponent implements Component, Focusable {
|
|
32
|
+
private readonly controller;
|
|
33
|
+
private readonly onClose?;
|
|
34
|
+
private readonly requestRender?;
|
|
35
|
+
private entries;
|
|
36
|
+
private truncated;
|
|
37
|
+
private selectedIndex;
|
|
38
|
+
private selectedActionIndex;
|
|
39
|
+
private confirmation;
|
|
40
|
+
private busy;
|
|
41
|
+
private status;
|
|
42
|
+
private _focused;
|
|
43
|
+
get focused(): boolean;
|
|
44
|
+
set focused(value: boolean);
|
|
45
|
+
constructor(options: PluginManagerEntryOptionsV1);
|
|
46
|
+
private setSnapshot;
|
|
47
|
+
private currentEntry;
|
|
48
|
+
private currentActions;
|
|
49
|
+
private currentAction;
|
|
50
|
+
private request;
|
|
51
|
+
render(width: number): string[];
|
|
52
|
+
private refresh;
|
|
53
|
+
private perform;
|
|
54
|
+
openPluginManager(): Promise<PluginManagerEntryOpenResultV1>;
|
|
55
|
+
handleInput(data: string): void;
|
|
56
|
+
invalidate(): void;
|
|
57
|
+
getSelectedPluginId(): string | undefined;
|
|
58
|
+
getSelectedAction(): PluginManagerActionV1 | undefined;
|
|
59
|
+
getStatus(): PluginManagerEntryOpenContextV1;
|
|
60
|
+
}
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=plugin-manager-entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-manager-entry.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/plugin-manager-entry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAmC,MAAM,kBAAkB,CAAC;AACnG,OAAO,KAAK,EACX,kCAAkC,EAClC,yBAAyB,EAGzB,uBAAuB,EACvB,MAAM,2CAA2C,CAAC;AAOnD,KAAK,qBAAqB,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC7D,KAAK,yBAAyB,GAAG,OAAO,GAAG,OAAO,CAAC;AAWnD,MAAM,WAAW,2BAA2B;IAC3C,QAAQ,CAAC,UAAU,EAAE,yBAAyB,CAAC;IAC/C,QAAQ,CAAC,QAAQ,CAAC,EAAE,uB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IAAI,OAAO,CAAC,8BAA8B,CAAC,CAEjE;IAED,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAiD9B;IAED,UAAU,IAAI,IAAI,CAAG;IAErB,mBAAmB,IAAI,MAAM,GAAG,SAAS,CAExC;IAED,iBAAiB,IAAI,qBAAqB,GAAG,SAAS,CAErD;IAED,SAAS,IAAI,+BAA+B,CAE3C;CACD","sourcesContent":["/**\n * Host-owned plugin installation/update entry for the config screen.\n *\n * This component deliberately projects the manager snapshot to a small UI\n * view. Registry sources, paths, signatures, package bytes, credentials and\n * host response text never participate in rendering or action selection.\n */\n\nimport { type Component, type Focusable, getKeybindings, truncateToWidth } from \"@agent-forge/tui\";\nimport type {\n\tPluginManagerControllerErrorCodeV1,\n\tPluginManagerControllerV1,\n\tPluginManagerEntryStatusV1,\n\tPluginManagerMutationResultV1,\n\tPluginManagerSnapshotV1,\n} from \"../../../cli/plugin-manager-controller.ts\";\nimport { theme } from \"../theme/theme.ts\";\n\nconst MAX_PLUGIN_ENTRIES_V1 = 128;\nconst MAX_DISPLAY_CHARS_V1 = 256;\nconst MAX_DIAGNOSTIC_CODES_V1 = 8;\n\ntype PluginManagerActionV1 = \"install\" | \"update\" | \"remove\";\ntype PluginManagerViewStatusV1 = \"ready\" | \"error\";\n\ninterface PluginManagerViewEntryV1 {\n\treadonly pluginId: string;\n\treadonly pluginVersion: string;\n\treadonly status: PluginManagerEntryStatusV1;\n\treadonly installedVersion?: string;\n\treadonly lifecycle?: \"installed\" | \"active\" | \"retained\";\n\treadonly diagnosticCodes: readonly string[];\n}\n\nexport interface PluginManagerEntryOptionsV1 {\n\treadonly controller: PluginManagerControllerV1;\n\treadonly snapshot?: PluginManagerSnapshotV1;\n\t/** Called when the entry is closed after keyboard focus was transferred to it. */\n\treadonly onClose?: () => void;\n\t/** Request a render after an asynchronous host operation completes. */\n\treadonly requestRender?: () => void;\n}\n\nexport interface PluginManagerEntryOpenContextV1 {\n\treadonly status: PluginManagerViewStatusV1;\n\treadonly entryCount: number;\n\treadonly truncated: boolean;\n\treadonly diagnosticCode?: PluginManagerControllerErrorCodeV1;\n}\n\nexport type PluginManagerEntryOpenResultV1 = PluginManagerEntryOpenContextV1;\n\nfunction safeDisplay(value: string): string {\n\t// Registry/state validators bound these values, but the UI remains\n\t// defensive because the component is also usable with injected test hosts.\n\treturn value\n\t\t.replace(/\\u001b\\[[0-?]*[ -/]*[@-~]/gu, \"\")\n\t\t.replace(/[\\u0000-\\u001f\\u007f]/gu, \"�\")\n\t\t.slice(0, MAX_DISPLAY_CHARS_V1);\n}\n\nfunction projectSnapshot(snapshot: PluginManagerSnapshotV1): {\n\treadonly entries: readonly PluginManagerViewEntryV1[];\n\treadonly truncated: boolean;\n} {\n\tconst entries = snapshot.entries.slice(0, MAX_PLUGIN_ENTRIES_V1).map((entry) => {\n\t\t// Explicitly select only fields intended for this UI. In particular,\n\t\t// registrySource and signed are not read here.\n\t\treturn Object.freeze({\n\t\t\tpluginId: entry.pluginId,\n\t\t\tpluginVersion: entry.pluginVersion,\n\t\t\tstatus: entry.status,\n\t\t\t...(entry.installedVersion === undefined ? {} : { installedVersion: entry.installedVersion }),\n\t\t\t...(entry.lifecycle === undefined ? {} : { lifecycle: entry.lifecycle }),\n\t\t\tdiagnosticCodes: Object.freeze(\n\t\t\t\tentry.diagnosticCodes.slice(0, MAX_DIAGNOSTIC_CODES_V1).map((code) => safeDisplay(code)),\n\t\t\t),\n\t\t});\n\t});\n\treturn Object.freeze({\n\t\tentries: Object.freeze(entries),\n\t\ttruncated: snapshot.truncated || snapshot.entries.length > MAX_PLUGIN_ENTRIES_V1,\n\t});\n}\n\nfunction actionsFor(entry: PluginManagerViewEntryV1): readonly PluginManagerActionV1[] {\n\tswitch (entry.status) {\n\t\tcase \"available\":\n\t\t\treturn [\"install\"];\n\t\tcase \"update-available\":\n\t\t\treturn [\"update\", \"remove\"];\n\t\tcase \"installed\":\n\t\t\treturn [\"remove\"];\n\t\tcase \"unavailable\":\n\t\t\treturn [];\n\t}\n}\n\nfunction actionTargetVersion(entry: PluginManagerViewEntryV1, action: PluginManagerActionV1): string | undefined {\n\treturn action === \"remove\" ? (entry.installedVersion ?? entry.pluginVersion) : entry.pluginVersion;\n}\n\nfunction errorCode(result: PluginManagerMutationResultV1): PluginManagerControllerErrorCodeV1 {\n\treturn result.code ?? \"manager-operation-failed\";\n}\n\n/**\n * Focusable manager surface. The outer config selector owns navigation to this\n * entry; this surface owns confirmation and only emits stable host codes.\n */\nexport class PluginManagerEntryComponent implements Component, Focusable {\n\tprivate readonly controller: PluginManagerControllerV1;\n\tprivate readonly onClose?: () => void;\n\tprivate readonly requestRender?: () => void;\n\tprivate entries: readonly PluginManagerViewEntryV1[] = Object.freeze([]);\n\tprivate truncated = false;\n\tprivate selectedIndex = 0;\n\tprivate selectedActionIndex = 0;\n\tprivate confirmation: { readonly pluginId: string; readonly action: PluginManagerActionV1 } | undefined;\n\tprivate busy = false;\n\tprivate status: PluginManagerEntryOpenContextV1 = Object.freeze({\n\t\tstatus: \"error\",\n\t\tentryCount: 0,\n\t\ttruncated: false,\n\t});\n\tprivate _focused = false;\n\n\tget focused(): boolean {\n\t\treturn this._focused;\n\t}\n\n\tset focused(value: boolean) {\n\t\tthis._focused = value;\n\t}\n\n\tconstructor(options: PluginManagerEntryOptionsV1) {\n\t\tthis.controller = options.controller;\n\t\tthis.onClose = options.onClose;\n\t\tthis.requestRender = options.requestRender;\n\t\tif (options.snapshot !== undefined) this.setSnapshot(options.snapshot);\n\t}\n\n\tprivate setSnapshot(snapshot: PluginManagerSnapshotV1): void {\n\t\tconst projected = projectSnapshot(snapshot);\n\t\tthis.entries = projected.entries;\n\t\tthis.truncated = projected.truncated;\n\t\tthis.selectedIndex = Math.min(this.selectedIndex, Math.max(0, this.entries.length - 1));\n\t\tthis.selectedActionIndex = Math.min(this.selectedActionIndex, Math.max(0, this.currentActions().length - 1));\n\t\tthis.status = Object.freeze({\n\t\t\tstatus: \"ready\",\n\t\t\tentryCount: this.entries.length,\n\t\t\ttruncated: this.truncated,\n\t\t});\n\t}\n\n\tprivate currentEntry(): PluginManagerViewEntryV1 | undefined {\n\t\treturn this.entries[this.selectedIndex];\n\t}\n\n\tprivate currentActions(): readonly PluginManagerActionV1[] {\n\t\tconst entry = this.currentEntry();\n\t\treturn entry === undefined ? [] : actionsFor(entry);\n\t}\n\n\tprivate currentAction(): PluginManagerActionV1 | undefined {\n\t\treturn this.currentActions()[this.selectedActionIndex];\n\t}\n\n\tprivate request(): void {\n\t\tthis.requestRender?.();\n\t}\n\n\trender(width: number): string[] {\n\t\tif (!this._focused) {\n\t\t\tconst state = this.status.status === \"ready\" ? `catalog ${this.status.entryCount}` : \"catalog unavailable\";\n\t\t\tconst bounded = this.truncated ? \", bounded\" : \"\";\n\t\t\treturn [\n\t\t\t\ttruncateToWidth(theme.fg(\"muted\", ` Plugin manager · ${state}${bounded} · Enter open`), width, \"...\"),\n\t\t\t];\n\t\t}\n\n\t\tconst lines: string[] = [truncateToWidth(theme.bold(\" Plugin manager\"), width, \"...\")];\n\t\tif (this.busy) {\n\t\t\tlines.push(truncateToWidth(theme.fg(\"accent\", \" Working…\"), width, \"...\"));\n\t\t} else if (this.confirmation !== undefined) {\n\t\t\tconst entry = this.currentEntry();\n\t\t\tconst action = this.currentAction();\n\t\t\tif (entry !== undefined && action !== undefined) {\n\t\t\t\tconst targetVersion = actionTargetVersion(entry, action) ?? entry.pluginVersion;\n\t\t\t\tlines.push(\n\t\t\t\t\ttruncateToWidth(\n\t\t\t\t\t\ttheme.fg(\n\t\t\t\t\t\t\t\"error\",\n\t\t\t\t\t\t\t` Confirm ${action} ${safeDisplay(entry.pluginId)}@${safeDisplay(targetVersion)}? Enter confirm · Esc cancel`,\n\t\t\t\t\t\t),\n\t\t\t\t\t\twidth,\n\t\t\t\t\t\t\"...\",\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t} else if (this.status.status === \"error\" && this.status.diagnosticCode !== undefined) {\n\t\t\tlines.push(truncateToWidth(theme.fg(\"error\", ` Error: ${this.status.diagnosticCode}`), width, \"...\"));\n\t\t}\n\n\t\tif (this.entries.length === 0) {\n\t\t\tlines.push(theme.fg(\"dim\", \" No plugins available\"));\n\t\t} else {\n\t\t\tfor (const [index, entry] of this.entries.entries()) {\n\t\t\t\tconst selected = index === this.selectedIndex;\n\t\t\t\tconst cursor = selected ? \">\" : \" \";\n\t\t\t\tconst status = entry.status;\n\t\t\t\tconst installed =\n\t\t\t\t\tentry.installedVersion === undefined ? \"\" : ` installed ${safeDisplay(entry.installedVersion)}`;\n\t\t\t\tconst diagnostics = entry.diagnosticCodes.length === 0 ? \"\" : ` [${entry.diagnosticCodes.join(\", \")}]`;\n\t\t\t\tlines.push(\n\t\t\t\t\ttruncateToWidth(\n\t\t\t\t\t\t`${cursor} ${safeDisplay(entry.pluginId)}@${safeDisplay(entry.pluginVersion)} · ${status}${installed}${diagnostics}`,\n\t\t\t\t\t\twidth,\n\t\t\t\t\t\t\"...\",\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst actions = this.currentActions();\n\t\tif (actions.length > 0 && !this.busy) {\n\t\t\tconst action = this.currentAction();\n\t\t\tlines.push(\n\t\t\t\ttruncateToWidth(theme.fg(\"muted\", ` Action: ${action} · Tab switch action · Enter confirm`), width, \"...\"),\n\t\t\t);\n\t\t} else if (this.entries.length > 0 && !this.busy) {\n\t\t\tlines.push(truncateToWidth(theme.fg(\"dim\", \" Selected plugin is unavailable\"), width, \"...\"));\n\t\t}\n\t\tif (this.truncated) lines.push(theme.fg(\"dim\", \" (list bounded)\"));\n\t\tlines.push(truncateToWidth(theme.fg(\"dim\", \" ↑↓ navigate · Esc close\"), width, \"...\"));\n\t\treturn lines;\n\t}\n\n\tprivate async refresh(): Promise<PluginManagerEntryOpenContextV1> {\n\t\ttry {\n\t\t\tconst result = await this.controller.getSnapshot();\n\t\t\tif (result.status === \"ok\") {\n\t\t\t\tthis.setSnapshot(result.snapshot);\n\t\t\t\tthis.request();\n\t\t\t\treturn this.status;\n\t\t\t}\n\t\t\tthis.status = Object.freeze({\n\t\t\t\tstatus: \"error\",\n\t\t\t\tentryCount: 0,\n\t\t\t\ttruncated: false,\n\t\t\t\tdiagnosticCode: result.code,\n\t\t\t});\n\t\t\tthis.entries = Object.freeze([]);\n\t\t\tthis.truncated = false;\n\t\t\tthis.request();\n\t\t\treturn this.status;\n\t\t} catch {\n\t\t\tthis.status = Object.freeze({\n\t\t\t\tstatus: \"error\",\n\t\t\t\tentryCount: 0,\n\t\t\t\ttruncated: false,\n\t\t\t\tdiagnosticCode: \"manager-operation-failed\",\n\t\t\t});\n\t\t\tthis.entries = Object.freeze([]);\n\t\t\tthis.truncated = false;\n\t\t\tthis.request();\n\t\t\treturn this.status;\n\t\t}\n\t}\n\n\tprivate async perform(action: PluginManagerActionV1): Promise<void> {\n\t\tconst entry = this.currentEntry();\n\t\tif (entry === undefined) return;\n\t\tthis.busy = true;\n\t\tthis.confirmation = undefined;\n\t\tthis.request();\n\t\tlet result: PluginManagerMutationResultV1;\n\t\ttry {\n\t\t\tconst input = {\n\t\t\t\tpluginId: entry.pluginId,\n\t\t\t\tpluginVersion: actionTargetVersion(entry, action),\n\t\t\t\tconfirmed: true as const,\n\t\t\t};\n\t\t\tresult = await this.controller[action](input);\n\t\t} catch {\n\t\t\tresult = { status: \"failed\", code: \"manager-operation-failed\" };\n\t\t}\n\t\tif (result.snapshot !== undefined) this.setSnapshot(result.snapshot);\n\t\tconst mutationCode = result.status === \"succeeded\" ? undefined : errorCode(result);\n\t\tconst refreshed = result.snapshot === undefined ? await this.refresh() : this.status;\n\t\tif (mutationCode !== undefined) {\n\t\t\tthis.status = Object.freeze({ ...refreshed, status: \"error\", diagnosticCode: mutationCode });\n\t\t}\n\t\tthis.busy = false;\n\t\tthis.selectedActionIndex = Math.min(this.selectedActionIndex, Math.max(0, this.currentActions().length - 1));\n\t\tthis.request();\n\t}\n\n\tasync openPluginManager(): Promise<PluginManagerEntryOpenResultV1> {\n\t\treturn await this.refresh();\n\t}\n\n\thandleInput(data: string): void {\n\t\tif (!this._focused) return;\n\t\tconst kb = getKeybindings();\n\t\tif (this.busy) return;\n\t\tif (this.confirmation !== undefined) {\n\t\t\tif (kb.matches(data, \"tui.select.cancel\")) {\n\t\t\t\tthis.confirmation = undefined;\n\t\t\t\tthis.request();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (kb.matches(data, \"tui.select.confirm\")) {\n\t\t\t\tconst action = this.currentAction();\n\t\t\t\tif (action !== undefined) void this.perform(action);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"tui.select.cancel\")) {\n\t\t\tthis._focused = false;\n\t\t\tthis.onClose?.();\n\t\t\tthis.request();\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"tui.select.up\")) {\n\t\t\tthis.selectedIndex = Math.max(0, this.selectedIndex - 1);\n\t\t\tthis.selectedActionIndex = 0;\n\t\t\tthis.request();\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"tui.select.down\")) {\n\t\t\tthis.selectedIndex = Math.min(Math.max(0, this.entries.length - 1), this.selectedIndex + 1);\n\t\t\tthis.selectedActionIndex = 0;\n\t\t\tthis.request();\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"tui.input.tab\")) {\n\t\t\tconst actions = this.currentActions();\n\t\t\tif (actions.length > 0) this.selectedActionIndex = (this.selectedActionIndex + 1) % actions.length;\n\t\t\tthis.request();\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"tui.select.confirm\")) {\n\t\t\tconst entry = this.currentEntry();\n\t\t\tconst action = this.currentAction();\n\t\t\tif (entry !== undefined && action !== undefined) {\n\t\t\t\tthis.confirmation = { pluginId: entry.pluginId, action };\n\t\t\t\tthis.request();\n\t\t\t}\n\t\t}\n\t}\n\n\tinvalidate(): void {}\n\n\tgetSelectedPluginId(): string | undefined {\n\t\treturn this.currentEntry()?.pluginId;\n\t}\n\n\tgetSelectedAction(): PluginManagerActionV1 | undefined {\n\t\treturn this.currentAction();\n\t}\n\n\tgetStatus(): PluginManagerEntryOpenContextV1 {\n\t\treturn this.status;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host-owned plugin installation/update entry for the config screen.
|
|
3
|
+
*
|
|
4
|
+
* This component deliberately projects the manager snapshot to a small UI
|
|
5
|
+
* view. Registry sources, paths, signatures, package bytes, credentials and
|
|
6
|
+
* host response text never participate in rendering or action selection.
|
|
7
|
+
*/
|
|
8
|
+
import { getKeybindings, truncateToWidth } from "@agent-forge/tui";
|
|
9
|
+
import { theme } from "../theme/theme.js";
|
|
10
|
+
const MAX_PLUGIN_ENTRIES_V1 = 128;
|
|
11
|
+
const MAX_DISPLAY_CHARS_V1 = 256;
|
|
12
|
+
const MAX_DIAGNOSTIC_CODES_V1 = 8;
|
|
13
|
+
function safeDisplay(value) {
|
|
14
|
+
// Registry/state validators bound these values, but the UI remains
|
|
15
|
+
// defensive because the component is also usable with injected test hosts.
|
|
16
|
+
return value
|
|
17
|
+
.replace(/\u001b\[[0-?]*[ -/]*[@-~]/gu, "")
|
|
18
|
+
.replace(/[\u0000-\u001f\u007f]/gu, "�")
|
|
19
|
+
.slice(0, MAX_DISPLAY_CHARS_V1);
|
|
20
|
+
}
|
|
21
|
+
function projectSnapshot(snapshot) {
|
|
22
|
+
const entries = snapshot.entries.slice(0, MAX_PLUGIN_ENTRIES_V1).map((entry) => {
|
|
23
|
+
// Explicitly select only fields intended for this UI. In particular,
|
|
24
|
+
// registrySource and signed are not read here.
|
|
25
|
+
return Object.freeze({
|
|
26
|
+
pluginId: entry.pluginId,
|
|
27
|
+
pluginVersion: entry.pluginVersion,
|
|
28
|
+
status: entry.status,
|
|
29
|
+
...(entry.installedVersion === undefined ? {} : { installedVersion: entry.installedVersion }),
|
|
30
|
+
...(entry.lifecycle === undefined ? {} : { lifecycle: entry.lifecycle }),
|
|
31
|
+
diagnosticCodes: Object.freeze(entry.diagnosticCodes.slice(0, MAX_DIAGNOSTIC_CODES_V1).map((code) => safeDisplay(code))),
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
return Object.freeze({
|
|
35
|
+
entries: Object.freeze(entries),
|
|
36
|
+
truncated: snapshot.truncated || snapshot.entries.length > MAX_PLUGIN_ENTRIES_V1,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function actionsFor(entry) {
|
|
40
|
+
switch (entry.status) {
|
|
41
|
+
case "available":
|
|
42
|
+
return ["install"];
|
|
43
|
+
case "update-available":
|
|
44
|
+
return ["update", "remove"];
|
|
45
|
+
case "installed":
|
|
46
|
+
return ["remove"];
|
|
47
|
+
case "unavailable":
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function actionTargetVersion(entry, action) {
|
|
52
|
+
return action === "remove" ? (entry.installedVersion ?? entry.pluginVersion) : entry.pluginVersion;
|
|
53
|
+
}
|
|
54
|
+
function errorCode(result) {
|
|
55
|
+
return result.code ?? "manager-operation-failed";
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Focusable manager surface. The outer config selector owns navigation to this
|
|
59
|
+
* entry; this surface owns confirmation and only emits stable host codes.
|
|
60
|
+
*/
|
|
61
|
+
export class PluginManagerEntryComponent {
|
|
62
|
+
controller;
|
|
63
|
+
onClose;
|
|
64
|
+
requestRender;
|
|
65
|
+
entries = Object.freeze([]);
|
|
66
|
+
truncated = false;
|
|
67
|
+
selectedIndex = 0;
|
|
68
|
+
selectedActionIndex = 0;
|
|
69
|
+
confirmation;
|
|
70
|
+
busy = false;
|
|
71
|
+
status = Object.freeze({
|
|
72
|
+
status: "error",
|
|
73
|
+
entryCount: 0,
|
|
74
|
+
truncated: false,
|
|
75
|
+
});
|
|
76
|
+
_focused = false;
|
|
77
|
+
get focused() {
|
|
78
|
+
return this._focused;
|
|
79
|
+
}
|
|
80
|
+
set focused(value) {
|
|
81
|
+
this._focused = value;
|
|
82
|
+
}
|
|
83
|
+
constructor(options) {
|
|
84
|
+
this.controller = options.controller;
|
|
85
|
+
this.onClose = options.onClose;
|
|
86
|
+
this.requestRender = options.requestRender;
|
|
87
|
+
if (options.snapshot !== undefined)
|
|
88
|
+
this.setSnapshot(options.snapshot);
|
|
89
|
+
}
|
|
90
|
+
setSnapshot(snapshot) {
|
|
91
|
+
const projected = projectSnapshot(snapshot);
|
|
92
|
+
this.entries = projected.entries;
|
|
93
|
+
this.truncated = projected.truncated;
|
|
94
|
+
this.selectedIndex = Math.min(this.selectedIndex, Math.max(0, this.entries.length - 1));
|
|
95
|
+
this.selectedActionIndex = Math.min(this.selectedActionIndex, Math.max(0, this.currentActions().length - 1));
|
|
96
|
+
this.status = Object.freeze({
|
|
97
|
+
status: "ready",
|
|
98
|
+
entryCount: this.entries.length,
|
|
99
|
+
truncated: this.truncated,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
currentEntry() {
|
|
103
|
+
return this.entries[this.selectedIndex];
|
|
104
|
+
}
|
|
105
|
+
currentActions() {
|
|
106
|
+
const entry = this.currentEntry();
|
|
107
|
+
return entry === undefined ? [] : actionsFor(entry);
|
|
108
|
+
}
|
|
109
|
+
currentAction() {
|
|
110
|
+
return this.currentActions()[this.selectedActionIndex];
|
|
111
|
+
}
|
|
112
|
+
request() {
|
|
113
|
+
this.requestRender?.();
|
|
114
|
+
}
|
|
115
|
+
render(width) {
|
|
116
|
+
if (!this._focused) {
|
|
117
|
+
const state = this.status.status === "ready" ? `catalog ${this.status.entryCount}` : "catalog unavailable";
|
|
118
|
+
const bounded = this.truncated ? ", bounded" : "";
|
|
119
|
+
return [
|
|
120
|
+
truncateToWidth(theme.fg("muted", ` Plugin manager · ${state}${bounded} · Enter open`), width, "..."),
|
|
121
|
+
];
|
|
122
|
+
}
|
|
123
|
+
const lines = [truncateToWidth(theme.bold(" Plugin manager"), width, "...")];
|
|
124
|
+
if (this.busy) {
|
|
125
|
+
lines.push(truncateToWidth(theme.fg("accent", " Working…"), width, "..."));
|
|
126
|
+
}
|
|
127
|
+
else if (this.confirmation !== undefined) {
|
|
128
|
+
const entry = this.currentEntry();
|
|
129
|
+
const action = this.currentAction();
|
|
130
|
+
if (entry !== undefined && action !== undefined) {
|
|
131
|
+
const targetVersion = actionTargetVersion(entry, action) ?? entry.pluginVersion;
|
|
132
|
+
lines.push(truncateToWidth(theme.fg("error", ` Confirm ${action} ${safeDisplay(entry.pluginId)}@${safeDisplay(targetVersion)}? Enter confirm · Esc cancel`), width, "..."));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
else if (this.status.status === "error" && this.status.diagnosticCode !== undefined) {
|
|
136
|
+
lines.push(truncateToWidth(theme.fg("error", ` Error: ${this.status.diagnosticCode}`), width, "..."));
|
|
137
|
+
}
|
|
138
|
+
if (this.entries.length === 0) {
|
|
139
|
+
lines.push(theme.fg("dim", " No plugins available"));
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
for (const [index, entry] of this.entries.entries()) {
|
|
143
|
+
const selected = index === this.selectedIndex;
|
|
144
|
+
const cursor = selected ? ">" : " ";
|
|
145
|
+
const status = entry.status;
|
|
146
|
+
const installed = entry.installedVersion === undefined ? "" : ` installed ${safeDisplay(entry.installedVersion)}`;
|
|
147
|
+
const diagnostics = entry.diagnosticCodes.length === 0 ? "" : ` [${entry.diagnosticCodes.join(", ")}]`;
|
|
148
|
+
lines.push(truncateToWidth(`${cursor} ${safeDisplay(entry.pluginId)}@${safeDisplay(entry.pluginVersion)} · ${status}${installed}${diagnostics}`, width, "..."));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
const actions = this.currentActions();
|
|
152
|
+
if (actions.length > 0 && !this.busy) {
|
|
153
|
+
const action = this.currentAction();
|
|
154
|
+
lines.push(truncateToWidth(theme.fg("muted", ` Action: ${action} · Tab switch action · Enter confirm`), width, "..."));
|
|
155
|
+
}
|
|
156
|
+
else if (this.entries.length > 0 && !this.busy) {
|
|
157
|
+
lines.push(truncateToWidth(theme.fg("dim", " Selected plugin is unavailable"), width, "..."));
|
|
158
|
+
}
|
|
159
|
+
if (this.truncated)
|
|
160
|
+
lines.push(theme.fg("dim", " (list bounded)"));
|
|
161
|
+
lines.push(truncateToWidth(theme.fg("dim", " ↑↓ navigate · Esc close"), width, "..."));
|
|
162
|
+
return lines;
|
|
163
|
+
}
|
|
164
|
+
async refresh() {
|
|
165
|
+
try {
|
|
166
|
+
const result = await this.controller.getSnapshot();
|
|
167
|
+
if (result.status === "ok") {
|
|
168
|
+
this.setSnapshot(result.snapshot);
|
|
169
|
+
this.request();
|
|
170
|
+
return this.status;
|
|
171
|
+
}
|
|
172
|
+
this.status = Object.freeze({
|
|
173
|
+
status: "error",
|
|
174
|
+
entryCount: 0,
|
|
175
|
+
truncated: false,
|
|
176
|
+
diagnosticCode: result.code,
|
|
177
|
+
});
|
|
178
|
+
this.entries = Object.freeze([]);
|
|
179
|
+
this.truncated = false;
|
|
180
|
+
this.request();
|
|
181
|
+
return this.status;
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
this.status = Object.freeze({
|
|
185
|
+
status: "error",
|
|
186
|
+
entryCount: 0,
|
|
187
|
+
truncated: false,
|
|
188
|
+
diagnosticCode: "manager-operation-failed",
|
|
189
|
+
});
|
|
190
|
+
this.entries = Object.freeze([]);
|
|
191
|
+
this.truncated = false;
|
|
192
|
+
this.request();
|
|
193
|
+
return this.status;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
async perform(action) {
|
|
197
|
+
const entry = this.currentEntry();
|
|
198
|
+
if (entry === undefined)
|
|
199
|
+
return;
|
|
200
|
+
this.busy = true;
|
|
201
|
+
this.confirmation = undefined;
|
|
202
|
+
this.request();
|
|
203
|
+
let result;
|
|
204
|
+
try {
|
|
205
|
+
const input = {
|
|
206
|
+
pluginId: entry.pluginId,
|
|
207
|
+
pluginVersion: actionTargetVersion(entry, action),
|
|
208
|
+
confirmed: true,
|
|
209
|
+
};
|
|
210
|
+
result = await this.controller[action](input);
|
|
211
|
+
}
|
|
212
|
+
catch {
|
|
213
|
+
result = { status: "failed", code: "manager-operation-failed" };
|
|
214
|
+
}
|
|
215
|
+
if (result.snapshot !== undefined)
|
|
216
|
+
this.setSnapshot(result.snapshot);
|
|
217
|
+
const mutationCode = result.status === "succeeded" ? undefined : errorCode(result);
|
|
218
|
+
const refreshed = result.snapshot === undefined ? await this.refresh() : this.status;
|
|
219
|
+
if (mutationCode !== undefined) {
|
|
220
|
+
this.status = Object.freeze({ ...refreshed, status: "error", diagnosticCode: mutationCode });
|
|
221
|
+
}
|
|
222
|
+
this.busy = false;
|
|
223
|
+
this.selectedActionIndex = Math.min(this.selectedActionIndex, Math.max(0, this.currentActions().length - 1));
|
|
224
|
+
this.request();
|
|
225
|
+
}
|
|
226
|
+
async openPluginManager() {
|
|
227
|
+
return await this.refresh();
|
|
228
|
+
}
|
|
229
|
+
handleInput(data) {
|
|
230
|
+
if (!this._focused)
|
|
231
|
+
return;
|
|
232
|
+
const kb = getKeybindings();
|
|
233
|
+
if (this.busy)
|
|
234
|
+
return;
|
|
235
|
+
if (this.confirmation !== undefined) {
|
|
236
|
+
if (kb.matches(data, "tui.select.cancel")) {
|
|
237
|
+
this.confirmation = undefined;
|
|
238
|
+
this.request();
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
if (kb.matches(data, "tui.select.confirm")) {
|
|
242
|
+
const action = this.currentAction();
|
|
243
|
+
if (action !== undefined)
|
|
244
|
+
void this.perform(action);
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
if (kb.matches(data, "tui.select.cancel")) {
|
|
250
|
+
this._focused = false;
|
|
251
|
+
this.onClose?.();
|
|
252
|
+
this.request();
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
if (kb.matches(data, "tui.select.up")) {
|
|
256
|
+
this.selectedIndex = Math.max(0, this.selectedIndex - 1);
|
|
257
|
+
this.selectedActionIndex = 0;
|
|
258
|
+
this.request();
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
if (kb.matches(data, "tui.select.down")) {
|
|
262
|
+
this.selectedIndex = Math.min(Math.max(0, this.entries.length - 1), this.selectedIndex + 1);
|
|
263
|
+
this.selectedActionIndex = 0;
|
|
264
|
+
this.request();
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
if (kb.matches(data, "tui.input.tab")) {
|
|
268
|
+
const actions = this.currentActions();
|
|
269
|
+
if (actions.length > 0)
|
|
270
|
+
this.selectedActionIndex = (this.selectedActionIndex + 1) % actions.length;
|
|
271
|
+
this.request();
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
if (kb.matches(data, "tui.select.confirm")) {
|
|
275
|
+
const entry = this.currentEntry();
|
|
276
|
+
const action = this.currentAction();
|
|
277
|
+
if (entry !== undefined && action !== undefined) {
|
|
278
|
+
this.confirmation = { pluginId: entry.pluginId, action };
|
|
279
|
+
this.request();
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
invalidate() { }
|
|
284
|
+
getSelectedPluginId() {
|
|
285
|
+
return this.currentEntry()?.pluginId;
|
|
286
|
+
}
|
|
287
|
+
getSelectedAction() {
|
|
288
|
+
return this.currentAction();
|
|
289
|
+
}
|
|
290
|
+
getStatus() {
|
|
291
|
+
return this.status;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
//# sourceMappingURL=plugin-manager-entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-manager-entry.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/plugin-manager-entry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAkC,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAQnG,OAAO,EAAE,KAAK,EAAE,M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AG,OAAO,CAAC,MAAM,CAAC;YACnG,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,OAAO;QACR,CAAC;QACD,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,oBAAoB,CAAC,EAAE,CAAC;YAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YAClC,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;YACpC,IAAI,KAAK,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACjD,IAAI,CAAC,YAAY,GAAG,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;gBACzD,IAAI,CAAC,OAAO,EAAE,CAAC;YAChB,CAAC;QACF,CAAC;IAAA,CACD;IAED,UAAU,GAAS,EAAC,CAAC;IAErB,mBAAmB,GAAuB;QACzC,OAAO,IAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,CAAC;IAAA,CACrC;IAED,iBAAiB,GAAsC;QACtD,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;IAAA,CAC5B;IAED,SAAS,GAAoC;QAC5C,OAAO,IAAI,CAAC,MAAM,CAAC;IAAA,CACnB;CACD","sourcesContent":["/**\n * Host-owned plugin installation/update entry for the config screen.\n *\n * This component deliberately projects the manager snapshot to a small UI\n * view. Registry sources, paths, signatures, package bytes, credentials and\n * host response text never participate in rendering or action selection.\n */\n\nimport { type Component, type Focusable, getKeybindings, truncateToWidth } from \"@agent-forge/tui\";\nimport type {\n\tPluginManagerControllerErrorCodeV1,\n\tPluginManagerControllerV1,\n\tPluginManagerEntryStatusV1,\n\tPluginManagerMutationResultV1,\n\tPluginManagerSnapshotV1,\n} from \"../../../cli/plugin-manager-controller.ts\";\nimport { theme } from \"../theme/theme.ts\";\n\nconst MAX_PLUGIN_ENTRIES_V1 = 128;\nconst MAX_DISPLAY_CHARS_V1 = 256;\nconst MAX_DIAGNOSTIC_CODES_V1 = 8;\n\ntype PluginManagerActionV1 = \"install\" | \"update\" | \"remove\";\ntype PluginManagerViewStatusV1 = \"ready\" | \"error\";\n\ninterface PluginManagerViewEntryV1 {\n\treadonly pluginId: string;\n\treadonly pluginVersion: string;\n\treadonly status: PluginManagerEntryStatusV1;\n\treadonly installedVersion?: string;\n\treadonly lifecycle?: \"installed\" | \"active\" | \"retained\";\n\treadonly diagnosticCodes: readonly string[];\n}\n\nexport interface PluginManagerEntryOptionsV1 {\n\treadonly controller: PluginManagerControllerV1;\n\treadonly snapshot?: PluginManagerSnapshotV1;\n\t/** Called when the entry is closed after keyboard focus was transferred to it. */\n\treadonly onClose?: () => void;\n\t/** Request a render after an asynchronous host operation completes. */\n\treadonly requestRender?: () => void;\n}\n\nexport interface PluginManagerEntryOpenContextV1 {\n\treadonly status: PluginManagerViewStatusV1;\n\treadonly entryCount: number;\n\treadonly truncated: boolean;\n\treadonly diagnosticCode?: PluginManagerControllerErrorCodeV1;\n}\n\nexport type PluginManagerEntryOpenResultV1 = PluginManagerEntryOpenContextV1;\n\nfunction safeDisplay(value: string): string {\n\t// Registry/state validators bound these values, but the UI remains\n\t// defensive because the component is also usable with injected test hosts.\n\treturn value\n\t\t.replace(/\\u001b\\[[0-?]*[ -/]*[@-~]/gu, \"\")\n\t\t.replace(/[\\u0000-\\u001f\\u007f]/gu, \"�\")\n\t\t.slice(0, MAX_DISPLAY_CHARS_V1);\n}\n\nfunction projectSnapshot(snapshot: PluginManagerSnapshotV1): {\n\treadonly entries: readonly PluginManagerViewEntryV1[];\n\treadonly truncated: boolean;\n} {\n\tconst entries = snapshot.entries.slice(0, MAX_PLUGIN_ENTRIES_V1).map((entry) => {\n\t\t// Explicitly select only fields intended for this UI. In particular,\n\t\t// registrySource and signed are not read here.\n\t\treturn Object.freeze({\n\t\t\tpluginId: entry.pluginId,\n\t\t\tpluginVersion: entry.pluginVersion,\n\t\t\tstatus: entry.status,\n\t\t\t...(entry.installedVersion === undefined ? {} : { installedVersion: entry.installedVersion }),\n\t\t\t...(entry.lifecycle === undefined ? {} : { lifecycle: entry.lifecycle }),\n\t\t\tdiagnosticCodes: Object.freeze(\n\t\t\t\tentry.diagnosticCodes.slice(0, MAX_DIAGNOSTIC_CODES_V1).map((code) => safeDisplay(code)),\n\t\t\t),\n\t\t});\n\t});\n\treturn Object.freeze({\n\t\tentries: Object.freeze(entries),\n\t\ttruncated: snapshot.truncated || snapshot.entries.length > MAX_PLUGIN_ENTRIES_V1,\n\t});\n}\n\nfunction actionsFor(entry: PluginManagerViewEntryV1): readonly PluginManagerActionV1[] {\n\tswitch (entry.status) {\n\t\tcase \"available\":\n\t\t\treturn [\"install\"];\n\t\tcase \"update-available\":\n\t\t\treturn [\"update\", \"remove\"];\n\t\tcase \"installed\":\n\t\t\treturn [\"remove\"];\n\t\tcase \"unavailable\":\n\t\t\treturn [];\n\t}\n}\n\nfunction actionTargetVersion(entry: PluginManagerViewEntryV1, action: PluginManagerActionV1): string | undefined {\n\treturn action === \"remove\" ? (entry.installedVersion ?? entry.pluginVersion) : entry.pluginVersion;\n}\n\nfunction errorCode(result: PluginManagerMutationResultV1): PluginManagerControllerErrorCodeV1 {\n\treturn result.code ?? \"manager-operation-failed\";\n}\n\n/**\n * Focusable manager surface. The outer config selector owns navigation to this\n * entry; this surface owns confirmation and only emits stable host codes.\n */\nexport class PluginManagerEntryComponent implements Component, Focusable {\n\tprivate readonly controller: PluginManagerControllerV1;\n\tprivate readonly onClose?: () => void;\n\tprivate readonly requestRender?: () => void;\n\tprivate entries: readonly PluginManagerViewEntryV1[] = Object.freeze([]);\n\tprivate truncated = false;\n\tprivate selectedIndex = 0;\n\tprivate selectedActionIndex = 0;\n\tprivate confirmation: { readonly pluginId: string; readonly action: PluginManagerActionV1 } | undefined;\n\tprivate busy = false;\n\tprivate status: PluginManagerEntryOpenContextV1 = Object.freeze({\n\t\tstatus: \"error\",\n\t\tentryCount: 0,\n\t\ttruncated: false,\n\t});\n\tprivate _focused = false;\n\n\tget focused(): boolean {\n\t\treturn this._focused;\n\t}\n\n\tset focused(value: boolean) {\n\t\tthis._focused = value;\n\t}\n\n\tconstructor(options: PluginManagerEntryOptionsV1) {\n\t\tthis.controller = options.controller;\n\t\tthis.onClose = options.onClose;\n\t\tthis.requestRender = options.requestRender;\n\t\tif (options.snapshot !== undefined) this.setSnapshot(options.snapshot);\n\t}\n\n\tprivate setSnapshot(snapshot: PluginManagerSnapshotV1): void {\n\t\tconst projected = projectSnapshot(snapshot);\n\t\tthis.entries = projected.entries;\n\t\tthis.truncated = projected.truncated;\n\t\tthis.selectedIndex = Math.min(this.selectedIndex, Math.max(0, this.entries.length - 1));\n\t\tthis.selectedActionIndex = Math.min(this.selectedActionIndex, Math.max(0, this.currentActions().length - 1));\n\t\tthis.status = Object.freeze({\n\t\t\tstatus: \"ready\",\n\t\t\tentryCount: this.entries.length,\n\t\t\ttruncated: this.truncated,\n\t\t});\n\t}\n\n\tprivate currentEntry(): PluginManagerViewEntryV1 | undefined {\n\t\treturn this.entries[this.selectedIndex];\n\t}\n\n\tprivate currentActions(): readonly PluginManagerActionV1[] {\n\t\tconst entry = this.currentEntry();\n\t\treturn entry === undefined ? [] : actionsFor(entry);\n\t}\n\n\tprivate currentAction(): PluginManagerActionV1 | undefined {\n\t\treturn this.currentActions()[this.selectedActionIndex];\n\t}\n\n\tprivate request(): void {\n\t\tthis.requestRender?.();\n\t}\n\n\trender(width: number): string[] {\n\t\tif (!this._focused) {\n\t\t\tconst state = this.status.status === \"ready\" ? `catalog ${this.status.entryCount}` : \"catalog unavailable\";\n\t\t\tconst bounded = this.truncated ? \", bounded\" : \"\";\n\t\t\treturn [\n\t\t\t\ttruncateToWidth(theme.fg(\"muted\", ` Plugin manager · ${state}${bounded} · Enter open`), width, \"...\"),\n\t\t\t];\n\t\t}\n\n\t\tconst lines: string[] = [truncateToWidth(theme.bold(\" Plugin manager\"), width, \"...\")];\n\t\tif (this.busy) {\n\t\t\tlines.push(truncateToWidth(theme.fg(\"accent\", \" Working…\"), width, \"...\"));\n\t\t} else if (this.confirmation !== undefined) {\n\t\t\tconst entry = this.currentEntry();\n\t\t\tconst action = this.currentAction();\n\t\t\tif (entry !== undefined && action !== undefined) {\n\t\t\t\tconst targetVersion = actionTargetVersion(entry, action) ?? entry.pluginVersion;\n\t\t\t\tlines.push(\n\t\t\t\t\ttruncateToWidth(\n\t\t\t\t\t\ttheme.fg(\n\t\t\t\t\t\t\t\"error\",\n\t\t\t\t\t\t\t` Confirm ${action} ${safeDisplay(entry.pluginId)}@${safeDisplay(targetVersion)}? Enter confirm · Esc cancel`,\n\t\t\t\t\t\t),\n\t\t\t\t\t\twidth,\n\t\t\t\t\t\t\"...\",\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t} else if (this.status.status === \"error\" && this.status.diagnosticCode !== undefined) {\n\t\t\tlines.push(truncateToWidth(theme.fg(\"error\", ` Error: ${this.status.diagnosticCode}`), width, \"...\"));\n\t\t}\n\n\t\tif (this.entries.length === 0) {\n\t\t\tlines.push(theme.fg(\"dim\", \" No plugins available\"));\n\t\t} else {\n\t\t\tfor (const [index, entry] of this.entries.entries()) {\n\t\t\t\tconst selected = index === this.selectedIndex;\n\t\t\t\tconst cursor = selected ? \">\" : \" \";\n\t\t\t\tconst status = entry.status;\n\t\t\t\tconst installed =\n\t\t\t\t\tentry.installedVersion === undefined ? \"\" : ` installed ${safeDisplay(entry.installedVersion)}`;\n\t\t\t\tconst diagnostics = entry.diagnosticCodes.length === 0 ? \"\" : ` [${entry.diagnosticCodes.join(\", \")}]`;\n\t\t\t\tlines.push(\n\t\t\t\t\ttruncateToWidth(\n\t\t\t\t\t\t`${cursor} ${safeDisplay(entry.pluginId)}@${safeDisplay(entry.pluginVersion)} · ${status}${installed}${diagnostics}`,\n\t\t\t\t\t\twidth,\n\t\t\t\t\t\t\"...\",\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst actions = this.currentActions();\n\t\tif (actions.length > 0 && !this.busy) {\n\t\t\tconst action = this.currentAction();\n\t\t\tlines.push(\n\t\t\t\ttruncateToWidth(theme.fg(\"muted\", ` Action: ${action} · Tab switch action · Enter confirm`), width, \"...\"),\n\t\t\t);\n\t\t} else if (this.entries.length > 0 && !this.busy) {\n\t\t\tlines.push(truncateToWidth(theme.fg(\"dim\", \" Selected plugin is unavailable\"), width, \"...\"));\n\t\t}\n\t\tif (this.truncated) lines.push(theme.fg(\"dim\", \" (list bounded)\"));\n\t\tlines.push(truncateToWidth(theme.fg(\"dim\", \" ↑↓ navigate · Esc close\"), width, \"...\"));\n\t\treturn lines;\n\t}\n\n\tprivate async refresh(): Promise<PluginManagerEntryOpenContextV1> {\n\t\ttry {\n\t\t\tconst result = await this.controller.getSnapshot();\n\t\t\tif (result.status === \"ok\") {\n\t\t\t\tthis.setSnapshot(result.snapshot);\n\t\t\t\tthis.request();\n\t\t\t\treturn this.status;\n\t\t\t}\n\t\t\tthis.status = Object.freeze({\n\t\t\t\tstatus: \"error\",\n\t\t\t\tentryCount: 0,\n\t\t\t\ttruncated: false,\n\t\t\t\tdiagnosticCode: result.code,\n\t\t\t});\n\t\t\tthis.entries = Object.freeze([]);\n\t\t\tthis.truncated = false;\n\t\t\tthis.request();\n\t\t\treturn this.status;\n\t\t} catch {\n\t\t\tthis.status = Object.freeze({\n\t\t\t\tstatus: \"error\",\n\t\t\t\tentryCount: 0,\n\t\t\t\ttruncated: false,\n\t\t\t\tdiagnosticCode: \"manager-operation-failed\",\n\t\t\t});\n\t\t\tthis.entries = Object.freeze([]);\n\t\t\tthis.truncated = false;\n\t\t\tthis.request();\n\t\t\treturn this.status;\n\t\t}\n\t}\n\n\tprivate async perform(action: PluginManagerActionV1): Promise<void> {\n\t\tconst entry = this.currentEntry();\n\t\tif (entry === undefined) return;\n\t\tthis.busy = true;\n\t\tthis.confirmation = undefined;\n\t\tthis.request();\n\t\tlet result: PluginManagerMutationResultV1;\n\t\ttry {\n\t\t\tconst input = {\n\t\t\t\tpluginId: entry.pluginId,\n\t\t\t\tpluginVersion: actionTargetVersion(entry, action),\n\t\t\t\tconfirmed: true as const,\n\t\t\t};\n\t\t\tresult = await this.controller[action](input);\n\t\t} catch {\n\t\t\tresult = { status: \"failed\", code: \"manager-operation-failed\" };\n\t\t}\n\t\tif (result.snapshot !== undefined) this.setSnapshot(result.snapshot);\n\t\tconst mutationCode = result.status === \"succeeded\" ? undefined : errorCode(result);\n\t\tconst refreshed = result.snapshot === undefined ? await this.refresh() : this.status;\n\t\tif (mutationCode !== undefined) {\n\t\t\tthis.status = Object.freeze({ ...refreshed, status: \"error\", diagnosticCode: mutationCode });\n\t\t}\n\t\tthis.busy = false;\n\t\tthis.selectedActionIndex = Math.min(this.selectedActionIndex, Math.max(0, this.currentActions().length - 1));\n\t\tthis.request();\n\t}\n\n\tasync openPluginManager(): Promise<PluginManagerEntryOpenResultV1> {\n\t\treturn await this.refresh();\n\t}\n\n\thandleInput(data: string): void {\n\t\tif (!this._focused) return;\n\t\tconst kb = getKeybindings();\n\t\tif (this.busy) return;\n\t\tif (this.confirmation !== undefined) {\n\t\t\tif (kb.matches(data, \"tui.select.cancel\")) {\n\t\t\t\tthis.confirmation = undefined;\n\t\t\t\tthis.request();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (kb.matches(data, \"tui.select.confirm\")) {\n\t\t\t\tconst action = this.currentAction();\n\t\t\t\tif (action !== undefined) void this.perform(action);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"tui.select.cancel\")) {\n\t\t\tthis._focused = false;\n\t\t\tthis.onClose?.();\n\t\t\tthis.request();\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"tui.select.up\")) {\n\t\t\tthis.selectedIndex = Math.max(0, this.selectedIndex - 1);\n\t\t\tthis.selectedActionIndex = 0;\n\t\t\tthis.request();\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"tui.select.down\")) {\n\t\t\tthis.selectedIndex = Math.min(Math.max(0, this.entries.length - 1), this.selectedIndex + 1);\n\t\t\tthis.selectedActionIndex = 0;\n\t\t\tthis.request();\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"tui.input.tab\")) {\n\t\t\tconst actions = this.currentActions();\n\t\t\tif (actions.length > 0) this.selectedActionIndex = (this.selectedActionIndex + 1) % actions.length;\n\t\t\tthis.request();\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"tui.select.confirm\")) {\n\t\t\tconst entry = this.currentEntry();\n\t\t\tconst action = this.currentAction();\n\t\t\tif (entry !== undefined && action !== undefined) {\n\t\t\t\tthis.confirmation = { pluginId: entry.pluginId, action };\n\t\t\t\tthis.request();\n\t\t\t}\n\t\t}\n\t}\n\n\tinvalidate(): void {}\n\n\tgetSelectedPluginId(): string | undefined {\n\t\treturn this.currentEntry()?.pluginId;\n\t}\n\n\tgetSelectedAction(): PluginManagerActionV1 | undefined {\n\t\treturn this.currentAction();\n\t}\n\n\tgetStatus(): PluginManagerEntryOpenContextV1 {\n\t\treturn this.status;\n\t}\n}\n"]}
|