@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,1322 @@
|
|
|
1
|
+
import { connect, createServer } from 'node:net';
|
|
2
|
+
import { networkInterfaces } from 'node:os';
|
|
3
|
+
import { PassThrough, Transform } from 'node:stream';
|
|
4
|
+
import { createHmac, randomBytes, scryptSync, timingSafeEqual } from 'node:crypto';
|
|
5
|
+
import { homedir } from 'node:os';
|
|
6
|
+
import { mkdir, readFile, rename, writeFile } from 'node:fs/promises';
|
|
7
|
+
import { dirname, join } from 'node:path';
|
|
8
|
+
import { normalizeLanAccessDshPwaSettings, DEFAULT_LAN_ACCESS_DSH_PWA_SETTINGS } from '../shared/contracts/config.js';
|
|
9
|
+
import { PWA_ASSET_PREFIX, PWA_MANIFEST_PATH, PWA_SERVICE_WORKER_PATH } from './modules/pwa/index.js';
|
|
10
|
+
import { AgentDoorRpcError } from './rpc-table.js';
|
|
11
|
+
import { createLoginAttemptContext, LoginAttemptGuard } from './login-attempt-guard.js';
|
|
12
|
+
import { hostBrowserText, resolveAcceptLanguageLocale, resolveHostPushLocale } from './browser-text.js';
|
|
13
|
+
/**
|
|
14
|
+
* Cookie 不包含端口信息;多个 DSH 实例若共用名称,浏览器会在实例之间覆盖会话。
|
|
15
|
+
* 正式环境保留旧名称,开发环境由启动包装命令显式指定独立名称。
|
|
16
|
+
*/
|
|
17
|
+
export const DEFAULT_LOGIN_PROTECTION_COOKIE_NAME = 'dsh_agentdoor_session';
|
|
18
|
+
const LOGIN_PROTECTION_COOKIE_NAME_ENV = 'AGENT_DOOR_LOGIN_COOKIE_NAME';
|
|
19
|
+
const COOKIE_NAME_PATTERN = /^[A-Za-z0-9!#$%&'*+\-.^_`|~]+$/u;
|
|
20
|
+
export function resolveLoginProtectionCookieName(configured = process.env[LOGIN_PROTECTION_COOKIE_NAME_ENV]) {
|
|
21
|
+
const value = configured?.trim();
|
|
22
|
+
return value !== undefined && value !== '' && value.length <= 128 && COOKIE_NAME_PATTERN.test(value)
|
|
23
|
+
? value
|
|
24
|
+
: DEFAULT_LOGIN_PROTECTION_COOKIE_NAME;
|
|
25
|
+
}
|
|
26
|
+
/** 浏览器中继只携带短期签名票据,密码哈希和签名密钥始终留在 Host。 */
|
|
27
|
+
export async function openLoginProtectionSession(store, username, password, scope) {
|
|
28
|
+
const config = await store.read();
|
|
29
|
+
if (config === null || !config.enabled || !config.scopes[scope])
|
|
30
|
+
return { token: '', expiresAt: new Date().toISOString() };
|
|
31
|
+
if (username !== config.username || !verifyPassword(password, config))
|
|
32
|
+
throw new AgentDoorRpcError('AGENT_DOOR_RPC_UNAUTHENTICATED', '本地用户名或密码错误');
|
|
33
|
+
return issueLoginProtectionSession(config, scope);
|
|
34
|
+
}
|
|
35
|
+
/** 在旧票据仍有效时滚动续签;过期票据不能借此恢复登录。 */
|
|
36
|
+
export async function refreshLoginProtectionSession(store, token, scope) {
|
|
37
|
+
const config = await store.read();
|
|
38
|
+
if (config === null || !config.enabled || !config.scopes[scope] || typeof token !== 'string' || !verifySignedSessionToken(token, config, scope)) {
|
|
39
|
+
throw new AgentDoorRpcError('AGENT_DOOR_RPC_UNAUTHENTICATED', '登录保护会话已失效,请重新登录');
|
|
40
|
+
}
|
|
41
|
+
return issueLoginProtectionSession(config, scope);
|
|
42
|
+
}
|
|
43
|
+
/** 校验中继票据;配置关闭或未覆盖该范围时保持向后兼容,直接放行。 */
|
|
44
|
+
export async function verifyLoginProtectionSession(store, token, scope) {
|
|
45
|
+
const config = await store.read();
|
|
46
|
+
if (config === null || !config.enabled || !config.scopes[scope])
|
|
47
|
+
return true;
|
|
48
|
+
return typeof token === 'string' && verifySignedSessionToken(token, config, scope);
|
|
49
|
+
}
|
|
50
|
+
/** 测试和嵌入式宿主使用的内存凭据存储。 */
|
|
51
|
+
export class InMemoryLanAccessDshLoginStore {
|
|
52
|
+
value = null;
|
|
53
|
+
async read() { return this.value === null ? null : { ...this.value }; }
|
|
54
|
+
async write(record) { this.value = { ...record }; }
|
|
55
|
+
async clear() { this.value = null; }
|
|
56
|
+
}
|
|
57
|
+
/** 登录保护凭据与 DshAgentDoor refresh token 分离保存,文件权限限制为当前用户。 */
|
|
58
|
+
export class FileLanAccessDshLoginStore {
|
|
59
|
+
filePath;
|
|
60
|
+
constructor(filePath = join(defaultStateDir(), 'lan-access-login.json')) {
|
|
61
|
+
this.filePath = filePath;
|
|
62
|
+
}
|
|
63
|
+
async read() {
|
|
64
|
+
try {
|
|
65
|
+
return parseLoginRecord(JSON.parse(await readFile(this.filePath, 'utf8')));
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
if (isNodeError(error, 'ENOENT'))
|
|
69
|
+
return null;
|
|
70
|
+
throw error;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
async write(record) {
|
|
74
|
+
await mkdir(dirname(this.filePath), { recursive: true, mode: 0o700 });
|
|
75
|
+
const temp = `${this.filePath}.${process.pid}.tmp`;
|
|
76
|
+
await writeFile(temp, `${JSON.stringify(record)}\n`, { encoding: 'utf8', mode: 0o600 });
|
|
77
|
+
await rename(temp, this.filePath);
|
|
78
|
+
}
|
|
79
|
+
async clear() {
|
|
80
|
+
try {
|
|
81
|
+
await (await import('node:fs/promises')).unlink(this.filePath);
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
if (!isNodeError(error, 'ENOENT'))
|
|
85
|
+
throw error;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function defaultStateDir() {
|
|
90
|
+
const configured = process.env.AGENT_DOOR_STATE_DIR?.trim();
|
|
91
|
+
return configured === undefined || configured === '' ? join(homedir(), '.config', 'dsh-agentdoor') : configured;
|
|
92
|
+
}
|
|
93
|
+
const LISTEN_HOSTS = new Set(['127.0.0.1', '0.0.0.0', '::1', '::']);
|
|
94
|
+
/** Host 侧默认运行时:枚举网卡、读取 DSH 启动参数并建立 TCP 转发。 */
|
|
95
|
+
export function createNodeLanAccessDshRuntime(dshWebPort) {
|
|
96
|
+
return {
|
|
97
|
+
listListenHosts: () => {
|
|
98
|
+
const addresses = new Set(['0.0.0.0', '127.0.0.1']);
|
|
99
|
+
for (const entries of Object.values(networkInterfaces())) {
|
|
100
|
+
for (const entry of entries ?? []) {
|
|
101
|
+
if (entry.address !== '127.0.0.1' && entry.address !== '::1')
|
|
102
|
+
addresses.add(entry.address);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return [...addresses];
|
|
106
|
+
},
|
|
107
|
+
detectDshPorts: async () => detectDshPortsFromRuntime(dshWebPort),
|
|
108
|
+
listen: (config, onConnection) => new Promise((resolve, reject) => {
|
|
109
|
+
const server = createServer((socket) => onConnection(socket));
|
|
110
|
+
const onError = (error) => {
|
|
111
|
+
server.removeListener('error', onError);
|
|
112
|
+
reject(error);
|
|
113
|
+
};
|
|
114
|
+
server.once('error', onError);
|
|
115
|
+
server.listen({ port: config.listenPort, host: config.listenHost }, () => {
|
|
116
|
+
server.removeListener('error', onError);
|
|
117
|
+
const address = server.address();
|
|
118
|
+
if (address === null || typeof address === 'string') {
|
|
119
|
+
reject(new Error('局域网访问 DSH 监听器未返回有效端口'));
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
resolve({
|
|
123
|
+
actualPort: address.port,
|
|
124
|
+
close: () => new Promise((resolveClose, rejectClose) => {
|
|
125
|
+
server.close((error) => error ? rejectClose(error) : resolveClose());
|
|
126
|
+
}),
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}),
|
|
130
|
+
connect: (dshPort, onConnect, onError) => {
|
|
131
|
+
const socket = connect({ port: dshPort, host: '127.0.0.1' });
|
|
132
|
+
socket.once('connect', () => onConnect(socket));
|
|
133
|
+
socket.once('error', (error) => onError(error instanceof Error ? error : new Error(String(error))));
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/** 管理唯一一条“监听地址/端口 -> 当前 DSH Web 端口”的映射。 */
|
|
138
|
+
export class LanAccessDshProxy {
|
|
139
|
+
runtime;
|
|
140
|
+
authenticatedUrl;
|
|
141
|
+
active = null;
|
|
142
|
+
detectedDshPorts = [];
|
|
143
|
+
loginConfig = null;
|
|
144
|
+
/** 当前进程内主动退出的会话;正常会话由签名令牌承载,可跨代理重建复用。 */
|
|
145
|
+
revokedSessions = new Set();
|
|
146
|
+
loginAttempts = new LoginAttemptGuard();
|
|
147
|
+
upstreamCookie = null;
|
|
148
|
+
pwaProvider = null;
|
|
149
|
+
constructor(runtime = createNodeLanAccessDshRuntime(), authenticatedUrl, sessionCookieName = resolveLoginProtectionCookieName()) {
|
|
150
|
+
this.runtime = runtime;
|
|
151
|
+
this.authenticatedUrl = authenticatedUrl;
|
|
152
|
+
this.sessionCookieName = resolveLoginProtectionCookieName(sessionCookieName);
|
|
153
|
+
}
|
|
154
|
+
sessionCookieName;
|
|
155
|
+
listenHosts() {
|
|
156
|
+
return this.runtime.listListenHosts();
|
|
157
|
+
}
|
|
158
|
+
async detect() {
|
|
159
|
+
this.detectedDshPorts = uniquePorts(await this.runtime.detectDshPorts());
|
|
160
|
+
return this.detectedDshPorts;
|
|
161
|
+
}
|
|
162
|
+
async start(input) {
|
|
163
|
+
const dshPort = resolveLanAccessDshStartPort(input.dshPort, await this.detect());
|
|
164
|
+
const config = normalizeLanAccessDshConfig({
|
|
165
|
+
listenHost: input.listenHost ?? '0.0.0.0',
|
|
166
|
+
listenPort: input.listenPort ?? 13080,
|
|
167
|
+
dshPort,
|
|
168
|
+
...(input.login === undefined
|
|
169
|
+
? (this.loginConfig === null ? {} : { login: this.loginConfig })
|
|
170
|
+
: { login: normalizeLoginConfig(input.login) }),
|
|
171
|
+
}, this.listenHosts());
|
|
172
|
+
this.setLoginConfig(config.login ?? null);
|
|
173
|
+
if (this.active)
|
|
174
|
+
await this.stop();
|
|
175
|
+
const active = {
|
|
176
|
+
config,
|
|
177
|
+
actualListenPort: 0,
|
|
178
|
+
close: async () => undefined,
|
|
179
|
+
sockets: new Set(),
|
|
180
|
+
state: 'starting',
|
|
181
|
+
error: null,
|
|
182
|
+
};
|
|
183
|
+
this.active = active;
|
|
184
|
+
try {
|
|
185
|
+
const listener = await this.runtime.listen(config, (socket) => this.accept(active, socket));
|
|
186
|
+
active.actualListenPort = listener.actualPort;
|
|
187
|
+
active.close = listener.close;
|
|
188
|
+
active.state = 'listening';
|
|
189
|
+
try {
|
|
190
|
+
await this.takeOverDshWebToken();
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
// Do not leave a listener that can serve a page but cannot authenticate its API requests.
|
|
194
|
+
active.error = error instanceof Error ? error.message : String(error);
|
|
195
|
+
this.active = null;
|
|
196
|
+
active.state = 'error';
|
|
197
|
+
await active.close();
|
|
198
|
+
throw error;
|
|
199
|
+
}
|
|
200
|
+
return this.snapshot(active);
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
this.active = null;
|
|
204
|
+
active.state = 'error';
|
|
205
|
+
active.error = error instanceof Error ? error.message : String(error);
|
|
206
|
+
throw error;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
async stop() {
|
|
210
|
+
const active = this.active;
|
|
211
|
+
if (!active)
|
|
212
|
+
return;
|
|
213
|
+
this.active = null;
|
|
214
|
+
active.state = 'stopped';
|
|
215
|
+
for (const socket of active.sockets)
|
|
216
|
+
socket.destroy();
|
|
217
|
+
active.sockets.clear();
|
|
218
|
+
this.revokedSessions.clear();
|
|
219
|
+
this.loginAttempts.reset();
|
|
220
|
+
await active.close();
|
|
221
|
+
}
|
|
222
|
+
async close() {
|
|
223
|
+
await this.stop();
|
|
224
|
+
}
|
|
225
|
+
get() {
|
|
226
|
+
return this.active ? this.snapshot(this.active) : null;
|
|
227
|
+
}
|
|
228
|
+
setLoginConfig(config) {
|
|
229
|
+
this.loginConfig = config === null ? null : normalizeLoginConfig(config);
|
|
230
|
+
this.loginAttempts.reset();
|
|
231
|
+
if (config === null || !config.enabled)
|
|
232
|
+
this.revokedSessions.clear();
|
|
233
|
+
}
|
|
234
|
+
/** 注入 PWA 资产来源;传 null 表示回到“不提供 PWA 资产”的原始行为。 */
|
|
235
|
+
setPwaProvider(provider) {
|
|
236
|
+
this.pwaProvider = provider;
|
|
237
|
+
}
|
|
238
|
+
/** PWA 资产就绪状态;只描述代理侧能力,不含浏览器状态与凭据。 */
|
|
239
|
+
pwaStatus() {
|
|
240
|
+
const bundle = this.pwaProvider?.snapshot() ?? null;
|
|
241
|
+
return {
|
|
242
|
+
listening: this.active?.state === 'listening',
|
|
243
|
+
manifest: bundle !== null,
|
|
244
|
+
serviceWorker: bundle?.serviceWorker !== null && bundle?.serviceWorker !== undefined,
|
|
245
|
+
marker: bundle?.marker ?? null,
|
|
246
|
+
assetPaths: bundle === null ? [] : [...bundle.assets.keys()],
|
|
247
|
+
paths: { manifest: PWA_MANIFEST_PATH, serviceWorker: PWA_SERVICE_WORKER_PATH },
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
loginSettings() {
|
|
251
|
+
const config = this.loginConfig;
|
|
252
|
+
return {
|
|
253
|
+
enabled: config?.enabled === true,
|
|
254
|
+
username: config?.username ?? '',
|
|
255
|
+
passwordConfigured: config !== null && config.passwordHash.length > 0,
|
|
256
|
+
timeoutSeconds: config?.timeoutSeconds ?? 1800,
|
|
257
|
+
scopes: config?.scopes ?? defaultLoginScopes(),
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
accept(active, localSocket) {
|
|
261
|
+
if (active.state !== 'listening') {
|
|
262
|
+
localSocket.destroy();
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
active.sockets.add(localSocket);
|
|
266
|
+
const removeLocal = () => { active.sockets.delete(localSocket); };
|
|
267
|
+
localSocket.once('close', removeLocal);
|
|
268
|
+
localSocket.once('error', removeLocal);
|
|
269
|
+
if (typeof localSocket.on !== 'function') {
|
|
270
|
+
this.runtime.connect(active.config.dshPort, (dshSocket) => {
|
|
271
|
+
if (active.state !== 'listening') {
|
|
272
|
+
dshSocket.destroy();
|
|
273
|
+
localSocket.destroy();
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
active.sockets.add(dshSocket);
|
|
277
|
+
dshSocket.once('close', () => active.sockets.delete(dshSocket));
|
|
278
|
+
localSocket.pipe(dshSocket);
|
|
279
|
+
dshSocket.pipe(localSocket);
|
|
280
|
+
}, (error) => localSocket.destroy(error));
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
const localAddress = isLoopbackSocket(localSocket);
|
|
284
|
+
const upstream = new PassThrough();
|
|
285
|
+
const authTransform = new LanAccessDshAuthTransform(localSocket, (request) => this.authorize(request, localAddress, localSocket), () => this.runtime.connect(active.config.dshPort, (dshSocket) => {
|
|
286
|
+
if (active.state !== 'listening') {
|
|
287
|
+
dshSocket.destroy();
|
|
288
|
+
localSocket.destroy();
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
active.sockets.add(dshSocket);
|
|
292
|
+
const removeDsh = () => { active.sockets.delete(dshSocket); };
|
|
293
|
+
dshSocket.once('close', removeDsh);
|
|
294
|
+
dshSocket.once('error', removeDsh);
|
|
295
|
+
const requestTransform = new LanAccessDshRequestTransform(`127.0.0.1:${active.config.dshPort}`, this.upstreamCookie);
|
|
296
|
+
upstream.pipe(requestTransform);
|
|
297
|
+
requestTransform.pipe(dshSocket);
|
|
298
|
+
dshSocket.pipe(localSocket);
|
|
299
|
+
}, (error) => localSocket.destroy(error)));
|
|
300
|
+
localSocket.pipe(authTransform);
|
|
301
|
+
authTransform.pipe(upstream);
|
|
302
|
+
}
|
|
303
|
+
snapshot(active) {
|
|
304
|
+
const { login: _login, ...publicConfig } = active.config;
|
|
305
|
+
return {
|
|
306
|
+
...publicConfig,
|
|
307
|
+
state: active.state,
|
|
308
|
+
actualListenPort: active.actualListenPort || null,
|
|
309
|
+
detectedDshPorts: this.detectedDshPorts,
|
|
310
|
+
error: active.error,
|
|
311
|
+
loginEnabled: this.loginConfig?.enabled === true,
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
authorize(request, localAddress, localSocket) {
|
|
315
|
+
const config = this.loginConfig;
|
|
316
|
+
// 登录页与登录错误按浏览器自己的语言渲染;DSH 只支持 zh/en,其它语言回退中文。
|
|
317
|
+
const locale = resolveAcceptLanguageLocale(request.headers['accept-language']);
|
|
318
|
+
const loginContext = createLoginAttemptContext(readRemoteAddress(localSocket), request.headers);
|
|
319
|
+
// Keep rejecting app-origin requests even after a transport configuration is removed:
|
|
320
|
+
// old app documents may still be executing in a browser after their listener closes.
|
|
321
|
+
if (isCrossOriginLanBrowserRequest(request.headers, request.method, request.path))
|
|
322
|
+
return loginResponse(403, 'Cross-origin DSH access is denied.');
|
|
323
|
+
// PWA 静态资产先于登录判定:它们只包含公开元数据,未登录时也可取;命中时
|
|
324
|
+
// 直接合成响应,不进入上游转发路径。
|
|
325
|
+
const pwaResponse = this.authorizePwa(request);
|
|
326
|
+
if (pwaResponse !== undefined)
|
|
327
|
+
return pwaResponse;
|
|
328
|
+
if (request.path === '/__agentdoor/captcha' && request.method === 'GET') {
|
|
329
|
+
const captchaId = readQueryParameter(request.query, 'id');
|
|
330
|
+
const svg = !localAddress && config !== null && config.enabled && config.scopes.lan && captchaId !== undefined
|
|
331
|
+
? this.loginAttempts.renderCaptcha(captchaId, loginContext)
|
|
332
|
+
: undefined;
|
|
333
|
+
return svg === undefined
|
|
334
|
+
? synthLanResponse({ status: 404, contentType: 'text/plain; charset=utf-8', body: 'Not Found' })
|
|
335
|
+
: synthLanResponse({ status: 200, contentType: 'image/svg+xml; charset=utf-8', body: svg });
|
|
336
|
+
}
|
|
337
|
+
if (request.path === '/__agentdoor/session' && request.method === 'GET') {
|
|
338
|
+
const token = readCookie(request.headers.cookie, this.sessionCookieName);
|
|
339
|
+
const authenticated = !localAddress && config !== null && config.enabled && config.scopes.lan
|
|
340
|
+
&& token !== undefined && !this.revokedSessions.has(token)
|
|
341
|
+
&& verifySignedSessionToken(token, config, 'lan');
|
|
342
|
+
const expiresAt = authenticated && config !== null && token !== undefined ? readLoginProtectionSessionExpiresAt(token, config, 'lan') : null;
|
|
343
|
+
return loginJsonResponse(200, authenticated
|
|
344
|
+
? { authenticated: true, username: config.username, ...(expiresAt === null ? {} : { expiresAt }) }
|
|
345
|
+
: { authenticated: false });
|
|
346
|
+
}
|
|
347
|
+
if (request.path === '/__agentdoor/session/refresh' && request.method === 'POST') {
|
|
348
|
+
const token = readCookie(request.headers.cookie, this.sessionCookieName);
|
|
349
|
+
if (localAddress || config === null || !config.enabled || !config.scopes.lan || token === undefined || this.revokedSessions.has(token) || !verifySignedSessionToken(token, config, 'lan')) {
|
|
350
|
+
return loginJsonResponse(401, { authenticated: false });
|
|
351
|
+
}
|
|
352
|
+
const session = issueLoginProtectionSession(config, 'lan');
|
|
353
|
+
this.revokedSessions.delete(session.token);
|
|
354
|
+
return loginJsonResponse(200, { authenticated: true, username: config.username, expiresAt: session.expiresAt }, {
|
|
355
|
+
'Set-Cookie': sessionCookie(this.sessionCookieName, session.token, config.timeoutSeconds),
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
if (localAddress || config === null || !config.enabled || !config.scopes.lan)
|
|
359
|
+
return 'pass';
|
|
360
|
+
if (request.path === '/__agentdoor/login' && request.method === 'POST') {
|
|
361
|
+
const form = new URLSearchParams(new TextDecoder().decode(request.body));
|
|
362
|
+
const username = form.get('username') ?? '';
|
|
363
|
+
const captchaId = form.get('captchaId') ?? undefined;
|
|
364
|
+
const captchaCode = form.get('captchaCode') ?? undefined;
|
|
365
|
+
const attempt = this.loginAttempts.beforeLogin(loginContext, {
|
|
366
|
+
...(captchaId === undefined ? {} : { captchaId }),
|
|
367
|
+
...(captchaCode === undefined ? {} : { captchaCode }),
|
|
368
|
+
});
|
|
369
|
+
if (!attempt.allowed) {
|
|
370
|
+
const challenge = this.loginAttempts.requiresCaptcha(loginContext) ? this.loginAttempts.issueCaptcha(loginContext) : undefined;
|
|
371
|
+
const message = attempt.reason === 'rate_limited'
|
|
372
|
+
? hostBrowserText(locale, 'login.rateLimited', { seconds: attempt.retryAfterSeconds })
|
|
373
|
+
: hostBrowserText(locale, 'login.badCaptcha');
|
|
374
|
+
return loginResponse(429, loginPageWithError(message, username, challenge, locale), { 'Retry-After': String(attempt.retryAfterSeconds) });
|
|
375
|
+
}
|
|
376
|
+
if (username !== config.username || !verifyPassword(form.get('password') ?? '', config)) {
|
|
377
|
+
this.loginAttempts.recordFailure(loginContext);
|
|
378
|
+
const challenge = this.loginAttempts.requiresCaptcha(loginContext) ? this.loginAttempts.issueCaptcha(loginContext) : undefined;
|
|
379
|
+
return loginResponse(401, loginPageWithError(hostBrowserText(locale, 'login.badCredentials'), username, challenge, locale));
|
|
380
|
+
}
|
|
381
|
+
this.loginAttempts.recordSuccess(loginContext);
|
|
382
|
+
const expiresAt = Date.now() + config.timeoutSeconds * 1000;
|
|
383
|
+
const payload = encodeSessionPayload({ username: config.username, scope: 'lan', expiresAt, nonce: randomBytes(16).toString('base64url') });
|
|
384
|
+
const token = `${payload}.${signSessionPayload(payload, config)}`;
|
|
385
|
+
this.revokedSessions.delete(token);
|
|
386
|
+
return loginResponse(303, '', { 'Set-Cookie': sessionCookie(this.sessionCookieName, token, config.timeoutSeconds), Location: '/' });
|
|
387
|
+
}
|
|
388
|
+
if (request.path === '/__agentdoor/logout') {
|
|
389
|
+
const token = readCookie(request.headers.cookie, this.sessionCookieName);
|
|
390
|
+
if (token !== undefined && verifySignedSessionToken(token, config, 'lan'))
|
|
391
|
+
this.revokedSessions.add(token);
|
|
392
|
+
return loginResponse(303, '', { 'Set-Cookie': clearSessionCookie(this.sessionCookieName), Location: '/' });
|
|
393
|
+
}
|
|
394
|
+
// 浏览器会在页面刷新时独立请求 Web App manifest;它只包含静态元数据,
|
|
395
|
+
// 不应因为登录保护缺少 Cookie 而产生 401 控制台噪声。
|
|
396
|
+
if (request.path === '/manifest.webmanifest' && request.method === 'GET')
|
|
397
|
+
return 'pass';
|
|
398
|
+
const token = readCookie(request.headers.cookie, this.sessionCookieName);
|
|
399
|
+
if (token !== undefined && !this.revokedSessions.has(token) && verifySignedSessionToken(token, config, 'lan')) {
|
|
400
|
+
return 'pass';
|
|
401
|
+
}
|
|
402
|
+
// 只有真正渲染登录页的 HTML 请求才签发验证码。浏览器会为 favicon、图标等
|
|
403
|
+
// 静态资源发出额外的未登录请求,如果它们也签发验证码,就会不断翻转页面上
|
|
404
|
+
// 已经渲染的 captchaId,用户永远提交不到与图片一致的答案。
|
|
405
|
+
if (request.path !== '/' && !request.path.endsWith('.html'))
|
|
406
|
+
return loginResponse(401, hostBrowserText(locale, 'login.required'));
|
|
407
|
+
const challenge = this.loginAttempts.requiresCaptcha(loginContext) ? this.loginAttempts.issueCaptcha(loginContext) : undefined;
|
|
408
|
+
return loginResponse(200, loginPage(challenge, locale));
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* PWA 白名单:`/manifest.webmanifest`、`/sw.js` 与 `/__agentdoor/pwa/*`。
|
|
412
|
+
*
|
|
413
|
+
* 返回 undefined 表示“不属于 PWA 白名单,或当前未启用”,交回原有登录与转发
|
|
414
|
+
* 语义;这样关闭增强时行为与改造前完全一致。合成内容只有公开元数据与图标,
|
|
415
|
+
* 不允许出现任何 Cookie、令牌或宿主路径。
|
|
416
|
+
*/
|
|
417
|
+
authorizePwa(request) {
|
|
418
|
+
// manifest 的 description 属于浏览器可见文案,按请求语言选择。
|
|
419
|
+
const locale = resolveAcceptLanguageLocale(request.headers['accept-language']);
|
|
420
|
+
return resolveLanAccessDshPwaResponse(request, this.pwaProvider?.snapshot(locale) ?? null);
|
|
421
|
+
}
|
|
422
|
+
/** DSH 启动时的认证 URL 只在 Host 内交换一次 Cookie,绝不下发到浏览器。 */
|
|
423
|
+
async takeOverDshWebToken() {
|
|
424
|
+
if (this.authenticatedUrl === undefined)
|
|
425
|
+
return;
|
|
426
|
+
this.upstreamCookie = null;
|
|
427
|
+
const response = await fetch(this.authenticatedUrl, { redirect: 'manual', signal: AbortSignal.timeout(5000) });
|
|
428
|
+
const cookie = getSetCookie(response.headers);
|
|
429
|
+
if (response.status !== 303 || cookie === undefined)
|
|
430
|
+
throw new Error(`DSH Web Token 接管失败 (${response.status})`);
|
|
431
|
+
this.upstreamCookie = cookie;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
/** Fetch Metadata describes the public browser origin even when ingress rewrites Host. */
|
|
435
|
+
export function isCrossOriginLanBrowserRequest(headers, method = 'GET', path = '') {
|
|
436
|
+
// Following a link to the UI is normal navigation, not an API call. Never extend
|
|
437
|
+
// this exception to frames, mutations, API routes, or WebSocket upgrades.
|
|
438
|
+
if ((method === 'GET' || method === 'HEAD') && path === '/' && !headers.upgrade
|
|
439
|
+
&& headers['sec-fetch-mode'] === 'navigate' && headers['sec-fetch-dest'] === 'document')
|
|
440
|
+
return false;
|
|
441
|
+
if (headers['sec-fetch-site'] === 'same-site' || headers['sec-fetch-site'] === 'cross-site')
|
|
442
|
+
return true;
|
|
443
|
+
// A sandboxed app must not be promoted to the privileged upstream origin.
|
|
444
|
+
if (headers.origin === 'null')
|
|
445
|
+
return true;
|
|
446
|
+
// Plain HTTP and older clients can omit Fetch Metadata. Preserve their existing
|
|
447
|
+
// login protection; Host is not a trustworthy public-origin test
|
|
448
|
+
// behind a reverse proxy. Known app origins are checked by the app transport.
|
|
449
|
+
return false;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* PWA 静态资产白名单:`/manifest.webmanifest`、`/sw.js` 与 `/__agentdoor/pwa/*`。
|
|
453
|
+
*
|
|
454
|
+
* 返回 undefined 表示“不属于白名单,或当前未启用”,交回原有登录与转发语义;
|
|
455
|
+
* 这样关闭增强时行为与改造前完全一致。合成内容只有公开元数据与图标,不允许
|
|
456
|
+
* 出现任何 Cookie、令牌或宿主路径。
|
|
457
|
+
*/
|
|
458
|
+
export function resolveLanAccessDshPwaResponse(request, bundle) {
|
|
459
|
+
const path = request.path;
|
|
460
|
+
const inWhitelist = path === PWA_MANIFEST_PATH || path === PWA_SERVICE_WORKER_PATH || path.startsWith(PWA_ASSET_PREFIX);
|
|
461
|
+
if (!inWhitelist)
|
|
462
|
+
return undefined;
|
|
463
|
+
const headOnly = request.method === 'HEAD';
|
|
464
|
+
if (request.method !== 'GET' && !headOnly) {
|
|
465
|
+
return synthLanResponse({
|
|
466
|
+
status: 405,
|
|
467
|
+
contentType: 'text/plain; charset=utf-8',
|
|
468
|
+
body: 'Method Not Allowed',
|
|
469
|
+
headers: { Allow: 'GET, HEAD' },
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
if (bundle === null) {
|
|
473
|
+
// 未启用:manifest 与 SW 保持原有语义(manifest 透传上游、/sw.js 走登录/上游),
|
|
474
|
+
// 图标路径没有上游对应物,直接 404 以免落到 SPA 兜底。
|
|
475
|
+
return path.startsWith(PWA_ASSET_PREFIX)
|
|
476
|
+
? synthLanResponse({ status: 404, contentType: 'text/plain; charset=utf-8', body: 'Not Found' })
|
|
477
|
+
: undefined;
|
|
478
|
+
}
|
|
479
|
+
if (path === PWA_MANIFEST_PATH) {
|
|
480
|
+
return synthLanResponse({
|
|
481
|
+
status: 200,
|
|
482
|
+
contentType: 'application/manifest+json; charset=utf-8',
|
|
483
|
+
body: bundle.manifest,
|
|
484
|
+
cacheControl: 'public, max-age=300',
|
|
485
|
+
headOnly,
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
if (path === PWA_SERVICE_WORKER_PATH) {
|
|
489
|
+
if (bundle.serviceWorker === null)
|
|
490
|
+
return undefined;
|
|
491
|
+
return synthLanResponse({
|
|
492
|
+
status: 200,
|
|
493
|
+
contentType: 'text/javascript; charset=utf-8',
|
|
494
|
+
body: bundle.serviceWorker,
|
|
495
|
+
// SW 脚本必须每次回源校验:插件升级后要能立刻安装新版本。
|
|
496
|
+
cacheControl: 'no-cache',
|
|
497
|
+
headOnly,
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
const asset = bundle.assets.get(path);
|
|
501
|
+
if (asset === undefined) {
|
|
502
|
+
return synthLanResponse({ status: 404, contentType: 'text/plain; charset=utf-8', body: 'Not Found' });
|
|
503
|
+
}
|
|
504
|
+
return synthLanResponse({
|
|
505
|
+
status: 200,
|
|
506
|
+
contentType: asset.contentType,
|
|
507
|
+
body: asset.body,
|
|
508
|
+
cacheControl: asset.cacheControl,
|
|
509
|
+
headOnly,
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
function isLoopbackSocket(socket) {
|
|
513
|
+
const remoteAddress = socket.remoteAddress;
|
|
514
|
+
return remoteAddress === '127.0.0.1' || remoteAddress === '::1' || remoteAddress === '::ffff:127.0.0.1';
|
|
515
|
+
}
|
|
516
|
+
function readRemoteAddress(socket) {
|
|
517
|
+
const remoteAddress = socket.remoteAddress;
|
|
518
|
+
return typeof remoteAddress === 'string' ? remoteAddress : undefined;
|
|
519
|
+
}
|
|
520
|
+
/** 在 TCP 转发前完成登录校验;未通过时直接向局域网客户端返回页面/错误。 */
|
|
521
|
+
class LanAccessDshAuthTransform extends Transform {
|
|
522
|
+
client;
|
|
523
|
+
authorize;
|
|
524
|
+
onPass;
|
|
525
|
+
pending = new Uint8Array(0);
|
|
526
|
+
handled = false;
|
|
527
|
+
constructor(client, authorize, onPass = () => undefined) {
|
|
528
|
+
super();
|
|
529
|
+
this.client = client;
|
|
530
|
+
this.authorize = authorize;
|
|
531
|
+
this.onPass = onPass;
|
|
532
|
+
}
|
|
533
|
+
_transform(chunk, _encoding, callback) {
|
|
534
|
+
if (this.handled) {
|
|
535
|
+
callback(null, chunk);
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
this.pending = concatBytes(this.pending, chunk);
|
|
539
|
+
const end = findHeaderEnd(this.pending);
|
|
540
|
+
if (end < 0) {
|
|
541
|
+
if (this.pending.length > 64 * 1024)
|
|
542
|
+
this.finish(loginResponse(431, '请求头过大'));
|
|
543
|
+
callback();
|
|
544
|
+
return;
|
|
545
|
+
}
|
|
546
|
+
const head = this.pending.subarray(0, end + 4);
|
|
547
|
+
const headers = parseHeaders(head);
|
|
548
|
+
const bodyLength = contentLengthOf(head);
|
|
549
|
+
if (this.pending.length < end + 4 + bodyLength) {
|
|
550
|
+
callback();
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
const requestLine = decodeLatin1(head).split('\r\n', 1)[0] ?? '';
|
|
554
|
+
const parts = requestLine.split(' ');
|
|
555
|
+
const target = parts[1] ?? '/';
|
|
556
|
+
const querySeparator = target.indexOf('?');
|
|
557
|
+
const path = querySeparator < 0 ? target : target.slice(0, querySeparator);
|
|
558
|
+
if (path === '/mcp' && headers['transfer-encoding'] !== undefined) {
|
|
559
|
+
this.finish(loginResponse(411, 'Content-Length required'));
|
|
560
|
+
callback();
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
const request = {
|
|
564
|
+
method: parts[0] ?? 'GET',
|
|
565
|
+
path,
|
|
566
|
+
...(querySeparator < 0 ? {} : { query: target.slice(querySeparator + 1) }),
|
|
567
|
+
headers,
|
|
568
|
+
body: this.pending.subarray(end + 4, end + 4 + bodyLength),
|
|
569
|
+
};
|
|
570
|
+
const handleDecision = (decision) => {
|
|
571
|
+
if (decision === 'pass') {
|
|
572
|
+
this.handled = true;
|
|
573
|
+
this.onPass();
|
|
574
|
+
this.push(this.pending);
|
|
575
|
+
this.pending = new Uint8Array(0);
|
|
576
|
+
}
|
|
577
|
+
else
|
|
578
|
+
this.finish(decision);
|
|
579
|
+
callback();
|
|
580
|
+
};
|
|
581
|
+
const decision = this.authorize(request);
|
|
582
|
+
if (decision instanceof Promise)
|
|
583
|
+
void decision.then(handleDecision, () => {
|
|
584
|
+
this.finish(loginResponse(502, 'MCP listener unavailable'));
|
|
585
|
+
callback();
|
|
586
|
+
});
|
|
587
|
+
else
|
|
588
|
+
handleDecision(decision);
|
|
589
|
+
}
|
|
590
|
+
_flush(callback) { callback(); }
|
|
591
|
+
finish(response) {
|
|
592
|
+
if (this.handled)
|
|
593
|
+
return;
|
|
594
|
+
this.handled = true;
|
|
595
|
+
const writable = this.client;
|
|
596
|
+
// 让 Node Socket 自己 flush 完响应后关闭,不能 end 后立即 destroy,否则登录页可能被截断。
|
|
597
|
+
writable.end?.(response);
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
function parseHeaders(input) {
|
|
601
|
+
const result = {};
|
|
602
|
+
for (const line of decodeLatin1(input).split('\r\n').slice(1)) {
|
|
603
|
+
const separator = line.indexOf(':');
|
|
604
|
+
if (separator > 0)
|
|
605
|
+
result[line.slice(0, separator).trim().toLowerCase()] = line.slice(separator + 1).trim();
|
|
606
|
+
}
|
|
607
|
+
return result;
|
|
608
|
+
}
|
|
609
|
+
function readCookie(value, name) {
|
|
610
|
+
for (const item of (value ?? '').split(';')) {
|
|
611
|
+
const separator = item.indexOf('=');
|
|
612
|
+
if (separator > 0 && item.slice(0, separator).trim() === name)
|
|
613
|
+
return item.slice(separator + 1).trim();
|
|
614
|
+
}
|
|
615
|
+
return undefined;
|
|
616
|
+
}
|
|
617
|
+
function readQueryParameter(query, name) {
|
|
618
|
+
if (query === undefined)
|
|
619
|
+
return undefined;
|
|
620
|
+
try {
|
|
621
|
+
const value = new URLSearchParams(query).get(name)?.trim();
|
|
622
|
+
return value === undefined || value === '' ? undefined : value;
|
|
623
|
+
}
|
|
624
|
+
catch {
|
|
625
|
+
return undefined;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
function sessionCookie(name, token, timeoutSeconds) {
|
|
629
|
+
return `${name}=${token}; Path=/; HttpOnly; SameSite=Strict; Max-Age=${timeoutSeconds}`;
|
|
630
|
+
}
|
|
631
|
+
function issueLoginProtectionSession(config, scope) {
|
|
632
|
+
const expiresAt = Date.now() + config.timeoutSeconds * 1000;
|
|
633
|
+
const payload = encodeSessionPayload({ username: config.username, scope, expiresAt, nonce: randomBytes(16).toString('base64url') });
|
|
634
|
+
return { token: `${payload}.${signSessionPayload(payload, config)}`, expiresAt: new Date(expiresAt).toISOString() };
|
|
635
|
+
}
|
|
636
|
+
function clearSessionCookie(name) {
|
|
637
|
+
return `${name}=; Path=/; HttpOnly; SameSite=Strict; Max-Age=0`;
|
|
638
|
+
}
|
|
639
|
+
function getSetCookie(headers) {
|
|
640
|
+
const extended = headers;
|
|
641
|
+
const values = extended.getSetCookie?.() ?? (headers.get('set-cookie') === null ? [] : [headers.get('set-cookie')]);
|
|
642
|
+
return values.map((value) => value.split(';', 1)[0]).find((value) => value !== '');
|
|
643
|
+
}
|
|
644
|
+
export function synthLanResponse(input) {
|
|
645
|
+
const body = typeof input.body === 'string'
|
|
646
|
+
? new TextEncoder().encode(input.body)
|
|
647
|
+
: input.body ?? new Uint8Array(0);
|
|
648
|
+
const headers = {
|
|
649
|
+
'Content-Type': input.contentType,
|
|
650
|
+
'Content-Length': String(body.length),
|
|
651
|
+
'Cache-Control': input.cacheControl ?? 'no-store',
|
|
652
|
+
'X-Content-Type-Options': 'nosniff',
|
|
653
|
+
Connection: 'close',
|
|
654
|
+
...input.headers,
|
|
655
|
+
};
|
|
656
|
+
const head = encodeLatin1(`HTTP/1.1 ${input.status} ${statusText(input.status)}\r\n${Object.entries(headers).map(([key, value]) => `${key}: ${value}`).join('\r\n')}\r\n\r\n`);
|
|
657
|
+
return input.headOnly === true ? head : concatBytes(head, body);
|
|
658
|
+
}
|
|
659
|
+
function loginResponse(status, body, extra = {}) {
|
|
660
|
+
const isHtml = body.startsWith('<!doctype html>');
|
|
661
|
+
const isJson = extra['Content-Type']?.startsWith('application/json') === true;
|
|
662
|
+
const content = new TextEncoder().encode(isHtml || isJson ? body : escapeHtml(body));
|
|
663
|
+
const headers = {
|
|
664
|
+
'Content-Type': isHtml ? 'text/html; charset=utf-8' : 'text/plain; charset=utf-8',
|
|
665
|
+
'Content-Length': String(content.length),
|
|
666
|
+
'Cache-Control': 'no-store',
|
|
667
|
+
'X-Content-Type-Options': 'nosniff',
|
|
668
|
+
'X-Frame-Options': 'DENY',
|
|
669
|
+
'Content-Security-Policy': "default-src 'none'; img-src 'self'; style-src 'unsafe-inline'; form-action 'self'; base-uri 'none'",
|
|
670
|
+
// Native form POSTs need their Origin; no-referrer turns it into null.
|
|
671
|
+
'Referrer-Policy': isHtml ? 'same-origin' : 'no-referrer',
|
|
672
|
+
Connection: 'close',
|
|
673
|
+
...extra,
|
|
674
|
+
};
|
|
675
|
+
const head = encodeLatin1(`HTTP/1.1 ${status} ${statusText(status)}\r\n${Object.entries(headers).map(([key, value]) => `${key}: ${value}`).join('\r\n')}\r\n\r\n`);
|
|
676
|
+
return concatBytes(head, content);
|
|
677
|
+
}
|
|
678
|
+
function loginJsonResponse(status, value, extra = {}) {
|
|
679
|
+
return loginResponse(status, JSON.stringify(value), { 'Content-Type': 'application/json; charset=utf-8', ...extra });
|
|
680
|
+
}
|
|
681
|
+
function loginPage(captcha, locale) {
|
|
682
|
+
const captchaFields = captcha === undefined ? '' : `<input type="hidden" name="captchaId" value="${escapeHtml(captcha.id)}"><div class="cyber-captcha" style="display:flex;flex-direction:row;align-items:center;gap:12px;width:100%;"><img src="/__agentdoor/captcha?id=${encodeURIComponent(captcha.id)}" width="140" height="52" alt="${escapeHtml(hostBrowserText(locale, 'login.captchaAlt'))}" style="display:block;flex:0 0 140px;width:140px;height:52px;border:1px solid rgba(59,130,246,.5);border-radius:7px;background:rgba(15,23,42,.68);"><input class="cyber-input" name="captchaCode" autocomplete="off" inputmode="text" maxlength="5" placeholder="${escapeHtml(hostBrowserText(locale, 'login.captchaPlaceholder'))}" required style="flex:1 1 auto;min-width:0;width:auto;height:52px;padding:12px 14px;border:1px solid rgba(59,130,246,.5);border-radius:8px;background:rgba(15,23,42,.68);box-shadow:inset 0 0 8px rgba(59,130,246,.12);color:#f1f5f9;font:14px var(--font-mono);outline:0;"></div>`;
|
|
683
|
+
// 视觉规则直接复用 dsh-agentdoor-h5/styles.css 的 Cyber 登录区,只把 Connect
|
|
684
|
+
// 账号字段替换成本地用户名/密码;不能依赖外部 CSS,避免局域网入口离线时失效。
|
|
685
|
+
// 与主页面使用相同的状态栏模式,登录前后都由系统保留顶部空间。
|
|
686
|
+
return `<!doctype html><html lang="${locale === 'zh' ? 'zh-CN' : 'en'}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><meta name="theme-color" content="#0a0f1d"><meta name="mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><link rel="apple-touch-icon" sizes="180x180" href="/__agentdoor/pwa/apple-touch-icon.png"><title>${escapeHtml(hostBrowserText(locale, 'login.documentTitle'))}</title><style>
|
|
687
|
+
:root{font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;color:#f1f5f9;background:#0a0f1d}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0}body{overflow:hidden}.cyber-login-page{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden;background:radial-gradient(ellipse at center,#0f172a 0%,#0a0f1d 100%);color:#f1f5f9}.cyber-login-page:before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(59,130,246,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(59,130,246,.08) 1px,transparent 1px);background-size:50px 50px;transform:perspective(500px) rotateX(60deg);transform-origin:center top}.cyber-login-page:after{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(0,0,0,.15) 2px,rgba(0,0,0,.15) 4px)}.cyber-login-container{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;gap:30px;width:min(440px,calc(100% - 32px));padding:calc(24px + env(safe-area-inset-top,0px)) calc(24px + env(safe-area-inset-right,0px)) calc(24px + env(safe-area-inset-bottom,0px)) calc(24px + env(safe-area-inset-left,0px))}.cyber-login-content{display:flex;flex-direction:column;align-items:center;gap:28px;width:100%}.cyber-brand{display:flex;flex-direction:column;align-items:center;gap:13px;text-align:center}.cyber-logo{display:grid;place-items:center;width:80px;height:80px;border:1px solid rgba(59,130,246,.48);border-radius:22px;color:#60a5fa;font-size:19px;font-weight:700;letter-spacing:2px;box-shadow:0 0 25px rgba(0,212,255,.35),inset 0 0 22px rgba(59,130,246,.18);transform:rotate(30deg)}.cyber-logo span{transform:rotate(-30deg)}.cyber-brand-title{margin:0;color:#f1f5f9;font-size:28px;font-weight:700;letter-spacing:4px}.cyber-brand-subtitle{margin:0;color:#94a3b8;font-size:12px;letter-spacing:1.5px}.cyber-card{width:100%;padding:30px;border:1px solid rgba(59,130,246,.28);border-radius:12px;background:rgba(30,41,59,.78);backdrop-filter:blur(10px);box-shadow:0 8px 32px rgba(0,0,0,.4),0 0 0 1px rgba(59,130,246,.28)}.cyber-card-header{display:flex;align-items:center;gap:12px;margin-bottom:22px}.cyber-line{flex:1;height:1px;background:linear-gradient(90deg,transparent,rgba(59,130,246,.48),transparent)}.cyber-card-label{color:#94a3b8;font-size:11px;font-weight:600;letter-spacing:3px;white-space:nowrap}.cyber-form{display:flex;flex-direction:column;gap:18px}.cyber-connect-hint{margin:0;color:#94a3b8;font-size:12px;line-height:1.7}.cyber-field{position:relative;padding:12px 16px;border:1px solid rgba(59,130,246,.28);border-radius:8px;background:rgba(15,23,42,.68)}.cyber-field-label{display:flex;align-items:center;gap:8px;margin-bottom:8px;color:#94a3b8;font-size:11px;letter-spacing:1px}.cyber-field-icon{color:#60a5fa}.cyber-input{width:100%;padding:0;border:0;outline:0;background:transparent;color:#f1f5f9;font:14px var(--font-mono)}.cyber-input::placeholder{color:#94a3b8;opacity:.55}.cyber-captcha{display:flex;align-items:center;gap:12px}.cyber-captcha img{display:block;flex:0 0 140px;width:140px;height:52px;border:1px solid rgba(59,130,246,.28);border-radius:7px}.cyber-captcha .cyber-input{flex:1;min-width:0;width:auto;padding:12px;border:1px solid rgba(59,130,246,.28);border-radius:8px;background:rgba(15,23,42,.68)}.cyber-submit{position:relative;width:100%;min-height:48px;margin-top:4px;padding:14px 24px;overflow:hidden;border:0;border-radius:8px;background:linear-gradient(135deg,#3b82f6,#06b6d4);color:white;font:600 13px var(--font-mono);letter-spacing:2px;cursor:pointer;box-shadow:0 0 18px rgba(59,130,246,.32)}.cyber-submit:hover{filter:brightness(1.12)}.cyber-submit:active{transform:translateY(1px)}.cyber-submit:disabled{cursor:wait;opacity:.6}.cyber-submit-text{position:relative;display:flex;align-items:center;justify-content:center;gap:8px}.cyber-status{display:flex;align-items:center;gap:8px;margin:0;padding:10px 12px;border:1px solid rgba(239,68,68,.25);border-radius:6px;background:rgba(239,68,68,.1);color:#fca5a5;font-size:12px;line-height:1.5}.cyber-footer{margin-top:2px}.cyber-divider{display:flex;align-items:center;gap:12px;margin-bottom:14px}.cyber-divider-line{flex:1;height:1px;background:linear-gradient(90deg,transparent,rgba(59,130,246,.48),transparent)}.cyber-divider-text{color:#64748b;font-size:10px;letter-spacing:2px}.cyber-version{display:flex;align-items:center;gap:12px;color:#64748b;font-size:10px;letter-spacing:2px;opacity:.65}@media(prefers-color-scheme:light){.cyber-login-page{color:#0f172a;background:radial-gradient(ellipse at center,#f8fafc 0%,#eef4fb 100%)}.cyber-card{background:rgba(255,255,255,.86);box-shadow:0 8px 28px rgba(15,23,42,.12),0 0 0 1px rgba(37,99,235,.13)}.cyber-brand-title{color:#0f172a}.cyber-input{color:#0f172a}.cyber-connect-hint,.cyber-field-label,.cyber-card-label{color:#64748b}.cyber-field{background:rgba(241,245,249,.86)}}@media(max-width:520px){.cyber-login-container{width:100%;padding:calc(20px + env(safe-area-inset-top,0px)) calc(16px + env(safe-area-inset-right,0px)) calc(20px + env(safe-area-inset-bottom,0px)) calc(16px + env(safe-area-inset-left,0px))}.cyber-card{padding:24px 20px}.cyber-brand-subtitle{font-size:10px;letter-spacing:1px}}
|
|
688
|
+
</style></head><body><main class="cyber-login-page"><div class="cyber-login-container"><div class="cyber-login-content"><div class="cyber-brand"><div class="cyber-logo"><span>DSH</span></div><h1 class="cyber-brand-title">DSH Web</h1><p class="cyber-brand-subtitle">LOCAL SECURE DSH ENVIRONMENT</p></div><div class="cyber-card"><form class="cyber-form" method="post" action="/__agentdoor/login"><div class="cyber-card-header"><div class="cyber-line"></div><span class="cyber-card-label">LOCAL ACCESS</span><div class="cyber-line"></div></div><p class="cyber-connect-hint">${escapeHtml(hostBrowserText(locale, 'login.description'))}</p><div class="cyber-field"><label class="cyber-field-label" for="login-username"><span class="cyber-field-icon" aria-hidden="true">⌁</span>${escapeHtml(hostBrowserText(locale, 'login.username'))}</label><input class="cyber-input" id="login-username" name="username" autocomplete="username" placeholder="${escapeHtml(hostBrowserText(locale, 'login.usernamePlaceholder'))}" required></div><div class="cyber-field"><label class="cyber-field-label" for="login-password"><span class="cyber-field-icon" aria-hidden="true">⚷</span>${escapeHtml(hostBrowserText(locale, 'login.password'))}</label><input class="cyber-input" id="login-password" name="password" type="password" autocomplete="current-password" placeholder="${escapeHtml(hostBrowserText(locale, 'login.passwordPlaceholder'))}" required></div>${captchaFields}<button class="cyber-submit" type="submit"><span class="cyber-submit-text"><span aria-hidden="true">➤</span>${escapeHtml(hostBrowserText(locale, 'login.submit'))}</span></button><div class="cyber-footer"><div class="cyber-divider"><span class="cyber-divider-line"></span><span class="cyber-divider-text">AGENT_DOOR</span><span class="cyber-divider-line"></span></div></div></form></div></div><div class="cyber-version"><span>AGENT_DOOR</span><span>|</span><span>LOCAL AUTH READY</span></div></div></main></body></html>`;
|
|
689
|
+
}
|
|
690
|
+
/** 登录失败时继续渲染完整登录页,避免浏览器落到无样式的纯文本错误页。 */
|
|
691
|
+
function loginPageWithError(message, username, captcha, locale) {
|
|
692
|
+
const page = loginPage(captcha, locale);
|
|
693
|
+
const status = `<p class="cyber-status" role="alert" aria-live="polite"><span aria-hidden="true">!</span>${escapeHtml(message)}</p>`;
|
|
694
|
+
return page
|
|
695
|
+
.replace('<p class="cyber-connect-hint">', `${status}<p class="cyber-connect-hint">`)
|
|
696
|
+
.replace('name="username" autocomplete="username"', `name="username" autocomplete="username" value="${escapeHtml(username)}"`);
|
|
697
|
+
}
|
|
698
|
+
function statusText(status) {
|
|
699
|
+
switch (status) {
|
|
700
|
+
case 200: return 'OK';
|
|
701
|
+
case 204: return 'No Content';
|
|
702
|
+
case 301: return 'Moved Permanently';
|
|
703
|
+
case 302: return 'Found';
|
|
704
|
+
case 303: return 'See Other';
|
|
705
|
+
case 400: return 'Bad Request';
|
|
706
|
+
case 401: return 'Unauthorized';
|
|
707
|
+
case 404: return 'Not Found';
|
|
708
|
+
case 405: return 'Method Not Allowed';
|
|
709
|
+
case 429: return 'Too Many Requests';
|
|
710
|
+
case 431: return 'Request Header Fields Too Large';
|
|
711
|
+
case 500: return 'Internal Server Error';
|
|
712
|
+
default: return 'Request Error';
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
function escapeHtml(value) { return value.replace(/[&<>"']/g, (char) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[char] ?? char); }
|
|
716
|
+
/**
|
|
717
|
+
* 将局域网入口发往上游 DSH 的 HTTP 请求头改成上游自身的 authority。
|
|
718
|
+
*
|
|
719
|
+
* 代理是单用途的:每个普通 HTTP 请求都要求上游关闭连接,避免在不知道
|
|
720
|
+
* Content-Length/分块边界时误把 keep-alive 上的第二个请求当成正文。WebSocket
|
|
721
|
+
* 升级请求则保持 Upgrade,升级后的帧不再经过头部解析。
|
|
722
|
+
*/
|
|
723
|
+
export class LanAccessDshRequestTransform extends Transform {
|
|
724
|
+
targetAuthority;
|
|
725
|
+
upstreamCookie;
|
|
726
|
+
pending = new Uint8Array(0);
|
|
727
|
+
pendingRequest = null;
|
|
728
|
+
finished = false;
|
|
729
|
+
constructor(targetAuthority, upstreamCookie = null) {
|
|
730
|
+
super();
|
|
731
|
+
this.targetAuthority = targetAuthority;
|
|
732
|
+
this.upstreamCookie = upstreamCookie;
|
|
733
|
+
}
|
|
734
|
+
_transform(chunk, _encoding, callback) {
|
|
735
|
+
if (this.finished) {
|
|
736
|
+
callback(null, chunk);
|
|
737
|
+
return;
|
|
738
|
+
}
|
|
739
|
+
this.pending = concatBytes(this.pending, chunk);
|
|
740
|
+
this.drainPending();
|
|
741
|
+
callback();
|
|
742
|
+
}
|
|
743
|
+
_flush(callback) {
|
|
744
|
+
if (this.pendingRequest !== null) {
|
|
745
|
+
// 请求正文不完整时无法判断是否为 JSON,保留原正文并只改写请求头。
|
|
746
|
+
this.push(rewriteLanAccessDshRequestHeaders(this.pendingRequest.head, this.targetAuthority, this.upstreamCookie ?? undefined));
|
|
747
|
+
if (this.pending.length > 0)
|
|
748
|
+
this.push(this.pending);
|
|
749
|
+
callback();
|
|
750
|
+
return;
|
|
751
|
+
}
|
|
752
|
+
if (this.pending.length > 0)
|
|
753
|
+
callback(null, this.pending);
|
|
754
|
+
else
|
|
755
|
+
callback();
|
|
756
|
+
}
|
|
757
|
+
drainPending() {
|
|
758
|
+
while (!this.finished) {
|
|
759
|
+
if (this.pendingRequest !== null) {
|
|
760
|
+
if (this.pending.length < this.pendingRequest.bodyLength)
|
|
761
|
+
return;
|
|
762
|
+
const body = this.pending.subarray(0, this.pendingRequest.bodyLength);
|
|
763
|
+
this.pending = this.pending.subarray(this.pendingRequest.bodyLength);
|
|
764
|
+
const normalizedBody = normalizeLanAccessDshRpcBody(this.pendingRequest.path, this.pendingRequest.method, body);
|
|
765
|
+
const head = rewriteLanAccessDshRequestHeaders(this.pendingRequest.head, this.targetAuthority, this.upstreamCookie ?? undefined);
|
|
766
|
+
this.push(concatBytes(rewriteContentLength(head, normalizedBody.length), normalizedBody));
|
|
767
|
+
this.pendingRequest = null;
|
|
768
|
+
continue;
|
|
769
|
+
}
|
|
770
|
+
const end = findHeaderEnd(this.pending);
|
|
771
|
+
if (end < 0) {
|
|
772
|
+
// 请求头不应超过这个上限;超过时直接透传,避免代理因异常请求无限缓存。
|
|
773
|
+
if (this.pending.length > 64 * 1024) {
|
|
774
|
+
this.finished = true;
|
|
775
|
+
this.push(this.pending);
|
|
776
|
+
this.pending = new Uint8Array(0);
|
|
777
|
+
}
|
|
778
|
+
return;
|
|
779
|
+
}
|
|
780
|
+
const head = this.pending.subarray(0, end + 4);
|
|
781
|
+
this.pending = this.pending.subarray(end + 4);
|
|
782
|
+
const upgrade = isUpgradeRequest(head);
|
|
783
|
+
if (upgrade) {
|
|
784
|
+
// WebSocket 头部之后全部是帧数据,不能再次进入 HTTP 头缓存。
|
|
785
|
+
this.push(rewriteLanAccessDshRequestHeaders(head, this.targetAuthority, this.upstreamCookie ?? undefined));
|
|
786
|
+
this.finished = true;
|
|
787
|
+
if (this.pending.length > 0) {
|
|
788
|
+
this.push(this.pending);
|
|
789
|
+
this.pending = new Uint8Array(0);
|
|
790
|
+
}
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
// DSH 的普通请求均为无体 GET 或带 Content-Length 的 JSON POST。
|
|
794
|
+
// 分块上传无法安全识别下一条请求,遇到它时透传本连接剩余字节。
|
|
795
|
+
if (/\r\ntransfer-encoding:\s*[^\r\n]*\bchunked\b/iu.test(decodeLatin1(head))) {
|
|
796
|
+
this.push(rewriteLanAccessDshRequestHeaders(head, this.targetAuthority, this.upstreamCookie ?? undefined));
|
|
797
|
+
this.finished = true;
|
|
798
|
+
if (this.pending.length > 0) {
|
|
799
|
+
this.push(this.pending);
|
|
800
|
+
this.pending = new Uint8Array(0);
|
|
801
|
+
}
|
|
802
|
+
return;
|
|
803
|
+
}
|
|
804
|
+
const bodyLength = contentLengthOf(head);
|
|
805
|
+
if (bodyLength === 0) {
|
|
806
|
+
this.push(rewriteLanAccessDshRequestHeaders(head, this.targetAuthority, this.upstreamCookie ?? undefined));
|
|
807
|
+
continue;
|
|
808
|
+
}
|
|
809
|
+
const requestLine = decodeLatin1(head).split('\r\n', 1)[0] ?? '';
|
|
810
|
+
const parts = requestLine.split(' ');
|
|
811
|
+
this.pendingRequest = {
|
|
812
|
+
head,
|
|
813
|
+
method: parts[0] ?? 'GET',
|
|
814
|
+
path: (parts[1] ?? '/').split('?', 1)[0] ?? '/',
|
|
815
|
+
bodyLength,
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
/** 兼容旧版 DSH Web Client 直接把 RPC 参数放入 payload 的请求格式。 */
|
|
821
|
+
export function normalizeLanAccessDshRpcBody(path, method, body) {
|
|
822
|
+
if (method.toUpperCase() !== 'POST' || !path.startsWith('/api/'))
|
|
823
|
+
return body;
|
|
824
|
+
try {
|
|
825
|
+
const message = JSON.parse(new TextDecoder().decode(body));
|
|
826
|
+
if (!isOfficialConnectionRpcMessage(message) || !isRecord(message.payload) || 'args' in message.payload)
|
|
827
|
+
return body;
|
|
828
|
+
return new TextEncoder().encode(JSON.stringify({ ...message, payload: { args: message.payload } }));
|
|
829
|
+
}
|
|
830
|
+
catch {
|
|
831
|
+
return body;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
/** 只兼容 DSH 官方两段式 Remote endpoint,不能改写 AgentDoor 自有 RPC。 */
|
|
835
|
+
function isOfficialConnectionRpcMessage(value) {
|
|
836
|
+
if (!isRecord(value) || value.type !== 'client-request' || typeof value.method !== 'string')
|
|
837
|
+
return false;
|
|
838
|
+
const parts = value.method.split('/');
|
|
839
|
+
return parts.length === 2 && parts.every((part) => part !== '') && parts[0] !== 'agentdoor';
|
|
840
|
+
}
|
|
841
|
+
/** 改写请求中的 Host、Origin,并关闭普通 HTTP 上游连接。 */
|
|
842
|
+
export function rewriteLanAccessDshRequestHeaders(input, targetAuthority, upstreamCookie) {
|
|
843
|
+
const text = decodeLatin1(input);
|
|
844
|
+
const lines = text.split('\r\n');
|
|
845
|
+
const upgrade = isUpgradeRequest(input);
|
|
846
|
+
let hasConnection = false;
|
|
847
|
+
let hasCookie = false;
|
|
848
|
+
let hasOrigin = false;
|
|
849
|
+
for (let index = 1; index < lines.length; index += 1) {
|
|
850
|
+
const line = lines[index];
|
|
851
|
+
if (line === undefined || line === '')
|
|
852
|
+
continue;
|
|
853
|
+
const separator = line.indexOf(':');
|
|
854
|
+
if (separator <= 0)
|
|
855
|
+
continue;
|
|
856
|
+
const name = line.slice(0, separator).toLowerCase();
|
|
857
|
+
if (name === 'host')
|
|
858
|
+
lines[index] = `Host: ${targetAuthority}`;
|
|
859
|
+
else if (name === 'origin') {
|
|
860
|
+
hasOrigin = true;
|
|
861
|
+
lines[index] = `Origin: http://${targetAuthority}`;
|
|
862
|
+
}
|
|
863
|
+
else if (name === 'connection') {
|
|
864
|
+
hasConnection = true;
|
|
865
|
+
if (!upgrade)
|
|
866
|
+
lines[index] = 'Connection: close';
|
|
867
|
+
}
|
|
868
|
+
else if (name === 'cookie')
|
|
869
|
+
hasCookie = true;
|
|
870
|
+
}
|
|
871
|
+
if (upstreamCookie !== undefined) {
|
|
872
|
+
if (hasCookie) {
|
|
873
|
+
for (let index = 1; index < lines.length; index += 1) {
|
|
874
|
+
if (lines[index]?.toLowerCase().startsWith('cookie:'))
|
|
875
|
+
lines[index] = `Cookie: ${lines[index].slice(lines[index].indexOf(':') + 1).trim()}; ${upstreamCookie}`;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
else
|
|
879
|
+
lines.splice(-2, 0, `Cookie: ${upstreamCookie}`);
|
|
880
|
+
}
|
|
881
|
+
// Node fetch 不会为服务端转发自动附加 Origin,而 DSH 的 API 信任栅栏
|
|
882
|
+
// 需要 Host/Origin 成对指向同一 loopback authority。浏览器已有 Origin
|
|
883
|
+
// 时上面的分支会改写它;缺失时在上游请求头中补齐。
|
|
884
|
+
if (!hasOrigin)
|
|
885
|
+
lines.splice(-2, 0, `Origin: http://${targetAuthority}`);
|
|
886
|
+
if (!upgrade && !hasConnection)
|
|
887
|
+
lines.splice(-2, 0, 'Connection: close');
|
|
888
|
+
return encodeLatin1(lines.join('\r\n'));
|
|
889
|
+
}
|
|
890
|
+
function contentLengthOf(input) {
|
|
891
|
+
const match = /\r\ncontent-length:\s*(\d+)/iu.exec(decodeLatin1(input));
|
|
892
|
+
return match?.[1] === undefined ? 0 : Number(match[1]);
|
|
893
|
+
}
|
|
894
|
+
function rewriteContentLength(input, length) {
|
|
895
|
+
const lines = decodeLatin1(input).split('\r\n');
|
|
896
|
+
for (let index = 1; index < lines.length; index += 1) {
|
|
897
|
+
if (/^content-length\s*:/iu.test(lines[index] ?? ''))
|
|
898
|
+
lines[index] = `Content-Length: ${length}`;
|
|
899
|
+
}
|
|
900
|
+
return encodeLatin1(lines.join('\r\n'));
|
|
901
|
+
}
|
|
902
|
+
function isUpgradeRequest(input) {
|
|
903
|
+
const text = decodeLatin1(input);
|
|
904
|
+
return /\r\nconnection:\s*[^\r\n]*\bupgrade\b/iu.test(text)
|
|
905
|
+
&& /\r\nupgrade:\s*websocket\b/iu.test(text);
|
|
906
|
+
}
|
|
907
|
+
function concatBytes(first, second) {
|
|
908
|
+
const result = new Uint8Array(first.length + second.length);
|
|
909
|
+
result.set(first);
|
|
910
|
+
result.set(second, first.length);
|
|
911
|
+
return result;
|
|
912
|
+
}
|
|
913
|
+
function findHeaderEnd(input) {
|
|
914
|
+
for (let index = 0; index <= input.length - 4; index += 1) {
|
|
915
|
+
if (input[index] === 13 && input[index + 1] === 10 && input[index + 2] === 13 && input[index + 3] === 10)
|
|
916
|
+
return index;
|
|
917
|
+
}
|
|
918
|
+
return -1;
|
|
919
|
+
}
|
|
920
|
+
function decodeLatin1(input) {
|
|
921
|
+
return Array.from(input, (byte) => String.fromCharCode(byte)).join('');
|
|
922
|
+
}
|
|
923
|
+
function encodeLatin1(input) {
|
|
924
|
+
const result = new Uint8Array(input.length);
|
|
925
|
+
for (let index = 0; index < input.length; index += 1)
|
|
926
|
+
result[index] = input.charCodeAt(index) & 0xff;
|
|
927
|
+
return result;
|
|
928
|
+
}
|
|
929
|
+
export class LanAccessDshError extends Error {
|
|
930
|
+
code;
|
|
931
|
+
constructor(code, message) {
|
|
932
|
+
super(message);
|
|
933
|
+
this.code = code;
|
|
934
|
+
this.name = code;
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* 启动前根据探测结果决定 DSH Web 端口。
|
|
939
|
+
*
|
|
940
|
+
* 探测到唯一端口时以它为准:与已保存端口一致则直接启动,已变化则改用新端口。
|
|
941
|
+
* 探测失败时沿用已保存端口。多个探测结果仅在已保存端口仍在其中时沿用。
|
|
942
|
+
*/
|
|
943
|
+
export function resolveLanAccessDshStartPort(requested, detected) {
|
|
944
|
+
const ports = uniquePorts(detected);
|
|
945
|
+
const saved = requested !== undefined && requested > 0 ? requested : undefined;
|
|
946
|
+
if (ports.length === 1)
|
|
947
|
+
return ports[0];
|
|
948
|
+
if (saved !== undefined && (ports.length === 0 || ports.includes(saved)))
|
|
949
|
+
return saved;
|
|
950
|
+
if (ports.length === 0)
|
|
951
|
+
throw new LanAccessDshError('DSH_PORT_NOT_FOUND', '未能自动探测 DSH Web 端口,请手动填写');
|
|
952
|
+
throw new LanAccessDshError('DSH_PORT_AMBIGUOUS', `自动探测到多个 DSH Web 端口,请手动选择: ${ports.join(', ')}`);
|
|
953
|
+
}
|
|
954
|
+
/** 启动局域网映射;DSH Web 端口相对已保存值发生变化时回写持久化配置。 */
|
|
955
|
+
export async function startLanAccessDsh(proxy, input, settings) {
|
|
956
|
+
const snapshot = await proxy.start(input);
|
|
957
|
+
if (settings === undefined)
|
|
958
|
+
return snapshot;
|
|
959
|
+
const current = settings.get().lanAccessDsh;
|
|
960
|
+
if (current.dshPort === snapshot.dshPort)
|
|
961
|
+
return snapshot;
|
|
962
|
+
try {
|
|
963
|
+
await settings.update({ lanAccessDsh: { ...current, dshPort: snapshot.dshPort } });
|
|
964
|
+
}
|
|
965
|
+
catch (error) {
|
|
966
|
+
console.warn('dsh-agentdoor: 局域网访问 DSH 端口配置回写失败', error);
|
|
967
|
+
}
|
|
968
|
+
return snapshot;
|
|
969
|
+
}
|
|
970
|
+
export function normalizeLanAccessDshConfig(value, allowedListenHosts) {
|
|
971
|
+
const listenHost = requireText(value.listenHost, 'listenHost');
|
|
972
|
+
const listenPort = requirePort(value.listenPort ?? 13080, 'listenPort', true);
|
|
973
|
+
const dshPort = requirePort(value.dshPort, 'dshPort', false);
|
|
974
|
+
const allowedHosts = allowedListenHosts === undefined ? LISTEN_HOSTS : new Set(allowedListenHosts);
|
|
975
|
+
if (!allowedHosts.has(listenHost))
|
|
976
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '监听地址必须来自本机网卡或 0.0.0.0');
|
|
977
|
+
return {
|
|
978
|
+
listenHost,
|
|
979
|
+
listenPort,
|
|
980
|
+
dshPort,
|
|
981
|
+
...(value.login === undefined ? {} : { login: normalizeLoginConfig(value.login) }),
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
export function createLanAccessDshRpcHandler(proxy, settings, loginStore = new FileLanAccessDshLoginStore(), options = {}) {
|
|
985
|
+
const requirePush = () => {
|
|
986
|
+
if (options.push === undefined)
|
|
987
|
+
throw new AgentDoorRpcError('AGENT_DOOR_PWA_PUSH_UNAVAILABLE', '推送服务未启用');
|
|
988
|
+
return options.push;
|
|
989
|
+
};
|
|
990
|
+
return async (action, payload) => {
|
|
991
|
+
switch (action) {
|
|
992
|
+
case 'addresses':
|
|
993
|
+
return proxy.listenHosts();
|
|
994
|
+
case 'detect':
|
|
995
|
+
return { ports: await proxy.detect() };
|
|
996
|
+
case 'get':
|
|
997
|
+
return proxy.get();
|
|
998
|
+
case 'settings/get':
|
|
999
|
+
return settings?.get().lanAccessDsh ?? defaultLanAccessDshSettings();
|
|
1000
|
+
case 'settings/set': {
|
|
1001
|
+
if (settings === undefined)
|
|
1002
|
+
throw new AgentDoorRpcError('AGENT_DOOR_SETTINGS_UNAVAILABLE', 'DshAgentDoor 设置服务不可用');
|
|
1003
|
+
const next = parseLanAccessDshSettings(payload, proxy.listenHosts(), settings.get().lanAccessDsh.pwa);
|
|
1004
|
+
await settings.update({ lanAccessDsh: next });
|
|
1005
|
+
return settings.get().lanAccessDsh;
|
|
1006
|
+
}
|
|
1007
|
+
case 'login/get':
|
|
1008
|
+
return proxy.loginSettings();
|
|
1009
|
+
case 'pwa/status':
|
|
1010
|
+
return proxy.pwaStatus();
|
|
1011
|
+
case 'pwa/vapid': {
|
|
1012
|
+
const push = requirePush();
|
|
1013
|
+
return { available: true, publicKey: (await push.vapidKeys()).publicKey };
|
|
1014
|
+
}
|
|
1015
|
+
case 'pwa/push/status': {
|
|
1016
|
+
if (options.push === undefined)
|
|
1017
|
+
return { available: false, subscriptions: 0 };
|
|
1018
|
+
const subscriptions = await options.push.listSubscriptions();
|
|
1019
|
+
return { available: true, subscriptions: subscriptions.length };
|
|
1020
|
+
}
|
|
1021
|
+
case 'pwa/push/subscribe': {
|
|
1022
|
+
const push = requirePush();
|
|
1023
|
+
const input = parsePushSubscribePayload(payload);
|
|
1024
|
+
const record = await push.subscribe(input, readPushLabel(payload));
|
|
1025
|
+
return { endpoint: record.endpoint, createdAt: record.createdAt, subscriptions: (await push.listSubscriptions()).length };
|
|
1026
|
+
}
|
|
1027
|
+
case 'pwa/push/unsubscribe': {
|
|
1028
|
+
const push = requirePush();
|
|
1029
|
+
const endpoint = readPushEndpoint(payload);
|
|
1030
|
+
return { removed: await push.unsubscribe(endpoint) };
|
|
1031
|
+
}
|
|
1032
|
+
case 'pwa/push/test': {
|
|
1033
|
+
const push = requirePush();
|
|
1034
|
+
const locale = options.resolveLocale?.() ?? 'zh';
|
|
1035
|
+
const summary = await push.sendToAll({
|
|
1036
|
+
title: hostBrowserText(locale, 'push.testTitle'),
|
|
1037
|
+
body: hostBrowserText(locale, 'push.testBody'),
|
|
1038
|
+
tag: 'dsh-agentdoor-test',
|
|
1039
|
+
});
|
|
1040
|
+
return summary;
|
|
1041
|
+
}
|
|
1042
|
+
case 'login/set': {
|
|
1043
|
+
const current = await loginStore.read();
|
|
1044
|
+
const next = parseLoginSettings(payload, current);
|
|
1045
|
+
if (next === null) {
|
|
1046
|
+
await loginStore.clear();
|
|
1047
|
+
proxy.setLoginConfig(null);
|
|
1048
|
+
}
|
|
1049
|
+
else {
|
|
1050
|
+
await loginStore.write(next);
|
|
1051
|
+
proxy.setLoginConfig(next);
|
|
1052
|
+
}
|
|
1053
|
+
const settings = proxy.loginSettings();
|
|
1054
|
+
if (next !== null && next.scopes.relay && isRecord(payload) && typeof payload.password === 'string' && payload.password !== '') {
|
|
1055
|
+
const sessionInput = parseLoginSessionPayload({ username: next.username, password: payload.password, scope: 'relay' });
|
|
1056
|
+
return { ...settings, relaySession: await openLoginProtectionSession(loginStore, sessionInput.username, sessionInput.password, 'relay') };
|
|
1057
|
+
}
|
|
1058
|
+
return settings;
|
|
1059
|
+
}
|
|
1060
|
+
case 'login/session/open': {
|
|
1061
|
+
const input = parseLoginSessionPayload(payload);
|
|
1062
|
+
return openLoginProtectionSession(loginStore, input.username, input.password, input.scope);
|
|
1063
|
+
}
|
|
1064
|
+
case 'login/session/refresh': {
|
|
1065
|
+
const input = parseLoginSessionRefreshPayload(payload);
|
|
1066
|
+
return refreshLoginProtectionSession(loginStore, input.token, input.scope);
|
|
1067
|
+
}
|
|
1068
|
+
case 'start':
|
|
1069
|
+
return startLanAccessDsh(proxy, parseStartPayload(payload), settings);
|
|
1070
|
+
case 'stop':
|
|
1071
|
+
await proxy.stop();
|
|
1072
|
+
return { stopped: true };
|
|
1073
|
+
default:
|
|
1074
|
+
throw new AgentDoorRpcError('AGENT_DOOR_RPC_NOT_FOUND', `未知局域网访问 DSH RPC: lanAccessDsh/${action}`);
|
|
1075
|
+
}
|
|
1076
|
+
};
|
|
1077
|
+
}
|
|
1078
|
+
function parseLoginSessionPayload(value) {
|
|
1079
|
+
if (!value || typeof value !== 'object')
|
|
1080
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '登录会话参数必须是对象');
|
|
1081
|
+
const input = value;
|
|
1082
|
+
const username = requireLoginText(input.username, '用户名', 1, 128);
|
|
1083
|
+
if (typeof input.password !== 'string' || input.password.length < 1 || input.password.length > 256)
|
|
1084
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '密码格式无效');
|
|
1085
|
+
const scope = input.scope;
|
|
1086
|
+
if (scope !== 'lan' && scope !== 'relay')
|
|
1087
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '登录会话应用范围无效');
|
|
1088
|
+
return { username, password: input.password, scope };
|
|
1089
|
+
}
|
|
1090
|
+
function parseLoginSessionRefreshPayload(value) {
|
|
1091
|
+
if (!value || typeof value !== 'object')
|
|
1092
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '登录会话刷新参数必须是对象');
|
|
1093
|
+
const input = value;
|
|
1094
|
+
const token = requireLoginText(input.token, '会话票据', 32, 4096);
|
|
1095
|
+
const scope = input.scope === 'lan' || input.scope === 'relay' ? input.scope : undefined;
|
|
1096
|
+
if (scope === undefined)
|
|
1097
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '登录会话范围无效');
|
|
1098
|
+
return { token, scope };
|
|
1099
|
+
}
|
|
1100
|
+
function defaultLanAccessDshSettings() {
|
|
1101
|
+
return { autoStart: false, listenHost: '0.0.0.0', listenPort: 13080, dshPort: 0, pwa: { ...DEFAULT_LAN_ACCESS_DSH_PWA_SETTINGS } };
|
|
1102
|
+
}
|
|
1103
|
+
function parseLoginSettings(value, current) {
|
|
1104
|
+
if (!value || typeof value !== 'object')
|
|
1105
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '登录保护设置必须是对象');
|
|
1106
|
+
const input = value;
|
|
1107
|
+
if (input.enabled === false)
|
|
1108
|
+
return null;
|
|
1109
|
+
if (input.enabled !== true)
|
|
1110
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '登录保护 enabled 必须是布尔值');
|
|
1111
|
+
const username = requireLoginText(input.username, '用户名', 1, 128);
|
|
1112
|
+
const timeoutSeconds = requireInteger(input.timeoutSeconds, '超时时间', 60, 604800);
|
|
1113
|
+
const scopes = parseLoginScopes(input.scopes ?? current?.scopes);
|
|
1114
|
+
const password = typeof input.password === 'string' ? input.password : '';
|
|
1115
|
+
if (password === '') {
|
|
1116
|
+
if (current === null)
|
|
1117
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '启用登录保护时必须设置密码');
|
|
1118
|
+
return { enabled: true, username, passwordHash: current.passwordHash, passwordSalt: current.passwordSalt, timeoutSeconds, scopes };
|
|
1119
|
+
}
|
|
1120
|
+
return createLoginProtectionConfig({ username, password, timeoutSeconds, scopes });
|
|
1121
|
+
}
|
|
1122
|
+
/** 由明文密码生成登录保护配置;只在设置写入与测试夹具中使用,不回显密码。 */
|
|
1123
|
+
export function createLoginProtectionConfig(input) {
|
|
1124
|
+
const username = requireLoginText(input.username, '用户名', 1, 128);
|
|
1125
|
+
const timeoutSeconds = requireInteger(input.timeoutSeconds, '超时时间', 60, 604800);
|
|
1126
|
+
if (input.password.length < 8 || input.password.length > 256)
|
|
1127
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '密码长度必须是 8 到 256 个字符');
|
|
1128
|
+
const passwordSalt = randomBytes(16).toString('hex');
|
|
1129
|
+
return {
|
|
1130
|
+
enabled: true,
|
|
1131
|
+
username,
|
|
1132
|
+
passwordHash: hashPassword(input.password, passwordSalt),
|
|
1133
|
+
passwordSalt,
|
|
1134
|
+
timeoutSeconds,
|
|
1135
|
+
scopes: parseLoginScopes(input.scopes),
|
|
1136
|
+
};
|
|
1137
|
+
}
|
|
1138
|
+
function normalizeLoginConfig(value) {
|
|
1139
|
+
if (typeof value !== 'object' || value === null)
|
|
1140
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '登录保护配置无效');
|
|
1141
|
+
return {
|
|
1142
|
+
enabled: value.enabled === true,
|
|
1143
|
+
username: requireLoginText(value.username, '用户名', 1, 128),
|
|
1144
|
+
passwordHash: requireLoginText(value.passwordHash, '密码哈希', 1, 512),
|
|
1145
|
+
passwordSalt: requireLoginText(value.passwordSalt, '密码盐', 1, 128),
|
|
1146
|
+
timeoutSeconds: requireInteger(value.timeoutSeconds, '超时时间', 60, 604800),
|
|
1147
|
+
scopes: parseLoginScopes(value.scopes),
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
function parseLoginRecord(value) {
|
|
1151
|
+
return normalizeLoginConfig(value);
|
|
1152
|
+
}
|
|
1153
|
+
function hashPassword(password, salt) { return scryptSync(password, salt, 64).toString('hex'); }
|
|
1154
|
+
function verifyPassword(password, config) {
|
|
1155
|
+
try {
|
|
1156
|
+
const expected = Buffer.from(config.passwordHash, 'hex');
|
|
1157
|
+
const actual = Buffer.from(hashPassword(password, config.passwordSalt), 'hex');
|
|
1158
|
+
return expected.length === actual.length && timingSafeEqual(expected, actual);
|
|
1159
|
+
}
|
|
1160
|
+
catch {
|
|
1161
|
+
return false;
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
function encodeSessionPayload(value) {
|
|
1165
|
+
return Buffer.from(JSON.stringify(value), 'utf8').toString('base64url');
|
|
1166
|
+
}
|
|
1167
|
+
function signSessionPayload(payload, config) {
|
|
1168
|
+
return createHmac('sha256', `${config.passwordSalt}:${config.passwordHash}`).update(payload).digest('base64url');
|
|
1169
|
+
}
|
|
1170
|
+
function verifySignedSessionToken(token, config, scope) {
|
|
1171
|
+
if (token.length < 32 || token.length > 4096)
|
|
1172
|
+
return false;
|
|
1173
|
+
const separator = token.lastIndexOf('.');
|
|
1174
|
+
if (separator <= 0)
|
|
1175
|
+
return false;
|
|
1176
|
+
const payload = token.slice(0, separator);
|
|
1177
|
+
const signature = token.slice(separator + 1);
|
|
1178
|
+
const expectedBytes = Buffer.from(signSessionPayload(payload, config));
|
|
1179
|
+
const actualBytes = Buffer.from(signature);
|
|
1180
|
+
if (expectedBytes.length !== actualBytes.length || !timingSafeEqual(expectedBytes, actualBytes))
|
|
1181
|
+
return false;
|
|
1182
|
+
try {
|
|
1183
|
+
const value = JSON.parse(Buffer.from(payload, 'base64url').toString('utf8'));
|
|
1184
|
+
return value.username === config.username && value.scope === scope && typeof value.nonce === 'string' && typeof value.expiresAt === 'number' && value.expiresAt > Date.now();
|
|
1185
|
+
}
|
|
1186
|
+
catch {
|
|
1187
|
+
return false;
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
function readLoginProtectionSessionExpiresAt(token, config, scope) {
|
|
1191
|
+
if (!verifySignedSessionToken(token, config, scope))
|
|
1192
|
+
return null;
|
|
1193
|
+
try {
|
|
1194
|
+
const value = JSON.parse(Buffer.from(token.slice(0, token.lastIndexOf('.')), 'base64url').toString('utf8'));
|
|
1195
|
+
return typeof value.expiresAt === 'number' && Number.isFinite(value.expiresAt) ? value.expiresAt : null;
|
|
1196
|
+
}
|
|
1197
|
+
catch {
|
|
1198
|
+
return null;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
function requireLoginText(value, field, min, max) {
|
|
1202
|
+
if (typeof value !== 'string' || value.trim().length < min || value.trim().length > max || /[\u0000-\u001F\u007F]/u.test(value))
|
|
1203
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', `${field} 格式无效`);
|
|
1204
|
+
return value.trim();
|
|
1205
|
+
}
|
|
1206
|
+
function requireInteger(value, field, min, max) {
|
|
1207
|
+
if (!Number.isInteger(value) || value < min || value > max)
|
|
1208
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', `${field} 必须是 ${min} 到 ${max} 的整数`);
|
|
1209
|
+
return value;
|
|
1210
|
+
}
|
|
1211
|
+
function defaultLoginScopes() { return { lan: true, relay: true }; }
|
|
1212
|
+
function parseLoginScopes(value) {
|
|
1213
|
+
if (value === undefined)
|
|
1214
|
+
return defaultLoginScopes();
|
|
1215
|
+
if (!value || typeof value !== 'object')
|
|
1216
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '登录保护应用范围无效');
|
|
1217
|
+
const input = value;
|
|
1218
|
+
if (typeof input.lan !== 'boolean' || typeof input.relay !== 'boolean')
|
|
1219
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '登录保护应用范围必须是布尔值');
|
|
1220
|
+
if (!input.lan && !input.relay)
|
|
1221
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '至少选择一个登录保护应用范围');
|
|
1222
|
+
return { lan: input.lan, relay: input.relay };
|
|
1223
|
+
}
|
|
1224
|
+
function isNodeError(error, code) { return typeof error === 'object' && error !== null && 'code' in error && error.code === code; }
|
|
1225
|
+
/** 推送订阅只接受 endpoint + 两个密钥,其余字段忽略;非法输入给出稳定错误码。 */
|
|
1226
|
+
function parsePushSubscribePayload(value) {
|
|
1227
|
+
if (!isRecord(value))
|
|
1228
|
+
throw new AgentDoorRpcError('AGENT_DOOR_PWA_PUSH_INVALID', '推送订阅参数无效');
|
|
1229
|
+
const keys = value.keys;
|
|
1230
|
+
if (typeof value.endpoint !== 'string' || !isRecord(keys) || typeof keys.p256dh !== 'string' || typeof keys.auth !== 'string') {
|
|
1231
|
+
throw new AgentDoorRpcError('AGENT_DOOR_PWA_PUSH_INVALID', '推送订阅参数无效');
|
|
1232
|
+
}
|
|
1233
|
+
return { endpoint: value.endpoint, keys: { p256dh: keys.p256dh, auth: keys.auth } };
|
|
1234
|
+
}
|
|
1235
|
+
function readPushLabel(value) {
|
|
1236
|
+
if (!isRecord(value))
|
|
1237
|
+
return '';
|
|
1238
|
+
return typeof value.label === 'string' ? value.label : '';
|
|
1239
|
+
}
|
|
1240
|
+
function readPushEndpoint(value) {
|
|
1241
|
+
if (!isRecord(value) || typeof value.endpoint !== 'string' || value.endpoint === '') {
|
|
1242
|
+
throw new AgentDoorRpcError('AGENT_DOOR_PWA_PUSH_INVALID', '推送订阅 endpoint 无效');
|
|
1243
|
+
}
|
|
1244
|
+
return value.endpoint;
|
|
1245
|
+
}
|
|
1246
|
+
function isRecord(value) { return typeof value === 'object' && value !== null && !Array.isArray(value); }
|
|
1247
|
+
/**
|
|
1248
|
+
* 解析监听映射设置。
|
|
1249
|
+
*
|
|
1250
|
+
* PWA 设置已经移到「移动端访问增强」卡片,它的写入走设置 RPC 的 `lanAccessDsh.pwa` 路径;
|
|
1251
|
+
* 这里在请求未携带 `pwa` 时沿用当前值,避免用户在局域网卡片里只改监听端口就把手机端
|
|
1252
|
+
* 资产配置重置成默认档位。显式传入 `pwa` 时仍然走归一化。
|
|
1253
|
+
*/
|
|
1254
|
+
function parseLanAccessDshSettings(value, allowedListenHosts, currentPwa = null) {
|
|
1255
|
+
if (!value || typeof value !== 'object')
|
|
1256
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '局域网访问 DSH 设置必须是对象');
|
|
1257
|
+
const input = value;
|
|
1258
|
+
if (typeof input.autoStart !== 'boolean')
|
|
1259
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', 'autoStart 必须是布尔值');
|
|
1260
|
+
const listenHost = requireText(input.listenHost, 'listenHost');
|
|
1261
|
+
const listenPort = requirePort(input.listenPort, 'listenPort', true);
|
|
1262
|
+
const dshPort = requirePort(input.dshPort, 'dshPort', true);
|
|
1263
|
+
if (!new Set(allowedListenHosts).has(listenHost))
|
|
1264
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '监听地址必须来自本机网卡或 0.0.0.0');
|
|
1265
|
+
const pwa = input.pwa === undefined && currentPwa !== null
|
|
1266
|
+
? currentPwa
|
|
1267
|
+
: parseLanAccessDshPwaSettings(input.pwa);
|
|
1268
|
+
return { autoStart: input.autoStart, listenHost, listenPort, dshPort, pwa };
|
|
1269
|
+
}
|
|
1270
|
+
/** PWA 档位走归一化而非严格校验:非法值收敛到保守默认,避免设置页写不进去。 */
|
|
1271
|
+
function parseLanAccessDshPwaSettings(value) {
|
|
1272
|
+
return normalizeLanAccessDshPwaSettings(value);
|
|
1273
|
+
}
|
|
1274
|
+
function parseStartPayload(value) {
|
|
1275
|
+
if (!value || typeof value !== 'object')
|
|
1276
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', '局域网访问 DSH 参数必须是对象');
|
|
1277
|
+
const input = value;
|
|
1278
|
+
return {
|
|
1279
|
+
...(typeof input.listenHost === 'string' ? { listenHost: input.listenHost } : {}),
|
|
1280
|
+
...(typeof input.listenPort === 'number' ? { listenPort: input.listenPort } : {}),
|
|
1281
|
+
...(typeof input.dshPort === 'number' ? { dshPort: input.dshPort } : {}),
|
|
1282
|
+
};
|
|
1283
|
+
}
|
|
1284
|
+
function requireText(value, field) {
|
|
1285
|
+
if (typeof value !== 'string' || value.trim() === '')
|
|
1286
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', `${field} 不能为空`);
|
|
1287
|
+
return value.trim();
|
|
1288
|
+
}
|
|
1289
|
+
function requirePort(value, field, allowZero) {
|
|
1290
|
+
const minimum = allowZero ? 0 : 1;
|
|
1291
|
+
if (!Number.isInteger(value) || value < minimum || value > 65535) {
|
|
1292
|
+
throw new LanAccessDshError('LAN_ACCESS_DSH_INVALID', `${field} 必须是 ${minimum} 到 65535 的整数`);
|
|
1293
|
+
}
|
|
1294
|
+
return value;
|
|
1295
|
+
}
|
|
1296
|
+
function uniquePorts(ports) {
|
|
1297
|
+
return [...new Set(ports.filter((port) => Number.isInteger(port) && port >= 1 && port <= 65535))];
|
|
1298
|
+
}
|
|
1299
|
+
function detectDshPortsFromRuntime(dshWebPort) {
|
|
1300
|
+
const current = uniquePorts(dshWebPort === undefined ? [] : [dshWebPort]);
|
|
1301
|
+
if (current.length === 1)
|
|
1302
|
+
return current;
|
|
1303
|
+
const runtime = globalThis;
|
|
1304
|
+
const values = [
|
|
1305
|
+
runtime.__DSH_WEB_PORT__,
|
|
1306
|
+
runtime.process?.env?.DSH_WEB_PORT,
|
|
1307
|
+
runtime.process?.env?.DSH_PORT,
|
|
1308
|
+
runtime.process?.env?.PORT,
|
|
1309
|
+
];
|
|
1310
|
+
const argv = Array.isArray(runtime.process?.argv) ? runtime.process.argv : [];
|
|
1311
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
1312
|
+
const value = argv[index];
|
|
1313
|
+
if (value === '--port' || value === '--dsh-port' || value === '--web-port')
|
|
1314
|
+
values.push(argv[index + 1]);
|
|
1315
|
+
if (typeof value === 'string' && (value.startsWith('--port=') || value.startsWith('--dsh-port=') || value.startsWith('--web-port=')))
|
|
1316
|
+
values.push(value.slice(value.indexOf('=') + 1));
|
|
1317
|
+
}
|
|
1318
|
+
return uniquePorts(values
|
|
1319
|
+
.map((value) => typeof value === 'string' ? Number(value) : value)
|
|
1320
|
+
.filter((value) => typeof value === 'number'));
|
|
1321
|
+
}
|
|
1322
|
+
//# sourceMappingURL=lan-access-dsh.js.map
|