@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
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { HttpSseClient } from './http-sse-client.js';
|
|
2
2
|
import { buildOpenCodeAttachmentParts } from './attachment-utils.js';
|
|
3
|
-
import { isProviderDefaultModel } from './model-catalog.js';
|
|
3
|
+
import { isProviderDefaultModel, knownOpenCodeContextWindow } from './model-catalog.js';
|
|
4
4
|
import { usageChunk } from './rpc-driver-utils.js';
|
|
5
5
|
import { serializeToolValue } from './tool-observation.js';
|
|
6
|
+
import { openCodeBridgeMcpConfig, openCodeBridgePrompt } from '../cli-bridge/injections.js';
|
|
6
7
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
8
|
+
const OPENCODE_NATIVE_SUBAGENT_DENY = [
|
|
9
|
+
{ action: 'subagent', resource: '*', effect: 'deny' },
|
|
10
|
+
];
|
|
7
11
|
/**
|
|
8
12
|
* OpenCode 2.0 的 HTTP/SSE 协议边界。
|
|
9
13
|
* V2 使用 data 信封、Model.Ref 和 session.* 事件,与 V1 不共享线协议解析。
|
|
@@ -111,6 +115,20 @@ export class OpenCodeV2Protocol {
|
|
|
111
115
|
}
|
|
112
116
|
async *executeTurn(server, input) {
|
|
113
117
|
input.signal?.throwIfAborted();
|
|
118
|
+
// OpenCode V2 不支持 ACP/Codex 的启动参数注入。每轮在目标目录注册当前
|
|
119
|
+
// DSH 会话专属的 CodingNS MCP server,随后用 session permission 拒绝原生
|
|
120
|
+
// subagent,避免模型在工具列表同时看到两个语义相同但生命周期不同的入口。
|
|
121
|
+
const bridge = openCodeBridgeMcpConfig(input.sessionId, 'opencode');
|
|
122
|
+
// 原生 subagent 永远禁止;桥接关闭时也不能静默回退到 OpenCode 自己的
|
|
123
|
+
// Agent。这样用户要么使用 CodingNS 托管工具,要么得到明确的权限拒绝。
|
|
124
|
+
const permissions = bridge === undefined
|
|
125
|
+
? OPENCODE_NATIVE_SUBAGENT_DENY
|
|
126
|
+
: [...OPENCODE_NATIVE_SUBAGENT_DENY, { action: bridge.toolName, resource: '*', effect: 'allow' }];
|
|
127
|
+
if (bridge !== undefined) {
|
|
128
|
+
await this.request(server, locationPath(`/api/experimental/mcp/${encodeURIComponent(bridge.serverName)}`, input.cwd), {
|
|
129
|
+
config: bridge.config,
|
|
130
|
+
}, input.signal, 'PUT');
|
|
131
|
+
}
|
|
114
132
|
const { catalog, models } = await this.modelCatalog(server, input.cwd, input.signal, isProviderDefaultModel(input.modelId) ? undefined : input.modelId);
|
|
115
133
|
const selected = selectModel(models, isProviderDefaultModel(input.modelId) ? catalog.currentModel : input.modelId);
|
|
116
134
|
const model = selected === undefined ? undefined : {
|
|
@@ -130,6 +148,7 @@ export class OpenCodeV2Protocol {
|
|
|
130
148
|
if (id === undefined) {
|
|
131
149
|
const session = record(await this.request(server, '/api/session', {
|
|
132
150
|
title: input.sessionId, ...(model === undefined ? {} : { model }),
|
|
151
|
+
permissions,
|
|
133
152
|
// V2 的目录在 location 里,不能继续传 V1 的 directory 或 query 参数。
|
|
134
153
|
location: { directory: input.cwd?.trim() || process.cwd() },
|
|
135
154
|
}, input.signal));
|
|
@@ -141,10 +160,17 @@ export class OpenCodeV2Protocol {
|
|
|
141
160
|
// V2 prompt 不接受 model/variant,续聊必须先更新会话选择。
|
|
142
161
|
await this.request(server, sessionPath(id, '/model'), { model }, input.signal);
|
|
143
162
|
}
|
|
163
|
+
if (permissions !== undefined && !created) {
|
|
164
|
+
// 旧会话是在桥接开启前创建的,必须显式补写权限;否则 OpenCode 仍会
|
|
165
|
+
// 继续执行它自己的 subagent,即使 MCP server 已经成功注册。
|
|
166
|
+
await this.request(server, sessionPath(id), { permissions }, input.signal, 'PATCH');
|
|
167
|
+
}
|
|
144
168
|
this.sessions.set(input.sessionId, { server, id: id });
|
|
145
169
|
const target = { server, providerSessionId: id, controller: new AbortController(), forms: new Map() };
|
|
146
170
|
this.turns.set(input.sessionId, target);
|
|
147
|
-
const projector = new OpenCodeV2Events(selected
|
|
171
|
+
const projector = new OpenCodeV2Events(selected === undefined
|
|
172
|
+
? undefined
|
|
173
|
+
: knownOpenCodeContextWindow(modelKey(selected)) ?? positiveNumber(selected.limit?.context));
|
|
148
174
|
let interruption;
|
|
149
175
|
const abort = () => {
|
|
150
176
|
target.controller.abort();
|
|
@@ -185,23 +211,25 @@ export class OpenCodeV2Protocol {
|
|
|
185
211
|
continue;
|
|
186
212
|
if (event.type === 'effect/httpapi/stream/failure')
|
|
187
213
|
throw new Error('OpenCode V2 事件流发生传输错误');
|
|
188
|
-
const data = record(event.data);
|
|
189
|
-
const form = record(data
|
|
214
|
+
const data = record(event.data) ?? {};
|
|
215
|
+
const form = record(data.form);
|
|
190
216
|
// V2 所有业务事件都有所属会话;严格排除其他会话与无主事件。
|
|
191
217
|
if ((data?.sessionID ?? form?.sessionID) !== id)
|
|
192
218
|
continue;
|
|
193
|
-
const
|
|
194
|
-
? this.formQuestion(target, form)
|
|
195
|
-
: projector.
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
219
|
+
const chunks = event.type === 'form.created' && form !== null
|
|
220
|
+
? singleEvent(this.formQuestion(target, form))
|
|
221
|
+
: projector.projectMany(event.type, data);
|
|
222
|
+
for (const chunk of chunks) {
|
|
223
|
+
if (chunk.type === 'finish') {
|
|
224
|
+
await send;
|
|
225
|
+
if (sendError !== undefined)
|
|
226
|
+
throw sendError;
|
|
227
|
+
finished = true;
|
|
228
|
+
}
|
|
229
|
+
yield chunk;
|
|
230
|
+
if (finished)
|
|
231
|
+
break;
|
|
203
232
|
}
|
|
204
|
-
yield chunk;
|
|
205
233
|
if (finished)
|
|
206
234
|
break;
|
|
207
235
|
}
|
|
@@ -232,8 +260,9 @@ export class OpenCodeV2Protocol {
|
|
|
232
260
|
}
|
|
233
261
|
async sendPrompt(target, input) {
|
|
234
262
|
const attachments = await buildOpenCodeAttachmentParts(input.attachments ?? []);
|
|
263
|
+
const promptText = openCodeBridgePrompt(input.sessionId, input.prompt);
|
|
235
264
|
const body = {
|
|
236
|
-
text:
|
|
265
|
+
text: promptText,
|
|
237
266
|
...(attachments.length === 0 ? {} : { files: attachments.map((part) => ({ uri: part.url, name: part.filename })) }),
|
|
238
267
|
};
|
|
239
268
|
const mention = input.prompt.match(/^\s*[/$]([A-Za-z0-9][A-Za-z0-9._:-]*)(?:\s+([\s\S]*))?$/u);
|
|
@@ -243,7 +272,9 @@ export class OpenCodeV2Protocol {
|
|
|
243
272
|
if (skill !== undefined) {
|
|
244
273
|
// V2 已有独立的 Skill 引用,不再借用同名 command 展开模板。
|
|
245
274
|
body.skills = [{ id: skill.id }];
|
|
246
|
-
|
|
275
|
+
// Skill 引用会重写正文,必须再次应用子代理路由规则,否则
|
|
276
|
+
// `/skill 请并行处理` 会绕过上面的 prompt 注入。
|
|
277
|
+
body.text = openCodeBridgePrompt(input.sessionId, mention[2] ?? '');
|
|
247
278
|
}
|
|
248
279
|
}
|
|
249
280
|
await this.request(target.server, sessionPath(target.providerSessionId, '/prompt'), body, target.controller.signal);
|
|
@@ -322,9 +353,9 @@ export class OpenCodeV2Protocol {
|
|
|
322
353
|
throw new Error('OpenCode V2 交互请求已结束');
|
|
323
354
|
return target;
|
|
324
355
|
}
|
|
325
|
-
async request(server, path, body, signal) {
|
|
356
|
+
async request(server, path, body, signal, method = 'POST') {
|
|
326
357
|
const response = await this.http.json(`${server}${path}`, {
|
|
327
|
-
...(body === undefined ? {} : { method
|
|
358
|
+
...(body === undefined ? {} : { method, headers: { 'content-type': 'application/json' }, body: JSON.stringify(body) }),
|
|
328
359
|
...(signal === undefined ? {} : { signal }),
|
|
329
360
|
});
|
|
330
361
|
if (response.status < 200 || response.status >= 300)
|
|
@@ -344,76 +375,189 @@ class OpenCodeV2Events {
|
|
|
344
375
|
contextWindow;
|
|
345
376
|
lengths = new Map();
|
|
346
377
|
tools = new Map();
|
|
378
|
+
pendingToolResults = [];
|
|
379
|
+
activeTextMessageId;
|
|
380
|
+
activeReasoningMessageId;
|
|
347
381
|
constructor(contextWindow) {
|
|
348
382
|
this.contextWindow = contextWindow;
|
|
349
383
|
}
|
|
350
384
|
project(type, data) {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
if (
|
|
356
|
-
return this.
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
385
|
+
return this.projectMany(type, data)[0] ?? null;
|
|
386
|
+
}
|
|
387
|
+
projectMany(type, data) {
|
|
388
|
+
type = canonicalEventType(type);
|
|
389
|
+
if (/^session\.(text|reasoning)\.(delta|ended)$/u.test(type)) {
|
|
390
|
+
return [...this.flushPendingToolResults(), ...this.text(type, data)];
|
|
391
|
+
}
|
|
392
|
+
if (type.startsWith('session.tool.')) {
|
|
393
|
+
// 某些 V2 事件流没有发送 text/reasoning.ended,直接进入工具事件。先关闭
|
|
394
|
+
// 正文块,避免工具结果和前一段 AI 输出被 DSH 合成同一条消息。
|
|
395
|
+
const boundaries = this.closeActiveMessages();
|
|
396
|
+
const tool = this.tool(type, data);
|
|
397
|
+
if (tool?.type === 'tool-event' && (tool.status === 'completed' || tool.status === 'failed')) {
|
|
398
|
+
// step.ended 紧随工具终态之后才携带 usage。暂存 completed,避免
|
|
399
|
+
// Registry 过早切 step,把本步结算写进下一步。
|
|
400
|
+
this.pendingToolResults.push(tool);
|
|
401
|
+
return [...boundaries];
|
|
402
|
+
}
|
|
403
|
+
return [...boundaries, ...singleEvent(tool)];
|
|
404
|
+
}
|
|
405
|
+
// V2 的 shell 事件是工具执行过程的附加快照。真正的工具终态仍由
|
|
406
|
+
// session.tool.success/failed 给出,这里只补齐命令和实时输出,避免同一
|
|
407
|
+
// 调用被提前结算两次。
|
|
408
|
+
if (type === 'session.shell.started')
|
|
409
|
+
return singleEvent(this.shell(type, data));
|
|
410
|
+
if (type === 'session.shell.ended')
|
|
411
|
+
return singleEvent(this.shell(type, data));
|
|
412
|
+
if (type === 'session.step.ended' || type === 'session.step.failed') {
|
|
413
|
+
return [...singleEvent(this.usage(data)), ...this.flushPendingToolResults()];
|
|
414
|
+
}
|
|
415
|
+
if (type === 'permission.asked') {
|
|
416
|
+
const callId = sourceCallId(data.source) ?? stringValue(data.callID) ?? stringValue(data.callId);
|
|
417
|
+
return [{
|
|
418
|
+
type: 'permission-request', requestId: stringValue(data.id) ?? '', kind: stringValue(data.action) ?? 'permission', toolName: stringValue(data.action) ?? 'permission',
|
|
419
|
+
...(callId === undefined ? {} : { callId }),
|
|
420
|
+
detail: [data.message, serializeToolValue(data.resources), serializeToolValue(data.metadata)].filter(Boolean).join('\n'),
|
|
421
|
+
}];
|
|
422
|
+
}
|
|
363
423
|
if (type === 'session.execution.succeeded')
|
|
364
|
-
return { type: 'finish', reason: 'stop' };
|
|
424
|
+
return [...this.flushPendingToolResults(), { type: 'finish', reason: 'stop' }];
|
|
365
425
|
if (type === 'session.execution.interrupted')
|
|
366
|
-
return { type: 'finish', reason: 'cancel' };
|
|
426
|
+
return [...this.flushPendingToolResults(), { type: 'finish', reason: 'cancel' }];
|
|
367
427
|
if (type === 'session.execution.failed')
|
|
368
|
-
return { type: 'finish', reason: 'error', failure: { message: errorDetail(data.error) } };
|
|
428
|
+
return [...this.flushPendingToolResults(), { type: 'finish', reason: 'error', failure: { message: errorDetail(data.error) } }];
|
|
369
429
|
if (type === 'session.compaction.started')
|
|
370
|
-
return { type: 'context-compaction', phase: 'start', provider: 'opencode' };
|
|
430
|
+
return [{ type: 'context-compaction', phase: 'start', provider: 'opencode' }];
|
|
371
431
|
if (type === 'session.compaction.ended' || type === 'session.compaction.failed')
|
|
372
|
-
return {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
return
|
|
432
|
+
return [{
|
|
433
|
+
type: 'context-compaction', phase: 'end', provider: 'opencode',
|
|
434
|
+
...(typeof data.text === 'string' ? { summary: data.text } : {}),
|
|
435
|
+
...(data.error === undefined ? {} : { error: errorDetail(data.error) }),
|
|
436
|
+
}];
|
|
437
|
+
return [];
|
|
378
438
|
}
|
|
379
439
|
text(type, data) {
|
|
380
440
|
const channel = type.split('.')[1];
|
|
381
|
-
const
|
|
441
|
+
const messageId = stringValue(data.assistantMessageID) ?? stringValue(data.messageID) ?? '';
|
|
442
|
+
const partId = scalarString(data.ordinal) ?? stringValue(data.textID) ?? stringValue(data.reasoningID) ?? '';
|
|
443
|
+
const key = `${messageId}:${channel}:${partId}`;
|
|
382
444
|
const previous = this.lengths.get(key) ?? 0;
|
|
383
445
|
const value = type.endsWith('.delta') ? data.delta : data.text;
|
|
384
446
|
if (typeof value !== 'string')
|
|
385
|
-
return
|
|
447
|
+
return [];
|
|
448
|
+
const normalizedMessageId = messageId || `${channel}:${partId || 'default'}`;
|
|
449
|
+
if (channel === 'reasoning')
|
|
450
|
+
this.activeReasoningMessageId = normalizedMessageId;
|
|
451
|
+
else
|
|
452
|
+
this.activeTextMessageId = normalizedMessageId;
|
|
386
453
|
const text = type.endsWith('.delta') ? value : value.slice(previous);
|
|
387
454
|
this.lengths.set(key, type.endsWith('.delta') ? previous + value.length : Math.max(previous, value.length));
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
455
|
+
const chunks = text === '' ? [] : [{ type: channel === 'reasoning' ? 'reasoning-delta' : 'text-delta', text, ...(messageId === '' ? {} : { messageId }) }];
|
|
456
|
+
if (type.endsWith('.ended')) {
|
|
457
|
+
// V2 的 ended 事件可能只表示“快照已完整”,也可能携带最后一段文本。
|
|
458
|
+
// 两种情况下都必须显式关闭当前 assistant block,否则后续工具、usage
|
|
459
|
+
// 和最终结算会被 DSH 合并进同一条 assistant/message。
|
|
460
|
+
chunks.push({
|
|
461
|
+
type: 'message-boundary',
|
|
462
|
+
channel: channel === 'reasoning' ? 'reasoning' : 'text',
|
|
463
|
+
messageId: normalizedMessageId,
|
|
464
|
+
});
|
|
465
|
+
if (channel === 'reasoning')
|
|
466
|
+
this.activeReasoningMessageId = undefined;
|
|
467
|
+
else
|
|
468
|
+
this.activeTextMessageId = undefined;
|
|
469
|
+
}
|
|
470
|
+
return chunks;
|
|
471
|
+
}
|
|
472
|
+
closeActiveMessages() {
|
|
473
|
+
const chunks = [];
|
|
474
|
+
if (this.activeReasoningMessageId !== undefined) {
|
|
475
|
+
chunks.push({ type: 'message-boundary', channel: 'reasoning', messageId: this.activeReasoningMessageId });
|
|
476
|
+
this.activeReasoningMessageId = undefined;
|
|
477
|
+
}
|
|
478
|
+
if (this.activeTextMessageId !== undefined) {
|
|
479
|
+
chunks.push({ type: 'message-boundary', channel: 'text', messageId: this.activeTextMessageId });
|
|
480
|
+
this.activeTextMessageId = undefined;
|
|
481
|
+
}
|
|
482
|
+
return chunks;
|
|
483
|
+
}
|
|
484
|
+
flushPendingToolResults() {
|
|
485
|
+
const pending = this.pendingToolResults;
|
|
486
|
+
this.pendingToolResults = [];
|
|
487
|
+
return pending;
|
|
391
488
|
}
|
|
392
489
|
tool(type, data) {
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
const tool = this.tools.get(key);
|
|
397
|
-
if (tool === undefined)
|
|
490
|
+
const callId = stringValue(data.callID) ?? stringValue(data.id);
|
|
491
|
+
const messageId = stringValue(data.assistantMessageID) ?? stringValue(data.messageID) ?? '';
|
|
492
|
+
if (callId === undefined)
|
|
398
493
|
return null;
|
|
399
|
-
|
|
494
|
+
const key = `${messageId}:${callId}`;
|
|
495
|
+
const existing = this.tools.get(key);
|
|
496
|
+
if (type === 'session.tool.input.started') {
|
|
497
|
+
const name = stringValue(data.name) ?? stringValue(data.tool) ?? existing?.name ?? 'tool';
|
|
498
|
+
this.tools.set(key, { name, input: existing?.input ?? '' });
|
|
499
|
+
}
|
|
500
|
+
const tool = this.tools.get(key) ?? {
|
|
501
|
+
name: stringValue(data.tool) ?? stringValue(data.name) ?? 'tool', input: '',
|
|
502
|
+
};
|
|
503
|
+
this.tools.set(key, tool);
|
|
504
|
+
if (type === 'session.tool.input.delta' && typeof data.delta === 'string') {
|
|
505
|
+
// delta 只是半截 JSON,不能让下游原生组件提前创建不可更新的 tool-call。
|
|
400
506
|
tool.input += data.delta;
|
|
401
507
|
return null;
|
|
402
508
|
}
|
|
403
|
-
if (type === 'session.tool.input.ended')
|
|
509
|
+
if (type === 'session.tool.input.ended' && typeof data.text === 'string')
|
|
404
510
|
tool.input = data.text;
|
|
405
|
-
|
|
511
|
+
if (type === 'session.tool.called') {
|
|
512
|
+
tool.name = stringValue(data.tool) ?? tool.name;
|
|
513
|
+
// V2 的 input.ended 可能已经收到了完整参数,但随后 called 事件只带
|
|
514
|
+
// `{}`(Code Mode/部分 Provider 的异步汇聚路径会这样发)。空快照不能
|
|
515
|
+
// 覆盖已收集的流式 JSON,否则 DSH 原生 tool/call 最终只能显示 `{}`。
|
|
516
|
+
const calledInput = serializeToolValue(data.input);
|
|
517
|
+
if (calledInput !== undefined && (isEmptyToolInput(tool.input) || !isEmptyToolInput(calledInput))) {
|
|
518
|
+
tool.input = calledInput;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
if ((type === 'session.tool.progress' || type === 'session.tool.success' || type === 'session.tool.failed') && isEmptyToolInput(tool.input)) {
|
|
522
|
+
// OpenCode 的 write/edit 工具会把真实文件内容放在 success.metadata.diffs,
|
|
523
|
+
// Code Mode 的 execute 则把实际子工具调用放在 progress.metadata.toolCalls;
|
|
524
|
+
// 两者都可能让 input.ended/called 只留下 `{}`。先还原参数,再交给 DSH
|
|
525
|
+
// 原生投影器,否则调用卡片会在空参数阶段被永久落盘。
|
|
526
|
+
const recovered = recoverToolInput(tool.name, data.metadata ?? record(data.provider)?.metadata);
|
|
527
|
+
if (recovered !== undefined)
|
|
528
|
+
tool.input = recovered;
|
|
406
529
|
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
const
|
|
530
|
+
// `{}` 只是 OpenCode 的占位快照,不是可展示的调用参数;在真实参数抵达
|
|
531
|
+
// 前不要把它继续下游,否则原生 DSH 卡片会先固定为空对象。
|
|
532
|
+
const input = isEmptyToolInput(tool.input) ? undefined : tool.input;
|
|
533
|
+
const output = toolOutput(data);
|
|
534
|
+
const status = type === 'session.tool.success' ? 'completed' : type === 'session.tool.failed' ? 'failed' : type === 'session.tool.input.started' ? 'started' : 'running';
|
|
410
535
|
return {
|
|
411
|
-
type: 'tool-event', toolName: tool.name, callId
|
|
412
|
-
status
|
|
413
|
-
...(
|
|
536
|
+
type: 'tool-event', toolName: tool.name, callId,
|
|
537
|
+
status,
|
|
538
|
+
...(input === undefined ? {} : { input }),
|
|
414
539
|
...(output ? { output, outputMode: 'snapshot' } : {}),
|
|
415
540
|
...(data.error === undefined ? {} : { error: errorDetail(data.error) }),
|
|
416
|
-
...(data.metadata === undefined ? {} : { detail: serializeToolValue(data.metadata) ?? '' }),
|
|
541
|
+
...(data.metadata === undefined && data.provider?.metadata === undefined ? {} : { detail: serializeToolValue(data.metadata ?? data.provider?.metadata) ?? '' }),
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
shell(type, data) {
|
|
545
|
+
const shell = record(data.shell);
|
|
546
|
+
const callId = stringValue(data.callID) ?? stringValue(data.id) ?? stringValue(shell?.id);
|
|
547
|
+
if (callId === undefined)
|
|
548
|
+
return null;
|
|
549
|
+
const messageId = stringValue(data.assistantMessageID) ?? stringValue(data.messageID) ?? '';
|
|
550
|
+
const key = `${messageId}:${callId}`;
|
|
551
|
+
const tool = this.tools.get(key) ?? { name: 'shell', input: '' };
|
|
552
|
+
this.tools.set(key, tool);
|
|
553
|
+
const command = stringValue(data.command) ?? stringValue(shell?.command);
|
|
554
|
+
if (type === 'session.shell.started' && command !== undefined)
|
|
555
|
+
tool.input = serializeToolValue({ command }) ?? command;
|
|
556
|
+
const output = typeof data.output === 'string' ? data.output : undefined;
|
|
557
|
+
return {
|
|
558
|
+
type: 'tool-event', toolName: tool.name, callId, status: 'running',
|
|
559
|
+
...(tool.input ? { input: tool.input } : {}),
|
|
560
|
+
...(output === undefined ? {} : { output, outputMode: 'snapshot' }),
|
|
417
561
|
};
|
|
418
562
|
}
|
|
419
563
|
usage(data) {
|
|
@@ -430,6 +574,106 @@ class OpenCodeV2Events {
|
|
|
430
574
|
});
|
|
431
575
|
}
|
|
432
576
|
}
|
|
577
|
+
/** 把 V2 的版本后缀和 next 命名空间收敛到内部事件名。 */
|
|
578
|
+
function canonicalEventType(type) {
|
|
579
|
+
let normalized = type.replace(/\.\d+$/u, '');
|
|
580
|
+
if (normalized.startsWith('session.next.'))
|
|
581
|
+
normalized = `session.${normalized.slice('session.next.'.length)}`;
|
|
582
|
+
if (normalized === 'permission.v2.asked')
|
|
583
|
+
normalized = 'permission.asked';
|
|
584
|
+
return normalized;
|
|
585
|
+
}
|
|
586
|
+
function stringValue(value) {
|
|
587
|
+
return typeof value === 'string' && value !== '' ? value : undefined;
|
|
588
|
+
}
|
|
589
|
+
function scalarString(value) {
|
|
590
|
+
if (typeof value === 'number' && Number.isFinite(value))
|
|
591
|
+
return String(value);
|
|
592
|
+
return stringValue(value);
|
|
593
|
+
}
|
|
594
|
+
function sourceCallId(value) {
|
|
595
|
+
const source = record(value);
|
|
596
|
+
return stringValue(source?.id) ?? stringValue(source?.callID) ?? stringValue(source?.callId);
|
|
597
|
+
}
|
|
598
|
+
function toolOutput(data) {
|
|
599
|
+
const parts = records(data.content).map((part) => {
|
|
600
|
+
if (typeof part.text === 'string')
|
|
601
|
+
return part.text;
|
|
602
|
+
if (typeof part.output === 'string')
|
|
603
|
+
return part.output;
|
|
604
|
+
if (typeof part.value === 'string')
|
|
605
|
+
return part.value;
|
|
606
|
+
return serializeToolValue(part);
|
|
607
|
+
}).filter((value) => Boolean(value));
|
|
608
|
+
if (parts.length > 0)
|
|
609
|
+
return parts.join('\n');
|
|
610
|
+
if (typeof data.output === 'string')
|
|
611
|
+
return data.output;
|
|
612
|
+
if (data.structured !== undefined)
|
|
613
|
+
return serializeToolValue(data.structured) ?? undefined;
|
|
614
|
+
if (data.result !== undefined)
|
|
615
|
+
return typeof data.result === 'string' ? data.result : serializeToolValue(data.result) ?? undefined;
|
|
616
|
+
return undefined;
|
|
617
|
+
}
|
|
618
|
+
function recoverToolInput(toolName, metadata) {
|
|
619
|
+
const meta = record(metadata);
|
|
620
|
+
const toolCalls = records(meta?.toolCalls);
|
|
621
|
+
if (toolName.trim().toLowerCase() === 'execute' && toolCalls.length > 0) {
|
|
622
|
+
const calls = toolCalls.map((call) => ({
|
|
623
|
+
...(stringValue(call.tool) === undefined ? {} : { tool: stringValue(call.tool) }),
|
|
624
|
+
...(stringValue(call.status) === undefined ? {} : { status: stringValue(call.status) }),
|
|
625
|
+
...(call.input === undefined ? {} : { input: call.input }),
|
|
626
|
+
}));
|
|
627
|
+
return serializeToolValue({ toolCalls: calls });
|
|
628
|
+
}
|
|
629
|
+
const diffs = records(meta?.diffs);
|
|
630
|
+
if (diffs.length === 0)
|
|
631
|
+
return undefined;
|
|
632
|
+
const name = canonicalFileToolName(toolName);
|
|
633
|
+
if (name !== 'write' && name !== 'edit')
|
|
634
|
+
return undefined;
|
|
635
|
+
const values = diffs.flatMap((diff) => {
|
|
636
|
+
const path = stringValue(diff.path);
|
|
637
|
+
const newText = typeof diff.newText === 'string' ? diff.newText : undefined;
|
|
638
|
+
if (path === undefined || newText === undefined)
|
|
639
|
+
return [];
|
|
640
|
+
return [{
|
|
641
|
+
path,
|
|
642
|
+
oldText: typeof diff.oldText === 'string' ? diff.oldText : null,
|
|
643
|
+
newText,
|
|
644
|
+
}];
|
|
645
|
+
});
|
|
646
|
+
if (values.length === 0)
|
|
647
|
+
return undefined;
|
|
648
|
+
if (name === 'write') {
|
|
649
|
+
const first = values[0];
|
|
650
|
+
return serializeToolValue({ path: first.path, content: first.newText });
|
|
651
|
+
}
|
|
652
|
+
if (values.length === 1) {
|
|
653
|
+
const first = values[0];
|
|
654
|
+
return serializeToolValue({ path: first.path, old_string: first.oldText ?? '', new_string: first.newText });
|
|
655
|
+
}
|
|
656
|
+
return serializeToolValue({ changes: values.map((value) => ({
|
|
657
|
+
path: value.path,
|
|
658
|
+
oldText: value.oldText,
|
|
659
|
+
newText: value.newText,
|
|
660
|
+
})) });
|
|
661
|
+
}
|
|
662
|
+
function canonicalFileToolName(value) {
|
|
663
|
+
const key = value.trim().toLowerCase().replace(/[\s-]+/gu, '_');
|
|
664
|
+
if (key === 'write' || key === 'write_file')
|
|
665
|
+
return 'write';
|
|
666
|
+
if (key === 'edit' || key === 'edit_file' || key === 'apply_patch')
|
|
667
|
+
return 'edit';
|
|
668
|
+
return 'other';
|
|
669
|
+
}
|
|
670
|
+
function isEmptyToolInput(value) {
|
|
671
|
+
const trimmed = value.trim();
|
|
672
|
+
return trimmed === '' || trimmed === '{}' || trimmed === 'null';
|
|
673
|
+
}
|
|
674
|
+
function singleEvent(event) {
|
|
675
|
+
return event === null ? [] : [event];
|
|
676
|
+
}
|
|
433
677
|
function selectModel(models, key) {
|
|
434
678
|
if (!key)
|
|
435
679
|
return undefined;
|
|
@@ -443,6 +687,9 @@ function selectModel(models, key) {
|
|
|
443
687
|
throw new Error(`OpenCode 模型不可用:${key};请刷新并选择当前模型目录中的模型`);
|
|
444
688
|
}
|
|
445
689
|
function modelKey(model) { return `${model.providerID}/${model.id}`; }
|
|
690
|
+
function positiveNumber(value) {
|
|
691
|
+
return typeof value === 'number' && Number.isFinite(value) && value > 0 ? value : undefined;
|
|
692
|
+
}
|
|
446
693
|
function sessionPath(id, suffix = '') { return `/api/session/${encodeURIComponent(id)}${suffix}`; }
|
|
447
694
|
function locationPath(path, cwd) {
|
|
448
695
|
if (!cwd?.trim())
|
|
@@ -456,7 +703,15 @@ function decodeEvent(event) {
|
|
|
456
703
|
try {
|
|
457
704
|
const value = JSON.parse(event.data);
|
|
458
705
|
const parsed = record(value);
|
|
459
|
-
|
|
706
|
+
if (parsed === null)
|
|
707
|
+
return null;
|
|
708
|
+
// 事件 API 在不同 V2 修订中分别使用普通 data、properties 和 syncEvent
|
|
709
|
+
// 信封。统一成 { type, data } 后,后续投影无需为每个版本复制分支。
|
|
710
|
+
const sync = parsed.type === 'sync' ? record(parsed.syncEvent) : null;
|
|
711
|
+
const source = sync ?? parsed;
|
|
712
|
+
const type = typeof source.type === 'string' ? source.type : event.event;
|
|
713
|
+
const data = record(source.data) ?? record(source.properties) ?? {};
|
|
714
|
+
return { ...source, ...(type === null ? {} : { type: canonicalEventType(type) }), data };
|
|
460
715
|
}
|
|
461
716
|
catch {
|
|
462
717
|
return null;
|