@deepseek-harness-tui/dsh-tui 0.14.0 → 0.15.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 +73 -14
- 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 +34 -7
- package/guide/dsh-tui-guide/codex-backend.md +17 -2
- package/guide/dsh-tui-guide/configuration.en.md +129 -16
- package/guide/dsh-tui-guide/configuration.md +110 -14
- package/guide/dsh-tui-guide/interaction.en.md +57 -24
- package/guide/dsh-tui-guide/interaction.md +42 -19
- package/guide/dsh-tui-guide/plugins.en.md +36 -3
- package/guide/dsh-tui-guide/plugins.md +21 -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 +51 -20
- package/guide/dsh-tui-guide/user-guide.md +41 -21
- package/lib/settings.json +103 -9
- 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 +3 -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-settings.d.ts +9 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +50 -12
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +21 -0
- package/lib/types/adapter/ports/channel-view.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/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/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/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 +66 -34
- 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.js +4 -4
- 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/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/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 +5 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +47 -8
- 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 +20 -6
- 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.map +1 -1
- package/lib/types/components/LogoV2.js +9 -6
- 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 +18 -5
- 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/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 +58 -118
- 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/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.map +1 -1
- package/lib/types/components/launchpadLayout.js +2 -2
- 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/SidePanelColumn.d.ts +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.js +2 -1
- 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/btw/BtwComposer.d.ts +4 -2
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.js +12 -4
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +59 -15
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +4 -2
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadView.js +12 -6
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -2
- package/lib/types/components/sidePanel/types.d.ts +1 -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/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/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 +20 -0
- package/lib/types/dsh-adapter/admission-loader.d.ts.map +1 -0
- package/lib/types/dsh-adapter/admission-loader.js +256 -0
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +3 -0
- 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-contribution.d.ts +26 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-contribution.js +37 -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 +285 -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 +92 -46
- 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 +16 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +18 -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 +16 -0
- 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 +7 -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 +3 -0
- 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 +318 -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 +41 -22
- 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 +1 -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 +138 -8
- 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 +40 -28
- 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/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 +56 -27
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +15 -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 +2 -2
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +1 -0
- package/lib/types/dsh-adapter/channel/state.d.ts +37 -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 +66 -6
- 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 +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +1 -1
- 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/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 +1 -1
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +15 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts +36 -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 +221 -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 +53 -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 +76 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts +106 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-dsh.js +466 -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 +228 -0
- package/lib/types/dsh-adapter/index.d.ts +55 -18
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +59 -7
- 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/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/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 +35 -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 +21 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-declaration.js +53 -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-manager.d.ts +68 -0
- package/lib/types/dsh-adapter/plugin-manager.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-manager.js +51 -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 +870 -233
- package/lib/types/dsh-adapter/plugins-info.d.ts +44 -8
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +354 -34
- 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-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/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 +110 -8
- 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/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 +363 -1432
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +155 -385
- 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/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 +129 -16
- 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/permissionPrefs.d.ts +34 -0
- package/lib/types/permissionPrefs.d.ts.map +1 -0
- package/lib/types/permissionPrefs.js +61 -0
- package/lib/types/plugin-host.d.ts +1 -0
- package/lib/types/plugin-host.d.ts.map +1 -1
- 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 +22 -15
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +442 -272
- package/lib/types/screens/Launchpad.d.ts +27 -17
- package/lib/types/screens/Launchpad.d.ts.map +1 -1
- package/lib/types/screens/Launchpad.js +241 -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 +6 -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/chatOverlay.d.ts +11 -4
- 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/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/package.json +36 -6
- package/presets/winbash.mjs +716 -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
|
@@ -11,18 +11,20 @@
|
|
|
11
11
|
* the CLI refuses fails loudly; nothing falls back to a fresh session.
|
|
12
12
|
*/
|
|
13
13
|
import { randomUUID } from 'node:crypto';
|
|
14
|
-
import {
|
|
14
|
+
import { isAbsolute, normalize } from 'node:path';
|
|
15
|
+
import { claudeText, installClaudeLocale } from './text.js';
|
|
15
16
|
import { CLAUDE_BACKEND_ID, CLAUDE_BACKEND_LABEL, cliVersionDrift, sdkVersionDrift, VALIDATED_SDK_VERSION, claudeResumeCommand } from './contract.js';
|
|
16
17
|
import { CLAUDE_OAUTH_PROVIDER, ClaudeChannelConflictError, channelMissingCredential, detectClaudeAuth, originHost, refreshFailureDebugDetail, refreshFailureStatus, resolveClaudeAuth } from './auth.js';
|
|
17
18
|
import { createClaudeCatalog } from './catalog.js';
|
|
18
19
|
import { resolveStartPermissionMode } from './options.js';
|
|
19
|
-
import { fileClaudePrefs } from './prefs.js';
|
|
20
|
+
import { fileClaudePrefs, memoryClaudePrefs } from './prefs.js';
|
|
20
21
|
import { buildClaudeEnv, readClaudeVersion, resolveClaudeExecutable } from './process.js';
|
|
21
|
-
import { activeProfileOf, fileClaudeChannels, hasChannelConnection } from './channels.js';
|
|
22
|
+
import { activeProfileOf, fileClaudeChannels, hasChannelConnection, memoryClaudeChannels } from './channels.js';
|
|
22
23
|
import { fileClaudeChannelTokens } from '../shared/channel-tokens.js';
|
|
23
24
|
import { replayClaudeTranscript } from './replay.js';
|
|
24
25
|
import { installedSdkVersion, loadClaudeSdk } from './sdk.js';
|
|
25
26
|
import { openClaudeSession } from './session.js';
|
|
27
|
+
import { claudeConfigDir } from './transcript-file.js';
|
|
26
28
|
import { errorText } from './narrow.js';
|
|
27
29
|
/** The user-facing refresh failure: a fixed sentence, the HTTP status at most. */
|
|
28
30
|
function refreshFailedNotice(error) {
|
|
@@ -31,7 +33,7 @@ function refreshFailedNotice(error) {
|
|
|
31
33
|
if (error instanceof ClaudeChannelConflictError)
|
|
32
34
|
return error.message;
|
|
33
35
|
const status = refreshFailureStatus(error);
|
|
34
|
-
return
|
|
36
|
+
return claudeText('claude-auth-refresh-failed', { detail: status === undefined ? '' : claudeText('claude-auth-refresh-status', { status }) });
|
|
35
37
|
}
|
|
36
38
|
/** The settings credentials a channel connection replaces (named in a
|
|
37
39
|
* notice; a value never is). */
|
|
@@ -56,12 +58,12 @@ export function channelStartNotices(channel, settingsEnv) {
|
|
|
56
58
|
const notices = [];
|
|
57
59
|
const settingsUrl = firstNonEmpty(settingsEnv, 'ANTHROPIC_BASE_URL');
|
|
58
60
|
if (channel.baseUrl !== undefined && settingsUrl !== undefined && settingsUrl !== channel.baseUrl) {
|
|
59
|
-
notices.push(
|
|
61
|
+
notices.push(claudeText('channel-conn-settings-mismatch', { name: channel.name }));
|
|
60
62
|
}
|
|
61
63
|
if (channel.baseUrl !== undefined || channel.tokenRef !== undefined) {
|
|
62
64
|
const superseded = SUPERSEDED_CREDENTIAL_KEYS.filter(key => firstNonEmpty(settingsEnv, key) !== undefined);
|
|
63
65
|
if (superseded.length > 0)
|
|
64
|
-
notices.push(
|
|
66
|
+
notices.push(claudeText('channel-conn-creds-superseded', { keys: superseded.join(', ') }));
|
|
65
67
|
}
|
|
66
68
|
return notices;
|
|
67
69
|
}
|
|
@@ -73,17 +75,17 @@ export function channelStartNotices(channel, settingsEnv) {
|
|
|
73
75
|
export function startModeNotices(start, prefs) {
|
|
74
76
|
const notices = [];
|
|
75
77
|
if (start.downgradedFrom !== undefined)
|
|
76
|
-
notices.push(
|
|
78
|
+
notices.push(claudeText('claude-start-mode-downgraded', { mode: start.downgradedFrom }));
|
|
77
79
|
// The developer override is never silent: a live-test leftover in the
|
|
78
80
|
// environment would otherwise change every approval without a trace.
|
|
79
81
|
if (start.source === 'env')
|
|
80
|
-
notices.push(
|
|
82
|
+
notices.push(claudeText('claude-start-mode-env', { mode: start.mode }));
|
|
81
83
|
if (start.bypassNotCarried === true) {
|
|
82
84
|
prefs.write({ permissionMode: null });
|
|
83
|
-
notices.push(
|
|
85
|
+
notices.push(claudeText('claude-start-mode-bypass-not-carried'));
|
|
84
86
|
}
|
|
85
87
|
if (start.ignoredOverride !== undefined)
|
|
86
|
-
notices.push(
|
|
88
|
+
notices.push(claudeText('claude-start-mode-env-ignored', { mode: start.ignoredOverride }));
|
|
87
89
|
return notices;
|
|
88
90
|
}
|
|
89
91
|
/**
|
|
@@ -94,7 +96,7 @@ export async function loadClaudeTranscript(sdk, target, fallbackCwd, debug = ()
|
|
|
94
96
|
const info = (target.cwd === undefined ? undefined : await sdk.getSessionInfo(target.sessionId, { dir: target.cwd }))
|
|
95
97
|
?? await sdk.getSessionInfo(target.sessionId);
|
|
96
98
|
if (info === undefined)
|
|
97
|
-
throw new Error(
|
|
99
|
+
throw new Error(claudeText('claude-resume-not-found', { id: target.sessionId }));
|
|
98
100
|
const cwd = info.cwd ?? target.cwd ?? fallbackCwd;
|
|
99
101
|
const [messages, subagentIds] = await Promise.all([
|
|
100
102
|
sdk.getSessionMessages(target.sessionId, { dir: cwd, includeSystemMessages: true }),
|
|
@@ -121,19 +123,72 @@ export async function loadClaudeTranscript(sdk, target, fallbackCwd, debug = ()
|
|
|
121
123
|
const replay = replayClaudeTranscript(messages, { cwd, subagents, ...(title === undefined || title === '' ? {} : { title }), debug });
|
|
122
124
|
return { cwd, replay };
|
|
123
125
|
}
|
|
124
|
-
/**
|
|
125
|
-
|
|
126
|
+
/**
|
|
127
|
+
* The catalog of the local session store (the SDK loads on first use).
|
|
128
|
+
*
|
|
129
|
+
* The catalog is a static property of the backend (no session is open when
|
|
130
|
+
* the browser calls it), so it cannot be handed a host the way `open()` is;
|
|
131
|
+
* it reads the one `detect()`/`open()` captured, exactly like codex's
|
|
132
|
+
* catalog host. Both run before anything can list sessions (the boot probe
|
|
133
|
+
* detects every registered backend), and when neither has run there is no
|
|
134
|
+
* directory to take: `lastUsed` reads as empty and `snapshotKey` declines
|
|
135
|
+
* disk caching, rather than this backend guessing a path (D2).
|
|
136
|
+
*/
|
|
137
|
+
let catalogHost;
|
|
138
|
+
/** The prefs store of the captured host, or undefined when no host has been
|
|
139
|
+
* seen yet (see {@link catalogHost}). */
|
|
140
|
+
const catalogPrefs = () => {
|
|
141
|
+
const dir = catalogHost?.dataDir;
|
|
142
|
+
const host = catalogHost;
|
|
143
|
+
return dir === undefined || host === undefined ? undefined : fileClaudePrefs(dir, message => host.debug(message));
|
|
144
|
+
};
|
|
145
|
+
/** Remember the host of the most recent detect / open: the catalog's only way
|
|
146
|
+
* to reach this backend's own directory without a host parameter, and where
|
|
147
|
+
* this backend's copy takes its language from (read live, so a `/lang`
|
|
148
|
+
* switch applies to the next string). */
|
|
149
|
+
const rememberHost = (host) => {
|
|
150
|
+
catalogHost = host;
|
|
151
|
+
installClaudeLocale(host.locale);
|
|
152
|
+
};
|
|
153
|
+
/** Reuse the winning probe; explicit env paths still need their first probe. */
|
|
154
|
+
async function resolvedCliVersion(executable, host) {
|
|
155
|
+
if (executable.version !== undefined)
|
|
156
|
+
return executable.version;
|
|
157
|
+
if (executable.path === undefined)
|
|
158
|
+
return undefined;
|
|
159
|
+
return readClaudeVersion(executable.path, host.appVersion);
|
|
160
|
+
}
|
|
161
|
+
/** Best-effort CLI note for an SDK-missing hint; no CLI means no extra line. */
|
|
162
|
+
async function foundClaudeCli(host) {
|
|
163
|
+
try {
|
|
164
|
+
const executable = await resolveClaudeExecutable();
|
|
165
|
+
if (executable.path === undefined)
|
|
166
|
+
return undefined;
|
|
167
|
+
const version = await resolvedCliVersion(executable, host);
|
|
168
|
+
return version === undefined
|
|
169
|
+
? claudeText('claude-sdk-missing-found-cli-path', { path: executable.path })
|
|
170
|
+
: claudeText('claude-sdk-missing-found-cli', { version, path: executable.path });
|
|
171
|
+
}
|
|
172
|
+
catch (error) {
|
|
173
|
+
host.debug(`claude: native CLI probe failed (${errorText(error)})`);
|
|
174
|
+
return undefined;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
126
177
|
export const claudeBackend = {
|
|
127
178
|
id: CLAUDE_BACKEND_ID,
|
|
128
179
|
descriptor: { label: CLAUDE_BACKEND_LABEL },
|
|
129
180
|
/** What is installed and whether it is the validated pair. Never throws. */
|
|
130
181
|
async detect(host) {
|
|
182
|
+
rememberHost(host);
|
|
131
183
|
try {
|
|
132
184
|
await loadClaudeSdk();
|
|
133
185
|
}
|
|
134
186
|
catch (error) {
|
|
135
187
|
host.debug(`claude: SDK import failed (${errorText(error)})`);
|
|
136
|
-
|
|
188
|
+
// A local CLI does not remove the SDK requirement.
|
|
189
|
+
const missing = claudeText('claude-sdk-missing', { version: VALIDATED_SDK_VERSION });
|
|
190
|
+
const found = await foundClaudeCli(host);
|
|
191
|
+
return { installed: false, hint: found === undefined ? missing : `${missing}\n${found}` };
|
|
137
192
|
}
|
|
138
193
|
let auth = 'unknown';
|
|
139
194
|
try {
|
|
@@ -144,18 +199,25 @@ export const claudeBackend = {
|
|
|
144
199
|
}
|
|
145
200
|
try {
|
|
146
201
|
const executable = await resolveClaudeExecutable();
|
|
147
|
-
const version =
|
|
202
|
+
const version = await resolvedCliVersion(executable, host);
|
|
148
203
|
const drift = cliVersionDrift(version) ?? sdkVersionDrift(installedSdkVersion());
|
|
149
|
-
|
|
204
|
+
// The picker never blocks on a missing credential (the probe cannot see
|
|
205
|
+
// a settings-file env, an apiKeyHelper or a relay token), and `/login`
|
|
206
|
+
// plus `/channel` work in-session: offer the sign-in-after-start note.
|
|
207
|
+
return { installed: true, auth, loginInSession: true, ...(version === undefined ? {} : { version }), ...(drift === undefined ? {} : { drift }), ...(auth === 'missing' ? { hint: claudeText('claude-auth-missing-hint') } : {}) };
|
|
150
208
|
}
|
|
151
209
|
catch (error) {
|
|
152
210
|
host.debug(`claude: detection failed (${errorText(error)})`);
|
|
153
|
-
return { installed: true, auth };
|
|
211
|
+
return { installed: true, auth, loginInSession: true };
|
|
154
212
|
}
|
|
155
213
|
},
|
|
156
214
|
launch: {
|
|
157
|
-
sessionPrefs:
|
|
158
|
-
|
|
215
|
+
sessionPrefs: host => {
|
|
216
|
+
// The launcher asks before a session exists, so this store is built from
|
|
217
|
+
// the host it is handed. A host that hands over no directory keeps
|
|
218
|
+
// nothing: there is simply no remembered session to resume (D-3's
|
|
219
|
+
// feature-detect, never a path this backend guessed — D2).
|
|
220
|
+
const prefs = host.dataDir === undefined ? memoryClaudePrefs() : fileClaudePrefs(host.dataDir, host.debug);
|
|
159
221
|
return {
|
|
160
222
|
lastSession: () => prefs.read().lastSession,
|
|
161
223
|
setLastSession: sessionId => { prefs.write({ lastSession: sessionId }); },
|
|
@@ -168,18 +230,23 @@ export const claudeBackend = {
|
|
|
168
230
|
catalog: createClaudeCatalog({
|
|
169
231
|
loadSdk: loadClaudeSdk,
|
|
170
232
|
cwd: () => process.cwd(),
|
|
171
|
-
lastUsed: () => catalogPrefs
|
|
233
|
+
lastUsed: () => catalogPrefs()?.read().lastUsed ?? {},
|
|
234
|
+
snapshotKey: () => {
|
|
235
|
+
const home = claudeConfigDir(process.env);
|
|
236
|
+
return isAbsolute(home) ? JSON.stringify(['claude', normalize(home)]) : undefined;
|
|
237
|
+
},
|
|
172
238
|
}),
|
|
173
239
|
/** Create a session in `target.cwd` (an explicit session id, so the TUI
|
|
174
240
|
* knows it before the CLI's first `init`), or resume a persisted one. */
|
|
175
241
|
async open(target, host) {
|
|
242
|
+
rememberHost(host);
|
|
176
243
|
let sdk;
|
|
177
244
|
try {
|
|
178
245
|
sdk = await loadClaudeSdk();
|
|
179
246
|
}
|
|
180
247
|
catch (error) {
|
|
181
248
|
host.debug(`claude: SDK import failed (${errorText(error)})`);
|
|
182
|
-
throw new Error(
|
|
249
|
+
throw new Error(claudeText('claude-sdk-missing', { version: VALIDATED_SDK_VERSION }));
|
|
183
250
|
}
|
|
184
251
|
const resumed = target.kind === 'resume'
|
|
185
252
|
? await loadClaudeTranscript(sdk, target, host.cwd, message => host.debug(message))
|
|
@@ -187,8 +254,12 @@ export const claudeBackend = {
|
|
|
187
254
|
const cwd = resumed?.cwd ?? (target.kind === 'create' ? target.cwd : host.cwd);
|
|
188
255
|
// The backend-scoped prefs: the remembered model / effort / permission
|
|
189
256
|
// picks. One store for the whole open — the start resolution reads the
|
|
190
|
-
// mode here, the session's controls keep writing all three later.
|
|
191
|
-
|
|
257
|
+
// mode here, the session's controls keep writing all three later. A host
|
|
258
|
+
// that hands over no directory keeps them in memory for this process
|
|
259
|
+
// (D-3's feature-detect): nothing is written to a path of our choosing.
|
|
260
|
+
const prefs = host.dataDir === undefined
|
|
261
|
+
? memoryClaudePrefs()
|
|
262
|
+
: fileClaudePrefs(host.dataDir, message => host.debug(message));
|
|
192
263
|
const [executable, start] = await Promise.all([
|
|
193
264
|
resolveClaudeExecutable(),
|
|
194
265
|
resolveStartPermissionMode(sdk, cwd, process.env, prefs.read().permissionMode),
|
|
@@ -197,7 +268,7 @@ export const claudeBackend = {
|
|
|
197
268
|
// The credential: a dsh-auth login wins (refreshed now if
|
|
198
269
|
// it is about to expire), else the environment, else the local login.
|
|
199
270
|
const credentials = host.oauthCredential?.(CLAUDE_OAUTH_PROVIDER);
|
|
200
|
-
const baseEnv = buildClaudeEnv();
|
|
271
|
+
const baseEnv = buildClaudeEnv({ appVersion: host.appVersion });
|
|
201
272
|
// The route decides whether the subscription token may be injected at
|
|
202
273
|
// all (auth.ts): the CLI applies the settings' `env`, so a base URL set
|
|
203
274
|
// in ~/.claude/settings.json counts like one in the environment.
|
|
@@ -205,7 +276,9 @@ export const claudeBackend = {
|
|
|
205
276
|
// The channel store and the token store are read fresh for every plan
|
|
206
277
|
// (the open and each reconnect): a /channel switch while the session
|
|
207
278
|
// lives is picked up by its next spawn.
|
|
208
|
-
const channels =
|
|
279
|
+
const channels = host.dataDir === undefined
|
|
280
|
+
? memoryClaudeChannels({ channels: [] })
|
|
281
|
+
: fileClaudeChannels(host.dataDir, message => host.debug(message));
|
|
209
282
|
const tokens = fileClaudeChannelTokens(undefined, message => host.debug(message));
|
|
210
283
|
// A custom endpoint the profile gives no credential (no token, a
|
|
211
284
|
// dangling ref, no credential key in its env) never spawns; the refusal
|
|
@@ -220,7 +293,7 @@ export const claudeBackend = {
|
|
|
220
293
|
...(active.env === undefined ? {} : { env: active.env }),
|
|
221
294
|
};
|
|
222
295
|
if (channelMissingCredential(connection)) {
|
|
223
|
-
throw new ClaudeChannelConflictError(
|
|
296
|
+
throw new ClaudeChannelConflictError(claudeText('claude-channel-token-missing', { name: active.name, host: originHost(active.baseUrl ?? '') }));
|
|
224
297
|
}
|
|
225
298
|
return connection;
|
|
226
299
|
};
|
|
@@ -261,7 +334,7 @@ export const claudeBackend = {
|
|
|
261
334
|
}
|
|
262
335
|
startNotices.push(...startModeNotices(start, prefs));
|
|
263
336
|
if (sdkVersionDrift(sdkVersion) !== undefined)
|
|
264
|
-
startNotices.push(
|
|
337
|
+
startNotices.push(claudeText('claude-sdk-drift', { version: sdkVersion ?? '', validated: VALIDATED_SDK_VERSION }));
|
|
265
338
|
return openClaudeSession({
|
|
266
339
|
sdk,
|
|
267
340
|
store: sdk,
|
|
@@ -279,7 +352,7 @@ export const claudeBackend = {
|
|
|
279
352
|
// stored credential as is.
|
|
280
353
|
renew: renewal => {
|
|
281
354
|
const channel = channelConnection();
|
|
282
|
-
return resolveClaudeAuth(buildClaudeEnv(), credentials, {
|
|
355
|
+
return resolveClaudeAuth(buildClaudeEnv({ appVersion: host.appVersion }), credentials, {
|
|
283
356
|
settings,
|
|
284
357
|
...(renewal.rejected === undefined ? {} : { rejected: renewal.rejected }),
|
|
285
358
|
...(channel === undefined ? {} : { channel }),
|
|
@@ -288,7 +361,8 @@ export const claudeBackend = {
|
|
|
288
361
|
failureNotice: refreshFailedNotice,
|
|
289
362
|
},
|
|
290
363
|
prefs,
|
|
291
|
-
|
|
364
|
+
channels,
|
|
365
|
+
host,
|
|
292
366
|
...(sdkVersion === undefined ? {} : { sdkVersion }),
|
|
293
367
|
startNotices,
|
|
294
368
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SDKSessionInfo } from '@anthropic-ai/claude-agent-sdk';
|
|
2
2
|
import type { SessionCatalog } from '../../agent/backend.js';
|
|
3
|
-
import type { SessionSummary } from '../../
|
|
3
|
+
import type { SessionSummary } from '../../agent/index.js';
|
|
4
4
|
import type { ClaudeSessionStoreSdk } from './sdk.js';
|
|
5
5
|
export interface ClaudeCatalogDeps {
|
|
6
6
|
/** The session-store API (loaded on first use; the SDK is an optional peer). */
|
|
@@ -9,6 +9,7 @@ export interface ClaudeCatalogDeps {
|
|
|
9
9
|
cwd(): string;
|
|
10
10
|
/** This install's last-used notes (epoch ms by session id). */
|
|
11
11
|
lastUsed?(): Readonly<Record<string, number>>;
|
|
12
|
+
snapshotKey?(): string | undefined;
|
|
12
13
|
}
|
|
13
14
|
/** One SDK record as a browser row. */
|
|
14
15
|
export declare function claudeSessionSummary(info: SDKSessionInfo, lastUsed?: Readonly<Record<string, number>>): SessionSummary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../../src/backends/claude/catalog.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,wBAAwB,CAAA;AAC9E,OAAO,KAAK,EAAgB,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../../src/backends/claude/catalog.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,wBAAwB,CAAA;AAC9E,OAAO,KAAK,EAAgB,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAGxE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAErD,MAAM,WAAW,iBAAiB;IAChC,gFAAgF;IAChF,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,cAAc,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,eAAe,GAAG,eAAe,CAAC,CAAC,CAAA;IAC7I,wDAAwD;IACxD,GAAG,IAAI,MAAM,CAAA;IACb,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAC7C,WAAW,CAAC,IAAI,MAAM,GAAG,SAAS,CAAA;CACnC;AAMD,uCAAuC;AACvC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM,GAAG,cAAc,CAgC1H;AAED,8CAA8C;AAC9C,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,cAAc,CA2C3E"}
|
|
@@ -23,6 +23,7 @@ import { CLAUDE_BACKEND_ID } from './contract.js';
|
|
|
23
23
|
import { previewEntries } from './replay.js';
|
|
24
24
|
/** Preview depth when the caller names none. */
|
|
25
25
|
const PREVIEW_LIMIT = 6;
|
|
26
|
+
const FIRST_PAGE = 32;
|
|
26
27
|
/** One SDK record as a browser row. */
|
|
27
28
|
export function claudeSessionSummary(info, lastUsed = {}) {
|
|
28
29
|
const cwd = info.cwd ?? '';
|
|
@@ -62,13 +63,22 @@ export function createClaudeCatalog(deps) {
|
|
|
62
63
|
const lastUsed = () => deps.lastUsed?.() ?? {};
|
|
63
64
|
const dirOption = (cwd) => cwd === undefined || cwd === '' ? undefined : { dir: cwd };
|
|
64
65
|
return {
|
|
65
|
-
|
|
66
|
+
...(deps.snapshotKey === undefined ? {} : { snapshotKey: deps.snapshotKey }),
|
|
67
|
+
async list(scope = {}, onPartial) {
|
|
66
68
|
const sdk = await deps.loadSdk();
|
|
67
|
-
const
|
|
68
|
-
? await sdk.listSessions({ includeProgrammatic: true })
|
|
69
|
-
: await sdk.listSessions({ dir: scope.cwd ?? deps.cwd(), includeProgrammatic: true });
|
|
69
|
+
const options = { includeProgrammatic: true, ...(scope.allProjects === true ? {} : { dir: scope.cwd ?? deps.cwd() }) };
|
|
70
70
|
const used = lastUsed();
|
|
71
|
-
|
|
71
|
+
const summaries = (infos) => infos.map(info => claudeSessionSummary(info, used)).sort((a, b) => b.updatedAt - a.updatedAt);
|
|
72
|
+
if (onPartial !== undefined) {
|
|
73
|
+
// A bounded SDK read extracts metadata only for the newest sessions.
|
|
74
|
+
// Both reads keep the SDK's project scope, including git worktrees.
|
|
75
|
+
// An unlimited read confirms completeness: a short limited page does
|
|
76
|
+
// not promise exhaustion. Avoid repeatedly scanning offset pages.
|
|
77
|
+
const first = await sdk.listSessions({ ...options, limit: FIRST_PAGE });
|
|
78
|
+
const rows = summaries(first);
|
|
79
|
+
onPartial(rows);
|
|
80
|
+
}
|
|
81
|
+
return summaries(await sdk.listSessions(options));
|
|
72
82
|
},
|
|
73
83
|
async info(sessionId, cwd) {
|
|
74
84
|
const sdk = await deps.loadSdk();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { channelProfileSlug } from '
|
|
1
|
+
import { channelProfileSlug } from '../shared/channel-slug.js';
|
|
2
2
|
/** One relay channel. */
|
|
3
3
|
export interface ClaudeChannelProfile {
|
|
4
4
|
/** Stable slug of the name (the file's join key). */
|
|
@@ -40,8 +40,10 @@ export declare const channelSlug: typeof channelProfileSlug;
|
|
|
40
40
|
export declare function parseChannels(parsed: unknown): ClaudeChannelsData;
|
|
41
41
|
/** The channel whose mapping is live (undefined when none is active). */
|
|
42
42
|
export declare function activeProfileOf(data: ClaudeChannelsData): ClaudeChannelProfile | undefined;
|
|
43
|
-
/** The file-backed profiles under `<dir>` (
|
|
44
|
-
|
|
43
|
+
/** The file-backed profiles under `<dir>` (the host's `dataDir` for this
|
|
44
|
+
* backend). The directory is required: a backend never picks a location of
|
|
45
|
+
* its own under the host's data directory (D2, B-3). */
|
|
46
|
+
export declare function fileClaudeChannels(dir: string, debug?: (message: string) => void): ClaudeChannels;
|
|
45
47
|
/** An in-memory store (tests, embedders without a home directory). */
|
|
46
48
|
export declare function memoryClaudeChannels(initial?: ClaudeChannelsData): ClaudeChannels & {
|
|
47
49
|
readonly data: ClaudeChannelsData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../../../src/backends/claude/channels.ts"],"names":[],"mappings":"AAgDA,OAAO,EAAE,kBAAkB,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../../../src/backends/claude/channels.ts"],"names":[],"mappings":"AAgDA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAG9D,yBAAyB;AACzB,MAAM,WAAW,oBAAoB;IACnC,qDAAqD;IACrD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,iDAAiD;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,oDAAoD;IACpD,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAClD,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACjD,iEAAiE;IACjE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB;6BACyB;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,2EAA2E;IAC3E,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAChD;AAED,qBAAqB;AACrB,MAAM,WAAW,kBAAkB;IACjC,kEAAkE;IAClE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,QAAQ,EAAE,SAAS,oBAAoB,EAAE,CAAA;CACnD;AAED,gFAAgF;AAChF,MAAM,WAAW,cAAc;IAC7B,IAAI,IAAI,kBAAkB,CAAA;IAC1B,0EAA0E;IAC1E,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,4EAA4E;IAC5E,IAAI,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAAA;IACzC;gEAC4D;IAC5D,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAID,yEAAyE;AACzE,eAAO,MAAM,WAAW,2BAAqB,CAAA;AAY7C,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,kBAAkB,CA6BjE;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,IAAI,EAAE,kBAAkB,GAAG,oBAAoB,GAAG,SAAS,CAE1F;AAsBD;;yDAEyD;AACzD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAsB,GAAG,cAAc,CA8DlH;AAED,sEAAsE;AACtE,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,kBAAqC,GAAG,cAAc,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,CAS3I;AAgBD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EACvC,QAAQ,CAAC,EAAE,oBAAoB,GAC9B,oBAAoB,GAAG,SAAS,CAsClC;AAED;;qEAEqE;AACrE,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM,GAAG,SAAS,CAEtG;AAED,qEAAqE;AACrE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,oBAAoB,GAAG,SAAS,GAAG,OAAO,CAGvF"}
|
|
@@ -46,8 +46,7 @@
|
|
|
46
46
|
*/
|
|
47
47
|
import { readFileSync, renameSync } from 'node:fs';
|
|
48
48
|
import { join } from 'node:path';
|
|
49
|
-
import { channelProfileSlug } from '
|
|
50
|
-
import { DATA_DIR } from '../../utils/paths.js';
|
|
49
|
+
import { channelProfileSlug } from '../shared/channel-slug.js';
|
|
51
50
|
import { writeFileAtomic } from '../shared/atomic-file.js';
|
|
52
51
|
const FILE = 'channels.json';
|
|
53
52
|
/** The stable id of a channel name (shared with the /channel wizard). */
|
|
@@ -120,8 +119,10 @@ function removed(current, id) {
|
|
|
120
119
|
const active = current.active === id ? undefined : current.active;
|
|
121
120
|
return { channels, ...(active === undefined ? {} : { active }) };
|
|
122
121
|
}
|
|
123
|
-
/** The file-backed profiles under `<dir>` (
|
|
124
|
-
|
|
122
|
+
/** The file-backed profiles under `<dir>` (the host's `dataDir` for this
|
|
123
|
+
* backend). The directory is required: a backend never picks a location of
|
|
124
|
+
* its own under the host's data directory (D2, B-3). */
|
|
125
|
+
export function fileClaudeChannels(dir, debug = () => undefined) {
|
|
125
126
|
const path = join(dir, FILE);
|
|
126
127
|
/** The document, and whether a file is there that could not be read or
|
|
127
128
|
* parsed (it reads as no channels). */
|
|
@@ -17,6 +17,10 @@ export declare function claudeResumeCommand(sessionId: string): string;
|
|
|
17
17
|
/** The exact `@anthropic-ai/claude-agent-sdk` version this backend is
|
|
18
18
|
* validated against (mirrors the package.json pin). */
|
|
19
19
|
export declare const VALIDATED_SDK_VERSION = "0.3.287";
|
|
20
|
+
/** What the picker's install wizard adds, at that pin. Lives here rather than
|
|
21
|
+
* in install.ts because the backend's manifest declares it, and a manifest may
|
|
22
|
+
* import nothing but this import-free module (P0 D3 / §4.4). */
|
|
23
|
+
export declare const CLAUDE_SDK_SPECIFIER = "@anthropic-ai/claude-agent-sdk@0.3.287";
|
|
20
24
|
/** CLI versions validated with {@link VALIDATED_SDK_VERSION} (the SDK's own
|
|
21
25
|
* `manifest.json` parity version). */
|
|
22
26
|
export declare const VALIDATED_CLI_VERSIONS: readonly string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../src/backends/claude/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,WAAW,CAAA;AAEzC;qBACqB;AACrB,eAAO,MAAM,oBAAoB,iBAAiB,CAAA;AAElD;6EAC6E;AAC7E,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;wDACwD;AACxD,eAAO,MAAM,qBAAqB,YAAY,CAAA;AAE9C;uCACuC;AACvC,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAAgB,CAAA;AAEpE;8BAC8B;AAC9B,eAAO,MAAM,cAAc;IACzB,+DAA+D;;IAE/D,iDAAiD;;IAEjD,8EAA8E;;CAEtE,CAAA;AAEV,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG/E;AAED,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG/E"}
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../src/backends/claude/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,WAAW,CAAA;AAEzC;qBACqB;AACrB,eAAO,MAAM,oBAAoB,iBAAiB,CAAA;AAElD;6EAC6E;AAC7E,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;wDACwD;AACxD,eAAO,MAAM,qBAAqB,YAAY,CAAA;AAE9C;;iEAEiE;AACjE,eAAO,MAAM,oBAAoB,2CAA4D,CAAA;AAE7F;uCACuC;AACvC,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAAgB,CAAA;AAEpE;8BAC8B;AAC9B,eAAO,MAAM,cAAc;IACzB,+DAA+D;;IAE/D,iDAAiD;;IAEjD,8EAA8E;;CAEtE,CAAA;AAEV,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG/E;AAED,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG/E"}
|
|
@@ -19,6 +19,10 @@ export function claudeResumeCommand(sessionId) {
|
|
|
19
19
|
/** The exact `@anthropic-ai/claude-agent-sdk` version this backend is
|
|
20
20
|
* validated against (mirrors the package.json pin). */
|
|
21
21
|
export const VALIDATED_SDK_VERSION = '0.3.287';
|
|
22
|
+
/** What the picker's install wizard adds, at that pin. Lives here rather than
|
|
23
|
+
* in install.ts because the backend's manifest declares it, and a manifest may
|
|
24
|
+
* import nothing but this import-free module (P0 D3 / §4.4). */
|
|
25
|
+
export const CLAUDE_SDK_SPECIFIER = `@anthropic-ai/claude-agent-sdk@${VALIDATED_SDK_VERSION}`;
|
|
22
26
|
/** CLI versions validated with {@link VALIDATED_SDK_VERSION} (the SDK's own
|
|
23
27
|
* `manifest.json` parity version). */
|
|
24
28
|
export const VALIDATED_CLI_VERSIONS = ['2.1.287'];
|
|
@@ -66,6 +66,10 @@ export declare function createClaudeControls(deps: ClaudeControlsDeps): {
|
|
|
66
66
|
effort: {
|
|
67
67
|
readonly levelsFallback: true | undefined;
|
|
68
68
|
levels(): readonly EffortOption[];
|
|
69
|
+
forModel: (ref: ModelRef) => {
|
|
70
|
+
levels: readonly EffortOption[];
|
|
71
|
+
levelsFallback?: true;
|
|
72
|
+
};
|
|
69
73
|
current: () => string | undefined;
|
|
70
74
|
set(id: string | null): Promise<void>;
|
|
71
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../../src/backends/claude/controls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAA8B,KAAK,EAAE,iCAAiC,EAAgB,MAAM,gCAAgC,CAAA;AACrJ,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,UAAU,EAAuB,MAAM,6BAA6B,CAAA;AAC7M,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGpE,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACvF,OAAO,EAAsG,KAAK,cAAc,EAAE,MAAM,eAAe,CAAA;AACvJ,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAwB7C,iEAAiE;AACjE,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,mBAAmB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,aAAa,CAAC,CAAA;IACzN,kDAAkD;IAClD,IAAI,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,IAAI,CAAA;IACzC,uEAAuE;IACvE,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACvC,sDAAsD;IACtD,YAAY,IAAI,MAAM,CAAA;IACtB,8DAA8D;IAC9D,WAAW,IAAI,MAAM,CAAA;IACrB,gFAAgF;IAChF,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,UAAU,EAAE,CAAA;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,UAAU,EAAE,CAAA;IAC7C,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAA;IAC3B;uDACmD;IACnD,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAA;IACjC;;8EAE0E;IAC1E,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAA;IACrC;mEAC+D;IAC/D,WAAW,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAClD,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B;;wEAEoE;IACpE,UAAU,CAAC,IAAI;QAAE,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,CAAA;CACtE;AASD,qFAAqF;AACrF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iCAAiC,GAAG,gBAAgB,CAa3F;AAED,qEAAqE;AACrE,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CAQ5F;AA4BD,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB;;;
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../../src/backends/claude/controls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAA8B,KAAK,EAAE,iCAAiC,EAAgB,MAAM,gCAAgC,CAAA;AACrJ,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,UAAU,EAAuB,MAAM,6BAA6B,CAAA;AAC7M,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGpE,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACvF,OAAO,EAAsG,KAAK,cAAc,EAAE,MAAM,eAAe,CAAA;AACvJ,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAwB7C,iEAAiE;AACjE,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,mBAAmB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,aAAa,CAAC,CAAA;IACzN,kDAAkD;IAClD,IAAI,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,IAAI,CAAA;IACzC,uEAAuE;IACvE,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACvC,sDAAsD;IACtD,YAAY,IAAI,MAAM,CAAA;IACtB,8DAA8D;IAC9D,WAAW,IAAI,MAAM,CAAA;IACrB,gFAAgF;IAChF,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,UAAU,EAAE,CAAA;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,UAAU,EAAE,CAAA;IAC7C,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAA;IAC3B;uDACmD;IACnD,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAA;IACjC;;8EAE0E;IAC1E,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAA;IACrC;mEAC+D;IAC/D,WAAW,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAClD,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B;;wEAEoE;IACpE,UAAU,CAAC,IAAI;QAAE,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,CAAA;CACtE;AASD,qFAAqF;AACrF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iCAAiC,GAAG,gBAAgB,CAa3F;AAED,qEAAqE;AACrE,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CAQ5F;AA4BD,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB;;;oBAmEzC,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC;2BAmBhC,QAAQ;2BACR,MAAM,GAAG,SAAS;qBAIhB,QAAQ,GAAG,OAAO,CAAC,kBAAkB,CAAC;;;qCAc/B,IAAI,GAAG,SAAS;sBAG5B,SAAS,YAAY,EAAE;4BAGjB,QAAQ;wBArG+B,SAAS,YAAY,EAAE;iCAAmB,IAAI;;2BAsGxF,MAAM,GAAG,SAAS;oBACjB,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;;;;2BAY9B,MAAM;oBACL,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;;;wBAa1B,SAAS,kBAAkB,EAAE;4BACzB,MAAM,GAAG,SAAS;4BAChB,MAAM,KAAG,IAAI;sCACL,kBAAkB,GAAG,SAAS;;;;;;;;;;;;;;;;;uBAsFvC,OAAO,CAAC,IAAI,CAAC;;;uBAInB,OAAO,CAAC,IAAI,CAAC;;;oBAGR,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC;;;sBAU7B,OAAO,CAAC,SAAS,aAAa,EAAE,CAAC;8BAI/B,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;2BACzB,MAAM,WAAW,OAAO,KAAG,OAAO,CAAC,IAAI,CAAC;;;0BAGnC,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;;;IAiBpE;oEACgE;eACrD,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI;IAO/D;;0EAEsE;8BAC5C,MAAM,GAAG,IAAI;IAKvC,4EAA4E;2BACrD,SAAS,MAAM,EAAE,GAAG,IAAI;EAIlD;AAED,+DAA+D;AAC/D,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAU5C;AAED;;qCAEqC;AACrC,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAU9D;AAED,8CAA8C;AAC9C,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAS9C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { claudeText } from './text.js';
|
|
2
2
|
import { createHash } from 'node:crypto';
|
|
3
3
|
import { channelTokenRef } from '../shared/channel-tokens.js';
|
|
4
4
|
import { importFromSettingsEnv, importTokenFromSettingsEnv, hasChannelConnection } from './channels.js';
|
|
@@ -85,6 +85,18 @@ export function createClaudeControls(deps) {
|
|
|
85
85
|
/** Terminal-only commands the CLI lists separately (never offered here). */
|
|
86
86
|
let terminalOnly = new Set();
|
|
87
87
|
const currentRow = () => rowOf(models, deps.currentModel());
|
|
88
|
+
const effortsFor = (row) => {
|
|
89
|
+
if (row === undefined || row.supportsEffort === false)
|
|
90
|
+
return { levels: [] };
|
|
91
|
+
// Known rows without a tier list use the CLI-standard compatibility
|
|
92
|
+
// ladder; unknown rows offer nothing. Preview and live controls agree.
|
|
93
|
+
const declared = row.supportedEffortLevels;
|
|
94
|
+
const fallback = declared === undefined || declared.length === 0;
|
|
95
|
+
return {
|
|
96
|
+
levels: (fallback ? EFFORT_FALLBACK_TIERS : declared).map(level => ({ id: level, label: effortLabel(level) })),
|
|
97
|
+
...(fallback ? { levelsFallback: true } : {}),
|
|
98
|
+
};
|
|
99
|
+
};
|
|
88
100
|
/** Check the remembered effort against what a model declares. It is
|
|
89
101
|
* cleared only on an explicit refusal: `supportsEffort === false`, or a
|
|
90
102
|
* declared level list without the tier. A row that declares neither
|
|
@@ -157,7 +169,7 @@ export function createClaudeControls(deps) {
|
|
|
157
169
|
async set(ref) {
|
|
158
170
|
const row = rowOf(models, ref.model) ?? rowOf(await refreshModels(), ref.model);
|
|
159
171
|
if (row === undefined)
|
|
160
|
-
return { kind: 'refused', reason:
|
|
172
|
+
return { kind: 'refused', reason: claudeText('claude-model-unknown', { model: ref.model }) };
|
|
161
173
|
// In place (no fork): the CLI applies it from the next request on.
|
|
162
174
|
await deps.query().setModel(row.value);
|
|
163
175
|
deps.prefs.write({ model: row.value });
|
|
@@ -170,32 +182,12 @@ export function createClaudeControls(deps) {
|
|
|
170
182
|
},
|
|
171
183
|
effort: {
|
|
172
184
|
get levelsFallback() {
|
|
173
|
-
|
|
174
|
-
if (row === undefined)
|
|
175
|
-
return undefined;
|
|
176
|
-
const declared = row.supportedEffortLevels;
|
|
177
|
-
if (row.supportsEffort === false || (declared !== undefined && declared.length > 0))
|
|
178
|
-
return undefined;
|
|
179
|
-
return true;
|
|
185
|
+
return effortsFor(currentRow()).levelsFallback;
|
|
180
186
|
},
|
|
181
187
|
levels() {
|
|
182
|
-
|
|
183
|
-
// An unknown model (no catalog row at all — the cold start before the
|
|
184
|
-
// handshake seeds one) offers nothing: nothing is guessed for a model
|
|
185
|
-
// the catalog does not know (the lifecycle contract).
|
|
186
|
-
if (row === undefined)
|
|
187
|
-
return [];
|
|
188
|
-
if (row.supportsEffort === false)
|
|
189
|
-
return [];
|
|
190
|
-
// A known row that declares no list of its own (relay custom rows,
|
|
191
|
-
// the offline Haiku shape, old CLIs) falls back to the CLI's standard
|
|
192
|
-
// tiers — the CLI accepts any effortLevel flag, so the standard
|
|
193
|
-
// ladder is the honest compatibility offer, marked above for the
|
|
194
|
-
// picker to say so.
|
|
195
|
-
const declared = row.supportedEffortLevels;
|
|
196
|
-
const tiers = declared !== undefined && declared.length > 0 ? declared : EFFORT_FALLBACK_TIERS;
|
|
197
|
-
return tiers.map(level => ({ id: level, label: effortLabel(level) }));
|
|
188
|
+
return effortsFor(currentRow()).levels;
|
|
198
189
|
},
|
|
190
|
+
forModel: (ref) => effortsFor(rowOf(models, ref.model)),
|
|
199
191
|
current: () => effort,
|
|
200
192
|
async set(id) {
|
|
201
193
|
// `null` resets to the model's default level (applyFlagSettings
|
|
@@ -389,12 +381,12 @@ export function createClaudeControls(deps) {
|
|
|
389
381
|
/** The localized label of a backend-native permission mode. */
|
|
390
382
|
export function modeLabel(id) {
|
|
391
383
|
switch (id) {
|
|
392
|
-
case 'default': return
|
|
393
|
-
case 'acceptEdits': return
|
|
394
|
-
case 'plan': return
|
|
395
|
-
case 'auto': return
|
|
396
|
-
case 'dontAsk': return
|
|
397
|
-
case 'bypassPermissions': return
|
|
384
|
+
case 'default': return claudeText('claude-mode-default');
|
|
385
|
+
case 'acceptEdits': return claudeText('claude-mode-acceptEdits');
|
|
386
|
+
case 'plan': return claudeText('claude-mode-plan');
|
|
387
|
+
case 'auto': return claudeText('claude-mode-auto');
|
|
388
|
+
case 'dontAsk': return claudeText('claude-mode-dontAsk');
|
|
389
|
+
case 'bypassPermissions': return claudeText('claude-mode-bypassPermissions');
|
|
398
390
|
default: return id;
|
|
399
391
|
}
|
|
400
392
|
}
|
|
@@ -403,23 +395,23 @@ export function modeLabel(id) {
|
|
|
403
395
|
* label). Unknown ids have none. */
|
|
404
396
|
export function modeDescription(id) {
|
|
405
397
|
switch (id) {
|
|
406
|
-
case 'default': return
|
|
407
|
-
case 'acceptEdits': return
|
|
408
|
-
case 'plan': return
|
|
409
|
-
case 'auto': return
|
|
410
|
-
case 'dontAsk': return
|
|
411
|
-
case 'bypassPermissions': return
|
|
398
|
+
case 'default': return claudeText('claude-mode-desc-default');
|
|
399
|
+
case 'acceptEdits': return claudeText('claude-mode-desc-acceptEdits');
|
|
400
|
+
case 'plan': return claudeText('claude-mode-desc-plan');
|
|
401
|
+
case 'auto': return claudeText('claude-mode-desc-auto');
|
|
402
|
+
case 'dontAsk': return claudeText('claude-mode-desc-dontAsk');
|
|
403
|
+
case 'bypassPermissions': return claudeText('claude-mode-desc-bypassPermissions');
|
|
412
404
|
default: return undefined;
|
|
413
405
|
}
|
|
414
406
|
}
|
|
415
407
|
/** The localized label of an effort level. */
|
|
416
408
|
export function effortLabel(id) {
|
|
417
409
|
switch (id) {
|
|
418
|
-
case 'low': return
|
|
419
|
-
case 'medium': return
|
|
420
|
-
case 'high': return
|
|
421
|
-
case 'xhigh': return
|
|
422
|
-
case 'max': return
|
|
410
|
+
case 'low': return claudeText('claude-effort-low');
|
|
411
|
+
case 'medium': return claudeText('claude-effort-medium');
|
|
412
|
+
case 'high': return claudeText('claude-effort-high');
|
|
413
|
+
case 'xhigh': return claudeText('claude-effort-xhigh');
|
|
414
|
+
case 'max': return claudeText('claude-effort-max');
|
|
423
415
|
default: return id;
|
|
424
416
|
}
|
|
425
417
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* session's `questions` capability, and settles into the shape the SDK
|
|
7
7
|
* expects:
|
|
8
8
|
*
|
|
9
|
-
* - form elicitation: the shared form flow (`src/
|
|
9
|
+
* - form elicitation: the shared form flow (`src/backends/shared/elicitation.ts`:
|
|
10
10
|
* one question per field of the requested JSON schema, validated against
|
|
11
11
|
* the field's constraints, invalid answers asked again, optional fields
|
|
12
12
|
* skippable, a last question that sends or declines) settles as
|
|
@@ -32,9 +32,15 @@
|
|
|
32
32
|
import type { OnElicitation, OnUserDialog } from '@anthropic-ai/claude-agent-sdk';
|
|
33
33
|
import type { QuestionAnswers } from '../../agent/capabilities.js';
|
|
34
34
|
import type { AgentEvent } from '../../agent/events.js';
|
|
35
|
+
import { type ElicitationValue, type FormField } from '../shared/elicitation.js';
|
|
35
36
|
/** The dialog kinds this client renders (`supportedDialogKinds`). */
|
|
36
37
|
export declare const SUPPORTED_DIALOG_KINDS: readonly string[];
|
|
37
|
-
export { formFields,
|
|
38
|
+
export { formFields, serverHeader, type ElicitationValue, type FormField } from '../shared/elicitation.js';
|
|
39
|
+
export declare const parseFieldText: (field: FormField, text: string) => {
|
|
40
|
+
readonly value: ElicitationValue;
|
|
41
|
+
} | {
|
|
42
|
+
readonly error: string;
|
|
43
|
+
};
|
|
38
44
|
export interface ClaudeDialogBridgeDeps {
|
|
39
45
|
/** Deliver events to the channel (buffered until it subscribes). */
|
|
40
46
|
emit(events: readonly AgentEvent[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogs.d.ts","sourceRoot":"","sources":["../../../../src/backends/claude/dialogs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAyC,aAAa,EAAE,YAAY,EAAuC,MAAM,gCAAgC,CAAA;AAC7J,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"dialogs.d.ts","sourceRoot":"","sources":["../../../../src/backends/claude/dialogs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAyC,aAAa,EAAE,YAAY,EAAuC,MAAM,gCAAgC,CAAA;AAC7J,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,uBAAuB,CAAA;AACzE,OAAO,EAAoG,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAIlL,qEAAqE;AACrE,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAAgC,CAAA;AAOpF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAC1G,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,EAAE,MAAM,MAAM,KAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAC7E,CAAA;AA6BlD,MAAM,WAAW,sBAAsB;IACrC,oEAAoE;IACpE,IAAI,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,IAAI,CAAA;IACzC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,0DAA0D;IAC1D,eAAe,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC,gEAAgE;IAChE,OAAO,IAAI,OAAO,CAAA;CACnB;AAED,yCAAyC;AACzC,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,sBAAsB;;;IAgNjE,gFAAgF;kBAClE,MAAM,KAAG,OAAO;mBACf,MAAM,WAAW,eAAe,GAAG,IAAI;kBAGxC,MAAM,GAAG,IAAI;IAG3B,oEAAoE;qBACnD,MAAM,iBAAiB,MAAM,GAAG,IAAI;mBAOzC,MAAM;IAClB,qEAAqE;iBACxD,IAAI;EAIpB;AAED,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|