@jingyi0605/codingns4dsh 0.2.0-beta.1 → 0.2.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +29 -12
- package/README.md +22 -13
- package/assets/provider-icons/minimax-code.svg +4 -0
- package/assets/provider-icons/zcode.svg +14 -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 -0
- package/data/build/dist/bootstrap/dsh-connection-adapter.js.map +1 -0
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.d.ts +50 -0
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.d.ts.map +1 -0
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js +239 -0
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js.map +1 -0
- package/data/build/dist/bootstrap/index.d.ts +3 -1
- package/data/build/dist/bootstrap/index.d.ts.map +1 -0
- package/data/build/dist/bootstrap/index.js +1 -0
- package/data/build/dist/bootstrap/index.js.map +1 -0
- package/data/build/dist/client/account-bar.d.ts +8 -1
- package/data/build/dist/client/account-bar.d.ts.map +1 -0
- package/data/build/dist/client/account-bar.js +166 -79
- package/data/build/dist/client/account-bar.js.map +1 -0
- package/data/build/dist/client/bundle.js +16641 -8889
- package/data/build/dist/client/bundle.js.map +1 -0
- package/data/build/dist/client/cli-catalog.d.ts.map +1 -0
- package/data/build/dist/client/cli-catalog.js.map +1 -0
- package/data/build/dist/client/cli-slots.d.ts.map +1 -0
- package/data/build/dist/client/cli-slots.js +32 -13
- package/data/build/dist/client/cli-slots.js.map +1 -0
- package/data/build/dist/client/context-breakdown-dom.d.ts.map +1 -0
- package/data/build/dist/client/context-breakdown-dom.js.map +1 -0
- package/data/build/dist/client/debug/ui.d.ts +2 -1
- package/data/build/dist/client/debug/ui.d.ts.map +1 -0
- package/data/build/dist/client/debug/ui.js +40 -33
- package/data/build/dist/client/debug/ui.js.map +1 -0
- package/data/build/dist/client/delegate-command.d.ts +16 -0
- package/data/build/dist/client/delegate-command.d.ts.map +1 -0
- package/data/build/dist/client/delegate-command.js +138 -0
- package/data/build/dist/client/delegate-command.js.map +1 -0
- package/data/build/dist/client/delegate-plan.d.ts +31 -0
- package/data/build/dist/client/delegate-plan.d.ts.map +1 -0
- package/data/build/dist/client/delegate-plan.js +59 -0
- package/data/build/dist/client/delegate-plan.js.map +1 -0
- package/data/build/dist/client/delegate-ui-dom.d.ts +40 -0
- package/data/build/dist/client/delegate-ui-dom.d.ts.map +1 -0
- package/data/build/dist/client/delegate-ui-dom.js +363 -0
- package/data/build/dist/client/delegate-ui-dom.js.map +1 -0
- package/data/build/dist/client/dsh-h5-bootstrap.d.ts.map +1 -0
- package/data/build/dist/client/dsh-h5-bootstrap.js +12 -5
- package/data/build/dist/client/dsh-h5-bootstrap.js.map +1 -0
- package/data/build/dist/client/dsh-runtime-version.d.ts +3 -2
- package/data/build/dist/client/dsh-runtime-version.d.ts.map +1 -0
- package/data/build/dist/client/dsh-runtime-version.js +7 -6
- package/data/build/dist/client/dsh-runtime-version.js.map +1 -0
- package/data/build/dist/client/external-tool-stream.d.ts.map +1 -0
- package/data/build/dist/client/external-tool-stream.js +44 -36
- package/data/build/dist/client/external-tool-stream.js.map +1 -0
- package/data/build/dist/client/features/cli-adapters.d.ts +7 -2
- package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -0
- package/data/build/dist/client/features/cli-adapters.js +59 -105
- package/data/build/dist/client/features/cli-adapters.js.map +1 -0
- package/data/build/dist/client/features/debug.d.ts.map +1 -0
- package/data/build/dist/client/features/debug.js +6 -4
- package/data/build/dist/client/features/debug.js.map +1 -0
- package/data/build/dist/client/features/file-management-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/file-management-panel.js.map +1 -0
- package/data/build/dist/client/features/file-management.d.ts.map +1 -0
- package/data/build/dist/client/features/file-management.js +8 -5
- package/data/build/dist/client/features/file-management.js.map +1 -0
- package/data/build/dist/client/features/index.d.ts +4 -2
- package/data/build/dist/client/features/index.d.ts.map +1 -0
- package/data/build/dist/client/features/index.js +5 -2
- package/data/build/dist/client/features/index.js.map +1 -0
- package/data/build/dist/client/features/lan-access-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/lan-access-panel.js +89 -11
- package/data/build/dist/client/features/lan-access-panel.js.map +1 -0
- package/data/build/dist/client/features/lan-access-status.d.ts +40 -0
- package/data/build/dist/client/features/lan-access-status.d.ts.map +1 -0
- package/data/build/dist/client/features/lan-access-status.js +118 -0
- package/data/build/dist/client/features/lan-access-status.js.map +1 -0
- package/data/build/dist/client/features/lan-access.d.ts +4 -1
- package/data/build/dist/client/features/lan-access.d.ts.map +1 -0
- package/data/build/dist/client/features/lan-access.js +35 -5
- package/data/build/dist/client/features/lan-access.js.map +1 -0
- package/data/build/dist/client/features/login-protection-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/login-protection-panel.js +9 -7
- package/data/build/dist/client/features/login-protection-panel.js.map +1 -0
- package/data/build/dist/client/features/login-protection-session.d.ts.map +1 -0
- package/data/build/dist/client/features/login-protection-session.js.map +1 -0
- package/data/build/dist/client/features/login-protection.d.ts.map +1 -0
- package/data/build/dist/client/features/login-protection.js +3 -3
- package/data/build/dist/client/features/login-protection.js.map +1 -0
- package/data/build/dist/client/features/mobile-access-panel.d.ts +12 -0
- package/data/build/dist/client/features/mobile-access-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/mobile-access-panel.js +259 -0
- package/data/build/dist/client/features/mobile-access-panel.js.map +1 -0
- package/data/build/dist/client/features/mobile-access.d.ts +13 -0
- package/data/build/dist/client/features/mobile-access.d.ts.map +1 -0
- package/data/build/dist/client/features/mobile-access.js +79 -0
- package/data/build/dist/client/features/mobile-access.js.map +1 -0
- package/data/build/dist/client/features/peer-host.d.ts +35 -1
- package/data/build/dist/client/features/peer-host.d.ts.map +1 -0
- package/data/build/dist/client/features/peer-host.js +599 -56
- package/data/build/dist/client/features/peer-host.js.map +1 -0
- package/data/build/dist/client/features/reverse-proxy-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/reverse-proxy-panel.js +2 -1
- package/data/build/dist/client/features/reverse-proxy-panel.js.map +1 -0
- package/data/build/dist/client/features/reverse-proxy.d.ts.map +1 -0
- package/data/build/dist/client/features/reverse-proxy.js +3 -3
- package/data/build/dist/client/features/reverse-proxy.js.map +1 -0
- package/data/build/dist/client/features/subscription-usage-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/subscription-usage-panel.js.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement-panel.js.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement.d.ts.map +1 -0
- package/data/build/dist/client/features/terminal-enhancement.js +3 -3
- package/data/build/dist/client/features/terminal-enhancement.js.map +1 -0
- package/data/build/dist/client/features/types.d.ts +12 -0
- package/data/build/dist/client/features/types.d.ts.map +1 -0
- package/data/build/dist/client/features/types.js.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement-panel.d.ts.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement-panel.js +5 -2
- package/data/build/dist/client/features/workspace-session-enhancement-panel.js.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement.d.ts.map +1 -0
- package/data/build/dist/client/features/workspace-session-enhancement.js +24 -6
- package/data/build/dist/client/features/workspace-session-enhancement.js.map +1 -0
- package/data/build/dist/client/file-management-dom.d.ts +5 -0
- package/data/build/dist/client/file-management-dom.d.ts.map +1 -0
- package/data/build/dist/client/file-management-dom.js +78 -38
- package/data/build/dist/client/file-management-dom.js.map +1 -0
- package/data/build/dist/client/git-history-graph.d.ts +81 -0
- package/data/build/dist/client/git-history-graph.d.ts.map +1 -0
- package/data/build/dist/client/git-history-graph.js +195 -0
- package/data/build/dist/client/git-history-graph.js.map +1 -0
- package/data/build/dist/client/git-management.d.ts +2 -0
- package/data/build/dist/client/git-management.d.ts.map +1 -0
- package/data/build/dist/client/git-management.js +284 -108
- package/data/build/dist/client/git-management.js.map +1 -0
- package/data/build/dist/client/git-panel-styles.d.ts +28 -0
- package/data/build/dist/client/git-panel-styles.d.ts.map +1 -0
- package/data/build/dist/client/git-panel-styles.js +95 -0
- package/data/build/dist/client/git-panel-styles.js.map +1 -0
- package/data/build/dist/client/git-workspace-events.d.ts +7 -0
- package/data/build/dist/client/git-workspace-events.d.ts.map +1 -0
- package/data/build/dist/client/git-workspace-events.js +32 -0
- package/data/build/dist/client/git-workspace-events.js.map +1 -0
- package/data/build/dist/client/h5-bootstrap-entry.d.ts.map +1 -0
- package/data/build/dist/client/h5-bootstrap-entry.js.map +1 -0
- package/data/build/dist/client/host-router.d.ts.map +1 -0
- package/data/build/dist/client/host-router.js.map +1 -0
- package/data/build/dist/client/index.d.ts +7 -4
- package/data/build/dist/client/index.d.ts.map +1 -0
- package/data/build/dist/client/index.js +16 -9
- package/data/build/dist/client/index.js.map +1 -0
- package/data/build/dist/client/lan-access.d.ts.map +1 -0
- package/data/build/dist/client/lan-access.js.map +1 -0
- package/data/build/dist/client/locale.d.ts +7 -0
- package/data/build/dist/client/locale.d.ts.map +1 -0
- package/data/build/dist/client/locale.js +231 -47
- package/data/build/dist/client/locale.js.map +1 -0
- package/data/build/dist/client/locales/debug.d.ts +9 -0
- package/data/build/dist/client/locales/debug.d.ts.map +1 -0
- package/data/build/dist/client/locales/debug.js +163 -0
- package/data/build/dist/client/locales/debug.js.map +1 -0
- package/data/build/dist/client/locales/fileWorkspace.d.ts +9 -0
- package/data/build/dist/client/locales/fileWorkspace.d.ts.map +1 -0
- package/data/build/dist/client/locales/fileWorkspace.js +139 -0
- package/data/build/dist/client/locales/fileWorkspace.js.map +1 -0
- package/data/build/dist/client/locales/git.d.ts +9 -0
- package/data/build/dist/client/locales/git.d.ts.map +1 -0
- package/data/build/dist/client/locales/git.js +223 -0
- package/data/build/dist/client/locales/git.js.map +1 -0
- package/data/build/dist/client/locales/panels.d.ts +9 -0
- package/data/build/dist/client/locales/panels.d.ts.map +1 -0
- package/data/build/dist/client/locales/panels.js +33 -0
- package/data/build/dist/client/locales/panels.js.map +1 -0
- package/data/build/dist/client/locales/peerHost.d.ts +9 -0
- package/data/build/dist/client/locales/peerHost.d.ts.map +1 -0
- package/data/build/dist/client/locales/peerHost.js +153 -0
- package/data/build/dist/client/locales/peerHost.js.map +1 -0
- package/data/build/dist/client/locales/peerHostWorkspace.d.ts +9 -0
- package/data/build/dist/client/locales/peerHostWorkspace.d.ts.map +1 -0
- package/data/build/dist/client/locales/peerHostWorkspace.js +69 -0
- package/data/build/dist/client/locales/peerHostWorkspace.js.map +1 -0
- package/data/build/dist/client/locales/terminalAuth.d.ts +9 -0
- package/data/build/dist/client/locales/terminalAuth.d.ts.map +1 -0
- package/data/build/dist/client/locales/terminalAuth.js +67 -0
- package/data/build/dist/client/locales/terminalAuth.js.map +1 -0
- package/data/build/dist/client/locales/usage.d.ts +9 -0
- package/data/build/dist/client/locales/usage.d.ts.map +1 -0
- package/data/build/dist/client/locales/usage.js +195 -0
- package/data/build/dist/client/locales/usage.js.map +1 -0
- package/data/build/dist/client/mobile-session-interaction.d.ts +44 -0
- package/data/build/dist/client/mobile-session-interaction.d.ts.map +1 -0
- package/data/build/dist/client/mobile-session-interaction.js +291 -0
- package/data/build/dist/client/mobile-session-interaction.js.map +1 -0
- package/data/build/dist/client/mobile-settings-modal-dom.d.ts +49 -0
- package/data/build/dist/client/mobile-settings-modal-dom.d.ts.map +1 -0
- package/data/build/dist/client/mobile-settings-modal-dom.js +152 -0
- package/data/build/dist/client/mobile-settings-modal-dom.js.map +1 -0
- package/data/build/dist/client/mobile-sidebar-gestures.d.ts +97 -0
- package/data/build/dist/client/mobile-sidebar-gestures.d.ts.map +1 -0
- package/data/build/dist/client/mobile-sidebar-gestures.js +316 -0
- package/data/build/dist/client/mobile-sidebar-gestures.js.map +1 -0
- package/data/build/dist/client/mobile-sidebar-logo.d.ts +18 -0
- package/data/build/dist/client/mobile-sidebar-logo.d.ts.map +1 -0
- package/data/build/dist/client/mobile-sidebar-logo.js +15 -0
- package/data/build/dist/client/mobile-sidebar-logo.js.map +1 -0
- package/data/build/dist/client/mobile-sidebar-rail-dom.d.ts +114 -0
- package/data/build/dist/client/mobile-sidebar-rail-dom.d.ts.map +1 -0
- package/data/build/dist/client/mobile-sidebar-rail-dom.js +452 -0
- package/data/build/dist/client/mobile-sidebar-rail-dom.js.map +1 -0
- package/data/build/dist/client/mobile-vibration.d.ts +16 -0
- package/data/build/dist/client/mobile-vibration.d.ts.map +1 -0
- package/data/build/dist/client/mobile-vibration.js +20 -0
- package/data/build/dist/client/mobile-vibration.js.map +1 -0
- package/data/build/dist/client/native-workspace-store.d.ts +29 -0
- package/data/build/dist/client/native-workspace-store.d.ts.map +1 -0
- package/data/build/dist/client/native-workspace-store.js +64 -0
- package/data/build/dist/client/native-workspace-store.js.map +1 -0
- package/data/build/dist/client/peer-host-aggregate-refresh.d.ts +13 -0
- package/data/build/dist/client/peer-host-aggregate-refresh.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-aggregate-refresh.js +14 -0
- package/data/build/dist/client/peer-host-aggregate-refresh.js.map +1 -0
- package/data/build/dist/client/peer-host-color.d.ts +13 -0
- package/data/build/dist/client/peer-host-color.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-color.js +57 -0
- package/data/build/dist/client/peer-host-color.js.map +1 -0
- package/data/build/dist/client/peer-host-connection-button.d.ts +14 -1
- package/data/build/dist/client/peer-host-connection-button.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-connection-button.js +18 -7
- package/data/build/dist/client/peer-host-connection-button.js.map +1 -0
- package/data/build/dist/client/peer-host-management-api.d.ts +34 -0
- package/data/build/dist/client/peer-host-management-api.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-management-api.js +12 -0
- package/data/build/dist/client/peer-host-management-api.js.map +1 -0
- package/data/build/dist/client/peer-host-management-panel.d.ts +4 -1
- package/data/build/dist/client/peer-host-management-panel.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-management-panel.js +533 -94
- package/data/build/dist/client/peer-host-management-panel.js.map +1 -0
- package/data/build/dist/client/peer-host-native-projection.d.ts +47 -0
- package/data/build/dist/client/peer-host-native-projection.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-native-projection.js +142 -0
- package/data/build/dist/client/peer-host-native-projection.js.map +1 -0
- package/data/build/dist/client/peer-host-native-store-projection.d.ts +21 -0
- package/data/build/dist/client/peer-host-native-store-projection.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-native-store-projection.js +114 -0
- package/data/build/dist/client/peer-host-native-store-projection.js.map +1 -0
- package/data/build/dist/client/peer-host-scoped-client.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-scoped-client.js +5 -5
- package/data/build/dist/client/peer-host-scoped-client.js.map +1 -0
- package/data/build/dist/client/peer-host-session-controller.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-session-controller.js.map +1 -0
- package/data/build/dist/client/peer-host-workspace-tab.d.ts +52 -0
- package/data/build/dist/client/peer-host-workspace-tab.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-workspace-tab.js +492 -0
- package/data/build/dist/client/peer-host-workspace-tab.js.map +1 -0
- package/data/build/dist/client/peer-host-workspace-tag.d.ts +47 -0
- package/data/build/dist/client/peer-host-workspace-tag.d.ts.map +1 -0
- package/data/build/dist/client/peer-host-workspace-tag.js +207 -0
- package/data/build/dist/client/peer-host-workspace-tag.js.map +1 -0
- package/data/build/dist/client/popup-dismiss.d.ts +48 -0
- package/data/build/dist/client/popup-dismiss.d.ts.map +1 -0
- package/data/build/dist/client/popup-dismiss.js +93 -0
- package/data/build/dist/client/popup-dismiss.js.map +1 -0
- package/data/build/dist/client/provider-icon-assets.d.ts.map +1 -0
- package/data/build/dist/client/provider-icon-assets.js +4 -0
- package/data/build/dist/client/provider-icon-assets.js.map +1 -0
- package/data/build/dist/client/provider-icons.d.ts +18 -3
- package/data/build/dist/client/provider-icons.d.ts.map +1 -0
- package/data/build/dist/client/provider-icons.js +30 -14
- package/data/build/dist/client/provider-icons.js.map +1 -0
- package/data/build/dist/client/pwa-install-prompt.d.ts +76 -0
- package/data/build/dist/client/pwa-install-prompt.d.ts.map +1 -0
- package/data/build/dist/client/pwa-install-prompt.js +179 -0
- package/data/build/dist/client/pwa-install-prompt.js.map +1 -0
- package/data/build/dist/client/pwa-notifications.d.ts +105 -0
- package/data/build/dist/client/pwa-notifications.d.ts.map +1 -0
- package/data/build/dist/client/pwa-notifications.js +192 -0
- package/data/build/dist/client/pwa-notifications.js.map +1 -0
- package/data/build/dist/client/quick-phrase-layout.d.ts +11 -0
- package/data/build/dist/client/quick-phrase-layout.d.ts.map +1 -0
- package/data/build/dist/client/quick-phrase-layout.js +20 -0
- package/data/build/dist/client/quick-phrase-layout.js.map +1 -0
- package/data/build/dist/client/quick-phrase-slot.d.ts.map +1 -0
- package/data/build/dist/client/quick-phrase-slot.js +20 -8
- package/data/build/dist/client/quick-phrase-slot.js.map +1 -0
- package/data/build/dist/client/remote-web-context.d.ts.map +1 -0
- package/data/build/dist/client/remote-web-context.js.map +1 -0
- package/data/build/dist/client/session-adapter-cache.d.ts.map +1 -0
- package/data/build/dist/client/session-adapter-cache.js.map +1 -0
- package/data/build/dist/client/session-changed-files-view.d.ts +8 -1
- package/data/build/dist/client/session-changed-files-view.d.ts.map +1 -0
- package/data/build/dist/client/session-changed-files-view.js +71 -28
- package/data/build/dist/client/session-changed-files-view.js.map +1 -0
- package/data/build/dist/client/settings-anchor.d.ts +73 -0
- package/data/build/dist/client/settings-anchor.d.ts.map +1 -0
- package/data/build/dist/client/settings-anchor.js +70 -0
- package/data/build/dist/client/settings-anchor.js.map +1 -0
- package/data/build/dist/client/settings-bridge.d.ts.map +1 -0
- package/data/build/dist/client/settings-bridge.js.map +1 -0
- package/data/build/dist/client/settings-section.d.ts.map +1 -0
- package/data/build/dist/client/settings-section.js +19 -5
- package/data/build/dist/client/settings-section.js.map +1 -0
- package/data/build/dist/client/subscription-slot.d.ts +4 -1
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -0
- package/data/build/dist/client/subscription-slot.js +328 -69
- package/data/build/dist/client/subscription-slot.js.map +1 -0
- package/data/build/dist/client/terminal/index.d.ts.map +1 -0
- package/data/build/dist/client/terminal/index.js.map +1 -0
- package/data/build/dist/client/terminal/model.d.ts +13 -2
- package/data/build/dist/client/terminal/model.d.ts.map +1 -0
- package/data/build/dist/client/terminal/model.js +27 -7
- package/data/build/dist/client/terminal/model.js.map +1 -0
- package/data/build/dist/client/terminal/recovery.d.ts.map +1 -0
- package/data/build/dist/client/terminal/recovery.js.map +1 -0
- package/data/build/dist/client/terminal/styles.d.ts.map +1 -0
- package/data/build/dist/client/terminal/styles.js.map +1 -0
- package/data/build/dist/client/terminal/ui.d.ts.map +1 -0
- package/data/build/dist/client/terminal/ui.js +3 -1
- package/data/build/dist/client/terminal/ui.js.map +1 -0
- package/data/build/dist/client/terminal/xterm-view.d.ts +4 -1
- package/data/build/dist/client/terminal/xterm-view.d.ts.map +1 -0
- package/data/build/dist/client/terminal/xterm-view.js +19 -17
- package/data/build/dist/client/terminal/xterm-view.js.map +1 -0
- package/data/build/dist/client/theme.d.ts +17 -5
- package/data/build/dist/client/theme.d.ts.map +1 -0
- package/data/build/dist/client/theme.js +35 -13
- package/data/build/dist/client/theme.js.map +1 -0
- package/data/build/dist/client/workspace-session-archive-dom.d.ts +17 -0
- package/data/build/dist/client/workspace-session-archive-dom.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-archive-dom.js +192 -47
- package/data/build/dist/client/workspace-session-archive-dom.js.map +1 -0
- package/data/build/dist/client/workspace-session-fiber.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-fiber.js.map +1 -0
- package/data/build/dist/client/workspace-session-logo-dom.d.ts +3 -0
- package/data/build/dist/client/workspace-session-logo-dom.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-logo-dom.js +3 -1
- package/data/build/dist/client/workspace-session-logo-dom.js.map +1 -0
- package/data/build/dist/client/workspace-session-rightbar-dom.d.ts.map +1 -0
- package/data/build/dist/client/workspace-session-rightbar-dom.js.map +1 -0
- 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 -0
- package/data/build/dist/client/workspace-session-visibility-dom.js +46 -17
- package/data/build/dist/client/workspace-session-visibility-dom.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/conversation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/conversation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/locale-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/locale-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js +20 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/theme-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/theme-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/typert-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/typert-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/typert-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/typert-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/index.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/index.js.map +1 -0
- package/data/build/dist/dsh-capabilities/matrix.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/matrix.js +44 -31
- package/data/build/dist/dsh-capabilities/matrix.js.map +1 -0
- package/data/build/dist/dsh-capabilities/registry.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/registry.js +6 -2
- package/data/build/dist/dsh-capabilities/registry.js.map +1 -0
- package/data/build/dist/dsh-capabilities/routes.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/routes.js +96 -11
- package/data/build/dist/dsh-capabilities/routes.js.map +1 -0
- package/data/build/dist/dsh-capabilities/settings-store.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/settings-store.js.map +1 -0
- package/data/build/dist/dsh-capabilities/types.d.ts +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/types.js.map +1 -0
- package/data/build/dist/features/host-router.d.ts.map +1 -0
- package/data/build/dist/features/host-router.js.map +1 -0
- package/data/build/dist/features/index.d.ts.map +1 -0
- package/data/build/dist/features/index.js.map +1 -0
- package/data/build/dist/features/registry.d.ts.map +1 -0
- package/data/build/dist/features/registry.js.map +1 -0
- package/data/build/dist/features/resource-scope/index.d.ts.map +1 -0
- package/data/build/dist/features/resource-scope/index.js.map +1 -0
- package/data/build/dist/host/auth-session.d.ts.map +1 -0
- package/data/build/dist/host/auth-session.js.map +1 -0
- package/data/build/dist/host/browser-text.d.ts +30 -0
- package/data/build/dist/host/browser-text.d.ts.map +1 -0
- package/data/build/dist/host/browser-text.js +105 -0
- package/data/build/dist/host/browser-text.js.map +1 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts +14 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.js +78 -0
- package/data/build/dist/host/cli-adapters/attachment-utils.js.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts +28 -2
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-driver.js +78 -5
- package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-model-options.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/claude-model-options.js +22 -9
- package/data/build/dist/host/cli-adapters/claude-model-options.js.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts +10 -0
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-driver.js +352 -49
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts +24 -2
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-driver.js +296 -34
- package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/command-code-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/delegate-dispatch.d.ts +47 -0
- package/data/build/dist/host/cli-adapters/delegate-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/delegate-dispatch.js +158 -0
- package/data/build/dist/host/cli-adapters/delegate-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts +32 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js +121 -0
- package/data/build/dist/host/cli-adapters/desktop-app-runtime.js.map +1 -0
- package/data/build/dist/host/cli-adapters/driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js +5 -4
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-tool-history.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js +49 -1
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.d.ts +16 -0
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.js +73 -0
- package/data/build/dist/host/cli-adapters/dsh-virtual-providers.js.map +1 -0
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/feature.js +348 -19
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -0
- package/data/build/dist/host/cli-adapters/gemini-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/gemini-driver.js +27 -8
- package/data/build/dist/host/cli-adapters/gemini-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/grok-driver.js +27 -9
- package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/http-sse-client.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/http-sse-client.js.map +1 -0
- package/data/build/dist/host/cli-adapters/interaction-events.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/interaction-events.js.map +1 -0
- package/data/build/dist/host/cli-adapters/json-rpc-process.d.ts +22 -6
- package/data/build/dist/host/cli-adapters/json-rpc-process.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/json-rpc-process.js +118 -21
- package/data/build/dist/host/cli-adapters/json-rpc-process.js.map +1 -0
- package/data/build/dist/host/cli-adapters/kimi-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/kimi-driver.js +33 -7
- package/data/build/dist/host/cli-adapters/kimi-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts +11 -2
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js +15 -6
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-settings.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/legacy-session-settings.js.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-catalog.d.ts +23 -0
- package/data/build/dist/host/cli-adapters/mcode-catalog.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-catalog.js +120 -0
- package/data/build/dist/host/cli-adapters/mcode-catalog.js.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.d.ts +56 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.js +544 -0
- package/data/build/dist/host/cli-adapters/mcode-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts +30 -5
- package/data/build/dist/host/cli-adapters/model-catalog.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/model-catalog.js +83 -8
- package/data/build/dist/host/cli-adapters/model-catalog.js.map +1 -0
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts +51 -0
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js +193 -0
- package/data/build/dist/host/cli-adapters/native-subagent-dispatch.js.map +1 -0
- package/data/build/dist/host/cli-adapters/native-subagent-holder.d.ts +4 -0
- package/data/build/dist/host/cli-adapters/native-subagent-holder.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/native-subagent-holder.js +4 -0
- package/data/build/dist/host/cli-adapters/native-subagent-holder.js.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-proxy.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-proxy.js +18 -15
- package/data/build/dist/host/cli-adapters/native-team-proxy.js.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts +45 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.js +107 -0
- package/data/build/dist/host/cli-adapters/native-team-subagent.js.map +1 -0
- package/data/build/dist/host/cli-adapters/official-provider-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/official-provider-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.js +20 -4
- package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/pi-driver.js +30 -8
- package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/process-utils.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/process-utils.js.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-registry.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-registry.js.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts +8 -1
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.js +98 -2
- package/data/build/dist/host/cli-adapters/provider-subscription.js.map +1 -0
- package/data/build/dist/host/cli-adapters/registry-holder.d.ts +4 -0
- package/data/build/dist/host/cli-adapters/registry-holder.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/registry-holder.js +9 -0
- package/data/build/dist/host/cli-adapters/registry-holder.js.map +1 -0
- package/data/build/dist/host/cli-adapters/registry.d.ts +13 -0
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/registry.js +37 -0
- package/data/build/dist/host/cli-adapters/registry.js.map +1 -0
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.js.map +1 -0
- package/data/build/dist/host/cli-adapters/session-probe.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/session-probe.js.map +1 -0
- package/data/build/dist/host/cli-adapters/session-store.d.ts +6 -1
- package/data/build/dist/host/cli-adapters/session-store.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/session-store.js +42 -4
- package/data/build/dist/host/cli-adapters/session-store.js.map +1 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js +30 -4
- package/data/build/dist/host/cli-adapters/standard-stream-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.js.map +1 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.d.ts +5 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.js +66 -0
- package/data/build/dist/host/cli-adapters/subagent-tool.js.map +1 -0
- package/data/build/dist/host/cli-adapters/tool-observation.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/tool-observation.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.d.ts +57 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.js +843 -0
- package/data/build/dist/host/cli-adapters/zcode-driver.js.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.d.ts +28 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.js +212 -0
- package/data/build/dist/host/cli-adapters/zcode-subscription.js.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.d.ts +27 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.js +51 -0
- package/data/build/dist/host/cli-bridge/bridge-holder.js.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-server.d.ts +34 -0
- package/data/build/dist/host/cli-bridge/bridge-server.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/bridge-server.js +135 -0
- package/data/build/dist/host/cli-bridge/bridge-server.js.map +1 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.d.ts +25 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.js +60 -0
- package/data/build/dist/host/cli-bridge/command-code-mod.js.map +1 -0
- package/data/build/dist/host/cli-bridge/dispatch.d.ts +19 -0
- package/data/build/dist/host/cli-bridge/dispatch.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/dispatch.js +90 -0
- package/data/build/dist/host/cli-bridge/dispatch.js.map +1 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts +28 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/injections.js +131 -0
- package/data/build/dist/host/cli-bridge/injections.js.map +1 -0
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.d.ts +8 -0
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.d.ts.map +1 -0
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js +151 -0
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js.map +1 -0
- package/data/build/dist/host/control-api-client.d.ts.map +1 -0
- package/data/build/dist/host/control-api-client.js.map +1 -0
- package/data/build/dist/host/credential-store.d.ts.map +1 -0
- package/data/build/dist/host/credential-store.js.map +1 -0
- package/data/build/dist/host/debug.d.ts.map +1 -0
- package/data/build/dist/host/debug.js.map +1 -0
- package/data/build/dist/host/dsh-device-runtime.d.ts.map +1 -0
- package/data/build/dist/host/dsh-device-runtime.js.map +1 -0
- package/data/build/dist/host/dsh-gateway-feature.d.ts.map +1 -0
- package/data/build/dist/host/dsh-gateway-feature.js.map +1 -0
- package/data/build/dist/host/dsh-runtime-version.d.ts.map +1 -0
- package/data/build/dist/host/dsh-runtime-version.js.map +1 -0
- package/data/build/dist/host/features/auth.d.ts.map +1 -0
- package/data/build/dist/host/features/auth.js.map +1 -0
- package/data/build/dist/host/features/debug.d.ts.map +1 -0
- package/data/build/dist/host/features/debug.js.map +1 -0
- package/data/build/dist/host/features/file-management.d.ts.map +1 -0
- package/data/build/dist/host/features/file-management.js.map +1 -0
- package/data/build/dist/host/features/git-management.d.ts.map +1 -0
- package/data/build/dist/host/features/git-management.js +97 -10
- package/data/build/dist/host/features/git-management.js.map +1 -0
- package/data/build/dist/host/features/host-status.d.ts.map +1 -0
- package/data/build/dist/host/features/host-status.js.map +1 -0
- package/data/build/dist/host/features/index.d.ts.map +1 -0
- package/data/build/dist/host/features/index.js.map +1 -0
- package/data/build/dist/host/features/lan-access-dsh.d.ts.map +1 -0
- package/data/build/dist/host/features/lan-access-dsh.js +34 -1
- package/data/build/dist/host/features/lan-access-dsh.js.map +1 -0
- package/data/build/dist/host/features/peer-host.d.ts.map +1 -0
- package/data/build/dist/host/features/peer-host.js +341 -20
- package/data/build/dist/host/features/peer-host.js.map +1 -0
- package/data/build/dist/host/features/terminal-process.d.ts.map +1 -0
- package/data/build/dist/host/features/terminal-process.js.map +1 -0
- package/data/build/dist/host/features/terminal-status.d.ts.map +1 -0
- package/data/build/dist/host/features/terminal-status.js.map +1 -0
- package/data/build/dist/host/features/types.d.ts +3 -0
- package/data/build/dist/host/features/types.d.ts.map +1 -0
- package/data/build/dist/host/features/types.js.map +1 -0
- package/data/build/dist/host/host-router.d.ts.map +1 -0
- package/data/build/dist/host/host-router.js.map +1 -0
- package/data/build/dist/host/index-injection.d.ts +15 -0
- package/data/build/dist/host/index-injection.d.ts.map +1 -0
- package/data/build/dist/host/index-injection.js +45 -0
- package/data/build/dist/host/index-injection.js.map +1 -0
- package/data/build/dist/host/index.d.ts +12 -2
- package/data/build/dist/host/index.d.ts.map +1 -0
- package/data/build/dist/host/index.js +75 -3
- package/data/build/dist/host/index.js.map +1 -0
- package/data/build/dist/host/lan-access-dsh.d.ts +93 -2
- package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -0
- package/data/build/dist/host/lan-access-dsh.js +438 -27
- package/data/build/dist/host/lan-access-dsh.js.map +1 -0
- package/data/build/dist/host/login-attempt-guard.d.ts +55 -0
- package/data/build/dist/host/login-attempt-guard.d.ts.map +1 -0
- package/data/build/dist/host/login-attempt-guard.js +201 -0
- package/data/build/dist/host/login-attempt-guard.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.d.ts +146 -0
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.js +322 -0
- package/data/build/dist/host/modules/peer-host/aggregated-host-transport.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.d.ts +8 -0
- package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.js +120 -0
- package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts +25 -0
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js +26 -3
- package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-ws-connector.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-ws-connector.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-ws-proxy-service.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/host-ws-proxy-service.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts +10 -0
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js +27 -12
- package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js +3 -0
- package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts +2 -0
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.js +6 -0
- package/data/build/dist/host/modules/peer-host/peer-host-handshake.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts +17 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js +52 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts +25 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js +187 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.d.ts +30 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.js +120 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-transport.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-relay.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-relay.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.d.ts +60 -0
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js +181 -0
- package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts +20 -1
- package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-session.js +118 -37
- package/data/build/dist/host/modules/peer-host/peer-host-session.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-store.d.ts +21 -0
- package/data/build/dist/host/modules/peer-host/peer-host-store.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-store.js +65 -3
- package/data/build/dist/host/modules/peer-host/peer-host-store.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.d.ts +49 -0
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.js +174 -0
- package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.js.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-ws-gateway.d.ts.map +1 -0
- package/data/build/dist/host/modules/peer-host/peer-host-ws-gateway.js.map +1 -0
- package/data/build/dist/host/modules/pwa/index.d.ts +7 -0
- package/data/build/dist/host/modules/pwa/index.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/index.js +7 -0
- package/data/build/dist/host/modules/pwa/index.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-assets.d.ts +50 -0
- package/data/build/dist/host/modules/pwa/pwa-assets.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-assets.js +182 -0
- package/data/build/dist/host/modules/pwa/pwa-assets.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-client-script.d.ts +10 -0
- package/data/build/dist/host/modules/pwa/pwa-client-script.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-client-script.js +38 -0
- package/data/build/dist/host/modules/pwa/pwa-client-script.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-icons.d.ts +10 -0
- package/data/build/dist/host/modules/pwa/pwa-icons.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-icons.js +185 -0
- package/data/build/dist/host/modules/pwa/pwa-icons.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-push.d.ts +74 -0
- package/data/build/dist/host/modules/pwa/pwa-push.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-push.js +288 -0
- package/data/build/dist/host/modules/pwa/pwa-push.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.d.ts +17 -0
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.js +82 -0
- package/data/build/dist/host/modules/pwa/pwa-session-notifications.js.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-viewport.d.ts +12 -0
- package/data/build/dist/host/modules/pwa/pwa-viewport.d.ts.map +1 -0
- package/data/build/dist/host/modules/pwa/pwa-viewport.js +47 -0
- package/data/build/dist/host/modules/pwa/pwa-viewport.js.map +1 -0
- package/data/build/dist/host/native-session-bridge.d.ts.map +1 -0
- package/data/build/dist/host/native-session-bridge.js +86 -55
- package/data/build/dist/host/native-session-bridge.js.map +1 -0
- package/data/build/dist/host/relay-tunnel-runtime.d.ts +33 -0
- package/data/build/dist/host/relay-tunnel-runtime.d.ts.map +1 -0
- package/data/build/dist/host/relay-tunnel-runtime.js +71 -19
- package/data/build/dist/host/relay-tunnel-runtime.js.map +1 -0
- package/data/build/dist/host/remote-web-runtime.d.ts.map +1 -0
- package/data/build/dist/host/remote-web-runtime.js.map +1 -0
- package/data/build/dist/host/rpc-table.d.ts.map +1 -0
- package/data/build/dist/host/rpc-table.js.map +1 -0
- package/data/build/dist/host/rpc.d.ts.map +1 -0
- package/data/build/dist/host/rpc.js +21 -6
- package/data/build/dist/host/rpc.js.map +1 -0
- package/data/build/dist/host/session-changes.d.ts.map +1 -0
- package/data/build/dist/host/session-changes.js.map +1 -0
- package/data/build/dist/host/session-migration-repair.d.ts.map +1 -0
- package/data/build/dist/host/session-migration-repair.js.map +1 -0
- package/data/build/dist/host/settings.d.ts.map +1 -0
- package/data/build/dist/host/settings.js +33 -1
- package/data/build/dist/host/settings.js.map +1 -0
- package/data/build/dist/host/terminal/attachment-registry.d.ts.map +1 -0
- package/data/build/dist/host/terminal/attachment-registry.js.map +1 -0
- package/data/build/dist/host/terminal/backends/conpty-backend.d.ts.map +1 -0
- package/data/build/dist/host/terminal/backends/conpty-backend.js.map +1 -0
- package/data/build/dist/host/terminal/backends/local-pty-backend.d.ts.map +1 -0
- package/data/build/dist/host/terminal/backends/local-pty-backend.js.map +1 -0
- package/data/build/dist/host/terminal/backends/tmux-backend.d.ts.map +1 -0
- package/data/build/dist/host/terminal/backends/tmux-backend.js.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-client.d.ts.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-client.js.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-process.d.ts.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-process.js.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-protocol.d.ts.map +1 -0
- package/data/build/dist/host/terminal/broker/conpty-broker-protocol.js.map +1 -0
- package/data/build/dist/host/terminal/controller-factory.d.ts.map +1 -0
- package/data/build/dist/host/terminal/controller-factory.js.map +1 -0
- package/data/build/dist/host/terminal/index.d.ts.map +1 -0
- package/data/build/dist/host/terminal/index.js.map +1 -0
- package/data/build/dist/host/terminal/runtime-adapter.d.ts.map +1 -0
- package/data/build/dist/host/terminal/runtime-adapter.js.map +1 -0
- package/data/build/dist/host/terminal/runtime-manager.d.ts.map +1 -0
- package/data/build/dist/host/terminal/runtime-manager.js.map +1 -0
- package/data/build/dist/host/terminal/shell-detection.d.ts.map +1 -0
- package/data/build/dist/host/terminal/shell-detection.js.map +1 -0
- package/data/build/dist/host/terminal/startup.d.ts.map +1 -0
- package/data/build/dist/host/terminal/startup.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-controller.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-controller.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-process-service.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-process-service.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-process-store.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-process-store.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-service.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-service.js.map +1 -0
- package/data/build/dist/host/terminal/terminal-store.d.ts.map +1 -0
- package/data/build/dist/host/terminal/terminal-store.js.map +1 -0
- package/data/build/dist/index.d.ts +2 -2
- package/data/build/dist/index.d.ts.map +1 -0
- package/data/build/dist/index.js +2 -2
- package/data/build/dist/index.js.map +1 -0
- package/data/build/dist/shared/contracts/auth.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/auth.js.map +1 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +35 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/cli-adapter.js.map +1 -0
- package/data/build/dist/shared/contracts/command-code.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/command-code.js.map +1 -0
- package/data/build/dist/shared/contracts/config.d.ts +89 -0
- package/data/build/dist/shared/contracts/config.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/config.js +92 -0
- package/data/build/dist/shared/contracts/config.js.map +1 -0
- package/data/build/dist/shared/contracts/debug-config.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/debug-config.js.map +1 -0
- package/data/build/dist/shared/contracts/debug.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/debug.js.map +1 -0
- package/data/build/dist/shared/contracts/dsh-device.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/dsh-device.js.map +1 -0
- package/data/build/dist/shared/contracts/errors.d.ts +2 -2
- package/data/build/dist/shared/contracts/errors.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/errors.js.map +1 -0
- package/data/build/dist/shared/contracts/feature.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/feature.js.map +1 -0
- package/data/build/dist/shared/contracts/file-management.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/file-management.js.map +1 -0
- package/data/build/dist/shared/contracts/git.d.ts +15 -1
- package/data/build/dist/shared/contracts/git.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/git.js.map +1 -0
- package/data/build/dist/shared/contracts/host-status.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/host-status.js.map +1 -0
- package/data/build/dist/shared/contracts/lan-access-dsh.d.ts +23 -0
- package/data/build/dist/shared/contracts/lan-access-dsh.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/lan-access-dsh.js.map +1 -0
- package/data/build/dist/shared/contracts/peer-host.d.ts +160 -1
- package/data/build/dist/shared/contracts/peer-host.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/peer-host.js +73 -0
- package/data/build/dist/shared/contracts/peer-host.js.map +1 -0
- package/data/build/dist/shared/contracts/signaling.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/signaling.js.map +1 -0
- package/data/build/dist/shared/contracts/subscription.d.ts +15 -0
- package/data/build/dist/shared/contracts/subscription.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/subscription.js.map +1 -0
- package/data/build/dist/shared/contracts/terminal-process.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/terminal-process.js.map +1 -0
- package/data/build/dist/shared/contracts/terminal.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/terminal.js.map +1 -0
- package/data/build/dist/shared/contracts/transport.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/transport.js.map +1 -0
- package/data/build/dist/shared/contracts/version.d.ts +14 -6
- package/data/build/dist/shared/contracts/version.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/version.js +23 -8
- package/data/build/dist/shared/contracts/version.js.map +1 -0
- package/data/build/dist/shared/debug.d.ts.map +1 -0
- package/data/build/dist/shared/debug.js.map +1 -0
- package/data/build/dist/shared/index.d.ts +6 -6
- package/data/build/dist/shared/index.d.ts.map +1 -0
- package/data/build/dist/shared/index.js +3 -3
- package/data/build/dist/shared/index.js.map +1 -0
- package/data/build/dist/transport/carrier.d.ts.map +1 -0
- package/data/build/dist/transport/carrier.js.map +1 -0
- package/data/build/dist/transport/debug.d.ts.map +1 -0
- package/data/build/dist/transport/debug.js +2 -0
- package/data/build/dist/transport/debug.js.map +1 -0
- package/data/build/dist/transport/dsh-envelope.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-envelope.js.map +1 -0
- package/data/build/dist/transport/dsh-gateway.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-gateway.js.map +1 -0
- package/data/build/dist/transport/dsh-session.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-session.js.map +1 -0
- package/data/build/dist/transport/dsh-transport.d.ts.map +1 -0
- package/data/build/dist/transport/dsh-transport.js.map +1 -0
- package/data/build/dist/transport/frame.d.ts.map +1 -0
- package/data/build/dist/transport/frame.js.map +1 -0
- package/data/build/dist/transport/index.d.ts +1 -1
- package/data/build/dist/transport/index.d.ts.map +1 -0
- package/data/build/dist/transport/index.js +1 -1
- package/data/build/dist/transport/index.js.map +1 -0
- package/data/build/dist/transport/multiplexer.d.ts.map +1 -0
- package/data/build/dist/transport/multiplexer.js.map +1 -0
- package/data/build/dist/transport/webrtc-client.d.ts +8 -0
- package/data/build/dist/transport/webrtc-client.d.ts.map +1 -0
- package/data/build/dist/transport/webrtc-client.js +135 -9
- package/data/build/dist/transport/webrtc-client.js.map +1 -0
- package/data/build/dist/transport/webrtc-host.d.ts.map +1 -0
- package/data/build/dist/transport/webrtc-host.js +5 -1
- package/data/build/dist/transport/webrtc-host.js.map +1 -0
- package/data/build/dist/typert.host.d.ts.map +1 -0
- package/data/build/dist/typert.host.js.map +1 -0
- package/data/build/dist/typert.remote-client.d.ts.map +1 -0
- package/data/build/dist/typert.remote-client.js.map +1 -0
- package/package.json +36 -19
- package/profile/README.md +18 -5
- package/profile/package.json +3 -3
- package/profile/scripts/check-dsh-install.mjs +100 -9
- package/profile/version.json +3 -3
- package/scripts/check-dsh-install.mjs +98 -17
- package/version.json +3 -3
- package/data/build/dist/client/host-navigation.d.ts +0 -29
- package/data/build/dist/client/host-navigation.js +0 -29
- package/data/build/dist/client/peer-host-native-session-ui.d.ts +0 -60
- package/data/build/dist/client/peer-host-native-session-ui.js +0 -372
|
@@ -8,10 +8,14 @@ import { CODEX_CATALOG, isProviderDefaultModel } from './model-catalog.js';
|
|
|
8
8
|
import { probeStoredSession, readFirstJsonRecord } from './session-probe.js';
|
|
9
9
|
import { firstToolText, normalizeToolStatus, serializeToolValue } from './tool-observation.js';
|
|
10
10
|
import { isQuestionEvent, questionAnswersRecord, readAgentQuestions } from './interaction-events.js';
|
|
11
|
+
import { codexBridgeArgs, codexBridgeDeveloperInstructions } from '../cli-bridge/injections.js';
|
|
11
12
|
// 只有 Provider 已明确报告超过窗口时才主动压缩;接近上限仍交给 Codex
|
|
12
13
|
// 自身的 auto-compact,避免对正常的高占用回合重复发起压缩。
|
|
13
14
|
const CODEX_COMPACTION_THRESHOLD = 1;
|
|
14
15
|
const CODEX_COMPACTION_TIMEOUT_MS = 60_000;
|
|
16
|
+
// Codex CLI 默认会启用 computer_use;DSH 没有对应的桌面控制宿主,必须在
|
|
17
|
+
// app-server 进程启动时关闭该 feature,避免模型进入无法完成的控制回合。
|
|
18
|
+
const CODEX_APP_SERVER_ARGS = ['app-server', '--disable', 'computer_use'];
|
|
15
19
|
/** Codex app-server 的 JSON-RPC 驱动,Host 只暴露统一文本流,不暴露线程和 token。 */
|
|
16
20
|
export class CodexAppServerDriver {
|
|
17
21
|
descriptor = { id: 'codex', name: 'Codex', protocol: 'json-rpc', capabilities: ['models', 'stream', 'resume', 'interrupt', 'tool-events', 'reasoning', 'usage', 'permission', 'questions', 'steer'] };
|
|
@@ -42,7 +46,7 @@ export class CodexAppServerDriver {
|
|
|
42
46
|
const command = this.cachedBinary ?? (await this.detect()).command;
|
|
43
47
|
if (command === null)
|
|
44
48
|
return emptyCatalog();
|
|
45
|
-
const rpc = new JsonRpcProcess({ command, args:
|
|
49
|
+
const rpc = new JsonRpcProcess({ command, args: CODEX_APP_SERVER_ARGS, spawn: this.runSpawn });
|
|
46
50
|
const controller = new AbortController();
|
|
47
51
|
const timer = setTimeout(() => controller.abort(), 12_000);
|
|
48
52
|
try {
|
|
@@ -88,12 +92,15 @@ export class CodexAppServerDriver {
|
|
|
88
92
|
const rpc = session.rpc;
|
|
89
93
|
try {
|
|
90
94
|
if (session.threadId === '') {
|
|
95
|
+
const threadParams = codexThreadParams(input);
|
|
91
96
|
const thread = input.providerSessionId
|
|
92
|
-
? await rpc.request('thread/resume', { threadId: input.providerSessionId,
|
|
93
|
-
: await rpc.request('thread/start',
|
|
97
|
+
? await rpc.request('thread/resume', { threadId: input.providerSessionId, ...threadParams }, { signal: input.signal, killOnAbort: false })
|
|
98
|
+
: await rpc.request('thread/start', threadParams, { signal: input.signal, killOnAbort: false });
|
|
94
99
|
session.threadId = readId(thread) ?? input.providerSessionId ?? input.sessionId;
|
|
95
100
|
session.providerSessionId = session.threadId;
|
|
101
|
+
session.threadModelId = readThreadModel(thread);
|
|
96
102
|
}
|
|
103
|
+
await this.alignThreadModel(session, input);
|
|
97
104
|
await this.ensureContextCapacity(session, input);
|
|
98
105
|
yield* drainCompactionEvents(session);
|
|
99
106
|
yield { type: 'session-binding', providerSessionId: session.providerSessionId };
|
|
@@ -102,6 +109,7 @@ export class CodexAppServerDriver {
|
|
|
102
109
|
let turnStartResolved = false;
|
|
103
110
|
const notificationsBeforeTurnStart = [];
|
|
104
111
|
let terminalReason = null;
|
|
112
|
+
let failure;
|
|
105
113
|
let sawMeaningfulEvent = false;
|
|
106
114
|
const acceptNotification = (message, allowUnidentifiedTool) => {
|
|
107
115
|
// Codex 自动压缩可能在独立的内部 turn 中运行。它不属于当前用户 turn,
|
|
@@ -127,6 +135,8 @@ export class CodexAppServerDriver {
|
|
|
127
135
|
const reason = readCodexTerminalReason(message);
|
|
128
136
|
if (reason !== null) {
|
|
129
137
|
terminalReason = reason;
|
|
138
|
+
if (reason === 'error')
|
|
139
|
+
failure = codexFailure(message);
|
|
130
140
|
eventQueue.close();
|
|
131
141
|
}
|
|
132
142
|
};
|
|
@@ -175,10 +185,11 @@ export class CodexAppServerDriver {
|
|
|
175
185
|
const rawChunk = codexMessageToChunk(message);
|
|
176
186
|
if (rawChunk === null)
|
|
177
187
|
continue;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
188
|
+
for (const chunk of expandCodexCompactionChunk(session, rawChunk)) {
|
|
189
|
+
if (chunk.type !== 'finish')
|
|
190
|
+
sawMeaningfulEvent = true;
|
|
191
|
+
yield stabilizeCodexEvent(session, chunk);
|
|
192
|
+
}
|
|
182
193
|
}
|
|
183
194
|
if (input.signal?.aborted)
|
|
184
195
|
await this.interrupt(input.sessionId);
|
|
@@ -196,12 +207,16 @@ export class CodexAppServerDriver {
|
|
|
196
207
|
// 终态 chunk 之后调用方不会再拉动本迭代器,turnId 必须在产出 finish
|
|
197
208
|
// 前复位,否则下一轮 steer/interrupt 会指向已经结束的 turn。
|
|
198
209
|
session.turnId = null;
|
|
210
|
+
const danglingCompaction = closeDanglingAutoCompaction(session);
|
|
211
|
+
if (danglingCompaction !== undefined)
|
|
212
|
+
yield stabilizeCodexEvent(session, danglingCompaction);
|
|
199
213
|
if (!input.signal?.aborted && terminalReason !== 'cancel' && !sawMeaningfulEvent) {
|
|
200
214
|
yield { type: 'text-delta', text: 'CODINGNS_PROVIDER_EMPTY_RESPONSE: Codex Provider 未返回任何有效事件。' };
|
|
201
|
-
yield { type: 'finish', reason: 'error' };
|
|
215
|
+
yield { type: 'finish', reason: 'error', ...(failure === undefined ? {} : { failure }) };
|
|
202
216
|
}
|
|
203
217
|
else {
|
|
204
|
-
|
|
218
|
+
const reason = input.signal?.aborted ? 'cancel' : terminalReason ?? 'stop';
|
|
219
|
+
yield { type: 'finish', reason };
|
|
205
220
|
}
|
|
206
221
|
}
|
|
207
222
|
finally { /* app-server 在会话结束前保持连接。 */ }
|
|
@@ -219,11 +234,13 @@ export class CodexAppServerDriver {
|
|
|
219
234
|
let active;
|
|
220
235
|
try {
|
|
221
236
|
if (session.threadId === '') {
|
|
237
|
+
const threadParams = codexThreadParams(input);
|
|
222
238
|
const thread = input.providerSessionId
|
|
223
|
-
? await rpc.request('thread/resume', { threadId: input.providerSessionId,
|
|
224
|
-
: await rpc.request('thread/start',
|
|
239
|
+
? await rpc.request('thread/resume', { threadId: input.providerSessionId, ...threadParams }, { signal: input.signal, killOnAbort: false })
|
|
240
|
+
: await rpc.request('thread/start', threadParams, { signal: input.signal, killOnAbort: false });
|
|
225
241
|
session.threadId = readId(thread) ?? input.providerSessionId ?? input.sessionId;
|
|
226
242
|
session.providerSessionId = session.threadId;
|
|
243
|
+
session.threadModelId = readThreadModel(thread);
|
|
227
244
|
}
|
|
228
245
|
// 只有 Host 显式声明续段时才复用挂起的 Provider 运行。新用户回合、注入
|
|
229
246
|
// 失败或取消后的下一次执行必须丢弃旧段:旧段要么已经跑完,要么其队列
|
|
@@ -236,8 +253,11 @@ export class CodexAppServerDriver {
|
|
|
236
253
|
if (suspended === undefined && session.segmentedTurn !== undefined) {
|
|
237
254
|
this.closeSegmentedTurn(session, session.segmentedTurn);
|
|
238
255
|
}
|
|
239
|
-
// 分段 step 仍属于同一个 Provider turn;恢复它时不能插入 compact turn
|
|
256
|
+
// 分段 step 仍属于同一个 Provider turn;恢复它时不能插入 compact turn,
|
|
257
|
+
// 也不能改写线程模型(同一个 Provider turn 中途换模型会被 Codex 拒绝)。
|
|
240
258
|
const hasSuspendedTurn = suspended !== undefined;
|
|
259
|
+
if (!hasSuspendedTurn)
|
|
260
|
+
await this.alignThreadModel(session, input);
|
|
241
261
|
if (!hasSuspendedTurn)
|
|
242
262
|
await this.ensureContextCapacity(session, input);
|
|
243
263
|
if (!hasSuspendedTurn)
|
|
@@ -271,6 +291,7 @@ export class CodexAppServerDriver {
|
|
|
271
291
|
queue: eventQueue,
|
|
272
292
|
removeNotificationListener: () => undefined,
|
|
273
293
|
terminalReason: null,
|
|
294
|
+
failure: undefined,
|
|
274
295
|
done: false,
|
|
275
296
|
pendingChunk: undefined,
|
|
276
297
|
currentAssistantMessageId: undefined,
|
|
@@ -298,6 +319,8 @@ export class CodexAppServerDriver {
|
|
|
298
319
|
const reason = readCodexTerminalReason(message);
|
|
299
320
|
if (reason !== null) {
|
|
300
321
|
active.terminalReason = reason;
|
|
322
|
+
if (reason === 'error')
|
|
323
|
+
active.failure = codexFailure(message);
|
|
301
324
|
eventQueue.close();
|
|
302
325
|
}
|
|
303
326
|
};
|
|
@@ -358,7 +381,11 @@ export class CodexAppServerDriver {
|
|
|
358
381
|
session.segmentedTurn = undefined;
|
|
359
382
|
active.removeAbortListener();
|
|
360
383
|
active.removeNotificationListener();
|
|
361
|
-
|
|
384
|
+
const danglingCompaction = closeDanglingAutoCompaction(session);
|
|
385
|
+
if (danglingCompaction !== undefined)
|
|
386
|
+
yield stabilizeCodexEvent(session, danglingCompaction);
|
|
387
|
+
const reason = active.terminalReason ?? 'stop';
|
|
388
|
+
yield { type: 'finish', reason, ...(reason === 'error' && active.failure !== undefined ? { failure: active.failure } : {}) };
|
|
362
389
|
return;
|
|
363
390
|
}
|
|
364
391
|
if (input.signal?.aborted)
|
|
@@ -367,27 +394,29 @@ export class CodexAppServerDriver {
|
|
|
367
394
|
}
|
|
368
395
|
if (chunk === null)
|
|
369
396
|
continue;
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
397
|
+
for (const part of expandCodexCompactionChunk(session, chunk)) {
|
|
398
|
+
// 一个 assistant item 可能在多个工具调用之间切换。把新 item 的首个
|
|
399
|
+
// 正文留给下一次 llm/stream,当前流只返回边界,确保 DSH 先创建新 step。
|
|
400
|
+
if ((part.type === 'text-delta' || part.type === 'reasoning-delta')
|
|
401
|
+
&& part.messageId !== undefined) {
|
|
402
|
+
const previousMessageId = active.currentAssistantMessageId;
|
|
403
|
+
if (previousMessageId !== undefined
|
|
404
|
+
&& previousMessageId !== part.messageId
|
|
405
|
+
&& active.sawCompletedTool) {
|
|
406
|
+
active.pendingChunk = part;
|
|
407
|
+
active.currentAssistantMessageId = part.messageId;
|
|
408
|
+
active.sawCompletedTool = false;
|
|
409
|
+
yield { type: 'step-boundary' };
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
active.currentAssistantMessageId = part.messageId;
|
|
383
413
|
}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
414
|
+
const stabilizedChunk = stabilizeCodexEvent(session, part);
|
|
415
|
+
if (stabilizedChunk.type === 'tool-event' && (stabilizedChunk.status === 'completed' || stabilizedChunk.status === 'failed')) {
|
|
416
|
+
active.sawCompletedTool = true;
|
|
417
|
+
}
|
|
418
|
+
yield stabilizedChunk;
|
|
389
419
|
}
|
|
390
|
-
yield stabilizedChunk;
|
|
391
420
|
}
|
|
392
421
|
}
|
|
393
422
|
closeSegmentedTurn(session, active) {
|
|
@@ -398,6 +427,34 @@ export class CodexAppServerDriver {
|
|
|
398
427
|
if (session.segmentedTurn === active)
|
|
399
428
|
session.segmentedTurn = undefined;
|
|
400
429
|
}
|
|
430
|
+
/**
|
|
431
|
+
* 让线程真正生效的模型与 DSH 当前选择的模型保持一致。
|
|
432
|
+
*
|
|
433
|
+
* Codex 只在 `thread/start` 时决定线程模型,同一 app-server 进程内再次
|
|
434
|
+
* `thread/resume` 不会改写已持久化的模型。用户在 DSH 里切换模型后,如果不
|
|
435
|
+
* 显式纠正,后续 turn 仍会沿用旧模型;而线程一旦被写入错误模型(例如历史
|
|
436
|
+
* 路由把 DSH 主模型泄漏给 Codex),会话就会持续以 404 失败且无法自愈。
|
|
437
|
+
* 这里只在两者确实不同时下发一次纠正,避免每个 step 都产生额外 RPC。
|
|
438
|
+
*/
|
|
439
|
+
async alignThreadModel(session, input) {
|
|
440
|
+
if (session.threadId === '' || session.threadModelCorrectionUnsupported)
|
|
441
|
+
return;
|
|
442
|
+
const desired = isProviderDefaultModel(input.modelId) ? undefined : input.modelId?.trim();
|
|
443
|
+
if (desired === undefined || desired === '')
|
|
444
|
+
return;
|
|
445
|
+
if (session.threadModelId === desired)
|
|
446
|
+
return;
|
|
447
|
+
try {
|
|
448
|
+
const response = await session.rpc.request('thread/settings/update', { threadId: session.threadId, model: desired }, { signal: input.signal, killOnAbort: false });
|
|
449
|
+
session.threadModelId = readThreadModel(response) ?? desired;
|
|
450
|
+
}
|
|
451
|
+
catch (error) {
|
|
452
|
+
// 旧版 Codex 可能没有该方法;纠正失败不能阻断本轮,模型仍由 turn 自身决定。
|
|
453
|
+
// 只有“方法不存在”才永久关闭纠正,避免网络类瞬时失败让会话再也无法换模型。
|
|
454
|
+
if (isMethodNotFound(error))
|
|
455
|
+
session.threadModelCorrectionUnsupported = true;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
401
458
|
/** 在下一轮开始前主动压缩,避免把已满的线程直接交给 turn/start。 */
|
|
402
459
|
async ensureContextCapacity(session, input) {
|
|
403
460
|
if (session.contextWindow === undefined || session.contextTokens === undefined)
|
|
@@ -579,6 +636,13 @@ export class CodexAppServerDriver {
|
|
|
579
636
|
else if (pending.response === 'command') {
|
|
580
637
|
pending.resolve({ decision: response.approved ? 'accept' : 'decline' });
|
|
581
638
|
}
|
|
639
|
+
else if (pending.response === 'permissions') {
|
|
640
|
+
// `item/permissions/requestApproval` 的应答形状是 {permissions, scope},
|
|
641
|
+
// 不是 {approved}。批准回显请求画像;拒绝给空画像,语义等价于“不授予额外权限”。
|
|
642
|
+
pending.resolve(response.approved
|
|
643
|
+
? { permissions: grantedPermissionProfile(pending.requested), scope: 'turn' }
|
|
644
|
+
: { permissions: {}, scope: 'turn' });
|
|
645
|
+
}
|
|
582
646
|
else {
|
|
583
647
|
pending.resolve({
|
|
584
648
|
approved: response.approved,
|
|
@@ -618,7 +682,9 @@ export class CodexAppServerDriver {
|
|
|
618
682
|
if (previous?.segmentedTurn !== undefined)
|
|
619
683
|
this.closeSegmentedTurn(previous, previous.segmentedTurn);
|
|
620
684
|
previous?.rpc.dispose();
|
|
621
|
-
|
|
685
|
+
// 子代理托管开启时用 `-c` 覆盖注入 MCP 替身工具;工具由桥接转投成 DSH 原生子会话。
|
|
686
|
+
const bridgeArgs = codexBridgeArgs(input.sessionId, this.descriptor.id);
|
|
687
|
+
const rpc = new JsonRpcProcess({ command, args: [...CODEX_APP_SERVER_ARGS, ...bridgeArgs], cwd: input.cwd, spawn: this.runSpawn });
|
|
622
688
|
const session = {
|
|
623
689
|
rpc,
|
|
624
690
|
cwd: input.cwd,
|
|
@@ -626,6 +692,8 @@ export class CodexAppServerDriver {
|
|
|
626
692
|
contextWindow: undefined,
|
|
627
693
|
contextTokens: undefined,
|
|
628
694
|
threadId: '',
|
|
695
|
+
threadModelId: undefined,
|
|
696
|
+
threadModelCorrectionUnsupported: false,
|
|
629
697
|
turnId: null,
|
|
630
698
|
providerSessionId: input.providerSessionId ?? input.sessionId,
|
|
631
699
|
pendingPermissions: new Map(),
|
|
@@ -635,6 +703,7 @@ export class CodexAppServerDriver {
|
|
|
635
703
|
suppressCompactionNotifications: false,
|
|
636
704
|
suppressedCompactionTurnIds: new Set(),
|
|
637
705
|
pendingCompactionEvents: [],
|
|
706
|
+
autoCompaction: undefined,
|
|
638
707
|
};
|
|
639
708
|
this.processes.add(rpc);
|
|
640
709
|
this.sessions.set(input.sessionId, session);
|
|
@@ -648,12 +717,23 @@ export class CodexAppServerDriver {
|
|
|
648
717
|
const item = isRecord(params.item) ? params.item : params;
|
|
649
718
|
const method = typeof request.method === 'string' ? request.method : '';
|
|
650
719
|
const type = typeof item.type === 'string' ? item.type : '';
|
|
720
|
+
// 动态工具服务端请求要求客户端执行任意工具。
|
|
721
|
+
// DSH 适配器只负责观察 Codex 已执行的工具,不具备安全执行任意动态工具
|
|
722
|
+
// 的能力;必须显式回绝请求,不能把它挂进权限等待表,否则 Provider 会永久等待。
|
|
723
|
+
if (method === ['item', 'tool', 'call'].join('/')) {
|
|
724
|
+
return {
|
|
725
|
+
success: false,
|
|
726
|
+
contentItems: [{ type: 'inputText', text: 'CodingNS 不支持由 Codex 反向调用动态工具' }],
|
|
727
|
+
};
|
|
728
|
+
}
|
|
651
729
|
if (isQuestionEvent(`${method} ${type}`)) {
|
|
652
730
|
return new Promise((resolve) => session.pendingQuestions.set(requestId, resolve));
|
|
653
731
|
}
|
|
732
|
+
const kind = permissionResponseKind(method, params);
|
|
654
733
|
return new Promise((resolve) => session.pendingPermissions.set(requestId, {
|
|
655
734
|
resolve,
|
|
656
|
-
response:
|
|
735
|
+
response: kind,
|
|
736
|
+
...(kind === 'permissions' ? { requested: params.permissions } : {}),
|
|
657
737
|
}));
|
|
658
738
|
});
|
|
659
739
|
return session;
|
|
@@ -845,6 +925,68 @@ function* drainCompactionEvents(session) {
|
|
|
845
925
|
yield event;
|
|
846
926
|
}
|
|
847
927
|
}
|
|
928
|
+
/**
|
|
929
|
+
* 把自动压缩的 item 生命周期展开成闭合的 start/summary/end 事务。
|
|
930
|
+
*
|
|
931
|
+
* Codex 0.158 起,压缩只通过 contextCompaction item 的 started/completed 通知
|
|
932
|
+
* 发布,`thread/compacted`(ContextCompactedNotification)已废弃且不再发送。
|
|
933
|
+
* 而 DSH 会话格式要求每个 compaction/start 必须由 compaction/end 闭合,否则
|
|
934
|
+
* 历史加载会以 "turn/end crosses an open compaction" 失败。这里在 item/completed
|
|
935
|
+
* 之后合成 end,同时兼容旧版 Codex 仍会发送的 thread/compacted 完成信号。
|
|
936
|
+
*/
|
|
937
|
+
function* expandCodexCompactionChunk(session, chunk) {
|
|
938
|
+
if (chunk.type !== 'context-compaction') {
|
|
939
|
+
yield chunk;
|
|
940
|
+
return;
|
|
941
|
+
}
|
|
942
|
+
if (chunk.phase === 'start') {
|
|
943
|
+
if (session.autoCompaction?.open === true && session.autoCompaction.compactionId === chunk.compactionId) {
|
|
944
|
+
yield chunk;
|
|
945
|
+
return;
|
|
946
|
+
}
|
|
947
|
+
session.autoCompaction = { compactionId: chunk.compactionId, open: true };
|
|
948
|
+
yield chunk;
|
|
949
|
+
return;
|
|
950
|
+
}
|
|
951
|
+
if (chunk.phase === 'summary') {
|
|
952
|
+
yield chunk;
|
|
953
|
+
const pending = session.autoCompaction;
|
|
954
|
+
if (pending !== undefined && pending.open) {
|
|
955
|
+
pending.open = false;
|
|
956
|
+
yield {
|
|
957
|
+
type: 'context-compaction',
|
|
958
|
+
phase: 'end',
|
|
959
|
+
...(chunk.compactionId === undefined ? {} : { compactionId: chunk.compactionId }),
|
|
960
|
+
};
|
|
961
|
+
}
|
|
962
|
+
return;
|
|
963
|
+
}
|
|
964
|
+
const pending = session.autoCompaction;
|
|
965
|
+
if (pending !== undefined) {
|
|
966
|
+
if (pending.open) {
|
|
967
|
+
// item/started 之后直接收到完成信号(旧版 Codex 的 thread/compacted):
|
|
968
|
+
// 由该信号闭合事务。
|
|
969
|
+
pending.open = false;
|
|
970
|
+
yield chunk;
|
|
971
|
+
}
|
|
972
|
+
// 已经由 item/completed 合成过 end 的重复完成信号不再下发;桥接层虽然
|
|
973
|
+
// 对重复 end 幂等,但重复通知没有新的语义。
|
|
974
|
+
return;
|
|
975
|
+
}
|
|
976
|
+
yield chunk;
|
|
977
|
+
}
|
|
978
|
+
/** 流终结时为未收到完成通知的自动压缩补一个 end,避免会话日志残留未闭合事务。 */
|
|
979
|
+
function closeDanglingAutoCompaction(session) {
|
|
980
|
+
const pending = session.autoCompaction;
|
|
981
|
+
if (pending === undefined || !pending.open)
|
|
982
|
+
return undefined;
|
|
983
|
+
session.autoCompaction = undefined;
|
|
984
|
+
return {
|
|
985
|
+
type: 'context-compaction',
|
|
986
|
+
phase: 'end',
|
|
987
|
+
...(pending.compactionId === undefined ? {} : { compactionId: pending.compactionId }),
|
|
988
|
+
};
|
|
989
|
+
}
|
|
848
990
|
function compactionDetails(value) {
|
|
849
991
|
if (!isRecord(value))
|
|
850
992
|
return {};
|
|
@@ -866,21 +1008,45 @@ function isContextCompactionTurn(value) {
|
|
|
866
1008
|
}
|
|
867
1009
|
function codexPermissionDetails(method, params, item) {
|
|
868
1010
|
const fileChange = method.includes('fileChange') || method.includes('file_change') || String(item.type ?? '').toLowerCase() === 'filechange';
|
|
1011
|
+
// 沙箱提权请求没有 command/grantRoot,只有一个待授予的权限画像;
|
|
1012
|
+
// 必须把画像摘要带进 detail,否则审批弹窗只会显示一个空理由。
|
|
1013
|
+
const permissions = method.includes('permissions') && method.includes('Approval') ? params.permissions : undefined;
|
|
869
1014
|
const command = typeof params.command === 'string' ? params.command : typeof item.command === 'string' ? item.command : undefined;
|
|
870
1015
|
const reason = typeof params.reason === 'string' ? params.reason : typeof params.description === 'string' ? params.description : undefined;
|
|
871
1016
|
const grantRoot = typeof params.grantRoot === 'string' ? params.grantRoot : undefined;
|
|
872
1017
|
const paths = permissionPaths(params.fileChanges ?? params.file_changes ?? item.changes);
|
|
873
1018
|
const callId = firstToolText(params.callId, params.call_id, params.itemId, item.id);
|
|
874
|
-
const detail = [reason, command, paths.length > 0 ? `文件: ${paths.join(', ')}` : undefined, grantRoot ? `允许写入: ${grantRoot}` : undefined]
|
|
1019
|
+
const detail = [reason, command, paths.length > 0 ? `文件: ${paths.join(', ')}` : undefined, grantRoot ? `允许写入: ${grantRoot}` : undefined, permissionProfileSummary(permissions)]
|
|
875
1020
|
.filter((value) => value !== undefined && value.trim() !== '')
|
|
876
1021
|
.join(';');
|
|
877
1022
|
return {
|
|
878
|
-
kind: typeof params.kind === 'string' ? params.kind : fileChange ? 'file_change' : 'command',
|
|
1023
|
+
kind: permissions !== undefined ? 'permissions' : typeof params.kind === 'string' ? params.kind : fileChange ? 'file_change' : 'command',
|
|
879
1024
|
...(fileChange ? { toolName: 'edit' } : {}),
|
|
880
1025
|
...(callId === undefined ? {} : { callId }),
|
|
881
1026
|
...(detail === '' ? {} : { detail }),
|
|
882
1027
|
};
|
|
883
1028
|
}
|
|
1029
|
+
/** 把权限画像压成一句可读摘要;未知形状返回 undefined,不猜测语义。 */
|
|
1030
|
+
function permissionProfileSummary(value) {
|
|
1031
|
+
const profile = isRecord(value) ? value : null;
|
|
1032
|
+
if (profile === null)
|
|
1033
|
+
return undefined;
|
|
1034
|
+
const fileSystem = isRecord(profile.fileSystem) ? profile.fileSystem : null;
|
|
1035
|
+
const network = isRecord(profile.network) ? profile.network : null;
|
|
1036
|
+
const parts = [];
|
|
1037
|
+
const write = stringList(fileSystem?.write);
|
|
1038
|
+
const read = stringList(fileSystem?.read);
|
|
1039
|
+
if (write.length > 0)
|
|
1040
|
+
parts.push(`请求写入: ${write.join(', ')}`);
|
|
1041
|
+
if (read.length > 0)
|
|
1042
|
+
parts.push(`请求读取: ${read.join(', ')}`);
|
|
1043
|
+
if (network?.enabled === true)
|
|
1044
|
+
parts.push('请求网络访问');
|
|
1045
|
+
return parts.length === 0 ? undefined : parts.join(';');
|
|
1046
|
+
}
|
|
1047
|
+
function stringList(value) {
|
|
1048
|
+
return Array.isArray(value) ? value.filter((entry) => typeof entry === 'string' && entry.trim() !== '') : [];
|
|
1049
|
+
}
|
|
884
1050
|
function permissionPaths(value) {
|
|
885
1051
|
if (Array.isArray(value))
|
|
886
1052
|
return value.flatMap((entry) => permissionPaths(entry));
|
|
@@ -1054,6 +1220,27 @@ function isContextWindowError(error) {
|
|
|
1054
1220
|
return hasContextWindowError(error.data);
|
|
1055
1221
|
return hasContextWindowError(error);
|
|
1056
1222
|
}
|
|
1223
|
+
/**
|
|
1224
|
+
* 判断 RPC 失败是否表示“服务端不认识这个方法”。
|
|
1225
|
+
*
|
|
1226
|
+
* 旧版 Codex app-server 没有 `thread/settings/update`。只有这种情况才应永久
|
|
1227
|
+
* 关闭模型纠正;进程退出、超时等瞬时失败必须保留重试机会,否则一次抖动就会让
|
|
1228
|
+
* 该会话再也无法切换模型。
|
|
1229
|
+
*/
|
|
1230
|
+
function isMethodNotFound(error) {
|
|
1231
|
+
if (error instanceof JsonRpcRequestError) {
|
|
1232
|
+
if (error.code === -32601)
|
|
1233
|
+
return true;
|
|
1234
|
+
const data = isRecord(error.data) ? error.data : null;
|
|
1235
|
+
if (data?.code === -32601)
|
|
1236
|
+
return true;
|
|
1237
|
+
return typeof data?.message === 'string' && /method\s*not\s*found|unknown method/iu.test(data.message);
|
|
1238
|
+
}
|
|
1239
|
+
if (isRecord(error) && error.code === -32601)
|
|
1240
|
+
return true;
|
|
1241
|
+
const message = error instanceof Error ? error.message : typeof error === 'string' ? error : '';
|
|
1242
|
+
return /method\s*not\s*found|unknown method/iu.test(message);
|
|
1243
|
+
}
|
|
1057
1244
|
function hasContextWindowError(value) {
|
|
1058
1245
|
if (typeof value === 'string')
|
|
1059
1246
|
return /context[_-]?window[_-]?exceeded|context window exceeded/iu.test(value);
|
|
@@ -1062,11 +1249,12 @@ function hasContextWindowError(value) {
|
|
|
1062
1249
|
return Object.entries(value).some(([key, child]) => /context.?window.?exceeded/iu.test(key) || hasContextWindowError(child));
|
|
1063
1250
|
}
|
|
1064
1251
|
function readCodexTerminalReason(message) {
|
|
1065
|
-
|
|
1252
|
+
const method = message.method ?? '';
|
|
1253
|
+
if (method === 'error') {
|
|
1066
1254
|
const params = isRecord(message.params) ? message.params : null;
|
|
1067
1255
|
return params?.willRetry === true ? null : 'error';
|
|
1068
1256
|
}
|
|
1069
|
-
if (
|
|
1257
|
+
if (!isCodexTerminalMethod(method))
|
|
1070
1258
|
return null;
|
|
1071
1259
|
const params = isRecord(message.params) ? message.params : null;
|
|
1072
1260
|
const turn = isRecord(params?.turn) ? params.turn : null;
|
|
@@ -1074,8 +1262,36 @@ function readCodexTerminalReason(message) {
|
|
|
1074
1262
|
return 'error';
|
|
1075
1263
|
if (turn?.status === 'interrupted' || turn?.status === 'cancelled')
|
|
1076
1264
|
return 'cancel';
|
|
1265
|
+
if (method === 'turn/failed' || method === 'turn/error')
|
|
1266
|
+
return 'error';
|
|
1267
|
+
if (method === 'turn/interrupted' || method === 'turn/cancelled' || method === 'turn/aborted')
|
|
1268
|
+
return 'cancel';
|
|
1077
1269
|
return 'stop';
|
|
1078
1270
|
}
|
|
1271
|
+
function codexFailure(message) {
|
|
1272
|
+
const params = isRecord(message.params) ? message.params : message;
|
|
1273
|
+
const turn = isRecord(params.turn) ? params.turn : params;
|
|
1274
|
+
const error = isRecord(turn.error) ? turn.error : turn.error ?? params.error;
|
|
1275
|
+
const detail = textValue(isRecord(error) ? error.message ?? error.detail ?? error.description : error)
|
|
1276
|
+
?? (isRecord(error) ? textValue(error.type) : null)
|
|
1277
|
+
?? 'Codex Provider 未返回具体失败信息。';
|
|
1278
|
+
const codeValue = isRecord(error) ? error.code ?? error.errorCode ?? error.error_code ?? error.type ?? error.status ?? error.statusCode : undefined;
|
|
1279
|
+
const code = typeof codeValue === 'number' && Number.isFinite(codeValue)
|
|
1280
|
+
? String(codeValue)
|
|
1281
|
+
: typeof codeValue === 'string' && codeValue.trim() !== ''
|
|
1282
|
+
? codeValue.trim()
|
|
1283
|
+
: undefined;
|
|
1284
|
+
return code === undefined ? { message: detail } : { message: detail, code };
|
|
1285
|
+
}
|
|
1286
|
+
/** Codex 版本间曾使用不同的 turn 终态通知名,统一收敛到同一结束路径。 */
|
|
1287
|
+
function isCodexTerminalMethod(method) {
|
|
1288
|
+
return method === 'turn/completed'
|
|
1289
|
+
|| method === 'turn/failed'
|
|
1290
|
+
|| method === 'turn/error'
|
|
1291
|
+
|| method === 'turn/interrupted'
|
|
1292
|
+
|| method === 'turn/cancelled'
|
|
1293
|
+
|| method === 'turn/aborted';
|
|
1294
|
+
}
|
|
1079
1295
|
/** 将 turn/start 响应里的终态归一化成父仓库使用的 turn/completed 通知。 */
|
|
1080
1296
|
function buildCodexCompletionNotification(value, threadId) {
|
|
1081
1297
|
if (!isRecord(value) || !isRecord(value.turn))
|
|
@@ -1100,26 +1316,83 @@ function isCodexToolEvent(method, type) {
|
|
|
1100
1316
|
const normalized = type.replace(/[_-]/gu, '').toLowerCase();
|
|
1101
1317
|
return ['commandexecution', 'filechange', 'mcptoolcall', 'functioncall', 'customtoolcall', 'dynamictoolcall'].includes(normalized);
|
|
1102
1318
|
}
|
|
1319
|
+
/**
|
|
1320
|
+
* `thread/start` 与 `thread/resume` 共用的线程参数。
|
|
1321
|
+
*
|
|
1322
|
+
* 权限必须在这里就与 `turn/start` 保持一致:Codex 的线程级沙箱会成为后续回合
|
|
1323
|
+
* 的默认值,只在 turn 上覆盖会让首次工具调用落到与 DSH 不同的模式。
|
|
1324
|
+
*/
|
|
1325
|
+
function codexThreadParams(input) {
|
|
1326
|
+
const developerInstructions = codexBridgeDeveloperInstructions(input.sessionId);
|
|
1327
|
+
return {
|
|
1328
|
+
cwd: input.cwd ?? process.cwd(),
|
|
1329
|
+
sandbox: codexSandboxMode(input),
|
|
1330
|
+
approvalPolicy: codexApprovalPolicy(input),
|
|
1331
|
+
...(!isProviderDefaultModel(input.modelId) ? { model: input.modelId } : {}),
|
|
1332
|
+
...(developerInstructions === undefined ? {} : { developerInstructions }),
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1103
1335
|
function codexTurnStartParams(input, threadId) {
|
|
1104
1336
|
const cwd = resolve(input.cwd ?? process.cwd());
|
|
1337
|
+
const inputBlocks = [];
|
|
1338
|
+
const attachments = input.attachments ?? [];
|
|
1339
|
+
if (input.prompt.trim() !== '' || attachments.length === 0)
|
|
1340
|
+
inputBlocks.push({ type: 'text', text: input.prompt });
|
|
1341
|
+
for (const attachment of attachments) {
|
|
1342
|
+
if (attachment.kind === 'image')
|
|
1343
|
+
inputBlocks.push({ type: 'localImage', path: attachment.path });
|
|
1344
|
+
}
|
|
1105
1345
|
return {
|
|
1106
1346
|
threadId,
|
|
1107
|
-
input:
|
|
1347
|
+
input: inputBlocks,
|
|
1108
1348
|
cwd,
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
sandboxPolicy: {
|
|
1112
|
-
type: 'workspaceWrite',
|
|
1113
|
-
writableRoots: [cwd],
|
|
1114
|
-
networkAccess: false,
|
|
1115
|
-
excludeTmpdirEnvVar: false,
|
|
1116
|
-
excludeSlashTmp: false,
|
|
1117
|
-
},
|
|
1118
|
-
approvalPolicy: 'on-request',
|
|
1349
|
+
sandboxPolicy: codexSandboxPolicy(input, cwd),
|
|
1350
|
+
approvalPolicy: codexApprovalPolicy(input),
|
|
1119
1351
|
...(input.effortId ? { effort: input.effortId } : {}),
|
|
1120
1352
|
};
|
|
1121
1353
|
}
|
|
1354
|
+
/**
|
|
1355
|
+
* 由 DSH 会话权限状态派生 Codex 原生沙箱模式。
|
|
1356
|
+
*
|
|
1357
|
+
* `permission` 缺省表示 Host **还没读到**权限事实,此时沿用旧的保守默认
|
|
1358
|
+
* (工作区可写),不能推断为完全权限。三个字段必须来自同一份状态。
|
|
1359
|
+
*/
|
|
1360
|
+
function codexSandboxMode(input) {
|
|
1361
|
+
return input.permission?.sandboxMode ?? 'workspace-write';
|
|
1362
|
+
}
|
|
1363
|
+
function codexSandboxPolicy(input, cwd) {
|
|
1364
|
+
const mode = codexSandboxMode(input);
|
|
1365
|
+
// danger-full-access 必须映射成 Codex 自己的 bypass 形状;继续下发
|
|
1366
|
+
// workspaceWrite 会让 DSH 声明完全权限、Codex 实际只读,两侧语义分叉。
|
|
1367
|
+
if (mode === 'danger-full-access')
|
|
1368
|
+
return { type: 'dangerFullAccess' };
|
|
1369
|
+
if (mode === 'read-only')
|
|
1370
|
+
return { type: 'readOnly', networkAccess: false };
|
|
1371
|
+
// DSH 的 workspace-write 只约束自身工具沙箱,不会自动传递给 Codex
|
|
1372
|
+
// app-server。显式声明当前工作区,避免 Codex 将文件编辑误判为只读越权。
|
|
1373
|
+
return {
|
|
1374
|
+
type: 'workspaceWrite',
|
|
1375
|
+
writableRoots: [cwd],
|
|
1376
|
+
networkAccess: false,
|
|
1377
|
+
excludeTmpdirEnvVar: false,
|
|
1378
|
+
excludeSlashTmp: false,
|
|
1379
|
+
};
|
|
1380
|
+
}
|
|
1381
|
+
/**
|
|
1382
|
+
* 由同一份权限状态派生审批策略。
|
|
1383
|
+
*
|
|
1384
|
+
* DSH 的 `never` 表示“需要审批的动作会被自动拒绝”,因此绝不能同时向 Codex
|
|
1385
|
+
* 声明 `on-request`:那会让 Codex 发起注定被自动拒绝的审批,模型还会误以为
|
|
1386
|
+
* 用户拒绝了它。`ask` 才映射为 Codex 的 `on-request`。
|
|
1387
|
+
*/
|
|
1388
|
+
function codexApprovalPolicy(input) {
|
|
1389
|
+
return input.permission?.approvalPolicy === 'never' ? 'never' : 'on-request';
|
|
1390
|
+
}
|
|
1122
1391
|
function permissionResponseKind(method, params) {
|
|
1392
|
+
// 沙箱提权请求的应答是 {permissions, scope},必须在识别 fileChange/command 之前
|
|
1393
|
+
// 判定,否则会落到 legacy 分支返回 {approved},形状不符。
|
|
1394
|
+
if (method.includes('permissions') && method.includes('Approval'))
|
|
1395
|
+
return 'permissions';
|
|
1123
1396
|
if (method.includes('fileChange') || method.includes('file_change'))
|
|
1124
1397
|
return 'file-change';
|
|
1125
1398
|
// 新版 Codex 带 threadId/turnId/itemId,并要求 decision;旧版测试和旧
|
|
@@ -1128,6 +1401,21 @@ function permissionResponseKind(method, params) {
|
|
|
1128
1401
|
return 'command';
|
|
1129
1402
|
return 'legacy';
|
|
1130
1403
|
}
|
|
1404
|
+
/**
|
|
1405
|
+
* 把 Codex 请求的权限画像转成可回传的授予画像。
|
|
1406
|
+
*
|
|
1407
|
+
* `RequestPermissionProfile` 与 `GrantedPermissionProfile` 同形,但缺省字段在
|
|
1408
|
+
* 授予侧是可选的;这里只保留实际存在的部分,避免回传 null 触发 schema 拒绝。
|
|
1409
|
+
*/
|
|
1410
|
+
function grantedPermissionProfile(requested) {
|
|
1411
|
+
const profile = isRecord(requested) ? requested : null;
|
|
1412
|
+
const fileSystem = isRecord(profile?.fileSystem) ? profile.fileSystem : undefined;
|
|
1413
|
+
const network = isRecord(profile?.network) ? profile.network : undefined;
|
|
1414
|
+
return {
|
|
1415
|
+
...(fileSystem === undefined ? {} : { fileSystem }),
|
|
1416
|
+
...(network === undefined ? {} : { network }),
|
|
1417
|
+
};
|
|
1418
|
+
}
|
|
1131
1419
|
function readId(value) {
|
|
1132
1420
|
if (!isRecord(value))
|
|
1133
1421
|
return null;
|
|
@@ -1139,4 +1427,19 @@ function readId(value) {
|
|
|
1139
1427
|
return value.thread.id;
|
|
1140
1428
|
return null;
|
|
1141
1429
|
}
|
|
1430
|
+
/**
|
|
1431
|
+
* 读取线程当前生效的模型。
|
|
1432
|
+
*
|
|
1433
|
+
* `thread/start`、`thread/resume` 的响应都在顶层返回 `model`;旧版协议把它嵌在
|
|
1434
|
+
* `thread.model` 中。读不到时返回 undefined,调用方按“未知”处理并自行纠正。
|
|
1435
|
+
*/
|
|
1436
|
+
function readThreadModel(value) {
|
|
1437
|
+
if (!isRecord(value))
|
|
1438
|
+
return undefined;
|
|
1439
|
+
const direct = value.model;
|
|
1440
|
+
if (typeof direct === 'string' && direct.trim() !== '')
|
|
1441
|
+
return direct.trim();
|
|
1442
|
+
const nested = isRecord(value.thread) ? value.thread.model : undefined;
|
|
1443
|
+
return typeof nested === 'string' && nested.trim() !== '' ? nested.trim() : undefined;
|
|
1444
|
+
}
|
|
1142
1445
|
//# sourceMappingURL=codex-driver.js.map
|