@ai-agent-forge/agent-forge 0.87.0 → 0.88.1
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 +56 -0
- package/README.md +2 -2
- package/bundled-plugins/agent-loop-policy/agent-forge.json +19 -0
- package/bundled-plugins/agent-loop-policy/dist/entry.d.ts +28 -0
- package/bundled-plugins/agent-loop-policy/dist/entry.d.ts.map +1 -0
- package/bundled-plugins/agent-loop-policy/dist/entry.js +69 -0
- package/bundled-plugins/agent-loop-policy/dist/entry.js.map +1 -0
- package/bundled-plugins/agent-loop-policy/dist/loop-guard.d.ts +199 -0
- package/bundled-plugins/agent-loop-policy/dist/loop-guard.d.ts.map +1 -0
- package/bundled-plugins/agent-loop-policy/dist/loop-guard.js +208 -0
- package/bundled-plugins/agent-loop-policy/dist/loop-guard.js.map +1 -0
- package/bundled-plugins/agent-loop-policy/dist/run-loop-strategy.d.ts +17 -0
- package/bundled-plugins/agent-loop-policy/dist/run-loop-strategy.d.ts.map +1 -0
- package/bundled-plugins/agent-loop-policy/dist/run-loop-strategy.js +18 -0
- package/bundled-plugins/agent-loop-policy/dist/run-loop-strategy.js.map +1 -0
- package/bundled-plugins/agent-loop-policy/plugin.json +7 -0
- package/bundled-plugins/coding-tools/agent-forge.json +19 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/bash.d.ts +5 -44
- package/bundled-plugins/coding-tools/dist/bash.d.ts.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/bash.js +15 -119
- package/bundled-plugins/coding-tools/dist/bash.js.map +1 -0
- package/bundled-plugins/coding-tools/dist/capability.d.ts +25 -0
- package/bundled-plugins/coding-tools/dist/capability.d.ts.map +1 -0
- package/bundled-plugins/coding-tools/dist/capability.js +98 -0
- package/bundled-plugins/coding-tools/dist/capability.js.map +1 -0
- package/bundled-plugins/coding-tools/dist/config.d.ts +8 -0
- package/bundled-plugins/coding-tools/dist/config.d.ts.map +1 -0
- package/bundled-plugins/coding-tools/dist/config.js +8 -0
- package/bundled-plugins/coding-tools/dist/config.js.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/edit.d.ts +3 -3
- package/bundled-plugins/coding-tools/dist/edit.d.ts.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/edit.js +12 -10
- package/bundled-plugins/coding-tools/dist/edit.js.map +1 -0
- package/bundled-plugins/coding-tools/dist/entry.d.ts +14 -0
- package/bundled-plugins/coding-tools/dist/entry.d.ts.map +1 -0
- package/bundled-plugins/coding-tools/dist/entry.js +23 -0
- package/bundled-plugins/coding-tools/dist/entry.js.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/find.d.ts +4 -4
- package/bundled-plugins/coding-tools/dist/find.d.ts.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/find.js +10 -8
- package/bundled-plugins/coding-tools/dist/find.js.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/grep.d.ts +3 -3
- package/bundled-plugins/coding-tools/dist/grep.d.ts.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/grep.js +10 -8
- package/bundled-plugins/coding-tools/dist/grep.js.map +1 -0
- package/bundled-plugins/coding-tools/dist/index.d.ts +17 -0
- package/bundled-plugins/coding-tools/dist/index.d.ts.map +1 -0
- package/bundled-plugins/coding-tools/dist/index.js +17 -0
- package/bundled-plugins/coding-tools/dist/index.js.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/ls.d.ts +3 -3
- package/bundled-plugins/coding-tools/dist/ls.d.ts.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/ls.js +8 -6
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/ls.js.map +1 -1
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/powershell.d.ts +2 -1
- package/bundled-plugins/coding-tools/dist/powershell.d.ts.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/powershell.js +6 -3
- package/bundled-plugins/coding-tools/dist/powershell.js.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/read.d.ts +3 -3
- package/bundled-plugins/coding-tools/dist/read.d.ts.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/read.js +15 -13
- package/bundled-plugins/coding-tools/dist/read.js.map +1 -0
- package/bundled-plugins/coding-tools/dist/types.d.ts +74 -0
- package/bundled-plugins/coding-tools/dist/types.d.ts.map +1 -0
- package/bundled-plugins/coding-tools/dist/types.js +28 -0
- package/bundled-plugins/coding-tools/dist/types.js.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/write.d.ts +2 -2
- package/bundled-plugins/coding-tools/dist/write.d.ts.map +1 -0
- package/{dist/core/tools → bundled-plugins/coding-tools/dist}/write.js +11 -9
- package/bundled-plugins/coding-tools/dist/write.js.map +1 -0
- package/bundled-plugins/coding-tools/plugin.json +10 -0
- package/bundled-plugins/compaction-policy/agent-forge.json +19 -0
- package/bundled-plugins/compaction-policy/dist/branch-summary-policy.d.ts +6 -0
- package/bundled-plugins/compaction-policy/dist/branch-summary-policy.d.ts.map +1 -0
- package/bundled-plugins/compaction-policy/dist/branch-summary-policy.js +19 -0
- package/bundled-plugins/compaction-policy/dist/branch-summary-policy.js.map +1 -0
- package/bundled-plugins/compaction-policy/dist/compaction-policy.d.ts +6 -0
- package/bundled-plugins/compaction-policy/dist/compaction-policy.d.ts.map +1 -0
- package/bundled-plugins/compaction-policy/dist/compaction-policy.js +38 -0
- package/bundled-plugins/compaction-policy/dist/compaction-policy.js.map +1 -0
- package/bundled-plugins/compaction-policy/dist/entry.d.ts +13 -0
- package/bundled-plugins/compaction-policy/dist/entry.d.ts.map +1 -0
- package/bundled-plugins/compaction-policy/dist/entry.js +23 -0
- package/bundled-plugins/compaction-policy/dist/entry.js.map +1 -0
- package/bundled-plugins/compaction-policy/plugin.json +10 -0
- package/bundled-plugins/mcp-http/dist/index.d.ts +8 -0
- package/bundled-plugins/mcp-http/dist/index.d.ts.map +1 -0
- package/bundled-plugins/mcp-http/dist/index.js +8 -0
- package/bundled-plugins/mcp-http/dist/index.js.map +1 -0
- package/bundled-plugins/mcp-http/dist/mcp-http.d.ts.map +1 -0
- package/{dist/plugins → bundled-plugins/mcp-http/dist}/mcp-http.js +1 -1
- package/bundled-plugins/mcp-http/dist/mcp-http.js.map +1 -0
- package/bundled-plugins/overflow-policy/agent-forge.json +19 -0
- package/bundled-plugins/overflow-policy/dist/entry.d.ts +16 -0
- package/bundled-plugins/overflow-policy/dist/entry.d.ts.map +1 -0
- package/bundled-plugins/overflow-policy/dist/entry.js +35 -0
- package/bundled-plugins/overflow-policy/dist/entry.js.map +1 -0
- package/bundled-plugins/overflow-policy/plugin.json +10 -0
- package/bundled-plugins/provider-failover/agent-forge.json +19 -0
- package/bundled-plugins/provider-failover/dist/entry.d.ts +8 -0
- package/bundled-plugins/provider-failover/dist/entry.d.ts.map +1 -0
- package/bundled-plugins/provider-failover/dist/entry.js +8 -0
- package/bundled-plugins/provider-failover/dist/entry.js.map +1 -0
- package/bundled-plugins/provider-failover/dist/provider-failover.d.ts +122 -0
- package/bundled-plugins/provider-failover/dist/provider-failover.d.ts.map +1 -0
- package/{dist/core/extensions → bundled-plugins/provider-failover/dist}/provider-failover.js +149 -61
- package/bundled-plugins/provider-failover/dist/provider-failover.js.map +1 -0
- package/bundled-plugins/provider-failover/plugin.json +7 -0
- package/bundled-plugins/retry-policy/agent-forge.json +19 -0
- package/bundled-plugins/retry-policy/dist/entry.d.ts +16 -0
- package/bundled-plugins/retry-policy/dist/entry.d.ts.map +1 -0
- package/bundled-plugins/retry-policy/dist/entry.js +34 -0
- package/bundled-plugins/retry-policy/dist/entry.js.map +1 -0
- package/bundled-plugins/retry-policy/plugin.json +10 -0
- package/dist/bundle/.build-manifest.json +105 -183
- package/dist/bundle/chunks/{anthropic-messages-ALDZBUKI.js → anthropic-messages-PLAKXR73.js} +1 -1
- package/dist/bundle/chunks/{azure-openai-responses-A2WJWZFB.js → azure-openai-responses-OUWQ2AZD.js} +1 -1
- package/dist/bundle/chunks/{chunk-CIX3FSBK.js → chunk-A3JYRWB6.js} +1 -1
- package/dist/bundle/chunks/{chunk-SQFG22WN.js → chunk-AC2FIS4G.js} +1 -1
- package/dist/bundle/chunks/chunk-AQLNTW2B.js +664 -0
- package/dist/bundle/chunks/chunk-D3ARGZFR.js +13 -0
- package/dist/bundle/chunks/{chunk-YJCQVXW5.js → chunk-HTEVUY7F.js} +1 -1
- package/dist/bundle/chunks/{chunk-Y7HXTASS.js → chunk-HV64ASMT.js} +1 -1
- package/dist/bundle/chunks/chunk-LZOEQITZ.js +855 -0
- package/dist/bundle/chunks/{chunk-7ZY7IXZD.js → chunk-TRDNDS6A.js} +1 -1
- package/dist/bundle/chunks/chunk-Z72JWUZ4.js +4 -0
- package/dist/bundle/chunks/{google-generative-ai-NIB4WONV.js → google-generative-ai-DLII6DAT.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-DCPYUEUO.js → google-vertex-G7BZL7GM.js} +1 -1
- package/dist/bundle/chunks/image-resize-worker.js +3 -3
- package/dist/bundle/chunks/{mistral-conversations-OC6LA5XL.js → mistral-conversations-JXUK24ID.js} +1 -1
- package/dist/bundle/chunks/{openai-codex-responses-IO2X4Y7L.js → openai-codex-responses-5GSGFIPG.js} +1 -1
- package/dist/bundle/chunks/{openai-completions-XYQQHETU.js → openai-completions-EI2I6DTG.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-DLIRN3CI.js → openai-responses-AUJQ3NWT.js} +1 -1
- package/dist/bundle/chunks/{pi-messages-E6RRYBO7.js → pi-messages-PWU2VJMR.js} +1 -1
- package/dist/bundle/chunks/virtual-modules-WF6WRHP7.js +5 -0
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/client.js +1 -1
- package/dist/bundle/index.js +3 -3
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/capabilities/builtin.d.ts +1 -1
- package/dist/capabilities/builtin.d.ts.map +1 -1
- package/dist/capabilities/builtin.js +5 -0
- package/dist/capabilities/builtin.js.map +1 -1
- package/dist/cli/auth-check.d.ts.map +1 -1
- package/dist/cli/auth-check.js +14 -2
- package/dist/cli/auth-check.js.map +1 -1
- package/dist/cli/auth-command.d.ts.map +1 -1
- package/dist/cli/auth-command.js +1 -1
- package/dist/cli/auth-command.js.map +1 -1
- package/dist/cli/plugin-command.d.ts.map +1 -1
- package/dist/cli/plugin-command.js +17 -1
- package/dist/cli/plugin-command.js.map +1 -1
- package/dist/config.d.ts +2 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -6
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-bash.d.ts +1 -1
- package/dist/core/agent-session-bash.d.ts.map +1 -1
- package/dist/core/agent-session-bash.js +1 -1
- package/dist/core/agent-session-bash.js.map +1 -1
- package/dist/core/agent-session-compaction.d.ts +6 -10
- package/dist/core/agent-session-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-compaction.js +21 -112
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-internal.d.ts +1 -7
- package/dist/core/agent-session-internal.d.ts.map +1 -1
- package/dist/core/agent-session-internal.js.map +1 -1
- package/dist/core/agent-session-loop.d.ts +4 -3
- package/dist/core/agent-session-loop.d.ts.map +1 -1
- package/dist/core/agent-session-loop.js +9 -6
- package/dist/core/agent-session-loop.js.map +1 -1
- package/dist/core/agent-session-retry.d.ts +1 -1
- package/dist/core/agent-session-retry.d.ts.map +1 -1
- package/dist/core/agent-session-retry.js +32 -4
- package/dist/core/agent-session-retry.js.map +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +30 -9
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session-tools.d.ts.map +1 -1
- package/dist/core/agent-session-tools.js +5 -1
- package/dist/core/agent-session-tools.js.map +1 -1
- package/dist/core/agent-session.d.ts +12 -33
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +61 -67
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/bash-executor.d.ts +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/extensions/bootstrap-agent-loop.d.ts +23 -151
- package/dist/core/extensions/bootstrap-agent-loop.d.ts.map +1 -1
- package/dist/core/extensions/bootstrap-agent-loop.js +28 -290
- package/dist/core/extensions/bootstrap-agent-loop.js.map +1 -1
- package/dist/core/extensions/capability-runtime-types.d.ts +5 -3
- package/dist/core/extensions/capability-runtime-types.d.ts.map +1 -1
- package/dist/core/extensions/capability-runtime-types.js.map +1 -1
- package/dist/core/extensions/capability-runtime.d.ts.map +1 -1
- package/dist/core/extensions/capability-runtime.js +42 -6
- package/dist/core/extensions/capability-runtime.js.map +1 -1
- package/dist/core/extensions/index.d.ts +12 -5
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +12 -5
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/virtual-modules.js +65 -0
- package/dist/core/extensions/virtual-modules.js.map +1 -1
- package/dist/core/facade/coding-agent-facade.d.ts +1 -7
- package/dist/core/facade/coding-agent-facade.d.ts.map +1 -1
- package/dist/core/facade/coding-agent-facade.js +0 -3
- package/dist/core/facade/coding-agent-facade.js.map +1 -1
- package/dist/core/i18n/locales/zh-cn/cli.d.ts.map +1 -1
- package/dist/core/i18n/locales/zh-cn/cli.js +3 -1
- package/dist/core/i18n/locales/zh-cn/cli.js.map +1 -1
- package/dist/core/i18n/locales/zh-cn/core-contract-core.d.ts +1 -1
- package/dist/core/i18n/locales/zh-cn/core-contract-core.d.ts.map +1 -1
- package/dist/core/i18n/locales/zh-cn/core-contract-core.js +1 -1
- package/dist/core/i18n/locales/zh-cn/core-contract-core.js.map +1 -1
- package/dist/core/i18n/locales/zh-cn/core-contract-extensions.d.ts.map +1 -1
- package/dist/core/i18n/locales/zh-cn/core-contract-extensions.js +2 -4
- package/dist/core/i18n/locales/zh-cn/core-contract-extensions.js.map +1 -1
- package/dist/core/i18n/locales/zh-cn/core-errors.d.ts.map +1 -1
- package/dist/core/i18n/locales/zh-cn/core-errors.js +3 -1
- package/dist/core/i18n/locales/zh-cn/core-errors.js.map +1 -1
- package/dist/core/i18n/locales/zh-cn/interactive-mode.d.ts.map +1 -1
- package/dist/core/i18n/locales/zh-cn/interactive-mode.js +2 -0
- package/dist/core/i18n/locales/zh-cn/interactive-mode.js.map +1 -1
- package/dist/core/i18n/locales/zh-cn/tui-components-selectors.d.ts.map +1 -1
- package/dist/core/i18n/locales/zh-cn/tui-components-selectors.js +0 -2
- package/dist/core/i18n/locales/zh-cn/tui-components-selectors.js.map +1 -1
- package/dist/core/model-config.d.ts +0 -1
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +9 -1
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +3 -3
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/provider-composer.d.ts +2 -2
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +7 -8
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/sdk.d.ts +18 -3
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +267 -76
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +9 -20
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +20 -54
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/tools/bash-operations.d.ts +41 -0
- package/dist/core/tools/bash-operations.d.ts.map +1 -0
- package/dist/core/tools/bash-operations.js +113 -0
- package/dist/core/tools/bash-operations.js.map +1 -0
- package/dist/core/tools/index.d.ts +12 -36
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +1 -117
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/readme-path.d.ts +3 -0
- package/dist/core/tools/readme-path.d.ts.map +1 -0
- package/dist/core/tools/readme-path.js +15 -0
- package/dist/core/tools/readme-path.js.map +1 -0
- package/dist/index.d.ts +3 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -39
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +3 -2
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +0 -2
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +2 -7
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +2 -6
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +6 -28
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +0 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +9 -25
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +0 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +23 -36
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +0 -8
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +0 -12
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +0 -9
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +0 -19
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/plugins/ecosystem/cli.d.ts.map +1 -1
- package/dist/plugins/ecosystem/cli.js +14 -2
- package/dist/plugins/ecosystem/cli.js.map +1 -1
- package/dist/plugins/ecosystem/node-npm-registry-source.d.ts +7 -2
- package/dist/plugins/ecosystem/node-npm-registry-source.d.ts.map +1 -1
- package/dist/plugins/ecosystem/node-npm-registry-source.js +64 -9
- package/dist/plugins/ecosystem/node-npm-registry-source.js.map +1 -1
- package/dist/plugins/ecosystem/node-plugin-acquisition-host.d.ts.map +1 -1
- package/dist/plugins/ecosystem/node-plugin-acquisition-host.js +6 -0
- package/dist/plugins/ecosystem/node-plugin-acquisition-host.js.map +1 -1
- package/dist/plugins/ecosystem/node-plugin-bootstrap.d.ts +9 -2
- package/dist/plugins/ecosystem/node-plugin-bootstrap.d.ts.map +1 -1
- package/dist/plugins/ecosystem/node-plugin-bootstrap.js +23 -0
- package/dist/plugins/ecosystem/node-plugin-bootstrap.js.map +1 -1
- package/dist/plugins/ecosystem/plugin-bootstrap.d.ts +9 -1
- package/dist/plugins/ecosystem/plugin-bootstrap.d.ts.map +1 -1
- package/dist/plugins/ecosystem/plugin-bootstrap.js +5 -0
- package/dist/plugins/ecosystem/plugin-bootstrap.js.map +1 -1
- package/dist/profiles/builtin-suites.d.ts +5 -1
- package/dist/profiles/builtin-suites.d.ts.map +1 -1
- package/dist/profiles/builtin-suites.js +6 -1
- package/dist/profiles/builtin-suites.js.map +1 -1
- package/dist/utils/photon.d.ts +2 -2
- package/dist/utils/photon.d.ts.map +1 -1
- package/dist/utils/photon.js +2 -2
- package/dist/utils/photon.js.map +1 -1
- package/docs/compaction.md +1 -3
- package/docs/docs.json +4 -0
- package/docs/index.md +1 -0
- package/docs/mcp.md +103 -0
- package/docs/models.md +14 -22
- package/docs/providers.md +0 -1
- package/docs/rpc.md +1 -26
- package/docs/sdk.md +4 -6
- package/docs/settings.md +9 -12
- package/docs/skills.md +1 -9
- package/docs/usage.md +1 -1
- package/examples/extensions/bash-spawn-hook/index.ts +7 -2
- package/examples/extensions/built-in-tool-renderer/index.ts +4 -2
- package/examples/extensions/minimal-mode/index.ts +2 -2
- package/examples/extensions/truncated-tool/index.ts +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/extensions/with-deps/plugin.json +1 -1
- package/examples/sdk/10-settings.ts +2 -4
- package/examples/sdk/12-full-control.ts +1 -2
- package/package.json +3 -4
- package/dist/bundle/chunks/chunk-6ZKDNZHA.js +0 -145
- package/dist/bundle/chunks/chunk-BFC2BDVJ.js +0 -13
- package/dist/bundle/chunks/chunk-MOHOLL3F.js +0 -1456
- package/dist/bundle/chunks/virtual-modules-KZ5DRH7Q.js +0 -2
- package/dist/core/extensions/bootstrap-branch-summary-policy.d.ts +0 -7
- package/dist/core/extensions/bootstrap-branch-summary-policy.d.ts.map +0 -1
- package/dist/core/extensions/bootstrap-branch-summary-policy.js +0 -28
- package/dist/core/extensions/bootstrap-branch-summary-policy.js.map +0 -1
- package/dist/core/extensions/bootstrap-compaction-policy.d.ts +0 -7
- package/dist/core/extensions/bootstrap-compaction-policy.d.ts.map +0 -1
- package/dist/core/extensions/bootstrap-compaction-policy.js +0 -82
- package/dist/core/extensions/bootstrap-compaction-policy.js.map +0 -1
- package/dist/core/extensions/bootstrap-overflow-policy.d.ts +0 -7
- package/dist/core/extensions/bootstrap-overflow-policy.d.ts.map +0 -1
- package/dist/core/extensions/bootstrap-overflow-policy.js +0 -30
- package/dist/core/extensions/bootstrap-overflow-policy.js.map +0 -1
- package/dist/core/extensions/bootstrap-retry-policy.d.ts +0 -7
- package/dist/core/extensions/bootstrap-retry-policy.d.ts.map +0 -1
- package/dist/core/extensions/bootstrap-retry-policy.js +0 -29
- package/dist/core/extensions/bootstrap-retry-policy.js.map +0 -1
- package/dist/core/extensions/bootstrap-tools.d.ts +0 -20
- package/dist/core/extensions/bootstrap-tools.d.ts.map +0 -1
- package/dist/core/extensions/bootstrap-tools.js +0 -36
- package/dist/core/extensions/bootstrap-tools.js.map +0 -1
- package/dist/core/extensions/microcompact.d.ts +0 -80
- package/dist/core/extensions/microcompact.d.ts.map +0 -1
- package/dist/core/extensions/microcompact.js +0 -134
- package/dist/core/extensions/microcompact.js.map +0 -1
- package/dist/core/extensions/provider-failover.d.ts +0 -106
- package/dist/core/extensions/provider-failover.d.ts.map +0 -1
- package/dist/core/extensions/provider-failover.js.map +0 -1
- package/dist/core/tools/bash.d.ts.map +0 -1
- package/dist/core/tools/bash.js.map +0 -1
- package/dist/core/tools/edit.d.ts.map +0 -1
- package/dist/core/tools/edit.js.map +0 -1
- package/dist/core/tools/find.d.ts.map +0 -1
- package/dist/core/tools/find.js.map +0 -1
- package/dist/core/tools/grep.d.ts.map +0 -1
- package/dist/core/tools/grep.js.map +0 -1
- package/dist/core/tools/ls.d.ts.map +0 -1
- package/dist/core/tools/powershell.d.ts.map +0 -1
- package/dist/core/tools/powershell.js.map +0 -1
- package/dist/core/tools/read.d.ts.map +0 -1
- package/dist/core/tools/read.js.map +0 -1
- package/dist/core/tools/write.d.ts.map +0 -1
- package/dist/core/tools/write.js.map +0 -1
- package/dist/plugins/mcp-http.d.ts.map +0 -1
- package/dist/plugins/mcp-http.js.map +0 -1
- package/dist/profile/child-facade.d.ts +0 -44
- package/dist/profile/child-facade.d.ts.map +0 -1
- package/dist/profile/child-facade.js +0 -56
- package/dist/profile/child-facade.js.map +0 -1
- package/dist/profile/dependency-wiring.d.ts +0 -48
- package/dist/profile/dependency-wiring.d.ts.map +0 -1
- package/dist/profile/dependency-wiring.js +0 -56
- package/dist/profile/dependency-wiring.js.map +0 -1
- package/dist/profile/domain-recovery.d.ts +0 -60
- package/dist/profile/domain-recovery.d.ts.map +0 -1
- package/dist/profile/domain-recovery.js +0 -94
- package/dist/profile/domain-recovery.js.map +0 -1
- package/dist/profile/first-roles.d.ts +0 -30
- package/dist/profile/first-roles.d.ts.map +0 -1
- package/dist/profile/first-roles.js +0 -83
- package/dist/profile/first-roles.js.map +0 -1
- package/dist/profile/goal-plugin.d.ts +0 -38
- package/dist/profile/goal-plugin.d.ts.map +0 -1
- package/dist/profile/goal-plugin.js +0 -132
- package/dist/profile/goal-plugin.js.map +0 -1
- package/dist/profile/plan-plugin.d.ts +0 -44
- package/dist/profile/plan-plugin.d.ts.map +0 -1
- package/dist/profile/plan-plugin.js +0 -157
- package/dist/profile/plan-plugin.js.map +0 -1
- package/dist/profile/policy-manifest.d.ts +0 -53
- package/dist/profile/policy-manifest.d.ts.map +0 -1
- package/dist/profile/policy-manifest.js +0 -53
- package/dist/profile/policy-manifest.js.map +0 -1
- package/dist/profile/role-assembly.d.ts +0 -47
- package/dist/profile/role-assembly.d.ts.map +0 -1
- package/dist/profile/role-assembly.js +0 -31
- package/dist/profile/role-assembly.js.map +0 -1
- package/dist/profile/role-catalog.d.ts +0 -43
- package/dist/profile/role-catalog.d.ts.map +0 -1
- package/dist/profile/role-catalog.js +0 -132
- package/dist/profile/role-catalog.js.map +0 -1
- package/dist/profile/role-orchestrator.d.ts +0 -123
- package/dist/profile/role-orchestrator.d.ts.map +0 -1
- package/dist/profile/role-orchestrator.js +0 -195
- package/dist/profile/role-orchestrator.js.map +0 -1
- package/dist/profile/role-runner.d.ts +0 -99
- package/dist/profile/role-runner.d.ts.map +0 -1
- package/dist/profile/role-runner.js +0 -79
- package/dist/profile/role-runner.js.map +0 -1
- package/dist/profile/root-facade.d.ts +0 -36
- package/dist/profile/root-facade.d.ts.map +0 -1
- package/dist/profile/root-facade.js +0 -49
- package/dist/profile/root-facade.js.map +0 -1
- package/dist/profile/skill-discovery-wiring.d.ts +0 -58
- package/dist/profile/skill-discovery-wiring.d.ts.map +0 -1
- package/dist/profile/skill-discovery-wiring.js +0 -80
- package/dist/profile/skill-discovery-wiring.js.map +0 -1
- package/dist/profile/state-store.d.ts +0 -62
- package/dist/profile/state-store.d.ts.map +0 -1
- package/dist/profile/state-store.js +0 -144
- package/dist/profile/state-store.js.map +0 -1
- package/dist/profile/todo-plugin.d.ts +0 -37
- package/dist/profile/todo-plugin.d.ts.map +0 -1
- package/dist/profile/todo-plugin.js +0 -137
- package/dist/profile/todo-plugin.js.map +0 -1
- package/dist/server/create-harness.d.ts +0 -26
- package/dist/server/create-harness.d.ts.map +0 -1
- package/dist/server/create-harness.js +0 -106
- package/dist/server/create-harness.js.map +0 -1
- /package/{dist/plugins → bundled-plugins/mcp-http/dist}/mcp-http.d.ts +0 -0
|
@@ -32,7 +32,7 @@ import { getAllTools, getCapabilitySkills, getToolDefinition, normalizePromptGui
|
|
|
32
32
|
import { formatNoApiKeyFoundMessage, formatNoModelSelectedMessage } from "./auth-guidance.js";
|
|
33
33
|
import { THINKING_LEVEL_OPTIONS } from "./defaults.js";
|
|
34
34
|
import { definitionSnapshot, detachedSnapshot } from "./extensions/capability-runtime-snapshot.js";
|
|
35
|
-
import { BOOTSTRAP_AGENT_LOOP_PLUGIN_ID,
|
|
35
|
+
import { BOOTSTRAP_AGENT_LOOP_PLUGIN_ID, BOOTSTRAP_LIFECYCLE_PLUGIN_ID, BOOTSTRAP_SKILLS_PLUGIN_ID, createCapabilityRuntime, DEFAULT_BRANCH_SUMMARY_POLICY_NAME, DEFAULT_COMPACTION_POLICY_NAME, DEFAULT_OVERFLOW_POLICY_NAME, DEFAULT_RETRY_POLICY_NAME, DEFAULT_RUN_LOOP_STRATEGY_NAME, EXPERIMENTAL_PUBLIC_API_VERSION, installBootstrapAgentLoop, installBootstrapLifecycle, installSessionBootstrapSkills, loadCapabilityPluginFromManifest, loadCapabilityPlugin as loadCapabilityPluginRuntime, } from "./extensions/index.js";
|
|
36
36
|
import { t } from "./i18n/index.js";
|
|
37
37
|
import { expandPromptTemplate } from "./prompt-templates.js";
|
|
38
38
|
import { createSessionJsonlArtifact } from "./session-export.js";
|
|
@@ -104,14 +104,6 @@ export class AgentSession {
|
|
|
104
104
|
_overflowRecoveryAttempted = false;
|
|
105
105
|
// biome-ignore lint/correctness/noUnusedPrivateClassMembers: read and written via the agent-session-* submodule facade
|
|
106
106
|
_overflowTrimStage = 0;
|
|
107
|
-
/**
|
|
108
|
-
* microcompact 冷却(按模型请求计数,0 = 不冷却):relief 落地时置
|
|
109
|
-
* MICROCOMPACT_COOLDOWN_ASSISTANT_RESPONSES,此后每次 assistant message_end
|
|
110
|
-
* (无论 stopReason)减 1、下限 0;user message_start 不复位。冷却期内阈值
|
|
111
|
-
* decide 以 microcompactEnabled:false 关闭便宜缓解。微观经济动机见
|
|
112
|
-
* agent-session-compaction.ts 的常量注释(中部历史改写 × 不稳定前缀缓存)。
|
|
113
|
-
*/
|
|
114
|
-
_microcompactCooldown = 0;
|
|
115
107
|
// Branch summarization state
|
|
116
108
|
_branchSummaryAbortController = undefined;
|
|
117
109
|
_branchSummaryPromise = undefined;
|
|
@@ -182,7 +174,6 @@ export class AgentSession {
|
|
|
182
174
|
for (const listener of [...this._outputArtifactCommitListeners])
|
|
183
175
|
listener(artifact);
|
|
184
176
|
};
|
|
185
|
-
_bootstrapToolsHandle;
|
|
186
177
|
_bootstrapSkillsHandle;
|
|
187
178
|
_bootstrapRetryHandle;
|
|
188
179
|
_bootstrapCompactionHandle;
|
|
@@ -192,6 +183,12 @@ export class AgentSession {
|
|
|
192
183
|
_bootstrapLifecycleHandle;
|
|
193
184
|
_capabilityPlugins = new Map();
|
|
194
185
|
_inlineCapabilityPlugins = new Map();
|
|
186
|
+
/**
|
|
187
|
+
* 宿主装配链经 loadCapabilityPluginManifest 声明的 configOverride(按解析后
|
|
188
|
+
* manifest 路径)。reload 重装载循环据此回放 sdk 注入的会话事实(D-082 批 1:
|
|
189
|
+
* coding-tools 的 cwd/read/bash 等),会话生命周期内随同路径显式装载覆盖。
|
|
190
|
+
*/
|
|
191
|
+
_capabilityPluginConfigOverrides = new Map();
|
|
195
192
|
_isDisposingCapabilityPlugins = false;
|
|
196
193
|
/**
|
|
197
194
|
* 工具表变更钩子的两道门(见 _buildRuntime 的 onToolRegistryChange):
|
|
@@ -212,7 +209,6 @@ export class AgentSession {
|
|
|
212
209
|
_allowedToolNames;
|
|
213
210
|
// biome-ignore lint/correctness/noUnusedPrivateClassMembers: read and written via the agent-session-* submodule facade
|
|
214
211
|
_excludedToolNames;
|
|
215
|
-
_baseToolsOverride;
|
|
216
212
|
_disabledBootstrapPlugins;
|
|
217
213
|
_sessionStartEvent;
|
|
218
214
|
_capabilityMode;
|
|
@@ -303,7 +299,6 @@ export class AgentSession {
|
|
|
303
299
|
this._initialActiveToolNames = config.initialActiveToolNames;
|
|
304
300
|
this._allowedToolNames = config.allowedToolNames ? new Set(config.allowedToolNames) : undefined;
|
|
305
301
|
this._excludedToolNames = config.excludedToolNames ? new Set(config.excludedToolNames) : undefined;
|
|
306
|
-
this._baseToolsOverride = config.baseToolsOverride;
|
|
307
302
|
this._disabledBootstrapPlugins = config.disabledBootstrapPlugins;
|
|
308
303
|
this._sessionStartEvent = config.sessionStartEvent ?? { reason: "startup" };
|
|
309
304
|
this._capabilityMode = config.capabilityMode ?? "full-control";
|
|
@@ -526,11 +521,6 @@ export class AgentSession {
|
|
|
526
521
|
this._overflowRecoveryAttempted = false;
|
|
527
522
|
this._overflowTrimStage = 0;
|
|
528
523
|
}
|
|
529
|
-
// microcompact 冷却按模型请求计数:每个完成的 assistant 响应(无论
|
|
530
|
-
// stopReason)释放一档,下限 0;冷却期内的阈值 decide 不做便宜缓解。
|
|
531
|
-
if (this._microcompactCooldown > 0) {
|
|
532
|
-
this._microcompactCooldown -= 1;
|
|
533
|
-
}
|
|
534
524
|
// Reset retry counter immediately on successful assistant response
|
|
535
525
|
// This prevents accumulation across multiple LLM calls within a turn
|
|
536
526
|
if (assistantMsg.stopReason !== "error" && this._retryAttempt > 0) {
|
|
@@ -673,7 +663,6 @@ export class AgentSession {
|
|
|
673
663
|
const interactionHost = this._interactionHost;
|
|
674
664
|
return interactionHost?.dispose?.();
|
|
675
665
|
},
|
|
676
|
-
() => this._bootstrapToolsHandle?.dispose(),
|
|
677
666
|
() => this._bootstrapSkillsHandle?.dispose(),
|
|
678
667
|
() => this._bootstrapRetryHandle?.dispose(),
|
|
679
668
|
() => this._bootstrapCompactionHandle?.dispose(),
|
|
@@ -693,7 +682,6 @@ export class AgentSession {
|
|
|
693
682
|
this._capabilityRuntime?.revokeAllAPIs();
|
|
694
683
|
this._capabilityPlugins.clear();
|
|
695
684
|
this._inlineCapabilityPlugins.clear();
|
|
696
|
-
this._bootstrapToolsHandle = undefined;
|
|
697
685
|
this._bootstrapSkillsHandle = undefined;
|
|
698
686
|
this._bootstrapRetryHandle = undefined;
|
|
699
687
|
this._bootstrapCompactionHandle = undefined;
|
|
@@ -892,7 +880,6 @@ export class AgentSession {
|
|
|
892
880
|
getCapabilityPlugins() {
|
|
893
881
|
const handles = Array.from(this._capabilityPlugins.values());
|
|
894
882
|
for (const handle of [
|
|
895
|
-
this._bootstrapToolsHandle,
|
|
896
883
|
this._bootstrapSkillsHandle,
|
|
897
884
|
this._bootstrapRetryHandle,
|
|
898
885
|
this._bootstrapCompactionHandle,
|
|
@@ -1022,6 +1009,11 @@ export class AgentSession {
|
|
|
1022
1009
|
.filter((tool) => this._capabilityMode !== "readonly" ||
|
|
1023
1010
|
(!tool.source.startsWith("agent-forge.builtin.") && !tool.source.startsWith("agent-forge.plugin.")) ||
|
|
1024
1011
|
tool.readonlySafe === true)
|
|
1012
|
+
// Deferred plugin tools register but stay out of the active set on
|
|
1013
|
+
// this explicit-activation path too, until tool_search or
|
|
1014
|
+
// setActiveTools names them (same contract as the default path in
|
|
1015
|
+
// agent-session-tools.ts).
|
|
1016
|
+
.filter((tool) => !this._deferredToolPluginIds.has(tool.source))
|
|
1025
1017
|
.map((tool) => tool.name)
|
|
1026
1018
|
.filter((name) => !previousToolNames.has(name));
|
|
1027
1019
|
this._refreshToolRegistry({
|
|
@@ -1039,6 +1031,13 @@ export class AgentSession {
|
|
|
1039
1031
|
if (this._capabilityPlugins.has(resolvedManifestPath)) {
|
|
1040
1032
|
throw new Error(t("Capability plugin manifest is already loaded: {path}", { path: resolvedManifestPath }));
|
|
1041
1033
|
}
|
|
1034
|
+
// 宿主装配声明的 configOverride 按路径记录(D-082 批 1):sdk 装配链注入的
|
|
1035
|
+
// 会话事实(coding-tools 的 cwd/read/bash 等)在 reload 重装载时经此回放,
|
|
1036
|
+
// 否则插件会退回 manifest 缺省值(cwd 缺失即退回 process.cwd())。同路径的
|
|
1037
|
+
// 后续显式装载覆盖旧值。
|
|
1038
|
+
if (options?.configOverride !== undefined) {
|
|
1039
|
+
this._capabilityPluginConfigOverrides.set(resolvedManifestPath, options.configOverride);
|
|
1040
|
+
}
|
|
1042
1041
|
const previousToolNames = new Set(runtime.listTools().map((tool) => tool.name));
|
|
1043
1042
|
const loaded = await loadCapabilityPluginFromManifest(runtime, resolvedManifestPath, options);
|
|
1044
1043
|
return this._trackCapabilityPlugin(resolvedManifestPath, loaded, previousToolNames);
|
|
@@ -2019,16 +2018,6 @@ export class AgentSession {
|
|
|
2019
2018
|
_runAutoCompaction(reason, willRetry) {
|
|
2020
2019
|
return runAutoCompaction(this._internal, reason, willRetry);
|
|
2021
2020
|
}
|
|
2022
|
-
/**
|
|
2023
|
-
* Toggle auto-compaction setting.
|
|
2024
|
-
*/
|
|
2025
|
-
setAutoCompactionEnabled(enabled) {
|
|
2026
|
-
this.settingsManager.setCompactionEnabled(enabled);
|
|
2027
|
-
}
|
|
2028
|
-
/** Whether auto-compaction is enabled */
|
|
2029
|
-
get autoCompactionEnabled() {
|
|
2030
|
-
return this.settingsManager.getCompactionEnabled();
|
|
2031
|
-
}
|
|
2032
2021
|
/**
|
|
2033
2022
|
* Run the session-start boundary: dispatch session.start@1 to the capability
|
|
2034
2023
|
* runtime and run the resource discovery pass (contributed skills/prompts/
|
|
@@ -2127,9 +2116,6 @@ export class AgentSession {
|
|
|
2127
2116
|
// 对齐 context transition 控制器的替换模式:runtime 重建时刷新 parent
|
|
2128
2117
|
// 取消栅栏,防止 reload 后新 runtime 的任务绑到旧 spent 信号被立即取消。
|
|
2129
2118
|
this._agentTaskScopeAbortController = new AbortController();
|
|
2130
|
-
const autoResizeImages = this.settingsManager.getImageAutoResize();
|
|
2131
|
-
const shellCommandPrefix = this.settingsManager.getShellCommandPrefix();
|
|
2132
|
-
const shellPath = this.settingsManager.getShellPath();
|
|
2133
2119
|
this._capabilityRuntime = createCapabilityRuntime({
|
|
2134
2120
|
apiVersion: EXPERIMENTAL_PUBLIC_API_VERSION,
|
|
2135
2121
|
mode: this._capabilityMode,
|
|
@@ -2150,6 +2136,27 @@ export class AgentSession {
|
|
|
2150
2136
|
// The session working directory rides the public HostCapabilities as a host
|
|
2151
2137
|
// service so workspace-bound plugins (LSP real host) resolve their adapters.
|
|
2152
2138
|
workspaceDirectory: this._cwd,
|
|
2139
|
+
// 模型目录宿主服务(D-082 批 3b,契约 B):provider-failover 装载预检/
|
|
2140
|
+
// 目录快照读面(api.host.modelCatalog)。全部是 ModelRuntime 静态目录
|
|
2141
|
+
// 与凭据条目的即时读投影,零网络、零 OAuth;resolveModel 返回结构视图
|
|
2142
|
+
// (provider/contextWindow/maxTokens/compat/thinkingLevelMap 五字段),
|
|
2143
|
+
// 不透出内部 Model 对象,未知 provider/model 对返回 undefined。
|
|
2144
|
+
modelCatalog: {
|
|
2145
|
+
resolveModel: (provider, modelId) => {
|
|
2146
|
+
const model = this._modelRuntime.getModel(provider, modelId);
|
|
2147
|
+
if (!model)
|
|
2148
|
+
return undefined;
|
|
2149
|
+
return {
|
|
2150
|
+
provider: model.provider,
|
|
2151
|
+
contextWindow: model.contextWindow,
|
|
2152
|
+
maxTokens: model.maxTokens,
|
|
2153
|
+
...(model.compat === undefined ? {} : { compat: model.compat }),
|
|
2154
|
+
...(model.thinkingLevelMap === undefined ? {} : { thinkingLevelMap: model.thinkingLevelMap }),
|
|
2155
|
+
};
|
|
2156
|
+
},
|
|
2157
|
+
hasProvider: (providerId) => this._modelRuntime.getProvider(providerId) !== undefined,
|
|
2158
|
+
hasConfiguredAuth: (providerId) => this._modelRuntime.hasConfiguredAuth(providerId),
|
|
2159
|
+
},
|
|
2153
2160
|
features: [
|
|
2154
2161
|
"tools",
|
|
2155
2162
|
"skills",
|
|
@@ -2339,22 +2346,20 @@ export class AgentSession {
|
|
|
2339
2346
|
};
|
|
2340
2347
|
installBootstrap(BOOTSTRAP_LIFECYCLE_PLUGIN_ID, () => installBootstrapLifecycle(capabilityRuntime));
|
|
2341
2348
|
installBootstrap(BOOTSTRAP_AGENT_LOOP_PLUGIN_ID, () => installBootstrapAgentLoop(capabilityRuntime, this._createLoopWiring()));
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
}
|
|
2347
|
-
|
|
2349
|
+
// 默认编码工具不再由内嵌 bootstrap-tools 注册(D-082 批 1,S6 工具批):
|
|
2350
|
+
// 实现体迁出为 plugins/coding-tools 独立包,sdk 装配链经 bundled 分发通道
|
|
2351
|
+
// (manifest/jiti)装载,禁用面平移到 options.disabledPluginIds。
|
|
2352
|
+
// 默认策略家族(retry / overflow / compaction / branch summary)自 D-082
|
|
2353
|
+
// 批 3 起不再内嵌安装:实现体迁出为 plugins/{retry,overflow,compaction}-policy
|
|
2354
|
+
// 独立包(branch summary 随 compaction 包),sdk 装配链经 bundled 分发通道
|
|
2355
|
+
// (manifest/jiti)装载,禁用面平移到 options.disabledPluginIds;四个缺省
|
|
2356
|
+
// 策略名(DEFAULT_*_POLICY_NAME)仍由宿主持有。
|
|
2348
2357
|
installBootstrap(BOOTSTRAP_SKILLS_PLUGIN_ID, () => {
|
|
2349
2358
|
// refreshBootstrapSkills keys off this handle to decide refresh vs
|
|
2350
2359
|
// install; dropping it would double-install on the first refresh.
|
|
2351
2360
|
this._bootstrapSkillsHandle = installSessionBootstrapSkills(capabilityRuntime, this._resourceLoader.getSkills().skills);
|
|
2352
2361
|
return this._bootstrapSkillsHandle;
|
|
2353
2362
|
});
|
|
2354
|
-
installBootstrap(BOOTSTRAP_RETRY_PLUGIN_ID, () => installBootstrapRetryPolicy(capabilityRuntime));
|
|
2355
|
-
installBootstrap(BOOTSTRAP_OVERFLOW_PLUGIN_ID, () => installBootstrapOverflowPolicy(capabilityRuntime));
|
|
2356
|
-
installBootstrap(BOOTSTRAP_COMPACTION_PLUGIN_ID, () => installBootstrapCompactionPolicy(capabilityRuntime));
|
|
2357
|
-
installBootstrap(BOOTSTRAP_BRANCH_SUMMARY_PLUGIN_ID, () => installBootstrapBranchSummaryPolicy(capabilityRuntime));
|
|
2358
2363
|
// The embedded builtin capability channel (方案系统 M3) is retired: the
|
|
2359
2364
|
// last embedded capability (memory) moved to its own package in D-075
|
|
2360
2365
|
// S4 fourth batch, so every suite capability now assembles through the
|
|
@@ -2380,17 +2385,15 @@ export class AgentSession {
|
|
|
2380
2385
|
!tool.source.startsWith("agent-forge.plugin.") ||
|
|
2381
2386
|
tool.readonlySafe === true)
|
|
2382
2387
|
.map((tool) => tool.name);
|
|
2383
|
-
const defaultActiveToolNames = this.
|
|
2384
|
-
?
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
.map((tool) => tool.name)
|
|
2393
|
-
: ["read", "bash", "edit", "write"];
|
|
2388
|
+
const defaultActiveToolNames = this._capabilityMode === "readonly"
|
|
2389
|
+
? // Derive from declarations: the readonly install path registers
|
|
2390
|
+
// exactly the declared-safe definitions, so the kernel carries no
|
|
2391
|
+
// per-tool name knowledge for the readonly face.
|
|
2392
|
+
this._capabilityRuntime
|
|
2393
|
+
.listTools()
|
|
2394
|
+
.filter((tool) => tool.readonlySafe)
|
|
2395
|
+
.map((tool) => tool.name)
|
|
2396
|
+
: ["read", "bash", "edit", "write"];
|
|
2394
2397
|
// Builtin capability tools join the active surface like externally
|
|
2395
2398
|
// loaded plugin tools do (_trackCapabilityPlugin); the allowlist /
|
|
2396
2399
|
// denylist filters below still gate them.
|
|
@@ -2432,8 +2435,6 @@ export class AgentSession {
|
|
|
2432
2435
|
await agentTaskAdapter?.dispose?.();
|
|
2433
2436
|
const interactionHost = this._interactionHost;
|
|
2434
2437
|
await interactionHost?.dispose?.();
|
|
2435
|
-
await this._bootstrapToolsHandle?.dispose();
|
|
2436
|
-
this._bootstrapToolsHandle = undefined;
|
|
2437
2438
|
await this._bootstrapSkillsHandle?.dispose();
|
|
2438
2439
|
this._bootstrapSkillsHandle = undefined;
|
|
2439
2440
|
await this._bootstrapRetryHandle?.dispose();
|
|
@@ -2459,7 +2460,10 @@ export class AgentSession {
|
|
|
2459
2460
|
includeAllExtensionTools: true,
|
|
2460
2461
|
});
|
|
2461
2462
|
for (const manifestPath of capabilityPluginPaths) {
|
|
2462
|
-
|
|
2463
|
+
// 宿主装配注入的 configOverride 按路径回放(D-082 批 1),重装载不退
|
|
2464
|
+
// 回 manifest 缺省值。
|
|
2465
|
+
const configOverride = this._capabilityPluginConfigOverrides.get(manifestPath);
|
|
2466
|
+
await this.loadCapabilityPluginManifest(manifestPath, ...(configOverride === undefined ? [] : [{ configOverride }]));
|
|
2463
2467
|
}
|
|
2464
2468
|
for (const { manifest, factory } of inlineCapabilityPlugins) {
|
|
2465
2469
|
await this.loadCapabilityPlugin(manifest, factory);
|
|
@@ -2515,16 +2519,6 @@ export class AgentSession {
|
|
|
2515
2519
|
get isRetrying() {
|
|
2516
2520
|
return this._retryAbortController !== undefined;
|
|
2517
2521
|
}
|
|
2518
|
-
/** Whether auto-retry is enabled */
|
|
2519
|
-
get autoRetryEnabled() {
|
|
2520
|
-
return this.settingsManager.getRetryEnabled();
|
|
2521
|
-
}
|
|
2522
|
-
/**
|
|
2523
|
-
* Toggle auto-retry setting.
|
|
2524
|
-
*/
|
|
2525
|
-
setAutoRetryEnabled(enabled) {
|
|
2526
|
-
this.settingsManager.setRetryEnabled(enabled);
|
|
2527
|
-
}
|
|
2528
2522
|
// =========================================================================
|
|
2529
2523
|
// Bash Execution
|
|
2530
2524
|
// =========================================================================
|