@ai-agent-forge/agent-forge 0.88.0 → 0.88.2
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 +73 -0
- 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 +143 -56
- 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 +109 -155
- 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-44I47ACN.js +13 -0
- package/dist/bundle/chunks/chunk-6F5JWGKE.js +4 -0
- 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-HTC5K5SM.js +866 -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-LSP24WNH.js +665 -0
- package/dist/bundle/chunks/{chunk-7ZY7IXZD.js → chunk-TRDNDS6A.js} +1 -1
- 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 +4 -4
- 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-MRXD3RWG.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/plugin-command.d.ts.map +1 -1
- package/dist/cli/plugin-command.js +25 -3
- 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 +2 -4
- 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.map +1 -1
- package/dist/core/agent-session-compaction.js +14 -1
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-internal.d.ts +3 -1
- 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 -3
- package/dist/core/agent-session-retry.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +2 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +31 -9
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session-store.d.ts.map +1 -1
- package/dist/core/agent-session-store.js +6 -1
- package/dist/core/agent-session-store.js.map +1 -1
- package/dist/core/agent-session-tools.d.ts.map +1 -1
- package/dist/core/agent-session-tools.js +18 -1
- package/dist/core/agent-session-tools.js.map +1 -1
- package/dist/core/agent-session.d.ts +34 -11
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +114 -38
- 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 -1
- package/dist/core/facade/coding-agent-facade.d.ts.map +1 -1
- 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 +2 -0
- 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/index.d.ts.map +1 -1
- package/dist/core/i18n/locales/zh-cn/index.js +2 -0
- package/dist/core/i18n/locales/zh-cn/index.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 +5 -0
- package/dist/core/i18n/locales/zh-cn/interactive-mode.js.map +1 -1
- package/dist/core/i18n/locales/zh-cn/session-cleanup.d.ts +7 -0
- package/dist/core/i18n/locales/zh-cn/session-cleanup.d.ts.map +1 -0
- package/dist/core/i18n/locales/zh-cn/session-cleanup.js +15 -0
- package/dist/core/i18n/locales/zh-cn/session-cleanup.js.map +1 -0
- package/dist/core/i18n/locales/zh-cn/slash-commands.d.ts.map +1 -1
- package/dist/core/i18n/locales/zh-cn/slash-commands.js +1 -0
- package/dist/core/i18n/locales/zh-cn/slash-commands.js.map +1 -1
- package/dist/core/sdk.d.ts +10 -3
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +287 -78
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-cleanup.d.ts +49 -0
- package/dist/core/session-cleanup.d.ts.map +1 -0
- package/dist/core/session-cleanup.js +159 -0
- package/dist/core/session-cleanup.js.map +1 -0
- package/dist/core/session-index.d.ts +75 -0
- package/dist/core/session-index.d.ts.map +1 -0
- package/dist/core/session-index.js +455 -0
- package/dist/core/session-index.js.map +1 -0
- package/dist/core/session-manager.d.ts +9 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +202 -47
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +5 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +12 -1
- package/dist/core/system-prompt.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/capability-mount.d.ts +40 -0
- package/dist/core/tools/capability-mount.d.ts.map +1 -0
- package/dist/core/tools/capability-mount.js +112 -0
- package/dist/core/tools/capability-mount.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 +1 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +3 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +27 -5
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js +5 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +9 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +17 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +52 -25
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-run-group.d.ts +44 -0
- package/dist/modes/interactive/components/tool-run-group.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-run-group.js +121 -0
- package/dist/modes/interactive/components/tool-run-group.js.map +1 -0
- package/dist/modes/interactive/interactive-commands.d.ts +2 -0
- package/dist/modes/interactive/interactive-commands.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-commands.js +7 -0
- package/dist/modes/interactive/interactive-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +18 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +85 -3
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/plugins/ecosystem/cli.d.ts.map +1 -1
- package/dist/plugins/ecosystem/cli.js +20 -5
- 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 +7 -1
- package/dist/plugins/ecosystem/node-plugin-bootstrap.d.ts.map +1 -1
- package/dist/plugins/ecosystem/node-plugin-bootstrap.js +50 -3
- package/dist/plugins/ecosystem/node-plugin-bootstrap.js.map +1 -1
- package/dist/plugins/ecosystem/plugin-bootstrap.d.ts +28 -16
- package/dist/plugins/ecosystem/plugin-bootstrap.d.ts.map +1 -1
- package/dist/plugins/ecosystem/plugin-bootstrap.js +35 -33
- package/dist/plugins/ecosystem/plugin-bootstrap.js.map +1 -1
- package/dist/profile/plugin-profiles.d.ts +1 -1
- package/dist/profile/plugin-profiles.d.ts.map +1 -1
- package/dist/profile/plugin-profiles.js +18 -0
- package/dist/profile/plugin-profiles.js.map +1 -1
- package/dist/profiles/builtin-suites.d.ts +19 -5
- package/dist/profiles/builtin-suites.d.ts.map +1 -1
- package/dist/profiles/builtin-suites.js +26 -6
- package/dist/profiles/builtin-suites.js.map +1 -1
- package/docs/settings.md +354 -354
- package/docs/usage.md +292 -292
- 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/package.json +3 -2
- package/dist/bundle/chunks/chunk-6ZKDNZHA.js +0 -145
- package/dist/bundle/chunks/chunk-HLJEVRWP.js +0 -13
- package/dist/bundle/chunks/chunk-YGHQME4V.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 -48
- 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/provider-failover.d.ts +0 -110
- 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/examples/extensions/mcp-stdio/index.d.ts +0 -64
- package/examples/extensions/mcp-stdio/index.d.ts.map +0 -1
- package/examples/extensions/mcp-stdio/index.js +0 -292
- package/examples/extensions/mcp-stdio/index.js.map +0 -1
- /package/{dist/plugins → bundled-plugins/mcp-http/dist}/mcp-http.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability-mount.js","sourceRoot":"","sources":["../../../src/core/tools/capability-mount.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAe,IAAI,EAAE,MAAM,SAAS,CAAC;AAoB5C,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEhC,MAAM,CAAC,MAAM,0BAA0B,GAAG,kBAAkB,CAAC;AAC7D,MAAM,CAAC,MAAM,4BAA4B,GAAG,oBAAoB,CAAC;AAEjE,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC;IACnC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;QACnB,WAAW,EAAE,4FAA4F;KACzG,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC;IACrC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,kEAAkE,EAAE,CAAC;CACxG,CAAC,CAAC;AAEH,MAAM,UAAU,0BAA0B,CACzC,IAAyB,EACqE;IAC9F,MAAM,SAAS,GAA2C;QACzD,IAAI,EAAE,0BAA0B;QAChC,KAAK,EAAE,kBAAkB;QACzB,WAAW,EACV,2GAA2G;YAC3G,qHAAqH;QACtH,aAAa,EACZ,6KAA6K;QAC9K,UAAU,EAAE,eAAe;QAC3B,OAAO,EAAE,KAAK,EAAE,W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CAAC;IAEF,OAAO,CAAC,SAAS,EAAE,WAAW,CAAU,CAAC;AAAA,CACzC","sourcesContent":["/**\n * capability_mount / capability_unmount: plugin-granular on-demand tool\n * loading (插件按需挂载与能力手册设计 §5.2).\n *\n * Manifests declaring `activation: \"on-demand\"` register their tools into the\n * registry but keep them out of the active set; the model sees a one-line\n * capability card in the system prompt instead. `capability_mount` pulls the\n * plugin's full tool set into the active surface (next request) and returns\n * the plugin's AI manual; `capability_unmount` removes it from the active\n * surface without touching any runtime state — session teardown remains the\n * primary cleanup path. Kernel mechanism only: no plugin-specific branches.\n */\n\nimport { type Static, Type } from \"typebox\";\nimport type { ToolDefinition } from \"./tool-definition.ts\";\n\nexport interface DeferredCapabilityCardV1 {\n\treadonly pluginId: string;\n\t/** One-line capability summary from the manifest `description` field. */\n\treadonly description?: string;\n\t/** Absolute path to the plugin's AI manual (manifest `manual`, resolved). */\n\treadonly manualPath?: string;\n}\n\nexport interface CapabilityMountDeps {\n\tgetCards(): readonly DeferredCapabilityCardV1[];\n\t/** Registry tool names whose source is this plugin id. */\n\ttoolNamesForPlugin(pluginId: string): string[];\n\tgetActiveToolNames(): readonly string[];\n\tsetActiveToolsByName(toolNames: string[]): void;\n\treadManual(path: string): Promise<string>;\n}\n\nconst MANUAL_MAX_CHARS = 16_000;\n\nexport const CAPABILITY_MOUNT_TOOL_NAME = \"capability_mount\";\nexport const CAPABILITY_UNMOUNT_TOOL_NAME = \"capability_unmount\";\n\nconst mountParameters = Type.Object({\n\tplugin: Type.String({\n\t\tdescription: \"Plugin id from the mountable-capabilities card, e.g. agent-forge.plugin.browser-playwright\",\n\t}),\n});\n\nconst unmountParameters = Type.Object({\n\tplugin: Type.String({ description: \"Plugin id to unmount, e.g. agent-forge.plugin.browser-playwright\" }),\n});\n\nexport function createCapabilityMountTools(\n\tdeps: CapabilityMountDeps,\n): readonly [ToolDefinition<typeof mountParameters>, ToolDefinition<typeof unmountParameters>] {\n\tconst mountTool: ToolDefinition<typeof mountParameters> = {\n\t\tname: CAPABILITY_MOUNT_TOOL_NAME,\n\t\tlabel: \"Capability mount\",\n\t\tdescription:\n\t\t\t\"Load a deferred plugin capability on demand: activates all of its tools for subsequent turns and returns \" +\n\t\t\t\"the plugin's usage manual. Mountable capabilities are listed in the system prompt's mountable-capabilities section.\",\n\t\tpromptSnippet:\n\t\t\t\"Activate a deferred plugin capability (browser tools, desktop control, image generation, ...) when its one-line card in the mountable-capabilities section matches the task\",\n\t\tparameters: mountParameters,\n\t\texecute: async (_toolCallId, params: Static<typeof mountParameters>) => {\n\t\t\tconst pluginId = params.plugin.trim();\n\t\t\tconst card = deps.getCards().find((entry) => entry.pluginId === pluginId);\n\t\t\tif (card === undefined) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\ttext: `Unknown capability \"${pluginId}\". Mountable capabilities are listed in the system prompt's mountable-capabilities section.`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tdetails: { activated: false },\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst toolNames = deps.toolNamesForPlugin(pluginId);\n\t\t\tif (toolNames.length === 0) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\", text: `Capability \"${pluginId}\" has no registered tools to activate.` }],\n\t\t\t\t\tdetails: { activated: false },\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst active = new Set(deps.getActiveToolNames());\n\t\t\tconst missing = toolNames.filter((name) => !active.has(name));\n\t\t\tif (missing.length > 0) {\n\t\t\t\tdeps.setActiveToolsByName([...deps.getActiveToolNames(), ...toolNames]);\n\t\t\t}\n\t\t\tconst manual =\n\t\t\t\tcard.manualPath === undefined ? undefined : await deps.readManual(card.manualPath).catch(() => undefined);\n\t\t\tconst activationLine =\n\t\t\t\tmissing.length === 0\n\t\t\t\t\t? `Capability \"${pluginId}\" is already active (${toolNames.length} tool(s)).`\n\t\t\t\t\t: `Activated ${missing.length} tool(s) for \"${pluginId}\": ${toolNames.join(\", \")}. They are available from the next turn.`;\n\t\t\tconst manualBlock =\n\t\t\t\tmanual === undefined\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `\\n\\n---\\n\\n${manual.slice(0, MANUAL_MAX_CHARS)}${manual.length > MANUAL_MAX_CHARS ? \"\\n\\n(manual truncated)\" : \"\"}`;\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: `${activationLine}${manualBlock}` }],\n\t\t\t\tdetails: { activated: missing.length > 0 },\n\t\t\t};\n\t\t},\n\t};\n\n\tconst unmountTool: ToolDefinition<typeof unmountParameters> = {\n\t\tname: CAPABILITY_UNMOUNT_TOOL_NAME,\n\t\tlabel: \"Capability unmount\",\n\t\tdescription:\n\t\t\t\"Remove a mounted plugin capability's tools from the active surface when the task that needed them is done. \" +\n\t\t\t\"Runtime state (e.g. an open browser session) is not torn down; it follows the plugin's own idle timeout. \" +\n\t\t\t\"Session teardown clears all mounts anyway, so unmounting is an optional long-session optimization.\",\n\t\tpromptSnippet:\n\t\t\t\"Deactivate a mounted plugin capability after finishing the task that needed it (optional; sessions clear mounts on teardown)\",\n\t\tparameters: unmountParameters,\n\t\texecute: async (_toolCallId, params: Static<typeof unmountParameters>) => {\n\t\t\tconst pluginId = params.plugin.trim();\n\t\t\tconst card = deps.getCards().find((entry) => entry.pluginId === pluginId);\n\t\t\tif (card === undefined) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\", text: `Unknown capability \"${pluginId}\".` }],\n\t\t\t\t\tdetails: { unmounted: false },\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst toolNames = deps.toolNamesForPlugin(pluginId);\n\t\t\tconst active = new Set(deps.getActiveToolNames());\n\t\t\tconst mountedNames = toolNames.filter((name) => active.has(name));\n\t\t\tif (mountedNames.length === 0) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\", text: `Capability \"${pluginId}\" is not mounted.` }],\n\t\t\t\t\tdetails: { unmounted: false },\n\t\t\t\t};\n\t\t\t}\n\t\t\tdeps.setActiveToolsByName(deps.getActiveToolNames().filter((name) => !mountedNames.includes(name)));\n\t\t\treturn {\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: `Unmounted \"${pluginId}\": removed ${mountedNames.length} tool(s) from the active surface. Runtime state was not touched.`,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdetails: { unmounted: true },\n\t\t\t};\n\t\t},\n\t};\n\n\treturn [mountTool, unmountTool] as const;\n}\n"]}
|
|
@@ -1,44 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export { createWriteTool, createWriteToolDefinition, type WriteOperations, type WriteToolInput, type WriteToolOptions, } from "./write.ts";
|
|
1
|
+
/**
|
|
2
|
+
* Host-retained tool support surface (D-082 批 1, S6 工具批): the eight default
|
|
3
|
+
* coding tool definitions moved to the `plugins/coding-tools` package; what
|
|
4
|
+
* stays here is the shared mechanism and support face the host (and every
|
|
5
|
+
* plugin through the `@agent-forge/host/*` supply keys) builds on — the
|
|
6
|
+
* definition contract, render/format helpers, truncation, diff generation,
|
|
7
|
+
* mutation queueing, output accumulation, path utils, bash operations, the
|
|
8
|
+
* tool_search factory, and the default tool name vocabulary.
|
|
9
|
+
*/
|
|
11
10
|
import type { AgentTool } from "@agent-forge/agent-core";
|
|
12
11
|
import type { TSchema } from "typebox";
|
|
13
|
-
import { type BashToolOptions } from "./bash.ts";
|
|
14
|
-
import { type EditToolOptions } from "./edit.ts";
|
|
15
|
-
import { type FindToolOptions } from "./find.ts";
|
|
16
|
-
import { type GrepToolOptions } from "./grep.ts";
|
|
17
|
-
import { type LsToolOptions } from "./ls.ts";
|
|
18
|
-
import { type PowerShellToolOptions } from "./powershell.ts";
|
|
19
|
-
import { type ReadToolOptions } from "./read.ts";
|
|
20
12
|
import type { ToolDefinition } from "./tool-definition.ts";
|
|
21
|
-
|
|
13
|
+
export { type BashOperations, type BashSpawnContext, type BashSpawnHook, createLocalBashOperations, createLocalShellOperations, } from "./bash-operations.ts";
|
|
14
|
+
export { withFileMutationQueue } from "./file-mutation-queue.ts";
|
|
15
|
+
export { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize, type TruncationOptions, type TruncationResult, truncateHead, truncateLine, truncateTail, } from "./truncate.ts";
|
|
22
16
|
export type Tool = AgentTool<TSchema>;
|
|
23
17
|
export type ToolDef = ToolDefinition;
|
|
24
18
|
export type ToolName = "read" | "bash" | "powershell" | "edit" | "write" | "grep" | "find" | "ls";
|
|
25
19
|
export declare const allToolNames: Set<ToolName>;
|
|
26
|
-
export interface ToolsOptions {
|
|
27
|
-
read?: ReadToolOptions;
|
|
28
|
-
bash?: BashToolOptions;
|
|
29
|
-
powershell?: PowerShellToolOptions;
|
|
30
|
-
write?: WriteToolOptions;
|
|
31
|
-
edit?: EditToolOptions;
|
|
32
|
-
grep?: GrepToolOptions;
|
|
33
|
-
find?: FindToolOptions;
|
|
34
|
-
ls?: LsToolOptions;
|
|
35
|
-
}
|
|
36
|
-
export declare function createToolDefinition(toolName: ToolName, cwd: string, options?: ToolsOptions): ToolDef;
|
|
37
|
-
export declare function createTool(toolName: ToolName, cwd: string, options?: ToolsOptions): Tool;
|
|
38
|
-
export declare function createCodingToolDefinitions(cwd: string, options?: ToolsOptions): ToolDef[];
|
|
39
|
-
export declare function createReadOnlyToolDefinitions(cwd: string, options?: ToolsOptions): ToolDef[];
|
|
40
|
-
export declare function createAllToolDefinitions(cwd: string, options?: ToolsOptions): Record<ToolName, ToolDef>;
|
|
41
|
-
export declare function createCodingTools(cwd: string, options?: ToolsOptions): Tool[];
|
|
42
|
-
export declare function createReadOnlyTools(cwd: string, options?: ToolsOptions): Tool[];
|
|
43
|
-
export declare function createAllTools(cwd: string, options?: ToolsOptions): Record<ToolName, Tool>;
|
|
44
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,cAAc,EACd,wBAAwB,EACxB,yBAAyB,GACzB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EACd,wBAAwB,EACxB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EACN,cAAc,EACd,wBAAwB,EACxB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EACd,wBAAwB,EACxB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,YAAY,EACZ,sBAAsB,EACtB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,aAAa,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EACN,+BAA+B,EAC/B,oBAAoB,EACpB,8BAA8B,EAC9B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,cAAc,EACd,wBAAwB,EACxB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,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sourcesContent":["export {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tcreateBashTool,\n\tcreateBashToolDefinition,\n\tcreateLocalBashOperations,\n} from \"./bash.ts\";\nexport {\n\tcreateEditTool,\n\tcreateEditToolDefinition,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n} from \"./edit.ts\";\nexport { withFileMutationQueue } from \"./file-mutation-queue.ts\";\nexport {\n\tcreateFindTool,\n\tcreateFindToolDefinition,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n} from \"./find.ts\";\nexport {\n\tcreateGrepTool,\n\tcreateGrepToolDefinition,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n} from \"./grep.ts\";\nexport {\n\tcreateLsTool,\n\tcreateLsToolDefinition,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n} from \"./ls.ts\";\nexport {\n\tcreateLocalPowerShellOperations,\n\tcreatePowerShellTool,\n\tcreatePowerShellToolDefinition,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n} from \"./powershell.ts\";\nexport {\n\tcreateReadTool,\n\tcreateReadToolDefinition,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n} from \"./read.ts\";\nexport {\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\tformatSize,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n} from \"./truncate.ts\";\nexport {\n\tcreateWriteTool,\n\tcreateWriteToolDefinition,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n} from \"./write.ts\";\n\nimport type { AgentTool } from \"@agent-forge/agent-core\";\nimport type { TSchema } from \"typebox\";\nimport { t } from \"../i18n/index.ts\";\nimport { type BashToolOptions, createBashTool, createBashToolDefinition } from \"./bash.ts\";\nimport { createEditTool, createEditToolDefinition, type EditToolOptions } from \"./edit.ts\";\nimport { createFindTool, createFindToolDefinition, type FindToolOptions } from \"./find.ts\";\nimport { createGrepTool, createGrepToolDefinition, type GrepToolOptions } from \"./grep.ts\";\nimport { createLsTool, createLsToolDefinition, type LsToolOptions } from \"./ls.ts\";\nimport { createPowerShellTool, createPowerShellToolDefinition, type PowerShellToolOptions } from \"./powershell.ts\";\nimport { createReadTool, createReadToolDefinition, type ReadToolOptions } from \"./read.ts\";\nimport type { ToolDefinition } from \"./tool-definition.ts\";\nimport { createWriteTool, createWriteToolDefinition, type WriteToolOptions } from \"./write.ts\";\n\nexport type Tool = AgentTool<TSchema>;\nexport type ToolDef = ToolDefinition;\nexport type ToolName = \"read\" | \"bash\" | \"powershell\" | \"edit\" | \"write\" | \"grep\" | \"find\" | \"ls\";\nexport const allToolNames: Set<ToolName> = new Set([\n\t\"read\",\n\t\"bash\",\n\t\"powershell\",\n\t\"edit\",\n\t\"write\",\n\t\"grep\",\n\t\"find\",\n\t\"ls\",\n]);\n\nexport interface ToolsOptions {\n\tread?: ReadToolOptions;\n\tbash?: BashToolOptions;\n\tpowershell?: PowerShellToolOptions;\n\twrite?: WriteToolOptions;\n\tedit?: EditToolOptions;\n\tgrep?: GrepToolOptions;\n\tfind?: FindToolOptions;\n\tls?: LsToolOptions;\n}\n\nexport function createToolDefinition(toolName: ToolName, cwd: string, options?: ToolsOptions): ToolDef {\n\tswitch (toolName) {\n\t\tcase \"read\":\n\t\t\treturn createReadToolDefinition(cwd, options?.read);\n\t\tcase \"bash\":\n\t\t\treturn createBashToolDefinition(cwd, options?.bash);\n\t\tcase \"powershell\":\n\t\t\treturn createPowerShellToolDefinition(cwd, options?.powershell);\n\t\tcase \"edit\":\n\t\t\treturn createEditToolDefinition(cwd, options?.edit);\n\t\tcase \"write\":\n\t\t\treturn createWriteToolDefinition(cwd, options?.write);\n\t\tcase \"grep\":\n\t\t\treturn createGrepToolDefinition(cwd, options?.grep);\n\t\tcase \"find\":\n\t\t\treturn createFindToolDefinition(cwd, options?.find);\n\t\tcase \"ls\":\n\t\t\treturn createLsToolDefinition(cwd, options?.ls);\n\t\tdefault:\n\t\t\tthrow new Error(t(\"Unknown tool name: {toolName}\", { toolName }));\n\t}\n}\n\nexport function createTool(toolName: ToolName, cwd: string, options?: ToolsOptions): Tool {\n\tswitch (toolName) {\n\t\tcase \"read\":\n\t\t\treturn createReadTool(cwd, options?.read);\n\t\tcase \"bash\":\n\t\t\treturn createBashTool(cwd, options?.bash);\n\t\tcase \"powershell\":\n\t\t\treturn createPowerShellTool(cwd, options?.powershell);\n\t\tcase \"edit\":\n\t\t\treturn createEditTool(cwd, options?.edit);\n\t\tcase \"write\":\n\t\t\treturn createWriteTool(cwd, options?.write);\n\t\tcase \"grep\":\n\t\t\treturn createGrepTool(cwd, options?.grep);\n\t\tcase \"find\":\n\t\t\treturn createFindTool(cwd, options?.find);\n\t\tcase \"ls\":\n\t\t\treturn createLsTool(cwd, options?.ls);\n\t\tdefault:\n\t\t\tthrow new Error(t(\"Unknown tool name: {toolName}\", { toolName }));\n\t}\n}\n\nexport function createCodingToolDefinitions(cwd: string, options?: ToolsOptions): ToolDef[] {\n\treturn [\n\t\tcreateReadToolDefinition(cwd, options?.read),\n\t\tcreateBashToolDefinition(cwd, options?.bash),\n\t\tcreateEditToolDefinition(cwd, options?.edit),\n\t\tcreateWriteToolDefinition(cwd, options?.write),\n\t];\n}\n\nexport function createReadOnlyToolDefinitions(cwd: string, options?: ToolsOptions): ToolDef[] {\n\treturn [\n\t\tcreateReadToolDefinition(cwd, options?.read),\n\t\tcreateGrepToolDefinition(cwd, options?.grep),\n\t\tcreateFindToolDefinition(cwd, options?.find),\n\t\tcreateLsToolDefinition(cwd, options?.ls),\n\t];\n}\n\nexport function createAllToolDefinitions(cwd: string, options?: ToolsOptions): Record<ToolName, ToolDef> {\n\treturn {\n\t\tread: createReadToolDefinition(cwd, options?.read),\n\t\tbash: createBashToolDefinition(cwd, options?.bash),\n\t\tpowershell: createPowerShellToolDefinition(cwd, options?.powershell),\n\t\tedit: createEditToolDefinition(cwd, options?.edit),\n\t\twrite: createWriteToolDefinition(cwd, options?.write),\n\t\tgrep: createGrepToolDefinition(cwd, options?.grep),\n\t\tfind: createFindToolDefinition(cwd, options?.find),\n\t\tls: createLsToolDefinition(cwd, options?.ls),\n\t};\n}\n\nexport function createCodingTools(cwd: string, options?: ToolsOptions): Tool[] {\n\treturn [\n\t\tcreateReadTool(cwd, options?.read),\n\t\tcreateBashTool(cwd, options?.bash),\n\t\tcreateEditTool(cwd, options?.edit),\n\t\tcreateWriteTool(cwd, options?.write),\n\t];\n}\n\nexport function createReadOnlyTools(cwd: string, options?: ToolsOptions): Tool[] {\n\treturn [\n\t\tcreateReadTool(cwd, options?.read),\n\t\tcreateGrepTool(cwd, options?.grep),\n\t\tcreateFindTool(cwd, options?.find),\n\t\tcreateLsTool(cwd, options?.ls),\n\t];\n}\n\nexport function createAllTools(cwd: string, options?: ToolsOptions): Record<ToolName, Tool> {\n\treturn {\n\t\tread: createReadTool(cwd, options?.read),\n\t\tbash: createBashTool(cwd, options?.bash),\n\t\tpowershell: createPowerShellTool(cwd, options?.powershell),\n\t\tedit: createEditTool(cwd, options?.edit),\n\t\twrite: createWriteTool(cwd, options?.write),\n\t\tgrep: createGrepTool(cwd, options?.grep),\n\t\tfind: createFindTool(cwd, options?.find),\n\t\tls: createLsTool(cwd, options?.ls),\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,yBAAyB,EACzB,0BAA0B,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EACN,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,YAAY,EACZ,YAAY,EACZ,YAAY,GACZ,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;AACtC,MAAM,MAAM,OAAO,GAAG,cAAc,CAAC;AACrC,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAClG,eAAO,MAAM,YAAY,EAAE,GAAG,CAAC,QAAQ,CASrC,CAAC","sourcesContent":["/**\n * Host-retained tool support surface (D-082 批 1, S6 工具批): the eight default\n * coding tool definitions moved to the `plugins/coding-tools` package; what\n * stays here is the shared mechanism and support face the host (and every\n * plugin through the `@agent-forge/host/*` supply keys) builds on — the\n * definition contract, render/format helpers, truncation, diff generation,\n * mutation queueing, output accumulation, path utils, bash operations, the\n * tool_search factory, and the default tool name vocabulary.\n */\nimport type { AgentTool } from \"@agent-forge/agent-core\";\nimport type { TSchema } from \"typebox\";\nimport type { ToolDefinition } from \"./tool-definition.ts\";\n\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\tcreateLocalBashOperations,\n\tcreateLocalShellOperations,\n} from \"./bash-operations.ts\";\nexport { withFileMutationQueue } from \"./file-mutation-queue.ts\";\nexport {\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\tformatSize,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n} from \"./truncate.ts\";\n\nexport type Tool = AgentTool<TSchema>;\nexport type ToolDef = ToolDefinition;\nexport type ToolName = \"read\" | \"bash\" | \"powershell\" | \"edit\" | \"write\" | \"grep\" | \"find\" | \"ls\";\nexport const allToolNames: Set<ToolName> = new Set([\n\t\"read\",\n\t\"bash\",\n\t\"powershell\",\n\t\"edit\",\n\t\"write\",\n\t\"grep\",\n\t\"find\",\n\t\"ls\",\n]);\n"]}
|
package/dist/core/tools/index.js
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { createEditTool, createEditToolDefinition, } from "./edit.js";
|
|
1
|
+
export { createLocalBashOperations, createLocalShellOperations, } from "./bash-operations.js";
|
|
3
2
|
export { withFileMutationQueue } from "./file-mutation-queue.js";
|
|
4
|
-
export { createFindTool, createFindToolDefinition, } from "./find.js";
|
|
5
|
-
export { createGrepTool, createGrepToolDefinition, } from "./grep.js";
|
|
6
|
-
export { createLsTool, createLsToolDefinition, } from "./ls.js";
|
|
7
|
-
export { createLocalPowerShellOperations, createPowerShellTool, createPowerShellToolDefinition, } from "./powershell.js";
|
|
8
|
-
export { createReadTool, createReadToolDefinition, } from "./read.js";
|
|
9
3
|
export { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize, truncateHead, truncateLine, truncateTail, } from "./truncate.js";
|
|
10
|
-
export { createWriteTool, createWriteToolDefinition, } from "./write.js";
|
|
11
|
-
import { t } from "../i18n/index.js";
|
|
12
|
-
import { createBashTool, createBashToolDefinition } from "./bash.js";
|
|
13
|
-
import { createEditTool, createEditToolDefinition } from "./edit.js";
|
|
14
|
-
import { createFindTool, createFindToolDefinition } from "./find.js";
|
|
15
|
-
import { createGrepTool, createGrepToolDefinition } from "./grep.js";
|
|
16
|
-
import { createLsTool, createLsToolDefinition } from "./ls.js";
|
|
17
|
-
import { createPowerShellTool, createPowerShellToolDefinition } from "./powershell.js";
|
|
18
|
-
import { createReadTool, createReadToolDefinition } from "./read.js";
|
|
19
|
-
import { createWriteTool, createWriteToolDefinition } from "./write.js";
|
|
20
4
|
export const allToolNames = new Set([
|
|
21
5
|
"read",
|
|
22
6
|
"bash",
|
|
@@ -27,104 +11,4 @@ export const allToolNames = new Set([
|
|
|
27
11
|
"find",
|
|
28
12
|
"ls",
|
|
29
13
|
]);
|
|
30
|
-
export function createToolDefinition(toolName, cwd, options) {
|
|
31
|
-
switch (toolName) {
|
|
32
|
-
case "read":
|
|
33
|
-
return createReadToolDefinition(cwd, options?.read);
|
|
34
|
-
case "bash":
|
|
35
|
-
return createBashToolDefinition(cwd, options?.bash);
|
|
36
|
-
case "powershell":
|
|
37
|
-
return createPowerShellToolDefinition(cwd, options?.powershell);
|
|
38
|
-
case "edit":
|
|
39
|
-
return createEditToolDefinition(cwd, options?.edit);
|
|
40
|
-
case "write":
|
|
41
|
-
return createWriteToolDefinition(cwd, options?.write);
|
|
42
|
-
case "grep":
|
|
43
|
-
return createGrepToolDefinition(cwd, options?.grep);
|
|
44
|
-
case "find":
|
|
45
|
-
return createFindToolDefinition(cwd, options?.find);
|
|
46
|
-
case "ls":
|
|
47
|
-
return createLsToolDefinition(cwd, options?.ls);
|
|
48
|
-
default:
|
|
49
|
-
throw new Error(t("Unknown tool name: {toolName}", { toolName }));
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
export function createTool(toolName, cwd, options) {
|
|
53
|
-
switch (toolName) {
|
|
54
|
-
case "read":
|
|
55
|
-
return createReadTool(cwd, options?.read);
|
|
56
|
-
case "bash":
|
|
57
|
-
return createBashTool(cwd, options?.bash);
|
|
58
|
-
case "powershell":
|
|
59
|
-
return createPowerShellTool(cwd, options?.powershell);
|
|
60
|
-
case "edit":
|
|
61
|
-
return createEditTool(cwd, options?.edit);
|
|
62
|
-
case "write":
|
|
63
|
-
return createWriteTool(cwd, options?.write);
|
|
64
|
-
case "grep":
|
|
65
|
-
return createGrepTool(cwd, options?.grep);
|
|
66
|
-
case "find":
|
|
67
|
-
return createFindTool(cwd, options?.find);
|
|
68
|
-
case "ls":
|
|
69
|
-
return createLsTool(cwd, options?.ls);
|
|
70
|
-
default:
|
|
71
|
-
throw new Error(t("Unknown tool name: {toolName}", { toolName }));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
export function createCodingToolDefinitions(cwd, options) {
|
|
75
|
-
return [
|
|
76
|
-
createReadToolDefinition(cwd, options?.read),
|
|
77
|
-
createBashToolDefinition(cwd, options?.bash),
|
|
78
|
-
createEditToolDefinition(cwd, options?.edit),
|
|
79
|
-
createWriteToolDefinition(cwd, options?.write),
|
|
80
|
-
];
|
|
81
|
-
}
|
|
82
|
-
export function createReadOnlyToolDefinitions(cwd, options) {
|
|
83
|
-
return [
|
|
84
|
-
createReadToolDefinition(cwd, options?.read),
|
|
85
|
-
createGrepToolDefinition(cwd, options?.grep),
|
|
86
|
-
createFindToolDefinition(cwd, options?.find),
|
|
87
|
-
createLsToolDefinition(cwd, options?.ls),
|
|
88
|
-
];
|
|
89
|
-
}
|
|
90
|
-
export function createAllToolDefinitions(cwd, options) {
|
|
91
|
-
return {
|
|
92
|
-
read: createReadToolDefinition(cwd, options?.read),
|
|
93
|
-
bash: createBashToolDefinition(cwd, options?.bash),
|
|
94
|
-
powershell: createPowerShellToolDefinition(cwd, options?.powershell),
|
|
95
|
-
edit: createEditToolDefinition(cwd, options?.edit),
|
|
96
|
-
write: createWriteToolDefinition(cwd, options?.write),
|
|
97
|
-
grep: createGrepToolDefinition(cwd, options?.grep),
|
|
98
|
-
find: createFindToolDefinition(cwd, options?.find),
|
|
99
|
-
ls: createLsToolDefinition(cwd, options?.ls),
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
export function createCodingTools(cwd, options) {
|
|
103
|
-
return [
|
|
104
|
-
createReadTool(cwd, options?.read),
|
|
105
|
-
createBashTool(cwd, options?.bash),
|
|
106
|
-
createEditTool(cwd, options?.edit),
|
|
107
|
-
createWriteTool(cwd, options?.write),
|
|
108
|
-
];
|
|
109
|
-
}
|
|
110
|
-
export function createReadOnlyTools(cwd, options) {
|
|
111
|
-
return [
|
|
112
|
-
createReadTool(cwd, options?.read),
|
|
113
|
-
createGrepTool(cwd, options?.grep),
|
|
114
|
-
createFindTool(cwd, options?.find),
|
|
115
|
-
createLsTool(cwd, options?.ls),
|
|
116
|
-
];
|
|
117
|
-
}
|
|
118
|
-
export function createAllTools(cwd, options) {
|
|
119
|
-
return {
|
|
120
|
-
read: createReadTool(cwd, options?.read),
|
|
121
|
-
bash: createBashTool(cwd, options?.bash),
|
|
122
|
-
powershell: createPowerShellTool(cwd, options?.powershell),
|
|
123
|
-
edit: createEditTool(cwd, options?.edit),
|
|
124
|
-
write: createWriteTool(cwd, options?.write),
|
|
125
|
-
grep: createGrepTool(cwd, options?.grep),
|
|
126
|
-
find: createFindTool(cwd, options?.find),
|
|
127
|
-
ls: createLsTool(cwd, options?.ls),
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAON,cAAc,EACd,wBAAwB,EACxB,yBAAyB,GACzB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EACd,wBAAwB,GAKxB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EACN,cAAc,EACd,wBAAwB,GAKxB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EACd,wBAAwB,GAKxB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,YAAY,EACZ,sBAAsB,GAK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,EAAE,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC;QACxC,UAAU,EAAE,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,UAAU,CAAC;QAC1D,IAAI,EAAE,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC;QACxC,KAAK,EAAE,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,CAAC;QAC3C,IAAI,EAAE,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC;QACxC,IAAI,EAAE,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC;QACxC,EAAE,EAAE,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC;KAClC,CAAC;AAAA,CACF","sourcesContent":["export {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tcreateBashTool,\n\tcreateBashToolDefinition,\n\tcreateLocalBashOperations,\n} from \"./bash.ts\";\nexport {\n\tcreateEditTool,\n\tcreateEditToolDefinition,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n} from \"./edit.ts\";\nexport { withFileMutationQueue } from \"./file-mutation-queue.ts\";\nexport {\n\tcreateFindTool,\n\tcreateFindToolDefinition,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n} from \"./find.ts\";\nexport {\n\tcreateGrepTool,\n\tcreateGrepToolDefinition,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n} from \"./grep.ts\";\nexport {\n\tcreateLsTool,\n\tcreateLsToolDefinition,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n} from \"./ls.ts\";\nexport {\n\tcreateLocalPowerShellOperations,\n\tcreatePowerShellTool,\n\tcreatePowerShellToolDefinition,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n} from \"./powershell.ts\";\nexport {\n\tcreateReadTool,\n\tcreateReadToolDefinition,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n} from \"./read.ts\";\nexport {\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\tformatSize,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n} from \"./truncate.ts\";\nexport {\n\tcreateWriteTool,\n\tcreateWriteToolDefinition,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n} from \"./write.ts\";\n\nimport type { AgentTool } from \"@agent-forge/agent-core\";\nimport type { TSchema } from \"typebox\";\nimport { t } from \"../i18n/index.ts\";\nimport { type BashToolOptions, createBashTool, createBashToolDefinition } from \"./bash.ts\";\nimport { createEditTool, createEditToolDefinition, type EditToolOptions } from \"./edit.ts\";\nimport { createFindTool, createFindToolDefinition, type FindToolOptions } from \"./find.ts\";\nimport { createGrepTool, createGrepToolDefinition, type GrepToolOptions } from \"./grep.ts\";\nimport { createLsTool, createLsToolDefinition, type LsToolOptions } from \"./ls.ts\";\nimport { createPowerShellTool, createPowerShellToolDefinition, type PowerShellToolOptions } from \"./powershell.ts\";\nimport { createReadTool, createReadToolDefinition, type ReadToolOptions } from \"./read.ts\";\nimport type { ToolDefinition } from \"./tool-definition.ts\";\nimport { createWriteTool, createWriteToolDefinition, type WriteToolOptions } from \"./write.ts\";\n\nexport type Tool = AgentTool<TSchema>;\nexport type ToolDef = ToolDefinition;\nexport type ToolName = \"read\" | \"bash\" | \"powershell\" | \"edit\" | \"write\" | \"grep\" | \"find\" | \"ls\";\nexport const allToolNames: Set<ToolName> = new Set([\n\t\"read\",\n\t\"bash\",\n\t\"powershell\",\n\t\"edit\",\n\t\"write\",\n\t\"grep\",\n\t\"find\",\n\t\"ls\",\n]);\n\nexport interface ToolsOptions {\n\tread?: ReadToolOptions;\n\tbash?: BashToolOptions;\n\tpowershell?: PowerShellToolOptions;\n\twrite?: WriteToolOptions;\n\tedit?: EditToolOptions;\n\tgrep?: GrepToolOptions;\n\tfind?: FindToolOptions;\n\tls?: LsToolOptions;\n}\n\nexport function createToolDefinition(toolName: ToolName, cwd: string, options?: ToolsOptions): ToolDef {\n\tswitch (toolName) {\n\t\tcase \"read\":\n\t\t\treturn createReadToolDefinition(cwd, options?.read);\n\t\tcase \"bash\":\n\t\t\treturn createBashToolDefinition(cwd, options?.bash);\n\t\tcase \"powershell\":\n\t\t\treturn createPowerShellToolDefinition(cwd, options?.powershell);\n\t\tcase \"edit\":\n\t\t\treturn createEditToolDefinition(cwd, options?.edit);\n\t\tcase \"write\":\n\t\t\treturn createWriteToolDefinition(cwd, options?.write);\n\t\tcase \"grep\":\n\t\t\treturn createGrepToolDefinition(cwd, options?.grep);\n\t\tcase \"find\":\n\t\t\treturn createFindToolDefinition(cwd, options?.find);\n\t\tcase \"ls\":\n\t\t\treturn createLsToolDefinition(cwd, options?.ls);\n\t\tdefault:\n\t\t\tthrow new Error(t(\"Unknown tool name: {toolName}\", { toolName }));\n\t}\n}\n\nexport function createTool(toolName: ToolName, cwd: string, options?: ToolsOptions): Tool {\n\tswitch (toolName) {\n\t\tcase \"read\":\n\t\t\treturn createReadTool(cwd, options?.read);\n\t\tcase \"bash\":\n\t\t\treturn createBashTool(cwd, options?.bash);\n\t\tcase \"powershell\":\n\t\t\treturn createPowerShellTool(cwd, options?.powershell);\n\t\tcase \"edit\":\n\t\t\treturn createEditTool(cwd, options?.edit);\n\t\tcase \"write\":\n\t\t\treturn createWriteTool(cwd, options?.write);\n\t\tcase \"grep\":\n\t\t\treturn createGrepTool(cwd, options?.grep);\n\t\tcase \"find\":\n\t\t\treturn createFindTool(cwd, options?.find);\n\t\tcase \"ls\":\n\t\t\treturn createLsTool(cwd, options?.ls);\n\t\tdefault:\n\t\t\tthrow new Error(t(\"Unknown tool name: {toolName}\", { toolName }));\n\t}\n}\n\nexport function createCodingToolDefinitions(cwd: string, options?: ToolsOptions): ToolDef[] {\n\treturn [\n\t\tcreateReadToolDefinition(cwd, options?.read),\n\t\tcreateBashToolDefinition(cwd, options?.bash),\n\t\tcreateEditToolDefinition(cwd, options?.edit),\n\t\tcreateWriteToolDefinition(cwd, options?.write),\n\t];\n}\n\nexport function createReadOnlyToolDefinitions(cwd: string, options?: ToolsOptions): ToolDef[] {\n\treturn [\n\t\tcreateReadToolDefinition(cwd, options?.read),\n\t\tcreateGrepToolDefinition(cwd, options?.grep),\n\t\tcreateFindToolDefinition(cwd, options?.find),\n\t\tcreateLsToolDefinition(cwd, options?.ls),\n\t];\n}\n\nexport function createAllToolDefinitions(cwd: string, options?: ToolsOptions): Record<ToolName, ToolDef> {\n\treturn {\n\t\tread: createReadToolDefinition(cwd, options?.read),\n\t\tbash: createBashToolDefinition(cwd, options?.bash),\n\t\tpowershell: createPowerShellToolDefinition(cwd, options?.powershell),\n\t\tedit: createEditToolDefinition(cwd, options?.edit),\n\t\twrite: createWriteToolDefinition(cwd, options?.write),\n\t\tgrep: createGrepToolDefinition(cwd, options?.grep),\n\t\tfind: createFindToolDefinition(cwd, options?.find),\n\t\tls: createLsToolDefinition(cwd, options?.ls),\n\t};\n}\n\nexport function createCodingTools(cwd: string, options?: ToolsOptions): Tool[] {\n\treturn [\n\t\tcreateReadTool(cwd, options?.read),\n\t\tcreateBashTool(cwd, options?.bash),\n\t\tcreateEditTool(cwd, options?.edit),\n\t\tcreateWriteTool(cwd, options?.write),\n\t];\n}\n\nexport function createReadOnlyTools(cwd: string, options?: ToolsOptions): Tool[] {\n\treturn [\n\t\tcreateReadTool(cwd, options?.read),\n\t\tcreateGrepTool(cwd, options?.grep),\n\t\tcreateFindTool(cwd, options?.find),\n\t\tcreateLsTool(cwd, options?.ls),\n\t];\n}\n\nexport function createAllTools(cwd: string, options?: ToolsOptions): Record<ToolName, Tool> {\n\treturn {\n\t\tread: createReadTool(cwd, options?.read),\n\t\tbash: createBashTool(cwd, options?.bash),\n\t\tpowershell: createPowerShellTool(cwd, options?.powershell),\n\t\tedit: createEditTool(cwd, options?.edit),\n\t\twrite: createWriteTool(cwd, options?.write),\n\t\tgrep: createGrepTool(cwd, options?.grep),\n\t\tfind: createFindTool(cwd, options?.find),\n\t\tls: createLsTool(cwd, options?.ls),\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAIN,yBAAyB,EACzB,0BAA0B,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EACN,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EAGV,YAAY,EACZ,YAAY,EACZ,YAAY,GACZ,MAAM,eAAe,CAAC;AAKvB,MAAM,CAAC,MAAM,YAAY,GAAkB,IAAI,GAAG,CAAC;IAClD,MAAM;IACN,MAAM;IACN,YAAY;IACZ,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,IAAI;CACJ,CAAC,CAAC","sourcesContent":["/**\n * Host-retained tool support surface (D-082 批 1, S6 工具批): the eight default\n * coding tool definitions moved to the `plugins/coding-tools` package; what\n * stays here is the shared mechanism and support face the host (and every\n * plugin through the `@agent-forge/host/*` supply keys) builds on — the\n * definition contract, render/format helpers, truncation, diff generation,\n * mutation queueing, output accumulation, path utils, bash operations, the\n * tool_search factory, and the default tool name vocabulary.\n */\nimport type { AgentTool } from \"@agent-forge/agent-core\";\nimport type { TSchema } from \"typebox\";\nimport type { ToolDefinition } from \"./tool-definition.ts\";\n\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\tcreateLocalBashOperations,\n\tcreateLocalShellOperations,\n} from \"./bash-operations.ts\";\nexport { withFileMutationQueue } from \"./file-mutation-queue.ts\";\nexport {\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\tformatSize,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n} from \"./truncate.ts\";\n\nexport type Tool = AgentTool<TSchema>;\nexport type ToolDef = ToolDefinition;\nexport type ToolName = \"read\" | \"bash\" | \"powershell\" | \"edit\" | \"write\" | \"grep\" | \"find\" | \"ls\";\nexport const allToolNames: Set<ToolName> = new Set([\n\t\"read\",\n\t\"bash\",\n\t\"powershell\",\n\t\"edit\",\n\t\"write\",\n\t\"grep\",\n\t\"find\",\n\t\"ls\",\n]);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readme-path.d.ts","sourceRoot":"","sources":["../../../src/core/tools/readme-path.ts"],"names":[],"mappings":"AAWA,4BAA4B;AAC5B,wBAAgB,aAAa,IAAI,MAAM,CAEtC","sourcesContent":["/**\n * README anchor (D-082 批 1 supply-key extraction): package-doc classification\n * needs the host package root, and the coding-tools plugin consumes the same\n * fact through the `@agent-forge/host/readme-path` supply key. The logic lived\n * inline in `src/config.ts`; it moves here so host and plugin share one truth\n * (`getPackageDir` keeps the env override, Bun-binary and dist-parent\n * resolution in `config.ts`).\n */\nimport { join, resolve } from \"node:path\";\nimport { getPackageDir } from \"../../config.ts\";\n\n/** Get path to README.md */\nexport function getReadmePath(): string {\n\treturn resolve(join(getPackageDir(), \"README.md\"));\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* README anchor (D-082 批 1 supply-key extraction): package-doc classification
|
|
3
|
+
* needs the host package root, and the coding-tools plugin consumes the same
|
|
4
|
+
* fact through the `@agent-forge/host/readme-path` supply key. The logic lived
|
|
5
|
+
* inline in `src/config.ts`; it moves here so host and plugin share one truth
|
|
6
|
+
* (`getPackageDir` keeps the env override, Bun-binary and dist-parent
|
|
7
|
+
* resolution in `config.ts`).
|
|
8
|
+
*/
|
|
9
|
+
import { join, resolve } from "node:path";
|
|
10
|
+
import { getPackageDir } from "../../config.js";
|
|
11
|
+
/** Get path to README.md */
|
|
12
|
+
export function getReadmePath() {
|
|
13
|
+
return resolve(join(getPackageDir(), "README.md"));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=readme-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readme-path.js","sourceRoot":"","sources":["../../../src/core/tools/readme-path.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,4BAA4B;AAC5B,MAAM,UAAU,aAAa,GAAW;IACvC,OAAO,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC;AAAA,CACnD","sourcesContent":["/**\n * README anchor (D-082 批 1 supply-key extraction): package-doc classification\n * needs the host package root, and the coding-tools plugin consumes the same\n * fact through the `@agent-forge/host/readme-path` supply key. The logic lived\n * inline in `src/config.ts`; it moves here so host and plugin share one truth\n * (`getPackageDir` keeps the env override, Bun-binary and dist-parent\n * resolution in `config.ts`).\n */\nimport { join, resolve } from \"node:path\";\nimport { getPackageDir } from \"../../config.ts\";\n\n/** Get path to README.md */\nexport function getReadmePath(): string {\n\treturn resolve(join(getPackageDir(), \"README.md\"));\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export { type BranchPreparation, type BranchSummaryResult, type CollectEntriesRe
|
|
|
14
14
|
export { createEmbeddedSdkBinding, createEmbeddedSdkBindingV1, type EmbeddedAgentDefinitionV1, type EmbeddedAgentInstanceV1, type EmbeddedAgentResultV1, type EmbeddedControllerLeaseV1, type EmbeddedOperationHandleV1, type EmbeddedSdkBindingV1, type EmbeddedSdkEventListenerV1, type EmbeddedSdkOptionsV1, type EmbeddedSdkSubscriptionV1, type EmbeddedSessionBindingV1, } from "./core/embedded-sdk.ts";
|
|
15
15
|
export { createEventBus, type EventBus, type EventBusController } from "./core/event-bus.ts";
|
|
16
16
|
export type { ExecOptions, ExecResult } from "./core/exec.ts";
|
|
17
|
-
export { type AgentCompositionAPI, type AgentCompositionDefinitionBinding, type AgentCompositionHostBinding, type AgentCompositionLifecycleBinding, type AgentCompositionLifecycleDispatcher, type AgentCompositionLifecycleEvent, type AgentCompositionLifecycleEventName, type AgentCompositionLifecycleTerminalStatus, AgentCompositionRuntime, type AgentCompositionRuntimeOptions, type AgentCompositionScopedHostBinding, type AgentContextCommitRequestV1, type AgentContextCommitResultV1, type AgentContextFacadeV1, type AgentContextSnapshotV1, type AgentControllerLease, type AgentControllerRole, type AgentDefinition, type AgentDefinitionDeclaration, type AgentExecutionContext, type AgentHostPrimitivesFactory, type AgentHostPrimitivesFactoryContext, type AgentHostPrimitivesV1, type AgentInstance, type AgentInstanceResult, type AgentInstanceSnapshot, type AgentInstanceStatus, type AgentOperationFacadeV1, type AgentSessionFacadeV1, type AgentTaskAdapter, type AgentTaskAPI, type AgentTaskCreateRequest, type AgentTaskHandle, type AgentTaskHost, type AgentTaskResultV1, type AgentTaskStatus, type AgentTaskWaitResult,
|
|
17
|
+
export { type AgentCompositionAPI, type AgentCompositionDefinitionBinding, type AgentCompositionHostBinding, type AgentCompositionLifecycleBinding, type AgentCompositionLifecycleDispatcher, type AgentCompositionLifecycleEvent, type AgentCompositionLifecycleEventName, type AgentCompositionLifecycleTerminalStatus, AgentCompositionRuntime, type AgentCompositionRuntimeOptions, type AgentCompositionScopedHostBinding, type AgentContextCommitRequestV1, type AgentContextCommitResultV1, type AgentContextFacadeV1, type AgentContextSnapshotV1, type AgentControllerLease, type AgentControllerRole, type AgentDefinition, type AgentDefinitionDeclaration, type AgentExecutionContext, type AgentHostPrimitivesFactory, type AgentHostPrimitivesFactoryContext, type AgentHostPrimitivesV1, type AgentInstance, type AgentInstanceResult, type AgentInstanceSnapshot, type AgentInstanceStatus, type AgentOperationFacadeV1, type AgentSessionFacadeV1, type AgentTaskAdapter, type AgentTaskAPI, type AgentTaskCreateRequest, type AgentTaskHandle, type AgentTaskHost, type AgentTaskResultV1, type AgentTaskStatus, type AgentTaskWaitResult, BOOTSTRAP_LIFECYCLE_PLUGIN_ID, CAPABILITY_CALL_EVENT_ID, CAPABILITY_CALL_EVENT_VERSION, type CapabilityAPI, type CapabilityCallEventDataV1, type CapabilityCallEventNameV1, type CapabilityCallStatusV1, type CapabilityCommandContext, type CapabilityCommandDefinition, type CapabilityCommandLink, type CapabilityCommandResult, type CapabilityDirectoryAPI, type CapabilityHandle, type CapabilityPluginFactory, type CapabilityPluginFactoryResult, type CapabilityPluginHandle, type CapabilityPluginInstance, type CapabilityPluginSyncFactory, type CapabilityPluginSyncInstance, type CapabilityProviderHandler, type CapabilityRuntime, type CompactionCommitAppliedV1, type CompactionCommitRequestV1, type CompactionCommitResultV1, type CompactionCommitRevisionConflictV1, type CompactionPolicy, type CompactionPolicyDecision, type CompactionPolicyRequest, type CompactionSummaryRequest, type CompactionSummaryResult, type ContextStrategy, type ContributionAPI, type ContributionChangeEvent, type ContributionEntry, type ContributionHandle, type ContributionLifecycle, type ContributionPoint, type ContributionPointDefinition, type CredentialAPI, type CredentialResolution, type CredentialResolveRequest, createAgentCompositionRuntime, createCapabilityRuntime, createDisposableRegistration, createEventEnvelope, DEFAULT_COMPACTION_POLICY_NAME, DEFAULT_RETRY_POLICY_NAME, type DiagnosticsAPI, type DiagnosticsSpan, type DiagnosticsSpanEnd, type DiagnosticsSpanSnapshot, type DisposableRegistration, discoverCapabilityPluginManifests, type EventEnvelope, EXPERIMENTAL_PUBLIC_API_VERSION, type ExecutionFactsV1, type ExecutionPhaseV1, type HostCapabilities, type HostMode, installBootstrapLifecycle, type LifecycleAfterCommitHandler, type LifecycleAPI, type LifecycleDeliveryFailure, type LifecycleDeliveryMode, type LifecycleDeliveryOptions, type LifecycleDeliveryReport, type LifecycleDeliverySnapshot, type LifecycleDispatchRequest, type LifecycleDispatchResult, type LifecycleEvent, type LifecycleEventDefinition, type LifecycleEventReference, LifecycleExecuteError, type LifecycleExecuteHandler, type LifecycleObserveHandler, type LifecyclePhase, type LifecycleRegistrationKind, LifecycleTransformError, type LifecycleTransformHandler, type LoggerAPI, type LoggerLevel, type LoggerRecord, loadCapabilityPlugin, loadCapabilityPluginFromManifest, loadCapabilityPluginSync, MODEL_RESPONSE_EVENT_ID, MODEL_RESPONSE_EVENT_VERSION, MODEL_STREAM_EVENT_ID, MODEL_STREAM_EVENT_VERSION, type ModelResponseEventDataV1, type ModelStreamEventDataV1, type ModelStreamEventNameV1, OPERATION_CANCEL_EVENT_ID, OPERATION_CANCEL_EVENT_VERSION, OPERATION_END_EVENT_ID, OPERATION_END_EVENT_VERSION, OPERATION_START_EVENT_ID, OPERATION_START_EVENT_VERSION, OPERATION_STEP_EVENT_ID, OPERATION_STEP_EVENT_VERSION, type OperationCancelEventDataV1, type OperationEndEventDataV1, type OperationExecutionContext, type OperationHandle, type OperationProgress, type OperationStartEventDataV1, type OperationStatus, type OperationStepEventDataV1, type OutputArtifactAPI, type OutputArtifactChunk, type OutputArtifactErrorCode, type OutputArtifactPutInput, type OutputArtifactRef, PLUGIN_DISPOSE_EVENT_ID, PLUGIN_DISPOSE_EVENT_VERSION, PLUGIN_READY_EVENT_ID, PLUGIN_READY_EVENT_VERSION, type PluginAgentRole, type PluginCapabilityDeclaration, type PluginCapabilityRequirement, type PluginConfig, type PluginConfigValue, type PluginDisposeEventDataV1, type PluginManifest, type PluginReadyEventDataV1, type PolicyInvocationContextV1, type ProviderHeaderTransform, type ProviderHeaderTransformRequest, parseCapabilityPluginManifest, type RetryPolicy, type RetryPolicyDecision, type RetryPolicyRequest, type RetryScheduleV1, type RuntimeInspectorAPI, type RuntimeInspectorErrorSnapshot, type RuntimeInspectorLifecycleDeliveryFailureSnapshot, type RuntimeInspectorLifecycleDeliveryReportSnapshot, type RuntimeInspectorSnapshot, resolvePluginCapabilityOrder, SESSION_COMPACTION_COMMIT_EVENT_ID, SESSION_COMPACTION_COMMIT_EVENT_VERSION, SESSION_CONTEXT_REPLACED_EVENT_ID, SESSION_CONTEXT_REPLACED_EVENT_VERSION, SESSION_RELOAD_EVENT_ID, SESSION_RELOAD_EVENT_VERSION, type SessionAPI, type SessionCompactionCommitEventDataV1, type SessionContextReplacedEventDataV1, type SessionEntryView, type SessionExportArtifact, type SessionExportRequest, type SessionReloadEventDataV1, type SkillDefinition, type StateAPI, type StateChange, type StateEntry, type StateSetOptions, SUMMARY_MODEL_INVOCATION_ERROR_CODES, type SummaryModelFactsV1, type SummaryModelInvocationRequestV1, type SummaryModelInvocationResultV1, type SummaryModelInvocationV1, TOOL_CALL_EVENT_ID, TOOL_CALL_EVENT_VERSION, TOOL_COMMIT_EVENT_ID, TOOL_COMMIT_EVENT_VERSION, TOOL_EXECUTE_EVENT_ID, TOOL_EXECUTE_EVENT_VERSION, TOOL_RESULT_EVENT_ID, TOOL_RESULT_EVENT_VERSION, TOOL_RESULT_RAW_EVENT_ID, TOOL_RESULT_RAW_EVENT_VERSION, TOOL_RESULT_TRANSFORM_EVENT_ID, TOOL_RESULT_TRANSFORM_EVENT_VERSION, type ToolCallEventDataV1, type ToolCommitEventDataV1, type ToolExecuteEventDataV1, type ToolResultEventDataV1, type ToolResultRawEventDataV1, type ToolResultTransformEventDataV1, validateCapabilityCallEventDataV1, validateExecutionFactsV1, validateModelResponseEventDataV1, validateModelStreamEventDataV1, validateOperationCancelEventDataV1, validateOperationEndEventDataV1, validateOperationStartEventDataV1, validateOperationStepEventDataV1, validatePluginDisposeEventDataV1, validatePluginReadyEventDataV1, validateRetryScheduleV1, validateSessionCompactionCommitEventDataV1, validateSessionContextReplacedEventDataV1, validateSessionReloadEventDataV1, validateToolCallEventDataV1, validateToolCommitEventDataV1, validateToolExecuteEventDataV1, validateToolResultEventDataV1, validateToolResultRawEventDataV1, validateToolResultTransformEventDataV1, } from "./core/extensions/index.ts";
|
|
18
18
|
export type { ContextUsage } from "./core/extensions/public-api.ts";
|
|
19
19
|
export { detachedSessionSnapshot } from "./core/extensions/public-api.ts";
|
|
20
20
|
export type { CodingAgentFacadeV1 } from "./core/facade/coding-agent-facade.ts";
|
|
@@ -29,7 +29,7 @@ export type { PackageManager, PathMetadata, ProgressCallback, ProgressEvent, Res
|
|
|
29
29
|
export { DefaultPackageManager } from "./core/package-manager.ts";
|
|
30
30
|
export type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from "./core/resource-loader.ts";
|
|
31
31
|
export { DefaultResourceLoader, loadProjectContextFiles } from "./core/resource-loader.ts";
|
|
32
|
-
export { AgentSessionRuntime, type AgentSessionRuntimeDiagnostic, type AgentSessionServices, type CreateAgentSessionFromServicesOptions, type CreateAgentSessionOptions, type CreateAgentSessionResult, type CreateAgentSessionRuntimeFactory, type CreateAgentSessionRuntimeResult, type CreateAgentSessionServicesOptions, type CreateStableAgentSessionResult, type CreateStableAgentSessionRuntimeResult, createAgentSession, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices,
|
|
32
|
+
export { AgentSessionRuntime, type AgentSessionRuntimeDiagnostic, type AgentSessionServices, type CreateAgentSessionFromServicesOptions, type CreateAgentSessionOptions, type CreateAgentSessionResult, type CreateAgentSessionRuntimeFactory, type CreateAgentSessionRuntimeResult, type CreateAgentSessionServicesOptions, type CreateStableAgentSessionResult, type CreateStableAgentSessionRuntimeResult, createAgentSession, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createStableAgentSession, createStableAgentSessionRuntime, type PromptTemplate, } from "./core/sdk.ts";
|
|
33
33
|
export { type BranchSummaryEntry, buildContextEntries, buildSessionContext, type CompactionEntry, CURRENT_SESSION_VERSION, type CustomEntry, type CustomMessageEntry, type FileEntry, getLatestCompactionEntry, type ModelChangeEntry, migrateSessionEntries, type NewSessionOptions, parseSessionEntries, type SessionContext, type SessionEntry, type SessionEntryBase, type SessionHeader, type SessionInfo, type SessionInfoEntry, SessionManager, type SessionMessageEntry, type SessionTreeNode, sessionEntryToContextMessages, type ThinkingLevelChangeEntry, } from "./core/session-manager.ts";
|
|
34
34
|
export { FileSessionStorageProvider, SessionHeaderScanLimitError, type SessionStorageProvider, type SessionWriteGuardV1, } from "./core/session-storage.ts";
|
|
35
35
|
export { type CompactionSettings, type FullscreenExitOutput, type ImageSettings, type PackageSource, type RetrySettings, SettingsManager, type SettingsManagerCreateOptions, type TuiMode, } from "./core/settings-manager.ts";
|
|
@@ -39,7 +39,7 @@ export type { SourceInfo } from "./core/source-info.ts";
|
|
|
39
39
|
export { createSyntheticSourceInfo } from "./core/source-info.ts";
|
|
40
40
|
export type { BuildSystemPromptOptions } from "./core/system-prompt.ts";
|
|
41
41
|
export { type EditDiffResult, generateDiffString, generateUnifiedPatch } from "./core/tools/edit-diff.ts";
|
|
42
|
-
export { type BashOperations, type BashSpawnContext, type BashSpawnHook,
|
|
42
|
+
export { type BashOperations, type BashSpawnContext, type BashSpawnHook, createLocalBashOperations, createLocalShellOperations, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize, type TruncationOptions, type TruncationResult, truncateHead, truncateLine, truncateTail, withFileMutationQueue, } from "./core/tools/index.ts";
|
|
43
43
|
export type { ToolDefinition, ToolExecuteContext, ToolInfo, ToolRenderContext, ToolRenderResultOptions, } from "./core/tools/tool-definition.ts";
|
|
44
44
|
export { defineTool } from "./core/tools/tool-definition.ts";
|
|
45
45
|
export { createDurableService, createFileDurableStoreBackend, type DurableArtifactRecordV1, type DurableOperationRecordV1, type DurableReplayDiagnosticsV1, type DurableServiceErrorCodeV1, DurableServiceErrorV1, type DurableServiceOptionsV1, type DurableServiceV1, type DurableSessionRecordV1, type DurableSnapshotV1, type DurableStoreBackend, type DurableStoreLoadResultV1, type DurableStoreOperationV1, type DurableWriterClaimV1, type DurableWriterRecoveryV1, durableLogPath, } from "./durable/durable-service.ts";
|
|
@@ -62,30 +62,14 @@ export { getLanguageFromPath, getMarkdownTheme, getSelectListTheme, getSettingsL
|
|
|
62
62
|
export * as PluginEcosystemV1 from "./plugins/ecosystem/index.ts";
|
|
63
63
|
export type { HostFactsV1 } from "./plugins/ecosystem/types.ts";
|
|
64
64
|
export { createIntegrityAdapter, type IntegrityAdapterV1, type ManifestExpectationV1, type ManifestVerdictV1, type SealedManifestV1, } from "./plugins/integrity-adapter.ts";
|
|
65
|
-
export { createMcpHttpTransport, type McpHttpTransportEventV1, type McpHttpTransportOptionsV1, type McpHttpTransportV1, type McpRequestOptions, } from "./plugins/mcp-http.ts";
|
|
66
65
|
export { createPluginHost, type HostedPluginV1, type PluginHostErrorV1, type PluginHostResourceV1, type PluginHostStateV1, type PluginHostV1, } from "./plugins/plugin-host.ts";
|
|
67
66
|
export { createPluginSupervisor, type PluginHealthV1, type PluginSupervisorV1, type SupervisorEntryV1, type SupervisorEventV1, type SupervisorPolicyV1, } from "./plugins/plugin-supervisor.ts";
|
|
68
|
-
export { type ChildAgentFacadeV1, type ChildAgentResultRefV1, type ChildAgentTurnV1, createChildAgentFacade, } from "./profile/child-facade.ts";
|
|
69
|
-
export { type AvailableCapabilityV1, type MissingDependencyV1, type PluginWiringResultV1, type ProfileDependencyWiringV1, wireProfileDependencies, } from "./profile/dependency-wiring.ts";
|
|
70
|
-
export { buildRestartReport, type DomainRestartRecordV1, type DomainRestartReportV1, type PlanBranchRecoveryEntryV1, type PlanBranchRecoveryReportV1, recoverPlansForBranch, } from "./profile/domain-recovery.ts";
|
|
71
|
-
export { createFirstBatchRoleSlices, FIRST_BATCH_ROLES, type FirstBatchRoleV1 } from "./profile/first-roles.ts";
|
|
72
|
-
export { createGoalPlugin, type GoalPluginV1, type GoalStatusV1, type GoalV1, } from "./profile/goal-plugin.ts";
|
|
73
67
|
export { buildProfileIdentityV1, type ProfileIdentityV1, profileIdentitiesCompatible, type ResolvedPluginManifestV1, stableJsonDigest, } from "./profile/identity.ts";
|
|
74
68
|
export { createProfileLock, type ProfileLockReplaceResultV1, type ProfileLockV1, type ProfileLockVerificationV1, replaceProfileLock, verifyProfileLock, } from "./profile/lock.ts";
|
|
75
|
-
export { createPlanPlugin, type PlanPluginV1, type PlanStatusV1, type PlanStepV1, type PlanV1, } from "./profile/plan-plugin.ts";
|
|
76
69
|
export { type BuiltinPluginManifestOverridesV1, type BuiltinPluginProfileIdV1, type BuiltinPluginProfileResolutionV1, type BuiltinPluginProfileV1, listBuiltinPluginManifestsV1, listBuiltinPluginProfilesV1, resolveBuiltinPluginProfileV1, } from "./profile/plugin-profiles.ts";
|
|
77
|
-
export { createPolicyManifestBuilder, type PolicyChangeRecordV1, type PolicyDeclarationV1, type PolicyKindV1, type PolicyManifestBuilderV1, type PolicyManifestV1, } from "./profile/policy-manifest.ts";
|
|
78
70
|
export { assembleProfile, type PluginReplacementRecordV1, type ProfileAssemblyResultV1, type ProfileAssemblyV1, type ProfileReplacementResultV1, replaceProfilePlugin, type VerifiedToolPluginV1, } from "./profile/profile-assembly.ts";
|
|
79
71
|
export { createProfileMigrationPolicy, type ProfileMigrationPlanV1, type ProfileMigrationPolicyV1, type ProfileMigrationResultV1, } from "./profile/profile-migration.ts";
|
|
80
72
|
export { createProfileRegistry, type ProfileRegistryV1, type ProfileResolutionV1, type ProfileVersionRangeV1, type RegistryProfileEntryV1, type RegistrySourceV1, } from "./profile/profile-registry.ts";
|
|
81
|
-
export { assembleRoles, type MountedRoleSummaryV1, type RegisteredRoleMetaV1, type RoleAssemblyDiagnosticsV1, type RoleAssemblyV1, } from "./profile/role-assembly.ts";
|
|
82
|
-
export { createRoleCatalog, type RoleCapabilityDependencyV1, type RoleCatalogV1, type RoleIOSchemaRefV1, type RoleMetadataV1, type RoleWritableScopeV1, validateRoleMetadataV1, } from "./profile/role-catalog.ts";
|
|
83
|
-
export { createRoleOrchestrator, DEFAULT_ROLE_AGGREGATION_LIMIT_BYTES, type RoleCompletionCheckV1, type RoleCompletionEvaluatorV1, type RoleOrchestrationEntryV1, type RoleOrchestrationResultV1, type RoleOrchestrationStatusV1, type RoleOrchestratorOptionsV1, type RoleOrchestratorRunRequestV1, type RoleOrchestratorV1, } from "./profile/role-orchestrator.ts";
|
|
84
|
-
export { createRoleRunner, type RoleCapabilityCheckV1, type RoleMissingCapabilityV1, type RoleRunCallbackV1, type RoleRunnerInputV1, type RoleRunnerOptionsV1, type RoleRunnerResultV1, type RoleRunnerV1, type RoleRunResolverV1, runFirstBatchRole, } from "./profile/role-runner.ts";
|
|
85
|
-
export { createRootAgentFacade, type RootAgentFacadeTurnResultV1, type RootAgentFacadeV1, } from "./profile/root-facade.ts";
|
|
86
|
-
export { createSkillDiscoveryWiring, type DiscoveredItemV1, type DiscoverySourceKindV1, type DiscoveryVersionConflictV1, type DiscoveryWiringV1, } from "./profile/skill-discovery-wiring.ts";
|
|
87
|
-
export { createTransitionStore, type TransitionEvidenceRefV1, type TransitionInputV1, type TransitionRecordV1, type TransitionResultV1, type TransitionStoreV1, } from "./profile/state-store.ts";
|
|
88
|
-
export { createTodoPlugin, type TodoPluginV1, type TodoStatusV1, type TodoV1, } from "./profile/todo-plugin.ts";
|
|
89
73
|
export { isBuiltinSuiteId } from "./profiles/builtin-suites.ts";
|
|
90
74
|
export { buildResolvedAgentProfileV1, type PluginProfileResolutionSummaryV1, type ResolvedAgentProfileV1, type ResolvedProfileDiagnosticV1, } from "./profiles/resolved-agent-profile.ts";
|
|
91
75
|
export { clearDanglingSuiteSettings, createSuite, deleteSuite, findSuiteSessionRefs, resetSuite, SUITE_DELETE_CONFIRM_TOKEN, type SuiteCreateOptions, type SuiteCreateResult, type SuiteDeleteOptions, type SuiteDeleteResult, SuiteLifecycleError, type SuiteLifecycleOperation, type SuiteResetPlan, type SuiteSessionRef, type SuiteSettingsCleanup, } from "./profiles/suite-lifecycle.ts";
|