@jingyi0605/codingns4dsh 0.2.1-beta.6 → 0.2.1-beta.7
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 +4 -4
- package/README.md +19 -5
- package/THIRD_PARTY_NOTICES +5 -0
- package/assets/provider-icons/r4.svg +4 -0
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts +1 -1
- package/data/build/dist/bootstrap/index.d.ts +1 -1
- package/data/build/dist/client/assistant-settings-styles.d.ts.map +1 -1
- package/data/build/dist/client/assistant-settings-styles.js +3 -2
- package/data/build/dist/client/assistant-settings-styles.js.map +1 -1
- package/data/build/dist/client/avatar/catalog-panel.d.ts.map +1 -1
- package/data/build/dist/client/avatar/catalog-panel.js +7 -5
- package/data/build/dist/client/avatar/catalog-panel.js.map +1 -1
- package/data/build/dist/client/avatar/catalog-picker.d.ts.map +1 -1
- package/data/build/dist/client/avatar/catalog-picker.js +2 -1
- package/data/build/dist/client/avatar/catalog-picker.js.map +1 -1
- package/data/build/dist/client/avatar/desktop-bridge.d.ts +7 -3
- package/data/build/dist/client/avatar/desktop-bridge.d.ts.map +1 -1
- package/data/build/dist/client/avatar/desktop-bridge.js +64 -5
- package/data/build/dist/client/avatar/desktop-bridge.js.map +1 -1
- package/data/build/dist/client/avatar/desktop-view.d.ts +4 -0
- package/data/build/dist/client/avatar/desktop-view.d.ts.map +1 -1
- package/data/build/dist/client/avatar/desktop-view.js +82 -5
- package/data/build/dist/client/avatar/desktop-view.js.map +1 -1
- package/data/build/dist/client/avatar/engine.d.ts.map +1 -1
- package/data/build/dist/client/avatar/engine.js +3 -2
- package/data/build/dist/client/avatar/engine.js.map +1 -1
- package/data/build/dist/client/avatar/floating.d.ts +5 -3
- package/data/build/dist/client/avatar/floating.d.ts.map +1 -1
- package/data/build/dist/client/avatar/floating.js +11 -4
- package/data/build/dist/client/avatar/floating.js.map +1 -1
- package/data/build/dist/client/avatar/image.d.ts +1 -1
- package/data/build/dist/client/avatar/image.d.ts.map +1 -1
- package/data/build/dist/client/avatar/image.js +2 -2
- package/data/build/dist/client/avatar/image.js.map +1 -1
- package/data/build/dist/client/avatar/live2d.d.ts +14 -3
- package/data/build/dist/client/avatar/live2d.d.ts.map +1 -1
- package/data/build/dist/client/avatar/live2d.js +62 -9
- package/data/build/dist/client/avatar/live2d.js.map +1 -1
- package/data/build/dist/client/avatar/loading.d.ts.map +1 -1
- package/data/build/dist/client/avatar/loading.js +3 -2
- package/data/build/dist/client/avatar/loading.js.map +1 -1
- package/data/build/dist/client/avatar/notification-bubble.d.ts +26 -0
- package/data/build/dist/client/avatar/notification-bubble.d.ts.map +1 -0
- package/data/build/dist/client/avatar/notification-bubble.js +201 -0
- package/data/build/dist/client/avatar/notification-bubble.js.map +1 -0
- package/data/build/dist/client/avatar/reaction-badge.d.ts +7 -0
- package/data/build/dist/client/avatar/reaction-badge.d.ts.map +1 -0
- package/data/build/dist/client/avatar/reaction-badge.js +11 -0
- package/data/build/dist/client/avatar/reaction-badge.js.map +1 -0
- package/data/build/dist/client/avatar/registry.d.ts +2 -1
- package/data/build/dist/client/avatar/registry.d.ts.map +1 -1
- package/data/build/dist/client/avatar/registry.js.map +1 -1
- package/data/build/dist/client/avatar/settings-panel.d.ts.map +1 -1
- package/data/build/dist/client/avatar/settings-panel.js +7 -5
- package/data/build/dist/client/avatar/settings-panel.js.map +1 -1
- package/data/build/dist/client/avatar/slot.d.ts +2 -1
- package/data/build/dist/client/avatar/slot.d.ts.map +1 -1
- package/data/build/dist/client/avatar/slot.js +5 -4
- package/data/build/dist/client/avatar/slot.js.map +1 -1
- package/data/build/dist/client/avatar/spritesheet.d.ts +4 -2
- package/data/build/dist/client/avatar/spritesheet.d.ts.map +1 -1
- package/data/build/dist/client/avatar/spritesheet.js +18 -9
- package/data/build/dist/client/avatar/spritesheet.js.map +1 -1
- package/data/build/dist/client/bundle.js +5815 -1449
- package/data/build/dist/client/bundle.js.map +1 -1
- package/data/build/dist/client/cli-catalog.d.ts +1 -1
- package/data/build/dist/client/cli-catalog.d.ts.map +1 -1
- package/data/build/dist/client/cli-catalog.js +2 -0
- package/data/build/dist/client/cli-catalog.js.map +1 -1
- package/data/build/dist/client/cli-session-config-cache.d.ts +17 -0
- package/data/build/dist/client/cli-session-config-cache.d.ts.map +1 -0
- package/data/build/dist/client/cli-session-config-cache.js +56 -0
- package/data/build/dist/client/cli-session-config-cache.js.map +1 -0
- package/data/build/dist/client/cli-settings-rpc.d.ts +5 -0
- package/data/build/dist/client/cli-settings-rpc.d.ts.map +1 -0
- package/data/build/dist/client/cli-settings-rpc.js +60 -0
- package/data/build/dist/client/cli-settings-rpc.js.map +1 -0
- package/data/build/dist/client/cli-slots.d.ts.map +1 -1
- package/data/build/dist/client/cli-slots.js +24 -40
- package/data/build/dist/client/cli-slots.js.map +1 -1
- package/data/build/dist/client/client.assistant-configuration-view.js +264 -55
- package/data/build/dist/client/client.assistant-configuration-view.js.map +1 -1
- package/data/build/dist/client/client.assistant-debug-workbench.js +4 -4
- package/data/build/dist/client/client.assistant-debug-workbench.js.map +1 -1
- package/data/build/dist/client/{client.assistant-prompts.js → client.assistant-notifications.js} +63 -2
- package/data/build/dist/client/client.assistant-notifications.js.map +1 -0
- package/data/build/dist/client/client.assistant-prompt-editor.js +4 -4
- package/data/build/dist/client/client.assistant-prompt-editor.js.map +1 -1
- package/data/build/dist/client/client.assistant-workbench.js +57 -57
- package/data/build/dist/client/client.assistant-workbench.js.map +1 -1
- package/data/build/dist/client/client.delegate-command.js +12 -25
- package/data/build/dist/client/client.delegate-command.js.map +1 -1
- package/data/build/dist/client/client.manager.js +164 -25
- package/data/build/dist/client/client.manager.js.map +1 -1
- package/data/build/dist/client/client.model-catalog-cache.js +2 -1
- package/data/build/dist/client/client.model-catalog-cache.js.map +1 -1
- package/data/build/dist/client/client.native-workspace-store.js +42 -11
- package/data/build/dist/client/client.native-workspace-store.js.map +1 -1
- package/data/build/dist/client/client.primitives-adapter.js.map +1 -1
- package/data/build/dist/client/client.react-dom.js +250 -0
- package/data/build/dist/client/client.react-dom.js.map +1 -1
- package/data/build/dist/client/client.theme.js +56 -12
- package/data/build/dist/client/client.theme.js.map +1 -1
- package/data/build/dist/client/client.transport.js +312 -44
- package/data/build/dist/client/client.transport.js.map +1 -1
- package/data/build/dist/client/debug/ui.d.ts.map +1 -1
- package/data/build/dist/client/debug/ui.js +30 -29
- package/data/build/dist/client/debug/ui.js.map +1 -1
- package/data/build/dist/client/delegate-command.d.ts.map +1 -1
- package/data/build/dist/client/delegate-command.js +12 -21
- package/data/build/dist/client/delegate-command.js.map +1 -1
- package/data/build/dist/client/desktop-assistant.js +4348 -31
- package/data/build/dist/client/external-tool-stream.d.ts.map +1 -1
- package/data/build/dist/client/external-tool-stream.js +2 -1
- package/data/build/dist/client/external-tool-stream.js.map +1 -1
- package/data/build/dist/client/features/assistant-configuration-session.js +3 -3
- package/data/build/dist/client/features/assistant-configuration-session.js.map +1 -1
- package/data/build/dist/client/features/assistant-configuration-tabs.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-configuration-tabs.js +2 -1
- package/data/build/dist/client/features/assistant-configuration-tabs.js.map +1 -1
- package/data/build/dist/client/features/assistant-configuration-view.d.ts +8 -0
- package/data/build/dist/client/features/assistant-configuration-view.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-configuration-view.js +99 -3
- package/data/build/dist/client/features/assistant-configuration-view.js.map +1 -1
- package/data/build/dist/client/features/assistant-conversation-message.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-conversation-message.js +9 -8
- package/data/build/dist/client/features/assistant-conversation-message.js.map +1 -1
- package/data/build/dist/client/features/assistant-debug-workbench.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-debug-workbench.js +3 -2
- package/data/build/dist/client/features/assistant-debug-workbench.js.map +1 -1
- package/data/build/dist/client/features/assistant-floating-call.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-floating-call.js +4 -3
- package/data/build/dist/client/features/assistant-floating-call.js.map +1 -1
- package/data/build/dist/client/features/assistant-notification-store.d.ts +66 -0
- package/data/build/dist/client/features/assistant-notification-store.d.ts.map +1 -0
- package/data/build/dist/client/features/assistant-notification-store.js +395 -0
- package/data/build/dist/client/features/assistant-notification-store.js.map +1 -0
- package/data/build/dist/client/features/assistant-realtime-call.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-realtime-call.js +13 -12
- package/data/build/dist/client/features/assistant-realtime-call.js.map +1 -1
- package/data/build/dist/client/features/assistant-voice-initialization.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-voice-initialization.js +4 -2
- package/data/build/dist/client/features/assistant-voice-initialization.js.map +1 -1
- package/data/build/dist/client/features/assistant-voice-settings-group.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-voice-settings-group.js +2 -1
- package/data/build/dist/client/features/assistant-voice-settings-group.js.map +1 -1
- package/data/build/dist/client/features/assistant-voice-settings.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-voice-settings.js +4 -3
- package/data/build/dist/client/features/assistant-voice-settings.js.map +1 -1
- package/data/build/dist/client/features/assistant-workbench-controls.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-workbench-controls.js +6 -5
- package/data/build/dist/client/features/assistant-workbench-controls.js.map +1 -1
- package/data/build/dist/client/features/assistant-workbench.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-workbench.js +11 -9
- package/data/build/dist/client/features/assistant-workbench.js.map +1 -1
- package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -1
- package/data/build/dist/client/features/cli-adapters.js +140 -35
- package/data/build/dist/client/features/cli-adapters.js.map +1 -1
- package/data/build/dist/client/features/file-management-panel.d.ts.map +1 -1
- package/data/build/dist/client/features/file-management-panel.js +3 -10
- package/data/build/dist/client/features/file-management-panel.js.map +1 -1
- package/data/build/dist/client/features/global-voice-assistant.d.ts +6 -0
- package/data/build/dist/client/features/global-voice-assistant.d.ts.map +1 -1
- package/data/build/dist/client/features/global-voice-assistant.js +85 -3
- package/data/build/dist/client/features/global-voice-assistant.js.map +1 -1
- package/data/build/dist/client/features/index.d.ts +1 -0
- package/data/build/dist/client/features/index.d.ts.map +1 -1
- package/data/build/dist/client/features/index.js +3 -0
- package/data/build/dist/client/features/index.js.map +1 -1
- package/data/build/dist/client/features/lan-access-panel.d.ts.map +1 -1
- package/data/build/dist/client/features/lan-access-panel.js +6 -4
- package/data/build/dist/client/features/lan-access-panel.js.map +1 -1
- package/data/build/dist/client/features/login-protection-panel.d.ts.map +1 -1
- package/data/build/dist/client/features/login-protection-panel.js +7 -2
- package/data/build/dist/client/features/login-protection-panel.js.map +1 -1
- package/data/build/dist/client/features/mobile-access-panel.d.ts.map +1 -1
- package/data/build/dist/client/features/mobile-access-panel.js +19 -13
- package/data/build/dist/client/features/mobile-access-panel.js.map +1 -1
- package/data/build/dist/client/features/peer-host.d.ts +3 -0
- package/data/build/dist/client/features/peer-host.d.ts.map +1 -1
- package/data/build/dist/client/features/peer-host.js +412 -26
- package/data/build/dist/client/features/peer-host.js.map +1 -1
- package/data/build/dist/client/features/reverse-proxy-panel.d.ts.map +1 -1
- package/data/build/dist/client/features/reverse-proxy-panel.js +5 -4
- package/data/build/dist/client/features/reverse-proxy-panel.js.map +1 -1
- package/data/build/dist/client/features/subagent-collapsed-lineage.d.ts +9 -0
- package/data/build/dist/client/features/subagent-collapsed-lineage.d.ts.map +1 -0
- package/data/build/dist/client/features/subagent-collapsed-lineage.js +28 -0
- package/data/build/dist/client/features/subagent-collapsed-lineage.js.map +1 -0
- package/data/build/dist/client/features/subscription-usage-panel.d.ts.map +1 -1
- package/data/build/dist/client/features/subscription-usage-panel.js +4 -3
- package/data/build/dist/client/features/subscription-usage-panel.js.map +1 -1
- package/data/build/dist/client/features/terminal-enhancement-panel.d.ts.map +1 -1
- package/data/build/dist/client/features/terminal-enhancement-panel.js +6 -4
- package/data/build/dist/client/features/terminal-enhancement-panel.js.map +1 -1
- package/data/build/dist/client/features/types.d.ts +8 -0
- package/data/build/dist/client/features/types.d.ts.map +1 -1
- package/data/build/dist/client/features/voice-conversation-dialog.d.ts.map +1 -1
- package/data/build/dist/client/features/voice-conversation-dialog.js +7 -6
- package/data/build/dist/client/features/voice-conversation-dialog.js.map +1 -1
- package/data/build/dist/client/features/voice-initialization-dialog.d.ts.map +1 -1
- package/data/build/dist/client/features/voice-initialization-dialog.js +7 -6
- package/data/build/dist/client/features/voice-initialization-dialog.js.map +1 -1
- package/data/build/dist/client/features/workspace-session-enhancement-panel.d.ts.map +1 -1
- package/data/build/dist/client/features/workspace-session-enhancement-panel.js +44 -96
- package/data/build/dist/client/features/workspace-session-enhancement-panel.js.map +1 -1
- package/data/build/dist/client/file-management-dom.d.ts.map +1 -1
- package/data/build/dist/client/file-management-dom.js +42 -28
- package/data/build/dist/client/file-management-dom.js.map +1 -1
- package/data/build/dist/client/font-scale.d.ts +37 -0
- package/data/build/dist/client/font-scale.d.ts.map +1 -0
- package/data/build/dist/client/font-scale.js +56 -0
- package/data/build/dist/client/font-scale.js.map +1 -0
- package/data/build/dist/client/git-management.d.ts.map +1 -1
- package/data/build/dist/client/git-management.js +80 -37
- package/data/build/dist/client/git-management.js.map +1 -1
- package/data/build/dist/client/index.d.ts +1 -1
- package/data/build/dist/client/index.d.ts.map +1 -1
- package/data/build/dist/client/index.js +43 -1
- package/data/build/dist/client/index.js.map +1 -1
- package/data/build/dist/client/locale.d.ts.map +1 -1
- package/data/build/dist/client/locale.js +27 -2
- package/data/build/dist/client/locale.js.map +1 -1
- package/data/build/dist/client/locales/assistantWorkbench.d.ts +31 -0
- package/data/build/dist/client/locales/assistantWorkbench.d.ts.map +1 -1
- package/data/build/dist/client/locales/assistantWorkbench.js +22 -2
- package/data/build/dist/client/locales/assistantWorkbench.js.map +1 -1
- package/data/build/dist/client/locales/peerHost.d.ts.map +1 -1
- package/data/build/dist/client/locales/peerHost.js +10 -0
- package/data/build/dist/client/locales/peerHost.js.map +1 -1
- package/data/build/dist/client/locales/peerHostWorkspace.d.ts.map +1 -1
- package/data/build/dist/client/locales/peerHostWorkspace.js +16 -0
- package/data/build/dist/client/locales/peerHostWorkspace.js.map +1 -1
- package/data/build/dist/client/locales/subagentCollapsed.d.ts +53 -0
- package/data/build/dist/client/locales/subagentCollapsed.d.ts.map +1 -0
- package/data/build/dist/client/locales/subagentCollapsed.js +95 -0
- package/data/build/dist/client/locales/subagentCollapsed.js.map +1 -0
- package/data/build/dist/client/locales/terminalAuth.js +2 -2
- package/data/build/dist/client/locales/terminalAuth.js.map +1 -1
- package/data/build/dist/client/locales/usage.d.ts.map +1 -1
- package/data/build/dist/client/locales/usage.js +48 -0
- package/data/build/dist/client/locales/usage.js.map +1 -1
- package/data/build/dist/client/native-workspace-store.d.ts +10 -0
- package/data/build/dist/client/native-workspace-store.d.ts.map +1 -1
- package/data/build/dist/client/native-workspace-store.js +22 -1
- package/data/build/dist/client/native-workspace-store.js.map +1 -1
- package/data/build/dist/client/peer-host-color.d.ts +3 -0
- package/data/build/dist/client/peer-host-color.d.ts.map +1 -1
- package/data/build/dist/client/peer-host-color.js +16 -0
- package/data/build/dist/client/peer-host-color.js.map +1 -1
- package/data/build/dist/client/peer-host-file-links.d.ts +8 -0
- package/data/build/dist/client/peer-host-file-links.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-file-links.js +43 -0
- package/data/build/dist/client/peer-host-file-links.js.map +1 -0
- package/data/build/dist/client/peer-host-management-api.d.ts +2 -1
- package/data/build/dist/client/peer-host-management-api.d.ts.map +1 -1
- package/data/build/dist/client/peer-host-management-api.js +2 -1
- package/data/build/dist/client/peer-host-management-api.js.map +1 -1
- package/data/build/dist/client/peer-host-native-projection.d.ts +16 -8
- package/data/build/dist/client/peer-host-native-projection.d.ts.map +1 -1
- package/data/build/dist/client/peer-host-native-projection.js +88 -15
- package/data/build/dist/client/peer-host-native-projection.js.map +1 -1
- package/data/build/dist/client/peer-host-native-store-projection.d.ts +2 -0
- package/data/build/dist/client/peer-host-native-store-projection.d.ts.map +1 -1
- package/data/build/dist/client/peer-host-native-store-projection.js +52 -13
- package/data/build/dist/client/peer-host-native-store-projection.js.map +1 -1
- package/data/build/dist/client/peer-host-reference-source.d.ts +18 -0
- package/data/build/dist/client/peer-host-reference-source.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-reference-source.js +174 -0
- package/data/build/dist/client/peer-host-reference-source.js.map +1 -0
- package/data/build/dist/client/peer-host-remote-events.d.ts +34 -0
- package/data/build/dist/client/peer-host-remote-events.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-remote-events.js +239 -0
- package/data/build/dist/client/peer-host-remote-events.js.map +1 -0
- package/data/build/dist/client/peer-host-scoped-client.d.ts +3 -0
- package/data/build/dist/client/peer-host-scoped-client.d.ts.map +1 -1
- package/data/build/dist/client/peer-host-scoped-client.js +5 -2
- package/data/build/dist/client/peer-host-scoped-client.js.map +1 -1
- package/data/build/dist/client/peer-host-workspace-tab.d.ts +2 -0
- package/data/build/dist/client/peer-host-workspace-tab.d.ts.map +1 -1
- package/data/build/dist/client/peer-host-workspace-tab.js +62 -29
- package/data/build/dist/client/peer-host-workspace-tab.js.map +1 -1
- package/data/build/dist/client/peer-host-workspace-tag.d.ts +5 -0
- package/data/build/dist/client/peer-host-workspace-tag.d.ts.map +1 -1
- package/data/build/dist/client/peer-host-workspace-tag.js +57 -14
- package/data/build/dist/client/peer-host-workspace-tag.js.map +1 -1
- package/data/build/dist/client/provider-icons.d.ts.map +1 -1
- package/data/build/dist/client/provider-icons.js +2 -1
- package/data/build/dist/client/provider-icons.js.map +1 -1
- package/data/build/dist/client/quick-phrase-slot.d.ts.map +1 -1
- package/data/build/dist/client/quick-phrase-slot.js +12 -11
- package/data/build/dist/client/quick-phrase-slot.js.map +1 -1
- package/data/build/dist/client/serial-polling.d.ts +1 -0
- package/data/build/dist/client/serial-polling.d.ts.map +1 -1
- package/data/build/dist/client/serial-polling.js +4 -2
- package/data/build/dist/client/serial-polling.js.map +1 -1
- package/data/build/dist/client/session-adapter-cache.d.ts +2 -0
- package/data/build/dist/client/session-adapter-cache.d.ts.map +1 -1
- package/data/build/dist/client/session-adapter-cache.js +11 -0
- package/data/build/dist/client/session-adapter-cache.js.map +1 -1
- package/data/build/dist/client/session-changed-files-view.d.ts +15 -0
- package/data/build/dist/client/session-changed-files-view.d.ts.map +1 -1
- package/data/build/dist/client/session-changed-files-view.js +73 -29
- package/data/build/dist/client/session-changed-files-view.js.map +1 -1
- package/data/build/dist/client/settings-controls.d.ts +29 -0
- package/data/build/dist/client/settings-controls.d.ts.map +1 -0
- package/data/build/dist/client/settings-controls.js +80 -0
- package/data/build/dist/client/settings-controls.js.map +1 -0
- package/data/build/dist/client/settings-section.d.ts.map +1 -1
- package/data/build/dist/client/settings-section.js +7 -11
- package/data/build/dist/client/settings-section.js.map +1 -1
- package/data/build/dist/client/skill-command.d.ts.map +1 -1
- package/data/build/dist/client/skill-command.js +2 -1
- package/data/build/dist/client/skill-command.js.map +1 -1
- package/data/build/dist/client/subagent-collapsed-lineage.d.ts +103 -0
- package/data/build/dist/client/subagent-collapsed-lineage.d.ts.map +1 -0
- package/data/build/dist/client/subagent-collapsed-lineage.js +664 -0
- package/data/build/dist/client/subagent-collapsed-lineage.js.map +1 -0
- package/data/build/dist/client/subscription-slot.d.ts +8 -2
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -1
- package/data/build/dist/client/subscription-slot.js +50 -33
- package/data/build/dist/client/subscription-slot.js.map +1 -1
- package/data/build/dist/client/terminal/ui.d.ts.map +1 -1
- package/data/build/dist/client/terminal/ui.js +26 -8
- package/data/build/dist/client/terminal/ui.js.map +1 -1
- package/data/build/dist/client/theme.d.ts.map +1 -1
- package/data/build/dist/client/theme.js +17 -12
- package/data/build/dist/client/theme.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.d.ts +7 -0
- package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.js +47 -0
- package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.js +199 -0
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/sidebar-session-compat.d.ts +1 -1
- package/data/build/dist/dsh-capabilities/host/sidebar-session-compat.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/host/sidebar-session-compat.js +8 -2
- package/data/build/dist/dsh-capabilities/host/sidebar-session-compat.js.map +1 -1
- package/data/build/dist/dsh-capabilities/matrix.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/matrix.js +13 -3
- package/data/build/dist/dsh-capabilities/matrix.js.map +1 -1
- package/data/build/dist/dsh-capabilities/routes.js +37 -3
- package/data/build/dist/dsh-capabilities/routes.js.map +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/types.js.map +1 -1
- package/data/build/dist/host/avatar/materials.d.ts.map +1 -1
- package/data/build/dist/host/avatar/materials.js +3 -1
- package/data/build/dist/host/avatar/materials.js.map +1 -1
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts +13 -0
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js +136 -11
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.js +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codebuddy-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/codebuddy-driver.js +65 -31
- package/data/build/dist/host/cli-adapters/codebuddy-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.js +29 -9
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.js +136 -16
- package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/delegate-dispatch.d.ts +4 -3
- package/data/build/dist/host/cli-adapters/delegate-dispatch.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/delegate-dispatch.js +7 -6
- package/data/build/dist/host/cli-adapters/delegate-dispatch.js.map +1 -1
- package/data/build/dist/host/cli-adapters/doubao-app.d.ts +32 -11
- package/data/build/dist/host/cli-adapters/doubao-app.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/doubao-app.js +195 -24
- package/data/build/dist/host/cli-adapters/doubao-app.js.map +1 -1
- package/data/build/dist/host/cli-adapters/doubao-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/doubao-driver.js +3 -1
- package/data/build/dist/host/cli-adapters/doubao-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-config.d.ts +16 -0
- package/data/build/dist/host/cli-adapters/dsh-config.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-config.js +153 -0
- package/data/build/dist/host/cli-adapters/dsh-config.js.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-tool-history.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js +23 -3
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.js +71 -28
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -1
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/model-catalog.js +22 -0
- package/data/build/dist/host/cli-adapters/model-catalog.js.map +1 -1
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts +24 -2
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js +113 -4
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js.map +1 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts +63 -18
- package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.js +35 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.js.map +1 -1
- package/data/build/dist/host/cli-adapters/new-api-subscription.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/new-api-subscription.js +2 -45
- package/data/build/dist/host/cli-adapters/new-api-subscription.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts +6 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-driver.js +10 -3
- package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js +317 -62
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js.map +1 -1
- package/data/build/dist/host/cli-adapters/pi-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/pi-driver.js +134 -14
- package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts +3 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/provider-subscription.js +13 -45
- package/data/build/dist/host/cli-adapters/provider-subscription.js.map +1 -1
- package/data/build/dist/host/cli-adapters/r4-subscription.d.ts +13 -0
- package/data/build/dist/host/cli-adapters/r4-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/r4-subscription.js +111 -0
- package/data/build/dist/host/cli-adapters/r4-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/registry.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.js +14 -3
- package/data/build/dist/host/cli-adapters/registry.js.map +1 -1
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/stream-normalizer.js +7 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.js.map +1 -1
- package/data/build/dist/host/cli-adapters/subagent-tool.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/subagent-tool.js +28 -7
- package/data/build/dist/host/cli-adapters/subagent-tool.js.map +1 -1
- package/data/build/dist/host/cli-bridge/bridge-server.d.ts +1 -0
- package/data/build/dist/host/cli-bridge/bridge-server.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/bridge-server.js.map +1 -1
- package/data/build/dist/host/cli-bridge/command-code-mod.d.ts +24 -1
- package/data/build/dist/host/cli-bridge/command-code-mod.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/command-code-mod.js +121 -23
- package/data/build/dist/host/cli-bridge/command-code-mod.js.map +1 -1
- package/data/build/dist/host/cli-bridge/dispatch.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/dispatch.js +26 -6
- package/data/build/dist/host/cli-bridge/dispatch.js.map +1 -1
- package/data/build/dist/host/cli-bridge/injections.d.ts +45 -4
- package/data/build/dist/host/cli-bridge/injections.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/injections.js +129 -14
- package/data/build/dist/host/cli-bridge/injections.js.map +1 -1
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js +20 -5
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js.map +1 -1
- package/data/build/dist/host/desktop-assistant/controller.d.ts +25 -2
- package/data/build/dist/host/desktop-assistant/controller.d.ts.map +1 -1
- package/data/build/dist/host/desktop-assistant/controller.js +170 -7
- package/data/build/dist/host/desktop-assistant/controller.js.map +1 -1
- package/data/build/dist/host/desktop-assistant/feature.d.ts.map +1 -1
- package/data/build/dist/host/desktop-assistant/feature.js +41 -4
- package/data/build/dist/host/desktop-assistant/feature.js.map +1 -1
- package/data/build/dist/host/desktop-assistant/launcher.d.ts.map +1 -1
- package/data/build/dist/host/desktop-assistant/launcher.js +3 -1
- package/data/build/dist/host/desktop-assistant/launcher.js.map +1 -1
- package/data/build/dist/host/desktop-assistant/mac-agent.d.ts.map +1 -1
- package/data/build/dist/host/desktop-assistant/mac-agent.js +41 -10
- package/data/build/dist/host/desktop-assistant/mac-agent.js.map +1 -1
- package/data/build/dist/host/desktop-assistant/notifications.d.ts +16 -0
- package/data/build/dist/host/desktop-assistant/notifications.d.ts.map +1 -0
- package/data/build/dist/host/desktop-assistant/notifications.js +45 -0
- package/data/build/dist/host/desktop-assistant/notifications.js.map +1 -0
- package/data/build/dist/host/desktop-assistant/win-agent.d.ts.map +1 -1
- package/data/build/dist/host/desktop-assistant/win-agent.js +95 -8
- package/data/build/dist/host/desktop-assistant/win-agent.js.map +1 -1
- package/data/build/dist/host/features/assistant-lifecycle-settings.js +1 -1
- package/data/build/dist/host/features/assistant-lifecycle-settings.js.map +1 -1
- package/data/build/dist/host/features/assistant-notification-events.d.ts +77 -0
- package/data/build/dist/host/features/assistant-notification-events.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-notification-events.js +574 -0
- package/data/build/dist/host/features/assistant-notification-events.js.map +1 -0
- package/data/build/dist/host/features/assistant-notification-source.d.ts +32 -0
- package/data/build/dist/host/features/assistant-notification-source.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-notification-source.js +101 -0
- package/data/build/dist/host/features/assistant-notification-source.js.map +1 -0
- package/data/build/dist/host/features/assistant-notification-stream.d.ts +26 -0
- package/data/build/dist/host/features/assistant-notification-stream.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-notification-stream.js +179 -0
- package/data/build/dist/host/features/assistant-notification-stream.js.map +1 -0
- package/data/build/dist/host/features/assistant-notifications.d.ts +71 -0
- package/data/build/dist/host/features/assistant-notifications.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-notifications.js +342 -0
- package/data/build/dist/host/features/assistant-notifications.js.map +1 -0
- package/data/build/dist/host/features/assistant-peer-notifications.d.ts +53 -0
- package/data/build/dist/host/features/assistant-peer-notifications.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-peer-notifications.js +197 -0
- package/data/build/dist/host/features/assistant-peer-notifications.js.map +1 -0
- package/data/build/dist/host/features/assistant-tts-service.d.ts.map +1 -1
- package/data/build/dist/host/features/assistant-tts-service.js +2 -2
- package/data/build/dist/host/features/assistant-tts-service.js.map +1 -1
- package/data/build/dist/host/features/assistant-voice-initialization.js +1 -1
- package/data/build/dist/host/features/assistant-voice-initialization.js.map +1 -1
- package/data/build/dist/host/features/git-management.js +2 -1
- package/data/build/dist/host/features/git-management.js.map +1 -1
- package/data/build/dist/host/features/global-voice-rpc.d.ts.map +1 -1
- package/data/build/dist/host/features/global-voice-rpc.js +90 -2
- package/data/build/dist/host/features/global-voice-rpc.js.map +1 -1
- package/data/build/dist/host/features/index.d.ts +1 -0
- package/data/build/dist/host/features/index.d.ts.map +1 -1
- package/data/build/dist/host/features/index.js +3 -0
- package/data/build/dist/host/features/index.js.map +1 -1
- package/data/build/dist/host/features/peer-host.d.ts.map +1 -1
- package/data/build/dist/host/features/peer-host.js +159 -70
- package/data/build/dist/host/features/peer-host.js.map +1 -1
- package/data/build/dist/host/features/session-title-optimization.d.ts +5 -0
- package/data/build/dist/host/features/session-title-optimization.d.ts.map +1 -0
- package/data/build/dist/host/features/session-title-optimization.js +26 -0
- package/data/build/dist/host/features/session-title-optimization.js.map +1 -0
- package/data/build/dist/host/features/types.d.ts +6 -0
- package/data/build/dist/host/features/types.d.ts.map +1 -1
- package/data/build/dist/host/index.d.ts.map +1 -1
- package/data/build/dist/host/index.js +23 -1
- package/data/build/dist/host/index.js.map +1 -1
- package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -1
- package/data/build/dist/host/lan-access-dsh.js +9 -1
- package/data/build/dist/host/lan-access-dsh.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.js +8 -2
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts +5 -1
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js +72 -23
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/host-ws-proxy-service.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/host-ws-proxy-service.js +7 -5
- package/data/build/dist/host/modules/peer-host/host-ws-proxy-service.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts +6 -1
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js +7 -0
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts +2 -1
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.js +11 -10
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js +43 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts +6 -3
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js +92 -5
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.d.ts +15 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.js +101 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.js +44 -11
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js +75 -20
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-request-errors.d.ts +31 -0
- package/data/build/dist/host/modules/peer-host/peer-host-request-errors.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-request-errors.js +60 -0
- package/data/build/dist/host/modules/peer-host/peer-host-request-errors.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts +12 -4
- package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-session.js +28 -18
- package/data/build/dist/host/modules/peer-host/peer-host-session.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.d.ts +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.js +15 -4
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-workspace-cache.d.ts +22 -0
- package/data/build/dist/host/modules/peer-host/peer-host-workspace-cache.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-workspace-cache.js +133 -0
- package/data/build/dist/host/modules/peer-host/peer-host-workspace-cache.js.map +1 -0
- package/data/build/dist/host/native-session-bridge.d.ts +2 -0
- package/data/build/dist/host/native-session-bridge.d.ts.map +1 -1
- package/data/build/dist/host/native-session-bridge.js +67 -0
- package/data/build/dist/host/native-session-bridge.js.map +1 -1
- package/data/build/dist/host/rpc.d.ts.map +1 -1
- package/data/build/dist/host/rpc.js +11 -2
- package/data/build/dist/host/rpc.js.map +1 -1
- package/data/build/dist/host/settings.d.ts.map +1 -1
- package/data/build/dist/host/settings.js +14 -3
- package/data/build/dist/host/settings.js.map +1 -1
- package/data/build/dist/host/terminal/controller-factory.d.ts +1 -0
- package/data/build/dist/host/terminal/controller-factory.d.ts.map +1 -1
- package/data/build/dist/host/terminal/controller-factory.js +3 -0
- package/data/build/dist/host/terminal/controller-factory.js.map +1 -1
- package/data/build/dist/host/terminal/startup.d.ts +3 -0
- package/data/build/dist/host/terminal/startup.d.ts.map +1 -1
- package/data/build/dist/host/terminal/startup.js +1 -0
- package/data/build/dist/host/terminal/startup.js.map +1 -1
- package/data/build/dist/host/terminal/terminal-controller.d.ts +8 -0
- package/data/build/dist/host/terminal/terminal-controller.d.ts.map +1 -1
- package/data/build/dist/host/terminal/terminal-controller.js +2 -1
- package/data/build/dist/host/terminal/terminal-controller.js.map +1 -1
- package/data/build/dist/shared/assistant-avatar-adapters.d.ts.map +1 -1
- package/data/build/dist/shared/assistant-avatar-adapters.js +3 -0
- package/data/build/dist/shared/assistant-avatar-adapters.js.map +1 -1
- package/data/build/dist/shared/assistant-avatar.d.ts +11 -1
- package/data/build/dist/shared/assistant-avatar.d.ts.map +1 -1
- package/data/build/dist/shared/assistant-avatar.js +31 -1
- package/data/build/dist/shared/assistant-avatar.js.map +1 -1
- package/data/build/dist/shared/assistant-notification-feed.d.ts +44 -0
- package/data/build/dist/shared/assistant-notification-feed.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-notification-feed.js +88 -0
- package/data/build/dist/shared/assistant-notification-feed.js.map +1 -0
- package/data/build/dist/shared/assistant-notifications.d.ts +107 -0
- package/data/build/dist/shared/assistant-notifications.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-notifications.js +24 -0
- package/data/build/dist/shared/assistant-notifications.js.map +1 -0
- package/data/build/dist/shared/assistant-tts.js +1 -1
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +5 -1
- package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/config.d.ts +5 -0
- package/data/build/dist/shared/contracts/config.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/config.js +3 -0
- package/data/build/dist/shared/contracts/config.js.map +1 -1
- package/data/build/dist/shared/contracts/errors.d.ts +2 -2
- package/data/build/dist/shared/contracts/peer-host.d.ts +15 -0
- package/data/build/dist/shared/contracts/peer-host.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/peer-host.js.map +1 -1
- package/data/build/dist/shared/contracts/subscription.d.ts +31 -0
- package/data/build/dist/shared/contracts/subscription.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/subscription.js.map +1 -1
- package/data/build/dist/shared/contracts/version.d.ts +12 -8
- package/data/build/dist/shared/contracts/version.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/version.js +11 -7
- package/data/build/dist/shared/contracts/version.js.map +1 -1
- package/data/build/dist/shared/desktop-assistant.d.ts +73 -1
- package/data/build/dist/shared/desktop-assistant.d.ts.map +1 -1
- package/data/build/dist/shared/desktop-assistant.js +189 -2
- package/data/build/dist/shared/desktop-assistant.js.map +1 -1
- package/data/build/dist/shared/index.d.ts +2 -2
- package/data/build/dist/shared/index.d.ts.map +1 -1
- package/data/build/dist/shared/index.js.map +1 -1
- package/data/build/dist/shared/peer-host-file-location.d.ts +11 -0
- package/data/build/dist/shared/peer-host-file-location.d.ts.map +1 -0
- package/data/build/dist/shared/peer-host-file-location.js +20 -0
- package/data/build/dist/shared/peer-host-file-location.js.map +1 -0
- package/data/build/dist/shared/peer-host-http-routes.d.ts +10 -0
- package/data/build/dist/shared/peer-host-http-routes.d.ts.map +1 -1
- package/data/build/dist/shared/peer-host-http-routes.js +7 -1
- package/data/build/dist/shared/peer-host-http-routes.js.map +1 -1
- package/data/build/dist/shared/provider-icon-resources.d.ts.map +1 -1
- package/data/build/dist/shared/provider-icon-resources.js +1 -0
- package/data/build/dist/shared/provider-icon-resources.js.map +1 -1
- package/data/build/dist/shared/session-reference.d.ts +11 -0
- package/data/build/dist/shared/session-reference.d.ts.map +1 -0
- package/data/build/dist/shared/session-reference.js +29 -0
- package/data/build/dist/shared/session-reference.js.map +1 -0
- package/data/build/dist/shared/session-title.d.ts +12 -0
- package/data/build/dist/shared/session-title.d.ts.map +1 -0
- package/data/build/dist/shared/session-title.js +65 -0
- package/data/build/dist/shared/session-title.js.map +1 -0
- package/data/build/dist/shared/voice-initialization.d.ts +1 -1
- package/data/build/dist/shared/voice-initialization.d.ts.map +1 -1
- package/data/build/dist/shared/voice-initialization.js +1 -1
- package/data/build/dist/shared/voice-initialization.js.map +1 -1
- package/data/build/dist/shared/voice-models.d.ts +2 -2
- package/data/build/dist/shared/voice-models.d.ts.map +1 -1
- package/data/build/dist/shared/voice-models.js +9 -9
- package/data/build/dist/shared/voice-models.js.map +1 -1
- package/data/build/dist/typert.host.d.ts +18 -1
- package/data/build/dist/typert.host.d.ts.map +1 -1
- package/data/build/dist/typert.host.js +28 -3
- package/data/build/dist/typert.host.js.map +1 -1
- package/data/build/dist/typert.notifications-client.d.ts +5 -0
- package/data/build/dist/typert.notifications-client.d.ts.map +1 -0
- package/data/build/dist/typert.notifications-client.js +7 -0
- package/data/build/dist/typert.notifications-client.js.map +1 -0
- package/data/build/dist/typert.remote-client.js +1 -1
- package/data/build/dist/typert.remote-client.js.map +1 -1
- package/package.json +32 -26
- package/profile/README.md +2 -2
- package/profile/package.json +3 -3
- package/profile/version.json +3 -3
- package/version.json +3 -3
- package/data/build/dist/client/client.assistant-prompts.js.map +0 -1
|
@@ -4,13 +4,15 @@ import { randomBytes, randomUUID } from 'node:crypto';
|
|
|
4
4
|
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
5
5
|
import { CODINGNS_VERSION, DSH_VERSION, isDshVersionCompatible } from '../../shared/contracts/version.js';
|
|
6
6
|
import { PeerHostHandshakeService } from '../modules/peer-host/peer-host-handshake.js';
|
|
7
|
-
import { PeerHostSessionService } from '../modules/peer-host/peer-host-session.js';
|
|
7
|
+
import { isPeerHostTransientStatus, PeerHostSessionService } from '../modules/peer-host/peer-host-session.js';
|
|
8
8
|
import { PeerHostHttpProxyService } from '../modules/peer-host/host-api-proxy-service.js';
|
|
9
9
|
import { EncryptedFilePeerHostCredentialStore, FilePeerHostRecordStore, PeerHostStore, } from '../modules/peer-host/peer-host-store.js';
|
|
10
10
|
import { assistantWorkspaceMatches } from '../../shared/assistant-lifecycle.js';
|
|
11
11
|
import { createVirtualSessionId, createVirtualWorkspaceId, normalizePeerHostColor, parseVirtualSessionId, parseVirtualWorkspaceId } from '../../shared/contracts/peer-host.js';
|
|
12
12
|
import { PeerHostAggregateService } from '../modules/peer-host/peer-host-aggregate-service.js';
|
|
13
|
+
import { PeerHostWorkspaceCache } from '../modules/peer-host/peer-host-workspace-cache.js';
|
|
13
14
|
import { resolveDshNativeDispatch } from '../modules/peer-host/peer-host-native-dispatch.js';
|
|
15
|
+
import { PeerHostNativeStreams } from '../modules/peer-host/peer-host-native-streams.js';
|
|
14
16
|
import { FileAggregateWorkspaceOrderStore, VirtualWorkspaceRegistry } from '../modules/peer-host/peer-host-virtual-registry.js';
|
|
15
17
|
import { CodingNsRpcError } from '../rpc-table.js';
|
|
16
18
|
import { PeerHostWebSocketGateway, PEER_HOST_WS_PATH } from '../modules/peer-host/peer-host-ws-gateway.js';
|
|
@@ -27,8 +29,8 @@ import { callPeerCliRpc, callPeerNativeRpc, openPeerNativeStream, readNativeRpcE
|
|
|
27
29
|
import { createAggregateHostSource } from '../modules/peer-host/peer-host-aggregate-service.js';
|
|
28
30
|
import { encodeNativeResponseBytes, isDshNativeRemoteMethod, rewriteNativeRequestIds, rewriteNativeResponseIds } from '../modules/peer-host/peer-host-native-protocol.js';
|
|
29
31
|
import { resolveCodingNsDebugLevel } from '../../shared/debug.js';
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
import { AssistantPeerNotifications, assistantPeerNotificationWorkspaceIds, assistantPeerNotificationCapabilityKey } from './assistant-peer-notifications.js';
|
|
33
|
+
import { readAssistantNotificationFeed } from '../../shared/assistant-notification-feed.js';
|
|
32
34
|
/** PeerHost Host 模块;配置、握手和目标登录态只在 Host 进程内装配。 */
|
|
33
35
|
export function createPeerHostFeature(options = {}) {
|
|
34
36
|
return {
|
|
@@ -61,22 +63,13 @@ export function createPeerHostFeature(options = {}) {
|
|
|
61
63
|
});
|
|
62
64
|
const sessions = new PeerHostSessionService(store, credentials, options.fetchImpl === undefined ? {} : { fetchImpl: options.fetchImpl });
|
|
63
65
|
const httpProxy = new PeerHostHttpProxyService(store, sessions, options.fetchImpl === undefined ? {} : { fetchImpl: options.fetchImpl });
|
|
64
|
-
// 旧版 HTTP 代理尚未下传 request.signal;每次读取独立绑定 fetch,避免共享
|
|
65
|
-
// 代理上的可变信号污染其他界面请求,同时让取消真正中断网络读取。
|
|
66
|
-
const scopedProxy = (signal) => signal === undefined ? httpProxy : new PeerHostHttpProxyService(store, sessions, {
|
|
67
|
-
fetchImpl: async (input, init) => {
|
|
68
|
-
const closing = new URL(input instanceof Request ? input.url : String(input)).pathname.endsWith('/peerHost/nativeStreamClose');
|
|
69
|
-
const requestSignal = closing ? AbortSignal.timeout(5_000) : init?.signal == null ? signal : AbortSignal.any([signal, init.signal]);
|
|
70
|
-
requestSignal.throwIfAborted();
|
|
71
|
-
return (options.fetchImpl ?? fetch)(input, { ...init, signal: requestSignal });
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
66
|
const aggregate = new PeerHostAggregateService();
|
|
67
|
+
const workspaceCache = new PeerHostWorkspaceCache(join(stateDirectory, 'peer-host-workspace-cache.json'), ownerUserId);
|
|
75
68
|
const workspaceRegistry = new VirtualWorkspaceRegistry({
|
|
76
69
|
orderStore: new FileAggregateWorkspaceOrderStore(join(stateDirectory, 'peer-host-workspace-order.json')),
|
|
77
70
|
});
|
|
78
71
|
let workspaceOrderHydrated = false;
|
|
79
|
-
const nativeStreams = new
|
|
72
|
+
const nativeStreams = new PeerHostNativeStreams();
|
|
80
73
|
const dshNativeDispatch = resolveDshNativeDispatch(context.services.dshContext);
|
|
81
74
|
const debugLevel = resolveCodingNsDebugLevel();
|
|
82
75
|
const diagnostics = createPeerHostDiagnosticSink({
|
|
@@ -99,13 +92,15 @@ export function createPeerHostFeature(options = {}) {
|
|
|
99
92
|
const localHostId = process.env.CODINGNS4DSH_HOST_ID?.trim() || ownerUserId;
|
|
100
93
|
const localSummarySource = createDshNativeSummarySource(context.services.dshContext, context.services.nativeSessions);
|
|
101
94
|
/**
|
|
102
|
-
* 聚合前确保目标 Host
|
|
95
|
+
* 聚合前确保目标 Host 已完成握手和认证;握手状态若只是临时断线结果,
|
|
96
|
+
* 则交给真实数据面重新验证,避免已有消息/终端连接被旧状态染灰。
|
|
103
97
|
*
|
|
104
98
|
* PeerHost 的记录状态是运行时缓存,不是登录凭据本身:远端返回 401 后
|
|
105
99
|
* 状态会暂时变成 session_required,下一次聚合必须主动用持久化的 refresh
|
|
106
100
|
* token/账号密码恢复,否则只要没有手工点“测试”,该目标就会永远被跳过。
|
|
107
101
|
*/
|
|
108
|
-
const preparePeerHost = async (input) => {
|
|
102
|
+
const preparePeerHost = async (input, options = {}) => {
|
|
103
|
+
const allowTransientStatus = options.allowTransientStatus === true;
|
|
109
104
|
if (input.status === 'disabled' || input.status === 'identity_changed')
|
|
110
105
|
return null;
|
|
111
106
|
let record = input;
|
|
@@ -113,17 +108,17 @@ export function createPeerHostFeature(options = {}) {
|
|
|
113
108
|
await sessions.refresh(record.id).catch(() => undefined);
|
|
114
109
|
record = (await store.get(record.id)) ?? record;
|
|
115
110
|
}
|
|
116
|
-
else if (record.status !== 'ready') {
|
|
117
|
-
// configured/unreachable/
|
|
118
|
-
//
|
|
111
|
+
else if (record.status !== 'ready' && !(allowTransientStatus && isPeerHostTransientStatus(record.status))) {
|
|
112
|
+
// configured/version_mismatch 等状态仍需先完成握手;checking/unreachable/
|
|
113
|
+
// reconnecting 只是旧连接尝试的结果,摘要数据面应直接重新验证目标。
|
|
119
114
|
record = await handshake.check(record.id);
|
|
120
115
|
}
|
|
121
|
-
if (record.status !== 'ready')
|
|
116
|
+
if (record.status !== 'ready' && !(allowTransientStatus && isPeerHostTransientStatus(record.status)))
|
|
122
117
|
return null;
|
|
123
118
|
// 即使 access token 尚未到期,也检查一次当前认证状态;临近过期时这里
|
|
124
119
|
// 会 refresh,refresh token 失效时会用保存的账号密码静默重登。
|
|
125
120
|
try {
|
|
126
|
-
await sessions.getAccessToken(record.id);
|
|
121
|
+
await sessions.getAccessToken(record.id, allowTransientStatus);
|
|
127
122
|
}
|
|
128
123
|
catch {
|
|
129
124
|
return null;
|
|
@@ -148,14 +143,19 @@ export function createPeerHostFeature(options = {}) {
|
|
|
148
143
|
// 助理只访问受管远端,不能为了本地索引唤醒全部 PeerHost 或重复扫描本地列表。
|
|
149
144
|
const selectedRecords = assistantWorkspaceIds === undefined ? records : records.filter((record) => record.status !== 'disabled' && record.status !== 'identity_changed'
|
|
150
145
|
&& (record.visibleWorkspaceIds ?? []).some((workspaceId) => assistantWorkspaceIds.some((selected) => assistantWorkspaceMatches(selected, record.id, workspaceId))));
|
|
151
|
-
|
|
146
|
+
// 摘要是实际数据面探针:握手状态可能滞后,但消息和终端仍可正常访问时,
|
|
147
|
+
// 不能先用旧的 unreachable 状态把 Host 排除在 source 之外。
|
|
148
|
+
const preparedRecords = await Promise.all(selectedRecords.map((record) => preparePeerHost(record, { allowTransientStatus: true }).catch(() => null)));
|
|
152
149
|
signal?.throwIfAborted();
|
|
153
150
|
for (const [index, record] of preparedRecords.entries()) {
|
|
154
|
-
if (record === null
|
|
151
|
+
if (record === null) {
|
|
155
152
|
// 受管远端的握手/认证失败也必须交给助理退避,不能冒充没有远端工作区。
|
|
156
153
|
const original = selectedRecords[index];
|
|
157
|
-
if (
|
|
158
|
-
sources.push({
|
|
154
|
+
if (original.status !== 'disabled' && original.status !== 'identity_changed')
|
|
155
|
+
sources.push({
|
|
156
|
+
hostId: localHostId, targetHostId: original.id, hostLabel: original.displayName, hostColor: original.color ?? null,
|
|
157
|
+
load: async () => { throw new Error('远端 Host 暂不可达'); },
|
|
158
|
+
});
|
|
159
159
|
continue;
|
|
160
160
|
}
|
|
161
161
|
const selectedWorkspaceIds = assistantWorkspaceIds === undefined
|
|
@@ -171,9 +171,9 @@ export function createPeerHostFeature(options = {}) {
|
|
|
171
171
|
source: createPeerHostRemoteSummarySource({
|
|
172
172
|
scope: { hostId: localHostId, targetHostId: record.id, workspaceId: '__aggregate__', sessionId: null, scopeGeneration: 0 },
|
|
173
173
|
transport: {
|
|
174
|
-
rpc: (request) => callPeerNativeRpc(
|
|
175
|
-
stream: (request) => openPeerNativeStream(
|
|
176
|
-
cli: (request) => callPeerCliRpc(
|
|
174
|
+
rpc: (request) => callPeerNativeRpc(httpProxy, record.id, { ...request, ...(signal === undefined ? {} : { signal }) }),
|
|
175
|
+
stream: (request) => openPeerNativeStream(httpProxy, record.id, { ...request, ...(signal === undefined ? {} : { signal }) }),
|
|
176
|
+
cli: (request) => callPeerCliRpc(httpProxy, record.id, { ...request, ...(signal === undefined ? {} : { signal }) }),
|
|
177
177
|
},
|
|
178
178
|
// 默认只投影用户显式添加的远端工作区;未添加时不展示该 Host 的任何工作区。
|
|
179
179
|
visibleWorkspaceIds: selectedWorkspaceIds,
|
|
@@ -182,6 +182,20 @@ export function createPeerHostFeature(options = {}) {
|
|
|
182
182
|
}
|
|
183
183
|
return sources;
|
|
184
184
|
};
|
|
185
|
+
/** 数据面摘要成功后清除过期的临时断线状态,让下一轮也从正常路径开始。 */
|
|
186
|
+
const markRecoveredPeerHosts = async (results) => {
|
|
187
|
+
if (options.aggregateSources !== undefined)
|
|
188
|
+
return;
|
|
189
|
+
await Promise.all(results.flatMap((result) => {
|
|
190
|
+
if (result.targetHostId === null || result.availability !== 'ready')
|
|
191
|
+
return [];
|
|
192
|
+
return [store.get(result.targetHostId).then((record) => {
|
|
193
|
+
if (record !== null && isPeerHostTransientStatus(record.status))
|
|
194
|
+
return store.updateStatus(record.id, 'ready', null).then(() => undefined);
|
|
195
|
+
return undefined;
|
|
196
|
+
})];
|
|
197
|
+
}));
|
|
198
|
+
};
|
|
185
199
|
/** 远端工作区候选的唯一读取入口;不过滤可见性,供"添加工作区"选择器使用。 */
|
|
186
200
|
const readRemoteWorkspaceCandidates = async (peerHostId) => {
|
|
187
201
|
const configured = await store.get(peerHostId);
|
|
@@ -236,12 +250,83 @@ export function createPeerHostFeature(options = {}) {
|
|
|
236
250
|
httpProxy,
|
|
237
251
|
wsProxy,
|
|
238
252
|
peer: {
|
|
239
|
-
nativeRpc: (peerHostId, request) => callPeerNativeRpc(
|
|
240
|
-
nativeStream: (peerHostId, request) => openPeerNativeStream(
|
|
253
|
+
nativeRpc: (peerHostId, request) => callPeerNativeRpc(httpProxy, peerHostId, request),
|
|
254
|
+
nativeStream: (peerHostId, request) => openPeerNativeStream(httpProxy, peerHostId, request),
|
|
241
255
|
},
|
|
242
256
|
});
|
|
243
257
|
context.resources.add(() => aggregatedTransport.close());
|
|
258
|
+
const readNotificationSource = async (peerHostId, payload, signal) => {
|
|
259
|
+
const response = await httpProxy.request(peerHostId, {
|
|
260
|
+
scope: { hostId: localHostId, targetHostId: peerHostId, workspaceId: '__assistant_notifications__', sessionId: null, scopeGeneration: 0 },
|
|
261
|
+
path: '/api/codingns/assistant/notifications/source', method: 'POST',
|
|
262
|
+
body: JSON.stringify({ rpcId: `assistant-source-${randomUUID()}`, method: 'assistant/notifications/source', payload }), signal,
|
|
263
|
+
});
|
|
264
|
+
if ([404, 405, 501].includes(response.status))
|
|
265
|
+
throw new CodingNsRpcError('UNSUPPORTED_CAPABILITY', '远端不支持会话通知来源协议');
|
|
266
|
+
return readNativeRpcEnvelope(response.body);
|
|
267
|
+
};
|
|
244
268
|
const assistantGateway = {
|
|
269
|
+
async validateNotificationTarget(target) {
|
|
270
|
+
if (target.hostId === localHostId)
|
|
271
|
+
return false;
|
|
272
|
+
const record = await store.get(target.hostId);
|
|
273
|
+
if (record === null || record.status === 'disabled' || record.status === 'identity_changed')
|
|
274
|
+
return false;
|
|
275
|
+
const workspaceId = assistantPeerNotificationWorkspaceIds(target.hostId, record.visibleWorkspaceIds ?? [], [target.workspaceId])[0];
|
|
276
|
+
if (workspaceId === undefined)
|
|
277
|
+
return false;
|
|
278
|
+
const signal = AbortSignal.timeout(5_000);
|
|
279
|
+
try {
|
|
280
|
+
const results = await aggregate.load(await buildSources([createVirtualWorkspaceId(target.hostId, workspaceId)], signal));
|
|
281
|
+
signal.throwIfAborted();
|
|
282
|
+
const present = results.some(result => result.targetHostId === target.hostId && result.availability === 'ready'
|
|
283
|
+
&& result.workspaces.some(item => item.workspaceId === workspaceId
|
|
284
|
+
&& item.sessions.some(session => session.scope.sessionId === target.sessionId && !session.blank)));
|
|
285
|
+
if (!present)
|
|
286
|
+
return false;
|
|
287
|
+
if (target.requestId === undefined)
|
|
288
|
+
return true;
|
|
289
|
+
const feed = readAssistantNotificationFeed(await readNotificationSource(target.hostId, { workspaceIds: [workspaceId] }, signal));
|
|
290
|
+
const actualSession = target.actualRequestTarget?.sessionId ?? target.sessionId;
|
|
291
|
+
return feed.pending.some(fact => (fact.actualRequestSessionId ?? fact.sessionId) === actualSession && fact.requestId === target.requestId && fact.kind === target.requestKind);
|
|
292
|
+
}
|
|
293
|
+
catch {
|
|
294
|
+
return false;
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
subscribeNotifications(managedWorkspaceIds, observer, signal) {
|
|
298
|
+
const subscription = new AssistantPeerNotifications({
|
|
299
|
+
observer,
|
|
300
|
+
nodes: async (signal) => {
|
|
301
|
+
signal.throwIfAborted();
|
|
302
|
+
const records = await store.list();
|
|
303
|
+
signal.throwIfAborted();
|
|
304
|
+
return records.filter(record => record.status !== 'disabled' && record.status !== 'identity_changed')
|
|
305
|
+
.map(record => ({
|
|
306
|
+
hostId: record.id, hostLabel: record.displayName,
|
|
307
|
+
capabilityKey: assistantPeerNotificationCapabilityKey(record),
|
|
308
|
+
workspaceIds: assistantPeerNotificationWorkspaceIds(record.id, record.visibleWorkspaceIds ?? [], managedWorkspaceIds),
|
|
309
|
+
})).filter(node => node.workspaceIds.length > 0);
|
|
310
|
+
},
|
|
311
|
+
read: async (node, payload, signal) => {
|
|
312
|
+
// 通知不依赖索引触发握手;只在缓存尚未 ready 时准备当前这台受管 Host。
|
|
313
|
+
const configured = await store.get(node.hostId);
|
|
314
|
+
if (configured === null)
|
|
315
|
+
throw new CodingNsRpcError('PEER_HOST_NOT_FOUND', 'PeerHost 不存在');
|
|
316
|
+
if (configured.status !== 'ready' && await preparePeerHost(configured) === null)
|
|
317
|
+
throw new CodingNsRpcError('PEER_HOST_NOT_READY', '远端 Host 暂不可达');
|
|
318
|
+
signal.throwIfAborted();
|
|
319
|
+
return readNotificationSource(node.hostId, payload, signal);
|
|
320
|
+
},
|
|
321
|
+
stream: (node, signal) => aggregatedTransport.openStream({
|
|
322
|
+
scope: { hostId: localHostId, targetHostId: node.hostId, workspaceId: '__assistant_notifications__', sessionId: null, scopeGeneration: 0 },
|
|
323
|
+
method: 'codingnsAssistantNotifications/sourceStream',
|
|
324
|
+
payload: { args: { request: { workspaceIds: node.workspaceIds } } },
|
|
325
|
+
signal,
|
|
326
|
+
}),
|
|
327
|
+
}, signal);
|
|
328
|
+
return subscription.start();
|
|
329
|
+
},
|
|
245
330
|
async workspaces(signal) {
|
|
246
331
|
signal?.throwIfAborted();
|
|
247
332
|
const records = await store.list();
|
|
@@ -485,12 +570,19 @@ export function createPeerHostFeature(options = {}) {
|
|
|
485
570
|
: [];
|
|
486
571
|
return toPeerHostClientRecord(await store.replaceVisibleWorkspaces(peerHostId, ids));
|
|
487
572
|
}
|
|
573
|
+
case 'dismissDisconnectedWorkspace': {
|
|
574
|
+
await workspaceCache.dismiss(requiredString(input.peerHostId, 'peerHostId'), requiredString(input.workspaceId, 'workspaceId'));
|
|
575
|
+
return { removed: true };
|
|
576
|
+
}
|
|
488
577
|
case 'wsEndpoint': return wsEndpoint;
|
|
489
578
|
case 'aggregate': {
|
|
490
579
|
// 顺序 Registry 必须认识本地工作区,即使本地 session 摘要在启动瞬间
|
|
491
580
|
// 还没有准备好。否则 order 只会留下远端 ID,客户端拖拽到本地项时
|
|
492
581
|
// 只能拒绝请求,表现为远端永远被固定在列表顶部。
|
|
493
|
-
const
|
|
582
|
+
const loaded = ensureLocalWorkspaceSummaries(await aggregate.load(await buildSources()), context.services.dshContext);
|
|
583
|
+
await markRecoveredPeerHosts(loaded);
|
|
584
|
+
// 测试注入的独立来源不受配置列表约束;生产摘要按当前添加状态恢复缓存。
|
|
585
|
+
const results = options.aggregateSources === undefined ? await workspaceCache.apply(loaded, await store.list()) : loaded;
|
|
494
586
|
workspaceRegistry.replace(results);
|
|
495
587
|
if (!workspaceOrderHydrated) {
|
|
496
588
|
await workspaceRegistry.hydrateOrder();
|
|
@@ -523,6 +615,7 @@ export function createPeerHostFeature(options = {}) {
|
|
|
523
615
|
scope,
|
|
524
616
|
path: requiredString(input.path, 'path'),
|
|
525
617
|
...(input.method === undefined ? {} : { method: requiredString(input.method, 'method') }),
|
|
618
|
+
...(input.headers === undefined ? {} : { headers: parseProxyHeaders(input.headers) }),
|
|
526
619
|
...(input.body === undefined ? {} : { body: requiredString(input.body, 'body') }),
|
|
527
620
|
});
|
|
528
621
|
}
|
|
@@ -546,13 +639,14 @@ export function createPeerHostFeature(options = {}) {
|
|
|
546
639
|
const payload = rewriteNativeRequestIds(method, input.payload, createScopedNativeIdResolver(workspaceRegistry, scope));
|
|
547
640
|
// 句柄由 nativeStreamNext/Close 轮询管理,不绑定本次 HTTP 请求的 signal:
|
|
548
641
|
// 该 signal 会在 nativeStream 响应返回后立即中止,导致第一次 next 直接结束。
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
642
|
+
const streamId = await nativeStreams.open(scope, (signal) => {
|
|
643
|
+
const stream = aggregatedTransport.openStream({ scope, method, payload, signal });
|
|
644
|
+
const targetHostId = scope.targetHostId;
|
|
645
|
+
if (targetHostId === null)
|
|
646
|
+
return stream;
|
|
647
|
+
const iterator = mapAsyncIterator(stream[Symbol.asyncIterator](), (value) => rewriteNativeResponseIds(value, (id) => createVirtualWorkspaceId(targetHostId, id), (id) => createVirtualSessionId(targetHostId, id), method));
|
|
648
|
+
return { [Symbol.asyncIterator]: () => iterator };
|
|
649
|
+
});
|
|
556
650
|
return { streamId };
|
|
557
651
|
}
|
|
558
652
|
case 'nativeStreamOpen': {
|
|
@@ -563,29 +657,18 @@ export function createPeerHostFeature(options = {}) {
|
|
|
563
657
|
// 句柄会在后续 nativeStreamNext/Close 中被轮询管理,不能绑定到本次 HTTP 请求的短生命周期 signal。
|
|
564
658
|
if (dshNativeDispatch === undefined)
|
|
565
659
|
throw new CodingNsRpcError('CODINGNS_RPC_UNSUPPORTED', '当前 Host 未提供 DSH Typert Gateway');
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
660
|
+
const streamId = await nativeStreams.open(scope, async (signal) => {
|
|
661
|
+
const stream = await dshNativeDispatch.stream(method, input.payload, signal);
|
|
662
|
+
if (!isAsyncIterable(stream))
|
|
663
|
+
throw new CodingNsRpcError('CODINGNS_RPC_UNSUPPORTED', `DSH 原生 Remote 方法不是流: ${method}`);
|
|
664
|
+
return stream;
|
|
665
|
+
});
|
|
571
666
|
return { streamId };
|
|
572
667
|
}
|
|
573
668
|
case 'nativeStreamNext': {
|
|
574
669
|
const streamId = requiredString(input.streamId, 'streamId');
|
|
575
|
-
const stream = nativeStreams.get(streamId);
|
|
576
|
-
if (stream === undefined || stream.expiresAt < Date.now()) {
|
|
577
|
-
if (stream?.iterator.return !== undefined)
|
|
578
|
-
await stream.iterator.return();
|
|
579
|
-
nativeStreams.delete(streamId);
|
|
580
|
-
throw new CodingNsRpcError('CODINGNS_RPC_NOT_FOUND', 'DSH 原生 Remote 流已失效');
|
|
581
|
-
}
|
|
582
670
|
const scope = parseScope(input.scope);
|
|
583
|
-
|
|
584
|
-
// 每次轮询都算一次心跳:空闲会话的 next 会长时间挂起,不能只在出帧时续期。
|
|
585
|
-
nativeStreams.set(streamId, { ...stream, expiresAt: Date.now() + NATIVE_STREAM_TTL_MS });
|
|
586
|
-
const next = await stream.iterator.next();
|
|
587
|
-
if (next.done === true)
|
|
588
|
-
nativeStreams.delete(streamId);
|
|
671
|
+
const next = await nativeStreams.next(streamId, scope, rpcContext?.signal);
|
|
589
672
|
return {
|
|
590
673
|
done: next.done === true,
|
|
591
674
|
...(next.done === true ? {} : { value: encodeNativeResponseBytes(next.value) }),
|
|
@@ -593,10 +676,7 @@ export function createPeerHostFeature(options = {}) {
|
|
|
593
676
|
}
|
|
594
677
|
case 'nativeStreamClose': {
|
|
595
678
|
const streamId = requiredString(input.streamId, 'streamId');
|
|
596
|
-
|
|
597
|
-
nativeStreams.delete(streamId);
|
|
598
|
-
if (stream?.iterator.return !== undefined)
|
|
599
|
-
await stream.iterator.return();
|
|
679
|
+
await nativeStreams.close(streamId, parseScope(input.scope));
|
|
600
680
|
return { closed: true };
|
|
601
681
|
}
|
|
602
682
|
case 'native': {
|
|
@@ -605,18 +685,17 @@ export function createPeerHostFeature(options = {}) {
|
|
|
605
685
|
throw new CodingNsRpcError('CODINGNS_RPC_NOT_FOUND', `未知 DSH 原生 Remote 方法: ${method}`);
|
|
606
686
|
const scope = parseScope(input.scope);
|
|
607
687
|
const rewritten = rewriteNativeRequestIds(method, input.payload, createScopedNativeIdResolver(workspaceRegistry, scope));
|
|
608
|
-
const
|
|
688
|
+
const signal = rpcContext?.signal;
|
|
689
|
+
const value = await aggregatedTransport.rpc({ scope, method, payload: rewritten, ...(signal === undefined ? {} : { signal }) });
|
|
609
690
|
const virtualHostId = scope.targetHostId ?? scope.hostId;
|
|
610
|
-
return encodeNativeResponseBytes(rewriteNativeResponseIds(value, (id) => createVirtualWorkspaceId(virtualHostId, id), (id) => createVirtualSessionId(virtualHostId, id)));
|
|
691
|
+
return encodeNativeResponseBytes(rewriteNativeResponseIds(value, (id) => createVirtualWorkspaceId(virtualHostId, id), (id) => createVirtualSessionId(virtualHostId, id), method));
|
|
611
692
|
}
|
|
612
693
|
default: throw new CodingNsRpcError('CODINGNS_RPC_NOT_FOUND', `未知 PeerHost RPC: peerHost/${action}`);
|
|
613
694
|
}
|
|
614
695
|
});
|
|
615
696
|
context.resources.add(unregister);
|
|
616
697
|
context.resources.add(() => {
|
|
617
|
-
|
|
618
|
-
void stream.iterator.return?.();
|
|
619
|
-
nativeStreams.clear();
|
|
698
|
+
nativeStreams.dispose();
|
|
620
699
|
});
|
|
621
700
|
},
|
|
622
701
|
};
|
|
@@ -793,11 +872,6 @@ function finiteNumber(value) {
|
|
|
793
872
|
function isAsyncIterable(value) {
|
|
794
873
|
return typeof value === 'object' && value !== null && typeof value[Symbol.asyncIterator] === 'function';
|
|
795
874
|
}
|
|
796
|
-
function assertSameScope(expected, actual) {
|
|
797
|
-
if (expected.hostId !== actual.hostId || expected.targetHostId !== actual.targetHostId || expected.workspaceId !== actual.workspaceId || expected.sessionId !== actual.sessionId || expected.scopeGeneration !== actual.scopeGeneration) {
|
|
798
|
-
throw new CodingNsRpcError('CODINGNS_RPC_SCOPE_MISMATCH', 'DSH 原生 Remote 流作用域不匹配');
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
875
|
async function authorizePeerHostUpgrade(loginStore, request) {
|
|
802
876
|
const origin = request.headers.origin;
|
|
803
877
|
const host = request.headers.host;
|
|
@@ -908,6 +982,18 @@ function record(value) {
|
|
|
908
982
|
throw new TypeError('PeerHost RPC 参数必须是对象');
|
|
909
983
|
return value;
|
|
910
984
|
}
|
|
985
|
+
/** 解析页面侧转发的有限请求头,拒绝非字符串值与原型对象。 */
|
|
986
|
+
function parseProxyHeaders(value) {
|
|
987
|
+
const input = record(value);
|
|
988
|
+
const headers = {};
|
|
989
|
+
for (const [name, raw] of Object.entries(input)) {
|
|
990
|
+
if (!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u.test(name) || typeof raw !== 'string') {
|
|
991
|
+
throw new TypeError('headers 必须是合法的字符串键值');
|
|
992
|
+
}
|
|
993
|
+
headers[name] = raw;
|
|
994
|
+
}
|
|
995
|
+
return headers;
|
|
996
|
+
}
|
|
911
997
|
/**
|
|
912
998
|
* 解析工作区标签配色。
|
|
913
999
|
*
|
|
@@ -936,7 +1022,10 @@ function requiredString(value, field) {
|
|
|
936
1022
|
* 当成可路由资源。
|
|
937
1023
|
*/
|
|
938
1024
|
export function createScopedNativeIdResolver(registry, scope) {
|
|
1025
|
+
const workspacePath = scope.targetHostId === null ? undefined
|
|
1026
|
+
: registry.get(createVirtualWorkspaceId(scope.targetHostId, scope.workspaceId))?.path;
|
|
939
1027
|
return {
|
|
1028
|
+
...(workspacePath === undefined ? {} : { workspacePath }),
|
|
940
1029
|
resolveWorkspace(id) {
|
|
941
1030
|
const known = registry.resolveWorkspace(id);
|
|
942
1031
|
if (known !== null)
|