@jingyi0605/codingns4dsh 0.2.0-beta.1 → 0.2.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +29 -12
- package/README.md +22 -13
- package/assets/provider-icons/minimax-code.svg +4 -0
- package/assets/provider-icons/zcode.svg +14 -0
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts +1 -1
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts.map +1 -0
- package/data/build/dist/bootstrap/dsh-connection-adapter.js.map +1 -0
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.d.ts +50 -0
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.d.ts.map +1 -0
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js +239 -0
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js.map +1 -0
- package/data/build/dist/bootstrap/index.d.ts +3 -1
- package/data/build/dist/bootstrap/index.d.ts.map +1 -0
- package/data/build/dist/bootstrap/index.js +1 -0
- package/data/build/dist/bootstrap/index.js.map +1 -0
- package/data/build/dist/client/account-bar.d.ts +8 -1
- package/data/build/dist/client/account-bar.d.ts.map +1 -0
- package/data/build/dist/client/account-bar.js +166 -79
- package/data/build/dist/client/account-bar.js.map +1 -0
- package/data/build/dist/client/bundle.js +16641 -8889
- package/data/build/dist/client/bundle.js.map +1 -0
- package/data/build/dist/client/cli-catalog.d.ts.map +1 -0
- package/data/build/dist/client/cli-catalog.js.map +1 -0
- package/data/build/dist/client/cli-slots.d.ts.map +1 -0
- package/data/build/dist/client/cli-slots.js +32 -13
- package/data/build/dist/client/cli-slots.js.map +1 -0
- package/data/build/dist/client/context-breakdown-dom.d.ts.map +1 -0
- package/data/build/dist/client/context-breakdown-dom.js.map +1 -0
- package/data/build/dist/client/debug/ui.d.ts +2 -1
- package/data/build/dist/client/debug/ui.d.ts.map +1 -0
- package/data/build/dist/client/debug/ui.js +40 -33
- package/data/build/dist/client/debug/ui.js.map +1 -0
- package/data/build/dist/client/delegate-command.d.ts +16 -0
- package/data/build/dist/client/delegate-command.d.ts.map +1 -0
- package/data/build/dist/client/delegate-command.js +138 -0
- package/data/build/dist/client/delegate-command.js.map +1 -0
- package/data/build/dist/client/delegate-plan.d.ts +31 -0
- package/data/build/dist/client/delegate-plan.d.ts.map +1 -0
- package/data/build/dist/client/delegate-plan.js +59 -0
- package/data/build/dist/client/delegate-plan.js.map +1 -0
- package/data/build/dist/client/delegate-ui-dom.d.ts +40 -0
- package/data/build/dist/client/delegate-ui-dom.d.ts.map +1 -0
- package/data/build/dist/client/delegate-ui-dom.js +363 -0
- package/data/build/dist/client/delegate-ui-dom.js.map +1 -0
- package/data/build/dist/client/dsh-h5-bootstrap.d.ts.map +1 -0
- package/data/build/dist/client/dsh-h5-bootstrap.js +12 -5
- package/data/build/dist/client/dsh-h5-bootstrap.js.map +1 -0
- package/data/build/dist/client/dsh-runtime-version.d.ts +3 -2
- package/data/build/dist/client/dsh-runtime-version.d.ts.map +1 -0
- package/data/build/dist/client/dsh-runtime-version.js +7 -6
- package/data/build/dist/client/dsh-runtime-version.js.map +1 -0
- package/data/build/dist/client/external-tool-stream.d.ts.map +1 -0
- package/data/build/dist/client/external-tool-stream.js +44 -36
- package/data/build/dist/client/external-tool-stream.js.map +1 -0
- package/data/build/dist/client/features/cli-adapters.d.ts +7 -2
- package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -0
- package/data/build/dist/client/features/cli-adapters.js +59 -105
- package/data/build/dist/client/features/cli-adapters.js.map +1 -0
- package/data/build/dist/client/features/debug.d.ts.map +1 -0
- package/data/build/dist/client/features/debug.js +6 -4
- package/data/build/dist/client/features/debug.js.map +1 -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.map +1 -0
- package/data/build/dist/client/features/file-management.d.ts.map +1 -0
- package/data/build/dist/client/features/file-management.js +8 -5
- package/data/build/dist/client/features/file-management.js.map +1 -0
- package/data/build/dist/client/features/index.d.ts +4 -2
- package/data/build/dist/client/features/index.d.ts.map +1 -0
- package/data/build/dist/client/features/index.js +5 -2
- package/data/build/dist/client/features/index.js.map +1 -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 +89 -11
- 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 +4 -1
- package/data/build/dist/client/features/lan-access.d.ts.map +1 -0
- package/data/build/dist/client/features/lan-access.js +35 -5
- package/data/build/dist/client/features/lan-access.js.map +1 -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 +9 -7
- package/data/build/dist/client/features/login-protection-panel.js.map +1 -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.map +1 -0
- package/data/build/dist/client/features/login-protection.d.ts.map +1 -0
- package/data/build/dist/client/features/login-protection.js +3 -3
- 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 +259 -0
- package/data/build/dist/client/features/mobile-access-panel.js.map +1 -0
- package/data/build/dist/client/features/mobile-access.d.ts +13 -0
- package/data/build/dist/client/features/mobile-access.d.ts.map +1 -0
- package/data/build/dist/client/features/mobile-access.js +79 -0
- package/data/build/dist/client/features/mobile-access.js.map +1 -0
- package/data/build/dist/client/features/peer-host.d.ts +35 -1
- package/data/build/dist/client/features/peer-host.d.ts.map +1 -0
- package/data/build/dist/client/features/peer-host.js +599 -56
- package/data/build/dist/client/features/peer-host.js.map +1 -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 +2 -1
- package/data/build/dist/client/features/reverse-proxy-panel.js.map +1 -0
- package/data/build/dist/client/features/reverse-proxy.d.ts.map +1 -0
- package/data/build/dist/client/features/reverse-proxy.js +3 -3
- package/data/build/dist/client/features/reverse-proxy.js.map +1 -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.map +1 -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.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement.d.ts.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement.js +3 -3
- package/data/build/dist/client/features/terminal-enhancement.js.map +1 -0
- package/data/build/dist/client/features/types.d.ts +12 -0
- package/data/build/dist/client/features/types.d.ts.map +1 -0
- package/data/build/dist/client/features/types.js.map +1 -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 +5 -2
- 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.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement.js +24 -6
- package/data/build/dist/client/features/workspace-session-enhancement.js.map +1 -0
- package/data/build/dist/client/file-management-dom.d.ts +5 -0
- package/data/build/dist/client/file-management-dom.d.ts.map +1 -0
- package/data/build/dist/client/file-management-dom.js +78 -38
- package/data/build/dist/client/file-management-dom.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.d.ts +2 -0
- package/data/build/dist/client/git-management.d.ts.map +1 -0
- package/data/build/dist/client/git-management.js +284 -108
- package/data/build/dist/client/git-management.js.map +1 -0
- package/data/build/dist/client/git-panel-styles.d.ts +28 -0
- package/data/build/dist/client/git-panel-styles.d.ts.map +1 -0
- package/data/build/dist/client/git-panel-styles.js +95 -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/h5-bootstrap-entry.d.ts.map +1 -0
- package/data/build/dist/client/h5-bootstrap-entry.js.map +1 -0
- package/data/build/dist/client/host-router.d.ts.map +1 -0
- package/data/build/dist/client/host-router.js.map +1 -0
- package/data/build/dist/client/index.d.ts +7 -4
- package/data/build/dist/client/index.d.ts.map +1 -0
- package/data/build/dist/client/index.js +16 -9
- package/data/build/dist/client/index.js.map +1 -0
- package/data/build/dist/client/lan-access.d.ts.map +1 -0
- package/data/build/dist/client/lan-access.js.map +1 -0
- package/data/build/dist/client/locale.d.ts +7 -0
- package/data/build/dist/client/locale.d.ts.map +1 -0
- package/data/build/dist/client/locale.js +231 -47
- package/data/build/dist/client/locale.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 +139 -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 +223 -0
- package/data/build/dist/client/locales/git.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 +33 -0
- package/data/build/dist/client/locales/panels.js.map +1 -0
- package/data/build/dist/client/locales/peerHost.d.ts +9 -0
- package/data/build/dist/client/locales/peerHost.d.ts.map +1 -0
- package/data/build/dist/client/locales/peerHost.js +153 -0
- package/data/build/dist/client/locales/peerHost.js.map +1 -0
- package/data/build/dist/client/locales/peerHostWorkspace.d.ts +9 -0
- package/data/build/dist/client/locales/peerHostWorkspace.d.ts.map +1 -0
- package/data/build/dist/client/locales/peerHostWorkspace.js +69 -0
- package/data/build/dist/client/locales/peerHostWorkspace.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 +67 -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 +195 -0
- package/data/build/dist/client/locales/usage.js.map +1 -0
- package/data/build/dist/client/mobile-session-interaction.d.ts +44 -0
- package/data/build/dist/client/mobile-session-interaction.d.ts.map +1 -0
- package/data/build/dist/client/mobile-session-interaction.js +291 -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 +97 -0
- package/data/build/dist/client/mobile-sidebar-gestures.d.ts.map +1 -0
- package/data/build/dist/client/mobile-sidebar-gestures.js +316 -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-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/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 +64 -0
- package/data/build/dist/client/native-workspace-store.js.map +1 -0
- package/data/build/dist/client/peer-host-aggregate-refresh.d.ts +13 -0
- package/data/build/dist/client/peer-host-aggregate-refresh.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-aggregate-refresh.js +14 -0
- package/data/build/dist/client/peer-host-aggregate-refresh.js.map +1 -0
- package/data/build/dist/client/peer-host-color.d.ts +13 -0
- package/data/build/dist/client/peer-host-color.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-color.js +57 -0
- package/data/build/dist/client/peer-host-color.js.map +1 -0
- package/data/build/dist/client/peer-host-connection-button.d.ts +14 -1
- package/data/build/dist/client/peer-host-connection-button.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-connection-button.js +18 -7
- package/data/build/dist/client/peer-host-connection-button.js.map +1 -0
- package/data/build/dist/client/peer-host-management-api.d.ts +34 -0
- package/data/build/dist/client/peer-host-management-api.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-management-api.js +12 -0
- package/data/build/dist/client/peer-host-management-api.js.map +1 -0
- package/data/build/dist/client/peer-host-management-panel.d.ts +4 -1
- package/data/build/dist/client/peer-host-management-panel.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-management-panel.js +533 -94
- package/data/build/dist/client/peer-host-management-panel.js.map +1 -0
- package/data/build/dist/client/peer-host-native-projection.d.ts +47 -0
- package/data/build/dist/client/peer-host-native-projection.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-native-projection.js +142 -0
- package/data/build/dist/client/peer-host-native-projection.js.map +1 -0
- package/data/build/dist/client/peer-host-native-store-projection.d.ts +21 -0
- package/data/build/dist/client/peer-host-native-store-projection.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-native-store-projection.js +114 -0
- package/data/build/dist/client/peer-host-native-store-projection.js.map +1 -0
- package/data/build/dist/client/peer-host-scoped-client.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-scoped-client.js +5 -5
- package/data/build/dist/client/peer-host-scoped-client.js.map +1 -0
- package/data/build/dist/client/peer-host-session-controller.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-session-controller.js.map +1 -0
- package/data/build/dist/client/peer-host-workspace-tab.d.ts +52 -0
- package/data/build/dist/client/peer-host-workspace-tab.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-workspace-tab.js +492 -0
- package/data/build/dist/client/peer-host-workspace-tab.js.map +1 -0
- package/data/build/dist/client/peer-host-workspace-tag.d.ts +47 -0
- package/data/build/dist/client/peer-host-workspace-tag.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-workspace-tag.js +207 -0
- package/data/build/dist/client/peer-host-workspace-tag.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.map +1 -0
- package/data/build/dist/client/provider-icon-assets.js +4 -0
- package/data/build/dist/client/provider-icon-assets.js.map +1 -0
- package/data/build/dist/client/provider-icons.d.ts +18 -3
- package/data/build/dist/client/provider-icons.d.ts.map +1 -0
- package/data/build/dist/client/provider-icons.js +30 -14
- 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 +11 -0
- package/data/build/dist/client/quick-phrase-layout.d.ts.map +1 -0
- package/data/build/dist/client/quick-phrase-layout.js +20 -0
- package/data/build/dist/client/quick-phrase-layout.js.map +1 -0
- package/data/build/dist/client/quick-phrase-slot.d.ts.map +1 -0
- package/data/build/dist/client/quick-phrase-slot.js +20 -8
- package/data/build/dist/client/quick-phrase-slot.js.map +1 -0
- package/data/build/dist/client/remote-web-context.d.ts.map +1 -0
- package/data/build/dist/client/remote-web-context.js.map +1 -0
- package/data/build/dist/client/session-adapter-cache.d.ts.map +1 -0
- package/data/build/dist/client/session-adapter-cache.js.map +1 -0
- package/data/build/dist/client/session-changed-files-view.d.ts +8 -1
- package/data/build/dist/client/session-changed-files-view.d.ts.map +1 -0
- package/data/build/dist/client/session-changed-files-view.js +71 -28
- package/data/build/dist/client/session-changed-files-view.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.map +1 -0
- package/data/build/dist/client/settings-bridge.js.map +1 -0
- package/data/build/dist/client/settings-section.d.ts.map +1 -0
- package/data/build/dist/client/settings-section.js +19 -5
- package/data/build/dist/client/settings-section.js.map +1 -0
- package/data/build/dist/client/subscription-slot.d.ts +4 -1
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -0
- package/data/build/dist/client/subscription-slot.js +328 -69
- package/data/build/dist/client/subscription-slot.js.map +1 -0
- package/data/build/dist/client/terminal/index.d.ts.map +1 -0
- package/data/build/dist/client/terminal/index.js.map +1 -0
- package/data/build/dist/client/terminal/model.d.ts +13 -2
- package/data/build/dist/client/terminal/model.d.ts.map +1 -0
- package/data/build/dist/client/terminal/model.js +27 -7
- package/data/build/dist/client/terminal/model.js.map +1 -0
- package/data/build/dist/client/terminal/recovery.d.ts.map +1 -0
- package/data/build/dist/client/terminal/recovery.js.map +1 -0
- package/data/build/dist/client/terminal/styles.d.ts.map +1 -0
- package/data/build/dist/client/terminal/styles.js.map +1 -0
- package/data/build/dist/client/terminal/ui.d.ts.map +1 -0
- package/data/build/dist/client/terminal/ui.js +3 -1
- package/data/build/dist/client/terminal/ui.js.map +1 -0
- package/data/build/dist/client/terminal/xterm-view.d.ts +4 -1
- package/data/build/dist/client/terminal/xterm-view.d.ts.map +1 -0
- package/data/build/dist/client/terminal/xterm-view.js +19 -17
- package/data/build/dist/client/terminal/xterm-view.js.map +1 -0
- package/data/build/dist/client/theme.d.ts +17 -5
- package/data/build/dist/client/theme.d.ts.map +1 -0
- package/data/build/dist/client/theme.js +35 -13
- package/data/build/dist/client/theme.js.map +1 -0
- package/data/build/dist/client/workspace-session-archive-dom.d.ts +17 -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 +192 -47
- package/data/build/dist/client/workspace-session-archive-dom.js.map +1 -0
- package/data/build/dist/client/workspace-session-fiber.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-fiber.js.map +1 -0
- package/data/build/dist/client/workspace-session-logo-dom.d.ts +3 -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 +3 -1
- package/data/build/dist/client/workspace-session-logo-dom.js.map +1 -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.map +1 -0
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts +3 -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 +46 -17
- package/data/build/dist/client/workspace-session-visibility-dom.js.map +1 -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.map +1 -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.map +1 -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.map +1 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts +10 -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 +20 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js.map +1 -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.map +1 -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.map +1 -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.map +1 -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.map +1 -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.map +1 -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.map +1 -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.map +1 -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.map +1 -0
- package/data/build/dist/dsh-capabilities/index.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/index.js.map +1 -0
- package/data/build/dist/dsh-capabilities/matrix.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/matrix.js +44 -31
- package/data/build/dist/dsh-capabilities/matrix.js.map +1 -0
- package/data/build/dist/dsh-capabilities/registry.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/registry.js +6 -2
- package/data/build/dist/dsh-capabilities/registry.js.map +1 -0
- package/data/build/dist/dsh-capabilities/routes.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/routes.js +96 -11
- package/data/build/dist/dsh-capabilities/routes.js.map +1 -0
- package/data/build/dist/dsh-capabilities/settings-store.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/settings-store.js.map +1 -0
- package/data/build/dist/dsh-capabilities/types.d.ts +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/types.js.map +1 -0
- package/data/build/dist/features/host-router.d.ts.map +1 -0
- package/data/build/dist/features/host-router.js.map +1 -0
- package/data/build/dist/features/index.d.ts.map +1 -0
- package/data/build/dist/features/index.js.map +1 -0
- package/data/build/dist/features/registry.d.ts.map +1 -0
- package/data/build/dist/features/registry.js.map +1 -0
- package/data/build/dist/features/resource-scope/index.d.ts.map +1 -0
- package/data/build/dist/features/resource-scope/index.js.map +1 -0
- package/data/build/dist/host/auth-session.d.ts.map +1 -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 +105 -0
- package/data/build/dist/host/browser-text.js.map +1 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts +14 -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 +78 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.js.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts +28 -2
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.js +78 -5
- 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.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-model-options.js +22 -9
- package/data/build/dist/host/cli-adapters/claude-model-options.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts +10 -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 +352 -49
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts +24 -2
- 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 +296 -34
- package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -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.map +1 -0
- package/data/build/dist/host/cli-adapters/delegate-dispatch.d.ts +47 -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 +158 -0
- package/data/build/dist/host/cli-adapters/delegate-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts +32 -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 +121 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js.map +1 -0
- package/data/build/dist/host/cli-adapters/driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/driver.js.map +1 -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 +5 -4
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -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 +49 -1
- 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 +16 -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 +73 -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.map +1 -0
- package/data/build/dist/host/cli-adapters/feature.js +348 -19
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -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 +27 -8
- package/data/build/dist/host/cli-adapters/gemini-driver.js.map +1 -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 +27 -9
- package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -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.map +1 -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.map +1 -0
- package/data/build/dist/host/cli-adapters/json-rpc-process.d.ts +22 -6
- 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 +118 -21
- 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.map +1 -0
- package/data/build/dist/host/cli-adapters/kimi-driver.js +33 -7
- package/data/build/dist/host/cli-adapters/kimi-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts +11 -2
- 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 +15 -6
- 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.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-settings.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 +56 -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 +544 -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 +30 -5
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.js +83 -8
- 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 +51 -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 +193 -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.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-proxy.js +18 -15
- 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 +45 -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 +107 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.js.map +1 -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.map +1 -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 +20 -4
- package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -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 +30 -8
- package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -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.map +1 -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.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts +8 -1
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.js +98 -2
- package/data/build/dist/host/cli-adapters/provider-subscription.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 +13 -0
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/registry.js +37 -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.map +1 -0
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.js.map +1 -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.map +1 -0
- package/data/build/dist/host/cli-adapters/session-store.d.ts +6 -1
- package/data/build/dist/host/cli-adapters/session-store.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/session-store.js +42 -4
- package/data/build/dist/host/cli-adapters/session-store.js.map +1 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts +2 -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 +30 -4
- 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.map +1 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.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 +66 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.js.map +1 -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.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.d.ts +57 -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 +843 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.d.ts +28 -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 +212 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.js.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.d.ts +27 -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 +51 -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 +34 -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 +135 -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 +25 -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 +60 -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 +90 -0
- package/data/build/dist/host/cli-bridge/dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts +28 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/injections.js +131 -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 +151 -0
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js.map +1 -0
- package/data/build/dist/host/control-api-client.d.ts.map +1 -0
- package/data/build/dist/host/control-api-client.js.map +1 -0
- package/data/build/dist/host/credential-store.d.ts.map +1 -0
- package/data/build/dist/host/credential-store.js.map +1 -0
- package/data/build/dist/host/debug.d.ts.map +1 -0
- package/data/build/dist/host/debug.js.map +1 -0
- package/data/build/dist/host/dsh-device-runtime.d.ts.map +1 -0
- package/data/build/dist/host/dsh-device-runtime.js.map +1 -0
- package/data/build/dist/host/dsh-gateway-feature.d.ts.map +1 -0
- package/data/build/dist/host/dsh-gateway-feature.js.map +1 -0
- package/data/build/dist/host/dsh-runtime-version.d.ts.map +1 -0
- package/data/build/dist/host/dsh-runtime-version.js.map +1 -0
- package/data/build/dist/host/features/auth.d.ts.map +1 -0
- package/data/build/dist/host/features/auth.js.map +1 -0
- package/data/build/dist/host/features/debug.d.ts.map +1 -0
- package/data/build/dist/host/features/debug.js.map +1 -0
- package/data/build/dist/host/features/file-management.d.ts.map +1 -0
- package/data/build/dist/host/features/file-management.js.map +1 -0
- package/data/build/dist/host/features/git-management.d.ts.map +1 -0
- package/data/build/dist/host/features/git-management.js +97 -10
- package/data/build/dist/host/features/git-management.js.map +1 -0
- package/data/build/dist/host/features/host-status.d.ts.map +1 -0
- package/data/build/dist/host/features/host-status.js.map +1 -0
- package/data/build/dist/host/features/index.d.ts.map +1 -0
- package/data/build/dist/host/features/index.js.map +1 -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 +34 -1
- package/data/build/dist/host/features/lan-access-dsh.js.map +1 -0
- package/data/build/dist/host/features/peer-host.d.ts.map +1 -0
- package/data/build/dist/host/features/peer-host.js +341 -20
- package/data/build/dist/host/features/peer-host.js.map +1 -0
- package/data/build/dist/host/features/terminal-process.d.ts.map +1 -0
- package/data/build/dist/host/features/terminal-process.js.map +1 -0
- package/data/build/dist/host/features/terminal-status.d.ts.map +1 -0
- package/data/build/dist/host/features/terminal-status.js.map +1 -0
- package/data/build/dist/host/features/types.d.ts +3 -0
- package/data/build/dist/host/features/types.d.ts.map +1 -0
- package/data/build/dist/host/features/types.js.map +1 -0
- package/data/build/dist/host/host-router.d.ts.map +1 -0
- package/data/build/dist/host/host-router.js.map +1 -0
- package/data/build/dist/host/index-injection.d.ts +15 -0
- package/data/build/dist/host/index-injection.d.ts.map +1 -0
- package/data/build/dist/host/index-injection.js +45 -0
- package/data/build/dist/host/index-injection.js.map +1 -0
- package/data/build/dist/host/index.d.ts +12 -2
- package/data/build/dist/host/index.d.ts.map +1 -0
- package/data/build/dist/host/index.js +75 -3
- package/data/build/dist/host/index.js.map +1 -0
- package/data/build/dist/host/lan-access-dsh.d.ts +93 -2
- package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -0
- package/data/build/dist/host/lan-access-dsh.js +438 -27
- 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/peer-host/aggregated-host-transport.d.ts +146 -0
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.js +322 -0
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.d.ts +8 -0
- package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.js +120 -0
- package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts +25 -0
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js +26 -3
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-ws-connector.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-ws-connector.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-ws-proxy-service.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-ws-proxy-service.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts +10 -0
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js +27 -12
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js +3 -0
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts +2 -0
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.js +6 -0
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts +17 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js +52 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts +25 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js +187 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.d.ts +30 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.js +120 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-relay.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-relay.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.d.ts +60 -0
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js +181 -0
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts +20 -1
- package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-session.js +118 -37
- package/data/build/dist/host/modules/peer-host/peer-host-session.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-store.d.ts +21 -0
- package/data/build/dist/host/modules/peer-host/peer-host-store.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-store.js +65 -3
- package/data/build/dist/host/modules/peer-host/peer-host-store.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.d.ts +49 -0
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.js +174 -0
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-ws-gateway.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-ws-gateway.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 +38 -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 +82 -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.map +1 -0
- package/data/build/dist/host/native-session-bridge.js +86 -55
- package/data/build/dist/host/native-session-bridge.js.map +1 -0
- package/data/build/dist/host/relay-tunnel-runtime.d.ts +33 -0
- package/data/build/dist/host/relay-tunnel-runtime.d.ts.map +1 -0
- package/data/build/dist/host/relay-tunnel-runtime.js +71 -19
- package/data/build/dist/host/relay-tunnel-runtime.js.map +1 -0
- package/data/build/dist/host/remote-web-runtime.d.ts.map +1 -0
- package/data/build/dist/host/remote-web-runtime.js.map +1 -0
- package/data/build/dist/host/rpc-table.d.ts.map +1 -0
- package/data/build/dist/host/rpc-table.js.map +1 -0
- package/data/build/dist/host/rpc.d.ts.map +1 -0
- package/data/build/dist/host/rpc.js +21 -6
- package/data/build/dist/host/rpc.js.map +1 -0
- package/data/build/dist/host/session-changes.d.ts.map +1 -0
- package/data/build/dist/host/session-changes.js.map +1 -0
- package/data/build/dist/host/session-migration-repair.d.ts.map +1 -0
- package/data/build/dist/host/session-migration-repair.js.map +1 -0
- package/data/build/dist/host/settings.d.ts.map +1 -0
- package/data/build/dist/host/settings.js +33 -1
- package/data/build/dist/host/settings.js.map +1 -0
- package/data/build/dist/host/terminal/attachment-registry.d.ts.map +1 -0
- package/data/build/dist/host/terminal/attachment-registry.js.map +1 -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.map +1 -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.map +1 -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.map +1 -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.map +1 -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.map +1 -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.map +1 -0
- package/data/build/dist/host/terminal/controller-factory.d.ts.map +1 -0
- package/data/build/dist/host/terminal/controller-factory.js.map +1 -0
- package/data/build/dist/host/terminal/index.d.ts.map +1 -0
- package/data/build/dist/host/terminal/index.js.map +1 -0
- package/data/build/dist/host/terminal/runtime-adapter.d.ts.map +1 -0
- package/data/build/dist/host/terminal/runtime-adapter.js.map +1 -0
- package/data/build/dist/host/terminal/runtime-manager.d.ts.map +1 -0
- package/data/build/dist/host/terminal/runtime-manager.js.map +1 -0
- package/data/build/dist/host/terminal/shell-detection.d.ts.map +1 -0
- package/data/build/dist/host/terminal/shell-detection.js.map +1 -0
- package/data/build/dist/host/terminal/startup.d.ts.map +1 -0
- package/data/build/dist/host/terminal/startup.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-controller.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-controller.js.map +1 -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.map +1 -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.map +1 -0
- package/data/build/dist/host/terminal/terminal-service.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-service.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-store.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-store.js.map +1 -0
- package/data/build/dist/index.d.ts +2 -2
- package/data/build/dist/index.d.ts.map +1 -0
- package/data/build/dist/index.js +2 -2
- package/data/build/dist/index.js.map +1 -0
- package/data/build/dist/shared/contracts/auth.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/auth.js.map +1 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +35 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/cli-adapter.js.map +1 -0
- package/data/build/dist/shared/contracts/command-code.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/command-code.js.map +1 -0
- package/data/build/dist/shared/contracts/config.d.ts +89 -0
- package/data/build/dist/shared/contracts/config.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/config.js +92 -0
- package/data/build/dist/shared/contracts/config.js.map +1 -0
- package/data/build/dist/shared/contracts/debug-config.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/debug-config.js.map +1 -0
- package/data/build/dist/shared/contracts/debug.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/debug.js.map +1 -0
- package/data/build/dist/shared/contracts/dsh-device.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/dsh-device.js.map +1 -0
- package/data/build/dist/shared/contracts/errors.d.ts +2 -2
- package/data/build/dist/shared/contracts/errors.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/errors.js.map +1 -0
- package/data/build/dist/shared/contracts/feature.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/feature.js.map +1 -0
- package/data/build/dist/shared/contracts/file-management.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/file-management.js.map +1 -0
- package/data/build/dist/shared/contracts/git.d.ts +15 -1
- package/data/build/dist/shared/contracts/git.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/git.js.map +1 -0
- package/data/build/dist/shared/contracts/host-status.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/host-status.js.map +1 -0
- package/data/build/dist/shared/contracts/lan-access-dsh.d.ts +23 -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.map +1 -0
- package/data/build/dist/shared/contracts/peer-host.d.ts +160 -1
- package/data/build/dist/shared/contracts/peer-host.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/peer-host.js +73 -0
- package/data/build/dist/shared/contracts/peer-host.js.map +1 -0
- package/data/build/dist/shared/contracts/signaling.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/signaling.js.map +1 -0
- package/data/build/dist/shared/contracts/subscription.d.ts +15 -0
- package/data/build/dist/shared/contracts/subscription.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/subscription.js.map +1 -0
- package/data/build/dist/shared/contracts/terminal-process.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/terminal-process.js.map +1 -0
- package/data/build/dist/shared/contracts/terminal.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/terminal.js.map +1 -0
- package/data/build/dist/shared/contracts/transport.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/transport.js.map +1 -0
- package/data/build/dist/shared/contracts/version.d.ts +14 -6
- package/data/build/dist/shared/contracts/version.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/version.js +23 -8
- package/data/build/dist/shared/contracts/version.js.map +1 -0
- package/data/build/dist/shared/debug.d.ts.map +1 -0
- package/data/build/dist/shared/debug.js.map +1 -0
- package/data/build/dist/shared/index.d.ts +6 -6
- package/data/build/dist/shared/index.d.ts.map +1 -0
- package/data/build/dist/shared/index.js +3 -3
- package/data/build/dist/shared/index.js.map +1 -0
- package/data/build/dist/transport/carrier.d.ts.map +1 -0
- package/data/build/dist/transport/carrier.js.map +1 -0
- package/data/build/dist/transport/debug.d.ts.map +1 -0
- package/data/build/dist/transport/debug.js +2 -0
- package/data/build/dist/transport/debug.js.map +1 -0
- package/data/build/dist/transport/dsh-envelope.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-envelope.js.map +1 -0
- package/data/build/dist/transport/dsh-gateway.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-gateway.js.map +1 -0
- package/data/build/dist/transport/dsh-session.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-session.js.map +1 -0
- package/data/build/dist/transport/dsh-transport.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-transport.js.map +1 -0
- package/data/build/dist/transport/frame.d.ts.map +1 -0
- package/data/build/dist/transport/frame.js.map +1 -0
- package/data/build/dist/transport/index.d.ts +1 -1
- package/data/build/dist/transport/index.d.ts.map +1 -0
- package/data/build/dist/transport/index.js +1 -1
- package/data/build/dist/transport/index.js.map +1 -0
- package/data/build/dist/transport/multiplexer.d.ts.map +1 -0
- package/data/build/dist/transport/multiplexer.js.map +1 -0
- package/data/build/dist/transport/webrtc-client.d.ts +8 -0
- package/data/build/dist/transport/webrtc-client.d.ts.map +1 -0
- package/data/build/dist/transport/webrtc-client.js +135 -9
- package/data/build/dist/transport/webrtc-client.js.map +1 -0
- package/data/build/dist/transport/webrtc-host.d.ts.map +1 -0
- package/data/build/dist/transport/webrtc-host.js +5 -1
- package/data/build/dist/transport/webrtc-host.js.map +1 -0
- package/data/build/dist/typert.host.d.ts.map +1 -0
- package/data/build/dist/typert.host.js.map +1 -0
- package/data/build/dist/typert.remote-client.d.ts.map +1 -0
- package/data/build/dist/typert.remote-client.js.map +1 -0
- package/package.json +36 -19
- package/profile/README.md +18 -5
- package/profile/package.json +3 -3
- package/profile/scripts/check-dsh-install.mjs +100 -9
- package/profile/version.json +3 -3
- package/scripts/check-dsh-install.mjs +98 -17
- package/version.json +3 -3
- package/data/build/dist/client/host-navigation.d.ts +0 -29
- package/data/build/dist/client/host-navigation.js +0 -29
- package/data/build/dist/client/peer-host-native-session-ui.d.ts +0 -60
- package/data/build/dist/client/peer-host-native-session-ui.js +0 -372
|
@@ -1,89 +1,632 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElement } from 'react';
|
|
2
2
|
import { startPeerHostManagementPanel } from '../peer-host-management-panel.js';
|
|
3
|
-
import { startPeerHostNativeNavigation, startPeerHostNativeSession } from '../peer-host-native-session-ui.js';
|
|
4
3
|
import { createPeerHostManagementApi } from '../peer-host-management-api.js';
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
import { DSH_PEER_HOST_PREBOOT_SHIM_GLOBAL, readDshPeerHostPrebootShimMode, readDshPeerHostPrebootShimState } from '../../bootstrap/dsh-peer-host-preboot-shim.js';
|
|
5
|
+
import { dshSettingsNoteStyle, dshThemeColor } from '../theme.js';
|
|
6
|
+
import { createVirtualSessionId, createVirtualWorkspaceId, parseVirtualSessionId } from '../../shared/index.js';
|
|
7
|
+
import { decodeNativeResponseBytes, isDshNativeRemoteMethod } from '../../host/modules/peer-host/peer-host-native-protocol.js';
|
|
8
|
+
import { createPeerHostNativeProjection } from '../peer-host-native-projection.js';
|
|
9
|
+
import { installPeerHostNativeStoreProjection, refreshPeerHostNativeSessions } from '../peer-host-native-store-projection.js';
|
|
10
|
+
import { startPeerHostWorkspaceTag } from '../peer-host-workspace-tag.js';
|
|
11
|
+
import { startPeerHostWorkspaceTab } from '../peer-host-workspace-tab.js';
|
|
12
|
+
import { registerPeerHostAggregateRefresh, requestPeerHostAggregateRefresh } from '../peer-host-aggregate-refresh.js';
|
|
13
|
+
import { useCodingNsTranslator } from '../locale.js';
|
|
14
|
+
import { publishSessionAdapter } from '../session-adapter-cache.js';
|
|
15
|
+
/** 聚合刷新周期;远端资源只影响自身节点,刷新失败不改变本机界面。 */
|
|
16
|
+
const PEER_HOST_AGGREGATE_REFRESH_MS = 30_000;
|
|
17
|
+
/** 新建会话尚未出现在聚合摘要时,临时保留其远端作用域的最长时间。 */
|
|
18
|
+
const PEER_HOST_PENDING_SESSION_SCOPE_TTL_MS = 30_000;
|
|
19
|
+
/** PeerHost Client 模块的边界声明;远端凭据和目标连接始终由 Host 侧持有。 */
|
|
7
20
|
export const peerHostFeature = {
|
|
8
21
|
descriptor: {
|
|
9
22
|
name: 'peerHost',
|
|
10
23
|
version: '0.1.0',
|
|
11
24
|
enabledByDefault: false,
|
|
12
|
-
// PeerHost 暂停启用,待 Host-to-Host/relay 在真实 DSH 环境完成验收后再开放。
|
|
13
|
-
disabled: true,
|
|
14
25
|
dependencies: [],
|
|
15
26
|
runtime: 'client',
|
|
16
27
|
requires: [
|
|
28
|
+
// 页面 Transport 不可包装(shim 未注入或形状未知)时只停用 PeerHost,
|
|
29
|
+
// 不再提示"请刷新"——这属于结构不支持,刷新不会改变结果。
|
|
30
|
+
{ capability: 'peer-host.client-preboot-transport', required: false, fallback: 'disable' },
|
|
17
31
|
{ capability: 'peer-host.native-navigation', required: false, fallback: 'degrade' },
|
|
18
32
|
{ capability: 'peer-host.remote-web-context-fallback', required: false, fallback: 'degrade' },
|
|
19
33
|
],
|
|
20
34
|
ui: {
|
|
21
|
-
label: '
|
|
22
|
-
|
|
35
|
+
label: 'Manage other DSH Hosts',
|
|
36
|
+
labelKey: 'feature.peerHost.label',
|
|
37
|
+
description: 'Aggregate sessions from multiple Hosts',
|
|
38
|
+
descriptionKey: 'feature.peerHost.description',
|
|
23
39
|
order: 50,
|
|
24
40
|
defaultOpen: false,
|
|
25
41
|
},
|
|
26
42
|
},
|
|
27
43
|
start: async (context) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const
|
|
44
|
+
const shim = globalThis[DSH_PEER_HOST_PREBOOT_SHIM_GLOBAL];
|
|
45
|
+
const projection = createPeerHostNativeProjection();
|
|
46
|
+
const transport = shim === undefined ? undefined : createPeerHostPageTransport(projection);
|
|
47
|
+
if (shim !== undefined) {
|
|
48
|
+
shim.activate(transport.hooks);
|
|
49
|
+
context.resources.add(() => { shim.deactivate(); });
|
|
50
|
+
// 原生侧栏在插件 apply 时按引用捕获 `workspaces.list`,只能就地投影这个对象;
|
|
51
|
+
// 没有 shim 就没有原生 Remote 路由,此时不注入,避免出现点不开的远端条目。
|
|
52
|
+
context.resources.add(installPeerHostNativeStoreProjection({ uiContext: context.services.uiContext, projection }));
|
|
53
|
+
// Desktop 的 Transport 只有 `{ ownsHost, streamBaseUrl }`,shim 不提供 `rpc`,
|
|
54
|
+
// 因此 DSH 用原生 `createWebConnectionRpc` 建立了 Connection。这里在 Connection
|
|
55
|
+
// 就绪后就地补聚合分流:`rpc.call` 上放行聚合请求,本机流在 Remote 服务的
|
|
56
|
+
// `openRemoteStream` 处原样落回 DSH 自己的实现(含 uplink 与原生 mux)。
|
|
57
|
+
if (shim.getMode?.() === 'desktop') {
|
|
58
|
+
const route = installPeerHostConnectionRouting({
|
|
59
|
+
...(context.services.uiContext === undefined ? {} : { uiContext: context.services.uiContext }),
|
|
60
|
+
...(context.services.remote === undefined ? {} : { remote: context.services.remote }),
|
|
61
|
+
hooks: transport.hooks,
|
|
62
|
+
matchesScope: transport.matchesScope,
|
|
63
|
+
decorateLocalResult: (method, result) => method === 'session/list' ? mergeSessionListResult(result, projection) : result,
|
|
64
|
+
});
|
|
65
|
+
if (route !== undefined)
|
|
66
|
+
context.resources.add(route);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const panel = startPeerHostManagementPanel({ rpc: context.services.rpc, locale: context.services.locale });
|
|
31
70
|
context.resources.add(() => panel.dispose());
|
|
32
71
|
const management = createPeerHostManagementApi(context.services.rpc);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
72
|
+
// 工作区标签:远端工作区不再把 Host 名写进标题文本,改由彩色标签表达归属。
|
|
73
|
+
const tag = startPeerHostWorkspaceTag();
|
|
74
|
+
context.resources.add(() => tag.dispose());
|
|
75
|
+
// 原生"添加工作区"对话框保持主体不变,只额外挂一个"远程 HOST"标签页。
|
|
76
|
+
const workspaceTab = startPeerHostWorkspaceTab({
|
|
77
|
+
api: management,
|
|
78
|
+
onWorkspaceAdded: () => refresh(),
|
|
79
|
+
locale: context.services.locale,
|
|
80
|
+
});
|
|
81
|
+
context.resources.add(() => workspaceTab.dispose());
|
|
82
|
+
// 虚拟会话必须进入原生 SessionManager 目录(否则 sessions.retain 解析失败),
|
|
83
|
+
// 因此聚合变化后触发一次原生列表刷新,由页面 Transport 在 session/list 响应里补齐。
|
|
84
|
+
const refresh = async () => {
|
|
42
85
|
try {
|
|
43
|
-
|
|
86
|
+
const aggregate = await management.aggregate();
|
|
87
|
+
tag.setAggregate(aggregate);
|
|
88
|
+
if (transport?.setAggregate(aggregate) === true) {
|
|
89
|
+
await refreshPeerHostNativeSessions(context.services.uiContext);
|
|
90
|
+
}
|
|
44
91
|
}
|
|
45
92
|
catch {
|
|
46
|
-
|
|
93
|
+
// 单个 Host 的摘要失败由聚合层降级,不阻断本机原生工作区与会话。
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
// 归档入口等原生操作完成后可以立刻请求刷新,而不必等待下一个周期。
|
|
97
|
+
context.resources.add(registerPeerHostAggregateRefresh(refresh));
|
|
98
|
+
await refresh();
|
|
99
|
+
const timer = setInterval(() => { void refresh(); }, PEER_HOST_AGGREGATE_REFRESH_MS);
|
|
100
|
+
const onVisibilityChange = () => {
|
|
101
|
+
if (typeof document !== 'undefined' && document.visibilityState === 'visible')
|
|
102
|
+
void refresh();
|
|
103
|
+
};
|
|
104
|
+
if (typeof document !== 'undefined')
|
|
105
|
+
document.addEventListener('visibilitychange', onVisibilityChange);
|
|
106
|
+
context.resources.add(() => {
|
|
107
|
+
clearInterval(timer);
|
|
108
|
+
if (typeof document !== 'undefined')
|
|
109
|
+
document.removeEventListener('visibilitychange', onVisibilityChange);
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
settingsPanel: PeerHostPanel,
|
|
113
|
+
};
|
|
114
|
+
/** 将 DSH preboot shim 绑定到当前页面的 Host RPC;不调用 Connection.rpc,避免递归。 */
|
|
115
|
+
export function createPeerHostPageTransport(projection = createPeerHostNativeProjection()) {
|
|
116
|
+
const fetchImpl = typeof globalThis.fetch === 'function' ? globalThis.fetch.bind(globalThis) : undefined;
|
|
117
|
+
const scopes = new Map();
|
|
118
|
+
const remoteHostScopes = new Map();
|
|
119
|
+
const request = async (channel, endpoint, payload, signal) => {
|
|
120
|
+
if (fetchImpl === undefined)
|
|
121
|
+
throw new Error('当前页面没有 fetch');
|
|
122
|
+
const body = JSON.stringify({ type: 'client-request', rpcId: createRequestId(), method: endpoint, payload });
|
|
123
|
+
const paths = [`${channel.replace(/\/$/u, '')}/${endpoint.replace(/^\//u, '')}`, `/api${channel.replace(/\/$/u, '')}/${endpoint.replace(/^\//u, '')}`];
|
|
124
|
+
let response;
|
|
125
|
+
for (const path of paths) {
|
|
126
|
+
response = await fetchImpl(path, { method: 'POST', headers: { 'content-type': 'application/json' }, body, ...(signal === undefined ? {} : { signal }) });
|
|
127
|
+
if (response.status !== 404 && response.status !== 405)
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
if (response === undefined || !response.ok)
|
|
131
|
+
throw new Error(`transport failure: HTTP ${response?.status ?? 500}`);
|
|
132
|
+
const envelope = await response.json();
|
|
133
|
+
return envelope.result;
|
|
134
|
+
};
|
|
135
|
+
const codingNsCall = async (endpoint, payload, signal) => {
|
|
136
|
+
const result = asRecord(await request('/codingns', endpoint, payload, signal));
|
|
137
|
+
if (result?.ok === true)
|
|
138
|
+
return result.value;
|
|
139
|
+
const error = asRecord(result?.error);
|
|
140
|
+
const failure = new Error(typeof error?.message === 'string' ? error.message : `CodingNS RPC 失败: ${endpoint}`);
|
|
141
|
+
// 保留稳定错误码,让 DSH 的 Remote 失败装上原始 code 而不是退化成 carrierFailure。
|
|
142
|
+
if (typeof error?.code === 'string')
|
|
143
|
+
failure.code = error.code;
|
|
144
|
+
throw failure;
|
|
145
|
+
};
|
|
146
|
+
const findScope = (value) => {
|
|
147
|
+
if (typeof value === 'string') {
|
|
148
|
+
const session = scopes.get(value);
|
|
149
|
+
if (session !== undefined)
|
|
150
|
+
return session;
|
|
151
|
+
const workspace = scopes.get(value);
|
|
152
|
+
if (workspace !== undefined)
|
|
153
|
+
return workspace;
|
|
154
|
+
return undefined;
|
|
155
|
+
}
|
|
156
|
+
if (Array.isArray(value)) {
|
|
157
|
+
for (const item of value) {
|
|
158
|
+
const found = findScope(item);
|
|
159
|
+
if (found !== undefined)
|
|
160
|
+
return found;
|
|
47
161
|
}
|
|
162
|
+
return undefined;
|
|
48
163
|
}
|
|
49
|
-
|
|
50
|
-
if (
|
|
164
|
+
const object = asRecord(value);
|
|
165
|
+
if (object === null)
|
|
166
|
+
return undefined;
|
|
167
|
+
for (const item of Object.values(object)) {
|
|
168
|
+
const found = findScope(item);
|
|
169
|
+
if (found !== undefined)
|
|
170
|
+
return found;
|
|
171
|
+
}
|
|
172
|
+
return undefined;
|
|
173
|
+
};
|
|
174
|
+
const cliEndpoint = (channel, endpoint) => {
|
|
175
|
+
if (channel === '/codingns' && endpoint.startsWith('cli/'))
|
|
176
|
+
return endpoint;
|
|
177
|
+
if (channel === '/api' && endpoint.startsWith('codingns/cli/'))
|
|
178
|
+
return endpoint.slice('codingns/'.length);
|
|
179
|
+
return undefined;
|
|
180
|
+
};
|
|
181
|
+
const rewriteCliPayload = (value, scope, key = '') => {
|
|
182
|
+
if (typeof value === 'string') {
|
|
183
|
+
const parsed = parseVirtualSessionId(value);
|
|
184
|
+
const isSessionField = key === 'sessionId' || key === 'parentSessionId' || key === 'childSessionId';
|
|
185
|
+
return isSessionField && parsed !== null && parsed.hostId === (scope.targetHostId ?? scope.hostId) ? parsed.sessionId : value;
|
|
186
|
+
}
|
|
187
|
+
if (Array.isArray(value))
|
|
188
|
+
return value.map((item) => rewriteCliPayload(item, scope, key));
|
|
189
|
+
const record = asRecord(value);
|
|
190
|
+
if (record === null)
|
|
191
|
+
return value;
|
|
192
|
+
return Object.fromEntries(Object.entries(record).map(([childKey, child]) => [childKey, rewriteCliPayload(child, scope, childKey)]));
|
|
193
|
+
};
|
|
194
|
+
const remoteCliRpc = async (scope, endpoint, payload, signal) => {
|
|
195
|
+
if (scope.targetHostId === null)
|
|
196
|
+
throw new Error('PeerHost CLI 请求缺少目标 Host');
|
|
197
|
+
const response = asRecord(await codingNsCall('peerHost/request', {
|
|
198
|
+
peerHostId: scope.targetHostId,
|
|
199
|
+
scope,
|
|
200
|
+
path: `/api/codingns/${endpoint}`,
|
|
201
|
+
method: 'POST',
|
|
202
|
+
body: JSON.stringify({ rpcId: createRequestId(), method: endpoint, payload: rewriteCliPayload(payload, scope) }),
|
|
203
|
+
}, signal));
|
|
204
|
+
const status = typeof response?.status === 'number' ? response.status : 500;
|
|
205
|
+
const body = typeof response?.body === 'string' ? response.body : '';
|
|
206
|
+
if (status < 200 || status >= 300)
|
|
207
|
+
throw new Error(`远端 Host CLI RPC 失败: HTTP ${status}`);
|
|
208
|
+
try {
|
|
209
|
+
const envelope = asRecord(JSON.parse(body));
|
|
210
|
+
return envelope?.result;
|
|
211
|
+
}
|
|
212
|
+
catch {
|
|
213
|
+
throw new Error('远端 Host CLI RPC 响应不是 JSON');
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
const mergeRemoteAdapterMap = async (localResult, signal) => {
|
|
217
|
+
const localEnvelope = asRecord(localResult);
|
|
218
|
+
if (localEnvelope?.ok !== true || !Array.isArray(localEnvelope.value))
|
|
219
|
+
return localResult;
|
|
220
|
+
const rows = [...localEnvelope.value];
|
|
221
|
+
for (const [targetHostId, scope] of remoteHostScopes) {
|
|
51
222
|
try {
|
|
52
|
-
|
|
223
|
+
const remoteEnvelope = asRecord(await remoteCliRpc(scope, 'cli/session/adapter-map', {}, signal));
|
|
224
|
+
if (remoteEnvelope?.ok !== true || !Array.isArray(remoteEnvelope.value))
|
|
225
|
+
continue;
|
|
226
|
+
for (const raw of remoteEnvelope.value) {
|
|
227
|
+
const row = asRecord(raw);
|
|
228
|
+
const sessionId = typeof row?.sessionId === 'string' ? row.sessionId : '';
|
|
229
|
+
const adapterId = typeof row?.adapterId === 'string' ? row.adapterId : '';
|
|
230
|
+
if (sessionId !== '' && adapterId !== '')
|
|
231
|
+
rows.push({ sessionId: createVirtualSessionId(targetHostId, sessionId), adapterId });
|
|
232
|
+
}
|
|
53
233
|
}
|
|
54
234
|
catch {
|
|
55
|
-
|
|
56
|
-
aggregateError = new Error('PeerHost 实时通道端点不可用');
|
|
235
|
+
// 旧版目标 Host 没有 CLI 映射时保留本机结果,远端会话仍可打开。
|
|
57
236
|
}
|
|
58
237
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
238
|
+
return { ...localEnvelope, value: rows };
|
|
239
|
+
};
|
|
240
|
+
const openRemoteStream = (method, payload, scope, signal) => (async function* () {
|
|
241
|
+
const opened = asRecord(await codingNsCall('peerHost/nativeStream', { method, payload, scope }, signal));
|
|
242
|
+
const streamId = typeof opened?.streamId === 'string' ? opened.streamId : '';
|
|
243
|
+
if (streamId === '')
|
|
244
|
+
throw new Error('PeerHost 原生 Remote 未返回 streamId');
|
|
245
|
+
try {
|
|
246
|
+
while (!(signal?.aborted ?? false)) {
|
|
247
|
+
const next = asRecord(await codingNsCall('peerHost/nativeStreamNext', { streamId, scope }, signal));
|
|
248
|
+
if (next?.done === true)
|
|
249
|
+
return;
|
|
250
|
+
yield decodeNativeResponseBytes(next?.value);
|
|
251
|
+
}
|
|
252
|
+
signal?.throwIfAborted();
|
|
253
|
+
}
|
|
254
|
+
finally {
|
|
255
|
+
await codingNsCall('peerHost/nativeStreamClose', { streamId, scope }).catch(() => undefined);
|
|
256
|
+
}
|
|
257
|
+
})();
|
|
258
|
+
const pendingSessionScopes = new Map();
|
|
259
|
+
const forgetPendingSession = (sessionId) => {
|
|
260
|
+
const pending = pendingSessionScopes.get(sessionId);
|
|
261
|
+
if (pending === undefined)
|
|
262
|
+
return undefined;
|
|
263
|
+
clearTimeout(pending.timer);
|
|
264
|
+
pendingSessionScopes.delete(sessionId);
|
|
265
|
+
return pending;
|
|
266
|
+
};
|
|
267
|
+
const rememberCreatedSession = (scope, value) => {
|
|
268
|
+
const sessionId = asRecord(value)?.sessionId;
|
|
269
|
+
if (typeof sessionId !== 'string')
|
|
270
|
+
return;
|
|
271
|
+
const parsed = parseVirtualSessionId(sessionId);
|
|
272
|
+
if (parsed === null)
|
|
273
|
+
return;
|
|
274
|
+
// 只接受目标 Host 自己编码回来的虚拟 ID,避免把别的 Host 的会话挂到当前作用域。
|
|
275
|
+
if (parsed.hostId !== (scope.targetHostId ?? scope.hostId))
|
|
276
|
+
return;
|
|
277
|
+
const created = { ...scope, sessionId: parsed.sessionId };
|
|
278
|
+
const expiresAt = Date.now() + PEER_HOST_PENDING_SESSION_SCOPE_TTL_MS;
|
|
279
|
+
const previous = forgetPendingSession(sessionId);
|
|
280
|
+
if (previous !== undefined && scopes.get(sessionId) === previous.scope)
|
|
281
|
+
scopes.delete(sessionId);
|
|
282
|
+
const timer = setTimeout(() => {
|
|
283
|
+
const pending = pendingSessionScopes.get(sessionId);
|
|
284
|
+
if (pending === undefined || pending.expiresAt !== expiresAt)
|
|
285
|
+
return;
|
|
286
|
+
pendingSessionScopes.delete(sessionId);
|
|
287
|
+
// 聚合确认后 scopes 会持有新的对象;只清理仍由 pending 持有的旧作用域。
|
|
288
|
+
if (scopes.get(sessionId) === pending.scope)
|
|
289
|
+
scopes.delete(sessionId);
|
|
290
|
+
}, PEER_HOST_PENDING_SESSION_SCOPE_TTL_MS);
|
|
291
|
+
timer.unref?.();
|
|
292
|
+
pendingSessionScopes.set(sessionId, { scope: created, expiresAt, timer });
|
|
293
|
+
scopes.set(sessionId, created);
|
|
294
|
+
};
|
|
295
|
+
const hooks = {
|
|
296
|
+
rpc: async ({ method, payload, signal }) => {
|
|
297
|
+
const value = asRecord(payload);
|
|
298
|
+
const channel = typeof value?.channel === 'string' ? value.channel : '/codingns';
|
|
299
|
+
const body = value?.payload;
|
|
300
|
+
const cli = cliEndpoint(channel, method);
|
|
301
|
+
if (cli === 'cli/session/adapter-map') {
|
|
302
|
+
return await mergeRemoteAdapterMap(await request(channel, method, body, signal), signal);
|
|
303
|
+
}
|
|
304
|
+
if (cli !== undefined) {
|
|
305
|
+
const scope = findScope(body);
|
|
306
|
+
if (scope !== undefined && scope.targetHostId !== null) {
|
|
307
|
+
try {
|
|
308
|
+
return await remoteCliRpc(scope, cli, body, signal);
|
|
309
|
+
}
|
|
310
|
+
catch (error) {
|
|
311
|
+
return { ok: false, error: { code: 'gateway/internal', message: error instanceof Error ? error.message : String(error) } };
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
if (channel === '/api' && isDshNativeRemoteMethod(method)) {
|
|
316
|
+
const scope = findScope(body);
|
|
317
|
+
if (scope !== undefined && scope.targetHostId !== null) {
|
|
318
|
+
// DSH 的 client 契约要求 unary 结果是 `{ok, value}` / `{ok:false, error}` 信封:
|
|
319
|
+
// 返回裸值会让网关在 `rebuiltFailure(result.error)` 读 undefined.code 而崩成 carrierFailure。
|
|
320
|
+
try {
|
|
321
|
+
const created = decodeNativeResponseBytes(await codingNsCall('peerHost/native', { method, payload: body, scope }, signal));
|
|
322
|
+
if (method === 'session/create' || method === 'session/fork') {
|
|
323
|
+
rememberCreatedSession(scope, created);
|
|
324
|
+
// 侧栏按聚合摘要里的 workspace.sessionIds 归组,新会话只有在刷新后的摘要里
|
|
325
|
+
// 才会挂到远端工作区。不立刻刷新,它会先落在"未分组/本机默认工作区",
|
|
326
|
+
// 看起来像新建到了本机。刷新失败不影响创建结果。
|
|
327
|
+
void Promise.resolve(requestPeerHostAggregateRefresh()).catch(() => undefined);
|
|
328
|
+
}
|
|
329
|
+
return { ok: true, value: created };
|
|
330
|
+
}
|
|
331
|
+
catch (error) {
|
|
332
|
+
const code = error.code;
|
|
333
|
+
return {
|
|
334
|
+
ok: false,
|
|
335
|
+
error: { code: typeof code === 'string' ? code : 'gateway/internal', message: error instanceof Error ? error.message : String(error) },
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
const result = await request(channel, method, body, signal);
|
|
341
|
+
// 原生会话目录必须认识远端会话,否则点击时会因 sessions.retain 解析失败而打不开。
|
|
342
|
+
if (channel === '/api' && method === 'session/list')
|
|
343
|
+
return mergeSessionListResult(result, projection);
|
|
344
|
+
return result;
|
|
345
|
+
},
|
|
346
|
+
openStream: ({ method, payload, signal }) => {
|
|
347
|
+
const value = asRecord(payload);
|
|
348
|
+
const channel = typeof value?.channel === 'string' ? value.channel : '/api';
|
|
349
|
+
const body = value?.payload;
|
|
350
|
+
if (channel === '/api' && isDshNativeRemoteMethod(method)) {
|
|
351
|
+
const scope = findScope(body);
|
|
352
|
+
if (scope !== undefined && scope.targetHostId !== null) {
|
|
353
|
+
return openRemoteStream(method, body, scope, signal);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
// 本机流(含 $events 等非白名单流)必须回到 DSH Gateway:本地 baseline 不能
|
|
357
|
+
// 走 PeerHost,否则原生 workspace/session Store 会整体停在 loading。
|
|
358
|
+
if (channel !== '/api')
|
|
359
|
+
throw new Error('CODINGNS_BASELINE_STREAM');
|
|
360
|
+
return openDshGatewayStream(method, body, signal);
|
|
361
|
+
},
|
|
362
|
+
fetch: (input, init) => {
|
|
363
|
+
if (fetchImpl === undefined)
|
|
364
|
+
return Promise.reject(new Error('当前页面没有 fetch'));
|
|
365
|
+
return fetchImpl(input, init);
|
|
366
|
+
},
|
|
367
|
+
};
|
|
368
|
+
return {
|
|
369
|
+
hooks,
|
|
370
|
+
/** 该请求是否落在某个远端 Host 的作用域内;Desktop 连接路由用它决定是否分流。 */
|
|
371
|
+
matchesScope(value) {
|
|
372
|
+
const scope = findScope(value);
|
|
373
|
+
return scope !== undefined && scope.targetHostId !== null;
|
|
374
|
+
},
|
|
375
|
+
setAggregate(aggregate) {
|
|
376
|
+
scopes.clear();
|
|
377
|
+
remoteHostScopes.clear();
|
|
378
|
+
for (const host of aggregate) {
|
|
379
|
+
if (host.targetHostId !== null) {
|
|
380
|
+
remoteHostScopes.set(host.targetHostId, { hostId: host.hostId, targetHostId: host.targetHostId, workspaceId: '__aggregate__', sessionId: null, scopeGeneration: 0 });
|
|
381
|
+
}
|
|
382
|
+
for (const workspace of host.workspaces) {
|
|
383
|
+
const virtualHostId = host.targetHostId ?? host.hostId;
|
|
384
|
+
const virtualWorkspaceId = createVirtualWorkspaceId(virtualHostId, workspace.workspaceId);
|
|
385
|
+
const workspaceScope = { hostId: host.hostId, targetHostId: host.targetHostId, workspaceId: workspace.workspaceId, sessionId: null, scopeGeneration: 0 };
|
|
386
|
+
scopes.set(virtualWorkspaceId, workspaceScope);
|
|
387
|
+
// 归档会话也要能解析作用域:取消归档请求按虚拟会话 ID 路由到目标 Host。
|
|
388
|
+
for (const session of [...workspace.sessions, ...(workspace.archivedSessions ?? [])]) {
|
|
389
|
+
if (session.scope.sessionId === null)
|
|
390
|
+
continue;
|
|
391
|
+
scopes.set(createVirtualSessionId(virtualHostId, session.scope.sessionId), { ...workspaceScope, sessionId: session.scope.sessionId });
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
// 刚创建、尚未进入聚合的会话要保住作用域;聚合里已存在的以聚合为准。
|
|
396
|
+
// 一旦聚合确认,pending 记录立即清掉;之后远端删除会随下一次聚合重建自然移除。
|
|
397
|
+
const now = Date.now();
|
|
398
|
+
for (const [sessionId, pending] of [...pendingSessionScopes]) {
|
|
399
|
+
if (scopes.has(sessionId)) {
|
|
400
|
+
forgetPendingSession(sessionId);
|
|
401
|
+
continue;
|
|
402
|
+
}
|
|
403
|
+
if (pending.expiresAt <= now) {
|
|
404
|
+
forgetPendingSession(sessionId);
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
407
|
+
scopes.set(sessionId, pending.scope);
|
|
408
|
+
}
|
|
409
|
+
return projection.setAggregate(aggregate);
|
|
410
|
+
},
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Desktop 拓扑下把 PeerHost 聚合路由挂到 DSH 原生 Connection 上。
|
|
415
|
+
*
|
|
416
|
+
* Desktop 的页面 Transport 只有 `{ ownsHost, streamBaseUrl }`,DSH 因此用原生
|
|
417
|
+
* `createWebConnectionRpc(transport.fetch)` 建立 `connection.rpc`。shim 不接管这个
|
|
418
|
+
* `rpc`,所以聚合分流必须在这里就地补齐:
|
|
419
|
+
*
|
|
420
|
+
* - `rpc.call`:聚合范围内的请求交给页面 Transport;其余原样委派原生 `call`,
|
|
421
|
+
* 因此 multipart 附件解析、rpcId 校验等原生语义完全保留。本机 `session/list`
|
|
422
|
+
* 需要并入虚拟会话,否则远端会话进不了原生会话目录。
|
|
423
|
+
* - `remote.openRemoteStream`:聚合流交给页面 Transport;本机流原样落回 DSH 自己的
|
|
424
|
+
* 实现,`connection.rpc.open` 始终保持 undefined,网关的 mux 启动与重连判断
|
|
425
|
+
* 因此完全没被改动。
|
|
426
|
+
*/
|
|
427
|
+
export function installPeerHostConnectionRouting(options) {
|
|
428
|
+
const connection = readConnectionHandle(options.uiContext);
|
|
429
|
+
const rpc = connection?.rpc;
|
|
430
|
+
const remote = readRemoteService(options.remote);
|
|
431
|
+
if (rpc === undefined || remote === undefined)
|
|
432
|
+
return undefined;
|
|
433
|
+
const originalCall = typeof rpc.call === 'function' ? rpc.call : undefined;
|
|
434
|
+
if (originalCall === undefined)
|
|
435
|
+
return undefined;
|
|
436
|
+
const originalCallRemote = remote.openRemoteStream;
|
|
437
|
+
const isPeerScoped = (channel, endpoint, payload) => channel === '/api'
|
|
438
|
+
&& isDshNativeRemoteMethod(endpoint)
|
|
439
|
+
&& options.matchesScope(payload);
|
|
440
|
+
const isPeerCli = (channel, endpoint, payload) => {
|
|
441
|
+
const cliEndpoint = channel === '/codingns' && endpoint.startsWith('cli/')
|
|
442
|
+
? endpoint
|
|
443
|
+
: channel === '/api' && endpoint.startsWith('codingns/cli/')
|
|
444
|
+
? endpoint.slice('codingns/'.length)
|
|
445
|
+
: undefined;
|
|
446
|
+
return cliEndpoint !== undefined && (cliEndpoint === 'cli/session/adapter-map' || options.matchesScope(payload));
|
|
447
|
+
};
|
|
448
|
+
rpc.call = async (channel, endpoint, payload, signal) => {
|
|
449
|
+
if (isPeerScoped(channel, endpoint, payload) || isPeerCli(channel, endpoint, payload)) {
|
|
450
|
+
return await options.hooks.rpc({ method: endpoint, payload: { channel, payload }, ...(signal === undefined ? {} : { signal }) });
|
|
451
|
+
}
|
|
452
|
+
const result = await originalCall.call(rpc, channel, endpoint, payload, signal);
|
|
453
|
+
return options.decorateLocalResult === undefined ? result : options.decorateLocalResult(endpoint, result);
|
|
454
|
+
};
|
|
455
|
+
// 聚合流在 `openRemoteStream` 层拦截:本机流原样落回 DSH 自己的实现(原生
|
|
456
|
+
// RemoteStreamMuxClient),因此 uplink 与重连行为都不受影响;也不要动
|
|
457
|
+
// `connection.rpc.open`,否则网关会认为本页自带流通道而不再启动/重连 mux。
|
|
458
|
+
const patchedOpenRemoteStream = (endpoint, payload, signal, uplink, noConnection) => {
|
|
459
|
+
if (typeof options.hooks.openStream === 'function' && isPeerScoped('/api', endpoint, payload)) {
|
|
460
|
+
return options.hooks.openStream({ method: endpoint, payload: { channel: '/api', payload, uplink }, ...(signal === undefined ? {} : { signal }) });
|
|
461
|
+
}
|
|
462
|
+
return originalCallRemote.call(remote, endpoint, payload, signal, uplink, noConnection);
|
|
463
|
+
};
|
|
464
|
+
try {
|
|
465
|
+
remote.openRemoteStream = patchedOpenRemoteStream;
|
|
466
|
+
}
|
|
467
|
+
catch {
|
|
468
|
+
// 服务对象被冻结时不要留下半接管状态:unary 分流同样回滚。
|
|
469
|
+
rpc.call = originalCall;
|
|
470
|
+
return undefined;
|
|
471
|
+
}
|
|
472
|
+
return () => {
|
|
473
|
+
rpc.call = originalCall;
|
|
474
|
+
if (remote.openRemoteStream === patchedOpenRemoteStream)
|
|
475
|
+
remote.openRemoteStream = originalCallRemote;
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
function readRemoteService(remote) {
|
|
479
|
+
if (typeof remote !== 'object' || remote === null)
|
|
480
|
+
return undefined;
|
|
481
|
+
const openRemoteStream = remote.openRemoteStream;
|
|
482
|
+
return typeof openRemoteStream === 'function' ? remote : undefined;
|
|
483
|
+
}
|
|
484
|
+
/** 聚合范围判定复用页面 Transport 的作用域解析,避免两处白名单漂移。 */
|
|
485
|
+
function readConnectionHandle(uiContext) {
|
|
486
|
+
if (uiContext === undefined)
|
|
487
|
+
return undefined;
|
|
488
|
+
try {
|
|
489
|
+
const connection = uiContext.get('connection');
|
|
490
|
+
return typeof connection === 'object' && connection !== null ? connection : undefined;
|
|
491
|
+
}
|
|
492
|
+
catch {
|
|
493
|
+
return undefined;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
/** 把虚拟会话摘要并入 session/list 结果;形状不符时保持本机结果不变。 */
|
|
497
|
+
function mergeSessionListResult(result, projection) {
|
|
498
|
+
const envelope = asRecord(result);
|
|
499
|
+
if (envelope?.ok !== true)
|
|
500
|
+
return result;
|
|
501
|
+
const value = asRecord(envelope.value);
|
|
502
|
+
if (value === null || !Array.isArray(value.items))
|
|
503
|
+
return result;
|
|
504
|
+
const virtual = projection.sessions();
|
|
505
|
+
if (virtual.length === 0)
|
|
506
|
+
return result;
|
|
507
|
+
const known = new Set(value.items.flatMap((item) => {
|
|
508
|
+
const id = asRecord(item)?.sessionId;
|
|
509
|
+
return typeof id === 'string' ? [id] : [];
|
|
510
|
+
}));
|
|
511
|
+
for (const session of virtual) {
|
|
512
|
+
if (session.adapterId !== undefined)
|
|
513
|
+
publishSessionAdapter(session.sessionId, session.adapterId);
|
|
514
|
+
}
|
|
515
|
+
const items = [...value.items, ...virtual.filter((session) => !known.has(session.sessionId))];
|
|
516
|
+
return { ...envelope, value: { ...value, items } };
|
|
517
|
+
}
|
|
518
|
+
function createRequestId() {
|
|
519
|
+
return typeof globalThis.crypto?.randomUUID === 'function' ? globalThis.crypto.randomUUID() : `${Date.now()}-${Math.random()}`;
|
|
520
|
+
}
|
|
521
|
+
function asRecord(value) {
|
|
522
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value) ? value : null;
|
|
523
|
+
}
|
|
524
|
+
/** 打开当前页面 DSH Gateway 的单个 Remote 流;协议与 dsh-api-gateway 保持一致。 */
|
|
525
|
+
function openDshGatewayStream(endpoint, payload, signal) {
|
|
526
|
+
const streamId = `codingns_${Date.now()}_${Math.random().toString(36).slice(2)}`;
|
|
527
|
+
return (async function* () {
|
|
528
|
+
const WebSocketCtor = globalThis.WebSocket;
|
|
529
|
+
if (typeof WebSocketCtor !== 'function')
|
|
530
|
+
throw new Error('当前页面没有可用 WebSocket');
|
|
531
|
+
const transport = globalThis.__DSH_TRANSPORT__;
|
|
532
|
+
const base = transport?.streamBaseUrl ?? (typeof globalThis.location === 'object' ? globalThis.location.href : 'http://localhost/');
|
|
533
|
+
const socketUrl = new URL('/api/remote.mux', base);
|
|
534
|
+
if (socketUrl.protocol === 'http:')
|
|
535
|
+
socketUrl.protocol = 'ws:';
|
|
536
|
+
else if (socketUrl.protocol === 'https:')
|
|
537
|
+
socketUrl.protocol = 'wss:';
|
|
538
|
+
const socket = new WebSocketCtor(socketUrl.href);
|
|
539
|
+
const frames = [];
|
|
540
|
+
let wake;
|
|
541
|
+
let ended = false;
|
|
542
|
+
let failure;
|
|
543
|
+
const notify = () => { const resolve = wake; wake = undefined; resolve?.(); };
|
|
544
|
+
const onMessage = (event) => {
|
|
545
|
+
try {
|
|
546
|
+
const frame = JSON.parse(String(event.data));
|
|
547
|
+
if (frame.streamId !== streamId)
|
|
548
|
+
return;
|
|
549
|
+
if (frame.type === 'end')
|
|
550
|
+
ended = true;
|
|
551
|
+
else if (frame.type === 'error')
|
|
552
|
+
failure = new Error(typeof frame.error?.message === 'string' ? frame.error.message : 'DSH Remote stream 失败');
|
|
553
|
+
else if (frame.type === 'item')
|
|
554
|
+
frames.push(frame.value);
|
|
555
|
+
notify();
|
|
556
|
+
}
|
|
557
|
+
catch (error) {
|
|
558
|
+
failure = error instanceof Error ? error : new Error(String(error));
|
|
559
|
+
notify();
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
const onError = () => { failure = new Error('DSH Remote stream WebSocket 失败'); notify(); };
|
|
563
|
+
const onAbort = () => { failure = signal?.reason instanceof Error ? signal.reason : new Error('DSH Remote stream 已取消'); notify(); };
|
|
564
|
+
socket.addEventListener('message', onMessage);
|
|
565
|
+
socket.addEventListener('error', onError);
|
|
566
|
+
signal?.addEventListener('abort', onAbort, { once: true });
|
|
567
|
+
try {
|
|
568
|
+
await new Promise((resolve, reject) => {
|
|
569
|
+
const opened = () => resolve();
|
|
570
|
+
const failed = () => reject(new Error('DSH Remote stream WebSocket 打开失败'));
|
|
571
|
+
socket.addEventListener('open', opened, { once: true });
|
|
572
|
+
socket.addEventListener('error', failed, { once: true });
|
|
86
573
|
});
|
|
87
|
-
|
|
88
|
-
};
|
|
574
|
+
signal?.throwIfAborted();
|
|
575
|
+
socket.send(JSON.stringify({ type: 'open', streamId, endpoint, payload }));
|
|
576
|
+
while (!ended || frames.length > 0) {
|
|
577
|
+
if (failure !== undefined)
|
|
578
|
+
throw failure;
|
|
579
|
+
if (frames.length === 0) {
|
|
580
|
+
if (ended)
|
|
581
|
+
break;
|
|
582
|
+
await new Promise((resolve) => { wake = resolve; });
|
|
583
|
+
}
|
|
584
|
+
while (frames.length > 0)
|
|
585
|
+
yield frames.shift();
|
|
586
|
+
}
|
|
587
|
+
if (failure !== undefined)
|
|
588
|
+
throw failure;
|
|
589
|
+
}
|
|
590
|
+
finally {
|
|
591
|
+
signal?.removeEventListener('abort', onAbort);
|
|
592
|
+
socket.close(1000, 'stream closed');
|
|
593
|
+
}
|
|
594
|
+
})();
|
|
595
|
+
}
|
|
596
|
+
/** Desktop 壳的页面判据;与 shim 的拓扑识别保持同一组特征。 */
|
|
597
|
+
function isDesktopTopologyPage() {
|
|
598
|
+
if (globalThis.dshDesktopBoot !== undefined)
|
|
599
|
+
return true;
|
|
600
|
+
try {
|
|
601
|
+
return globalThis.location?.protocol?.toLowerCase() === 'dsh-app:';
|
|
602
|
+
}
|
|
603
|
+
catch {
|
|
604
|
+
return false;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
/** PeerHost 启用状态说明;安装动作发生在启动页 preboot 阶段。 */
|
|
608
|
+
function PeerHostPanel({ services, enabled }) {
|
|
609
|
+
const t = useCodingNsTranslator(services.locale);
|
|
610
|
+
// shim 状态在启用变化后可能改变(刚激活为 active),每次渲染都重读全局。
|
|
611
|
+
const state = readDshPeerHostPrebootShimState();
|
|
612
|
+
const mode = readDshPeerHostPrebootShimMode();
|
|
613
|
+
const desktop = mode === 'desktop' || isDesktopTopologyPage();
|
|
614
|
+
const structural = state === 'external' || state === 'not-installed';
|
|
615
|
+
const message = state === 'external'
|
|
616
|
+
? t('peerHost.stateExternal')
|
|
617
|
+
: state === 'not-installed'
|
|
618
|
+
? desktop
|
|
619
|
+
? t('peerHost.stateNotInstalledDesktop')
|
|
620
|
+
: t('peerHost.stateNotInstalledWeb')
|
|
621
|
+
: state === 'requires-reload'
|
|
622
|
+
? t('peerHost.stateRequiresReload')
|
|
623
|
+
: state === 'active'
|
|
624
|
+
? t('peerHost.stateActive')
|
|
625
|
+
: t('peerHost.statePending');
|
|
626
|
+
return createElement('div', {
|
|
627
|
+
role: structural ? 'alert' : 'status',
|
|
628
|
+
'aria-disabled': !enabled,
|
|
629
|
+
style: { ...dshSettingsNoteStyle, color: structural ? dshThemeColor.error : dshThemeColor.labelSecondary, opacity: enabled ? 1 : 0.65 },
|
|
630
|
+
}, message);
|
|
631
|
+
}
|
|
89
632
|
//# sourceMappingURL=peer-host.js.map
|