@ai-agent-forge/agent-forge 0.88.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 +29 -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 +61 -117
- 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 +2 -2
- 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/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 +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 +1 -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.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 -13
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +56 -34
- 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/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/sdk.d.ts +10 -3
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +263 -77
- package/dist/core/sdk.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/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/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/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/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/{dist/plugins → bundled-plugins/mcp-http/dist}/mcp-http.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coding-agent-facade.d.ts","sourceRoot":"","sources":["../../../src/core/facade/coding-agent-facade.ts"],"names":[],"mappings":"AAAA;;;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AAc,IAAI,MAAM,GAAG,SAAS,CAAC;IACrC;;;;OAIG;IACH,eAAe,IAAI,mBAAmB,CAAC;IACvC,4EAA4E;IAC5E,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IACtE,0EAA0E;IAC1E,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IACrE;;;;OAIG;IACH,mBAAmB,IAAI,gBAAgB,CAAC;IACxC;;;;;OAKG;IACH,iBAAiB,IAAI,YAAY,EAAE,CAAC;IAGpC;;;;;OAKG;IACH,mBAAmB,IAAI,gBAAgB,CAAC;IAIxC,uDAAuD;IACvD,mBAAmB,IAAI,SAAS,MAAM,EAAE,CAAC;IACzC,uDAAuD;IACvD,mBAAmB,IAAI,SAAS,MAAM,EAAE,CAAC;IAIzC,8CAA8C;IAC9C,eAAe,IAAI,MAAM,CAAC;IAC1B,+CAA+C;IAC/C,aAAa,IAAI,OAAO,CAAC;IACzB,iDAAiD;IACjD,aAAa,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAG3C,2CAA2C;IAC3C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAED,+FAA+F;AAC/F,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,YAAY,GAAG,mBAAmB,CAkGlF","sourcesContent":["/**\n * Stable facade v1: a read-only mirror plus pass-through run control and\n * session write paths over one AgentSession.\n *\n * Design: docs/design/稳定门面统一入口设计.md (§2.5 阶段 0 实际面, §2.6 slice 1\n * 读面, §2.7 slice 2 读面, §2.8 阶段 2 写面, §2.9 阶段 3 RPC 面, §3 API 面 v1,\n * §4 阶段 0/1/2/3). Every member is a pure delegate onto the wrapped\n * AgentSession or its existing curated surfaces (`getSessionAPI()`, `host`).\n * No new behavior, no policy, no state of its own. Product entry points\n * (TUI/CLI/RPC/Embedded) migrate onto this surface in later phases;\n * AgentSession stays the internal adapter behind it.\n *\n * Scope: in-package stable surface for those product entry points. It is not\n * exported from the package root and is not a cross-package public contract.\n */\n\nimport type { AgentState, ThinkingLevel } from \"@agent-forge/agent-core\";\nimport type { AuthCheck, AuthResult, ImageContent } from \"@agent-forge/ai\";\nimport type { Api, Model } from \"@agent-forge/ai/compat\";\nimport type { ModelCatalogRuntime } from \"../../modes/interactive/model-catalog-refresh.ts\";\nimport { readSessionSuiteBinding } from \"../../profiles/suite-loader.ts\";\nimport type {\n\tAgentSession,\n\tAgentSessionEventListener,\n\tModelCycleResult,\n\tModelMutationOptions,\n\tPromptOptions,\n\tQueuedInputDisposition,\n\tSessionStats,\n} from \"../agent-session.ts\";\nimport type { CompactionCancelledResult } from \"../agent-session-compaction.ts\";\nimport type { ForkableUserMessage } from \"../agent-session-projection.ts\";\nimport type { BashResult } from \"../bash-executor.ts\";\nimport type { ModelPriceSource } from \"../cache-stats.ts\";\nimport type { CompactionResult } from \"../compaction/index.ts\";\nimport type { ResourceDiagnostic } from \"../diagnostics.ts\";\nimport type { ContextUsage, PromptOutcome, SessionAPI } from \"../extensions/public-api.ts\";\nimport type { InputSource } from \"../input-source.ts\";\nimport type { ModelRuntime } from \"../model-runtime.ts\";\nimport type { PromptTemplate } from \"../prompt-templates.ts\";\nimport type { ThemeMetaV1 } from \"../resource-loader.ts\";\nimport type { BranchSummaryEntry, SessionEntry, SessionHeader, SessionTreeNode } from \"../session-manager.ts\";\nimport type { Skill } from \"../skills.ts\";\nimport type { BashOperations } from \"../tools/bash.ts\";\nimport type { ToolDefinition } from \"../tools/tool-definition.ts\";\n\n/** Prompt options for the facade. Identical to AgentSession PromptOptions. */\nexport type CodingAgentFacadePromptOptionsV1 = PromptOptions;\n\n/**\n * Narrow credential/provider auth projection (D-048): the TUI auth surface\n * only. Covers exactly the seven methods the auth host consumes\n * (`getProviders`/`getProvider`/`getProviderAuthStatus`/`isUsingOAuth`/\n * `listCredentials`/`login`/`logout`); the full ModelRuntime never leaks to\n * the host. The credential-management CapabilityAPI semantics question stays\n * open (D-047 裁决 3); this narrows the TUI host path without deciding it.\n */\nexport type ModelAuthRuntime = Pick<\n\tModelRuntime,\n\t\"getProviders\" | \"getProvider\" | \"getProviderAuthStatus\" | \"isUsingOAuth\" | \"listCredentials\" | \"login\" | \"logout\"\n>;\n\n/**\n * Stable facade v1: the consumption surface for product hosts, versioned per\n * repo convention (EmbeddedSdkBindingV1 precedent). Members are pass-throughs\n * onto the wrapped AgentSession; new members must extend the facade design\n * doc first (门面腐化 guard, 设计 §6).\n */\nexport interface CodingAgentFacadeV1 {\n\treadonly version: 1;\n\n\t// --- Run control ---\n\t/**\n\t * Delegates to AgentSession.prompt(). The full PromptOptions pass through,\n\t * including the internal RPC preflight hook (`preflightResult`) that RPC\n\t * mode uses to observe prompt acceptance (阶段 3, 设计 §2.9).\n\t */\n\tprompt(text: string, options?: CodingAgentFacadePromptOptionsV1): Promise<PromptOutcome>;\n\t/** Delegates to AgentSession.steer(). */\n\tsteer(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.abort(); `cancelAgentTasks: false` stops the\n\t * current turn without cancelling background agent tasks (设计 子代理运行时\n\t * §4.2 中断分级,2026-10-02 — the TUI Esc path always passes false). */\n\tabort(options?: { cancelAgentTasks?: boolean }): Promise<void>;\n\t/** Delegates to AgentSession.abortAgentTasks(): cancel every background agent\n\t * task without aborting the current turn (/stop-agents execution face). */\n\tabortAgentTasks(): void;\n\t/** Delegates to AgentSession.getActiveAgentTaskCount(). */\n\tgetActiveAgentTaskCount(): number;\n\t/** Delegates to AgentSession.waitForIdle(). */\n\twaitForIdle(): Promise<void>;\n\n\t// --- Session write paths ---\n\t/** Delegates to AgentSession.compact(). */\n\tcompact(customInstructions?: string): Promise<CompactionResult | CompactionCancelledResult>;\n\t/** Delegates to AgentSession.navigateTree(). */\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },\n\t): Promise<{ editorText?: string; cancelled: boolean; aborted?: boolean; summaryEntry?: BranchSummaryEntry }>;\n\t/** Delegates to AgentSession.reload(). */\n\treload(options?: { beforeSessionStart?: () => void | Promise<void> }): Promise<void>;\n\t/** Delegates to AgentSession.setModel(). */\n\tsetModel(model: Model<Api>, options?: ModelMutationOptions): Promise<void>;\n\t/** Delegates to AgentSession.setThinkingLevel(). */\n\tsetThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): void;\n\t/** Delegates to AgentSession.setActiveToolsByName(). */\n\tsetActiveToolsByName(toolNames: string[]): void;\n\t/**\n\t * Queued-message read view, composed from AgentSession.getSteeringMessages()\n\t * and AgentSession.getFollowUpMessages(). AgentSession has no single\n\t * getQueuedMessages(); the shape mirrors clearQueue()'s return value.\n\t */\n\tgetQueuedMessages(): { steering: readonly string[]; followUp: readonly string[] };\n\t/** Delegates to AgentSession.clearQueue(). */\n\tclearQueue(): { steering: string[]; followUp: string[] };\n\t/** Delegates to AgentSession.reorderQueuedMessages(): indices refer to the\n\t * queued display lists; a stale or out-of-bounds move returns false. */\n\treorderQueuedMessages(queue: \"steer\" | \"followUp\", from: number, to: number): boolean;\n\t/** Delegates to AgentSession.removeQueuedMessageAt(): removes by queued\n\t * display list index; a stale index returns null. */\n\tremoveQueuedMessageAt(queue: \"steer\" | \"followUp\", index: number): string | null;\n\t/** Delegates to AgentSession.recordSuiteMismatch(). */\n\trecordSuiteMismatch(originalSuiteId: string, currentSuiteId: string): void;\n\t/** Delegates to AgentSession.getSessionAPI(). */\n\tgetSessionAPI(): SessionAPI;\n\n\t// --- Read-only mirror ---\n\t/** Delegates to AgentSession.isIdle. */\n\tisIdle(): boolean;\n\t/** Mirrors AgentSession.state verbatim (phase 0; a projected state view is a later phase, 设计 §3). */\n\tgetState(): AgentState;\n\t/** Delegates to AgentSession.model. */\n\tgetModel(): Model<Api> | undefined;\n\t/** Delegates to AgentSession.getActiveToolNames(). */\n\tgetToolNames(): string[];\n\t/** Delegates to AgentSession.sessionId (via SessionAPI.getSessionId semantics). */\n\tgetSessionId(): string;\n\t/**\n\t * Suite id from the session-suite binding entry (设计 §10.1), read through\n\t * SessionAPI.getBranchEntries(). Undefined when the session carries no\n\t * suite binding.\n\t */\n\tgetSuiteId(): string | undefined;\n\t/** Delegates to AgentSession.sessionManager.getHeader(). SessionManager itself never leaks. */\n\tgetHeader(): SessionHeader | null;\n\t/** Delegates to AgentSession.subscribe(). Event types pass through verbatim (设计 §3). */\n\tsubscribe(listener: AgentSessionEventListener): () => void;\n\t/**\n\t * Invoked after each raw agent event is delivered to session processing;\n\t * the listener is awaited serially by the agent loop and participates in\n\t * run settlement. Exists for stdout backpressure pacing (D-046); the raw\n\t * event payload and abort signal are deliberately not exposed.\n\t */\n\tsubscribeRawEventGate(listener: () => void | Promise<void>): () => void;\n\n\t// --- Read surface (phase 1 slice 1, TUI display/selector reads, 设计 §2.6) ---\n\t/** Delegates to AgentSession.sessionName (which reads sessionManager.getSessionName()). */\n\tgetSessionName(): string | undefined;\n\t/** Delegates to AgentSession.isCompacting: a compaction or branch summarization is running (session level). */\n\tisCompacting(): boolean;\n\t/**\n\t * Delegates to AgentSession.isStreaming: an agent run is active at the\n\t * session level. Distinct from AgentState.isStreaming (agent-level stream\n\t * flag); do not interchange the two.\n\t */\n\tisStreaming(): boolean;\n\t/** Delegates to AgentSession.getContextUsage(). */\n\tgetContextUsage(): ContextUsage | undefined;\n\t/** Delegates to AgentSession.systemPrompt (effective prompt, including per-turn extension modifications). */\n\tgetSystemPrompt(): string;\n\t/** Delegates to AgentSession.scopedModels. Read view only; setScopedModels stays a phase 2 write path. */\n\tgetScopedModels(): ReadonlyArray<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>;\n\t/** Delegates to SessionManager.getTree() on the wrapped session. SessionManager itself never leaks. */\n\tgetTree(): SessionTreeNode[];\n\t/** Delegates to SessionManager.getLeafId() on the wrapped session. SessionManager itself never leaks. */\n\tgetLeafId(): string | null;\n\n\t// --- Read surface (phase 1 slice 2, TUI display/selector cluster convergence, 设计 §2.7) ---\n\t/** Delegates to AgentSession.promptTemplates (file-based prompt templates). */\n\tgetPromptTemplates(): ReadonlyArray<PromptTemplate>;\n\t/** Delegates to AgentSession.getToolDefinition(name): the registered tool definition by name, for diagnostics/rendering. */\n\tgetToolDefinition(name: string): ToolDefinition | undefined;\n\t/** Delegates to SessionManager.getCwd() on the wrapped session; identical to host.cwd. SessionManager itself never leaks. */\n\tgetCwd(): string;\n\t/** Delegates to SessionManager.getEntries() on the wrapped session; identical to host.entries. SessionManager itself never leaks. */\n\tgetEntries(): SessionEntry[];\n\t/** Delegates to AgentSession.pendingMessageCount: queued steering + follow-up message count. */\n\tgetPendingMessageCount(): number;\n\n\t// --- Write surface (phase 2, TUI write path convergence, 设计 §2.8) ---\n\t/** Delegates to AgentSession.followUp(). */\n\tfollowUp(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.setScopedModels(). */\n\tsetScopedModels(scopedModels: Array<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>): void;\n\t/** Delegates to AgentSession.cycleModel(). */\n\tcycleModel(\n\t\tdirection?: \"forward\" | \"backward\",\n\t\toptions?: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\t/** Delegates to AgentSession.cycleThinkingLevel(). */\n\tcycleThinkingLevel(options?: ModelMutationOptions): ThinkingLevel | undefined;\n\t/** Delegates to AgentSession.setSteeringMode(). */\n\tsetSteeringMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setFollowUpMode(). */\n\tsetFollowUpMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setSessionName(). */\n\tsetSessionName(name: string): void;\n\t/** Delegates to AgentSession.abortBash(). */\n\tabortBash(): void;\n\t/** Delegates to AgentSession.abortCompaction(). */\n\tabortCompaction(): void;\n\t/** Delegates to AgentSession.abortRetry(). */\n\tabortRetry(): void;\n\t/** Delegates to AgentSession.abortBranchSummary(). */\n\tabortBranchSummary(): void;\n\t/** Delegates to AgentSession.captureBashEpoch(). */\n\tcaptureBashEpoch(): number;\n\t/** Delegates to AgentSession.isBashEpochCurrent(). */\n\tisBashEpochCurrent(epoch: number): boolean;\n\t/** Delegates to AgentSession.emitUserBash(): dispatches the user.bash lifecycle facts. */\n\temitUserBash(excludeFromContext: boolean): void;\n\t/** Delegates to AgentSession.executeBash(). */\n\texecuteBash(\n\t\tcommand: string,\n\t\tonChunk?: (chunk: string) => void,\n\t\toptions?: { excludeFromContext?: boolean; id?: string; operations?: BashOperations },\n\t): Promise<BashResult>;\n\t/** Delegates to AgentSession.recordBashResult(). */\n\trecordBashResult(\n\t\tcommand: string,\n\t\tresult: BashResult,\n\t\toptions?: { excludeFromContext?: boolean; epoch?: number },\n\t): void;\n\n\t// --- Read surface (phase 3, RPC host state reads, 设计 §2.9) ---\n\t/** Delegates to AgentSession.thinkingLevel. */\n\tgetThinkingLevel(): ThinkingLevel;\n\t/** Delegates to AgentSession.steeringMode. */\n\tgetSteeringMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.followUpMode. */\n\tgetFollowUpMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.sessionFile. */\n\tgetSessionFile(): string | undefined;\n\t/** Delegates to AgentSession.getAvailableThinkingLevels(). */\n\tgetAvailableThinkingLevels(): ThinkingLevel[];\n\t/** Delegates to AgentSession.getUserMessagesForForking(). */\n\tgetUserMessagesForForking(): ForkableUserMessage[];\n\t/** Delegates to AgentSession.getLastAssistantText(). */\n\tgetLastAssistantText(): string | undefined;\n\t/** Delegates to AgentSession.getSessionStats(). */\n\tgetSessionStats(): SessionStats;\n\n\t// --- Write surface (phase 3, RPC host writes, 设计 §2.9) ---\n\t/** Delegates to AgentSession.exportToHtml(), including the themeName option. */\n\texportToHtml(outputPath?: string, options?: { themeName?: string }): Promise<string>;\n\n\t// --- Session write path (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Delegates to SessionManager.appendLabelChange() on the wrapped session.\n\t * TUI tree selector label rename write point; SessionAPI has no label write.\n\t */\n\tappendLabelChange(entryId: string, label: string | undefined): string;\n\n\t// --- Resource read surface (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Clean read projections over the wrapped session's resource loader. Skills/\n\t * prompts/agents-files results pass through verbatim; themes and extensions\n\t * are the metadata projections (themes as ThemeMetaV1 without the modes\n\t * Theme class; loader registration maps and the shared runtime never\n\t * leak). Guard reason: TUI startup listing/autocomplete/diagnostics\n\t * consume these read points directly; SessionAPI/CapabilityAPI are\n\t * capability-side contracts with no host display projections.\n\t */\n\t/** Delegates to ResourceLoader.getSkills() on the wrapped session. */\n\tgetSkills(): { skills: Skill[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getPrompts() on the wrapped session. */\n\tgetPrompts(): { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getThemes() on the wrapped session. */\n\tgetThemes(): { themes: ThemeMetaV1[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getAgentsFiles() on the wrapped session. */\n\tgetAgentsFiles(): { agentsFiles: Array<{ path: string; content: string }> };\n\t/** Delegates to ResourceLoader.getSystemPromptSource() on the wrapped session. */\n\tgetSystemPromptSource(): { path: string } | undefined;\n\t/** Delegates to ResourceLoader.getAppendSystemPromptSources() on the wrapped session. */\n\tgetAppendSystemPromptSources(): Array<{ path: string }>;\n\n\t// --- Model/catalog/context read surface (v1 修订, D-047: TUI direct session reads zeroed) ---\n\t/** Delegates to ModelRuntime.getAvailableSnapshot() on the wrapped session (D-047); ModelRuntime itself never leaks. */\n\tgetAvailableModels(): readonly Model<Api>[];\n\t/** Delegates to ModelRuntime.isUsingSubscription() on the wrapped session (D-047). */\n\tisUsingSubscription(providerId: string): boolean;\n\t/** Delegates to ModelRuntime.getError() on the wrapped session (D-047). */\n\tgetModelsError(): string | undefined;\n\t/**\n\t * Narrow `ModelCatalogRuntime` projection of the wrapped session's\n\t * ModelRuntime for the shared catalog-refresh coordinator (D-047). A\n\t * projection, not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelCatalog(): ModelCatalogRuntime;\n\t/** Delegates to ModelRuntime.checkAuth() on the wrapped session (D-047). */\n\tcheckProviderAuth(providerId: string): Promise<AuthCheck | undefined>;\n\t/** Delegates to ModelRuntime.getAuth() on the wrapped session (D-047). */\n\tgetProviderAuth(providerId: string): Promise<AuthResult | undefined>;\n\t/**\n\t * Narrow `ModelPriceSource` projection of the wrapped session's\n\t * ModelRuntime for the cache-stats pure functions (D-047). A projection,\n\t * not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelPriceSource(): ModelPriceSource;\n\t/**\n\t * Delegates to SessionManager.buildContextEntries() on the wrapped session\n\t * (D-047; delegation restored by the D-047 regression fix — the\n\t * incrementally maintained byId index is required for correct context\n\t * paths after a compaction commit). SessionManager itself never leaks.\n\t */\n\tgetContextEntries(): SessionEntry[];\n\n\t// --- Credential/provider auth read surface (v1 修订, D-048: TUI auth host path) ---\n\t/**\n\t * Narrow `ModelAuthRuntime` projection of the wrapped session's ModelRuntime\n\t * for the TUI auth surface (D-048). A projection, not a wrapper: the full\n\t * runtime never leaks. The credential-management CapabilityAPI semantics\n\t * question stays open (D-047 裁决 3); this only narrows the TUI host path.\n\t */\n\tgetModelAuthRuntime(): ModelAuthRuntime;\n\n\t// --- Session stats/text read surface (v1 修订, B-S2b③-S3a: TUI direct\n\t// session stats/text read cluster convergence) ---\n\t/** Delegates to AgentSession.getSteeringMessages(). */\n\tgetSteeringMessages(): readonly string[];\n\t/** Delegates to AgentSession.getFollowUpMessages(). */\n\tgetFollowUpMessages(): readonly string[];\n\n\t// --- Status/settings + export read surface (v1 修订, B-S2b③-S3b+c: TUI\n\t// status/settings/export cluster direct session read convergence) ---\n\t/** Delegates to AgentSession.retryAttempt. */\n\tgetRetryAttempt(): number;\n\t/** Delegates to AgentSession.isBashRunning. */\n\tisBashRunning(): boolean;\n\t/** Delegates to AgentSession.exportToJsonl(). */\n\texportToJsonl(outputPath?: string): string;\n\n\t// --- Lifecycle ---\n\t/** Delegates to AgentSession.dispose(). */\n\tdispose(): Promise<void>;\n}\n\n/** Creates a facade v1 view over one AgentSession. Pure wrapper: holds no state of its own. */\nexport function createCodingAgentFacade(session: AgentSession): CodingAgentFacadeV1 {\n\treturn {\n\t\tversion: 1,\n\t\tprompt: (text, options) => session.prompt(text, options),\n\t\tsteer: (text, images, options) => session.steer(text, images, options),\n\t\tabort: (options) => session.abort(undefined, options),\n\t\tabortAgentTasks: () => session.abortAgentTasks(),\n\t\tgetActiveAgentTaskCount: () => session.getActiveAgentTaskCount(),\n\t\twaitForIdle: () => session.waitForIdle(),\n\t\tcompact: (customInstructions) => session.compact(customInstructions),\n\t\tnavigateTree: (targetId, options) => session.navigateTree(targetId, options),\n\t\treload: (options) => session.reload(options),\n\t\tsetModel: (model, options) => session.setModel(model, options),\n\t\tsetThinkingLevel: (level, options) => session.setThinkingLevel(level, options),\n\t\tsetActiveToolsByName: (toolNames) => session.setActiveToolsByName(toolNames),\n\t\tgetQueuedMessages: () => ({\n\t\t\tsteering: session.getSteeringMessages(),\n\t\t\tfollowUp: session.getFollowUpMessages(),\n\t\t}),\n\t\tclearQueue: () => session.clearQueue(),\n\t\treorderQueuedMessages: (queue, from, to) => session.reorderQueuedMessages(queue, from, to),\n\t\tremoveQueuedMessageAt: (queue, index) => session.removeQueuedMessageAt(queue, index),\n\t\trecordSuiteMismatch: (originalSuiteId, currentSuiteId) =>\n\t\t\tsession.recordSuiteMismatch(originalSuiteId, currentSuiteId),\n\t\tgetSessionAPI: () => session.getSessionAPI(),\n\t\tisIdle: () => session.isIdle,\n\t\tgetState: () => session.state,\n\t\tgetModel: () => session.model,\n\t\tgetToolNames: () => session.getActiveToolNames(),\n\t\tgetSessionId: () => session.sessionId,\n\t\tgetHeader: () => session.sessionManager.getHeader(),\n\t\tsubscribe: (listener) => session.subscribe(listener),\n\t\tsubscribeRawEventGate: (listener) => session.agent.subscribe(() => listener()),\n\t\tgetSessionName: () => session.sessionName,\n\t\tisCompacting: () => session.isCompacting,\n\t\tisStreaming: () => session.isStreaming,\n\t\tgetContextUsage: () => session.getContextUsage(),\n\t\tgetSystemPrompt: () => session.systemPrompt,\n\t\tgetScopedModels: () => session.scopedModels,\n\t\tgetTree: () => session.sessionManager.getTree(),\n\t\tgetLeafId: () => session.sessionManager.getLeafId(),\n\t\tgetPromptTemplates: () => session.promptTemplates,\n\t\tgetToolDefinition: (name) => session.getToolDefinition(name),\n\t\tgetCwd: () => session.sessionManager.getCwd(),\n\t\tgetEntries: () => session.sessionManager.getEntries(),\n\t\tgetPendingMessageCount: () => session.pendingMessageCount,\n\t\tfollowUp: (text, images, options) => session.followUp(text, images, options),\n\t\tsetScopedModels: (scopedModels) => session.setScopedModels(scopedModels),\n\t\tcycleModel: (direction, options) => session.cycleModel(direction, options),\n\t\tcycleThinkingLevel: (options) => session.cycleThinkingLevel(options),\n\t\tsetSteeringMode: (mode) => session.setSteeringMode(mode),\n\t\tsetFollowUpMode: (mode) => session.setFollowUpMode(mode),\n\t\tsetSessionName: (name) => session.setSessionName(name),\n\t\tabortBash: () => session.abortBash(),\n\t\tabortCompaction: () => session.abortCompaction(),\n\t\tabortRetry: () => session.abortRetry(),\n\t\tabortBranchSummary: () => session.abortBranchSummary(),\n\t\tcaptureBashEpoch: () => session.captureBashEpoch(),\n\t\tisBashEpochCurrent: (epoch) => session.isBashEpochCurrent(epoch),\n\t\temitUserBash: (excludeFromContext) => session.emitUserBash(excludeFromContext),\n\t\texecuteBash: (command, onChunk, options) => session.executeBash(command, onChunk, options),\n\t\trecordBashResult: (command, result, options) => session.recordBashResult(command, result, options),\n\t\tgetThinkingLevel: () => session.thinkingLevel,\n\t\tgetSteeringMode: () => session.steeringMode,\n\t\tgetFollowUpMode: () => session.followUpMode,\n\t\tgetSessionFile: () => session.sessionFile,\n\t\tgetAvailableThinkingLevels: () => session.getAvailableThinkingLevels(),\n\t\tgetUserMessagesForForking: () => session.getUserMessagesForForking(),\n\t\tgetLastAssistantText: () => session.getLastAssistantText(),\n\t\tgetSessionStats: () => session.getSessionStats(),\n\t\texportToHtml: (outputPath, options) => session.exportToHtml(outputPath, options),\n\t\tappendLabelChange: (entryId, label) => session.sessionManager.appendLabelChange(entryId, label),\n\t\tgetSkills: () => session.resourceLoader.getSkills(),\n\t\tgetPrompts: () => session.resourceLoader.getPrompts(),\n\t\tgetThemes: () => session.resourceLoader.getThemes(),\n\t\tgetAgentsFiles: () => session.resourceLoader.getAgentsFiles(),\n\t\tgetSystemPromptSource: () => session.resourceLoader.getSystemPromptSource(),\n\t\tgetAppendSystemPromptSources: () => session.resourceLoader.getAppendSystemPromptSources(),\n\t\tgetSuiteId: () => readSessionSuiteBinding(session.getSessionAPI().getBranchEntries())?.suiteId,\n\t\tgetAvailableModels: () => session.modelRuntime.getAvailableSnapshot(),\n\t\tisUsingSubscription: (providerId) => session.modelRuntime.isUsingSubscription(providerId),\n\t\tgetModelsError: () => session.modelRuntime.getError(),\n\t\tgetModelCatalog: () => session.modelRuntime,\n\t\tcheckProviderAuth: (providerId) => session.modelRuntime.checkAuth(providerId),\n\t\tgetProviderAuth: (providerId) => session.modelRuntime.getAuth(providerId),\n\t\tgetModelPriceSource: () => session.modelRuntime,\n\t\tgetModelAuthRuntime: () => session.modelRuntime,\n\t\t// Delegates to the SessionManager method: its incrementally maintained\n\t\t// byId index walks the full entry graph, which rebuild-from-entries\n\t\t// diverges from after a compaction commit (D-047 regression fix).\n\t\tgetContextEntries: () => session.sessionManager.buildContextEntries(),\n\t\tgetSteeringMessages: () => session.getSteeringMessages(),\n\t\tgetFollowUpMessages: () => session.getFollowUpMessages(),\n\t\tgetRetryAttempt: () => session.retryAttempt,\n\t\tisBashRunning: () => session.isBashRunning,\n\t\texportToJsonl: (outputPath) => session.exportToJsonl(outputPath),\n\t\tdispose: () => session.dispose(),\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"coding-agent-facade.d.ts","sourceRoot":"","sources":["../../../src/core/facade/coding-agent-facade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AAE5F,OAAO,KAAK,EACX,YAAY,EACZ,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,YAAY,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK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GxD,wHAAwH;IACxH,kBAAkB,IAAI,SAAS,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;IAC5C,sFAAsF;IACtF,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IACjD,2EAA2E;IAC3E,cAAc,IAAI,MAAM,GAAG,SAAS,CAAC;IACrC;;;;OAIG;IACH,eAAe,IAAI,mBAAmB,CAAC;IACvC,4EAA4E;IAC5E,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IACtE,0EAA0E;IAC1E,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IACrE;;;;OAIG;IACH,mBAAmB,IAAI,gBAAgB,CAAC;IACxC;;;;;OAKG;IACH,iBAAiB,IAAI,YAAY,EAAE,CAAC;IAGpC;;;;;OAKG;IACH,mBAAmB,IAAI,gBAAgB,CAAC;IAIxC,uDAAuD;IACvD,mBAAmB,IAAI,SAAS,MAAM,EAAE,CAAC;IACzC,uDAAuD;IACvD,mBAAmB,IAAI,SAAS,MAAM,EAAE,CAAC;IAIzC,8CAA8C;IAC9C,eAAe,IAAI,MAAM,CAAC;IAC1B,+CAA+C;IAC/C,aAAa,IAAI,OAAO,CAAC;IACzB,iDAAiD;IACjD,aAAa,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAG3C,2CAA2C;IAC3C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAED,+FAA+F;AAC/F,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,YAAY,GAAG,mBAAmB,CAkGlF","sourcesContent":["/**\n * Stable facade v1: a read-only mirror plus pass-through run control and\n * session write paths over one AgentSession.\n *\n * Design: docs/design/稳定门面统一入口设计.md (§2.5 阶段 0 实际面, §2.6 slice 1\n * 读面, §2.7 slice 2 读面, §2.8 阶段 2 写面, §2.9 阶段 3 RPC 面, §3 API 面 v1,\n * §4 阶段 0/1/2/3). Every member is a pure delegate onto the wrapped\n * AgentSession or its existing curated surfaces (`getSessionAPI()`, `host`).\n * No new behavior, no policy, no state of its own. Product entry points\n * (TUI/CLI/RPC/Embedded) migrate onto this surface in later phases;\n * AgentSession stays the internal adapter behind it.\n *\n * Scope: in-package stable surface for those product entry points. It is not\n * exported from the package root and is not a cross-package public contract.\n */\n\nimport type { AgentState, ThinkingLevel } from \"@agent-forge/agent-core\";\nimport type { AuthCheck, AuthResult, ImageContent } from \"@agent-forge/ai\";\nimport type { Api, Model } from \"@agent-forge/ai/compat\";\nimport type { ModelCatalogRuntime } from \"../../modes/interactive/model-catalog-refresh.ts\";\nimport { readSessionSuiteBinding } from \"../../profiles/suite-loader.ts\";\nimport type {\n\tAgentSession,\n\tAgentSessionEventListener,\n\tModelCycleResult,\n\tModelMutationOptions,\n\tPromptOptions,\n\tQueuedInputDisposition,\n\tSessionStats,\n} from \"../agent-session.ts\";\nimport type { CompactionCancelledResult } from \"../agent-session-compaction.ts\";\nimport type { ForkableUserMessage } from \"../agent-session-projection.ts\";\nimport type { BashResult } from \"../bash-executor.ts\";\nimport type { ModelPriceSource } from \"../cache-stats.ts\";\nimport type { CompactionResult } from \"../compaction/index.ts\";\nimport type { ResourceDiagnostic } from \"../diagnostics.ts\";\nimport type { ContextUsage, PromptOutcome, SessionAPI } from \"../extensions/public-api.ts\";\nimport type { InputSource } from \"../input-source.ts\";\nimport type { ModelRuntime } from \"../model-runtime.ts\";\nimport type { PromptTemplate } from \"../prompt-templates.ts\";\nimport type { ThemeMetaV1 } from \"../resource-loader.ts\";\nimport type { BranchSummaryEntry, SessionEntry, SessionHeader, SessionTreeNode } from \"../session-manager.ts\";\nimport type { Skill } from \"../skills.ts\";\nimport type { BashOperations } from \"../tools/bash-operations.ts\";\nimport type { ToolDefinition } from \"../tools/tool-definition.ts\";\n\n/** Prompt options for the facade. Identical to AgentSession PromptOptions. */\nexport type CodingAgentFacadePromptOptionsV1 = PromptOptions;\n\n/**\n * Narrow credential/provider auth projection (D-048): the TUI auth surface\n * only. Covers exactly the seven methods the auth host consumes\n * (`getProviders`/`getProvider`/`getProviderAuthStatus`/`isUsingOAuth`/\n * `listCredentials`/`login`/`logout`); the full ModelRuntime never leaks to\n * the host. The credential-management CapabilityAPI semantics question stays\n * open (D-047 裁决 3); this narrows the TUI host path without deciding it.\n */\nexport type ModelAuthRuntime = Pick<\n\tModelRuntime,\n\t\"getProviders\" | \"getProvider\" | \"getProviderAuthStatus\" | \"isUsingOAuth\" | \"listCredentials\" | \"login\" | \"logout\"\n>;\n\n/**\n * Stable facade v1: the consumption surface for product hosts, versioned per\n * repo convention (EmbeddedSdkBindingV1 precedent). Members are pass-throughs\n * onto the wrapped AgentSession; new members must extend the facade design\n * doc first (门面腐化 guard, 设计 §6).\n */\nexport interface CodingAgentFacadeV1 {\n\treadonly version: 1;\n\n\t// --- Run control ---\n\t/**\n\t * Delegates to AgentSession.prompt(). The full PromptOptions pass through,\n\t * including the internal RPC preflight hook (`preflightResult`) that RPC\n\t * mode uses to observe prompt acceptance (阶段 3, 设计 §2.9).\n\t */\n\tprompt(text: string, options?: CodingAgentFacadePromptOptionsV1): Promise<PromptOutcome>;\n\t/** Delegates to AgentSession.steer(). */\n\tsteer(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.abort(); `cancelAgentTasks: false` stops the\n\t * current turn without cancelling background agent tasks (设计 子代理运行时\n\t * §4.2 中断分级,2026-10-02 — the TUI Esc path always passes false). */\n\tabort(options?: { cancelAgentTasks?: boolean }): Promise<void>;\n\t/** Delegates to AgentSession.abortAgentTasks(): cancel every background agent\n\t * task without aborting the current turn (/stop-agents execution face). */\n\tabortAgentTasks(): void;\n\t/** Delegates to AgentSession.getActiveAgentTaskCount(). */\n\tgetActiveAgentTaskCount(): number;\n\t/** Delegates to AgentSession.waitForIdle(). */\n\twaitForIdle(): Promise<void>;\n\n\t// --- Session write paths ---\n\t/** Delegates to AgentSession.compact(). */\n\tcompact(customInstructions?: string): Promise<CompactionResult | CompactionCancelledResult>;\n\t/** Delegates to AgentSession.navigateTree(). */\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },\n\t): Promise<{ editorText?: string; cancelled: boolean; aborted?: boolean; summaryEntry?: BranchSummaryEntry }>;\n\t/** Delegates to AgentSession.reload(). */\n\treload(options?: { beforeSessionStart?: () => void | Promise<void> }): Promise<void>;\n\t/** Delegates to AgentSession.setModel(). */\n\tsetModel(model: Model<Api>, options?: ModelMutationOptions): Promise<void>;\n\t/** Delegates to AgentSession.setThinkingLevel(). */\n\tsetThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): void;\n\t/** Delegates to AgentSession.setActiveToolsByName(). */\n\tsetActiveToolsByName(toolNames: string[]): void;\n\t/**\n\t * Queued-message read view, composed from AgentSession.getSteeringMessages()\n\t * and AgentSession.getFollowUpMessages(). AgentSession has no single\n\t * getQueuedMessages(); the shape mirrors clearQueue()'s return value.\n\t */\n\tgetQueuedMessages(): { steering: readonly string[]; followUp: readonly string[] };\n\t/** Delegates to AgentSession.clearQueue(). */\n\tclearQueue(): { steering: string[]; followUp: string[] };\n\t/** Delegates to AgentSession.reorderQueuedMessages(): indices refer to the\n\t * queued display lists; a stale or out-of-bounds move returns false. */\n\treorderQueuedMessages(queue: \"steer\" | \"followUp\", from: number, to: number): boolean;\n\t/** Delegates to AgentSession.removeQueuedMessageAt(): removes by queued\n\t * display list index; a stale index returns null. */\n\tremoveQueuedMessageAt(queue: \"steer\" | \"followUp\", index: number): string | null;\n\t/** Delegates to AgentSession.recordSuiteMismatch(). */\n\trecordSuiteMismatch(originalSuiteId: string, currentSuiteId: string): void;\n\t/** Delegates to AgentSession.getSessionAPI(). */\n\tgetSessionAPI(): SessionAPI;\n\n\t// --- Read-only mirror ---\n\t/** Delegates to AgentSession.isIdle. */\n\tisIdle(): boolean;\n\t/** Mirrors AgentSession.state verbatim (phase 0; a projected state view is a later phase, 设计 §3). */\n\tgetState(): AgentState;\n\t/** Delegates to AgentSession.model. */\n\tgetModel(): Model<Api> | undefined;\n\t/** Delegates to AgentSession.getActiveToolNames(). */\n\tgetToolNames(): string[];\n\t/** Delegates to AgentSession.sessionId (via SessionAPI.getSessionId semantics). */\n\tgetSessionId(): string;\n\t/**\n\t * Suite id from the session-suite binding entry (设计 §10.1), read through\n\t * SessionAPI.getBranchEntries(). Undefined when the session carries no\n\t * suite binding.\n\t */\n\tgetSuiteId(): string | undefined;\n\t/** Delegates to AgentSession.sessionManager.getHeader(). SessionManager itself never leaks. */\n\tgetHeader(): SessionHeader | null;\n\t/** Delegates to AgentSession.subscribe(). Event types pass through verbatim (设计 §3). */\n\tsubscribe(listener: AgentSessionEventListener): () => void;\n\t/**\n\t * Invoked after each raw agent event is delivered to session processing;\n\t * the listener is awaited serially by the agent loop and participates in\n\t * run settlement. Exists for stdout backpressure pacing (D-046); the raw\n\t * event payload and abort signal are deliberately not exposed.\n\t */\n\tsubscribeRawEventGate(listener: () => void | Promise<void>): () => void;\n\n\t// --- Read surface (phase 1 slice 1, TUI display/selector reads, 设计 §2.6) ---\n\t/** Delegates to AgentSession.sessionName (which reads sessionManager.getSessionName()). */\n\tgetSessionName(): string | undefined;\n\t/** Delegates to AgentSession.isCompacting: a compaction or branch summarization is running (session level). */\n\tisCompacting(): boolean;\n\t/**\n\t * Delegates to AgentSession.isStreaming: an agent run is active at the\n\t * session level. Distinct from AgentState.isStreaming (agent-level stream\n\t * flag); do not interchange the two.\n\t */\n\tisStreaming(): boolean;\n\t/** Delegates to AgentSession.getContextUsage(). */\n\tgetContextUsage(): ContextUsage | undefined;\n\t/** Delegates to AgentSession.systemPrompt (effective prompt, including per-turn extension modifications). */\n\tgetSystemPrompt(): string;\n\t/** Delegates to AgentSession.scopedModels. Read view only; setScopedModels stays a phase 2 write path. */\n\tgetScopedModels(): ReadonlyArray<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>;\n\t/** Delegates to SessionManager.getTree() on the wrapped session. SessionManager itself never leaks. */\n\tgetTree(): SessionTreeNode[];\n\t/** Delegates to SessionManager.getLeafId() on the wrapped session. SessionManager itself never leaks. */\n\tgetLeafId(): string | null;\n\n\t// --- Read surface (phase 1 slice 2, TUI display/selector cluster convergence, 设计 §2.7) ---\n\t/** Delegates to AgentSession.promptTemplates (file-based prompt templates). */\n\tgetPromptTemplates(): ReadonlyArray<PromptTemplate>;\n\t/** Delegates to AgentSession.getToolDefinition(name): the registered tool definition by name, for diagnostics/rendering. */\n\tgetToolDefinition(name: string): ToolDefinition | undefined;\n\t/** Delegates to SessionManager.getCwd() on the wrapped session; identical to host.cwd. SessionManager itself never leaks. */\n\tgetCwd(): string;\n\t/** Delegates to SessionManager.getEntries() on the wrapped session; identical to host.entries. SessionManager itself never leaks. */\n\tgetEntries(): SessionEntry[];\n\t/** Delegates to AgentSession.pendingMessageCount: queued steering + follow-up message count. */\n\tgetPendingMessageCount(): number;\n\n\t// --- Write surface (phase 2, TUI write path convergence, 设计 §2.8) ---\n\t/** Delegates to AgentSession.followUp(). */\n\tfollowUp(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.setScopedModels(). */\n\tsetScopedModels(scopedModels: Array<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>): void;\n\t/** Delegates to AgentSession.cycleModel(). */\n\tcycleModel(\n\t\tdirection?: \"forward\" | \"backward\",\n\t\toptions?: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\t/** Delegates to AgentSession.cycleThinkingLevel(). */\n\tcycleThinkingLevel(options?: ModelMutationOptions): ThinkingLevel | undefined;\n\t/** Delegates to AgentSession.setSteeringMode(). */\n\tsetSteeringMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setFollowUpMode(). */\n\tsetFollowUpMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setSessionName(). */\n\tsetSessionName(name: string): void;\n\t/** Delegates to AgentSession.abortBash(). */\n\tabortBash(): void;\n\t/** Delegates to AgentSession.abortCompaction(). */\n\tabortCompaction(): void;\n\t/** Delegates to AgentSession.abortRetry(). */\n\tabortRetry(): void;\n\t/** Delegates to AgentSession.abortBranchSummary(). */\n\tabortBranchSummary(): void;\n\t/** Delegates to AgentSession.captureBashEpoch(). */\n\tcaptureBashEpoch(): number;\n\t/** Delegates to AgentSession.isBashEpochCurrent(). */\n\tisBashEpochCurrent(epoch: number): boolean;\n\t/** Delegates to AgentSession.emitUserBash(): dispatches the user.bash lifecycle facts. */\n\temitUserBash(excludeFromContext: boolean): void;\n\t/** Delegates to AgentSession.executeBash(). */\n\texecuteBash(\n\t\tcommand: string,\n\t\tonChunk?: (chunk: string) => void,\n\t\toptions?: { excludeFromContext?: boolean; id?: string; operations?: BashOperations },\n\t): Promise<BashResult>;\n\t/** Delegates to AgentSession.recordBashResult(). */\n\trecordBashResult(\n\t\tcommand: string,\n\t\tresult: BashResult,\n\t\toptions?: { excludeFromContext?: boolean; epoch?: number },\n\t): void;\n\n\t// --- Read surface (phase 3, RPC host state reads, 设计 §2.9) ---\n\t/** Delegates to AgentSession.thinkingLevel. */\n\tgetThinkingLevel(): ThinkingLevel;\n\t/** Delegates to AgentSession.steeringMode. */\n\tgetSteeringMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.followUpMode. */\n\tgetFollowUpMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.sessionFile. */\n\tgetSessionFile(): string | undefined;\n\t/** Delegates to AgentSession.getAvailableThinkingLevels(). */\n\tgetAvailableThinkingLevels(): ThinkingLevel[];\n\t/** Delegates to AgentSession.getUserMessagesForForking(). */\n\tgetUserMessagesForForking(): ForkableUserMessage[];\n\t/** Delegates to AgentSession.getLastAssistantText(). */\n\tgetLastAssistantText(): string | undefined;\n\t/** Delegates to AgentSession.getSessionStats(). */\n\tgetSessionStats(): SessionStats;\n\n\t// --- Write surface (phase 3, RPC host writes, 设计 §2.9) ---\n\t/** Delegates to AgentSession.exportToHtml(), including the themeName option. */\n\texportToHtml(outputPath?: string, options?: { themeName?: string }): Promise<string>;\n\n\t// --- Session write path (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Delegates to SessionManager.appendLabelChange() on the wrapped session.\n\t * TUI tree selector label rename write point; SessionAPI has no label write.\n\t */\n\tappendLabelChange(entryId: string, label: string | undefined): string;\n\n\t// --- Resource read surface (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Clean read projections over the wrapped session's resource loader. Skills/\n\t * prompts/agents-files results pass through verbatim; themes and extensions\n\t * are the metadata projections (themes as ThemeMetaV1 without the modes\n\t * Theme class; loader registration maps and the shared runtime never\n\t * leak). Guard reason: TUI startup listing/autocomplete/diagnostics\n\t * consume these read points directly; SessionAPI/CapabilityAPI are\n\t * capability-side contracts with no host display projections.\n\t */\n\t/** Delegates to ResourceLoader.getSkills() on the wrapped session. */\n\tgetSkills(): { skills: Skill[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getPrompts() on the wrapped session. */\n\tgetPrompts(): { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getThemes() on the wrapped session. */\n\tgetThemes(): { themes: ThemeMetaV1[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getAgentsFiles() on the wrapped session. */\n\tgetAgentsFiles(): { agentsFiles: Array<{ path: string; content: string }> };\n\t/** Delegates to ResourceLoader.getSystemPromptSource() on the wrapped session. */\n\tgetSystemPromptSource(): { path: string } | undefined;\n\t/** Delegates to ResourceLoader.getAppendSystemPromptSources() on the wrapped session. */\n\tgetAppendSystemPromptSources(): Array<{ path: string }>;\n\n\t// --- Model/catalog/context read surface (v1 修订, D-047: TUI direct session reads zeroed) ---\n\t/** Delegates to ModelRuntime.getAvailableSnapshot() on the wrapped session (D-047); ModelRuntime itself never leaks. */\n\tgetAvailableModels(): readonly Model<Api>[];\n\t/** Delegates to ModelRuntime.isUsingSubscription() on the wrapped session (D-047). */\n\tisUsingSubscription(providerId: string): boolean;\n\t/** Delegates to ModelRuntime.getError() on the wrapped session (D-047). */\n\tgetModelsError(): string | undefined;\n\t/**\n\t * Narrow `ModelCatalogRuntime` projection of the wrapped session's\n\t * ModelRuntime for the shared catalog-refresh coordinator (D-047). A\n\t * projection, not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelCatalog(): ModelCatalogRuntime;\n\t/** Delegates to ModelRuntime.checkAuth() on the wrapped session (D-047). */\n\tcheckProviderAuth(providerId: string): Promise<AuthCheck | undefined>;\n\t/** Delegates to ModelRuntime.getAuth() on the wrapped session (D-047). */\n\tgetProviderAuth(providerId: string): Promise<AuthResult | undefined>;\n\t/**\n\t * Narrow `ModelPriceSource` projection of the wrapped session's\n\t * ModelRuntime for the cache-stats pure functions (D-047). A projection,\n\t * not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelPriceSource(): ModelPriceSource;\n\t/**\n\t * Delegates to SessionManager.buildContextEntries() on the wrapped session\n\t * (D-047; delegation restored by the D-047 regression fix — the\n\t * incrementally maintained byId index is required for correct context\n\t * paths after a compaction commit). SessionManager itself never leaks.\n\t */\n\tgetContextEntries(): SessionEntry[];\n\n\t// --- Credential/provider auth read surface (v1 修订, D-048: TUI auth host path) ---\n\t/**\n\t * Narrow `ModelAuthRuntime` projection of the wrapped session's ModelRuntime\n\t * for the TUI auth surface (D-048). A projection, not a wrapper: the full\n\t * runtime never leaks. The credential-management CapabilityAPI semantics\n\t * question stays open (D-047 裁决 3); this only narrows the TUI host path.\n\t */\n\tgetModelAuthRuntime(): ModelAuthRuntime;\n\n\t// --- Session stats/text read surface (v1 修订, B-S2b③-S3a: TUI direct\n\t// session stats/text read cluster convergence) ---\n\t/** Delegates to AgentSession.getSteeringMessages(). */\n\tgetSteeringMessages(): readonly string[];\n\t/** Delegates to AgentSession.getFollowUpMessages(). */\n\tgetFollowUpMessages(): readonly string[];\n\n\t// --- Status/settings + export read surface (v1 修订, B-S2b③-S3b+c: TUI\n\t// status/settings/export cluster direct session read convergence) ---\n\t/** Delegates to AgentSession.retryAttempt. */\n\tgetRetryAttempt(): number;\n\t/** Delegates to AgentSession.isBashRunning. */\n\tisBashRunning(): boolean;\n\t/** Delegates to AgentSession.exportToJsonl(). */\n\texportToJsonl(outputPath?: string): string;\n\n\t// --- Lifecycle ---\n\t/** Delegates to AgentSession.dispose(). */\n\tdispose(): Promise<void>;\n}\n\n/** Creates a facade v1 view over one AgentSession. Pure wrapper: holds no state of its own. */\nexport function createCodingAgentFacade(session: AgentSession): CodingAgentFacadeV1 {\n\treturn {\n\t\tversion: 1,\n\t\tprompt: (text, options) => session.prompt(text, options),\n\t\tsteer: (text, images, options) => session.steer(text, images, options),\n\t\tabort: (options) => session.abort(undefined, options),\n\t\tabortAgentTasks: () => session.abortAgentTasks(),\n\t\tgetActiveAgentTaskCount: () => session.getActiveAgentTaskCount(),\n\t\twaitForIdle: () => session.waitForIdle(),\n\t\tcompact: (customInstructions) => session.compact(customInstructions),\n\t\tnavigateTree: (targetId, options) => session.navigateTree(targetId, options),\n\t\treload: (options) => session.reload(options),\n\t\tsetModel: (model, options) => session.setModel(model, options),\n\t\tsetThinkingLevel: (level, options) => session.setThinkingLevel(level, options),\n\t\tsetActiveToolsByName: (toolNames) => session.setActiveToolsByName(toolNames),\n\t\tgetQueuedMessages: () => ({\n\t\t\tsteering: session.getSteeringMessages(),\n\t\t\tfollowUp: session.getFollowUpMessages(),\n\t\t}),\n\t\tclearQueue: () => session.clearQueue(),\n\t\treorderQueuedMessages: (queue, from, to) => session.reorderQueuedMessages(queue, from, to),\n\t\tremoveQueuedMessageAt: (queue, index) => session.removeQueuedMessageAt(queue, index),\n\t\trecordSuiteMismatch: (originalSuiteId, currentSuiteId) =>\n\t\t\tsession.recordSuiteMismatch(originalSuiteId, currentSuiteId),\n\t\tgetSessionAPI: () => session.getSessionAPI(),\n\t\tisIdle: () => session.isIdle,\n\t\tgetState: () => session.state,\n\t\tgetModel: () => session.model,\n\t\tgetToolNames: () => session.getActiveToolNames(),\n\t\tgetSessionId: () => session.sessionId,\n\t\tgetHeader: () => session.sessionManager.getHeader(),\n\t\tsubscribe: (listener) => session.subscribe(listener),\n\t\tsubscribeRawEventGate: (listener) => session.agent.subscribe(() => listener()),\n\t\tgetSessionName: () => session.sessionName,\n\t\tisCompacting: () => session.isCompacting,\n\t\tisStreaming: () => session.isStreaming,\n\t\tgetContextUsage: () => session.getContextUsage(),\n\t\tgetSystemPrompt: () => session.systemPrompt,\n\t\tgetScopedModels: () => session.scopedModels,\n\t\tgetTree: () => session.sessionManager.getTree(),\n\t\tgetLeafId: () => session.sessionManager.getLeafId(),\n\t\tgetPromptTemplates: () => session.promptTemplates,\n\t\tgetToolDefinition: (name) => session.getToolDefinition(name),\n\t\tgetCwd: () => session.sessionManager.getCwd(),\n\t\tgetEntries: () => session.sessionManager.getEntries(),\n\t\tgetPendingMessageCount: () => session.pendingMessageCount,\n\t\tfollowUp: (text, images, options) => session.followUp(text, images, options),\n\t\tsetScopedModels: (scopedModels) => session.setScopedModels(scopedModels),\n\t\tcycleModel: (direction, options) => session.cycleModel(direction, options),\n\t\tcycleThinkingLevel: (options) => session.cycleThinkingLevel(options),\n\t\tsetSteeringMode: (mode) => session.setSteeringMode(mode),\n\t\tsetFollowUpMode: (mode) => session.setFollowUpMode(mode),\n\t\tsetSessionName: (name) => session.setSessionName(name),\n\t\tabortBash: () => session.abortBash(),\n\t\tabortCompaction: () => session.abortCompaction(),\n\t\tabortRetry: () => session.abortRetry(),\n\t\tabortBranchSummary: () => session.abortBranchSummary(),\n\t\tcaptureBashEpoch: () => session.captureBashEpoch(),\n\t\tisBashEpochCurrent: (epoch) => session.isBashEpochCurrent(epoch),\n\t\temitUserBash: (excludeFromContext) => session.emitUserBash(excludeFromContext),\n\t\texecuteBash: (command, onChunk, options) => session.executeBash(command, onChunk, options),\n\t\trecordBashResult: (command, result, options) => session.recordBashResult(command, result, options),\n\t\tgetThinkingLevel: () => session.thinkingLevel,\n\t\tgetSteeringMode: () => session.steeringMode,\n\t\tgetFollowUpMode: () => session.followUpMode,\n\t\tgetSessionFile: () => session.sessionFile,\n\t\tgetAvailableThinkingLevels: () => session.getAvailableThinkingLevels(),\n\t\tgetUserMessagesForForking: () => session.getUserMessagesForForking(),\n\t\tgetLastAssistantText: () => session.getLastAssistantText(),\n\t\tgetSessionStats: () => session.getSessionStats(),\n\t\texportToHtml: (outputPath, options) => session.exportToHtml(outputPath, options),\n\t\tappendLabelChange: (entryId, label) => session.sessionManager.appendLabelChange(entryId, label),\n\t\tgetSkills: () => session.resourceLoader.getSkills(),\n\t\tgetPrompts: () => session.resourceLoader.getPrompts(),\n\t\tgetThemes: () => session.resourceLoader.getThemes(),\n\t\tgetAgentsFiles: () => session.resourceLoader.getAgentsFiles(),\n\t\tgetSystemPromptSource: () => session.resourceLoader.getSystemPromptSource(),\n\t\tgetAppendSystemPromptSources: () => session.resourceLoader.getAppendSystemPromptSources(),\n\t\tgetSuiteId: () => readSessionSuiteBinding(session.getSessionAPI().getBranchEntries())?.suiteId,\n\t\tgetAvailableModels: () => session.modelRuntime.getAvailableSnapshot(),\n\t\tisUsingSubscription: (providerId) => session.modelRuntime.isUsingSubscription(providerId),\n\t\tgetModelsError: () => session.modelRuntime.getError(),\n\t\tgetModelCatalog: () => session.modelRuntime,\n\t\tcheckProviderAuth: (providerId) => session.modelRuntime.checkAuth(providerId),\n\t\tgetProviderAuth: (providerId) => session.modelRuntime.getAuth(providerId),\n\t\tgetModelPriceSource: () => session.modelRuntime,\n\t\tgetModelAuthRuntime: () => session.modelRuntime,\n\t\t// Delegates to the SessionManager method: its incrementally maintained\n\t\t// byId index walks the full entry graph, which rebuild-from-entries\n\t\t// diverges from after a compaction commit (D-047 regression fix).\n\t\tgetContextEntries: () => session.sessionManager.buildContextEntries(),\n\t\tgetSteeringMessages: () => session.getSteeringMessages(),\n\t\tgetFollowUpMessages: () => session.getFollowUpMessages(),\n\t\tgetRetryAttempt: () => session.retryAttempt,\n\t\tisBashRunning: () => session.isBashRunning,\n\t\texportToJsonl: (outputPath) => session.exportToJsonl(outputPath),\n\t\tdispose: () => session.dispose(),\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coding-agent-facade.js","sourceRoot":"","sources":["../../../src/core/facade/coding-agent-facade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAwUzE,+FAA+F;AAC/F,MAAM,UAAU,uBAAuB,CAAC,OAAqB,EAAuB;IACnF,OAAO;QACN,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC;QACxD,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC;QACtE,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC;QACrD,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE;QAChD,uBAAuB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,uBAAuB,EAAE;QAChE,WAAW,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE;QACxC,OAAO,EAAE,CAAC,kBAAkB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC;QACpE,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,Q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AE,CAAC,UAAU,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC;QAChE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;KAChC,CAAC;AAAA,CACF","sourcesContent":["/**\n * Stable facade v1: a read-only mirror plus pass-through run control and\n * session write paths over one AgentSession.\n *\n * Design: docs/design/稳定门面统一入口设计.md (§2.5 阶段 0 实际面, §2.6 slice 1\n * 读面, §2.7 slice 2 读面, §2.8 阶段 2 写面, §2.9 阶段 3 RPC 面, §3 API 面 v1,\n * §4 阶段 0/1/2/3). Every member is a pure delegate onto the wrapped\n * AgentSession or its existing curated surfaces (`getSessionAPI()`, `host`).\n * No new behavior, no policy, no state of its own. Product entry points\n * (TUI/CLI/RPC/Embedded) migrate onto this surface in later phases;\n * AgentSession stays the internal adapter behind it.\n *\n * Scope: in-package stable surface for those product entry points. It is not\n * exported from the package root and is not a cross-package public contract.\n */\n\nimport type { AgentState, ThinkingLevel } from \"@agent-forge/agent-core\";\nimport type { AuthCheck, AuthResult, ImageContent } from \"@agent-forge/ai\";\nimport type { Api, Model } from \"@agent-forge/ai/compat\";\nimport type { ModelCatalogRuntime } from \"../../modes/interactive/model-catalog-refresh.ts\";\nimport { readSessionSuiteBinding } from \"../../profiles/suite-loader.ts\";\nimport type {\n\tAgentSession,\n\tAgentSessionEventListener,\n\tModelCycleResult,\n\tModelMutationOptions,\n\tPromptOptions,\n\tQueuedInputDisposition,\n\tSessionStats,\n} from \"../agent-session.ts\";\nimport type { CompactionCancelledResult } from \"../agent-session-compaction.ts\";\nimport type { ForkableUserMessage } from \"../agent-session-projection.ts\";\nimport type { BashResult } from \"../bash-executor.ts\";\nimport type { ModelPriceSource } from \"../cache-stats.ts\";\nimport type { CompactionResult } from \"../compaction/index.ts\";\nimport type { ResourceDiagnostic } from \"../diagnostics.ts\";\nimport type { ContextUsage, PromptOutcome, SessionAPI } from \"../extensions/public-api.ts\";\nimport type { InputSource } from \"../input-source.ts\";\nimport type { ModelRuntime } from \"../model-runtime.ts\";\nimport type { PromptTemplate } from \"../prompt-templates.ts\";\nimport type { ThemeMetaV1 } from \"../resource-loader.ts\";\nimport type { BranchSummaryEntry, SessionEntry, SessionHeader, SessionTreeNode } from \"../session-manager.ts\";\nimport type { Skill } from \"../skills.ts\";\nimport type { BashOperations } from \"../tools/bash.ts\";\nimport type { ToolDefinition } from \"../tools/tool-definition.ts\";\n\n/** Prompt options for the facade. Identical to AgentSession PromptOptions. */\nexport type CodingAgentFacadePromptOptionsV1 = PromptOptions;\n\n/**\n * Narrow credential/provider auth projection (D-048): the TUI auth surface\n * only. Covers exactly the seven methods the auth host consumes\n * (`getProviders`/`getProvider`/`getProviderAuthStatus`/`isUsingOAuth`/\n * `listCredentials`/`login`/`logout`); the full ModelRuntime never leaks to\n * the host. The credential-management CapabilityAPI semantics question stays\n * open (D-047 裁决 3); this narrows the TUI host path without deciding it.\n */\nexport type ModelAuthRuntime = Pick<\n\tModelRuntime,\n\t\"getProviders\" | \"getProvider\" | \"getProviderAuthStatus\" | \"isUsingOAuth\" | \"listCredentials\" | \"login\" | \"logout\"\n>;\n\n/**\n * Stable facade v1: the consumption surface for product hosts, versioned per\n * repo convention (EmbeddedSdkBindingV1 precedent). Members are pass-throughs\n * onto the wrapped AgentSession; new members must extend the facade design\n * doc first (门面腐化 guard, 设计 §6).\n */\nexport interface CodingAgentFacadeV1 {\n\treadonly version: 1;\n\n\t// --- Run control ---\n\t/**\n\t * Delegates to AgentSession.prompt(). The full PromptOptions pass through,\n\t * including the internal RPC preflight hook (`preflightResult`) that RPC\n\t * mode uses to observe prompt acceptance (阶段 3, 设计 §2.9).\n\t */\n\tprompt(text: string, options?: CodingAgentFacadePromptOptionsV1): Promise<PromptOutcome>;\n\t/** Delegates to AgentSession.steer(). */\n\tsteer(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.abort(); `cancelAgentTasks: false` stops the\n\t * current turn without cancelling background agent tasks (设计 子代理运行时\n\t * §4.2 中断分级,2026-10-02 — the TUI Esc path always passes false). */\n\tabort(options?: { cancelAgentTasks?: boolean }): Promise<void>;\n\t/** Delegates to AgentSession.abortAgentTasks(): cancel every background agent\n\t * task without aborting the current turn (/stop-agents execution face). */\n\tabortAgentTasks(): void;\n\t/** Delegates to AgentSession.getActiveAgentTaskCount(). */\n\tgetActiveAgentTaskCount(): number;\n\t/** Delegates to AgentSession.waitForIdle(). */\n\twaitForIdle(): Promise<void>;\n\n\t// --- Session write paths ---\n\t/** Delegates to AgentSession.compact(). */\n\tcompact(customInstructions?: string): Promise<CompactionResult | CompactionCancelledResult>;\n\t/** Delegates to AgentSession.navigateTree(). */\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },\n\t): Promise<{ editorText?: string; cancelled: boolean; aborted?: boolean; summaryEntry?: BranchSummaryEntry }>;\n\t/** Delegates to AgentSession.reload(). */\n\treload(options?: { beforeSessionStart?: () => void | Promise<void> }): Promise<void>;\n\t/** Delegates to AgentSession.setModel(). */\n\tsetModel(model: Model<Api>, options?: ModelMutationOptions): Promise<void>;\n\t/** Delegates to AgentSession.setThinkingLevel(). */\n\tsetThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): void;\n\t/** Delegates to AgentSession.setActiveToolsByName(). */\n\tsetActiveToolsByName(toolNames: string[]): void;\n\t/**\n\t * Queued-message read view, composed from AgentSession.getSteeringMessages()\n\t * and AgentSession.getFollowUpMessages(). AgentSession has no single\n\t * getQueuedMessages(); the shape mirrors clearQueue()'s return value.\n\t */\n\tgetQueuedMessages(): { steering: readonly string[]; followUp: readonly string[] };\n\t/** Delegates to AgentSession.clearQueue(). */\n\tclearQueue(): { steering: string[]; followUp: string[] };\n\t/** Delegates to AgentSession.reorderQueuedMessages(): indices refer to the\n\t * queued display lists; a stale or out-of-bounds move returns false. */\n\treorderQueuedMessages(queue: \"steer\" | \"followUp\", from: number, to: number): boolean;\n\t/** Delegates to AgentSession.removeQueuedMessageAt(): removes by queued\n\t * display list index; a stale index returns null. */\n\tremoveQueuedMessageAt(queue: \"steer\" | \"followUp\", index: number): string | null;\n\t/** Delegates to AgentSession.recordSuiteMismatch(). */\n\trecordSuiteMismatch(originalSuiteId: string, currentSuiteId: string): void;\n\t/** Delegates to AgentSession.getSessionAPI(). */\n\tgetSessionAPI(): SessionAPI;\n\n\t// --- Read-only mirror ---\n\t/** Delegates to AgentSession.isIdle. */\n\tisIdle(): boolean;\n\t/** Mirrors AgentSession.state verbatim (phase 0; a projected state view is a later phase, 设计 §3). */\n\tgetState(): AgentState;\n\t/** Delegates to AgentSession.model. */\n\tgetModel(): Model<Api> | undefined;\n\t/** Delegates to AgentSession.getActiveToolNames(). */\n\tgetToolNames(): string[];\n\t/** Delegates to AgentSession.sessionId (via SessionAPI.getSessionId semantics). */\n\tgetSessionId(): string;\n\t/**\n\t * Suite id from the session-suite binding entry (设计 §10.1), read through\n\t * SessionAPI.getBranchEntries(). Undefined when the session carries no\n\t * suite binding.\n\t */\n\tgetSuiteId(): string | undefined;\n\t/** Delegates to AgentSession.sessionManager.getHeader(). SessionManager itself never leaks. */\n\tgetHeader(): SessionHeader | null;\n\t/** Delegates to AgentSession.subscribe(). Event types pass through verbatim (设计 §3). */\n\tsubscribe(listener: AgentSessionEventListener): () => void;\n\t/**\n\t * Invoked after each raw agent event is delivered to session processing;\n\t * the listener is awaited serially by the agent loop and participates in\n\t * run settlement. Exists for stdout backpressure pacing (D-046); the raw\n\t * event payload and abort signal are deliberately not exposed.\n\t */\n\tsubscribeRawEventGate(listener: () => void | Promise<void>): () => void;\n\n\t// --- Read surface (phase 1 slice 1, TUI display/selector reads, 设计 §2.6) ---\n\t/** Delegates to AgentSession.sessionName (which reads sessionManager.getSessionName()). */\n\tgetSessionName(): string | undefined;\n\t/** Delegates to AgentSession.isCompacting: a compaction or branch summarization is running (session level). */\n\tisCompacting(): boolean;\n\t/**\n\t * Delegates to AgentSession.isStreaming: an agent run is active at the\n\t * session level. Distinct from AgentState.isStreaming (agent-level stream\n\t * flag); do not interchange the two.\n\t */\n\tisStreaming(): boolean;\n\t/** Delegates to AgentSession.getContextUsage(). */\n\tgetContextUsage(): ContextUsage | undefined;\n\t/** Delegates to AgentSession.systemPrompt (effective prompt, including per-turn extension modifications). */\n\tgetSystemPrompt(): string;\n\t/** Delegates to AgentSession.scopedModels. Read view only; setScopedModels stays a phase 2 write path. */\n\tgetScopedModels(): ReadonlyArray<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>;\n\t/** Delegates to SessionManager.getTree() on the wrapped session. SessionManager itself never leaks. */\n\tgetTree(): SessionTreeNode[];\n\t/** Delegates to SessionManager.getLeafId() on the wrapped session. SessionManager itself never leaks. */\n\tgetLeafId(): string | null;\n\n\t// --- Read surface (phase 1 slice 2, TUI display/selector cluster convergence, 设计 §2.7) ---\n\t/** Delegates to AgentSession.promptTemplates (file-based prompt templates). */\n\tgetPromptTemplates(): ReadonlyArray<PromptTemplate>;\n\t/** Delegates to AgentSession.getToolDefinition(name): the registered tool definition by name, for diagnostics/rendering. */\n\tgetToolDefinition(name: string): ToolDefinition | undefined;\n\t/** Delegates to SessionManager.getCwd() on the wrapped session; identical to host.cwd. SessionManager itself never leaks. */\n\tgetCwd(): string;\n\t/** Delegates to SessionManager.getEntries() on the wrapped session; identical to host.entries. SessionManager itself never leaks. */\n\tgetEntries(): SessionEntry[];\n\t/** Delegates to AgentSession.pendingMessageCount: queued steering + follow-up message count. */\n\tgetPendingMessageCount(): number;\n\n\t// --- Write surface (phase 2, TUI write path convergence, 设计 §2.8) ---\n\t/** Delegates to AgentSession.followUp(). */\n\tfollowUp(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.setScopedModels(). */\n\tsetScopedModels(scopedModels: Array<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>): void;\n\t/** Delegates to AgentSession.cycleModel(). */\n\tcycleModel(\n\t\tdirection?: \"forward\" | \"backward\",\n\t\toptions?: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\t/** Delegates to AgentSession.cycleThinkingLevel(). */\n\tcycleThinkingLevel(options?: ModelMutationOptions): ThinkingLevel | undefined;\n\t/** Delegates to AgentSession.setSteeringMode(). */\n\tsetSteeringMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setFollowUpMode(). */\n\tsetFollowUpMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setSessionName(). */\n\tsetSessionName(name: string): void;\n\t/** Delegates to AgentSession.abortBash(). */\n\tabortBash(): void;\n\t/** Delegates to AgentSession.abortCompaction(). */\n\tabortCompaction(): void;\n\t/** Delegates to AgentSession.abortRetry(). */\n\tabortRetry(): void;\n\t/** Delegates to AgentSession.abortBranchSummary(). */\n\tabortBranchSummary(): void;\n\t/** Delegates to AgentSession.captureBashEpoch(). */\n\tcaptureBashEpoch(): number;\n\t/** Delegates to AgentSession.isBashEpochCurrent(). */\n\tisBashEpochCurrent(epoch: number): boolean;\n\t/** Delegates to AgentSession.emitUserBash(): dispatches the user.bash lifecycle facts. */\n\temitUserBash(excludeFromContext: boolean): void;\n\t/** Delegates to AgentSession.executeBash(). */\n\texecuteBash(\n\t\tcommand: string,\n\t\tonChunk?: (chunk: string) => void,\n\t\toptions?: { excludeFromContext?: boolean; id?: string; operations?: BashOperations },\n\t): Promise<BashResult>;\n\t/** Delegates to AgentSession.recordBashResult(). */\n\trecordBashResult(\n\t\tcommand: string,\n\t\tresult: BashResult,\n\t\toptions?: { excludeFromContext?: boolean; epoch?: number },\n\t): void;\n\n\t// --- Read surface (phase 3, RPC host state reads, 设计 §2.9) ---\n\t/** Delegates to AgentSession.thinkingLevel. */\n\tgetThinkingLevel(): ThinkingLevel;\n\t/** Delegates to AgentSession.steeringMode. */\n\tgetSteeringMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.followUpMode. */\n\tgetFollowUpMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.sessionFile. */\n\tgetSessionFile(): string | undefined;\n\t/** Delegates to AgentSession.getAvailableThinkingLevels(). */\n\tgetAvailableThinkingLevels(): ThinkingLevel[];\n\t/** Delegates to AgentSession.getUserMessagesForForking(). */\n\tgetUserMessagesForForking(): ForkableUserMessage[];\n\t/** Delegates to AgentSession.getLastAssistantText(). */\n\tgetLastAssistantText(): string | undefined;\n\t/** Delegates to AgentSession.getSessionStats(). */\n\tgetSessionStats(): SessionStats;\n\n\t// --- Write surface (phase 3, RPC host writes, 设计 §2.9) ---\n\t/** Delegates to AgentSession.exportToHtml(), including the themeName option. */\n\texportToHtml(outputPath?: string, options?: { themeName?: string }): Promise<string>;\n\n\t// --- Session write path (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Delegates to SessionManager.appendLabelChange() on the wrapped session.\n\t * TUI tree selector label rename write point; SessionAPI has no label write.\n\t */\n\tappendLabelChange(entryId: string, label: string | undefined): string;\n\n\t// --- Resource read surface (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Clean read projections over the wrapped session's resource loader. Skills/\n\t * prompts/agents-files results pass through verbatim; themes and extensions\n\t * are the metadata projections (themes as ThemeMetaV1 without the modes\n\t * Theme class; loader registration maps and the shared runtime never\n\t * leak). Guard reason: TUI startup listing/autocomplete/diagnostics\n\t * consume these read points directly; SessionAPI/CapabilityAPI are\n\t * capability-side contracts with no host display projections.\n\t */\n\t/** Delegates to ResourceLoader.getSkills() on the wrapped session. */\n\tgetSkills(): { skills: Skill[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getPrompts() on the wrapped session. */\n\tgetPrompts(): { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getThemes() on the wrapped session. */\n\tgetThemes(): { themes: ThemeMetaV1[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getAgentsFiles() on the wrapped session. */\n\tgetAgentsFiles(): { agentsFiles: Array<{ path: string; content: string }> };\n\t/** Delegates to ResourceLoader.getSystemPromptSource() on the wrapped session. */\n\tgetSystemPromptSource(): { path: string } | undefined;\n\t/** Delegates to ResourceLoader.getAppendSystemPromptSources() on the wrapped session. */\n\tgetAppendSystemPromptSources(): Array<{ path: string }>;\n\n\t// --- Model/catalog/context read surface (v1 修订, D-047: TUI direct session reads zeroed) ---\n\t/** Delegates to ModelRuntime.getAvailableSnapshot() on the wrapped session (D-047); ModelRuntime itself never leaks. */\n\tgetAvailableModels(): readonly Model<Api>[];\n\t/** Delegates to ModelRuntime.isUsingSubscription() on the wrapped session (D-047). */\n\tisUsingSubscription(providerId: string): boolean;\n\t/** Delegates to ModelRuntime.getError() on the wrapped session (D-047). */\n\tgetModelsError(): string | undefined;\n\t/**\n\t * Narrow `ModelCatalogRuntime` projection of the wrapped session's\n\t * ModelRuntime for the shared catalog-refresh coordinator (D-047). A\n\t * projection, not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelCatalog(): ModelCatalogRuntime;\n\t/** Delegates to ModelRuntime.checkAuth() on the wrapped session (D-047). */\n\tcheckProviderAuth(providerId: string): Promise<AuthCheck | undefined>;\n\t/** Delegates to ModelRuntime.getAuth() on the wrapped session (D-047). */\n\tgetProviderAuth(providerId: string): Promise<AuthResult | undefined>;\n\t/**\n\t * Narrow `ModelPriceSource` projection of the wrapped session's\n\t * ModelRuntime for the cache-stats pure functions (D-047). A projection,\n\t * not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelPriceSource(): ModelPriceSource;\n\t/**\n\t * Delegates to SessionManager.buildContextEntries() on the wrapped session\n\t * (D-047; delegation restored by the D-047 regression fix — the\n\t * incrementally maintained byId index is required for correct context\n\t * paths after a compaction commit). SessionManager itself never leaks.\n\t */\n\tgetContextEntries(): SessionEntry[];\n\n\t// --- Credential/provider auth read surface (v1 修订, D-048: TUI auth host path) ---\n\t/**\n\t * Narrow `ModelAuthRuntime` projection of the wrapped session's ModelRuntime\n\t * for the TUI auth surface (D-048). A projection, not a wrapper: the full\n\t * runtime never leaks. The credential-management CapabilityAPI semantics\n\t * question stays open (D-047 裁决 3); this only narrows the TUI host path.\n\t */\n\tgetModelAuthRuntime(): ModelAuthRuntime;\n\n\t// --- Session stats/text read surface (v1 修订, B-S2b③-S3a: TUI direct\n\t// session stats/text read cluster convergence) ---\n\t/** Delegates to AgentSession.getSteeringMessages(). */\n\tgetSteeringMessages(): readonly string[];\n\t/** Delegates to AgentSession.getFollowUpMessages(). */\n\tgetFollowUpMessages(): readonly string[];\n\n\t// --- Status/settings + export read surface (v1 修订, B-S2b③-S3b+c: TUI\n\t// status/settings/export cluster direct session read convergence) ---\n\t/** Delegates to AgentSession.retryAttempt. */\n\tgetRetryAttempt(): number;\n\t/** Delegates to AgentSession.isBashRunning. */\n\tisBashRunning(): boolean;\n\t/** Delegates to AgentSession.exportToJsonl(). */\n\texportToJsonl(outputPath?: string): string;\n\n\t// --- Lifecycle ---\n\t/** Delegates to AgentSession.dispose(). */\n\tdispose(): Promise<void>;\n}\n\n/** Creates a facade v1 view over one AgentSession. Pure wrapper: holds no state of its own. */\nexport function createCodingAgentFacade(session: AgentSession): CodingAgentFacadeV1 {\n\treturn {\n\t\tversion: 1,\n\t\tprompt: (text, options) => session.prompt(text, options),\n\t\tsteer: (text, images, options) => session.steer(text, images, options),\n\t\tabort: (options) => session.abort(undefined, options),\n\t\tabortAgentTasks: () => session.abortAgentTasks(),\n\t\tgetActiveAgentTaskCount: () => session.getActiveAgentTaskCount(),\n\t\twaitForIdle: () => session.waitForIdle(),\n\t\tcompact: (customInstructions) => session.compact(customInstructions),\n\t\tnavigateTree: (targetId, options) => session.navigateTree(targetId, options),\n\t\treload: (options) => session.reload(options),\n\t\tsetModel: (model, options) => session.setModel(model, options),\n\t\tsetThinkingLevel: (level, options) => session.setThinkingLevel(level, options),\n\t\tsetActiveToolsByName: (toolNames) => session.setActiveToolsByName(toolNames),\n\t\tgetQueuedMessages: () => ({\n\t\t\tsteering: session.getSteeringMessages(),\n\t\t\tfollowUp: session.getFollowUpMessages(),\n\t\t}),\n\t\tclearQueue: () => session.clearQueue(),\n\t\treorderQueuedMessages: (queue, from, to) => session.reorderQueuedMessages(queue, from, to),\n\t\tremoveQueuedMessageAt: (queue, index) => session.removeQueuedMessageAt(queue, index),\n\t\trecordSuiteMismatch: (originalSuiteId, currentSuiteId) =>\n\t\t\tsession.recordSuiteMismatch(originalSuiteId, currentSuiteId),\n\t\tgetSessionAPI: () => session.getSessionAPI(),\n\t\tisIdle: () => session.isIdle,\n\t\tgetState: () => session.state,\n\t\tgetModel: () => session.model,\n\t\tgetToolNames: () => session.getActiveToolNames(),\n\t\tgetSessionId: () => session.sessionId,\n\t\tgetHeader: () => session.sessionManager.getHeader(),\n\t\tsubscribe: (listener) => session.subscribe(listener),\n\t\tsubscribeRawEventGate: (listener) => session.agent.subscribe(() => listener()),\n\t\tgetSessionName: () => session.sessionName,\n\t\tisCompacting: () => session.isCompacting,\n\t\tisStreaming: () => session.isStreaming,\n\t\tgetContextUsage: () => session.getContextUsage(),\n\t\tgetSystemPrompt: () => session.systemPrompt,\n\t\tgetScopedModels: () => session.scopedModels,\n\t\tgetTree: () => session.sessionManager.getTree(),\n\t\tgetLeafId: () => session.sessionManager.getLeafId(),\n\t\tgetPromptTemplates: () => session.promptTemplates,\n\t\tgetToolDefinition: (name) => session.getToolDefinition(name),\n\t\tgetCwd: () => session.sessionManager.getCwd(),\n\t\tgetEntries: () => session.sessionManager.getEntries(),\n\t\tgetPendingMessageCount: () => session.pendingMessageCount,\n\t\tfollowUp: (text, images, options) => session.followUp(text, images, options),\n\t\tsetScopedModels: (scopedModels) => session.setScopedModels(scopedModels),\n\t\tcycleModel: (direction, options) => session.cycleModel(direction, options),\n\t\tcycleThinkingLevel: (options) => session.cycleThinkingLevel(options),\n\t\tsetSteeringMode: (mode) => session.setSteeringMode(mode),\n\t\tsetFollowUpMode: (mode) => session.setFollowUpMode(mode),\n\t\tsetSessionName: (name) => session.setSessionName(name),\n\t\tabortBash: () => session.abortBash(),\n\t\tabortCompaction: () => session.abortCompaction(),\n\t\tabortRetry: () => session.abortRetry(),\n\t\tabortBranchSummary: () => session.abortBranchSummary(),\n\t\tcaptureBashEpoch: () => session.captureBashEpoch(),\n\t\tisBashEpochCurrent: (epoch) => session.isBashEpochCurrent(epoch),\n\t\temitUserBash: (excludeFromContext) => session.emitUserBash(excludeFromContext),\n\t\texecuteBash: (command, onChunk, options) => session.executeBash(command, onChunk, options),\n\t\trecordBashResult: (command, result, options) => session.recordBashResult(command, result, options),\n\t\tgetThinkingLevel: () => session.thinkingLevel,\n\t\tgetSteeringMode: () => session.steeringMode,\n\t\tgetFollowUpMode: () => session.followUpMode,\n\t\tgetSessionFile: () => session.sessionFile,\n\t\tgetAvailableThinkingLevels: () => session.getAvailableThinkingLevels(),\n\t\tgetUserMessagesForForking: () => session.getUserMessagesForForking(),\n\t\tgetLastAssistantText: () => session.getLastAssistantText(),\n\t\tgetSessionStats: () => session.getSessionStats(),\n\t\texportToHtml: (outputPath, options) => session.exportToHtml(outputPath, options),\n\t\tappendLabelChange: (entryId, label) => session.sessionManager.appendLabelChange(entryId, label),\n\t\tgetSkills: () => session.resourceLoader.getSkills(),\n\t\tgetPrompts: () => session.resourceLoader.getPrompts(),\n\t\tgetThemes: () => session.resourceLoader.getThemes(),\n\t\tgetAgentsFiles: () => session.resourceLoader.getAgentsFiles(),\n\t\tgetSystemPromptSource: () => session.resourceLoader.getSystemPromptSource(),\n\t\tgetAppendSystemPromptSources: () => session.resourceLoader.getAppendSystemPromptSources(),\n\t\tgetSuiteId: () => readSessionSuiteBinding(session.getSessionAPI().getBranchEntries())?.suiteId,\n\t\tgetAvailableModels: () => session.modelRuntime.getAvailableSnapshot(),\n\t\tisUsingSubscription: (providerId) => session.modelRuntime.isUsingSubscription(providerId),\n\t\tgetModelsError: () => session.modelRuntime.getError(),\n\t\tgetModelCatalog: () => session.modelRuntime,\n\t\tcheckProviderAuth: (providerId) => session.modelRuntime.checkAuth(providerId),\n\t\tgetProviderAuth: (providerId) => session.modelRuntime.getAuth(providerId),\n\t\tgetModelPriceSource: () => session.modelRuntime,\n\t\tgetModelAuthRuntime: () => session.modelRuntime,\n\t\t// Delegates to the SessionManager method: its incrementally maintained\n\t\t// byId index walks the full entry graph, which rebuild-from-entries\n\t\t// diverges from after a compaction commit (D-047 regression fix).\n\t\tgetContextEntries: () => session.sessionManager.buildContextEntries(),\n\t\tgetSteeringMessages: () => session.getSteeringMessages(),\n\t\tgetFollowUpMessages: () => session.getFollowUpMessages(),\n\t\tgetRetryAttempt: () => session.retryAttempt,\n\t\tisBashRunning: () => session.isBashRunning,\n\t\texportToJsonl: (outputPath) => session.exportToJsonl(outputPath),\n\t\tdispose: () => session.dispose(),\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"coding-agent-facade.js","sourceRoot":"","sources":["../../../src/core/facade/coding-agent-facade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAwUzE,+FAA+F;AAC/F,MAAM,UAAU,uBAAuB,CAAC,OAAqB,EAAuB;IACnF,OAAO;QACN,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC;QACxD,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC;QACtE,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC;QACrD,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,eAAe,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,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,mBAAmB,EAAE;QACrE,mBAAmB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,mBAAmB,EAAE;QACxD,mBAAmB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,mBAAmB,EAAE;QACxD,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,YAAY;QAC3C,aAAa,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,aAAa;QAC1C,aAAa,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC;QAChE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;KAChC,CAAC;AAAA,CACF","sourcesContent":["/**\n * Stable facade v1: a read-only mirror plus pass-through run control and\n * session write paths over one AgentSession.\n *\n * Design: docs/design/稳定门面统一入口设计.md (§2.5 阶段 0 实际面, §2.6 slice 1\n * 读面, §2.7 slice 2 读面, §2.8 阶段 2 写面, §2.9 阶段 3 RPC 面, §3 API 面 v1,\n * §4 阶段 0/1/2/3). Every member is a pure delegate onto the wrapped\n * AgentSession or its existing curated surfaces (`getSessionAPI()`, `host`).\n * No new behavior, no policy, no state of its own. Product entry points\n * (TUI/CLI/RPC/Embedded) migrate onto this surface in later phases;\n * AgentSession stays the internal adapter behind it.\n *\n * Scope: in-package stable surface for those product entry points. It is not\n * exported from the package root and is not a cross-package public contract.\n */\n\nimport type { AgentState, ThinkingLevel } from \"@agent-forge/agent-core\";\nimport type { AuthCheck, AuthResult, ImageContent } from \"@agent-forge/ai\";\nimport type { Api, Model } from \"@agent-forge/ai/compat\";\nimport type { ModelCatalogRuntime } from \"../../modes/interactive/model-catalog-refresh.ts\";\nimport { readSessionSuiteBinding } from \"../../profiles/suite-loader.ts\";\nimport type {\n\tAgentSession,\n\tAgentSessionEventListener,\n\tModelCycleResult,\n\tModelMutationOptions,\n\tPromptOptions,\n\tQueuedInputDisposition,\n\tSessionStats,\n} from \"../agent-session.ts\";\nimport type { CompactionCancelledResult } from \"../agent-session-compaction.ts\";\nimport type { ForkableUserMessage } from \"../agent-session-projection.ts\";\nimport type { BashResult } from \"../bash-executor.ts\";\nimport type { ModelPriceSource } from \"../cache-stats.ts\";\nimport type { CompactionResult } from \"../compaction/index.ts\";\nimport type { ResourceDiagnostic } from \"../diagnostics.ts\";\nimport type { ContextUsage, PromptOutcome, SessionAPI } from \"../extensions/public-api.ts\";\nimport type { InputSource } from \"../input-source.ts\";\nimport type { ModelRuntime } from \"../model-runtime.ts\";\nimport type { PromptTemplate } from \"../prompt-templates.ts\";\nimport type { ThemeMetaV1 } from \"../resource-loader.ts\";\nimport type { BranchSummaryEntry, SessionEntry, SessionHeader, SessionTreeNode } from \"../session-manager.ts\";\nimport type { Skill } from \"../skills.ts\";\nimport type { BashOperations } from \"../tools/bash-operations.ts\";\nimport type { ToolDefinition } from \"../tools/tool-definition.ts\";\n\n/** Prompt options for the facade. Identical to AgentSession PromptOptions. */\nexport type CodingAgentFacadePromptOptionsV1 = PromptOptions;\n\n/**\n * Narrow credential/provider auth projection (D-048): the TUI auth surface\n * only. Covers exactly the seven methods the auth host consumes\n * (`getProviders`/`getProvider`/`getProviderAuthStatus`/`isUsingOAuth`/\n * `listCredentials`/`login`/`logout`); the full ModelRuntime never leaks to\n * the host. The credential-management CapabilityAPI semantics question stays\n * open (D-047 裁决 3); this narrows the TUI host path without deciding it.\n */\nexport type ModelAuthRuntime = Pick<\n\tModelRuntime,\n\t\"getProviders\" | \"getProvider\" | \"getProviderAuthStatus\" | \"isUsingOAuth\" | \"listCredentials\" | \"login\" | \"logout\"\n>;\n\n/**\n * Stable facade v1: the consumption surface for product hosts, versioned per\n * repo convention (EmbeddedSdkBindingV1 precedent). Members are pass-throughs\n * onto the wrapped AgentSession; new members must extend the facade design\n * doc first (门面腐化 guard, 设计 §6).\n */\nexport interface CodingAgentFacadeV1 {\n\treadonly version: 1;\n\n\t// --- Run control ---\n\t/**\n\t * Delegates to AgentSession.prompt(). The full PromptOptions pass through,\n\t * including the internal RPC preflight hook (`preflightResult`) that RPC\n\t * mode uses to observe prompt acceptance (阶段 3, 设计 §2.9).\n\t */\n\tprompt(text: string, options?: CodingAgentFacadePromptOptionsV1): Promise<PromptOutcome>;\n\t/** Delegates to AgentSession.steer(). */\n\tsteer(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.abort(); `cancelAgentTasks: false` stops the\n\t * current turn without cancelling background agent tasks (设计 子代理运行时\n\t * §4.2 中断分级,2026-10-02 — the TUI Esc path always passes false). */\n\tabort(options?: { cancelAgentTasks?: boolean }): Promise<void>;\n\t/** Delegates to AgentSession.abortAgentTasks(): cancel every background agent\n\t * task without aborting the current turn (/stop-agents execution face). */\n\tabortAgentTasks(): void;\n\t/** Delegates to AgentSession.getActiveAgentTaskCount(). */\n\tgetActiveAgentTaskCount(): number;\n\t/** Delegates to AgentSession.waitForIdle(). */\n\twaitForIdle(): Promise<void>;\n\n\t// --- Session write paths ---\n\t/** Delegates to AgentSession.compact(). */\n\tcompact(customInstructions?: string): Promise<CompactionResult | CompactionCancelledResult>;\n\t/** Delegates to AgentSession.navigateTree(). */\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },\n\t): Promise<{ editorText?: string; cancelled: boolean; aborted?: boolean; summaryEntry?: BranchSummaryEntry }>;\n\t/** Delegates to AgentSession.reload(). */\n\treload(options?: { beforeSessionStart?: () => void | Promise<void> }): Promise<void>;\n\t/** Delegates to AgentSession.setModel(). */\n\tsetModel(model: Model<Api>, options?: ModelMutationOptions): Promise<void>;\n\t/** Delegates to AgentSession.setThinkingLevel(). */\n\tsetThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): void;\n\t/** Delegates to AgentSession.setActiveToolsByName(). */\n\tsetActiveToolsByName(toolNames: string[]): void;\n\t/**\n\t * Queued-message read view, composed from AgentSession.getSteeringMessages()\n\t * and AgentSession.getFollowUpMessages(). AgentSession has no single\n\t * getQueuedMessages(); the shape mirrors clearQueue()'s return value.\n\t */\n\tgetQueuedMessages(): { steering: readonly string[]; followUp: readonly string[] };\n\t/** Delegates to AgentSession.clearQueue(). */\n\tclearQueue(): { steering: string[]; followUp: string[] };\n\t/** Delegates to AgentSession.reorderQueuedMessages(): indices refer to the\n\t * queued display lists; a stale or out-of-bounds move returns false. */\n\treorderQueuedMessages(queue: \"steer\" | \"followUp\", from: number, to: number): boolean;\n\t/** Delegates to AgentSession.removeQueuedMessageAt(): removes by queued\n\t * display list index; a stale index returns null. */\n\tremoveQueuedMessageAt(queue: \"steer\" | \"followUp\", index: number): string | null;\n\t/** Delegates to AgentSession.recordSuiteMismatch(). */\n\trecordSuiteMismatch(originalSuiteId: string, currentSuiteId: string): void;\n\t/** Delegates to AgentSession.getSessionAPI(). */\n\tgetSessionAPI(): SessionAPI;\n\n\t// --- Read-only mirror ---\n\t/** Delegates to AgentSession.isIdle. */\n\tisIdle(): boolean;\n\t/** Mirrors AgentSession.state verbatim (phase 0; a projected state view is a later phase, 设计 §3). */\n\tgetState(): AgentState;\n\t/** Delegates to AgentSession.model. */\n\tgetModel(): Model<Api> | undefined;\n\t/** Delegates to AgentSession.getActiveToolNames(). */\n\tgetToolNames(): string[];\n\t/** Delegates to AgentSession.sessionId (via SessionAPI.getSessionId semantics). */\n\tgetSessionId(): string;\n\t/**\n\t * Suite id from the session-suite binding entry (设计 §10.1), read through\n\t * SessionAPI.getBranchEntries(). Undefined when the session carries no\n\t * suite binding.\n\t */\n\tgetSuiteId(): string | undefined;\n\t/** Delegates to AgentSession.sessionManager.getHeader(). SessionManager itself never leaks. */\n\tgetHeader(): SessionHeader | null;\n\t/** Delegates to AgentSession.subscribe(). Event types pass through verbatim (设计 §3). */\n\tsubscribe(listener: AgentSessionEventListener): () => void;\n\t/**\n\t * Invoked after each raw agent event is delivered to session processing;\n\t * the listener is awaited serially by the agent loop and participates in\n\t * run settlement. Exists for stdout backpressure pacing (D-046); the raw\n\t * event payload and abort signal are deliberately not exposed.\n\t */\n\tsubscribeRawEventGate(listener: () => void | Promise<void>): () => void;\n\n\t// --- Read surface (phase 1 slice 1, TUI display/selector reads, 设计 §2.6) ---\n\t/** Delegates to AgentSession.sessionName (which reads sessionManager.getSessionName()). */\n\tgetSessionName(): string | undefined;\n\t/** Delegates to AgentSession.isCompacting: a compaction or branch summarization is running (session level). */\n\tisCompacting(): boolean;\n\t/**\n\t * Delegates to AgentSession.isStreaming: an agent run is active at the\n\t * session level. Distinct from AgentState.isStreaming (agent-level stream\n\t * flag); do not interchange the two.\n\t */\n\tisStreaming(): boolean;\n\t/** Delegates to AgentSession.getContextUsage(). */\n\tgetContextUsage(): ContextUsage | undefined;\n\t/** Delegates to AgentSession.systemPrompt (effective prompt, including per-turn extension modifications). */\n\tgetSystemPrompt(): string;\n\t/** Delegates to AgentSession.scopedModels. Read view only; setScopedModels stays a phase 2 write path. */\n\tgetScopedModels(): ReadonlyArray<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>;\n\t/** Delegates to SessionManager.getTree() on the wrapped session. SessionManager itself never leaks. */\n\tgetTree(): SessionTreeNode[];\n\t/** Delegates to SessionManager.getLeafId() on the wrapped session. SessionManager itself never leaks. */\n\tgetLeafId(): string | null;\n\n\t// --- Read surface (phase 1 slice 2, TUI display/selector cluster convergence, 设计 §2.7) ---\n\t/** Delegates to AgentSession.promptTemplates (file-based prompt templates). */\n\tgetPromptTemplates(): ReadonlyArray<PromptTemplate>;\n\t/** Delegates to AgentSession.getToolDefinition(name): the registered tool definition by name, for diagnostics/rendering. */\n\tgetToolDefinition(name: string): ToolDefinition | undefined;\n\t/** Delegates to SessionManager.getCwd() on the wrapped session; identical to host.cwd. SessionManager itself never leaks. */\n\tgetCwd(): string;\n\t/** Delegates to SessionManager.getEntries() on the wrapped session; identical to host.entries. SessionManager itself never leaks. */\n\tgetEntries(): SessionEntry[];\n\t/** Delegates to AgentSession.pendingMessageCount: queued steering + follow-up message count. */\n\tgetPendingMessageCount(): number;\n\n\t// --- Write surface (phase 2, TUI write path convergence, 设计 §2.8) ---\n\t/** Delegates to AgentSession.followUp(). */\n\tfollowUp(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.setScopedModels(). */\n\tsetScopedModels(scopedModels: Array<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>): void;\n\t/** Delegates to AgentSession.cycleModel(). */\n\tcycleModel(\n\t\tdirection?: \"forward\" | \"backward\",\n\t\toptions?: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\t/** Delegates to AgentSession.cycleThinkingLevel(). */\n\tcycleThinkingLevel(options?: ModelMutationOptions): ThinkingLevel | undefined;\n\t/** Delegates to AgentSession.setSteeringMode(). */\n\tsetSteeringMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setFollowUpMode(). */\n\tsetFollowUpMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setSessionName(). */\n\tsetSessionName(name: string): void;\n\t/** Delegates to AgentSession.abortBash(). */\n\tabortBash(): void;\n\t/** Delegates to AgentSession.abortCompaction(). */\n\tabortCompaction(): void;\n\t/** Delegates to AgentSession.abortRetry(). */\n\tabortRetry(): void;\n\t/** Delegates to AgentSession.abortBranchSummary(). */\n\tabortBranchSummary(): void;\n\t/** Delegates to AgentSession.captureBashEpoch(). */\n\tcaptureBashEpoch(): number;\n\t/** Delegates to AgentSession.isBashEpochCurrent(). */\n\tisBashEpochCurrent(epoch: number): boolean;\n\t/** Delegates to AgentSession.emitUserBash(): dispatches the user.bash lifecycle facts. */\n\temitUserBash(excludeFromContext: boolean): void;\n\t/** Delegates to AgentSession.executeBash(). */\n\texecuteBash(\n\t\tcommand: string,\n\t\tonChunk?: (chunk: string) => void,\n\t\toptions?: { excludeFromContext?: boolean; id?: string; operations?: BashOperations },\n\t): Promise<BashResult>;\n\t/** Delegates to AgentSession.recordBashResult(). */\n\trecordBashResult(\n\t\tcommand: string,\n\t\tresult: BashResult,\n\t\toptions?: { excludeFromContext?: boolean; epoch?: number },\n\t): void;\n\n\t// --- Read surface (phase 3, RPC host state reads, 设计 §2.9) ---\n\t/** Delegates to AgentSession.thinkingLevel. */\n\tgetThinkingLevel(): ThinkingLevel;\n\t/** Delegates to AgentSession.steeringMode. */\n\tgetSteeringMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.followUpMode. */\n\tgetFollowUpMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.sessionFile. */\n\tgetSessionFile(): string | undefined;\n\t/** Delegates to AgentSession.getAvailableThinkingLevels(). */\n\tgetAvailableThinkingLevels(): ThinkingLevel[];\n\t/** Delegates to AgentSession.getUserMessagesForForking(). */\n\tgetUserMessagesForForking(): ForkableUserMessage[];\n\t/** Delegates to AgentSession.getLastAssistantText(). */\n\tgetLastAssistantText(): string | undefined;\n\t/** Delegates to AgentSession.getSessionStats(). */\n\tgetSessionStats(): SessionStats;\n\n\t// --- Write surface (phase 3, RPC host writes, 设计 §2.9) ---\n\t/** Delegates to AgentSession.exportToHtml(), including the themeName option. */\n\texportToHtml(outputPath?: string, options?: { themeName?: string }): Promise<string>;\n\n\t// --- Session write path (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Delegates to SessionManager.appendLabelChange() on the wrapped session.\n\t * TUI tree selector label rename write point; SessionAPI has no label write.\n\t */\n\tappendLabelChange(entryId: string, label: string | undefined): string;\n\n\t// --- Resource read surface (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Clean read projections over the wrapped session's resource loader. Skills/\n\t * prompts/agents-files results pass through verbatim; themes and extensions\n\t * are the metadata projections (themes as ThemeMetaV1 without the modes\n\t * Theme class; loader registration maps and the shared runtime never\n\t * leak). Guard reason: TUI startup listing/autocomplete/diagnostics\n\t * consume these read points directly; SessionAPI/CapabilityAPI are\n\t * capability-side contracts with no host display projections.\n\t */\n\t/** Delegates to ResourceLoader.getSkills() on the wrapped session. */\n\tgetSkills(): { skills: Skill[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getPrompts() on the wrapped session. */\n\tgetPrompts(): { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getThemes() on the wrapped session. */\n\tgetThemes(): { themes: ThemeMetaV1[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getAgentsFiles() on the wrapped session. */\n\tgetAgentsFiles(): { agentsFiles: Array<{ path: string; content: string }> };\n\t/** Delegates to ResourceLoader.getSystemPromptSource() on the wrapped session. */\n\tgetSystemPromptSource(): { path: string } | undefined;\n\t/** Delegates to ResourceLoader.getAppendSystemPromptSources() on the wrapped session. */\n\tgetAppendSystemPromptSources(): Array<{ path: string }>;\n\n\t// --- Model/catalog/context read surface (v1 修订, D-047: TUI direct session reads zeroed) ---\n\t/** Delegates to ModelRuntime.getAvailableSnapshot() on the wrapped session (D-047); ModelRuntime itself never leaks. */\n\tgetAvailableModels(): readonly Model<Api>[];\n\t/** Delegates to ModelRuntime.isUsingSubscription() on the wrapped session (D-047). */\n\tisUsingSubscription(providerId: string): boolean;\n\t/** Delegates to ModelRuntime.getError() on the wrapped session (D-047). */\n\tgetModelsError(): string | undefined;\n\t/**\n\t * Narrow `ModelCatalogRuntime` projection of the wrapped session's\n\t * ModelRuntime for the shared catalog-refresh coordinator (D-047). A\n\t * projection, not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelCatalog(): ModelCatalogRuntime;\n\t/** Delegates to ModelRuntime.checkAuth() on the wrapped session (D-047). */\n\tcheckProviderAuth(providerId: string): Promise<AuthCheck | undefined>;\n\t/** Delegates to ModelRuntime.getAuth() on the wrapped session (D-047). */\n\tgetProviderAuth(providerId: string): Promise<AuthResult | undefined>;\n\t/**\n\t * Narrow `ModelPriceSource` projection of the wrapped session's\n\t * ModelRuntime for the cache-stats pure functions (D-047). A projection,\n\t * not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelPriceSource(): ModelPriceSource;\n\t/**\n\t * Delegates to SessionManager.buildContextEntries() on the wrapped session\n\t * (D-047; delegation restored by the D-047 regression fix — the\n\t * incrementally maintained byId index is required for correct context\n\t * paths after a compaction commit). SessionManager itself never leaks.\n\t */\n\tgetContextEntries(): SessionEntry[];\n\n\t// --- Credential/provider auth read surface (v1 修订, D-048: TUI auth host path) ---\n\t/**\n\t * Narrow `ModelAuthRuntime` projection of the wrapped session's ModelRuntime\n\t * for the TUI auth surface (D-048). A projection, not a wrapper: the full\n\t * runtime never leaks. The credential-management CapabilityAPI semantics\n\t * question stays open (D-047 裁决 3); this only narrows the TUI host path.\n\t */\n\tgetModelAuthRuntime(): ModelAuthRuntime;\n\n\t// --- Session stats/text read surface (v1 修订, B-S2b③-S3a: TUI direct\n\t// session stats/text read cluster convergence) ---\n\t/** Delegates to AgentSession.getSteeringMessages(). */\n\tgetSteeringMessages(): readonly string[];\n\t/** Delegates to AgentSession.getFollowUpMessages(). */\n\tgetFollowUpMessages(): readonly string[];\n\n\t// --- Status/settings + export read surface (v1 修订, B-S2b③-S3b+c: TUI\n\t// status/settings/export cluster direct session read convergence) ---\n\t/** Delegates to AgentSession.retryAttempt. */\n\tgetRetryAttempt(): number;\n\t/** Delegates to AgentSession.isBashRunning. */\n\tisBashRunning(): boolean;\n\t/** Delegates to AgentSession.exportToJsonl(). */\n\texportToJsonl(outputPath?: string): string;\n\n\t// --- Lifecycle ---\n\t/** Delegates to AgentSession.dispose(). */\n\tdispose(): Promise<void>;\n}\n\n/** Creates a facade v1 view over one AgentSession. Pure wrapper: holds no state of its own. */\nexport function createCodingAgentFacade(session: AgentSession): CodingAgentFacadeV1 {\n\treturn {\n\t\tversion: 1,\n\t\tprompt: (text, options) => session.prompt(text, options),\n\t\tsteer: (text, images, options) => session.steer(text, images, options),\n\t\tabort: (options) => session.abort(undefined, options),\n\t\tabortAgentTasks: () => session.abortAgentTasks(),\n\t\tgetActiveAgentTaskCount: () => session.getActiveAgentTaskCount(),\n\t\twaitForIdle: () => session.waitForIdle(),\n\t\tcompact: (customInstructions) => session.compact(customInstructions),\n\t\tnavigateTree: (targetId, options) => session.navigateTree(targetId, options),\n\t\treload: (options) => session.reload(options),\n\t\tsetModel: (model, options) => session.setModel(model, options),\n\t\tsetThinkingLevel: (level, options) => session.setThinkingLevel(level, options),\n\t\tsetActiveToolsByName: (toolNames) => session.setActiveToolsByName(toolNames),\n\t\tgetQueuedMessages: () => ({\n\t\t\tsteering: session.getSteeringMessages(),\n\t\t\tfollowUp: session.getFollowUpMessages(),\n\t\t}),\n\t\tclearQueue: () => session.clearQueue(),\n\t\treorderQueuedMessages: (queue, from, to) => session.reorderQueuedMessages(queue, from, to),\n\t\tremoveQueuedMessageAt: (queue, index) => session.removeQueuedMessageAt(queue, index),\n\t\trecordSuiteMismatch: (originalSuiteId, currentSuiteId) =>\n\t\t\tsession.recordSuiteMismatch(originalSuiteId, currentSuiteId),\n\t\tgetSessionAPI: () => session.getSessionAPI(),\n\t\tisIdle: () => session.isIdle,\n\t\tgetState: () => session.state,\n\t\tgetModel: () => session.model,\n\t\tgetToolNames: () => session.getActiveToolNames(),\n\t\tgetSessionId: () => session.sessionId,\n\t\tgetHeader: () => session.sessionManager.getHeader(),\n\t\tsubscribe: (listener) => session.subscribe(listener),\n\t\tsubscribeRawEventGate: (listener) => session.agent.subscribe(() => listener()),\n\t\tgetSessionName: () => session.sessionName,\n\t\tisCompacting: () => session.isCompacting,\n\t\tisStreaming: () => session.isStreaming,\n\t\tgetContextUsage: () => session.getContextUsage(),\n\t\tgetSystemPrompt: () => session.systemPrompt,\n\t\tgetScopedModels: () => session.scopedModels,\n\t\tgetTree: () => session.sessionManager.getTree(),\n\t\tgetLeafId: () => session.sessionManager.getLeafId(),\n\t\tgetPromptTemplates: () => session.promptTemplates,\n\t\tgetToolDefinition: (name) => session.getToolDefinition(name),\n\t\tgetCwd: () => session.sessionManager.getCwd(),\n\t\tgetEntries: () => session.sessionManager.getEntries(),\n\t\tgetPendingMessageCount: () => session.pendingMessageCount,\n\t\tfollowUp: (text, images, options) => session.followUp(text, images, options),\n\t\tsetScopedModels: (scopedModels) => session.setScopedModels(scopedModels),\n\t\tcycleModel: (direction, options) => session.cycleModel(direction, options),\n\t\tcycleThinkingLevel: (options) => session.cycleThinkingLevel(options),\n\t\tsetSteeringMode: (mode) => session.setSteeringMode(mode),\n\t\tsetFollowUpMode: (mode) => session.setFollowUpMode(mode),\n\t\tsetSessionName: (name) => session.setSessionName(name),\n\t\tabortBash: () => session.abortBash(),\n\t\tabortCompaction: () => session.abortCompaction(),\n\t\tabortRetry: () => session.abortRetry(),\n\t\tabortBranchSummary: () => session.abortBranchSummary(),\n\t\tcaptureBashEpoch: () => session.captureBashEpoch(),\n\t\tisBashEpochCurrent: (epoch) => session.isBashEpochCurrent(epoch),\n\t\temitUserBash: (excludeFromContext) => session.emitUserBash(excludeFromContext),\n\t\texecuteBash: (command, onChunk, options) => session.executeBash(command, onChunk, options),\n\t\trecordBashResult: (command, result, options) => session.recordBashResult(command, result, options),\n\t\tgetThinkingLevel: () => session.thinkingLevel,\n\t\tgetSteeringMode: () => session.steeringMode,\n\t\tgetFollowUpMode: () => session.followUpMode,\n\t\tgetSessionFile: () => session.sessionFile,\n\t\tgetAvailableThinkingLevels: () => session.getAvailableThinkingLevels(),\n\t\tgetUserMessagesForForking: () => session.getUserMessagesForForking(),\n\t\tgetLastAssistantText: () => session.getLastAssistantText(),\n\t\tgetSessionStats: () => session.getSessionStats(),\n\t\texportToHtml: (outputPath, options) => session.exportToHtml(outputPath, options),\n\t\tappendLabelChange: (entryId, label) => session.sessionManager.appendLabelChange(entryId, label),\n\t\tgetSkills: () => session.resourceLoader.getSkills(),\n\t\tgetPrompts: () => session.resourceLoader.getPrompts(),\n\t\tgetThemes: () => session.resourceLoader.getThemes(),\n\t\tgetAgentsFiles: () => session.resourceLoader.getAgentsFiles(),\n\t\tgetSystemPromptSource: () => session.resourceLoader.getSystemPromptSource(),\n\t\tgetAppendSystemPromptSources: () => session.resourceLoader.getAppendSystemPromptSources(),\n\t\tgetSuiteId: () => readSessionSuiteBinding(session.getSessionAPI().getBranchEntries())?.suiteId,\n\t\tgetAvailableModels: () => session.modelRuntime.getAvailableSnapshot(),\n\t\tisUsingSubscription: (providerId) => session.modelRuntime.isUsingSubscription(providerId),\n\t\tgetModelsError: () => session.modelRuntime.getError(),\n\t\tgetModelCatalog: () => session.modelRuntime,\n\t\tcheckProviderAuth: (providerId) => session.modelRuntime.checkAuth(providerId),\n\t\tgetProviderAuth: (providerId) => session.modelRuntime.getAuth(providerId),\n\t\tgetModelPriceSource: () => session.modelRuntime,\n\t\tgetModelAuthRuntime: () => session.modelRuntime,\n\t\t// Delegates to the SessionManager method: its incrementally maintained\n\t\t// byId index walks the full entry graph, which rebuild-from-entries\n\t\t// diverges from after a compaction commit (D-047 regression fix).\n\t\tgetContextEntries: () => session.sessionManager.buildContextEntries(),\n\t\tgetSteeringMessages: () => session.getSteeringMessages(),\n\t\tgetFollowUpMessages: () => session.getFollowUpMessages(),\n\t\tgetRetryAttempt: () => session.retryAttempt,\n\t\tisBashRunning: () => session.isBashRunning,\n\t\texportToJsonl: (outputPath) => session.exportToJsonl(outputPath),\n\t\tdispose: () => session.dispose(),\n\t};\n}\n"]}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* 模型提供商装配(provider-composer.ts / model-*.ts)、内置工具校验(tools/)、
|
|
7
7
|
* 包安装宿主与导出(package-*.ts / session-export.ts)。
|
|
8
8
|
* key 为英文原文(与调用点逐字一致),占位符 `{name}` 原样保留。
|
|
9
|
-
* 机器匹配串不在此域:"aborted"、`timeout:` 前缀(tools/bash.ts
|
|
9
|
+
* 机器匹配串不在此域:"aborted"、`timeout:` 前缀(tools/bash-operations.ts 经 bash 工具定义精确消费)、
|
|
10
10
|
* "authHeader requires a resolved API key"(cause.message 精确匹配,保护清单)。
|
|
11
11
|
*/
|
|
12
12
|
export declare const coreContractCore: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-contract-core.d.ts","sourceRoot":"","sources":["../../../../../src/core/i18n/locales/zh-cn/core-contract-core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6MnD,CAAC","sourcesContent":["/**\n * core-contract-core 域词典(批次⑨b):core 根层(不含 extensions/)与\n * agent-capability-contract 的 throw 契约错误文案。覆盖范围:能力契约 V1\n * 校验(agent-capability-contract.ts)、会话管理与压缩提交协议(session-manager.ts)、\n * 会话运行时守卫(agent-session*.ts)、embedded SDK 绑定(embedded-sdk.ts)、\n * 模型提供商装配(provider-composer.ts / model-*.ts)、内置工具校验(tools/)、\n * 包安装宿主与导出(package-*.ts / session-export.ts)。\n * key 为英文原文(与调用点逐字一致),占位符 `{name}` 原样保留。\n * 机器匹配串不在此域:\"aborted\"、`timeout:` 前缀(tools/bash.ts 精确消费)、\n * \"authHeader requires a resolved API key\"(cause.message 精确匹配,保护清单)。\n */\nexport const coreContractCore: Record<string, string> = {\n\t// ---- agent-capability-contract.ts:通用断言辅助(label 为字段路径,保持原文)----\n\t\"{label} must be a plain object\": \"{label} 必须是普通对象\",\n\t\"{label} has unsupported fields: {fields}\": \"{label} 包含不支持的字段:{fields}\",\n\t\"{label} is missing required field: {key}\": \"{label} 缺少必填字段:{key}\",\n\t\"{label} must be a non-empty string\": \"{label} 必须是非空字符串\",\n\t\"{label} must be a positive safe integer\": \"{label} 必须是正的安全整数\",\n\t\"{label} must be a non-negative safe integer\": \"{label} 必须是非负安全整数\",\n\t\"{label} must contain finite JSON numbers\": \"{label} 必须只包含有限 JSON 数字\",\n\t\"{label} must be JSON-compatible\": \"{label} 必须兼容 JSON\",\n\t\"{label} must not contain cycles\": \"{label} 不得包含循环引用\",\n\t\"{label} must contain only plain JSON objects\": \"{label} 必须只包含普通 JSON 对象\",\n\t\"{label} must be an array\": \"{label} 必须是数组\",\n\t\"{label} must not contain duplicates\": \"{label} 不得包含重复项\",\n\t\"{label} is invalid\": \"{label} 无效\",\n\t\"{label} contains duplicate capability: {capability}\": \"{label} 包含重复能力:{capability}\",\n\n\t// ---- agent-capability-contract.ts:Host context / 契约兼容性 ----\n\t\"Host context.mode is invalid\": \"Host context.mode 无效\",\n\t\"Host context.features must be an array\": \"Host context.features 必须是数组\",\n\t\"Host context.features must not contain duplicates\": \"Host context.features 不得包含重复项\",\n\t\"Host context.transports must be an array\": \"Host context.transports 必须是数组\",\n\t\"Host context.transports must not contain duplicates\": \"Host context.transports 不得包含重复项\",\n\t\"Contract compatibility result.version must be 1\": \"Contract compatibility result.version 必须为 1\",\n\t\"Contract compatibility result.compatible must be boolean\": \"Contract compatibility result.compatible 必须是布尔值\",\n\t\"Contract compatibility result.issues must be an array\": \"Contract compatibility result.issues 必须是数组\",\n\t\"Contract compatibility result.compatible must be false when issues exist\":\n\t\t\"存在 issue 时 Contract compatibility result.compatible 必须为 false\",\n\t\"Contract compatibility result.compatible must be true when no issues exist\":\n\t\t\"不存在 issue 时 Contract compatibility result.compatible 必须为 true\",\n\t\"Contract compatibility result.issues[{index}].code is invalid\":\n\t\t\"Contract compatibility result.issues[{index}].code 无效\",\n\t\"Contract compatibility result.issues[{index}].missingFeatures must be strings\":\n\t\t\"Contract compatibility result.issues[{index}].missingFeatures 必须是字符串\",\n\t\"Contract compatibility result.issues[{index}].missingTransports must be strings\":\n\t\t\"Contract compatibility result.issues[{index}].missingTransports 必须是字符串\",\n\t\"Agent capability contract.contractId must be {contractId}\":\n\t\t\"Agent capability contract.contractId 必须为 {contractId}\",\n\t\"Agent capability contract.version must be 1\": \"Agent capability contract.version 必须为 1\",\n\t\"Agent profile.optionalPlugins must not overlap requiredPlugins\":\n\t\t\"Agent profile.optionalPlugins 不得与 requiredPlugins 重叠\",\n\t\"Artifact reference.truncated must be boolean\": \"Artifact reference.truncated 必须是布尔值\",\n\n\t// ---- agent-capability-contract.ts:快照与信封校验(字段路径原样)----\n\t\"Agent definition snapshot.version must be 1\": \"Agent definition snapshot.version 必须为 1\",\n\t\"Agent instance snapshot.version must be 1\": \"Agent instance snapshot.version 必须为 1\",\n\t\"Agent instance snapshot.status is invalid\": \"Agent instance snapshot.status 无效\",\n\t\"Session revision.version must be 1\": \"Session revision.version 必须为 1\",\n\t\"Session revision.leafId is required\": \"Session revision.leafId 是必填项\",\n\t\"Session snapshot.version must be 1\": \"Session snapshot.version 必须为 1\",\n\t\"Session snapshot.revision.sessionId must match sessionId\":\n\t\t\"Session snapshot.revision.sessionId 必须与 sessionId 一致\",\n\t\"Error envelope.version must be 1\": \"Error envelope.version 必须为 1\",\n\t\"Error envelope.message must be a string\": \"Error envelope.message 必须是字符串\",\n\t\"Error envelope.retryable must be a boolean\": \"Error envelope.retryable 必须是布尔值\",\n\t\"Operation terminal is missing required field: version or status\":\n\t\t\"Operation terminal 缺少必填字段:version 或 status\",\n\t\"Operation terminal.version must be 1\": \"Operation terminal.version 必须为 1\",\n\t\"Operation snapshot.version must be 1\": \"Operation snapshot.version 必须为 1\",\n\t\"Operation snapshot.status is invalid\": \"Operation snapshot.status 无效\",\n\t\"Operation snapshot active status must not have a terminal\": \"Operation snapshot 处于活动状态时不得携带 terminal\",\n\t\"Operation snapshot terminal status requires a terminal\": \"Operation snapshot 处于终态时必须有 terminal\",\n\t\"Operation snapshot.terminal.status must match status\": \"Operation snapshot.terminal.status 必须与 status 一致\",\n\t\"Operation snapshot.inputRevision.sessionId must match sessionId\":\n\t\t\"Operation snapshot.inputRevision.sessionId 必须与 sessionId 一致\",\n\t\"Command request.version must be 1\": \"Command request.version 必须为 1\",\n\t\"Command request.expectedRevision.sessionId does not match target\":\n\t\t\"Command request.expectedRevision.sessionId 与 target 不匹配\",\n\t\"Command admission.version must be 1\": \"Command admission.version 必须为 1\",\n\t\"Command admission.status is invalid\": \"Command admission.status 无效\",\n\t\"Command admission accepted status requires an operation\": \"Command admission 为 accepted 状态时必须有 operation\",\n\t\"Command admission rejected status requires an error\": \"Command admission 为 rejected 状态时必须有 error\",\n\t\"Event envelope.version must be 1\": \"Event envelope.version 必须为 1\",\n\t\"Event envelope.category is invalid\": \"Event envelope.category 无效\",\n\t\"Event envelope.deliveryGuarantee is invalid\": \"Event envelope.deliveryGuarantee 无效\",\n\t\"Event envelope.correlationId requires a real operationId\": \"Event envelope.correlationId 需要真实的 operationId\",\n\t\"Event envelope.operationId requires correlationId\": \"Event envelope.operationId 需要 correlationId\",\n\n\t// ---- agent-capability-contract.ts:命令操作注册表与规范向量 ----\n\t\"Operation is not retained: {operationId}\": \"操作未被保留:{operationId}\",\n\t\"Operation already has a different terminal result: {operationId}\": \"操作已有不同的终态结果:{operationId}\",\n\t\"Canonical contract vector admission failed\": \"规范契约向量准入失败\",\n\t\"Canonical contract failed vector admission failed\": \"规范契约失败向量准入失败\",\n\t\"Canonical contract timeout vector admission failed\": \"规范契约超时向量准入失败\",\n\n\t// ---- session-manager.ts:JSON 序列化断言(field 为字段名,保持原文)----\n\t\"{field} must be JSON-serializable: non-finite number at {path}\":\n\t\t\"{field} 必须可 JSON 序列化:{path} 处存在非有限数字\",\n\t\"{field} must be JSON-serializable: unsupported value at {path}\":\n\t\t\"{field} 必须可 JSON 序列化:{path} 处存在不支持的值\",\n\t\"{field} must be JSON-serializable: cyclic value at {path}\": \"{field} 必须可 JSON 序列化:{path} 处存在循环引用值\",\n\t\"{field} must be JSON-serializable: non-plain object at {path}\":\n\t\t\"{field} 必须可 JSON 序列化:{path} 处存在非普通对象\",\n\t\"{field} must be JSON-serializable: symbol key at {path}\": \"{field} 必须可 JSON 序列化:{path} 处存在 symbol 键\",\n\t\"{field} must be JSON-serializable: accessor at {path}\": \"{field} 必须可 JSON 序列化:{path} 处存在访问器属性\",\n\n\t// ---- session-manager.ts:压缩提交协议校验(机器可读协议错误,照译;字段名原样)----\n\t\"Compaction commit request must be an object\": \"压缩提交请求必须是对象\",\n\t\"Unsupported compaction commit request version\": \"不支持的压缩提交请求版本\",\n\t\"operationId must be a non-empty string\": \"operationId 必须是非空字符串\",\n\t\"summary must be a non-empty string\": \"summary 必须是非空字符串\",\n\t\"firstKeptEntryId must be a non-empty string\": \"firstKeptEntryId 必须是非空字符串\",\n\t\"tokensBefore must be a non-negative finite number\": \"tokensBefore 必须是非负有限数字\",\n\t\"expectedRevision must be a valid SessionRevisionV1\": \"expectedRevision 必须是有效的 SessionRevisionV1\",\n\t\"operation_id_reused: {operationId}\": \"operation_id_reused:{operationId}\",\n\t\"first_kept_entry_not_on_current_branch: {firstKeptEntryId}\":\n\t\t\"first_kept_entry_not_on_current_branch:{firstKeptEntryId}\",\n\t\"Compaction operation entry is missing: {entryId}\": \"压缩操作条目缺失:{entryId}\",\n\n\t// ---- session-manager.ts / agent-session-compaction.ts:条目定位 ----\n\t\"Entry {id} not found\": \"未找到条目 {id}\",\n\n\t// ---- agent-session*.ts:会话运行时守卫 ----\n\t\"Capability runtime is not available\": \"能力运行时不可用\",\n\t\"Capability runtime is not initialized for provider request\": \"提供程序请求的能力运行时尚未初始化\",\n\t\"Session reload is already in progress\": \"会话重载已在进行中\",\n\t\"Session reload did not commit a generation\": \"会话重载未提交新代号\",\n\t\"Session context commit requires a message array\": \"会话上下文提交需要消息数组\",\n\t\"Context commit cancelled\": \"上下文提交已取消\",\n\t\"Context commit operationId is required\": \"上下文提交需要 operationId\",\n\t\"Context revision conflict: expected {expected}, current {current}\":\n\t\t\"上下文修订冲突:期望 {expected},当前 {current}\",\n\t\"Unsupported session export format: {format}\": \"不支持的会话导出格式:{format}\",\n\t\"Capability plugin manifest is already loaded: {path}\": \"能力插件 manifest 已加载:{path}\",\n\t\"Capability plugin is already loaded in this session: {id}\": \"该会话中能力插件已加载:{id}\",\n\t\"Capability plugin manifest path is unavailable: {id}\": \"能力插件 manifest 路径不可用:{id}\",\n\t\"Agent is already processing. Specify streamingBehavior ('steer' or 'followUp') to queue the message.\":\n\t\t\"Agent 正在处理中。请指定 streamingBehavior('steer' 或 'followUp')来排队消息。\",\n\t\"Command is registered by both CapabilityAPI and {source}: {command}\":\n\t\t\"命令同时被 CapabilityAPI 和 {source} 注册:{command}\",\n\n\t// ---- agent-session-compaction.ts:压缩策略与提交 ----\n\t\"Compaction policy returned an invalid preparation: {policyName}\": \"压缩策略返回了无效的准备结果:{policyName}\",\n\t\"Compaction commit revision conflict: expected {expectedSequence}/{expectedLeafId}, current {currentSequence}/{currentLeafId}\":\n\t\t\"压缩提交修订冲突:期望 {expectedSequence}/{expectedLeafId},当前 {currentSequence}/{currentLeafId}\",\n\t\"Compaction commit entry is unavailable: {entryId}\": \"压缩提交条目不可用:{entryId}\",\n\n\t// ---- agent-session-context.ts:上下文策略与转换 ----\n\t\"Context strategy is not configured\": \"未配置上下文策略\",\n\t\"Cannot {operation} while the session is running\": \"会话运行中无法执行 {operation}\",\n\t\"Session is disposed; context transition was cancelled\": \"会话已销毁;上下文转换已取消\",\n\t\"Session reload in progress; context transition was cancelled\": \"会话重载进行中;上下文转换已取消\",\n\t\"Context transition was superseded\": \"上下文转换已被取代\",\n\t\"Context strategy must return an AgentMessage array: {strategyName}\":\n\t\t\"上下文策略必须返回 AgentMessage 数组:{strategyName}\",\n\t\"Context transition requires an AgentMessage array: {strategyName}\":\n\t\t\"上下文转换需要 AgentMessage 数组:{strategyName}\",\n\t\"Context strategy must return structured-cloneable AgentMessage values: {strategyName}\":\n\t\t\"上下文策略必须返回可结构化克隆的 AgentMessage 值:{strategyName}\",\n\t\"Context transition requires structured-cloneable AgentMessage values: {strategyName}\":\n\t\t\"上下文转换需要可结构化克隆的 AgentMessage 值:{strategyName}\",\n\n\t// ---- agent-session-bash.ts / agent-session-runtime.ts ----\n\t\"Session is disposed; bash execution is unavailable\": \"会话已销毁;bash 执行不可用\",\n\t\"Session is disposed; bash results cannot be recorded\": \"会话已销毁;无法记录 bash 结果\",\n\t\"Invalid entry ID for forking\": \"用于分叉的条目 ID 无效\",\n\t\"Persisted session is missing a session file\": \"持久化会话缺少会话文件\",\n\n\t// ---- embedded-sdk.ts ----\n\t\"Embedded SDK binding is disposed: {label}\": \"Embedded SDK 绑定已销毁:{label}\",\n\t\"Embedded SDK run input must be JSON-compatible\": \"Embedded SDK 运行输入必须兼容 JSON\",\n\t\"Embedded SDK session requires revision support\": \"Embedded SDK 会话需要修订支持\",\n\t\"Embedded SDK has no defined Agent: {id}@{version}\": \"Embedded SDK 没有已定义的 Agent:{id}@{version}\",\n\t\"Embedded SDK lease does not belong to Agent instance: {id}\": \"Embedded SDK 租约不属于该 Agent 实例:{id}\",\n\t\"Embedded SDK disposal failed\": \"Embedded SDK 销毁失败\",\n\n\t// ---- agent-session.ts / agent-session-compaction.ts:认证重试提示(批次⑥调用点遗留缺失,本批补齐)----\n\t\"Authentication failed for \\\"{provider}\\\". Credentials may have expired or network is unavailable. Run '/login {provider}' to re-authenticate.\":\n\t\t\"\\\"{provider}\\\" 认证失败。凭证可能已过期或网络不可用。请运行 '/login {provider}' 重新认证。\",\n\n\t// ---- provider-composer.ts / model-registry.ts / model-runtime.ts ----\n\t'Provider {providerId}: \"api\" is required when registering streamSimple.':\n\t\t'提供商 {providerId}:注册 streamSimple 时必须指定 \"api\"。',\n\t\"No API provider registered for api: {api}\": \"未注册 api 为 {api} 的 API 提供商\",\n\t\"Provider config is required when registering by name\": \"按名称注册时必须提供提供商配置\",\n\t\"Provider id must not be empty.\": \"Provider id 不能为空。\",\n\n\t// ---- tools/:内置工具校验与命令状态 ----\n\t\"Invalid timeout: must be a finite number of seconds\": \"无效的超时值:必须是有限秒数\",\n\t\"Invalid timeout: maximum is {maxSeconds} seconds\": \"无效的超时值:最大为 {maxSeconds} 秒\",\n\t\"Working directory does not exist: {cwd}\\nCannot execute {shellName} commands.\":\n\t\t\"工作目录不存在:{cwd}\\n无法执行 {shellName} 命令。\",\n\t\"Command aborted\": \"命令已中止\",\n\t\"Command timed out after {seconds} seconds\": \"命令在 {seconds} 秒后超时\",\n\t\"Command terminated without an exit code\": \"命令结束时没有退出码\",\n\t\"Command exited with code {exitCode}\": \"命令退出码为 {exitCode}\",\n\t\"Replacement range is outside the base content.\": \"替换范围超出基准内容。\",\n\t\"Cannot preserve unchanged lines because the base content has a different line count.\":\n\t\t\"基准内容行数不同,无法保留未变更的行。\",\n\t\"edits[{previousIndex}] and edits[{currentIndex}] overlap in {path}. Merge them into one edit or target disjoint regions.\":\n\t\t\"{path} 中 edits[{previousIndex}] 与 edits[{currentIndex}] 重叠。请合并为一个编辑或改为不相交的区域。\",\n\t\"Edit tool input is invalid. edits must contain at least one replacement.\":\n\t\t\"Edit 工具输入无效。edits 必须至少包含一个替换。\",\n\t\"Could not edit file: {path}. {errorMessage}.\": \"无法编辑文件:{path}。{errorMessage}。\",\n\t\"Unknown tool name: {toolName}\": \"未知工具名:{toolName}\",\n\t\"Offset {offset} is beyond end of file ({totalLines} lines total)\":\n\t\t\"偏移 {offset} 超出文件末尾(共 {totalLines} 行)\",\n\t\"Cannot append to a finished output accumulator\": \"无法向已完成的输出累加器追加数据\",\n\n\t// ---- logger.ts / package-install-host.ts / package-resource-collection.ts / session-export.ts ----\n\t\"Host logger level must be one of {levels}; got {value}\": \"Host logger level 必须是 {levels} 之一;实际为 {value}\",\n\t\"Missing git install root\": \"缺少 git 安装根目录\",\n\t\"Refusing to use path outside package install root: {path}\": \"拒绝使用包安装根目录之外的路径:{path}\",\n\t\"Unknown resource type: {resourceType}\": \"未知资源类型:{resourceType}\",\n\t\"Cannot export a session without a session header\": \"没有会话头信息,无法导出会话\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"core-contract-core.d.ts","sourceRoot":"","sources":["../../../../../src/core/i18n/locales/zh-cn/core-contract-core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6MnD,CAAC","sourcesContent":["/**\n * core-contract-core 域词典(批次⑨b):core 根层(不含 extensions/)与\n * agent-capability-contract 的 throw 契约错误文案。覆盖范围:能力契约 V1\n * 校验(agent-capability-contract.ts)、会话管理与压缩提交协议(session-manager.ts)、\n * 会话运行时守卫(agent-session*.ts)、embedded SDK 绑定(embedded-sdk.ts)、\n * 模型提供商装配(provider-composer.ts / model-*.ts)、内置工具校验(tools/)、\n * 包安装宿主与导出(package-*.ts / session-export.ts)。\n * key 为英文原文(与调用点逐字一致),占位符 `{name}` 原样保留。\n * 机器匹配串不在此域:\"aborted\"、`timeout:` 前缀(tools/bash-operations.ts 经 bash 工具定义精确消费)、\n * \"authHeader requires a resolved API key\"(cause.message 精确匹配,保护清单)。\n */\nexport const coreContractCore: Record<string, string> = {\n\t// ---- agent-capability-contract.ts:通用断言辅助(label 为字段路径,保持原文)----\n\t\"{label} must be a plain object\": \"{label} 必须是普通对象\",\n\t\"{label} has unsupported fields: {fields}\": \"{label} 包含不支持的字段:{fields}\",\n\t\"{label} is missing required field: {key}\": \"{label} 缺少必填字段:{key}\",\n\t\"{label} must be a non-empty string\": \"{label} 必须是非空字符串\",\n\t\"{label} must be a positive safe integer\": \"{label} 必须是正的安全整数\",\n\t\"{label} must be a non-negative safe integer\": \"{label} 必须是非负安全整数\",\n\t\"{label} must contain finite JSON numbers\": \"{label} 必须只包含有限 JSON 数字\",\n\t\"{label} must be JSON-compatible\": \"{label} 必须兼容 JSON\",\n\t\"{label} must not contain cycles\": \"{label} 不得包含循环引用\",\n\t\"{label} must contain only plain JSON objects\": \"{label} 必须只包含普通 JSON 对象\",\n\t\"{label} must be an array\": \"{label} 必须是数组\",\n\t\"{label} must not contain duplicates\": \"{label} 不得包含重复项\",\n\t\"{label} is invalid\": \"{label} 无效\",\n\t\"{label} contains duplicate capability: {capability}\": \"{label} 包含重复能力:{capability}\",\n\n\t// ---- agent-capability-contract.ts:Host context / 契约兼容性 ----\n\t\"Host context.mode is invalid\": \"Host context.mode 无效\",\n\t\"Host context.features must be an array\": \"Host context.features 必须是数组\",\n\t\"Host context.features must not contain duplicates\": \"Host context.features 不得包含重复项\",\n\t\"Host context.transports must be an array\": \"Host context.transports 必须是数组\",\n\t\"Host context.transports must not contain duplicates\": \"Host context.transports 不得包含重复项\",\n\t\"Contract compatibility result.version must be 1\": \"Contract compatibility result.version 必须为 1\",\n\t\"Contract compatibility result.compatible must be boolean\": \"Contract compatibility result.compatible 必须是布尔值\",\n\t\"Contract compatibility result.issues must be an array\": \"Contract compatibility result.issues 必须是数组\",\n\t\"Contract compatibility result.compatible must be false when issues exist\":\n\t\t\"存在 issue 时 Contract compatibility result.compatible 必须为 false\",\n\t\"Contract compatibility result.compatible must be true when no issues exist\":\n\t\t\"不存在 issue 时 Contract compatibility result.compatible 必须为 true\",\n\t\"Contract compatibility result.issues[{index}].code is invalid\":\n\t\t\"Contract compatibility result.issues[{index}].code 无效\",\n\t\"Contract compatibility result.issues[{index}].missingFeatures must be strings\":\n\t\t\"Contract compatibility result.issues[{index}].missingFeatures 必须是字符串\",\n\t\"Contract compatibility result.issues[{index}].missingTransports must be strings\":\n\t\t\"Contract compatibility result.issues[{index}].missingTransports 必须是字符串\",\n\t\"Agent capability contract.contractId must be {contractId}\":\n\t\t\"Agent capability contract.contractId 必须为 {contractId}\",\n\t\"Agent capability contract.version must be 1\": \"Agent capability contract.version 必须为 1\",\n\t\"Agent profile.optionalPlugins must not overlap requiredPlugins\":\n\t\t\"Agent profile.optionalPlugins 不得与 requiredPlugins 重叠\",\n\t\"Artifact reference.truncated must be boolean\": \"Artifact reference.truncated 必须是布尔值\",\n\n\t// ---- agent-capability-contract.ts:快照与信封校验(字段路径原样)----\n\t\"Agent definition snapshot.version must be 1\": \"Agent definition snapshot.version 必须为 1\",\n\t\"Agent instance snapshot.version must be 1\": \"Agent instance snapshot.version 必须为 1\",\n\t\"Agent instance snapshot.status is invalid\": \"Agent instance snapshot.status 无效\",\n\t\"Session revision.version must be 1\": \"Session revision.version 必须为 1\",\n\t\"Session revision.leafId is required\": \"Session revision.leafId 是必填项\",\n\t\"Session snapshot.version must be 1\": \"Session snapshot.version 必须为 1\",\n\t\"Session snapshot.revision.sessionId must match sessionId\":\n\t\t\"Session snapshot.revision.sessionId 必须与 sessionId 一致\",\n\t\"Error envelope.version must be 1\": \"Error envelope.version 必须为 1\",\n\t\"Error envelope.message must be a string\": \"Error envelope.message 必须是字符串\",\n\t\"Error envelope.retryable must be a boolean\": \"Error envelope.retryable 必须是布尔值\",\n\t\"Operation terminal is missing required field: version or status\":\n\t\t\"Operation terminal 缺少必填字段:version 或 status\",\n\t\"Operation terminal.version must be 1\": \"Operation terminal.version 必须为 1\",\n\t\"Operation snapshot.version must be 1\": \"Operation snapshot.version 必须为 1\",\n\t\"Operation snapshot.status is invalid\": \"Operation snapshot.status 无效\",\n\t\"Operation snapshot active status must not have a terminal\": \"Operation snapshot 处于活动状态时不得携带 terminal\",\n\t\"Operation snapshot terminal status requires a terminal\": \"Operation snapshot 处于终态时必须有 terminal\",\n\t\"Operation snapshot.terminal.status must match status\": \"Operation snapshot.terminal.status 必须与 status 一致\",\n\t\"Operation snapshot.inputRevision.sessionId must match sessionId\":\n\t\t\"Operation snapshot.inputRevision.sessionId 必须与 sessionId 一致\",\n\t\"Command request.version must be 1\": \"Command request.version 必须为 1\",\n\t\"Command request.expectedRevision.sessionId does not match target\":\n\t\t\"Command request.expectedRevision.sessionId 与 target 不匹配\",\n\t\"Command admission.version must be 1\": \"Command admission.version 必须为 1\",\n\t\"Command admission.status is invalid\": \"Command admission.status 无效\",\n\t\"Command admission accepted status requires an operation\": \"Command admission 为 accepted 状态时必须有 operation\",\n\t\"Command admission rejected status requires an error\": \"Command admission 为 rejected 状态时必须有 error\",\n\t\"Event envelope.version must be 1\": \"Event envelope.version 必须为 1\",\n\t\"Event envelope.category is invalid\": \"Event envelope.category 无效\",\n\t\"Event envelope.deliveryGuarantee is invalid\": \"Event envelope.deliveryGuarantee 无效\",\n\t\"Event envelope.correlationId requires a real operationId\": \"Event envelope.correlationId 需要真实的 operationId\",\n\t\"Event envelope.operationId requires correlationId\": \"Event envelope.operationId 需要 correlationId\",\n\n\t// ---- agent-capability-contract.ts:命令操作注册表与规范向量 ----\n\t\"Operation is not retained: {operationId}\": \"操作未被保留:{operationId}\",\n\t\"Operation already has a different terminal result: {operationId}\": \"操作已有不同的终态结果:{operationId}\",\n\t\"Canonical contract vector admission failed\": \"规范契约向量准入失败\",\n\t\"Canonical contract failed vector admission failed\": \"规范契约失败向量准入失败\",\n\t\"Canonical contract timeout vector admission failed\": \"规范契约超时向量准入失败\",\n\n\t// ---- session-manager.ts:JSON 序列化断言(field 为字段名,保持原文)----\n\t\"{field} must be JSON-serializable: non-finite number at {path}\":\n\t\t\"{field} 必须可 JSON 序列化:{path} 处存在非有限数字\",\n\t\"{field} must be JSON-serializable: unsupported value at {path}\":\n\t\t\"{field} 必须可 JSON 序列化:{path} 处存在不支持的值\",\n\t\"{field} must be JSON-serializable: cyclic value at {path}\": \"{field} 必须可 JSON 序列化:{path} 处存在循环引用值\",\n\t\"{field} must be JSON-serializable: non-plain object at {path}\":\n\t\t\"{field} 必须可 JSON 序列化:{path} 处存在非普通对象\",\n\t\"{field} must be JSON-serializable: symbol key at {path}\": \"{field} 必须可 JSON 序列化:{path} 处存在 symbol 键\",\n\t\"{field} must be JSON-serializable: accessor at {path}\": \"{field} 必须可 JSON 序列化:{path} 处存在访问器属性\",\n\n\t// ---- session-manager.ts:压缩提交协议校验(机器可读协议错误,照译;字段名原样)----\n\t\"Compaction commit request must be an object\": \"压缩提交请求必须是对象\",\n\t\"Unsupported compaction commit request version\": \"不支持的压缩提交请求版本\",\n\t\"operationId must be a non-empty string\": \"operationId 必须是非空字符串\",\n\t\"summary must be a non-empty string\": \"summary 必须是非空字符串\",\n\t\"firstKeptEntryId must be a non-empty string\": \"firstKeptEntryId 必须是非空字符串\",\n\t\"tokensBefore must be a non-negative finite number\": \"tokensBefore 必须是非负有限数字\",\n\t\"expectedRevision must be a valid SessionRevisionV1\": \"expectedRevision 必须是有效的 SessionRevisionV1\",\n\t\"operation_id_reused: {operationId}\": \"operation_id_reused:{operationId}\",\n\t\"first_kept_entry_not_on_current_branch: {firstKeptEntryId}\":\n\t\t\"first_kept_entry_not_on_current_branch:{firstKeptEntryId}\",\n\t\"Compaction operation entry is missing: {entryId}\": \"压缩操作条目缺失:{entryId}\",\n\n\t// ---- session-manager.ts / agent-session-compaction.ts:条目定位 ----\n\t\"Entry {id} not found\": \"未找到条目 {id}\",\n\n\t// ---- agent-session*.ts:会话运行时守卫 ----\n\t\"Capability runtime is not available\": \"能力运行时不可用\",\n\t\"Capability runtime is not initialized for provider request\": \"提供程序请求的能力运行时尚未初始化\",\n\t\"Session reload is already in progress\": \"会话重载已在进行中\",\n\t\"Session reload did not commit a generation\": \"会话重载未提交新代号\",\n\t\"Session context commit requires a message array\": \"会话上下文提交需要消息数组\",\n\t\"Context commit cancelled\": \"上下文提交已取消\",\n\t\"Context commit operationId is required\": \"上下文提交需要 operationId\",\n\t\"Context revision conflict: expected {expected}, current {current}\":\n\t\t\"上下文修订冲突:期望 {expected},当前 {current}\",\n\t\"Unsupported session export format: {format}\": \"不支持的会话导出格式:{format}\",\n\t\"Capability plugin manifest is already loaded: {path}\": \"能力插件 manifest 已加载:{path}\",\n\t\"Capability plugin is already loaded in this session: {id}\": \"该会话中能力插件已加载:{id}\",\n\t\"Capability plugin manifest path is unavailable: {id}\": \"能力插件 manifest 路径不可用:{id}\",\n\t\"Agent is already processing. Specify streamingBehavior ('steer' or 'followUp') to queue the message.\":\n\t\t\"Agent 正在处理中。请指定 streamingBehavior('steer' 或 'followUp')来排队消息。\",\n\t\"Command is registered by both CapabilityAPI and {source}: {command}\":\n\t\t\"命令同时被 CapabilityAPI 和 {source} 注册:{command}\",\n\n\t// ---- agent-session-compaction.ts:压缩策略与提交 ----\n\t\"Compaction policy returned an invalid preparation: {policyName}\": \"压缩策略返回了无效的准备结果:{policyName}\",\n\t\"Compaction commit revision conflict: expected {expectedSequence}/{expectedLeafId}, current {currentSequence}/{currentLeafId}\":\n\t\t\"压缩提交修订冲突:期望 {expectedSequence}/{expectedLeafId},当前 {currentSequence}/{currentLeafId}\",\n\t\"Compaction commit entry is unavailable: {entryId}\": \"压缩提交条目不可用:{entryId}\",\n\n\t// ---- agent-session-context.ts:上下文策略与转换 ----\n\t\"Context strategy is not configured\": \"未配置上下文策略\",\n\t\"Cannot {operation} while the session is running\": \"会话运行中无法执行 {operation}\",\n\t\"Session is disposed; context transition was cancelled\": \"会话已销毁;上下文转换已取消\",\n\t\"Session reload in progress; context transition was cancelled\": \"会话重载进行中;上下文转换已取消\",\n\t\"Context transition was superseded\": \"上下文转换已被取代\",\n\t\"Context strategy must return an AgentMessage array: {strategyName}\":\n\t\t\"上下文策略必须返回 AgentMessage 数组:{strategyName}\",\n\t\"Context transition requires an AgentMessage array: {strategyName}\":\n\t\t\"上下文转换需要 AgentMessage 数组:{strategyName}\",\n\t\"Context strategy must return structured-cloneable AgentMessage values: {strategyName}\":\n\t\t\"上下文策略必须返回可结构化克隆的 AgentMessage 值:{strategyName}\",\n\t\"Context transition requires structured-cloneable AgentMessage values: {strategyName}\":\n\t\t\"上下文转换需要可结构化克隆的 AgentMessage 值:{strategyName}\",\n\n\t// ---- agent-session-bash.ts / agent-session-runtime.ts ----\n\t\"Session is disposed; bash execution is unavailable\": \"会话已销毁;bash 执行不可用\",\n\t\"Session is disposed; bash results cannot be recorded\": \"会话已销毁;无法记录 bash 结果\",\n\t\"Invalid entry ID for forking\": \"用于分叉的条目 ID 无效\",\n\t\"Persisted session is missing a session file\": \"持久化会话缺少会话文件\",\n\n\t// ---- embedded-sdk.ts ----\n\t\"Embedded SDK binding is disposed: {label}\": \"Embedded SDK 绑定已销毁:{label}\",\n\t\"Embedded SDK run input must be JSON-compatible\": \"Embedded SDK 运行输入必须兼容 JSON\",\n\t\"Embedded SDK session requires revision support\": \"Embedded SDK 会话需要修订支持\",\n\t\"Embedded SDK has no defined Agent: {id}@{version}\": \"Embedded SDK 没有已定义的 Agent:{id}@{version}\",\n\t\"Embedded SDK lease does not belong to Agent instance: {id}\": \"Embedded SDK 租约不属于该 Agent 实例:{id}\",\n\t\"Embedded SDK disposal failed\": \"Embedded SDK 销毁失败\",\n\n\t// ---- agent-session.ts / agent-session-compaction.ts:认证重试提示(批次⑥调用点遗留缺失,本批补齐)----\n\t\"Authentication failed for \\\"{provider}\\\". Credentials may have expired or network is unavailable. Run '/login {provider}' to re-authenticate.\":\n\t\t\"\\\"{provider}\\\" 认证失败。凭证可能已过期或网络不可用。请运行 '/login {provider}' 重新认证。\",\n\n\t// ---- provider-composer.ts / model-registry.ts / model-runtime.ts ----\n\t'Provider {providerId}: \"api\" is required when registering streamSimple.':\n\t\t'提供商 {providerId}:注册 streamSimple 时必须指定 \"api\"。',\n\t\"No API provider registered for api: {api}\": \"未注册 api 为 {api} 的 API 提供商\",\n\t\"Provider config is required when registering by name\": \"按名称注册时必须提供提供商配置\",\n\t\"Provider id must not be empty.\": \"Provider id 不能为空。\",\n\n\t// ---- tools/:内置工具校验与命令状态 ----\n\t\"Invalid timeout: must be a finite number of seconds\": \"无效的超时值:必须是有限秒数\",\n\t\"Invalid timeout: maximum is {maxSeconds} seconds\": \"无效的超时值:最大为 {maxSeconds} 秒\",\n\t\"Working directory does not exist: {cwd}\\nCannot execute {shellName} commands.\":\n\t\t\"工作目录不存在:{cwd}\\n无法执行 {shellName} 命令。\",\n\t\"Command aborted\": \"命令已中止\",\n\t\"Command timed out after {seconds} seconds\": \"命令在 {seconds} 秒后超时\",\n\t\"Command terminated without an exit code\": \"命令结束时没有退出码\",\n\t\"Command exited with code {exitCode}\": \"命令退出码为 {exitCode}\",\n\t\"Replacement range is outside the base content.\": \"替换范围超出基准内容。\",\n\t\"Cannot preserve unchanged lines because the base content has a different line count.\":\n\t\t\"基准内容行数不同,无法保留未变更的行。\",\n\t\"edits[{previousIndex}] and edits[{currentIndex}] overlap in {path}. Merge them into one edit or target disjoint regions.\":\n\t\t\"{path} 中 edits[{previousIndex}] 与 edits[{currentIndex}] 重叠。请合并为一个编辑或改为不相交的区域。\",\n\t\"Edit tool input is invalid. edits must contain at least one replacement.\":\n\t\t\"Edit 工具输入无效。edits 必须至少包含一个替换。\",\n\t\"Could not edit file: {path}. {errorMessage}.\": \"无法编辑文件:{path}。{errorMessage}。\",\n\t\"Unknown tool name: {toolName}\": \"未知工具名:{toolName}\",\n\t\"Offset {offset} is beyond end of file ({totalLines} lines total)\":\n\t\t\"偏移 {offset} 超出文件末尾(共 {totalLines} 行)\",\n\t\"Cannot append to a finished output accumulator\": \"无法向已完成的输出累加器追加数据\",\n\n\t// ---- logger.ts / package-install-host.ts / package-resource-collection.ts / session-export.ts ----\n\t\"Host logger level must be one of {levels}; got {value}\": \"Host logger level 必须是 {levels} 之一;实际为 {value}\",\n\t\"Missing git install root\": \"缺少 git 安装根目录\",\n\t\"Refusing to use path outside package install root: {path}\": \"拒绝使用包安装根目录之外的路径:{path}\",\n\t\"Unknown resource type: {resourceType}\": \"未知资源类型:{resourceType}\",\n\t\"Cannot export a session without a session header\": \"没有会话头信息,无法导出会话\",\n};\n"]}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* 模型提供商装配(provider-composer.ts / model-*.ts)、内置工具校验(tools/)、
|
|
7
7
|
* 包安装宿主与导出(package-*.ts / session-export.ts)。
|
|
8
8
|
* key 为英文原文(与调用点逐字一致),占位符 `{name}` 原样保留。
|
|
9
|
-
* 机器匹配串不在此域:"aborted"、`timeout:` 前缀(tools/bash.ts
|
|
9
|
+
* 机器匹配串不在此域:"aborted"、`timeout:` 前缀(tools/bash-operations.ts 经 bash 工具定义精确消费)、
|
|
10
10
|
* "authHeader requires a resolved API key"(cause.message 精确匹配,保护清单)。
|
|
11
11
|
*/
|
|
12
12
|
export const coreContractCore = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-contract-core.js","sourceRoot":"","sources":["../../../../../src/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AAmC;IACjG,8BAA8B,EAAE,2BAAmB;IAEnD,kIAAkF;IAClF,+IAA+I,EAC9I,uHAAiE;IAElE,wEAAwE;IACxE,yEAAyE,EACxE,uEAA+C;IAChD,2CAA2C,EAAE,2CAA2B;IACxE,sDAAsD,EAAE,+CAAiB;IACzE,gCAAgC,EAAE,6BAAmB;IAErD,uDAA+B;IAC/B,qDAAqD,EAAE,4CAAgB;IACvE,kDAAkD,EAAE,iDAA2B;IAC/E,+EAA+E,EAC9E,mEAAqC;IACtC,iBAAiB,EAAE,iBAAO;IAC1B,2CAA2C,EAAE,kCAAoB;IACjE,yCAAyC,EAAE,gCAAY;IACvD,qCAAqC,EAAE,+BAAmB;IAC1D,gDAAgD,EAAE,mCAAa;IAC/D,sFAAsF,EACrF,2DAAqB;IACtB,0HAA0H,EACzH,6HAA+E;IAChF,0EAA0E,EACzE,mEAA+B;IAChC,8CAA8C,EAAE,iDAA+B;IAC/E,+BAA+B,EAAE,8BAAkB;IACnD,kEAAkE,EACjE,8DAAsC;IACvC,gDAAgD,EAAE,kDAAkB;IAEpE,qGAAqG;IACrG,wDAAwD,EAAE,iEAA+C;IACzG,0BAA0B,EAAE,4BAAc;IAC1C,2DAA2D,EAAE,wDAAwB;IACrF,uCAAuC,EAAE,qCAAuB;IAChE,kDAAkD,EAAE,4CAAgB;CACpE,CAAC","sourcesContent":["/**\n * core-contract-core 域词典(批次⑨b):core 根层(不含 extensions/)与\n * agent-capability-contract 的 throw 契约错误文案。覆盖范围:能力契约 V1\n * 校验(agent-capability-contract.ts)、会话管理与压缩提交协议(session-manager.ts)、\n * 会话运行时守卫(agent-session*.ts)、embedded SDK 绑定(embedded-sdk.ts)、\n * 模型提供商装配(provider-composer.ts / model-*.ts)、内置工具校验(tools/)、\n * 包安装宿主与导出(package-*.ts / session-export.ts)。\n * key 为英文原文(与调用点逐字一致),占位符 `{name}` 原样保留。\n * 机器匹配串不在此域:\"aborted\"、`timeout:` 前缀(tools/bash.ts 精确消费)、\n * \"authHeader requires a resolved API key\"(cause.message 精确匹配,保护清单)。\n */\nexport const coreContractCore: Record<string, string> = {\n\t// ---- agent-capability-contract.ts:通用断言辅助(label 为字段路径,保持原文)----\n\t\"{label} must be a plain object\": \"{label} 必须是普通对象\",\n\t\"{label} has unsupported fields: {fields}\": \"{label} 包含不支持的字段:{fields}\",\n\t\"{label} is missing required field: {key}\": \"{label} 缺少必填字段:{key}\",\n\t\"{label} must be a non-empty string\": \"{label} 必须是非空字符串\",\n\t\"{label} must be a positive safe integer\": \"{label} 必须是正的安全整数\",\n\t\"{label} must be a non-negative safe integer\": \"{label} 必须是非负安全整数\",\n\t\"{label} must contain finite JSON numbers\": \"{label} 必须只包含有限 JSON 数字\",\n\t\"{label} must be JSON-compatible\": \"{label} 必须兼容 JSON\",\n\t\"{label} must not contain cycles\": \"{label} 不得包含循环引用\",\n\t\"{label} must contain only plain JSON objects\": \"{label} 必须只包含普通 JSON 对象\",\n\t\"{label} must be an array\": \"{label} 必须是数组\",\n\t\"{label} must not contain duplicates\": \"{label} 不得包含重复项\",\n\t\"{label} is invalid\": \"{label} 无效\",\n\t\"{label} contains duplicate capability: {capability}\": \"{label} 包含重复能力:{capability}\",\n\n\t// ---- agent-capability-contract.ts:Host context / 契约兼容性 ----\n\t\"Host context.mode is invalid\": \"Host context.mode 无效\",\n\t\"Host context.features must be an array\": \"Host context.features 必须是数组\",\n\t\"Host context.features must not contain duplicates\": \"Host context.features 不得包含重复项\",\n\t\"Host context.transports must be an array\": \"Host context.transports 必须是数组\",\n\t\"Host context.transports must not contain duplicates\": \"Host context.transports 不得包含重复项\",\n\t\"Contract compatibility result.version must be 1\": \"Contract compatibility result.version 必须为 1\",\n\t\"Contract compatibility result.compatible must be boolean\": \"Contract compatibility result.compatible 必须是布尔值\",\n\t\"Contract compatibility result.issues must be an array\": \"Contract compatibility result.issues 必须是数组\",\n\t\"Contract compatibility result.compatible must be false when issues exist\":\n\t\t\"存在 issue 时 Contract compatibility result.compatible 必须为 false\",\n\t\"Contract compatibility result.compatible must be true when no issues exist\":\n\t\t\"不存在 issue 时 Contract compatibility result.compatible 必须为 true\",\n\t\"Contract compatibility result.issues[{index}].code is invalid\":\n\t\t\"Contract compatibility result.issues[{index}].code 无效\",\n\t\"Contract compatibility result.issues[{index}].missingFeatures must be strings\":\n\t\t\"Contract compatibility result.issues[{index}].missingFeatures 必须是字符串\",\n\t\"Contract compatibility result.issues[{index}].missingTransports must be strings\":\n\t\t\"Contract compatibility result.issues[{index}].missingTransports 必须是字符串\",\n\t\"Agent capability contract.contractId must be {contractId}\":\n\t\t\"Agent capability contract.contractId 必须为 {contractId}\",\n\t\"Agent capability contract.version must be 1\": \"Agent capability contract.version 必须为 1\",\n\t\"Agent profile.optionalPlugins must not overlap requiredPlugins\":\n\t\t\"Agent profile.optionalPlugins 不得与 requiredPlugins 重叠\",\n\t\"Artifact reference.truncated must be boolean\": \"Artifact reference.truncated 必须是布尔值\",\n\n\t// ---- agent-capability-contract.ts:快照与信封校验(字段路径原样)----\n\t\"Agent definition snapshot.version must be 1\": \"Agent definition snapshot.version 必须为 1\",\n\t\"Agent instance snapshot.version must be 1\": \"Agent instance snapshot.version 必须为 1\",\n\t\"Agent instance snapshot.status is invalid\": \"Agent instance snapshot.status 无效\",\n\t\"Session revision.version must be 1\": \"Session revision.version 必须为 1\",\n\t\"Session revision.leafId is required\": \"Session revision.leafId 是必填项\",\n\t\"Session snapshot.version must be 1\": \"Session snapshot.version 必须为 1\",\n\t\"Session snapshot.revision.sessionId must match sessionId\":\n\t\t\"Session snapshot.revision.sessionId 必须与 sessionId 一致\",\n\t\"Error envelope.version must be 1\": \"Error envelope.version 必须为 1\",\n\t\"Error envelope.message must be a string\": \"Error envelope.message 必须是字符串\",\n\t\"Error envelope.retryable must be a boolean\": \"Error envelope.retryable 必须是布尔值\",\n\t\"Operation terminal is missing required field: version or status\":\n\t\t\"Operation terminal 缺少必填字段:version 或 status\",\n\t\"Operation terminal.version must be 1\": \"Operation terminal.version 必须为 1\",\n\t\"Operation snapshot.version must be 1\": \"Operation snapshot.version 必须为 1\",\n\t\"Operation snapshot.status is invalid\": \"Operation snapshot.status 无效\",\n\t\"Operation snapshot active status must not have a terminal\": \"Operation snapshot 处于活动状态时不得携带 terminal\",\n\t\"Operation snapshot terminal status requires a terminal\": \"Operation snapshot 处于终态时必须有 terminal\",\n\t\"Operation snapshot.terminal.status must match status\": \"Operation snapshot.terminal.status 必须与 status 一致\",\n\t\"Operation snapshot.inputRevision.sessionId must match sessionId\":\n\t\t\"Operation snapshot.inputRevision.sessionId 必须与 sessionId 一致\",\n\t\"Command request.version must be 1\": \"Command request.version 必须为 1\",\n\t\"Command request.expectedRevision.sessionId does not match target\":\n\t\t\"Command request.expectedRevision.sessionId 与 target 不匹配\",\n\t\"Command admission.version must be 1\": \"Command admission.version 必须为 1\",\n\t\"Command admission.status is invalid\": \"Command admission.status 无效\",\n\t\"Command admission accepted status requires an operation\": \"Command admission 为 accepted 状态时必须有 operation\",\n\t\"Command admission rejected status requires an error\": \"Command admission 为 rejected 状态时必须有 error\",\n\t\"Event envelope.version must be 1\": \"Event envelope.version 必须为 1\",\n\t\"Event envelope.category is invalid\": \"Event envelope.category 无效\",\n\t\"Event envelope.deliveryGuarantee is invalid\": \"Event envelope.deliveryGuarantee 无效\",\n\t\"Event envelope.correlationId requires a real operationId\": \"Event envelope.correlationId 需要真实的 operationId\",\n\t\"Event envelope.operationId requires correlationId\": \"Event envelope.operationId 需要 correlationId\",\n\n\t// ---- agent-capability-contract.ts:命令操作注册表与规范向量 ----\n\t\"Operation is not retained: {operationId}\": \"操作未被保留:{operationId}\",\n\t\"Operation already has a different terminal result: {operationId}\": \"操作已有不同的终态结果:{operationId}\",\n\t\"Canonical contract vector admission failed\": \"规范契约向量准入失败\",\n\t\"Canonical contract failed vector admission failed\": \"规范契约失败向量准入失败\",\n\t\"Canonical contract timeout vector admission failed\": \"规范契约超时向量准入失败\",\n\n\t// ---- session-manager.ts:JSON 序列化断言(field 为字段名,保持原文)----\n\t\"{field} must be JSON-serializable: non-finite number at {path}\":\n\t\t\"{field} 必须可 JSON 序列化:{path} 处存在非有限数字\",\n\t\"{field} must be JSON-serializable: unsupported value at {path}\":\n\t\t\"{field} 必须可 JSON 序列化:{path} 处存在不支持的值\",\n\t\"{field} must be JSON-serializable: cyclic value at {path}\": \"{field} 必须可 JSON 序列化:{path} 处存在循环引用值\",\n\t\"{field} must be JSON-serializable: non-plain object at {path}\":\n\t\t\"{field} 必须可 JSON 序列化:{path} 处存在非普通对象\",\n\t\"{field} must be JSON-serializable: symbol key at {path}\": \"{field} 必须可 JSON 序列化:{path} 处存在 symbol 键\",\n\t\"{field} must be JSON-serializable: accessor at {path}\": \"{field} 必须可 JSON 序列化:{path} 处存在访问器属性\",\n\n\t// ---- session-manager.ts:压缩提交协议校验(机器可读协议错误,照译;字段名原样)----\n\t\"Compaction commit request must be an object\": \"压缩提交请求必须是对象\",\n\t\"Unsupported compaction commit request version\": \"不支持的压缩提交请求版本\",\n\t\"operationId must be a non-empty string\": \"operationId 必须是非空字符串\",\n\t\"summary must be a non-empty string\": \"summary 必须是非空字符串\",\n\t\"firstKeptEntryId must be a non-empty string\": \"firstKeptEntryId 必须是非空字符串\",\n\t\"tokensBefore must be a non-negative finite number\": \"tokensBefore 必须是非负有限数字\",\n\t\"expectedRevision must be a valid SessionRevisionV1\": \"expectedRevision 必须是有效的 SessionRevisionV1\",\n\t\"operation_id_reused: {operationId}\": \"operation_id_reused:{operationId}\",\n\t\"first_kept_entry_not_on_current_branch: {firstKeptEntryId}\":\n\t\t\"first_kept_entry_not_on_current_branch:{firstKeptEntryId}\",\n\t\"Compaction operation entry is missing: {entryId}\": \"压缩操作条目缺失:{entryId}\",\n\n\t// ---- session-manager.ts / agent-session-compaction.ts:条目定位 ----\n\t\"Entry {id} not found\": \"未找到条目 {id}\",\n\n\t// ---- agent-session*.ts:会话运行时守卫 ----\n\t\"Capability runtime is not available\": \"能力运行时不可用\",\n\t\"Capability runtime is not initialized for provider request\": \"提供程序请求的能力运行时尚未初始化\",\n\t\"Session reload is already in progress\": \"会话重载已在进行中\",\n\t\"Session reload did not commit a generation\": \"会话重载未提交新代号\",\n\t\"Session context commit requires a message array\": \"会话上下文提交需要消息数组\",\n\t\"Context commit cancelled\": \"上下文提交已取消\",\n\t\"Context commit operationId is required\": \"上下文提交需要 operationId\",\n\t\"Context revision conflict: expected {expected}, current {current}\":\n\t\t\"上下文修订冲突:期望 {expected},当前 {current}\",\n\t\"Unsupported session export format: {format}\": \"不支持的会话导出格式:{format}\",\n\t\"Capability plugin manifest is already loaded: {path}\": \"能力插件 manifest 已加载:{path}\",\n\t\"Capability plugin is already loaded in this session: {id}\": \"该会话中能力插件已加载:{id}\",\n\t\"Capability plugin manifest path is unavailable: {id}\": \"能力插件 manifest 路径不可用:{id}\",\n\t\"Agent is already processing. Specify streamingBehavior ('steer' or 'followUp') to queue the message.\":\n\t\t\"Agent 正在处理中。请指定 streamingBehavior('steer' 或 'followUp')来排队消息。\",\n\t\"Command is registered by both CapabilityAPI and {source}: {command}\":\n\t\t\"命令同时被 CapabilityAPI 和 {source} 注册:{command}\",\n\n\t// ---- agent-session-compaction.ts:压缩策略与提交 ----\n\t\"Compaction policy returned an invalid preparation: {policyName}\": \"压缩策略返回了无效的准备结果:{policyName}\",\n\t\"Compaction commit revision conflict: expected {expectedSequence}/{expectedLeafId}, current {currentSequence}/{currentLeafId}\":\n\t\t\"压缩提交修订冲突:期望 {expectedSequence}/{expectedLeafId},当前 {currentSequence}/{currentLeafId}\",\n\t\"Compaction commit entry is unavailable: {entryId}\": \"压缩提交条目不可用:{entryId}\",\n\n\t// ---- agent-session-context.ts:上下文策略与转换 ----\n\t\"Context strategy is not configured\": \"未配置上下文策略\",\n\t\"Cannot {operation} while the session is running\": \"会话运行中无法执行 {operation}\",\n\t\"Session is disposed; context transition was cancelled\": \"会话已销毁;上下文转换已取消\",\n\t\"Session reload in progress; context transition was cancelled\": \"会话重载进行中;上下文转换已取消\",\n\t\"Context transition was superseded\": \"上下文转换已被取代\",\n\t\"Context strategy must return an AgentMessage array: {strategyName}\":\n\t\t\"上下文策略必须返回 AgentMessage 数组:{strategyName}\",\n\t\"Context transition requires an AgentMessage array: {strategyName}\":\n\t\t\"上下文转换需要 AgentMessage 数组:{strategyName}\",\n\t\"Context strategy must return structured-cloneable AgentMessage values: {strategyName}\":\n\t\t\"上下文策略必须返回可结构化克隆的 AgentMessage 值:{strategyName}\",\n\t\"Context transition requires structured-cloneable AgentMessage values: {strategyName}\":\n\t\t\"上下文转换需要可结构化克隆的 AgentMessage 值:{strategyName}\",\n\n\t// ---- agent-session-bash.ts / agent-session-runtime.ts ----\n\t\"Session is disposed; bash execution is unavailable\": \"会话已销毁;bash 执行不可用\",\n\t\"Session is disposed; bash results cannot be recorded\": \"会话已销毁;无法记录 bash 结果\",\n\t\"Invalid entry ID for forking\": \"用于分叉的条目 ID 无效\",\n\t\"Persisted session is missing a session file\": \"持久化会话缺少会话文件\",\n\n\t// ---- embedded-sdk.ts ----\n\t\"Embedded SDK binding is disposed: {label}\": \"Embedded SDK 绑定已销毁:{label}\",\n\t\"Embedded SDK run input must be JSON-compatible\": \"Embedded SDK 运行输入必须兼容 JSON\",\n\t\"Embedded SDK session requires revision support\": \"Embedded SDK 会话需要修订支持\",\n\t\"Embedded SDK has no defined Agent: {id}@{version}\": \"Embedded SDK 没有已定义的 Agent:{id}@{version}\",\n\t\"Embedded SDK lease does not belong to Agent instance: {id}\": \"Embedded SDK 租约不属于该 Agent 实例:{id}\",\n\t\"Embedded SDK disposal failed\": \"Embedded SDK 销毁失败\",\n\n\t// ---- agent-session.ts / agent-session-compaction.ts:认证重试提示(批次⑥调用点遗留缺失,本批补齐)----\n\t\"Authentication failed for \\\"{provider}\\\". Credentials may have expired or network is unavailable. Run '/login {provider}' to re-authenticate.\":\n\t\t\"\\\"{provider}\\\" 认证失败。凭证可能已过期或网络不可用。请运行 '/login {provider}' 重新认证。\",\n\n\t// ---- provider-composer.ts / model-registry.ts / model-runtime.ts ----\n\t'Provider {providerId}: \"api\" is required when registering streamSimple.':\n\t\t'提供商 {providerId}:注册 streamSimple 时必须指定 \"api\"。',\n\t\"No API provider registered for api: {api}\": \"未注册 api 为 {api} 的 API 提供商\",\n\t\"Provider config is required when registering by name\": \"按名称注册时必须提供提供商配置\",\n\t\"Provider id must not be empty.\": \"Provider id 不能为空。\",\n\n\t// ---- tools/:内置工具校验与命令状态 ----\n\t\"Invalid timeout: must be a finite number of seconds\": \"无效的超时值:必须是有限秒数\",\n\t\"Invalid timeout: maximum is {maxSeconds} seconds\": \"无效的超时值:最大为 {maxSeconds} 秒\",\n\t\"Working directory does not exist: {cwd}\\nCannot execute {shellName} commands.\":\n\t\t\"工作目录不存在:{cwd}\\n无法执行 {shellName} 命令。\",\n\t\"Command aborted\": \"命令已中止\",\n\t\"Command timed out after {seconds} seconds\": \"命令在 {seconds} 秒后超时\",\n\t\"Command terminated without an exit code\": \"命令结束时没有退出码\",\n\t\"Command exited with code {exitCode}\": \"命令退出码为 {exitCode}\",\n\t\"Replacement range is outside the base content.\": \"替换范围超出基准内容。\",\n\t\"Cannot preserve unchanged lines because the base content has a different line count.\":\n\t\t\"基准内容行数不同,无法保留未变更的行。\",\n\t\"edits[{previousIndex}] and edits[{currentIndex}] overlap in {path}. Merge them into one edit or target disjoint regions.\":\n\t\t\"{path} 中 edits[{previousIndex}] 与 edits[{currentIndex}] 重叠。请合并为一个编辑或改为不相交的区域。\",\n\t\"Edit tool input is invalid. edits must contain at least one replacement.\":\n\t\t\"Edit 工具输入无效。edits 必须至少包含一个替换。\",\n\t\"Could not edit file: {path}. {errorMessage}.\": \"无法编辑文件:{path}。{errorMessage}。\",\n\t\"Unknown tool name: {toolName}\": \"未知工具名:{toolName}\",\n\t\"Offset {offset} is beyond end of file ({totalLines} lines total)\":\n\t\t\"偏移 {offset} 超出文件末尾(共 {totalLines} 行)\",\n\t\"Cannot append to a finished output accumulator\": \"无法向已完成的输出累加器追加数据\",\n\n\t// ---- logger.ts / package-install-host.ts / package-resource-collection.ts / session-export.ts ----\n\t\"Host logger level must be one of {levels}; got {value}\": \"Host logger level 必须是 {levels} 之一;实际为 {value}\",\n\t\"Missing git install root\": \"缺少 git 安装根目录\",\n\t\"Refusing to use path outside package install root: {path}\": \"拒绝使用包安装根目录之外的路径:{path}\",\n\t\"Unknown resource type: {resourceType}\": \"未知资源类型:{resourceType}\",\n\t\"Cannot export a session without a session header\": \"没有会话头信息,无法导出会话\",\n};\n"]}
|
|
1
|
+
{"version":3,"file":"core-contract-core.js","sourceRoot":"","sources":["../../../../../src/core/i18n/locales/zh-cn/core-contract-core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACvD,uGAAiE;IACjE,gCAAgC,EAAE,+BAAiB;IACnD,0CAA0C,EAAE,6CAA2B;IACvE,0CAA0C,EAAE,oCAAsB;IAClE,oCAAoC,EAAE,kCAAkB;IACxD,yCAAyC,EAAE,qCAAmB;IAC9D,6CAA6C,EAAE,qCAAmB;IAClE,0CAA0C,EAAE,2CAAyB;IACrE,iCAAiC,EAAE,2BAAmB;IACtD,iCAAiC,EAAE,kCAAkB;IACrD,8CAA8C,EAAE,2CAAyB;IACzE,0BAA0B,EAAE,yBAAe;IAC3C,qCAAqC,EAAE,+BAAiB;IACxD,oBAAoB,EAAE,gBAAY;IAClC,qDAAqD,EAAE,2CAA6B;IAEpF,0EAA8D;IAC9D,8BAA8B,EAAE,0BAAsB;IACtD,wCAAwC,EAAE,uCAA6B;IACvE,mDAAmD,EAAE,6CAA+B;IACpF,0CAA0C,EAAE,yCAA+B;IAC3E,qDAAqD,EAAE,+CAAiC;IACxF,iDAAiD,EAAE,mDAA6C;IAChG,0DAA0D,EAAE,6DAAiD;IAC7G,uDAAuD,EAAE,sDAA4C;IACrG,0EAA0E,EACzE,2EAA+D;IAChE,4EAA4E,EAC3E,6EAA+D;IAChE,+DAA+D,EAC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-contract-core 域词典(批次⑨b):core 根层(不含 extensions/)与\n * agent-capability-contract 的 throw 契约错误文案。覆盖范围:能力契约 V1\n * 校验(agent-capability-contract.ts)、会话管理与压缩提交协议(session-manager.ts)、\n * 会话运行时守卫(agent-session*.ts)、embedded SDK 绑定(embedded-sdk.ts)、\n * 模型提供商装配(provider-composer.ts / model-*.ts)、内置工具校验(tools/)、\n * 包安装宿主与导出(package-*.ts / session-export.ts)。\n * key 为英文原文(与调用点逐字一致),占位符 `{name}` 原样保留。\n * 机器匹配串不在此域:\"aborted\"、`timeout:` 前缀(tools/bash-operations.ts 经 bash 工具定义精确消费)、\n * \"authHeader requires a resolved API key\"(cause.message 精确匹配,保护清单)。\n */\nexport const coreContractCore: Record<string, string> = {\n\t// ---- agent-capability-contract.ts:通用断言辅助(label 为字段路径,保持原文)----\n\t\"{label} must be a plain object\": \"{label} 必须是普通对象\",\n\t\"{label} has unsupported fields: {fields}\": \"{label} 包含不支持的字段:{fields}\",\n\t\"{label} is missing required field: {key}\": \"{label} 缺少必填字段:{key}\",\n\t\"{label} must be a non-empty string\": \"{label} 必须是非空字符串\",\n\t\"{label} must be a positive safe integer\": \"{label} 必须是正的安全整数\",\n\t\"{label} must be a non-negative safe integer\": \"{label} 必须是非负安全整数\",\n\t\"{label} must contain finite JSON numbers\": \"{label} 必须只包含有限 JSON 数字\",\n\t\"{label} must be JSON-compatible\": \"{label} 必须兼容 JSON\",\n\t\"{label} must not contain cycles\": \"{label} 不得包含循环引用\",\n\t\"{label} must contain only plain JSON objects\": \"{label} 必须只包含普通 JSON 对象\",\n\t\"{label} must be an array\": \"{label} 必须是数组\",\n\t\"{label} must not contain duplicates\": \"{label} 不得包含重复项\",\n\t\"{label} is invalid\": \"{label} 无效\",\n\t\"{label} contains duplicate capability: {capability}\": \"{label} 包含重复能力:{capability}\",\n\n\t// ---- agent-capability-contract.ts:Host context / 契约兼容性 ----\n\t\"Host context.mode is invalid\": \"Host context.mode 无效\",\n\t\"Host context.features must be an array\": \"Host context.features 必须是数组\",\n\t\"Host context.features must not contain duplicates\": \"Host context.features 不得包含重复项\",\n\t\"Host context.transports must be an array\": \"Host context.transports 必须是数组\",\n\t\"Host context.transports must not contain duplicates\": \"Host context.transports 不得包含重复项\",\n\t\"Contract compatibility result.version must be 1\": \"Contract compatibility result.version 必须为 1\",\n\t\"Contract compatibility result.compatible must be boolean\": \"Contract compatibility result.compatible 必须是布尔值\",\n\t\"Contract compatibility result.issues must be an array\": \"Contract compatibility result.issues 必须是数组\",\n\t\"Contract compatibility result.compatible must be false when issues exist\":\n\t\t\"存在 issue 时 Contract compatibility result.compatible 必须为 false\",\n\t\"Contract compatibility result.compatible must be true when no issues exist\":\n\t\t\"不存在 issue 时 Contract compatibility result.compatible 必须为 true\",\n\t\"Contract compatibility result.issues[{index}].code is invalid\":\n\t\t\"Contract compatibility result.issues[{index}].code 无效\",\n\t\"Contract compatibility result.issues[{index}].missingFeatures must be strings\":\n\t\t\"Contract compatibility result.issues[{index}].missingFeatures 必须是字符串\",\n\t\"Contract compatibility result.issues[{index}].missingTransports must be strings\":\n\t\t\"Contract compatibility result.issues[{index}].missingTransports 必须是字符串\",\n\t\"Agent capability contract.contractId must be {contractId}\":\n\t\t\"Agent capability contract.contractId 必须为 {contractId}\",\n\t\"Agent capability contract.version must be 1\": \"Agent capability contract.version 必须为 1\",\n\t\"Agent profile.optionalPlugins must not overlap requiredPlugins\":\n\t\t\"Agent profile.optionalPlugins 不得与 requiredPlugins 重叠\",\n\t\"Artifact reference.truncated must be boolean\": \"Artifact reference.truncated 必须是布尔值\",\n\n\t// ---- agent-capability-contract.ts:快照与信封校验(字段路径原样)----\n\t\"Agent definition snapshot.version must be 1\": \"Agent definition snapshot.version 必须为 1\",\n\t\"Agent instance snapshot.version must be 1\": \"Agent instance snapshot.version 必须为 1\",\n\t\"Agent instance snapshot.status is invalid\": \"Agent instance snapshot.status 无效\",\n\t\"Session revision.version must be 1\": \"Session revision.version 必须为 1\",\n\t\"Session revision.leafId is required\": \"Session revision.leafId 是必填项\",\n\t\"Session snapshot.version must be 1\": \"Session snapshot.version 必须为 1\",\n\t\"Session snapshot.revision.sessionId must match sessionId\":\n\t\t\"Session snapshot.revision.sessionId 必须与 sessionId 一致\",\n\t\"Error envelope.version must be 1\": \"Error envelope.version 必须为 1\",\n\t\"Error envelope.message must be a string\": \"Error envelope.message 必须是字符串\",\n\t\"Error envelope.retryable must be a boolean\": \"Error envelope.retryable 必须是布尔值\",\n\t\"Operation terminal is missing required field: version or status\":\n\t\t\"Operation terminal 缺少必填字段:version 或 status\",\n\t\"Operation terminal.version must be 1\": \"Operation terminal.version 必须为 1\",\n\t\"Operation snapshot.version must be 1\": \"Operation snapshot.version 必须为 1\",\n\t\"Operation snapshot.status is invalid\": \"Operation snapshot.status 无效\",\n\t\"Operation snapshot active status must not have a terminal\": \"Operation snapshot 处于活动状态时不得携带 terminal\",\n\t\"Operation snapshot terminal status requires a terminal\": \"Operation snapshot 处于终态时必须有 terminal\",\n\t\"Operation snapshot.terminal.status must match status\": \"Operation snapshot.terminal.status 必须与 status 一致\",\n\t\"Operation snapshot.inputRevision.sessionId must match sessionId\":\n\t\t\"Operation snapshot.inputRevision.sessionId 必须与 sessionId 一致\",\n\t\"Command request.version must be 1\": \"Command request.version 必须为 1\",\n\t\"Command request.expectedRevision.sessionId does not match target\":\n\t\t\"Command request.expectedRevision.sessionId 与 target 不匹配\",\n\t\"Command admission.version must be 1\": \"Command admission.version 必须为 1\",\n\t\"Command admission.status is invalid\": \"Command admission.status 无效\",\n\t\"Command admission accepted status requires an operation\": \"Command admission 为 accepted 状态时必须有 operation\",\n\t\"Command admission rejected status requires an error\": \"Command admission 为 rejected 状态时必须有 error\",\n\t\"Event envelope.version must be 1\": \"Event envelope.version 必须为 1\",\n\t\"Event envelope.category is invalid\": \"Event envelope.category 无效\",\n\t\"Event envelope.deliveryGuarantee is invalid\": \"Event envelope.deliveryGuarantee 无效\",\n\t\"Event envelope.correlationId requires a real operationId\": \"Event envelope.correlationId 需要真实的 operationId\",\n\t\"Event envelope.operationId requires correlationId\": \"Event envelope.operationId 需要 correlationId\",\n\n\t// ---- agent-capability-contract.ts:命令操作注册表与规范向量 ----\n\t\"Operation is not retained: {operationId}\": \"操作未被保留:{operationId}\",\n\t\"Operation already has a different terminal result: {operationId}\": \"操作已有不同的终态结果:{operationId}\",\n\t\"Canonical contract vector admission failed\": \"规范契约向量准入失败\",\n\t\"Canonical contract failed vector admission failed\": \"规范契约失败向量准入失败\",\n\t\"Canonical contract timeout vector admission failed\": \"规范契约超时向量准入失败\",\n\n\t// ---- session-manager.ts:JSON 序列化断言(field 为字段名,保持原文)----\n\t\"{field} must be JSON-serializable: non-finite number at {path}\":\n\t\t\"{field} 必须可 JSON 序列化:{path} 处存在非有限数字\",\n\t\"{field} must be JSON-serializable: unsupported value at {path}\":\n\t\t\"{field} 必须可 JSON 序列化:{path} 处存在不支持的值\",\n\t\"{field} must be JSON-serializable: cyclic value at {path}\": \"{field} 必须可 JSON 序列化:{path} 处存在循环引用值\",\n\t\"{field} must be JSON-serializable: non-plain object at {path}\":\n\t\t\"{field} 必须可 JSON 序列化:{path} 处存在非普通对象\",\n\t\"{field} must be JSON-serializable: symbol key at {path}\": \"{field} 必须可 JSON 序列化:{path} 处存在 symbol 键\",\n\t\"{field} must be JSON-serializable: accessor at {path}\": \"{field} 必须可 JSON 序列化:{path} 处存在访问器属性\",\n\n\t// ---- session-manager.ts:压缩提交协议校验(机器可读协议错误,照译;字段名原样)----\n\t\"Compaction commit request must be an object\": \"压缩提交请求必须是对象\",\n\t\"Unsupported compaction commit request version\": \"不支持的压缩提交请求版本\",\n\t\"operationId must be a non-empty string\": \"operationId 必须是非空字符串\",\n\t\"summary must be a non-empty string\": \"summary 必须是非空字符串\",\n\t\"firstKeptEntryId must be a non-empty string\": \"firstKeptEntryId 必须是非空字符串\",\n\t\"tokensBefore must be a non-negative finite number\": \"tokensBefore 必须是非负有限数字\",\n\t\"expectedRevision must be a valid SessionRevisionV1\": \"expectedRevision 必须是有效的 SessionRevisionV1\",\n\t\"operation_id_reused: {operationId}\": \"operation_id_reused:{operationId}\",\n\t\"first_kept_entry_not_on_current_branch: {firstKeptEntryId}\":\n\t\t\"first_kept_entry_not_on_current_branch:{firstKeptEntryId}\",\n\t\"Compaction operation entry is missing: {entryId}\": \"压缩操作条目缺失:{entryId}\",\n\n\t// ---- session-manager.ts / agent-session-compaction.ts:条目定位 ----\n\t\"Entry {id} not found\": \"未找到条目 {id}\",\n\n\t// ---- agent-session*.ts:会话运行时守卫 ----\n\t\"Capability runtime is not available\": \"能力运行时不可用\",\n\t\"Capability runtime is not initialized for provider request\": \"提供程序请求的能力运行时尚未初始化\",\n\t\"Session reload is already in progress\": \"会话重载已在进行中\",\n\t\"Session reload did not commit a generation\": \"会话重载未提交新代号\",\n\t\"Session context commit requires a message array\": \"会话上下文提交需要消息数组\",\n\t\"Context commit cancelled\": \"上下文提交已取消\",\n\t\"Context commit operationId is required\": \"上下文提交需要 operationId\",\n\t\"Context revision conflict: expected {expected}, current {current}\":\n\t\t\"上下文修订冲突:期望 {expected},当前 {current}\",\n\t\"Unsupported session export format: {format}\": \"不支持的会话导出格式:{format}\",\n\t\"Capability plugin manifest is already loaded: {path}\": \"能力插件 manifest 已加载:{path}\",\n\t\"Capability plugin is already loaded in this session: {id}\": \"该会话中能力插件已加载:{id}\",\n\t\"Capability plugin manifest path is unavailable: {id}\": \"能力插件 manifest 路径不可用:{id}\",\n\t\"Agent is already processing. Specify streamingBehavior ('steer' or 'followUp') to queue the message.\":\n\t\t\"Agent 正在处理中。请指定 streamingBehavior('steer' 或 'followUp')来排队消息。\",\n\t\"Command is registered by both CapabilityAPI and {source}: {command}\":\n\t\t\"命令同时被 CapabilityAPI 和 {source} 注册:{command}\",\n\n\t// ---- agent-session-compaction.ts:压缩策略与提交 ----\n\t\"Compaction policy returned an invalid preparation: {policyName}\": \"压缩策略返回了无效的准备结果:{policyName}\",\n\t\"Compaction commit revision conflict: expected {expectedSequence}/{expectedLeafId}, current {currentSequence}/{currentLeafId}\":\n\t\t\"压缩提交修订冲突:期望 {expectedSequence}/{expectedLeafId},当前 {currentSequence}/{currentLeafId}\",\n\t\"Compaction commit entry is unavailable: {entryId}\": \"压缩提交条目不可用:{entryId}\",\n\n\t// ---- agent-session-context.ts:上下文策略与转换 ----\n\t\"Context strategy is not configured\": \"未配置上下文策略\",\n\t\"Cannot {operation} while the session is running\": \"会话运行中无法执行 {operation}\",\n\t\"Session is disposed; context transition was cancelled\": \"会话已销毁;上下文转换已取消\",\n\t\"Session reload in progress; context transition was cancelled\": \"会话重载进行中;上下文转换已取消\",\n\t\"Context transition was superseded\": \"上下文转换已被取代\",\n\t\"Context strategy must return an AgentMessage array: {strategyName}\":\n\t\t\"上下文策略必须返回 AgentMessage 数组:{strategyName}\",\n\t\"Context transition requires an AgentMessage array: {strategyName}\":\n\t\t\"上下文转换需要 AgentMessage 数组:{strategyName}\",\n\t\"Context strategy must return structured-cloneable AgentMessage values: {strategyName}\":\n\t\t\"上下文策略必须返回可结构化克隆的 AgentMessage 值:{strategyName}\",\n\t\"Context transition requires structured-cloneable AgentMessage values: {strategyName}\":\n\t\t\"上下文转换需要可结构化克隆的 AgentMessage 值:{strategyName}\",\n\n\t// ---- agent-session-bash.ts / agent-session-runtime.ts ----\n\t\"Session is disposed; bash execution is unavailable\": \"会话已销毁;bash 执行不可用\",\n\t\"Session is disposed; bash results cannot be recorded\": \"会话已销毁;无法记录 bash 结果\",\n\t\"Invalid entry ID for forking\": \"用于分叉的条目 ID 无效\",\n\t\"Persisted session is missing a session file\": \"持久化会话缺少会话文件\",\n\n\t// ---- embedded-sdk.ts ----\n\t\"Embedded SDK binding is disposed: {label}\": \"Embedded SDK 绑定已销毁:{label}\",\n\t\"Embedded SDK run input must be JSON-compatible\": \"Embedded SDK 运行输入必须兼容 JSON\",\n\t\"Embedded SDK session requires revision support\": \"Embedded SDK 会话需要修订支持\",\n\t\"Embedded SDK has no defined Agent: {id}@{version}\": \"Embedded SDK 没有已定义的 Agent:{id}@{version}\",\n\t\"Embedded SDK lease does not belong to Agent instance: {id}\": \"Embedded SDK 租约不属于该 Agent 实例:{id}\",\n\t\"Embedded SDK disposal failed\": \"Embedded SDK 销毁失败\",\n\n\t// ---- agent-session.ts / agent-session-compaction.ts:认证重试提示(批次⑥调用点遗留缺失,本批补齐)----\n\t\"Authentication failed for \\\"{provider}\\\". Credentials may have expired or network is unavailable. Run '/login {provider}' to re-authenticate.\":\n\t\t\"\\\"{provider}\\\" 认证失败。凭证可能已过期或网络不可用。请运行 '/login {provider}' 重新认证。\",\n\n\t// ---- provider-composer.ts / model-registry.ts / model-runtime.ts ----\n\t'Provider {providerId}: \"api\" is required when registering streamSimple.':\n\t\t'提供商 {providerId}:注册 streamSimple 时必须指定 \"api\"。',\n\t\"No API provider registered for api: {api}\": \"未注册 api 为 {api} 的 API 提供商\",\n\t\"Provider config is required when registering by name\": \"按名称注册时必须提供提供商配置\",\n\t\"Provider id must not be empty.\": \"Provider id 不能为空。\",\n\n\t// ---- tools/:内置工具校验与命令状态 ----\n\t\"Invalid timeout: must be a finite number of seconds\": \"无效的超时值:必须是有限秒数\",\n\t\"Invalid timeout: maximum is {maxSeconds} seconds\": \"无效的超时值:最大为 {maxSeconds} 秒\",\n\t\"Working directory does not exist: {cwd}\\nCannot execute {shellName} commands.\":\n\t\t\"工作目录不存在:{cwd}\\n无法执行 {shellName} 命令。\",\n\t\"Command aborted\": \"命令已中止\",\n\t\"Command timed out after {seconds} seconds\": \"命令在 {seconds} 秒后超时\",\n\t\"Command terminated without an exit code\": \"命令结束时没有退出码\",\n\t\"Command exited with code {exitCode}\": \"命令退出码为 {exitCode}\",\n\t\"Replacement range is outside the base content.\": \"替换范围超出基准内容。\",\n\t\"Cannot preserve unchanged lines because the base content has a different line count.\":\n\t\t\"基准内容行数不同,无法保留未变更的行。\",\n\t\"edits[{previousIndex}] and edits[{currentIndex}] overlap in {path}. Merge them into one edit or target disjoint regions.\":\n\t\t\"{path} 中 edits[{previousIndex}] 与 edits[{currentIndex}] 重叠。请合并为一个编辑或改为不相交的区域。\",\n\t\"Edit tool input is invalid. edits must contain at least one replacement.\":\n\t\t\"Edit 工具输入无效。edits 必须至少包含一个替换。\",\n\t\"Could not edit file: {path}. {errorMessage}.\": \"无法编辑文件:{path}。{errorMessage}。\",\n\t\"Unknown tool name: {toolName}\": \"未知工具名:{toolName}\",\n\t\"Offset {offset} is beyond end of file ({totalLines} lines total)\":\n\t\t\"偏移 {offset} 超出文件末尾(共 {totalLines} 行)\",\n\t\"Cannot append to a finished output accumulator\": \"无法向已完成的输出累加器追加数据\",\n\n\t// ---- logger.ts / package-install-host.ts / package-resource-collection.ts / session-export.ts ----\n\t\"Host logger level must be one of {levels}; got {value}\": \"Host logger level 必须是 {levels} 之一;实际为 {value}\",\n\t\"Missing git install root\": \"缺少 git 安装根目录\",\n\t\"Refusing to use path outside package install root: {path}\": \"拒绝使用包安装根目录之外的路径:{path}\",\n\t\"Unknown resource type: {resourceType}\": \"未知资源类型:{resourceType}\",\n\t\"Cannot export a session without a session header\": \"没有会话头信息,无法导出会话\",\n};\n"]}
|