@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,1583 @@
|
|
|
1
|
+
import { uuidv7 } from "@agent-forge/ai";
|
|
2
|
+
import { randomUUID } from "crypto";
|
|
3
|
+
import { createReadStream, existsSync, mkdirSync } from "fs";
|
|
4
|
+
import { readdir, stat } from "fs/promises";
|
|
5
|
+
import { join, resolve } from "path";
|
|
6
|
+
import { createInterface } from "readline";
|
|
7
|
+
import { isDeepStrictEqual } from "util";
|
|
8
|
+
import { APP_NAME, getAgentDir as getDefaultAgentDir, getSessionsDir } from "../config.js";
|
|
9
|
+
import { normalizePath, resolvePath } from "../utils/paths.js";
|
|
10
|
+
import { createBranchSummaryMessage, createCompactionSummaryMessage, createCustomMessage, createInterruptedToolResultMessage, } from "./messages.js";
|
|
11
|
+
import { FileSessionStorageProvider, SessionHeaderScanLimitError, } from "./session-storage.js";
|
|
12
|
+
export const CURRENT_SESSION_VERSION = 3;
|
|
13
|
+
function sameSessionRevision(left, right) {
|
|
14
|
+
return (left.version === 1 &&
|
|
15
|
+
right.version === 1 &&
|
|
16
|
+
left.sessionId === right.sessionId &&
|
|
17
|
+
left.sequence === right.sequence &&
|
|
18
|
+
left.leafId === right.leafId);
|
|
19
|
+
}
|
|
20
|
+
function assertJsonSerializable(value, field, seen = new WeakSet(), path = field) {
|
|
21
|
+
if (value === null || typeof value === "string" || typeof value === "boolean")
|
|
22
|
+
return;
|
|
23
|
+
if (typeof value === "number") {
|
|
24
|
+
if (Number.isFinite(value))
|
|
25
|
+
return;
|
|
26
|
+
throw new Error(`${field} must be JSON-serializable: non-finite number at ${path}`);
|
|
27
|
+
}
|
|
28
|
+
if (typeof value === "undefined" ||
|
|
29
|
+
typeof value === "function" ||
|
|
30
|
+
typeof value === "symbol" ||
|
|
31
|
+
typeof value === "bigint") {
|
|
32
|
+
throw new Error(`${field} must be JSON-serializable: unsupported value at ${path}`);
|
|
33
|
+
}
|
|
34
|
+
if (typeof value !== "object")
|
|
35
|
+
throw new Error(`${field} must be JSON-serializable: unsupported value at ${path}`);
|
|
36
|
+
if (seen.has(value))
|
|
37
|
+
throw new Error(`${field} must be JSON-serializable: cyclic value at ${path}`);
|
|
38
|
+
if (!Array.isArray(value)) {
|
|
39
|
+
const prototype = Object.getPrototypeOf(value);
|
|
40
|
+
if (prototype !== Object.prototype && prototype !== null) {
|
|
41
|
+
throw new Error(`${field} must be JSON-serializable: non-plain object at ${path}`);
|
|
42
|
+
}
|
|
43
|
+
if (Object.getOwnPropertySymbols(value).length > 0) {
|
|
44
|
+
throw new Error(`${field} must be JSON-serializable: symbol key at ${path}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
seen.add(value);
|
|
48
|
+
try {
|
|
49
|
+
if (Array.isArray(value)) {
|
|
50
|
+
for (let index = 0; index < value.length; index++) {
|
|
51
|
+
assertJsonSerializable(value[index], field, seen, `${path}[${index}]`);
|
|
52
|
+
}
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
for (const key of Object.keys(value)) {
|
|
56
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
57
|
+
if (!descriptor || !("value" in descriptor)) {
|
|
58
|
+
throw new Error(`${field} must be JSON-serializable: accessor at ${path}.${key}`);
|
|
59
|
+
}
|
|
60
|
+
assertJsonSerializable(descriptor.value, field, seen, `${path}.${key}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
finally {
|
|
64
|
+
seen.delete(value);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function createSessionId() {
|
|
68
|
+
return uuidv7();
|
|
69
|
+
}
|
|
70
|
+
export function assertValidSessionId(id) {
|
|
71
|
+
if (!/^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$/.test(id)) {
|
|
72
|
+
throw new Error("Session id must be non-empty, contain only alphanumeric characters, '-', '_', and '.', and start and end with an alphanumeric character");
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/** Generate a unique short ID (8 hex chars, collision-checked) */
|
|
76
|
+
function generateId(byId) {
|
|
77
|
+
for (let i = 0; i < 100; i++) {
|
|
78
|
+
const id = randomUUID().slice(0, 8);
|
|
79
|
+
if (!byId.has(id))
|
|
80
|
+
return id;
|
|
81
|
+
}
|
|
82
|
+
// Fallback to full UUID if somehow we have collisions
|
|
83
|
+
return randomUUID();
|
|
84
|
+
}
|
|
85
|
+
/** Migrate v1 → v2: add id/parentId tree structure. Mutates in place. */
|
|
86
|
+
function migrateV1ToV2(entries) {
|
|
87
|
+
const ids = new Set();
|
|
88
|
+
let prevId = null;
|
|
89
|
+
for (const entry of entries) {
|
|
90
|
+
if (entry.type === "session") {
|
|
91
|
+
entry.version = 2;
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
entry.id = generateId(ids);
|
|
95
|
+
entry.parentId = prevId;
|
|
96
|
+
prevId = entry.id;
|
|
97
|
+
// Convert firstKeptEntryIndex to firstKeptEntryId for compaction
|
|
98
|
+
if (entry.type === "compaction") {
|
|
99
|
+
const comp = entry;
|
|
100
|
+
if (typeof comp.firstKeptEntryIndex === "number") {
|
|
101
|
+
const targetEntry = entries[comp.firstKeptEntryIndex];
|
|
102
|
+
if (targetEntry && targetEntry.type !== "session") {
|
|
103
|
+
comp.firstKeptEntryId = targetEntry.id;
|
|
104
|
+
}
|
|
105
|
+
delete comp.firstKeptEntryIndex;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/** Migrate v2 → v3: rename hookMessage role to custom. Mutates in place. */
|
|
111
|
+
function migrateV2ToV3(entries) {
|
|
112
|
+
for (const entry of entries) {
|
|
113
|
+
if (entry.type === "session") {
|
|
114
|
+
entry.version = 3;
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
// Update message entries with hookMessage role
|
|
118
|
+
if (entry.type === "message") {
|
|
119
|
+
const msgEntry = entry;
|
|
120
|
+
if (msgEntry.message && msgEntry.message.role === "hookMessage") {
|
|
121
|
+
msgEntry.message.role = "custom";
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Run all necessary migrations to bring entries to current version.
|
|
128
|
+
* Mutates entries in place. Returns true if any migration was applied.
|
|
129
|
+
*/
|
|
130
|
+
function migrateToCurrentVersion(entries) {
|
|
131
|
+
const header = entries.find((e) => e.type === "session");
|
|
132
|
+
const version = header?.version ?? 1;
|
|
133
|
+
if (version >= CURRENT_SESSION_VERSION)
|
|
134
|
+
return false;
|
|
135
|
+
if (version < 2)
|
|
136
|
+
migrateV1ToV2(entries);
|
|
137
|
+
if (version < 3)
|
|
138
|
+
migrateV2ToV3(entries);
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
/** Exported for testing */
|
|
142
|
+
export function migrateSessionEntries(entries) {
|
|
143
|
+
migrateToCurrentVersion(entries);
|
|
144
|
+
}
|
|
145
|
+
/** Exported for compaction.test.ts */
|
|
146
|
+
export function parseSessionEntries(content) {
|
|
147
|
+
const entries = [];
|
|
148
|
+
const lines = content.trim().split("\n");
|
|
149
|
+
for (const line of lines) {
|
|
150
|
+
if (!line.trim())
|
|
151
|
+
continue;
|
|
152
|
+
try {
|
|
153
|
+
const entry = JSON.parse(line);
|
|
154
|
+
entries.push(entry);
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
// Skip malformed lines
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return entries;
|
|
161
|
+
}
|
|
162
|
+
export function getLatestCompactionEntry(entries) {
|
|
163
|
+
for (let i = entries.length - 1; i >= 0; i--) {
|
|
164
|
+
if (entries[i].type === "compaction") {
|
|
165
|
+
return entries[i];
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
function buildEntryIndex(entries, byId) {
|
|
171
|
+
if (byId)
|
|
172
|
+
return byId;
|
|
173
|
+
const index = new Map();
|
|
174
|
+
for (const entry of entries) {
|
|
175
|
+
index.set(entry.id, entry);
|
|
176
|
+
}
|
|
177
|
+
return index;
|
|
178
|
+
}
|
|
179
|
+
function buildSessionPath(entries, leafId, byId) {
|
|
180
|
+
const index = buildEntryIndex(entries, byId);
|
|
181
|
+
let leaf;
|
|
182
|
+
if (leafId === null) {
|
|
183
|
+
return [];
|
|
184
|
+
}
|
|
185
|
+
if (leafId) {
|
|
186
|
+
leaf = index.get(leafId);
|
|
187
|
+
}
|
|
188
|
+
leaf ??= entries[entries.length - 1];
|
|
189
|
+
if (!leaf) {
|
|
190
|
+
return [];
|
|
191
|
+
}
|
|
192
|
+
const path = [];
|
|
193
|
+
let current = leaf;
|
|
194
|
+
while (current) {
|
|
195
|
+
path.push(current);
|
|
196
|
+
current = current.parentId ? index.get(current.parentId) : undefined;
|
|
197
|
+
}
|
|
198
|
+
path.reverse();
|
|
199
|
+
return path;
|
|
200
|
+
}
|
|
201
|
+
function getSessionContextSettings(path) {
|
|
202
|
+
let thinkingLevel = "off";
|
|
203
|
+
// 显式 /model 切换(model_change)优先于回合推导:assistant 消息的 provider 只
|
|
204
|
+
// 反映"当时用了什么",若让它按顺序覆盖显式切换,一次错误的恢复回合会把用户
|
|
205
|
+
// 的切换永久毒化(dogfood 2026-09-25 实测)。没有显式切换时才回退到最近回合
|
|
206
|
+
// 实际使用的模型。
|
|
207
|
+
let explicitModel = null;
|
|
208
|
+
let derivedModel = null;
|
|
209
|
+
for (const entry of path) {
|
|
210
|
+
if (entry.type === "thinking_level_change") {
|
|
211
|
+
thinkingLevel = entry.thinkingLevel;
|
|
212
|
+
}
|
|
213
|
+
else if (entry.type === "model_change") {
|
|
214
|
+
explicitModel = { provider: entry.provider, modelId: entry.modelId };
|
|
215
|
+
}
|
|
216
|
+
else if (entry.type === "message" && entry.message.role === "assistant") {
|
|
217
|
+
derivedModel = { provider: entry.message.provider, modelId: entry.message.model };
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return { thinkingLevel, model: explicitModel ?? derivedModel };
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Assistant messages that ended in error, were aborted, or are deferred are
|
|
224
|
+
* runtime outcomes, not conversation content. They stay in the session file
|
|
225
|
+
* for history and rendering of the live turn, but must not re-enter the model
|
|
226
|
+
* context on rebuild (compaction, tree navigation, resume).
|
|
227
|
+
*/
|
|
228
|
+
function isContextMessage(message) {
|
|
229
|
+
return (message.role !== "assistant" ||
|
|
230
|
+
(message.stopReason !== "error" && message.stopReason !== "aborted" && message.stopReason !== "deferred"));
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Backfill dangling toolCalls left by a crash or force-kill between an
|
|
234
|
+
* assistant message and its toolResult messages: providers reject that
|
|
235
|
+
* half-paired sequence on resume. Mirroring the live cancel path
|
|
236
|
+
* (failUnexecutedToolCalls), each dangling call gets one deterministic error
|
|
237
|
+
* toolResult inserted immediately after its assistant message — the position
|
|
238
|
+
* providers require for tool_call/tool_result pairing. This is a pure
|
|
239
|
+
* in-memory projection repair; the session file is never rewritten.
|
|
240
|
+
*
|
|
241
|
+
* O(n) over the projected sequence and idempotent: the synthetic results are
|
|
242
|
+
* derived from fixed session data (the assistant message's timestamp, not
|
|
243
|
+
* Date.now()), and a sequence without dangling calls is returned unchanged
|
|
244
|
+
* (same reference).
|
|
245
|
+
*/
|
|
246
|
+
function backfillDanglingToolResults(messages) {
|
|
247
|
+
const answeredToolCallIds = new Set();
|
|
248
|
+
for (const message of messages) {
|
|
249
|
+
if (message.role === "toolResult")
|
|
250
|
+
answeredToolCallIds.add(message.toolCallId);
|
|
251
|
+
}
|
|
252
|
+
const repaired = [];
|
|
253
|
+
let changed = false;
|
|
254
|
+
for (const message of messages) {
|
|
255
|
+
repaired.push(message);
|
|
256
|
+
if (message.role === "assistant") {
|
|
257
|
+
const danglingCalls = message.content.filter((block) => block.type === "toolCall" && !answeredToolCallIds.has(block.id));
|
|
258
|
+
if (danglingCalls.length > 0) {
|
|
259
|
+
for (const call of danglingCalls) {
|
|
260
|
+
answeredToolCallIds.add(call.id);
|
|
261
|
+
repaired.push(createInterruptedToolResultMessage(call, message.timestamp));
|
|
262
|
+
}
|
|
263
|
+
changed = true;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
return changed ? repaired : messages;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Project one selected session entry into LLM/runtime messages.
|
|
271
|
+
* Plain custom entries are display/state entries and do not participate in context.
|
|
272
|
+
*/
|
|
273
|
+
export function sessionEntryToContextMessages(entry) {
|
|
274
|
+
if (entry.type === "message") {
|
|
275
|
+
const message = entry.message;
|
|
276
|
+
// Session files are parsed without validation; old versions, forks, or
|
|
277
|
+
// hand-edited files can contain messages with null/missing content.
|
|
278
|
+
if ((message.role === "user" || message.role === "assistant" || message.role === "toolResult") &&
|
|
279
|
+
message.content == null) {
|
|
280
|
+
return [{ ...message, content: [] }];
|
|
281
|
+
}
|
|
282
|
+
return [message];
|
|
283
|
+
}
|
|
284
|
+
if (entry.type === "custom_message") {
|
|
285
|
+
return [
|
|
286
|
+
createCustomMessage(entry.customType, entry.content ?? [], entry.display, entry.details, entry.timestamp),
|
|
287
|
+
];
|
|
288
|
+
}
|
|
289
|
+
if (entry.type === "branch_summary" && entry.summary) {
|
|
290
|
+
return [createBranchSummaryMessage(entry.summary, entry.fromId, entry.timestamp)];
|
|
291
|
+
}
|
|
292
|
+
if (entry.type === "compaction") {
|
|
293
|
+
return [createCompactionSummaryMessage(entry.summary, entry.tokensBefore, entry.timestamp)];
|
|
294
|
+
}
|
|
295
|
+
return [];
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Build the active, compaction-aware session entry list.
|
|
299
|
+
*
|
|
300
|
+
* This follows the current leaf path. If the path contains compaction entries,
|
|
301
|
+
* the latest compaction is represented by the compaction entry itself, followed
|
|
302
|
+
* by the kept entries starting at firstKeptEntryId and all entries after the
|
|
303
|
+
* compaction entry. Older summarized entries are omitted.
|
|
304
|
+
*/
|
|
305
|
+
export function buildContextEntries(entries, leafId, byId) {
|
|
306
|
+
const path = buildSessionPath(entries, leafId, byId);
|
|
307
|
+
let compaction = null;
|
|
308
|
+
for (const entry of path) {
|
|
309
|
+
if (entry.type === "compaction") {
|
|
310
|
+
compaction = entry;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
if (!compaction) {
|
|
314
|
+
return path;
|
|
315
|
+
}
|
|
316
|
+
const compactionIdx = path.findIndex((entry) => entry.id === compaction.id);
|
|
317
|
+
if (compactionIdx < 0) {
|
|
318
|
+
return path;
|
|
319
|
+
}
|
|
320
|
+
const contextEntries = [compaction];
|
|
321
|
+
let foundFirstKept = false;
|
|
322
|
+
for (let i = 0; i < compactionIdx; i++) {
|
|
323
|
+
const entry = path[i];
|
|
324
|
+
if (entry.id === compaction.firstKeptEntryId) {
|
|
325
|
+
foundFirstKept = true;
|
|
326
|
+
}
|
|
327
|
+
if (foundFirstKept) {
|
|
328
|
+
contextEntries.push(entry);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
contextEntries.push(...path.slice(compactionIdx + 1));
|
|
332
|
+
return contextEntries;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Build the session context from entries using tree traversal.
|
|
336
|
+
* If leafId is provided, walks from that entry to root.
|
|
337
|
+
* Handles compaction and branch summaries along the path.
|
|
338
|
+
*
|
|
339
|
+
* `entryProjections` are REGISTERED generic transforms (see
|
|
340
|
+
* {@link SessionManager.registerEntryProjection}): each receives the projected
|
|
341
|
+
* entry list and may replace entries (e.g. a policy plugin eliding bulky old
|
|
342
|
+
* tool results). The kernel applies whatever projections are registered and
|
|
343
|
+
* knows nothing about any specific one.
|
|
344
|
+
*/
|
|
345
|
+
export function buildSessionContext(entries, leafId, byId, entryProjections) {
|
|
346
|
+
const path = buildSessionPath(entries, leafId, byId);
|
|
347
|
+
const { thinkingLevel, model } = getSessionContextSettings(path);
|
|
348
|
+
// The filter lives here, not in sessionEntryToContextMessages: rendering
|
|
349
|
+
// reuses this projection and must still show failed turns after a reload.
|
|
350
|
+
const contextEntries = buildContextEntries(entries, leafId, byId);
|
|
351
|
+
const projected = entryProjections === undefined ? contextEntries : applyEntryProjections(contextEntries, entryProjections);
|
|
352
|
+
const messages = backfillDanglingToolResults(projected.flatMap(sessionEntryToContextMessages).filter(isContextMessage));
|
|
353
|
+
return { messages, thinkingLevel, model };
|
|
354
|
+
}
|
|
355
|
+
function applyEntryProjections(entries, projections) {
|
|
356
|
+
let projected = entries;
|
|
357
|
+
for (const projection of projections) {
|
|
358
|
+
projected = projection.project(projected);
|
|
359
|
+
}
|
|
360
|
+
return projected;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Compute the default session directory for a cwd.
|
|
364
|
+
* Encodes cwd into a safe directory name under ~/.agent-forge/agent/sessions/.
|
|
365
|
+
*/
|
|
366
|
+
function getDefaultSessionDirPath(cwd, agentDir = getDefaultAgentDir()) {
|
|
367
|
+
const resolvedCwd = resolvePath(cwd);
|
|
368
|
+
const resolvedAgentDir = resolvePath(agentDir);
|
|
369
|
+
const safePath = `--${resolvedCwd.replace(/^[/\\]/, "").replace(/[/\\:]/g, "-")}--`;
|
|
370
|
+
return join(resolvedAgentDir, "sessions", safePath);
|
|
371
|
+
}
|
|
372
|
+
export function getDefaultSessionDir(cwd, agentDir = getDefaultAgentDir()) {
|
|
373
|
+
const sessionDir = getDefaultSessionDirPath(cwd, agentDir);
|
|
374
|
+
if (!existsSync(sessionDir)) {
|
|
375
|
+
mkdirSync(sessionDir, { recursive: true });
|
|
376
|
+
}
|
|
377
|
+
return sessionDir;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Compute the trace file path paired with a session file path: the single
|
|
381
|
+
* source of truth for the session/trace pairing convention (X.jsonl ->
|
|
382
|
+
* X.trace.jsonl in the same directory).
|
|
383
|
+
*
|
|
384
|
+
* A trailing ".jsonl" (case-sensitive, matching how this codebase generates
|
|
385
|
+
* session file names) is replaced with ".trace.jsonl"; any other path gets
|
|
386
|
+
* ".trace.jsonl" appended. Idempotent by convention: an input already ending
|
|
387
|
+
* in ".trace.jsonl" is returned unchanged, so applying the mapping twice
|
|
388
|
+
* cannot produce ".trace.jsonl.trace.jsonl".
|
|
389
|
+
*
|
|
390
|
+
* Pure function: no IO, no state, no filesystem access.
|
|
391
|
+
*/
|
|
392
|
+
export function getTraceFilePathForSession(sessionFilePath) {
|
|
393
|
+
if (sessionFilePath.endsWith(".trace.jsonl")) {
|
|
394
|
+
return sessionFilePath;
|
|
395
|
+
}
|
|
396
|
+
if (sessionFilePath.endsWith(".jsonl")) {
|
|
397
|
+
return `${sessionFilePath.slice(0, -".jsonl".length)}.trace.jsonl`;
|
|
398
|
+
}
|
|
399
|
+
return `${sessionFilePath}.trace.jsonl`;
|
|
400
|
+
}
|
|
401
|
+
function parseSessionEntryLine(line) {
|
|
402
|
+
if (!line.trim())
|
|
403
|
+
return null;
|
|
404
|
+
try {
|
|
405
|
+
return JSON.parse(line);
|
|
406
|
+
}
|
|
407
|
+
catch {
|
|
408
|
+
// Skip malformed lines
|
|
409
|
+
return null;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
/** Exported for testing; delegates to the default file storage provider. */
|
|
413
|
+
export function loadEntriesFromFile(filePath) {
|
|
414
|
+
return FileSessionStorageProvider.instance.loadEntries(filePath);
|
|
415
|
+
}
|
|
416
|
+
function readSessionHeaderForDiscovery(storage, filePath) {
|
|
417
|
+
try {
|
|
418
|
+
return storage.readHeader(filePath);
|
|
419
|
+
}
|
|
420
|
+
catch {
|
|
421
|
+
// Discovery is best-effort: unreadable or oversized files are not sessions,
|
|
422
|
+
// and one corrupt file must not prevent other sessions from being found.
|
|
423
|
+
return null;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
function getSessionHeaderCwd(header) {
|
|
427
|
+
const cwd = header.cwd;
|
|
428
|
+
return typeof cwd === "string" ? cwd : undefined;
|
|
429
|
+
}
|
|
430
|
+
function sessionCwdMatches(cwd, resolvedCwd) {
|
|
431
|
+
return cwd !== undefined && cwd !== "" && resolvePath(cwd) === resolvedCwd;
|
|
432
|
+
}
|
|
433
|
+
function findMostRecentSessionWithStorage(storage, sessionDir, cwd) {
|
|
434
|
+
const resolvedCwd = cwd ? resolvePath(cwd) : undefined;
|
|
435
|
+
try {
|
|
436
|
+
const files = storage
|
|
437
|
+
.listSessionFiles(sessionDir)
|
|
438
|
+
.map((path) => ({ path, header: readSessionHeaderForDiscovery(storage, path) }))
|
|
439
|
+
.filter((file) => file.header !== null &&
|
|
440
|
+
(!resolvedCwd || sessionCwdMatches(getSessionHeaderCwd(file.header), resolvedCwd)))
|
|
441
|
+
.map(({ path }) => ({ path, mtime: storage.modifiedTime(path) }))
|
|
442
|
+
.sort((a, b) => b.mtime.getTime() - a.mtime.getTime());
|
|
443
|
+
return files[0]?.path || null;
|
|
444
|
+
}
|
|
445
|
+
catch {
|
|
446
|
+
// Directory access and stat races make recent-session discovery unavailable.
|
|
447
|
+
return null;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
/** Exported for testing; delegates to the default file storage provider. */
|
|
451
|
+
export function findMostRecentSession(sessionDir, cwd) {
|
|
452
|
+
return findMostRecentSessionWithStorage(FileSessionStorageProvider.instance, sessionDir, cwd);
|
|
453
|
+
}
|
|
454
|
+
function isMessageWithContent(message) {
|
|
455
|
+
return typeof message.role === "string" && "content" in message;
|
|
456
|
+
}
|
|
457
|
+
function extractTextContent(message) {
|
|
458
|
+
const content = message.content;
|
|
459
|
+
if (typeof content === "string") {
|
|
460
|
+
return content;
|
|
461
|
+
}
|
|
462
|
+
return content
|
|
463
|
+
.filter((block) => block.type === "text")
|
|
464
|
+
.map((block) => block.text)
|
|
465
|
+
.join(" ");
|
|
466
|
+
}
|
|
467
|
+
function getMessageActivityTime(entry) {
|
|
468
|
+
const message = entry.message;
|
|
469
|
+
if (!isMessageWithContent(message))
|
|
470
|
+
return undefined;
|
|
471
|
+
if (message.role !== "user" && message.role !== "assistant")
|
|
472
|
+
return undefined;
|
|
473
|
+
const msgTimestamp = message.timestamp;
|
|
474
|
+
if (typeof msgTimestamp === "number") {
|
|
475
|
+
return msgTimestamp;
|
|
476
|
+
}
|
|
477
|
+
const t = new Date(entry.timestamp).getTime();
|
|
478
|
+
return Number.isNaN(t) ? undefined : t;
|
|
479
|
+
}
|
|
480
|
+
async function buildSessionInfo(filePath) {
|
|
481
|
+
try {
|
|
482
|
+
const stats = await stat(filePath);
|
|
483
|
+
let header = null;
|
|
484
|
+
let messageCount = 0;
|
|
485
|
+
let firstMessage = "";
|
|
486
|
+
const allMessages = [];
|
|
487
|
+
let name;
|
|
488
|
+
let lastActivityTime;
|
|
489
|
+
const rl = createInterface({
|
|
490
|
+
input: createReadStream(filePath, { encoding: "utf8" }),
|
|
491
|
+
crlfDelay: Infinity,
|
|
492
|
+
});
|
|
493
|
+
for await (const line of rl) {
|
|
494
|
+
const entry = parseSessionEntryLine(line);
|
|
495
|
+
if (!entry)
|
|
496
|
+
continue;
|
|
497
|
+
if (!header) {
|
|
498
|
+
if (entry.type !== "session")
|
|
499
|
+
return null;
|
|
500
|
+
header = entry;
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
// Extract session name (use latest, including explicit clears)
|
|
504
|
+
if (entry.type === "session_info") {
|
|
505
|
+
name = entry.name?.trim() || undefined;
|
|
506
|
+
}
|
|
507
|
+
if (entry.type !== "message")
|
|
508
|
+
continue;
|
|
509
|
+
messageCount++;
|
|
510
|
+
const activityTime = getMessageActivityTime(entry);
|
|
511
|
+
if (typeof activityTime === "number") {
|
|
512
|
+
lastActivityTime = Math.max(lastActivityTime ?? 0, activityTime);
|
|
513
|
+
}
|
|
514
|
+
const message = entry.message;
|
|
515
|
+
if (!isMessageWithContent(message))
|
|
516
|
+
continue;
|
|
517
|
+
if (message.role !== "user" && message.role !== "assistant")
|
|
518
|
+
continue;
|
|
519
|
+
const textContent = extractTextContent(message);
|
|
520
|
+
if (!textContent)
|
|
521
|
+
continue;
|
|
522
|
+
allMessages.push(textContent);
|
|
523
|
+
if (!firstMessage && message.role === "user") {
|
|
524
|
+
firstMessage = textContent;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
if (!header)
|
|
528
|
+
return null;
|
|
529
|
+
const cwd = typeof header.cwd === "string" ? header.cwd : "";
|
|
530
|
+
const parentSessionPath = header.parentSession;
|
|
531
|
+
// Same guard style as cwd: parsed headers are untyped, so non-string
|
|
532
|
+
// values (hand-edited files) read back as missing.
|
|
533
|
+
const profileId = typeof header.profileId === "string" ? header.profileId : undefined;
|
|
534
|
+
const profileVersion = typeof header.profileVersion === "string" ? header.profileVersion : undefined;
|
|
535
|
+
const headerTime = typeof header.timestamp === "string" ? new Date(header.timestamp).getTime() : NaN;
|
|
536
|
+
const modified = typeof lastActivityTime === "number" && lastActivityTime > 0
|
|
537
|
+
? new Date(lastActivityTime)
|
|
538
|
+
: !Number.isNaN(headerTime)
|
|
539
|
+
? new Date(headerTime)
|
|
540
|
+
: stats.mtime;
|
|
541
|
+
return {
|
|
542
|
+
path: filePath,
|
|
543
|
+
id: header.id,
|
|
544
|
+
cwd,
|
|
545
|
+
name,
|
|
546
|
+
parentSessionPath,
|
|
547
|
+
profileId,
|
|
548
|
+
profileVersion,
|
|
549
|
+
created: new Date(header.timestamp),
|
|
550
|
+
modified,
|
|
551
|
+
messageCount,
|
|
552
|
+
firstMessage: firstMessage || "(no messages)",
|
|
553
|
+
allMessagesText: allMessages.join(" "),
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
catch {
|
|
557
|
+
return null;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
const MAX_CONCURRENT_SESSION_INFO_LOADS = 10;
|
|
561
|
+
async function buildSessionInfosWithConcurrency(files, onLoaded) {
|
|
562
|
+
const results = new Array(files.length).fill(null);
|
|
563
|
+
const inFlight = new Set();
|
|
564
|
+
let nextIndex = 0;
|
|
565
|
+
const startNext = () => {
|
|
566
|
+
const index = nextIndex++;
|
|
567
|
+
const file = files[index];
|
|
568
|
+
if (!file)
|
|
569
|
+
return;
|
|
570
|
+
let task;
|
|
571
|
+
task = buildSessionInfo(file)
|
|
572
|
+
.then((info) => {
|
|
573
|
+
results[index] = info;
|
|
574
|
+
})
|
|
575
|
+
.catch(() => {
|
|
576
|
+
results[index] = null;
|
|
577
|
+
})
|
|
578
|
+
.finally(() => {
|
|
579
|
+
inFlight.delete(task);
|
|
580
|
+
onLoaded();
|
|
581
|
+
});
|
|
582
|
+
inFlight.add(task);
|
|
583
|
+
};
|
|
584
|
+
while (nextIndex < files.length || inFlight.size > 0) {
|
|
585
|
+
while (nextIndex < files.length && inFlight.size < MAX_CONCURRENT_SESSION_INFO_LOADS) {
|
|
586
|
+
startNext();
|
|
587
|
+
}
|
|
588
|
+
if (inFlight.size > 0) {
|
|
589
|
+
await Promise.race(inFlight);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
return results;
|
|
593
|
+
}
|
|
594
|
+
async function listSessionsFromDir(dir, onProgress, progressOffset = 0, progressTotal) {
|
|
595
|
+
const sessions = [];
|
|
596
|
+
if (!existsSync(dir)) {
|
|
597
|
+
return sessions;
|
|
598
|
+
}
|
|
599
|
+
try {
|
|
600
|
+
const dirEntries = await readdir(dir);
|
|
601
|
+
const files = dirEntries.filter((f) => f.endsWith(".jsonl")).map((f) => join(dir, f));
|
|
602
|
+
const total = progressTotal ?? files.length;
|
|
603
|
+
let loaded = 0;
|
|
604
|
+
const results = await buildSessionInfosWithConcurrency(files, () => {
|
|
605
|
+
loaded++;
|
|
606
|
+
onProgress?.(progressOffset + loaded, total);
|
|
607
|
+
});
|
|
608
|
+
for (const info of results) {
|
|
609
|
+
if (info) {
|
|
610
|
+
sessions.push(info);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
catch {
|
|
615
|
+
// Return empty list on error
|
|
616
|
+
}
|
|
617
|
+
return sessions;
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Manages conversation sessions as append-only trees stored in JSONL files.
|
|
621
|
+
*
|
|
622
|
+
* Each session entry has an id and parentId forming a tree structure. The "leaf"
|
|
623
|
+
* pointer tracks the current position. Appending creates a child of the current leaf.
|
|
624
|
+
* Branching moves the leaf to an earlier entry, allowing new branches without
|
|
625
|
+
* modifying history.
|
|
626
|
+
*
|
|
627
|
+
* Use buildSessionContext() to get the resolved message list for the LLM, which
|
|
628
|
+
* handles compaction summaries and follows the path from root to current leaf.
|
|
629
|
+
*/
|
|
630
|
+
export class SessionManager {
|
|
631
|
+
sessionId = "";
|
|
632
|
+
sessionFile;
|
|
633
|
+
sessionDir;
|
|
634
|
+
cwd;
|
|
635
|
+
persist;
|
|
636
|
+
flushed = false;
|
|
637
|
+
entryProjections = [];
|
|
638
|
+
fileEntries = [];
|
|
639
|
+
byId = new Map();
|
|
640
|
+
labelsById = new Map();
|
|
641
|
+
labelTimestampsById = new Map();
|
|
642
|
+
compactionOperations = new Map();
|
|
643
|
+
leafId = null;
|
|
644
|
+
storage;
|
|
645
|
+
/** Cross-process write-arbitration identity (D-067 phase 2 S5); assigned lazily. */
|
|
646
|
+
storageWriterId;
|
|
647
|
+
constructor(cwd, sessionDir, sessionFile, persist, newSessionOptions, preloadedFileEntries, storage = FileSessionStorageProvider.instance) {
|
|
648
|
+
this.cwd = resolvePath(cwd);
|
|
649
|
+
this.sessionDir = normalizePath(sessionDir);
|
|
650
|
+
this.persist = persist;
|
|
651
|
+
this.storage = storage;
|
|
652
|
+
if (persist && this.sessionDir) {
|
|
653
|
+
this.storage.ensureDir(this.sessionDir);
|
|
654
|
+
}
|
|
655
|
+
if (sessionFile) {
|
|
656
|
+
this._setSessionFile(sessionFile, preloadedFileEntries);
|
|
657
|
+
}
|
|
658
|
+
else {
|
|
659
|
+
this.newSession(newSessionOptions);
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
/** Switch to a different session file (used for resume and branching) */
|
|
663
|
+
setSessionFile(sessionFile) {
|
|
664
|
+
this._setSessionFile(sessionFile);
|
|
665
|
+
}
|
|
666
|
+
_setSessionFile(sessionFile, preloadedFileEntries) {
|
|
667
|
+
this.sessionFile = resolvePath(sessionFile);
|
|
668
|
+
if (this.storage.exists(this.sessionFile)) {
|
|
669
|
+
this.fileEntries = preloadedFileEntries ?? this.storage.loadEntries(this.sessionFile);
|
|
670
|
+
// If file was empty, initialize it with a valid session header. If it was
|
|
671
|
+
// non-empty but did not parse as a valid Agent Forge session, fail without modifying it.
|
|
672
|
+
if (this.fileEntries.length === 0) {
|
|
673
|
+
const explicitPath = this.sessionFile;
|
|
674
|
+
if (this.storage.size(explicitPath) > 0) {
|
|
675
|
+
throw new Error(`Session file is not a valid ${APP_NAME} session: ${explicitPath}`);
|
|
676
|
+
}
|
|
677
|
+
this.newSession();
|
|
678
|
+
this.sessionFile = explicitPath;
|
|
679
|
+
this._rewriteFile();
|
|
680
|
+
this.flushed = true;
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
683
|
+
const header = this.fileEntries.find((e) => e.type === "session");
|
|
684
|
+
this.sessionId = header?.id ?? createSessionId();
|
|
685
|
+
if (migrateToCurrentVersion(this.fileEntries)) {
|
|
686
|
+
this._rewriteFile();
|
|
687
|
+
}
|
|
688
|
+
this._buildIndex();
|
|
689
|
+
this.flushed = true;
|
|
690
|
+
}
|
|
691
|
+
else {
|
|
692
|
+
const explicitPath = this.sessionFile;
|
|
693
|
+
this.newSession();
|
|
694
|
+
this.sessionFile = explicitPath; // preserve explicit path from --session flag
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
newSession(options) {
|
|
698
|
+
if (options?.id !== undefined) {
|
|
699
|
+
assertValidSessionId(options.id);
|
|
700
|
+
}
|
|
701
|
+
this.sessionId = options?.id ?? createSessionId();
|
|
702
|
+
const timestamp = new Date().toISOString();
|
|
703
|
+
const header = {
|
|
704
|
+
type: "session",
|
|
705
|
+
version: CURRENT_SESSION_VERSION,
|
|
706
|
+
id: this.sessionId,
|
|
707
|
+
timestamp,
|
|
708
|
+
cwd: this.cwd,
|
|
709
|
+
parentSession: options?.parentSession,
|
|
710
|
+
// Optional profile lock: omit the keys entirely when absent so the
|
|
711
|
+
// header matches the "optional field" semantics end to end.
|
|
712
|
+
...(options?.profileId === undefined ? {} : { profileId: options.profileId }),
|
|
713
|
+
...(options?.profileVersion === undefined ? {} : { profileVersion: options.profileVersion }),
|
|
714
|
+
// 子代理血缘(可选,见 SessionHeader)
|
|
715
|
+
...(options?.parentAgentSession === undefined ? {} : { parentAgentSession: options.parentAgentSession }),
|
|
716
|
+
...(options?.agentRole === undefined ? {} : { agentRole: options.agentRole }),
|
|
717
|
+
// 回合级血缘(可选,见 SessionHeader):缺席时键整个省略。
|
|
718
|
+
...(options?.parentTraceId === undefined ? {} : { parentTraceId: options.parentTraceId }),
|
|
719
|
+
};
|
|
720
|
+
this.fileEntries = [header];
|
|
721
|
+
this.byId.clear();
|
|
722
|
+
this.labelsById.clear();
|
|
723
|
+
this.labelTimestampsById.clear();
|
|
724
|
+
this.compactionOperations.clear();
|
|
725
|
+
this.leafId = null;
|
|
726
|
+
this.flushed = false;
|
|
727
|
+
if (this.persist) {
|
|
728
|
+
const fileTimestamp = timestamp.replace(/[:.]/g, "-");
|
|
729
|
+
this.sessionFile = join(this.getSessionDir(), `${fileTimestamp}_${this.sessionId}.jsonl`);
|
|
730
|
+
}
|
|
731
|
+
return this.sessionFile;
|
|
732
|
+
}
|
|
733
|
+
_buildIndex() {
|
|
734
|
+
this.byId.clear();
|
|
735
|
+
this.labelsById.clear();
|
|
736
|
+
this.labelTimestampsById.clear();
|
|
737
|
+
this.compactionOperations.clear();
|
|
738
|
+
this.leafId = null;
|
|
739
|
+
for (const entry of this.fileEntries) {
|
|
740
|
+
if (entry.type === "session")
|
|
741
|
+
continue;
|
|
742
|
+
this.byId.set(entry.id, entry);
|
|
743
|
+
this.leafId = entry.id;
|
|
744
|
+
if (entry.type === "compaction" && entry.operationId !== undefined) {
|
|
745
|
+
if (typeof entry.operationId !== "string" || entry.operationId.trim() === "") {
|
|
746
|
+
throw new Error(`Invalid compaction operationId in session entry: ${entry.id}`);
|
|
747
|
+
}
|
|
748
|
+
if (this.compactionOperations.has(entry.operationId)) {
|
|
749
|
+
throw new Error(`Duplicate compaction operationId in session: ${entry.operationId}`);
|
|
750
|
+
}
|
|
751
|
+
this.compactionOperations.set(entry.operationId, entry);
|
|
752
|
+
}
|
|
753
|
+
if (entry.type === "label") {
|
|
754
|
+
if (entry.label) {
|
|
755
|
+
this.labelsById.set(entry.targetId, entry.label);
|
|
756
|
+
this.labelTimestampsById.set(entry.targetId, entry.timestamp);
|
|
757
|
+
}
|
|
758
|
+
else {
|
|
759
|
+
this.labelsById.delete(entry.targetId);
|
|
760
|
+
this.labelTimestampsById.delete(entry.targetId);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
_rewriteFile() {
|
|
766
|
+
if (!this.persist || !this.sessionFile)
|
|
767
|
+
return;
|
|
768
|
+
this.assertWritable();
|
|
769
|
+
this.storage.rewrite(this.sessionFile, this.fileEntries);
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Cross-process write arbitration (D-067 phase 2 S5): a conflicting live
|
|
773
|
+
* foreign owner fails the write explicitly — concurrent writers must never
|
|
774
|
+
* silently fork the session history. Dead owners (closed or crashed
|
|
775
|
+
* processes) are taken over and same-process writers are allowed by the
|
|
776
|
+
* guard itself; the append rollback below keeps memory consistent when it
|
|
777
|
+
* throws.
|
|
778
|
+
*/
|
|
779
|
+
assertWritable() {
|
|
780
|
+
if (!this.persist || !this.sessionFile)
|
|
781
|
+
return;
|
|
782
|
+
this.storageWriterId ??= randomUUID();
|
|
783
|
+
this.storage.guard?.ensureWritable(this.sessionFile, this.storageWriterId);
|
|
784
|
+
}
|
|
785
|
+
isPersisted() {
|
|
786
|
+
return this.persist;
|
|
787
|
+
}
|
|
788
|
+
getCwd() {
|
|
789
|
+
return this.cwd;
|
|
790
|
+
}
|
|
791
|
+
getSessionDir() {
|
|
792
|
+
return this.sessionDir;
|
|
793
|
+
}
|
|
794
|
+
usesDefaultSessionDir() {
|
|
795
|
+
return this.sessionDir === getDefaultSessionDirPath(this.cwd);
|
|
796
|
+
}
|
|
797
|
+
getSessionId() {
|
|
798
|
+
return this.sessionId;
|
|
799
|
+
}
|
|
800
|
+
getSessionFile() {
|
|
801
|
+
return this.sessionFile;
|
|
802
|
+
}
|
|
803
|
+
/** Return a stable host fact for optimistic session operations. */
|
|
804
|
+
getRevision() {
|
|
805
|
+
return {
|
|
806
|
+
version: 1,
|
|
807
|
+
sessionId: this.sessionId,
|
|
808
|
+
sequence: Math.max(0, this.fileEntries.length - 1),
|
|
809
|
+
leafId: this.leafId,
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
_persist(entry) {
|
|
813
|
+
if (!this.persist || !this.sessionFile)
|
|
814
|
+
return;
|
|
815
|
+
this.assertWritable();
|
|
816
|
+
const hasAssistant = this.fileEntries.some((e) => e.type === "message" && e.message.role === "assistant");
|
|
817
|
+
if (!hasAssistant) {
|
|
818
|
+
if (this.flushed) {
|
|
819
|
+
this.storage.append(this.sessionFile, entry);
|
|
820
|
+
}
|
|
821
|
+
else {
|
|
822
|
+
// Mark as not flushed so when assistant arrives, all entries get written
|
|
823
|
+
this.flushed = false;
|
|
824
|
+
}
|
|
825
|
+
return;
|
|
826
|
+
}
|
|
827
|
+
if (!this.flushed) {
|
|
828
|
+
this.storage.createExclusive(this.sessionFile, this.fileEntries);
|
|
829
|
+
this.flushed = true;
|
|
830
|
+
}
|
|
831
|
+
else {
|
|
832
|
+
this.storage.append(this.sessionFile, entry);
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
_appendEntry(entry) {
|
|
836
|
+
const previousEntries = this.fileEntries.slice();
|
|
837
|
+
const previousById = new Map(this.byId);
|
|
838
|
+
const previousLeafId = this.leafId;
|
|
839
|
+
const previousFlushed = this.flushed;
|
|
840
|
+
const sessionFile = this.sessionFile;
|
|
841
|
+
const fileExisted = sessionFile !== undefined && this.storage.exists(sessionFile);
|
|
842
|
+
const previousFileSize = fileExisted ? this.storage.size(sessionFile) : undefined;
|
|
843
|
+
this.fileEntries.push(entry);
|
|
844
|
+
this.byId.set(entry.id, entry);
|
|
845
|
+
this.leafId = entry.id;
|
|
846
|
+
try {
|
|
847
|
+
this._persist(entry);
|
|
848
|
+
}
|
|
849
|
+
catch (error) {
|
|
850
|
+
this.fileEntries = previousEntries;
|
|
851
|
+
this.byId = previousById;
|
|
852
|
+
this.leafId = previousLeafId;
|
|
853
|
+
this.flushed = previousFlushed;
|
|
854
|
+
try {
|
|
855
|
+
if (sessionFile && previousFileSize !== undefined) {
|
|
856
|
+
this.storage.truncate(sessionFile, previousFileSize);
|
|
857
|
+
}
|
|
858
|
+
else if (sessionFile && !fileExisted && this.storage.exists(sessionFile)) {
|
|
859
|
+
// The first flushed append may create the session file. Remove only
|
|
860
|
+
// the file created by this failed append.
|
|
861
|
+
this.storage.remove(sessionFile);
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
catch (rollbackError) {
|
|
865
|
+
throw new AggregateError([error, rollbackError], "Session append failed and rollback failed");
|
|
866
|
+
}
|
|
867
|
+
throw error;
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
/** Append a message as child of current leaf, then advance leaf. Returns entry id.
|
|
871
|
+
* Does not allow writing CompactionSummaryMessage and BranchSummaryMessage directly.
|
|
872
|
+
* Reason: we want these to be top-level entries in the session, not message session entries,
|
|
873
|
+
* so it is easier to find them.
|
|
874
|
+
* These need to be appended via appendCompaction() and appendBranchSummary() methods.
|
|
875
|
+
*/
|
|
876
|
+
appendMessage(message) {
|
|
877
|
+
const entry = {
|
|
878
|
+
type: "message",
|
|
879
|
+
id: generateId(this.byId),
|
|
880
|
+
parentId: this.leafId,
|
|
881
|
+
timestamp: new Date().toISOString(),
|
|
882
|
+
message,
|
|
883
|
+
};
|
|
884
|
+
this._appendEntry(entry);
|
|
885
|
+
return entry.id;
|
|
886
|
+
}
|
|
887
|
+
/** Append a thinking level change as child of current leaf, then advance leaf. Returns entry id. */
|
|
888
|
+
appendThinkingLevelChange(thinkingLevel) {
|
|
889
|
+
const entry = {
|
|
890
|
+
type: "thinking_level_change",
|
|
891
|
+
id: generateId(this.byId),
|
|
892
|
+
parentId: this.leafId,
|
|
893
|
+
timestamp: new Date().toISOString(),
|
|
894
|
+
thinkingLevel,
|
|
895
|
+
};
|
|
896
|
+
this._appendEntry(entry);
|
|
897
|
+
return entry.id;
|
|
898
|
+
}
|
|
899
|
+
/** Append a model change as child of current leaf, then advance leaf. Returns entry id. */
|
|
900
|
+
appendModelChange(provider, modelId) {
|
|
901
|
+
const entry = {
|
|
902
|
+
type: "model_change",
|
|
903
|
+
id: generateId(this.byId),
|
|
904
|
+
parentId: this.leafId,
|
|
905
|
+
timestamp: new Date().toISOString(),
|
|
906
|
+
provider,
|
|
907
|
+
modelId,
|
|
908
|
+
};
|
|
909
|
+
this._appendEntry(entry);
|
|
910
|
+
return entry.id;
|
|
911
|
+
}
|
|
912
|
+
/** Append a compaction summary as child of current leaf, then advance leaf. Returns entry id. */
|
|
913
|
+
appendCompaction(summary, firstKeptEntryId, tokensBefore, details, fromHook, usage) {
|
|
914
|
+
const entry = {
|
|
915
|
+
type: "compaction",
|
|
916
|
+
id: generateId(this.byId),
|
|
917
|
+
parentId: this.leafId,
|
|
918
|
+
timestamp: new Date().toISOString(),
|
|
919
|
+
summary,
|
|
920
|
+
firstKeptEntryId,
|
|
921
|
+
tokensBefore,
|
|
922
|
+
details,
|
|
923
|
+
usage,
|
|
924
|
+
fromHook,
|
|
925
|
+
};
|
|
926
|
+
this._appendEntry(entry);
|
|
927
|
+
return entry.id;
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* Commit one compaction entry against an exact session revision.
|
|
931
|
+
*
|
|
932
|
+
* This is deliberately a host-only single-append boundary. It does not
|
|
933
|
+
* orchestrate compaction, replace context, or form a cross-plugin
|
|
934
|
+
* transaction.
|
|
935
|
+
*/
|
|
936
|
+
commitCompaction(request) {
|
|
937
|
+
this._validateCompactionCommitRequest(request);
|
|
938
|
+
const previousOperation = this.compactionOperations.get(request.operationId);
|
|
939
|
+
if (previousOperation) {
|
|
940
|
+
if (this._matchesCompactionCommitRequest(previousOperation, request)) {
|
|
941
|
+
return {
|
|
942
|
+
version: 1,
|
|
943
|
+
status: "replayed",
|
|
944
|
+
entryId: previousOperation.id,
|
|
945
|
+
revision: this._revisionAfterEntry(previousOperation),
|
|
946
|
+
};
|
|
947
|
+
}
|
|
948
|
+
throw new Error(`operation_id_reused: ${request.operationId}`);
|
|
949
|
+
}
|
|
950
|
+
const currentRevision = this.getRevision();
|
|
951
|
+
if (!sameSessionRevision(request.expectedRevision, currentRevision)) {
|
|
952
|
+
return { version: 1, status: "revision_conflict", currentRevision };
|
|
953
|
+
}
|
|
954
|
+
const currentBranchContainsFirstKeptEntry = this.getBranch().some((entry) => entry.id === request.firstKeptEntryId);
|
|
955
|
+
if (!currentBranchContainsFirstKeptEntry) {
|
|
956
|
+
throw new Error(`first_kept_entry_not_on_current_branch: ${request.firstKeptEntryId}`);
|
|
957
|
+
}
|
|
958
|
+
const entry = {
|
|
959
|
+
type: "compaction",
|
|
960
|
+
id: generateId(this.byId),
|
|
961
|
+
parentId: this.leafId,
|
|
962
|
+
timestamp: new Date().toISOString(),
|
|
963
|
+
operationId: request.operationId,
|
|
964
|
+
summary: request.summary,
|
|
965
|
+
firstKeptEntryId: request.firstKeptEntryId,
|
|
966
|
+
tokensBefore: request.tokensBefore,
|
|
967
|
+
details: request.details,
|
|
968
|
+
usage: request.usage,
|
|
969
|
+
fromHook: request.fromHook,
|
|
970
|
+
};
|
|
971
|
+
this._appendEntry(entry);
|
|
972
|
+
this.compactionOperations.set(request.operationId, entry);
|
|
973
|
+
return { version: 1, status: "committed", entryId: entry.id, revision: this.getRevision() };
|
|
974
|
+
}
|
|
975
|
+
_validateCompactionCommitRequest(request) {
|
|
976
|
+
if (!request || typeof request !== "object")
|
|
977
|
+
throw new Error("Compaction commit request must be an object");
|
|
978
|
+
if (request.version !== 1)
|
|
979
|
+
throw new Error("Unsupported compaction commit request version");
|
|
980
|
+
if (typeof request.operationId !== "string" || request.operationId.trim() === "") {
|
|
981
|
+
throw new Error("operationId must be a non-empty string");
|
|
982
|
+
}
|
|
983
|
+
if (typeof request.summary !== "string" || request.summary.trim() === "") {
|
|
984
|
+
throw new Error("summary must be a non-empty string");
|
|
985
|
+
}
|
|
986
|
+
if (typeof request.firstKeptEntryId !== "string" || request.firstKeptEntryId === "") {
|
|
987
|
+
throw new Error("firstKeptEntryId must be a non-empty string");
|
|
988
|
+
}
|
|
989
|
+
if (typeof request.tokensBefore !== "number" ||
|
|
990
|
+
!Number.isFinite(request.tokensBefore) ||
|
|
991
|
+
request.tokensBefore < 0) {
|
|
992
|
+
throw new Error("tokensBefore must be a non-negative finite number");
|
|
993
|
+
}
|
|
994
|
+
if (request.details !== undefined)
|
|
995
|
+
assertJsonSerializable(request.details, "details");
|
|
996
|
+
if (request.usage !== undefined)
|
|
997
|
+
assertJsonSerializable(request.usage, "usage");
|
|
998
|
+
const revision = request.expectedRevision;
|
|
999
|
+
if (revision?.version !== 1 ||
|
|
1000
|
+
typeof revision.sessionId !== "string" ||
|
|
1001
|
+
revision.sessionId === "" ||
|
|
1002
|
+
!Number.isInteger(revision.sequence) ||
|
|
1003
|
+
revision.sequence < 0 ||
|
|
1004
|
+
(revision.leafId !== null && typeof revision.leafId !== "string")) {
|
|
1005
|
+
throw new Error("expectedRevision must be a valid SessionRevisionV1");
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
_matchesCompactionCommitRequest(entry, request) {
|
|
1009
|
+
const entryIndex = this.fileEntries.indexOf(entry);
|
|
1010
|
+
if (entryIndex <= 0)
|
|
1011
|
+
throw new Error(`Compaction operation entry is missing: ${entry.id}`);
|
|
1012
|
+
return (request.expectedRevision.version === 1 &&
|
|
1013
|
+
request.expectedRevision.sessionId === this.sessionId &&
|
|
1014
|
+
request.expectedRevision.sequence === entryIndex - 1 &&
|
|
1015
|
+
request.expectedRevision.leafId === entry.parentId &&
|
|
1016
|
+
request.summary === entry.summary &&
|
|
1017
|
+
request.firstKeptEntryId === entry.firstKeptEntryId &&
|
|
1018
|
+
request.tokensBefore === entry.tokensBefore &&
|
|
1019
|
+
request.fromHook === entry.fromHook &&
|
|
1020
|
+
isDeepStrictEqual(request.details, entry.details) &&
|
|
1021
|
+
isDeepStrictEqual(request.usage, entry.usage));
|
|
1022
|
+
}
|
|
1023
|
+
_revisionAfterEntry(entry) {
|
|
1024
|
+
const entryIndex = this.fileEntries.indexOf(entry);
|
|
1025
|
+
if (entryIndex <= 0)
|
|
1026
|
+
throw new Error(`Compaction operation entry is missing: ${entry.id}`);
|
|
1027
|
+
return { version: 1, sessionId: this.sessionId, sequence: entryIndex, leafId: entry.id };
|
|
1028
|
+
}
|
|
1029
|
+
/** Append a custom entry (for extensions) as child of current leaf, then advance leaf. Returns entry id. */
|
|
1030
|
+
appendCustomEntry(customType, data) {
|
|
1031
|
+
const entry = {
|
|
1032
|
+
type: "custom",
|
|
1033
|
+
customType,
|
|
1034
|
+
data,
|
|
1035
|
+
id: generateId(this.byId),
|
|
1036
|
+
parentId: this.leafId,
|
|
1037
|
+
timestamp: new Date().toISOString(),
|
|
1038
|
+
};
|
|
1039
|
+
this._appendEntry(entry);
|
|
1040
|
+
return entry.id;
|
|
1041
|
+
}
|
|
1042
|
+
/** Append a session info entry (e.g., display name). Returns entry id. */
|
|
1043
|
+
appendSessionInfo(name) {
|
|
1044
|
+
const sanitizedName = name.replace(/[\r\n]+/g, " ").trim();
|
|
1045
|
+
const entry = {
|
|
1046
|
+
type: "session_info",
|
|
1047
|
+
id: generateId(this.byId),
|
|
1048
|
+
parentId: this.leafId,
|
|
1049
|
+
timestamp: new Date().toISOString(),
|
|
1050
|
+
name: sanitizedName,
|
|
1051
|
+
};
|
|
1052
|
+
this._appendEntry(entry);
|
|
1053
|
+
return entry.id;
|
|
1054
|
+
}
|
|
1055
|
+
/** Get the current session name from the latest session_info entry, if any. */
|
|
1056
|
+
getSessionName() {
|
|
1057
|
+
// Walk entries in reverse to find the latest session_info entry.
|
|
1058
|
+
// Empty names explicitly clear the session title.
|
|
1059
|
+
const entries = this.getEntries();
|
|
1060
|
+
for (let i = entries.length - 1; i >= 0; i--) {
|
|
1061
|
+
const entry = entries[i];
|
|
1062
|
+
if (entry.type === "session_info") {
|
|
1063
|
+
return entry.name?.trim() || undefined;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
return undefined;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* Append a custom message entry (for extensions) that participates in LLM context.
|
|
1070
|
+
* @param customType Extension identifier for filtering on reload
|
|
1071
|
+
* @param content Message content (string or TextContent/ImageContent array)
|
|
1072
|
+
* @param display Whether to show in TUI (true = styled display, false = hidden)
|
|
1073
|
+
* @param details Optional extension-specific metadata (not sent to LLM)
|
|
1074
|
+
* @returns Entry id
|
|
1075
|
+
*/
|
|
1076
|
+
appendCustomMessageEntry(customType, content, display, details) {
|
|
1077
|
+
const entry = {
|
|
1078
|
+
type: "custom_message",
|
|
1079
|
+
customType,
|
|
1080
|
+
content,
|
|
1081
|
+
display,
|
|
1082
|
+
details,
|
|
1083
|
+
id: generateId(this.byId),
|
|
1084
|
+
parentId: this.leafId,
|
|
1085
|
+
timestamp: new Date().toISOString(),
|
|
1086
|
+
};
|
|
1087
|
+
this._appendEntry(entry);
|
|
1088
|
+
return entry.id;
|
|
1089
|
+
}
|
|
1090
|
+
// =========================================================================
|
|
1091
|
+
// Tree Traversal
|
|
1092
|
+
// =========================================================================
|
|
1093
|
+
getLeafId() {
|
|
1094
|
+
return this.leafId;
|
|
1095
|
+
}
|
|
1096
|
+
getLeafEntry() {
|
|
1097
|
+
return this.leafId ? this.byId.get(this.leafId) : undefined;
|
|
1098
|
+
}
|
|
1099
|
+
getEntry(id) {
|
|
1100
|
+
return this.byId.get(id);
|
|
1101
|
+
}
|
|
1102
|
+
/**
|
|
1103
|
+
* Get all direct children of an entry.
|
|
1104
|
+
*/
|
|
1105
|
+
getChildren(parentId) {
|
|
1106
|
+
const children = [];
|
|
1107
|
+
for (const entry of this.byId.values()) {
|
|
1108
|
+
if (entry.parentId === parentId) {
|
|
1109
|
+
children.push(entry);
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
return children;
|
|
1113
|
+
}
|
|
1114
|
+
/**
|
|
1115
|
+
* Get the label for an entry, if any.
|
|
1116
|
+
*/
|
|
1117
|
+
getLabel(id) {
|
|
1118
|
+
return this.labelsById.get(id);
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* Set or clear a label on an entry.
|
|
1122
|
+
* Labels are user-defined markers for bookmarking/navigation.
|
|
1123
|
+
* Pass undefined or empty string to clear the label.
|
|
1124
|
+
*/
|
|
1125
|
+
appendLabelChange(targetId, label) {
|
|
1126
|
+
if (!this.byId.has(targetId)) {
|
|
1127
|
+
throw new Error(`Entry ${targetId} not found`);
|
|
1128
|
+
}
|
|
1129
|
+
const entry = {
|
|
1130
|
+
type: "label",
|
|
1131
|
+
id: generateId(this.byId),
|
|
1132
|
+
parentId: this.leafId,
|
|
1133
|
+
timestamp: new Date().toISOString(),
|
|
1134
|
+
targetId,
|
|
1135
|
+
label,
|
|
1136
|
+
};
|
|
1137
|
+
this._appendEntry(entry);
|
|
1138
|
+
if (label) {
|
|
1139
|
+
this.labelsById.set(targetId, label);
|
|
1140
|
+
this.labelTimestampsById.set(targetId, entry.timestamp);
|
|
1141
|
+
}
|
|
1142
|
+
else {
|
|
1143
|
+
this.labelsById.delete(targetId);
|
|
1144
|
+
this.labelTimestampsById.delete(targetId);
|
|
1145
|
+
}
|
|
1146
|
+
return entry.id;
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* Walk from entry to root, returning all entries in path order.
|
|
1150
|
+
* Includes all entry types (messages, compaction, model changes, etc.).
|
|
1151
|
+
* Use buildSessionContext() to get the resolved messages for the LLM.
|
|
1152
|
+
*/
|
|
1153
|
+
getBranch(fromId) {
|
|
1154
|
+
const path = [];
|
|
1155
|
+
const startId = fromId ?? this.leafId;
|
|
1156
|
+
let current = startId ? this.byId.get(startId) : undefined;
|
|
1157
|
+
while (current) {
|
|
1158
|
+
path.push(current);
|
|
1159
|
+
current = current.parentId ? this.byId.get(current.parentId) : undefined;
|
|
1160
|
+
}
|
|
1161
|
+
path.reverse();
|
|
1162
|
+
return path;
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Build the active, compaction-aware entry list for context/rendering.
|
|
1166
|
+
* Uses tree traversal from current leaf.
|
|
1167
|
+
*/
|
|
1168
|
+
buildContextEntries() {
|
|
1169
|
+
return buildContextEntries(this.getEntries(), this.leafId, this.byId);
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Build the session context (what gets sent to the LLM).
|
|
1173
|
+
* Uses tree traversal from current leaf.
|
|
1174
|
+
*/
|
|
1175
|
+
buildSessionContext() {
|
|
1176
|
+
return buildSessionContext(this.getEntries(), this.leafId, this.byId, this.entryProjections);
|
|
1177
|
+
}
|
|
1178
|
+
/**
|
|
1179
|
+
* Registers a GENERIC entry projection applied during context projection
|
|
1180
|
+
* (see {@link buildSessionContext}). The kernel neither interprets nor
|
|
1181
|
+
* persists projections — plugins own their semantics and remove them via
|
|
1182
|
+
* the returned disposer. Same channel for first-party and third-party
|
|
1183
|
+
* plugins; the `customType` is the plugin-owned entry type the projection
|
|
1184
|
+
* is associated with (used for diagnostics only).
|
|
1185
|
+
*/
|
|
1186
|
+
registerEntryProjection(projection) {
|
|
1187
|
+
this.entryProjections.push(projection);
|
|
1188
|
+
return () => {
|
|
1189
|
+
const index = this.entryProjections.indexOf(projection);
|
|
1190
|
+
if (index >= 0)
|
|
1191
|
+
this.entryProjections.splice(index, 1);
|
|
1192
|
+
};
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* Get session header.
|
|
1196
|
+
*/
|
|
1197
|
+
getHeader() {
|
|
1198
|
+
const h = this.fileEntries.find((e) => e.type === "session");
|
|
1199
|
+
return h ? h : null;
|
|
1200
|
+
}
|
|
1201
|
+
/**
|
|
1202
|
+
* Get all session entries (excludes header). Returns a shallow copy.
|
|
1203
|
+
* The session is append-only: use appendXXX() to add entries, branch() to
|
|
1204
|
+
* change the leaf pointer. Entries cannot be modified or deleted.
|
|
1205
|
+
*/
|
|
1206
|
+
getEntries() {
|
|
1207
|
+
return this.fileEntries.filter((e) => e.type !== "session");
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* Get the session as a tree structure. Returns a shallow defensive copy of all entries.
|
|
1211
|
+
* A well-formed session has exactly one root (first entry with parentId === null).
|
|
1212
|
+
* Orphaned entries (broken parent chain) are also returned as roots.
|
|
1213
|
+
*/
|
|
1214
|
+
getTree() {
|
|
1215
|
+
const entries = this.getEntries();
|
|
1216
|
+
const nodeMap = new Map();
|
|
1217
|
+
const roots = [];
|
|
1218
|
+
// Create nodes with resolved labels
|
|
1219
|
+
for (const entry of entries) {
|
|
1220
|
+
const label = this.labelsById.get(entry.id);
|
|
1221
|
+
const labelTimestamp = this.labelTimestampsById.get(entry.id);
|
|
1222
|
+
nodeMap.set(entry.id, { entry, children: [], label, labelTimestamp });
|
|
1223
|
+
}
|
|
1224
|
+
// Build tree
|
|
1225
|
+
for (const entry of entries) {
|
|
1226
|
+
const node = nodeMap.get(entry.id);
|
|
1227
|
+
if (entry.parentId === null || entry.parentId === entry.id) {
|
|
1228
|
+
roots.push(node);
|
|
1229
|
+
}
|
|
1230
|
+
else {
|
|
1231
|
+
const parent = nodeMap.get(entry.parentId);
|
|
1232
|
+
if (parent) {
|
|
1233
|
+
parent.children.push(node);
|
|
1234
|
+
}
|
|
1235
|
+
else {
|
|
1236
|
+
// Orphan - treat as root
|
|
1237
|
+
roots.push(node);
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
// Sort children by timestamp (oldest first, newest at bottom)
|
|
1242
|
+
// Use iterative approach to avoid stack overflow on deep trees
|
|
1243
|
+
const stack = [...roots];
|
|
1244
|
+
while (stack.length > 0) {
|
|
1245
|
+
const node = stack.pop();
|
|
1246
|
+
node.children.sort((a, b) => new Date(a.entry.timestamp).getTime() - new Date(b.entry.timestamp).getTime());
|
|
1247
|
+
stack.push(...node.children);
|
|
1248
|
+
}
|
|
1249
|
+
return roots;
|
|
1250
|
+
}
|
|
1251
|
+
// =========================================================================
|
|
1252
|
+
// Branching
|
|
1253
|
+
// =========================================================================
|
|
1254
|
+
/**
|
|
1255
|
+
* Start a new branch from an earlier entry.
|
|
1256
|
+
* Moves the leaf pointer to the specified entry. The next appendXXX() call
|
|
1257
|
+
* will create a child of that entry, forming a new branch. Existing entries
|
|
1258
|
+
* are not modified or deleted.
|
|
1259
|
+
*/
|
|
1260
|
+
branch(branchFromId) {
|
|
1261
|
+
if (!this.byId.has(branchFromId)) {
|
|
1262
|
+
throw new Error(`Entry ${branchFromId} not found`);
|
|
1263
|
+
}
|
|
1264
|
+
this.leafId = branchFromId;
|
|
1265
|
+
}
|
|
1266
|
+
/**
|
|
1267
|
+
* Reset the leaf pointer to null (before any entries).
|
|
1268
|
+
* The next appendXXX() call will create a new root entry (parentId = null).
|
|
1269
|
+
* Use this when navigating to re-edit the first user message.
|
|
1270
|
+
*/
|
|
1271
|
+
resetLeaf() {
|
|
1272
|
+
this.leafId = null;
|
|
1273
|
+
}
|
|
1274
|
+
/**
|
|
1275
|
+
* Start a new branch with a summary of the abandoned path.
|
|
1276
|
+
* Same as branch(), but also appends a branch_summary entry that captures
|
|
1277
|
+
* context from the abandoned conversation path.
|
|
1278
|
+
*/
|
|
1279
|
+
branchWithSummary(branchFromId, summary, details, fromHook, usage) {
|
|
1280
|
+
if (branchFromId !== null && !this.byId.has(branchFromId)) {
|
|
1281
|
+
throw new Error(`Entry ${branchFromId} not found`);
|
|
1282
|
+
}
|
|
1283
|
+
const fromId = this.leafId ?? "root";
|
|
1284
|
+
this.leafId = branchFromId;
|
|
1285
|
+
const entry = {
|
|
1286
|
+
type: "branch_summary",
|
|
1287
|
+
id: generateId(this.byId),
|
|
1288
|
+
parentId: branchFromId,
|
|
1289
|
+
timestamp: new Date().toISOString(),
|
|
1290
|
+
fromId,
|
|
1291
|
+
summary,
|
|
1292
|
+
details,
|
|
1293
|
+
usage,
|
|
1294
|
+
fromHook,
|
|
1295
|
+
};
|
|
1296
|
+
this._appendEntry(entry);
|
|
1297
|
+
return entry.id;
|
|
1298
|
+
}
|
|
1299
|
+
/**
|
|
1300
|
+
* Create a new session file containing only the path from root to the specified leaf.
|
|
1301
|
+
* Useful for extracting a single conversation path from a branched session.
|
|
1302
|
+
* Returns the new session file path, or undefined if not persisting.
|
|
1303
|
+
*/
|
|
1304
|
+
createBranchedSession(leafId) {
|
|
1305
|
+
const previousSessionFile = this.sessionFile;
|
|
1306
|
+
const path = this.getBranch(leafId);
|
|
1307
|
+
if (path.length === 0) {
|
|
1308
|
+
throw new Error(`Entry ${leafId} not found`);
|
|
1309
|
+
}
|
|
1310
|
+
// Filter out LabelEntry from path - we'll recreate them from the resolved map.
|
|
1311
|
+
// Because labels are real tree entries, later entries can be children of labels;
|
|
1312
|
+
// removing labels requires re-chaining the retained path to avoid orphaned subtrees.
|
|
1313
|
+
const pathWithoutLabels = [];
|
|
1314
|
+
const replacementByLabelId = new Map();
|
|
1315
|
+
const pendingLabelIds = [];
|
|
1316
|
+
let pathParentId = null;
|
|
1317
|
+
for (const entry of path) {
|
|
1318
|
+
if (entry.type === "label") {
|
|
1319
|
+
pendingLabelIds.push(entry.id);
|
|
1320
|
+
continue;
|
|
1321
|
+
}
|
|
1322
|
+
for (const labelId of pendingLabelIds) {
|
|
1323
|
+
replacementByLabelId.set(labelId, entry.id);
|
|
1324
|
+
}
|
|
1325
|
+
pendingLabelIds.length = 0;
|
|
1326
|
+
pathWithoutLabels.push(entry.type === "compaction"
|
|
1327
|
+
? {
|
|
1328
|
+
...entry,
|
|
1329
|
+
parentId: pathParentId,
|
|
1330
|
+
firstKeptEntryId: replacementByLabelId.get(entry.firstKeptEntryId) ?? entry.firstKeptEntryId,
|
|
1331
|
+
}
|
|
1332
|
+
: { ...entry, parentId: pathParentId });
|
|
1333
|
+
pathParentId = entry.id;
|
|
1334
|
+
}
|
|
1335
|
+
const newSessionId = createSessionId();
|
|
1336
|
+
const timestamp = new Date().toISOString();
|
|
1337
|
+
const fileTimestamp = timestamp.replace(/[:.]/g, "-");
|
|
1338
|
+
const newSessionFile = join(this.getSessionDir(), `${fileTimestamp}_${newSessionId}.jsonl`);
|
|
1339
|
+
const header = {
|
|
1340
|
+
type: "session",
|
|
1341
|
+
version: CURRENT_SESSION_VERSION,
|
|
1342
|
+
id: newSessionId,
|
|
1343
|
+
timestamp,
|
|
1344
|
+
cwd: this.cwd,
|
|
1345
|
+
parentSession: this.persist ? previousSessionFile : undefined,
|
|
1346
|
+
};
|
|
1347
|
+
// Collect labels for entries in the path
|
|
1348
|
+
const pathEntryIds = new Set(pathWithoutLabels.map((e) => e.id));
|
|
1349
|
+
const labelsToWrite = [];
|
|
1350
|
+
for (const [targetId, label] of this.labelsById) {
|
|
1351
|
+
if (pathEntryIds.has(targetId)) {
|
|
1352
|
+
labelsToWrite.push({ targetId, label, timestamp: this.labelTimestampsById.get(targetId) });
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
if (this.persist) {
|
|
1356
|
+
// Build label entries
|
|
1357
|
+
const lastEntryId = pathWithoutLabels[pathWithoutLabels.length - 1]?.id || null;
|
|
1358
|
+
let parentId = lastEntryId;
|
|
1359
|
+
const labelEntries = [];
|
|
1360
|
+
for (const { targetId, label, timestamp: labelTimestamp } of labelsToWrite) {
|
|
1361
|
+
const labelEntry = {
|
|
1362
|
+
type: "label",
|
|
1363
|
+
id: generateId(new Set(pathEntryIds)),
|
|
1364
|
+
parentId,
|
|
1365
|
+
timestamp: labelTimestamp,
|
|
1366
|
+
targetId,
|
|
1367
|
+
label,
|
|
1368
|
+
};
|
|
1369
|
+
pathEntryIds.add(labelEntry.id);
|
|
1370
|
+
labelEntries.push(labelEntry);
|
|
1371
|
+
parentId = labelEntry.id;
|
|
1372
|
+
}
|
|
1373
|
+
this.fileEntries = [header, ...pathWithoutLabels, ...labelEntries];
|
|
1374
|
+
this.sessionId = newSessionId;
|
|
1375
|
+
this.sessionFile = newSessionFile;
|
|
1376
|
+
this._buildIndex();
|
|
1377
|
+
// Only write the file now if it contains an assistant message.
|
|
1378
|
+
// Otherwise defer to _persist(), which creates the file on the
|
|
1379
|
+
// first assistant response, matching the newSession() contract
|
|
1380
|
+
// and avoiding the duplicate-header bug when _persist()'s
|
|
1381
|
+
// no-assistant guard later resets flushed to false.
|
|
1382
|
+
const hasAssistant = this.fileEntries.some((e) => e.type === "message" && e.message.role === "assistant");
|
|
1383
|
+
if (hasAssistant) {
|
|
1384
|
+
this._rewriteFile();
|
|
1385
|
+
this.flushed = true;
|
|
1386
|
+
}
|
|
1387
|
+
else {
|
|
1388
|
+
this.flushed = false;
|
|
1389
|
+
}
|
|
1390
|
+
return newSessionFile;
|
|
1391
|
+
}
|
|
1392
|
+
// In-memory mode: replace current session with the path + labels
|
|
1393
|
+
const labelEntries = [];
|
|
1394
|
+
let parentId = pathWithoutLabels[pathWithoutLabels.length - 1]?.id || null;
|
|
1395
|
+
for (const { targetId, label, timestamp: labelTimestamp } of labelsToWrite) {
|
|
1396
|
+
const labelEntry = {
|
|
1397
|
+
type: "label",
|
|
1398
|
+
id: generateId(new Set([...pathEntryIds, ...labelEntries.map((e) => e.id)])),
|
|
1399
|
+
parentId,
|
|
1400
|
+
timestamp: labelTimestamp,
|
|
1401
|
+
targetId,
|
|
1402
|
+
label,
|
|
1403
|
+
};
|
|
1404
|
+
labelEntries.push(labelEntry);
|
|
1405
|
+
parentId = labelEntry.id;
|
|
1406
|
+
}
|
|
1407
|
+
this.fileEntries = [header, ...pathWithoutLabels, ...labelEntries];
|
|
1408
|
+
this.sessionId = newSessionId;
|
|
1409
|
+
this._buildIndex();
|
|
1410
|
+
return undefined;
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1413
|
+
* Create a new session.
|
|
1414
|
+
* @param cwd Working directory (stored in session header)
|
|
1415
|
+
* @param sessionDir Optional session directory. If omitted, uses default (~/.agent-forge/agent/sessions/<encoded-cwd>/).
|
|
1416
|
+
* @param options Optional new-session header options.
|
|
1417
|
+
* @param storage Optional storage provider; defaults to the local file protocol.
|
|
1418
|
+
*/
|
|
1419
|
+
static create(cwd, sessionDir, options, storage = FileSessionStorageProvider.instance) {
|
|
1420
|
+
const dir = sessionDir ? normalizePath(sessionDir) : getDefaultSessionDir(cwd);
|
|
1421
|
+
return new SessionManager(cwd, dir, undefined, true, options, undefined, storage);
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Open a specific session file.
|
|
1425
|
+
* @param path Path to session file
|
|
1426
|
+
* @param sessionDir Optional session directory for /new or /branch. If omitted, derives from file's parent.
|
|
1427
|
+
* @param cwdOverride Optional cwd override instead of the session header cwd.
|
|
1428
|
+
* @param storage Optional storage provider; defaults to the local file protocol.
|
|
1429
|
+
*/
|
|
1430
|
+
static open(path, sessionDir, cwdOverride, storage = FileSessionStorageProvider.instance) {
|
|
1431
|
+
const resolvedPath = resolvePath(path);
|
|
1432
|
+
let header = null;
|
|
1433
|
+
let preloadedFileEntries;
|
|
1434
|
+
if (cwdOverride === undefined && storage.exists(resolvedPath)) {
|
|
1435
|
+
try {
|
|
1436
|
+
header = storage.readHeader(resolvedPath);
|
|
1437
|
+
}
|
|
1438
|
+
catch (error) {
|
|
1439
|
+
if (!(error instanceof SessionHeaderScanLimitError))
|
|
1440
|
+
throw error;
|
|
1441
|
+
// The bounded scan is only a discovery optimization. A full load remains
|
|
1442
|
+
// authoritative for legacy files with very large headers or prefixes.
|
|
1443
|
+
preloadedFileEntries = storage.loadEntries(resolvedPath);
|
|
1444
|
+
const firstEntry = preloadedFileEntries[0];
|
|
1445
|
+
header = firstEntry?.type === "session" ? firstEntry : null;
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
const cwd = cwdOverride ?? (header ? getSessionHeaderCwd(header) : undefined) ?? process.cwd();
|
|
1449
|
+
// If no sessionDir provided, derive from file's parent directory
|
|
1450
|
+
const dir = sessionDir ? normalizePath(sessionDir) : resolve(resolvedPath, "..");
|
|
1451
|
+
return new SessionManager(cwd, dir, resolvedPath, true, undefined, preloadedFileEntries, storage);
|
|
1452
|
+
}
|
|
1453
|
+
/**
|
|
1454
|
+
* Continue the most recent session, or create new if none.
|
|
1455
|
+
* @param cwd Working directory
|
|
1456
|
+
* @param sessionDir Optional session directory. If omitted, uses default (~/.agent-forge/agent/sessions/<encoded-cwd>/).
|
|
1457
|
+
* @param storage Optional storage provider; defaults to the local file protocol.
|
|
1458
|
+
*/
|
|
1459
|
+
static continueRecent(cwd, sessionDir, storage = FileSessionStorageProvider.instance) {
|
|
1460
|
+
const dir = sessionDir ? normalizePath(sessionDir) : getDefaultSessionDir(cwd);
|
|
1461
|
+
const filterCwd = sessionDir !== undefined && dir !== getDefaultSessionDirPath(cwd);
|
|
1462
|
+
const mostRecent = findMostRecentSessionWithStorage(storage, dir, filterCwd ? cwd : undefined);
|
|
1463
|
+
if (mostRecent) {
|
|
1464
|
+
return new SessionManager(cwd, dir, mostRecent, true, undefined, undefined, storage);
|
|
1465
|
+
}
|
|
1466
|
+
return new SessionManager(cwd, dir, undefined, true, undefined, undefined, storage);
|
|
1467
|
+
}
|
|
1468
|
+
/** Create an in-memory session (no file persistence) */
|
|
1469
|
+
static inMemory(cwd = process.cwd(), options) {
|
|
1470
|
+
return new SessionManager(cwd, "", undefined, false, options);
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* Fork a session from another project directory into the current project.
|
|
1474
|
+
* Creates a new session in the target cwd with the full history from the source session.
|
|
1475
|
+
* @param sourcePath Path to the source session file
|
|
1476
|
+
* @param targetCwd Target working directory (where the new session will be stored)
|
|
1477
|
+
* @param sessionDir Optional session directory. If omitted, uses default for targetCwd.
|
|
1478
|
+
* @param options Optional new-session header options.
|
|
1479
|
+
* @param storage Optional storage provider; defaults to the local file protocol.
|
|
1480
|
+
*/
|
|
1481
|
+
static forkFrom(sourcePath, targetCwd, sessionDir, options, storage = FileSessionStorageProvider.instance) {
|
|
1482
|
+
const resolvedSourcePath = resolvePath(sourcePath);
|
|
1483
|
+
const resolvedTargetCwd = resolvePath(targetCwd);
|
|
1484
|
+
const sourceEntries = storage.loadEntries(resolvedSourcePath);
|
|
1485
|
+
if (sourceEntries.length === 0) {
|
|
1486
|
+
throw new Error(`Cannot fork: source session file is empty or invalid: ${resolvedSourcePath}`);
|
|
1487
|
+
}
|
|
1488
|
+
const sourceHeader = sourceEntries.find((e) => e.type === "session");
|
|
1489
|
+
if (!sourceHeader) {
|
|
1490
|
+
throw new Error(`Cannot fork: source session has no header: ${resolvedSourcePath}`);
|
|
1491
|
+
}
|
|
1492
|
+
const dir = sessionDir ? normalizePath(sessionDir) : getDefaultSessionDir(resolvedTargetCwd);
|
|
1493
|
+
storage.ensureDir(dir);
|
|
1494
|
+
// Create new session file with new ID but forked content
|
|
1495
|
+
if (options?.id !== undefined) {
|
|
1496
|
+
assertValidSessionId(options.id);
|
|
1497
|
+
}
|
|
1498
|
+
const newSessionId = options?.id ?? createSessionId();
|
|
1499
|
+
const timestamp = new Date().toISOString();
|
|
1500
|
+
const fileTimestamp = timestamp.replace(/[:.]/g, "-");
|
|
1501
|
+
const newSessionFile = join(dir, `${fileTimestamp}_${newSessionId}.jsonl`);
|
|
1502
|
+
// Write new header pointing to source as parent, with updated cwd
|
|
1503
|
+
const newHeader = {
|
|
1504
|
+
type: "session",
|
|
1505
|
+
version: CURRENT_SESSION_VERSION,
|
|
1506
|
+
id: newSessionId,
|
|
1507
|
+
timestamp,
|
|
1508
|
+
cwd: resolvedTargetCwd,
|
|
1509
|
+
parentSession: resolvedSourcePath,
|
|
1510
|
+
};
|
|
1511
|
+
storage.createExclusive(newSessionFile, [
|
|
1512
|
+
newHeader,
|
|
1513
|
+
// Copy all non-header entries from source
|
|
1514
|
+
...sourceEntries.filter((entry) => entry.type !== "session"),
|
|
1515
|
+
]);
|
|
1516
|
+
return new SessionManager(resolvedTargetCwd, dir, newSessionFile, true, undefined, undefined, storage);
|
|
1517
|
+
}
|
|
1518
|
+
/**
|
|
1519
|
+
* List all sessions for a directory.
|
|
1520
|
+
* @param cwd Working directory (used to compute default session directory)
|
|
1521
|
+
* @param sessionDir Optional session directory. If omitted, uses default (~/.agent-forge/agent/sessions/<encoded-cwd>/).
|
|
1522
|
+
* @param onProgress Optional callback for progress updates (loaded, total)
|
|
1523
|
+
*/
|
|
1524
|
+
static async list(cwd, sessionDir, onProgress) {
|
|
1525
|
+
const dir = sessionDir ? normalizePath(sessionDir) : getDefaultSessionDir(cwd);
|
|
1526
|
+
const filterCwd = sessionDir !== undefined && dir !== getDefaultSessionDirPath(cwd);
|
|
1527
|
+
const resolvedCwd = resolvePath(cwd);
|
|
1528
|
+
const sessions = (await listSessionsFromDir(dir, onProgress)).filter((session) => !filterCwd || sessionCwdMatches(session.cwd, resolvedCwd));
|
|
1529
|
+
sessions.sort((a, b) => b.modified.getTime() - a.modified.getTime());
|
|
1530
|
+
return sessions;
|
|
1531
|
+
}
|
|
1532
|
+
static async listAll(sessionDirOrOnProgress, onProgress) {
|
|
1533
|
+
const customSessionDir = typeof sessionDirOrOnProgress === "string" ? normalizePath(sessionDirOrOnProgress) : undefined;
|
|
1534
|
+
const progress = typeof sessionDirOrOnProgress === "function" ? sessionDirOrOnProgress : onProgress;
|
|
1535
|
+
if (customSessionDir) {
|
|
1536
|
+
const sessions = await listSessionsFromDir(customSessionDir, progress);
|
|
1537
|
+
sessions.sort((a, b) => b.modified.getTime() - a.modified.getTime());
|
|
1538
|
+
return sessions;
|
|
1539
|
+
}
|
|
1540
|
+
const sessionsDir = getSessionsDir();
|
|
1541
|
+
try {
|
|
1542
|
+
if (!existsSync(sessionsDir)) {
|
|
1543
|
+
return [];
|
|
1544
|
+
}
|
|
1545
|
+
const entries = await readdir(sessionsDir, { withFileTypes: true });
|
|
1546
|
+
const dirs = entries
|
|
1547
|
+
.filter((entry) => entry.isDirectory() || entry.isSymbolicLink())
|
|
1548
|
+
.map((entry) => join(sessionsDir, entry.name));
|
|
1549
|
+
// Count total files first for accurate progress
|
|
1550
|
+
let totalFiles = 0;
|
|
1551
|
+
const dirFiles = [];
|
|
1552
|
+
for (const dir of dirs) {
|
|
1553
|
+
try {
|
|
1554
|
+
const files = (await readdir(dir)).filter((f) => f.endsWith(".jsonl"));
|
|
1555
|
+
dirFiles.push(files.map((f) => join(dir, f)));
|
|
1556
|
+
totalFiles += files.length;
|
|
1557
|
+
}
|
|
1558
|
+
catch {
|
|
1559
|
+
dirFiles.push([]);
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
// Process all files with progress tracking
|
|
1563
|
+
let loaded = 0;
|
|
1564
|
+
const sessions = [];
|
|
1565
|
+
const allFiles = dirFiles.flat();
|
|
1566
|
+
const results = await buildSessionInfosWithConcurrency(allFiles, () => {
|
|
1567
|
+
loaded++;
|
|
1568
|
+
progress?.(loaded, totalFiles);
|
|
1569
|
+
});
|
|
1570
|
+
for (const info of results) {
|
|
1571
|
+
if (info) {
|
|
1572
|
+
sessions.push(info);
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
sessions.sort((a, b) => b.modified.getTime() - a.modified.getTime());
|
|
1576
|
+
return sessions;
|
|
1577
|
+
}
|
|
1578
|
+
catch {
|
|
1579
|
+
return [];
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
//# sourceMappingURL=session-manager.js.map
|