@jingyi0605/codingns4dsh 0.2.1-beta.9 → 0.2.1-rc.3
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 +10 -6
- package/README.md +12 -9
- 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 +55627 -31591
- 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} +393 -14
- 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 +91 -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 +1415 -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 +1948 -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/feature-requirement.d.ts +43 -0
- package/data/build/dist/client/feature-requirement.d.ts.map +1 -0
- package/data/build/dist/client/feature-requirement.js +105 -0
- package/data/build/dist/client/feature-requirement.js.map +1 -0
- 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 +1 -0
- package/data/build/dist/client/features/index.d.ts.map +1 -1
- package/data/build/dist/client/features/index.js +5 -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/magpie-management-controls.d.ts +46 -0
- package/data/build/dist/client/features/magpie-management-controls.d.ts.map +1 -0
- package/data/build/dist/client/features/magpie-management-controls.js +759 -0
- package/data/build/dist/client/features/magpie-management-controls.js.map +1 -0
- package/data/build/dist/client/features/magpie-management-page.d.ts +124 -0
- package/data/build/dist/client/features/magpie-management-page.d.ts.map +1 -0
- package/data/build/dist/client/features/magpie-management-page.js +1256 -0
- package/data/build/dist/client/features/magpie-management-page.js.map +1 -0
- package/data/build/dist/client/features/magpie-management.d.ts +7 -0
- package/data/build/dist/client/features/magpie-management.d.ts.map +1 -0
- package/data/build/dist/client/features/magpie-management.js +154 -0
- package/data/build/dist/client/features/magpie-management.js.map +1 -0
- package/data/build/dist/client/features/magpie-mark.d.ts +10 -0
- package/data/build/dist/client/features/magpie-mark.d.ts.map +1 -0
- package/data/build/dist/client/features/magpie-mark.js +21 -0
- package/data/build/dist/client/features/magpie-mark.js.map +1 -0
- package/data/build/dist/client/features/magpie-provider-logo.d.ts +11 -0
- package/data/build/dist/client/features/magpie-provider-logo.d.ts.map +1 -0
- package/data/build/dist/client/features/magpie-provider-logo.js +35 -0
- package/data/build/dist/client/features/magpie-provider-logo.js.map +1 -0
- 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/subscription-quota-groups.d.ts +193 -0
- package/data/build/dist/client/features/subscription-quota-groups.d.ts.map +1 -0
- package/data/build/dist/client/features/subscription-quota-groups.js +548 -0
- package/data/build/dist/client/features/subscription-quota-groups.js.map +1 -0
- 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 +64 -41
- 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 +15 -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/index.d.ts +1 -1
- package/data/build/dist/client/index.d.ts.map +1 -1
- package/data/build/dist/client/index.js +1 -1
- package/data/build/dist/client/index.js.map +1 -1
- package/data/build/dist/client/locale.d.ts.map +1 -1
- package/data/build/dist/client/locale.js +29 -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/magpie.d.ts +4 -0
- package/data/build/dist/client/locales/magpie.d.ts.map +1 -0
- package/data/build/dist/client/locales/magpie.js +622 -0
- package/data/build/dist/client/locales/magpie.js.map +1 -0
- 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 +150 -0
- package/data/build/dist/client/locales/usage.js.map +1 -1
- package/data/build/dist/client/magpie-model-tag.d.ts +16 -0
- package/data/build/dist/client/magpie-model-tag.d.ts.map +1 -0
- package/data/build/dist/client/magpie-model-tag.js +62 -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 +8 -0
- package/data/build/dist/client/provider-icons.d.ts.map +1 -1
- package/data/build/dist/client/provider-icons.js +125 -3
- 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/settings-bridge.d.ts +1 -0
- package/data/build/dist/client/settings-bridge.d.ts.map +1 -1
- package/data/build/dist/client/settings-bridge.js +29 -10
- package/data/build/dist/client/settings-bridge.js.map +1 -1
- package/data/build/dist/client/settings-section.d.ts.map +1 -1
- package/data/build/dist/client/settings-section.js +21 -3
- package/data/build/dist/client/settings-section.js.map +1 -1
- 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 +279 -276
- package/data/build/dist/client/subscription-slot.d.ts +26 -2
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -1
- package/data/build/dist/client/subscription-slot.js +679 -24
- 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/global-panel-adapter.d.ts +27 -0
- package/data/build/dist/dsh-capabilities/client/global-panel-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/global-panel-adapter.js +109 -0
- package/data/build/dist/dsh-capabilities/client/global-panel-adapter.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/session-title-adapter.d.ts +2 -1
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.js +32 -2
- package/data/build/dist/dsh-capabilities/host/session-title-adapter.js.map +1 -1
- 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 +23 -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 +50 -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 +27 -0
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js +94 -16
- 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 +28 -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 +158 -22
- 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 +6 -2
- 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 +198 -26
- 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.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.js +33 -5
- 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 +65 -17
- 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 +17 -0
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.js +972 -102
- 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 +463 -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-detection.d.ts +72 -0
- package/data/build/dist/host/cli-adapters/magpie-detection.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-detection.js +298 -0
- package/data/build/dist/host/cli-adapters/magpie-detection.js.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-management.d.ts +50 -0
- package/data/build/dist/host/cli-adapters/magpie-management.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-management.js +1268 -0
- package/data/build/dist/host/cli-adapters/magpie-management.js.map +1 -0
- 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-update.d.ts +59 -0
- package/data/build/dist/host/cli-adapters/magpie-update.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-update.js +249 -0
- package/data/build/dist/host/cli-adapters/magpie-update.js.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.d.ts +148 -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 +1710 -0
- package/data/build/dist/host/cli-adapters/magpie-usage.js.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-web.d.ts +54 -0
- package/data/build/dist/host/cli-adapters/magpie-web.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/magpie-web.js +407 -0
- package/data/build/dist/host/cli-adapters/magpie-web.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 +4 -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 +20 -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/dsh-gateway-feature.d.ts.map +1 -1
- package/data/build/dist/host/dsh-gateway-feature.js +26 -3
- package/data/build/dist/host/dsh-gateway-feature.js.map +1 -1
- 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/host-status.d.ts +25 -0
- package/data/build/dist/host/features/host-status.d.ts.map +1 -1
- package/data/build/dist/host/features/host-status.js +60 -6
- package/data/build/dist/host/features/host-status.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 +64 -13
- 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 +205 -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 +87 -15
- 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/pwa/pwa-session-notifications.js +2 -1
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.js.map +1 -1
- 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 +15 -2
- package/data/build/dist/host/rpc.d.ts.map +1 -1
- package/data/build/dist/host/rpc.js +67 -15
- 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 +36 -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 +25 -1
- package/data/build/dist/shared/contracts/config.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/config.js +11 -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/feature.d.ts +7 -0
- package/data/build/dist/shared/contracts/feature.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/magpie-management.d.ts +395 -0
- package/data/build/dist/shared/contracts/magpie-management.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/magpie-management.js +2 -0
- package/data/build/dist/shared/contracts/magpie-management.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 +161 -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 +4 -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/session-title.d.ts.map +1 -1
- package/data/build/dist/shared/session-title.js +10 -4
- package/data/build/dist/shared/session-title.js.map +1 -1
- 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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { runAsyncCommand } from './process-utils.js';
|
|
2
2
|
import { spawn, spawnSync } from 'node:child_process';
|
|
3
|
+
import { lstatSync, readFileSync, realpathSync } from 'node:fs';
|
|
4
|
+
import { randomUUID } from 'node:crypto';
|
|
3
5
|
import { homedir } from 'node:os';
|
|
4
6
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
5
7
|
import { JsonRpcProcess } from './json-rpc-process.js';
|
|
@@ -8,19 +10,25 @@ import { GROK_CATALOG, isProviderDefaultModel } from './model-catalog.js';
|
|
|
8
10
|
import { isRegularFile, probeStoredSession, resolveSessionDirectory } from './session-probe.js';
|
|
9
11
|
import { firstToolText, isToolRecord, normalizeToolStatus, serializeToolValue } from './tool-observation.js';
|
|
10
12
|
import { buildAcpPromptBlocks } from './attachment-utils.js';
|
|
11
|
-
import { acpBridgeMcpServers } from '../cli-bridge/injections.js';
|
|
13
|
+
import { acpBridgeMcpServers, bridgeSessionGuidance, subagentBridgeActive, teamBridgeToken } from '../cli-bridge/injections.js';
|
|
14
|
+
import { getSubagentBridge } from '../cli-bridge/bridge-holder.js';
|
|
12
15
|
import { reasoningText } from './reasoning-content.js';
|
|
13
16
|
import { ACP_FORM_CLIENT_CAPABILITIES, acpElicitationResponse, readAcpElicitationRequest } from './acp-elicitation.js';
|
|
14
17
|
import { readAgentQuestions } from './interaction-events.js';
|
|
15
18
|
import { commandEnvironment, WINDOWS } from './process-utils.js';
|
|
16
19
|
import { imageArtifactPathsFromValue, stripImageMarkdown } from '../image-artifact-store.js';
|
|
20
|
+
import { advanceCodingNsSegment, createCodingNsSegmentState, decorateCodingNsSegmentEvent } from './stream-normalizer.js';
|
|
21
|
+
import { GrokContextUsage, GrokPromptUsage } from './grok-usage.js';
|
|
17
22
|
/** Grok Build 的 ACP stdio 驱动。ACP 会话和权限细节只在 Host 进程内处理。 */
|
|
18
23
|
export class GrokBuildDriver {
|
|
19
24
|
descriptor = { id: 'grok', name: 'Grok Build', protocol: 'acp', capabilities: ['models', 'skills', 'stream', 'tool-events', 'reasoning', 'usage', 'permission', 'questions'] };
|
|
25
|
+
supportsStreamStepSplitting = true;
|
|
20
26
|
binaries;
|
|
21
27
|
runSpawnSync;
|
|
22
28
|
runSpawn;
|
|
23
29
|
sessionRoots;
|
|
30
|
+
modelCachePath;
|
|
31
|
+
now;
|
|
24
32
|
cachedBinary = null;
|
|
25
33
|
processes = new Set();
|
|
26
34
|
sessions = new Map();
|
|
@@ -28,7 +36,9 @@ export class GrokBuildDriver {
|
|
|
28
36
|
this.binaries = options.binaries ?? ['grok', 'grok-build'];
|
|
29
37
|
this.runSpawnSync = options.spawnSync ?? spawnSync;
|
|
30
38
|
this.runSpawn = options.spawn ?? spawn;
|
|
39
|
+
this.now = options.now ?? Date.now;
|
|
31
40
|
this.sessionRoots = options.sessionRoots ?? [join(process.env.GROK_HOME ?? join(homedir(), '.grok'), 'sessions')];
|
|
41
|
+
this.modelCachePath = options.modelCachePath ?? join(process.env.GROK_HOME ?? join(homedir(), '.grok'), 'models_cache.json');
|
|
32
42
|
}
|
|
33
43
|
async detect() {
|
|
34
44
|
const result = await detectBinary({ binaries: this.binaries, spawnSync: this.runSpawnSync });
|
|
@@ -40,6 +50,8 @@ export class GrokBuildDriver {
|
|
|
40
50
|
const command = this.cachedBinary ?? (await this.detect()).command;
|
|
41
51
|
if (command === null)
|
|
42
52
|
return emptyCatalog();
|
|
53
|
+
const native = this.nativeModels(command);
|
|
54
|
+
let catalog = GROK_CATALOG;
|
|
43
55
|
const rpc = new JsonRpcProcess({ command, args: ['agent', '--no-leader', 'stdio'], env: grokRuntimeEnvironment(), spawn: this.runSpawn });
|
|
44
56
|
try {
|
|
45
57
|
await rpc.request('initialize', {
|
|
@@ -52,14 +64,48 @@ export class GrokBuildDriver {
|
|
|
52
64
|
rpc.notify('initialized', {});
|
|
53
65
|
const session = await rpc.request('session/new', { cwd: process.cwd(), mcpServers: [] });
|
|
54
66
|
const parsed = parseGrokCatalog(session);
|
|
55
|
-
|
|
67
|
+
if (parsed.groups.length > 0)
|
|
68
|
+
catalog = parsed;
|
|
56
69
|
}
|
|
57
70
|
catch {
|
|
58
|
-
|
|
71
|
+
// Retain the compatibility catalog when ACP discovery is unavailable.
|
|
59
72
|
}
|
|
60
73
|
finally {
|
|
61
74
|
rpc.dispose();
|
|
62
75
|
}
|
|
76
|
+
const listed = await native;
|
|
77
|
+
if (!listed)
|
|
78
|
+
return catalog;
|
|
79
|
+
const existing = new Map(catalog.groups.flatMap(group => group.models).map(model => [model.id, model]));
|
|
80
|
+
const cached = readGrokModelMetadata(this.modelCachePath);
|
|
81
|
+
const models = listed.ids.map(id => {
|
|
82
|
+
const metadata = cached.get(id);
|
|
83
|
+
return { id, name: existing.get(id)?.name ?? metadata?.name ?? id,
|
|
84
|
+
efforts: metadata?.efforts ?? existing.get(id)?.efforts ?? [] };
|
|
85
|
+
});
|
|
86
|
+
const providerDefault = GROK_CATALOG.groups.flatMap(group => group.models).find(model => model.id === 'provider-default');
|
|
87
|
+
return { groups: [{ id: 'grok', name: 'Grok', models: [providerDefault, ...models] }], currentModel: listed.current, currentEffort: null };
|
|
88
|
+
}
|
|
89
|
+
/** The models command waits for the fetched catalog; session/new may return its bootstrap snapshot. */
|
|
90
|
+
async nativeModels(command) {
|
|
91
|
+
try {
|
|
92
|
+
const result = await runAsyncCommand(this.runSpawnSync, command, ['models'], {
|
|
93
|
+
cwd: process.cwd(), encoding: 'utf8', timeout: 10_000, maxBuffer: 1024 * 1024,
|
|
94
|
+
windowsHide: true, shell: WINDOWS, env: grokRuntimeEnvironment(command),
|
|
95
|
+
});
|
|
96
|
+
if (result.status !== 0)
|
|
97
|
+
return undefined;
|
|
98
|
+
const text = String(result.stdout).replace(/\u001b\[[0-9;]*m/gu, '');
|
|
99
|
+
const section = text.split('Available models:')[1];
|
|
100
|
+
if (!section)
|
|
101
|
+
return undefined;
|
|
102
|
+
const ids = [...new Set([...section.matchAll(/^\s*[-*]\s+([A-Za-z0-9][A-Za-z0-9._:/-]*)(?:\s+\(default\))?\s*$/gmu)].map(match => match[1]))];
|
|
103
|
+
const current = text.match(/^Default model:\s*(\S+)\s*$/mu)?.[1] ?? null;
|
|
104
|
+
return ids.length ? { ids, current: current && ids.includes(current) ? current : null } : undefined;
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
63
109
|
}
|
|
64
110
|
/** Grok 的原生目录同时应用信任、禁用、兼容来源和插件命名规则。 */
|
|
65
111
|
async listSkills(input) {
|
|
@@ -106,26 +152,53 @@ export class GrokBuildDriver {
|
|
|
106
152
|
const rpc = state.rpc;
|
|
107
153
|
let providerSessionId = state.providerSessionId;
|
|
108
154
|
let stream;
|
|
155
|
+
let reusable = false;
|
|
156
|
+
const promptId = randomUUID();
|
|
157
|
+
const segmentState = createCodingNsSegmentState();
|
|
158
|
+
let stepPhase;
|
|
159
|
+
let stepStreamId;
|
|
160
|
+
const activeTools = new Map();
|
|
161
|
+
const streamedToolInputs = new Map();
|
|
162
|
+
const permissionTools = new Map();
|
|
109
163
|
try {
|
|
110
164
|
if (providerSessionId === '') {
|
|
111
165
|
const session = await rpc.request('session/new', {
|
|
112
166
|
cwd: input.cwd ?? process.cwd(),
|
|
113
167
|
mcpServers: acpBridgeMcpServers(input.sessionId, this.descriptor.id),
|
|
114
|
-
...(!isProviderDefaultModel(input.modelId) ? { model: input.modelId } : {}),
|
|
115
168
|
}, { signal: input.signal });
|
|
116
169
|
providerSessionId = readSessionId(session) ?? input.sessionId;
|
|
170
|
+
state.contextUsage.observe(session);
|
|
117
171
|
state.providerSessionId = providerSessionId;
|
|
118
172
|
this.sessions.set(input.sessionId, state);
|
|
119
173
|
this.sessions.set(providerSessionId, state);
|
|
120
174
|
}
|
|
121
175
|
yield { type: 'session-binding', providerSessionId };
|
|
176
|
+
// Grok 1.0.52 ignores the model field on session/new. Apply explicit
|
|
177
|
+
// selections after both creation and restoration, including reused sessions.
|
|
178
|
+
if (input.modelId && !isProviderDefaultModel(input.modelId)) {
|
|
179
|
+
const selected = await rpc.request('session/set_model', { sessionId: providerSessionId, modelId: input.modelId }, { signal: input.signal });
|
|
180
|
+
state.contextUsage.modelId = input.modelId;
|
|
181
|
+
state.contextUsage.observe(selected);
|
|
182
|
+
}
|
|
183
|
+
if (input.effortId) {
|
|
184
|
+
await rpc.request('session/set_config_option', { sessionId: providerSessionId, configId: 'reasoning_effort', value: input.effortId }, { signal: input.signal });
|
|
185
|
+
}
|
|
122
186
|
// Skill 斜杠命令由 Grok 在用户输入开头解析,不能把普通提示插到命令前。
|
|
123
187
|
const nativeCommand = /^\s*\/[A-Za-z0-9][A-Za-z0-9._:-]*(?:\s|$)/u.test(input.prompt);
|
|
124
188
|
const prompt = [
|
|
125
189
|
...(nativeCommand ? [] : [{ type: 'text', text: GROK_QUESTION_GUIDANCE }]),
|
|
190
|
+
...(nativeCommand || !subagentBridgeActive(input.sessionId) ? [] : [{ type: 'text', text: bridgeSessionGuidance(input.sessionId, 'codingns__agent_subagent') }]),
|
|
126
191
|
...await buildAcpPromptBlocks(input.prompt, input.attachments ?? []),
|
|
127
192
|
];
|
|
128
|
-
|
|
193
|
+
const usage = new GrokPromptUsage(promptId, state.contextUsage, this.now);
|
|
194
|
+
stream = streamGrokPrompt(rpc, providerSessionId, promptId, prompt, input.signal, (notification) => {
|
|
195
|
+
usage.observe(notification);
|
|
196
|
+
const params = isRecord(notification.params) ? notification.params : {};
|
|
197
|
+
const update = isRecord(params.update) ? params.update : {};
|
|
198
|
+
const callId = firstToolText(update.toolCallId, update.tool_call_id);
|
|
199
|
+
if (callId && update.sessionUpdate === 'tool_call') {
|
|
200
|
+
permissionTools.set(callId, { name: firstToolText(update.name, update.title) ?? '', input: update.rawInput });
|
|
201
|
+
}
|
|
129
202
|
const elicitation = readAcpElicitationRequest(notification);
|
|
130
203
|
if (elicitation !== null)
|
|
131
204
|
state.questions.set(elicitation.requestId, elicitation);
|
|
@@ -136,8 +209,12 @@ export class GrokBuildDriver {
|
|
|
136
209
|
// 已回答的问题被重新登记。tool_call 可以先显示问题卡并暂存用户答案。
|
|
137
210
|
const requestId = interactionRequestId(notification);
|
|
138
211
|
if (requestId !== null && notification.id !== undefined && notification.id !== null)
|
|
139
|
-
state.requests.set(requestId, {
|
|
140
|
-
|
|
212
|
+
state.requests.set(requestId, {
|
|
213
|
+
rpcId: notification.id, callId: permissionCallId(notification), ...permissionOptions(notification),
|
|
214
|
+
autoApproved: isAdmittedGrokPermission(notification, input, state, permissionTools),
|
|
215
|
+
});
|
|
216
|
+
return usage.takeObservation();
|
|
217
|
+
}, response => { usage.observeResponse(response); return usage.takeObservation(); });
|
|
141
218
|
let finishResult;
|
|
142
219
|
while (true) {
|
|
143
220
|
const item = await stream.next();
|
|
@@ -145,12 +222,27 @@ export class GrokBuildDriver {
|
|
|
145
222
|
finishResult = item.value;
|
|
146
223
|
break;
|
|
147
224
|
}
|
|
148
|
-
|
|
149
|
-
|
|
225
|
+
if (item.value.codingnsGrokObservation !== undefined)
|
|
226
|
+
yield item.value.codingnsGrokObservation;
|
|
227
|
+
const streamId = grokStreamId(item.value);
|
|
228
|
+
for (const rawChunk of grokToolInputChunks(item.value, streamedToolInputs) ?? acpMessageToChunks(item.value)) {
|
|
229
|
+
if (rawChunk.type === 'permission-request' && state.requests.get(rawChunk.requestId)?.autoApproved)
|
|
230
|
+
continue;
|
|
231
|
+
// Settle native turn accounting once, after the terminal drain. Per-call
|
|
232
|
+
// usage is retained by the RPC observer solely for timing and fallback.
|
|
233
|
+
if (rawChunk.type === 'usage')
|
|
234
|
+
continue;
|
|
235
|
+
let resolved = rawChunk.type === 'image-artifact'
|
|
150
236
|
? await resolveGrokImageArtifact(rawChunk, state, this.sessionRoots)
|
|
151
237
|
: rawChunk;
|
|
152
|
-
if (
|
|
238
|
+
if (resolved === null)
|
|
153
239
|
continue;
|
|
240
|
+
if (resolved.type === 'tool-event' && resolved.status === 'failed' && resolved.callId) {
|
|
241
|
+
const denial = state.permissionDenials.get(resolved.callId);
|
|
242
|
+
if (denial !== undefined)
|
|
243
|
+
resolved = { ...resolved, error: denial, output: denial, outputMode: 'snapshot' };
|
|
244
|
+
}
|
|
245
|
+
const chunk = decorateCodingNsSegmentEvent(resolved, input, segmentState, this.descriptor.id);
|
|
154
246
|
if (chunk.type === 'question-request' && state.grokQuestionCallIds.has(chunk.requestId)) {
|
|
155
247
|
if (state.grokQuestionEventIds.has(chunk.requestId))
|
|
156
248
|
continue;
|
|
@@ -160,15 +252,56 @@ export class GrokBuildDriver {
|
|
|
160
252
|
// 工具记录,否则历史里会重新出现空参数或重复的问题调用。
|
|
161
253
|
if (chunk.type === 'tool-event' && chunk.callId !== undefined && state.grokQuestionCallIds.has(chunk.callId))
|
|
162
254
|
continue;
|
|
255
|
+
const phase = grokStepPhase(chunk);
|
|
256
|
+
if (phase !== undefined) {
|
|
257
|
+
// DSH persists assistant content only at step settlement. End the content
|
|
258
|
+
// step before native tools are appended, and keep unfinished parallel calls
|
|
259
|
+
// together so their results cannot be finalized by an intermediate step.
|
|
260
|
+
if (input.splitToolSteps && stepPhase !== undefined && activeTools.size === 0
|
|
261
|
+
&& (phase !== stepPhase || (streamId !== undefined && stepStreamId !== undefined && streamId !== stepStreamId))) {
|
|
262
|
+
yield { type: 'step-boundary' };
|
|
263
|
+
}
|
|
264
|
+
stepPhase = phase;
|
|
265
|
+
if (streamId !== undefined)
|
|
266
|
+
stepStreamId = streamId;
|
|
267
|
+
}
|
|
268
|
+
if (chunk.type === 'tool-event') {
|
|
269
|
+
const callId = chunk.callId ?? chunk.toolName;
|
|
270
|
+
if (chunk.status === 'completed' || chunk.status === 'failed')
|
|
271
|
+
activeTools.delete(callId);
|
|
272
|
+
else
|
|
273
|
+
activeTools.set(callId, chunk.toolName === 'tool' ? activeTools.get(callId) ?? chunk.toolName : chunk.toolName);
|
|
274
|
+
}
|
|
163
275
|
yield chunk;
|
|
276
|
+
advanceCodingNsSegment(chunk, segmentState);
|
|
277
|
+
if (chunk.type === 'question-request')
|
|
278
|
+
segmentState.segment += 1;
|
|
164
279
|
}
|
|
165
280
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
281
|
+
const settledUsage = usage.finish();
|
|
282
|
+
if (settledUsage !== undefined) {
|
|
283
|
+
const { requestPerformance: _observed, ...accounting } = settledUsage;
|
|
284
|
+
yield accounting;
|
|
285
|
+
}
|
|
286
|
+
if (finishResult.failure?.code === 'PERMISSION_DENIED') {
|
|
287
|
+
const denial = [...state.permissionDenials.values()].at(-1);
|
|
288
|
+
if (denial !== undefined)
|
|
289
|
+
finishResult = { ...finishResult, failure: { message: denial, code: 'PERMISSION_DENIED' } };
|
|
290
|
+
}
|
|
291
|
+
// A normal prompt stop does not confirm pending tool execution. Keep the
|
|
292
|
+
// observed arguments and make the unknown outcome explicit without retrying.
|
|
293
|
+
if (activeTools.size > 0) {
|
|
294
|
+
for (const [callId, toolName] of activeTools) {
|
|
295
|
+
const error = 'Grok ended the turn without reporting a final result for this tool; its outcome is unconfirmed.';
|
|
296
|
+
yield decorateCodingNsSegmentEvent({ type: 'tool-event', callId, toolName, status: 'failed', error, output: error, outputMode: 'snapshot' }, input, segmentState, this.descriptor.id);
|
|
169
297
|
}
|
|
170
|
-
|
|
298
|
+
if (finishResult.reason === 'stop')
|
|
299
|
+
finishResult = {
|
|
300
|
+
reason: 'error',
|
|
301
|
+
failure: { message: 'Grok ended the turn before all tool results were confirmed.', code: 'INCOMPLETE_TOOL_RESULT' },
|
|
302
|
+
};
|
|
171
303
|
}
|
|
304
|
+
reusable = finishResult.reason === 'stop' && !input.signal?.aborted;
|
|
172
305
|
yield { type: 'finish', reason: finishResult.reason, ...(finishResult.failure === undefined ? {} : { failure: finishResult.failure }) };
|
|
173
306
|
}
|
|
174
307
|
finally {
|
|
@@ -182,7 +315,15 @@ export class GrokBuildDriver {
|
|
|
182
315
|
state.grokQuestions.clear();
|
|
183
316
|
state.grokQuestionCallIds.clear();
|
|
184
317
|
state.grokQuestionEventIds.clear();
|
|
185
|
-
|
|
318
|
+
state.questions.clear();
|
|
319
|
+
state.requests.clear();
|
|
320
|
+
state.permissionDenials.clear();
|
|
321
|
+
if (!reusable) {
|
|
322
|
+
// An abandoned prompt can keep producing updates without prompt metadata.
|
|
323
|
+
// Reload its persisted session on a fresh transport before accepting new input.
|
|
324
|
+
await rpc.disposeAndWait();
|
|
325
|
+
this.processes.delete(rpc);
|
|
326
|
+
}
|
|
186
327
|
}
|
|
187
328
|
}
|
|
188
329
|
respondPermission(sessionId, response) {
|
|
@@ -194,7 +335,10 @@ export class GrokBuildDriver {
|
|
|
194
335
|
throw new Error('The Grok permission request does not exist');
|
|
195
336
|
state.requests.delete(response.requestId);
|
|
196
337
|
const optionId = response.approved ? pending.allowOptionId : pending.rejectOptionId;
|
|
197
|
-
|
|
338
|
+
if (!response.approved || optionId === undefined) {
|
|
339
|
+
state.permissionDenials.set(pending.callId ?? response.requestId, response.reason ?? (response.approved ? 'Grok did not offer a one-time approval option.' : 'Grok tool execution was denied.'));
|
|
340
|
+
}
|
|
341
|
+
state.rpc.respond(pending.rpcId, { outcome: optionId === undefined ? { outcome: 'cancelled' } : { outcome: 'selected', optionId } });
|
|
198
342
|
}
|
|
199
343
|
respondQuestion(sessionId, response) {
|
|
200
344
|
const state = this.sessions.get(sessionId);
|
|
@@ -216,29 +360,53 @@ export class GrokBuildDriver {
|
|
|
216
360
|
dispose() { for (const process of this.processes)
|
|
217
361
|
process.dispose(); this.processes.clear(); this.sessions.clear(); this.cachedBinary = null; }
|
|
218
362
|
async getSession(input, command) {
|
|
363
|
+
const alwaysApprove = input.permission?.sandboxMode === 'danger-full-access' && input.permission.approvalPolicy === 'never';
|
|
219
364
|
const previous = this.sessions.get(input.sessionId);
|
|
220
|
-
|
|
365
|
+
const teamToken = teamBridgeToken(input.sessionId);
|
|
366
|
+
const bridgeToken = getSubagentBridge()?.token;
|
|
367
|
+
if (previous !== undefined && previous.cwd === input.cwd && previous.alwaysApprove === alwaysApprove && previous.teamToken === teamToken && previous.bridgeToken === bridgeToken && !previous.rpc.isClosed)
|
|
221
368
|
return previous;
|
|
222
|
-
previous
|
|
223
|
-
|
|
369
|
+
if (previous !== undefined) {
|
|
370
|
+
await previous.rpc.disposeAndWait();
|
|
371
|
+
this.processes.delete(previous.rpc);
|
|
372
|
+
}
|
|
373
|
+
const resumeId = input.providerSessionId ?? (previous?.cwd === input.cwd ? previous?.providerSessionId : undefined);
|
|
374
|
+
const rpc = new JsonRpcProcess({ command, args: ['agent', '--no-leader', ...(alwaysApprove ? ['--always-approve'] : []), 'stdio'], cwd: input.cwd, env: grokRuntimeEnvironment(), spawn: this.runSpawn });
|
|
224
375
|
this.processes.add(rpc);
|
|
225
|
-
const state = { rpc, cwd: input.cwd, rawStoreRef: input.rawStoreRef, providerSessionId: '', requests: new Map(), questions: new Map(), grokQuestions: new Map(), grokQuestionCallIds: new Set(), grokQuestionEventIds: new Set() };
|
|
226
|
-
|
|
376
|
+
const state = { teamToken, bridgeToken, rpc, contextUsage: new GrokContextUsage(), cwd: input.cwd, rawStoreRef: input.rawStoreRef, alwaysApprove, providerSessionId: '', requests: new Map(), permissionDenials: new Map(), questions: new Map(), grokQuestions: new Map(), grokQuestionCallIds: new Set(), grokQuestionEventIds: new Set() };
|
|
377
|
+
rpc.addNotificationListener(message => {
|
|
378
|
+
const params = isRecord(message.params) ? message.params : {};
|
|
379
|
+
const owner = state.providerSessionId || resumeId;
|
|
380
|
+
if (owner && typeof params.sessionId === 'string' && params.sessionId !== owner)
|
|
381
|
+
return;
|
|
382
|
+
state.contextUsage.observe(message);
|
|
383
|
+
});
|
|
384
|
+
const initialized = await rpc.request('initialize', {
|
|
227
385
|
protocolVersion: 1,
|
|
228
386
|
clientInfo: { name: 'codingns4dsh', version: '0.1.1' },
|
|
229
387
|
// 旧版 Grok 读取 capabilities;标准 ACP 读取 clientCapabilities。
|
|
230
388
|
capabilities: ACP_FORM_CLIENT_CAPABILITIES,
|
|
231
389
|
clientCapabilities: ACP_FORM_CLIENT_CAPABILITIES,
|
|
232
390
|
});
|
|
391
|
+
state.contextUsage.observe(initialized);
|
|
233
392
|
rpc.notify('initialized', {});
|
|
234
|
-
if (
|
|
393
|
+
if (resumeId) {
|
|
235
394
|
try {
|
|
236
|
-
const loaded = await rpc.request('session/load', { sessionId:
|
|
237
|
-
state.
|
|
395
|
+
const loaded = await rpc.request('session/load', { sessionId: resumeId, cwd: input.cwd ?? process.cwd(), mcpServers: acpBridgeMcpServers(input.sessionId, this.descriptor.id) });
|
|
396
|
+
state.contextUsage.observe(loaded);
|
|
397
|
+
state.providerSessionId = readSessionId(loaded) ?? resumeId;
|
|
398
|
+
}
|
|
399
|
+
catch (error) {
|
|
400
|
+
if (teamToken) {
|
|
401
|
+
rpc.dispose();
|
|
402
|
+
this.processes.delete(rpc);
|
|
403
|
+
throw error;
|
|
404
|
+
}
|
|
405
|
+
// Ordinary legacy ACP sessions keep their existing new-session fallback.
|
|
238
406
|
}
|
|
239
|
-
catch { /* 旧版 ACP 没有 load,下一轮在同一进程创建新会话 */ }
|
|
240
407
|
}
|
|
241
|
-
//
|
|
408
|
+
// Admitted file/bridge requests retain existing authority. Other requests
|
|
409
|
+
// wait for native approval using the original RPC id.
|
|
242
410
|
rpc.setServerRequestHandler((message) => {
|
|
243
411
|
const elicitation = readAcpElicitationRequest(message);
|
|
244
412
|
if (elicitation !== null) {
|
|
@@ -263,7 +431,11 @@ export class GrokBuildDriver {
|
|
|
263
431
|
const requestId = interactionRequestId(message);
|
|
264
432
|
if (requestId === null || message.id === undefined || message.id === null)
|
|
265
433
|
return { outcome: { outcome: 'cancelled' } };
|
|
266
|
-
state.requests.
|
|
434
|
+
const pending = state.requests.get(requestId);
|
|
435
|
+
if (pending?.autoApproved && pending.allowOptionId !== undefined) {
|
|
436
|
+
return { outcome: { outcome: 'selected', optionId: pending.allowOptionId } };
|
|
437
|
+
}
|
|
438
|
+
state.requests.set(requestId, { rpcId: message.id, callId: permissionCallId(message), ...permissionOptions(message) });
|
|
267
439
|
return new Promise(() => undefined);
|
|
268
440
|
});
|
|
269
441
|
this.sessions.set(input.sessionId, state);
|
|
@@ -286,6 +458,7 @@ const GROK_QUESTION_GUIDANCE = [
|
|
|
286
458
|
'<codingns_host_capabilities>',
|
|
287
459
|
'The DSH host provides Grok Build\'s built-in ask_user_question tool. It displays a native question card and returns the user\'s structured answer.',
|
|
288
460
|
'ask_user_question is a grok_build built-in tool and does not depend on an MCP server. MCP connection notices only describe the MCP servers listed in the prompt.',
|
|
461
|
+
'Use the built-in read/read_file tool to inspect files. Shell commands may require approval even when workspace file writes are already allowed; do not replace a file read with a shell command.',
|
|
289
462
|
'When the user explicitly asks to use a question component, or when a question card is needed to collect a choice, call ask_user_question directly, wait for the user\'s answer, and then continue.',
|
|
290
463
|
'</codingns_host_capabilities>',
|
|
291
464
|
].join('\n');
|
|
@@ -293,13 +466,14 @@ const GROK_QUESTION_GUIDANCE = [
|
|
|
293
466
|
* Grok 可能先返回 prompt 响应,再补发最后一批 session/update。
|
|
294
467
|
* 响应或终态任一先到都会启动固定排空窗口,窗口内的文本和错误仍会被消费。
|
|
295
468
|
*/
|
|
296
|
-
async function* streamGrokPrompt(rpc, sessionId, prompt, signal, onNotification) {
|
|
469
|
+
async function* streamGrokPrompt(rpc, sessionId, promptId, prompt, signal, onNotification, onResponse) {
|
|
297
470
|
const queue = [];
|
|
298
471
|
const requestController = new AbortController();
|
|
299
472
|
let wake;
|
|
300
473
|
let drainDeadline = null;
|
|
301
474
|
let terminalReason = null;
|
|
302
475
|
let failure;
|
|
476
|
+
let completed = false;
|
|
303
477
|
const notify = () => { wake?.(); wake = undefined; };
|
|
304
478
|
const beginDrain = () => {
|
|
305
479
|
if (drainDeadline === null)
|
|
@@ -307,8 +481,10 @@ async function* streamGrokPrompt(rpc, sessionId, prompt, signal, onNotification)
|
|
|
307
481
|
notify();
|
|
308
482
|
};
|
|
309
483
|
const listener = (message) => {
|
|
310
|
-
|
|
311
|
-
|
|
484
|
+
if (!isGrokPromptMessage(message, sessionId, promptId))
|
|
485
|
+
return;
|
|
486
|
+
const observation = onNotification(message);
|
|
487
|
+
queue.push(observation === undefined ? message : { ...message, codingnsGrokObservation: observation });
|
|
312
488
|
const notificationReason = grokNotificationReason(message);
|
|
313
489
|
if (notificationReason === null) {
|
|
314
490
|
notify();
|
|
@@ -320,8 +496,6 @@ async function* streamGrokPrompt(rpc, sessionId, prompt, signal, onNotification)
|
|
|
320
496
|
if (detail !== undefined)
|
|
321
497
|
failure = detail;
|
|
322
498
|
}
|
|
323
|
-
// 部分 Grok 版本只发终态通知而不回复 prompt,主动取消可清理待处理请求。
|
|
324
|
-
requestController.abort();
|
|
325
499
|
beginDrain();
|
|
326
500
|
};
|
|
327
501
|
const removeListener = rpc.addNotificationListener(listener);
|
|
@@ -336,19 +510,29 @@ async function* streamGrokPrompt(rpc, sessionId, prompt, signal, onNotification)
|
|
|
336
510
|
onAbort();
|
|
337
511
|
else
|
|
338
512
|
signal?.addEventListener('abort', onAbort, { once: true });
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
513
|
+
if (!signal?.aborted)
|
|
514
|
+
void rpc.request('session/prompt', {
|
|
515
|
+
sessionId,
|
|
516
|
+
prompt,
|
|
517
|
+
_meta: { promptId },
|
|
518
|
+
}, { signal: requestController.signal, killOnAbort: false }).then((response) => {
|
|
519
|
+
if (signal?.aborted)
|
|
520
|
+
return;
|
|
521
|
+
const observation = onResponse(response);
|
|
522
|
+
if (observation !== undefined)
|
|
523
|
+
queue.push({ method: 'codingns/grok-observation', codingnsGrokObservation: observation });
|
|
524
|
+
const responseReason = grokPromptReason(response);
|
|
525
|
+
if (responseReason !== null)
|
|
526
|
+
terminalReason = mergeGrokReason(terminalReason, responseReason);
|
|
527
|
+
failure ??= grokPermissionFailure(response);
|
|
528
|
+
beginDrain();
|
|
529
|
+
}, () => {
|
|
530
|
+
if (requestController.signal.aborted)
|
|
531
|
+
return;
|
|
532
|
+
if (terminalReason === null)
|
|
533
|
+
terminalReason = signal?.aborted ? 'cancel' : 'error';
|
|
534
|
+
beginDrain();
|
|
535
|
+
});
|
|
352
536
|
try {
|
|
353
537
|
while (true) {
|
|
354
538
|
if (queue.length > 0) {
|
|
@@ -368,18 +552,81 @@ async function* streamGrokPrompt(rpc, sessionId, prompt, signal, onNotification)
|
|
|
368
552
|
]);
|
|
369
553
|
wake = undefined;
|
|
370
554
|
}
|
|
555
|
+
completed = true;
|
|
371
556
|
return { reason: terminalReason ?? 'stop', ...(failure === undefined ? {} : { failure }) };
|
|
372
557
|
}
|
|
373
558
|
finally {
|
|
374
559
|
signal?.removeEventListener('abort', onAbort);
|
|
375
560
|
removeListener();
|
|
561
|
+
if (!completed || signal?.aborted) {
|
|
562
|
+
// ACP cancellation is a notification; waiting for an RPC response can hang.
|
|
563
|
+
try {
|
|
564
|
+
rpc.notify('session/cancel', { sessionId });
|
|
565
|
+
}
|
|
566
|
+
catch { /* The process may already have exited. */ }
|
|
567
|
+
}
|
|
568
|
+
// Terminal-only providers and consumers that close the iterator both need cleanup.
|
|
569
|
+
requestController.abort();
|
|
376
570
|
}
|
|
377
571
|
}
|
|
572
|
+
function isGrokPromptMessage(message, sessionId, promptId) {
|
|
573
|
+
const params = isRecord(message.params) ? message.params : message;
|
|
574
|
+
if (typeof params.sessionId === 'string' && params.sessionId !== sessionId)
|
|
575
|
+
return false;
|
|
576
|
+
const update = isRecord(params.update) ? params.update : params;
|
|
577
|
+
const meta = isRecord(params._meta) ? params._meta : {};
|
|
578
|
+
if (meta.isReplay === true)
|
|
579
|
+
return false;
|
|
580
|
+
const owner = firstToolText(update.prompt_id, update.promptId, meta.promptId);
|
|
581
|
+
return owner === undefined || owner === promptId;
|
|
582
|
+
}
|
|
583
|
+
function grokToolInputChunks(message, inputs) {
|
|
584
|
+
const params = isRecord(message.params) ? message.params : message;
|
|
585
|
+
const update = isRecord(params.update) ? params.update : params;
|
|
586
|
+
if (update.sessionUpdate !== 'tool_call_delta_chunk' || !Number.isInteger(update.tool_index))
|
|
587
|
+
return null;
|
|
588
|
+
const index = update.tool_index;
|
|
589
|
+
const callId = firstToolText(update.tool_call_id, update.toolCallId);
|
|
590
|
+
// Argument fragments omit the call id; a new id resets a reused model-call index.
|
|
591
|
+
let pending = inputs.get(index);
|
|
592
|
+
const started = callId !== undefined && pending?.callId !== callId;
|
|
593
|
+
if (started) {
|
|
594
|
+
pending = { callId, toolName: firstToolText(update.name, update.title) ?? 'tool', arguments: '' };
|
|
595
|
+
inputs.set(index, pending);
|
|
596
|
+
}
|
|
597
|
+
if (pending === undefined)
|
|
598
|
+
return [];
|
|
599
|
+
if (typeof update.arguments_delta === 'string')
|
|
600
|
+
pending.arguments += update.arguments_delta;
|
|
601
|
+
let input;
|
|
602
|
+
try {
|
|
603
|
+
const parsed = JSON.parse(pending.arguments);
|
|
604
|
+
if (isRecord(parsed))
|
|
605
|
+
input = JSON.stringify(parsed);
|
|
606
|
+
}
|
|
607
|
+
catch { /* Do not persist incomplete JSON as a tool's final arguments. */ }
|
|
608
|
+
if (!started && input === undefined)
|
|
609
|
+
return [];
|
|
610
|
+
return [{
|
|
611
|
+
type: 'tool-event', callId: pending.callId, toolName: pending.toolName, status: 'running',
|
|
612
|
+
...(input === undefined ? {} : { input }),
|
|
613
|
+
}];
|
|
614
|
+
}
|
|
378
615
|
function grokPromptReason(value) {
|
|
379
|
-
if (!isRecord(value)
|
|
616
|
+
if (!isRecord(value))
|
|
380
617
|
return null;
|
|
381
|
-
const reason = value.stopReason.toLowerCase();
|
|
382
|
-
|
|
618
|
+
const reason = firstToolText(value.stopReason, value.stop_reason)?.toLowerCase();
|
|
619
|
+
if (reason === undefined)
|
|
620
|
+
return null;
|
|
621
|
+
if (reason === 'cancelled' || reason === 'canceled')
|
|
622
|
+
return grokPermissionFailure(value) === undefined ? 'cancel' : 'error';
|
|
623
|
+
return reason === 'error' || reason === 'failed' ? 'error' : 'stop';
|
|
624
|
+
}
|
|
625
|
+
function grokPermissionFailure(value) {
|
|
626
|
+
if (!isRecord(value) || !isRecord(value._meta) || value._meta.cancellationCategory !== 'PermissionRejected')
|
|
627
|
+
return undefined;
|
|
628
|
+
const context = isRecord(value._meta.cancellationContext) ? value._meta.cancellationContext : {};
|
|
629
|
+
return { message: firstToolText(context.reason) ?? 'Grok tool execution was denied.', code: 'PERMISSION_DENIED' };
|
|
383
630
|
}
|
|
384
631
|
function mergeGrokReason(current, next) {
|
|
385
632
|
if (current === 'error' || next === 'error')
|
|
@@ -396,15 +643,20 @@ function grokNotificationReason(message) {
|
|
|
396
643
|
: typeof update.type === 'string'
|
|
397
644
|
? update.type.toLowerCase()
|
|
398
645
|
: '';
|
|
399
|
-
if (
|
|
646
|
+
if (['turn_error', 'turn_failed', 'error', 'failed'].includes(type))
|
|
400
647
|
return 'error';
|
|
401
|
-
if (
|
|
402
|
-
|
|
648
|
+
if (['turn_completed', 'turn_complete', 'prompt_complete', 'completed', 'done'].includes(type)) {
|
|
649
|
+
const reason = grokPromptReason(update) ?? 'stop';
|
|
650
|
+
return reason === 'cancel' && grokPermissionFailure(params) !== undefined ? 'error' : reason;
|
|
651
|
+
}
|
|
403
652
|
return null;
|
|
404
653
|
}
|
|
405
654
|
function grokFailure(message) {
|
|
406
655
|
const params = isRecord(message.params) ? message.params : message;
|
|
407
656
|
const update = isRecord(params.update) ? params.update : params;
|
|
657
|
+
const permissionFailure = grokPermissionFailure(update) ?? grokPermissionFailure(params);
|
|
658
|
+
if (permissionFailure !== undefined)
|
|
659
|
+
return permissionFailure;
|
|
408
660
|
const error = isRecord(update.error) ? update.error : update;
|
|
409
661
|
const detail = firstToolText(error.message, error.errorMessage, error.error_message, error.detail, error.reason);
|
|
410
662
|
if (detail === undefined)
|
|
@@ -475,12 +727,34 @@ function grokQuestionResponse(pending, response) {
|
|
|
475
727
|
if (custom !== undefined && custom !== '')
|
|
476
728
|
annotations[key] = { notes: custom };
|
|
477
729
|
}
|
|
730
|
+
// 空回答表示“取消/放弃作答”(原生问题卡被关闭、回合中止或适配器卸载)。
|
|
731
|
+
// 绝不能映射成 accepted:那会让 Provider 收到一个空的有效答复并继续往下跑,
|
|
732
|
+
// 表面上像“已选择”,实际用户什么都没有回答。
|
|
733
|
+
if (Object.keys(answers).length === 0)
|
|
734
|
+
return { outcome: 'cancelled' };
|
|
478
735
|
return {
|
|
479
736
|
outcome: 'accepted',
|
|
480
737
|
answers,
|
|
481
738
|
...(Object.keys(annotations).length === 0 ? {} : { annotations }),
|
|
482
739
|
};
|
|
483
740
|
}
|
|
741
|
+
function grokStreamId(message) {
|
|
742
|
+
const params = isRecord(message.params) ? message.params : message;
|
|
743
|
+
const meta = isRecord(params._meta) ? params._meta : {};
|
|
744
|
+
return typeof meta.streamStartMs === 'number' && Number.isFinite(meta.streamStartMs)
|
|
745
|
+
? `grok-stream-${meta.streamStartMs}` : undefined;
|
|
746
|
+
}
|
|
747
|
+
function grokStepPhase(event) {
|
|
748
|
+
switch (event.type) {
|
|
749
|
+
case 'text-delta':
|
|
750
|
+
case 'reasoning-delta': return event.text.length > 0 ? 'message' : undefined;
|
|
751
|
+
case 'image-artifact': return 'message';
|
|
752
|
+
case 'tool-event':
|
|
753
|
+
case 'question-request':
|
|
754
|
+
case 'permission-request': return 'tools';
|
|
755
|
+
default: return undefined;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
484
758
|
function acpMessageToChunks(message) {
|
|
485
759
|
const params = isRecord(message.params) ? message.params : message;
|
|
486
760
|
const update = isRecord(params.update) ? params.update : params;
|
|
@@ -506,9 +780,12 @@ function acpMessageToChunks(message) {
|
|
|
506
780
|
const markdownPaths = imageArtifactPathsFromValue(text ?? '');
|
|
507
781
|
const imagePaths = [...new Set([...artifactPaths, ...markdownPaths])];
|
|
508
782
|
const imageEvents = imagePaths.map((path) => ({ type: 'image-artifact', path }));
|
|
783
|
+
// Grok identifies each model call independently of the enclosing user prompt.
|
|
784
|
+
const messageId = grokStreamId(message);
|
|
785
|
+
const identity = messageId === undefined ? {} : { messageId };
|
|
509
786
|
const reasoning = reasoningText(update);
|
|
510
787
|
if (reasoning !== null)
|
|
511
|
-
return [...imageEvents, { type: 'reasoning-delta', text: reasoning }];
|
|
788
|
+
return [...imageEvents, { type: 'reasoning-delta', text: reasoning, ...identity }];
|
|
512
789
|
if (type.includes('permission')) {
|
|
513
790
|
const requestId = permissionRequestId(message) ?? (typeof update.requestId === 'string' ? update.requestId : typeof update.id === 'string' ? update.id : null);
|
|
514
791
|
if (requestId !== null) {
|
|
@@ -520,27 +797,37 @@ function acpMessageToChunks(message) {
|
|
|
520
797
|
}
|
|
521
798
|
if (type.includes('agent_message') || type.includes('text') || type === 'message') {
|
|
522
799
|
const visible = text === null ? '' : stripImageMarkdown(text, markdownPaths);
|
|
523
|
-
const textEvent = visible === '' ? undefined : { type: 'text-delta', text: visible };
|
|
800
|
+
const textEvent = visible === '' ? undefined : { type: 'text-delta', text: visible, ...identity };
|
|
524
801
|
return [...imageEvents, ...(textEvent === undefined ? [] : [textEvent])];
|
|
525
802
|
}
|
|
526
803
|
if (type.includes('image') || type.includes('artifact') || type.includes('generated'))
|
|
527
804
|
return imageEvents;
|
|
528
805
|
if (type.includes('thought') || type.includes('reason'))
|
|
529
|
-
return text ? [{ type: 'reasoning-delta', text }] : [];
|
|
806
|
+
return text ? [{ type: 'reasoning-delta', text, ...identity }] : [];
|
|
530
807
|
if (type.includes('tool') || type.includes('command')) {
|
|
531
808
|
const tool = isToolRecord(update.toolCall) ? update.toolCall : isToolRecord(update.tool_call) ? update.tool_call : update;
|
|
532
|
-
const
|
|
809
|
+
const meta = isToolRecord(tool._meta) ? tool._meta : isToolRecord(update._meta) ? update._meta : {};
|
|
810
|
+
const xaiTool = isToolRecord(meta['x.ai/tool']) ? meta['x.ai/tool'] : undefined;
|
|
811
|
+
// Grok changes title to a display label such as Edit `path` while the call
|
|
812
|
+
// is running. Its structured name must survive until native persistence.
|
|
813
|
+
const name = firstToolText(tool.name, tool.toolName, tool.tool_name, xaiTool?.name, update.name, update.toolName, tool.title, update.title);
|
|
533
814
|
const callId = firstToolText(tool.callId, tool.call_id, tool.toolCallId, tool.tool_call_id, tool.id, update.toolCallId, update.tool_call_id, update.id);
|
|
534
815
|
if (!name && !callId)
|
|
535
816
|
return [];
|
|
536
817
|
const input = serializeToolValue(tool.rawInput ?? tool.input ?? tool.arguments ?? tool.args ?? update.rawInput);
|
|
537
|
-
|
|
818
|
+
// ACP tool results can contain nested text blocks without a rawOutput field.
|
|
819
|
+
const content = tool.content ?? update.content;
|
|
820
|
+
const contentText = Array.isArray(content)
|
|
821
|
+
? content.flatMap((block) => isRecord(block) ? textValue(block.content ?? block) ?? [] : []).join('\n') || undefined
|
|
822
|
+
: undefined;
|
|
823
|
+
const rawOutput = serializeToolValue(tool.rawOutput ?? tool.output ?? tool.result ?? update.rawOutput);
|
|
824
|
+
const output = rawOutput ?? contentText;
|
|
538
825
|
const error = serializeToolValue(tool.error ?? update.error);
|
|
539
826
|
const agentId = firstToolText(tool.agentId, tool.agent_id, update.agentId, update.agent_id);
|
|
540
827
|
const detail = serializeToolValue(tool.detail ?? update.detail ?? update.content);
|
|
541
828
|
const fallback = error !== undefined || type.includes('error') || type.includes('fail')
|
|
542
829
|
? 'failed'
|
|
543
|
-
:
|
|
830
|
+
: rawOutput !== undefined || type.includes('result') || type.includes('complete')
|
|
544
831
|
? 'completed'
|
|
545
832
|
: 'running';
|
|
546
833
|
return [...imageEvents, {
|
|
@@ -587,6 +874,109 @@ function containedPath(root, child) {
|
|
|
587
874
|
const outside = relative(base, candidate);
|
|
588
875
|
return outside === '' || outside === '..' || outside.startsWith(`..${sep}`) || isAbsolute(outside) ? [] : [candidate];
|
|
589
876
|
}
|
|
877
|
+
function isAdmittedGrokFileMutation(name) {
|
|
878
|
+
const key = name.trim().toLowerCase().replace(/[\s-]+/gu, '_');
|
|
879
|
+
return ['write', 'edit', 'search_replace', 'str_replace', 'string_replace'].includes(key);
|
|
880
|
+
}
|
|
881
|
+
/** Admit existing file/bridge authority; shells and unknown requests retain native approval. */
|
|
882
|
+
function isAdmittedGrokPermission(message, input, state, tools) {
|
|
883
|
+
if (message.method !== 'session/request_permission' || input.plan === true)
|
|
884
|
+
return false;
|
|
885
|
+
const mode = input.permission?.sandboxMode;
|
|
886
|
+
if (mode !== 'workspace-write' && mode !== 'danger-full-access')
|
|
887
|
+
return false;
|
|
888
|
+
const params = isRecord(message.params) ? message.params : {};
|
|
889
|
+
const tool = isToolRecord(params.toolCall) ? params.toolCall : {};
|
|
890
|
+
const metadata = isRecord(params._meta) ? params._meta : {};
|
|
891
|
+
if (metadata.risk !== undefined || tool.risk !== undefined)
|
|
892
|
+
return false;
|
|
893
|
+
// Never substitute a persistent grant or invent an option absent from the request.
|
|
894
|
+
if (!Array.isArray(params.options) || !params.options.some(option => isRecord(option)
|
|
895
|
+
&& firstToolText(option.kind, option.type)?.toLowerCase() === 'allow_once'
|
|
896
|
+
&& firstToolText(option.optionId, option.option_id, option.id) !== undefined))
|
|
897
|
+
return false;
|
|
898
|
+
const observed = tools.get(permissionCallId(message) ?? '');
|
|
899
|
+
// Titles become human-readable labels such as "Write `/path`". Keep the
|
|
900
|
+
// canonical identity from the matching call, while MCP wrappers name their
|
|
901
|
+
// inner bridge tool in the permission request itself.
|
|
902
|
+
const title = firstToolText(tool.title);
|
|
903
|
+
const bridgeTitle = title === 'codingns__agent_team' || title === 'codingns__agent_subagent'
|
|
904
|
+
|| title === 'codingns__web_search' || title === 'codingns__web_fetch' ? title : undefined;
|
|
905
|
+
const name = firstToolText(tool.name, tool.toolName, tool.tool_name) ?? bridgeTitle ?? observed?.name ?? title;
|
|
906
|
+
if (name === 'codingns__agent_team')
|
|
907
|
+
return Boolean(state.teamToken && teamBridgeToken(input.sessionId) === state.teamToken);
|
|
908
|
+
if (name === 'codingns__agent_subagent')
|
|
909
|
+
return Boolean(!state.teamToken && state.bridgeToken && getSubagentBridge()?.token === state.bridgeToken);
|
|
910
|
+
if (name === 'codingns__web_search' || name === 'codingns__web_fetch') {
|
|
911
|
+
if (state.teamToken)
|
|
912
|
+
return teamBridgeToken(input.sessionId) === state.teamToken;
|
|
913
|
+
return Boolean(state.bridgeToken && getSubagentBridge()?.token === state.bridgeToken);
|
|
914
|
+
}
|
|
915
|
+
if (!name || !isAdmittedGrokFileMutation(name))
|
|
916
|
+
return false;
|
|
917
|
+
if (observed && observed.name !== name)
|
|
918
|
+
return false;
|
|
919
|
+
const raw = tool.rawInput ?? observed?.input;
|
|
920
|
+
if (!isRecord(raw))
|
|
921
|
+
return false;
|
|
922
|
+
const paths = ['file_path', 'target_file', 'path'].flatMap(key => raw[key] === undefined ? [] : [raw[key]]);
|
|
923
|
+
if (!paths.length || paths.some(path => typeof path !== 'string' || !path.trim() || path.includes('\0')))
|
|
924
|
+
return false;
|
|
925
|
+
if (!input.cwd || !isAbsolute(input.cwd))
|
|
926
|
+
return false;
|
|
927
|
+
const root = canonicalGrokPath(input.cwd);
|
|
928
|
+
if (!root)
|
|
929
|
+
return false;
|
|
930
|
+
return paths.every(path => {
|
|
931
|
+
// Keep dot segments until realpath resolves existing symlink ancestors.
|
|
932
|
+
const target = canonicalGrokPath(isAbsolute(path) ? path : `${input.cwd}${sep}${path}`);
|
|
933
|
+
if (!target)
|
|
934
|
+
return false;
|
|
935
|
+
const outside = relative(root, target);
|
|
936
|
+
return mode === 'danger-full-access' || outside !== '' && outside !== '..' && !outside.startsWith(`..${sep}`) && !isAbsolute(outside);
|
|
937
|
+
});
|
|
938
|
+
}
|
|
939
|
+
/** Resolve existing ancestors, rejecting broken links and non-missing filesystem errors. */
|
|
940
|
+
function canonicalGrokPath(path) {
|
|
941
|
+
const suffix = [];
|
|
942
|
+
let current = path;
|
|
943
|
+
for (;;) {
|
|
944
|
+
try {
|
|
945
|
+
lstatSync(current);
|
|
946
|
+
}
|
|
947
|
+
catch (error) {
|
|
948
|
+
if (error.code !== 'ENOENT' || dirname(current) === current)
|
|
949
|
+
return undefined;
|
|
950
|
+
suffix.unshift(basename(current));
|
|
951
|
+
current = dirname(current);
|
|
952
|
+
continue;
|
|
953
|
+
}
|
|
954
|
+
try {
|
|
955
|
+
return resolve(realpathSync.native(current), ...suffix);
|
|
956
|
+
}
|
|
957
|
+
catch {
|
|
958
|
+
return undefined;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
/** Cache metadata enriches only IDs admitted by the native CLI's filtered list. */
|
|
963
|
+
function readGrokModelMetadata(path) {
|
|
964
|
+
const result = new Map();
|
|
965
|
+
try {
|
|
966
|
+
const value = JSON.parse(readFileSync(path, 'utf8'));
|
|
967
|
+
if (!isRecord(value) || !isRecord(value.models))
|
|
968
|
+
return result;
|
|
969
|
+
for (const entry of Object.values(value.models)) {
|
|
970
|
+
if (!isRecord(entry) || !isRecord(entry.info) || typeof entry.info.id !== 'string')
|
|
971
|
+
continue;
|
|
972
|
+
const info = entry.info;
|
|
973
|
+
const efforts = Array.isArray(info.reasoning_efforts) ? info.reasoning_efforts.flatMap(effort => typeof effort === 'string' ? [effort] : isRecord(effort) && typeof effort.id === 'string' ? [effort.id] : []) : [];
|
|
974
|
+
result.set(info.id, { name: typeof info.name === 'string' ? info.name : info.id, efforts });
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
catch { /* Metadata is optional and never adds selectable model IDs. */ }
|
|
978
|
+
return result;
|
|
979
|
+
}
|
|
590
980
|
function permissionRequestId(message) {
|
|
591
981
|
const params = isRecord(message.params) ? message.params : message;
|
|
592
982
|
const update = isRecord(params.update) ? params.update : params;
|
|
@@ -599,6 +989,12 @@ function permissionRequestId(message) {
|
|
|
599
989
|
function interactionRequestId(message) {
|
|
600
990
|
return permissionRequestId(message);
|
|
601
991
|
}
|
|
992
|
+
function permissionCallId(message) {
|
|
993
|
+
const params = isRecord(message.params) ? message.params : message;
|
|
994
|
+
const update = isRecord(params.update) ? params.update : params;
|
|
995
|
+
const tool = isRecord(update.toolCall) ? update.toolCall : isRecord(update.tool_call) ? update.tool_call : update;
|
|
996
|
+
return firstToolText(tool.toolCallId, tool.tool_call_id, tool.callId, tool.call_id);
|
|
997
|
+
}
|
|
602
998
|
function permissionOptions(message) {
|
|
603
999
|
const params = isRecord(message.params) ? message.params : {};
|
|
604
1000
|
const options = Array.isArray(params.options) ? params.options : [];
|
|
@@ -610,9 +1006,17 @@ function permissionOptions(message) {
|
|
|
610
1006
|
return [];
|
|
611
1007
|
return [{ id, kind: firstToolText(option.kind, option.type)?.toLowerCase() ?? '' }];
|
|
612
1008
|
});
|
|
1009
|
+
if (ids.length === 0)
|
|
1010
|
+
return { allowOptionId: 'allow-once', rejectOptionId: 'reject-once' };
|
|
1011
|
+
// Grok lists allow_always before allow_once. A DSH one-time approval must
|
|
1012
|
+
// never become a persistent grant merely because of provider option order.
|
|
613
1013
|
return {
|
|
614
|
-
allowOptionId: ids.find((option) =>
|
|
615
|
-
|
|
1014
|
+
allowOptionId: ids.find((option) => option.kind === 'allow_once')?.id
|
|
1015
|
+
?? ids.find((option) => /^(allow|approve|accept)$/u.test(option.kind))?.id
|
|
1016
|
+
?? (ids[0]?.kind === '' ? ids[0].id : undefined),
|
|
1017
|
+
rejectOptionId: ids.find((option) => option.kind === 'reject_once')?.id
|
|
1018
|
+
?? ids.find((option) => /^(reject|deny|decline|cancel)$/u.test(option.kind))?.id
|
|
1019
|
+
?? (ids[1]?.kind === '' ? ids[1].id : undefined),
|
|
616
1020
|
};
|
|
617
1021
|
}
|
|
618
1022
|
function readSessionId(value) {
|