@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
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Intrinsic image dimensions from the encoded bytes alone — no decode, no
|
|
3
|
+
* dependencies. Backend-neutral (D15): the composer's staging gate
|
|
4
|
+
* (`src/utils/imageResize.ts`, which adds the sharp-backed re-encode on top)
|
|
5
|
+
* and the backends that admit pasted images both measure with this, and a
|
|
6
|
+
* backend must not reach into `src/utils/` (B-3's boundary rule). The sharp
|
|
7
|
+
* dependency stays on the host side, so this module is a pure leaf.
|
|
8
|
+
*
|
|
9
|
+
* Formats the probe cannot identify return null and MUST be forced through
|
|
10
|
+
* an actual decode for measurement — never read as "small enough".
|
|
11
|
+
*/
|
|
12
|
+
/** Pixel dimensions read from an encoded image's header. */
|
|
13
|
+
export interface ImageSizeProbe {
|
|
14
|
+
readonly width: number;
|
|
15
|
+
readonly height: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The image media type the encoded bytes actually are, from the magic
|
|
19
|
+
* bytes alone (the same signatures {@link probeImageSize} dispatches on):
|
|
20
|
+
* PNG, JPEG, WebP (RIFF/WEBP) or GIF; anything else is undefined and the
|
|
21
|
+
* caller keeps its own label (those bytes take the decode-or-refuse path
|
|
22
|
+
* anyway). Used to keep a renamed file from travelling under a label its
|
|
23
|
+
* content contradicts.
|
|
24
|
+
*/
|
|
25
|
+
export declare function sniffImageMediaType(bytes: Uint8Array): 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Measure intrinsic pixel dimensions from the encoded bytes alone — no
|
|
28
|
+
* decode, no dependencies. Recognizes PNG / JPEG / WebP (VP8X, VP8,
|
|
29
|
+
* VP8L) / GIF; anything else returns null, which callers MUST treat as
|
|
30
|
+
* "unknown, force a real decode" — never as "small enough".
|
|
31
|
+
*/
|
|
32
|
+
export declare function probeImageSize(bytes: Uint8Array): ImageSizeProbe | null;
|
|
33
|
+
//# sourceMappingURL=image-size.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-size.d.ts","sourceRoot":"","sources":["../../../../src/backends/shared/image-size.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,4DAA4D;AAC5D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAiFD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAO1H;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,cAAc,GAAG,IAAI,CAevE"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Intrinsic image dimensions from the encoded bytes alone — no decode, no
|
|
3
|
+
* dependencies. Backend-neutral (D15): the composer's staging gate
|
|
4
|
+
* (`src/utils/imageResize.ts`, which adds the sharp-backed re-encode on top)
|
|
5
|
+
* and the backends that admit pasted images both measure with this, and a
|
|
6
|
+
* backend must not reach into `src/utils/` (B-3's boundary rule). The sharp
|
|
7
|
+
* dependency stays on the host side, so this module is a pure leaf.
|
|
8
|
+
*
|
|
9
|
+
* Formats the probe cannot identify return null and MUST be forced through
|
|
10
|
+
* an actual decode for measurement — never read as "small enough".
|
|
11
|
+
*/
|
|
12
|
+
const PNG_SIGNATURE = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];
|
|
13
|
+
function probePng(b) {
|
|
14
|
+
// IHDR is required to be the first chunk: width/height are big-endian
|
|
15
|
+
// u32 at fixed offsets 16/20.
|
|
16
|
+
if (b.length < 24)
|
|
17
|
+
return null;
|
|
18
|
+
const width = (b[16] << 24) | (b[17] << 16) | (b[18] << 8) | b[19];
|
|
19
|
+
const height = (b[20] << 24) | (b[21] << 16) | (b[22] << 8) | b[23];
|
|
20
|
+
return width > 0 && height > 0 ? { width, height } : null;
|
|
21
|
+
}
|
|
22
|
+
function probeJpeg(b) {
|
|
23
|
+
// Walk the segment chain to the first SOF marker (C0–CF except C4 DHT,
|
|
24
|
+
// C8 JPG, CC DAC); height/width are big-endian u16 at +5/+7 inside it.
|
|
25
|
+
if (b.length < 4 || b[0] !== 0xff || b[1] !== 0xd8)
|
|
26
|
+
return null;
|
|
27
|
+
let i = 2;
|
|
28
|
+
while (i + 9 < b.length) {
|
|
29
|
+
if (b[i] !== 0xff)
|
|
30
|
+
return null;
|
|
31
|
+
const marker = b[i + 1];
|
|
32
|
+
if (marker === 0xd8 || (marker >= 0xd0 && marker <= 0xd9)) {
|
|
33
|
+
i += 2; // standalone markers carry no length
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
const segLen = (b[i + 2] << 8) | b[i + 3];
|
|
37
|
+
if (segLen < 2)
|
|
38
|
+
return null;
|
|
39
|
+
const isSof = marker >= 0xc0 && marker <= 0xcf
|
|
40
|
+
&& marker !== 0xc4 && marker !== 0xc8 && marker !== 0xcc;
|
|
41
|
+
if (isSof) {
|
|
42
|
+
const height = (b[i + 5] << 8) | b[i + 6];
|
|
43
|
+
const width = (b[i + 7] << 8) | b[i + 8];
|
|
44
|
+
return width > 0 && height > 0 ? { width, height } : null;
|
|
45
|
+
}
|
|
46
|
+
i += 2 + segLen;
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
function probeWebp(b) {
|
|
51
|
+
// RIFF....WEBP followed by VP8X (extended) or VP8 (lossy) or VP8L
|
|
52
|
+
// (lossless). VP8X carries the canvas size as 1-subtracted 24-bit LE;
|
|
53
|
+
// VP8 carries u16 LE after the frame tag; VP8L packs 14-bit
|
|
54
|
+
// 1-subtracted fields after the signature byte.
|
|
55
|
+
if (b.length < 30)
|
|
56
|
+
return null;
|
|
57
|
+
if (b[0] !== 0x52 || b[1] !== 0x49 || b[2] !== 0x46 || b[3] !== 0x46)
|
|
58
|
+
return null;
|
|
59
|
+
if (b[8] !== 0x57 || b[9] !== 0x45 || b[10] !== 0x42 || b[11] !== 0x50)
|
|
60
|
+
return null;
|
|
61
|
+
const fourcc = String.fromCharCode(b[12], b[13], b[14], b[15]);
|
|
62
|
+
if (fourcc === 'VP8X') {
|
|
63
|
+
const width = 1 + ((b[24] | (b[25] << 8) | (b[26] << 16)) & 0xffffff);
|
|
64
|
+
const height = 1 + ((b[27] | (b[28] << 8) | (b[29] << 16)) & 0xffffff);
|
|
65
|
+
return { width, height };
|
|
66
|
+
}
|
|
67
|
+
if (fourcc === 'VP8 ') {
|
|
68
|
+
// Uncompressed chunk header (10 bytes) then keyframe tag (3) then the
|
|
69
|
+
// dimensions: 14-bit width/height in the low bits of each u16, with a
|
|
70
|
+
// 2-bit horizontal/vertical scale in the top bits (RFC 6386 §9.1). Mask
|
|
71
|
+
// them off, or an encoder that sets the scale bits is measured up to
|
|
72
|
+
// 49152px too wide and gets shrunk far past the caps.
|
|
73
|
+
const width = (b[26] | (b[27] << 8)) & 0x3fff;
|
|
74
|
+
const height = (b[28] | (b[29] << 8)) & 0x3fff;
|
|
75
|
+
return width > 0 && height > 0 ? { width, height } : null;
|
|
76
|
+
}
|
|
77
|
+
if (fourcc === 'VP8L') {
|
|
78
|
+
const bits = (b[21] | (b[22] << 8) | (b[23] << 16) | (b[24] << 24)) >>> 0;
|
|
79
|
+
const width = (bits & 0x3fff) + 1;
|
|
80
|
+
const height = ((bits >> 14) & 0x3fff) + 1;
|
|
81
|
+
return { width, height };
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
function probeGif(b) {
|
|
86
|
+
// Logical screen descriptor: u16 LE at fixed offsets 6/8. A truncated header
|
|
87
|
+
// reads as 0×0 and would then look "inside the caps", so the zero check is
|
|
88
|
+
// what keeps an unmeasurable file on the decode path.
|
|
89
|
+
const width = b[6] | (b[7] << 8);
|
|
90
|
+
const height = b[8] | (b[9] << 8);
|
|
91
|
+
return width > 0 && height > 0 ? { width, height } : null;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The image media type the encoded bytes actually are, from the magic
|
|
95
|
+
* bytes alone (the same signatures {@link probeImageSize} dispatches on):
|
|
96
|
+
* PNG, JPEG, WebP (RIFF/WEBP) or GIF; anything else is undefined and the
|
|
97
|
+
* caller keeps its own label (those bytes take the decode-or-refuse path
|
|
98
|
+
* anyway). Used to keep a renamed file from travelling under a label its
|
|
99
|
+
* content contradicts.
|
|
100
|
+
*/
|
|
101
|
+
export function sniffImageMediaType(bytes) {
|
|
102
|
+
if (bytes.length >= 8 && PNG_SIGNATURE.every((v, i) => bytes[i] === v))
|
|
103
|
+
return 'image/png';
|
|
104
|
+
if (bytes.length >= 2 && bytes[0] === 0xff && bytes[1] === 0xd8)
|
|
105
|
+
return 'image/jpeg';
|
|
106
|
+
if (bytes.length >= 12 && bytes[0] === 0x52 && bytes[1] === 0x49 && bytes[2] === 0x46 && bytes[3] === 0x46
|
|
107
|
+
&& bytes[8] === 0x57 && bytes[9] === 0x45 && bytes[10] === 0x42 && bytes[11] === 0x50)
|
|
108
|
+
return 'image/webp';
|
|
109
|
+
if (bytes.length >= 4 && bytes[0] === 0x47 && bytes[1] === 0x49 && bytes[2] === 0x46 && bytes[3] === 0x38)
|
|
110
|
+
return 'image/gif';
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Measure intrinsic pixel dimensions from the encoded bytes alone — no
|
|
115
|
+
* decode, no dependencies. Recognizes PNG / JPEG / WebP (VP8X, VP8,
|
|
116
|
+
* VP8L) / GIF; anything else returns null, which callers MUST treat as
|
|
117
|
+
* "unknown, force a real decode" — never as "small enough".
|
|
118
|
+
*/
|
|
119
|
+
export function probeImageSize(bytes) {
|
|
120
|
+
if (bytes.length >= 8 && PNG_SIGNATURE.every((v, i) => bytes[i] === v)) {
|
|
121
|
+
return probePng(bytes);
|
|
122
|
+
}
|
|
123
|
+
if (bytes.length >= 2 && bytes[0] === 0xff && bytes[1] === 0xd8) {
|
|
124
|
+
return probeJpeg(bytes);
|
|
125
|
+
}
|
|
126
|
+
if (bytes.length >= 30 && bytes[0] === 0x52 && bytes[8] === 0x57) {
|
|
127
|
+
return probeWebp(bytes);
|
|
128
|
+
}
|
|
129
|
+
if (bytes.length >= 10
|
|
130
|
+
&& bytes[0] === 0x47 && bytes[1] === 0x49 && bytes[2] === 0x46 && bytes[3] === 0x38) {
|
|
131
|
+
return probeGif(bytes);
|
|
132
|
+
}
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* file. Legal JSON that is not a record (`null`, scalars, arrays) is skipped
|
|
4
4
|
* silently since it is well-formed, just not a row; text that fails to parse
|
|
5
5
|
* is counted, so a truncated or corrupted source can be reported.
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
|
+
* Backend-neutral (D15): the migration sources (via
|
|
8
|
+
* `src/dsh-adapter/migrate/parse/jsonl.ts`) and the Claude backend's
|
|
9
|
+
* transcript reader both read JSONL, and a backend must not reach into
|
|
10
|
+
* `src/utils/` (B-3's boundary rule). Pure, zero imports.
|
|
7
11
|
*/
|
|
8
12
|
/** A decoded JSON object row. */
|
|
9
13
|
export type JsonRecord = Record<string, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonl.d.ts","sourceRoot":"","sources":["../../../../src/backends/shared/jsonl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,iCAAiC;AACjC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEhD,oFAAoF;AACpF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAE5D;AAED,yCAAyC;AACzC,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;IACvC,gDAAgD;IAChD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAgBjD"}
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* file. Legal JSON that is not a record (`null`, scalars, arrays) is skipped
|
|
4
4
|
* silently since it is well-formed, just not a row; text that fails to parse
|
|
5
5
|
* is counted, so a truncated or corrupted source can be reported.
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
|
+
* Backend-neutral (D15): the migration sources (via
|
|
8
|
+
* `src/dsh-adapter/migrate/parse/jsonl.ts`) and the Claude backend's
|
|
9
|
+
* transcript reader both read JSONL, and a backend must not reach into
|
|
10
|
+
* `src/utils/` (B-3's boundary rule). Pure, zero imports.
|
|
7
11
|
*/
|
|
8
12
|
/** Narrow an unknown JSON value to an object record (rejects `null` and arrays). */
|
|
9
13
|
export function isRecord(value) {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two rules a backend's own copy needs, in one place (D15).
|
|
3
|
+
*
|
|
4
|
+
* A backend writes its user-facing strings itself (D2: the host dictionary is
|
|
5
|
+
* not readable from a backend), in the shape `src/i18n.ts` uses —
|
|
6
|
+
* `{{name}}` placeholders and, where a language marks number, a `one`/`other`
|
|
7
|
+
* pair selected on the `count` parameter. The *mechanism* is shared so two
|
|
8
|
+
* backends cannot disagree about what `{{name}}` or `count` means; the
|
|
9
|
+
* *dictionary* stays with each backend.
|
|
10
|
+
*/
|
|
11
|
+
import type { BackendLocale } from '../../agent/backend.js';
|
|
12
|
+
/** One string in the languages the TUI ships: a plain template, or the
|
|
13
|
+
* `one`/`other` plural forms selected on the `count` parameter. */
|
|
14
|
+
export type LocalizedText = string | {
|
|
15
|
+
readonly one: string;
|
|
16
|
+
readonly other: string;
|
|
17
|
+
};
|
|
18
|
+
/** Values substituted into a template (`{{name}}`). */
|
|
19
|
+
export type TextParams = Readonly<Record<string, string | number>>;
|
|
20
|
+
/** Substitute `{{name}}` with the values of this call; a name the caller did
|
|
21
|
+
* not supply is left verbatim, so a typo stays visible on screen instead of
|
|
22
|
+
* turning into a blank (the rule `t()` applies). */
|
|
23
|
+
export declare function fillTemplate(template: string, params: TextParams): string;
|
|
24
|
+
/**
|
|
25
|
+
* The text of one entry in `locale`, with the `count` parameter choosing the
|
|
26
|
+
* plural form (a non-finite or absent `count` reads as 0, i.e. `other`).
|
|
27
|
+
* Undefined when the entry has no text in that language.
|
|
28
|
+
*/
|
|
29
|
+
export declare function pickLocalizedText(text: LocalizedText | undefined, locale: BackendLocale, params: TextParams): string | undefined;
|
|
30
|
+
//# sourceMappingURL=localized-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localized-text.d.ts","sourceRoot":"","sources":["../../../../src/backends/shared/localized-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAE3D;oEACoE;AACpE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAErF,uDAAuD;AACvD,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAA;AAElE;;qDAEqD;AACrD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,MAAM,CAIzE;AASD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAKhI"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Substitute `{{name}}` with the values of this call; a name the caller did
|
|
2
|
+
* not supply is left verbatim, so a typo stays visible on screen instead of
|
|
3
|
+
* turning into a blank (the rule `t()` applies). */
|
|
4
|
+
export function fillTemplate(template, params) {
|
|
5
|
+
return template.replace(/\{\{(\w+)\}\}/g, (match, name) => name in params ? String(params[name]) : match);
|
|
6
|
+
}
|
|
7
|
+
// CLDR-backed and built into Node: zh always selects `other` (the language has
|
|
8
|
+
// no grammatical number), en selects `one` exactly at 1.
|
|
9
|
+
const pluralRules = {
|
|
10
|
+
zh: new Intl.PluralRules('zh'),
|
|
11
|
+
en: new Intl.PluralRules('en'),
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The text of one entry in `locale`, with the `count` parameter choosing the
|
|
15
|
+
* plural form (a non-finite or absent `count` reads as 0, i.e. `other`).
|
|
16
|
+
* Undefined when the entry has no text in that language.
|
|
17
|
+
*/
|
|
18
|
+
export function pickLocalizedText(text, locale, params) {
|
|
19
|
+
if (text === undefined || typeof text === 'string')
|
|
20
|
+
return text;
|
|
21
|
+
const count = Number(params.count);
|
|
22
|
+
const category = pluralRules[locale].select(Number.isFinite(count) ? count : 0);
|
|
23
|
+
return category === 'one' ? text.one : text.other;
|
|
24
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The platform copy the host UI and the built-in backends both render, as one
|
|
3
|
+
* source (C-2): the status line's rate-limit window, /doctor, /rename, rewind
|
|
4
|
+
* and the names of the tool cards a backend shares with the host's own cards.
|
|
5
|
+
*
|
|
6
|
+
* Why a shared *source* rather than a shared dictionary: the host dictionary
|
|
7
|
+
* (`src/i18n.ts`) is not readable from a backend (D2), so each of these strings
|
|
8
|
+
* used to be copied byte for byte into a backend's own text module as well —
|
|
9
|
+
* two copies of one string, with nothing keeping them equal. The values now
|
|
10
|
+
* come from here; each side still carries the entry in its own dictionary and
|
|
11
|
+
* renders it the way it always did. `scripts/verify-i18n.ts` compares the host
|
|
12
|
+
* dictionary and both backend dictionaries against this file verbatim, so a
|
|
13
|
+
* copy that drifts — or an inline one written back over the spread — turns
|
|
14
|
+
* that gate red.
|
|
15
|
+
*
|
|
16
|
+
* D2 is unchanged: a third-party contribution must not be able to speak with
|
|
17
|
+
* the host's words. The layers a contribution occupies
|
|
18
|
+
* (`src/{screens,components,hooks,ink}/**`, `src/channel/**`) are kept out of
|
|
19
|
+
* `src/backends/**` by `scripts/verify-adapter-boundary.ts`, so this file is
|
|
20
|
+
* read only by the host dictionary and the two in-tree backends — never by a
|
|
21
|
+
* plugin. The seam itself may not read the host dictionary either (same gate),
|
|
22
|
+
* which is what keeps this route one-way.
|
|
23
|
+
*/
|
|
24
|
+
import type { LocalizedText } from './localized-text.js';
|
|
25
|
+
/** One platform string in the languages the TUI ships. */
|
|
26
|
+
export interface PlatformTextEntry {
|
|
27
|
+
readonly zh: LocalizedText;
|
|
28
|
+
readonly en: LocalizedText;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The shared platform copy. The keys are the union of what the claude and
|
|
32
|
+
* codex text modules render on a platform surface; the host dictionary spreads
|
|
33
|
+
* this object in, so its `keyof` stays a literal union and `t()` keeps its
|
|
34
|
+
* type safety — do not widen this declaration with a `Record<string, …>`
|
|
35
|
+
* annotation, which would collapse that union to `string`.
|
|
36
|
+
*/
|
|
37
|
+
export declare const PLATFORM_TEXT: Readonly<{
|
|
38
|
+
'capability-failed': Readonly<{
|
|
39
|
+
zh: "{{name}} 失败 · {{err}}";
|
|
40
|
+
en: "{{name}} failed · {{err}}";
|
|
41
|
+
}>;
|
|
42
|
+
'status-rate-limit-five-hour': Readonly<{
|
|
43
|
+
zh: "5小时";
|
|
44
|
+
en: "5h";
|
|
45
|
+
}>;
|
|
46
|
+
'status-rate-limit-seven-day': Readonly<{
|
|
47
|
+
zh: "7天";
|
|
48
|
+
en: "7d";
|
|
49
|
+
}>;
|
|
50
|
+
'doctor-unknown': Readonly<{
|
|
51
|
+
zh: "未知";
|
|
52
|
+
en: "unknown";
|
|
53
|
+
}>;
|
|
54
|
+
'effort-invalid': Readonly<{
|
|
55
|
+
zh: "未知推理等级 {{id}}(当前模型可选:{{ids}})";
|
|
56
|
+
en: "Unknown reasoning effort {{id}} (this model offers: {{ids}})";
|
|
57
|
+
}>;
|
|
58
|
+
'tool-name-bash': Readonly<{
|
|
59
|
+
zh: "Bash";
|
|
60
|
+
en: "Bash";
|
|
61
|
+
}>;
|
|
62
|
+
'tool-name-edit': Readonly<{
|
|
63
|
+
zh: "编辑";
|
|
64
|
+
en: "Edit";
|
|
65
|
+
}>;
|
|
66
|
+
'rewind-first-message': Readonly<{
|
|
67
|
+
zh: "不能回退到第一条消息之前";
|
|
68
|
+
en: "Cannot rewind past the very first message";
|
|
69
|
+
}>;
|
|
70
|
+
'rename-failed': Readonly<{
|
|
71
|
+
zh: "重命名失败 · {{err}}";
|
|
72
|
+
en: "Rename failed · {{err}}";
|
|
73
|
+
}>;
|
|
74
|
+
'rename-usage': Readonly<{
|
|
75
|
+
zh: "用法 /rename <新名称>";
|
|
76
|
+
en: "Usage /rename <new title>";
|
|
77
|
+
}>;
|
|
78
|
+
}>;
|
|
79
|
+
/** A key of {@link PLATFORM_TEXT}; a typo is a compile error. */
|
|
80
|
+
export type PlatformTextKey = keyof typeof PLATFORM_TEXT;
|
|
81
|
+
/**
|
|
82
|
+
* The frozen subset of {@link PLATFORM_TEXT} holding exactly `keys` — the
|
|
83
|
+
* platform strings this backend renders, and nothing else. `K` is constrained
|
|
84
|
+
* to {@link PlatformTextKey}, so a mistyped key is a compile error rather than
|
|
85
|
+
* a string that silently disappears from the screen.
|
|
86
|
+
*/
|
|
87
|
+
export declare function pickPlatformText<K extends PlatformTextKey>(keys: readonly K[]): Readonly<Pick<typeof PLATFORM_TEXT, K>>;
|
|
88
|
+
//# sourceMappingURL=platform-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-text.d.ts","sourceRoot":"","sources":["../../../../src/backends/shared/platform-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,0DAA0D;AAC1D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,aAAa,CAAA;IAC1B,QAAQ,CAAC,EAAE,EAAE,aAAa,CAAA;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWoB,CAAA;AAE9C,iEAAiE;AACjE,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,aAAa,CAAA;AAKxD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,eAAe,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,aAAa,EAAE,CAAC,CAAC,CAAC,CAMvH"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared platform copy. The keys are the union of what the claude and
|
|
3
|
+
* codex text modules render on a platform surface; the host dictionary spreads
|
|
4
|
+
* this object in, so its `keyof` stays a literal union and `t()` keeps its
|
|
5
|
+
* type safety — do not widen this declaration with a `Record<string, …>`
|
|
6
|
+
* annotation, which would collapse that union to `string`.
|
|
7
|
+
*/
|
|
8
|
+
export const PLATFORM_TEXT = Object.freeze({
|
|
9
|
+
'capability-failed': Object.freeze({ zh: '{{name}} 失败 · {{err}}', en: '{{name}} failed · {{err}}' }),
|
|
10
|
+
'status-rate-limit-five-hour': Object.freeze({ zh: '5小时', en: '5h' }),
|
|
11
|
+
'status-rate-limit-seven-day': Object.freeze({ zh: '7天', en: '7d' }),
|
|
12
|
+
'doctor-unknown': Object.freeze({ zh: '未知', en: 'unknown' }),
|
|
13
|
+
'effort-invalid': Object.freeze({ zh: '未知推理等级 {{id}}(当前模型可选:{{ids}})', en: 'Unknown reasoning effort {{id}} (this model offers: {{ids}})' }),
|
|
14
|
+
'tool-name-bash': Object.freeze({ zh: 'Bash', en: 'Bash' }),
|
|
15
|
+
'tool-name-edit': Object.freeze({ zh: '编辑', en: 'Edit' }),
|
|
16
|
+
'rewind-first-message': Object.freeze({ zh: '不能回退到第一条消息之前', en: 'Cannot rewind past the very first message' }),
|
|
17
|
+
'rename-failed': Object.freeze({ zh: '重命名失败 · {{err}}', en: 'Rename failed · {{err}}' }),
|
|
18
|
+
'rename-usage': Object.freeze({ zh: '用法 /rename <新名称>', en: 'Usage /rename <new title>' }),
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* The frozen subset of {@link PLATFORM_TEXT} holding exactly `keys` — the
|
|
22
|
+
* platform strings this backend renders, and nothing else. `K` is constrained
|
|
23
|
+
* to {@link PlatformTextKey}, so a mistyped key is a compile error rather than
|
|
24
|
+
* a string that silently disappears from the screen.
|
|
25
|
+
*/
|
|
26
|
+
export function pickPlatformText(keys) {
|
|
27
|
+
const picked = {};
|
|
28
|
+
for (const key of keys)
|
|
29
|
+
picked[key] = PLATFORM_TEXT[key];
|
|
30
|
+
// The loop fills exactly `keys`; a mapped type cannot express that, so the
|
|
31
|
+
// assertion is the one step TypeScript cannot check here.
|
|
32
|
+
return Object.freeze(picked);
|
|
33
|
+
}
|
package/lib/types/branding.d.ts
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
export type Brand = 'deepseek' | 'claude' | 'codex';
|
|
24
24
|
export type { BrandSetting } from './adapter/ports/channel-display.js';
|
|
25
25
|
import type { BrandSetting } from './adapter/ports/channel-display.js';
|
|
26
|
+
import type { ThemeName } from './theme.js';
|
|
26
27
|
/** 设置项的合法值表(注册与归一化共用一份)。 */
|
|
27
28
|
export declare const BRAND_SETTING_VALUES: readonly BrandSetting[];
|
|
28
29
|
/**
|
|
@@ -69,6 +70,18 @@ export declare const BRAND_THEMES: Readonly<Partial<Record<Brand, {
|
|
|
69
70
|
readonly dark: string;
|
|
70
71
|
readonly light: string;
|
|
71
72
|
}>>>;
|
|
73
|
+
/**
|
|
74
|
+
* 品牌默认档的落位:浅色档 → 该品牌主题对的浅色版,深色档 → 深色版;`deepseek`
|
|
75
|
+
* 没有品牌主题对(用系统默认 light/dark),返回 `undefined`,调用方沿用解析档。
|
|
76
|
+
*
|
|
77
|
+
* 判据是**解析后色板的明暗**(`isLightThemeActive`),不是主题名的字面量:浅色
|
|
78
|
+
* 内置名不止 `light` 一个(`pink-day`、`claude-paper`、`codex-paper`),自定义与
|
|
79
|
+
* 运行时主题更是任意名字——只认 `'light'` 会让持久化选了 `pink-day` 的用户在品牌
|
|
80
|
+
* 后端下看到深色版。
|
|
81
|
+
* @param brand - 当前品牌档(`resolveBrand` 的结果)。
|
|
82
|
+
* @param themeName - 品牌覆盖前的解析档(ThemeProvider 的 `active`,含 `auto`)。
|
|
83
|
+
*/
|
|
84
|
+
export declare function brandThemeFor(brand: Brand, themeName: ThemeName): string | undefined;
|
|
72
85
|
/** 开屏欢迎语(品牌档;deepseek 沿用 i18n 的 `logo-tagline`)。英文两行以
|
|
73
86
|
* `\n` 分隔,渲染层按行拆开居中。 */
|
|
74
87
|
export declare const BRAND_TAGLINE: Readonly<Record<Brand, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branding.d.ts","sourceRoot":"","sources":["../../src/branding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,gFAAgF;AAChF,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAA;AAInD,YAAY,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AAEtE,4BAA4B;AAC5B,eAAO,MAAM,oBAAoB,EAAE,SAAS,YAAY,EAA4C,CAAA;AAEpG;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAIlE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,CAKpG;AAED,8BAA8B;AAC9B,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,oDAAoD;AACpD,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,g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Aa,CAAA;CAAE,CAGxF,CAAA;AAEF;8BAC8B;AAC9B,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAG3G,CAAA;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAIpF;AAED;yBACyB;AACzB,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,CAI9F,CAAA;AAEF,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,EAAE,SAAS;IAC3C,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,YAAY,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CAC/C,EAKA,CAAA;AAUD,uBAAuB;AACvB,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAIjD;AAED,gDAAgD;AAChD,wBAAgB,cAAc,IAAI,KAAK,CAEtC;AAED,2CAA2C;AAC3C,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAKrE"}
|
package/lib/types/branding.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* 实际上是 boot 时定死的;但读取仍走 `backendCapabilities`(在 ui-policy
|
|
20
20
|
* 的 reactive 清单里),未来进程内热切也不用改这里。
|
|
21
21
|
*/
|
|
22
|
+
import { isLightThemeActive } from './theme.js';
|
|
22
23
|
/** 设置项的合法值表(注册与归一化共用一份)。 */
|
|
23
24
|
export const BRAND_SETTING_VALUES = ['auto', 'deepseek', 'claude', 'codex'];
|
|
24
25
|
/**
|
|
@@ -76,6 +77,23 @@ export const BRAND_THEMES = Object.freeze({
|
|
|
76
77
|
claude: CLAUDE_BRAND_THEMES,
|
|
77
78
|
codex: CODEX_BRAND_THEMES,
|
|
78
79
|
});
|
|
80
|
+
/**
|
|
81
|
+
* 品牌默认档的落位:浅色档 → 该品牌主题对的浅色版,深色档 → 深色版;`deepseek`
|
|
82
|
+
* 没有品牌主题对(用系统默认 light/dark),返回 `undefined`,调用方沿用解析档。
|
|
83
|
+
*
|
|
84
|
+
* 判据是**解析后色板的明暗**(`isLightThemeActive`),不是主题名的字面量:浅色
|
|
85
|
+
* 内置名不止 `light` 一个(`pink-day`、`claude-paper`、`codex-paper`),自定义与
|
|
86
|
+
* 运行时主题更是任意名字——只认 `'light'` 会让持久化选了 `pink-day` 的用户在品牌
|
|
87
|
+
* 后端下看到深色版。
|
|
88
|
+
* @param brand - 当前品牌档(`resolveBrand` 的结果)。
|
|
89
|
+
* @param themeName - 品牌覆盖前的解析档(ThemeProvider 的 `active`,含 `auto`)。
|
|
90
|
+
*/
|
|
91
|
+
export function brandThemeFor(brand, themeName) {
|
|
92
|
+
const pair = BRAND_THEMES[brand];
|
|
93
|
+
if (pair === undefined)
|
|
94
|
+
return undefined;
|
|
95
|
+
return isLightThemeActive(themeName) ? pair.light : pair.dark;
|
|
96
|
+
}
|
|
79
97
|
/** 开屏欢迎语(品牌档;deepseek 沿用 i18n 的 `logo-tagline`)。英文两行以
|
|
80
98
|
* `\n` 分隔,渲染层按行拆开居中。 */
|
|
81
99
|
export const BRAND_TAGLINE = Object.freeze({
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* characters collapsed to `-`, edges trimmed. A name with no ASCII letter or
|
|
4
4
|
* digit (智谱, 硅基流动) gets `channel-<first 8 hex of its sha256>` instead,
|
|
5
5
|
* so two such names never share one id (nor the token ref derived from it).
|
|
6
|
-
* Shared by the /channel wizard and the
|
|
6
|
+
* Shared by the /channel wizard and the codex backend's channel store; the
|
|
7
|
+
* Claude backend keeps its own copy (`src/backends/shared/channel-slug.ts`),
|
|
8
|
+
* pinned to this one by the name vector in `verify-claude-channels.ts`.
|
|
7
9
|
*/
|
|
8
10
|
export declare function channelProfileSlug(name: string): string;
|
|
9
11
|
//# sourceMappingURL=channel-slug.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel-slug.d.ts","sourceRoot":"","sources":["../../../src/channel/channel-slug.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"channel-slug.d.ts","sourceRoot":"","sources":["../../../src/channel/channel-slug.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKvD"}
|
|
@@ -4,7 +4,9 @@ import { createHash } from 'node:crypto';
|
|
|
4
4
|
* characters collapsed to `-`, edges trimmed. A name with no ASCII letter or
|
|
5
5
|
* digit (智谱, 硅基流动) gets `channel-<first 8 hex of its sha256>` instead,
|
|
6
6
|
* so two such names never share one id (nor the token ref derived from it).
|
|
7
|
-
* Shared by the /channel wizard and the
|
|
7
|
+
* Shared by the /channel wizard and the codex backend's channel store; the
|
|
8
|
+
* Claude backend keeps its own copy (`src/backends/shared/channel-slug.ts`),
|
|
9
|
+
* pinned to this one by the name vector in `verify-claude-channels.ts`.
|
|
8
10
|
*/
|
|
9
11
|
export function channelProfileSlug(name) {
|
|
10
12
|
const trimmed = name.trim();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../../src/channel/projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,KAAK,EA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E,SAAS,UAAU,EAAE,QAAQ,cAAc,KAAG,IAAI;iBA2BvD,IAAI;2BArpCM,IAAI;6BAmDF,IAAI;;;;;;;;;;;EAioCnC;AAED,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
|
|
@@ -697,6 +697,16 @@ export function createChannelProjection(state, deps) {
|
|
|
697
697
|
}
|
|
698
698
|
return;
|
|
699
699
|
}
|
|
700
|
+
// A team member's message to this session: its own bubble, labelled with
|
|
701
|
+
// the sender, never the human's last prompt.
|
|
702
|
+
if (event.source === 'team-message') {
|
|
703
|
+
if (event.text === '')
|
|
704
|
+
return;
|
|
705
|
+
appendRow({ id: deps.rowIds.value, kind: 'user', label: 'team-message', text: event.text, ...(event.sender === undefined ? {} : { sender: event.sender }), seq: event.seq });
|
|
706
|
+
state.contextSegments.prompt += estimateTokens(textOfBlocks(event.blocks));
|
|
707
|
+
deps.rowIds.value += 1;
|
|
708
|
+
return;
|
|
709
|
+
}
|
|
700
710
|
// Injected context (plugin/skill/goal source) is not a human bubble;
|
|
701
711
|
// v1 renders direct human prompts only.
|
|
702
712
|
if (event.source !== 'user')
|
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
*/
|
|
17
17
|
/** Sanitize an already-string value for the render path. */
|
|
18
18
|
export declare function cleanRenderText(value: string, maxCells: number): string;
|
|
19
|
+
/**
|
|
20
|
+
* Sanitize untrusted plugin text destined for a MULTI-LINE block (a
|
|
21
|
+
* `pushLocal` report): the same per-line strip as {@link cleanRenderText},
|
|
22
|
+
* but newlines are structure here, not whitespace to fold. Blank rows are
|
|
23
|
+
* dropped so one reported line stays one transcript row.
|
|
24
|
+
*/
|
|
25
|
+
export declare function cleanBlockLines(value: string, maxCells: number): string[];
|
|
19
26
|
/**
|
|
20
27
|
* Sanitize an untrusted (possibly non-string) value. Non-scalars — objects,
|
|
21
28
|
* arrays, functions, symbols, null/undefined — yield '' so the caller takes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../src/channel/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAevE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGxE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQhE;AAED;;6CAE6C;AAC7C,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKxD;AAED;;qCAEqC;AACrC,eAAO,MAAM,YAAY,MAAM,CAAA"}
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../src/channel/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAevE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAEzE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGxE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQhE;AAED;;6CAE6C;AAC7C,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKxD;AAED;;qCAEqC;AACrC,eAAO,MAAM,YAAY,MAAM,CAAA"}
|
|
@@ -34,6 +34,15 @@ export function cleanRenderText(value, maxCells) {
|
|
|
34
34
|
}
|
|
35
35
|
return `${out}…`;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Sanitize untrusted plugin text destined for a MULTI-LINE block (a
|
|
39
|
+
* `pushLocal` report): the same per-line strip as {@link cleanRenderText},
|
|
40
|
+
* but newlines are structure here, not whitespace to fold. Blank rows are
|
|
41
|
+
* dropped so one reported line stays one transcript row.
|
|
42
|
+
*/
|
|
43
|
+
export function cleanBlockLines(value, maxCells) {
|
|
44
|
+
return value.split(/\r?\n/u).map(line => cleanRenderText(line, maxCells)).filter(line => line !== '');
|
|
45
|
+
}
|
|
37
46
|
/**
|
|
38
47
|
* Sanitize an untrusted (possibly non-string) value. Non-scalars — objects,
|
|
39
48
|
* arrays, functions, symbols, null/undefined — yield '' so the caller takes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../../src/channel/usage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AACjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEpD,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAA;AAE3C,8BAA8B;AAC9B,wBAAgB,eAAe,IAAI,UAAU,CAS5C;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,IAAI,gBAAgB,CAKnD;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAK7E;
|
|
1
|
+
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../../src/channel/usage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AACjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEpD,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAA;AAE3C,8BAA8B;AAC9B,wBAAgB,eAAe,IAAI,UAAU,CAS5C;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,IAAI,gBAAgB,CAKnD;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAK7E;AAoED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqB3D;AAED,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAKnF"}
|
|
@@ -40,6 +40,11 @@ export function addUsageToBucket(bucket, usage) {
|
|
|
40
40
|
* harness `contextPressure` projection, `projectedTokens ?? pressureTokens`, see
|
|
41
41
|
* `dsh-adapter/context-occupancy.ts`); these numbers only describe what the
|
|
42
42
|
* segmented bar is made of and must never be summed into that total.
|
|
43
|
+
* The bar's span is anchored to that occupancy instead (`contextBarColumns`),
|
|
44
|
+
* so the role of these estimates is to WEIGHT the fills: the harness's own
|
|
45
|
+
* `contextBreakdown` supplies the system/envelope/message split where it exists,
|
|
46
|
+
* and these numbers split its message side and stand in for the whole
|
|
47
|
+
* composition where it does not. No span is ever derived from them alone.
|
|
43
48
|
*/
|
|
44
49
|
/** ASCII, including control bytes and ANSI escapes: ~4 characters per token. */
|
|
45
50
|
const CHARS_PER_TOKEN_ASCII = 4;
|
package/lib/types/commands.d.ts
CHANGED
|
@@ -9,6 +9,16 @@ export interface CommandCompletionNode {
|
|
|
9
9
|
tag?: string;
|
|
10
10
|
/** Optional i18n key; plugin nodes normally rely on fallback text. */
|
|
11
11
|
descriptionKey?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Mark this row as a syntax EXAMPLE rather than a candidate: it spells out a
|
|
14
|
+
* shape, not something this person typed. Tab therefore hands the draft back
|
|
15
|
+
* untouched instead of writing the placeholder in, and Enter runs the draft as
|
|
16
|
+
* typed — at the bare argument position that is the subcommand itself (its
|
|
17
|
+
* usage line), and once a spec is typed it is that spec. `/plugin install `
|
|
18
|
+
* shows the three shapes while neither Tab nor Enter can insert or install the
|
|
19
|
+
* placeholder, and a real spec that merely starts like one is never swallowed.
|
|
20
|
+
*/
|
|
21
|
+
example?: true;
|
|
12
22
|
}
|
|
13
23
|
export type CommandChildren = (canonicalPath: readonly string[]) => readonly CommandCompletionNode[];
|
|
14
24
|
/**
|
|
@@ -100,6 +110,8 @@ export declare const HIDDEN_COMMAND_NAMES: ReadonlySet<string>;
|
|
|
100
110
|
* rules as {@link isLocalCommandName}).
|
|
101
111
|
*/
|
|
102
112
|
export declare function isHiddenCommandName(input: string): boolean;
|
|
113
|
+
/** Whether a command name (no slash) may run before the channel is ready. */
|
|
114
|
+
export declare function isBootSafeCommand(name: string): boolean;
|
|
103
115
|
/**
|
|
104
116
|
* Resolve a command's description in the active UI language. The en text in
|
|
105
117
|
* `LOCAL_COMMANDS` (and the registry's own text for external commands) is
|
|
@@ -137,6 +149,9 @@ export declare const WORKING_GATE_NOTICES: {
|
|
|
137
149
|
readonly resume: "resume-while-working";
|
|
138
150
|
readonly rewind: "rewind-while-working";
|
|
139
151
|
readonly kernel: "kernel-switch-while-working";
|
|
152
|
+
readonly dsh: "kernel-switch-while-working";
|
|
153
|
+
readonly codex: "kernel-switch-while-working";
|
|
154
|
+
readonly claude: "kernel-switch-while-working";
|
|
140
155
|
readonly channel: "channel-switch-while-working";
|
|
141
156
|
};
|
|
142
157
|
/**
|