@deepseek-harness-tui/dsh-tui 0.14.1 → 0.16.0
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.md +163 -17
- package/bin/dsh-tui.js +200 -34
- package/cordis.patch.yml +16 -52
- package/cordis.yml +6 -2
- package/guide/dsh-tui-guide/claude-backend.en.md +44 -7
- package/guide/dsh-tui-guide/claude-backend.md +28 -6
- package/guide/dsh-tui-guide/codex-backend.en.md +47 -10
- package/guide/dsh-tui-guide/codex-backend.md +26 -4
- package/guide/dsh-tui-guide/configuration.en.md +168 -18
- package/guide/dsh-tui-guide/configuration.md +144 -16
- package/guide/dsh-tui-guide/getting-started.en.md +15 -0
- package/guide/dsh-tui-guide/getting-started.md +15 -0
- package/guide/dsh-tui-guide/interaction.en.md +64 -24
- package/guide/dsh-tui-guide/interaction.md +49 -19
- package/guide/dsh-tui-guide/plugins.en.md +97 -3
- package/guide/dsh-tui-guide/plugins.md +55 -2
- package/guide/dsh-tui-guide/themes.en.md +23 -14
- package/guide/dsh-tui-guide/themes.md +19 -12
- package/guide/dsh-tui-guide/user-guide.en.md +53 -21
- package/guide/dsh-tui-guide/user-guide.md +43 -22
- package/lib/settings.json +103 -9
- package/lib/types/adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/adapter/channel/projection.js +1 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +1 -1
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +4 -0
- package/lib/types/adapter/channel/ui.d.ts +2 -0
- package/lib/types/adapter/channel/ui.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui.js +6 -2
- package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
- package/lib/types/adapter/kernel/runtime.js +2 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts +5 -1
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +14 -3
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +56 -12
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +68 -0
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel.d.ts +2 -0
- package/lib/types/adapter/ports/channel.d.ts.map +1 -1
- package/lib/types/adapter/spec/backend-capabilities.d.ts +22 -0
- package/lib/types/adapter/spec/backend-capabilities.d.ts.map +1 -0
- package/lib/types/adapter/spec/backend-capabilities.js +49 -0
- package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -1
- package/lib/types/adapter/spec/protocol-constants.js +10 -3
- package/lib/types/adapter/spec/tui-contributions.d.ts +3 -0
- package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -1
- package/lib/types/adapter/spec/tui-contributions.js +7 -0
- package/lib/types/adapter/standard/registry.d.ts +6 -0
- package/lib/types/adapter/standard/registry.d.ts.map +1 -1
- package/lib/types/adapter/standard/registry.js +65 -15
- package/lib/types/adapter/standard/tui-extension.d.ts.map +1 -1
- package/lib/types/adapter/standard/tui-extension.js +7 -1
- package/lib/types/adapter/standard/types.d.ts +10 -1
- package/lib/types/adapter/standard/types.d.ts.map +1 -1
- package/lib/types/adapter/upstream/host-descriptor-driver.d.ts.map +1 -1
- package/lib/types/adapter/upstream/host-descriptor-driver.js +52 -0
- package/lib/types/agent/backend-manifest.d.ts +152 -0
- package/lib/types/agent/backend-manifest.d.ts.map +1 -0
- package/lib/types/agent/backend-manifest.js +14 -0
- package/lib/types/agent/backend.d.ts +71 -5
- package/lib/types/agent/backend.d.ts.map +1 -1
- package/lib/types/agent/capabilities.d.ts +6 -0
- package/lib/types/agent/capabilities.d.ts.map +1 -1
- package/lib/types/agent/events.d.ts +3 -2
- package/lib/types/agent/events.d.ts.map +1 -1
- package/lib/types/agent/index.d.ts +2 -0
- package/lib/types/agent/index.d.ts.map +1 -1
- package/lib/types/agent/refs.d.ts +11 -1
- package/lib/types/agent/refs.d.ts.map +1 -1
- package/lib/types/agent/starting-session.d.ts +4 -0
- package/lib/types/agent/starting-session.d.ts.map +1 -0
- package/lib/types/agent/starting-session.js +19 -0
- package/lib/types/backends/claude/activity.d.ts +1 -1
- package/lib/types/backends/claude/activity.d.ts.map +1 -1
- package/lib/types/backends/claude/activity.js +5 -5
- package/lib/types/backends/claude/auth.d.ts.map +1 -1
- package/lib/types/backends/claude/auth.js +10 -3
- package/lib/types/backends/claude/backend.d.ts.map +1 -1
- package/lib/types/backends/claude/backend.js +103 -29
- package/lib/types/backends/claude/catalog.d.ts +2 -1
- package/lib/types/backends/claude/catalog.d.ts.map +1 -1
- package/lib/types/backends/claude/catalog.js +15 -5
- package/lib/types/backends/claude/channels.d.ts +5 -3
- package/lib/types/backends/claude/channels.d.ts.map +1 -1
- package/lib/types/backends/claude/channels.js +5 -4
- package/lib/types/backends/claude/contract.d.ts +4 -0
- package/lib/types/backends/claude/contract.d.ts.map +1 -1
- package/lib/types/backends/claude/contract.js +4 -0
- package/lib/types/backends/claude/controls.d.ts +4 -0
- package/lib/types/backends/claude/controls.d.ts.map +1 -1
- package/lib/types/backends/claude/controls.js +34 -42
- package/lib/types/backends/claude/dialogs.d.ts +8 -2
- package/lib/types/backends/claude/dialogs.d.ts.map +1 -1
- package/lib/types/backends/claude/dialogs.js +24 -16
- package/lib/types/backends/claude/images.d.ts +1 -1
- package/lib/types/backends/claude/images.d.ts.map +1 -1
- package/lib/types/backends/claude/images.js +7 -7
- package/lib/types/backends/claude/manifest.d.ts +21 -0
- package/lib/types/backends/claude/manifest.d.ts.map +1 -0
- package/lib/types/backends/claude/manifest.js +29 -0
- package/lib/types/backends/claude/older-history.js +2 -2
- package/lib/types/backends/claude/permissions.js +11 -11
- package/lib/types/backends/claude/prefs.d.ts +4 -2
- package/lib/types/backends/claude/prefs.d.ts.map +1 -1
- package/lib/types/backends/claude/prefs.js +4 -3
- package/lib/types/backends/claude/process.d.ts +16 -4
- package/lib/types/backends/claude/process.d.ts.map +1 -1
- package/lib/types/backends/claude/process.js +100 -37
- package/lib/types/backends/claude/send-message.d.ts +1 -1
- package/lib/types/backends/claude/send-message.d.ts.map +1 -1
- package/lib/types/backends/claude/session/auth.js +22 -22
- package/lib/types/backends/claude/session/channels.d.ts +4 -0
- package/lib/types/backends/claude/session/channels.d.ts.map +1 -1
- package/lib/types/backends/claude/session/channels.js +5 -3
- package/lib/types/backends/claude/session/lifecycle.d.ts.map +1 -1
- package/lib/types/backends/claude/session/lifecycle.js +31 -23
- package/lib/types/backends/claude/session/store.js +8 -8
- package/lib/types/backends/claude/session/subagents.js +2 -2
- package/lib/types/backends/claude/session/types.d.ts +7 -0
- package/lib/types/backends/claude/session/types.d.ts.map +1 -1
- package/lib/types/backends/claude/side-query.js +3 -3
- package/lib/types/backends/claude/task-output.js +5 -5
- package/lib/types/backends/claude/text.d.ts +778 -0
- package/lib/types/backends/claude/text.d.ts.map +1 -0
- package/lib/types/backends/claude/text.js +298 -0
- package/lib/types/backends/claude/transcript-file.d.ts +1 -1
- package/lib/types/backends/claude/transcript-file.d.ts.map +1 -1
- package/lib/types/backends/claude/transcript-file.js +4 -4
- package/lib/types/backends/claude/translate/attempts.js +2 -2
- package/lib/types/backends/claude/translate/core.js +3 -3
- package/lib/types/backends/claude/translate/messages.js +4 -4
- package/lib/types/backends/claude/translate/system.js +14 -14
- package/lib/types/backends/claude/translate/tasks.js +2 -2
- package/lib/types/backends/claude/translate/types.d.ts +1 -1
- package/lib/types/backends/claude/translate/types.d.ts.map +1 -1
- package/lib/types/backends/codex/auth/external-tokens.js +16 -16
- package/lib/types/backends/codex/auth/status.js +14 -14
- package/lib/types/backends/codex/backend.d.ts +4 -19
- package/lib/types/backends/codex/backend.d.ts.map +1 -1
- package/lib/types/backends/codex/backend.js +118 -25
- package/lib/types/backends/codex/catalog.d.ts +2 -1
- package/lib/types/backends/codex/catalog.d.ts.map +1 -1
- package/lib/types/backends/codex/catalog.js +63 -18
- package/lib/types/backends/codex/channels.d.ts +6 -3
- package/lib/types/backends/codex/channels.d.ts.map +1 -1
- package/lib/types/backends/codex/channels.js +15 -13
- package/lib/types/backends/codex/contract.d.ts +3 -0
- package/lib/types/backends/codex/contract.d.ts.map +1 -1
- package/lib/types/backends/codex/contract.js +3 -0
- package/lib/types/backends/codex/detect.d.ts.map +1 -1
- package/lib/types/backends/codex/detect.js +9 -6
- package/lib/types/backends/codex/manifest.d.ts +30 -0
- package/lib/types/backends/codex/manifest.d.ts.map +1 -0
- package/lib/types/backends/codex/manifest.js +23 -0
- package/lib/types/backends/codex/prefs.d.ts +4 -2
- package/lib/types/backends/codex/prefs.d.ts.map +1 -1
- package/lib/types/backends/codex/prefs.js +4 -3
- package/lib/types/backends/codex/rpc/hub.js +2 -2
- package/lib/types/backends/codex/session/activity.d.ts +1 -1
- package/lib/types/backends/codex/session/activity.d.ts.map +1 -1
- package/lib/types/backends/codex/session/activity.js +13 -13
- package/lib/types/backends/codex/session/approvals.js +30 -30
- package/lib/types/backends/codex/session/async-questions.d.ts +17 -0
- package/lib/types/backends/codex/session/async-questions.d.ts.map +1 -0
- package/lib/types/backends/codex/session/async-questions.js +89 -0
- package/lib/types/backends/codex/session/commands.d.ts +8 -2
- package/lib/types/backends/codex/session/commands.d.ts.map +1 -1
- package/lib/types/backends/codex/session/commands.js +71 -23
- package/lib/types/backends/codex/session/controls.d.ts +1 -1
- package/lib/types/backends/codex/session/controls.d.ts.map +1 -1
- package/lib/types/backends/codex/session/controls.js +21 -16
- package/lib/types/backends/codex/session/goals.d.ts.map +1 -1
- package/lib/types/backends/codex/session/goals.js +3 -3
- package/lib/types/backends/codex/session/history.js +2 -2
- package/lib/types/backends/codex/session/images.js +8 -8
- package/lib/types/backends/codex/session/input.d.ts +6 -2
- package/lib/types/backends/codex/session/input.d.ts.map +1 -1
- package/lib/types/backends/codex/session/input.js +55 -13
- package/lib/types/backends/codex/session/plan-review.js +6 -6
- package/lib/types/backends/codex/session/session.d.ts.map +1 -1
- package/lib/types/backends/codex/session/session.js +100 -42
- package/lib/types/backends/codex/session/side-query.d.ts.map +1 -1
- package/lib/types/backends/codex/session/side-query.js +27 -9
- package/lib/types/backends/codex/session/state.d.ts +6 -1
- package/lib/types/backends/codex/session/state.d.ts.map +1 -1
- package/lib/types/backends/codex/session/subagents.js +5 -5
- package/lib/types/backends/codex/session/tasks.js +4 -4
- package/lib/types/backends/codex/text.d.ts +933 -0
- package/lib/types/backends/codex/text.d.ts.map +1 -0
- package/lib/types/backends/codex/text.js +313 -0
- package/lib/types/backends/codex/translate/items.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/items.js +7 -5
- package/lib/types/backends/codex/translate/live.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/live.js +11 -8
- package/lib/types/backends/codex/translate/notices.js +10 -10
- package/lib/types/backends/codex/translate/question-reply.d.ts +11 -0
- package/lib/types/backends/codex/translate/question-reply.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/question-reply.js +53 -0
- package/lib/types/backends/shared/channel-slug.d.ts +4 -0
- package/lib/types/backends/shared/channel-slug.d.ts.map +1 -0
- package/lib/types/backends/shared/channel-slug.js +25 -0
- package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -1
- package/lib/types/backends/shared/channel-tokens.js +30 -23
- package/lib/types/{channel → backends/shared}/elicitation.d.ts +78 -21
- package/lib/types/backends/shared/elicitation.d.ts.map +1 -0
- package/lib/types/{channel → backends/shared}/elicitation.js +64 -66
- package/lib/types/backends/shared/image-size.d.ts +33 -0
- package/lib/types/backends/shared/image-size.d.ts.map +1 -0
- package/lib/types/backends/shared/image-size.js +134 -0
- package/lib/types/{utils → backends/shared}/jsonl.d.ts +5 -1
- package/lib/types/backends/shared/jsonl.d.ts.map +1 -0
- package/lib/types/{utils → backends/shared}/jsonl.js +5 -1
- package/lib/types/backends/shared/localized-text.d.ts +30 -0
- package/lib/types/backends/shared/localized-text.d.ts.map +1 -0
- package/lib/types/backends/shared/localized-text.js +24 -0
- package/lib/types/backends/shared/platform-text.d.ts +88 -0
- package/lib/types/backends/shared/platform-text.d.ts.map +1 -0
- package/lib/types/backends/shared/platform-text.js +33 -0
- package/lib/types/branding.d.ts +13 -0
- package/lib/types/branding.d.ts.map +1 -1
- package/lib/types/branding.js +18 -0
- package/lib/types/channel/channel-slug.d.ts +3 -1
- package/lib/types/channel/channel-slug.d.ts.map +1 -1
- package/lib/types/channel/channel-slug.js +3 -1
- package/lib/types/channel/projection.d.ts.map +1 -1
- package/lib/types/channel/projection.js +10 -0
- package/lib/types/channel/sanitize.d.ts +7 -0
- package/lib/types/channel/sanitize.d.ts.map +1 -1
- package/lib/types/channel/sanitize.js +9 -0
- package/lib/types/channel/usage.d.ts.map +1 -1
- package/lib/types/channel/usage.js +5 -0
- package/lib/types/commands.d.ts +15 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +58 -10
- package/lib/types/components/AgentMessageComposer.d.ts.map +1 -1
- package/lib/types/components/AgentMessageComposer.js +3 -2
- package/lib/types/components/BtwPanel.d.ts.map +1 -1
- package/lib/types/components/BtwPanel.js +4 -2
- package/lib/types/components/Chat/JobCard.js +3 -3
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +24 -7
- package/lib/types/components/ContextBarView.d.ts +5 -1
- package/lib/types/components/ContextBarView.d.ts.map +1 -1
- package/lib/types/components/ContextBarView.js +6 -3
- package/lib/types/components/ExtensionDialog.d.ts.map +1 -1
- package/lib/types/components/ExtensionDialog.js +2 -3
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +14 -3
- package/lib/types/components/InlineMathParagraph.js +1 -1
- package/lib/types/components/KernelPicker.d.ts.map +1 -1
- package/lib/types/components/KernelPicker.js +1 -1
- package/lib/types/components/LogoV2.d.ts +4 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +14 -9
- package/lib/types/components/MarkdownTable.d.ts.map +1 -1
- package/lib/types/components/MarkdownTable.js +4 -3
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +109 -15
- package/lib/types/components/ModelPicker.d.ts +24 -31
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +115 -40
- package/lib/types/components/PermissionsPicker.d.ts +10 -1
- package/lib/types/components/PermissionsPicker.d.ts.map +1 -1
- package/lib/types/components/PermissionsPicker.js +24 -16
- package/lib/types/components/PluginInstallPane.d.ts +21 -0
- package/lib/types/components/PluginInstallPane.d.ts.map +1 -0
- package/lib/types/components/PluginInstallPane.js +84 -0
- package/lib/types/components/PluginManagePane.d.ts +21 -0
- package/lib/types/components/PluginManagePane.d.ts.map +1 -0
- package/lib/types/components/PluginManagePane.js +69 -0
- package/lib/types/components/PromptEditor.d.ts +3 -3
- package/lib/types/components/PromptInput.d.ts +21 -3
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +65 -121
- package/lib/types/components/SdkInstallWizard.d.ts +3 -1
- package/lib/types/components/SdkInstallWizard.d.ts.map +1 -1
- package/lib/types/components/SdkInstallWizard.js +8 -1
- package/lib/types/components/SearchBox.d.ts +13 -15
- package/lib/types/components/SearchBox.d.ts.map +1 -1
- package/lib/types/components/SearchBox.js +58 -27
- package/lib/types/components/SubagentCard.d.ts +13 -1
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +27 -12
- package/lib/types/components/SubagentDashboard.d.ts +8 -1
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +58 -16
- package/lib/types/components/ThemePicker.d.ts +1 -1
- package/lib/types/components/ThemePicker.d.ts.map +1 -1
- package/lib/types/components/ThemePicker.js +14 -11
- package/lib/types/components/Tooltip.js +1 -1
- package/lib/types/components/WorkingSpinner.js +1 -1
- package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -1
- package/lib/types/components/WorkspaceFlowPicker.js +4 -3
- package/lib/types/components/composerImageTokens.d.ts +24 -0
- package/lib/types/components/composerImageTokens.d.ts.map +1 -0
- package/lib/types/components/composerImageTokens.js +37 -0
- package/lib/types/components/design-system/InputCaret.d.ts +7 -0
- package/lib/types/components/design-system/InputCaret.d.ts.map +1 -0
- package/lib/types/components/design-system/InputCaret.js +9 -0
- package/lib/types/components/design-system/ListItem.d.ts +13 -2
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
- package/lib/types/components/design-system/ListItem.js +11 -5
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +6 -8
- package/lib/types/components/kernelCatalog.d.ts +55 -11
- package/lib/types/components/kernelCatalog.d.ts.map +1 -1
- package/lib/types/components/kernelCatalog.js +42 -23
- package/lib/types/components/launchpadActions.d.ts +4 -0
- package/lib/types/components/launchpadActions.d.ts.map +1 -1
- package/lib/types/components/launchpadActions.js +5 -4
- package/lib/types/components/launchpadLayout.d.ts +14 -1
- package/lib/types/components/launchpadLayout.d.ts.map +1 -1
- package/lib/types/components/launchpadLayout.js +38 -19
- package/lib/types/components/messages/TeamMessageBubble.d.ts +20 -0
- package/lib/types/components/messages/TeamMessageBubble.d.ts.map +1 -0
- package/lib/types/components/messages/TeamMessageBubble.js +15 -0
- package/lib/types/components/messages/UserPromptMessage.d.ts +4 -3
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
- package/lib/types/components/messages/UserPromptMessage.js +4 -3
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +8 -3
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +4 -3
- package/lib/types/components/questions/ProviderModelEditor.d.ts.map +1 -1
- package/lib/types/components/questions/ProviderModelEditor.js +3 -13
- package/lib/types/components/sessions/ForeignSessionRow.d.ts +3 -1
- package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -1
- package/lib/types/components/sessions/ForeignSessionRow.js +5 -2
- package/lib/types/components/sessions/SessionListRow.d.ts +3 -1
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
- package/lib/types/components/sessions/SessionListRow.js +5 -2
- package/lib/types/components/sidePanel/PanelBar.d.ts +1 -0
- package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelBar.js +21 -17
- package/lib/types/components/sidePanel/PanelHost.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelHost.js +5 -1
- package/lib/types/components/sidePanel/PanelStore.d.ts +8 -0
- package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelStore.js +11 -0
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.js +15 -2
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts +6 -4
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelLayout.js +33 -7
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts +7 -0
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.js +4 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +7 -2
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.js +28 -8
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts +2 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +156 -21
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +6 -2
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +64 -16
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts +15 -5
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadView.js +101 -10
- package/lib/types/components/sidePanel/btw/threads.d.ts +18 -0
- package/lib/types/components/sidePanel/btw/threads.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/threads.js +51 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
- package/lib/types/components/sidePanel/builtinPanels.js +5 -1
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -2
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts +5 -1
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/SplashMascot.js +19 -4
- package/lib/types/components/sidePanel/companion/skins.d.ts +8 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/skins.js +57 -12
- package/lib/types/components/sidePanel/types.d.ts +7 -1
- package/lib/types/components/sidePanel/types.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.d.ts +2 -0
- package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.js +11 -1
- package/lib/types/components/splashArtRows.d.ts +29 -0
- package/lib/types/components/splashArtRows.d.ts.map +1 -0
- package/lib/types/components/splashArtRows.js +31 -0
- package/lib/types/components/splashFonts.d.ts +24 -1
- package/lib/types/components/splashFonts.d.ts.map +1 -1
- package/lib/types/components/splashFonts.js +40 -5
- package/lib/types/components/teamRoster.d.ts +70 -0
- package/lib/types/components/teamRoster.d.ts.map +1 -0
- package/lib/types/components/teamRoster.js +78 -0
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +3 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +5 -2
- package/lib/types/dsh-adapter/admission-loader.d.ts +102 -0
- package/lib/types/dsh-adapter/admission-loader.d.ts.map +1 -0
- package/lib/types/dsh-adapter/admission-loader.js +301 -0
- package/lib/types/dsh-adapter/agent-view.d.ts.map +1 -1
- package/lib/types/dsh-adapter/agent-view.js +3 -1
- package/lib/types/dsh-adapter/approvals.d.ts +7 -0
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.js +45 -1
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +71 -8
- package/lib/types/dsh-adapter/backend-admission.d.ts +64 -0
- package/lib/types/dsh-adapter/backend-admission.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-admission.js +34 -0
- package/lib/types/dsh-adapter/backend-assembly.d.ts +31 -0
- package/lib/types/dsh-adapter/backend-assembly.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-assembly.js +225 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts +62 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-contribution.js +78 -0
- package/lib/types/dsh-adapter/backend-registry.d.ts +136 -0
- package/lib/types/dsh-adapter/backend-registry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-registry.js +304 -0
- package/lib/types/dsh-adapter/backends.d.ts +67 -24
- package/lib/types/dsh-adapter/backends.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backends.generated.d.ts +12 -0
- package/lib/types/dsh-adapter/backends.generated.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backends.generated.js +6 -0
- package/lib/types/dsh-adapter/backends.js +91 -46
- package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/bundled-presets.js +60 -3
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +2 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +9 -3
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +2 -2
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +8 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +17 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +19 -46
- package/lib/types/dsh-adapter/channel/channel-host.d.ts +45 -0
- package/lib/types/dsh-adapter/channel/channel-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/channel-host.js +1 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts +5 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +79 -6
- package/lib/types/dsh-adapter/channel/compaction.d.ts +7 -2
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +100 -26
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +4 -2
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +36 -5
- package/lib/types/dsh-adapter/channel/cordis-host.d.ts +14 -0
- package/lib/types/dsh-adapter/channel/cordis-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/cordis-host.js +35 -0
- package/lib/types/dsh-adapter/channel/core/actions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/actions.js +15 -6
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +10 -3
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +5 -1
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +12 -28
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/compose.js +330 -117
- package/lib/types/dsh-adapter/channel/core/files.d.ts +7 -2
- package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/files.js +1 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts +12 -6
- package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/host.js +69 -35
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +5 -3
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.js +5 -2
- package/lib/types/dsh-adapter/channel/core/session-controls.js +2 -2
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts +7 -4
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/session-switch.js +8 -4
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/sessions.js +75 -16
- package/lib/types/dsh-adapter/channel/extensions.d.ts +4 -3
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/extensions.js +109 -30
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +14 -5
- package/lib/types/dsh-adapter/channel/job-projection.d.ts +4 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/job-projection.js +205 -24
- package/lib/types/dsh-adapter/channel/mentions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +7 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.js +235 -13
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +48 -29
- package/lib/types/dsh-adapter/channel/model-selection.d.ts +17 -0
- package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-selection.js +109 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +12 -21
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +39 -102
- package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/permissions.js +4 -1
- package/lib/types/dsh-adapter/channel/projection-helpers.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection-helpers.js +2 -0
- package/lib/types/dsh-adapter/channel/projection.js +1 -1
- package/lib/types/dsh-adapter/channel/reports.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/reports.js +11 -3
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +33 -20
- package/lib/types/dsh-adapter/channel/session-listing.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/session-listing.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-listing.js +51 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +3 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +60 -30
- package/lib/types/dsh-adapter/channel/session-reset.js +2 -2
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +22 -8
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +38 -24
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +38 -24
- package/lib/types/dsh-adapter/channel/settings-host.d.ts +5 -2
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +136 -5
- package/lib/types/dsh-adapter/channel/state.d.ts +43 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +14 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +84 -12
- package/lib/types/dsh-adapter/channel/task-completion.d.ts +6 -0
- package/lib/types/dsh-adapter/channel/task-completion.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/task-completion.js +114 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts +8 -1
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +20 -3
- package/lib/types/dsh-adapter/channel/upstream-retry.d.ts +81 -0
- package/lib/types/dsh-adapter/channel/upstream-retry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/upstream-retry.js +138 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/workspace-actions.js +9 -8
- package/lib/types/dsh-adapter/channel-ui.d.ts +3 -1
- package/lib/types/dsh-adapter/channel-ui.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel-ui.js +4 -2
- package/lib/types/dsh-adapter/channel.d.ts +2 -2
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +19 -5
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.d.ts +55 -0
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.js +96 -0
- package/lib/types/dsh-adapter/context-occupancy.d.ts +81 -4
- package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -1
- package/lib/types/dsh-adapter/context-occupancy.js +108 -17
- package/lib/types/dsh-adapter/contract.d.ts +4 -4
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +20 -5
- package/lib/types/dsh-adapter/effect-ledger.d.ts +7 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
- package/lib/types/dsh-adapter/effect-ledger.js +8 -1
- package/lib/types/dsh-adapter/entry-slot.d.ts +38 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -0
- package/lib/types/dsh-adapter/entry-slot.js +28 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts +22 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts.map +1 -0
- package/lib/types/dsh-adapter/fresh-agent.js +226 -0
- package/lib/types/dsh-adapter/host-access.d.ts +16 -1
- package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-access.js +148 -2
- package/lib/types/dsh-adapter/host-contract.d.ts +103 -0
- package/lib/types/dsh-adapter/host-contract.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-contract.js +77 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts +112 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-dsh.js +481 -0
- package/lib/types/dsh-adapter/host-entry.d.ts +9 -0
- package/lib/types/dsh-adapter/host-entry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-entry.js +253 -0
- package/lib/types/dsh-adapter/index.d.ts +53 -17
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +63 -9
- package/lib/types/dsh-adapter/install/executors.d.ts +44 -0
- package/lib/types/dsh-adapter/install/executors.d.ts.map +1 -0
- package/lib/types/dsh-adapter/install/executors.js +15 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts +3 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts.map +1 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.js +150 -0
- package/lib/types/dsh-adapter/invariant.d.ts +7 -2
- package/lib/types/dsh-adapter/invariant.d.ts.map +1 -1
- package/lib/types/dsh-adapter/invariant.js +6 -3
- package/lib/types/dsh-adapter/jobs.d.ts +7 -0
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +13 -0
- package/lib/types/dsh-adapter/lite-profile.d.ts +50 -0
- package/lib/types/dsh-adapter/lite-profile.d.ts.map +1 -0
- package/lib/types/dsh-adapter/lite-profile.js +49 -0
- package/lib/types/dsh-adapter/migrate/index.js +2 -2
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +4 -3
- package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -1
- package/lib/types/dsh-adapter/oauth/profiles.js +5 -1
- package/lib/types/dsh-adapter/panels.d.ts +7 -0
- package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
- package/lib/types/dsh-adapter/panels.js +41 -2
- package/lib/types/dsh-adapter/plugin-completions.d.ts +32 -0
- package/lib/types/dsh-adapter/plugin-completions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-completions.js +80 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts +119 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-declaration.js +183 -0
- package/lib/types/dsh-adapter/plugin-feed.d.ts +94 -0
- package/lib/types/dsh-adapter/plugin-feed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-feed.js +135 -0
- package/lib/types/dsh-adapter/plugin-guard.d.ts +115 -0
- package/lib/types/dsh-adapter/plugin-guard.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-guard.js +108 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts +13 -2
- package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-host.js +34 -8
- package/lib/types/dsh-adapter/plugin-install.d.ts +160 -0
- package/lib/types/dsh-adapter/plugin-install.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-install.js +545 -0
- package/lib/types/dsh-adapter/plugin-manage.d.ts +178 -0
- package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-manage.js +468 -0
- package/lib/types/dsh-adapter/plugin-manager.d.ts +144 -0
- package/lib/types/dsh-adapter/plugin-manager.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-manager.js +83 -0
- package/lib/types/dsh-adapter/plugin.d.ts +50 -1
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +918 -234
- package/lib/types/dsh-adapter/plugins-info.d.ts +130 -8
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +469 -44
- package/lib/types/dsh-adapter/process-exit.d.ts +43 -0
- package/lib/types/dsh-adapter/process-exit.d.ts.map +1 -0
- package/lib/types/dsh-adapter/process-exit.js +60 -0
- package/lib/types/dsh-adapter/root-dispose.d.ts +18 -0
- package/lib/types/dsh-adapter/root-dispose.d.ts.map +1 -0
- package/lib/types/dsh-adapter/root-dispose.js +28 -0
- package/lib/types/dsh-adapter/session-list-metadata.d.ts +20 -0
- package/lib/types/dsh-adapter/session-list-metadata.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-list-metadata.js +56 -0
- package/lib/types/dsh-adapter/session-projection-store.d.ts +66 -0
- package/lib/types/dsh-adapter/session-projection-store.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-projection-store.js +149 -0
- package/lib/types/dsh-adapter/session-seed.d.ts +11 -0
- package/lib/types/dsh-adapter/session-seed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-seed.js +47 -0
- package/lib/types/dsh-adapter/sessions/list.d.ts +3 -1
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +11 -5
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts +0 -2
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/snapshot.js +7 -70
- package/lib/types/dsh-adapter/settingsEditor.js +2 -2
- package/lib/types/dsh-adapter/sideQuestion.d.ts +21 -0
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.js +53 -0
- package/lib/types/dsh-adapter/startup-args.d.ts +2 -0
- package/lib/types/dsh-adapter/startup-args.d.ts.map +1 -1
- package/lib/types/dsh-adapter/startup-args.js +5 -0
- package/lib/types/dsh-adapter/subagents.d.ts +33 -1
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +112 -9
- package/lib/types/dsh-adapter/team-mode.d.ts +74 -0
- package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-mode.js +188 -0
- package/lib/types/dsh-adapter/team-roster.d.ts +67 -0
- package/lib/types/dsh-adapter/team-roster.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-roster.js +136 -0
- package/lib/types/dsh-adapter/team-tools.d.ts +58 -0
- package/lib/types/dsh-adapter/team-tools.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-tools.js +208 -0
- package/lib/types/dsh-adapter/tui-settings.d.ts +57 -0
- package/lib/types/dsh-adapter/tui-settings.d.ts.map +1 -0
- package/lib/types/dsh-adapter/tui-settings.js +199 -0
- package/lib/types/dsh-adapter/types.d.ts +1 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/effortPrefs.d.ts +6 -3
- package/lib/types/effortPrefs.d.ts.map +1 -1
- package/lib/types/effortPrefs.js +7 -4
- package/lib/types/hostEntryRoute.d.ts +18 -0
- package/lib/types/hostEntryRoute.d.ts.map +1 -0
- package/lib/types/hostEntryRoute.js +57 -0
- package/lib/types/i18n.d.ts +961 -1439
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +443 -387
- package/lib/types/ink/components/AlternateScreen.js +2 -2
- package/lib/types/ink/components/App.d.ts +1 -0
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +16 -4
- package/lib/types/ink/components/CursorDeclarationContext.d.ts +9 -0
- package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -1
- package/lib/types/ink/components/CursorDeclarationContext.js +2 -0
- package/lib/types/ink/components/ScrollBox.d.ts +9 -0
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +23 -0
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-copy-on-select.d.ts +2 -2
- package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-copy-on-select.js +13 -7
- package/lib/types/ink/hooks/use-declared-cursor.d.ts +11 -3
- package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-declared-cursor.js +30 -10
- package/lib/types/ink/ink.d.ts +22 -17
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +151 -40
- package/lib/types/ink/kitty-graphics.d.ts +2 -0
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +6 -1
- package/lib/types/ink/node-cache.d.ts +2 -1
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/output.d.ts +10 -4
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +14 -10
- package/lib/types/ink/render-node-to-output.d.ts +5 -2
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +27 -9
- package/lib/types/ink/renderer.d.ts +1 -0
- package/lib/types/ink/renderer.d.ts.map +1 -1
- package/lib/types/ink/renderer.js +4 -3
- package/lib/types/ink/root.d.ts +4 -1
- package/lib/types/ink/root.d.ts.map +1 -1
- package/lib/types/ink/screen.d.ts +4 -2
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/selection.d.ts +10 -1
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +94 -25
- package/lib/types/ink/stdin-handoff.d.ts +11 -0
- package/lib/types/ink/stdin-handoff.d.ts.map +1 -0
- package/lib/types/ink/stdin-handoff.js +20 -0
- package/lib/types/ink/styles.d.ts +2 -1
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +6 -4
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.js +16 -39
- package/lib/types/ink/terminal-notification.d.ts +8 -0
- package/lib/types/ink/terminal-notification.d.ts.map +1 -0
- package/lib/types/ink/terminal-notification.js +83 -0
- package/lib/types/ink/terminal.d.ts +9 -0
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +34 -1
- package/lib/types/ink/termio/csi.d.ts +11 -0
- package/lib/types/ink/termio/csi.d.ts.map +1 -1
- package/lib/types/ink/termio/csi.js +13 -0
- package/lib/types/ink/update-overflow-guard.d.ts +6 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.js +17 -0
- package/lib/types/ink/wrap-text.d.ts +6 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -1
- package/lib/types/ink/wrap-text.js +17 -0
- package/lib/types/kernelPrefs.d.ts +130 -17
- package/lib/types/kernelPrefs.d.ts.map +1 -1
- package/lib/types/kernelPrefs.js +98 -35
- package/lib/types/math/inline-layout.d.ts +2 -0
- package/lib/types/math/inline-layout.d.ts.map +1 -1
- package/lib/types/math/inline-layout.js +5 -27
- package/lib/types/modelGroups.d.ts +15 -27
- package/lib/types/modelGroups.d.ts.map +1 -1
- package/lib/types/modelGroups.js +17 -31
- package/lib/types/modelPrefs.d.ts +5 -4
- package/lib/types/modelPrefs.d.ts.map +1 -1
- package/lib/types/modelPrefs.js +5 -4
- package/lib/types/modelRoute.d.ts +23 -9
- package/lib/types/modelRoute.d.ts.map +1 -1
- package/lib/types/modelRoute.js +25 -11
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
- package/lib/types/native-ts/yoga-layout/index.js +8 -1
- package/lib/types/permissionPrefs.d.ts +34 -0
- package/lib/types/permissionPrefs.d.ts.map +1 -0
- package/lib/types/permissionPrefs.js +61 -0
- package/lib/types/permissionPresetLabels.d.ts +25 -0
- package/lib/types/permissionPresetLabels.d.ts.map +1 -0
- package/lib/types/permissionPresetLabels.js +33 -0
- package/lib/types/plugin-host.d.ts +1 -0
- package/lib/types/plugin-host.d.ts.map +1 -1
- package/lib/types/preset-patch.d.ts +22 -0
- package/lib/types/preset-patch.d.ts.map +1 -0
- package/lib/types/preset-patch.js +14 -0
- package/lib/types/presetPrefs.d.ts +17 -3
- package/lib/types/presetPrefs.d.ts.map +1 -1
- package/lib/types/presetPrefs.js +20 -3
- package/lib/types/reload.d.ts +6 -10
- package/lib/types/reload.d.ts.map +1 -1
- package/lib/types/reload.js +14 -14
- package/lib/types/screens/Chat.d.ts +55 -16
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +742 -280
- package/lib/types/screens/Launchpad.d.ts +33 -17
- package/lib/types/screens/Launchpad.d.ts.map +1 -1
- package/lib/types/screens/Launchpad.js +256 -78
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +53 -12
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +7 -0
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +24 -7
- package/lib/types/screens/StatusMetrics.d.ts +46 -1
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +72 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts +8 -4
- package/lib/types/screens/chat/useKernelPicker.d.ts.map +1 -1
- package/lib/types/screens/chat/useKernelPicker.js +61 -21
- package/lib/types/screens/chat/useModelPicker.d.ts +42 -0
- package/lib/types/screens/chat/useModelPicker.d.ts.map +1 -0
- package/lib/types/screens/chat/useModelPicker.js +182 -0
- package/lib/types/screens/chat/usePluginWriteFlow.d.ts +68 -0
- package/lib/types/screens/chat/usePluginWriteFlow.d.ts.map +1 -0
- package/lib/types/screens/chat/usePluginWriteFlow.js +92 -0
- package/lib/types/screens/chatOverlay.d.ts +30 -5
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +0 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +4 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +26 -5
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +51 -29
- package/lib/types/sessionHistory.d.ts +5 -0
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +5 -0
- package/lib/types/sessionModes.d.ts +5 -3
- package/lib/types/sessionModes.d.ts.map +1 -1
- package/lib/types/sessionModes.js +9 -3
- package/lib/types/sessions/listSnapshot.d.ts +6 -0
- package/lib/types/sessions/listSnapshot.d.ts.map +1 -0
- package/lib/types/sessions/listSnapshot.js +67 -0
- package/lib/types/settings/definitions.d.ts +50 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +42 -8
- package/lib/types/terminal-utils/cjk-emphasis.d.ts +28 -0
- package/lib/types/terminal-utils/cjk-emphasis.d.ts.map +1 -0
- package/lib/types/terminal-utils/cjk-emphasis.js +31 -0
- package/lib/types/terminal-utils/markdown.d.ts +3 -1
- package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
- package/lib/types/terminal-utils/markdown.js +7 -2
- package/lib/types/theme.d.ts +29 -12
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +310 -23
- package/lib/types/themeCatalog.d.ts.map +1 -1
- package/lib/types/themeCatalog.js +21 -2
- package/lib/types/tips.js +4 -4
- package/lib/types/tuiSettingsFile.d.ts +56 -0
- package/lib/types/tuiSettingsFile.d.ts.map +1 -0
- package/lib/types/tuiSettingsFile.js +206 -0
- package/lib/types/ui.d.ts +2 -0
- package/lib/types/ui.d.ts.map +1 -1
- package/lib/types/ui.js +2 -0
- package/lib/types/update.d.ts +72 -26
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +131 -43
- package/lib/types/utils/bmp.d.ts +7 -0
- package/lib/types/utils/bmp.d.ts.map +1 -1
- package/lib/types/utils/bmp.js +27 -0
- package/lib/types/utils/bootTrace.d.ts +2 -0
- package/lib/types/utils/bootTrace.d.ts.map +1 -0
- package/lib/types/utils/bootTrace.js +20 -0
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +11 -3
- package/lib/types/utils/credentials.d.ts +14 -2
- package/lib/types/utils/credentials.d.ts.map +1 -1
- package/lib/types/utils/credentials.js +34 -11
- package/lib/types/utils/imageResize.d.ts +10 -20
- package/lib/types/utils/imageResize.d.ts.map +1 -1
- package/lib/types/utils/imageResize.js +61 -134
- package/lib/types/utils/inputPaste.d.ts +2 -2
- package/lib/types/utils/inputPaste.js +2 -2
- package/lib/types/utils/pastedImagePath.d.ts +5 -0
- package/lib/types/utils/pastedImagePath.d.ts.map +1 -1
- package/lib/types/utils/pastedImagePath.js +33 -0
- package/lib/types/utils/paths.d.ts +11 -0
- package/lib/types/utils/paths.d.ts.map +1 -1
- package/lib/types/utils/paths.js +13 -0
- package/package.json +150 -114
- package/presets/winbash.mjs +716 -0
- package/tui-profile/feed/README.md +63 -0
- package/tui-profile/feed/first-party.json +10 -0
- package/tui-profile/protocols/profile-definitions.d.ts +1 -0
- package/tui-profile/protocols/profile-definitions.js +14 -0
- package/tui-profile/protocols/tui-contributions.d.ts +55 -0
- package/tui-profile/protocols/tui-contributions.js +141 -0
- package/tui-profile/registry/contracts/backend-v1alpha1.json +13 -0
- package/tui-profile/registry/registry-0.15.json +12 -0
- package/lib/types/backends/claude/install.d.ts +0 -15
- package/lib/types/backends/claude/install.d.ts.map +0 -1
- package/lib/types/backends/claude/install.js +0 -91
- package/lib/types/channel/elicitation.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts +0 -42
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/session-lineage.js +0 -51
- package/lib/types/utils/jsonl.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { codexText } from '../text.js';
|
|
2
2
|
import { errorText, rec, str } from '../narrow.js';
|
|
3
3
|
import { CLIENT } from '../protocol/index.js';
|
|
4
4
|
import { codexImageInputs } from './images.js';
|
|
@@ -18,8 +18,13 @@ export function userInputOf(input) {
|
|
|
18
18
|
export function createInputQueue(deps) {
|
|
19
19
|
/** The running turn (from its start answer or `turn/started`). */
|
|
20
20
|
let activeTurnId;
|
|
21
|
+
/** Inline reviews can use a different id for items/completion than the
|
|
22
|
+
* one announced by `turn/started` (Codex 0.160.1). */
|
|
23
|
+
let reviewTurnId;
|
|
21
24
|
/** A `turn/start` in flight: resolves with the turn id (undefined = it failed). */
|
|
22
25
|
let starting;
|
|
26
|
+
/** Reviews announce their interrupt id separately from their request id. */
|
|
27
|
+
let resolveReviewStart;
|
|
23
28
|
/** Inputs not sent yet (the client follow-up queue). */
|
|
24
29
|
let queue = [];
|
|
25
30
|
/** Sent with `turn/start`, not yet claimed by their user message. */
|
|
@@ -45,6 +50,13 @@ export function createInputQueue(deps) {
|
|
|
45
50
|
deps.clock.clearTimeout(forceTimer);
|
|
46
51
|
forceTimer = undefined;
|
|
47
52
|
};
|
|
53
|
+
const settleReviewStart = (id) => {
|
|
54
|
+
if (resolveReviewStart === undefined)
|
|
55
|
+
return;
|
|
56
|
+
resolveReviewStart(id);
|
|
57
|
+
resolveReviewStart = undefined;
|
|
58
|
+
starting = undefined;
|
|
59
|
+
};
|
|
48
60
|
/** Send one input as a new turn. */
|
|
49
61
|
const startTurn = async (entry) => {
|
|
50
62
|
started.set(entry.id, entry);
|
|
@@ -68,7 +80,7 @@ export function createInputQueue(deps) {
|
|
|
68
80
|
deps.startFailed?.(error, overrides);
|
|
69
81
|
started.delete(entry.id);
|
|
70
82
|
resolveStart(undefined);
|
|
71
|
-
const reason =
|
|
83
|
+
const reason = codexText('codex-turn-start-failed', { err: errorText(error) });
|
|
72
84
|
deps.debug(`codex: turn/start failed (${errorText(error)})`);
|
|
73
85
|
deps.emit([pendingEvent({ discarded: [entry.id] })]);
|
|
74
86
|
return { accepted: false, reason };
|
|
@@ -86,7 +98,7 @@ export function createInputQueue(deps) {
|
|
|
86
98
|
return;
|
|
87
99
|
void startTurn(next).then(result => {
|
|
88
100
|
if (!result.accepted)
|
|
89
|
-
deps.emit([{ type: 'notice', level: 'error', text: result.reason ??
|
|
101
|
+
deps.emit([{ type: 'notice', level: 'error', text: result.reason ?? codexText('codex-turn-start-failed', { err: '' }) }]);
|
|
90
102
|
else
|
|
91
103
|
drain();
|
|
92
104
|
});
|
|
@@ -112,14 +124,16 @@ export function createInputQueue(deps) {
|
|
|
112
124
|
queue.push(entry);
|
|
113
125
|
if (!steerFallbackSaid) {
|
|
114
126
|
steerFallbackSaid = true;
|
|
115
|
-
deps.emit([{ type: 'notice', level: 'info', text:
|
|
127
|
+
deps.emit([{ type: 'notice', level: 'info', text: codexText('codex-steer-fallback') }]);
|
|
116
128
|
}
|
|
117
129
|
drain();
|
|
118
130
|
return { accepted: true };
|
|
119
131
|
}
|
|
120
132
|
};
|
|
121
|
-
const interrupt = async () => {
|
|
122
|
-
|
|
133
|
+
const interrupt = async (waitForReviewStart = true) => {
|
|
134
|
+
// Dispose has already stopped notification delivery. It cannot wait for
|
|
135
|
+
// a review lifecycle id that only a notification could resolve.
|
|
136
|
+
const turnId = activeTurnId ?? (resolveReviewStart !== undefined && !waitForReviewStart ? undefined : await starting);
|
|
123
137
|
if (turnId === undefined)
|
|
124
138
|
return true;
|
|
125
139
|
try {
|
|
@@ -134,8 +148,8 @@ export function createInputQueue(deps) {
|
|
|
134
148
|
forceTimer = undefined;
|
|
135
149
|
if (activeTurnId !== turnId)
|
|
136
150
|
return;
|
|
137
|
-
deps.emit([{ type: 'notice', level: 'warning', text:
|
|
138
|
-
deps.forceClose();
|
|
151
|
+
deps.emit([{ type: 'notice', level: 'warning', text: codexText('codex-cancel-forced') }]);
|
|
152
|
+
deps.forceClose(turnId, reviewTurnId);
|
|
139
153
|
onTurnCompleted(turnId, true);
|
|
140
154
|
}, deps.forceSettleMs);
|
|
141
155
|
}
|
|
@@ -143,10 +157,12 @@ export function createInputQueue(deps) {
|
|
|
143
157
|
};
|
|
144
158
|
/** The turn ended: settle unclaimed inputs, then start the next queued one. */
|
|
145
159
|
const onTurnCompleted = (turnId, interrupted) => {
|
|
146
|
-
if (turnId !== undefined && activeTurnId !== undefined && turnId !== activeTurnId)
|
|
160
|
+
if (turnId !== undefined && activeTurnId !== undefined && turnId !== activeTurnId && turnId !== reviewTurnId)
|
|
147
161
|
return;
|
|
148
162
|
clearForceTimer();
|
|
163
|
+
settleReviewStart();
|
|
149
164
|
activeTurnId = undefined;
|
|
165
|
+
reviewTurnId = undefined;
|
|
150
166
|
const cause = cancelCause;
|
|
151
167
|
cancelCause = undefined;
|
|
152
168
|
const events = [];
|
|
@@ -184,14 +200,14 @@ export function createInputQueue(deps) {
|
|
|
184
200
|
busy() { return activeTurnId !== undefined || starting !== undefined; },
|
|
185
201
|
async submit(input, placement, wireInput) {
|
|
186
202
|
if (deps.closed())
|
|
187
|
-
throw new Error(
|
|
203
|
+
throw new Error(codexText('codex-session-closed'));
|
|
188
204
|
if (dead)
|
|
189
|
-
throw new Error(
|
|
205
|
+
throw new Error(codexText('codex-connection-dead'));
|
|
190
206
|
if ((input.images ?? []).length === 0 && (input.blocks ?? []).some(block => block.type === 'image'))
|
|
191
|
-
throw new Error(
|
|
207
|
+
throw new Error(codexText('codex-image-unreadable', { name: input.clientMessageId }));
|
|
192
208
|
const pictureInputs = await codexImageInputs(input.images ?? []);
|
|
193
209
|
if (deps.closed())
|
|
194
|
-
throw new Error(
|
|
210
|
+
throw new Error(codexText('codex-session-closed'));
|
|
195
211
|
const entry = { id: input.clientMessageId, text: input.text, input: [...(wireInput ?? userInputOf(input)), ...pictureInputs], placement: placement === 'steer' ? 'steer' : 'followup' };
|
|
196
212
|
if (offline) {
|
|
197
213
|
queue.push(entry);
|
|
@@ -249,6 +265,28 @@ export function createInputQueue(deps) {
|
|
|
249
265
|
},
|
|
250
266
|
onTurnStarted(turnId) {
|
|
251
267
|
activeTurnId = turnId;
|
|
268
|
+
settleReviewStart(turnId);
|
|
269
|
+
},
|
|
270
|
+
/** Reserve the turn before review/start reaches the server. The returned
|
|
271
|
+
* cleanup releases only this request's wait if its RPC fails. */
|
|
272
|
+
beginReview() {
|
|
273
|
+
const pending = new Promise(resolve => { resolveReviewStart = resolve; });
|
|
274
|
+
starting = pending;
|
|
275
|
+
return () => {
|
|
276
|
+
if (starting !== pending)
|
|
277
|
+
return;
|
|
278
|
+
settleReviewStart();
|
|
279
|
+
reviewTurnId = undefined;
|
|
280
|
+
cancelCause = undefined;
|
|
281
|
+
drain();
|
|
282
|
+
};
|
|
283
|
+
},
|
|
284
|
+
onReviewStarted(turnId) {
|
|
285
|
+
reviewTurnId = turnId;
|
|
286
|
+
// review/start's id cannot be used by turn/interrupt. Keep submissions
|
|
287
|
+
// queued and let an early Esc wait for the native lifecycle id.
|
|
288
|
+
if (activeTurnId === undefined && starting === undefined)
|
|
289
|
+
starting = new Promise(resolve => { resolveReviewStart = resolve; });
|
|
252
290
|
},
|
|
253
291
|
onTurnCompleted,
|
|
254
292
|
/** Re-queue a rejection's reason as the next turn (D10). */
|
|
@@ -260,7 +298,9 @@ export function createInputQueue(deps) {
|
|
|
260
298
|
connectionLost() {
|
|
261
299
|
offline = true;
|
|
262
300
|
clearForceTimer();
|
|
301
|
+
settleReviewStart();
|
|
263
302
|
activeTurnId = undefined;
|
|
303
|
+
reviewTurnId = undefined;
|
|
264
304
|
const lost = [...started.keys(), ...steered.keys()];
|
|
265
305
|
started.clear();
|
|
266
306
|
steered.clear();
|
|
@@ -284,9 +324,11 @@ export function createInputQueue(deps) {
|
|
|
284
324
|
/** Dispose: forget everything, stop the timer. */
|
|
285
325
|
close() {
|
|
286
326
|
clearForceTimer();
|
|
327
|
+
settleReviewStart();
|
|
287
328
|
queue = [];
|
|
288
329
|
started.clear();
|
|
289
330
|
steered.clear();
|
|
331
|
+
reviewTurnId = undefined;
|
|
290
332
|
},
|
|
291
333
|
/** Interrupt the running turn (best-effort, dispose path). */
|
|
292
334
|
interrupt,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { codexText } from '../text.js';
|
|
2
2
|
import { errorText } from '../narrow.js';
|
|
3
3
|
import { PLAN_IMPLEMENTATION_PROMPT } from './prompts.js';
|
|
4
4
|
export function createPlanReview(deps) {
|
|
@@ -15,13 +15,13 @@ export function createPlanReview(deps) {
|
|
|
15
15
|
withdraw();
|
|
16
16
|
if (plan.trim() === '')
|
|
17
17
|
return;
|
|
18
|
-
const yes =
|
|
19
|
-
const clear =
|
|
20
|
-
const stay =
|
|
18
|
+
const yes = codexText('codex-plan-yes');
|
|
19
|
+
const clear = codexText('codex-plan-clear');
|
|
20
|
+
const stay = codexText('codex-plan-stay');
|
|
21
21
|
const id = `codex-plan:${turnId}`;
|
|
22
22
|
pending = { id, plan, yes, clear, stay };
|
|
23
23
|
deps.emit([{ type: 'question.request', request: { requestId: id, questions: [{
|
|
24
|
-
question:
|
|
24
|
+
question: codexText('codex-plan-implement'), header: codexText('codex-mode-plan'), detail: plan,
|
|
25
25
|
options: [{ label: yes }, { label: clear }, { label: stay }],
|
|
26
26
|
intent: { kind: 'plan-review', approve: yes, approveAlso: [clear], decline: stay },
|
|
27
27
|
}] } }]);
|
|
@@ -38,7 +38,7 @@ export function createPlanReview(deps) {
|
|
|
38
38
|
: selected === current.yes ? () => deps.implement()
|
|
39
39
|
: answer?.custom?.trim() ? () => deps.followup(answer.custom.trim()) : undefined;
|
|
40
40
|
if (action !== undefined)
|
|
41
|
-
void action().catch(error => deps.emit([{ type: 'notice', level: 'error', key: 'codex-plan-action', text:
|
|
41
|
+
void action().catch(error => deps.emit([{ type: 'notice', level: 'error', key: 'codex-plan-action', text: codexText('codex-plan-action-failed', { error: errorText(error) }) }]));
|
|
42
42
|
},
|
|
43
43
|
cancel(id) { if (pending?.id === id)
|
|
44
44
|
withdraw(); },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../../src/backends/codex/session/session.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAc,YAAY,EAAoD,MAAM,2BAA2B,CAAA;AAI3H,OAAO,EAAuC,KAAK,GAAG,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../../src/backends/codex/session/session.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAc,YAAY,EAAoD,MAAM,2BAA2B,CAAA;AAI3H,OAAO,EAAuC,KAAK,GAAG,EAAE,MAAM,cAAc,CAAA;AAyB5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAOhE,qEAAqE;AACrE,wBAAgB,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,GAAG,YAAY,CAkB7E;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAKpF;AAED;;qBAEqB;AACrB,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,CAuuBpF"}
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
* detach and release the hub. Idempotent.
|
|
21
21
|
*/
|
|
22
22
|
import { randomUUID } from 'node:crypto';
|
|
23
|
-
import {
|
|
24
|
-
import { CODEX_BACKEND_ID, codexVersionDrift, VALIDATED_CODEX_VERSIONS } from '../contract.js';
|
|
23
|
+
import { codexText, installCodexLocale } from '../text.js';
|
|
24
|
+
import { CODEX_BACKEND_ID, codexVersionDrift, compareCodexVersions, MIN_CODEX_BEFORE_TURN_FORK_VERSION, parseCodexVersion, VALIDATED_CODEX_VERSIONS } from '../contract.js';
|
|
25
25
|
import { CODEX_MODE_PARAMS, DEFAULT_CODEX_MODE, isCodexModeId, modeIdOf } from '../modes.js';
|
|
26
26
|
import { arr, errorText, num, rec, str, text } from '../narrow.js';
|
|
27
27
|
import { CLIENT, NOTIFY } from '../protocol/index.js';
|
|
@@ -34,6 +34,7 @@ import { rateLimitOf } from '../translate/usage.js';
|
|
|
34
34
|
import { resolveCodexStartOptions } from '../prefs.js';
|
|
35
35
|
import { createCodexAuthCapability } from '../auth/status.js';
|
|
36
36
|
import { createApprovalBridge } from './approvals.js';
|
|
37
|
+
import { createAsyncQuestions } from './async-questions.js';
|
|
37
38
|
import { createCodexControls } from './controls.js';
|
|
38
39
|
import { createCodexCommands } from './commands.js';
|
|
39
40
|
import { createPlanReview, PLAN_IMPLEMENTATION_PROMPT } from './plan-review.js';
|
|
@@ -73,15 +74,21 @@ export function openedThread(response, fallbackCwd) {
|
|
|
73
74
|
export function openFailureText(error, threadId) {
|
|
74
75
|
const message = errorText(error);
|
|
75
76
|
if (/already has an active writer/iu.test(message))
|
|
76
|
-
return
|
|
77
|
+
return codexText('codex-thread-busy', { id: threadId ?? '' });
|
|
77
78
|
if (threadId !== undefined && rpcCode(error) === RPC_ERROR.invalidRequest)
|
|
78
|
-
return
|
|
79
|
+
return codexText('codex-resume-not-found', { id: threadId, err: message });
|
|
79
80
|
return message;
|
|
80
81
|
}
|
|
81
82
|
/** Open (create or resume) a thread and wrap it as a session. Throws a
|
|
82
83
|
* user-facing sentence when the thread cannot be opened; the hub retain is
|
|
83
84
|
* released then. */
|
|
84
85
|
export async function openCodexSession(deps) {
|
|
86
|
+
// This backend's own copy follows the host's language (B-5): a session the
|
|
87
|
+
// host opened has already installed it in `detect()`/`open()`, and a caller
|
|
88
|
+
// that builds the deps itself (a regression fixture) says so here or keeps
|
|
89
|
+
// the documented `zh` fallback.
|
|
90
|
+
if (deps.host.locale !== undefined)
|
|
91
|
+
installCodexLocale(deps.host.locale);
|
|
85
92
|
const { hub } = deps;
|
|
86
93
|
const clock = deps.clock ?? REAL_CLOCK;
|
|
87
94
|
const debug = deps.host.debug;
|
|
@@ -127,7 +134,7 @@ export async function openCodexSession(deps) {
|
|
|
127
134
|
if (opened.threadId === '') {
|
|
128
135
|
detach?.();
|
|
129
136
|
deps.release();
|
|
130
|
-
throw new Error(
|
|
137
|
+
throw new Error(codexText('codex-open-failed', { err: 'no thread id' }));
|
|
131
138
|
}
|
|
132
139
|
let threadId = opened.threadId;
|
|
133
140
|
const ctx = createItemContext({ cwd: opened.cwd, debug, model: opened.model, ...(deps.now === undefined ? {} : { now: deps.now }) });
|
|
@@ -215,7 +222,14 @@ export async function openCodexSession(deps) {
|
|
|
215
222
|
overrides: () => controls.turnOverrides(),
|
|
216
223
|
startFailed: (error, overrides) => controls.turnFailed(error, overrides),
|
|
217
224
|
closed: () => disposing || permanentlyLost,
|
|
218
|
-
forceClose: () => {
|
|
225
|
+
forceClose: (turnId, reviewTurnId) => {
|
|
226
|
+
output.flush();
|
|
227
|
+
asyncQuestions.withdraw();
|
|
228
|
+
seenOf(turnId).ended = true;
|
|
229
|
+
if (reviewTurnId !== undefined)
|
|
230
|
+
seenOf(reviewTurnId).ended = true;
|
|
231
|
+
emit([...live.forceClose({ kind: 'interrupted' }), { type: 'session.status', status: 'idle' }]);
|
|
232
|
+
},
|
|
219
233
|
clock,
|
|
220
234
|
forceSettleMs: deps.forceSettleMs ?? DEFAULT_FORCE_SETTLE_MS,
|
|
221
235
|
});
|
|
@@ -235,6 +249,7 @@ export async function openCodexSession(deps) {
|
|
|
235
249
|
enqueueFollowup: (id, followup) => input.enqueueFollowup(id, followup),
|
|
236
250
|
interruptTurn: () => { void input.interrupt(); },
|
|
237
251
|
});
|
|
252
|
+
const asyncQuestions = createAsyncQuestions({ input, emit: events => emit(events, 'sync', true) });
|
|
238
253
|
const activity = createCodexActivity({ clock, now: ctx.now, emit });
|
|
239
254
|
const subagents = createCodexSubagents({ hub, cwd: opened.cwd, threadId: () => threadId, nextSeq: ctx.nextSeq, now: ctx.now, emit: (events, wake) => deliver(events, wake ?? 'sync'), debug });
|
|
240
255
|
subagents.seed(replayHistory ?? []);
|
|
@@ -244,7 +259,7 @@ export async function openCodexSession(deps) {
|
|
|
244
259
|
const submitText = async (text) => {
|
|
245
260
|
const result = await input.submit({ text, clientMessageId: randomUUID() }, 'followup');
|
|
246
261
|
if (!result.accepted)
|
|
247
|
-
throw new Error(result.reason ??
|
|
262
|
+
throw new Error(result.reason ?? codexText('codex-turn-start-failed', { err: '' }));
|
|
248
263
|
};
|
|
249
264
|
const controls = createCodexControls({
|
|
250
265
|
hub, prefs: deps.prefs, ctx, settings, cwd: opened.cwd,
|
|
@@ -254,12 +269,27 @@ export async function openCodexSession(deps) {
|
|
|
254
269
|
actualModel: id => deps.channels?.active()?.models?.[id] ?? id,
|
|
255
270
|
});
|
|
256
271
|
const sideQueries = createCodexSideQuery({ hub, settings, cwd: opened.cwd, clock, threadId: () => threadId, closed: () => disposing || permanentlyLost, debug });
|
|
272
|
+
const noteReviewStarted = (id) => {
|
|
273
|
+
// Completed and force-settled reviews may still send new item ids or a
|
|
274
|
+
// late review/start answer; neither may reopen the input wait gate.
|
|
275
|
+
if (seenTurns.get(id)?.ended !== true)
|
|
276
|
+
input.onReviewStarted(id);
|
|
277
|
+
};
|
|
257
278
|
const commands = createCodexCommands({
|
|
258
279
|
hub, ctx, cwd: opened.cwd, threadId: () => threadId, busy: () => input.busy(), emit,
|
|
259
280
|
lastDiff: () => lastDiff, planSupported: () => controls.planSupported,
|
|
260
281
|
setPlan: () => controls.capabilities.modes.set('plan'),
|
|
282
|
+
exitPlan: async () => {
|
|
283
|
+
// The same target the plan-review exits use: the permission preset that
|
|
284
|
+
// was active before Plan. Skip the write when Plan is already off —
|
|
285
|
+
// there is nothing to restore and `set` still issues a settings update.
|
|
286
|
+
if (controls.capabilities.modes.current() !== 'plan')
|
|
287
|
+
return;
|
|
288
|
+
await controls.capabilities.modes.set(settings.permissionMode ?? DEFAULT_CODEX_MODE);
|
|
289
|
+
},
|
|
261
290
|
submit: (next, placement, wire) => input.submit(next, placement, wire),
|
|
262
|
-
|
|
291
|
+
beginReview: () => input.beginReview(),
|
|
292
|
+
noteReviewStarted,
|
|
263
293
|
});
|
|
264
294
|
const planReview = createPlanReview({
|
|
265
295
|
emit: events => emit(events, 'sync', true),
|
|
@@ -311,9 +341,10 @@ export async function openCodexSession(deps) {
|
|
|
311
341
|
const response = rec(await hub.call(CLIENT.threadStart, { cwd: opened.cwd, ...resumeOverrides() })) ?? {};
|
|
312
342
|
const next = openedThread(response, opened.cwd);
|
|
313
343
|
if (next.threadId === '')
|
|
314
|
-
throw new Error(
|
|
344
|
+
throw new Error(codexText('codex-open-failed', { err: 'no thread id' }));
|
|
315
345
|
const previous = threadId;
|
|
316
346
|
approvals.withdrawAll();
|
|
347
|
+
asyncQuestions.withdraw();
|
|
317
348
|
authBridge?.withdrawAll();
|
|
318
349
|
output.close();
|
|
319
350
|
for (const unroute of childRoutes.values())
|
|
@@ -364,7 +395,7 @@ export async function openCodexSession(deps) {
|
|
|
364
395
|
if (entry.kind === 'stderr' && /bubblewrap/iu.test(entry.message)) {
|
|
365
396
|
bubblewrapWarned = true;
|
|
366
397
|
if (process.platform === 'linux' && settings.permissionMode !== 'full-access')
|
|
367
|
-
emit([{ type: 'notice', level: 'warning', key: 'codex-bwrap', text:
|
|
398
|
+
emit([{ type: 'notice', level: 'warning', key: 'codex-bwrap', text: codexText('codex-bwrap-warning') }]);
|
|
368
399
|
}
|
|
369
400
|
},
|
|
370
401
|
notification(method, params) {
|
|
@@ -411,6 +442,7 @@ export async function openCodexSession(deps) {
|
|
|
411
442
|
tasks.notification(method, params);
|
|
412
443
|
if (goals.notification(method, params))
|
|
413
444
|
return;
|
|
445
|
+
asyncQuestions.notification(method, params);
|
|
414
446
|
commands.note(method);
|
|
415
447
|
if (controls.note(method, params))
|
|
416
448
|
return;
|
|
@@ -426,6 +458,8 @@ export async function openCodexSession(deps) {
|
|
|
426
458
|
}
|
|
427
459
|
case NOTIFY.itemStarted: {
|
|
428
460
|
const item = rec(params.item);
|
|
461
|
+
if (item?.type === 'enteredReviewMode' && nativeTurn !== undefined)
|
|
462
|
+
noteReviewStarted(nativeTurn);
|
|
429
463
|
const clientId = item?.type === 'userMessage' ? str(item.clientId) : undefined;
|
|
430
464
|
if (clientId !== undefined) {
|
|
431
465
|
const claimed = input.claim(clientId);
|
|
@@ -454,9 +488,13 @@ export async function openCodexSession(deps) {
|
|
|
454
488
|
}
|
|
455
489
|
if (method === NOTIFY.turnCompleted) {
|
|
456
490
|
approvals.turnEnded();
|
|
491
|
+
asyncQuestions.withdraw();
|
|
457
492
|
const turn = rec(params.turn);
|
|
458
493
|
deliver([...before, ...events, { type: 'session.status', status: 'idle' }], wakeOf(method, events));
|
|
494
|
+
const activeTurnId = input.activeTurnId;
|
|
459
495
|
input.onTurnCompleted(str(turn?.id), str(turn?.status) === 'interrupted');
|
|
496
|
+
if (activeTurnId !== undefined && input.activeTurnId !== activeTurnId)
|
|
497
|
+
seenOf(activeTurnId).ended = true;
|
|
460
498
|
if (str(turn?.status) === 'completed' && settings.modeId === 'plan' && lastPlan !== undefined && approvals.size === 0 && !input.busy())
|
|
461
499
|
planReview.offer(str(turn?.id) ?? ctx.turnId, lastPlan);
|
|
462
500
|
return;
|
|
@@ -484,6 +522,7 @@ export async function openCodexSession(deps) {
|
|
|
484
522
|
sideQueries.reset();
|
|
485
523
|
permanentlyLost = permanent;
|
|
486
524
|
approvals.withdrawAll();
|
|
525
|
+
asyncQuestions.withdraw();
|
|
487
526
|
authBridge?.withdrawAll();
|
|
488
527
|
activity.reset();
|
|
489
528
|
planReview.withdraw();
|
|
@@ -494,7 +533,7 @@ export async function openCodexSession(deps) {
|
|
|
494
533
|
// ever drain that queue, so parking forever would lie to the user.
|
|
495
534
|
...(permanent ? live.forceClose({ kind: 'error', message: errorText(error) }) : []),
|
|
496
535
|
...(permanent ? input.permanentLoss() : input.connectionLost()),
|
|
497
|
-
{ type: 'notice', level: permanent ? 'error' : 'warning', key: 'codex-connection', text: permanent ?
|
|
536
|
+
{ type: 'notice', level: permanent ? 'error' : 'warning', key: 'codex-connection', text: permanent ? codexText('codex-connection-failed', { err: errorText(error) }) : codexText('codex-connection-lost') },
|
|
498
537
|
{ type: 'session.status', status: !permanent && ctx.turnOpen ? 'running' : 'idle' },
|
|
499
538
|
]);
|
|
500
539
|
},
|
|
@@ -530,8 +569,8 @@ export async function openCodexSession(deps) {
|
|
|
530
569
|
permanentlyLost = true;
|
|
531
570
|
rejoining = false;
|
|
532
571
|
reconnectHeld.length = 0;
|
|
533
|
-
emit([...live.forceClose({ kind: 'error', message:
|
|
534
|
-
{ type: 'notice', level: 'warning', key: 'codex-connection', text:
|
|
572
|
+
emit([...live.forceClose({ kind: 'error', message: codexText('codex-reconnect-incomplete') }),
|
|
573
|
+
{ type: 'notice', level: 'warning', key: 'codex-connection', text: codexText('codex-reconnect-incomplete') },
|
|
535
574
|
{ type: 'session.status', status: 'idle' }]);
|
|
536
575
|
};
|
|
537
576
|
while (cursor !== undefined && !atKnownTurn()) {
|
|
@@ -586,7 +625,7 @@ export async function openCodexSession(deps) {
|
|
|
586
625
|
connected = true;
|
|
587
626
|
if (active !== undefined)
|
|
588
627
|
input.onTurnStarted(active);
|
|
589
|
-
emit([{ type: 'notice', level: 'info', key: 'codex-connection', text:
|
|
628
|
+
emit([{ type: 'notice', level: 'info', key: 'codex-connection', text: codexText('codex-reconnected') }, { type: 'session.status', status: active === undefined ? 'idle' : 'running' }]);
|
|
590
629
|
for (const deliver of reconnectHeld.splice(0))
|
|
591
630
|
deliver();
|
|
592
631
|
await tasks.refresh();
|
|
@@ -610,7 +649,7 @@ export async function openCodexSession(deps) {
|
|
|
610
649
|
reconnectHeld.length = 0;
|
|
611
650
|
emit([...live.forceClose({ kind: 'error', message: errorText(error) }),
|
|
612
651
|
...input.permanentLoss(),
|
|
613
|
-
{ type: 'notice', level: 'error', key: 'codex-connection', text:
|
|
652
|
+
{ type: 'notice', level: 'error', key: 'codex-connection', text: codexText('codex-connection-failed', { err: errorText(error) }) },
|
|
614
653
|
{ type: 'session.status', status: 'idle' }]);
|
|
615
654
|
});
|
|
616
655
|
},
|
|
@@ -630,7 +669,7 @@ export async function openCodexSession(deps) {
|
|
|
630
669
|
if (view !== undefined)
|
|
631
670
|
events.push({ type: 'rate-limit', info: view });
|
|
632
671
|
if (reached !== undefined)
|
|
633
|
-
events.push({ type: 'notice', level: 'warning', key: 'codex-rate-limit', text:
|
|
672
|
+
events.push({ type: 'notice', level: 'warning', key: 'codex-rate-limit', text: codexText('codex-rate-limit-reached', { kind: reached }) });
|
|
634
673
|
emit(events);
|
|
635
674
|
return;
|
|
636
675
|
}
|
|
@@ -639,7 +678,7 @@ export async function openCodexSession(deps) {
|
|
|
639
678
|
if (method === NOTIFY.configWarning && /bubblewrap/iu.test(summary)) {
|
|
640
679
|
bubblewrapWarned = true;
|
|
641
680
|
if (process.platform === 'linux' && settings.permissionMode !== 'full-access')
|
|
642
|
-
emit([{ type: 'notice', level: 'warning', key: 'codex-bwrap', text:
|
|
681
|
+
emit([{ type: 'notice', level: 'warning', key: 'codex-bwrap', text: codexText('codex-bwrap-warning') }]);
|
|
643
682
|
return;
|
|
644
683
|
}
|
|
645
684
|
const notice = warningNotice(method, params);
|
|
@@ -666,7 +705,7 @@ export async function openCodexSession(deps) {
|
|
|
666
705
|
for (const notice of deps.startNotices ?? [])
|
|
667
706
|
emit([{ type: 'notice', level: 'warning', text: notice }]);
|
|
668
707
|
if (drift !== undefined)
|
|
669
|
-
emit([{ type: 'notice', level: 'warning', key: 'codex-drift', text:
|
|
708
|
+
emit([{ type: 'notice', level: 'warning', key: 'codex-drift', text: codexText('codex-version-drift', { version: drift, validated: VALIDATED_CODEX_VERSIONS.join(', ') }) }]);
|
|
670
709
|
emit([{ type: 'mode.changed', modeId: opened.modeId }], 'none');
|
|
671
710
|
const rememberedColor = deps.prefs.read().colors?.[threadId];
|
|
672
711
|
if (rememberedColor !== undefined)
|
|
@@ -712,11 +751,11 @@ export async function openCodexSession(deps) {
|
|
|
712
751
|
async fork(anchor, title) {
|
|
713
752
|
const lastTurnId = anchor === undefined ? undefined : ctx.anchorTurns.get(anchor) ?? str(history.turns.find(turn => arr(turn.items).some(item => str(rec(item)?.id) === anchor))?.id);
|
|
714
753
|
if (anchor !== undefined && lastTurnId === undefined)
|
|
715
|
-
throw new Error(
|
|
754
|
+
throw new Error(codexText('codex-anchor-missing'));
|
|
716
755
|
const response = rec(await hub.call(CLIENT.threadFork, { threadId, excludeTurns: true, ...(lastTurnId === undefined ? {} : { lastTurnId }) }));
|
|
717
756
|
const id = str(rec(response?.thread)?.id);
|
|
718
757
|
if (id === undefined)
|
|
719
|
-
throw new Error(
|
|
758
|
+
throw new Error(codexText('codex-open-failed', { err: 'no thread id' }));
|
|
720
759
|
if (title !== undefined)
|
|
721
760
|
await hub.call(CLIENT.threadNameSet, { threadId: id, name: title });
|
|
722
761
|
await hub.call(CLIENT.threadUnsubscribe, { threadId: id });
|
|
@@ -726,23 +765,31 @@ export async function openCodexSession(deps) {
|
|
|
726
765
|
rewind: {
|
|
727
766
|
async rewind(anchor, mode) {
|
|
728
767
|
if (mode !== 'conversation')
|
|
729
|
-
return { kind: 'refused', reason:
|
|
768
|
+
return { kind: 'refused', reason: codexText('codex-rewind-files-unsupported') };
|
|
730
769
|
const selected = ctx.anchorTurns.get(anchor) ?? str(history.turns.find(turn => arr(turn.items).some(item => str(rec(item)?.id) === anchor))?.id);
|
|
731
770
|
if (selected === undefined)
|
|
732
|
-
return { kind: 'refused', reason:
|
|
771
|
+
return { kind: 'refused', reason: codexText('codex-anchor-missing') };
|
|
733
772
|
if (input.busy())
|
|
734
|
-
return { kind: 'refused', reason:
|
|
773
|
+
return { kind: 'refused', reason: codexText('codex-command-idle') };
|
|
735
774
|
const previous = history.previousTurnId(anchor);
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
775
|
+
// A daemon may differ from the local CLI. Use the live handshake,
|
|
776
|
+
// and never let an unknown/old server ignore the cutoff silently.
|
|
777
|
+
const serverVersion = parseCodexVersion(hub.info?.userAgent ?? '');
|
|
778
|
+
if (previous === undefined && (serverVersion === undefined || (compareCodexVersions(serverVersion, MIN_CODEX_BEFORE_TURN_FORK_VERSION) ?? -1) < 0)) {
|
|
779
|
+
return { kind: 'refused', reason: codexText('codex-rewind-upgrade', { min: MIN_CODEX_BEFORE_TURN_FORK_VERSION }) };
|
|
780
|
+
}
|
|
781
|
+
// Codex can cut before a known turn even when its predecessor is
|
|
782
|
+
// not loaded or retained locally. For the first turn this persists
|
|
783
|
+
// an empty branch; a turnless thread/start cannot be resumed.
|
|
784
|
+
const response = rec(await hub.call(CLIENT.threadFork, {
|
|
785
|
+
threadId,
|
|
786
|
+
...(previous === undefined ? { beforeTurnId: selected } : { lastTurnId: previous }),
|
|
787
|
+
excludeTurns: true,
|
|
788
|
+
...resumeOverrides(),
|
|
789
|
+
}));
|
|
743
790
|
const id = str(rec(response?.thread)?.id);
|
|
744
791
|
if (id === undefined)
|
|
745
|
-
throw new Error(
|
|
792
|
+
throw new Error(codexText('codex-open-failed', { err: 'no thread id' }));
|
|
746
793
|
await hub.call(CLIENT.threadUnsubscribe, { threadId: id });
|
|
747
794
|
return { kind: 'rewound', session: { backendId: CODEX_BACKEND_ID, sessionId: id } };
|
|
748
795
|
},
|
|
@@ -758,6 +805,10 @@ export async function openCodexSession(deps) {
|
|
|
758
805
|
respond: (requestId, answers) => {
|
|
759
806
|
if (authBridge?.respondQuestion(requestId, answers))
|
|
760
807
|
return;
|
|
808
|
+
if (asyncQuestions.owns(requestId)) {
|
|
809
|
+
asyncQuestions.respond(requestId, answers);
|
|
810
|
+
return;
|
|
811
|
+
}
|
|
761
812
|
if (planReview.owns(requestId))
|
|
762
813
|
planReview.respond(requestId, answers);
|
|
763
814
|
else
|
|
@@ -766,6 +817,10 @@ export async function openCodexSession(deps) {
|
|
|
766
817
|
cancel: requestId => {
|
|
767
818
|
if (authBridge?.cancelQuestion(requestId))
|
|
768
819
|
return;
|
|
820
|
+
if (asyncQuestions.owns(requestId)) {
|
|
821
|
+
asyncQuestions.cancel(requestId);
|
|
822
|
+
return;
|
|
823
|
+
}
|
|
769
824
|
if (planReview.owns(requestId))
|
|
770
825
|
planReview.cancel(requestId);
|
|
771
826
|
else
|
|
@@ -775,13 +830,13 @@ export async function openCodexSession(deps) {
|
|
|
775
830
|
pendingRetraction: { remove: id => input.remove(id) },
|
|
776
831
|
diagnostics: {
|
|
777
832
|
lines: () => [
|
|
778
|
-
|
|
779
|
-
...(drift === undefined ? [] : [
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
...(connected ? [] : [
|
|
784
|
-
...((bubblewrapWarned || hub.bubblewrapMissing || deps.doctor?.bubblewrapMissing === true) && process.platform === 'linux' ? [
|
|
833
|
+
codexText('codex-doctor-cli', { path: deps.executable.path, source: deps.executable.source, version: version ?? codexText('doctor-unknown') }),
|
|
834
|
+
...(drift === undefined ? [] : [codexText('codex-version-drift', { version: drift, validated: VALIDATED_CODEX_VERSIONS.join(', ') })]),
|
|
835
|
+
codexText('codex-doctor-home', { home: hub.info?.codexHome ?? codexText('doctor-unknown') }),
|
|
836
|
+
codexText('codex-doctor-thread', { id: threadId, provider: opened.provider === '' ? codexText('doctor-unknown') : opened.provider, model: settings.model === '' ? codexText('doctor-unknown') : settings.model }),
|
|
837
|
+
codexText('codex-doctor-mode', { mode: settings.modeId }),
|
|
838
|
+
...(connected ? [] : [codexText('codex-connection-lost')]),
|
|
839
|
+
...((bubblewrapWarned || hub.bubblewrapMissing || deps.doctor?.bubblewrapMissing === true) && process.platform === 'linux' ? [codexText('codex-doctor-bubblewrap')] : []),
|
|
785
840
|
],
|
|
786
841
|
},
|
|
787
842
|
},
|
|
@@ -804,17 +859,19 @@ export async function openCodexSession(deps) {
|
|
|
804
859
|
},
|
|
805
860
|
submit(next, placement) {
|
|
806
861
|
if (disposing)
|
|
807
|
-
return Promise.reject(new Error(
|
|
862
|
+
return Promise.reject(new Error(codexText('codex-session-closed')));
|
|
808
863
|
if (permanentlyLost)
|
|
809
|
-
return Promise.reject(new Error(
|
|
864
|
+
return Promise.reject(new Error(codexText('codex-connection-failed', { err: '' })));
|
|
810
865
|
planReview.withdraw();
|
|
811
866
|
return commands.submit(next, placement).then(result => result ?? input.submit(next, placement));
|
|
812
867
|
},
|
|
813
868
|
async cancel(cause) {
|
|
814
869
|
if (disposing)
|
|
815
870
|
return { stillQueued: [], outcome: 'unknown' };
|
|
816
|
-
if (cause === 'switch' || cause === 'dispose')
|
|
871
|
+
if (cause === 'switch' || cause === 'dispose') {
|
|
817
872
|
approvals.withdrawAll();
|
|
873
|
+
asyncQuestions.withdraw();
|
|
874
|
+
}
|
|
818
875
|
return input.cancel(cause);
|
|
819
876
|
},
|
|
820
877
|
dispose() {
|
|
@@ -822,6 +879,7 @@ export async function openCodexSession(deps) {
|
|
|
822
879
|
return disposePromise;
|
|
823
880
|
disposePromise = (async () => {
|
|
824
881
|
approvals.withdrawAll();
|
|
882
|
+
asyncQuestions.withdraw();
|
|
825
883
|
authBridge?.dispose();
|
|
826
884
|
planReview.withdraw();
|
|
827
885
|
output.close();
|
|
@@ -835,7 +893,7 @@ export async function openCodexSession(deps) {
|
|
|
835
893
|
const busy = input.busy();
|
|
836
894
|
disposing = true;
|
|
837
895
|
if (busy)
|
|
838
|
-
await input.interrupt().catch(() => false);
|
|
896
|
+
await input.interrupt(false).catch(() => false);
|
|
839
897
|
input.close();
|
|
840
898
|
offGlobal();
|
|
841
899
|
for (const unroute of childRoutes.values())
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side-query.d.ts","sourceRoot":"","sources":["../../../../../src/backends/codex/session/side-query.ts"],"names":[],"mappings":"AAMA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAc,MAAM,eAAe,CAAA;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAG5D,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IAAC,QAAQ,IAAI,MAAM,CAAC;IAAC,MAAM,IAAI,OAAO,CAAC;IAAC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;;;
|
|
1
|
+
{"version":3,"file":"side-query.d.ts","sourceRoot":"","sources":["../../../../../src/backends/codex/session/side-query.ts"],"names":[],"mappings":"AAMA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAc,MAAM,eAAe,CAAA;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAG5D,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IAAC,QAAQ,IAAI,MAAM,CAAC;IAAC,MAAM,IAAI,OAAO,CAAC;IAAC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;;;2BA6GuiM,CAAC;2BAA8B,CAAC;;;0BAAsF,CAAC;;;iBA1Gr2M,IAAI;aAwGsB,IAAI;EACrD"}
|