@deepseek-harness-tui/dsh-tui 0.11.1 → 0.12.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 +70 -24
- package/assets/whale-girl/whale-girl-dark.png +0 -0
- package/assets/whale-girl/whale-girl-happy.png +0 -0
- package/assets/whale-girl/whale-girl.png +0 -0
- package/bin/dsh-tui.js +93 -6
- package/cordis.patch.yml +63 -22
- package/cordis.yml +3 -2
- package/guide/dsh-tui-guide/SKILL.md +37 -0
- package/guide/dsh-tui-guide/configuration.en.md +410 -0
- package/guide/dsh-tui-guide/configuration.md +349 -0
- package/guide/dsh-tui-guide/getting-started.en.md +398 -0
- package/guide/dsh-tui-guide/getting-started.md +397 -0
- package/guide/dsh-tui-guide/interaction.en.md +674 -0
- package/guide/dsh-tui-guide/interaction.md +747 -0
- package/guide/dsh-tui-guide/migrate.en.md +166 -0
- package/guide/dsh-tui-guide/migrate.md +132 -0
- package/guide/dsh-tui-guide/plugins.en.md +68 -0
- package/guide/dsh-tui-guide/plugins.md +56 -0
- package/guide/dsh-tui-guide/themes.en.md +192 -0
- package/guide/dsh-tui-guide/themes.md +185 -0
- package/guide/dsh-tui-guide/user-guide.en.md +608 -0
- package/guide/dsh-tui-guide/user-guide.md +586 -0
- package/guide/dsh-tui-guide/vscode.en.md +301 -0
- package/guide/dsh-tui-guide/vscode.md +272 -0
- package/lib/settings.json +1272 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +10 -2
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +17 -0
- package/lib/types/adapter/kernel/replay.d.ts.map +1 -1
- package/lib/types/adapter/kernel/replay.js +2 -0
- package/lib/types/adapter/ports/channel-display.d.ts +12 -0
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-session.d.ts +38 -0
- package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +14 -1
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +75 -6
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +86 -9
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +2 -0
- package/lib/types/components/BalanceReportRow.d.ts +10 -2
- package/lib/types/components/BalanceReportRow.d.ts.map +1 -1
- package/lib/types/components/BalanceReportRow.js +18 -4
- package/lib/types/components/Chat/JobCard.d.ts +9 -0
- package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
- package/lib/types/components/Chat/JobCard.js +42 -15
- package/lib/types/components/Chat/SubagentMessage.js +6 -6
- package/lib/types/components/CompactionStatusRow.d.ts +24 -0
- package/lib/types/components/CompactionStatusRow.d.ts.map +1 -0
- package/lib/types/components/CompactionStatusRow.js +72 -0
- package/lib/types/components/GoalTodoPanel.js +2 -2
- package/lib/types/components/HelpMenu.d.ts +2 -2
- package/lib/types/components/HelpMenu.d.ts.map +1 -1
- package/lib/types/components/HelpMenu.js +5 -4
- package/lib/types/components/InlineMathParagraph.d.ts +22 -0
- package/lib/types/components/InlineMathParagraph.d.ts.map +1 -0
- package/lib/types/components/InlineMathParagraph.js +178 -0
- package/lib/types/components/JobsPanel.d.ts.map +1 -1
- package/lib/types/components/JobsPanel.js +80 -33
- package/lib/types/components/LogoV2.d.ts +41 -3
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +148 -24
- package/lib/types/components/Markdown.d.ts +10 -3
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +47 -14
- package/lib/types/components/MathBlock.d.ts +13 -0
- package/lib/types/components/MathBlock.d.ts.map +1 -0
- package/lib/types/components/MathBlock.js +136 -0
- package/lib/types/components/MessageList.d.ts +10 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +16 -7
- package/lib/types/components/MigratePicker.d.ts +30 -0
- package/lib/types/components/MigratePicker.d.ts.map +1 -0
- package/lib/types/components/MigratePicker.js +38 -0
- package/lib/types/components/PresetPicker.d.ts +4 -0
- package/lib/types/components/PresetPicker.d.ts.map +1 -1
- package/lib/types/components/PresetPicker.js +5 -1
- package/lib/types/components/PromptInput.d.ts +17 -0
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +60 -8
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +2 -1
- package/lib/types/components/StarPrompt.d.ts +59 -0
- package/lib/types/components/StarPrompt.d.ts.map +1 -0
- package/lib/types/components/StarPrompt.js +326 -0
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +20 -3
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +8 -8
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +108 -10
- package/lib/types/components/TimelineRail.d.ts.map +1 -1
- package/lib/types/components/TimelineRail.js +9 -1
- package/lib/types/components/Whale.d.ts +17 -8
- package/lib/types/components/Whale.d.ts.map +1 -1
- package/lib/types/components/Whale.js +25 -15
- package/lib/types/components/WhaleGirl.d.ts +35 -0
- package/lib/types/components/WhaleGirl.d.ts.map +1 -0
- package/lib/types/components/WhaleGirl.js +50 -0
- package/lib/types/components/WorkingSpinner.d.ts +4 -1
- package/lib/types/components/WorkingSpinner.d.ts.map +1 -1
- package/lib/types/components/WorkingSpinner.js +2 -2
- package/lib/types/components/bigfont.d.ts +47 -18
- package/lib/types/components/bigfont.d.ts.map +1 -1
- package/lib/types/components/bigfont.js +55 -40
- package/lib/types/components/design-system/ThemeProvider.d.ts +6 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +40 -1
- package/lib/types/components/maidPortrait.d.ts +44 -0
- package/lib/types/components/maidPortrait.d.ts.map +1 -0
- package/lib/types/components/maidPortrait.js +178 -0
- package/lib/types/components/mathPreview.d.ts +25 -0
- package/lib/types/components/mathPreview.d.ts.map +1 -0
- package/lib/types/components/mathPreview.js +48 -0
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +6 -5
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +3 -2
- package/lib/types/components/messages/TranscriptImages.d.ts.map +1 -1
- package/lib/types/components/messages/TranscriptImages.js +11 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +14 -2
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +80 -38
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +3 -3
- package/lib/types/components/sessions/ForeignSessionRow.d.ts +34 -0
- package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -0
- package/lib/types/components/sessions/ForeignSessionRow.js +43 -0
- package/lib/types/components/sessions/SourceTabs.d.ts +52 -0
- package/lib/types/components/sessions/SourceTabs.d.ts.map +1 -0
- package/lib/types/components/sessions/SourceTabs.js +70 -0
- package/lib/types/components/splashEggs.d.ts +56 -0
- package/lib/types/components/splashEggs.d.ts.map +1 -0
- package/lib/types/components/splashEggs.js +67 -0
- package/lib/types/components/splashFonts.d.ts +119 -0
- package/lib/types/components/splashFonts.d.ts.map +1 -0
- package/lib/types/components/splashFonts.js +267 -0
- package/lib/types/components/splashLayout.d.ts +41 -0
- package/lib/types/components/splashLayout.d.ts.map +1 -0
- package/lib/types/components/splashLayout.js +40 -0
- package/lib/types/components/trajectory/MiniWake.d.ts +11 -1
- package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -1
- package/lib/types/components/trajectory/MiniWake.js +9 -3
- package/lib/types/components/whaleGirlSprite.d.ts +17 -0
- package/lib/types/components/whaleGirlSprite.d.ts.map +1 -0
- package/lib/types/components/whaleGirlSprite.js +47 -0
- package/lib/types/deepseekPricing.d.ts +74 -0
- package/lib/types/deepseekPricing.d.ts.map +1 -1
- package/lib/types/deepseekPricing.js +110 -11
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +6 -1
- package/lib/types/dsh-adapter/channel/background-action.d.ts +1 -0
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +1 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +8 -9
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +69 -21
- package/lib/types/dsh-adapter/channel/compaction.d.ts +2 -1
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +35 -2
- package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/external-commands.js +8 -2
- package/lib/types/dsh-adapter/channel/job-projection.d.ts +1 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/job-projection.js +88 -3
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +6 -1
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts +13 -0
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-actions.js +48 -7
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.js +25 -9
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +5 -1
- package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/paths.js +7 -1
- package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/preferences.js +31 -5
- package/lib/types/dsh-adapter/channel/projection.d.ts +1 -2
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +127 -17
- package/lib/types/dsh-adapter/channel/question-record.d.ts +76 -0
- package/lib/types/dsh-adapter/channel/question-record.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/question-record.js +107 -0
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts +42 -0
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-lineage.js +51 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +2 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +9 -3
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +2 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +39 -7
- package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.js +7 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +1 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +4 -2
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +8 -0
- package/lib/types/dsh-adapter/channel/state.d.ts +17 -2
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +6 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +30 -35
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +143 -4
- package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +35 -5
- package/lib/types/dsh-adapter/compat/messages.d.ts +6 -0
- package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/messages.js +9 -0
- package/lib/types/dsh-adapter/contract.d.ts +6 -5
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +14 -6
- package/lib/types/dsh-adapter/index.d.ts +36 -1
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +22 -6
- package/lib/types/dsh-adapter/jobs.d.ts +82 -16
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +104 -9
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.js +131 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.d.ts +17 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.js +329 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.js +102 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.parse.d.ts +16 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.parse.js +289 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.js +117 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.d.ts +13 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.js +178 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.js +133 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan-fs.d.ts +60 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan-fs.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan-fs.js +178 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts +8 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.js +40 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.js +93 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.d.ts +9 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.js +89 -0
- package/lib/types/dsh-adapter/migrate/bin-path.d.ts +6 -0
- package/lib/types/dsh-adapter/migrate/bin-path.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/bin-path.js +30 -0
- package/lib/types/dsh-adapter/migrate/browse.d.ts +42 -0
- package/lib/types/dsh-adapter/migrate/browse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/browse.js +90 -0
- package/lib/types/dsh-adapter/migrate/cli.d.ts +9 -0
- package/lib/types/dsh-adapter/migrate/cli.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/cli.js +106 -0
- package/lib/types/dsh-adapter/migrate/import-one.d.ts +89 -0
- package/lib/types/dsh-adapter/migrate/import-one.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/import-one.js +133 -0
- package/lib/types/dsh-adapter/migrate/index.d.ts +35 -0
- package/lib/types/dsh-adapter/migrate/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/index.js +107 -0
- package/lib/types/dsh-adapter/migrate/parse/injection.d.ts +40 -0
- package/lib/types/dsh-adapter/migrate/parse/injection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/injection.js +127 -0
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +28 -0
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +40 -0
- package/lib/types/dsh-adapter/migrate/parse/role-turns.d.ts +28 -0
- package/lib/types/dsh-adapter/migrate/parse/role-turns.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/role-turns.js +50 -0
- package/lib/types/dsh-adapter/migrate/parse/title.d.ts +18 -0
- package/lib/types/dsh-adapter/migrate/parse/title.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/title.js +29 -0
- package/lib/types/dsh-adapter/migrate/parse/tools.d.ts +62 -0
- package/lib/types/dsh-adapter/migrate/parse/tools.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/tools.js +110 -0
- package/lib/types/dsh-adapter/migrate/picker.d.ts +64 -0
- package/lib/types/dsh-adapter/migrate/picker.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/picker.js +86 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.d.ts +40 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.js +100 -0
- package/lib/types/dsh-adapter/migrate/sessionize.d.ts +39 -0
- package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/sessionize.js +271 -0
- package/lib/types/dsh-adapter/migrate/types.d.ts +176 -0
- package/lib/types/dsh-adapter/migrate/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/types.js +11 -0
- package/lib/types/dsh-adapter/migrate/uuid.d.ts +7 -0
- package/lib/types/dsh-adapter/migrate/uuid.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/uuid.js +25 -0
- package/lib/types/dsh-adapter/oauth/bonus.d.ts +27 -0
- package/lib/types/dsh-adapter/oauth/bonus.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth/bonus.js +69 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/command.d.ts +2 -1
- package/lib/types/dsh-adapter/oauth/command.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/command.js +7 -4
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/credentials.d.ts +13 -10
- package/lib/types/dsh-adapter/oauth/credentials.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/credentials.js +61 -23
- package/lib/types/dsh-adapter/oauth/deepseek.d.ts +39 -0
- package/lib/types/dsh-adapter/oauth/deepseek.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth/deepseek.js +189 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/index.d.ts +24 -16
- package/lib/types/dsh-adapter/oauth/index.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/index.js +34 -20
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/interaction.d.ts +14 -12
- package/lib/types/dsh-adapter/oauth/interaction.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth/interaction.js +283 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/opener.d.ts +2 -1
- package/lib/types/dsh-adapter/oauth/opener.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/opener.js +1 -1
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/pi-ai.d.ts +10 -3
- package/lib/types/dsh-adapter/oauth/pi-ai.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/pi-ai.js +8 -3
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/profiles.d.ts +6 -3
- package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/profiles.js +11 -3
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/service.d.ts +14 -7
- package/lib/types/dsh-adapter/oauth/service.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/service.js +82 -17
- package/lib/types/dsh-adapter/plugin.d.ts +12 -3
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +215 -376
- package/lib/types/dsh-adapter/presets.d.ts +6 -4
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +6 -4
- package/lib/types/dsh-adapter/providerWizard.d.ts +17 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +260 -68
- package/lib/types/dsh-adapter/questions.d.ts +22 -15
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +47 -45
- package/lib/types/dsh-adapter/sessions/digest.d.ts +11 -6
- package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/digest.js +20 -13
- package/lib/types/dsh-adapter/sessions/frames.d.ts +3 -1
- package/lib/types/dsh-adapter/sessions/frames.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/frames.js +5 -4
- package/lib/types/dsh-adapter/sessions/list.d.ts +6 -1
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +188 -164
- package/lib/types/dsh-adapter/sessions/recovery.d.ts +16 -0
- package/lib/types/dsh-adapter/sessions/recovery.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/recovery.js +108 -0
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts +7 -0
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/snapshot.js +90 -0
- package/lib/types/dsh-adapter/sessions/store.d.ts +10 -4
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/store.js +62 -25
- package/lib/types/dsh-adapter/sideQuestion.d.ts +41 -2
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.js +98 -2
- package/lib/types/dsh-adapter/subagents.d.ts +29 -3
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +87 -3
- package/lib/types/herdr.d.ts +2 -0
- package/lib/types/herdr.d.ts.map +1 -1
- package/lib/types/herdr.js +9 -3
- package/lib/types/i18n.d.ts +598 -60
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +198 -31
- package/lib/types/ink/components/App.d.ts +2 -2
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +15 -2
- package/lib/types/ink/components/Image.d.ts +14 -1
- package/lib/types/ink/components/Image.d.ts.map +1 -1
- package/lib/types/ink/components/Image.js +2 -2
- package/lib/types/ink/events/input-event.js +3 -3
- package/lib/types/ink/hooks/use-terminal-images.d.ts +12 -0
- package/lib/types/ink/hooks/use-terminal-images.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-terminal-images.js +13 -0
- package/lib/types/ink/ink.d.ts +6 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +16 -1
- package/lib/types/ink/kitty-graphics.d.ts +44 -3
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +184 -23
- package/lib/types/ink/output.d.ts +24 -2
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +83 -5
- package/lib/types/ink/parse-keypress.d.ts +61 -1
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +764 -93
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +8 -1
- package/lib/types/ink/screen.d.ts +24 -0
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/screen.js +89 -0
- package/lib/types/ink/selection.d.ts +40 -18
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +142 -30
- package/lib/types/ink/sixel-codec.d.ts +12 -1
- package/lib/types/ink/sixel-codec.d.ts.map +1 -1
- package/lib/types/ink/sixel-codec.js +29 -5
- package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
- package/lib/types/ink/sixel-graphics.js +5 -3
- package/lib/types/ink/styles.d.ts +9 -0
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +8 -0
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.d.ts +32 -1
- package/lib/types/ink/terminal-querier.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.js +54 -2
- package/lib/types/ink/timeline-rail.d.ts +5 -0
- package/lib/types/ink/timeline-rail.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.d.ts +24 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.js +25 -3
- package/lib/types/math/inline-layout.d.ts +29 -0
- package/lib/types/math/inline-layout.d.ts.map +1 -0
- package/lib/types/math/inline-layout.js +106 -0
- package/lib/types/math/layout.d.ts +58 -0
- package/lib/types/math/layout.d.ts.map +1 -0
- package/lib/types/math/layout.js +59 -0
- package/lib/types/math/renderer.d.ts +64 -0
- package/lib/types/math/renderer.d.ts.map +1 -0
- package/lib/types/math/renderer.js +256 -0
- package/lib/types/minimalUiMode.d.ts +19 -0
- package/lib/types/minimalUiMode.d.ts.map +1 -0
- package/lib/types/minimalUiMode.js +23 -0
- package/lib/types/oauth.d.ts +5 -10
- package/lib/types/oauth.d.ts.map +1 -1
- package/lib/types/oauth.js +5 -10
- package/lib/types/screens/Chat.d.ts +17 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +627 -54
- package/lib/types/screens/SessionSupervisor.d.ts +2 -1
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +156 -19
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +49 -11
- package/lib/types/screens/StatusLine.d.ts +4 -0
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +57 -27
- package/lib/types/screens/chatOverlay.d.ts +5 -0
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +1 -0
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +47 -0
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -0
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +65 -0
- package/lib/types/screens/sessionSupervisor/model.d.ts +12 -0
- package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/model.js +26 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts +107 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts.map +1 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.js +312 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +4 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +97 -14
- package/lib/types/sessionHistory.d.ts +2 -2
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +31 -5
- package/lib/types/settings/definitions.d.ts +681 -0
- package/lib/types/settings/definitions.d.ts.map +1 -0
- package/lib/types/settings/definitions.js +511 -0
- package/lib/types/starAction.d.ts +44 -0
- package/lib/types/starAction.d.ts.map +1 -0
- package/lib/types/starAction.js +52 -0
- package/lib/types/terminal-utils/latex.d.ts +10 -0
- package/lib/types/terminal-utils/latex.d.ts.map +1 -0
- package/lib/types/terminal-utils/latex.js +1417 -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 +26 -1
- package/lib/types/terminal-utils/math.d.ts +66 -0
- package/lib/types/terminal-utils/math.d.ts.map +1 -0
- package/lib/types/terminal-utils/math.js +337 -0
- package/lib/types/tips.d.ts.map +1 -1
- package/lib/types/tips.js +16 -4
- package/lib/types/tuiDisplayPrefs.d.ts +67 -0
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +59 -0
- package/lib/types/ui.d.ts +1 -1
- package/lib/types/ui.d.ts.map +1 -1
- package/lib/types/ui.js +1 -1
- package/lib/types/update.js +2 -2
- package/lib/types/usageStats.d.ts +98 -0
- package/lib/types/usageStats.d.ts.map +1 -0
- package/lib/types/usageStats.js +169 -0
- package/lib/types/utils/bmp.d.ts +17 -0
- package/lib/types/utils/bmp.d.ts.map +1 -0
- package/lib/types/utils/bmp.js +154 -0
- package/lib/types/utils/clipboard.d.ts +14 -2
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +143 -8
- package/lib/types/utils/fold-long-lines.d.ts.map +1 -1
- package/lib/types/utils/fold-long-lines.js +2 -1
- package/lib/types/utils/keymap.d.ts +4 -1
- package/lib/types/utils/keymap.d.ts.map +1 -1
- package/lib/types/utils/keymap.js +8 -0
- package/lib/types/utils/modifiers.d.ts +4 -3
- package/lib/types/utils/modifiers.d.ts.map +1 -1
- package/lib/types/utils/modifiers.js +4 -3
- package/lib/types/utils/pastedImagePath.d.ts +8 -0
- package/lib/types/utils/pastedImagePath.d.ts.map +1 -1
- package/lib/types/utils/pastedImagePath.js +29 -5
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/LICENSE +202 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/NOTICE +20 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/index.d.ts +16 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/bundled-packages.json +4 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/index.mjs +20 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/index.mjs.LEGAL.txt +35 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/package.json +29 -0
- package/package.json +127 -102
- package/presets/liangshen/agent.cordis.yml +4 -1
- package/presets/liangshen/preset.yml +1 -1
- package/lib/types/minimalMode.d.ts +0 -13
- package/lib/types/minimalMode.d.ts.map +0 -1
- package/lib/types/minimalMode.js +0 -17
- package/node_modules/@deepseek-harness-tui/dsh-auth/LICENSE +0 -21
- package/node_modules/@deepseek-harness-tui/dsh-auth/README.md +0 -143
- package/node_modules/@deepseek-harness-tui/dsh-auth/cordis.patch.yml +0 -11
- package/node_modules/@deepseek-harness-tui/dsh-auth/dsh-plugin.json +0 -44
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.js +0 -193
- package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +0 -69
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
# @deepseek-harness-tui/dsh-auth
|
|
2
|
-
|
|
3
|
-
> Subscription OAuth sign-in for [dsh-TUI](https://github.com/ccch1mneyyy/dsh-TUI) and
|
|
4
|
-
> [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
5
|
-
|
|
6
|
-
Use your **ChatGPT (Plus/Pro)**, **Claude (Pro/Max)** and **SuperGrok / X Premium**
|
|
7
|
-
subscriptions as model providers — sign in with the official account, no API
|
|
8
|
-
keys, and **no dsh source patch**. This plugin is developed alongside (and
|
|
9
|
-
bundled into) [dsh-TUI](https://github.com/ccch1mneyyy/dsh-TUI), the
|
|
10
|
-
Claude Code style terminal front door for DeepSeek Harness; it also installs
|
|
11
|
-
standalone into any dsh profile.
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
dsh-tui → /provider → 订阅账号登录(OAuth)→ sign in ← the TUI integration
|
|
15
|
-
/auth login openai-codex ← the plugin command
|
|
16
|
-
/model → OpenAI Codex → gpt-5.6-sol ← routes & models
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
**Status: experimental (M1).** The OAuth flows themselves are
|
|
20
|
-
[pi-ai](https://www.npmjs.com/package/@earendil-works/pi-ai)'s shipped
|
|
21
|
-
implementations (device-code and loopback callback included); this plugin
|
|
22
|
-
adds the hosting: credential storage, automatic token refresh, adapter
|
|
23
|
-
registration, and a login surface over the `userQuestions` seam that works in
|
|
24
|
-
the TUI, the web client, and refuses cleanly on headless hosts.
|
|
25
|
-
|
|
26
|
-
## Install
|
|
27
|
-
|
|
28
|
-
**With dsh-TUI** — nothing to do: dsh-auth ships inside the dsh-tui package
|
|
29
|
-
(bundled dependency). Update dsh-tui and the `/provider` wizard gains its
|
|
30
|
-
subscription sign-in branch automatically.
|
|
31
|
-
|
|
32
|
-
**Standalone, into any dsh profile:**
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
dsh plugin --profile <name> add @deepseek-harness-tui/dsh-auth
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Then restart the host; `/` lists `auth`, and every model picker gains the
|
|
39
|
-
signed-in providers' catalogs (credential-gated — see below).
|
|
40
|
-
|
|
41
|
-
## What it does
|
|
42
|
-
|
|
43
|
-
- Mounts the pi-ai catalog providers that ship OAuth flows as `llm` registry
|
|
44
|
-
routes: `openai-codex`, `anthropic`, `xai`. **Models appear in a picker
|
|
45
|
-
only after that provider is signed in** (credential-gated listing) — sign
|
|
46
|
-
in and the catalog appears, sign out and it disappears; model ids already
|
|
47
|
-
saved in sessions stay resolvable either way.
|
|
48
|
-
- Loads those Provider objects from the exact pi-ai dependency owned by the
|
|
49
|
-
installed `dsh-llm-pi-ai`. rc and alpha hosts therefore keep their supported
|
|
50
|
-
pi-ai versions without passing Provider objects across package instances.
|
|
51
|
-
- `/auth login [provider]` runs the provider's OAuth flow interactively. The
|
|
52
|
-
waiting panel behaves the way pi's host does: the authorization URL is
|
|
53
|
-
**opened in your browser automatically** (never hand-copied — the URL is
|
|
54
|
-
hundreds of characters and wrap artifacts corrupt its `redirect_uri`),
|
|
55
|
-
and the panel offers *Copy authorization link* / *Open browser again* /
|
|
56
|
-
*Cancel sign-in*. Device-code flows open the verification page and make
|
|
57
|
-
the short code the copy target. OpenAI Codex also offers a device-code
|
|
58
|
-
login method — the most robust path on headless or locked-down machines
|
|
59
|
-
(no localhost:1455 callback needed).
|
|
60
|
-
- Stored access tokens refresh automatically before each request, serialized
|
|
61
|
-
per provider under the credential store's lock — concurrent requests never
|
|
62
|
-
double-refresh a rotated token.
|
|
63
|
-
- `/auth status` / `/auth logout <provider>`; the `ctx.dshAuth` service
|
|
64
|
-
exposes the same api for UIs (the dsh-tui `/provider` wizard and `/login`
|
|
65
|
-
ride it).
|
|
66
|
-
|
|
67
|
-
## Usage
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
/auth # status: which providers are signed in
|
|
71
|
-
/auth login # pick a provider interactively
|
|
72
|
-
/auth login openai-codex # ChatGPT (Plus/Pro)
|
|
73
|
-
/auth login anthropic # Claude (Pro/Max)
|
|
74
|
-
/auth login xai # SuperGrok / X Premium
|
|
75
|
-
/auth logout anthropic
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Model requests against a provider you have not signed in to fail loudly with
|
|
79
|
-
the `/auth login <provider>` hint — never silently.
|
|
80
|
-
|
|
81
|
-
## Configuration
|
|
82
|
-
|
|
83
|
-
```yaml
|
|
84
|
-
- id: dsh-auth
|
|
85
|
-
name: '@deepseek-harness-tui/dsh-auth'
|
|
86
|
-
config:
|
|
87
|
-
providers: [openai-codex, anthropic, xai] # any non-empty subset
|
|
88
|
-
# credentialsFile: /secure/path/credentials.json
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
- `credentialsFile` defaults to `$DSH_HOME/dsh-auth/credentials.json`
|
|
92
|
-
(`~/.dsh/dsh-auth/credentials.json`), overridable with the
|
|
93
|
-
`DSH_AUTH_CREDENTIALS` environment variable. The directory is created
|
|
94
|
-
`0700`, the file `0600` (best-effort on Windows), and every write is
|
|
95
|
-
atomic (temp file + rename).
|
|
96
|
-
- A route another adapter family already owns — an `llm-pi-ai` settings
|
|
97
|
-
profile naming the same provider — is refused by the registry; the plugin
|
|
98
|
-
logs the refusal and mounts the remaining routes. Keep one provider on one
|
|
99
|
-
adapter.
|
|
100
|
-
|
|
101
|
-
## Security notes
|
|
102
|
-
|
|
103
|
-
- The credential file holds **long-lived refresh tokens**. It is never
|
|
104
|
-
logged, never echoed through status surfaces (`/auth status` shows expiry
|
|
105
|
-
metadata only), and a corrupt file fails loudly instead of being
|
|
106
|
-
overwritten.
|
|
107
|
-
- Secret prompts warn that terminal input is not masked on this surface.
|
|
108
|
-
- Login refuses to run where no interactive surface is registered (no
|
|
109
|
-
browser/GUI assumptions — remote and headless hosts get a clear error,
|
|
110
|
-
per the ecosystem spec's remote-determinism rule, TUI-RUN-001).
|
|
111
|
-
- Subscription authentication and API-key access are different products:
|
|
112
|
-
this plugin uses each provider's subscription backend only (ChatGPT Codex
|
|
113
|
-
backend for OpenAI, Claude Pro/Max for Anthropic) and does not turn a
|
|
114
|
-
subscription into a general-purpose API credential.
|
|
115
|
-
|
|
116
|
-
## Development
|
|
117
|
-
|
|
118
|
-
```sh
|
|
119
|
-
pnpm install
|
|
120
|
-
pnpm verify # build + headless smoke (credential store, refresh
|
|
121
|
-
# serialization, prompt bridging, gating, service api)
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
The smoke suite runs without cordis or a harness: the pure modules are
|
|
125
|
-
exercised directly. Real end-to-end login needs an interactive host
|
|
126
|
-
(dsh-tui) and is verified manually per release. The plugin is developed in
|
|
127
|
-
the [dsh-TUI repository](https://github.com/ccch1mneyyy/dsh-TUI) as the
|
|
128
|
-
`dsh-auth/` submodule and mirrors to this repository.
|
|
129
|
-
|
|
130
|
-
## Roadmap
|
|
131
|
-
|
|
132
|
-
- **M2** *(landed)* — dsh-tui integration: `/provider` OAuth branch, `/login`
|
|
133
|
-
account section, two-level `/model` picker with a pinned recently-used
|
|
134
|
-
group.
|
|
135
|
-
- **M3** — `dsh-ecosystem-spec` conformance (manifest validation, admission
|
|
136
|
-
fixtures) plus the remaining pi-ai OAuth providers (GitHub Copilot,
|
|
137
|
-
OpenRouter, Kimi); community list entry.
|
|
138
|
-
- **M4** — Gemini: a custom Google device-code flow (pi-ai ships none; this
|
|
139
|
-
is the one wheel this project plans to build itself).
|
|
140
|
-
|
|
141
|
-
## License
|
|
142
|
-
|
|
143
|
-
MIT
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# @deepseek-harness-tui/dsh-auth bundle patch: mounts the subscription OAuth
|
|
2
|
-
# provider routes and the /auth command as a profile layer
|
|
3
|
-
# (`dsh plugin --profile <name> add @deepseek-harness-tui/dsh-auth`).
|
|
4
|
-
#
|
|
5
|
-
# Entry-level inject — never a code-level one (see the plugin module's
|
|
6
|
-
# `inject` export): a stale patch must not deadlock a composition whose
|
|
7
|
-
# llm/commands services arrive later or are absent entirely.
|
|
8
|
-
- insert:
|
|
9
|
-
- id: dsh-auth
|
|
10
|
-
name: '@deepseek-harness-tui/dsh-auth'
|
|
11
|
-
inject: [llm, commands]
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://dsh.community/schemas/dsh-plugin-0.15.json",
|
|
3
|
-
"id": "com.dsh-tui.dsh-auth",
|
|
4
|
-
"name": "dsh-auth",
|
|
5
|
-
"version": "0.1.0",
|
|
6
|
-
"manifestVersion": "0.15",
|
|
7
|
-
"description": "Subscription OAuth sign-in (ChatGPT/Codex, Claude Pro/Max, SuperGrok) as LLM provider routes for DeepSeek Harness. Registers llm adapter routes through the cordis llm registry; interactive login runs over the user-questions seam and degrades to a clear refusal when no interactive surface is present.",
|
|
8
|
-
"facets": {
|
|
9
|
-
"host": {
|
|
10
|
-
"entry": "lib/index.js",
|
|
11
|
-
"apiVersion": "v1alpha1"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"requires": {
|
|
15
|
-
"contracts": [
|
|
16
|
-
{
|
|
17
|
-
"apiVersion": "commands.dsh/v1alpha1",
|
|
18
|
-
"kind": "Command"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"apiVersion": "user-questions.dsh/v1alpha1",
|
|
22
|
-
"kind": "UserQuestions",
|
|
23
|
-
"optional": true,
|
|
24
|
-
"fallback": "login refuses with guidance instead of assuming a browser or GUI is present (TUI-RUN-001)"
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
"contributes": {
|
|
29
|
-
"commands": [
|
|
30
|
-
{
|
|
31
|
-
"id": "dsh.auth",
|
|
32
|
-
"title": "Sign in with a provider subscription (OAuth)"
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
"permissions": [
|
|
37
|
-
{
|
|
38
|
-
"name": "commands.invoke",
|
|
39
|
-
"scope": "dsh.auth",
|
|
40
|
-
"reason": "run /auth status|login|logout from any composed command surface"
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
"license": "MIT"
|
|
44
|
-
}
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `AuthInteraction` bridge: pi-ai OAuth flows speak prompts and events;
|
|
3
|
-
* every interactive surface in this ecosystem speaks `ctx.userQuestions`.
|
|
4
|
-
*
|
|
5
|
-
* `prompt()` maps one pi-ai prompt onto one question — `select` prompts carry
|
|
6
|
-
* their options, text/secret/manual-code prompts expect the custom-answer
|
|
7
|
-
* input row.
|
|
8
|
-
*
|
|
9
|
-
* `notify()` restores the host contract pi-ai's browser flows assume: the
|
|
10
|
-
* `auth_url` / `device_code` events expect the *host* to open the browser
|
|
11
|
-
* (their authorize URLs run hundreds of characters — wrapped across panel
|
|
12
|
-
* lines they are unclickable, and hand-copying picks up wrap artifacts that
|
|
13
|
-
* corrupt the encoded `redirect_uri`, which the provider then rejects). So
|
|
14
|
-
* the bridge opens the URL itself, then shows one waiting panel carrying
|
|
15
|
-
* copy / reopen / cancel actions until the flow settles. The device-code
|
|
16
|
-
* path gets the same treatment: its short code is the thing to copy, and
|
|
17
|
-
* the verification page is auto-opened too.
|
|
18
|
-
*
|
|
19
|
-
* One `AbortController` owns the whole run: pi-ai reads `interaction.signal`
|
|
20
|
-
* to abort the flow, every ask request carries it so surfaces close their
|
|
21
|
-
* panels, and the waiting panel's cancel action fires it.
|
|
22
|
-
*
|
|
23
|
-
* Nothing here assumes a browser or GUI *exists* (TUI-RUN-001): when no
|
|
24
|
-
* opener or clipboard helper is available the panel degrades to showing the
|
|
25
|
-
* URL / code verbatim with a clear note, and where no question provider is
|
|
26
|
-
* registered at all, `ask` rejects and the login command turns that into a
|
|
27
|
-
* clear refusal.
|
|
28
|
-
*
|
|
29
|
-
* @module dsh-auth/interaction
|
|
30
|
-
*/
|
|
31
|
-
import { copyToClipboard, openInBrowser } from './opener.js';
|
|
32
|
-
/** Human-readable copy for one notify event. */
|
|
33
|
-
export function describeEvent(event) {
|
|
34
|
-
switch (event.type) {
|
|
35
|
-
case 'auth_url':
|
|
36
|
-
return `Open this URL to authorize (a local callback completes sign-in):\n${event.url}`;
|
|
37
|
-
case 'device_code':
|
|
38
|
-
return `Visit ${event.verificationUri} and enter this code:\n ${event.userCode}`;
|
|
39
|
-
case 'info':
|
|
40
|
-
case 'progress':
|
|
41
|
-
return event.message;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
const CANCEL = 'Cancel sign-in';
|
|
45
|
-
const OPEN_AGAIN = 'Open browser again';
|
|
46
|
-
const COPY_LINK = 'Copy authorization link';
|
|
47
|
-
const COPY_CODE = 'Copy code';
|
|
48
|
-
/** One answer row, or a thrown error when the surface returned nothing usable. */
|
|
49
|
-
function singleAnswer(answer) {
|
|
50
|
-
const row = answer.answers[0];
|
|
51
|
-
if (row === undefined)
|
|
52
|
-
throw new Error('dsh-auth: the question surface returned no answer');
|
|
53
|
-
return { selected: row.selected[0], custom: row.custom };
|
|
54
|
-
}
|
|
55
|
-
function authUrlView(url, instructions, opened) {
|
|
56
|
-
const lead = opened
|
|
57
|
-
? 'Authorization page opened in your browser — complete the sign-in there.\n'
|
|
58
|
-
+ 'If it did not open, copy the link below and open it by hand.'
|
|
59
|
-
: `Open this URL to authorize${instructions === undefined ? '' : ` — ${instructions}`}\n`
|
|
60
|
-
+ 'Copy the link below (it is too long to select reliably once wrapped):';
|
|
61
|
-
return { body: `${lead}\n${url}`, copyLabel: COPY_LINK, copyText: url, reopenUrl: url };
|
|
62
|
-
}
|
|
63
|
-
function deviceCodeView(userCode, verificationUri, opened) {
|
|
64
|
-
const lead = opened
|
|
65
|
-
? `Enter this code on the page opened in your browser (${verificationUri}):`
|
|
66
|
-
: `Visit ${verificationUri} and enter this code:`;
|
|
67
|
-
return { body: `${lead}\n ${userCode}`, copyLabel: COPY_CODE, copyText: userCode, reopenUrl: verificationUri };
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* The bridge for one login run. At most one waiting panel exists at a time;
|
|
71
|
-
* `settle()` retires it when the flow ends (any outcome), so a completed or
|
|
72
|
-
* failed login never leaves an interactive dead end on screen.
|
|
73
|
-
*/
|
|
74
|
-
export class QuestionBridge {
|
|
75
|
-
ask;
|
|
76
|
-
runAbort;
|
|
77
|
-
signal;
|
|
78
|
-
openUrl;
|
|
79
|
-
copy;
|
|
80
|
-
waiting;
|
|
81
|
-
waitingClosed = false;
|
|
82
|
-
constructor(ask, runAbort, helpers = {}) {
|
|
83
|
-
this.ask = ask;
|
|
84
|
-
this.runAbort = runAbort;
|
|
85
|
-
this.signal = runAbort.signal;
|
|
86
|
-
this.openUrl = helpers.openUrl ?? openInBrowser;
|
|
87
|
-
this.copy = helpers.copyText ?? copyToClipboard;
|
|
88
|
-
}
|
|
89
|
-
async prompt(prompt) {
|
|
90
|
-
const secretNote = prompt.type === 'secret' ? ' (input is not masked on this surface — mind your screen)' : '';
|
|
91
|
-
const question = prompt.type === 'select'
|
|
92
|
-
? {
|
|
93
|
-
id: 'dsh-auth-prompt',
|
|
94
|
-
header: 'dsh-auth',
|
|
95
|
-
question: prompt.message,
|
|
96
|
-
options: prompt.options.map(option => ({
|
|
97
|
-
label: option.label,
|
|
98
|
-
...(option.description === undefined ? {} : { description: option.description }),
|
|
99
|
-
})),
|
|
100
|
-
}
|
|
101
|
-
: {
|
|
102
|
-
id: 'dsh-auth-prompt',
|
|
103
|
-
header: 'dsh-auth',
|
|
104
|
-
question: prompt.message,
|
|
105
|
-
...(prompt.placeholder === undefined
|
|
106
|
-
? (secretNote === '' ? {} : { detail: secretNote.slice(1) })
|
|
107
|
-
: { detail: `${prompt.placeholder}${secretNote}` }),
|
|
108
|
-
};
|
|
109
|
-
const answer = singleAnswer(await this.ask({ questions: [question], signal: prompt.signal ?? this.signal }));
|
|
110
|
-
if (prompt.type === 'select') {
|
|
111
|
-
const label = answer.selected;
|
|
112
|
-
const option = label === undefined ? undefined : prompt.options.find(candidate => candidate.label === label);
|
|
113
|
-
if (option === undefined) {
|
|
114
|
-
if (answer.custom !== undefined && answer.custom !== '')
|
|
115
|
-
return answer.custom;
|
|
116
|
-
throw new Error('dsh-auth: the selection answer did not match an offered option');
|
|
117
|
-
}
|
|
118
|
-
return option.id;
|
|
119
|
-
}
|
|
120
|
-
const custom = answer.custom?.trim();
|
|
121
|
-
if (custom === undefined || custom === '')
|
|
122
|
-
throw new Error('dsh-auth: the text answer was empty');
|
|
123
|
-
return custom;
|
|
124
|
-
}
|
|
125
|
-
notify(event) {
|
|
126
|
-
if (event.type === 'auth_url') {
|
|
127
|
-
if (this.waiting !== undefined)
|
|
128
|
-
return;
|
|
129
|
-
const opened = this.openUrl(event.url);
|
|
130
|
-
void this.runWaitingPanel(authUrlView(event.url, event.instructions, opened));
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
if (event.type === 'device_code') {
|
|
134
|
-
if (this.waiting !== undefined)
|
|
135
|
-
return;
|
|
136
|
-
const opened = this.openUrl(event.verificationUri);
|
|
137
|
-
void this.runWaitingPanel(deviceCodeView(event.userCode, event.verificationUri, opened));
|
|
138
|
-
}
|
|
139
|
-
// info / progress lines are transient; the waiting panel already tells
|
|
140
|
-
// the user what to do, and the flow's next prompt carries its own copy.
|
|
141
|
-
}
|
|
142
|
-
/** Close the waiting panel (if any) and stop answering for this run. */
|
|
143
|
-
async settle() {
|
|
144
|
-
this.waitingClosed = true;
|
|
145
|
-
this.waiting?.controller.abort();
|
|
146
|
-
await this.waiting?.answer;
|
|
147
|
-
this.waiting = undefined;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Show the waiting panel until the flow settles or the user cancels,
|
|
151
|
-
* re-asking after a copy/reopen action with a one-line status prefix.
|
|
152
|
-
*/
|
|
153
|
-
async runWaitingPanel(view) {
|
|
154
|
-
let body = view.body;
|
|
155
|
-
while (!this.waitingClosed) {
|
|
156
|
-
const controller = new AbortController();
|
|
157
|
-
const answer = this.ask({
|
|
158
|
-
questions: [{
|
|
159
|
-
id: 'dsh-auth-waiting',
|
|
160
|
-
header: 'dsh-auth',
|
|
161
|
-
question: 'Waiting for authorization…',
|
|
162
|
-
detail: body,
|
|
163
|
-
options: [
|
|
164
|
-
{ label: view.copyLabel },
|
|
165
|
-
...(view.reopenUrl === undefined ? [] : [{ label: OPEN_AGAIN }]),
|
|
166
|
-
{ label: CANCEL },
|
|
167
|
-
],
|
|
168
|
-
}],
|
|
169
|
-
signal: controller.signal,
|
|
170
|
-
})
|
|
171
|
-
.then(response => singleAnswer(response).selected)
|
|
172
|
-
.catch(() => undefined);
|
|
173
|
-
this.waiting = { controller, answer };
|
|
174
|
-
const picked = await answer;
|
|
175
|
-
this.waiting = undefined;
|
|
176
|
-
if (picked === undefined || this.waitingClosed)
|
|
177
|
-
return;
|
|
178
|
-
if (picked === CANCEL) {
|
|
179
|
-
this.runAbort.abort('user cancelled sign-in');
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
if (picked === view.copyLabel) {
|
|
183
|
-
const copied = await this.copy(view.copyText);
|
|
184
|
-
body = `${copied ? 'Copied — paste it where you need it.' : 'Copy failed — no clipboard helper answered; select the text manually.'}\n${view.body}`;
|
|
185
|
-
continue;
|
|
186
|
-
}
|
|
187
|
-
if (picked === OPEN_AGAIN && view.reopenUrl !== undefined) {
|
|
188
|
-
this.openUrl(view.reopenUrl);
|
|
189
|
-
body = `Reopened in your browser.\n${view.body}`;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@deepseek-harness-tui/dsh-auth",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"description": "Subscription OAuth sign-in (ChatGPT/Codex, Claude Pro/Max, SuperGrok) as LLM provider routes for DeepSeek Harness — no dsh source patch, bundled with dsh-tui",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/ccch1mneyyy/dsh-auth.git"
|
|
9
|
-
},
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public"
|
|
12
|
-
},
|
|
13
|
-
"type": "module",
|
|
14
|
-
"main": "lib/index.js",
|
|
15
|
-
"types": "lib/index.d.ts",
|
|
16
|
-
"exports": {
|
|
17
|
-
".": {
|
|
18
|
-
"types": "./lib/index.d.ts",
|
|
19
|
-
"default": "./lib/index.js"
|
|
20
|
-
},
|
|
21
|
-
"./package.json": "./package.json"
|
|
22
|
-
},
|
|
23
|
-
"files": [
|
|
24
|
-
"lib",
|
|
25
|
-
"dsh-plugin.json",
|
|
26
|
-
"cordis.patch.yml",
|
|
27
|
-
"README.md",
|
|
28
|
-
"LICENSE"
|
|
29
|
-
],
|
|
30
|
-
"dsh": {
|
|
31
|
-
"bundle": {
|
|
32
|
-
"patch": "./cordis.patch.yml"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"engines": {
|
|
36
|
-
"node": "^22.19 || >=24"
|
|
37
|
-
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"build": "tsc -p tsconfig.json",
|
|
40
|
-
"clean": "node -e \"require('node:fs').rmSync('lib', { recursive: true, force: true })\"",
|
|
41
|
-
"smoke": "node scripts/smoke.mjs",
|
|
42
|
-
"verify": "npm run build && npm run smoke"
|
|
43
|
-
},
|
|
44
|
-
"peerDependencies": {
|
|
45
|
-
"@deepseek-ai/cordis": "^4.0.1",
|
|
46
|
-
"@deepseek-ai/dsh-attachment": "^0.1.0-rc.6 || ^0.1.1-rc.1 || 0.1.2-alpha.3 || 0.1.2-alpha.4 || 0.1.2-alpha.5 || 0.1.2-rc.1 || 0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.7-rc.1",
|
|
47
|
-
"@deepseek-ai/dsh-commands": "^0.1.0-rc.6 || ^0.1.1-rc.1 || 0.1.2-alpha.3 || 0.1.2-alpha.4 || 0.1.2-alpha.5 || 0.1.2-rc.1 || 0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.7-rc.1",
|
|
48
|
-
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6 || ^0.1.1-rc.1 || 0.1.2-alpha.3 || 0.1.2-alpha.4 || 0.1.2-alpha.5 || 0.1.2-rc.1 || 0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.7-rc.1",
|
|
49
|
-
"@deepseek-ai/dsh-llm-pi-ai": "^0.1.0-rc.6 || ^0.1.1-rc.1 || 0.1.2-alpha.3 || 0.1.2-alpha.4 || 0.1.2-alpha.5 || 0.1.2-rc.1 || 0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.7-rc.1",
|
|
50
|
-
"@deepseek-ai/dsh-user-questions": "^0.1.0-rc.6 || ^0.1.1-rc.1 || 0.1.2-alpha.3 || 0.1.2-alpha.4 || 0.1.2-alpha.5 || 0.1.2-rc.1 || 0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.7-rc.1",
|
|
51
|
-
"@deepseek-ai/schemastery": "^3.18.1"
|
|
52
|
-
},
|
|
53
|
-
"peerDependenciesMeta": {
|
|
54
|
-
"@deepseek-ai/dsh-attachment": {
|
|
55
|
-
"optional": true
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"devDependencies": {
|
|
59
|
-
"@deepseek-ai/cordis": "^4.0.1",
|
|
60
|
-
"@deepseek-ai/dsh-attachment": "^0.1.0-rc.6 || ^0.1.1-rc.1 || 0.1.2-alpha.3 || 0.1.2-alpha.4 || 0.1.2-alpha.5 || 0.1.2-rc.1 || 0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.7-rc.1",
|
|
61
|
-
"@deepseek-ai/dsh-commands": "^0.1.0-rc.6 || ^0.1.1-rc.1 || 0.1.2-alpha.3 || 0.1.2-alpha.4 || 0.1.2-alpha.5 || 0.1.2-rc.1 || 0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.7-rc.1",
|
|
62
|
-
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6 || ^0.1.1-rc.1 || 0.1.2-alpha.3 || 0.1.2-alpha.4 || 0.1.2-alpha.5 || 0.1.2-rc.1 || 0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.7-rc.1",
|
|
63
|
-
"@deepseek-ai/dsh-llm-pi-ai": "^0.1.0-rc.6 || ^0.1.1-rc.1 || 0.1.2-alpha.3 || 0.1.2-alpha.4 || 0.1.2-alpha.5 || 0.1.2-rc.1 || 0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.7-rc.1",
|
|
64
|
-
"@deepseek-ai/dsh-user-questions": "^0.1.0-rc.6 || ^0.1.1-rc.1 || 0.1.2-alpha.3 || 0.1.2-alpha.4 || 0.1.2-alpha.5 || 0.1.2-rc.1 || 0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.7-rc.1",
|
|
65
|
-
"@deepseek-ai/schemastery": "^3.18.1",
|
|
66
|
-
"@types/node": "^22.0.0",
|
|
67
|
-
"typescript": "^6.0.3"
|
|
68
|
-
}
|
|
69
|
-
}
|