@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,227 @@
|
|
|
1
|
+
import { isSessionTranslationInputEnabled } from './session-translation-service.js';
|
|
2
|
+
import { SessionTranslationCancelled } from './session-translation-recovery.js';
|
|
3
|
+
import { createTranslationQueue, translationFailure } from './session-translation-runtime.js';
|
|
4
|
+
import { localizeAgentSubagentDescription } from '../cli-adapters/subagent-tool-descriptions.js';
|
|
5
|
+
const schemaMaps = new Set(['properties', 'patternProperties', '$defs', 'definitions', 'dependentSchemas']);
|
|
6
|
+
const schemaChildren = new Set(['items', 'additionalProperties', 'additionalItems', 'contains', 'not', 'if', 'then', 'else', 'propertyNames', 'unevaluatedProperties', 'unevaluatedItems']);
|
|
7
|
+
const schemaLists = new Set(['allOf', 'anyOf', 'oneOf', 'prefixItems']);
|
|
8
|
+
const isRecord = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
9
|
+
class PromptTranslationInvalidated extends Error {
|
|
10
|
+
}
|
|
11
|
+
/** Translates host-owned prose; shared schemas, provenance, and execution data stay immutable. */
|
|
12
|
+
export function createSessionPromptTranslation(service, adapterFor) {
|
|
13
|
+
const lifetime = new AbortController();
|
|
14
|
+
const queue = createTranslationQueue(4);
|
|
15
|
+
const cache = new Map();
|
|
16
|
+
const controllers = new Set();
|
|
17
|
+
let cacheSize = 0;
|
|
18
|
+
const clear = () => { cache.clear(); cacheSize = 0; };
|
|
19
|
+
const removeDeactivate = service?.onDeactivate?.(() => {
|
|
20
|
+
clear();
|
|
21
|
+
for (const controller of controllers)
|
|
22
|
+
controller.abort(new PromptTranslationInvalidated());
|
|
23
|
+
});
|
|
24
|
+
const settingsKey = () => JSON.stringify([service?.cacheKey, service?.inputLanguage]);
|
|
25
|
+
let currentKey = settingsKey();
|
|
26
|
+
async function run(scope, original, transform) {
|
|
27
|
+
const adapterId = adapterFor(scope.sessionId);
|
|
28
|
+
if (service === undefined || !service.enabled || scope.subagent || adapterId === undefined || !isSessionTranslationInputEnabled(service, adapterId))
|
|
29
|
+
return original;
|
|
30
|
+
const generation = settingsKey();
|
|
31
|
+
if (generation !== currentKey) {
|
|
32
|
+
clear();
|
|
33
|
+
currentKey = generation;
|
|
34
|
+
}
|
|
35
|
+
const controller = new AbortController();
|
|
36
|
+
controllers.add(controller);
|
|
37
|
+
const signal = AbortSignal.any([lifetime.signal, controller.signal, ...(scope.signal === undefined ? [] : [scope.signal])]);
|
|
38
|
+
const pending = new Map();
|
|
39
|
+
let failed = false;
|
|
40
|
+
const translate = (text, protection = {}) => {
|
|
41
|
+
// Unused workspace/tool literals cannot affect protection, and must not
|
|
42
|
+
// prevent identical descriptions from sharing a translation.
|
|
43
|
+
const options = { ...protection, literals: [...new Set([...scope.literals, ...(protection.literals ?? [])])]
|
|
44
|
+
.filter(literal => literal !== '' && text.includes(literal)).sort() };
|
|
45
|
+
const key = JSON.stringify([generation, adapterId, text, options]);
|
|
46
|
+
const previous = cache.get(key);
|
|
47
|
+
if (previous !== undefined)
|
|
48
|
+
return Promise.resolve(previous);
|
|
49
|
+
const active = pending.get(key);
|
|
50
|
+
if (active !== undefined)
|
|
51
|
+
return active;
|
|
52
|
+
const request = queue.run(async () => {
|
|
53
|
+
const fallback = { original: text, translated: text, targetLanguage: service.inputLanguage ?? 'en', bilingual: false };
|
|
54
|
+
// Internal descriptions never become pending user messages. Stop queued
|
|
55
|
+
// attempts after a failure instead of prompting for every schema field.
|
|
56
|
+
if (failed)
|
|
57
|
+
return { ...fallback, failed: true };
|
|
58
|
+
const ready = cache.get(key);
|
|
59
|
+
if (ready !== undefined)
|
|
60
|
+
return ready;
|
|
61
|
+
let result;
|
|
62
|
+
try {
|
|
63
|
+
result = { ...fallback, ...(service.translateInputDetailed !== undefined
|
|
64
|
+
? await service.translateInputDetailed(adapterId, text, signal, true, options)
|
|
65
|
+
: { translated: await service.translateInput(adapterId, text, signal, true, options) }) };
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
result = { ...fallback, failed: true, failure: translationFailure(error, signal) };
|
|
69
|
+
}
|
|
70
|
+
signal.throwIfAborted();
|
|
71
|
+
if (generation !== settingsKey() || adapterFor(scope.sessionId) !== adapterId || !service.enabled)
|
|
72
|
+
throw new PromptTranslationInvalidated();
|
|
73
|
+
if (result.failed) {
|
|
74
|
+
failed = true;
|
|
75
|
+
return { ...result, translated: text };
|
|
76
|
+
}
|
|
77
|
+
if (!result.failed && service.cacheKey !== undefined) {
|
|
78
|
+
const size = key.length + result.original.length + result.translated.length;
|
|
79
|
+
if (size <= 1_000_000) {
|
|
80
|
+
while (cache.size >= 256 || cacheSize + size > 1_000_000) {
|
|
81
|
+
const first = cache.entries().next().value;
|
|
82
|
+
if (first === undefined)
|
|
83
|
+
break;
|
|
84
|
+
cache.delete(first[0]);
|
|
85
|
+
cacheSize -= first[0].length + first[1].original.length + first[1].translated.length;
|
|
86
|
+
}
|
|
87
|
+
// Another session may have completed the same field while this one was running.
|
|
88
|
+
if (!cache.has(key)) {
|
|
89
|
+
cache.set(key, result);
|
|
90
|
+
cacheSize += size;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return result;
|
|
95
|
+
}, signal);
|
|
96
|
+
pending.set(key, request);
|
|
97
|
+
return request;
|
|
98
|
+
};
|
|
99
|
+
try {
|
|
100
|
+
signal.throwIfAborted();
|
|
101
|
+
const result = await transform(translate);
|
|
102
|
+
signal.throwIfAborted();
|
|
103
|
+
if (generation !== settingsKey() || adapterFor(scope.sessionId) !== adapterId || !service.enabled)
|
|
104
|
+
throw new PromptTranslationInvalidated();
|
|
105
|
+
return result;
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
controller.abort(error);
|
|
109
|
+
lifetime.signal.throwIfAborted();
|
|
110
|
+
scope.signal?.throwIfAborted();
|
|
111
|
+
// Internal prose translation is optional. Discard a stale translation as
|
|
112
|
+
// a whole; only the Agent's own cancellation may stop its accepted work.
|
|
113
|
+
if (error instanceof PromptTranslationInvalidated)
|
|
114
|
+
return original;
|
|
115
|
+
throw error;
|
|
116
|
+
}
|
|
117
|
+
finally {
|
|
118
|
+
controllers.delete(controller);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
dispose() { lifetime.abort(new SessionTranslationCancelled()); clear(); removeDeactivate?.(); },
|
|
123
|
+
translateAssembly(assembly, scope) {
|
|
124
|
+
return run(scope, assembly, async (translate) => {
|
|
125
|
+
const [sections, tools] = await Promise.all([
|
|
126
|
+
Promise.all(assembly.sections.map(async (section) => ({
|
|
127
|
+
...section, text: (await translate(section.text, { promptMarkup: true })).translated,
|
|
128
|
+
}))),
|
|
129
|
+
Promise.all(assembly.tools.map(async (tool) => {
|
|
130
|
+
const literals = [tool.name, ...schemaLiterals(tool.parameters)];
|
|
131
|
+
const translateDescription = async (text) => {
|
|
132
|
+
const localized = service?.inputLanguage === 'en' && service.customRulesEnabled === false
|
|
133
|
+
? localizeAgentSubagentDescription(tool.name, text) : undefined;
|
|
134
|
+
// A downstream schema can introduce additional protected values.
|
|
135
|
+
// Keep those on the normal placeholder-preserving translation path.
|
|
136
|
+
if (localized !== undefined && [...scope.literals, ...literals].every(literal => !text.includes(literal) || localized.includes(literal)))
|
|
137
|
+
return localized;
|
|
138
|
+
return (await translate(text, { literals })).translated;
|
|
139
|
+
};
|
|
140
|
+
const [description, parameters] = await Promise.all([
|
|
141
|
+
tool.description === undefined ? undefined : translateDescription(tool.description),
|
|
142
|
+
tool.parameters === undefined ? undefined : translateSchema(tool.parameters, translateDescription),
|
|
143
|
+
]);
|
|
144
|
+
return {
|
|
145
|
+
...tool,
|
|
146
|
+
...(description === undefined ? {} : { description }),
|
|
147
|
+
...(tool.parameters === undefined ? {} : { parameters }),
|
|
148
|
+
};
|
|
149
|
+
})),
|
|
150
|
+
]);
|
|
151
|
+
return { ...assembly, sections, tools };
|
|
152
|
+
});
|
|
153
|
+
},
|
|
154
|
+
translateMessages(messages, scope) {
|
|
155
|
+
return run(scope, messages, async (translate) => Promise.all(messages.map(async (message) => {
|
|
156
|
+
const source = message.source;
|
|
157
|
+
if (source?.kind !== 'skill-catalog' && source?.kind !== 'agent-instructions')
|
|
158
|
+
return message;
|
|
159
|
+
const audit = isRecord(source.codingnsTranslationContext) ? source.codingnsTranslationContext : undefined;
|
|
160
|
+
const originalContent = audit?.originalContent ?? message.content;
|
|
161
|
+
const literals = sourceLiterals(source);
|
|
162
|
+
const records = [];
|
|
163
|
+
const text = async (original) => {
|
|
164
|
+
const record = await translate(original, { literals, promptMarkup: true });
|
|
165
|
+
records.push(record);
|
|
166
|
+
return record.translated;
|
|
167
|
+
};
|
|
168
|
+
const content = typeof originalContent === 'string' ? await text(originalContent)
|
|
169
|
+
: Array.isArray(originalContent) ? await Promise.all(originalContent.map(async (block) => isRecord(block) && block.type === 'text' && typeof block.text === 'string'
|
|
170
|
+
? { ...block, text: await text(block.text) } : block)) : originalContent;
|
|
171
|
+
if (records.length === 0)
|
|
172
|
+
return message;
|
|
173
|
+
return { ...message, content, source: { ...source, codingnsTranslationContext: { originalContent, records } } };
|
|
174
|
+
})));
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
function sourceLiterals(source) {
|
|
179
|
+
const values = [];
|
|
180
|
+
for (const field of ['entries', 'changes']) {
|
|
181
|
+
const entries = source[field];
|
|
182
|
+
if (!Array.isArray(entries))
|
|
183
|
+
continue;
|
|
184
|
+
for (const entry of entries)
|
|
185
|
+
if (isRecord(entry))
|
|
186
|
+
for (const key of ['name', 'path']) {
|
|
187
|
+
if (typeof entry[key] === 'string')
|
|
188
|
+
values.push(entry[key]);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return values;
|
|
192
|
+
}
|
|
193
|
+
/** Walk schema positions only; objects inside enum/default/examples are application data. */
|
|
194
|
+
async function translateSchema(value, translate) {
|
|
195
|
+
if (Array.isArray(value))
|
|
196
|
+
return Promise.all(value.map(child => translateSchema(child, translate)));
|
|
197
|
+
if (!isRecord(value))
|
|
198
|
+
return value;
|
|
199
|
+
const entries = await Promise.all(Object.entries(value).map(async ([key, child]) => {
|
|
200
|
+
if (key === 'description' && typeof child === 'string')
|
|
201
|
+
return [key, await translate(child)];
|
|
202
|
+
if (schemaMaps.has(key) && isRecord(child))
|
|
203
|
+
return [key, Object.fromEntries(await Promise.all(Object.entries(child).map(async ([name, schema]) => [name, await translateSchema(schema, translate)])))];
|
|
204
|
+
if (schemaChildren.has(key) || schemaLists.has(key))
|
|
205
|
+
return [key, await translateSchema(child, translate)];
|
|
206
|
+
return [key, child];
|
|
207
|
+
}));
|
|
208
|
+
return Object.fromEntries(entries);
|
|
209
|
+
}
|
|
210
|
+
function schemaLiterals(value) {
|
|
211
|
+
if (Array.isArray(value))
|
|
212
|
+
return value.flatMap(schemaLiterals);
|
|
213
|
+
if (!isRecord(value))
|
|
214
|
+
return [];
|
|
215
|
+
return Object.entries(value).flatMap(([key, child]) => {
|
|
216
|
+
if (schemaMaps.has(key) && isRecord(child))
|
|
217
|
+
return [...Object.keys(child), ...Object.values(child).flatMap(schemaLiterals)];
|
|
218
|
+
if (schemaChildren.has(key) || schemaLists.has(key))
|
|
219
|
+
return schemaLiterals(child);
|
|
220
|
+
if (key === 'enum' && Array.isArray(child))
|
|
221
|
+
return child.filter((item) => typeof item === 'string');
|
|
222
|
+
if (key === 'const' && typeof child === 'string')
|
|
223
|
+
return [child];
|
|
224
|
+
return [];
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
//# sourceMappingURL=session-prompt-translation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-prompt-translation.js","sourceRoot":"","sources":["../../../../../src/host/features/session-prompt-translation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gCAAgC,EAAkC,MAAM,kCAAkC,CAAA;AACnH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAA;AAC/E,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAE7F,OAAO,EAAE,gCAAgC,EAAE,MAAM,+CAA+C,CAAA;AAEhG,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,mBAAmB,EAAE,OAAO,EAAE,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAAA;AAC3G,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,uBAAuB,EAAE,kBAAkB,CAAC,CAAC,CAAA;AAC3L,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAA;AACvE,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAoC,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KA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AAK,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAA;QAC3H,IAAI,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,cAAc,CAAC,KAAK,CAAC,CAAA;QACjF,IAAI,GAAG,KAAK,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAA;QACnH,IAAI,GAAG,KAAK,OAAO,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,CAAC,KAAK,CAAC,CAAA;QAChE,OAAO,EAAE,CAAA;IACX,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface TextProtectionOptions {
|
|
2
|
+
readonly literals?: readonly string[];
|
|
3
|
+
/** Only host-owned prompt messages may expose prose inside these known wrappers. */
|
|
4
|
+
readonly promptMarkup?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Numbers, dates, and numeric expressions have no prose to translate. */
|
|
7
|
+
export declare function isLanguageNeutralText(value: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* 只由代码标识符组成的文本(如 `STAGE0_INITIAL_OK`、`sourceLanguage`、`Node.js`、`9fd2d5d`)
|
|
10
|
+
* 没有可翻译的自然语言。模型会按保留规则原样返回,再按目标语言校验就会被误判为失败。
|
|
11
|
+
* 普通单词(如 `OK`、`Done`)不属于标识符,仍交给翻译模型处理。
|
|
12
|
+
*/
|
|
13
|
+
export declare function isCodeIdentifierText(value: string): boolean;
|
|
14
|
+
/** Keep source slices locally; only placeholders and prose reach the translation model. */
|
|
15
|
+
export declare function protectText(value: string, options?: TextProtectionOptions): {
|
|
16
|
+
readonly text: string;
|
|
17
|
+
readonly values: readonly string[];
|
|
18
|
+
};
|
|
19
|
+
export declare function stripPlaceholders(value: string): string;
|
|
20
|
+
/** Missing, duplicated, or unknown markers invalidate the response instead of corrupting code. */
|
|
21
|
+
export declare function restoreText(value: string, values: readonly string[]): string;
|
|
22
|
+
//# sourceMappingURL=session-translation-protection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-translation-protection.d.ts","sourceRoot":"","sources":["../../../../../src/host/features/session-translation-protection.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACrC,oFAAoF;IACpF,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAChC;AAED,0EAA0E;AAC1E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAO3D;AAUD,2FAA2F;AAC3F,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAoD7I;AA4FD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAa5E"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { fromMarkdown } from 'mdast-util-from-markdown';
|
|
2
|
+
const voidElements = new Set('area base br col embed hr img input link meta param source track wbr'.split(' '));
|
|
3
|
+
const promptWrappers = new Set(['system-reminder', 'available_skills']);
|
|
4
|
+
/** Numbers, dates, and numeric expressions have no prose to translate. */
|
|
5
|
+
export function isLanguageNeutralText(value) {
|
|
6
|
+
return /\p{N}/u.test(value) && /^[\p{N}\p{P}\p{S}\s]+$/u.test(value);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 只由代码标识符组成的文本(如 `STAGE0_INITIAL_OK`、`sourceLanguage`、`Node.js`、`9fd2d5d`)
|
|
10
|
+
* 没有可翻译的自然语言。模型会按保留规则原样返回,再按目标语言校验就会被误判为失败。
|
|
11
|
+
* 普通单词(如 `OK`、`Done`)不属于标识符,仍交给翻译模型处理。
|
|
12
|
+
*/
|
|
13
|
+
export function isCodeIdentifierText(value) {
|
|
14
|
+
const tokens = value.trim().split(/\s+/u)
|
|
15
|
+
.map(token => token.replace(/^["'`([{「“‘]+|["'`)\]}」”’.,;:!?。,;:!?]+$/gu, ''))
|
|
16
|
+
.filter(token => token !== '');
|
|
17
|
+
return tokens.length > 0
|
|
18
|
+
&& tokens.some(token => /\p{L}/u.test(token))
|
|
19
|
+
&& tokens.every(token => isLanguageNeutralText(token) || isCodeIdentifier(token));
|
|
20
|
+
}
|
|
21
|
+
function isCodeIdentifier(token) {
|
|
22
|
+
if (!/^[A-Za-z0-9_.-]+$/u.test(token) || !/[A-Za-z]/u.test(token))
|
|
23
|
+
return false;
|
|
24
|
+
return /_/u.test(token)
|
|
25
|
+
|| /\d/u.test(token)
|
|
26
|
+
|| /^[a-z]+(?:[A-Z][a-z0-9]*)+$/u.test(token)
|
|
27
|
+
|| /^[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)+$/u.test(token);
|
|
28
|
+
}
|
|
29
|
+
/** Keep source slices locally; only placeholders and prose reach the translation model. */
|
|
30
|
+
export function protectText(value, options = {}) {
|
|
31
|
+
const knownRanges = [];
|
|
32
|
+
for (const literal of options.literals ?? []) {
|
|
33
|
+
if (literal === '')
|
|
34
|
+
continue;
|
|
35
|
+
const identifier = /^[A-Za-z_][A-Za-z0-9_.-]*$/u.test(literal);
|
|
36
|
+
const partOfToken = (character) => character !== undefined && /[A-Za-z0-9_.\\/-]/u.test(character);
|
|
37
|
+
let start = value.indexOf(literal);
|
|
38
|
+
while (start >= 0) {
|
|
39
|
+
const end = start + literal.length;
|
|
40
|
+
if (!identifier || !partOfToken(value[start - 1]) && !partOfToken(value[end]))
|
|
41
|
+
knownRanges.push({ start, end });
|
|
42
|
+
start = value.indexOf(literal, start + literal.length);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
let ranges = [];
|
|
46
|
+
const blocks = [];
|
|
47
|
+
const visit = (node) => {
|
|
48
|
+
if (node.type === 'code' || node.type === 'inlineCode') {
|
|
49
|
+
const start = node.position?.start.offset;
|
|
50
|
+
const end = node.position?.end.offset;
|
|
51
|
+
if (start !== undefined && end !== undefined) {
|
|
52
|
+
ranges.push({ start, end });
|
|
53
|
+
if (node.type === 'code')
|
|
54
|
+
blocks.push({ start, end });
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else if ('children' in node) {
|
|
58
|
+
for (const child of node.children)
|
|
59
|
+
visit(child);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
visit(fromMarkdown(value));
|
|
63
|
+
// JSON strings may contain backticks; their enclosing document owns those spans.
|
|
64
|
+
ranges = mergeRanges([...ranges, ...collectInGaps(value, blocks, jsonRanges)]);
|
|
65
|
+
let markupSource = '';
|
|
66
|
+
let cursor = 0;
|
|
67
|
+
for (const range of ranges) {
|
|
68
|
+
// Keep offsets while hiding tags inside code. An outer element can still enclose code.
|
|
69
|
+
markupSource += value.slice(cursor, range.start) + value.slice(range.start, range.end).replace(/[^\r\n]/g, ' ');
|
|
70
|
+
cursor = range.end;
|
|
71
|
+
}
|
|
72
|
+
markupSource += value.slice(cursor);
|
|
73
|
+
ranges = mergeRanges([...ranges, ...markupRanges(markupSource, options.promptMarkup === true)]);
|
|
74
|
+
// Merge known values after recognizing whole paths so a known cwd cannot split a longer path.
|
|
75
|
+
ranges = mergeRanges([...ranges, ...knownRanges, ...collectInGaps(value, ranges, literalRanges)]);
|
|
76
|
+
const values = [];
|
|
77
|
+
let text = '';
|
|
78
|
+
cursor = 0;
|
|
79
|
+
for (const range of ranges) {
|
|
80
|
+
text += value.slice(cursor, range.start) + `@@CODINGNS_TRANSLATION_${values.length}@@`;
|
|
81
|
+
values.push(value.slice(range.start, range.end));
|
|
82
|
+
cursor = range.end;
|
|
83
|
+
}
|
|
84
|
+
return { text: text + value.slice(cursor), values };
|
|
85
|
+
}
|
|
86
|
+
function collectInGaps(value, ranges, collect) {
|
|
87
|
+
const additions = [];
|
|
88
|
+
let cursor = 0;
|
|
89
|
+
for (const range of [...ranges, { start: value.length, end: value.length }]) {
|
|
90
|
+
for (const item of collect(value.slice(cursor, range.start))) {
|
|
91
|
+
additions.push({ start: cursor + item.start, end: cursor + item.end });
|
|
92
|
+
}
|
|
93
|
+
cursor = range.end;
|
|
94
|
+
}
|
|
95
|
+
return additions;
|
|
96
|
+
}
|
|
97
|
+
function mergeRanges(ranges) {
|
|
98
|
+
const merged = [];
|
|
99
|
+
for (const range of ranges.sort((left, right) => left.start - right.start || right.end - left.end)) {
|
|
100
|
+
const last = merged.at(-1);
|
|
101
|
+
if (last === undefined || range.start >= last.end)
|
|
102
|
+
merged.push(range);
|
|
103
|
+
else if (range.end > last.end)
|
|
104
|
+
merged[merged.length - 1] = { start: last.start, end: range.end };
|
|
105
|
+
}
|
|
106
|
+
return merged;
|
|
107
|
+
}
|
|
108
|
+
/** Match whole paired elements, including their text, without consuming adjacent prose. */
|
|
109
|
+
function markupRanges(value, promptMarkup) {
|
|
110
|
+
const ranges = [];
|
|
111
|
+
const stack = [];
|
|
112
|
+
const tags = /<!--[\s\S]*?-->|<!\[CDATA\[[\s\S]*?\]\]>|<\?[\s\S]*?\?>|<!DOCTYPE(?:[^>"']|"[^"]*"|'[^']*')*>|<\/?([\p{L}_][\p{L}\p{N}_:.-]*)(?=[\s/>])(?:[^<>"']|"[^"]*"|'[^']*')*>/giu;
|
|
113
|
+
for (const match of value.matchAll(tags)) {
|
|
114
|
+
const tag = match[0];
|
|
115
|
+
const name = match[1]?.toLowerCase();
|
|
116
|
+
const end = match.index + tag.length;
|
|
117
|
+
ranges.push({ start: match.index, end });
|
|
118
|
+
if (name === undefined)
|
|
119
|
+
continue;
|
|
120
|
+
if (promptMarkup && promptWrappers.has(name))
|
|
121
|
+
continue;
|
|
122
|
+
if (tag.startsWith('</')) {
|
|
123
|
+
let opening = stack.length - 1;
|
|
124
|
+
while (opening >= 0 && stack[opening].name !== name)
|
|
125
|
+
opening--;
|
|
126
|
+
if (opening >= 0) {
|
|
127
|
+
ranges.push({ start: stack[opening].start, end });
|
|
128
|
+
stack.length = opening;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else if (!voidElements.has(name) && !tag.endsWith('/>')) {
|
|
132
|
+
stack.push({ name, start: match.index });
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return ranges;
|
|
136
|
+
}
|
|
137
|
+
/** Only valid JSON objects/arrays qualify; ordinary braces and Markdown links remain prose. */
|
|
138
|
+
function jsonRanges(value) {
|
|
139
|
+
const ranges = [];
|
|
140
|
+
let start = -1;
|
|
141
|
+
let quoted = false;
|
|
142
|
+
const stack = [];
|
|
143
|
+
for (let index = 0; index < value.length; index++) {
|
|
144
|
+
const character = value[index];
|
|
145
|
+
if (start < 0) {
|
|
146
|
+
if (character !== '{' && character !== '[')
|
|
147
|
+
continue;
|
|
148
|
+
start = index;
|
|
149
|
+
}
|
|
150
|
+
if (quoted) {
|
|
151
|
+
if (character === '\\')
|
|
152
|
+
index++;
|
|
153
|
+
else if (character === '"')
|
|
154
|
+
quoted = false;
|
|
155
|
+
}
|
|
156
|
+
else if (character === '"')
|
|
157
|
+
quoted = true;
|
|
158
|
+
else if (character === '{' || character === '[')
|
|
159
|
+
stack.push(character);
|
|
160
|
+
else if (character === '}' || character === ']') {
|
|
161
|
+
const opening = stack.pop();
|
|
162
|
+
if ((character === '}' ? '{' : '[') !== opening)
|
|
163
|
+
stack.length = 0;
|
|
164
|
+
if (stack.length === 0) {
|
|
165
|
+
try {
|
|
166
|
+
JSON.parse(value.slice(start, index + 1));
|
|
167
|
+
ranges.push({ start, end: index + 1 });
|
|
168
|
+
}
|
|
169
|
+
catch { /* An invalid candidate remains translatable text. */ }
|
|
170
|
+
start = -1;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return ranges;
|
|
175
|
+
}
|
|
176
|
+
function literalRanges(value) {
|
|
177
|
+
const ranges = [];
|
|
178
|
+
const literals = /@@CODINGNS_TRANSLATION_\d+@@|\{\{[a-z][a-z0-9_]*\}\}|(?:https?|file):\/\/[^\s)]+|["'「](?:[~/]|\.\.?\/|[A-Za-z]:[\\/])[^"'」\r\n]+["'」]|(?<![\p{L}\p{N}_])(?:~\/|\.\.?\/|\/|\\\\|[A-Za-z]:[\\/]|(?:[\p{L}\p{N}_.-]+[\\/])+)[^\s"'<>「」]+|(?:^|\n)[ \t]*(?:[$>#]\s+|(?:npm|pnpm|yarn|bun|git|node|python|python3|cargo|docker|kubectl|curl|ssh|chmod|chown|mkdir|rmdir|rm|cp|mv|ls|cat|echo|export|make)\s+)[^\n]+/gimu;
|
|
179
|
+
for (const match of value.matchAll(literals)) {
|
|
180
|
+
const leadingSpace = match[0].length - match[0].trimStart().length;
|
|
181
|
+
ranges.push({ start: match.index + leadingSpace, end: match.index + match[0].length });
|
|
182
|
+
}
|
|
183
|
+
return ranges;
|
|
184
|
+
}
|
|
185
|
+
export function stripPlaceholders(value) {
|
|
186
|
+
return value.replace(/@@CODINGNS_TRANSLATION_\d+@@/gu, ' ');
|
|
187
|
+
}
|
|
188
|
+
/** Missing, duplicated, or unknown markers invalidate the response instead of corrupting code. */
|
|
189
|
+
export function restoreText(value, values) {
|
|
190
|
+
const seen = new Set();
|
|
191
|
+
const restored = value.replace(/@@CODINGNS_TRANSLATION_(\d+)@@/gu, (match, index) => {
|
|
192
|
+
const position = Number(index);
|
|
193
|
+
const original = values[position];
|
|
194
|
+
if (original === undefined || seen.has(position) || match !== `@@CODINGNS_TRANSLATION_${position}@@`) {
|
|
195
|
+
throw new Error('translation changed protected text placeholders');
|
|
196
|
+
}
|
|
197
|
+
seen.add(position);
|
|
198
|
+
return original;
|
|
199
|
+
});
|
|
200
|
+
if (seen.size !== values.length)
|
|
201
|
+
throw new Error('translation omitted protected text placeholders');
|
|
202
|
+
return restored;
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingURL=session-translation-protection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-translation-protection.js","sourceRoot":"","sources":["../../../../../src/host/features/session-translation-protection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQvD,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,sEAAsE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;AAC/G,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC,CAAA;AAQvE,0EAA0E;AAC1E,MAAM,UAAU,qBAAqB,CAAC,KAAa;IACjD,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACtE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;SACtC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,4CAA4C,EAAE,EAAE,CAAC,CAAC;SAC7E,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAA;IAChC,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC;WACnB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,C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AAO,KAAK,CAAC,OAAO,CAAC,gCAAgC,EAAE,GAAG,CAAC,CAAA;AAC7D,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,MAAyB;IAClE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAA;IAC9B,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,kCAAkC,EAAE,CAAC,KAAK,EAAE,KAAa,EAAE,EAAE;QAC1F,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;QAC9B,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;QACjC,IAAI,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,KAAK,KAAK,0BAA0B,QAAQ,IAAI,EAAE,CAAC;YACrG,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAA;QACpE,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAClB,OAAO,QAAQ,CAAA;IACjB,CAAC,CAAC,CAAA;IACF,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAA;IACnG,OAAO,QAAQ,CAAA;AACjB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CodingNsCliSessionConfig } from '../../shared/contracts/cli-adapter.js';
|
|
2
|
+
import type { SessionTranslationPendingInput, SessionTranslationRecord } from '../../shared/contracts/session-translation.js';
|
|
3
|
+
import { type SessionTranslationSettings } from '../../shared/contracts/session-translation.js';
|
|
4
|
+
import { type SessionTranslationService } from './session-translation-service.js';
|
|
5
|
+
import type { TextProtectionOptions } from './session-translation-protection.js';
|
|
6
|
+
export declare class SessionTranslationCancelled extends Error {
|
|
7
|
+
constructor();
|
|
8
|
+
}
|
|
9
|
+
/** Owns submission decisions; neither a disconnect nor a failed retry sends the original. */
|
|
10
|
+
export declare function createSessionTranslationRecovery(service: SessionTranslationService | undefined, session: (sessionId: string) => CodingNsCliSessionConfig): {
|
|
11
|
+
dispose(): void;
|
|
12
|
+
cancelSession: (sessionId: string) => void;
|
|
13
|
+
cancelDisabled(settings: SessionTranslationSettings | undefined): void;
|
|
14
|
+
pending(payload: unknown): readonly SessionTranslationPendingInput[];
|
|
15
|
+
resolve(payload: unknown): {
|
|
16
|
+
accepted: boolean;
|
|
17
|
+
};
|
|
18
|
+
translateInput(sessionId: string, adapterId: string, text: string, requestSignal?: AbortSignal, protection?: TextProtectionOptions): Promise<SessionTranslationRecord>;
|
|
19
|
+
retryOutput(payload: unknown, requestSignal?: AbortSignal): Promise<SessionTranslationRecord>;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=session-translation-recovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-translation-recovery.d.ts","sourceRoot":"","sources":["../../../../../src/host/features/session-translation-recovery.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAA;AACrF,OAAO,KAAK,EAAE,8BAA8B,EAAE,wBAAwB,EAAoC,MAAM,+CAA+C,CAAA;AAC/J,OAAO,EAAoC,KAAK,0BAA0B,EAAE,MAAM,+CAA+C,CAAA;AACjI,OAAO,EAAoC,KAAK,yBAAyB,EAAE,MAAM,kCAAkC,CAAA;AAEnH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAEhF,qBAAa,2BAA4B,SAAQ,KAAK;;CAErD;AAED,6FAA6F;AAC7F,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,yBAAyB,GAAG,SAAS,EAC9C,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,wBAAwB;;+BAKtB,MAAM,KAAG,IAAI;6BAcpB,0BAA0B,GAAG,SAAS;qBAO9C,OAAO,GAAG,SAAS,8BAA8B,EAAE;qBAInD,OAAO,GAAG;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE;8BAUhB,MAAM,aAAa,MAAM,QAAQ,MAAM,kBAAkB,WAAW,eAAe,qBAAqB,GAAG,OAAO,CAAC,wBAAwB,CAAC;yBA8BjJ,OAAO,kBAAkB,WAAW,GAAG,OAAO,CAAC,wBAAwB,CAAC;EAoBtG"}
|