@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 { rec, str } from '../narrow.js';
|
|
3
3
|
import { CLIENT, NOTIFY, SERVER_REQUEST } from '../protocol/index.js';
|
|
4
4
|
import { REAL_CLOCK, RPC_ERROR } from '../rpc/client.js';
|
|
@@ -62,7 +62,7 @@ export function createCodexAuth(deps) {
|
|
|
62
62
|
if (managedFailed)
|
|
63
63
|
source = 'unknown';
|
|
64
64
|
debug('codex auth: managed credential failed; injection stopped');
|
|
65
|
-
note('codex-auth', 'error',
|
|
65
|
+
note('codex-auth', 'error', codexText(key));
|
|
66
66
|
};
|
|
67
67
|
const fresh = async (rejected) => {
|
|
68
68
|
if (deps.credential === undefined)
|
|
@@ -156,7 +156,7 @@ export function createCodexAuth(deps) {
|
|
|
156
156
|
if (access !== undefined) {
|
|
157
157
|
const tokens = externalTokensOf(access);
|
|
158
158
|
if (tokens === undefined) {
|
|
159
|
-
note('codex-auth', 'warning',
|
|
159
|
+
note('codex-auth', 'warning', codexText('codex-auth-claims-missing'));
|
|
160
160
|
}
|
|
161
161
|
else {
|
|
162
162
|
epoch += 1;
|
|
@@ -175,7 +175,7 @@ export function createCodexAuth(deps) {
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
if (source === 'missing')
|
|
178
|
-
note('codex-auth-required', 'warning',
|
|
178
|
+
note('codex-auth-required', 'warning', codexText('codex-auth-login-needed'));
|
|
179
179
|
};
|
|
180
180
|
const runtime = {
|
|
181
181
|
get source() { return source; },
|
|
@@ -213,14 +213,14 @@ export function createCodexAuth(deps) {
|
|
|
213
213
|
await runtime.start();
|
|
214
214
|
const account = await runtime.account();
|
|
215
215
|
const labels = {
|
|
216
|
-
channel:
|
|
217
|
-
'dsh-auth':
|
|
218
|
-
'codex-login':
|
|
219
|
-
'api-key':
|
|
220
|
-
missing:
|
|
221
|
-
unknown:
|
|
216
|
+
channel: codexText('codex-auth-source-channel', { name: deps.channel?.name ?? '' }),
|
|
217
|
+
'dsh-auth': codexText('codex-auth-source-oauth'),
|
|
218
|
+
'codex-login': codexText('codex-auth-source-native'),
|
|
219
|
+
'api-key': codexText('codex-auth-source-api-key'),
|
|
220
|
+
missing: codexText('codex-auth-source-missing'),
|
|
221
|
+
unknown: codexText('codex-auth-source-unknown'),
|
|
222
222
|
};
|
|
223
|
-
return { lines: [labels[source], ...(account.subscription === undefined ? [] : [
|
|
223
|
+
return { lines: [labels[source], ...(account.subscription === undefined ? [] : [codexText('codex-auth-plan', { plan: account.subscription })]), ...(route.host === undefined ? [] : [codexText('codex-auth-host', { host: route.host })]), ...(!route.firstParty || deps.externalAllowed === false ? [codexText('codex-auth-route-blocked')] : []), ...[...notices.values()].map(notice => notice.text)] };
|
|
224
224
|
},
|
|
225
225
|
async account() {
|
|
226
226
|
await readOwnAccount();
|
|
@@ -234,7 +234,7 @@ export function createCodexAuth(deps) {
|
|
|
234
234
|
},
|
|
235
235
|
async deviceLogin() {
|
|
236
236
|
if (deps.channel !== undefined)
|
|
237
|
-
throw new Error(
|
|
237
|
+
throw new Error(codexText('codex-auth-channel-active'));
|
|
238
238
|
let finish;
|
|
239
239
|
const done = new Promise(resolve => { finish = resolve; });
|
|
240
240
|
const early = [];
|
|
@@ -290,14 +290,14 @@ export function createCodexAuth(deps) {
|
|
|
290
290
|
catch {
|
|
291
291
|
off();
|
|
292
292
|
finish(false);
|
|
293
|
-
throw new Error(
|
|
293
|
+
throw new Error(codexText('codex-auth-login-failed'));
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
296
|
async apiKeyLogin(apiKey) {
|
|
297
297
|
if (deps.channel !== undefined)
|
|
298
|
-
throw new Error(
|
|
298
|
+
throw new Error(codexText('codex-auth-channel-active'));
|
|
299
299
|
if (apiKey.trim() === '')
|
|
300
|
-
throw new Error(
|
|
300
|
+
throw new Error(codexText('codex-auth-api-key-required'));
|
|
301
301
|
try {
|
|
302
302
|
await hub.call(CLIENT.accountLoginStart, { type: 'apiKey', apiKey });
|
|
303
303
|
disable();
|
|
@@ -307,7 +307,7 @@ export function createCodexAuth(deps) {
|
|
|
307
307
|
source = 'api-key';
|
|
308
308
|
}
|
|
309
309
|
catch {
|
|
310
|
-
throw new Error(
|
|
310
|
+
throw new Error(codexText('codex-auth-login-failed'));
|
|
311
311
|
}
|
|
312
312
|
},
|
|
313
313
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** /login's three methods over the shared question UI. API-key answers go
|
|
2
2
|
* directly to auth; events contain only the secret question and settlement. */
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import {
|
|
4
|
+
import { codexText } from '../text.js';
|
|
5
5
|
import { CODEX_OAUTH_PROVIDER } from './external-tokens.js';
|
|
6
6
|
export function createCodexAuthCapability(runtime, emit) {
|
|
7
7
|
const pending = new Map();
|
|
@@ -32,15 +32,15 @@ export function createCodexAuthCapability(runtime, emit) {
|
|
|
32
32
|
if (disposed)
|
|
33
33
|
return;
|
|
34
34
|
if (runtime.source === 'channel') {
|
|
35
|
-
notice('warning',
|
|
35
|
+
notice('warning', codexText('codex-auth-channel-active'));
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
const methods = [
|
|
39
|
-
...(loginOAuth === undefined ? [] : [{ id: 'oauth', label:
|
|
40
|
-
{ id: 'device', label:
|
|
41
|
-
{ id: 'api-key', label:
|
|
39
|
+
...(loginOAuth === undefined ? [] : [{ id: 'oauth', label: codexText('codex-login-oauth'), description: codexText('codex-login-oauth-desc') }]),
|
|
40
|
+
{ id: 'device', label: codexText('codex-login-device'), description: codexText('codex-login-device-desc') },
|
|
41
|
+
{ id: 'api-key', label: codexText('codex-login-api-key'), description: codexText('codex-login-api-key-storage') },
|
|
42
42
|
];
|
|
43
|
-
const selection = await ask({ header: 'Codex', question:
|
|
43
|
+
const selection = await ask({ header: 'Codex', question: codexText('codex-login-choose'), options: methods.map(({ label, description }) => ({ label, description })), hideCustomInput: true }).answer;
|
|
44
44
|
const label = selection?.answers[0]?.selected[0];
|
|
45
45
|
const method = methods.find(row => row.label === label)?.id;
|
|
46
46
|
if (disposed || method === undefined)
|
|
@@ -48,26 +48,26 @@ export function createCodexAuthCapability(runtime, emit) {
|
|
|
48
48
|
try {
|
|
49
49
|
if (method === 'oauth') {
|
|
50
50
|
if (!runtime.route.firstParty) {
|
|
51
|
-
notice('warning',
|
|
51
|
+
notice('warning', codexText('codex-auth-route-blocked'));
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
if (await loginOAuth?.() !== true || disposed)
|
|
55
55
|
return;
|
|
56
56
|
await runtime.reconnect();
|
|
57
|
-
notice(runtime.source === 'dsh-auth' ? 'info' : 'error',
|
|
57
|
+
notice(runtime.source === 'dsh-auth' ? 'info' : 'error', codexText(runtime.source === 'dsh-auth' ? 'codex-login-success' : 'codex-auth-login-failed'));
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
if (method === 'api-key') {
|
|
61
|
-
const answers = await ask({ header: 'Codex', question:
|
|
61
|
+
const answers = await ask({ header: 'Codex', question: codexText('codex-login-api-key-prompt'), detail: codexText('codex-login-api-key-storage'), options: [], secret: true }).answer;
|
|
62
62
|
if (answers === undefined || disposed)
|
|
63
63
|
return;
|
|
64
64
|
const apiKey = answers.answers[0]?.custom;
|
|
65
65
|
if (apiKey === undefined || apiKey.trim() === '') {
|
|
66
|
-
notice('warning',
|
|
66
|
+
notice('warning', codexText('codex-auth-api-key-required'));
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
await runtime.apiKeyLogin(apiKey);
|
|
70
|
-
notice('info',
|
|
70
|
+
notice('info', codexText('codex-login-success'));
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
73
|
const device = await runtime.deviceLogin();
|
|
@@ -75,7 +75,7 @@ export function createCodexAuthCapability(runtime, emit) {
|
|
|
75
75
|
await device.cancel();
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
const prompt = ask({ header: 'Codex', question:
|
|
78
|
+
const prompt = ask({ header: 'Codex', question: codexText('codex-login-device-code', { code: device.userCode }), detail: codexText('codex-login-device-wait'), link: device.verificationUrl, options: [{ label: codexText('codex-login-cancel') }], hideCustomInput: true });
|
|
79
79
|
const outcome = await Promise.race([
|
|
80
80
|
device.done.then(success => ({ kind: 'done', success })),
|
|
81
81
|
prompt.answer.then(() => ({ kind: 'cancel' })),
|
|
@@ -84,11 +84,11 @@ export function createCodexAuthCapability(runtime, emit) {
|
|
|
84
84
|
await device.cancel();
|
|
85
85
|
else {
|
|
86
86
|
prompt.withdraw();
|
|
87
|
-
notice(outcome.success ? 'info' : 'error',
|
|
87
|
+
notice(outcome.success ? 'info' : 'error', codexText(outcome.success ? 'codex-login-success' : 'codex-auth-login-failed'));
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
catch {
|
|
91
|
-
notice('error',
|
|
91
|
+
notice('error', codexText('codex-auth-login-failed'));
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
94
|
return {
|
|
@@ -1,29 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Codex backend (docs/codex-backend-design.md §5.5): detection, opening
|
|
3
|
-
* a thread (create or resume) on the process-wide app-server hub, and the
|
|
4
|
-
* launcher's per-backend session markers.
|
|
5
|
-
*
|
|
6
|
-
* The child runs the user's own `codex` with the user's own `CODEX_HOME`
|
|
7
|
-
* (D6): their config, instructions, MCP servers, provider and login apply
|
|
8
|
-
* as in the official client, and threads are shared with it. dsh-tui's
|
|
9
|
-
* choices (start mode, model, effort) travel per thread as request
|
|
10
|
-
* parameters; nothing is written into Codex's configuration.
|
|
11
|
-
*/
|
|
12
1
|
import type { AgentBackend, BackendHost, OpenTarget } from '../../agent/backend.js';
|
|
13
2
|
import type { AgentSession } from '../../agent/session.js';
|
|
14
3
|
import { type CodexAuthRuntime } from './auth/external-tokens.js';
|
|
15
4
|
import { type CodexChannels, type CodexChannelsRuntime } from './channels.js';
|
|
16
|
-
import type { ChannelTokenStore } from '../shared/channel-tokens.js';
|
|
17
5
|
import { type Rec } from './narrow.js';
|
|
18
6
|
import { type CodexPrefs } from './prefs.js';
|
|
19
7
|
import { type CodexExecutable } from './rpc/binary.js';
|
|
20
8
|
import { type CodexHub, type CodexHubDeps } from './rpc/hub.js';
|
|
21
9
|
import { type RpcClock } from './rpc/client.js';
|
|
22
|
-
/** Structural until the neutral BackendHost addition is merged; the shared
|
|
23
|
-
* ChannelTokenStore interface is the real host read/write/erase/declared seam. */
|
|
24
|
-
export type CodexBackendHost = BackendHost & {
|
|
25
|
-
readonly tokenStore?: ChannelTokenStore;
|
|
26
|
-
};
|
|
27
10
|
export interface CodexRuntime {
|
|
28
11
|
readonly hub: CodexHub;
|
|
29
12
|
readonly release: () => void;
|
|
@@ -34,6 +17,8 @@ export interface CodexRuntime {
|
|
|
34
17
|
readonly config?: Rec;
|
|
35
18
|
readonly auth: CodexAuthRuntime;
|
|
36
19
|
readonly channels: CodexChannelsRuntime;
|
|
20
|
+
/** Store identity captured from this child, not later process env changes. */
|
|
21
|
+
readonly catalogSource?: string;
|
|
37
22
|
readonly startNotices?: readonly string[];
|
|
38
23
|
/** Rejoin an idle native thread retained by the local daemon, if available. */
|
|
39
24
|
readonly rejoinNativeDaemon?: () => Promise<CodexRuntime | undefined>;
|
|
@@ -49,9 +34,9 @@ export interface CodexRuntimeOptions {
|
|
|
49
34
|
}
|
|
50
35
|
/** Acquire the same platform runtime for open/resume/catalog. Tests replace
|
|
51
36
|
* only the process, executable discovery and profile file, not the plumbing. */
|
|
52
|
-
export declare function prepareCodexRuntime(target: OpenTarget, host:
|
|
37
|
+
export declare function prepareCodexRuntime(target: OpenTarget, host: BackendHost, options?: CodexRuntimeOptions): Promise<CodexRuntime>;
|
|
53
38
|
/** Open a native thread, rejoining its idle daemon writer on conflict. */
|
|
54
|
-
export declare function openCodexBackendSession(target: OpenTarget, host:
|
|
39
|
+
export declare function openCodexBackendSession(target: OpenTarget, host: BackendHost, options?: CodexRuntimeOptions & {
|
|
55
40
|
readonly prefs?: CodexPrefs;
|
|
56
41
|
}): Promise<AgentSession>;
|
|
57
42
|
export declare const codexBackend: AgentBackend;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../../src/backends/codex/backend.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../../src/backends/codex/backend.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAG1D,OAAO,EAA0C,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAEzG,OAAO,EAAsE,KAAK,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAGjJ,OAAO,EAAuB,KAAK,GAAG,EAAE,MAAM,aAAa,CAAA;AAE3D,OAAO,EAAoC,KAAK,UAAU,EAAE,MAAM,YAAY,CAAA;AAC9E,OAAO,EAAyC,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC7F,OAAO,EAAmB,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAoB,MAAM,cAAc,CAAA;AAClG,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAMnE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAA;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,UAAU,EAAE,eAAe,GAAG;QAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACpE,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;IAC/B,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAA;IACvC,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACzC,+EAA+E;IAC/E,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAA;CACtE;AACD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,eAAe,GAAG;QAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACrE,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAA;IACjC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAY,CAAA;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAA;CAC9B;AAED;gFACgF;AAChF,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,YAAY,CAAC,CA6IzI;AAmCD,0EAA0E;AAC1E,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,GAAE,mBAAmB,GAAG;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAA;CAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CAoB/K;AAED,eAAO,MAAM,YAAY,EAAE,YAgD1B,CAAA"}
|
|
@@ -1,14 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The Codex backend (docs/codex-backend-design.md §5.5): detection, opening
|
|
3
|
+
* a thread (create or resume) on the process-wide app-server hub, and the
|
|
4
|
+
* launcher's per-backend session markers.
|
|
5
|
+
*
|
|
6
|
+
* The child runs the user's own `codex` with the user's own `CODEX_HOME`
|
|
7
|
+
* (D6): their config, instructions, MCP servers, provider and login apply
|
|
8
|
+
* as in the official client, and threads are shared with it. dsh-tui's
|
|
9
|
+
* choices (start mode, model, effort) travel per thread as request
|
|
10
|
+
* parameters; nothing is written into Codex's configuration.
|
|
11
|
+
*/
|
|
12
|
+
import { isAbsolute, normalize } from 'node:path';
|
|
13
|
+
import { codexLocale, codexText, installCodexLocale } from './text.js';
|
|
3
14
|
import { CODEX_BACKEND_ID, CODEX_BACKEND_LABEL, codexResumeCommand, codexVersionSupported, MIN_CODEX_VERSION } from './contract.js';
|
|
4
15
|
import { acquireCodexAuth, CODEX_OAUTH_PROVIDER } from './auth/external-tokens.js';
|
|
5
16
|
import { codexAuthRoute } from './auth/route.js';
|
|
6
|
-
import { createCodexChannelsRuntime, fileCodexChannels } from './channels.js';
|
|
17
|
+
import { createCodexChannelsRuntime, fileCodexChannels, memoryCodexChannels } from './channels.js';
|
|
7
18
|
import { createCodexCatalog } from './catalog.js';
|
|
8
|
-
import { detectCodex } from './detect.js';
|
|
19
|
+
import { codexHomeDir, detectCodex } from './detect.js';
|
|
9
20
|
import { errorText, rec, str } from './narrow.js';
|
|
10
21
|
import { CLIENT } from './protocol/index.js';
|
|
11
|
-
import { fileCodexPrefs } from './prefs.js';
|
|
22
|
+
import { fileCodexPrefs, memoryCodexPrefs } from './prefs.js';
|
|
12
23
|
import { buildCodexEnv, resolveCodexExecutable } from './rpc/binary.js';
|
|
13
24
|
import { acquireCodexHub } from './rpc/hub.js';
|
|
14
25
|
import { rpcCode, RPC_ERROR } from './rpc/client.js';
|
|
@@ -21,10 +32,10 @@ export async function prepareCodexRuntime(target, host, options = {}) {
|
|
|
21
32
|
const env = options.env ?? process.env;
|
|
22
33
|
const executable = options.executable ?? await resolveCodexExecutable(env);
|
|
23
34
|
if (executable === undefined)
|
|
24
|
-
throw new Error(
|
|
35
|
+
throw new Error(codexText('codex-not-installed'));
|
|
25
36
|
if (!codexVersionSupported(executable.version))
|
|
26
|
-
throw new Error(
|
|
27
|
-
const channels = createCodexChannelsRuntime({ store: options.channels ?? fileCodexChannels(
|
|
37
|
+
throw new Error(codexText('codex-too-old', { version: executable.version ?? '', min: MIN_CODEX_VERSION }));
|
|
38
|
+
const channels = createCodexChannelsRuntime({ store: options.channels ?? (host.dataDir === undefined ? memoryCodexChannels() : fileCodexChannels(host.dataDir, host.debug)), tokens: host.tokenStore, env });
|
|
28
39
|
const launch = channels.launch();
|
|
29
40
|
const credential = launch.provider === undefined ? host.oauthCredential?.(CODEX_OAUTH_PROVIDER) : undefined;
|
|
30
41
|
let cwd = target.cwd ?? host.cwd;
|
|
@@ -37,7 +48,7 @@ export async function prepareCodexRuntime(target, host, options = {}) {
|
|
|
37
48
|
debug: host.debug,
|
|
38
49
|
stderr: line => { if (!STDERR_NOISE.some(pattern => pattern.test(line)))
|
|
39
50
|
host.stderr?.(line); },
|
|
40
|
-
clientVersion:
|
|
51
|
+
clientVersion: host.appVersion ?? 'dev',
|
|
41
52
|
...options.hubDeps,
|
|
42
53
|
};
|
|
43
54
|
let hub = acquireCodexHub(settings, deps);
|
|
@@ -69,6 +80,34 @@ export async function prepareCodexRuntime(target, host, options = {}) {
|
|
|
69
80
|
host.debug('codex: config/read failed; managed injection disabled');
|
|
70
81
|
}
|
|
71
82
|
}
|
|
83
|
+
// A provider in the user's own config can take its credential from an
|
|
84
|
+
// environment key (`env_key`, e.g. DEEPSEEK_API_KEY). When the launching
|
|
85
|
+
// environment does not export it but the DSH credential store declares
|
|
86
|
+
// it, inject it into the child: a stored key then works without an
|
|
87
|
+
// exported variable. The key joins `injectedEnvKeys`, so the hub
|
|
88
|
+
// fingerprint separates keyless and keyed children and a keyless hub is
|
|
89
|
+
// never reused for a session whose provider needs the key. A key nothing
|
|
90
|
+
// can supply is not a startup failure — Codex itself rejects each turn —
|
|
91
|
+
// so it is remembered and reported once at start instead.
|
|
92
|
+
let missingProviderEnvKey;
|
|
93
|
+
if (launch.provider === undefined) {
|
|
94
|
+
const providerId = str(config?.model_provider) || 'openai';
|
|
95
|
+
const providerEnvKey = str(rec(rec(config?.model_providers)?.[providerId])?.env_key);
|
|
96
|
+
if (providerEnvKey !== undefined && providerEnvKey !== '' && (settings.env[providerEnvKey] ?? '') === '') {
|
|
97
|
+
const stored = host.tokenStore?.read(providerEnvKey);
|
|
98
|
+
if (stored !== undefined) {
|
|
99
|
+
release();
|
|
100
|
+
settings = { ...settings, env: { ...settings.env, [providerEnvKey]: stored }, injectedEnvKeys: [...(settings.injectedEnvKeys ?? []), providerEnvKey] };
|
|
101
|
+
hub = acquireCodexHub(settings, deps);
|
|
102
|
+
release = hub.retain();
|
|
103
|
+
await hub.ready;
|
|
104
|
+
host.debug(`codex: provider env ${providerEnvKey} resolved from the DSH credential store`);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
missingProviderEnvKey = { provider: providerId, env: providerEnvKey };
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
72
111
|
const route = codexAuthRoute(config, env, launch.provider !== undefined);
|
|
73
112
|
const externalAllowed = settings.credentialMode === 'external' && route.firstParty;
|
|
74
113
|
if (settings.credentialMode === 'external' && !externalAllowed) {
|
|
@@ -89,9 +128,13 @@ export async function prepareCodexRuntime(target, host, options = {}) {
|
|
|
89
128
|
debug: host.debug,
|
|
90
129
|
});
|
|
91
130
|
await auth.start();
|
|
92
|
-
|
|
131
|
+
// Codex rejects every turn of a provider whose env key is unset: name the
|
|
132
|
+
// reason once at start instead of leaving a bare turn failure behind.
|
|
133
|
+
let startNotices = missingProviderEnvKey === undefined || route.firstParty
|
|
134
|
+
? undefined
|
|
135
|
+
: [codexText('codex-provider-env-key-missing', { provider: missingProviderEnvKey.provider, env: missingProviderEnvKey.env })];
|
|
93
136
|
if (auth.managedFailed) {
|
|
94
|
-
startNotices = [
|
|
137
|
+
startNotices = [...(startNotices ?? []), codexText('codex-auth-login-failed')];
|
|
95
138
|
// Only an already-observed startup failure takes this path. No logout:
|
|
96
139
|
// a different process starts clean on the user's native credentials.
|
|
97
140
|
release();
|
|
@@ -140,28 +183,59 @@ export async function prepareCodexRuntime(target, host, options = {}) {
|
|
|
140
183
|
}
|
|
141
184
|
}
|
|
142
185
|
};
|
|
143
|
-
return { hub, release, cwd, executable, config, auth, channels, ...(startNotices === undefined ? {} : { startNotices }), ...(rejoinNativeDaemon === undefined ? {} : { rejoinNativeDaemon }) };
|
|
186
|
+
return { hub, release, cwd, executable, config, auth, channels, catalogSource: catalogSource(settings.env, hub.info?.codexHome), ...(startNotices === undefined ? {} : { startNotices }), ...(rejoinNativeDaemon === undefined ? {} : { rejoinNativeDaemon }) };
|
|
144
187
|
}
|
|
145
188
|
catch (error) {
|
|
146
189
|
release();
|
|
147
190
|
host.debug(`codex: app-server start failed (${errorText(error)})`);
|
|
148
|
-
throw new Error(
|
|
191
|
+
throw new Error(codexText('codex-start-failed', { err: errorText(error) }), { cause: error });
|
|
149
192
|
}
|
|
150
193
|
}
|
|
151
194
|
let catalogHost;
|
|
152
|
-
|
|
195
|
+
let catalogRuntime;
|
|
196
|
+
function catalogSource(env = process.env, actualHome) {
|
|
197
|
+
const home = actualHome ?? codexHomeDir(env);
|
|
198
|
+
const sqlite = env.CODEX_SQLITE_HOME;
|
|
199
|
+
if (!isAbsolute(home) || (sqlite !== undefined && sqlite !== '' && !isAbsolute(sqlite)))
|
|
200
|
+
return undefined;
|
|
201
|
+
return JSON.stringify(['codex', normalize(home), sqlite ? normalize(sqlite) : null]);
|
|
202
|
+
}
|
|
203
|
+
function rememberCatalogRuntime(runtime, host) {
|
|
204
|
+
const source = runtime.catalogSource;
|
|
205
|
+
if (source !== undefined)
|
|
206
|
+
catalogRuntime = { source, host, hub: runtime.hub };
|
|
207
|
+
}
|
|
208
|
+
/** The prefs store of the captured host, or undefined when no host has been
|
|
209
|
+
* seen yet (see {@link catalogHost}). Built lazily: a module-level call would
|
|
210
|
+
* resolve a directory before any host exists to name one (D2). */
|
|
211
|
+
const catalogPrefs = () => {
|
|
212
|
+
const dir = catalogHost?.dataDir;
|
|
213
|
+
const host = catalogHost;
|
|
214
|
+
return dir === undefined || host === undefined ? undefined : fileCodexPrefs(dir, message => host.debug(message));
|
|
215
|
+
};
|
|
216
|
+
/** Remember the host of the most recent detect / open: the catalog's only way
|
|
217
|
+
* to reach this backend's own directory without a host parameter, and where
|
|
218
|
+
* this backend's copy takes its language from (read live, so a `/lang`
|
|
219
|
+
* switch applies to the next string). */
|
|
220
|
+
const rememberHost = (host) => {
|
|
221
|
+
catalogHost = host;
|
|
222
|
+
installCodexLocale(host.locale);
|
|
223
|
+
};
|
|
153
224
|
/** Open a native thread, rejoining its idle daemon writer on conflict. */
|
|
154
225
|
export async function openCodexBackendSession(target, host, options = {}) {
|
|
155
|
-
|
|
226
|
+
rememberHost(host);
|
|
156
227
|
const runtime = await prepareCodexRuntime(target, host, options);
|
|
157
228
|
const open = (active) => openCodexSession({
|
|
158
229
|
...active, target,
|
|
159
|
-
prefs: options.prefs ?? fileCodexPrefs(
|
|
160
|
-
host: { debug: host.debug },
|
|
230
|
+
prefs: options.prefs ?? (host.dataDir === undefined ? memoryCodexPrefs() : fileCodexPrefs(host.dataDir, host.debug)),
|
|
231
|
+
host: { debug: host.debug, locale: host.locale },
|
|
161
232
|
doctor: { get bubblewrapMissing() { return active.hub.bubblewrapMissing; } },
|
|
162
233
|
});
|
|
163
234
|
try {
|
|
164
|
-
|
|
235
|
+
const session = await open(runtime);
|
|
236
|
+
if (options.env === undefined && options.executable === undefined)
|
|
237
|
+
rememberCatalogRuntime(runtime, host);
|
|
238
|
+
return session;
|
|
165
239
|
}
|
|
166
240
|
catch (error) {
|
|
167
241
|
const cause = error instanceof Error ? error.cause : undefined;
|
|
@@ -176,18 +250,37 @@ export async function openCodexBackendSession(target, host, options = {}) {
|
|
|
176
250
|
export const codexBackend = {
|
|
177
251
|
id: CODEX_BACKEND_ID,
|
|
178
252
|
descriptor: { label: CODEX_BACKEND_LABEL },
|
|
179
|
-
detect: (host) => {
|
|
253
|
+
detect: (host) => { rememberHost(host); return detectCodex(host); },
|
|
180
254
|
catalog: createCodexCatalog({
|
|
181
|
-
acquire: cwd => {
|
|
182
|
-
|
|
183
|
-
|
|
255
|
+
acquire: async (cwd) => {
|
|
256
|
+
// Before detect/open supplies a host, keep stores in memory and use
|
|
257
|
+
// this backend's locale without guessing a host data directory.
|
|
258
|
+
const host = catalogHost ?? { cwd: process.cwd(), debug: () => undefined, warn: () => undefined, locale: codexLocale };
|
|
259
|
+
catalogHost = host;
|
|
260
|
+
const source = catalogSource();
|
|
261
|
+
const known = catalogRuntime;
|
|
262
|
+
// Metadata listing needs the native store, not another executable probe,
|
|
263
|
+
// config read or auth startup. Borrow the already-running session hub.
|
|
264
|
+
if (known !== undefined && known.source === source && known.host === host && known.hub.state !== 'closed' && known.hub.state !== 'failed') {
|
|
265
|
+
return { hub: known.hub, release: known.hub.retain() };
|
|
266
|
+
}
|
|
267
|
+
const runtime = await prepareCodexRuntime({ kind: 'create', cwd: cwd ?? host.cwd }, host);
|
|
268
|
+
rememberCatalogRuntime(runtime, host);
|
|
269
|
+
return runtime;
|
|
184
270
|
},
|
|
185
271
|
cwd: () => catalogHost?.cwd ?? process.cwd(),
|
|
186
|
-
lastUsed: () => catalogPrefs
|
|
272
|
+
lastUsed: () => catalogPrefs()?.read().lastUsed ?? {},
|
|
273
|
+
snapshotKey: catalogSource,
|
|
187
274
|
}),
|
|
188
275
|
launch: {
|
|
189
|
-
|
|
190
|
-
|
|
276
|
+
// `host` replaces the old `debug` parameter (B-3 widened
|
|
277
|
+
// `AgentBackend.launch.sessionPrefs`). The launcher asks before a session
|
|
278
|
+
// exists, so this store is built from the host it is handed; a host that
|
|
279
|
+
// hands over no directory keeps nothing — there is simply no remembered
|
|
280
|
+
// session to resume (D-3's feature-detect, never a path this backend
|
|
281
|
+
// guessed — D2).
|
|
282
|
+
sessionPrefs: host => {
|
|
283
|
+
const prefs = host.dataDir === undefined ? memoryCodexPrefs() : fileCodexPrefs(host.dataDir, host.debug);
|
|
191
284
|
return {
|
|
192
285
|
lastSession: () => prefs.read().lastSession,
|
|
193
286
|
setLastSession: threadId => { prefs.write({ lastSession: threadId }); },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SessionCatalog } from '../../agent/backend.js';
|
|
2
|
-
import type { PreviewEntry, SessionSummary } from '../../
|
|
2
|
+
import type { PreviewEntry, SessionSummary } from '../../agent/index.js';
|
|
3
3
|
import type { CodexHub } from './rpc/hub.js';
|
|
4
4
|
export interface CodexCatalogDeps {
|
|
5
5
|
acquire(cwd?: string): Promise<{
|
|
@@ -8,6 +8,7 @@ export interface CodexCatalogDeps {
|
|
|
8
8
|
}>;
|
|
9
9
|
cwd(): string;
|
|
10
10
|
lastUsed?(): Readonly<Record<string, number>>;
|
|
11
|
+
snapshotKey?(): string | undefined;
|
|
11
12
|
}
|
|
12
13
|
/** Metadata only. Absence of preview text is not proof of an empty thread. */
|
|
13
14
|
export declare function codexSessionSummary(value: unknown, lastUsed?: Readonly<Record<string, number>>): SessionSummary | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../../src/backends/codex/catalog.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,wBAAwB,CAAA;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../../src/backends/codex/catalog.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,wBAAwB,CAAA;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAMxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE5C,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAA;IACtG,GAAG,IAAI,MAAM,CAAA;IACb,QAAQ,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAC7C,WAAW,CAAC,IAAI,MAAM,GAAG,SAAS,CAAA;CACnC;AAMD,8EAA8E;AAC9E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM,GAAG,cAAc,GAAG,SAAS,CAqB/H;AAED,6EAA6E;AAC7E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,EAAE,KAAK,SAAgB,GAAG,YAAY,EAAE,CAkBpG;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,cAAc,CAgGzE"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/** The native app-server catalog: no rollout/sqlite parsing or second index.
|
|
2
2
|
* Each bounded operation borrows the same hub and releases it in finally. */
|
|
3
3
|
import { basename } from 'node:path';
|
|
4
|
-
import {
|
|
4
|
+
import { codexText } from './text.js';
|
|
5
5
|
import { CODEX_BACKEND_ID } from './contract.js';
|
|
6
6
|
import { arr, num, rec, str, text } from './narrow.js';
|
|
7
7
|
import { CLIENT } from './protocol/index.js';
|
|
8
8
|
import { rpcCode, RPC_ERROR } from './rpc/client.js';
|
|
9
9
|
const LIST_LIMIT = 500;
|
|
10
10
|
const LIST_PAGE = 200;
|
|
11
|
+
const FIRST_PAGE = 32;
|
|
11
12
|
const PREVIEW_LIMIT = 6;
|
|
12
13
|
/** Metadata only. Absence of preview text is not proof of an empty thread. */
|
|
13
14
|
export function codexSessionSummary(value, lastUsed = {}) {
|
|
@@ -44,7 +45,7 @@ export function codexPreviewEntries(turns, limit = PREVIEW_LIMIT) {
|
|
|
44
45
|
if (item?.type === 'userMessage') {
|
|
45
46
|
const content = arr(item.content).map(rec);
|
|
46
47
|
const first = content.find(block => block?.type === 'text');
|
|
47
|
-
const body = text(first?.text) ?? (content.some(block => block?.type === 'image' || block?.type === 'localImage') ?
|
|
48
|
+
const body = text(first?.text) ?? (content.some(block => block?.type === 'image' || block?.type === 'localImage') ? codexText('codex-preview-image') : undefined);
|
|
48
49
|
if (body !== undefined)
|
|
49
50
|
entries.push({ role: 'user', text: body, at: at === undefined ? undefined : at * 1000 });
|
|
50
51
|
}
|
|
@@ -67,29 +68,73 @@ export function createCodexCatalog(deps) {
|
|
|
67
68
|
};
|
|
68
69
|
return {
|
|
69
70
|
deleteAction: 'archive',
|
|
70
|
-
|
|
71
|
+
...(deps.snapshotKey === undefined ? {} : { snapshotKey: deps.snapshotKey }),
|
|
72
|
+
list(scope = {}, onPartial) {
|
|
71
73
|
const cwd = scope.allProjects === true ? undefined : scope.cwd ?? deps.cwd();
|
|
72
74
|
return borrow(cwd, async (hub) => {
|
|
73
75
|
const rows = new Map();
|
|
76
|
+
const initial = new Map();
|
|
74
77
|
let cursor;
|
|
75
78
|
let scanned = 0;
|
|
76
79
|
const seen = new Set();
|
|
77
|
-
//
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
// Read file-backed preferences once, rather than synchronously reading
|
|
81
|
+
// and parsing them for every thread in every page.
|
|
82
|
+
const used = deps.lastUsed?.();
|
|
83
|
+
const params = { sortKey: 'recency_at', sortDirection: 'desc', archived: false, modelProviders: [], ...(cwd === undefined ? {} : { cwd }) };
|
|
84
|
+
const publish = () => {
|
|
85
|
+
onPartial?.([...new Map([...initial, ...rows]).values()].sort((a, b) => b.updatedAt - a.updatedAt));
|
|
86
|
+
};
|
|
87
|
+
const initialAbort = new AbortController();
|
|
88
|
+
let finished = false;
|
|
89
|
+
let firstPage;
|
|
90
|
+
if (onPartial !== undefined) {
|
|
91
|
+
// The DB shortcut must not delay discovery of new rollout files.
|
|
92
|
+
// Repaired rows win even if the DB response arrives later.
|
|
93
|
+
firstPage = hub.call(CLIENT.threadList, { ...params, limit: FIRST_PAGE, useStateDbOnly: true }, { timeoutMs: 1000, signal: initialAbort.signal }).then(answer => {
|
|
94
|
+
if (finished)
|
|
95
|
+
return;
|
|
96
|
+
for (const raw of arr(rec(answer)?.data)) {
|
|
97
|
+
const row = codexSessionSummary(raw, used);
|
|
98
|
+
if (row !== undefined && row.kind.kind !== 'subagent')
|
|
99
|
+
initial.set(row.id, row);
|
|
100
|
+
}
|
|
101
|
+
if (initial.size > 0)
|
|
102
|
+
publish();
|
|
103
|
+
}, () => { });
|
|
104
|
+
// Attach a rejection handler now; publication errors are rethrown
|
|
105
|
+
// by the final await after the other pending RPC has settled.
|
|
106
|
+
void firstPage.catch(() => { });
|
|
107
|
+
}
|
|
108
|
+
try {
|
|
109
|
+
// Servers may cap pages below our requested size. Bound empty pages
|
|
110
|
+
// separately, rather than stopping after three capped pages.
|
|
111
|
+
for (let page = 0; page < Math.ceil(LIST_LIMIT / FIRST_PAGE) && scanned < LIST_LIMIT; page += 1) {
|
|
112
|
+
const limit = page === 0 && onPartial !== undefined ? FIRST_PAGE : LIST_PAGE;
|
|
113
|
+
const answer = rec(await hub.call(CLIENT.threadList, { ...params, limit: Math.min(limit, LIST_LIMIT - scanned), ...(cursor === undefined ? {} : { cursor }) }));
|
|
114
|
+
const data = arr(answer?.data);
|
|
115
|
+
scanned += data.length;
|
|
116
|
+
for (const raw of data.slice(0, LIST_LIMIT - rows.size)) {
|
|
117
|
+
const row = codexSessionSummary(raw, used);
|
|
118
|
+
if (row !== undefined && row.kind.kind !== 'subagent')
|
|
119
|
+
rows.set(row.id, row);
|
|
120
|
+
}
|
|
121
|
+
// Progress is cumulative; repaired rows supersede the DB metadata,
|
|
122
|
+
// and only the resolved result may drop unconfirmed initial IDs.
|
|
123
|
+
publish();
|
|
124
|
+
cursor = text(answer?.nextCursor);
|
|
125
|
+
if (cursor === undefined || seen.has(cursor))
|
|
126
|
+
break;
|
|
127
|
+
seen.add(cursor);
|
|
86
128
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
129
|
+
return [...rows.values()].sort((a, b) => b.updatedAt - a.updatedAt).slice(0, LIST_LIMIT);
|
|
130
|
+
}
|
|
131
|
+
finally {
|
|
132
|
+
finished = true;
|
|
133
|
+
initialAbort.abort();
|
|
134
|
+
// Keep the runtime borrowed until the speculative DB request has
|
|
135
|
+
// settled; it can never publish after completion or failure.
|
|
136
|
+
await firstPage;
|
|
91
137
|
}
|
|
92
|
-
return [...rows.values()].sort((a, b) => b.updatedAt - a.updatedAt).slice(0, LIST_LIMIT);
|
|
93
138
|
});
|
|
94
139
|
},
|
|
95
140
|
info(sessionId, cwd) {
|
|
@@ -120,7 +165,7 @@ export function createCodexCatalog(deps) {
|
|
|
120
165
|
}
|
|
121
166
|
catch (error) {
|
|
122
167
|
if (rpcCode(error) === RPC_ERROR.invalidRequest && /active.*worker/iu.test(error instanceof Error ? error.message : ''))
|
|
123
|
-
throw new Error(
|
|
168
|
+
throw new Error(codexText('codex-archive-busy'));
|
|
124
169
|
throw error;
|
|
125
170
|
}
|
|
126
171
|
}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SessionCapabilities } from '../../agent/capabilities.js';
|
|
2
|
-
import { channelProfileSlug } from '
|
|
2
|
+
import { channelProfileSlug } from '../shared/channel-slug.js';
|
|
3
3
|
import { type ChannelTokenStore } from '../shared/channel-tokens.js';
|
|
4
4
|
import { type Rec } from './narrow.js';
|
|
5
5
|
export interface CodexChannelProfile {
|
|
@@ -43,8 +43,11 @@ export declare function validateCodexBaseUrl(value: string): string;
|
|
|
43
43
|
export declare function parseCodexChannels(value: unknown): CodexChannelsData;
|
|
44
44
|
export declare const activeProfileOf: (data: CodexChannelsData) => CodexChannelProfile | undefined;
|
|
45
45
|
export declare const hasChannelConnection: (profile: CodexChannelProfile | undefined) => boolean;
|
|
46
|
-
/**
|
|
47
|
-
|
|
46
|
+
/** The file-backed profiles under `<dir>` (the host's `dataDir` for this
|
|
47
|
+
* backend). The directory is required: a backend never picks a location of
|
|
48
|
+
* its own under the host's data directory (D2, B-3/B-5). Same
|
|
49
|
+
* atomic/upsert/damaged-file semantics as the mature Claude store. */
|
|
50
|
+
export declare function fileCodexChannels(dir: string, debug?: (message: string) => void): CodexChannels;
|
|
48
51
|
export declare function memoryCodexChannels(initial?: CodexChannelsData): CodexChannels;
|
|
49
52
|
/** The token only goes into the child environment, never an argv override. */
|
|
50
53
|
export declare function codexChannelLaunch(profile: CodexChannelProfile | undefined, tokens?: ChannelTokenStore): CodexChannelLaunch;
|