@evanbobo/dsh-agentdoor 0.0.0-stage → 0.2.2-rc.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/LICENSE +21 -0
- package/README.en.md +268 -0
- package/README.md +243 -2
- package/THIRD_PARTY_NOTICES +96 -0
- package/assets/provider-icons/antigravity.svg +39 -0
- package/assets/provider-icons/claude-code.png +0 -0
- package/assets/provider-icons/codebuddy.svg +37 -0
- package/assets/provider-icons/codex.png +0 -0
- package/assets/provider-icons/command-code.svg +5 -0
- package/assets/provider-icons/cursor-cli.svg +1 -0
- package/assets/provider-icons/deepseek-harness.svg +9 -0
- package/assets/provider-icons/doubao.png +0 -0
- package/assets/provider-icons/gemini.png +0 -0
- package/assets/provider-icons/grok.png +0 -0
- package/assets/provider-icons/kimi.png +0 -0
- package/assets/provider-icons/kiro-cli.svg +11 -0
- package/assets/provider-icons/minimax-code.svg +4 -0
- package/assets/provider-icons/opencode.png +0 -0
- package/assets/provider-icons/pi.svg +7 -0
- package/assets/provider-icons/qoder-cn.svg +5 -0
- package/assets/provider-icons/qoder.svg +5 -0
- package/assets/provider-icons/r4.svg +4 -0
- package/assets/provider-icons/workbuddy.svg +29 -0
- package/assets/provider-icons/zcode.svg +14 -0
- package/bin/agent-door-credential.mjs +92 -0
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts +97 -0
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts.map +1 -0
- package/data/build/dist/bootstrap/dsh-connection-adapter.js +169 -0
- package/data/build/dist/bootstrap/dsh-connection-adapter.js.map +1 -0
- package/data/build/dist/bootstrap/index.d.ts +38 -0
- package/data/build/dist/bootstrap/index.d.ts.map +1 -0
- package/data/build/dist/bootstrap/index.js +44 -0
- package/data/build/dist/bootstrap/index.js.map +1 -0
- package/data/build/dist/client/account-bar.d.ts +14 -0
- package/data/build/dist/client/account-bar.d.ts.map +1 -0
- package/data/build/dist/client/account-bar.js +541 -0
- package/data/build/dist/client/account-bar.js.map +1 -0
- package/data/build/dist/client/adapter-catalog-watch.d.ts +16 -0
- package/data/build/dist/client/adapter-catalog-watch.d.ts.map +1 -0
- package/data/build/dist/client/adapter-catalog-watch.js +91 -0
- package/data/build/dist/client/adapter-catalog-watch.js.map +1 -0
- package/data/build/dist/client/bundle.js +67698 -0
- package/data/build/dist/client/bundle.js.map +1 -0
- package/data/build/dist/client/cli-catalog.d.ts +29 -0
- package/data/build/dist/client/cli-catalog.d.ts.map +1 -0
- package/data/build/dist/client/cli-catalog.js +148 -0
- package/data/build/dist/client/cli-catalog.js.map +1 -0
- package/data/build/dist/client/cli-management-dialog.d.ts +21 -0
- package/data/build/dist/client/cli-management-dialog.d.ts.map +1 -0
- package/data/build/dist/client/cli-management-dialog.js +215 -0
- package/data/build/dist/client/cli-management-dialog.js.map +1 -0
- package/data/build/dist/client/cli-management-terminal.d.ts +9 -0
- package/data/build/dist/client/cli-management-terminal.d.ts.map +1 -0
- package/data/build/dist/client/cli-management-terminal.js +30 -0
- package/data/build/dist/client/cli-management-terminal.js.map +1 -0
- package/data/build/dist/client/cli-session-config-cache.d.ts +17 -0
- package/data/build/dist/client/cli-session-config-cache.d.ts.map +1 -0
- package/data/build/dist/client/cli-session-config-cache.js +62 -0
- package/data/build/dist/client/cli-session-config-cache.js.map +1 -0
- package/data/build/dist/client/cli-settings-dialog.d.ts +9 -0
- package/data/build/dist/client/cli-settings-dialog.d.ts.map +1 -0
- package/data/build/dist/client/cli-settings-dialog.js +45 -0
- package/data/build/dist/client/cli-settings-dialog.js.map +1 -0
- package/data/build/dist/client/cli-slots.d.ts +64 -0
- package/data/build/dist/client/cli-slots.d.ts.map +1 -0
- package/data/build/dist/client/cli-slots.js +985 -0
- package/data/build/dist/client/cli-slots.js.map +1 -0
- package/data/build/dist/client/client.command-token.js +32 -0
- package/data/build/dist/client/client.command-token.js.map +1 -0
- package/data/build/dist/client/client.delegate-command.js +1314 -0
- package/data/build/dist/client/client.delegate-command.js.map +1 -0
- package/data/build/dist/client/client.editor-engine.js +32557 -0
- package/data/build/dist/client/client.editor-engine.js.map +1 -0
- package/data/build/dist/client/client.primitives-adapter.js +3740 -0
- package/data/build/dist/client/client.primitives-adapter.js.map +1 -0
- package/data/build/dist/client/client.rolldown-runtime.js +58 -0
- package/data/build/dist/client/client.xterm-engine.js +13061 -0
- package/data/build/dist/client/client.xterm-engine.js.map +1 -0
- package/data/build/dist/client/command-token.d.ts +13 -0
- package/data/build/dist/client/command-token.d.ts.map +1 -0
- package/data/build/dist/client/command-token.js +14 -0
- package/data/build/dist/client/command-token.js.map +1 -0
- package/data/build/dist/client/context-breakdown-dom.d.ts +53 -0
- package/data/build/dist/client/context-breakdown-dom.d.ts.map +1 -0
- package/data/build/dist/client/context-breakdown-dom.js +171 -0
- package/data/build/dist/client/context-breakdown-dom.js.map +1 -0
- package/data/build/dist/client/conversation-translation-settings.d.ts +11 -0
- package/data/build/dist/client/conversation-translation-settings.d.ts.map +1 -0
- package/data/build/dist/client/conversation-translation-settings.js +60 -0
- package/data/build/dist/client/conversation-translation-settings.js.map +1 -0
- package/data/build/dist/client/credential-reference.d.ts +14 -0
- package/data/build/dist/client/credential-reference.d.ts.map +1 -0
- package/data/build/dist/client/credential-reference.js +268 -0
- package/data/build/dist/client/credential-reference.js.map +1 -0
- package/data/build/dist/client/credential-ui-dom.d.ts +18 -0
- package/data/build/dist/client/credential-ui-dom.d.ts.map +1 -0
- package/data/build/dist/client/credential-ui-dom.js +191 -0
- package/data/build/dist/client/credential-ui-dom.js.map +1 -0
- package/data/build/dist/client/credentials-settings-section.d.ts +10 -0
- package/data/build/dist/client/credentials-settings-section.d.ts.map +1 -0
- package/data/build/dist/client/credentials-settings-section.js +204 -0
- package/data/build/dist/client/credentials-settings-section.js.map +1 -0
- package/data/build/dist/client/debug/ui.d.ts +13 -0
- package/data/build/dist/client/debug/ui.d.ts.map +1 -0
- package/data/build/dist/client/debug/ui.js +499 -0
- package/data/build/dist/client/debug/ui.js.map +1 -0
- package/data/build/dist/client/delegate-command.d.ts +17 -0
- package/data/build/dist/client/delegate-command.d.ts.map +1 -0
- package/data/build/dist/client/delegate-command.js +616 -0
- package/data/build/dist/client/delegate-command.js.map +1 -0
- package/data/build/dist/client/delegate-plan.d.ts +40 -0
- package/data/build/dist/client/delegate-plan.d.ts.map +1 -0
- package/data/build/dist/client/delegate-plan.js +63 -0
- package/data/build/dist/client/delegate-plan.js.map +1 -0
- package/data/build/dist/client/delegate-ui-dom.d.ts +86 -0
- package/data/build/dist/client/delegate-ui-dom.d.ts.map +1 -0
- package/data/build/dist/client/delegate-ui-dom.js +647 -0
- package/data/build/dist/client/delegate-ui-dom.js.map +1 -0
- package/data/build/dist/client/dsh-h5-bootstrap.d.ts +66 -0
- package/data/build/dist/client/dsh-h5-bootstrap.d.ts.map +1 -0
- package/data/build/dist/client/dsh-h5-bootstrap.js +372 -0
- package/data/build/dist/client/dsh-h5-bootstrap.js.map +1 -0
- package/data/build/dist/client/dsh-runtime-version.d.ts +4 -0
- package/data/build/dist/client/dsh-runtime-version.d.ts.map +1 -0
- package/data/build/dist/client/dsh-runtime-version.js +11 -0
- package/data/build/dist/client/dsh-runtime-version.js.map +1 -0
- package/data/build/dist/client/editor-engine.d.ts +4 -0
- package/data/build/dist/client/editor-engine.d.ts.map +1 -0
- package/data/build/dist/client/editor-engine.js +53 -0
- package/data/build/dist/client/editor-engine.js.map +1 -0
- package/data/build/dist/client/engine-loader.d.ts +5 -0
- package/data/build/dist/client/engine-loader.d.ts.map +1 -0
- package/data/build/dist/client/engine-loader.js +35 -0
- package/data/build/dist/client/engine-loader.js.map +1 -0
- package/data/build/dist/client/external-tool-stream.d.ts +24 -0
- package/data/build/dist/client/external-tool-stream.d.ts.map +1 -0
- package/data/build/dist/client/external-tool-stream.js +123 -0
- package/data/build/dist/client/external-tool-stream.js.map +1 -0
- package/data/build/dist/client/features/cli-adapters.d.ts +14 -0
- package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -0
- package/data/build/dist/client/features/cli-adapters.js +456 -0
- package/data/build/dist/client/features/cli-adapters.js.map +1 -0
- package/data/build/dist/client/features/credentials.d.ts +3 -0
- package/data/build/dist/client/features/credentials.d.ts.map +1 -0
- package/data/build/dist/client/features/credentials.js +96 -0
- package/data/build/dist/client/features/credentials.js.map +1 -0
- package/data/build/dist/client/features/debug.d.ts +4 -0
- package/data/build/dist/client/features/debug.d.ts.map +1 -0
- package/data/build/dist/client/features/debug.js +26 -0
- package/data/build/dist/client/features/debug.js.map +1 -0
- package/data/build/dist/client/features/file-management-panel.d.ts +5 -0
- package/data/build/dist/client/features/file-management-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/file-management-panel.js +41 -0
- package/data/build/dist/client/features/file-management-panel.js.map +1 -0
- package/data/build/dist/client/features/file-management.d.ts +4 -0
- package/data/build/dist/client/features/file-management.d.ts.map +1 -0
- package/data/build/dist/client/features/file-management.js +92 -0
- package/data/build/dist/client/features/file-management.js.map +1 -0
- package/data/build/dist/client/features/index.d.ts +41 -0
- package/data/build/dist/client/features/index.d.ts.map +1 -0
- package/data/build/dist/client/features/index.js +63 -0
- package/data/build/dist/client/features/index.js.map +1 -0
- package/data/build/dist/client/features/lan-access-panel.d.ts +5 -0
- package/data/build/dist/client/features/lan-access-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/lan-access-panel.js +225 -0
- package/data/build/dist/client/features/lan-access-panel.js.map +1 -0
- package/data/build/dist/client/features/lan-access-status.d.ts +40 -0
- package/data/build/dist/client/features/lan-access-status.d.ts.map +1 -0
- package/data/build/dist/client/features/lan-access-status.js +118 -0
- package/data/build/dist/client/features/lan-access-status.js.map +1 -0
- package/data/build/dist/client/features/lan-access.d.ts +12 -0
- package/data/build/dist/client/features/lan-access.d.ts.map +1 -0
- package/data/build/dist/client/features/lan-access.js +62 -0
- package/data/build/dist/client/features/lan-access.js.map +1 -0
- package/data/build/dist/client/features/login-protection-panel.d.ts +5 -0
- package/data/build/dist/client/features/login-protection-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/login-protection-panel.js +96 -0
- package/data/build/dist/client/features/login-protection-panel.js.map +1 -0
- package/data/build/dist/client/features/login-protection-session.d.ts +8 -0
- package/data/build/dist/client/features/login-protection-session.d.ts.map +1 -0
- package/data/build/dist/client/features/login-protection-session.js +43 -0
- package/data/build/dist/client/features/login-protection-session.js.map +1 -0
- package/data/build/dist/client/features/login-protection.d.ts +4 -0
- package/data/build/dist/client/features/login-protection.d.ts.map +1 -0
- package/data/build/dist/client/features/login-protection.js +23 -0
- package/data/build/dist/client/features/login-protection.js.map +1 -0
- package/data/build/dist/client/features/mobile-access-panel.d.ts +12 -0
- package/data/build/dist/client/features/mobile-access-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/mobile-access-panel.js +256 -0
- package/data/build/dist/client/features/mobile-access-panel.js.map +1 -0
- package/data/build/dist/client/features/mobile-access.d.ts +10 -0
- package/data/build/dist/client/features/mobile-access.d.ts.map +1 -0
- package/data/build/dist/client/features/mobile-access.js +66 -0
- package/data/build/dist/client/features/mobile-access.js.map +1 -0
- package/data/build/dist/client/features/plugin-update.d.ts +3 -0
- package/data/build/dist/client/features/plugin-update.d.ts.map +1 -0
- package/data/build/dist/client/features/plugin-update.js +14 -0
- package/data/build/dist/client/features/plugin-update.js.map +1 -0
- package/data/build/dist/client/features/reverse-proxy-panel.d.ts +9 -0
- package/data/build/dist/client/features/reverse-proxy-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/reverse-proxy-panel.js +269 -0
- package/data/build/dist/client/features/reverse-proxy-panel.js.map +1 -0
- package/data/build/dist/client/features/reverse-proxy.d.ts +11 -0
- package/data/build/dist/client/features/reverse-proxy.d.ts.map +1 -0
- package/data/build/dist/client/features/reverse-proxy.js +183 -0
- package/data/build/dist/client/features/reverse-proxy.js.map +1 -0
- package/data/build/dist/client/features/session-translation.d.ts +3 -0
- package/data/build/dist/client/features/session-translation.d.ts.map +1 -0
- package/data/build/dist/client/features/session-translation.js +124 -0
- package/data/build/dist/client/features/session-translation.js.map +1 -0
- package/data/build/dist/client/features/subagent-collapsed-lineage.d.ts +9 -0
- package/data/build/dist/client/features/subagent-collapsed-lineage.d.ts.map +1 -0
- package/data/build/dist/client/features/subagent-collapsed-lineage.js +28 -0
- package/data/build/dist/client/features/subagent-collapsed-lineage.js.map +1 -0
- package/data/build/dist/client/features/subscription-usage-panel.d.ts +15 -0
- package/data/build/dist/client/features/subscription-usage-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/subscription-usage-panel.js +118 -0
- package/data/build/dist/client/features/subscription-usage-panel.js.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement-panel.d.ts +5 -0
- package/data/build/dist/client/features/terminal-enhancement-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement-panel.js +169 -0
- package/data/build/dist/client/features/terminal-enhancement-panel.js.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement.d.ts +4 -0
- package/data/build/dist/client/features/terminal-enhancement.d.ts.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement.js +30 -0
- package/data/build/dist/client/features/terminal-enhancement.js.map +1 -0
- package/data/build/dist/client/features/types.d.ts +99 -0
- package/data/build/dist/client/features/types.d.ts.map +1 -0
- package/data/build/dist/client/features/types.js +2 -0
- package/data/build/dist/client/features/types.js.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement-panel.d.ts +5 -0
- package/data/build/dist/client/features/workspace-session-enhancement-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement-panel.js +121 -0
- package/data/build/dist/client/features/workspace-session-enhancement-panel.js.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement.d.ts +4 -0
- package/data/build/dist/client/features/workspace-session-enhancement.d.ts.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement.js +278 -0
- package/data/build/dist/client/features/workspace-session-enhancement.js.map +1 -0
- package/data/build/dist/client/file-management-context-menu.d.ts +10 -0
- package/data/build/dist/client/file-management-context-menu.d.ts.map +1 -0
- package/data/build/dist/client/file-management-context-menu.js +178 -0
- package/data/build/dist/client/file-management-context-menu.js.map +1 -0
- package/data/build/dist/client/file-management-dom.d.ts +40 -0
- package/data/build/dist/client/file-management-dom.d.ts.map +1 -0
- package/data/build/dist/client/file-management-dom.js +660 -0
- package/data/build/dist/client/file-management-dom.js.map +1 -0
- package/data/build/dist/client/file-viewer-copy-path-menu.d.ts +27 -0
- package/data/build/dist/client/file-viewer-copy-path-menu.d.ts.map +1 -0
- package/data/build/dist/client/file-viewer-copy-path-menu.js +101 -0
- package/data/build/dist/client/file-viewer-copy-path-menu.js.map +1 -0
- package/data/build/dist/client/font-scale.d.ts +37 -0
- package/data/build/dist/client/font-scale.d.ts.map +1 -0
- package/data/build/dist/client/font-scale.js +56 -0
- package/data/build/dist/client/font-scale.js.map +1 -0
- package/data/build/dist/client/git-history-graph.d.ts +81 -0
- package/data/build/dist/client/git-history-graph.d.ts.map +1 -0
- package/data/build/dist/client/git-history-graph.js +195 -0
- package/data/build/dist/client/git-history-graph.js.map +1 -0
- package/data/build/dist/client/git-management-settings.d.ts +4 -0
- package/data/build/dist/client/git-management-settings.d.ts.map +1 -0
- package/data/build/dist/client/git-management-settings.js +73 -0
- package/data/build/dist/client/git-management-settings.js.map +1 -0
- package/data/build/dist/client/git-management.d.ts +24 -0
- package/data/build/dist/client/git-management.d.ts.map +1 -0
- package/data/build/dist/client/git-management.js +1209 -0
- package/data/build/dist/client/git-management.js.map +1 -0
- package/data/build/dist/client/git-panel-styles.d.ts +32 -0
- package/data/build/dist/client/git-panel-styles.d.ts.map +1 -0
- package/data/build/dist/client/git-panel-styles.js +110 -0
- package/data/build/dist/client/git-panel-styles.js.map +1 -0
- package/data/build/dist/client/git-workspace-events.d.ts +7 -0
- package/data/build/dist/client/git-workspace-events.d.ts.map +1 -0
- package/data/build/dist/client/git-workspace-events.js +32 -0
- package/data/build/dist/client/git-workspace-events.js.map +1 -0
- package/data/build/dist/client/git-worktree-selection.d.ts +89 -0
- package/data/build/dist/client/git-worktree-selection.d.ts.map +1 -0
- package/data/build/dist/client/git-worktree-selection.js +121 -0
- package/data/build/dist/client/git-worktree-selection.js.map +1 -0
- package/data/build/dist/client/h5-bootstrap-entry.d.ts +2 -0
- package/data/build/dist/client/h5-bootstrap-entry.d.ts.map +1 -0
- package/data/build/dist/client/h5-bootstrap-entry.js +17 -0
- package/data/build/dist/client/h5-bootstrap-entry.js.map +1 -0
- package/data/build/dist/client/html-workspace-files.d.ts +4 -0
- package/data/build/dist/client/html-workspace-files.d.ts.map +1 -0
- package/data/build/dist/client/html-workspace-files.js +114 -0
- package/data/build/dist/client/html-workspace-files.js.map +1 -0
- package/data/build/dist/client/index.d.ts +39 -0
- package/data/build/dist/client/index.d.ts.map +1 -0
- package/data/build/dist/client/index.js +249 -0
- package/data/build/dist/client/index.js.map +1 -0
- package/data/build/dist/client/lan-access.d.ts +28 -0
- package/data/build/dist/client/lan-access.d.ts.map +1 -0
- package/data/build/dist/client/lan-access.js +68 -0
- package/data/build/dist/client/lan-access.js.map +1 -0
- package/data/build/dist/client/locale.d.ts +27 -0
- package/data/build/dist/client/locale.d.ts.map +1 -0
- package/data/build/dist/client/locale.js +845 -0
- package/data/build/dist/client/locale.js.map +1 -0
- package/data/build/dist/client/locales/cliManagement.d.ts +3 -0
- package/data/build/dist/client/locales/cliManagement.d.ts.map +1 -0
- package/data/build/dist/client/locales/cliManagement.js +155 -0
- package/data/build/dist/client/locales/cliManagement.js.map +1 -0
- package/data/build/dist/client/locales/credentials.d.ts +3 -0
- package/data/build/dist/client/locales/credentials.d.ts.map +1 -0
- package/data/build/dist/client/locales/credentials.js +93 -0
- package/data/build/dist/client/locales/credentials.js.map +1 -0
- package/data/build/dist/client/locales/debug.d.ts +9 -0
- package/data/build/dist/client/locales/debug.d.ts.map +1 -0
- package/data/build/dist/client/locales/debug.js +163 -0
- package/data/build/dist/client/locales/debug.js.map +1 -0
- package/data/build/dist/client/locales/fileWorkspace.d.ts +9 -0
- package/data/build/dist/client/locales/fileWorkspace.d.ts.map +1 -0
- package/data/build/dist/client/locales/fileWorkspace.js +153 -0
- package/data/build/dist/client/locales/fileWorkspace.js.map +1 -0
- package/data/build/dist/client/locales/git.d.ts +9 -0
- package/data/build/dist/client/locales/git.d.ts.map +1 -0
- package/data/build/dist/client/locales/git.js +263 -0
- package/data/build/dist/client/locales/git.js.map +1 -0
- package/data/build/dist/client/locales/nativeApproval.d.ts +3 -0
- package/data/build/dist/client/locales/nativeApproval.d.ts.map +1 -0
- package/data/build/dist/client/locales/nativeApproval.js +51 -0
- package/data/build/dist/client/locales/nativeApproval.js.map +1 -0
- package/data/build/dist/client/locales/panels.d.ts +9 -0
- package/data/build/dist/client/locales/panels.d.ts.map +1 -0
- package/data/build/dist/client/locales/panels.js +251 -0
- package/data/build/dist/client/locales/panels.js.map +1 -0
- package/data/build/dist/client/locales/pluginUpdate.d.ts +3 -0
- package/data/build/dist/client/locales/pluginUpdate.d.ts.map +1 -0
- package/data/build/dist/client/locales/pluginUpdate.js +131 -0
- package/data/build/dist/client/locales/pluginUpdate.js.map +1 -0
- package/data/build/dist/client/locales/subagentCollapsed.d.ts +53 -0
- package/data/build/dist/client/locales/subagentCollapsed.d.ts.map +1 -0
- package/data/build/dist/client/locales/subagentCollapsed.js +95 -0
- package/data/build/dist/client/locales/subagentCollapsed.js.map +1 -0
- package/data/build/dist/client/locales/terminalAuth.d.ts +9 -0
- package/data/build/dist/client/locales/terminalAuth.d.ts.map +1 -0
- package/data/build/dist/client/locales/terminalAuth.js +153 -0
- package/data/build/dist/client/locales/terminalAuth.js.map +1 -0
- package/data/build/dist/client/locales/usage.d.ts +9 -0
- package/data/build/dist/client/locales/usage.d.ts.map +1 -0
- package/data/build/dist/client/locales/usage.js +311 -0
- package/data/build/dist/client/locales/usage.js.map +1 -0
- package/data/build/dist/client/mobile-rightbar-tabs-dom.d.ts +29 -0
- package/data/build/dist/client/mobile-rightbar-tabs-dom.d.ts.map +1 -0
- package/data/build/dist/client/mobile-rightbar-tabs-dom.js +93 -0
- package/data/build/dist/client/mobile-rightbar-tabs-dom.js.map +1 -0
- package/data/build/dist/client/mobile-rightbar-visibility.d.ts +32 -0
- package/data/build/dist/client/mobile-rightbar-visibility.d.ts.map +1 -0
- package/data/build/dist/client/mobile-rightbar-visibility.js +188 -0
- package/data/build/dist/client/mobile-rightbar-visibility.js.map +1 -0
- package/data/build/dist/client/mobile-session-interaction.d.ts +43 -0
- package/data/build/dist/client/mobile-session-interaction.d.ts.map +1 -0
- package/data/build/dist/client/mobile-session-interaction.js +227 -0
- package/data/build/dist/client/mobile-session-interaction.js.map +1 -0
- package/data/build/dist/client/mobile-settings-modal-dom.d.ts +49 -0
- package/data/build/dist/client/mobile-settings-modal-dom.d.ts.map +1 -0
- package/data/build/dist/client/mobile-settings-modal-dom.js +152 -0
- package/data/build/dist/client/mobile-settings-modal-dom.js.map +1 -0
- package/data/build/dist/client/mobile-sidebar-gestures.d.ts +149 -0
- package/data/build/dist/client/mobile-sidebar-gestures.d.ts.map +1 -0
- package/data/build/dist/client/mobile-sidebar-gestures.js +623 -0
- package/data/build/dist/client/mobile-sidebar-gestures.js.map +1 -0
- package/data/build/dist/client/mobile-sidebar-logo.d.ts +18 -0
- package/data/build/dist/client/mobile-sidebar-logo.d.ts.map +1 -0
- package/data/build/dist/client/mobile-sidebar-logo.js +15 -0
- package/data/build/dist/client/mobile-sidebar-logo.js.map +1 -0
- package/data/build/dist/client/mobile-sidebar-rail-dom.d.ts +114 -0
- package/data/build/dist/client/mobile-sidebar-rail-dom.d.ts.map +1 -0
- package/data/build/dist/client/mobile-sidebar-rail-dom.js +452 -0
- package/data/build/dist/client/mobile-sidebar-rail-dom.js.map +1 -0
- package/data/build/dist/client/mobile-team-panel-dom.d.ts +14 -0
- package/data/build/dist/client/mobile-team-panel-dom.d.ts.map +1 -0
- package/data/build/dist/client/mobile-team-panel-dom.js +164 -0
- package/data/build/dist/client/mobile-team-panel-dom.js.map +1 -0
- package/data/build/dist/client/mobile-vibration.d.ts +16 -0
- package/data/build/dist/client/mobile-vibration.d.ts.map +1 -0
- package/data/build/dist/client/mobile-vibration.js +20 -0
- package/data/build/dist/client/mobile-vibration.js.map +1 -0
- package/data/build/dist/client/model-catalog-cache.d.ts +28 -0
- package/data/build/dist/client/model-catalog-cache.d.ts.map +1 -0
- package/data/build/dist/client/model-catalog-cache.js +158 -0
- package/data/build/dist/client/model-catalog-cache.js.map +1 -0
- package/data/build/dist/client/model-priority-pool.d.ts +23 -0
- package/data/build/dist/client/model-priority-pool.d.ts.map +1 -0
- package/data/build/dist/client/model-priority-pool.js +245 -0
- package/data/build/dist/client/model-priority-pool.js.map +1 -0
- package/data/build/dist/client/native-approval-selector.d.ts +22 -0
- package/data/build/dist/client/native-approval-selector.d.ts.map +1 -0
- package/data/build/dist/client/native-approval-selector.js +39 -0
- package/data/build/dist/client/native-approval-selector.js.map +1 -0
- package/data/build/dist/client/native-model-translation-menu.d.ts +6 -0
- package/data/build/dist/client/native-model-translation-menu.d.ts.map +1 -0
- package/data/build/dist/client/native-model-translation-menu.js +62 -0
- package/data/build/dist/client/native-model-translation-menu.js.map +1 -0
- package/data/build/dist/client/native-translation-default.d.ts +6 -0
- package/data/build/dist/client/native-translation-default.d.ts.map +1 -0
- package/data/build/dist/client/native-translation-default.js +30 -0
- package/data/build/dist/client/native-translation-default.js.map +1 -0
- package/data/build/dist/client/native-workspace-store.d.ts +29 -0
- package/data/build/dist/client/native-workspace-store.d.ts.map +1 -0
- package/data/build/dist/client/native-workspace-store.js +75 -0
- package/data/build/dist/client/native-workspace-store.js.map +1 -0
- package/data/build/dist/client/popup-dismiss.d.ts +48 -0
- package/data/build/dist/client/popup-dismiss.d.ts.map +1 -0
- package/data/build/dist/client/popup-dismiss.js +93 -0
- package/data/build/dist/client/popup-dismiss.js.map +1 -0
- package/data/build/dist/client/provider-icon-assets.d.ts +2 -0
- package/data/build/dist/client/provider-icon-assets.d.ts.map +1 -0
- package/data/build/dist/client/provider-icon-assets.js +7 -0
- package/data/build/dist/client/provider-icon-assets.js.map +1 -0
- package/data/build/dist/client/provider-icon-bridge.d.ts +6 -0
- package/data/build/dist/client/provider-icon-bridge.d.ts.map +1 -0
- package/data/build/dist/client/provider-icon-bridge.js +65 -0
- package/data/build/dist/client/provider-icon-bridge.js.map +1 -0
- package/data/build/dist/client/provider-icons.d.ts +43 -0
- package/data/build/dist/client/provider-icons.d.ts.map +1 -0
- package/data/build/dist/client/provider-icons.js +185 -0
- package/data/build/dist/client/provider-icons.js.map +1 -0
- package/data/build/dist/client/pwa-install-prompt.d.ts +76 -0
- package/data/build/dist/client/pwa-install-prompt.d.ts.map +1 -0
- package/data/build/dist/client/pwa-install-prompt.js +179 -0
- package/data/build/dist/client/pwa-install-prompt.js.map +1 -0
- package/data/build/dist/client/pwa-notifications.d.ts +105 -0
- package/data/build/dist/client/pwa-notifications.d.ts.map +1 -0
- package/data/build/dist/client/pwa-notifications.js +192 -0
- package/data/build/dist/client/pwa-notifications.js.map +1 -0
- package/data/build/dist/client/quick-phrase-layout.d.ts +60 -0
- package/data/build/dist/client/quick-phrase-layout.d.ts.map +1 -0
- package/data/build/dist/client/quick-phrase-layout.js +115 -0
- package/data/build/dist/client/quick-phrase-layout.js.map +1 -0
- package/data/build/dist/client/quick-phrase-slot.d.ts +7 -0
- package/data/build/dist/client/quick-phrase-slot.d.ts.map +1 -0
- package/data/build/dist/client/quick-phrase-slot.js +405 -0
- package/data/build/dist/client/quick-phrase-slot.js.map +1 -0
- package/data/build/dist/client/remote-web-context.d.ts +59 -0
- package/data/build/dist/client/remote-web-context.d.ts.map +1 -0
- package/data/build/dist/client/remote-web-context.js +1037 -0
- package/data/build/dist/client/remote-web-context.js.map +1 -0
- package/data/build/dist/client/rpc-call.d.ts +4 -0
- package/data/build/dist/client/rpc-call.d.ts.map +1 -0
- package/data/build/dist/client/rpc-call.js +23 -0
- package/data/build/dist/client/rpc-call.js.map +1 -0
- package/data/build/dist/client/serial-polling.d.ts +16 -0
- package/data/build/dist/client/serial-polling.d.ts.map +1 -0
- package/data/build/dist/client/serial-polling.js +50 -0
- package/data/build/dist/client/serial-polling.js.map +1 -0
- package/data/build/dist/client/service-tier.d.ts +65 -0
- package/data/build/dist/client/service-tier.d.ts.map +1 -0
- package/data/build/dist/client/service-tier.js +93 -0
- package/data/build/dist/client/service-tier.js.map +1 -0
- package/data/build/dist/client/session-adapter-cache.d.ts +20 -0
- package/data/build/dist/client/session-adapter-cache.d.ts.map +1 -0
- package/data/build/dist/client/session-adapter-cache.js +105 -0
- package/data/build/dist/client/session-adapter-cache.js.map +1 -0
- package/data/build/dist/client/session-changed-files-view.d.ts +37 -0
- package/data/build/dist/client/session-changed-files-view.d.ts.map +1 -0
- package/data/build/dist/client/session-changed-files-view.js +528 -0
- package/data/build/dist/client/session-changed-files-view.js.map +1 -0
- package/data/build/dist/client/session-file-links.d.ts +11 -0
- package/data/build/dist/client/session-file-links.d.ts.map +1 -0
- package/data/build/dist/client/session-file-links.js +52 -0
- package/data/build/dist/client/session-file-links.js.map +1 -0
- package/data/build/dist/client/session-translation-chat.d.ts +73 -0
- package/data/build/dist/client/session-translation-chat.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-chat.js +889 -0
- package/data/build/dist/client/session-translation-chat.js.map +1 -0
- package/data/build/dist/client/session-translation-interactions.d.ts +40 -0
- package/data/build/dist/client/session-translation-interactions.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-interactions.js +222 -0
- package/data/build/dist/client/session-translation-interactions.js.map +1 -0
- package/data/build/dist/client/session-translation-pending-dom.d.ts +8 -0
- package/data/build/dist/client/session-translation-pending-dom.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-pending-dom.js +58 -0
- package/data/build/dist/client/session-translation-pending-dom.js.map +1 -0
- package/data/build/dist/client/session-translation-retry.d.ts +16 -0
- package/data/build/dist/client/session-translation-retry.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-retry.js +67 -0
- package/data/build/dist/client/session-translation-retry.js.map +1 -0
- package/data/build/dist/client/session-translation-rules.d.ts +13 -0
- package/data/build/dist/client/session-translation-rules.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-rules.js +58 -0
- package/data/build/dist/client/session-translation-rules.js.map +1 -0
- package/data/build/dist/client/settings-anchor.d.ts +73 -0
- package/data/build/dist/client/settings-anchor.d.ts.map +1 -0
- package/data/build/dist/client/settings-anchor.js +70 -0
- package/data/build/dist/client/settings-anchor.js.map +1 -0
- package/data/build/dist/client/settings-bridge.d.ts +62 -0
- package/data/build/dist/client/settings-bridge.d.ts.map +1 -0
- package/data/build/dist/client/settings-bridge.js +247 -0
- package/data/build/dist/client/settings-bridge.js.map +1 -0
- package/data/build/dist/client/settings-controls.d.ts +29 -0
- package/data/build/dist/client/settings-controls.d.ts.map +1 -0
- package/data/build/dist/client/settings-controls.js +80 -0
- package/data/build/dist/client/settings-controls.js.map +1 -0
- package/data/build/dist/client/settings-promo-styles.d.ts +33 -0
- package/data/build/dist/client/settings-promo-styles.d.ts.map +1 -0
- package/data/build/dist/client/settings-promo-styles.js +71 -0
- package/data/build/dist/client/settings-promo-styles.js.map +1 -0
- package/data/build/dist/client/settings-promo.d.ts +16 -0
- package/data/build/dist/client/settings-promo.d.ts.map +1 -0
- package/data/build/dist/client/settings-promo.js +68 -0
- package/data/build/dist/client/settings-promo.js.map +1 -0
- package/data/build/dist/client/settings-section.d.ts +31 -0
- package/data/build/dist/client/settings-section.d.ts.map +1 -0
- package/data/build/dist/client/settings-section.js +140 -0
- package/data/build/dist/client/settings-section.js.map +1 -0
- package/data/build/dist/client/settings-update.d.ts +8 -0
- package/data/build/dist/client/settings-update.d.ts.map +1 -0
- package/data/build/dist/client/settings-update.js +57 -0
- package/data/build/dist/client/settings-update.js.map +1 -0
- package/data/build/dist/client/sidebar-footer-style.d.ts +11 -0
- package/data/build/dist/client/sidebar-footer-style.d.ts.map +1 -0
- package/data/build/dist/client/sidebar-footer-style.js +6 -0
- package/data/build/dist/client/sidebar-footer-style.js.map +1 -0
- package/data/build/dist/client/skill-command.d.ts +10 -0
- package/data/build/dist/client/skill-command.d.ts.map +1 -0
- package/data/build/dist/client/skill-command.js +282 -0
- package/data/build/dist/client/skill-command.js.map +1 -0
- package/data/build/dist/client/skill-reference-dom.d.ts +38 -0
- package/data/build/dist/client/skill-reference-dom.d.ts.map +1 -0
- package/data/build/dist/client/skill-reference-dom.js +187 -0
- package/data/build/dist/client/skill-reference-dom.js.map +1 -0
- package/data/build/dist/client/subagent-collapsed-lineage.d.ts +103 -0
- package/data/build/dist/client/subagent-collapsed-lineage.d.ts.map +1 -0
- package/data/build/dist/client/subagent-collapsed-lineage.js +664 -0
- package/data/build/dist/client/subagent-collapsed-lineage.js.map +1 -0
- package/data/build/dist/client/subscription-slot.d.ts +49 -0
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -0
- package/data/build/dist/client/subscription-slot.js +936 -0
- package/data/build/dist/client/subscription-slot.js.map +1 -0
- package/data/build/dist/client/terminal/index.d.ts +4 -0
- package/data/build/dist/client/terminal/index.d.ts.map +1 -0
- package/data/build/dist/client/terminal/index.js +3 -0
- package/data/build/dist/client/terminal/index.js.map +1 -0
- package/data/build/dist/client/terminal/log-preview.d.ts +14 -0
- package/data/build/dist/client/terminal/log-preview.d.ts.map +1 -0
- package/data/build/dist/client/terminal/log-preview.js +23 -0
- package/data/build/dist/client/terminal/log-preview.js.map +1 -0
- package/data/build/dist/client/terminal/model.d.ts +287 -0
- package/data/build/dist/client/terminal/model.d.ts.map +1 -0
- package/data/build/dist/client/terminal/model.js +1166 -0
- package/data/build/dist/client/terminal/model.js.map +1 -0
- package/data/build/dist/client/terminal/recovery.d.ts +69 -0
- package/data/build/dist/client/terminal/recovery.d.ts.map +1 -0
- package/data/build/dist/client/terminal/recovery.js +167 -0
- package/data/build/dist/client/terminal/recovery.js.map +1 -0
- package/data/build/dist/client/terminal/selection-actions.d.ts +63 -0
- package/data/build/dist/client/terminal/selection-actions.d.ts.map +1 -0
- package/data/build/dist/client/terminal/selection-actions.js +132 -0
- package/data/build/dist/client/terminal/selection-actions.js.map +1 -0
- package/data/build/dist/client/terminal/share-menu.d.ts +17 -0
- package/data/build/dist/client/terminal/share-menu.d.ts.map +1 -0
- package/data/build/dist/client/terminal/share-menu.js +131 -0
- package/data/build/dist/client/terminal/share-menu.js.map +1 -0
- package/data/build/dist/client/terminal/sharing.d.ts +42 -0
- package/data/build/dist/client/terminal/sharing.d.ts.map +1 -0
- package/data/build/dist/client/terminal/sharing.js +144 -0
- package/data/build/dist/client/terminal/sharing.js.map +1 -0
- package/data/build/dist/client/terminal/snapshot.d.ts +32 -0
- package/data/build/dist/client/terminal/snapshot.d.ts.map +1 -0
- package/data/build/dist/client/terminal/snapshot.js +108 -0
- package/data/build/dist/client/terminal/snapshot.js.map +1 -0
- package/data/build/dist/client/terminal/styles.d.ts +53 -0
- package/data/build/dist/client/terminal/styles.d.ts.map +1 -0
- package/data/build/dist/client/terminal/styles.js +134 -0
- package/data/build/dist/client/terminal/styles.js.map +1 -0
- package/data/build/dist/client/terminal/surface-cache.d.ts +10 -0
- package/data/build/dist/client/terminal/surface-cache.d.ts.map +1 -0
- package/data/build/dist/client/terminal/surface-cache.js +19 -0
- package/data/build/dist/client/terminal/surface-cache.js.map +1 -0
- package/data/build/dist/client/terminal/ui.d.ts +20 -0
- package/data/build/dist/client/terminal/ui.d.ts.map +1 -0
- package/data/build/dist/client/terminal/ui.js +618 -0
- package/data/build/dist/client/terminal/ui.js.map +1 -0
- package/data/build/dist/client/terminal/xterm-engine.d.ts +4 -0
- package/data/build/dist/client/terminal/xterm-engine.d.ts.map +1 -0
- package/data/build/dist/client/terminal/xterm-engine.js +5 -0
- package/data/build/dist/client/terminal/xterm-engine.js.map +1 -0
- package/data/build/dist/client/terminal/xterm-view.d.ts +23 -0
- package/data/build/dist/client/terminal/xterm-view.d.ts.map +1 -0
- package/data/build/dist/client/terminal/xterm-view.js +790 -0
- package/data/build/dist/client/terminal/xterm-view.js.map +1 -0
- package/data/build/dist/client/theme.d.ts +75 -0
- package/data/build/dist/client/theme.d.ts.map +1 -0
- package/data/build/dist/client/theme.js +247 -0
- package/data/build/dist/client/theme.js.map +1 -0
- package/data/build/dist/client/touch-input-focus.d.ts +30 -0
- package/data/build/dist/client/touch-input-focus.d.ts.map +1 -0
- package/data/build/dist/client/touch-input-focus.js +209 -0
- package/data/build/dist/client/touch-input-focus.js.map +1 -0
- package/data/build/dist/client/update-panel-styles.d.ts +29 -0
- package/data/build/dist/client/update-panel-styles.d.ts.map +1 -0
- package/data/build/dist/client/update-panel-styles.js +69 -0
- package/data/build/dist/client/update-panel-styles.js.map +1 -0
- package/data/build/dist/client/update-panel.d.ts +7 -0
- package/data/build/dist/client/update-panel.d.ts.map +1 -0
- package/data/build/dist/client/update-panel.js +52 -0
- package/data/build/dist/client/update-panel.js.map +1 -0
- package/data/build/dist/client/update-store.d.ts +43 -0
- package/data/build/dist/client/update-store.d.ts.map +1 -0
- package/data/build/dist/client/update-store.js +207 -0
- package/data/build/dist/client/update-store.js.map +1 -0
- package/data/build/dist/client/workspace-activity-dom.d.ts +8 -0
- package/data/build/dist/client/workspace-activity-dom.d.ts.map +1 -0
- package/data/build/dist/client/workspace-activity-dom.js +140 -0
- package/data/build/dist/client/workspace-activity-dom.js.map +1 -0
- package/data/build/dist/client/workspace-session-archive-dom.d.ts +58 -0
- package/data/build/dist/client/workspace-session-archive-dom.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-archive-dom.js +749 -0
- package/data/build/dist/client/workspace-session-archive-dom.js.map +1 -0
- package/data/build/dist/client/workspace-session-fiber.d.ts +3 -0
- package/data/build/dist/client/workspace-session-fiber.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-fiber.js +33 -0
- package/data/build/dist/client/workspace-session-fiber.js.map +1 -0
- package/data/build/dist/client/workspace-session-logo-dom.d.ts +29 -0
- package/data/build/dist/client/workspace-session-logo-dom.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-logo-dom.js +130 -0
- package/data/build/dist/client/workspace-session-logo-dom.js.map +1 -0
- package/data/build/dist/client/workspace-session-rightbar-dom.d.ts +28 -0
- package/data/build/dist/client/workspace-session-rightbar-dom.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-rightbar-dom.js +282 -0
- package/data/build/dist/client/workspace-session-rightbar-dom.js.map +1 -0
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts +39 -0
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-visibility-dom.js +712 -0
- package/data/build/dist/client/workspace-session-visibility-dom.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/agent-permission-presentation-adapter.d.ts +4 -0
- package/data/build/dist/dsh-capabilities/client/agent-permission-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/agent-permission-presentation-adapter.js +18 -0
- package/data/build/dist/dsh-capabilities/client/agent-permission-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.d.ts +8 -0
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.js +71 -0
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.d.ts +4 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.js +8 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.d.ts +64 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.js +162 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/context-menu-adapter.d.ts +22 -0
- package/data/build/dist/dsh-capabilities/client/context-menu-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/context-menu-adapter.js +33 -0
- package/data/build/dist/dsh-capabilities/client/context-menu-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/conversation-adapter.d.ts +7 -0
- package/data/build/dist/dsh-capabilities/client/conversation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/conversation-adapter.js +6 -0
- package/data/build/dist/dsh-capabilities/client/conversation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/global-panel-adapter.d.ts +27 -0
- package/data/build/dist/dsh-capabilities/client/global-panel-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/global-panel-adapter.js +109 -0
- package/data/build/dist/dsh-capabilities/client/global-panel-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.d.ts +33 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.js +99 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.d.ts +12 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.js +181 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/locale-adapter.d.ts +9 -0
- package/data/build/dist/dsh-capabilities/client/locale-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/locale-adapter.js +4 -0
- package/data/build/dist/dsh-capabilities/client/locale-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.d.ts +21 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.js +49 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/plugin-reload-adapter.d.ts +4 -0
- package/data/build/dist/dsh-capabilities/client/plugin-reload-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/plugin-reload-adapter.js +6 -0
- package/data/build/dist/dsh-capabilities/client/plugin-reload-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts +76 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js +180 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.d.ts +20 -0
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.js +65 -0
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.d.ts +9 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.js +79 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.d.ts +14 -0
- package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.js +39 -0
- package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-adapter.d.ts +7 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-adapter.js +5 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.d.ts +3 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.js +22 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.d.ts +32 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.js +90 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/terminal-sharing-adapter.d.ts +33 -0
- package/data/build/dist/dsh-capabilities/client/terminal-sharing-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/terminal-sharing-adapter.js +186 -0
- package/data/build/dist/dsh-capabilities/client/terminal-sharing-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/theme-adapter.d.ts +6 -0
- package/data/build/dist/dsh-capabilities/client/theme-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/theme-adapter.js +4 -0
- package/data/build/dist/dsh-capabilities/client/theme-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/typert-adapter.d.ts +5 -0
- package/data/build/dist/dsh-capabilities/client/typert-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/typert-adapter.js +4 -0
- package/data/build/dist/dsh-capabilities/client/typert-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.d.ts +81 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.js +237 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/attachment-store-adapter.d.ts +12 -0
- package/data/build/dist/dsh-capabilities/host/attachment-store-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/attachment-store-adapter.js +10 -0
- package/data/build/dist/dsh-capabilities/host/attachment-store-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.d.ts +40 -0
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.js +71 -0
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.d.ts +8 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.js +24 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.d.ts +19 -0
- package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.js +13 -0
- package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/llm-text-adapter.d.ts +27 -0
- package/data/build/dist/dsh-capabilities/host/llm-text-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/llm-text-adapter.js +101 -0
- package/data/build/dist/dsh-capabilities/host/llm-text-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/plugin-update-adapter.d.ts +23 -0
- package/data/build/dist/dsh-capabilities/host/plugin-update-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/plugin-update-adapter.js +79 -0
- package/data/build/dist/dsh-capabilities/host/plugin-update-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.d.ts +17 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.js +37 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-compaction-adapter.d.ts +16 -0
- package/data/build/dist/dsh-capabilities/host/session-compaction-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-compaction-adapter.js +94 -0
- package/data/build/dist/dsh-capabilities/host/session-compaction-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.d.ts +24 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.js +106 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.d.ts +7 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.js +27 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.d.ts +29 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.js +65 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.d.ts +11 -0
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.js +229 -0
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.d.ts +8 -0
- package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.js +47 -0
- package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/sidebar-session-compat.d.ts +28 -0
- package/data/build/dist/dsh-capabilities/host/sidebar-session-compat.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/sidebar-session-compat.js +123 -0
- package/data/build/dist/dsh-capabilities/host/sidebar-session-compat.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/typert-adapter.d.ts +6 -0
- package/data/build/dist/dsh-capabilities/host/typert-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/typert-adapter.js +4 -0
- package/data/build/dist/dsh-capabilities/host/typert-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/index.d.ts +6 -0
- package/data/build/dist/dsh-capabilities/index.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/index.js +6 -0
- package/data/build/dist/dsh-capabilities/index.js.map +1 -0
- package/data/build/dist/dsh-capabilities/matrix.d.ts +17 -0
- package/data/build/dist/dsh-capabilities/matrix.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/matrix.js +91 -0
- package/data/build/dist/dsh-capabilities/matrix.js.map +1 -0
- package/data/build/dist/dsh-capabilities/registry.d.ts +22 -0
- package/data/build/dist/dsh-capabilities/registry.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/registry.js +200 -0
- package/data/build/dist/dsh-capabilities/registry.js.map +1 -0
- package/data/build/dist/dsh-capabilities/routes.d.ts +17 -0
- package/data/build/dist/dsh-capabilities/routes.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/routes.js +307 -0
- package/data/build/dist/dsh-capabilities/routes.js.map +1 -0
- package/data/build/dist/dsh-capabilities/settings-store.d.ts +43 -0
- package/data/build/dist/dsh-capabilities/settings-store.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/settings-store.js +39 -0
- package/data/build/dist/dsh-capabilities/settings-store.js.map +1 -0
- package/data/build/dist/dsh-capabilities/types.d.ts +50 -0
- package/data/build/dist/dsh-capabilities/types.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/types.js +23 -0
- package/data/build/dist/dsh-capabilities/types.js.map +1 -0
- package/data/build/dist/features/index.d.ts +3 -0
- package/data/build/dist/features/index.d.ts.map +1 -0
- package/data/build/dist/features/index.js +2 -0
- package/data/build/dist/features/index.js.map +1 -0
- package/data/build/dist/features/registry.d.ts +87 -0
- package/data/build/dist/features/registry.d.ts.map +1 -0
- package/data/build/dist/features/registry.js +525 -0
- package/data/build/dist/features/registry.js.map +1 -0
- package/data/build/dist/host/auth-session.d.ts +49 -0
- package/data/build/dist/host/auth-session.d.ts.map +1 -0
- package/data/build/dist/host/auth-session.js +208 -0
- package/data/build/dist/host/auth-session.js.map +1 -0
- package/data/build/dist/host/browser-text.d.ts +30 -0
- package/data/build/dist/host/browser-text.d.ts.map +1 -0
- package/data/build/dist/host/browser-text.js +119 -0
- package/data/build/dist/host/browser-text.js.map +1 -0
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts +156 -0
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js +705 -0
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/acp-elicitation.d.ts +31 -0
- package/data/build/dist/host/cli-adapters/acp-elicitation.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/acp-elicitation.js +144 -0
- package/data/build/dist/host/cli-adapters/acp-elicitation.js.map +1 -0
- package/data/build/dist/host/cli-adapters/antigravity-driver.d.ts +96 -0
- package/data/build/dist/host/cli-adapters/antigravity-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/antigravity-driver.js +608 -0
- package/data/build/dist/host/cli-adapters/antigravity-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/antigravity-performance-projection.d.ts +90 -0
- package/data/build/dist/host/cli-adapters/antigravity-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/antigravity-performance-projection.js +7 -0
- package/data/build/dist/host/cli-adapters/antigravity-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/antigravity-subscription.d.ts +122 -0
- package/data/build/dist/host/cli-adapters/antigravity-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/antigravity-subscription.js +545 -0
- package/data/build/dist/host/cli-adapters/antigravity-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/antigravity-updater.d.ts +18 -0
- package/data/build/dist/host/cli-adapters/antigravity-updater.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/antigravity-updater.js +75 -0
- package/data/build/dist/host/cli-adapters/antigravity-updater.js.map +1 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts +26 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.js +189 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.js.map +1 -0
- package/data/build/dist/host/cli-adapters/binary-detection.d.ts +19 -0
- package/data/build/dist/host/cli-adapters/binary-detection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/binary-detection.js +75 -0
- package/data/build/dist/host/cli-adapters/binary-detection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts +88 -0
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.js +815 -0
- package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-model-options.d.ts +17 -0
- package/data/build/dist/host/cli-adapters/claude-model-options.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-model-options.js +109 -0
- package/data/build/dist/host/cli-adapters/claude-model-options.js.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-performance-projection.d.ts +90 -0
- package/data/build/dist/host/cli-adapters/claude-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-performance-projection.js +7 -0
- package/data/build/dist/host/cli-adapters/claude-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-performance.d.ts +11 -0
- package/data/build/dist/host/cli-adapters/claude-performance.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-performance.js +66 -0
- package/data/build/dist/host/cli-adapters/claude-performance.js.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-process.d.ts +7 -0
- package/data/build/dist/host/cli-adapters/claude-process.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-process.js +59 -0
- package/data/build/dist/host/cli-adapters/claude-process.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codebuddy-driver.d.ts +148 -0
- package/data/build/dist/host/cli-adapters/codebuddy-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codebuddy-driver.js +1958 -0
- package/data/build/dist/host/cli-adapters/codebuddy-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codebuddy-subscription.d.ts +53 -0
- package/data/build/dist/host/cli-adapters/codebuddy-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codebuddy-subscription.js +778 -0
- package/data/build/dist/host/cli-adapters/codebuddy-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts +155 -0
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-driver.js +2226 -0
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-file-citations.d.ts +13 -0
- package/data/build/dist/host/cli-adapters/codex-file-citations.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-file-citations.js +271 -0
- package/data/build/dist/host/cli-adapters/codex-file-citations.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.d.ts +91 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.js +8 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance.d.ts +16 -0
- package/data/build/dist/host/cli-adapters/codex-performance.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance.js +81 -0
- package/data/build/dist/host/cli-adapters/codex-performance.js.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.d.ts +32 -0
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.js +179 -0
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.js.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts +135 -0
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-driver.js +2098 -0
- package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-history.d.ts +174 -0
- package/data/build/dist/host/cli-adapters/command-code-history.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-history.js +789 -0
- package/data/build/dist/host/cli-adapters/command-code-history.js.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-subscription.d.ts +19 -0
- package/data/build/dist/host/cli-adapters/command-code-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-subscription.js +132 -0
- package/data/build/dist/host/cli-adapters/command-code-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/cursor-driver.d.ts +21 -0
- package/data/build/dist/host/cli-adapters/cursor-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/cursor-driver.js +91 -0
- package/data/build/dist/host/cli-adapters/cursor-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/custom-upstream-classifier.d.ts +67 -0
- package/data/build/dist/host/cli-adapters/custom-upstream-classifier.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/custom-upstream-classifier.js +169 -0
- package/data/build/dist/host/cli-adapters/custom-upstream-classifier.js.map +1 -0
- package/data/build/dist/host/cli-adapters/delegate-dispatch.d.ts +49 -0
- package/data/build/dist/host/cli-adapters/delegate-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/delegate-dispatch.js +112 -0
- package/data/build/dist/host/cli-adapters/delegate-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-adapters/delegation-authorization.d.ts +19 -0
- package/data/build/dist/host/cli-adapters/delegation-authorization.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/delegation-authorization.js +49 -0
- package/data/build/dist/host/cli-adapters/delegation-authorization.js.map +1 -0
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.d.ts +36 -0
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.js +126 -0
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.js.map +1 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts +34 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js +157 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-app.d.ts +48 -0
- package/data/build/dist/host/cli-adapters/doubao-app.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-app.js +281 -0
- package/data/build/dist/host/cli-adapters/doubao-app.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-artifact-store.d.ts +16 -0
- package/data/build/dist/host/cli-adapters/doubao-artifact-store.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-artifact-store.js +142 -0
- package/data/build/dist/host/cli-adapters/doubao-artifact-store.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-artifacts.d.ts +16 -0
- package/data/build/dist/host/cli-adapters/doubao-artifacts.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-artifacts.js +34 -0
- package/data/build/dist/host/cli-adapters/doubao-artifacts.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-cdp.d.ts +49 -0
- package/data/build/dist/host/cli-adapters/doubao-cdp.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-cdp.js +177 -0
- package/data/build/dist/host/cli-adapters/doubao-cdp.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-driver.d.ts +33 -0
- package/data/build/dist/host/cli-adapters/doubao-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-driver.js +294 -0
- package/data/build/dist/host/cli-adapters/doubao-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-events.d.ts +21 -0
- package/data/build/dist/host/cli-adapters/doubao-events.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-events.js +126 -0
- package/data/build/dist/host/cli-adapters/doubao-events.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-runtime.d.ts +6 -0
- package/data/build/dist/host/cli-adapters/doubao-runtime.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-runtime.js +176 -0
- package/data/build/dist/host/cli-adapters/doubao-runtime.js.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-tools.d.ts +8 -0
- package/data/build/dist/host/cli-adapters/doubao-tools.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/doubao-tools.js +139 -0
- package/data/build/dist/host/cli-adapters/doubao-tools.js.map +1 -0
- package/data/build/dist/host/cli-adapters/driver.d.ts +82 -0
- package/data/build/dist/host/cli-adapters/driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/driver.js +2 -0
- package/data/build/dist/host/cli-adapters/driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-config.d.ts +16 -0
- package/data/build/dist/host/cli-adapters/dsh-config.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-config.js +153 -0
- package/data/build/dist/host/cli-adapters/dsh-config.js.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts +73 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js +514 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-model-catalog.d.ts +11 -0
- package/data/build/dist/host/cli-adapters/dsh-model-catalog.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-model-catalog.js +34 -0
- package/data/build/dist/host/cli-adapters/dsh-model-catalog.js.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-tool-history.d.ts +52 -0
- package/data/build/dist/host/cli-adapters/dsh-tool-history.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js +528 -0
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.d.ts +27 -0
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.js +100 -0
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.js.map +1 -0
- package/data/build/dist/host/cli-adapters/feature.d.ts +28 -0
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/feature.js +2418 -0
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -0
- package/data/build/dist/host/cli-adapters/gemini-driver.d.ts +25 -0
- package/data/build/dist/host/cli-adapters/gemini-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/gemini-driver.js +507 -0
- package/data/build/dist/host/cli-adapters/gemini-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts +48 -0
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-driver.js +1118 -0
- package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.d.ts +123 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.js +48 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-usage.d.ts +45 -0
- package/data/build/dist/host/cli-adapters/grok-usage.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-usage.js +197 -0
- package/data/build/dist/host/cli-adapters/grok-usage.js.map +1 -0
- package/data/build/dist/host/cli-adapters/http-sse-client.d.ts +22 -0
- package/data/build/dist/host/cli-adapters/http-sse-client.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/http-sse-client.js +99 -0
- package/data/build/dist/host/cli-adapters/http-sse-client.js.map +1 -0
- package/data/build/dist/host/cli-adapters/interaction-events.d.ts +11 -0
- package/data/build/dist/host/cli-adapters/interaction-events.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/interaction-events.js +80 -0
- package/data/build/dist/host/cli-adapters/interaction-events.js.map +1 -0
- package/data/build/dist/host/cli-adapters/json-rpc-process.d.ts +93 -0
- package/data/build/dist/host/cli-adapters/json-rpc-process.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/json-rpc-process.js +375 -0
- package/data/build/dist/host/cli-adapters/json-rpc-process.js.map +1 -0
- package/data/build/dist/host/cli-adapters/kimi-driver.d.ts +25 -0
- package/data/build/dist/host/cli-adapters/kimi-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/kimi-driver.js +416 -0
- package/data/build/dist/host/cli-adapters/kimi-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/kiro-driver.d.ts +12 -0
- package/data/build/dist/host/cli-adapters/kiro-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/kiro-driver.js +18 -0
- package/data/build/dist/host/cli-adapters/kiro-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts +28 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js +142 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-settings.d.ts +24 -0
- package/data/build/dist/host/cli-adapters/legacy-session-settings.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-settings.js +167 -0
- package/data/build/dist/host/cli-adapters/legacy-session-settings.js.map +1 -0
- package/data/build/dist/host/cli-adapters/log-files.d.ts +3 -0
- package/data/build/dist/host/cli-adapters/log-files.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/log-files.js +32 -0
- package/data/build/dist/host/cli-adapters/log-files.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-installation.d.ts +5 -0
- package/data/build/dist/host/cli-adapters/management-installation.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-installation.js +131 -0
- package/data/build/dist/host/cli-adapters/management-installation.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-methods.d.ts +37 -0
- package/data/build/dist/host/cli-adapters/management-methods.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-methods.js +144 -0
- package/data/build/dist/host/cli-adapters/management-methods.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-process.d.ts +7 -0
- package/data/build/dist/host/cli-adapters/management-process.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-process.js +62 -0
- package/data/build/dist/host/cli-adapters/management-process.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management.d.ts +32 -0
- package/data/build/dist/host/cli-adapters/management.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management.js +177 -0
- package/data/build/dist/host/cli-adapters/management.js.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-catalog.d.ts +23 -0
- package/data/build/dist/host/cli-adapters/mcode-catalog.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-catalog.js +120 -0
- package/data/build/dist/host/cli-adapters/mcode-catalog.js.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.d.ts +60 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.js +621 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts +113 -0
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.js +526 -0
- package/data/build/dist/host/cli-adapters/model-catalog.js.map +1 -0
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts +159 -0
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js +566 -0
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-adapters/native-subagent-holder.d.ts +4 -0
- package/data/build/dist/host/cli-adapters/native-subagent-holder.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/native-subagent-holder.js +4 -0
- package/data/build/dist/host/cli-adapters/native-subagent-holder.js.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-proxy.d.ts +41 -0
- package/data/build/dist/host/cli-adapters/native-team-proxy.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-proxy.js +140 -0
- package/data/build/dist/host/cli-adapters/native-team-proxy.js.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts +123 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.js +175 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.js.map +1 -0
- package/data/build/dist/host/cli-adapters/new-api-subscription.d.ts +75 -0
- package/data/build/dist/host/cli-adapters/new-api-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/new-api-subscription.js +869 -0
- package/data/build/dist/host/cli-adapters/new-api-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/official-provider-subscription.d.ts +29 -0
- package/data/build/dist/host/cli-adapters/official-provider-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/official-provider-subscription.js +361 -0
- package/data/build/dist/host/cli-adapters/official-provider-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts +112 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.js +1270 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts +30 -0
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js +828 -0
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-driver.d.ts +45 -0
- package/data/build/dist/host/cli-adapters/pi-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-driver.js +616 -0
- package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-performance-projection.d.ts +90 -0
- package/data/build/dist/host/cli-adapters/pi-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-performance-projection.js +7 -0
- package/data/build/dist/host/cli-adapters/pi-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-performance.d.ts +15 -0
- package/data/build/dist/host/cli-adapters/pi-performance.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-performance.js +94 -0
- package/data/build/dist/host/cli-adapters/pi-performance.js.map +1 -0
- package/data/build/dist/host/cli-adapters/process-utils.d.ts +53 -0
- package/data/build/dist/host/cli-adapters/process-utils.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/process-utils.js +242 -0
- package/data/build/dist/host/cli-adapters/process-utils.js.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-registry.d.ts +33 -0
- package/data/build/dist/host/cli-adapters/provider-registry.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-registry.js +83 -0
- package/data/build/dist/host/cli-adapters/provider-registry.js.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts +189 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.js +1616 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/qoder-driver.d.ts +86 -0
- package/data/build/dist/host/cli-adapters/qoder-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/qoder-driver.js +707 -0
- package/data/build/dist/host/cli-adapters/qoder-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/qoder-subscription.d.ts +36 -0
- package/data/build/dist/host/cli-adapters/qoder-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/qoder-subscription.js +207 -0
- package/data/build/dist/host/cli-adapters/qoder-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/r4-subscription.d.ts +13 -0
- package/data/build/dist/host/cli-adapters/r4-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/r4-subscription.js +111 -0
- package/data/build/dist/host/cli-adapters/r4-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/reasoning-content.d.ts +11 -0
- package/data/build/dist/host/cli-adapters/reasoning-content.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/reasoning-content.js +79 -0
- package/data/build/dist/host/cli-adapters/reasoning-content.js.map +1 -0
- package/data/build/dist/host/cli-adapters/registry-holder.d.ts +4 -0
- package/data/build/dist/host/cli-adapters/registry-holder.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/registry-holder.js +9 -0
- package/data/build/dist/host/cli-adapters/registry-holder.js.map +1 -0
- package/data/build/dist/host/cli-adapters/registry.d.ts +194 -0
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/registry.js +1412 -0
- package/data/build/dist/host/cli-adapters/registry.js.map +1 -0
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.d.ts +17 -0
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.js +120 -0
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.js.map +1 -0
- package/data/build/dist/host/cli-adapters/session-performance-projection.d.ts +80 -0
- package/data/build/dist/host/cli-adapters/session-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/session-performance-projection.js +108 -0
- package/data/build/dist/host/cli-adapters/session-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/session-probe.d.ts +20 -0
- package/data/build/dist/host/cli-adapters/session-probe.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/session-probe.js +139 -0
- package/data/build/dist/host/cli-adapters/session-probe.js.map +1 -0
- package/data/build/dist/host/cli-adapters/session-store.d.ts +98 -0
- package/data/build/dist/host/cli-adapters/session-store.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/session-store.js +364 -0
- package/data/build/dist/host/cli-adapters/session-store.js.map +1 -0
- package/data/build/dist/host/cli-adapters/skill-filesystem.d.ts +25 -0
- package/data/build/dist/host/cli-adapters/skill-filesystem.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/skill-filesystem.js +161 -0
- package/data/build/dist/host/cli-adapters/skill-filesystem.js.map +1 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts +73 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js +365 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts +39 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.js +135 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.js.map +1 -0
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.d.ts +34 -0
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.js +38 -0
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.js.map +1 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.d.ts +5 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.js +185 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.js.map +1 -0
- package/data/build/dist/host/cli-adapters/team-input.d.ts +17 -0
- package/data/build/dist/host/cli-adapters/team-input.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/team-input.js +67 -0
- package/data/build/dist/host/cli-adapters/team-input.js.map +1 -0
- package/data/build/dist/host/cli-adapters/tool-observation.d.ts +11 -0
- package/data/build/dist/host/cli-adapters/tool-observation.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/tool-observation.js +45 -0
- package/data/build/dist/host/cli-adapters/tool-observation.js.map +1 -0
- package/data/build/dist/host/cli-adapters/update-check.d.ts +34 -0
- package/data/build/dist/host/cli-adapters/update-check.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/update-check.js +263 -0
- package/data/build/dist/host/cli-adapters/update-check.js.map +1 -0
- package/data/build/dist/host/cli-adapters/windows-command-environment.d.ts +12 -0
- package/data/build/dist/host/cli-adapters/windows-command-environment.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/windows-command-environment.js +53 -0
- package/data/build/dist/host/cli-adapters/windows-command-environment.js.map +1 -0
- package/data/build/dist/host/cli-adapters/workbuddy-credential-bootstrap.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/workbuddy-credential-bootstrap.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/workbuddy-credential-bootstrap.js +212 -0
- package/data/build/dist/host/cli-adapters/workbuddy-credential-bootstrap.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-credentials.d.ts +10 -0
- package/data/build/dist/host/cli-adapters/zcode-credentials.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-credentials.js +84 -0
- package/data/build/dist/host/cli-adapters/zcode-credentials.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.d.ts +74 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.js +1033 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-interactions.d.ts +18 -0
- package/data/build/dist/host/cli-adapters/zcode-interactions.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-interactions.js +97 -0
- package/data/build/dist/host/cli-adapters/zcode-interactions.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-provider-config.d.ts +29 -0
- package/data/build/dist/host/cli-adapters/zcode-provider-config.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-provider-config.js +147 -0
- package/data/build/dist/host/cli-adapters/zcode-provider-config.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.d.ts +23 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.js +187 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-telemetry.d.ts +17 -0
- package/data/build/dist/host/cli-adapters/zcode-telemetry.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-telemetry.js +124 -0
- package/data/build/dist/host/cli-adapters/zcode-telemetry.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-update.d.ts +8 -0
- package/data/build/dist/host/cli-adapters/zcode-update.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-update.js +149 -0
- package/data/build/dist/host/cli-adapters/zcode-update.js.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.d.ts +46 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.js +98 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.js.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-server.d.ts +56 -0
- package/data/build/dist/host/cli-bridge/bridge-server.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-server.js +201 -0
- package/data/build/dist/host/cli-bridge/bridge-server.js.map +1 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.d.ts +52 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.js +335 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.js.map +1 -0
- package/data/build/dist/host/cli-bridge/dispatch.d.ts +19 -0
- package/data/build/dist/host/cli-bridge/dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/dispatch.js +199 -0
- package/data/build/dist/host/cli-bridge/dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/fetch-dispatch.d.ts +34 -0
- package/data/build/dist/host/cli-bridge/fetch-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/fetch-dispatch.js +147 -0
- package/data/build/dist/host/cli-bridge/fetch-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts +119 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/injections.js +491 -0
- package/data/build/dist/host/cli-bridge/injections.js.map +1 -0
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.d.ts +8 -0
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js +344 -0
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js.map +1 -0
- package/data/build/dist/host/cli-bridge/pi-extension-entry.d.ts +3 -0
- package/data/build/dist/host/cli-bridge/pi-extension-entry.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/pi-extension-entry.js +9 -0
- package/data/build/dist/host/cli-bridge/pi-extension-entry.js.map +1 -0
- package/data/build/dist/host/cli-bridge/pi-extension.d.ts +52 -0
- package/data/build/dist/host/cli-bridge/pi-extension.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/pi-extension.js +315 -0
- package/data/build/dist/host/cli-bridge/pi-extension.js.map +1 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.d.ts +28 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.js +177 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/team-adapters.d.ts +11 -0
- package/data/build/dist/host/cli-bridge/team-adapters.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/team-adapters.js +23 -0
- package/data/build/dist/host/cli-bridge/team-adapters.js.map +1 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.d.ts +36 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.js +243 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/team-tool.d.ts +3 -0
- package/data/build/dist/host/cli-bridge/team-tool.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/team-tool.js +18 -0
- package/data/build/dist/host/cli-bridge/team-tool.js.map +1 -0
- package/data/build/dist/host/cli-bridge/web-diagnostics.d.ts +33 -0
- package/data/build/dist/host/cli-bridge/web-diagnostics.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/web-diagnostics.js +174 -0
- package/data/build/dist/host/cli-bridge/web-diagnostics.js.map +1 -0
- package/data/build/dist/host/control-api-client.d.ts +84 -0
- package/data/build/dist/host/control-api-client.d.ts.map +1 -0
- package/data/build/dist/host/control-api-client.js +131 -0
- package/data/build/dist/host/control-api-client.js.map +1 -0
- package/data/build/dist/host/credential-store.d.ts +54 -0
- package/data/build/dist/host/credential-store.d.ts.map +1 -0
- package/data/build/dist/host/credential-store.js +124 -0
- package/data/build/dist/host/credential-store.js.map +1 -0
- package/data/build/dist/host/credentials/broker.d.ts +73 -0
- package/data/build/dist/host/credentials/broker.d.ts.map +1 -0
- package/data/build/dist/host/credentials/broker.js +495 -0
- package/data/build/dist/host/credentials/broker.js.map +1 -0
- package/data/build/dist/host/credentials/index.d.ts +4 -0
- package/data/build/dist/host/credentials/index.d.ts.map +1 -0
- package/data/build/dist/host/credentials/index.js +4 -0
- package/data/build/dist/host/credentials/index.js.map +1 -0
- package/data/build/dist/host/credentials/service.d.ts +43 -0
- package/data/build/dist/host/credentials/service.d.ts.map +1 -0
- package/data/build/dist/host/credentials/service.js +432 -0
- package/data/build/dist/host/credentials/service.js.map +1 -0
- package/data/build/dist/host/credentials/store.d.ts +33 -0
- package/data/build/dist/host/credentials/store.d.ts.map +1 -0
- package/data/build/dist/host/credentials/store.js +238 -0
- package/data/build/dist/host/credentials/store.js.map +1 -0
- package/data/build/dist/host/credentials/tool.d.ts +3 -0
- package/data/build/dist/host/credentials/tool.d.ts.map +1 -0
- package/data/build/dist/host/credentials/tool.js +54 -0
- package/data/build/dist/host/credentials/tool.js.map +1 -0
- package/data/build/dist/host/debug.d.ts +79 -0
- package/data/build/dist/host/debug.d.ts.map +1 -0
- package/data/build/dist/host/debug.js +296 -0
- package/data/build/dist/host/debug.js.map +1 -0
- package/data/build/dist/host/dsh-device-runtime.d.ts +45 -0
- package/data/build/dist/host/dsh-device-runtime.d.ts.map +1 -0
- package/data/build/dist/host/dsh-device-runtime.js +155 -0
- package/data/build/dist/host/dsh-device-runtime.js.map +1 -0
- package/data/build/dist/host/dsh-gateway-feature.d.ts +5 -0
- package/data/build/dist/host/dsh-gateway-feature.d.ts.map +1 -0
- package/data/build/dist/host/dsh-gateway-feature.js +78 -0
- package/data/build/dist/host/dsh-gateway-feature.js.map +1 -0
- package/data/build/dist/host/dsh-runtime-version.d.ts +13 -0
- package/data/build/dist/host/dsh-runtime-version.d.ts.map +1 -0
- package/data/build/dist/host/dsh-runtime-version.js +143 -0
- package/data/build/dist/host/dsh-runtime-version.js.map +1 -0
- package/data/build/dist/host/features/auth.d.ts +11 -0
- package/data/build/dist/host/features/auth.d.ts.map +1 -0
- package/data/build/dist/host/features/auth.js +284 -0
- package/data/build/dist/host/features/auth.js.map +1 -0
- package/data/build/dist/host/features/credentials.d.ts +4 -0
- package/data/build/dist/host/features/credentials.d.ts.map +1 -0
- package/data/build/dist/host/features/credentials.js +90 -0
- package/data/build/dist/host/features/credentials.js.map +1 -0
- package/data/build/dist/host/features/debug.d.ts +5 -0
- package/data/build/dist/host/features/debug.d.ts.map +1 -0
- package/data/build/dist/host/features/debug.js +90 -0
- package/data/build/dist/host/features/debug.js.map +1 -0
- package/data/build/dist/host/features/file-management.d.ts +5 -0
- package/data/build/dist/host/features/file-management.d.ts.map +1 -0
- package/data/build/dist/host/features/file-management.js +282 -0
- package/data/build/dist/host/features/file-management.js.map +1 -0
- package/data/build/dist/host/features/git-commit-message.d.ts +5 -0
- package/data/build/dist/host/features/git-commit-message.d.ts.map +1 -0
- package/data/build/dist/host/features/git-commit-message.js +66 -0
- package/data/build/dist/host/features/git-commit-message.js.map +1 -0
- package/data/build/dist/host/features/git-management.d.ts +13 -0
- package/data/build/dist/host/features/git-management.d.ts.map +1 -0
- package/data/build/dist/host/features/git-management.js +576 -0
- package/data/build/dist/host/features/git-management.js.map +1 -0
- package/data/build/dist/host/features/host-status.d.ts +45 -0
- package/data/build/dist/host/features/host-status.d.ts.map +1 -0
- package/data/build/dist/host/features/host-status.js +122 -0
- package/data/build/dist/host/features/host-status.js.map +1 -0
- package/data/build/dist/host/features/index.d.ts +24 -0
- package/data/build/dist/host/features/index.d.ts.map +1 -0
- package/data/build/dist/host/features/index.js +46 -0
- package/data/build/dist/host/features/index.js.map +1 -0
- package/data/build/dist/host/features/interaction-translation.d.ts +10 -0
- package/data/build/dist/host/features/interaction-translation.d.ts.map +1 -0
- package/data/build/dist/host/features/interaction-translation.js +222 -0
- package/data/build/dist/host/features/interaction-translation.js.map +1 -0
- package/data/build/dist/host/features/lan-access-dsh.d.ts +8 -0
- package/data/build/dist/host/features/lan-access-dsh.d.ts.map +1 -0
- package/data/build/dist/host/features/lan-access-dsh.js +129 -0
- package/data/build/dist/host/features/lan-access-dsh.js.map +1 -0
- package/data/build/dist/host/features/plugin-update.d.ts +6 -0
- package/data/build/dist/host/features/plugin-update.d.ts.map +1 -0
- package/data/build/dist/host/features/plugin-update.js +51 -0
- package/data/build/dist/host/features/plugin-update.js.map +1 -0
- package/data/build/dist/host/features/session-prompt-translation.d.ts +10 -0
- package/data/build/dist/host/features/session-prompt-translation.d.ts.map +1 -0
- package/data/build/dist/host/features/session-prompt-translation.js +236 -0
- package/data/build/dist/host/features/session-prompt-translation.js.map +1 -0
- package/data/build/dist/host/features/session-title-optimization.d.ts +5 -0
- package/data/build/dist/host/features/session-title-optimization.d.ts.map +1 -0
- package/data/build/dist/host/features/session-title-optimization.js +32 -0
- package/data/build/dist/host/features/session-title-optimization.js.map +1 -0
- package/data/build/dist/host/features/session-translation-protection.d.ts +26 -0
- package/data/build/dist/host/features/session-translation-protection.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-protection.js +213 -0
- package/data/build/dist/host/features/session-translation-protection.js.map +1 -0
- package/data/build/dist/host/features/session-translation-recovery.d.ts +21 -0
- package/data/build/dist/host/features/session-translation-recovery.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-recovery.js +123 -0
- package/data/build/dist/host/features/session-translation-recovery.js.map +1 -0
- package/data/build/dist/host/features/session-translation-runtime.d.ts +23 -0
- package/data/build/dist/host/features/session-translation-runtime.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-runtime.js +62 -0
- package/data/build/dist/host/features/session-translation-runtime.js.map +1 -0
- package/data/build/dist/host/features/session-translation-service.d.ts +66 -0
- package/data/build/dist/host/features/session-translation-service.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-service.js +664 -0
- package/data/build/dist/host/features/session-translation-service.js.map +1 -0
- package/data/build/dist/host/features/session-translation.d.ts +5 -0
- package/data/build/dist/host/features/session-translation.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation.js +45 -0
- package/data/build/dist/host/features/session-translation.js.map +1 -0
- package/data/build/dist/host/features/terminal-process.d.ts +5 -0
- package/data/build/dist/host/features/terminal-process.d.ts.map +1 -0
- package/data/build/dist/host/features/terminal-process.js +110 -0
- package/data/build/dist/host/features/terminal-process.js.map +1 -0
- package/data/build/dist/host/features/terminal-status.d.ts +20 -0
- package/data/build/dist/host/features/terminal-status.d.ts.map +1 -0
- package/data/build/dist/host/features/terminal-status.js +58 -0
- package/data/build/dist/host/features/terminal-status.js.map +1 -0
- package/data/build/dist/host/features/types.d.ts +65 -0
- package/data/build/dist/host/features/types.d.ts.map +1 -0
- package/data/build/dist/host/features/types.js +2 -0
- package/data/build/dist/host/features/types.js.map +1 -0
- package/data/build/dist/host/host-config.d.ts +17 -0
- package/data/build/dist/host/host-config.d.ts.map +1 -0
- package/data/build/dist/host/host-config.js +13 -0
- package/data/build/dist/host/host-config.js.map +1 -0
- package/data/build/dist/host/host-event-bridge.d.ts +11 -0
- package/data/build/dist/host/host-event-bridge.d.ts.map +1 -0
- package/data/build/dist/host/host-event-bridge.js +16 -0
- package/data/build/dist/host/host-event-bridge.js.map +1 -0
- package/data/build/dist/host/html-workspace-files.d.ts +3 -0
- package/data/build/dist/host/html-workspace-files.d.ts.map +1 -0
- package/data/build/dist/host/html-workspace-files.js +135 -0
- package/data/build/dist/host/html-workspace-files.js.map +1 -0
- package/data/build/dist/host/image-artifact-store.d.ts +21 -0
- package/data/build/dist/host/image-artifact-store.d.ts.map +1 -0
- package/data/build/dist/host/image-artifact-store.js +136 -0
- package/data/build/dist/host/image-artifact-store.js.map +1 -0
- package/data/build/dist/host/index-injection.d.ts +35 -0
- package/data/build/dist/host/index-injection.d.ts.map +1 -0
- package/data/build/dist/host/index-injection.js +78 -0
- package/data/build/dist/host/index-injection.js.map +1 -0
- package/data/build/dist/host/index.d.ts +64 -0
- package/data/build/dist/host/index.d.ts.map +1 -0
- package/data/build/dist/host/index.js +446 -0
- package/data/build/dist/host/index.js.map +1 -0
- package/data/build/dist/host/lan-access-dsh.d.ts +192 -0
- package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -0
- package/data/build/dist/host/lan-access-dsh.js +1322 -0
- package/data/build/dist/host/lan-access-dsh.js.map +1 -0
- package/data/build/dist/host/login-attempt-guard.d.ts +55 -0
- package/data/build/dist/host/login-attempt-guard.d.ts.map +1 -0
- package/data/build/dist/host/login-attempt-guard.js +201 -0
- package/data/build/dist/host/login-attempt-guard.js.map +1 -0
- package/data/build/dist/host/modules/pwa/index.d.ts +7 -0
- package/data/build/dist/host/modules/pwa/index.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/index.js +7 -0
- package/data/build/dist/host/modules/pwa/index.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-assets.d.ts +50 -0
- package/data/build/dist/host/modules/pwa/pwa-assets.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-assets.js +182 -0
- package/data/build/dist/host/modules/pwa/pwa-assets.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-client-script.d.ts +10 -0
- package/data/build/dist/host/modules/pwa/pwa-client-script.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-client-script.js +40 -0
- package/data/build/dist/host/modules/pwa/pwa-client-script.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-icons.d.ts +10 -0
- package/data/build/dist/host/modules/pwa/pwa-icons.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-icons.js +185 -0
- package/data/build/dist/host/modules/pwa/pwa-icons.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-push.d.ts +74 -0
- package/data/build/dist/host/modules/pwa/pwa-push.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-push.js +288 -0
- package/data/build/dist/host/modules/pwa/pwa-push.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.d.ts +17 -0
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.js +83 -0
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-viewport.d.ts +12 -0
- package/data/build/dist/host/modules/pwa/pwa-viewport.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-viewport.js +47 -0
- package/data/build/dist/host/modules/pwa/pwa-viewport.js.map +1 -0
- package/data/build/dist/host/native-session-bridge.d.ts +215 -0
- package/data/build/dist/host/native-session-bridge.d.ts.map +1 -0
- package/data/build/dist/host/native-session-bridge.js +993 -0
- package/data/build/dist/host/native-session-bridge.js.map +1 -0
- package/data/build/dist/host/provider-icon-assets.d.ts +5 -0
- package/data/build/dist/host/provider-icon-assets.d.ts.map +1 -0
- package/data/build/dist/host/provider-icon-assets.js +61 -0
- package/data/build/dist/host/provider-icon-assets.js.map +1 -0
- package/data/build/dist/host/relay-tunnel-runtime.d.ts +130 -0
- package/data/build/dist/host/relay-tunnel-runtime.d.ts.map +1 -0
- package/data/build/dist/host/relay-tunnel-runtime.js +422 -0
- package/data/build/dist/host/relay-tunnel-runtime.js.map +1 -0
- package/data/build/dist/host/remote-web-runtime.d.ts +78 -0
- package/data/build/dist/host/remote-web-runtime.d.ts.map +1 -0
- package/data/build/dist/host/remote-web-runtime.js +607 -0
- package/data/build/dist/host/remote-web-runtime.js.map +1 -0
- package/data/build/dist/host/rpc-table.d.ts +32 -0
- package/data/build/dist/host/rpc-table.d.ts.map +1 -0
- package/data/build/dist/host/rpc-table.js +47 -0
- package/data/build/dist/host/rpc-table.js.map +1 -0
- package/data/build/dist/host/rpc.d.ts +43 -0
- package/data/build/dist/host/rpc.d.ts.map +1 -0
- package/data/build/dist/host/rpc.js +422 -0
- package/data/build/dist/host/rpc.js.map +1 -0
- package/data/build/dist/host/session-changes.d.ts +13 -0
- package/data/build/dist/host/session-changes.d.ts.map +1 -0
- package/data/build/dist/host/session-changes.js +374 -0
- package/data/build/dist/host/session-changes.js.map +1 -0
- package/data/build/dist/host/session-handle-eviction.d.ts +33 -0
- package/data/build/dist/host/session-handle-eviction.d.ts.map +1 -0
- package/data/build/dist/host/session-handle-eviction.js +429 -0
- package/data/build/dist/host/session-handle-eviction.js.map +1 -0
- package/data/build/dist/host/session-migration-repair.d.ts +23 -0
- package/data/build/dist/host/session-migration-repair.d.ts.map +1 -0
- package/data/build/dist/host/session-migration-repair.js +576 -0
- package/data/build/dist/host/session-migration-repair.js.map +1 -0
- package/data/build/dist/host/settings.d.ts +39 -0
- package/data/build/dist/host/settings.d.ts.map +1 -0
- package/data/build/dist/host/settings.js +352 -0
- package/data/build/dist/host/settings.js.map +1 -0
- package/data/build/dist/host/stage0-dev-hmr.d.ts +6 -0
- package/data/build/dist/host/stage0-dev-hmr.d.ts.map +1 -0
- package/data/build/dist/host/stage0-dev-hmr.js +20 -0
- package/data/build/dist/host/stage0-dev-hmr.js.map +1 -0
- package/data/build/dist/host/tar-archive.d.ts +8 -0
- package/data/build/dist/host/tar-archive.d.ts.map +1 -0
- package/data/build/dist/host/tar-archive.js +17 -0
- package/data/build/dist/host/tar-archive.js.map +1 -0
- package/data/build/dist/host/terminal/attachment-registry.d.ts +17 -0
- package/data/build/dist/host/terminal/attachment-registry.d.ts.map +1 -0
- package/data/build/dist/host/terminal/attachment-registry.js +49 -0
- package/data/build/dist/host/terminal/attachment-registry.js.map +1 -0
- package/data/build/dist/host/terminal/backends/conpty-backend.d.ts +39 -0
- package/data/build/dist/host/terminal/backends/conpty-backend.d.ts.map +1 -0
- package/data/build/dist/host/terminal/backends/conpty-backend.js +160 -0
- package/data/build/dist/host/terminal/backends/conpty-backend.js.map +1 -0
- package/data/build/dist/host/terminal/backends/local-pty-backend.d.ts +36 -0
- package/data/build/dist/host/terminal/backends/local-pty-backend.d.ts.map +1 -0
- package/data/build/dist/host/terminal/backends/local-pty-backend.js +192 -0
- package/data/build/dist/host/terminal/backends/local-pty-backend.js.map +1 -0
- package/data/build/dist/host/terminal/backends/tmux-backend.d.ts +80 -0
- package/data/build/dist/host/terminal/backends/tmux-backend.d.ts.map +1 -0
- package/data/build/dist/host/terminal/backends/tmux-backend.js +467 -0
- package/data/build/dist/host/terminal/backends/tmux-backend.js.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-client.d.ts +27 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-client.d.ts.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-client.js +154 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-client.js.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-process.d.ts +10 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-process.d.ts.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-process.js +147 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-process.js.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-protocol.d.ts +92 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-protocol.d.ts.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-protocol.js +134 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-protocol.js.map +1 -0
- package/data/build/dist/host/terminal/controller-factory.d.ts +42 -0
- package/data/build/dist/host/terminal/controller-factory.d.ts.map +1 -0
- package/data/build/dist/host/terminal/controller-factory.js +104 -0
- package/data/build/dist/host/terminal/controller-factory.js.map +1 -0
- package/data/build/dist/host/terminal/index.d.ts +17 -0
- package/data/build/dist/host/terminal/index.d.ts.map +1 -0
- package/data/build/dist/host/terminal/index.js +17 -0
- package/data/build/dist/host/terminal/index.js.map +1 -0
- package/data/build/dist/host/terminal/runtime-adapter.d.ts +109 -0
- package/data/build/dist/host/terminal/runtime-adapter.d.ts.map +1 -0
- package/data/build/dist/host/terminal/runtime-adapter.js +26 -0
- package/data/build/dist/host/terminal/runtime-adapter.js.map +1 -0
- package/data/build/dist/host/terminal/runtime-manager.d.ts +45 -0
- package/data/build/dist/host/terminal/runtime-manager.d.ts.map +1 -0
- package/data/build/dist/host/terminal/runtime-manager.js +270 -0
- package/data/build/dist/host/terminal/runtime-manager.js.map +1 -0
- package/data/build/dist/host/terminal/shell-detection.d.ts +23 -0
- package/data/build/dist/host/terminal/shell-detection.d.ts.map +1 -0
- package/data/build/dist/host/terminal/shell-detection.js +105 -0
- package/data/build/dist/host/terminal/shell-detection.js.map +1 -0
- package/data/build/dist/host/terminal/startup.d.ts +38 -0
- package/data/build/dist/host/terminal/startup.d.ts.map +1 -0
- package/data/build/dist/host/terminal/startup.js +102 -0
- package/data/build/dist/host/terminal/startup.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-controller.d.ts +93 -0
- package/data/build/dist/host/terminal/terminal-controller.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-controller.js +467 -0
- package/data/build/dist/host/terminal/terminal-controller.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-process-service.d.ts +52 -0
- package/data/build/dist/host/terminal/terminal-process-service.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-process-service.js +308 -0
- package/data/build/dist/host/terminal/terminal-process-service.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-process-store.d.ts +45 -0
- package/data/build/dist/host/terminal/terminal-process-store.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-process-store.js +183 -0
- package/data/build/dist/host/terminal/terminal-process-store.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-service.d.ts +150 -0
- package/data/build/dist/host/terminal/terminal-service.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-service.js +1171 -0
- package/data/build/dist/host/terminal/terminal-service.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-store.d.ts +49 -0
- package/data/build/dist/host/terminal/terminal-store.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-store.js +242 -0
- package/data/build/dist/host/terminal/terminal-store.js.map +1 -0
- package/data/build/dist/host/update/application-result.d.ts +3 -0
- package/data/build/dist/host/update/application-result.d.ts.map +1 -0
- package/data/build/dist/host/update/application-result.js +13 -0
- package/data/build/dist/host/update/application-result.js.map +1 -0
- package/data/build/dist/host/update/http.d.ts +7 -0
- package/data/build/dist/host/update/http.d.ts.map +1 -0
- package/data/build/dist/host/update/http.js +55 -0
- package/data/build/dist/host/update/http.js.map +1 -0
- package/data/build/dist/host/update/metadata.d.ts +14 -0
- package/data/build/dist/host/update/metadata.d.ts.map +1 -0
- package/data/build/dist/host/update/metadata.js +75 -0
- package/data/build/dist/host/update/metadata.js.map +1 -0
- package/data/build/dist/host/update/release-notes.d.ts +6 -0
- package/data/build/dist/host/update/release-notes.d.ts.map +1 -0
- package/data/build/dist/host/update/release-notes.js +52 -0
- package/data/build/dist/host/update/release-notes.js.map +1 -0
- package/data/build/dist/host/update/service.d.ts +25 -0
- package/data/build/dist/host/update/service.d.ts.map +1 -0
- package/data/build/dist/host/update/service.js +209 -0
- package/data/build/dist/host/update/service.js.map +1 -0
- package/data/build/dist/host/workspace-file-mutations.d.ts +2 -0
- package/data/build/dist/host/workspace-file-mutations.d.ts.map +1 -0
- package/data/build/dist/host/workspace-file-mutations.js +15 -0
- package/data/build/dist/host/workspace-file-mutations.js.map +1 -0
- package/data/build/dist/host/workspace-root.d.ts +13 -0
- package/data/build/dist/host/workspace-root.d.ts.map +1 -0
- package/data/build/dist/host/workspace-root.js +98 -0
- package/data/build/dist/host/workspace-root.js.map +1 -0
- package/data/build/dist/index.d.ts +40 -0
- package/data/build/dist/index.d.ts.map +1 -0
- package/data/build/dist/index.js +31 -0
- package/data/build/dist/index.js.map +1 -0
- package/data/build/dist/shared/attachment-prompts.d.ts +11 -0
- package/data/build/dist/shared/attachment-prompts.d.ts.map +1 -0
- package/data/build/dist/shared/attachment-prompts.js +17 -0
- package/data/build/dist/shared/attachment-prompts.js.map +1 -0
- package/data/build/dist/shared/attachments.d.ts +18 -0
- package/data/build/dist/shared/attachments.d.ts.map +1 -0
- package/data/build/dist/shared/attachments.js +22 -0
- package/data/build/dist/shared/attachments.js.map +1 -0
- package/data/build/dist/shared/cli-provider-route.d.ts +7 -0
- package/data/build/dist/shared/cli-provider-route.d.ts.map +1 -0
- package/data/build/dist/shared/cli-provider-route.js +13 -0
- package/data/build/dist/shared/cli-provider-route.js.map +1 -0
- package/data/build/dist/shared/codex-performance.d.ts +3 -0
- package/data/build/dist/shared/codex-performance.d.ts.map +1 -0
- package/data/build/dist/shared/codex-performance.js +2 -0
- package/data/build/dist/shared/codex-performance.js.map +1 -0
- package/data/build/dist/shared/contracts/agent-team.d.ts +14 -0
- package/data/build/dist/shared/contracts/agent-team.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/agent-team.js +51 -0
- package/data/build/dist/shared/contracts/agent-team.js.map +1 -0
- package/data/build/dist/shared/contracts/auth.d.ts +122 -0
- package/data/build/dist/shared/contracts/auth.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/auth.js +8 -0
- package/data/build/dist/shared/contracts/auth.js.map +1 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +484 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/cli-adapter.js +2 -0
- package/data/build/dist/shared/contracts/cli-adapter.js.map +1 -0
- package/data/build/dist/shared/contracts/cli-management.d.ts +29 -0
- package/data/build/dist/shared/contracts/cli-management.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/cli-management.js +2 -0
- package/data/build/dist/shared/contracts/cli-management.js.map +1 -0
- package/data/build/dist/shared/contracts/command-code.d.ts +5 -0
- package/data/build/dist/shared/contracts/command-code.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/command-code.js +2 -0
- package/data/build/dist/shared/contracts/command-code.js.map +1 -0
- package/data/build/dist/shared/contracts/config.d.ts +363 -0
- package/data/build/dist/shared/contracts/config.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/config.js +302 -0
- package/data/build/dist/shared/contracts/config.js.map +1 -0
- package/data/build/dist/shared/contracts/credentials.d.ts +73 -0
- package/data/build/dist/shared/contracts/credentials.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/credentials.js +38 -0
- package/data/build/dist/shared/contracts/credentials.js.map +1 -0
- package/data/build/dist/shared/contracts/debug-config.d.ts +28 -0
- package/data/build/dist/shared/contracts/debug-config.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/debug-config.js +78 -0
- package/data/build/dist/shared/contracts/debug-config.js.map +1 -0
- package/data/build/dist/shared/contracts/debug.d.ts +75 -0
- package/data/build/dist/shared/contracts/debug.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/debug.js +121 -0
- package/data/build/dist/shared/contracts/debug.js.map +1 -0
- package/data/build/dist/shared/contracts/dsh-device.d.ts +86 -0
- package/data/build/dist/shared/contracts/dsh-device.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/dsh-device.js +2 -0
- package/data/build/dist/shared/contracts/dsh-device.js.map +1 -0
- package/data/build/dist/shared/contracts/errors.d.ts +30 -0
- package/data/build/dist/shared/contracts/errors.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/errors.js +38 -0
- package/data/build/dist/shared/contracts/errors.js.map +1 -0
- package/data/build/dist/shared/contracts/feature.d.ts +93 -0
- package/data/build/dist/shared/contracts/feature.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/feature.js +2 -0
- package/data/build/dist/shared/contracts/feature.js.map +1 -0
- package/data/build/dist/shared/contracts/file-management.d.ts +6 -0
- package/data/build/dist/shared/contracts/file-management.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/file-management.js +3 -0
- package/data/build/dist/shared/contracts/file-management.js.map +1 -0
- package/data/build/dist/shared/contracts/git.d.ts +129 -0
- package/data/build/dist/shared/contracts/git.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/git.js +29 -0
- package/data/build/dist/shared/contracts/git.js.map +1 -0
- package/data/build/dist/shared/contracts/host-status.d.ts +32 -0
- package/data/build/dist/shared/contracts/host-status.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/host-status.js +2 -0
- package/data/build/dist/shared/contracts/host-status.js.map +1 -0
- package/data/build/dist/shared/contracts/interaction-presentation.d.ts +32 -0
- package/data/build/dist/shared/contracts/interaction-presentation.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/interaction-presentation.js +2 -0
- package/data/build/dist/shared/contracts/interaction-presentation.js.map +1 -0
- package/data/build/dist/shared/contracts/interaction-translation.d.ts +55 -0
- package/data/build/dist/shared/contracts/interaction-translation.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/interaction-translation.js +48 -0
- package/data/build/dist/shared/contracts/interaction-translation.js.map +1 -0
- package/data/build/dist/shared/contracts/lan-access-dsh.d.ts +53 -0
- package/data/build/dist/shared/contracts/lan-access-dsh.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/lan-access-dsh.js +2 -0
- package/data/build/dist/shared/contracts/lan-access-dsh.js.map +1 -0
- package/data/build/dist/shared/contracts/llm-chat.d.ts +18 -0
- package/data/build/dist/shared/contracts/llm-chat.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/llm-chat.js +2 -0
- package/data/build/dist/shared/contracts/llm-chat.js.map +1 -0
- package/data/build/dist/shared/contracts/plugin-update.d.ts +93 -0
- package/data/build/dist/shared/contracts/plugin-update.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/plugin-update.js +128 -0
- package/data/build/dist/shared/contracts/plugin-update.js.map +1 -0
- package/data/build/dist/shared/contracts/session-translation.d.ts +135 -0
- package/data/build/dist/shared/contracts/session-translation.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/session-translation.js +195 -0
- package/data/build/dist/shared/contracts/session-translation.js.map +1 -0
- package/data/build/dist/shared/contracts/signaling.d.ts +67 -0
- package/data/build/dist/shared/contracts/signaling.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/signaling.js +2 -0
- package/data/build/dist/shared/contracts/signaling.js.map +1 -0
- package/data/build/dist/shared/contracts/subscription.d.ts +206 -0
- package/data/build/dist/shared/contracts/subscription.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/subscription.js +15 -0
- package/data/build/dist/shared/contracts/subscription.js.map +1 -0
- package/data/build/dist/shared/contracts/terminal-process.d.ts +65 -0
- package/data/build/dist/shared/contracts/terminal-process.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/terminal-process.js +2 -0
- package/data/build/dist/shared/contracts/terminal-process.js.map +1 -0
- package/data/build/dist/shared/contracts/terminal-share.d.ts +27 -0
- package/data/build/dist/shared/contracts/terminal-share.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/terminal-share.js +2 -0
- package/data/build/dist/shared/contracts/terminal-share.js.map +1 -0
- package/data/build/dist/shared/contracts/terminal.d.ts +141 -0
- package/data/build/dist/shared/contracts/terminal.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/terminal.js +2 -0
- package/data/build/dist/shared/contracts/terminal.js.map +1 -0
- package/data/build/dist/shared/contracts/transport.d.ts +45 -0
- package/data/build/dist/shared/contracts/transport.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/transport.js +3 -0
- package/data/build/dist/shared/contracts/transport.js.map +1 -0
- package/data/build/dist/shared/contracts/version.d.ts +25 -0
- package/data/build/dist/shared/contracts/version.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/version.js +89 -0
- package/data/build/dist/shared/contracts/version.js.map +1 -0
- package/data/build/dist/shared/credential-carrier.d.ts +19 -0
- package/data/build/dist/shared/credential-carrier.d.ts.map +1 -0
- package/data/build/dist/shared/credential-carrier.js +90 -0
- package/data/build/dist/shared/credential-carrier.js.map +1 -0
- package/data/build/dist/shared/debug.d.ts +22 -0
- package/data/build/dist/shared/debug.d.ts.map +1 -0
- package/data/build/dist/shared/debug.js +89 -0
- package/data/build/dist/shared/debug.js.map +1 -0
- package/data/build/dist/shared/delegation-carrier.d.ts +24 -0
- package/data/build/dist/shared/delegation-carrier.d.ts.map +1 -0
- package/data/build/dist/shared/delegation-carrier.js +111 -0
- package/data/build/dist/shared/delegation-carrier.js.map +1 -0
- package/data/build/dist/shared/index.d.ts +29 -0
- package/data/build/dist/shared/index.d.ts.map +1 -0
- package/data/build/dist/shared/index.js +13 -0
- package/data/build/dist/shared/index.js.map +1 -0
- package/data/build/dist/shared/native-approval-modes.d.ts +7 -0
- package/data/build/dist/shared/native-approval-modes.d.ts.map +1 -0
- package/data/build/dist/shared/native-approval-modes.js +38 -0
- package/data/build/dist/shared/native-approval-modes.js.map +1 -0
- package/data/build/dist/shared/provider-icon-resources.d.ts +4 -0
- package/data/build/dist/shared/provider-icon-resources.d.ts.map +1 -0
- package/data/build/dist/shared/provider-icon-resources.js +25 -0
- package/data/build/dist/shared/provider-icon-resources.js.map +1 -0
- package/data/build/dist/shared/request-performance.d.ts +20 -0
- package/data/build/dist/shared/request-performance.d.ts.map +1 -0
- package/data/build/dist/shared/request-performance.js +6 -0
- package/data/build/dist/shared/request-performance.js.map +1 -0
- package/data/build/dist/shared/runtime-environment.d.ts +5 -0
- package/data/build/dist/shared/runtime-environment.d.ts.map +1 -0
- package/data/build/dist/shared/runtime-environment.js +7 -0
- package/data/build/dist/shared/runtime-environment.js.map +1 -0
- package/data/build/dist/shared/session-file-location.d.ts +11 -0
- package/data/build/dist/shared/session-file-location.d.ts.map +1 -0
- package/data/build/dist/shared/session-file-location.js +20 -0
- package/data/build/dist/shared/session-file-location.js.map +1 -0
- package/data/build/dist/shared/session-reference.d.ts +9 -0
- package/data/build/dist/shared/session-reference.d.ts.map +1 -0
- package/data/build/dist/shared/session-reference.js +27 -0
- package/data/build/dist/shared/session-reference.js.map +1 -0
- package/data/build/dist/shared/session-title.d.ts +12 -0
- package/data/build/dist/shared/session-title.d.ts.map +1 -0
- package/data/build/dist/shared/session-title.js +71 -0
- package/data/build/dist/shared/session-title.js.map +1 -0
- package/data/build/dist/shared/terminal-input.d.ts +8 -0
- package/data/build/dist/shared/terminal-input.d.ts.map +1 -0
- package/data/build/dist/shared/terminal-input.js +10 -0
- package/data/build/dist/shared/terminal-input.js.map +1 -0
- package/data/build/dist/shared/translation-effect.d.ts +8 -0
- package/data/build/dist/shared/translation-effect.d.ts.map +1 -0
- package/data/build/dist/shared/translation-effect.js +24 -0
- package/data/build/dist/shared/translation-effect.js.map +1 -0
- package/data/build/dist/shared/translation-indicator.d.ts +26 -0
- package/data/build/dist/shared/translation-indicator.d.ts.map +1 -0
- package/data/build/dist/shared/translation-indicator.js +29 -0
- package/data/build/dist/shared/translation-indicator.js.map +1 -0
- package/data/build/dist/transport/carrier.d.ts +48 -0
- package/data/build/dist/transport/carrier.d.ts.map +1 -0
- package/data/build/dist/transport/carrier.js +319 -0
- package/data/build/dist/transport/carrier.js.map +1 -0
- package/data/build/dist/transport/debug.d.ts +39 -0
- package/data/build/dist/transport/debug.d.ts.map +1 -0
- package/data/build/dist/transport/debug.js +97 -0
- package/data/build/dist/transport/debug.js.map +1 -0
- package/data/build/dist/transport/dsh-envelope.d.ts +41 -0
- package/data/build/dist/transport/dsh-envelope.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-envelope.js +107 -0
- package/data/build/dist/transport/dsh-envelope.js.map +1 -0
- package/data/build/dist/transport/dsh-gateway.d.ts +64 -0
- package/data/build/dist/transport/dsh-gateway.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-gateway.js +254 -0
- package/data/build/dist/transport/dsh-gateway.js.map +1 -0
- package/data/build/dist/transport/dsh-session.d.ts +72 -0
- package/data/build/dist/transport/dsh-session.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-session.js +291 -0
- package/data/build/dist/transport/dsh-session.js.map +1 -0
- package/data/build/dist/transport/dsh-transport.d.ts +59 -0
- package/data/build/dist/transport/dsh-transport.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-transport.js +136 -0
- package/data/build/dist/transport/dsh-transport.js.map +1 -0
- package/data/build/dist/transport/frame.d.ts +132 -0
- package/data/build/dist/transport/frame.d.ts.map +1 -0
- package/data/build/dist/transport/frame.js +168 -0
- package/data/build/dist/transport/frame.js.map +1 -0
- package/data/build/dist/transport/index.d.ts +11 -0
- package/data/build/dist/transport/index.d.ts.map +1 -0
- package/data/build/dist/transport/index.js +11 -0
- package/data/build/dist/transport/index.js.map +1 -0
- package/data/build/dist/transport/multiplexer.d.ts +63 -0
- package/data/build/dist/transport/multiplexer.d.ts.map +1 -0
- package/data/build/dist/transport/multiplexer.js +323 -0
- package/data/build/dist/transport/multiplexer.js.map +1 -0
- package/data/build/dist/transport/webrtc-client.d.ts +75 -0
- package/data/build/dist/transport/webrtc-client.d.ts.map +1 -0
- package/data/build/dist/transport/webrtc-client.js +382 -0
- package/data/build/dist/transport/webrtc-client.js.map +1 -0
- package/data/build/dist/transport/webrtc-host.d.ts +60 -0
- package/data/build/dist/transport/webrtc-host.d.ts.map +1 -0
- package/data/build/dist/transport/webrtc-host.js +259 -0
- package/data/build/dist/transport/webrtc-host.js.map +1 -0
- package/data/build/dist/typert.host.d.ts +25 -0
- package/data/build/dist/typert.host.d.ts.map +1 -0
- package/data/build/dist/typert.host.js +155 -0
- package/data/build/dist/typert.host.js.map +1 -0
- package/data/build/dist/typert.remote-client.d.ts +11 -0
- package/data/build/dist/typert.remote-client.d.ts.map +1 -0
- package/data/build/dist/typert.remote-client.js +7 -0
- package/data/build/dist/typert.remote-client.js.map +1 -0
- package/dsh.bundle.patch +23 -0
- package/package.json +227 -4
- package/profile/README.md +43 -0
- package/profile/cordis.patch.yml +2 -0
- package/profile/package.json +25 -0
- package/profile/scripts/check-dsh-install.mjs +126 -0
- package/profile/version.json +5 -0
- package/scripts/check-dsh-install.mjs +128 -0
- package/version.json +6 -0
|
@@ -0,0 +1,1270 @@
|
|
|
1
|
+
import { runAsyncCommand } from './process-utils.js';
|
|
2
|
+
import { detectBinary } from './binary-detection.js';
|
|
3
|
+
import { spawn, spawnSync } from 'node:child_process';
|
|
4
|
+
import { createHash, randomBytes } from 'node:crypto';
|
|
5
|
+
import { readFileSync } from 'node:fs';
|
|
6
|
+
import { createServer } from 'node:net';
|
|
7
|
+
import { homedir } from 'node:os';
|
|
8
|
+
import { join } from 'node:path';
|
|
9
|
+
import { HttpSseClient } from './http-sse-client.js';
|
|
10
|
+
import { isProviderDefaultModel, knownOpenCodeContextWindow } from './model-catalog.js';
|
|
11
|
+
import { firstToolText, normalizeToolStatus, serializeToolValue } from './tool-observation.js';
|
|
12
|
+
import { isQuestionEvent, questionAnswersList, readAgentQuestions } from './interaction-events.js';
|
|
13
|
+
import { usageChunk } from './rpc-driver-utils.js';
|
|
14
|
+
import { commandEnvironment, terminateChildProcess } from './process-utils.js';
|
|
15
|
+
import { buildOpenCodeAttachmentParts } from './attachment-utils.js';
|
|
16
|
+
import { OpenCodeV2Protocol } from './opencode-v2-protocol.js';
|
|
17
|
+
import { debugWarn } from '../../shared/debug.js';
|
|
18
|
+
const WINDOWS = process.platform === 'win32';
|
|
19
|
+
const DEFAULT_BINARIES = WINDOWS ? ['opencode.exe', 'opencode', 'opencode2.exe', 'opencode2'] : ['opencode', 'opencode2'];
|
|
20
|
+
const DEFAULT_URLS = ['http://127.0.0.1:4096'];
|
|
21
|
+
/** OpenCode 首次加载 Provider 目录可能需要数秒,不能用半秒的固定窗口判定启动失败。 */
|
|
22
|
+
const SERVER_START_TIMEOUT_MS = 10_000;
|
|
23
|
+
const SERVER_START_POLL_INTERVAL_MS = 100;
|
|
24
|
+
/** 仅当子进程在监听前退出(端口竞态)才换端口重试;避免配置错误时无限拉起进程。 */
|
|
25
|
+
const SERVER_START_MAX_ATTEMPTS = 3;
|
|
26
|
+
/**
|
|
27
|
+
* OpenCode 的自定义 Provider 可能不返回模型 variants,但 DSH 仍需展示模型的真实思考强度。
|
|
28
|
+
* DeepSeek V4.1 Flash 的有效档位由上游模型目录定义为 low、high、max。
|
|
29
|
+
*/
|
|
30
|
+
const KNOWN_OPENCODE_EFFORTS = new Map([
|
|
31
|
+
['deepseek-v4.1-flash', ['low', 'high', 'max']],
|
|
32
|
+
]);
|
|
33
|
+
/** OpenCode 的 server/SSE 适配器,向上只暴露 DshAgentDoor 标准流。 */
|
|
34
|
+
export class OpenCodeDriver {
|
|
35
|
+
descriptor = { id: 'opencode', name: 'OpenCode', protocol: 'http-sse', capabilities: ['models', 'skills', 'stream', 'resume', 'interrupt', 'tool-events', 'reasoning', 'usage', 'permission', 'questions'] };
|
|
36
|
+
/**
|
|
37
|
+
* V2 的事件流会在同一轮中连续产生多个工具调用和 assistant 消息。
|
|
38
|
+
* Registry 可以在工具完成后挂起并续读同一个 SSE 迭代器,避免所有内容
|
|
39
|
+
* 被压到一个 DSH step 的结算阶段。
|
|
40
|
+
*/
|
|
41
|
+
supportsToolStepSplitting = true;
|
|
42
|
+
binaries;
|
|
43
|
+
binaryDetection;
|
|
44
|
+
serverUrls;
|
|
45
|
+
runSpawnSync;
|
|
46
|
+
runSpawn;
|
|
47
|
+
serverArgs;
|
|
48
|
+
serviceFile;
|
|
49
|
+
http;
|
|
50
|
+
v2;
|
|
51
|
+
/** 以实际端点识别协议,不能用本机 CLI 版本猜测远端服务。 */
|
|
52
|
+
serverProtocols = new Map();
|
|
53
|
+
serverPasswords = new Map();
|
|
54
|
+
cachedBinary = null;
|
|
55
|
+
cachedServer = null;
|
|
56
|
+
managedServers = new Map();
|
|
57
|
+
sessions = new Map();
|
|
58
|
+
/** Provider 会话的实际工作目录;目录变化时禁止复用旧会话。 */
|
|
59
|
+
sessionCwds = new Map();
|
|
60
|
+
/** 已投影到 Provider 会话的权限规则签名;避免每轮重复追加同一条规则。 */
|
|
61
|
+
sessionPermissions = new Map();
|
|
62
|
+
/** 交互请求属于启动该轮次的 OpenCode 目录实例,回传时必须复用同一目录。 */
|
|
63
|
+
interactionTargets = new Map();
|
|
64
|
+
modelContextWindows = new Map();
|
|
65
|
+
constructor(options = {}) {
|
|
66
|
+
this.binaries = options.binaries ?? DEFAULT_BINARIES;
|
|
67
|
+
this.serverUrls = options.serverUrls ?? (process.env.OPENCODE_SERVER_URL ? [process.env.OPENCODE_SERVER_URL] : DEFAULT_URLS);
|
|
68
|
+
this.runSpawnSync = options.spawnSync ?? spawnSync;
|
|
69
|
+
this.runSpawn = options.spawn ?? spawn;
|
|
70
|
+
this.serverArgs = options.serverArgs ?? ['serve'];
|
|
71
|
+
this.serviceFile = options.serviceFile ?? (options.serverUrls === undefined && !process.env.OPENCODE_SERVER_URL
|
|
72
|
+
? join(process.env.XDG_STATE_HOME || join(homedir(), '.local', 'state'), 'opencode', 'service.json') : undefined);
|
|
73
|
+
const fetchImpl = options.fetch ?? fetch;
|
|
74
|
+
this.http = new HttpSseClient({ fetch: async (url, init = {}) => {
|
|
75
|
+
const password = this.serverPasswords.get(new URL(String(url)).origin)
|
|
76
|
+
?? process.env.OPENCODE_PASSWORD ?? process.env.OPENCODE_SERVER_PASSWORD;
|
|
77
|
+
const headers = new Headers(init.headers);
|
|
78
|
+
if (password)
|
|
79
|
+
headers.set('authorization', `Basic ${Buffer.from(`opencode:${password}`).toString('base64')}`);
|
|
80
|
+
return fetchImpl(url, { ...init, headers });
|
|
81
|
+
} });
|
|
82
|
+
this.v2 = new OpenCodeV2Protocol(this.http);
|
|
83
|
+
}
|
|
84
|
+
async detect() {
|
|
85
|
+
// 周期访问由注册表缓存,真正进入 detect 表示首次检测或用户主动刷新。
|
|
86
|
+
this.cachedBinary = null;
|
|
87
|
+
const server = await this.findServer();
|
|
88
|
+
this.cachedServer = server?.url ?? null;
|
|
89
|
+
const binary = await this.findBinary();
|
|
90
|
+
if (server !== null)
|
|
91
|
+
return { installed: true, version: server.version ?? binary?.version ?? null, command: server.url };
|
|
92
|
+
if (binary !== null)
|
|
93
|
+
return { installed: true, version: binary.version, command: binary.command };
|
|
94
|
+
return this.binaryDetection ?? { installed: false, version: null, command: null };
|
|
95
|
+
}
|
|
96
|
+
async listModels(input = {}) {
|
|
97
|
+
// 会话目录既决定 V2 的 location,也决定托管服务的工作区归属:带目录查询
|
|
98
|
+
// 必须复用该目录已有的托管服务,否则会为同一工作区重复启动服务。
|
|
99
|
+
const server = await this.ensureServer(false, input.cwd);
|
|
100
|
+
if (server === null)
|
|
101
|
+
return emptyCatalog();
|
|
102
|
+
const protocol = this.serverProtocols.get(server);
|
|
103
|
+
// OpenCode V2 按 location[directory] 装载 Provider。设置页没有会话 ID 时,
|
|
104
|
+
// 使用 Host 当前目录,避免无目录请求被服务端当成空项目而返回空模型表。
|
|
105
|
+
const cwd = input.cwd?.trim() || (protocol === 2 ? process.cwd() : undefined);
|
|
106
|
+
if (protocol === 2)
|
|
107
|
+
return this.v2.listModels(server, cwd);
|
|
108
|
+
const paths = ['/config/providers', '/provider', '/models'];
|
|
109
|
+
for (const path of paths) {
|
|
110
|
+
try {
|
|
111
|
+
const response = await this.http.json(withOpenCodeDirectory(server, path, cwd));
|
|
112
|
+
if (!response.data || response.status < 200 || response.status >= 300)
|
|
113
|
+
continue;
|
|
114
|
+
rememberModelContextWindows(this.modelContextWindows, response.data);
|
|
115
|
+
const catalog = parseModelCatalog(response.data);
|
|
116
|
+
if (catalog.groups.length > 0)
|
|
117
|
+
return catalog;
|
|
118
|
+
}
|
|
119
|
+
catch { /* OpenCode 版本间接口不同,继续尝试其他路径。 */ }
|
|
120
|
+
}
|
|
121
|
+
return emptyCatalog();
|
|
122
|
+
}
|
|
123
|
+
/** 只读取 OpenCode 原生目录,保留额外路径、插件和 Provider 配置的发现语义。 */
|
|
124
|
+
async listSkills(input) {
|
|
125
|
+
if (input.signal?.aborted)
|
|
126
|
+
throw new Error('Skill 目录读取已取消');
|
|
127
|
+
const cwd = input.cwd?.trim() || process.cwd();
|
|
128
|
+
const server = await this.ensureServer(true, cwd);
|
|
129
|
+
if (server !== null && this.serverProtocols.get(server) === 2)
|
|
130
|
+
return this.v2.listSkills(server, input);
|
|
131
|
+
if (server !== null) {
|
|
132
|
+
try {
|
|
133
|
+
const options = input.signal === undefined ? {} : { signal: input.signal };
|
|
134
|
+
const response = await this.http.json(withOpenCodeDirectory(server, '/skill', cwd), options);
|
|
135
|
+
const native = parseOpenCodeSkillCatalog(response.status, response.data);
|
|
136
|
+
if (native !== null) {
|
|
137
|
+
// 原生 command 优先于同名 Skill;不能让用户选择 Skill 后执行另一个模板。
|
|
138
|
+
const commands = await this.http.json(withOpenCodeDirectory(server, '/command', cwd), options).catch(() => null);
|
|
139
|
+
if (input.signal?.aborted)
|
|
140
|
+
throw new Error('Skill 目录读取已取消');
|
|
141
|
+
if (commands === null || commands.status < 200 || commands.status >= 300 || !Array.isArray(commands.data))
|
|
142
|
+
return native;
|
|
143
|
+
const conflicts = new Set(commands.data.flatMap((raw) => {
|
|
144
|
+
const command = asRecord(raw);
|
|
145
|
+
return typeof command?.name === 'string' && typeof command.source === 'string' && command.source !== 'skill' ? [command.name] : [];
|
|
146
|
+
}));
|
|
147
|
+
return native.map((skill) => ({ ...skill, enabled: skill.enabled && !conflicts.has(skill.name) }));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
catch { /* 原生接口不可用时使用 CLI,不猜测其他版本的路由参数。 */ }
|
|
151
|
+
}
|
|
152
|
+
if (input.signal?.aborted)
|
|
153
|
+
throw new Error('Skill 目录读取已取消');
|
|
154
|
+
// V1 可用 debug skill 读取目录;V2 移除了该命令,改用同一托管 API 服务。
|
|
155
|
+
const binary = await this.findBinary();
|
|
156
|
+
if (binary === null)
|
|
157
|
+
return [];
|
|
158
|
+
if (binary.version?.startsWith('2.')) {
|
|
159
|
+
const server = await this.ensureServer(false, cwd);
|
|
160
|
+
return server !== null && this.serverProtocols.get(server) === 2 ? this.v2.listSkills(server, input) : [];
|
|
161
|
+
}
|
|
162
|
+
try {
|
|
163
|
+
const result = await runAsyncCommand(this.runSpawnSync, binary.command, ['debug', 'skill'], {
|
|
164
|
+
cwd, encoding: 'utf8', timeout: 5_000, maxBuffer: 8 * 1024 * 1024,
|
|
165
|
+
windowsHide: true, shell: WINDOWS, env: commandEnvironment(binary.command),
|
|
166
|
+
});
|
|
167
|
+
if (result.status !== 0)
|
|
168
|
+
return [];
|
|
169
|
+
return parseOpenCodeSkillCatalog(200, JSON.parse(String(result.stdout))) ?? [];
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
return [];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* OpenCode 的 Provider 配置在进程外修改,不能依赖 CLI 版本判断目录是否变化。
|
|
177
|
+
* 只对配置文件内容做摘要,不把 API key 等原文带入指纹。
|
|
178
|
+
*/
|
|
179
|
+
catalogFingerprint() {
|
|
180
|
+
const paths = [...openCodeConfigPaths(), ...(this.serviceFile === undefined ? [] : [this.serviceFile])];
|
|
181
|
+
const parts = [];
|
|
182
|
+
for (const path of paths) {
|
|
183
|
+
try {
|
|
184
|
+
const value = readFileSync(path, 'utf8');
|
|
185
|
+
parts.push(`${path}:${createHash('sha256').update(value).digest('hex').slice(0, 16)}`);
|
|
186
|
+
}
|
|
187
|
+
catch { /* 配置文件不存在时继续检查其他候选路径。 */ }
|
|
188
|
+
}
|
|
189
|
+
if (parts.length === 0)
|
|
190
|
+
return undefined;
|
|
191
|
+
return createHash('sha256').update(parts.join('\u0000')).digest('hex').slice(0, 16);
|
|
192
|
+
}
|
|
193
|
+
async probeSession(input) {
|
|
194
|
+
const providerSessionId = input.providerSessionId?.trim();
|
|
195
|
+
if (!providerSessionId)
|
|
196
|
+
return { state: 'unknown', reason: '缺少 Provider 会话标识' };
|
|
197
|
+
const server = await this.ensureServer(true, input.cwd);
|
|
198
|
+
if (server === null)
|
|
199
|
+
return { state: 'unreachable', reason: 'OpenCode server 当前不可达' };
|
|
200
|
+
if (this.serverProtocols.get(server) === 2)
|
|
201
|
+
return this.v2.probeSession(server, input);
|
|
202
|
+
const rawStoreRef = `${server}/session/${encodeURIComponent(providerSessionId)}`;
|
|
203
|
+
try {
|
|
204
|
+
const response = await this.http.json(rawStoreRef, input.signal === undefined ? {} : { signal: input.signal });
|
|
205
|
+
if (response.status === 404)
|
|
206
|
+
return { state: 'missing', reason: 'OpenCode server 确认该会话不存在' };
|
|
207
|
+
if (response.status >= 200 && response.status < 300) {
|
|
208
|
+
const record = asRecord(response.data);
|
|
209
|
+
const id = typeof record?.id === 'string' ? record.id : typeof record?.sessionID === 'string' ? record.sessionID : null;
|
|
210
|
+
const directory = readProviderDirectory(record);
|
|
211
|
+
if (input.cwd !== undefined && directory !== undefined && directory !== input.cwd.trim()) {
|
|
212
|
+
return { state: 'corrupt', reason: 'OpenCode 会话工作目录与当前 DSH 会话不一致', rawStoreRef };
|
|
213
|
+
}
|
|
214
|
+
return id === null || id === providerSessionId
|
|
215
|
+
? { state: 'available', reason: 'OpenCode 原始会话可用', rawStoreRef }
|
|
216
|
+
: { state: 'corrupt', reason: 'OpenCode 会话响应与绑定标识不一致', rawStoreRef };
|
|
217
|
+
}
|
|
218
|
+
if (response.status === 401 || response.status === 403 || response.status === 408 || response.status === 429 || response.status >= 500) {
|
|
219
|
+
return { state: 'unreachable', reason: `OpenCode server 暂时无法验证会话(HTTP ${response.status})` };
|
|
220
|
+
}
|
|
221
|
+
return { state: 'unknown', reason: `OpenCode server 无法确认会话状态(HTTP ${response.status})` };
|
|
222
|
+
}
|
|
223
|
+
catch {
|
|
224
|
+
return { state: 'unreachable', reason: 'OpenCode server 会话探测请求失败' };
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
async *executeTurn(input) {
|
|
228
|
+
const server = await this.ensureServer(false, input.cwd, input.runtimeEnv);
|
|
229
|
+
if (server === null)
|
|
230
|
+
throw new Error('OpenCode server 未运行,请先启动 `opencode serve`');
|
|
231
|
+
if (this.serverProtocols.get(server) === 2) {
|
|
232
|
+
yield* this.v2.executeTurn(server, input);
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
const modelId = await this.resolveModelId(server, input.modelId);
|
|
236
|
+
const effectiveInput = modelId === input.modelId ? input : { ...input, ...(modelId === undefined ? {} : { modelId }) };
|
|
237
|
+
let sessionId = input.providerSessionId ?? this.sessions.get(input.sessionId);
|
|
238
|
+
if (sessionId !== undefined && !(await this.providerSessionMatchesDirectory(server, sessionId, input.cwd, input.signal))) {
|
|
239
|
+
sessionId = undefined;
|
|
240
|
+
}
|
|
241
|
+
if (sessionId !== undefined)
|
|
242
|
+
this.sessions.set(input.sessionId, sessionId);
|
|
243
|
+
const createdSession = sessionId === undefined;
|
|
244
|
+
if (sessionId === undefined) {
|
|
245
|
+
sessionId = await this.createSession(server, input);
|
|
246
|
+
this.sessions.set(input.sessionId, sessionId);
|
|
247
|
+
}
|
|
248
|
+
// 复用旧会话时同样要投影:会话是在策略变化前创建的,不补写就会继续触发无意义审批。
|
|
249
|
+
await this.applySessionPermissionProjection(server, sessionId, input);
|
|
250
|
+
const contextWindow = await this.resolveModelContextWindow(server, modelId);
|
|
251
|
+
if (input.cwd?.trim())
|
|
252
|
+
this.sessionCwds.set(sessionId, input.cwd.trim());
|
|
253
|
+
const interactionTarget = { server, cwd: input.cwd };
|
|
254
|
+
this.interactionTargets.set(input.sessionId, interactionTarget);
|
|
255
|
+
const streamController = new AbortController();
|
|
256
|
+
let aborted = false;
|
|
257
|
+
const abort = () => {
|
|
258
|
+
aborted = true;
|
|
259
|
+
streamController.abort();
|
|
260
|
+
void this.abortSession(server, sessionId);
|
|
261
|
+
if (input.cwd !== undefined)
|
|
262
|
+
this.stopManagedServer(input.cwd);
|
|
263
|
+
};
|
|
264
|
+
input.signal?.addEventListener('abort', abort, { once: true });
|
|
265
|
+
const eventStream = this.http.sse(withOpenCodeDirectory(server, '/event', input.cwd), { signal: streamController.signal });
|
|
266
|
+
const eventIterator = eventStream[Symbol.asyncIterator]();
|
|
267
|
+
// 先调用 next() 让 SSE 请求真正建立,再发送 prompt,避免首个事件竞态丢失。
|
|
268
|
+
let pendingEvent = eventIterator.next();
|
|
269
|
+
let sendError = null;
|
|
270
|
+
const send = this.sendPrompt(server, sessionId, effectiveInput).catch((error) => {
|
|
271
|
+
sendError = error;
|
|
272
|
+
// message 请求失败时,OpenCode 的全局 SSE 通常不会自行结束;主动中止,
|
|
273
|
+
// 否则调用方会一直等不到错误,只看到没有任何输出。
|
|
274
|
+
streamController.abort();
|
|
275
|
+
return null;
|
|
276
|
+
});
|
|
277
|
+
let emitted = false;
|
|
278
|
+
let finished = false;
|
|
279
|
+
const cumulative = new Map();
|
|
280
|
+
const partTypes = new Map();
|
|
281
|
+
const assistantMessageIds = new Set();
|
|
282
|
+
const knownMessageIds = new Set();
|
|
283
|
+
const pendingMessageParts = new Map();
|
|
284
|
+
try {
|
|
285
|
+
if (createdSession || input.providerSessionId !== undefined)
|
|
286
|
+
yield { type: 'session-binding', providerSessionId: sessionId };
|
|
287
|
+
// sendPrompt 的返回体可能包含完整消息;SSE 仍然是首选,返回体作为兜底。
|
|
288
|
+
try {
|
|
289
|
+
while (true) {
|
|
290
|
+
const result = await pendingEvent;
|
|
291
|
+
if (result.done)
|
|
292
|
+
break;
|
|
293
|
+
pendingEvent = eventIterator.next();
|
|
294
|
+
const parsed = parseEvent(result.value);
|
|
295
|
+
if (parsed === null)
|
|
296
|
+
continue;
|
|
297
|
+
const eventSession = eventSessionId(parsed);
|
|
298
|
+
// /event 是全局 SSE;没有会话字段的旧版事件仍允许通过,
|
|
299
|
+
// 但明确属于其他会话的事件绝不能结束或污染当前轮次。
|
|
300
|
+
if (eventSession !== undefined && eventSession !== sessionId)
|
|
301
|
+
continue;
|
|
302
|
+
const messageRole = readMessageRole(parsed);
|
|
303
|
+
if (messageRole !== null) {
|
|
304
|
+
knownMessageIds.add(messageRole.id);
|
|
305
|
+
if (messageRole.role === 'assistant') {
|
|
306
|
+
assistantMessageIds.add(messageRole.id);
|
|
307
|
+
const pending = pendingMessageParts.get(messageRole.id) ?? [];
|
|
308
|
+
pendingMessageParts.delete(messageRole.id);
|
|
309
|
+
for (const pendingPart of pending) {
|
|
310
|
+
const chunk = eventToChunk(pendingPart, cumulative, assistantMessageIds, partTypes, contextWindow);
|
|
311
|
+
if (chunk !== null) {
|
|
312
|
+
emitted = true;
|
|
313
|
+
yield chunk;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
pendingMessageParts.delete(messageRole.id);
|
|
319
|
+
}
|
|
320
|
+
// message.updated 同时承载 assistant 的最终 tokens。角色识别后
|
|
321
|
+
// 不能直接跳过,否则 OpenCode 的 token/context 统计会被吞掉。
|
|
322
|
+
if (messageRole.role === 'assistant') {
|
|
323
|
+
const chunk = eventToChunk(parsed, cumulative, assistantMessageIds, partTypes, contextWindow);
|
|
324
|
+
if (chunk !== null) {
|
|
325
|
+
emitted = true;
|
|
326
|
+
yield chunk;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
331
|
+
const messageId = eventMessageId(parsed);
|
|
332
|
+
if (messageId !== undefined && !knownMessageIds.has(messageId)) {
|
|
333
|
+
// OpenCode 的 message.part.updated 经常早于 message.updated 到达。
|
|
334
|
+
// 工具调用是当前轮次最重要的实时事件,不能像正文一样等到
|
|
335
|
+
// assistant 消息结算后才投影,否则原生工具节点会被追加到正文底部。
|
|
336
|
+
// 但如果同一消息已经有待确认的正文,必须保持原始事件顺序,不能让
|
|
337
|
+
// 后到的工具越过前面的正文;等 message.updated 确认 assistant 后再按
|
|
338
|
+
// 入站顺序冲刷这组 part。用户消息没有 tool 字段,因此仍然暂存并等待
|
|
339
|
+
// role 校验。
|
|
340
|
+
if (isOpenCodeToolEvent(parsed)) {
|
|
341
|
+
const pending = pendingMessageParts.get(messageId);
|
|
342
|
+
if (pending !== undefined && pending.length > 0) {
|
|
343
|
+
pending.push(parsed);
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
346
|
+
const chunk = eventToChunk(parsed, cumulative, undefined, partTypes, contextWindow);
|
|
347
|
+
if (chunk !== null) {
|
|
348
|
+
emitted = true;
|
|
349
|
+
yield chunk;
|
|
350
|
+
}
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
const pending = pendingMessageParts.get(messageId) ?? [];
|
|
354
|
+
pending.push(parsed);
|
|
355
|
+
pendingMessageParts.set(messageId, pending);
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
358
|
+
if (messageId !== undefined && !assistantMessageIds.has(messageId))
|
|
359
|
+
continue;
|
|
360
|
+
const chunk = eventToChunk(parsed, cumulative, assistantMessageIds, partTypes, contextWindow);
|
|
361
|
+
if (chunk !== null) {
|
|
362
|
+
emitted = true;
|
|
363
|
+
yield chunk;
|
|
364
|
+
}
|
|
365
|
+
if (isFinishedEvent(parsed, emitted)) {
|
|
366
|
+
finished = true;
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
catch (error) {
|
|
372
|
+
if (sendError !== null && !aborted)
|
|
373
|
+
throw sendError;
|
|
374
|
+
if (!aborted)
|
|
375
|
+
throw error;
|
|
376
|
+
}
|
|
377
|
+
// 全局 SSE 可能先出现 idle,command 请求还在展开模板;必须等发送结果,
|
|
378
|
+
// 否则原生 Skill 错误会被提前发出的 finish 吞掉。
|
|
379
|
+
if (!aborted) {
|
|
380
|
+
const response = await send;
|
|
381
|
+
if (sendError !== null)
|
|
382
|
+
throw sendError;
|
|
383
|
+
if (!finished) {
|
|
384
|
+
for (const chunk of responseChunks(response, cumulative, partTypes, contextWindow)) {
|
|
385
|
+
emitted = true;
|
|
386
|
+
yield chunk;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
if (aborted || input.signal?.aborted)
|
|
391
|
+
yield { type: 'finish', reason: 'cancel' };
|
|
392
|
+
else if (finished || emitted)
|
|
393
|
+
yield { type: 'finish', reason: 'stop' };
|
|
394
|
+
else
|
|
395
|
+
throw new Error('OpenCode 未返回可识别的事件');
|
|
396
|
+
}
|
|
397
|
+
finally {
|
|
398
|
+
if (this.interactionTargets.get(input.sessionId) === interactionTarget)
|
|
399
|
+
this.interactionTargets.delete(input.sessionId);
|
|
400
|
+
input.signal?.removeEventListener('abort', abort);
|
|
401
|
+
streamController.abort();
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
async respondPermission(sessionId, response) {
|
|
405
|
+
if (this.v2.hasTurn(sessionId))
|
|
406
|
+
return this.v2.respondPermission(sessionId, response);
|
|
407
|
+
const target = this.interactionTargets.get(sessionId);
|
|
408
|
+
if (target === undefined)
|
|
409
|
+
throw new Error('OpenCode 权限请求已结束');
|
|
410
|
+
const requestId = encodeURIComponent(response.requestId);
|
|
411
|
+
await this.replyInteraction(target, this.sessions.get(sessionId), `/permission/${requestId}/reply`, (providerSessionId) => `/api/session/${encodeURIComponent(providerSessionId)}/permission/${requestId}/reply`, { reply: response.approved ? 'once' : 'reject' }, 'OpenCode 权限回复失败');
|
|
412
|
+
}
|
|
413
|
+
async respondQuestion(sessionId, response) {
|
|
414
|
+
if (this.v2.hasTurn(sessionId))
|
|
415
|
+
return this.v2.respondQuestion(sessionId, response);
|
|
416
|
+
const target = this.interactionTargets.get(sessionId);
|
|
417
|
+
if (target === undefined)
|
|
418
|
+
throw new Error('OpenCode 问题请求已结束');
|
|
419
|
+
const requestId = encodeURIComponent(response.requestId);
|
|
420
|
+
await this.replyInteraction(target, this.sessions.get(sessionId), `/question/${requestId}/reply`, (providerSessionId) => `/api/session/${encodeURIComponent(providerSessionId)}/question/${requestId}/reply`, { answers: questionAnswersList(response) }, 'OpenCode 问题回复失败');
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* 交互回传的幂等收敛。
|
|
424
|
+
*
|
|
425
|
+
* 旧版路由(`/permission/:id/reply`、`/question/:id/reply`)只查 V1 交互注册表,
|
|
426
|
+
* 已结算或属于 V2 注册表的 requestID 一律返回 404 PermissionNotFoundError /
|
|
427
|
+
* QuestionNotFoundError。重复回传是正常竞态(服务端可能已经自行结算,或事件流
|
|
428
|
+
* 把已结算事件当成新请求重放),因此:先按同一 requestID 尝试 V2 路由补发一次,
|
|
429
|
+
* 再按幂等成功收敛,绝不能把「请求已结束」升级为致命回合错误。
|
|
430
|
+
*/
|
|
431
|
+
async replyInteraction(target, providerSessionId, legacyPath, fallbackPath, body, failureLabel) {
|
|
432
|
+
const options = {
|
|
433
|
+
method: 'POST',
|
|
434
|
+
headers: { 'content-type': 'application/json' },
|
|
435
|
+
body: JSON.stringify(body),
|
|
436
|
+
};
|
|
437
|
+
const legacy = await this.http.json(withOpenCodeDirectory(target.server, legacyPath, target.cwd), options);
|
|
438
|
+
if (isHttpSuccess(legacy.status))
|
|
439
|
+
return;
|
|
440
|
+
if (!isInteractionNotFound(legacy.data, legacy.text))
|
|
441
|
+
throw new Error(`${failureLabel}(HTTP ${legacy.status})`);
|
|
442
|
+
if (providerSessionId === undefined)
|
|
443
|
+
return;
|
|
444
|
+
try {
|
|
445
|
+
const fallback = await this.http.json(withOpenCodeDirectory(target.server, fallbackPath(providerSessionId), target.cwd), options);
|
|
446
|
+
if (isHttpSuccess(fallback.status))
|
|
447
|
+
return;
|
|
448
|
+
debugWarn('dsh-agentdoor: OpenCode 交互回传按已结算收敛', {
|
|
449
|
+
path: legacyPath,
|
|
450
|
+
status: fallback.status,
|
|
451
|
+
detail: openCodeErrorDetail(fallback.data),
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
catch { /* 旧版本没有 V2 交互路由:同样按已结算收敛。 */ }
|
|
455
|
+
}
|
|
456
|
+
dispose() {
|
|
457
|
+
this.v2.dispose();
|
|
458
|
+
this.sessions.clear();
|
|
459
|
+
this.sessionCwds.clear();
|
|
460
|
+
this.sessionPermissions.clear();
|
|
461
|
+
this.interactionTargets.clear();
|
|
462
|
+
this.modelContextWindows.clear();
|
|
463
|
+
for (const managed of this.managedServers.values())
|
|
464
|
+
terminateChildProcess(managed.child);
|
|
465
|
+
this.managedServers.clear();
|
|
466
|
+
this.cachedBinary = null;
|
|
467
|
+
this.cachedServer = null;
|
|
468
|
+
this.serverProtocols.clear();
|
|
469
|
+
this.serverPasswords.clear();
|
|
470
|
+
}
|
|
471
|
+
async sendPrompt(server, sessionId, input) {
|
|
472
|
+
const attachments = await buildOpenCodeAttachmentParts(input.attachments ?? []);
|
|
473
|
+
// `/name` 必须进入 command API 才会展开 Skill 模板、参数和基准目录。
|
|
474
|
+
// 先用原生目录确认名称,普通路径/未知命令继续沿用 message API。
|
|
475
|
+
const mention = input.prompt.match(/^\s*[/$]([A-Za-z0-9][A-Za-z0-9._:-]*)(?:\s+([\s\S]*))?$/u);
|
|
476
|
+
if (mention !== null) {
|
|
477
|
+
const catalog = await this.listSkills({ sessionId: input.sessionId, ...(input.cwd === undefined ? {} : { cwd: input.cwd }), ...(input.signal === undefined ? {} : { signal: input.signal }) });
|
|
478
|
+
if (catalog.some((skill) => skill.name === mention[1] && skill.enabled)) {
|
|
479
|
+
const body = {
|
|
480
|
+
command: mention[1], arguments: mention[2] ?? '',
|
|
481
|
+
...(attachments.length === 0 ? {} : { parts: attachments }),
|
|
482
|
+
...(!isProviderDefaultModel(input.modelId) ? { model: input.modelId } : {}),
|
|
483
|
+
...(input.effortId ? { variant: input.effortId } : {}),
|
|
484
|
+
};
|
|
485
|
+
const response = await this.http.json(withOpenCodeDirectory(server, `/session/${encodeURIComponent(sessionId)}/command`, input.cwd), {
|
|
486
|
+
method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body), ...(input.signal === undefined ? {} : { signal: input.signal }),
|
|
487
|
+
});
|
|
488
|
+
if (response.status < 200 || response.status >= 300)
|
|
489
|
+
throw new Error(`OpenCode Skill 命令执行失败(HTTP ${response.status}):${openCodeErrorDetail(response.data)}`);
|
|
490
|
+
return response.data;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
const parts = [];
|
|
494
|
+
if (input.prompt.trim() !== '' || attachments.length === 0)
|
|
495
|
+
parts.push({ type: 'text', text: input.prompt });
|
|
496
|
+
parts.push(...attachments);
|
|
497
|
+
const body = { parts };
|
|
498
|
+
const model = parseOpenCodeModel(input.modelId);
|
|
499
|
+
if (model !== null)
|
|
500
|
+
body.model = model;
|
|
501
|
+
if (input.effortId)
|
|
502
|
+
body.variant = input.effortId;
|
|
503
|
+
const response = await this.http.json(withOpenCodeDirectory(server, `/session/${encodeURIComponent(sessionId)}/message`, input.cwd), {
|
|
504
|
+
method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body), ...(input.signal === undefined ? {} : { signal: input.signal }),
|
|
505
|
+
});
|
|
506
|
+
if (response.status < 200 || response.status >= 300)
|
|
507
|
+
throw new Error(`OpenCode message 请求失败(HTTP ${response.status}):${openCodeErrorDetail(response.data)}`);
|
|
508
|
+
return response.data;
|
|
509
|
+
}
|
|
510
|
+
async createSession(server, input) {
|
|
511
|
+
const body = { title: input.sessionId, ...(input.cwd === undefined ? {} : { directory: input.cwd }) };
|
|
512
|
+
const response = await this.http.json(withOpenCodeDirectory(server, '/session', input.cwd), {
|
|
513
|
+
method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body), ...(input.signal === undefined ? {} : { signal: input.signal }),
|
|
514
|
+
});
|
|
515
|
+
const record = asRecord(response.data);
|
|
516
|
+
const id = typeof record?.id === 'string' ? record.id : typeof record?.sessionID === 'string' ? record.sessionID : null;
|
|
517
|
+
if (response.status < 200 || response.status >= 300 || id === null)
|
|
518
|
+
throw new Error(`OpenCode 创建会话失败(HTTP ${response.status}):${openCodeErrorDetail(response.data)}`);
|
|
519
|
+
return id;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* 把 DSH 的沙箱与审批策略投影到 OpenCode 1.x 会话权限。
|
|
523
|
+
*
|
|
524
|
+
* OpenCode 默认对工作目录之外的路径触发 external_directory 询问。DSH 的
|
|
525
|
+
* danger-full-access + never 已经表示允许无提示执行,必须在 Provider 会话层
|
|
526
|
+
* 放行这条边界;否则每次读取设备目录都会绕回 DSH 审批并被 never 自动拒绝,
|
|
527
|
+
* 既做不了事,又制造出会被结算的权限事件。判定条件与 V2 路径的
|
|
528
|
+
* openCodePermissions 保持一致;策略变化时用 ask 规则把它还原回去。
|
|
529
|
+
*/
|
|
530
|
+
async applySessionPermissionProjection(server, sessionId, input) {
|
|
531
|
+
if (input.permission === undefined)
|
|
532
|
+
return;
|
|
533
|
+
const allow = input.permission.sandboxMode === 'danger-full-access' && input.permission.approvalPolicy === 'never';
|
|
534
|
+
const action = allow ? 'allow' : 'ask';
|
|
535
|
+
const signature = `${server}|${action}`;
|
|
536
|
+
if (this.sessionPermissions.get(sessionId) === signature)
|
|
537
|
+
return;
|
|
538
|
+
try {
|
|
539
|
+
const response = await this.http.json(withOpenCodeDirectory(server, `/session/${encodeURIComponent(sessionId)}`, input.cwd), {
|
|
540
|
+
method: 'PATCH',
|
|
541
|
+
headers: { 'content-type': 'application/json' },
|
|
542
|
+
body: JSON.stringify({ permission: [{ permission: 'external_directory', pattern: '*', action }] }),
|
|
543
|
+
...(input.signal === undefined ? {} : { signal: input.signal }),
|
|
544
|
+
});
|
|
545
|
+
if (isHttpSuccess(response.status))
|
|
546
|
+
this.sessionPermissions.set(sessionId, signature);
|
|
547
|
+
}
|
|
548
|
+
catch { /* 旧版本没有会话权限接口时保持原生审批行为。 */ }
|
|
549
|
+
}
|
|
550
|
+
async providerSessionMatchesDirectory(server, sessionId, cwd, signal) {
|
|
551
|
+
if (cwd === undefined || cwd.trim() === '')
|
|
552
|
+
return true;
|
|
553
|
+
const normalizedCwd = cwd.trim();
|
|
554
|
+
const knownCwd = this.sessionCwds.get(sessionId);
|
|
555
|
+
if (knownCwd !== undefined)
|
|
556
|
+
return knownCwd === normalizedCwd;
|
|
557
|
+
try {
|
|
558
|
+
const response = await this.http.json(`${server}/session/${encodeURIComponent(sessionId)}`, signal === undefined ? {} : { signal });
|
|
559
|
+
if (response.status === 404)
|
|
560
|
+
return false;
|
|
561
|
+
if (response.status < 200 || response.status >= 300)
|
|
562
|
+
return true;
|
|
563
|
+
const directory = readProviderDirectory(asRecord(response.data));
|
|
564
|
+
if (directory === undefined)
|
|
565
|
+
return true;
|
|
566
|
+
return directory === normalizedCwd;
|
|
567
|
+
}
|
|
568
|
+
catch {
|
|
569
|
+
// 目录校验失败时保留旧兼容行为,避免临时网络故障导致会话被无故重建。
|
|
570
|
+
return true;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
async abortSession(server, sessionId) {
|
|
574
|
+
try {
|
|
575
|
+
await this.http.json(`${server}/session/${encodeURIComponent(sessionId)}/abort`, { method: 'POST' });
|
|
576
|
+
}
|
|
577
|
+
catch { /* 取消请求尽力而为 */ }
|
|
578
|
+
}
|
|
579
|
+
async resolveModelContextWindow(server, modelId) {
|
|
580
|
+
if (modelId === undefined)
|
|
581
|
+
return undefined;
|
|
582
|
+
const known = this.modelContextWindows.get(modelId);
|
|
583
|
+
if (known !== undefined)
|
|
584
|
+
return known;
|
|
585
|
+
try {
|
|
586
|
+
const response = await this.http.json(`${server}/config/providers`);
|
|
587
|
+
if (response.status < 200 || response.status >= 300)
|
|
588
|
+
return undefined;
|
|
589
|
+
rememberModelContextWindows(this.modelContextWindows, response.data);
|
|
590
|
+
return this.modelContextWindows.get(modelId);
|
|
591
|
+
}
|
|
592
|
+
catch {
|
|
593
|
+
return undefined;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* 页面或 Host 可能暂存旧的 Provider 模型 ID。OpenCode 对失效 ID 有时只发
|
|
598
|
+
* `stop`/usage 空事件,必须在发消息前把它和实时目录对齐;同一 Provider 只有
|
|
599
|
+
* 一个模型时可安全迁移,否则保留原值让服务端返回明确错误。
|
|
600
|
+
*/
|
|
601
|
+
async resolveModelId(server, modelId) {
|
|
602
|
+
const parsed = parseOpenCodeModel(modelId);
|
|
603
|
+
if (parsed === null)
|
|
604
|
+
return modelId;
|
|
605
|
+
try {
|
|
606
|
+
const response = await this.http.json(`${server}/config/providers`);
|
|
607
|
+
if (response.status < 200 || response.status >= 300)
|
|
608
|
+
return modelId;
|
|
609
|
+
const catalog = parseModelCatalog(response.data);
|
|
610
|
+
const group = catalog.groups.find((item) => item.id === parsed.providerID);
|
|
611
|
+
if (group === undefined || group.models.some((item) => item.id === modelId))
|
|
612
|
+
return modelId;
|
|
613
|
+
if (group.models.length === 1)
|
|
614
|
+
return group.models[0].id;
|
|
615
|
+
const available = group.models.map((item) => item.id).join('、');
|
|
616
|
+
throw new Error(`OpenCode 模型不可用:${modelId};Provider ${parsed.providerID} 当前可用模型:${available}`);
|
|
617
|
+
}
|
|
618
|
+
catch (error) {
|
|
619
|
+
if (error instanceof Error && error.message.startsWith('OpenCode 模型不可用:'))
|
|
620
|
+
throw error;
|
|
621
|
+
return modelId;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
async ensureServer(probeOnly, cwd, runtimeEnv) {
|
|
625
|
+
const workspace = cwd ?? process.cwd();
|
|
626
|
+
const managed = this.managedServers.get(workspace);
|
|
627
|
+
if (managed !== undefined)
|
|
628
|
+
return managed.url;
|
|
629
|
+
if (this.cachedServer !== null)
|
|
630
|
+
return this.cachedServer;
|
|
631
|
+
const server = await this.findServer();
|
|
632
|
+
if (server !== null) {
|
|
633
|
+
this.cachedServer = server.url;
|
|
634
|
+
return server.url;
|
|
635
|
+
}
|
|
636
|
+
if (!probeOnly)
|
|
637
|
+
return this.startServer(workspace, runtimeEnv);
|
|
638
|
+
return null;
|
|
639
|
+
}
|
|
640
|
+
async startServer(cwd, runtimeEnv) {
|
|
641
|
+
const command = this.cachedBinary?.command ?? (await this.findBinary())?.command;
|
|
642
|
+
if (command === null || command === undefined)
|
|
643
|
+
return null;
|
|
644
|
+
// 端口不能按固定 4096 递增分配:它会被其他 DSH Profile(Desktop、Web)
|
|
645
|
+
// 或用户自己启动的 opencode 服务占用,导致子进程绑定失败立即退出。
|
|
646
|
+
// 每次尝试都取一个操作系统分配的空闲端口;若子进程在监听前退出(端口
|
|
647
|
+
// 抢占等待极小概率竞态),换一个端口再试。
|
|
648
|
+
const deadline = Date.now() + SERVER_START_TIMEOUT_MS;
|
|
649
|
+
for (let attempt = 0; attempt < SERVER_START_MAX_ATTEMPTS; attempt += 1) {
|
|
650
|
+
if (Date.now() >= deadline)
|
|
651
|
+
break;
|
|
652
|
+
const port = await findAvailablePort();
|
|
653
|
+
const url = `http://127.0.0.1:${port}`;
|
|
654
|
+
// V2 默认生成随机服务密码;托管时明确传入只属于该进程的密码,供 HTTP/SSE 共用。
|
|
655
|
+
const password = randomBytes(32).toString('base64url');
|
|
656
|
+
this.serverPasswords.set(url, password);
|
|
657
|
+
let child;
|
|
658
|
+
try {
|
|
659
|
+
child = this.runSpawn(command, [...this.serverArgs, '--port', String(port)], {
|
|
660
|
+
cwd,
|
|
661
|
+
env: { ...commandEnvironment(command), ...(runtimeEnv ?? {}), OPENCODE_PASSWORD: password, OPENCODE_SERVER_PASSWORD: password },
|
|
662
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
663
|
+
windowsHide: true,
|
|
664
|
+
shell: WINDOWS,
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
catch {
|
|
668
|
+
this.serverPasswords.delete(url);
|
|
669
|
+
return null;
|
|
670
|
+
}
|
|
671
|
+
child.stdout.on('data', () => undefined);
|
|
672
|
+
child.stderr.on('data', () => undefined);
|
|
673
|
+
this.managedServers.set(cwd, { url, child });
|
|
674
|
+
const ready = await this.waitForManagedServer(url, child, deadline);
|
|
675
|
+
if (ready)
|
|
676
|
+
return url;
|
|
677
|
+
const childExitCode = child.exitCode;
|
|
678
|
+
this.stopManagedServer(cwd);
|
|
679
|
+
// 已经退出说明这次绑定失败,可以安全地换个端口重试;仍在运行却始终
|
|
680
|
+
// 未就绪时(首次加载配置超时)继续重试没有意义。
|
|
681
|
+
if (childExitCode === null || childExitCode === undefined)
|
|
682
|
+
break;
|
|
683
|
+
}
|
|
684
|
+
return null;
|
|
685
|
+
}
|
|
686
|
+
/** 等待托管服务通过健康探测;子进程提前退出或超出启动窗口都视为失败。 */
|
|
687
|
+
async waitForManagedServer(url, child, deadline) {
|
|
688
|
+
while (Date.now() < deadline) {
|
|
689
|
+
try {
|
|
690
|
+
const server = await this.probeServer(url);
|
|
691
|
+
if (server !== null)
|
|
692
|
+
return true;
|
|
693
|
+
}
|
|
694
|
+
catch { /* 服务尚未监听 */ }
|
|
695
|
+
// 子进程已经退出时无需把整个启动超时耗尽;正常运行的 OpenCode
|
|
696
|
+
// 进程在首次加载配置和 Provider 时允许有完整的启动窗口。
|
|
697
|
+
const childExitCode = child.exitCode;
|
|
698
|
+
if (childExitCode !== null && childExitCode !== undefined)
|
|
699
|
+
return false;
|
|
700
|
+
await new Promise((resolve) => setTimeout(resolve, SERVER_START_POLL_INTERVAL_MS));
|
|
701
|
+
}
|
|
702
|
+
return false;
|
|
703
|
+
}
|
|
704
|
+
stopManagedServer(cwd) {
|
|
705
|
+
const managed = this.managedServers.get(cwd);
|
|
706
|
+
if (managed === undefined)
|
|
707
|
+
return;
|
|
708
|
+
this.managedServers.delete(cwd);
|
|
709
|
+
this.serverPasswords.delete(managed.url);
|
|
710
|
+
this.serverProtocols.delete(managed.url);
|
|
711
|
+
terminateChildProcess(managed.child);
|
|
712
|
+
}
|
|
713
|
+
async findServer() {
|
|
714
|
+
const registered = await this.findRegisteredServer();
|
|
715
|
+
if (registered !== null)
|
|
716
|
+
return registered;
|
|
717
|
+
for (const raw of this.serverUrls) {
|
|
718
|
+
const url = raw.replace(/\/$/u, '');
|
|
719
|
+
const server = await this.probeServer(url);
|
|
720
|
+
if (server !== null)
|
|
721
|
+
return server;
|
|
722
|
+
}
|
|
723
|
+
return null;
|
|
724
|
+
}
|
|
725
|
+
/** 复用 V2 CLI 的本地后台服务和认证;只读取登记,不重启或改写用户服务。 */
|
|
726
|
+
async findRegisteredServer() {
|
|
727
|
+
if (this.serviceFile === undefined)
|
|
728
|
+
return null;
|
|
729
|
+
let registration;
|
|
730
|
+
try {
|
|
731
|
+
registration = asRecord(JSON.parse(readFileSync(this.serviceFile, 'utf8')));
|
|
732
|
+
}
|
|
733
|
+
catch {
|
|
734
|
+
return null;
|
|
735
|
+
}
|
|
736
|
+
if (typeof registration?.url !== 'string' || typeof registration.pid !== 'number')
|
|
737
|
+
return null;
|
|
738
|
+
let url;
|
|
739
|
+
try {
|
|
740
|
+
url = new URL(registration.url);
|
|
741
|
+
}
|
|
742
|
+
catch {
|
|
743
|
+
return null;
|
|
744
|
+
}
|
|
745
|
+
if (!['127.0.0.1', 'localhost', '[::1]'].includes(url.hostname))
|
|
746
|
+
return null;
|
|
747
|
+
const server = url.origin;
|
|
748
|
+
const previousPassword = this.serverPasswords.get(server);
|
|
749
|
+
if (typeof registration.password === 'string')
|
|
750
|
+
this.serverPasswords.set(server, registration.password);
|
|
751
|
+
const found = await this.probeServer(server, registration.pid);
|
|
752
|
+
if (found !== null)
|
|
753
|
+
return found;
|
|
754
|
+
if (previousPassword === undefined)
|
|
755
|
+
this.serverPasswords.delete(server);
|
|
756
|
+
else
|
|
757
|
+
this.serverPasswords.set(server, previousPassword);
|
|
758
|
+
return null;
|
|
759
|
+
}
|
|
760
|
+
async probeServer(url, expectedPid) {
|
|
761
|
+
for (const path of ['/api/info', '/global/health', '/health']) {
|
|
762
|
+
if (expectedPid !== undefined && path !== '/api/info')
|
|
763
|
+
continue;
|
|
764
|
+
try {
|
|
765
|
+
const response = await this.http.json(`${url}${path}`, { signal: AbortSignal.timeout(2_000) });
|
|
766
|
+
if (response.status < 200 || response.status >= 300)
|
|
767
|
+
continue;
|
|
768
|
+
const record = asRecord(response.data);
|
|
769
|
+
// V2 的 Web 路由可能给未知路径返回 200 HTML,不能把它误识别为 V1。
|
|
770
|
+
if (record === null || (path === '/api/info' && typeof record.version !== 'string'))
|
|
771
|
+
continue;
|
|
772
|
+
if (expectedPid !== undefined && record.pid !== expectedPid)
|
|
773
|
+
continue;
|
|
774
|
+
this.serverProtocols.set(url, path === '/api/info' ? 2 : 1);
|
|
775
|
+
return { url, version: typeof record.version === 'string' ? record.version : null };
|
|
776
|
+
}
|
|
777
|
+
catch { /* 服务未监听或端口不可达。 */ }
|
|
778
|
+
}
|
|
779
|
+
return null;
|
|
780
|
+
}
|
|
781
|
+
async findBinary() {
|
|
782
|
+
if (this.cachedBinary !== null)
|
|
783
|
+
return this.cachedBinary;
|
|
784
|
+
this.binaryDetection = await detectBinary({ binaries: this.binaries, spawnSync: this.runSpawnSync, allowUnknownVersion: true,
|
|
785
|
+
parseVersion: (output) => output.match(/\d+\.\d+\.\d+/u)?.[0] ?? null });
|
|
786
|
+
this.cachedBinary = this.binaryDetection.installed && this.binaryDetection.command !== null
|
|
787
|
+
? { command: this.binaryDetection.command, version: this.binaryDetection.version } : null;
|
|
788
|
+
return this.cachedBinary;
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
function parseOpenCodeModel(modelId) {
|
|
792
|
+
if (isProviderDefaultModel(modelId))
|
|
793
|
+
return null;
|
|
794
|
+
const separator = modelId.indexOf('/');
|
|
795
|
+
if (separator <= 0 || separator === modelId.length - 1)
|
|
796
|
+
return null;
|
|
797
|
+
return { providerID: modelId.slice(0, separator), modelID: modelId.slice(separator + 1) };
|
|
798
|
+
}
|
|
799
|
+
/** OpenCode `/skill` 在不同版本返回数组或 `{ skills: [...] }`,统一成公开摘要。 */
|
|
800
|
+
function parseOpenCodeSkillCatalog(status, value) {
|
|
801
|
+
if (status < 200 || status >= 300)
|
|
802
|
+
return null;
|
|
803
|
+
const root = asRecord(value);
|
|
804
|
+
const rawSkills = Array.isArray(value) ? value : Array.isArray(root?.skills) ? root.skills : null;
|
|
805
|
+
if (rawSkills === null)
|
|
806
|
+
return null;
|
|
807
|
+
return rawSkills.flatMap((raw) => {
|
|
808
|
+
const skill = asRecord(raw);
|
|
809
|
+
if (skill === null || typeof skill.name !== 'string' || skill.name.trim() === '')
|
|
810
|
+
return [];
|
|
811
|
+
const name = skill.name.trim();
|
|
812
|
+
const description = typeof skill.description === 'string' ? skill.description.trim() : '';
|
|
813
|
+
if (description === '')
|
|
814
|
+
return [];
|
|
815
|
+
const enabled = skill.enabled !== false && skill.userInvocable !== false && skill.user_invocable !== false;
|
|
816
|
+
return [{
|
|
817
|
+
id: name,
|
|
818
|
+
name,
|
|
819
|
+
description,
|
|
820
|
+
enabled,
|
|
821
|
+
...(typeof skill.displayName === 'string' && skill.displayName.trim() !== '' ? { displayName: skill.displayName.trim() } : {}),
|
|
822
|
+
}];
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
function openCodeConfigPaths() {
|
|
826
|
+
const configHome = process.env.XDG_CONFIG_HOME?.trim() || join(homedir(), '.config');
|
|
827
|
+
const dataHome = process.env.XDG_DATA_HOME?.trim() || join(homedir(), '.local', 'share');
|
|
828
|
+
const configured = process.env.OPENCODE_CONFIG?.trim();
|
|
829
|
+
const directory = process.env.OPENCODE_CONFIG_DIR?.trim() || join(configHome, 'opencode');
|
|
830
|
+
return [...new Set([
|
|
831
|
+
...(configured ? [configured] : []),
|
|
832
|
+
join(directory, 'opencode.json'),
|
|
833
|
+
join(directory, 'opencode.jsonc'),
|
|
834
|
+
join(configHome, 'opencode', 'opencode.json'),
|
|
835
|
+
join(configHome, 'opencode', 'opencode.jsonc'),
|
|
836
|
+
...(process.platform === 'darwin' ? [join(homedir(), 'Library', 'Application Support', 'opencode', 'opencode.json')] : []),
|
|
837
|
+
join(dataHome, 'opencode', 'auth.json'),
|
|
838
|
+
])];
|
|
839
|
+
}
|
|
840
|
+
/** 从 OpenCode provider 配置缓存每个模型的上下文窗口。 */
|
|
841
|
+
function rememberModelContextWindows(target, value) {
|
|
842
|
+
const root = asRecord(value);
|
|
843
|
+
const rawProviders = root?.providers;
|
|
844
|
+
const providers = [];
|
|
845
|
+
if (Array.isArray(rawProviders)) {
|
|
846
|
+
for (const raw of rawProviders) {
|
|
847
|
+
const provider = asRecord(raw);
|
|
848
|
+
if (provider !== null && typeof provider.id === 'string')
|
|
849
|
+
providers.push([provider.id, provider]);
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
else {
|
|
853
|
+
const providerMap = asRecord(rawProviders) ?? root;
|
|
854
|
+
if (providerMap !== null) {
|
|
855
|
+
for (const [id, raw] of Object.entries(providerMap)) {
|
|
856
|
+
const provider = asRecord(raw);
|
|
857
|
+
if (provider !== null)
|
|
858
|
+
providers.push([id, provider]);
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
for (const [providerId, provider] of providers) {
|
|
863
|
+
const models = asRecord(provider.models);
|
|
864
|
+
if (models === null)
|
|
865
|
+
continue;
|
|
866
|
+
for (const [modelId, rawModel] of Object.entries(models)) {
|
|
867
|
+
const model = asRecord(rawModel);
|
|
868
|
+
const limit = asRecord(model?.limit);
|
|
869
|
+
const context = knownOpenCodeContextWindow(`${providerId}/${modelId}`)
|
|
870
|
+
?? limit?.context ?? model?.contextWindow ?? model?.context_window;
|
|
871
|
+
if (typeof context !== 'number' || !Number.isFinite(context) || context <= 0)
|
|
872
|
+
continue;
|
|
873
|
+
target.set(`${providerId}/${modelId}`, context);
|
|
874
|
+
target.set(modelId, context);
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
function readProviderDirectory(record) {
|
|
879
|
+
const value = record?.directory ?? record?.cwd;
|
|
880
|
+
return typeof value === 'string' && value.trim() !== '' ? value.trim() : undefined;
|
|
881
|
+
}
|
|
882
|
+
function isReasoningField(value) {
|
|
883
|
+
if (value === undefined)
|
|
884
|
+
return false;
|
|
885
|
+
const normalized = value.trim().toLowerCase();
|
|
886
|
+
return normalized === 'reasoning'
|
|
887
|
+
|| normalized === 'thinking'
|
|
888
|
+
|| normalized === 'reasoning_content'
|
|
889
|
+
|| normalized === 'reasoning_details';
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* 取一个操作系统分配的空闲端口。只做监听探测后立即释放,存在极小的被抢占
|
|
893
|
+
* 窗口;调用方在子进程未监听就退出时会换端口重试。
|
|
894
|
+
*/
|
|
895
|
+
async function findAvailablePort() {
|
|
896
|
+
const probe = createServer();
|
|
897
|
+
try {
|
|
898
|
+
await new Promise((resolve, reject) => {
|
|
899
|
+
probe.once('error', reject);
|
|
900
|
+
probe.listen(0, '127.0.0.1', () => resolve());
|
|
901
|
+
});
|
|
902
|
+
const address = probe.address();
|
|
903
|
+
return typeof address === 'object' && address !== null ? address.port : 0;
|
|
904
|
+
}
|
|
905
|
+
finally {
|
|
906
|
+
await new Promise((resolve) => probe.close(() => resolve()));
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
function withOpenCodeDirectory(server, pathname, cwd) {
|
|
910
|
+
const url = new URL(pathname, `${server.replace(/\/$/u, '')}/`);
|
|
911
|
+
if (cwd?.trim())
|
|
912
|
+
url.searchParams.set('directory', cwd.trim());
|
|
913
|
+
return url.toString();
|
|
914
|
+
}
|
|
915
|
+
function parseEvent(event) {
|
|
916
|
+
try {
|
|
917
|
+
const value = JSON.parse(event.data);
|
|
918
|
+
const record = asRecord(value);
|
|
919
|
+
if (record === null)
|
|
920
|
+
return null;
|
|
921
|
+
return event.event === null || typeof record.type === 'string' ? record : { ...record, type: event.event };
|
|
922
|
+
}
|
|
923
|
+
catch {
|
|
924
|
+
return null;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
function eventToChunk(event, cumulative, assistantMessageIds, partTypes, contextWindow) {
|
|
928
|
+
const type = typeof event.type === 'string' ? event.type : '';
|
|
929
|
+
const properties = asRecord(event.properties);
|
|
930
|
+
const part = asRecord(event.part) ?? asRecord(properties?.part) ?? properties ?? event;
|
|
931
|
+
const messageId = firstToolText(part.messageID, part.messageId, properties?.messageID, properties?.messageId);
|
|
932
|
+
if (messageId !== undefined && assistantMessageIds !== undefined && !assistantMessageIds.has(messageId))
|
|
933
|
+
return null;
|
|
934
|
+
if (isQuestionEvent(type) && !isSettledInteractionEvent(type)) {
|
|
935
|
+
const requestId = firstToolText(part.id, part.requestID, part.requestId, properties?.id);
|
|
936
|
+
const questions = readAgentQuestions(part.questions ?? properties?.questions ?? part);
|
|
937
|
+
const tool = asRecord(part.tool) ?? asRecord(properties?.tool);
|
|
938
|
+
const callId = firstToolText(part.callID, part.callId, part.toolCallId, tool?.callID, tool?.callId, tool?.toolCallId, properties?.callID, properties?.callId);
|
|
939
|
+
if (requestId !== undefined && questions.length > 0)
|
|
940
|
+
return {
|
|
941
|
+
type: 'question-request',
|
|
942
|
+
requestId,
|
|
943
|
+
questions,
|
|
944
|
+
...(callId === undefined ? {} : { callId }),
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
// 旧版事件流把 V2 注册表的权限也推给客户端,字段名随版本在 permission/patterns
|
|
948
|
+
// 与 action/resources 之间变化;只有 ask 才是新请求,结算事件必须显式忽略。
|
|
949
|
+
if (type.toLowerCase().includes('permission') && !isSettledInteractionEvent(type) && part.type !== 'reply') {
|
|
950
|
+
const requestId = firstToolText(part.id, part.requestID, part.requestId, properties?.id);
|
|
951
|
+
if (requestId !== undefined) {
|
|
952
|
+
const kind = firstToolText(part.permission, part.kind, part.action, part.type) ?? 'unknown';
|
|
953
|
+
const detail = serializeToolValue(part.patterns ?? part.resources ?? part.metadata ?? part.detail);
|
|
954
|
+
return {
|
|
955
|
+
type: 'permission-request',
|
|
956
|
+
requestId,
|
|
957
|
+
kind,
|
|
958
|
+
toolName: firstToolText(part.tool, part.toolName, part.action) ?? kind,
|
|
959
|
+
...(detail === undefined ? {} : { detail }),
|
|
960
|
+
};
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
const partId = firstToolText(part.id, part.partID, properties?.partID, properties?.partId);
|
|
964
|
+
const rawPartType = typeof part.type === 'string' ? part.type : '';
|
|
965
|
+
if (partId !== undefined && rawPartType !== '')
|
|
966
|
+
partTypes?.set(partId, rawPartType.trim().toLowerCase());
|
|
967
|
+
const partType = rawPartType.trim().toLowerCase() || (partId === undefined ? '' : partTypes?.get(partId) ?? '');
|
|
968
|
+
const key = partId ?? `${type}:${partType}`;
|
|
969
|
+
// OpenCode 1.18 的 delta 把 field 放在 properties 顶层;兼容旧版的顶层 field。
|
|
970
|
+
// field 是最具体的通道声明,必须优先于 part.type,避免 reasoning 被投影成正文。
|
|
971
|
+
const field = firstToolText(part.field, properties?.field, event.field);
|
|
972
|
+
const reasoning = isReasoningField(field) || partType === 'reasoning';
|
|
973
|
+
const text = typeof part.text === 'string' ? part.text : typeof part.content === 'string' ? part.content : typeof part.delta === 'string' ? part.delta : null;
|
|
974
|
+
if (text !== null && (partType === 'text' || partType === 'reasoning' || type.includes('part'))) {
|
|
975
|
+
const eventDelta = typeof properties?.delta === 'string'
|
|
976
|
+
? properties.delta
|
|
977
|
+
: typeof event.delta === 'string' ? event.delta : undefined;
|
|
978
|
+
if (eventDelta !== undefined) {
|
|
979
|
+
if (!eventDelta)
|
|
980
|
+
return null;
|
|
981
|
+
cumulative.set(key, (cumulative.get(key) ?? 0) + eventDelta.length);
|
|
982
|
+
return reasoning
|
|
983
|
+
? { type: 'reasoning-delta', text: eventDelta, ...(messageId === undefined ? {} : { messageId }) }
|
|
984
|
+
: { type: 'text-delta', text: eventDelta, ...(messageId === undefined ? {} : { messageId }) };
|
|
985
|
+
}
|
|
986
|
+
const previous = cumulative.get(key) ?? 0;
|
|
987
|
+
const snapshotDelta = text.slice(previous);
|
|
988
|
+
cumulative.set(key, text.length);
|
|
989
|
+
if (!snapshotDelta)
|
|
990
|
+
return null;
|
|
991
|
+
return reasoning
|
|
992
|
+
? { type: 'reasoning-delta', text: snapshotDelta, ...(messageId === undefined ? {} : { messageId }) }
|
|
993
|
+
: { type: 'text-delta', text: snapshotDelta, ...(messageId === undefined ? {} : { messageId }) };
|
|
994
|
+
}
|
|
995
|
+
const toolName = firstToolText(part.tool, part.name);
|
|
996
|
+
if (partType === 'tool' && toolName !== undefined) {
|
|
997
|
+
const state = parseToolRecord(part.state) ?? part;
|
|
998
|
+
const callId = firstToolText(part.callID, part.callId, part.toolCallId, part.id);
|
|
999
|
+
const input = serializeToolValue(readOpenCodeToolInput(event, properties, part, state));
|
|
1000
|
+
const output = serializeToolValue(state.output ?? state.result);
|
|
1001
|
+
const error = serializeToolValue(state.error);
|
|
1002
|
+
const fallback = error !== undefined
|
|
1003
|
+
? 'failed'
|
|
1004
|
+
: output !== undefined
|
|
1005
|
+
? 'completed'
|
|
1006
|
+
: 'running';
|
|
1007
|
+
const agentId = firstToolText(state.agentId, state.agent_id, part.agentId, part.agent_id);
|
|
1008
|
+
const detail = serializeToolValue(state.detail ?? part.detail);
|
|
1009
|
+
return {
|
|
1010
|
+
type: 'tool-event',
|
|
1011
|
+
toolName,
|
|
1012
|
+
status: normalizeToolStatus(state.status, fallback),
|
|
1013
|
+
...(callId ? { callId } : {}),
|
|
1014
|
+
...(input !== undefined ? { input } : {}),
|
|
1015
|
+
...(output !== undefined ? { output } : {}),
|
|
1016
|
+
...(output !== undefined ? { outputMode: 'snapshot' } : {}),
|
|
1017
|
+
...(error !== undefined ? { error } : {}),
|
|
1018
|
+
...(agentId ? { agentId } : {}),
|
|
1019
|
+
...(detail !== undefined ? { detail } : {}),
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
const usage = asRecord(event.usage) ?? asRecord(part.usage) ?? readOpenCodeTokenUsage(properties, contextWindow);
|
|
1023
|
+
if (usage !== null)
|
|
1024
|
+
return usageChunk(contextWindow === undefined ? usage : { ...usage, context_window: contextWindow });
|
|
1025
|
+
return null;
|
|
1026
|
+
}
|
|
1027
|
+
/** OpenCode 将最终用量放在 message.updated.properties.info.tokens。 */
|
|
1028
|
+
function readOpenCodeTokenUsage(properties, contextWindow) {
|
|
1029
|
+
const info = asRecord(properties?.info);
|
|
1030
|
+
const tokens = asRecord(info?.tokens);
|
|
1031
|
+
if (tokens === null)
|
|
1032
|
+
return null;
|
|
1033
|
+
const cache = asRecord(tokens.cache);
|
|
1034
|
+
const model = asRecord(info?.model);
|
|
1035
|
+
const modelLimit = asRecord(model?.limit);
|
|
1036
|
+
const input = tokens.input ?? tokens.input_tokens;
|
|
1037
|
+
const cacheRead = cache?.read ?? tokens.cache_read_tokens ?? tokens.cacheReadTokens;
|
|
1038
|
+
const cacheWrite = cache?.write ?? tokens.cache_write_tokens ?? tokens.cacheWriteTokens;
|
|
1039
|
+
const embeddedContextWindow = modelLimit?.context
|
|
1040
|
+
?? model?.contextWindow
|
|
1041
|
+
?? info?.contextWindow
|
|
1042
|
+
?? tokens.contextWindow
|
|
1043
|
+
?? tokens.context_window;
|
|
1044
|
+
const contextTokens = tokens.contextTokens
|
|
1045
|
+
?? tokens.context_tokens
|
|
1046
|
+
?? (typeof input === 'number'
|
|
1047
|
+
? input + (typeof cacheRead === 'number' ? cacheRead : 0) + (typeof cacheWrite === 'number' ? cacheWrite : 0)
|
|
1048
|
+
: undefined);
|
|
1049
|
+
return {
|
|
1050
|
+
input_tokens: input,
|
|
1051
|
+
output_tokens: tokens.output ?? tokens.output_tokens,
|
|
1052
|
+
cache_read_tokens: cacheRead,
|
|
1053
|
+
cache_creation_tokens: cacheWrite,
|
|
1054
|
+
total_tokens: tokens.total ?? tokens.total_tokens ?? tokens.totalTokens,
|
|
1055
|
+
...(embeddedContextWindow === undefined && contextWindow === undefined ? {} : { context_window: embeddedContextWindow ?? contextWindow }),
|
|
1056
|
+
...(contextTokens === undefined ? {} : { context_tokens: contextTokens }),
|
|
1057
|
+
...(typeof tokens.contextUsageRatio === 'number' ? { context_usage_ratio: tokens.contextUsageRatio } : {}),
|
|
1058
|
+
};
|
|
1059
|
+
}
|
|
1060
|
+
function isFinishedEvent(event, emitted) {
|
|
1061
|
+
const type = typeof event.type === 'string' ? event.type.toLowerCase() : '';
|
|
1062
|
+
if (type.includes('error') || type.includes('completed') || type.includes('done'))
|
|
1063
|
+
return true;
|
|
1064
|
+
const properties = asRecord(event.properties);
|
|
1065
|
+
const rawStatus = event.status ?? properties?.status;
|
|
1066
|
+
const statusRecord = asRecord(rawStatus);
|
|
1067
|
+
const status = typeof rawStatus === 'string' ? rawStatus.toLowerCase() : typeof statusRecord?.type === 'string' ? statusRecord.type.toLowerCase() : '';
|
|
1068
|
+
return status === 'idle' || status === 'completed' || status === 'success';
|
|
1069
|
+
}
|
|
1070
|
+
function responseChunks(value, cumulative, partTypes, contextWindow) {
|
|
1071
|
+
const record = asRecord(value);
|
|
1072
|
+
if (record === null)
|
|
1073
|
+
return [];
|
|
1074
|
+
const chunk = eventToChunk(record, cumulative, undefined, partTypes, contextWindow);
|
|
1075
|
+
return chunk === null ? [] : [chunk];
|
|
1076
|
+
}
|
|
1077
|
+
function readMessageRole(event) {
|
|
1078
|
+
if (event.type !== 'message.updated')
|
|
1079
|
+
return null;
|
|
1080
|
+
const properties = asRecord(event.properties);
|
|
1081
|
+
const info = asRecord(properties?.info) ?? properties;
|
|
1082
|
+
if (info === null)
|
|
1083
|
+
return null;
|
|
1084
|
+
const messageId = firstToolText(info.id, info.messageID, info.messageId);
|
|
1085
|
+
if (messageId === undefined || (info?.role !== 'assistant' && info?.role !== 'user'))
|
|
1086
|
+
return null;
|
|
1087
|
+
return { id: messageId, role: info.role };
|
|
1088
|
+
}
|
|
1089
|
+
function eventMessageId(event) {
|
|
1090
|
+
const properties = asRecord(event.properties);
|
|
1091
|
+
const part = asRecord(event.part) ?? asRecord(properties?.part);
|
|
1092
|
+
return firstToolText(part?.messageID, part?.messageId, properties?.messageID, properties?.messageId);
|
|
1093
|
+
}
|
|
1094
|
+
/** 判断尚未关联到 role 的 SSE 是否已经明确是工具 part。 */
|
|
1095
|
+
function isOpenCodeToolEvent(event) {
|
|
1096
|
+
const properties = asRecord(event.properties);
|
|
1097
|
+
const part = asRecord(event.part) ?? asRecord(properties?.part) ?? properties;
|
|
1098
|
+
if (part === null)
|
|
1099
|
+
return false;
|
|
1100
|
+
const type = typeof part.type === 'string' ? part.type.trim().toLowerCase() : '';
|
|
1101
|
+
return type === 'tool' || typeof part.tool === 'string' || part.callID !== undefined || part.toolCallId !== undefined;
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* OpenCode 不同版本把工具参数放在不同层级:稳定格式是 state.input,
|
|
1105
|
+
* 旧版/代理层还会放到 part.input、arguments 或 metadata.input。优先取
|
|
1106
|
+
* 非空值,避免先到达的空快照把真正参数覆盖成 `{}`。
|
|
1107
|
+
*/
|
|
1108
|
+
function readOpenCodeToolInput(event, properties, part, state) {
|
|
1109
|
+
const stateMetadata = asRecord(state.metadata);
|
|
1110
|
+
const stateData = asRecord(state.data);
|
|
1111
|
+
const partMetadata = asRecord(part.metadata);
|
|
1112
|
+
const partData = asRecord(part.data);
|
|
1113
|
+
const toolCall = asRecord(part.toolCall) ?? asRecord(part.tool_call) ?? asRecord(part.call);
|
|
1114
|
+
const values = [
|
|
1115
|
+
state.input, state.arguments, state.args, state.parameters,
|
|
1116
|
+
state.raw,
|
|
1117
|
+
stateMetadata?.input, stateMetadata?.arguments, stateMetadata?.args,
|
|
1118
|
+
stateData?.input, stateData?.arguments, stateData?.args,
|
|
1119
|
+
part.input, part.arguments, part.args, part.parameters,
|
|
1120
|
+
part.raw,
|
|
1121
|
+
partMetadata?.input, partMetadata?.arguments, partMetadata?.args,
|
|
1122
|
+
partData?.input, partData?.arguments, partData?.args,
|
|
1123
|
+
toolCall?.input, toolCall?.arguments, toolCall?.args, toolCall?.parameters, toolCall?.raw,
|
|
1124
|
+
properties?.input, properties?.arguments, properties?.args,
|
|
1125
|
+
event.input, event.arguments, event.args,
|
|
1126
|
+
];
|
|
1127
|
+
let fallback;
|
|
1128
|
+
for (const value of values) {
|
|
1129
|
+
if (value === undefined || value === null)
|
|
1130
|
+
continue;
|
|
1131
|
+
if (fallback === undefined)
|
|
1132
|
+
fallback = value;
|
|
1133
|
+
if (!isEmptyToolValue(value))
|
|
1134
|
+
return value;
|
|
1135
|
+
}
|
|
1136
|
+
return fallback;
|
|
1137
|
+
}
|
|
1138
|
+
function isEmptyToolValue(value) {
|
|
1139
|
+
if (typeof value === 'string')
|
|
1140
|
+
return value.trim() === '' || value.trim() === '{}';
|
|
1141
|
+
return isRecord(value) && Object.keys(value).length === 0;
|
|
1142
|
+
}
|
|
1143
|
+
function eventSessionId(event) {
|
|
1144
|
+
const properties = asRecord(event.properties);
|
|
1145
|
+
const info = asRecord(properties?.info);
|
|
1146
|
+
const part = asRecord(event.part) ?? asRecord(properties?.part);
|
|
1147
|
+
return firstToolText(event.sessionID, event.sessionId, properties?.sessionID, properties?.sessionId, info?.sessionID, info?.sessionId, part?.sessionID, part?.sessionId);
|
|
1148
|
+
}
|
|
1149
|
+
function openCodeErrorDetail(value) {
|
|
1150
|
+
const record = asRecord(value);
|
|
1151
|
+
const detail = record === null ? undefined : [record.message, record.error, record.detail, record.reason]
|
|
1152
|
+
.find((item) => typeof item === 'string' && item.trim() !== '');
|
|
1153
|
+
if (detail !== undefined)
|
|
1154
|
+
return detail.trim().slice(0, 16_384);
|
|
1155
|
+
if (typeof value === 'string' && value.trim() !== '')
|
|
1156
|
+
return value.trim().slice(0, 16_384);
|
|
1157
|
+
return 'Provider 未返回具体错误信息';
|
|
1158
|
+
}
|
|
1159
|
+
/** 交互事件的结算态。ask 之外的状态都不是新请求,绝不能再回复一次。 */
|
|
1160
|
+
const SETTLED_INTERACTION_PHASES = new Set([
|
|
1161
|
+
'replied', 'rejected', 'resolved', 'cancelled', 'canceled', 'deleted', 'removed', 'expired',
|
|
1162
|
+
]);
|
|
1163
|
+
/**
|
|
1164
|
+
* 识别 `permission.replied`、`permission.v2.replied`、`question.rejected` 之类的结算事件。
|
|
1165
|
+
* OpenCode 1.x 的权限事件在结算后会补发 `permission.replied`(properties 只有
|
|
1166
|
+
* sessionID/requestID/reply),把它当成新请求会导致对已结算的 requestID 重复回复。
|
|
1167
|
+
*/
|
|
1168
|
+
function isSettledInteractionEvent(type) {
|
|
1169
|
+
const normalized = type
|
|
1170
|
+
.replace(/([a-z0-9])([A-Z])/gu, '$1_$2')
|
|
1171
|
+
.toLowerCase()
|
|
1172
|
+
.replace(/[./-]+/gu, '_')
|
|
1173
|
+
.replace(/_\d+$/u, '');
|
|
1174
|
+
const phase = /^(?:permission|question)(?:_v\d+)?_([a-z]+)$/u.exec(normalized)?.[1];
|
|
1175
|
+
return phase !== undefined && SETTLED_INTERACTION_PHASES.has(phase);
|
|
1176
|
+
}
|
|
1177
|
+
function isHttpSuccess(status) {
|
|
1178
|
+
return status >= 200 && status < 300;
|
|
1179
|
+
}
|
|
1180
|
+
/** 旧版路由对「不在自己注册表里」的 requestID 返回 PermissionNotFoundError/QuestionNotFoundError。 */
|
|
1181
|
+
function isInteractionNotFound(data, text = '') {
|
|
1182
|
+
const serialized = typeof data === 'string' ? data : openCodeErrorDetail(data);
|
|
1183
|
+
return /PermissionNotFoundError|QuestionNotFoundError|Permission request not found|Question request not found/iu
|
|
1184
|
+
.test(`${serialized}\n${text}`);
|
|
1185
|
+
}
|
|
1186
|
+
function parseModelCatalog(value) {
|
|
1187
|
+
const root = asRecord(value);
|
|
1188
|
+
if (Array.isArray(root?.providers)) {
|
|
1189
|
+
const groups = root.providers.flatMap((rawProvider) => {
|
|
1190
|
+
const provider = asRecord(rawProvider);
|
|
1191
|
+
if (provider === null)
|
|
1192
|
+
return [];
|
|
1193
|
+
const providerId = typeof provider.id === 'string' ? provider.id : null;
|
|
1194
|
+
if (!providerId)
|
|
1195
|
+
return [];
|
|
1196
|
+
const models = asRecord(provider.models);
|
|
1197
|
+
if (models === null)
|
|
1198
|
+
return [];
|
|
1199
|
+
const items = Object.entries(models).map(([id, model]) => {
|
|
1200
|
+
const info = asRecord(model);
|
|
1201
|
+
return {
|
|
1202
|
+
id: `${providerId}/${id}`,
|
|
1203
|
+
name: typeof info?.name === 'string' ? info.name : id,
|
|
1204
|
+
...(typeof info?.description === 'string' ? { description: info.description } : {}),
|
|
1205
|
+
efforts: parseOpenCodeEfforts(info, `${providerId}/${id}`),
|
|
1206
|
+
};
|
|
1207
|
+
});
|
|
1208
|
+
return items.length > 0 ? [{ id: providerId, name: typeof provider.name === 'string' ? provider.name : providerId, models: items }] : [];
|
|
1209
|
+
});
|
|
1210
|
+
return { groups, currentModel: null, currentEffort: null };
|
|
1211
|
+
}
|
|
1212
|
+
const providers = asRecord(root?.providers) ?? root;
|
|
1213
|
+
const groups = [];
|
|
1214
|
+
if (providers !== null)
|
|
1215
|
+
for (const [providerId, raw] of Object.entries(providers)) {
|
|
1216
|
+
const provider = asRecord(raw);
|
|
1217
|
+
const models = asRecord(provider?.models) ?? (Array.isArray(raw) ? Object.fromEntries(raw.map((item) => [String(item), {}])) : null);
|
|
1218
|
+
if (models === null)
|
|
1219
|
+
continue;
|
|
1220
|
+
const items = Object.entries(models).map(([id, model]) => {
|
|
1221
|
+
const info = asRecord(model);
|
|
1222
|
+
return {
|
|
1223
|
+
id: `${providerId}/${id}`,
|
|
1224
|
+
name: typeof info?.name === 'string' ? info.name : id,
|
|
1225
|
+
...(typeof info?.description === 'string' ? { description: info.description } : {}),
|
|
1226
|
+
efforts: parseOpenCodeEfforts(info, `${providerId}/${id}`),
|
|
1227
|
+
};
|
|
1228
|
+
});
|
|
1229
|
+
if (items.length > 0)
|
|
1230
|
+
groups.push({ id: providerId, name: providerId, models: items });
|
|
1231
|
+
}
|
|
1232
|
+
return { groups, currentModel: null, currentEffort: null };
|
|
1233
|
+
}
|
|
1234
|
+
function parseOpenCodeEfforts(value, modelId) {
|
|
1235
|
+
if (value === null)
|
|
1236
|
+
return [];
|
|
1237
|
+
const variants = Array.isArray(value.variants)
|
|
1238
|
+
? value.variants
|
|
1239
|
+
: asRecord(value.variants) !== null ? Object.keys(value.variants) : [];
|
|
1240
|
+
const allowed = new Set(['off', 'none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'ultra']);
|
|
1241
|
+
const parsed = [...new Set(variants.flatMap((variant) => {
|
|
1242
|
+
const variantRecord = asRecord(variant);
|
|
1243
|
+
const raw = typeof variant === 'string' ? variant : variantRecord !== null ? variantRecord.id ?? variantRecord.value ?? variantRecord.name : null;
|
|
1244
|
+
if (typeof raw !== 'string')
|
|
1245
|
+
return [];
|
|
1246
|
+
const normalized = raw.trim().toLowerCase();
|
|
1247
|
+
return allowed.has(normalized) ? [normalized === 'none' ? 'off' : normalized] : [];
|
|
1248
|
+
}))];
|
|
1249
|
+
if (parsed.length > 0 || modelId === undefined)
|
|
1250
|
+
return parsed;
|
|
1251
|
+
const modelName = modelId.trim().toLowerCase().split('/').pop() ?? '';
|
|
1252
|
+
return KNOWN_OPENCODE_EFFORTS.get(modelName) ?? [];
|
|
1253
|
+
}
|
|
1254
|
+
function asRecord(value) { return typeof value === 'object' && value !== null && !Array.isArray(value) ? value : null; }
|
|
1255
|
+
function isRecord(value) { return asRecord(value) !== null; }
|
|
1256
|
+
function parseToolRecord(value) {
|
|
1257
|
+
const record = asRecord(value);
|
|
1258
|
+
if (record !== null)
|
|
1259
|
+
return record;
|
|
1260
|
+
if (typeof value !== 'string' || value.trim() === '')
|
|
1261
|
+
return null;
|
|
1262
|
+
try {
|
|
1263
|
+
return asRecord(JSON.parse(value));
|
|
1264
|
+
}
|
|
1265
|
+
catch {
|
|
1266
|
+
return null;
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
function emptyCatalog() { return { groups: [], currentModel: null, currentEffort: null }; }
|
|
1270
|
+
//# sourceMappingURL=opencode-driver.js.map
|