@jingyi0605/codingns4dsh 0.2.1-beta.6 → 0.2.1-beta.8
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 +21 -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 +6 -0
- package/data/build/dist/client/avatar/desktop-view.d.ts.map +1 -1
- package/data/build/dist/client/avatar/desktop-view.js +98 -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 +8 -3
- package/data/build/dist/client/avatar/floating.d.ts.map +1 -1
- package/data/build/dist/client/avatar/floating.js +22 -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 +39 -0
- package/data/build/dist/client/avatar/notification-bubble.d.ts.map +1 -0
- package/data/build/dist/client/avatar/notification-bubble.js +353 -0
- package/data/build/dist/client/avatar/notification-bubble.js.map +1 -0
- package/data/build/dist/client/avatar/notification-surface.d.ts +16 -0
- package/data/build/dist/client/avatar/notification-surface.d.ts.map +1 -0
- package/data/build/dist/client/avatar/notification-surface.js +54 -0
- package/data/build/dist/client/avatar/notification-surface.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 +20 -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 +6881 -1776
- 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 +287 -161
- 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 +201 -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 +58 -12
- package/data/build/dist/client/client.theme.js.map +1 -1
- package/data/build/dist/client/client.transport.js +342 -46
- 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 +61859 -158
- 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 +2 -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 +64 -28
- 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 +72 -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 +439 -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-record-style.js +11 -4
- package/data/build/dist/client/features/assistant-record-style.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 +4 -0
- package/data/build/dist/client/features/assistant-workbench.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-workbench.js +37 -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 +117 -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 +445 -28
- 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 +45 -0
- package/data/build/dist/client/locales/assistantWorkbench.d.ts.map +1 -1
- package/data/build/dist/client/locales/assistantWorkbench.js +30 -6
- 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 +20 -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 +127 -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 +48 -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 +328 -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/style.css +2561 -0
- package/data/build/dist/client/subagent-collapsed-lineage.d.ts +103 -0
- package/data/build/dist/client/subagent-collapsed-lineage.d.ts.map +1 -0
- package/data/build/dist/client/subagent-collapsed-lineage.js +664 -0
- package/data/build/dist/client/subagent-collapsed-lineage.js.map +1 -0
- package/data/build/dist/client/subscription-slot.d.ts +8 -2
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -1
- package/data/build/dist/client/subscription-slot.js +55 -34
- 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 +2 -0
- package/data/build/dist/client/theme.d.ts.map +1 -1
- package/data/build/dist/client/theme.js +20 -12
- package/data/build/dist/client/theme.js.map +1 -1
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts.map +1 -1
- package/data/build/dist/client/workspace-session-visibility-dom.js +22 -10
- package/data/build/dist/client/workspace-session-visibility-dom.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.d.ts +15 -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 +86 -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 +1 -0
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.js +36 -9
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-file-citations.d.ts +13 -0
- package/data/build/dist/host/cli-adapters/codex-file-citations.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-file-citations.js +271 -0
- package/data/build/dist/host/cli-adapters/codex-file-citations.js.map +1 -0
- package/data/build/dist/host/cli-adapters/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-message-projector.d.ts +2 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js +16 -5
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -1
- 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 +72 -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 +334 -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 +27 -2
- package/data/build/dist/host/desktop-assistant/controller.d.ts.map +1 -1
- package/data/build/dist/host/desktop-assistant/controller.js +197 -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-management-tools.d.ts +2 -1
- package/data/build/dist/host/features/assistant-management-tools.d.ts.map +1 -1
- package/data/build/dist/host/features/assistant-management-tools.js +10 -3
- package/data/build/dist/host/features/assistant-management-tools.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 +78 -0
- package/data/build/dist/host/features/assistant-notifications.d.ts.map +1 -0
- package/data/build/dist/host/features/assistant-notifications.js +436 -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 +2 -2
- package/data/build/dist/host/features/global-voice-rpc.d.ts.map +1 -1
- package/data/build/dist/host/features/global-voice-rpc.js +179 -4
- 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 +193 -75
- 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 +9 -1
- 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 +7 -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 +63 -1
- 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 +89 -9
- 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-message-timeline.d.ts +11 -0
- package/data/build/dist/shared/assistant-message-timeline.d.ts.map +1 -1
- package/data/build/dist/shared/assistant-message-timeline.js +19 -0
- package/data/build/dist/shared/assistant-message-timeline.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 +141 -0
- package/data/build/dist/shared/assistant-notifications.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-notifications.js +32 -0
- package/data/build/dist/shared/assistant-notifications.js.map +1 -0
- package/data/build/dist/shared/assistant-session-messages.d.ts +13 -0
- package/data/build/dist/shared/assistant-session-messages.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-session-messages.js +155 -0
- package/data/build/dist/shared/assistant-session-messages.js.map +1 -0
- package/data/build/dist/shared/assistant-tts.js +1 -1
- package/data/build/dist/shared/contracts/assistant.d.ts +13 -0
- package/data/build/dist/shared/contracts/assistant.d.ts.map +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 +74 -1
- package/data/build/dist/shared/desktop-assistant.d.ts.map +1 -1
- package/data/build/dist/shared/desktop-assistant.js +201 -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 +41 -33
- 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,271 @@
|
|
|
1
|
+
import { fromMarkdown } from 'mdast-util-from-markdown';
|
|
2
|
+
const CITATION_PREFIX = ':codex-file-citation{';
|
|
3
|
+
const FILE_LINK_URI_SCHEMES = new Set(['about', 'blob', 'data', 'file', 'ftp', 'http', 'https', 'mailto', 'ssh', 'tel', 'urn', 'vscode', 'ws', 'wss']);
|
|
4
|
+
/** Codex 引用按正文 item 暂存,不能将半条指令提前追加到 DSH 的增量日志。 */
|
|
5
|
+
export class CodexFileCitationNormalizer {
|
|
6
|
+
markdown = new MarkdownFileLinkNormalizer();
|
|
7
|
+
pending = '';
|
|
8
|
+
message;
|
|
9
|
+
*push(chunk) {
|
|
10
|
+
for (const citation of this.pushCitation(chunk))
|
|
11
|
+
yield* this.markdown.push(citation);
|
|
12
|
+
}
|
|
13
|
+
*flush() {
|
|
14
|
+
for (const citation of this.flushCitations())
|
|
15
|
+
yield* this.markdown.push(citation);
|
|
16
|
+
yield* this.markdown.flush();
|
|
17
|
+
}
|
|
18
|
+
*pushCitation(chunk) {
|
|
19
|
+
if (chunk.type !== 'text-delta') {
|
|
20
|
+
// 用量和推理可以穿插在正文 delta 之间,不代表正文 item 已经结束。
|
|
21
|
+
if (chunk.type !== 'usage' && chunk.type !== 'reasoning-delta' && chunk.type !== 'reasoning-snapshot')
|
|
22
|
+
yield* this.flushCitations();
|
|
23
|
+
yield chunk;
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (this.message?.messageId !== chunk.messageId)
|
|
27
|
+
yield* this.flushCitations();
|
|
28
|
+
this.message = chunk;
|
|
29
|
+
this.pending += chunk.text;
|
|
30
|
+
let text = '';
|
|
31
|
+
while (this.pending !== '') {
|
|
32
|
+
const start = this.pending.indexOf(CITATION_PREFIX);
|
|
33
|
+
if (start < 0) {
|
|
34
|
+
// 只保留可能是下一条指令开头的后缀;普通正文立即输出。
|
|
35
|
+
let retained = Math.min(this.pending.length, CITATION_PREFIX.length - 1);
|
|
36
|
+
while (retained > 0 && !CITATION_PREFIX.startsWith(this.pending.slice(-retained)))
|
|
37
|
+
retained -= 1;
|
|
38
|
+
text += this.pending.slice(0, this.pending.length - retained);
|
|
39
|
+
this.pending = retained === 0 ? '' : this.pending.slice(-retained);
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
text += this.pending.slice(0, start);
|
|
43
|
+
this.pending = this.pending.slice(start);
|
|
44
|
+
const end = citationEnd(this.pending);
|
|
45
|
+
if (end < 0)
|
|
46
|
+
break;
|
|
47
|
+
const citation = this.pending.slice(0, end + 1);
|
|
48
|
+
text += citationLink(citation);
|
|
49
|
+
this.pending = this.pending.slice(end + 1);
|
|
50
|
+
}
|
|
51
|
+
if (text !== '')
|
|
52
|
+
yield { ...chunk, text };
|
|
53
|
+
}
|
|
54
|
+
/** 消息、工具、step 和终态边界原样结算未闭合指令,保留所属 messageId。 */
|
|
55
|
+
*flushCitations() {
|
|
56
|
+
const text = this.pending;
|
|
57
|
+
this.pending = '';
|
|
58
|
+
if (text !== '' && this.message !== undefined)
|
|
59
|
+
yield { ...this.message, text };
|
|
60
|
+
this.message = undefined;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** 保留整条消息的 Markdown 上下文,只追加已确定的前缀,不能回写已发出的 delta。 */
|
|
64
|
+
class MarkdownFileLinkNormalizer {
|
|
65
|
+
source = '';
|
|
66
|
+
emitted = 0;
|
|
67
|
+
message;
|
|
68
|
+
*push(chunk) {
|
|
69
|
+
if (chunk.type !== 'text-delta') {
|
|
70
|
+
if (chunk.type !== 'usage' && chunk.type !== 'reasoning-delta' && chunk.type !== 'reasoning-snapshot')
|
|
71
|
+
yield* this.flush();
|
|
72
|
+
yield chunk;
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (this.message?.messageId !== chunk.messageId)
|
|
76
|
+
yield* this.flush();
|
|
77
|
+
this.message = chunk;
|
|
78
|
+
const settled = this.emitted === this.source.length;
|
|
79
|
+
this.source += chunk.text;
|
|
80
|
+
// 已确定的上下文中,普通文字不改变链接/代码语法,无需重新解析整条消息。
|
|
81
|
+
if (settled && !/[\[\]()`~\r\n]/u.test(chunk.text)) {
|
|
82
|
+
this.emitted = this.source.length;
|
|
83
|
+
yield chunk;
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
yield* this.drain(false);
|
|
87
|
+
}
|
|
88
|
+
*flush() {
|
|
89
|
+
yield* this.drain(true);
|
|
90
|
+
this.source = '';
|
|
91
|
+
this.emitted = 0;
|
|
92
|
+
this.message = undefined;
|
|
93
|
+
}
|
|
94
|
+
*drain(final) {
|
|
95
|
+
if (this.message === undefined || this.emitted === this.source.length)
|
|
96
|
+
return;
|
|
97
|
+
const replacements = [];
|
|
98
|
+
let safeEnd = this.source.length;
|
|
99
|
+
const visit = (node) => {
|
|
100
|
+
const start = node.position?.start.offset;
|
|
101
|
+
const end = node.position?.end.offset;
|
|
102
|
+
if (start === undefined || end === undefined || end <= this.emitted)
|
|
103
|
+
return;
|
|
104
|
+
if (node.type === 'link') {
|
|
105
|
+
const labelEnd = node.children.at(-1)?.position?.end.offset ?? start + 1;
|
|
106
|
+
const separator = this.source.indexOf('](', labelEnd);
|
|
107
|
+
// 自动链接没有 ](;仅处理显式 Markdown 文件链接,保留标签、标题和括号。
|
|
108
|
+
if (this.source[start] === '[' && separator >= start && separator < end) {
|
|
109
|
+
let targetStart = separator + 2;
|
|
110
|
+
while (/\s/u.test(this.source[targetStart] ?? ''))
|
|
111
|
+
targetStart += 1;
|
|
112
|
+
const angle = this.source[targetStart] === '<';
|
|
113
|
+
const pathStart = targetStart + (angle ? 1 : 0);
|
|
114
|
+
let pathEnd = pathStart;
|
|
115
|
+
let depth = 0;
|
|
116
|
+
for (; pathEnd < end; pathEnd += 1) {
|
|
117
|
+
const character = this.source[pathEnd];
|
|
118
|
+
if (character === '\\') {
|
|
119
|
+
pathEnd += 1;
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
if (angle) {
|
|
123
|
+
if (character === '>')
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
if (/\s/u.test(character) || (character === ')' && depth === 0))
|
|
128
|
+
break;
|
|
129
|
+
if (character === '(')
|
|
130
|
+
depth += 1;
|
|
131
|
+
else if (character === ')')
|
|
132
|
+
depth -= 1;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const target = this.source.slice(pathStart, pathEnd);
|
|
136
|
+
const normalized = fileLineTarget(target);
|
|
137
|
+
if (normalized !== target)
|
|
138
|
+
replacements.push({ start: pathStart, end: pathEnd, text: normalized });
|
|
139
|
+
}
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (node.type === 'code') {
|
|
143
|
+
// 未收到换行前,``` 仍可能变成普通行内文本(例如随后出现另一组反引号)。
|
|
144
|
+
if (!final && !this.source.slice(start, end).includes('\n'))
|
|
145
|
+
safeEnd = Math.min(safeEnd, start);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (node.type === 'inlineCode' || node.type === 'html' || node.type === 'image')
|
|
149
|
+
return;
|
|
150
|
+
if (node.type === 'text' && !final) {
|
|
151
|
+
// 未闭合的标签或代码跨度可能在后续分片中包住链接,必须等语法确定后再输出。
|
|
152
|
+
for (let index = Math.max(start, this.emitted); index < end; index += 1) {
|
|
153
|
+
const character = this.source[index];
|
|
154
|
+
if (character === '\\') {
|
|
155
|
+
index += 1;
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
if (character === '[') {
|
|
159
|
+
const close = this.source.indexOf(']', index + 1);
|
|
160
|
+
if (close >= 0 && close + 1 < this.source.length && this.source[close + 1] !== '(')
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
const pendingFence = character === '~'
|
|
164
|
+
&& /^ {0,3}~*$/u.test(this.source.slice(this.source.lastIndexOf('\n', index - 1) + 1, index))
|
|
165
|
+
&& /^~*$/u.test(this.source.slice(index));
|
|
166
|
+
if (character === '`' || character === '[' || pendingFence) {
|
|
167
|
+
safeEnd = Math.min(safeEnd, index);
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if ('children' in node)
|
|
173
|
+
for (const child of node.children)
|
|
174
|
+
visit(child);
|
|
175
|
+
};
|
|
176
|
+
visit(fromMarkdown(this.source));
|
|
177
|
+
safeEnd = Math.max(safeEnd, this.emitted);
|
|
178
|
+
let cursor = this.emitted;
|
|
179
|
+
let text = '';
|
|
180
|
+
for (const replacement of replacements) {
|
|
181
|
+
if (replacement.start < cursor || replacement.end > safeEnd)
|
|
182
|
+
continue;
|
|
183
|
+
text += this.source.slice(cursor, replacement.start) + replacement.text;
|
|
184
|
+
cursor = replacement.end;
|
|
185
|
+
}
|
|
186
|
+
text += this.source.slice(cursor, safeEnd);
|
|
187
|
+
this.emitted = safeEnd;
|
|
188
|
+
if (text !== '')
|
|
189
|
+
yield { ...this.message, text };
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
function fileLineTarget(target) {
|
|
193
|
+
const match = /:([1-9]\d*)(?:-([1-9]\d*))?$/u.exec(target);
|
|
194
|
+
if (match === null || !Number.isSafeInteger(Number(match[1])))
|
|
195
|
+
return target;
|
|
196
|
+
const path = target.slice(0, match.index);
|
|
197
|
+
const start = Number(match[1]);
|
|
198
|
+
const end = match[2] === undefined ? undefined : Number(match[2]);
|
|
199
|
+
if (end !== undefined && (!Number.isSafeInteger(end) || end < start))
|
|
200
|
+
return target;
|
|
201
|
+
// 裸盘符加数字仍是 Windows 路径片段,不把它误当成无扩展名文件。
|
|
202
|
+
if (/^[a-z]:[1-9]\d*(?:-[1-9]\d*)?$/iu.test(target))
|
|
203
|
+
return target;
|
|
204
|
+
// Windows 盘符不属于 URI scheme;常见 URI 即使没有 // 也必须原样保留。
|
|
205
|
+
const scheme = /^([a-z][\w+.-]*):/iu.exec(target)?.[1]?.toLowerCase();
|
|
206
|
+
if (scheme !== undefined && !/^[a-z]:[/\\]/iu.test(target) && FILE_LINK_URI_SCHEMES.has(scheme))
|
|
207
|
+
return target;
|
|
208
|
+
if (/^[/\\]{2}/u.test(path) || /:\d+$/u.test(path))
|
|
209
|
+
return target;
|
|
210
|
+
if (/[?#\u0000-\u001f\u007f]/u.test(path))
|
|
211
|
+
return target;
|
|
212
|
+
return `${path}#L${match[1]}${end === undefined ? '' : `-L${match[2]}`}`;
|
|
213
|
+
}
|
|
214
|
+
/** 引号里的花括号属于路径或属性,不能提前截断指令。 */
|
|
215
|
+
function citationEnd(text) {
|
|
216
|
+
let quote = '';
|
|
217
|
+
for (let index = CITATION_PREFIX.length; index < text.length; index += 1) {
|
|
218
|
+
const character = text[index];
|
|
219
|
+
if (quote !== '') {
|
|
220
|
+
if (character === '\\' && (text[index + 1] === quote || text[index + 1] === '\\'))
|
|
221
|
+
index += 1;
|
|
222
|
+
else if (character === quote)
|
|
223
|
+
quote = '';
|
|
224
|
+
}
|
|
225
|
+
else if (character === '"' || character === "'")
|
|
226
|
+
quote = character;
|
|
227
|
+
else if (character === '}')
|
|
228
|
+
return index;
|
|
229
|
+
}
|
|
230
|
+
return -1;
|
|
231
|
+
}
|
|
232
|
+
function citationLink(citation) {
|
|
233
|
+
const attributes = citation.slice(CITATION_PREFIX.length, -1);
|
|
234
|
+
const values = new Map();
|
|
235
|
+
// 保留 Windows 路径的字面反斜杠,不按 JSON 转义解释 \n、\t 等路径片段。
|
|
236
|
+
const pattern = /\s*([\w-]+)\s*=\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|([^\s"']+))/gu;
|
|
237
|
+
let consumed = 0;
|
|
238
|
+
for (const match of attributes.matchAll(pattern)) {
|
|
239
|
+
if (match.index !== consumed || values.has(match[1]))
|
|
240
|
+
return citation;
|
|
241
|
+
consumed = match.index + match[0].length;
|
|
242
|
+
values.set(match[1], match[2] ?? match[3] ?? match[4]);
|
|
243
|
+
}
|
|
244
|
+
if (attributes.slice(consumed).trim() !== '')
|
|
245
|
+
return citation;
|
|
246
|
+
const path = values.get('path');
|
|
247
|
+
const purpose = values.get('purpose');
|
|
248
|
+
if (values.get('mode') === 'live' || (purpose !== 'output' && purpose !== 'source') || path === undefined || path.trim() === '')
|
|
249
|
+
return citation;
|
|
250
|
+
// 盘符不是 URI scheme;live 标识及真正的 URI 都不能作为本地文件打开。
|
|
251
|
+
if (/^[a-z][\w+.-]*:/iu.test(path) && !/^[a-z]:[/\\]/iu.test(path))
|
|
252
|
+
return citation;
|
|
253
|
+
if (/[\u0000-\u001f\u007f]/u.test(path) || /^[/\\]{2}/u.test(path))
|
|
254
|
+
return citation;
|
|
255
|
+
// DSH Markdown 的 openFile delegate 接收本地路径,并沿当前会话路由到 Host。
|
|
256
|
+
// 对路径逐段编码,避免空格、#、? 和 % 被误作 Markdown 或 URI 分隔符。
|
|
257
|
+
const normalized = path.replace(/\\/gu, '/').replace(/^\/(?=[a-z]:\/)/iu, '');
|
|
258
|
+
let target = normalized.split('/').map((segment) => encodeURIComponent(segment).replace(/%3A/giu, ':')).join('/');
|
|
259
|
+
const start = values.get('line_start');
|
|
260
|
+
const end = values.get('line_end');
|
|
261
|
+
if (start !== undefined && /^[1-9]\d*$/u.test(start) && Number.isSafeInteger(Number(start))) {
|
|
262
|
+
target += `#L${start}`;
|
|
263
|
+
if (end !== undefined && /^[1-9]\d*$/u.test(end) && Number.isSafeInteger(Number(end)) && Number(end) >= Number(start))
|
|
264
|
+
target += `-L${end}`;
|
|
265
|
+
}
|
|
266
|
+
const label = path.replace(/[\\`*_[\]<>&]/gu, '\\$&');
|
|
267
|
+
// 完整属性作为 Markdown title 保留下来,包括 purpose、行号和额外引用信息。
|
|
268
|
+
const title = attributes.replace(/[\\"&]/gu, '\\$&');
|
|
269
|
+
return `[${label}](<${target}> "${title}")`;
|
|
270
|
+
}
|
|
271
|
+
//# sourceMappingURL=codex-file-citations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-file-citations.js","sourceRoot":"","sources":["../../../../../src/host/cli-adapters/codex-file-citations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGvD,MAAM,eAAe,GAAG,uBAAuB,CAAA;AAC/C,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;AAGtJ,kDAAkD;AAClD,MAAM,OAAO,2BAA2B;IACrB,QAAQ,GAAG,IAAI,0BAA0B,EAAE,CAAA;IACpD,OAAO,GAAG,EAAE,CAAA;IACZ,OAAO,CAAuB;IAEtC,CAAC,IAAI,CAAC,KAAyB;QAC7B,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;YAAE,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACtF,CAAC;IAED,CAAC,KAAK;QACJ,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,cAAc,EAAE;YAAE,KAAK,CAAC,CAAC,IAAI,CAAC,QAA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ver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAKrD,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EAElB,+BAA+B,EAC/B,6BAA6B,EAC7B,qBAAqB,EACrB,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,uCAAuC,CAAA;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"command-code-driver.d.ts","sourceRoot":"","sources":["../../../../../src/host/cli-adapters/command-code-driver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAKrD,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EAElB,+BAA+B,EAC/B,6BAA6B,EAC7B,qBAAqB,EACrB,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,uCAAuC,CAAA;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAWjH,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC/B,MAAM,2BAA2B,CAAA;AAqNlC,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACrC,Q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C9B,WAAW;YA2FV,WAAW;IA4D1B,OAAO,CAAC,WAAW;CAapB"}
|
|
@@ -10,9 +10,10 @@ import { usageChunk } from './rpc-driver-utils.js';
|
|
|
10
10
|
import { commandEnvironment, terminateChildProcess } from './process-utils.js';
|
|
11
11
|
import { prepareAttachmentPaths, promptWithAttachmentPaths } from './attachment-utils.js';
|
|
12
12
|
import { parseSkillFrontmatter } from './skill-filesystem.js';
|
|
13
|
-
import {
|
|
13
|
+
import { commandCodeNativeAgentArgs, commandCodeNativeAgentEnvironment, subagentBridgeActive } from '../cli-bridge/injections.js';
|
|
14
14
|
import { getSubagentBridge } from '../cli-bridge/bridge-holder.js';
|
|
15
15
|
import { AcpCliDriver } from './acp-cli-driver.js';
|
|
16
|
+
import { knownCommandCodeContextWindow } from './model-catalog.js';
|
|
16
17
|
import { CommandCodeHistory, } from './command-code-history.js';
|
|
17
18
|
const WINDOWS = process.platform === 'win32';
|
|
18
19
|
const COMMAND_CODE_BINARIES = WINDOWS
|
|
@@ -24,6 +25,7 @@ const CATALOG_EFFORTS = new Map([
|
|
|
24
25
|
['deepseek/deepseek-v4-pro', ['high', 'max']],
|
|
25
26
|
['deepseek/deepseek-v4-flash', ['high', 'max']],
|
|
26
27
|
['deepseek/deepseek-v4.1-flash', ['low', 'high', 'max']],
|
|
28
|
+
['deepseek/deepseek-v4.1', ['low', 'high', 'max']],
|
|
27
29
|
['deepseek/deepseek-v4-flash-fast', ['low', 'high', 'max']],
|
|
28
30
|
['moonshotai/kimi-k3', ['low', 'high', 'max']],
|
|
29
31
|
['moonshotai/kimi-k2.7-code', []],
|
|
@@ -176,7 +178,7 @@ const COMMAND_CODE_INTERRUPT_GRACE_MS = 1_500;
|
|
|
176
178
|
function commandCodePermissionArgs(permission) {
|
|
177
179
|
if (permission?.sandboxMode === 'danger-full-access' && permission.approvalPolicy === 'never')
|
|
178
180
|
return ['--yolo'];
|
|
179
|
-
if (permission?.sandboxMode === 'workspace-write'
|
|
181
|
+
if (permission?.sandboxMode === 'workspace-write')
|
|
180
182
|
return ['--permission-mode', 'accept-edits'];
|
|
181
183
|
if (permission?.sandboxMode === 'read-only')
|
|
182
184
|
return ['--plan'];
|
|
@@ -236,10 +238,13 @@ export class CommandCodeDriver {
|
|
|
236
238
|
runtimeModelSelection: false,
|
|
237
239
|
configureSession: configureCommandCodeAcpSession,
|
|
238
240
|
sessionEnvironment: commandCodeAcpEnvironment(),
|
|
241
|
+
sessionEnvironmentForInput: (input) => commandCodeNativeAgentEnvironment(input.sessionId, 'command-code'),
|
|
239
242
|
id: 'command-code',
|
|
240
243
|
name: 'Command Code',
|
|
241
244
|
capabilities: acpCapabilities,
|
|
242
245
|
readQuestionRequest: readCommandCodeQuestionRequest,
|
|
246
|
+
decidePermission: commandCodeAcpPermissionDecision,
|
|
247
|
+
enrichUsage: enrichCommandCodeUsage,
|
|
243
248
|
probeReason: 'Command Code ACP 不公开可安全读取的会话索引',
|
|
244
249
|
});
|
|
245
250
|
this.respondPermission = (sessionId, response) => this.acpDriver.respondPermission(sessionId, response);
|
|
@@ -612,7 +617,7 @@ export class CommandCodeDriver {
|
|
|
612
617
|
// 自动续跑是同一个 DSH 运行里的下一段;消息序号必须跨尝试连续,
|
|
613
618
|
// 否则新进程会从 command-code-message-1 重新编号,公共投影层会把它
|
|
614
619
|
// 当成同一条消息继续追加,而不是开启新段。
|
|
615
|
-
const state = createStreamState(() => turn.aborted, turn.messageSequence, turn.providerSessionId ?? null, turn.sessionId);
|
|
620
|
+
const state = createStreamState(() => turn.aborted, turn.messageSequence, turn.providerSessionId ?? null, turn.sessionId, input.splitToolSteps === true);
|
|
616
621
|
const child = this.spawnAttempt(turn, input, binary);
|
|
617
622
|
const code = await this.readAttempt(turn, child, state);
|
|
618
623
|
turn.messageSequence = state.messageSequence;
|
|
@@ -650,7 +655,7 @@ export class CommandCodeDriver {
|
|
|
650
655
|
/** 启动一次 CLI 尝试;首次写入 transcript,续跑沿用同一会话文件。 */
|
|
651
656
|
spawnAttempt(turn, input, binary) {
|
|
652
657
|
const args = this.buildTurnArgs(input, turn);
|
|
653
|
-
const bridgeEnvironment =
|
|
658
|
+
const bridgeEnvironment = commandCodeNativeAgentEnvironment(input.sessionId, this.descriptor.id);
|
|
654
659
|
const child = this.runSpawn(binary, args, {
|
|
655
660
|
cwd: input.cwd ?? process.cwd(),
|
|
656
661
|
env: { ...(this.cachedEnvironment ?? commandEnvironment(binary)), ...(input.runtimeEnv ?? {}), ...bridgeEnvironment },
|
|
@@ -691,8 +696,9 @@ export class CommandCodeDriver {
|
|
|
691
696
|
}
|
|
692
697
|
for (const path of turn.skillPaths)
|
|
693
698
|
args.push('--skill', path);
|
|
694
|
-
//
|
|
695
|
-
|
|
699
|
+
// 每次启动都加载屏蔽 Mod:父会话转投 DSH,子会话仅禁用嵌套 agent;桥接
|
|
700
|
+
// 不可用时由 Mod 明确阻断,不能回退到 Command Code 原生子代理。
|
|
701
|
+
args.push(...commandCodeNativeAgentArgs(input.sessionId));
|
|
696
702
|
for (const directory of new Set((input.attachments ?? []).map((attachment) => dirname(attachment.path))))
|
|
697
703
|
args.push('--add-dir', directory);
|
|
698
704
|
if (input.modelId && input.modelId !== 'provider-default')
|
|
@@ -849,6 +855,15 @@ export class CommandCodeDriver {
|
|
|
849
855
|
}
|
|
850
856
|
// 一个 `-p` 运行会在同一进程里连续跑多个 agent turn。把新 assistant 消息的
|
|
851
857
|
// 首个正文留给下一次 llm/stream,当前流只返回边界,确保 DSH 先创建新 step。
|
|
858
|
+
if (segmented && chunk.type === 'step-boundary') {
|
|
859
|
+
// 解析层已经把下一条 Provider 消息留在队列中;清掉旧消息身份,避免
|
|
860
|
+
// 续段后的首个正文再次被误判成一个额外边界。
|
|
861
|
+
turn.currentMessageId = undefined;
|
|
862
|
+
turn.sawCompletedTool = false;
|
|
863
|
+
suspend();
|
|
864
|
+
yield chunk;
|
|
865
|
+
return;
|
|
866
|
+
}
|
|
852
867
|
if (segmented
|
|
853
868
|
&& (chunk.type === 'text-delta' || chunk.type === 'reasoning-delta')
|
|
854
869
|
&& chunk.messageId !== undefined) {
|
|
@@ -889,15 +904,32 @@ export class CommandCodeDriver {
|
|
|
889
904
|
// 首轮 transcript 已经是 canonical 文件,必须保留给下一轮 --resume 及冷恢复。
|
|
890
905
|
}
|
|
891
906
|
}
|
|
892
|
-
function
|
|
907
|
+
function enrichCommandCodeUsage(event, input) {
|
|
908
|
+
const contextWindow = event.contextWindow ?? knownCommandCodeContextWindow(input.modelId);
|
|
909
|
+
if (contextWindow === undefined || contextWindow <= 0)
|
|
910
|
+
return event;
|
|
911
|
+
const contextTokens = event.contextTokens ?? (event.inputTokens > 0 ? event.inputTokens : undefined);
|
|
912
|
+
return {
|
|
913
|
+
...event,
|
|
914
|
+
contextWindow,
|
|
915
|
+
...(contextTokens === undefined ? {} : { contextTokens }),
|
|
916
|
+
...(event.contextUsageRatio !== undefined || contextTokens === undefined
|
|
917
|
+
? {}
|
|
918
|
+
: { contextUsageRatio: Number(Math.min(1, contextTokens / contextWindow).toFixed(6)) }),
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
function createStreamState(aborted, messageSequence = 0, sessionId = null, bridgeSessionId = '', splitToolSteps = false) {
|
|
893
922
|
return {
|
|
894
923
|
messageSequence,
|
|
895
924
|
messageId: null,
|
|
896
925
|
emittedText: '',
|
|
897
926
|
emittedReasoning: '',
|
|
898
927
|
sawText: false,
|
|
928
|
+
sawCompletedTool: false,
|
|
929
|
+
splitToolSteps,
|
|
899
930
|
perRequestUsageSeen: false,
|
|
900
931
|
turnUsageSeen: false,
|
|
932
|
+
pendingMessageUsage: null,
|
|
901
933
|
sessionId,
|
|
902
934
|
bridgeSessionId,
|
|
903
935
|
aborted,
|
|
@@ -968,13 +1000,24 @@ function commandCodeEventChunks(event, state) {
|
|
|
968
1000
|
break;
|
|
969
1001
|
case 'turn_start':
|
|
970
1002
|
case 'turn-start':
|
|
1003
|
+
if (state.splitToolSteps)
|
|
1004
|
+
emitPendingMessageUsage(chunks, state);
|
|
1005
|
+
if (state.splitToolSteps && state.sawCompletedTool)
|
|
1006
|
+
chunks.push({ type: 'step-boundary' });
|
|
971
1007
|
beginMessage(state);
|
|
1008
|
+
state.sawCompletedTool = false;
|
|
972
1009
|
break;
|
|
973
1010
|
case 'message_start':
|
|
974
1011
|
case 'message-start':
|
|
975
1012
|
// 正常一轮只有一个模型请求;没有 turn_start 的旧版本由这里补消息身份。
|
|
976
|
-
if (state.messageId === null)
|
|
1013
|
+
if (state.messageId === null) {
|
|
1014
|
+
if (state.splitToolSteps)
|
|
1015
|
+
emitPendingMessageUsage(chunks, state);
|
|
1016
|
+
if (state.splitToolSteps && state.sawCompletedTool)
|
|
1017
|
+
chunks.push({ type: 'step-boundary' });
|
|
977
1018
|
beginMessage(state);
|
|
1019
|
+
state.sawCompletedTool = false;
|
|
1020
|
+
}
|
|
978
1021
|
break;
|
|
979
1022
|
case 'text_delta':
|
|
980
1023
|
case 'text-delta': {
|
|
@@ -1004,11 +1047,13 @@ function commandCodeEventChunks(event, state) {
|
|
|
1004
1047
|
case 'message-end':
|
|
1005
1048
|
// 只补齐增量流没有覆盖到的正文,避免累计快照被重复追加。
|
|
1006
1049
|
appendContentFallback(chunks, event.content ?? recordValue(event.message)?.content, state);
|
|
1050
|
+
captureMessageUsage(event, state);
|
|
1007
1051
|
break;
|
|
1008
1052
|
case 'model_request_end':
|
|
1009
1053
|
case 'model-request-end': {
|
|
1010
|
-
const usage =
|
|
1054
|
+
const usage = usageChunkFromEvent(event);
|
|
1011
1055
|
if (usage !== null) {
|
|
1056
|
+
state.pendingMessageUsage = null;
|
|
1012
1057
|
state.perRequestUsageSeen = true;
|
|
1013
1058
|
state.turnUsageSeen = true;
|
|
1014
1059
|
chunks.push(usage);
|
|
@@ -1019,8 +1064,9 @@ function commandCodeEventChunks(event, state) {
|
|
|
1019
1064
|
case 'turn-end': {
|
|
1020
1065
|
// 旧版本可能只在 turn_end 带 usage;与 model_request_end 去重,不重复结算。
|
|
1021
1066
|
if (!state.turnUsageSeen) {
|
|
1022
|
-
const usage =
|
|
1067
|
+
const usage = usageChunkFromEvent(event) ?? (state.splitToolSteps ? state.pendingMessageUsage : null);
|
|
1023
1068
|
if (usage !== null) {
|
|
1069
|
+
state.pendingMessageUsage = null;
|
|
1024
1070
|
state.perRequestUsageSeen = true;
|
|
1025
1071
|
state.turnUsageSeen = true;
|
|
1026
1072
|
chunks.push(usage);
|
|
@@ -1030,6 +1076,8 @@ function commandCodeEventChunks(event, state) {
|
|
|
1030
1076
|
}
|
|
1031
1077
|
case 'run_end':
|
|
1032
1078
|
case 'run-end':
|
|
1079
|
+
if (state.splitToolSteps && !state.turnUsageSeen)
|
|
1080
|
+
emitPendingMessageUsage(chunks, state, event);
|
|
1033
1081
|
if (!state.sawText) {
|
|
1034
1082
|
const finalText = readFinalText(event);
|
|
1035
1083
|
if (finalText) {
|
|
@@ -1053,10 +1101,16 @@ function commandCodeEventChunks(event, state) {
|
|
|
1053
1101
|
case 'result': {
|
|
1054
1102
|
if (state.terminalEmitted)
|
|
1055
1103
|
break;
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1104
|
+
const resultUsage = usageChunkFromEvent(event);
|
|
1105
|
+
if (state.splitToolSteps && state.pendingMessageUsage !== null)
|
|
1106
|
+
emitPendingMessageUsage(chunks, state);
|
|
1107
|
+
else if (!state.turnUsageSeen) {
|
|
1108
|
+
const usage = resultUsage ?? state.pendingMessageUsage;
|
|
1109
|
+
if (usage !== null) {
|
|
1110
|
+
state.perRequestUsageSeen = true;
|
|
1111
|
+
state.turnUsageSeen = true;
|
|
1059
1112
|
chunks.push(usage);
|
|
1113
|
+
}
|
|
1060
1114
|
}
|
|
1061
1115
|
if (!state.sawText) {
|
|
1062
1116
|
const finalText = readFinalText(event);
|
|
@@ -1098,6 +1152,18 @@ function commandCodeEventChunks(event, state) {
|
|
|
1098
1152
|
break;
|
|
1099
1153
|
}
|
|
1100
1154
|
if (isToolStart(type)) {
|
|
1155
|
+
// 某些版本只在 message/message_update 上携带 usage,工具开始即表示该
|
|
1156
|
+
// assistant 消息已经结束;先结算最后一份快照,避免工具 step 没有 usage。
|
|
1157
|
+
if (state.splitToolSteps)
|
|
1158
|
+
emitPendingMessageUsage(chunks, state, event);
|
|
1159
|
+
// 某些 Command Code 版本对“只有工具调用的 assistant 消息”不发送
|
|
1160
|
+
// turn_start/message_start。上一个工具已经完成时,下一次工具开始就是
|
|
1161
|
+
// 明确的消息边界;同一消息里的并行工具不会命中此分支,因为它们之间
|
|
1162
|
+
// 还没有 completed 结果。
|
|
1163
|
+
if (state.splitToolSteps && state.sawCompletedTool) {
|
|
1164
|
+
chunks.push({ type: 'step-boundary' });
|
|
1165
|
+
state.sawCompletedTool = false;
|
|
1166
|
+
}
|
|
1101
1167
|
const tool = readToolChunk(event, type === 'tool_queued' || type === 'tool_started' ? 'started' : 'running');
|
|
1102
1168
|
if (tool !== null)
|
|
1103
1169
|
chunks.push(tool);
|
|
@@ -1124,10 +1190,41 @@ function commandCodeEventChunks(event, state) {
|
|
|
1124
1190
|
// turn_start/message_start,也要让公共投影层看到消息身份切换。
|
|
1125
1191
|
if (tool.status === 'completed' || tool.status === 'failed')
|
|
1126
1192
|
resetMessageIdentity(state);
|
|
1193
|
+
if (tool.status === 'completed' || tool.status === 'failed')
|
|
1194
|
+
state.sawCompletedTool = true;
|
|
1127
1195
|
}
|
|
1128
1196
|
}
|
|
1197
|
+
if (type === 'message' || type === 'message_update' || type === 'message-update')
|
|
1198
|
+
captureMessageUsage(event, state);
|
|
1129
1199
|
return chunks;
|
|
1130
1200
|
}
|
|
1201
|
+
/** 从所有 Command Code 事件形状读取 usage;message 快照可能嵌套在 message 内。 */
|
|
1202
|
+
function usageChunkFromEvent(event) {
|
|
1203
|
+
const result = recordValue(event.result);
|
|
1204
|
+
const message = recordValue(event.message);
|
|
1205
|
+
const usage = usageChunk(recordValue(event.usage) ?? recordValue(message?.usage) ?? recordValue(result?.usage));
|
|
1206
|
+
return usage?.type === 'usage' ? usage : null;
|
|
1207
|
+
}
|
|
1208
|
+
/** 暂存消息累计快照,只保留同一请求最后一次值,避免重复结算。 */
|
|
1209
|
+
function captureMessageUsage(event, state) {
|
|
1210
|
+
if (state.turnUsageSeen)
|
|
1211
|
+
return;
|
|
1212
|
+
const usage = usageChunkFromEvent(event);
|
|
1213
|
+
if (usage !== null)
|
|
1214
|
+
state.pendingMessageUsage = usage;
|
|
1215
|
+
}
|
|
1216
|
+
/** 在消息、工具或回合边界结算消息快照。 */
|
|
1217
|
+
function emitPendingMessageUsage(chunks, state, event) {
|
|
1218
|
+
if (state.turnUsageSeen)
|
|
1219
|
+
return;
|
|
1220
|
+
const usage = state.pendingMessageUsage ?? (event === undefined ? null : usageChunkFromEvent(event));
|
|
1221
|
+
if (usage === null)
|
|
1222
|
+
return;
|
|
1223
|
+
state.pendingMessageUsage = null;
|
|
1224
|
+
state.perRequestUsageSeen = true;
|
|
1225
|
+
state.turnUsageSeen = true;
|
|
1226
|
+
chunks.push(usage);
|
|
1227
|
+
}
|
|
1131
1228
|
function readFinalText(event) {
|
|
1132
1229
|
const result = recordValue(event.result);
|
|
1133
1230
|
return textValue(event.finalText
|
|
@@ -1805,7 +1902,10 @@ catch {
|
|
|
1805
1902
|
} }
|
|
1806
1903
|
/** 保留启动选择作为进程复用条件;ACP 的实际会话状态由原生协议显式设置。 */
|
|
1807
1904
|
function commandCodeAcpArgs(input) {
|
|
1808
|
-
|
|
1905
|
+
// Command Code 的全局 --mod 必须放在 acp 子命令之前;放到 acp 之后会被
|
|
1906
|
+
// Commander 当成 ACP 子命令参数而拒绝。该参数无论桥接状态都必须存在,确保
|
|
1907
|
+
// 启动阶段就屏蔽原生 agent。
|
|
1908
|
+
const args = [...commandCodeNativeAgentArgs(input.sessionId), 'acp', ...commandCodePermissionArgs(input.permission)];
|
|
1809
1909
|
if (input.plan === true && !args.includes('--plan'))
|
|
1810
1910
|
args.push('--plan');
|
|
1811
1911
|
if (input.enableAskUserQuestion === true || input.runtimeEnv?.CMD_TOOLS_ASK_USER_QUESTION_ENABLE === 'true') {
|
|
@@ -1841,14 +1941,34 @@ function commandCodeAcpMode(input) {
|
|
|
1841
1941
|
const permission = input.permission;
|
|
1842
1942
|
if (input.plan === true || permission?.sandboxMode === 'read-only')
|
|
1843
1943
|
return 'plan';
|
|
1944
|
+
// 工作区内写入已经由沙箱模式授权;ask 只表示需要审批时可以询问,不能把
|
|
1945
|
+
// 每次普通编辑都降级到 default。auto-accept 仍由 CLI 检查越界与风险操作。
|
|
1946
|
+
if (permission?.sandboxMode === 'workspace-write')
|
|
1947
|
+
return 'auto-accept';
|
|
1844
1948
|
if (permission?.approvalPolicy !== 'never')
|
|
1845
1949
|
return 'default';
|
|
1846
1950
|
if (permission.sandboxMode === 'danger-full-access')
|
|
1847
1951
|
return 'bypass';
|
|
1848
|
-
if (permission.sandboxMode === 'workspace-write')
|
|
1849
|
-
return 'auto-accept';
|
|
1850
1952
|
return 'default';
|
|
1851
1953
|
}
|
|
1954
|
+
/** 托管委派由 DSH 桥接校验目标授权,不能再交给 CLI 对每次调用重复审批。 */
|
|
1955
|
+
function commandCodeAcpPermissionDecision(message, input) {
|
|
1956
|
+
if (message.method !== 'session/request_permission')
|
|
1957
|
+
return undefined;
|
|
1958
|
+
const params = isRecord(message.params) ? message.params : {};
|
|
1959
|
+
const tool = isRecord(params.toolCall) ? params.toolCall : {};
|
|
1960
|
+
const toolName = firstToolText(tool.name, tool.toolName, tool.tool_name, tool.title);
|
|
1961
|
+
const metadata = isRecord(params._meta) ? params._meta : {};
|
|
1962
|
+
const permission = input.permission;
|
|
1963
|
+
const canWrite = input.plan !== true
|
|
1964
|
+
&& (permission?.sandboxMode === 'workspace-write' || permission?.sandboxMode === 'danger-full-access');
|
|
1965
|
+
// 只识别插件自己的两个入口,不能把全部 MCP/自定义工具或显式风险请求放行。
|
|
1966
|
+
if (canWrite && metadata.risk === undefined && subagentBridgeActive(input.sessionId)
|
|
1967
|
+
&& (toolName === 'agent_subagent' || toolName === 'mcp__codingns__agent_subagent'))
|
|
1968
|
+
return 'allow';
|
|
1969
|
+
// never 允许已有授权范围内的工作,但不允许把剩余审批升级成交互弹窗。
|
|
1970
|
+
return permission?.approvalPolicy === 'never' ? 'reject' : undefined;
|
|
1971
|
+
}
|
|
1852
1972
|
/** Command Code 将 ask_user_question 编译成 `session/request_permission`。 */
|
|
1853
1973
|
function readCommandCodeQuestionRequest(message) {
|
|
1854
1974
|
const method = message.method?.toLowerCase();
|