@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
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import { randomInt, randomUUID } from 'node:crypto';
|
|
2
|
+
import { assistantNotificationText, normalizeAssistantNotificationSettings, } from '../../shared/assistant-notifications.js';
|
|
3
|
+
import { CodingNsRpcError } from '../rpc-table.js';
|
|
4
|
+
const pending = (notice) => (notice.kind === 'question' || notice.kind === 'approval') && notice.lifecycle === 'active';
|
|
5
|
+
const priority = (notice) => ({ approval: 3, question: 3, error: 2, completed: 1 })[notice.kind];
|
|
6
|
+
const sessionKey = (target) => JSON.stringify([target.hostId, target.sessionId]);
|
|
7
|
+
/** 单一事实所有者;历史容量不影响当前请求和会话去重水位。 */
|
|
8
|
+
export class AssistantNotificationCenter {
|
|
9
|
+
options;
|
|
10
|
+
records = new Map();
|
|
11
|
+
watermarks = new Map();
|
|
12
|
+
capabilities = new Map();
|
|
13
|
+
connections = new Map();
|
|
14
|
+
settings = normalizeAssistantNotificationSettings(undefined);
|
|
15
|
+
managed = new Set();
|
|
16
|
+
enabled = false;
|
|
17
|
+
scopeKey = '';
|
|
18
|
+
disposed = false;
|
|
19
|
+
// Host 重建不能重用上一生命周期的代次,否则相同修订号会让客户端保留旧分页。
|
|
20
|
+
currentGeneration = randomInt(1, 2 ** 40);
|
|
21
|
+
currentRevision = 0;
|
|
22
|
+
revisionListeners = new Set();
|
|
23
|
+
now;
|
|
24
|
+
constructor(options = {}) {
|
|
25
|
+
this.options = options;
|
|
26
|
+
this.now = options.now ?? Date.now;
|
|
27
|
+
}
|
|
28
|
+
get generation() { return this.currentGeneration; }
|
|
29
|
+
get revision() { return this.currentRevision; }
|
|
30
|
+
/** 供通知长连接监听修订变化;监听器异常不能影响通知事实所有者。 */
|
|
31
|
+
subscribeRevision(listener) {
|
|
32
|
+
this.revisionListeners.add(listener);
|
|
33
|
+
return () => this.revisionListeners.delete(listener);
|
|
34
|
+
}
|
|
35
|
+
/** 先切换代次,旧订阅或异步导航便不能重新写入已移除的范围。 */
|
|
36
|
+
configure(enabled, managedWorkspaceIds, settings) {
|
|
37
|
+
const normalized = normalizeAssistantNotificationSettings(settings);
|
|
38
|
+
const key = JSON.stringify([enabled, normalized.enabled, [...new Set(managedWorkspaceIds)].sort()]);
|
|
39
|
+
if (this.scopeKey === key) {
|
|
40
|
+
if (JSON.stringify(this.settings) === JSON.stringify(normalized))
|
|
41
|
+
return false;
|
|
42
|
+
this.settings = normalized;
|
|
43
|
+
// 单类型设置只清理对应记录,保留其他待办的身份、已读、收起及首展计时。
|
|
44
|
+
for (const item of [...this.records.values()])
|
|
45
|
+
if (!normalized[item.notice.kind])
|
|
46
|
+
this.remove(item);
|
|
47
|
+
this.bumpRevision();
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
this.scopeKey = key;
|
|
51
|
+
this.currentGeneration++;
|
|
52
|
+
this.records.clear();
|
|
53
|
+
this.watermarks.clear();
|
|
54
|
+
this.connections.clear();
|
|
55
|
+
this.capabilities.clear();
|
|
56
|
+
this.settings = normalized;
|
|
57
|
+
this.managed = new Set(managedWorkspaceIds);
|
|
58
|
+
this.enabled = enabled && normalized.enabled && !this.disposed;
|
|
59
|
+
// 先清理旧代次,再广播新 revision;流订阅者拿到的首个新快照必须是空的当前范围。
|
|
60
|
+
this.bumpRevision();
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
baseline(target, seq, turn) {
|
|
64
|
+
if (!Number.isSafeInteger(seq) || seq < -1)
|
|
65
|
+
return;
|
|
66
|
+
const previous = this.watermarks.get(sessionKey(target));
|
|
67
|
+
if (previous !== undefined) {
|
|
68
|
+
previous.seq = Math.max(previous.seq, seq);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
this.watermarks.set(sessionKey(target), { seq, ...(turn === undefined ? {} : { turn }), failed: false });
|
|
72
|
+
}
|
|
73
|
+
setCapabilities(value) {
|
|
74
|
+
const next = { ...value, ...(value.reason === undefined ? {} : { reason: assistantNotificationText(value.reason) }) };
|
|
75
|
+
if (JSON.stringify(this.capabilities.get(value.hostId)) === JSON.stringify(next))
|
|
76
|
+
return;
|
|
77
|
+
this.capabilities.set(value.hostId, next);
|
|
78
|
+
this.bumpRevision();
|
|
79
|
+
}
|
|
80
|
+
/** 断线只撤销操作能力;重连不改变逻辑请求身份或展示计时。 */
|
|
81
|
+
connection(hostId, connectionGeneration, ready) {
|
|
82
|
+
const previous = this.connections.get(hostId);
|
|
83
|
+
if (!Number.isSafeInteger(connectionGeneration) || connectionGeneration < 0 || previous !== undefined && connectionGeneration < previous.generation)
|
|
84
|
+
return;
|
|
85
|
+
if (previous?.generation === connectionGeneration && previous.ready === ready)
|
|
86
|
+
return;
|
|
87
|
+
this.connections.set(hostId, { generation: connectionGeneration, ready });
|
|
88
|
+
for (const item of this.records.values()) {
|
|
89
|
+
if (item.target.hostId !== hostId)
|
|
90
|
+
continue;
|
|
91
|
+
item.target = { ...item.target, connectionGeneration };
|
|
92
|
+
item.notice = { ...item.notice, connectionGeneration, availability: ready ? 'ready' : 'disconnected' };
|
|
93
|
+
}
|
|
94
|
+
this.bumpRevision();
|
|
95
|
+
}
|
|
96
|
+
/** 用当前会话快照校正待处理请求;快照是事实来源,记录只保存展示身份和已读状态。 */
|
|
97
|
+
reconcilePending(facts, hostId, authoritative) {
|
|
98
|
+
if (!this.enabled)
|
|
99
|
+
return;
|
|
100
|
+
const active = new Set();
|
|
101
|
+
for (const fact of facts) {
|
|
102
|
+
if (fact.type !== 'request-opened' || fact.target.hostId !== hostId)
|
|
103
|
+
continue;
|
|
104
|
+
active.add(this.logicalKey(fact));
|
|
105
|
+
this.consume(fact);
|
|
106
|
+
}
|
|
107
|
+
const available = new Set(authoritative);
|
|
108
|
+
for (const item of [...this.records.values()]) {
|
|
109
|
+
if (!pending(item.notice) || item.target.hostId !== hostId)
|
|
110
|
+
continue;
|
|
111
|
+
const actualSessionId = item.target.actualRequestTarget?.sessionId ?? item.target.sessionId;
|
|
112
|
+
if (!available.has(`${item.notice.kind}:${actualSessionId}`) || active.has(item.logicalKey))
|
|
113
|
+
continue;
|
|
114
|
+
this.remove(item);
|
|
115
|
+
this.bumpRevision();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
removeHost(hostId) {
|
|
119
|
+
for (const item of [...this.records.values()])
|
|
120
|
+
if (item.target.hostId === hostId)
|
|
121
|
+
this.remove(item);
|
|
122
|
+
for (const key of this.watermarks.keys())
|
|
123
|
+
if (JSON.parse(key)[0] === hostId)
|
|
124
|
+
this.watermarks.delete(key);
|
|
125
|
+
this.connections.delete(hostId);
|
|
126
|
+
this.capabilities.delete(hostId);
|
|
127
|
+
this.bumpRevision();
|
|
128
|
+
}
|
|
129
|
+
invalidateSession(hostId, sessionId) {
|
|
130
|
+
for (const item of [...this.records.values()])
|
|
131
|
+
if (item.target.hostId === hostId && item.target.sessionId === sessionId || item.target.actualRequestTarget?.hostId === hostId && item.target.actualRequestTarget.sessionId === sessionId)
|
|
132
|
+
this.remove(item);
|
|
133
|
+
this.watermarks.delete(JSON.stringify([hostId, sessionId]));
|
|
134
|
+
this.bumpRevision();
|
|
135
|
+
}
|
|
136
|
+
updateTitle(hostId, sessionId, title) {
|
|
137
|
+
const safe = assistantNotificationText(title, 240, '未命名会话');
|
|
138
|
+
for (const item of this.records.values()) {
|
|
139
|
+
if (item.target.hostId !== hostId || item.target.sessionId !== sessionId || item.notice.sessionTitle === safe)
|
|
140
|
+
continue;
|
|
141
|
+
item.notice = { ...item.notice, sessionTitle: safe };
|
|
142
|
+
this.bumpRevision();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
consume(fact) {
|
|
146
|
+
if (!this.enabled || fact.generation !== this.currentGeneration || !this.managed.has(fact.target.workspaceId))
|
|
147
|
+
return;
|
|
148
|
+
const connection = this.connections.get(fact.target.hostId);
|
|
149
|
+
if (fact.target.connectionGeneration !== undefined && connection !== undefined && (!connection.ready || connection.generation !== fact.target.connectionGeneration))
|
|
150
|
+
return;
|
|
151
|
+
const request = 'requestId' in fact;
|
|
152
|
+
const kind = request ? fact.requestKind : fact.type === 'turn-failed' ? 'error' : 'completed';
|
|
153
|
+
const key = this.logicalKey(fact);
|
|
154
|
+
if (request && fact.seq !== undefined) {
|
|
155
|
+
const sk = fact.target.actualRequestTarget === undefined ? sessionKey(fact.target) : sessionKey(fact.target.actualRequestTarget);
|
|
156
|
+
const previous = this.watermarks.get(sk);
|
|
157
|
+
if (previous !== undefined && fact.seq <= previous.seq)
|
|
158
|
+
return;
|
|
159
|
+
this.watermarks.set(sk, { ...previous, seq: fact.seq, failed: previous?.failed ?? false });
|
|
160
|
+
}
|
|
161
|
+
if (request && fact.type === 'request-resolved') {
|
|
162
|
+
const item = [...this.records.values()].find((candidate) => candidate.logicalKey === key);
|
|
163
|
+
if (item !== undefined && item.notice.lifecycle === 'active') {
|
|
164
|
+
item.notice = { ...item.notice, lifecycle: 'resolved', presentation: 'collapsed' };
|
|
165
|
+
this.trim();
|
|
166
|
+
this.bumpRevision();
|
|
167
|
+
}
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
let item;
|
|
171
|
+
if (request) {
|
|
172
|
+
if (!this.settings[kind])
|
|
173
|
+
return;
|
|
174
|
+
item = [...this.records.values()].find((candidate) => candidate.logicalKey === key);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
const sk = sessionKey(fact.target);
|
|
178
|
+
const previous = this.watermarks.get(sk);
|
|
179
|
+
// 同轮错误允许升级既有完成通知;淘汰历史绝不能重新接受旧序列。
|
|
180
|
+
const sameTurn = previous?.turnId === fact.turnId;
|
|
181
|
+
if (previous !== undefined && (fact.seq !== undefined && fact.seq <= previous.seq || fact.turn !== undefined && previous.turn !== undefined && fact.turn < previous.turn))
|
|
182
|
+
return;
|
|
183
|
+
if (sameTurn && (previous.failed || fact.type === 'turn-completed')) {
|
|
184
|
+
if (fact.seq !== undefined)
|
|
185
|
+
previous.seq = fact.seq;
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
item = sameTurn && previous?.noticeId !== undefined ? this.records.get(previous.noticeId) : undefined;
|
|
189
|
+
this.watermarks.set(sk, { seq: fact.seq ?? previous?.seq ?? -1, ...(fact.turn === undefined ? {} : { turn: fact.turn }), turnId: fact.turnId, failed: fact.type === 'turn-failed' });
|
|
190
|
+
if (!this.settings[kind]) {
|
|
191
|
+
// 关闭错误提示也不能保留同轮已被失败事实推翻的完成提示。
|
|
192
|
+
if (item !== undefined) {
|
|
193
|
+
this.remove(item);
|
|
194
|
+
this.bumpRevision();
|
|
195
|
+
}
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
const title = assistantNotificationText(fact.sessionTitle, 240, '未命名会话');
|
|
200
|
+
const template = { completed: '本轮已完成', error: '本轮执行出错', question: '有问题需要你回答', approval: '有权限请求需要你确认' }[kind];
|
|
201
|
+
const target = request ? { ...fact.target, requestId: fact.requestId, requestKind: fact.requestKind } : { ...fact.target };
|
|
202
|
+
if (item !== undefined && request) {
|
|
203
|
+
if (item.notice.lifecycle !== 'active')
|
|
204
|
+
return;
|
|
205
|
+
const notice = { ...item.notice, sessionTitle: title, text: template, availability: 'ready', ...(target.connectionGeneration === undefined ? {} : { connectionGeneration: target.connectionGeneration }) };
|
|
206
|
+
if (JSON.stringify(item.target) !== JSON.stringify(target) || JSON.stringify(item.notice) !== JSON.stringify(notice)) {
|
|
207
|
+
item.target = target;
|
|
208
|
+
item.notice = notice;
|
|
209
|
+
this.bumpRevision();
|
|
210
|
+
}
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
const notice = {
|
|
214
|
+
noticeId: item?.notice.noticeId ?? randomUUID(), kind, hostLabel: assistantNotificationText(fact.hostLabel, 160, '本机'),
|
|
215
|
+
workspaceLabel: assistantNotificationText(fact.workspaceLabel, 160, '工作区'), sessionTitle: title, text: template,
|
|
216
|
+
createdAt: this.now(), read: false, presentation: 'queued', lifecycle: 'active', availability: 'ready',
|
|
217
|
+
...(target.connectionGeneration === undefined ? {} : { connectionGeneration: target.connectionGeneration }),
|
|
218
|
+
...(fact.type === 'turn-failed' && fact.errorExcerpt !== undefined ? { errorExcerpt: assistantNotificationText(fact.errorExcerpt) } : {}),
|
|
219
|
+
};
|
|
220
|
+
this.records.set(notice.noticeId, { notice, target, logicalKey: key });
|
|
221
|
+
if (!request)
|
|
222
|
+
this.watermarks.get(sessionKey(fact.target)).noticeId = notice.noticeId;
|
|
223
|
+
this.trim();
|
|
224
|
+
this.bumpRevision();
|
|
225
|
+
}
|
|
226
|
+
read(input = {}) {
|
|
227
|
+
this.expire();
|
|
228
|
+
if (input.revision !== undefined && (!Number.isSafeInteger(input.revision) || input.revision < 0))
|
|
229
|
+
throw new TypeError('通知修订号无效');
|
|
230
|
+
const limit = input.limit ?? 20;
|
|
231
|
+
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 50)
|
|
232
|
+
throw new TypeError('通知分页大小必须为 1 到 50');
|
|
233
|
+
let offset = 0;
|
|
234
|
+
let reset = false;
|
|
235
|
+
if (input.cursor !== undefined) {
|
|
236
|
+
if (typeof input.cursor !== 'string' || input.cursor.length > 160 || !/^\d+:\d+:\d+$/u.test(input.cursor))
|
|
237
|
+
throw new TypeError('通知游标无效');
|
|
238
|
+
const [generation, revision, index] = input.cursor.split(':').map(Number);
|
|
239
|
+
if (![generation, revision, index].every(value => Number.isSafeInteger(value) && value >= 0))
|
|
240
|
+
throw new TypeError('通知游标无效');
|
|
241
|
+
if (generation !== this.currentGeneration || revision !== this.currentRevision)
|
|
242
|
+
reset = true;
|
|
243
|
+
else
|
|
244
|
+
offset = index;
|
|
245
|
+
}
|
|
246
|
+
const values = [...this.records.values()].map((item) => item.notice);
|
|
247
|
+
const all = [...values].sort((a, b) => b.createdAt - a.createdAt || b.noticeId.localeCompare(a.noticeId));
|
|
248
|
+
// 同毫秒内的多个请求仍按输入顺序展示,随机通知 ID 不能决定队列顺序。
|
|
249
|
+
const candidates = values.filter((notice) => notice.lifecycle === 'active' && notice.presentation !== 'collapsed' && notice.availability === 'ready')
|
|
250
|
+
.sort((a, b) => priority(b) - priority(a) || a.createdAt - b.createdAt);
|
|
251
|
+
const next = offset + limit;
|
|
252
|
+
const snapshot = { generation: this.currentGeneration, revision: this.currentRevision, serverNow: this.now(), primary: candidates[0] === undefined ? null : { ...candidates[0] }, items: all.slice(offset, next).map((item) => ({ ...item })), unreadCount: all.filter((item) => !item.read).length, pendingCount: all.filter(pending).length, cursor: next < all.length ? `${this.currentGeneration}:${this.currentRevision}:${next}` : null, capabilities: [...this.capabilities.values()].map((item) => ({ ...item })), ...(reset ? { reset: true } : {}) };
|
|
253
|
+
return input.cursor === undefined && input.revision === this.currentRevision ? { ...snapshot, items: [], unchanged: true } : snapshot;
|
|
254
|
+
}
|
|
255
|
+
ack(input) {
|
|
256
|
+
this.expire();
|
|
257
|
+
if (!['presented', 'read', 'dismiss'].includes(input.action))
|
|
258
|
+
throw new TypeError('通知确认动作无效');
|
|
259
|
+
if (input.kind !== undefined && !['completed', 'error', 'question', 'approval'].includes(input.kind))
|
|
260
|
+
throw new TypeError('通知确认类型无效');
|
|
261
|
+
const item = this.lookup(input);
|
|
262
|
+
// 浏览器和伴随窗口都可能在失败事实到达前发出了完成帧确认。
|
|
263
|
+
if (input.connectionGeneration !== undefined && (!Number.isSafeInteger(input.connectionGeneration) || input.connectionGeneration < 0))
|
|
264
|
+
throw new TypeError('远端连接代次无效');
|
|
265
|
+
if (input.connectionGeneration !== undefined && input.connectionGeneration !== item.target.connectionGeneration)
|
|
266
|
+
throw new CodingNsRpcError('ASSISTANT_NOTIFICATION_STALE_CONNECTION', '远端连接已变化,请重新读取通知');
|
|
267
|
+
if (input.action === 'presented' && input.kind !== undefined && input.kind !== item.notice.kind)
|
|
268
|
+
return { generation: this.currentGeneration, revision: this.currentRevision, notification: { ...item.notice } };
|
|
269
|
+
let next = item.notice;
|
|
270
|
+
if (input.action === 'presented' && next.presentation === 'queued') {
|
|
271
|
+
const now = this.now();
|
|
272
|
+
// 完成提示固定 10 秒自动收起;错误、提问与审批的自动关闭跟随助理通知设置(autoClose)。
|
|
273
|
+
next = { ...next, presentation: 'shown', presentedAt: next.presentedAt ?? now, ...(next.kind === 'completed' ? { deadline: next.deadline ?? now + 10_000 } : {}) };
|
|
274
|
+
}
|
|
275
|
+
if (input.action === 'read' && !next.read)
|
|
276
|
+
next = { ...next, read: true, ...(!pending(next) ? { presentation: 'collapsed' } : {}) };
|
|
277
|
+
if (input.action === 'dismiss' && next.presentation !== 'collapsed')
|
|
278
|
+
next = { ...next, presentation: 'collapsed' };
|
|
279
|
+
if (next !== item.notice) {
|
|
280
|
+
item.notice = next;
|
|
281
|
+
this.bumpRevision();
|
|
282
|
+
}
|
|
283
|
+
return { generation: this.currentGeneration, revision: this.currentRevision, notification: { ...item.notice } };
|
|
284
|
+
}
|
|
285
|
+
async target(input) {
|
|
286
|
+
if (input.connectionGeneration !== undefined && (!Number.isSafeInteger(input.connectionGeneration) || input.connectionGeneration < 0))
|
|
287
|
+
throw new TypeError('远端连接代次无效');
|
|
288
|
+
const item = this.lookup(input);
|
|
289
|
+
const expectedConnection = item.target.connectionGeneration;
|
|
290
|
+
if (item.notice.availability !== 'ready')
|
|
291
|
+
throw new CodingNsRpcError('ASSISTANT_NOTIFICATION_DISCONNECTED', '目标 Host 暂时不可达');
|
|
292
|
+
if (item.target.connectionGeneration !== undefined && input.connectionGeneration !== item.target.connectionGeneration)
|
|
293
|
+
throw new CodingNsRpcError('ASSISTANT_NOTIFICATION_STALE_CONNECTION', '远端连接已变化,请重新读取通知');
|
|
294
|
+
if ((item.notice.kind === 'question' || item.notice.kind === 'approval') && item.notice.lifecycle !== 'active')
|
|
295
|
+
throw new CodingNsRpcError('ASSISTANT_NOTIFICATION_EXPIRED', '请求已经处理或失效');
|
|
296
|
+
const valid = await this.options.validateTarget?.(item.target) ?? true;
|
|
297
|
+
// 复核异步查询期间发生的范围或连接变化。
|
|
298
|
+
const current = this.lookup(input);
|
|
299
|
+
if (!valid || current !== item || current.notice.availability !== 'ready' || current.target.connectionGeneration !== expectedConnection || input.connectionGeneration !== current.target.connectionGeneration)
|
|
300
|
+
throw new CodingNsRpcError('ASSISTANT_NOTIFICATION_EXPIRED', '通知目标已失效');
|
|
301
|
+
return { ...item.target, ...(item.target.actualRequestTarget === undefined ? {} : { actualRequestTarget: { ...item.target.actualRequestTarget } }) };
|
|
302
|
+
}
|
|
303
|
+
dispose() { this.disposed = true; this.enabled = false; this.currentGeneration++; this.records.clear(); this.watermarks.clear(); this.connections.clear(); this.capabilities.clear(); this.bumpRevision(); this.revisionListeners.clear(); }
|
|
304
|
+
lookup(input) {
|
|
305
|
+
if (!Number.isSafeInteger(input.generation) || input.generation !== this.currentGeneration)
|
|
306
|
+
throw new CodingNsRpcError('ASSISTANT_NOTIFICATION_STALE_GENERATION', '通知代次已变化');
|
|
307
|
+
if (typeof input.noticeId !== 'string' || input.noticeId.length === 0 || input.noticeId.length > 160)
|
|
308
|
+
throw new TypeError('通知 ID 无效');
|
|
309
|
+
const item = this.records.get(input.noticeId);
|
|
310
|
+
if (item === undefined || !this.enabled || !this.managed.has(item.target.workspaceId))
|
|
311
|
+
throw new CodingNsRpcError('ASSISTANT_NOTIFICATION_EXPIRED', '通知已失效');
|
|
312
|
+
return item;
|
|
313
|
+
}
|
|
314
|
+
expire() {
|
|
315
|
+
for (const item of this.records.values())
|
|
316
|
+
if (item.notice.deadline !== undefined && item.notice.deadline <= this.now() && item.notice.presentation !== 'collapsed') {
|
|
317
|
+
item.notice = { ...item.notice, presentation: 'collapsed' };
|
|
318
|
+
this.bumpRevision();
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
bumpRevision() {
|
|
322
|
+
this.currentRevision++;
|
|
323
|
+
for (const listener of this.revisionListeners) {
|
|
324
|
+
try {
|
|
325
|
+
listener(this.currentRevision);
|
|
326
|
+
}
|
|
327
|
+
catch { /* 长连接观察者失败不能阻断通知写入。 */ }
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
remove(item) { this.records.delete(item.notice.noticeId); }
|
|
331
|
+
logicalKey(fact) {
|
|
332
|
+
return 'requestId' in fact
|
|
333
|
+
? JSON.stringify([fact.target.hostId, fact.target.actualRequestTarget?.sessionId ?? fact.target.sessionId, fact.requestKind, fact.requestId])
|
|
334
|
+
: JSON.stringify([fact.target.hostId, fact.target.sessionId, 'turn', fact.turnId]);
|
|
335
|
+
}
|
|
336
|
+
trim() {
|
|
337
|
+
const history = [...this.records.values()].filter((item) => !pending(item.notice)).sort((a, b) => a.notice.createdAt - b.notice.createdAt);
|
|
338
|
+
for (const item of history.slice(0, Math.max(0, history.length - 100)))
|
|
339
|
+
this.remove(item);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
//# sourceMappingURL=assistant-notifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-notifications.js","sourceRoot":"","sources":["../../../../../src/host/features/assistant-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EACL,yBAAyB,EAAE,sCAAsC,GAKlE,MAAM,yCAAyC,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AA0BlD,MAAM,OAAO,GAAG,CAAC,MAA6B,EAAW,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,MAAM,CAAC,SAAS,KAAK,QAAQ,CAAA;AACvJ,MAAM,QAAQ,GAAG,CAAC,MAA6B,EAAU,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAA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AC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAC7I,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;IACtF,CAAC;IACO,IAAI;QACV,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QAC1I,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC;YAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC3F,CAAC;CACF"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type AssistantNotificationFeed, type AssistantNotificationFeedRequest } from '../../shared/assistant-notification-feed.js';
|
|
2
|
+
import type { PeerHostRecord } from '../../shared/contracts/peer-host.js';
|
|
3
|
+
export interface AssistantPeerNotificationNode {
|
|
4
|
+
readonly hostId: string;
|
|
5
|
+
readonly hostLabel: string;
|
|
6
|
+
/** 连接地址、指纹和版本共同标记能力代次;暂时连接状态不重建来源。 */
|
|
7
|
+
readonly capabilityKey: string;
|
|
8
|
+
readonly workspaceIds: readonly string[];
|
|
9
|
+
}
|
|
10
|
+
/** checking/unreachable/ready 是同一来源的状态,重建会丢失待办的收起与已读。 */
|
|
11
|
+
export declare function assistantPeerNotificationCapabilityKey(record: Pick<PeerHostRecord, 'route' | 'fingerprint' | 'pluginVersion'>): string;
|
|
12
|
+
/** 原始工作区 ID 属于本机;远端必须显式选中带 Host 身份的范围。 */
|
|
13
|
+
export declare function assistantPeerNotificationWorkspaceIds(hostId: string, visibleWorkspaceIds: readonly string[], managedWorkspaceIds: readonly string[]): readonly string[];
|
|
14
|
+
export interface AssistantPeerNotificationUpdate {
|
|
15
|
+
readonly hostId: string;
|
|
16
|
+
readonly hostLabel: string;
|
|
17
|
+
readonly connectionGeneration: number;
|
|
18
|
+
readonly feed: AssistantNotificationFeed;
|
|
19
|
+
}
|
|
20
|
+
export interface AssistantPeerNotificationObserver {
|
|
21
|
+
onUpdate(update: AssistantPeerNotificationUpdate): void;
|
|
22
|
+
onUnavailable(hostId: string, connectionGeneration: number, reason: string, unsupported: boolean): void;
|
|
23
|
+
onRemove?(hostId: string): void;
|
|
24
|
+
}
|
|
25
|
+
export interface AssistantPeerNotificationsOptions {
|
|
26
|
+
nodes(signal: AbortSignal): Promise<readonly AssistantPeerNotificationNode[]>;
|
|
27
|
+
read(node: AssistantPeerNotificationNode, request: AssistantNotificationFeedRequest, signal: AbortSignal): Promise<unknown>;
|
|
28
|
+
/** 新版 Host 使用 Typert Remote 流;缺失或不支持时回退到 read。 */
|
|
29
|
+
stream?(node: AssistantPeerNotificationNode, signal: AbortSignal): AsyncIterable<unknown>;
|
|
30
|
+
readonly observer: AssistantPeerNotificationObserver;
|
|
31
|
+
readonly intervalMs?: number;
|
|
32
|
+
}
|
|
33
|
+
/** 每个受管 Host 一个串行增量读取;永不从空闲摘要或会话正文推导终态。 */
|
|
34
|
+
export declare class AssistantPeerNotifications {
|
|
35
|
+
private readonly options;
|
|
36
|
+
private readonly controller;
|
|
37
|
+
private readonly workers;
|
|
38
|
+
private readonly sequences;
|
|
39
|
+
private timer;
|
|
40
|
+
private refreshing;
|
|
41
|
+
constructor(options: AssistantPeerNotificationsOptions, signal?: AbortSignal);
|
|
42
|
+
start(): () => void;
|
|
43
|
+
/** 范围和已配置 Host 变化由本机元数据驱动,不对每条会话开轮询。 */
|
|
44
|
+
refresh(): Promise<void>;
|
|
45
|
+
readonly dispose: () => void;
|
|
46
|
+
private pump;
|
|
47
|
+
private pumpStream;
|
|
48
|
+
private pumpPolling;
|
|
49
|
+
private applyFeed;
|
|
50
|
+
private nextGeneration;
|
|
51
|
+
private interval;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=assistant-peer-notifications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-peer-notifications.d.ts","sourceRoot":"","sources":["../../../../../src/host/features/assistant-peer-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,yBAAyB,EAAE,KAAK,gCAAgC,EAAE,MAAM,6CAA6C,CAAA;AAElK,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAEzE,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,sCAAsC;IACtC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;CACzC;AACD,yDAAyD;AACzD,wBAAgB,sCAAsC,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,aAAa,GAAG,eAAe,CAAC,GAAG,MAAM,CAEtI;AACD,0CAA0C;AAC1C,wBAAgB,qCAAqC,CAAC,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,SAAS,MAAM,EAAE,EAAE,mBAAmB,EAAE,SAAS,MAAM,EAAE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OAAO,CAAC,UAAU,CAAQ;gBAEG,OAAO,EAAE,iCAAiC,EAAE,MAAM,CAAC,EAAE,WAAW;IAM7F,KAAK,IAAI,MAAM,IAAI;IAUnB,wCAAwC;IAClC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAyB9B,QAAQ,CAAC,OAAO,QAAO,IAAI,CAM1B;YAEa,IAAI;YAQJ,UAAU;YAyBV,WAAW;IA0BzB,OAAO,CAAC,SAAS;IAejB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,QAAQ;CACjB"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { readAssistantNotificationFeed } from '../../shared/assistant-notification-feed.js';
|
|
2
|
+
import { assistantWorkspaceMatches } from '../../shared/assistant-lifecycle.js';
|
|
3
|
+
/** checking/unreachable/ready 是同一来源的状态,重建会丢失待办的收起与已读。 */
|
|
4
|
+
export function assistantPeerNotificationCapabilityKey(record) {
|
|
5
|
+
return JSON.stringify([record.route, record.fingerprint, record.pluginVersion]);
|
|
6
|
+
}
|
|
7
|
+
/** 原始工作区 ID 属于本机;远端必须显式选中带 Host 身份的范围。 */
|
|
8
|
+
export function assistantPeerNotificationWorkspaceIds(hostId, visibleWorkspaceIds, managedWorkspaceIds) {
|
|
9
|
+
return visibleWorkspaceIds.filter(workspaceId => managedWorkspaceIds.some(selected => selected !== workspaceId && assistantWorkspaceMatches(selected, hostId, workspaceId)));
|
|
10
|
+
}
|
|
11
|
+
/** 每个受管 Host 一个串行增量读取;永不从空闲摘要或会话正文推导终态。 */
|
|
12
|
+
export class AssistantPeerNotifications {
|
|
13
|
+
options;
|
|
14
|
+
controller = new AbortController();
|
|
15
|
+
workers = new Map();
|
|
16
|
+
sequences = new Map();
|
|
17
|
+
timer;
|
|
18
|
+
refreshing = false;
|
|
19
|
+
constructor(options, signal) {
|
|
20
|
+
this.options = options;
|
|
21
|
+
if (signal?.aborted)
|
|
22
|
+
this.controller.abort(signal.reason);
|
|
23
|
+
signal?.addEventListener('abort', this.dispose, { once: true });
|
|
24
|
+
this.controller.signal.addEventListener('abort', () => signal?.removeEventListener('abort', this.dispose), { once: true });
|
|
25
|
+
}
|
|
26
|
+
start() {
|
|
27
|
+
if (this.controller.signal.aborted)
|
|
28
|
+
return this.dispose;
|
|
29
|
+
if (this.timer === undefined) {
|
|
30
|
+
this.timer = setInterval(() => { void this.refresh(); }, this.interval());
|
|
31
|
+
this.timer.unref?.();
|
|
32
|
+
void this.refresh();
|
|
33
|
+
}
|
|
34
|
+
return this.dispose;
|
|
35
|
+
}
|
|
36
|
+
/** 范围和已配置 Host 变化由本机元数据驱动,不对每条会话开轮询。 */
|
|
37
|
+
async refresh() {
|
|
38
|
+
if (this.refreshing || this.controller.signal.aborted)
|
|
39
|
+
return;
|
|
40
|
+
this.refreshing = true;
|
|
41
|
+
try {
|
|
42
|
+
const nodes = await this.options.nodes(this.controller.signal);
|
|
43
|
+
if (this.controller.signal.aborted)
|
|
44
|
+
return;
|
|
45
|
+
const current = new Map(nodes.map(node => [node.hostId, node]));
|
|
46
|
+
for (const [hostId, worker] of this.workers) {
|
|
47
|
+
const node = current.get(hostId);
|
|
48
|
+
if (node !== undefined && worker.key === nodeKey(node)) {
|
|
49
|
+
worker.node = node;
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
worker.controller.abort();
|
|
53
|
+
this.workers.delete(hostId);
|
|
54
|
+
this.options.observer.onRemove?.(hostId);
|
|
55
|
+
}
|
|
56
|
+
for (const node of nodes) {
|
|
57
|
+
if (this.workers.has(node.hostId) || node.workspaceIds.length === 0)
|
|
58
|
+
continue;
|
|
59
|
+
const worker = { node, key: nodeKey(node), controller: new AbortController(), generation: this.nextGeneration(node.hostId), unsupported: false };
|
|
60
|
+
this.workers.set(node.hostId, worker);
|
|
61
|
+
void this.pump(worker);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
// 元数据读取临时失败不制造会话失败;下一轮重新同步,旧事件仍受取消信号保护。
|
|
66
|
+
}
|
|
67
|
+
finally {
|
|
68
|
+
this.refreshing = false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
dispose = () => {
|
|
72
|
+
if (this.controller.signal.aborted && this.workers.size === 0 && this.timer === undefined)
|
|
73
|
+
return;
|
|
74
|
+
this.controller.abort();
|
|
75
|
+
clearInterval(this.timer);
|
|
76
|
+
this.timer = undefined;
|
|
77
|
+
for (const worker of this.workers.values())
|
|
78
|
+
worker.controller.abort();
|
|
79
|
+
this.workers.clear();
|
|
80
|
+
this.sequences.clear();
|
|
81
|
+
};
|
|
82
|
+
async pump(worker) {
|
|
83
|
+
if (this.options.stream !== undefined) {
|
|
84
|
+
const supported = await this.pumpStream(worker);
|
|
85
|
+
if (supported || worker.controller.signal.aborted || this.controller.signal.aborted)
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
await this.pumpPolling(worker);
|
|
89
|
+
}
|
|
90
|
+
async pumpStream(worker) {
|
|
91
|
+
const signal = AbortSignal.any([this.controller.signal, worker.controller.signal]);
|
|
92
|
+
let attempts = 0;
|
|
93
|
+
while (!signal.aborted && !worker.unsupported) {
|
|
94
|
+
try {
|
|
95
|
+
const stream = this.options.stream(worker.node, signal);
|
|
96
|
+
for await (const raw of stream) {
|
|
97
|
+
if (signal.aborted)
|
|
98
|
+
return true;
|
|
99
|
+
this.applyFeed(worker, readAssistantNotificationFeed(raw), attempts);
|
|
100
|
+
attempts = 0;
|
|
101
|
+
}
|
|
102
|
+
if (signal.aborted)
|
|
103
|
+
return true;
|
|
104
|
+
throw new Error('远端通知事件流已结束');
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
if (signal.aborted)
|
|
108
|
+
return true;
|
|
109
|
+
if (isUnsupported(error))
|
|
110
|
+
return false;
|
|
111
|
+
this.options.observer.onUnavailable(worker.node.hostId, worker.generation, '远端暂不可达,提醒将在连接恢复后同步', false);
|
|
112
|
+
worker.generation = this.nextGeneration(worker.node.hostId);
|
|
113
|
+
attempts += 1;
|
|
114
|
+
}
|
|
115
|
+
await wait(Math.min(30_000, this.interval() * 2 ** Math.min(attempts, 5)), signal);
|
|
116
|
+
}
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
async pumpPolling(worker) {
|
|
120
|
+
const signal = AbortSignal.any([this.controller.signal, worker.controller.signal]);
|
|
121
|
+
let attempts = 0;
|
|
122
|
+
while (!signal.aborted && !worker.unsupported) {
|
|
123
|
+
try {
|
|
124
|
+
const raw = await this.options.read(worker.node, {
|
|
125
|
+
workspaceIds: worker.node.workspaceIds,
|
|
126
|
+
...(worker.epoch === undefined ? {} : { epoch: worker.epoch }),
|
|
127
|
+
...(worker.revision === undefined ? {} : { revision: worker.revision }),
|
|
128
|
+
}, AbortSignal.any([signal, AbortSignal.timeout(5_000)]));
|
|
129
|
+
if (signal.aborted)
|
|
130
|
+
return;
|
|
131
|
+
this.applyFeed(worker, readAssistantNotificationFeed(raw), attempts);
|
|
132
|
+
attempts = 0;
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
if (signal.aborted)
|
|
136
|
+
return;
|
|
137
|
+
worker.unsupported = isUnsupported(error);
|
|
138
|
+
this.options.observer.onUnavailable(worker.node.hostId, worker.generation, worker.unsupported ? '该远端暂不支持会话提醒来源协议' : '远端暂不可达,提醒将在连接恢复后同步', worker.unsupported);
|
|
139
|
+
if (worker.unsupported)
|
|
140
|
+
return;
|
|
141
|
+
worker.generation = this.nextGeneration(worker.node.hostId);
|
|
142
|
+
attempts += 1;
|
|
143
|
+
}
|
|
144
|
+
await wait(Math.min(30_000, this.interval() * 2 ** Math.min(attempts, 5)), signal);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
applyFeed(worker, feed, attempts) {
|
|
148
|
+
if (worker.epoch !== undefined && worker.epoch !== feed.epoch)
|
|
149
|
+
worker.generation = this.nextGeneration(worker.node.hostId);
|
|
150
|
+
const selected = new Set(worker.node.workspaceIds);
|
|
151
|
+
const scoped = { ...feed,
|
|
152
|
+
// 首次/缺口响应只能恢复当前待办;即使旧远端错误夹带历史终态也不重放。
|
|
153
|
+
events: feed.baseline || feed.gap ? [] : feed.events.filter(fact => selected.has(fact.workspaceId) && supportsFact(feed, fact.kind)),
|
|
154
|
+
pending: feed.capabilities.requests ? feed.pending.filter(fact => selected.has(fact.workspaceId)) : [],
|
|
155
|
+
};
|
|
156
|
+
const digest = JSON.stringify([feed.epoch, feed.revision, worker.node.hostLabel, scoped.pending, feed.capabilities]);
|
|
157
|
+
if (digest !== worker.digest || feed.events.length > 0 || feed.baseline || attempts > 0) {
|
|
158
|
+
this.options.observer.onUpdate({ hostId: worker.node.hostId, hostLabel: worker.node.hostLabel, connectionGeneration: worker.generation, feed: scoped });
|
|
159
|
+
}
|
|
160
|
+
worker.epoch = feed.epoch;
|
|
161
|
+
worker.revision = feed.revision;
|
|
162
|
+
worker.digest = digest;
|
|
163
|
+
}
|
|
164
|
+
nextGeneration(hostId) {
|
|
165
|
+
const value = (this.sequences.get(hostId) ?? 0) + 1;
|
|
166
|
+
this.sequences.set(hostId, value);
|
|
167
|
+
return value;
|
|
168
|
+
}
|
|
169
|
+
interval() { return Math.max(10, this.options.intervalMs ?? 1000); }
|
|
170
|
+
}
|
|
171
|
+
function nodeKey(node) {
|
|
172
|
+
return JSON.stringify([node.capabilityKey, [...node.workspaceIds].sort()]);
|
|
173
|
+
}
|
|
174
|
+
function supportsFact(feed, kind) {
|
|
175
|
+
if (kind === 'completed' || kind === 'error')
|
|
176
|
+
return feed.capabilities[kind];
|
|
177
|
+
return kind === 'resolved' ? feed.capabilities.resolve : feed.capabilities.requests;
|
|
178
|
+
}
|
|
179
|
+
function isUnsupported(value) {
|
|
180
|
+
if (typeof value === 'object' && value !== null) {
|
|
181
|
+
const code = value.code;
|
|
182
|
+
if (['UNSUPPORTED_CAPABILITY', 'CODINGNS_RPC_NOT_FOUND', 'CODINGNS_RPC_UNSUPPORTED', 'PEER_HOST_UNSUPPORTED'].includes(String(code)))
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
return /(?:HTTP (?:404|405)|not found|unsupported|未知|不存在|未挂载|尚未装配|暂不支持)/iu.test(value instanceof Error ? value.message : String(value));
|
|
186
|
+
}
|
|
187
|
+
function wait(ms, signal) {
|
|
188
|
+
if (signal.aborted)
|
|
189
|
+
return Promise.resolve();
|
|
190
|
+
return new Promise(resolve => {
|
|
191
|
+
const done = () => { clearTimeout(timer); signal.removeEventListener('abort', done); resolve(); };
|
|
192
|
+
const timer = setTimeout(done, ms);
|
|
193
|
+
timer.unref?.();
|
|
194
|
+
signal.addEventListener('abort', done, { once: true });
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=assistant-peer-notifications.js.map
|