@jingyi0605/codingns4dsh 0.2.1-beta.9 → 0.2.1-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +8 -6
- package/README.md +11 -8
- package/assets/provider-icons/magpie.png +0 -0
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts +1 -1
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts.map +1 -1
- package/data/build/dist/bootstrap/index.d.ts +1 -1
- package/data/build/dist/bootstrap/index.d.ts.map +1 -1
- package/data/build/dist/client/account-bar.d.ts.map +1 -1
- package/data/build/dist/client/account-bar.js +24 -70
- package/data/build/dist/client/account-bar.js.map +1 -1
- package/data/build/dist/client/adapter-catalog-watch.d.ts +10 -2
- package/data/build/dist/client/adapter-catalog-watch.d.ts.map +1 -1
- package/data/build/dist/client/adapter-catalog-watch.js +16 -4
- package/data/build/dist/client/adapter-catalog-watch.js.map +1 -1
- package/data/build/dist/client/bundle.js +54516 -35293
- package/data/build/dist/client/bundle.js.map +1 -1
- package/data/build/dist/client/cli-management-dialog.d.ts +21 -0
- package/data/build/dist/client/cli-management-dialog.d.ts.map +1 -0
- package/data/build/dist/client/cli-management-dialog.js +215 -0
- package/data/build/dist/client/cli-management-dialog.js.map +1 -0
- package/data/build/dist/client/cli-management-terminal.d.ts +9 -0
- package/data/build/dist/client/cli-management-terminal.d.ts.map +1 -0
- package/data/build/dist/client/cli-management-terminal.js +30 -0
- package/data/build/dist/client/cli-management-terminal.js.map +1 -0
- package/data/build/dist/client/cli-settings-dialog.d.ts +9 -0
- package/data/build/dist/client/cli-settings-dialog.d.ts.map +1 -0
- package/data/build/dist/client/cli-settings-dialog.js +45 -0
- package/data/build/dist/client/cli-settings-dialog.js.map +1 -0
- package/data/build/dist/client/cli-settings-rpc.js +1 -1
- package/data/build/dist/client/cli-settings-rpc.js.map +1 -1
- package/data/build/dist/client/cli-slots.d.ts +17 -3
- package/data/build/dist/client/cli-slots.d.ts.map +1 -1
- package/data/build/dist/client/cli-slots.js +300 -41
- package/data/build/dist/client/cli-slots.js.map +1 -1
- package/data/build/dist/client/client.assistant-configuration-view.js +4 -3
- package/data/build/dist/client/client.assistant-configuration-view.js.map +1 -1
- package/data/build/dist/client/client.delegate-command.js +44 -26
- package/data/build/dist/client/client.delegate-command.js.map +1 -1
- package/data/build/dist/client/client.editor-engine.js +4 -1
- package/data/build/dist/client/client.editor-engine.js.map +1 -1
- package/data/build/dist/client/{client.model-catalog-cache.js → client.magpie-model-tag.js} +241 -12
- package/data/build/dist/client/client.magpie-model-tag.js.map +1 -0
- package/data/build/dist/client/client.moss-voice-output.js +415 -0
- package/data/build/dist/client/client.moss-voice-output.js.map +1 -0
- package/data/build/dist/client/client.native-workspace-store.js +65 -15
- package/data/build/dist/client/client.native-workspace-store.js.map +1 -1
- package/data/build/dist/client/client.primitives-adapter.js +128 -0
- package/data/build/dist/client/client.primitives-adapter.js.map +1 -1
- package/data/build/dist/client/client.react-dom.js +0 -404
- package/data/build/dist/client/client.react-dom.js.map +1 -1
- package/data/build/dist/client/client.session-translation.js +121 -2
- package/data/build/dist/client/client.session-translation.js.map +1 -1
- package/data/build/dist/client/client.transport.js +738 -57
- package/data/build/dist/client/client.transport.js.map +1 -1
- package/data/build/dist/client/conversation-translation-settings.d.ts +11 -0
- package/data/build/dist/client/conversation-translation-settings.d.ts.map +1 -0
- package/data/build/dist/client/conversation-translation-settings.js +54 -0
- package/data/build/dist/client/conversation-translation-settings.js.map +1 -0
- package/data/build/dist/client/delegate-command.d.ts.map +1 -1
- package/data/build/dist/client/delegate-command.js +36 -7
- package/data/build/dist/client/delegate-command.js.map +1 -1
- package/data/build/dist/client/desktop-assistant.js +1202 -494
- package/data/build/dist/client/editor-engine.d.ts +1 -1
- package/data/build/dist/client/editor-engine.d.ts.map +1 -1
- package/data/build/dist/client/editor-engine.js +4 -1
- package/data/build/dist/client/editor-engine.js.map +1 -1
- package/data/build/dist/client/features/cli-adapters.d.ts +3 -1
- package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -1
- package/data/build/dist/client/features/cli-adapters.js +207 -112
- package/data/build/dist/client/features/cli-adapters.js.map +1 -1
- package/data/build/dist/client/features/file-management.d.ts.map +1 -1
- package/data/build/dist/client/features/file-management.js +18 -0
- package/data/build/dist/client/features/file-management.js.map +1 -1
- package/data/build/dist/client/features/index.d.ts.map +1 -1
- package/data/build/dist/client/features/index.js +2 -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 +1 -0
- package/data/build/dist/client/features/lan-access-panel.js.map +1 -1
- package/data/build/dist/client/features/mobile-access.d.ts.map +1 -1
- package/data/build/dist/client/features/mobile-access.js +7 -0
- package/data/build/dist/client/features/mobile-access.js.map +1 -1
- package/data/build/dist/client/features/peer-host.d.ts.map +1 -1
- package/data/build/dist/client/features/peer-host.js +6 -0
- package/data/build/dist/client/features/peer-host.js.map +1 -1
- package/data/build/dist/client/features/quick-apps.d.ts +3 -0
- package/data/build/dist/client/features/quick-apps.d.ts.map +1 -0
- package/data/build/dist/client/features/quick-apps.js +14 -0
- package/data/build/dist/client/features/quick-apps.js.map +1 -0
- package/data/build/dist/client/features/session-translation.d.ts.map +1 -1
- package/data/build/dist/client/features/session-translation.js +50 -49
- package/data/build/dist/client/features/session-translation.js.map +1 -1
- package/data/build/dist/client/features/workspace-session-enhancement.d.ts.map +1 -1
- package/data/build/dist/client/features/workspace-session-enhancement.js +6 -0
- package/data/build/dist/client/features/workspace-session-enhancement.js.map +1 -1
- package/data/build/dist/client/file-management-dom.d.ts +20 -1
- package/data/build/dist/client/file-management-dom.d.ts.map +1 -1
- package/data/build/dist/client/file-management-dom.js +94 -18
- package/data/build/dist/client/file-management-dom.js.map +1 -1
- package/data/build/dist/client/file-viewer-copy-path-menu.d.ts +27 -0
- package/data/build/dist/client/file-viewer-copy-path-menu.d.ts.map +1 -0
- package/data/build/dist/client/file-viewer-copy-path-menu.js +101 -0
- package/data/build/dist/client/file-viewer-copy-path-menu.js.map +1 -0
- package/data/build/dist/client/git-management-settings.d.ts +4 -0
- package/data/build/dist/client/git-management-settings.d.ts.map +1 -0
- package/data/build/dist/client/git-management-settings.js +73 -0
- package/data/build/dist/client/git-management-settings.js.map +1 -0
- package/data/build/dist/client/git-management.d.ts +2 -1
- package/data/build/dist/client/git-management.d.ts.map +1 -1
- package/data/build/dist/client/git-management.js +55 -34
- package/data/build/dist/client/git-management.js.map +1 -1
- package/data/build/dist/client/git-panel-styles.d.ts +4 -0
- package/data/build/dist/client/git-panel-styles.d.ts.map +1 -1
- package/data/build/dist/client/git-panel-styles.js +14 -0
- package/data/build/dist/client/git-panel-styles.js.map +1 -1
- package/data/build/dist/client/html-workspace-files.d.ts +4 -0
- package/data/build/dist/client/html-workspace-files.d.ts.map +1 -0
- package/data/build/dist/client/html-workspace-files.js +114 -0
- package/data/build/dist/client/html-workspace-files.js.map +1 -0
- package/data/build/dist/client/locale.d.ts.map +1 -1
- package/data/build/dist/client/locale.js +22 -2
- package/data/build/dist/client/locale.js.map +1 -1
- package/data/build/dist/client/locales/cliManagement.d.ts +3 -0
- package/data/build/dist/client/locales/cliManagement.d.ts.map +1 -0
- package/data/build/dist/client/locales/cliManagement.js +155 -0
- package/data/build/dist/client/locales/cliManagement.js.map +1 -0
- package/data/build/dist/client/locales/fileWorkspace.d.ts.map +1 -1
- package/data/build/dist/client/locales/fileWorkspace.js +8 -0
- package/data/build/dist/client/locales/fileWorkspace.js.map +1 -1
- package/data/build/dist/client/locales/git.d.ts.map +1 -1
- package/data/build/dist/client/locales/git.js +30 -2
- package/data/build/dist/client/locales/git.js.map +1 -1
- package/data/build/dist/client/locales/panels.d.ts.map +1 -1
- package/data/build/dist/client/locales/panels.js +103 -11
- package/data/build/dist/client/locales/panels.js.map +1 -1
- package/data/build/dist/client/locales/peerHost.d.ts.map +1 -1
- package/data/build/dist/client/locales/peerHost.js +2 -0
- package/data/build/dist/client/locales/peerHost.js.map +1 -1
- package/data/build/dist/client/locales/quickApps.d.ts +136 -0
- package/data/build/dist/client/locales/quickApps.d.ts.map +1 -0
- package/data/build/dist/client/locales/quickApps.js +162 -0
- package/data/build/dist/client/locales/quickApps.js.map +1 -0
- package/data/build/dist/client/locales/usage.d.ts.map +1 -1
- package/data/build/dist/client/locales/usage.js +98 -0
- package/data/build/dist/client/locales/usage.js.map +1 -1
- package/data/build/dist/client/magpie-model-tag.d.ts +8 -0
- package/data/build/dist/client/magpie-model-tag.d.ts.map +1 -0
- package/data/build/dist/client/magpie-model-tag.js +50 -0
- package/data/build/dist/client/magpie-model-tag.js.map +1 -0
- package/data/build/dist/client/mobile-team-panel-dom.d.ts +14 -0
- package/data/build/dist/client/mobile-team-panel-dom.d.ts.map +1 -0
- package/data/build/dist/client/mobile-team-panel-dom.js +164 -0
- package/data/build/dist/client/mobile-team-panel-dom.js.map +1 -0
- package/data/build/dist/client/model-catalog-cache.d.ts.map +1 -1
- package/data/build/dist/client/model-catalog-cache.js +66 -12
- package/data/build/dist/client/model-catalog-cache.js.map +1 -1
- package/data/build/dist/client/model-priority-pool.d.ts +23 -0
- package/data/build/dist/client/model-priority-pool.d.ts.map +1 -0
- package/data/build/dist/client/model-priority-pool.js +245 -0
- package/data/build/dist/client/model-priority-pool.js.map +1 -0
- package/data/build/dist/client/native-model-translation-menu.d.ts +13 -0
- package/data/build/dist/client/native-model-translation-menu.d.ts.map +1 -0
- package/data/build/dist/client/native-model-translation-menu.js +159 -0
- package/data/build/dist/client/native-model-translation-menu.js.map +1 -0
- package/data/build/dist/client/native-translation-default.d.ts +6 -0
- package/data/build/dist/client/native-translation-default.d.ts.map +1 -0
- package/data/build/dist/client/native-translation-default.js +30 -0
- package/data/build/dist/client/native-translation-default.js.map +1 -0
- package/data/build/dist/client/provider-icons.d.ts.map +1 -1
- package/data/build/dist/client/provider-icons.js +3 -1
- package/data/build/dist/client/provider-icons.js.map +1 -1
- package/data/build/dist/client/quick-apps/browser-storage.d.ts +24 -0
- package/data/build/dist/client/quick-apps/browser-storage.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/browser-storage.js +114 -0
- package/data/build/dist/client/quick-apps/browser-storage.js.map +1 -0
- package/data/build/dist/client/quick-apps/client.d.ts +31 -0
- package/data/build/dist/client/quick-apps/client.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/client.js +68 -0
- package/data/build/dist/client/quick-apps/client.js.map +1 -0
- package/data/build/dist/client/quick-apps/document.d.ts +26 -0
- package/data/build/dist/client/quick-apps/document.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/document.js +110 -0
- package/data/build/dist/client/quick-apps/document.js.map +1 -0
- package/data/build/dist/client/quick-apps/file-picker.d.ts +14 -0
- package/data/build/dist/client/quick-apps/file-picker.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/file-picker.js +51 -0
- package/data/build/dist/client/quick-apps/file-picker.js.map +1 -0
- package/data/build/dist/client/quick-apps/launcher.d.ts +7 -0
- package/data/build/dist/client/quick-apps/launcher.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/launcher.js +267 -0
- package/data/build/dist/client/quick-apps/launcher.js.map +1 -0
- package/data/build/dist/client/quick-apps/presentation.d.ts +16 -0
- package/data/build/dist/client/quick-apps/presentation.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/presentation.js +47 -0
- package/data/build/dist/client/quick-apps/presentation.js.map +1 -0
- package/data/build/dist/client/quick-apps/rail-preference.d.ts +5 -0
- package/data/build/dist/client/quick-apps/rail-preference.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/rail-preference.js +19 -0
- package/data/build/dist/client/quick-apps/rail-preference.js.map +1 -0
- package/data/build/dist/client/quick-apps/reorder-animation.d.ts +6 -0
- package/data/build/dist/client/quick-apps/reorder-animation.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/reorder-animation.js +50 -0
- package/data/build/dist/client/quick-apps/reorder-animation.js.map +1 -0
- package/data/build/dist/client/quick-apps/reorder.d.ts +26 -0
- package/data/build/dist/client/quick-apps/reorder.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/reorder.js +128 -0
- package/data/build/dist/client/quick-apps/reorder.js.map +1 -0
- package/data/build/dist/client/quick-apps/styles.d.ts +3 -0
- package/data/build/dist/client/quick-apps/styles.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/styles.js +153 -0
- package/data/build/dist/client/quick-apps/styles.js.map +1 -0
- package/data/build/dist/client/quick-apps/ui.d.ts +20 -0
- package/data/build/dist/client/quick-apps/ui.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/ui.js +21 -0
- package/data/build/dist/client/quick-apps/ui.js.map +1 -0
- package/data/build/dist/client/quick-apps/viewer.d.ts +16 -0
- package/data/build/dist/client/quick-apps/viewer.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/viewer.js +165 -0
- package/data/build/dist/client/quick-apps/viewer.js.map +1 -0
- package/data/build/dist/client/quick-apps/workspace-picker.d.ts +19 -0
- package/data/build/dist/client/quick-apps/workspace-picker.d.ts.map +1 -0
- package/data/build/dist/client/quick-apps/workspace-picker.js +30 -0
- package/data/build/dist/client/quick-apps/workspace-picker.js.map +1 -0
- package/data/build/dist/client/session-translation-chat.d.ts +68 -2
- package/data/build/dist/client/session-translation-chat.d.ts.map +1 -1
- package/data/build/dist/client/session-translation-chat.js +297 -109
- package/data/build/dist/client/session-translation-chat.js.map +1 -1
- package/data/build/dist/client/session-translation-interactions.d.ts +31 -0
- package/data/build/dist/client/session-translation-interactions.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-interactions.js +158 -0
- package/data/build/dist/client/session-translation-interactions.js.map +1 -0
- package/data/build/dist/client/session-translation-pending-dom.d.ts +8 -0
- package/data/build/dist/client/session-translation-pending-dom.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-pending-dom.js +58 -0
- package/data/build/dist/client/session-translation-pending-dom.js.map +1 -0
- package/data/build/dist/client/session-translation-retry.d.ts +16 -0
- package/data/build/dist/client/session-translation-retry.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-retry.js +66 -0
- package/data/build/dist/client/session-translation-retry.js.map +1 -0
- package/data/build/dist/client/session-translation-rules.d.ts +13 -0
- package/data/build/dist/client/session-translation-rules.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-rules.js +58 -0
- package/data/build/dist/client/session-translation-rules.js.map +1 -0
- package/data/build/dist/client/sidebar-footer-style.d.ts +13 -0
- package/data/build/dist/client/sidebar-footer-style.d.ts.map +1 -0
- package/data/build/dist/client/sidebar-footer-style.js +54 -0
- package/data/build/dist/client/sidebar-footer-style.js.map +1 -0
- package/data/build/dist/client/style.css +276 -276
- package/data/build/dist/client/subscription-slot.d.ts +6 -2
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -1
- package/data/build/dist/client/subscription-slot.js +373 -21
- package/data/build/dist/client/subscription-slot.js.map +1 -1
- package/data/build/dist/client/terminal/model.d.ts.map +1 -1
- package/data/build/dist/client/terminal/model.js +2 -1
- package/data/build/dist/client/terminal/model.js.map +1 -1
- package/data/build/dist/client/workspace-session-archive-dom.d.ts +1 -0
- package/data/build/dist/client/workspace-session-archive-dom.d.ts.map +1 -1
- package/data/build/dist/client/workspace-session-archive-dom.js +68 -8
- package/data/build/dist/client/workspace-session-archive-dom.js.map +1 -1
- package/data/build/dist/client/workspace-session-rightbar-dom.d.ts.map +1 -1
- package/data/build/dist/client/workspace-session-rightbar-dom.js +12 -21
- package/data/build/dist/client/workspace-session-rightbar-dom.js.map +1 -1
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts +3 -0
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts.map +1 -1
- package/data/build/dist/client/workspace-session-visibility-dom.js +43 -10
- package/data/build/dist/client/workspace-session-visibility-dom.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.d.ts +8 -0
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.js +71 -0
- package/data/build/dist/dsh-capabilities/client/composer-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.d.ts +4 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.js +8 -0
- package/data/build/dist/dsh-capabilities/client/composer-slot-selectors.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.d.ts +30 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.js +93 -0
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.d.ts +12 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.js +181 -0
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.d.ts +19 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.js +39 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/peer-host-attachment-adapter.d.ts +3 -0
- package/data/build/dist/dsh-capabilities/client/peer-host-attachment-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/peer-host-attachment-adapter.js +27 -0
- package/data/build/dist/dsh-capabilities/client/peer-host-attachment-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts +36 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js +88 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.d.ts +20 -0
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.js +65 -0
- package/data/build/dist/dsh-capabilities/client/question-history-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.d.ts +18 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.js +11 -0
- package/data/build/dist/dsh-capabilities/client/quick-app-footer-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.d.ts +9 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.js +75 -0
- package/data/build/dist/dsh-capabilities/client/session-performance-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.d.ts +3 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.js +22 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-footer-icon-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.d.ts +32 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.js +90 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.d.ts +52 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.js +109 -0
- package/data/build/dist/dsh-capabilities/host/agent-team-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.js +34 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.d.ts +21 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.js +11 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.d.ts +11 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.js +97 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-credentials.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.d.ts +36 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.js +164 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-https-provider.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.d.ts +44 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.js +240 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-lan-ports.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.d.ts +37 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.js +35 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-origin-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.d.ts +13 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.js +30 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.d.ts +21 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.js +132 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-proxy-provider.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.js +33 -0
- package/data/build/dist/dsh-capabilities/host/quick-app-transport.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.d.ts +17 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.js +37 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.d.ts +17 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.js +45 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.d.ts +7 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.js +18 -0
- package/data/build/dist/dsh-capabilities/host/session-performance-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.d.ts +28 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.js +31 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/workspace-directory-adapter.d.ts +13 -0
- package/data/build/dist/dsh-capabilities/host/workspace-directory-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/workspace-directory-adapter.js +24 -0
- package/data/build/dist/dsh-capabilities/host/workspace-directory-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/matrix.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/matrix.js +22 -5
- package/data/build/dist/dsh-capabilities/matrix.js.map +1 -1
- package/data/build/dist/dsh-capabilities/routes.d.ts +1 -0
- package/data/build/dist/dsh-capabilities/routes.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/routes.js +47 -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/cli-adapters/acp-cli-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js +6 -3
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-driver.js +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts +4 -3
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/attachment-utils.js +9 -8
- package/data/build/dist/host/cli-adapters/attachment-utils.js.map +1 -1
- package/data/build/dist/host/cli-adapters/binary-detection.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/binary-detection.js +7 -3
- package/data/build/dist/host/cli-adapters/binary-detection.js.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.js +184 -21
- package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts +18 -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 +126 -21
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-performance-projection.d.ts +91 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.js +8 -0
- package/data/build/dist/host/cli-adapters/codex-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance.d.ts +16 -0
- package/data/build/dist/host/cli-adapters/codex-performance.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-performance.js +81 -0
- package/data/build/dist/host/cli-adapters/codex-performance.js.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.d.ts +4 -1
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.js +137 -25
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.js.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.js +7 -4
- package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts +3 -1
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js +41 -4
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js.map +1 -1
- package/data/build/dist/host/cli-adapters/driver.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts +5 -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 +51 -16
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js +3 -2
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.js +3 -2
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.js.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.d.ts +4 -0
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.js +587 -101
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -1
- package/data/build/dist/host/cli-adapters/gemini-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/gemini-driver.js +5 -3
- package/data/build/dist/host/cli-adapters/gemini-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts +7 -0
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.js +458 -59
- package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-performance-projection.d.ts +123 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.js +48 -0
- package/data/build/dist/host/cli-adapters/grok-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-usage.d.ts +45 -0
- package/data/build/dist/host/cli-adapters/grok-usage.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-usage.js +197 -0
- package/data/build/dist/host/cli-adapters/grok-usage.js.map +1 -0
- package/data/build/dist/host/cli-adapters/kimi-driver.js +2 -2
- package/data/build/dist/host/cli-adapters/kimi-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js +20 -3
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js.map +1 -1
- package/data/build/dist/host/cli-adapters/magpie-session-routing.d.ts +9 -0
- package/data/build/dist/host/cli-adapters/magpie-session-routing.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-session-routing.js +90 -0
- package/data/build/dist/host/cli-adapters/magpie-session-routing.js.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.d.ts +90 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.js +986 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-installation.d.ts +5 -0
- package/data/build/dist/host/cli-adapters/management-installation.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-installation.js +131 -0
- package/data/build/dist/host/cli-adapters/management-installation.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-methods.d.ts +37 -0
- package/data/build/dist/host/cli-adapters/management-methods.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-methods.js +144 -0
- package/data/build/dist/host/cli-adapters/management-methods.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management-process.d.ts +7 -0
- package/data/build/dist/host/cli-adapters/management-process.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management-process.js +62 -0
- package/data/build/dist/host/cli-adapters/management-process.js.map +1 -0
- package/data/build/dist/host/cli-adapters/management.d.ts +32 -0
- package/data/build/dist/host/cli-adapters/management.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/management.js +177 -0
- package/data/build/dist/host/cli-adapters/management.js.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/mcode-driver.js +12 -5
- package/data/build/dist/host/cli-adapters/mcode-driver.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 +70 -7
- 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 +1 -1
- 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 +13 -5
- 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 +7 -1
- 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 +6 -3
- package/data/build/dist/host/cli-adapters/native-team-subagent.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts +22 -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 +105 -17
- package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js +4 -1
- 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 +45 -11
- package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/process-utils.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/process-utils.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/process-utils.js +16 -11
- package/data/build/dist/host/cli-adapters/process-utils.js.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.d.ts +7 -1
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.js +141 -51
- package/data/build/dist/host/cli-adapters/registry.js.map +1 -1
- package/data/build/dist/host/cli-adapters/session-performance-projection.d.ts +74 -0
- package/data/build/dist/host/cli-adapters/session-performance-projection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/session-performance-projection.js +83 -0
- package/data/build/dist/host/cli-adapters/session-performance-projection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js +4 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts +3 -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 +2 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.js.map +1 -1
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.d.ts +26 -0
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.js +30 -0
- package/data/build/dist/host/cli-adapters/subagent-tool-descriptions.js.map +1 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/subagent-tool.js +7 -6
- package/data/build/dist/host/cli-adapters/subagent-tool.js.map +1 -1
- package/data/build/dist/host/cli-adapters/team-input.d.ts +17 -0
- package/data/build/dist/host/cli-adapters/team-input.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/team-input.js +67 -0
- package/data/build/dist/host/cli-adapters/team-input.js.map +1 -0
- package/data/build/dist/host/cli-adapters/update-check.d.ts +34 -0
- package/data/build/dist/host/cli-adapters/update-check.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/update-check.js +263 -0
- package/data/build/dist/host/cli-adapters/update-check.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/zcode-driver.js +7 -2
- package/data/build/dist/host/cli-adapters/zcode-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/zcode-update.d.ts +8 -0
- package/data/build/dist/host/cli-adapters/zcode-update.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-update.js +149 -0
- package/data/build/dist/host/cli-adapters/zcode-update.js.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.d.ts +14 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/bridge-holder.js +53 -6
- package/data/build/dist/host/cli-bridge/bridge-holder.js.map +1 -1
- package/data/build/dist/host/cli-bridge/bridge-server.d.ts +8 -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 +63 -6
- 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.map +1 -1
- package/data/build/dist/host/cli-bridge/command-code-mod.js +128 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.js.map +1 -1
- package/data/build/dist/host/cli-bridge/dispatch.js +1 -1
- package/data/build/dist/host/cli-bridge/dispatch.js.map +1 -1
- package/data/build/dist/host/cli-bridge/fetch-dispatch.d.ts +23 -0
- package/data/build/dist/host/cli-bridge/fetch-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/fetch-dispatch.js +73 -0
- package/data/build/dist/host/cli-bridge/fetch-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts +14 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/injections.js +69 -7
- package/data/build/dist/host/cli-bridge/injections.js.map +1 -1
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.d.ts +1 -1
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js +102 -7
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js.map +1 -1
- package/data/build/dist/host/cli-bridge/pi-extension-entry.d.ts +3 -0
- package/data/build/dist/host/cli-bridge/pi-extension-entry.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/pi-extension-entry.js +9 -0
- package/data/build/dist/host/cli-bridge/pi-extension-entry.js.map +1 -0
- package/data/build/dist/host/cli-bridge/pi-extension.d.ts +52 -0
- package/data/build/dist/host/cli-bridge/pi-extension.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/pi-extension.js +311 -0
- package/data/build/dist/host/cli-bridge/pi-extension.js.map +1 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.d.ts +20 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.js +61 -0
- package/data/build/dist/host/cli-bridge/search-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/team-adapters.d.ts +11 -0
- package/data/build/dist/host/cli-bridge/team-adapters.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/team-adapters.js +23 -0
- package/data/build/dist/host/cli-bridge/team-adapters.js.map +1 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.d.ts +28 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.js +208 -0
- package/data/build/dist/host/cli-bridge/team-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/team-tool.d.ts +3 -0
- package/data/build/dist/host/cli-bridge/team-tool.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/team-tool.js +18 -0
- package/data/build/dist/host/cli-bridge/team-tool.js.map +1 -0
- package/data/build/dist/host/features/file-management.d.ts.map +1 -1
- package/data/build/dist/host/features/file-management.js +10 -1
- package/data/build/dist/host/features/file-management.js.map +1 -1
- package/data/build/dist/host/features/git-commit-message.d.ts +5 -0
- package/data/build/dist/host/features/git-commit-message.d.ts.map +1 -0
- package/data/build/dist/host/features/git-commit-message.js +66 -0
- package/data/build/dist/host/features/git-commit-message.js.map +1 -0
- package/data/build/dist/host/features/git-management.d.ts +11 -2
- package/data/build/dist/host/features/git-management.d.ts.map +1 -1
- package/data/build/dist/host/features/git-management.js +61 -7
- 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 +2 -3
- package/data/build/dist/host/features/global-voice-rpc.js.map +1 -1
- package/data/build/dist/host/features/index.d.ts.map +1 -1
- package/data/build/dist/host/features/index.js +2 -0
- package/data/build/dist/host/features/index.js.map +1 -1
- package/data/build/dist/host/features/interaction-translation.d.ts +10 -0
- package/data/build/dist/host/features/interaction-translation.d.ts.map +1 -0
- package/data/build/dist/host/features/interaction-translation.js +219 -0
- package/data/build/dist/host/features/interaction-translation.js.map +1 -0
- package/data/build/dist/host/features/lan-access-dsh.d.ts.map +1 -1
- package/data/build/dist/host/features/lan-access-dsh.js +3 -3
- package/data/build/dist/host/features/lan-access-dsh.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 +13 -6
- package/data/build/dist/host/features/peer-host.js.map +1 -1
- package/data/build/dist/host/features/quick-apps.d.ts +4 -0
- package/data/build/dist/host/features/quick-apps.d.ts.map +1 -0
- package/data/build/dist/host/features/quick-apps.js +158 -0
- package/data/build/dist/host/features/quick-apps.js.map +1 -0
- package/data/build/dist/host/features/session-prompt-translation.d.ts +10 -0
- package/data/build/dist/host/features/session-prompt-translation.d.ts.map +1 -0
- package/data/build/dist/host/features/session-prompt-translation.js +227 -0
- package/data/build/dist/host/features/session-prompt-translation.js.map +1 -0
- package/data/build/dist/host/features/session-translation-protection.d.ts +22 -0
- package/data/build/dist/host/features/session-translation-protection.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-protection.js +204 -0
- package/data/build/dist/host/features/session-translation-protection.js.map +1 -0
- package/data/build/dist/host/features/session-translation-recovery.d.ts +21 -0
- package/data/build/dist/host/features/session-translation-recovery.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-recovery.js +125 -0
- package/data/build/dist/host/features/session-translation-recovery.js.map +1 -0
- package/data/build/dist/host/features/session-translation-runtime.d.ts +16 -0
- package/data/build/dist/host/features/session-translation-runtime.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-runtime.js +85 -0
- package/data/build/dist/host/features/session-translation-runtime.js.map +1 -0
- package/data/build/dist/host/features/session-translation-service.d.ts +19 -4
- package/data/build/dist/host/features/session-translation-service.d.ts.map +1 -1
- package/data/build/dist/host/features/session-translation-service.js +249 -210
- package/data/build/dist/host/features/session-translation-service.js.map +1 -1
- package/data/build/dist/host/features/session-translation.d.ts.map +1 -1
- package/data/build/dist/host/features/session-translation.js +6 -3
- package/data/build/dist/host/features/session-translation.js.map +1 -1
- package/data/build/dist/host/features/types.d.ts +10 -0
- package/data/build/dist/host/features/types.d.ts.map +1 -1
- package/data/build/dist/host/html-workspace-files.d.ts +3 -0
- package/data/build/dist/host/html-workspace-files.d.ts.map +1 -0
- package/data/build/dist/host/html-workspace-files.js +135 -0
- package/data/build/dist/host/html-workspace-files.js.map +1 -0
- package/data/build/dist/host/index.d.ts.map +1 -1
- package/data/build/dist/host/index.js +32 -39
- package/data/build/dist/host/index.js.map +1 -1
- package/data/build/dist/host/lan-access-dsh.d.ts +14 -2
- package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -1
- package/data/build/dist/host/lan-access-dsh.js +81 -13
- package/data/build/dist/host/lan-access-dsh.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts +2 -2
- 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 +10 -9
- 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-streams.d.ts +3 -3
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.js +26 -14
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.d.ts +5 -0
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.js +27 -0
- package/data/build/dist/host/modules/peer-host/quick-app-gateway.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/browse.d.ts +5 -0
- package/data/build/dist/host/modules/quick-apps/browse.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/browse.js +37 -0
- package/data/build/dist/host/modules/quick-apps/browse.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.d.ts +4 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.js +39 -0
- package/data/build/dist/host/modules/quick-apps/code-revision.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/documents.d.ts +14 -0
- package/data/build/dist/host/modules/quick-apps/documents.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/documents.js +87 -0
- package/data/build/dist/host/modules/quick-apps/documents.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/egress.d.ts +35 -0
- package/data/build/dist/host/modules/quick-apps/egress.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/egress.js +244 -0
- package/data/build/dist/host/modules/quick-apps/egress.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/errors.d.ts +8 -0
- package/data/build/dist/host/modules/quick-apps/errors.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/errors.js +15 -0
- package/data/build/dist/host/modules/quick-apps/errors.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/file-api.d.ts +30 -0
- package/data/build/dist/host/modules/quick-apps/file-api.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/file-api.js +149 -0
- package/data/build/dist/host/modules/quick-apps/file-api.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/launches.d.ts +35 -0
- package/data/build/dist/host/modules/quick-apps/launches.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/launches.js +80 -0
- package/data/build/dist/host/modules/quick-apps/launches.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/paths.d.ts +14 -0
- package/data/build/dist/host/modules/quick-apps/paths.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/paths.js +72 -0
- package/data/build/dist/host/modules/quick-apps/paths.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/registry.d.ts +30 -0
- package/data/build/dist/host/modules/quick-apps/registry.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/registry.js +195 -0
- package/data/build/dist/host/modules/quick-apps/registry.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/remote.d.ts +38 -0
- package/data/build/dist/host/modules/quick-apps/remote.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/remote.js +238 -0
- package/data/build/dist/host/modules/quick-apps/remote.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/service.d.ts +27 -0
- package/data/build/dist/host/modules/quick-apps/service.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/service.js +174 -0
- package/data/build/dist/host/modules/quick-apps/service.js.map +1 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.d.ts +8 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.d.ts.map +1 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.js +213 -0
- package/data/build/dist/host/modules/quick-apps/static-handler.js.map +1 -0
- package/data/build/dist/host/native-session-bridge.d.ts +7 -1
- package/data/build/dist/host/native-session-bridge.d.ts.map +1 -1
- package/data/build/dist/host/native-session-bridge.js +10 -15
- 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 +23 -12
- package/data/build/dist/host/rpc.js.map +1 -1
- package/data/build/dist/host/session-changes.d.ts.map +1 -1
- package/data/build/dist/host/session-changes.js +6 -2
- package/data/build/dist/host/session-changes.js.map +1 -1
- package/data/build/dist/host/session-migration-repair.js +48 -35
- package/data/build/dist/host/session-migration-repair.js.map +1 -1
- package/data/build/dist/host/settings.d.ts.map +1 -1
- package/data/build/dist/host/settings.js +31 -2
- package/data/build/dist/host/settings.js.map +1 -1
- package/data/build/dist/host/workspace-file-mutations.d.ts +2 -0
- package/data/build/dist/host/workspace-file-mutations.d.ts.map +1 -0
- package/data/build/dist/host/workspace-file-mutations.js +15 -0
- package/data/build/dist/host/workspace-file-mutations.js.map +1 -0
- package/data/build/dist/host/workspace-root.d.ts +14 -0
- package/data/build/dist/host/workspace-root.d.ts.map +1 -0
- package/data/build/dist/host/workspace-root.js +99 -0
- package/data/build/dist/host/workspace-root.js.map +1 -0
- package/data/build/dist/shared/attachment-prompts.d.ts +11 -0
- package/data/build/dist/shared/attachment-prompts.d.ts.map +1 -0
- package/data/build/dist/shared/attachment-prompts.js +17 -0
- package/data/build/dist/shared/attachment-prompts.js.map +1 -0
- package/data/build/dist/shared/cli-provider-route.d.ts +7 -0
- package/data/build/dist/shared/cli-provider-route.d.ts.map +1 -0
- package/data/build/dist/shared/cli-provider-route.js +13 -0
- package/data/build/dist/shared/cli-provider-route.js.map +1 -0
- package/data/build/dist/shared/codex-performance.d.ts +3 -0
- package/data/build/dist/shared/codex-performance.d.ts.map +1 -0
- package/data/build/dist/shared/codex-performance.js +2 -0
- package/data/build/dist/shared/codex-performance.js.map +1 -0
- package/data/build/dist/shared/contracts/agent-team.d.ts +14 -0
- package/data/build/dist/shared/contracts/agent-team.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/agent-team.js +48 -0
- package/data/build/dist/shared/contracts/agent-team.js.map +1 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +62 -1
- package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/cli-management.d.ts +29 -0
- package/data/build/dist/shared/contracts/cli-management.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/cli-management.js +2 -0
- package/data/build/dist/shared/contracts/cli-management.js.map +1 -0
- package/data/build/dist/shared/contracts/config.d.ts +7 -1
- 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/errors.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/git.d.ts +17 -0
- package/data/build/dist/shared/contracts/git.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/git.js +27 -1
- package/data/build/dist/shared/contracts/git.js.map +1 -1
- package/data/build/dist/shared/contracts/interaction-presentation.d.ts +32 -0
- package/data/build/dist/shared/contracts/interaction-presentation.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/interaction-presentation.js +2 -0
- package/data/build/dist/shared/contracts/interaction-presentation.js.map +1 -0
- package/data/build/dist/shared/contracts/interaction-translation.d.ts +53 -0
- package/data/build/dist/shared/contracts/interaction-translation.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/interaction-translation.js +44 -0
- package/data/build/dist/shared/contracts/interaction-translation.js.map +1 -0
- package/data/build/dist/shared/contracts/quick-apps.d.ts +70 -0
- package/data/build/dist/shared/contracts/quick-apps.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/quick-apps.js +4 -0
- package/data/build/dist/shared/contracts/quick-apps.js.map +1 -0
- package/data/build/dist/shared/contracts/session-translation.d.ts +82 -9
- package/data/build/dist/shared/contracts/session-translation.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/session-translation.js +146 -2
- package/data/build/dist/shared/contracts/session-translation.js.map +1 -1
- package/data/build/dist/shared/contracts/subscription.d.ts +87 -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 +9 -15
- package/data/build/dist/shared/contracts/version.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/version.js +8 -14
- package/data/build/dist/shared/contracts/version.js.map +1 -1
- package/data/build/dist/shared/index.d.ts +3 -2
- package/data/build/dist/shared/index.d.ts.map +1 -1
- package/data/build/dist/shared/index.js +3 -2
- package/data/build/dist/shared/index.js.map +1 -1
- package/data/build/dist/shared/peer-host-http-routes.d.ts +4 -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 +4 -0
- 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/quick-app-browser-storage.d.ts +33 -0
- package/data/build/dist/shared/quick-app-browser-storage.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-browser-storage.js +33 -0
- package/data/build/dist/shared/quick-app-browser-storage.js.map +1 -0
- package/data/build/dist/shared/quick-app-network-allow.d.ts +8 -0
- package/data/build/dist/shared/quick-app-network-allow.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-network-allow.js +192 -0
- package/data/build/dist/shared/quick-app-network-allow.js.map +1 -0
- package/data/build/dist/shared/quick-app-network-bootstrap.d.ts +9 -0
- package/data/build/dist/shared/quick-app-network-bootstrap.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-network-bootstrap.js +134 -0
- package/data/build/dist/shared/quick-app-network-bootstrap.js.map +1 -0
- package/data/build/dist/shared/quick-app-proxy-path.d.ts +6 -0
- package/data/build/dist/shared/quick-app-proxy-path.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-proxy-path.js +18 -0
- package/data/build/dist/shared/quick-app-proxy-path.js.map +1 -0
- package/data/build/dist/shared/quick-app-storage-bootstrap.d.ts +9 -0
- package/data/build/dist/shared/quick-app-storage-bootstrap.d.ts.map +1 -0
- package/data/build/dist/shared/quick-app-storage-bootstrap.js +189 -0
- package/data/build/dist/shared/quick-app-storage-bootstrap.js.map +1 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.d.ts +7 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.d.ts.map +1 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.js +10 -0
- package/data/build/dist/shared/quick-apps-bootstrap-locale.js.map +1 -0
- package/data/build/dist/shared/request-performance.d.ts +15 -0
- package/data/build/dist/shared/request-performance.d.ts.map +1 -0
- package/data/build/dist/shared/request-performance.js +3 -0
- package/data/build/dist/shared/request-performance.js.map +1 -0
- package/data/build/dist/shared/translation-indicator.d.ts +26 -0
- package/data/build/dist/shared/translation-indicator.d.ts.map +1 -0
- package/data/build/dist/shared/translation-indicator.js +29 -0
- package/data/build/dist/shared/translation-indicator.js.map +1 -0
- package/package.json +35 -34
- 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.model-catalog-cache.js.map +0 -1
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({
|
|
2
|
+
id: "@jingyi0605/codingns4dsh",
|
|
3
|
+
chunk: "client.moss-voice-output.js",
|
|
4
|
+
factory: (require) => {
|
|
5
|
+
var module = { exports: {} };
|
|
6
|
+
var exports = module.exports;
|
|
7
|
+
const require_manager = require("@jingyi0605/codingns4dsh/client.manager.js");
|
|
8
|
+
const require_primitives_adapter = require("@jingyi0605/codingns4dsh/client.primitives-adapter.js");
|
|
9
|
+
//#region src/client/peer-host-color.ts
|
|
10
|
+
/**
|
|
11
|
+
* 工作区标签配色的推导与缓存。
|
|
12
|
+
*
|
|
13
|
+
* 用户在 PeerHost 管理里显式配置的颜色优先;没有配置时按 Host 名称推导一个稳定
|
|
14
|
+
* 颜色,保证同一台机器在多次刷新、多个工作区之间颜色一致——颜色本身是识别手段,
|
|
15
|
+
* 随机色会让标签失去意义。
|
|
16
|
+
*/
|
|
17
|
+
/** 无显式配色时使用的候选色板;与 PEER_HOST_COLOR_PRESETS 保持同一组观感。 */
|
|
18
|
+
const FALLBACK_PALETTE = [
|
|
19
|
+
"#1677ff",
|
|
20
|
+
"#722ed1",
|
|
21
|
+
"#13c2c2",
|
|
22
|
+
"#52c41a",
|
|
23
|
+
"#fa8c16",
|
|
24
|
+
"#eb2f96",
|
|
25
|
+
"#f5222d",
|
|
26
|
+
"#8c8c8c"
|
|
27
|
+
];
|
|
28
|
+
const derivedCache = /* @__PURE__ */ new Map();
|
|
29
|
+
/**
|
|
30
|
+
* 解析某台 Host 的工作区标签颜色。
|
|
31
|
+
*
|
|
32
|
+
* @param explicit - 用户在 PeerHost 配置里保存的颜色;非法或缺省时走推导。
|
|
33
|
+
* @param seed - 推导种子,通常用 PeerHost 名称;同一名称始终得到同一颜色。
|
|
34
|
+
* @returns `#rrggbb` 形式的小写颜色。
|
|
35
|
+
*/
|
|
36
|
+
function resolvePeerHostColor(explicit, seed) {
|
|
37
|
+
const configured = require_primitives_adapter.normalizePeerHostColor(explicit);
|
|
38
|
+
if (configured !== null) return configured;
|
|
39
|
+
const key = seed.trim() === "" ? "peer-host" : seed.trim();
|
|
40
|
+
const cached = derivedCache.get(key);
|
|
41
|
+
if (cached !== void 0) return cached;
|
|
42
|
+
const color = FALLBACK_PALETTE[hashString(key) % FALLBACK_PALETTE.length];
|
|
43
|
+
derivedCache.set(key, color);
|
|
44
|
+
return color;
|
|
45
|
+
}
|
|
46
|
+
/** FNV-1a 32 位哈希;只用于选色,不需要密码学强度。 */
|
|
47
|
+
function hashString(value) {
|
|
48
|
+
let hash = 2166136261;
|
|
49
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
50
|
+
hash ^= value.charCodeAt(index);
|
|
51
|
+
hash = Math.imul(hash, 16777619) >>> 0;
|
|
52
|
+
}
|
|
53
|
+
return hash >>> 0;
|
|
54
|
+
}
|
|
55
|
+
/** 标签胶囊的底色:与归档面板 Agent 徽标保持同一种 `color-mix` 写法。 */
|
|
56
|
+
function peerHostTagBackground(color) {
|
|
57
|
+
return `color-mix(in srgb, ${color} 16%, transparent)`;
|
|
58
|
+
}
|
|
59
|
+
/** 标签文字色;直接使用配置色,保证明暗主题下都有足够对比。 */
|
|
60
|
+
function peerHostTagForeground(color) {
|
|
61
|
+
return color;
|
|
62
|
+
}
|
|
63
|
+
/** 工作区列表与关联项目表共用的 Host 胶囊标签基础样式。 */
|
|
64
|
+
function peerHostTagStyle(color) {
|
|
65
|
+
return {
|
|
66
|
+
boxSizing: "border-box",
|
|
67
|
+
overflow: "hidden",
|
|
68
|
+
textOverflow: "ellipsis",
|
|
69
|
+
whiteSpace: "nowrap",
|
|
70
|
+
padding: "1px 6px",
|
|
71
|
+
borderRadius: "999px",
|
|
72
|
+
fontSize: "10px",
|
|
73
|
+
lineHeight: "1.5",
|
|
74
|
+
pointerEvents: "none",
|
|
75
|
+
color: peerHostTagForeground(color),
|
|
76
|
+
background: peerHostTagBackground(color)
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/shared/voice-diagnostics.ts
|
|
81
|
+
const allowedFields = new Set(`ownerId clientId callId requestId diagnosticId epoch sequence firstSequence lastSequence
|
|
82
|
+
action state phase backend provider model code errorName status durationMs waitMs firstAudioMs firstTextMs
|
|
83
|
+
firstSentenceMs firstPlaybackMs queueMs gapMs intervalMs maxIntervalMs processMs maxProcessMs decodeMs
|
|
84
|
+
maxDecodeMs audioMs bytes pendingBytes pending frames chunks samples sampleRate inputRate threads tokens
|
|
85
|
+
textLength systemLength messageCount toolCount count dropped stale aborted completed continuation muted
|
|
86
|
+
sourceCount contextState processor cpuPercent rssMb heapMb eventLoopMeanMs eventLoopMaxMs eventLoopP99Ms
|
|
87
|
+
realTimeFactor generationMs codecMs transportMs segment generationFrames fileIndex
|
|
88
|
+
pcmBytes headerBytes pendingAudioMs inFlightMs endpointSilenceMs cached streaming
|
|
89
|
+
webSearchAvailable searchRegistration`.split(/\s+/u));
|
|
90
|
+
function sanitizeVoiceDiagnosticFields(value) {
|
|
91
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) return {};
|
|
92
|
+
const fields = {};
|
|
93
|
+
for (const key of allowedFields) {
|
|
94
|
+
const item = value[key];
|
|
95
|
+
if (typeof item === "number" && Number.isFinite(item) || typeof item === "boolean" || item === null) fields[key] = item;
|
|
96
|
+
else if (typeof item === "string") fields[key] = item.slice(0, 160);
|
|
97
|
+
}
|
|
98
|
+
return fields;
|
|
99
|
+
}
|
|
100
|
+
function voiceDiagnosticId() {
|
|
101
|
+
return globalThis.crypto?.randomUUID?.() ?? `${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
102
|
+
}
|
|
103
|
+
function voiceDiagnosticError(error) {
|
|
104
|
+
return error instanceof Error ? error.name : "UnknownError";
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/client/moss-voice-output.ts
|
|
108
|
+
/** 可取消的 PCM 播放器;同一轮的各段串行生成,生成与播放并行。 */
|
|
109
|
+
var MossVoiceOutput = class {
|
|
110
|
+
options;
|
|
111
|
+
context;
|
|
112
|
+
abort;
|
|
113
|
+
sources = /* @__PURE__ */ new Set();
|
|
114
|
+
sequence = 0;
|
|
115
|
+
outputDeviceId = "";
|
|
116
|
+
nextStart = 0;
|
|
117
|
+
gain;
|
|
118
|
+
muted = false;
|
|
119
|
+
volume = 1;
|
|
120
|
+
constructor(options = {}) {
|
|
121
|
+
this.options = options;
|
|
122
|
+
}
|
|
123
|
+
get outputDeviceSupported() {
|
|
124
|
+
return typeof (globalThis.AudioContext?.prototype)?.setSinkId === "function";
|
|
125
|
+
}
|
|
126
|
+
/** 在点击开始或试听时调用,保留浏览器要求的用户手势。 */
|
|
127
|
+
async prepare() {
|
|
128
|
+
if (this.context === void 0 || this.context.state === "closed") this.context = this.options.context?.() ?? new AudioContext();
|
|
129
|
+
if (this.gain === void 0) {
|
|
130
|
+
this.gain = this.context.createGain();
|
|
131
|
+
this.gain.gain.value = this.muted ? 0 : this.volume;
|
|
132
|
+
this.gain.connect(this.context.destination);
|
|
133
|
+
}
|
|
134
|
+
if (this.context.state === "suspended") await this.context.resume();
|
|
135
|
+
if (this.outputDeviceId !== "" && typeof this.context.setSinkId === "function") await this.context.setSinkId(this.outputDeviceId);
|
|
136
|
+
}
|
|
137
|
+
async setOutputDevice(id) {
|
|
138
|
+
if (!this.outputDeviceSupported) throw new Error("当前浏览器不支持 MOSS 播放设备选择");
|
|
139
|
+
if (this.context !== void 0) await this.context.setSinkId(id);
|
|
140
|
+
this.outputDeviceId = id;
|
|
141
|
+
}
|
|
142
|
+
/** 输出静音不中断推理或时间线,恢复后继续听当前播报。 */
|
|
143
|
+
setMuted(muted) {
|
|
144
|
+
this.muted = muted;
|
|
145
|
+
if (this.gain !== void 0) this.gain.gain.value = muted ? 0 : this.volume;
|
|
146
|
+
}
|
|
147
|
+
async speak(text, voiceId, onStart, parameters) {
|
|
148
|
+
this.cancel();
|
|
149
|
+
const sequence = this.sequence;
|
|
150
|
+
if (!await this.append(text, voiceId, onStart, parameters) || sequence !== this.sequence) return false;
|
|
151
|
+
return this.finish();
|
|
152
|
+
}
|
|
153
|
+
/** 由文本队列串行调用;收到生成结束即可提交下一段,不取消仍在播放的前一段。 */
|
|
154
|
+
async append(text, voiceId, onStart, parameters) {
|
|
155
|
+
const started = performance.now();
|
|
156
|
+
const diagnosticId = voiceDiagnosticId();
|
|
157
|
+
const fields = {
|
|
158
|
+
...this.options.traceContext?.(),
|
|
159
|
+
diagnosticId,
|
|
160
|
+
textLength: text.length
|
|
161
|
+
};
|
|
162
|
+
const trace = (event, metrics) => this.options.trace?.(`client.tts.${event}`, {
|
|
163
|
+
...fields,
|
|
164
|
+
...metrics
|
|
165
|
+
});
|
|
166
|
+
let chunks = 0;
|
|
167
|
+
let audioMs = 0;
|
|
168
|
+
let lastChunkAt = started;
|
|
169
|
+
const playback = require_manager.readAssistantTtsParameters(parameters);
|
|
170
|
+
const sequence = this.sequence;
|
|
171
|
+
const continuation = this.abort !== void 0;
|
|
172
|
+
const abort = this.abort ?? new AbortController();
|
|
173
|
+
this.abort = abort;
|
|
174
|
+
const readerSignal = abort.signal;
|
|
175
|
+
trace("start", { continuation });
|
|
176
|
+
try {
|
|
177
|
+
await this.prepare();
|
|
178
|
+
if (readerSignal.aborted) return false;
|
|
179
|
+
const queueStarted = performance.now();
|
|
180
|
+
await this.waitUntil(() => this.sources.size === 0 || this.nextStart - this.context.currentTime <= 5, readerSignal);
|
|
181
|
+
if (readerSignal.aborted) return false;
|
|
182
|
+
trace("queue_ready", {
|
|
183
|
+
waitMs: performance.now() - queueStarted,
|
|
184
|
+
queueMs: Math.max(0, this.nextStart - this.context.currentTime) * 1e3
|
|
185
|
+
});
|
|
186
|
+
this.volume = playback.volume;
|
|
187
|
+
this.gain.gain.value = this.muted ? 0 : this.volume;
|
|
188
|
+
const response = await (this.options.fetch ?? globalThis.fetch)(new URL(require_manager.ASSISTANT_TTS_PATH, globalThis.location?.origin ?? "http://localhost"), {
|
|
189
|
+
method: "POST",
|
|
190
|
+
credentials: "same-origin",
|
|
191
|
+
signal: readerSignal,
|
|
192
|
+
headers: {
|
|
193
|
+
"content-type": "application/json",
|
|
194
|
+
accept: "application/x-ndjson"
|
|
195
|
+
},
|
|
196
|
+
body: JSON.stringify({
|
|
197
|
+
text,
|
|
198
|
+
parameters: playback,
|
|
199
|
+
diagnosticId,
|
|
200
|
+
...voiceId === void 0 ? {} : { voiceId },
|
|
201
|
+
...fields.requestId === void 0 ? {} : { requestId: fields.requestId },
|
|
202
|
+
...fields.ownerId === void 0 ? {} : { ownerId: fields.ownerId }
|
|
203
|
+
})
|
|
204
|
+
});
|
|
205
|
+
trace("headers", {
|
|
206
|
+
status: response.status,
|
|
207
|
+
durationMs: performance.now() - started
|
|
208
|
+
});
|
|
209
|
+
if (!response.ok) {
|
|
210
|
+
const value = await response.json().catch(() => ({}));
|
|
211
|
+
throw new Error(typeof value.error === "string" ? value.error : `Host TTS 请求失败(${response.status})`);
|
|
212
|
+
}
|
|
213
|
+
if (response.body === null) throw new Error("Host TTS 响应缺少音频流");
|
|
214
|
+
const reader = response.body.getReader();
|
|
215
|
+
const decoder = new TextDecoder();
|
|
216
|
+
let buffer = "";
|
|
217
|
+
let completed = false;
|
|
218
|
+
let played = false;
|
|
219
|
+
try {
|
|
220
|
+
while (true) {
|
|
221
|
+
const next = await reader.read();
|
|
222
|
+
if (readerSignal.aborted) return false;
|
|
223
|
+
if (next.done) break;
|
|
224
|
+
buffer += decoder.decode(next.value, { stream: true });
|
|
225
|
+
if (buffer.length > 2097152) throw new Error("Host TTS 音频事件过大");
|
|
226
|
+
let boundary = buffer.indexOf("\n");
|
|
227
|
+
while (boundary >= 0) {
|
|
228
|
+
const line = buffer.slice(0, boundary).trim();
|
|
229
|
+
buffer = buffer.slice(boundary + 1);
|
|
230
|
+
if (line !== "") {
|
|
231
|
+
const event = JSON.parse(line);
|
|
232
|
+
if (completed) throw new Error("Host TTS 在完成后继续返回音频");
|
|
233
|
+
if (event.type === "error") throw new Error(String(event.message));
|
|
234
|
+
if (event.type === "done") completed = true;
|
|
235
|
+
else if (event.type === "audio") {
|
|
236
|
+
const arrived = performance.now();
|
|
237
|
+
if (chunks === 0) trace("first_audio", { firstAudioMs: arrived - started });
|
|
238
|
+
const samples = decodeMossPcm(event);
|
|
239
|
+
const decodeMs = performance.now() - arrived;
|
|
240
|
+
chunks++;
|
|
241
|
+
audioMs += samples.length / Number(event.sampleRate) * 1e3;
|
|
242
|
+
trace("chunk", {
|
|
243
|
+
chunks,
|
|
244
|
+
decodeMs,
|
|
245
|
+
samples: samples.length,
|
|
246
|
+
audioMs: samples.length / Number(event.sampleRate) * 1e3,
|
|
247
|
+
intervalMs: arrived - lastChunkAt,
|
|
248
|
+
queueMs: Math.max(0, this.nextStart - this.context.currentTime) * 1e3
|
|
249
|
+
});
|
|
250
|
+
lastChunkAt = arrived;
|
|
251
|
+
if (!played && continuation) this.nextStart += playback.segmentPauseMs / 1e3;
|
|
252
|
+
await this.waitUntil(() => this.sources.size === 0 || this.nextStart - this.context.currentTime <= 5, readerSignal);
|
|
253
|
+
if (readerSignal.aborted) return false;
|
|
254
|
+
this.enqueue(samples, Number(event.sampleRate), playback.rate, trace, chunks === 1 && !continuation);
|
|
255
|
+
if (!played) {
|
|
256
|
+
played = true;
|
|
257
|
+
onStart?.();
|
|
258
|
+
}
|
|
259
|
+
} else throw new Error("Host TTS 返回未知事件");
|
|
260
|
+
}
|
|
261
|
+
boundary = buffer.indexOf("\n");
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
} finally {
|
|
265
|
+
await reader.cancel().catch(() => void 0);
|
|
266
|
+
reader.releaseLock();
|
|
267
|
+
}
|
|
268
|
+
if (!completed || !played || buffer.trim() !== "") throw new Error("Host TTS 音频流未完整结束");
|
|
269
|
+
trace("generated", {
|
|
270
|
+
durationMs: performance.now() - started,
|
|
271
|
+
chunks,
|
|
272
|
+
audioMs,
|
|
273
|
+
realTimeFactor: audioMs > 0 ? (performance.now() - started) / audioMs : 0
|
|
274
|
+
});
|
|
275
|
+
return !readerSignal.aborted && sequence === this.sequence;
|
|
276
|
+
} catch (error) {
|
|
277
|
+
trace("error", {
|
|
278
|
+
aborted: readerSignal.aborted,
|
|
279
|
+
durationMs: performance.now() - started,
|
|
280
|
+
errorName: voiceDiagnosticError(error)
|
|
281
|
+
});
|
|
282
|
+
if (readerSignal.aborted || sequence !== this.sequence) return false;
|
|
283
|
+
this.cancel();
|
|
284
|
+
throw error;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
/** 文本队列耗尽后再等音频播完;取消旧轮次不会误清理新轮次的请求。 */
|
|
288
|
+
async finish() {
|
|
289
|
+
const abort = this.abort;
|
|
290
|
+
if (abort === void 0) return true;
|
|
291
|
+
const sequence = this.sequence;
|
|
292
|
+
await this.waitUntil(() => this.sources.size === 0, abort.signal);
|
|
293
|
+
if (this.abort === abort) this.abort = void 0;
|
|
294
|
+
return !abort.signal.aborted && sequence === this.sequence;
|
|
295
|
+
}
|
|
296
|
+
cancel() {
|
|
297
|
+
this.sequence++;
|
|
298
|
+
this.abort?.abort();
|
|
299
|
+
this.abort = void 0;
|
|
300
|
+
for (const source of this.sources) {
|
|
301
|
+
source.onended = null;
|
|
302
|
+
try {
|
|
303
|
+
source.stop();
|
|
304
|
+
} catch {}
|
|
305
|
+
source.disconnect();
|
|
306
|
+
}
|
|
307
|
+
this.sources.clear();
|
|
308
|
+
this.nextStart = 0;
|
|
309
|
+
}
|
|
310
|
+
dispose() {
|
|
311
|
+
this.cancel();
|
|
312
|
+
this.gain?.disconnect();
|
|
313
|
+
this.gain = void 0;
|
|
314
|
+
const context = this.context;
|
|
315
|
+
this.context = void 0;
|
|
316
|
+
context?.close().catch(() => void 0);
|
|
317
|
+
}
|
|
318
|
+
enqueue(samples, sampleRate, rate, trace, first) {
|
|
319
|
+
const context = this.context;
|
|
320
|
+
if (this.nextStart - context.currentTime > 30) throw new Error("MOSS 播放队列过长,请缩短文本");
|
|
321
|
+
const buffer = context.createBuffer(1, samples.length, sampleRate);
|
|
322
|
+
buffer.copyToChannel(samples, 0);
|
|
323
|
+
const source = context.createBufferSource();
|
|
324
|
+
source.buffer = buffer;
|
|
325
|
+
source.playbackRate.value = rate;
|
|
326
|
+
source.connect(this.gain);
|
|
327
|
+
source.onended = () => {
|
|
328
|
+
this.sources.delete(source);
|
|
329
|
+
source.disconnect();
|
|
330
|
+
};
|
|
331
|
+
this.sources.add(source);
|
|
332
|
+
const start = Math.max(context.currentTime + .02, this.nextStart);
|
|
333
|
+
trace("playback_scheduled", {
|
|
334
|
+
gapMs: this.nextStart > 0 ? Math.max(0, context.currentTime - this.nextStart) * 1e3 : 0,
|
|
335
|
+
queueMs: (start - context.currentTime) * 1e3,
|
|
336
|
+
sourceCount: this.sources.size,
|
|
337
|
+
contextState: context.state,
|
|
338
|
+
muted: this.muted
|
|
339
|
+
});
|
|
340
|
+
if (first) trace("first_playback_scheduled", { queueMs: (start - context.currentTime) * 1e3 });
|
|
341
|
+
source.start(start);
|
|
342
|
+
this.nextStart = start + buffer.duration / rate;
|
|
343
|
+
}
|
|
344
|
+
async waitUntil(ready, signal) {
|
|
345
|
+
if (ready() || signal.aborted) return;
|
|
346
|
+
await new Promise((resolve) => {
|
|
347
|
+
let timer;
|
|
348
|
+
const finish = () => {
|
|
349
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
350
|
+
signal.removeEventListener("abort", finish);
|
|
351
|
+
resolve();
|
|
352
|
+
};
|
|
353
|
+
const check = () => {
|
|
354
|
+
if (signal.aborted || ready()) finish();
|
|
355
|
+
else timer = setTimeout(check, 30);
|
|
356
|
+
};
|
|
357
|
+
signal.addEventListener("abort", finish, { once: true });
|
|
358
|
+
check();
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
/** PCM 固定为 48kHz、单声道、16 位小端,与 Host 工作进程协议一致。 */
|
|
363
|
+
function decodeMossPcm(event) {
|
|
364
|
+
if (event.sampleRate !== 48e3 || typeof event.data !== "string" || event.data.length > 1048576) throw new Error("Host TTS PCM 格式无效");
|
|
365
|
+
const raw = atob(event.data);
|
|
366
|
+
if (raw.length === 0 || raw.length % 2 !== 0) throw new Error("Host TTS PCM 长度无效");
|
|
367
|
+
const samples = new Float32Array(raw.length / 2);
|
|
368
|
+
for (let index = 0; index < samples.length; index++) {
|
|
369
|
+
const value = raw.charCodeAt(index * 2) | raw.charCodeAt(index * 2 + 1) << 8;
|
|
370
|
+
samples[index] = (value >= 32768 ? value - 65536 : value) / 32768;
|
|
371
|
+
}
|
|
372
|
+
return samples;
|
|
373
|
+
}
|
|
374
|
+
//#endregion
|
|
375
|
+
Object.defineProperty(exports, "MossVoiceOutput", {
|
|
376
|
+
enumerable: true,
|
|
377
|
+
get: function() {
|
|
378
|
+
return MossVoiceOutput;
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
Object.defineProperty(exports, "peerHostTagStyle", {
|
|
382
|
+
enumerable: true,
|
|
383
|
+
get: function() {
|
|
384
|
+
return peerHostTagStyle;
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
Object.defineProperty(exports, "resolvePeerHostColor", {
|
|
388
|
+
enumerable: true,
|
|
389
|
+
get: function() {
|
|
390
|
+
return resolvePeerHostColor;
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
Object.defineProperty(exports, "sanitizeVoiceDiagnosticFields", {
|
|
394
|
+
enumerable: true,
|
|
395
|
+
get: function() {
|
|
396
|
+
return sanitizeVoiceDiagnosticFields;
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
Object.defineProperty(exports, "voiceDiagnosticError", {
|
|
400
|
+
enumerable: true,
|
|
401
|
+
get: function() {
|
|
402
|
+
return voiceDiagnosticError;
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
Object.defineProperty(exports, "voiceDiagnosticId", {
|
|
406
|
+
enumerable: true,
|
|
407
|
+
get: function() {
|
|
408
|
+
return voiceDiagnosticId;
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
return module.exports;
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
//# sourceMappingURL=client.moss-voice-output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.moss-voice-output.js","names":["normalizePeerHostColor","readAssistantTtsParameters","ASSISTANT_TTS_PATH"],"sources":["../../../../src/client/peer-host-color.ts","../../../../src/shared/voice-diagnostics.ts","../../../../src/client/moss-voice-output.ts"],"sourcesContent":["import { normalizePeerHostColor } from '../shared/contracts/peer-host.js'\nimport type { CSSProperties } from 'react'\n\n/**\n * 工作区标签配色的推导与缓存。\n *\n * 用户在 PeerHost 管理里显式配置的颜色优先;没有配置时按 Host 名称推导一个稳定\n * 颜色,保证同一台机器在多次刷新、多个工作区之间颜色一致——颜色本身是识别手段,\n * 随机色会让标签失去意义。\n */\n\n/** 无显式配色时使用的候选色板;与 PEER_HOST_COLOR_PRESETS 保持同一组观感。 */\nconst FALLBACK_PALETTE = [\n '#1677ff',\n '#722ed1',\n '#13c2c2',\n '#52c41a',\n '#fa8c16',\n '#eb2f96',\n '#f5222d',\n '#8c8c8c',\n] as const\n\nconst derivedCache = new Map<string, string>()\n\n/**\n * 解析某台 Host 的工作区标签颜色。\n *\n * @param explicit - 用户在 PeerHost 配置里保存的颜色;非法或缺省时走推导。\n * @param seed - 推导种子,通常用 PeerHost 名称;同一名称始终得到同一颜色。\n * @returns `#rrggbb` 形式的小写颜色。\n */\nexport function resolvePeerHostColor(explicit: string | null | undefined, seed: string): string {\n const configured = normalizePeerHostColor(explicit)\n if (configured !== null) return configured\n const key = seed.trim() === '' ? 'peer-host' : seed.trim()\n const cached = derivedCache.get(key)\n if (cached !== undefined) return cached\n const color = FALLBACK_PALETTE[hashString(key) % FALLBACK_PALETTE.length]!\n derivedCache.set(key, color)\n return color\n}\n\n/** FNV-1a 32 位哈希;只用于选色,不需要密码学强度。 */\nfunction hashString(value: string): number {\n let hash = 0x811c9dc5\n for (let index = 0; index < value.length; index += 1) {\n hash ^= value.charCodeAt(index)\n hash = Math.imul(hash, 0x01000193) >>> 0\n }\n return hash >>> 0\n}\n\n/** 标签胶囊的底色:与归档面板 Agent 徽标保持同一种 `color-mix` 写法。 */\nexport function peerHostTagBackground(color: string): string {\n return `color-mix(in srgb, ${color} 16%, transparent)`\n}\n\n/** 标签文字色;直接使用配置色,保证明暗主题下都有足够对比。 */\nexport function peerHostTagForeground(color: string): string {\n return color\n}\n\n/** 工作区列表与关联项目表共用的 Host 胶囊标签基础样式。 */\nexport function peerHostTagStyle(color: string): CSSProperties {\n return {\n boxSizing: 'border-box',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n padding: '1px 6px',\n borderRadius: '999px',\n fontSize: '10px',\n lineHeight: '1.5',\n pointerEvents: 'none',\n color: peerHostTagForeground(color),\n background: peerHostTagBackground(color),\n }\n}\n","/** 诊断只接收标量指标,禁止把音频、正文、提示词和认证信息写入日志。 */\nexport type VoiceDiagnosticFields = Readonly<Record<string, string | number | boolean | null | undefined>>\nexport type VoiceDiagnosticTrace = (event: string, fields?: VoiceDiagnosticFields) => void\nexport interface VoiceDiagnosticRecord {\n readonly timestamp: number\n readonly event: string\n readonly fields: VoiceDiagnosticFields\n}\n\nconst sinks = new Set<(record: VoiceDiagnosticRecord) => void>()\nconst allowedFields = new Set(`ownerId clientId callId requestId diagnosticId epoch sequence firstSequence lastSequence\n action state phase backend provider model code errorName status durationMs waitMs firstAudioMs firstTextMs\n firstSentenceMs firstPlaybackMs queueMs gapMs intervalMs maxIntervalMs processMs maxProcessMs decodeMs\n maxDecodeMs audioMs bytes pendingBytes pending frames chunks samples sampleRate inputRate threads tokens\n textLength systemLength messageCount toolCount count dropped stale aborted completed continuation muted\n sourceCount contextState processor cpuPercent rssMb heapMb eventLoopMeanMs eventLoopMaxMs eventLoopP99Ms\n realTimeFactor generationMs codecMs transportMs segment generationFrames fileIndex\n pcmBytes headerBytes pendingAudioMs inFlightMs endpointSilenceMs cached streaming\n webSearchAvailable searchRegistration`.split(/\\s+/u))\n\nexport function sanitizeVoiceDiagnosticFields(value: unknown): VoiceDiagnosticFields {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) return {}\n const fields: Record<string, string | number | boolean | null> = {}\n for (const key of allowedFields) {\n const item = (value as Record<string, unknown>)[key]\n if (typeof item === 'number' && Number.isFinite(item) || typeof item === 'boolean' || item === null) fields[key] = item as number | boolean | null\n else if (typeof item === 'string') fields[key] = item.slice(0, 160)\n }\n return fields\n}\n\n/** 订阅函数异常不能进入语音业务链;未安装诊断时调用只做一次空集合检查。 */\nexport const traceVoice: VoiceDiagnosticTrace = (event, fields = {}) => {\n if (sinks.size === 0) return\n const record = { timestamp: Date.now(), event, fields: sanitizeVoiceDiagnosticFields(fields) }\n for (const sink of sinks) { try { sink(record) } catch { /* 诊断失败不影响通话 */ } }\n}\n\nexport function subscribeVoiceDiagnostics(sink: (record: VoiceDiagnosticRecord) => void): () => void {\n sinks.add(sink)\n return () => { sinks.delete(sink) }\n}\n\nexport function voiceDiagnosticsEnabled(): boolean { return sinks.size > 0 }\n\nexport function voiceDiagnosticId(): string { return globalThis.crypto?.randomUUID?.() ?? `${Date.now()}-${Math.random().toString(36).slice(2)}` }\nexport function voiceDiagnosticError(error: unknown): string { return error instanceof Error ? error.name : 'UnknownError' }\n\n/** 单调时钟计时,系统时间校准不会造成负耗时。 */\nexport async function measureVoice<T>(event: string, fields: VoiceDiagnosticFields, operation: () => Promise<T>): Promise<T> {\n const started = performance.now()\n traceVoice(`${event}.start`, fields)\n try {\n const result = await operation()\n traceVoice(`${event}.done`, { ...fields, durationMs: performance.now() - started })\n return result\n } catch (error) {\n traceVoice(`${event}.error`, { ...fields, durationMs: performance.now() - started, errorName: voiceDiagnosticError(error) })\n throw error\n }\n}\n","import { ASSISTANT_TTS_PATH, readAssistantTtsParameters, type AssistantTtsParameters } from '../shared/assistant-tts.js'\nimport { voiceDiagnosticId, voiceDiagnosticError, type VoiceDiagnosticTrace, type VoiceDiagnosticFields } from '../shared/voice-diagnostics.js'\n\ntype SinkAudioContext = AudioContext & { setSinkId?: (id: string) => Promise<void> }\n\n/** 可取消的 PCM 播放器;同一轮的各段串行生成,生成与播放并行。 */\nexport class MossVoiceOutput {\n private context: SinkAudioContext | undefined\n private abort: AbortController | undefined\n private readonly sources = new Set<AudioBufferSourceNode>()\n private sequence = 0\n private outputDeviceId = ''\n private nextStart = 0\n private gain: GainNode | undefined\n private muted = false\n private volume = 1\n\n constructor(private readonly options: { fetch?: typeof fetch; context?: () => AudioContext; trace?: VoiceDiagnosticTrace; traceContext?: () => VoiceDiagnosticFields } = {}) {}\n\n get outputDeviceSupported(): boolean { return typeof (globalThis.AudioContext?.prototype as SinkAudioContext | undefined)?.setSinkId === 'function' }\n\n /** 在点击开始或试听时调用,保留浏览器要求的用户手势。 */\n async prepare(): Promise<void> {\n if (this.context === undefined || this.context.state === 'closed') this.context = (this.options.context?.() ?? new AudioContext()) as SinkAudioContext\n if (this.gain === undefined) { this.gain = this.context.createGain(); this.gain.gain.value = this.muted ? 0 : this.volume; this.gain.connect(this.context.destination) }\n if (this.context.state === 'suspended') await this.context.resume()\n if (this.outputDeviceId !== '' && typeof this.context.setSinkId === 'function') await this.context.setSinkId(this.outputDeviceId)\n }\n\n async setOutputDevice(id: string): Promise<void> {\n if (!this.outputDeviceSupported) throw new Error('当前浏览器不支持 MOSS 播放设备选择')\n if (this.context !== undefined) await this.context.setSinkId!(id)\n this.outputDeviceId = id\n }\n\n /** 输出静音不中断推理或时间线,恢复后继续听当前播报。 */\n setMuted(muted: boolean): void { this.muted = muted; if (this.gain !== undefined) this.gain.gain.value = muted ? 0 : this.volume }\n\n async speak(text: string, voiceId?: string, onStart?: () => void, parameters?: Partial<AssistantTtsParameters>): Promise<boolean> {\n this.cancel()\n const sequence = this.sequence\n if (!await this.append(text, voiceId, onStart, parameters) || sequence !== this.sequence) return false\n return this.finish()\n }\n\n /** 由文本队列串行调用;收到生成结束即可提交下一段,不取消仍在播放的前一段。 */\n async append(text: string, voiceId?: string, onStart?: () => void, parameters?: Partial<AssistantTtsParameters>): Promise<boolean> {\n const started = performance.now()\n const diagnosticId = voiceDiagnosticId()\n const fields: VoiceDiagnosticFields = { ...this.options.traceContext?.(), diagnosticId, textLength: text.length }\n const trace: VoiceDiagnosticTrace = (event, metrics) => this.options.trace?.(`client.tts.${event}`, { ...fields, ...metrics })\n let chunks = 0; let audioMs = 0; let lastChunkAt = started\n const playback = readAssistantTtsParameters(parameters)\n const sequence = this.sequence\n const continuation = this.abort !== undefined\n const abort = this.abort ?? new AbortController(); this.abort = abort\n const readerSignal = abort.signal\n trace('start', { continuation })\n try {\n await this.prepare()\n if (readerSignal.aborted) return false\n const queueStarted = performance.now()\n // 只提前准备有限音频;继续播放时逐步放行,仍只使用一个 Host 推理进程。\n await this.waitUntil(() => this.sources.size === 0 || this.nextStart - this.context!.currentTime <= 5, readerSignal)\n if (readerSignal.aborted) return false\n trace('queue_ready', { waitMs: performance.now() - queueStarted, queueMs: Math.max(0, this.nextStart - this.context!.currentTime) * 1000 })\n this.volume = playback.volume\n this.gain!.gain.value = this.muted ? 0 : this.volume\n const response = await (this.options.fetch ?? globalThis.fetch)(new URL(ASSISTANT_TTS_PATH, globalThis.location?.origin ?? 'http://localhost'), {\n method: 'POST', credentials: 'same-origin', signal: readerSignal,\n headers: { 'content-type': 'application/json', accept: 'application/x-ndjson' },\n body: JSON.stringify({ text, parameters: playback, diagnosticId, ...(voiceId === undefined ? {} : { voiceId }), ...(fields.requestId === undefined ? {} : { requestId: fields.requestId }), ...(fields.ownerId === undefined ? {} : { ownerId: fields.ownerId }) }),\n })\n trace('headers', { status: response.status, durationMs: performance.now() - started })\n if (!response.ok) {\n const value = await response.json().catch(() => ({})) as { error?: unknown }\n throw new Error(typeof value.error === 'string' ? value.error : `Host TTS 请求失败(${response.status})`)\n }\n if (response.body === null) throw new Error('Host TTS 响应缺少音频流')\n const reader = response.body.getReader(); const decoder = new TextDecoder()\n let buffer = ''; let completed = false; let played = false\n try {\n while (true) {\n const next = await reader.read()\n if (readerSignal.aborted) return false\n if (next.done) break\n buffer += decoder.decode(next.value, { stream: true })\n if (buffer.length > 2 * 1024 * 1024) throw new Error('Host TTS 音频事件过大')\n let boundary = buffer.indexOf('\\n')\n while (boundary >= 0) {\n const line = buffer.slice(0, boundary).trim(); buffer = buffer.slice(boundary + 1)\n if (line !== '') {\n const event = JSON.parse(line) as Record<string, unknown>\n if (completed) throw new Error('Host TTS 在完成后继续返回音频')\n if (event.type === 'error') throw new Error(String(event.message))\n if (event.type === 'done') completed = true\n else if (event.type === 'audio') {\n const arrived = performance.now()\n if (chunks === 0) trace('first_audio', { firstAudioMs: arrived - started })\n const samples = decodeMossPcm(event)\n const decodeMs = performance.now() - arrived\n chunks++; audioMs += samples.length / Number(event.sampleRate) * 1000\n trace('chunk', { chunks, decodeMs, samples: samples.length, audioMs: samples.length / Number(event.sampleRate) * 1000, intervalMs: arrived - lastChunkAt, queueMs: Math.max(0, this.nextStart - this.context!.currentTime) * 1000 })\n lastChunkAt = arrived\n if (!played && continuation) this.nextStart += playback.segmentPauseMs / 1000\n await this.waitUntil(() => this.sources.size === 0 || this.nextStart - this.context!.currentTime <= 5, readerSignal)\n if (readerSignal.aborted) return false\n this.enqueue(samples, Number(event.sampleRate), playback.rate, trace, chunks === 1 && !continuation)\n if (!played) { played = true; onStart?.() }\n } else throw new Error('Host TTS 返回未知事件')\n }\n boundary = buffer.indexOf('\\n')\n }\n }\n } finally { await reader.cancel().catch(() => undefined); reader.releaseLock() }\n if (!completed || !played || buffer.trim() !== '') throw new Error('Host TTS 音频流未完整结束')\n trace('generated', { durationMs: performance.now() - started, chunks, audioMs, realTimeFactor: audioMs > 0 ? (performance.now() - started) / audioMs : 0 })\n return !readerSignal.aborted && sequence === this.sequence\n } catch (error) {\n trace('error', { aborted: readerSignal.aborted, durationMs: performance.now() - started, errorName: voiceDiagnosticError(error) })\n if (readerSignal.aborted || sequence !== this.sequence) return false\n this.cancel()\n throw error\n }\n }\n\n /** 文本队列耗尽后再等音频播完;取消旧轮次不会误清理新轮次的请求。 */\n async finish(): Promise<boolean> {\n const abort = this.abort\n if (abort === undefined) return true\n const sequence = this.sequence\n await this.waitUntil(() => this.sources.size === 0, abort.signal)\n if (this.abort === abort) this.abort = undefined\n return !abort.signal.aborted && sequence === this.sequence\n }\n\n cancel(): void {\n this.sequence++; this.abort?.abort(); this.abort = undefined\n for (const source of this.sources) { source.onended = null; try { source.stop() } catch { /* 已经播放完 */ } source.disconnect() }\n this.sources.clear(); this.nextStart = 0\n }\n\n dispose(): void { this.cancel(); this.gain?.disconnect(); this.gain = undefined; const context = this.context; this.context = undefined; void context?.close().catch(() => undefined) }\n\n private enqueue(samples: Float32Array, sampleRate: number, rate: number, trace: VoiceDiagnosticTrace, first: boolean): void {\n const context = this.context!\n // 最多保留 30 秒待播音频,让异常快速生成也不能无限积压浏览器内存。\n if (this.nextStart - context.currentTime > 30) throw new Error('MOSS 播放队列过长,请缩短文本')\n const buffer = context.createBuffer(1, samples.length, sampleRate)\n buffer.copyToChannel(samples as Float32Array<ArrayBuffer>, 0)\n const source = context.createBufferSource(); source.buffer = buffer; source.playbackRate.value = rate; source.connect(this.gain!)\n source.onended = () => { this.sources.delete(source); source.disconnect() }\n this.sources.add(source)\n const start = Math.max(context.currentTime + 0.02, this.nextStart)\n const gapMs = this.nextStart > 0 ? Math.max(0, context.currentTime - this.nextStart) * 1000 : 0\n trace('playback_scheduled', { gapMs, queueMs: (start - context.currentTime) * 1000, sourceCount: this.sources.size, contextState: context.state, muted: this.muted })\n if (first) trace('first_playback_scheduled', { queueMs: (start - context.currentTime) * 1000 })\n // 后一块按实际变速后的时长接续,避免调快时留空隙、调慢时相互重叠。\n source.start(start); this.nextStart = start + buffer.duration / rate\n }\n\n private async waitUntil(ready: () => boolean, signal: AbortSignal): Promise<void> {\n if (ready() || signal.aborted) return\n await new Promise<void>((resolve) => {\n let timer: ReturnType<typeof setTimeout> | undefined\n const finish = (): void => { if (timer !== undefined) clearTimeout(timer); signal.removeEventListener('abort', finish); resolve() }\n const check = (): void => { if (signal.aborted || ready()) finish(); else timer = setTimeout(check, 30) }\n signal.addEventListener('abort', finish, { once: true }); check()\n })\n }\n}\n\n/** PCM 固定为 48kHz、单声道、16 位小端,与 Host 工作进程协议一致。 */\nexport function decodeMossPcm(event: Record<string, unknown>): Float32Array {\n if (event.sampleRate !== 48_000 || typeof event.data !== 'string' || event.data.length > 1024 * 1024) throw new Error('Host TTS PCM 格式无效')\n const raw = atob(event.data)\n if (raw.length === 0 || raw.length % 2 !== 0) throw new Error('Host TTS PCM 长度无效')\n const samples = new Float32Array(raw.length / 2)\n for (let index = 0; index < samples.length; index++) {\n const value = raw.charCodeAt(index * 2) | raw.charCodeAt(index * 2 + 1) << 8\n samples[index] = (value >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;IAChF,IAAI,MAAM,KAAK,OAAO,SAAS;IAC/B,MAAM,IAAI,SAAe,YAAY;KACnC,IAAI;KACJ,MAAM,eAAqB;MAAE,IAAI,UAAU,KAAA,GAAW,aAAa,KAAK;MAAG,OAAO,oBAAoB,SAAS,MAAM;MAAG,QAAQ;KAAE;KAClI,MAAM,cAAoB;MAAE,IAAI,OAAO,WAAW,MAAM,GAAG,OAAO;WAAQ,QAAQ,WAAW,OAAO,EAAE;KAAE;KACxG,OAAO,iBAAiB,SAAS,QAAQ,EAAE,MAAM,KAAK,CAAC;KAAG,MAAM;IAClE,CAAC;GACH;EACF;;EAGA,SAAgB,cAAc,OAA8C;GAC1E,IAAI,MAAM,eAAe,QAAU,OAAO,MAAM,SAAS,YAAY,MAAM,KAAK,SAAS,SAAa,MAAM,IAAI,MAAM,mBAAmB;GACzI,MAAM,MAAM,KAAK,MAAM,IAAI;GAC3B,IAAI,IAAI,WAAW,KAAK,IAAI,SAAS,MAAM,GAAG,MAAM,IAAI,MAAM,mBAAmB;GACjF,MAAM,UAAU,IAAI,aAAa,IAAI,SAAS,CAAC;GAC/C,KAAK,IAAI,QAAQ,GAAG,QAAQ,QAAQ,QAAQ,SAAS;IACnD,MAAM,QAAQ,IAAI,WAAW,QAAQ,CAAC,IAAI,IAAI,WAAW,QAAQ,IAAI,CAAC,KAAK;IAC3E,QAAQ,UAAU,SAAS,QAAQ,QAAQ,QAAQ,SAAS;GAC9D;GACA,OAAO;EACT"}
|
|
@@ -7,21 +7,15 @@ window.__ModuleLoader__.load({
|
|
|
7
7
|
const require_assistant_notifications = require("@jingyi0605/codingns4dsh/client.assistant-notifications.js");
|
|
8
8
|
const require_session_translation = require("@jingyi0605/codingns4dsh/client.session-translation.js");
|
|
9
9
|
//#region src/shared/contracts/version.ts
|
|
10
|
-
/**
|
|
11
|
-
const DSH_VERSION = "0.2.1-
|
|
10
|
+
/** DSH verification target, synchronized with the root version.json. */
|
|
11
|
+
const DSH_VERSION = "0.2.1-rc.2";
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* alpha.2 用 `subagents.startActivation()` 取代 `startContinuable()`,由
|
|
18
|
-
* `subagent.activation` / `subagent.continuable` 两条能力路由分别探测,业务侧
|
|
19
|
-
* 经 `startNativeSubagent()` 归一化调用,因此同一个版本范围仍然成立。
|
|
20
|
-
*
|
|
21
|
-
* 这里保留明确上界,是为了让 npm/DSH 安装期也能识别 0.2.1-alpha.2 这个跨 patch
|
|
22
|
-
* 预发布版本;出现新的 API 世代或结构变化时,应重新验证并更新范围与能力路由。
|
|
13
|
+
* Supported hosts retain the 0.2.0-rc.2 floor and include 0.2.1-rc.2.
|
|
14
|
+
* Capability adapters preserve earlier subagent, peer and message contracts.
|
|
15
|
+
* Keep an explicit upper bound: a later prerelease requires verification before
|
|
16
|
+
* either installation checks or runtime capability selection may accept it.
|
|
23
17
|
*/
|
|
24
|
-
const DSH_COMPATIBILITY = ">=0.2.0-rc.2 <=0.2.1-
|
|
18
|
+
const DSH_COMPATIBILITY = ">=0.2.0-rc.2 <=0.2.1-rc.2";
|
|
25
19
|
/**
|
|
26
20
|
* 兼容范围下界,即插件仍然接受的最低 DSH 版本。
|
|
27
21
|
*
|
|
@@ -30,7 +24,7 @@ window.__ModuleLoader__.load({
|
|
|
30
24
|
* “不支持的 DSH 版本”,把仅仅缺少启动页注入的页面误判为宿主不兼容。
|
|
31
25
|
*/
|
|
32
26
|
function minimumSupportedDshVersion() {
|
|
33
|
-
return /^>=([^ ]+)/u.exec(">=0.2.0-rc.2 <=0.2.1-
|
|
27
|
+
return /^>=([^ ]+)/u.exec(">=0.2.0-rc.2 <=0.2.1-rc.2")?.[1] ?? "0.2.1-rc.2";
|
|
34
28
|
}
|
|
35
29
|
/** Host 注入到浏览器页面的真实 DSH 版本全局字段。 */
|
|
36
30
|
const CODINGNS_DSH_VERSION_GLOBAL = "__CODINGNS_DSH_VERSION__";
|
|
@@ -39,7 +33,7 @@ window.__ModuleLoader__.load({
|
|
|
39
33
|
return /^0\.1\.5(?:-|$)/u.test(version);
|
|
40
34
|
}
|
|
41
35
|
/** Codingns4DSH 插件自身的 npm 版本。 */
|
|
42
|
-
const CODINGNS_VERSION = "0.2.1-
|
|
36
|
+
const CODINGNS_VERSION = "0.2.1-rc.2";
|
|
43
37
|
/** 判断宿主版本是否落在当前插件声明的 DSH 兼容范围内;范围省略上界时不校验上限。 */
|
|
44
38
|
function isDshVersionCompatible(version) {
|
|
45
39
|
const match = /^>=([^ ]+)(?: <=([^ ]+))?$/u.exec(DSH_COMPATIBILITY);
|
|
@@ -97,6 +91,36 @@ window.__ModuleLoader__.load({
|
|
|
97
91
|
return 0;
|
|
98
92
|
}
|
|
99
93
|
//#endregion
|
|
94
|
+
//#region src/shared/contracts/git.ts
|
|
95
|
+
const DEFAULT_GIT_MANAGEMENT_SETTINGS = {
|
|
96
|
+
commitMessageEnabled: true,
|
|
97
|
+
commitMessageDetail: "concise",
|
|
98
|
+
commitMessageModels: [],
|
|
99
|
+
commitMessagePrompt: ""
|
|
100
|
+
};
|
|
101
|
+
const MAX_GIT_COMMIT_MESSAGE_CHARS = 1e4;
|
|
102
|
+
const MAX_GIT_COMMIT_PROMPT_CHARS = 1e4;
|
|
103
|
+
function normalizeGitManagementSettings(value) {
|
|
104
|
+
const seen = /* @__PURE__ */ new Set();
|
|
105
|
+
return {
|
|
106
|
+
commitMessageEnabled: value?.commitMessageEnabled !== false,
|
|
107
|
+
commitMessageDetail: value?.commitMessageDetail === "detailed" ? "detailed" : "concise",
|
|
108
|
+
commitMessagePrompt: typeof value?.commitMessagePrompt === "string" ? value.commitMessagePrompt : "",
|
|
109
|
+
commitMessageModels: (value?.commitMessageModels ?? []).flatMap((item) => {
|
|
110
|
+
const provider = item?.provider?.trim();
|
|
111
|
+
const model = item?.model?.trim();
|
|
112
|
+
if (!provider || !model) return [];
|
|
113
|
+
const key = JSON.stringify([provider, model]);
|
|
114
|
+
if (seen.has(key)) return [];
|
|
115
|
+
seen.add(key);
|
|
116
|
+
return [{
|
|
117
|
+
provider,
|
|
118
|
+
model
|
|
119
|
+
}];
|
|
120
|
+
})
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
100
124
|
//#region src/shared/contracts/config.ts
|
|
101
125
|
const DEFAULT_ASSISTANT_VOICE_SETTINGS = {
|
|
102
126
|
initialized: false,
|
|
@@ -285,6 +309,7 @@ window.__ModuleLoader__.load({
|
|
|
285
309
|
const CODINGNS_MOBILE_ACCESS_FIELD = "mobileAccess";
|
|
286
310
|
const CODINGNS_SUBSCRIPTION_USAGE_FIELD = "subscriptionUsage";
|
|
287
311
|
const CODINGNS_SESSION_TRANSLATION_FIELD = "sessionTranslation";
|
|
312
|
+
const CODINGNS_GIT_MANAGEMENT_FIELD = "gitManagement";
|
|
288
313
|
const CODINGNS_ASSISTANT_FIELD = "assistant";
|
|
289
314
|
const DEFAULT_CODINGNS_CONTROL_BASE_URL = "https://channel.codingns.com:1443";
|
|
290
315
|
const DEFAULT_CODINGNS_CONTROL_BASE_URLS = [DEFAULT_CODINGNS_CONTROL_BASE_URL];
|
|
@@ -329,6 +354,7 @@ window.__ModuleLoader__.load({
|
|
|
329
354
|
agentAdapterPreferences: {},
|
|
330
355
|
subagentBridge: DEFAULT_SUBAGENT_BRIDGE_SETTINGS,
|
|
331
356
|
sessionTranslation: require_session_translation.DEFAULT_SESSION_TRANSLATION_SETTINGS,
|
|
357
|
+
gitManagement: DEFAULT_GIT_MANAGEMENT_SETTINGS,
|
|
332
358
|
terminalEnhancement: DEFAULT_TERMINAL_ENHANCEMENT_SETTINGS,
|
|
333
359
|
workspaceSessionEnhancement: DEFAULT_WORKSPACE_SESSION_ENHANCEMENT_SETTINGS,
|
|
334
360
|
fileManagement: DEFAULT_FILE_MANAGEMENT_SETTINGS,
|
|
@@ -485,6 +511,12 @@ window.__ModuleLoader__.load({
|
|
|
485
511
|
return CODINGNS_FILE_MANAGEMENT_FIELD;
|
|
486
512
|
}
|
|
487
513
|
});
|
|
514
|
+
Object.defineProperty(exports, "CODINGNS_GIT_MANAGEMENT_FIELD", {
|
|
515
|
+
enumerable: true,
|
|
516
|
+
get: function() {
|
|
517
|
+
return CODINGNS_GIT_MANAGEMENT_FIELD;
|
|
518
|
+
}
|
|
519
|
+
});
|
|
488
520
|
Object.defineProperty(exports, "CODINGNS_H5_LOGIN_URL", {
|
|
489
521
|
enumerable: true,
|
|
490
522
|
get: function() {
|
|
@@ -629,6 +661,18 @@ window.__ModuleLoader__.load({
|
|
|
629
661
|
return DSH_VERSION;
|
|
630
662
|
}
|
|
631
663
|
});
|
|
664
|
+
Object.defineProperty(exports, "MAX_GIT_COMMIT_MESSAGE_CHARS", {
|
|
665
|
+
enumerable: true,
|
|
666
|
+
get: function() {
|
|
667
|
+
return MAX_GIT_COMMIT_MESSAGE_CHARS;
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
Object.defineProperty(exports, "MAX_GIT_COMMIT_PROMPT_CHARS", {
|
|
671
|
+
enumerable: true,
|
|
672
|
+
get: function() {
|
|
673
|
+
return MAX_GIT_COMMIT_PROMPT_CHARS;
|
|
674
|
+
}
|
|
675
|
+
});
|
|
632
676
|
Object.defineProperty(exports, "MOBILE_VIEWPORT_MAX_PX_LIMITS", {
|
|
633
677
|
enumerable: true,
|
|
634
678
|
get: function() {
|
|
@@ -701,6 +745,12 @@ window.__ModuleLoader__.load({
|
|
|
701
745
|
return minimumSupportedDshVersion;
|
|
702
746
|
}
|
|
703
747
|
});
|
|
748
|
+
Object.defineProperty(exports, "normalizeGitManagementSettings", {
|
|
749
|
+
enumerable: true,
|
|
750
|
+
get: function() {
|
|
751
|
+
return normalizeGitManagementSettings;
|
|
752
|
+
}
|
|
753
|
+
});
|
|
704
754
|
Object.defineProperty(exports, "normalizeLanAccessDshPwaSettings", {
|
|
705
755
|
enumerable: true,
|
|
706
756
|
get: function() {
|