@askdkc/dsh-cli 0.13.5 → 0.14.1
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/bin/{dsh-tui.js → dsh-cli.js} +27 -27
- package/cordis.patch.yml +32 -32
- package/cordis.yml +17 -17
- package/lib/types/activityPrefs.d.ts +2 -2
- package/lib/types/activityPrefs.js +2 -2
- package/lib/types/adapter/channel/actions.js +1 -1
- package/lib/types/adapter/channel/consumer.js +1 -1
- package/lib/types/adapter/channel/internal-token.js +1 -1
- package/lib/types/adapter/channel/plugins.js +1 -1
- package/lib/types/adapter/channel/session-projection.js +3 -3
- package/lib/types/adapter/channel/transcript.js +1 -1
- package/lib/types/adapter/channel/ui.js +3 -3
- package/lib/types/adapter/kernel/host-facade.d.ts +1 -1
- package/lib/types/adapter/kernel/host-facade.js +6 -6
- package/lib/types/adapter/kernel/host-probe-access.d.ts +1 -1
- package/lib/types/adapter/kernel/host-probe-access.js +6 -6
- package/lib/types/adapter/kernel/kernel-runtime.js +1 -1
- package/lib/types/adapter/kernel/legacy-facade.d.ts +1 -1
- package/lib/types/adapter/kernel/legacy-facade.js +1 -1
- package/lib/types/adapter/kernel/replay-isolation.js +1 -1
- package/lib/types/adapter/kernel/runtime.d.ts +1 -1
- package/lib/types/adapter/kernel/runtime.js +7 -7
- package/lib/types/adapter/ports/channel-display.d.ts +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +15 -15
- package/lib/types/adapter/standard/descriptor.d.ts +1 -1
- package/lib/types/adapter/standard/descriptor.js +2 -2
- package/lib/types/adapter/standard/registry.d.ts +1 -1
- package/lib/types/adapter/standard/registry.js +2 -2
- package/lib/types/adapter/standard/tui-extension.d.ts +2 -2
- package/lib/types/adapter/standard/tui-extension.js +3 -3
- package/lib/types/adapter/upstream/channel-driver.js +10 -10
- package/lib/types/adapter/upstream/decisions-driver.js +3 -3
- package/lib/types/adapter/upstream/extensions-driver.js +18 -18
- package/lib/types/adapter/upstream/host-descriptor-driver.js +4 -4
- package/lib/types/adapter/upstream/presentation-driver.js +5 -5
- package/lib/types/adapter/upstream/scenes-driver.js +4 -4
- package/lib/types/adapter/upstream/settings-driver.js +4 -4
- package/lib/types/adapter/upstream/workspace-driver.js +2 -2
- package/lib/types/bootstrap/state.d.ts +4 -4
- package/lib/types/bootstrap/state.js +4 -4
- package/lib/types/{tuiDisplayPrefs.d.ts → cliDisplayPrefs.d.ts} +1 -1
- package/lib/types/{tuiDisplayPrefs.d.ts.map → cliDisplayPrefs.d.ts.map} +1 -1
- package/lib/types/{tuiDisplayPrefs.js → cliDisplayPrefs.js} +1 -1
- package/lib/types/commands.js +7 -7
- package/lib/types/components/AutoRecapRow.d.ts +1 -1
- package/lib/types/components/AutoRecapRow.js +1 -1
- package/lib/types/components/HelpMenu.d.ts +1 -1
- package/lib/types/components/HelpMenu.js +1 -1
- package/lib/types/components/LogoV2.d.ts +2 -2
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +5 -19
- package/lib/types/components/MermaidDiagram.js +1 -1
- package/lib/types/components/MessageList.d.ts +2 -2
- package/lib/types/components/MessageList.js +1 -1
- package/lib/types/components/PageMargin.d.ts +3 -3
- package/lib/types/components/PageMargin.js +1 -1
- package/lib/types/components/PluginSceneBoundary.d.ts +1 -1
- package/lib/types/components/PluginSceneBoundary.js +1 -1
- package/lib/types/components/PromptInput.d.ts +1 -1
- package/lib/types/components/PromptInput.js +3 -3
- package/lib/types/components/ScrollbarGutter.d.ts +1 -1
- package/lib/types/components/ScrollbarGutter.js +1 -1
- package/lib/types/components/Select.d.ts +1 -1
- package/lib/types/components/Select.js +1 -1
- package/lib/types/components/SplitDiffView.d.ts +1 -1
- package/lib/types/components/ThemePicker.d.ts +1 -1
- package/lib/types/components/ThemePicker.js +1 -1
- package/lib/types/components/activityFrames.d.ts +1 -1
- package/lib/types/components/activityFrames.js +1 -1
- package/lib/types/components/design-system/Byline.d.ts +1 -1
- package/lib/types/components/design-system/Byline.js +1 -1
- package/lib/types/components/design-system/Divider.d.ts +1 -1
- package/lib/types/components/design-system/Divider.js +1 -1
- package/lib/types/components/design-system/StatusIcon.d.ts +1 -1
- package/lib/types/components/design-system/StatusIcon.js +1 -1
- package/lib/types/components/design-system/ThemeProvider.d.ts +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +11 -11
- package/lib/types/components/design-system/ThemedBox.d.ts +1 -1
- package/lib/types/components/design-system/ThemedBox.js +1 -1
- package/lib/types/components/design-system/ThemedText.d.ts +1 -1
- package/lib/types/components/design-system/ThemedText.js +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +3 -3
- package/lib/types/components/messages/AssistantToolUseMessage.js +1 -1
- package/lib/types/components/messages/originalImage.js +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +1 -1
- package/lib/types/components/smoothReveal.d.ts +1 -1
- package/lib/types/components/smoothReveal.js +1 -1
- package/lib/types/customTheme.d.ts +5 -5
- package/lib/types/customTheme.js +7 -7
- package/lib/types/dsh-adapter/activity-store.d.ts +1 -1
- package/lib/types/dsh-adapter/activity-store.js +3 -3
- package/lib/types/dsh-adapter/bundled-presets.js +2 -2
- package/lib/types/dsh-adapter/channel/action-readiness.js +2 -2
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +1 -1
- package/lib/types/dsh-adapter/channel/binding.js +14 -14
- package/lib/types/dsh-adapter/channel/external-commands.js +3 -3
- package/lib/types/dsh-adapter/channel/input-delivery.js +1 -1
- package/lib/types/dsh-adapter/channel/job-projection.js +1 -1
- package/lib/types/dsh-adapter/channel/lifetime-resources.js +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +1 -1
- package/lib/types/dsh-adapter/channel/mode-actions.js +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission.js +6 -6
- package/lib/types/dsh-adapter/channel/mode-roster.js +1 -1
- package/lib/types/dsh-adapter/channel/owner.js +2 -2
- package/lib/types/dsh-adapter/channel/preferences.js +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +1 -1
- package/lib/types/dsh-adapter/channel/reports.js +3 -3
- package/lib/types/dsh-adapter/channel/session-fork.js +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-metadata.js +2 -2
- package/lib/types/dsh-adapter/channel/session-rewind.js +2 -2
- package/lib/types/dsh-adapter/channel/state.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/state.js +1 -1
- package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
- package/lib/types/dsh-adapter/channel-ui.js +2 -2
- package/lib/types/dsh-adapter/channel.js +9 -9
- package/lib/types/dsh-adapter/cli-registration.d.ts.map +1 -1
- package/lib/types/dsh-adapter/cli-registration.js +5 -4
- package/lib/types/dsh-adapter/command-trees.d.ts +1 -1
- package/lib/types/dsh-adapter/command-trees.js +2 -2
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +3 -3
- package/lib/types/dsh-adapter/compat/sessionLog.js +5 -5
- package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/settings.js +15 -7
- package/lib/types/dsh-adapter/contract.d.ts +1 -1
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +0 -1
- package/lib/types/dsh-adapter/decision-guard.d.ts +3 -3
- package/lib/types/dsh-adapter/decision-guard.js +6 -6
- package/lib/types/dsh-adapter/dialogs.d.ts +1 -1
- package/lib/types/dsh-adapter/dialogs.js +7 -7
- package/lib/types/dsh-adapter/effect-ledger.d.ts +2 -2
- package/lib/types/dsh-adapter/effect-ledger.js +5 -5
- package/lib/types/dsh-adapter/extension-events.js +10 -10
- package/lib/types/dsh-adapter/extensions.d.ts +3 -3
- package/lib/types/dsh-adapter/extensions.js +3 -3
- package/lib/types/dsh-adapter/host-access.js +11 -11
- package/lib/types/dsh-adapter/ide-channel.d.ts +6 -6
- package/lib/types/dsh-adapter/ide-channel.js +6 -6
- package/lib/types/dsh-adapter/index.d.ts +18 -18
- package/lib/types/dsh-adapter/index.js +5 -5
- package/lib/types/dsh-adapter/inject-channel.d.ts +4 -4
- package/lib/types/dsh-adapter/inject-channel.js +5 -5
- package/lib/types/dsh-adapter/invariant.d.ts +9 -2
- package/lib/types/dsh-adapter/invariant.d.ts.map +1 -1
- package/lib/types/dsh-adapter/invariant.js +1 -1
- package/lib/types/dsh-adapter/message-observer.d.ts +2 -2
- package/lib/types/dsh-adapter/message-observer.js +23 -23
- package/lib/types/dsh-adapter/migrate/adapters/scan.js +1 -1
- package/lib/types/dsh-adapter/migrate/bin-path.d.ts +1 -1
- package/lib/types/dsh-adapter/migrate/bin-path.js +4 -4
- package/lib/types/dsh-adapter/migrate/picker.d.ts +1 -1
- package/lib/types/dsh-adapter/migrate/picker.js +1 -1
- package/lib/types/dsh-adapter/migrate/uuid.js +1 -1
- package/lib/types/dsh-adapter/packaged-presets.js +1 -1
- package/lib/types/dsh-adapter/plugin-host.d.ts +2 -2
- package/lib/types/dsh-adapter/plugin-host.js +32 -32
- package/lib/types/dsh-adapter/plugin-storage.d.ts +3 -3
- package/lib/types/dsh-adapter/plugin-storage.js +5 -5
- package/lib/types/dsh-adapter/plugin.d.ts +4 -4
- package/lib/types/dsh-adapter/plugin.js +89 -89
- package/lib/types/dsh-adapter/preset-resolution.d.ts +1 -1
- package/lib/types/dsh-adapter/presets.js +1 -1
- package/lib/types/dsh-adapter/promptDebug.js +1 -1
- package/lib/types/dsh-adapter/questions.d.ts +1 -1
- package/lib/types/dsh-adapter/questions.js +1 -1
- package/lib/types/dsh-adapter/renderers.js +7 -7
- package/lib/types/dsh-adapter/scenes.d.ts +1 -1
- package/lib/types/dsh-adapter/scenes.js +6 -6
- package/lib/types/dsh-adapter/settings-sections.d.ts +1 -1
- package/lib/types/dsh-adapter/settings-sections.js +5 -5
- package/lib/types/dsh-adapter/sharp.js +1 -1
- package/lib/types/dsh-adapter/shortcuts.js +9 -9
- package/lib/types/dsh-adapter/status.js +21 -21
- package/lib/types/dsh-adapter/themes.js +2 -2
- package/lib/types/dsh-adapter/toast.js +7 -7
- package/lib/types/dsh-adapter/types.d.ts +0 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/workspaces.d.ts +1 -1
- package/lib/types/dsh-adapter/workspaces.js +6 -6
- package/lib/types/effortPrefs.d.ts +2 -2
- package/lib/types/effortPrefs.js +2 -2
- package/lib/types/force-production-react.js +1 -1
- package/lib/types/herdr.js +4 -4
- package/lib/types/homePrefs.js +1 -1
- package/lib/types/i18n.d.ts +54 -54
- package/lib/types/i18n.js +39 -39
- package/lib/types/ink/clearTerminal.d.ts +1 -1
- package/lib/types/ink/clearTerminal.js +1 -1
- package/lib/types/ink/colorize.js +1 -1
- package/lib/types/ink/components/App.d.ts +1 -1
- package/lib/types/ink/components/App.js +5 -5
- package/lib/types/ink/components/Text.d.ts +1 -1
- package/lib/types/ink/devtools.d.ts +1 -1
- package/lib/types/ink/dom.d.ts +1 -1
- package/lib/types/ink/dom.js +1 -1
- package/lib/types/ink/geometry-trace.js +4 -4
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +8 -19
- package/lib/types/ink/reconciler.d.ts +1 -1
- package/lib/types/ink/reconciler.d.ts.map +1 -1
- package/lib/types/ink/reconciler.js +6 -3
- package/lib/types/ink/render-to-screen.d.ts.map +1 -1
- package/lib/types/ink/render-to-screen.js +0 -5
- package/lib/types/ink/terminal.js +3 -3
- package/lib/types/ink/termio/osc.js +1 -1
- package/lib/types/ink/update-overflow-guard.js +2 -2
- package/lib/types/minimalMode.d.ts +2 -2
- package/lib/types/minimalMode.js +2 -2
- package/lib/types/modelGroups.d.ts +1 -1
- package/lib/types/modelGroups.js +1 -1
- package/lib/types/modelPrefs.d.ts +1 -1
- package/lib/types/modelPrefs.js +1 -1
- package/lib/types/modelRecents.d.ts +2 -2
- package/lib/types/modelRecents.js +2 -2
- package/lib/types/package-version.d.ts +3 -0
- package/lib/types/package-version.d.ts.map +1 -0
- package/lib/types/package-version.js +25 -0
- package/lib/types/presetPrefs.d.ts +1 -1
- package/lib/types/presetPrefs.js +1 -1
- package/lib/types/reload.d.ts +8 -8
- package/lib/types/reload.js +4 -4
- package/lib/types/screens/Chat.js +27 -27
- package/lib/types/screens/StatusLine.js +1 -1
- package/lib/types/screens/StatusMetrics.js +1 -1
- package/lib/types/sessionHistory.d.ts +3 -3
- package/lib/types/sessionHistory.js +7 -7
- package/lib/types/sessionModes.js +1 -1
- package/lib/types/sessionMounts.d.ts +1 -1
- package/lib/types/sessionMounts.js +1 -1
- package/lib/types/sessionPins.d.ts +1 -1
- package/lib/types/sessionPins.js +1 -1
- package/lib/types/terminal-utils/cliHighlight.d.ts +1 -1
- package/lib/types/terminal-utils/hash.d.ts +1 -1
- package/lib/types/terminal-utils/hash.js +1 -1
- package/lib/types/terminal-utils/mermaid.d.ts +1 -1
- package/lib/types/terminal-utils/syntaxTheme.js +1 -1
- package/lib/types/theme.d.ts +3 -3
- package/lib/types/theme.js +3 -3
- package/lib/types/themePrefs.d.ts +3 -3
- package/lib/types/themePrefs.js +3 -3
- package/lib/types/tips.js +4 -4
- package/lib/types/trajectory/effortIgnition.d.ts +1 -1
- package/lib/types/trajectoryPrefs.d.ts +1 -1
- package/lib/types/trajectoryPrefs.js +1 -1
- package/lib/types/ui.d.ts +1 -1
- package/lib/types/ui.js +1 -1
- package/lib/types/update.d.ts +25 -26
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +55 -73
- package/lib/types/utils/clipboard.js +1 -1
- package/lib/types/utils/credentials.js +2 -2
- package/lib/types/utils/debug.d.ts +3 -3
- package/lib/types/utils/debug.js +6 -6
- package/lib/types/utils/earlyInput.d.ts +1 -1
- package/lib/types/utils/earlyInput.js +1 -1
- package/lib/types/utils/externalEditor.js +1 -1
- package/lib/types/utils/fullscreen.d.ts +3 -3
- package/lib/types/utils/fullscreen.js +4 -4
- package/lib/types/utils/log.js +1 -1
- package/lib/types/utils/paths.d.ts +3 -3
- package/lib/types/utils/paths.js +4 -4
- package/lib/types/working-activity.js +1 -1
- package/node_modules/@askdkc/dsh-auth/dsh-plugin.json +1 -1
- package/node_modules/@askdkc/dsh-auth/lib/index.d.ts +2 -2
- package/node_modules/@askdkc/dsh-auth/lib/index.js +2 -2
- package/node_modules/@askdkc/dsh-auth/lib/pi-ai.d.ts +0 -2
- package/node_modules/@askdkc/dsh-auth/lib/pi-ai.js +0 -2
- package/node_modules/@askdkc/dsh-auth/lib/service.d.ts +1 -1
- package/node_modules/@askdkc/dsh-auth/lib/service.js +2 -2
- package/node_modules/dsh-working-activity/lib/client.js.map +1 -1
- package/node_modules/dsh-working-activity/lib/types/client/index.d.ts +1 -1
- package/node_modules/dsh-working-activity/lib/types/config.d.ts +2 -2
- package/node_modules/dsh-working-activity/lib/types/config.js +2 -2
- package/node_modules/dsh-working-activity/lib/types/frames.d.ts +1 -1
- package/node_modules/dsh-working-activity/lib/types/frames.js +1 -1
- package/node_modules/dsh-working-activity/lib/types/index.d.ts +1 -1
- package/node_modules/dsh-working-activity/lib/types/index.js +2 -2
- package/node_modules/dsh-working-activity/lib/types/invariant.d.ts +13 -1
- package/node_modules/dsh-working-activity/lib/types/lang.d.ts +5 -5
- package/node_modules/dsh-working-activity/lib/types/lang.js +8 -8
- package/node_modules/dsh-working-activity/lib/types/projection.d.ts +1 -1
- package/node_modules/dsh-working-activity/lib/types/projection.js +1 -1
- package/node_modules/dsh-working-activity/lib/types/status.d.ts +1 -1
- package/node_modules/dsh-working-activity/lib/types/status.js +1 -1
- package/node_modules/dsh-working-activity/package.json +0 -4
- package/node_modules/dsh-working-activity/src/client/index.ts +1 -1
- package/node_modules/dsh-working-activity/src/config.ts +2 -2
- package/node_modules/dsh-working-activity/src/frames.ts +1 -1
- package/node_modules/dsh-working-activity/src/index.ts +4 -4
- package/node_modules/dsh-working-activity/src/invariant.ts +10 -3
- package/node_modules/dsh-working-activity/src/lang.ts +8 -8
- package/node_modules/dsh-working-activity/src/projection.ts +1 -1
- package/node_modules/dsh-working-activity/src/status.ts +1 -1
- package/package.json +8 -13
- package/presets/liangshen/agent.cordis.yml +1 -1
- package/presets/liangshen/custom-bash.mjs +2 -2
|
@@ -63,7 +63,7 @@ export type Config = {
|
|
|
63
63
|
customActions?: Record<string, string[]>
|
|
64
64
|
/** Inject the `⏵` self-narration contract into the system prompt and surface it. */
|
|
65
65
|
narrate?: boolean
|
|
66
|
-
/** UI language: `auto` follows `
|
|
66
|
+
/** UI language: `auto` follows `DSH_CLI_LANG` → `~/.dsh-cli/lang.json` →
|
|
67
67
|
* OS locale → zh; `zh`/`en` pin the copy directly. */
|
|
68
68
|
lang?: 'auto' | 'zh' | 'en' | 'ja' | 'input'
|
|
69
69
|
/** Default frame preset name (informational for UI consumers; the TUI
|
|
@@ -109,7 +109,7 @@ export const Config: Schemastery<Config> = z.object({
|
|
|
109
109
|
debugLog: z.boolean().default(false),
|
|
110
110
|
})
|
|
111
111
|
|
|
112
|
-
/** Structural view of the TUI prompt service; the real type lives in dsh-
|
|
112
|
+
/** Structural view of the TUI prompt service; the real type lives in dsh-cli. */
|
|
113
113
|
interface TuiPromptLike {
|
|
114
114
|
register(name: string, initialValue?: string): {
|
|
115
115
|
set(value: string | undefined): void
|
|
@@ -166,11 +166,11 @@ export function apply(ctx: Context, config: Config = {}): void {
|
|
|
166
166
|
workRemindAt: config.workRemindAt ?? 0,
|
|
167
167
|
debugLog: config.debugLog ?? false,
|
|
168
168
|
}
|
|
169
|
-
// Trace target for {@link traceLine}: `~/.dsh-
|
|
169
|
+
// Trace target for {@link traceLine}: `~/.dsh-cli` mirrors where the UI keeps
|
|
170
170
|
// this plugin's config file; the env var redirects it (tests, bug reports).
|
|
171
171
|
const debugLogPath = resolved.debugLog
|
|
172
172
|
? process.env.DSH_WORKING_ACTIVITY_DEBUG_LOG
|
|
173
|
-
?? join(homedir(), '.dsh-
|
|
173
|
+
?? join(homedir(), '.dsh-cli', 'working-activity-debug.log')
|
|
174
174
|
: undefined
|
|
175
175
|
// A pinned plugin-level language beats the env/file chain; releasing it on
|
|
176
176
|
// dispose restores `auto` for any other composition in the process.
|
|
@@ -5,7 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
import type { Context } from '@deepseek-ai/cordis'
|
|
7
7
|
import type { Session, SessionEvent } from '@deepseek-ai/dsh-session'
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
/** Compatibility boundary for hosts that still load invariant companions. */
|
|
10
|
+
type InvariantFailure = (message: string) => never
|
|
11
|
+
type InvariantContext = Context & {
|
|
12
|
+
invariants: {
|
|
13
|
+
register(packageName: string, installer: typeof install): () => void
|
|
14
|
+
}
|
|
15
|
+
}
|
|
9
16
|
|
|
10
17
|
/** Cordis companion plugin name. */
|
|
11
18
|
export const name = 'working-activity-invariant'
|
|
@@ -77,7 +84,7 @@ function loadedEvents(session: LoadedSession): readonly SessionEvent[] {
|
|
|
77
84
|
}
|
|
78
85
|
|
|
79
86
|
/** Install validation for loaded and newly appended activity snapshots. */
|
|
80
|
-
const install
|
|
87
|
+
const install = Object.assign((ctx: Context, fail: InvariantFailure) => {
|
|
81
88
|
for (const session of ctx.sessions.list()) {
|
|
82
89
|
for (const event of loadedEvents(session)) validateEvent(event, fail)
|
|
83
90
|
}
|
|
@@ -94,5 +101,5 @@ const install: InvariantInstaller = Object.assign((ctx: Context, fail: Invariant
|
|
|
94
101
|
* @param ctx - Cordis context carrying the invariant service.
|
|
95
102
|
* @returns the installed registration's disposer after setup succeeds.
|
|
96
103
|
*/
|
|
97
|
-
export const apply = (ctx:
|
|
104
|
+
export const apply = (ctx: InvariantContext): Promise<() => void> =>
|
|
98
105
|
Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install))
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Language resolution + copy dictionary for the working-activity plugin.
|
|
3
3
|
*
|
|
4
|
-
* The plugin follows the dsh-
|
|
5
|
-
* chain dsh-
|
|
4
|
+
* The plugin follows the dsh-cli UI language without importing it: the same
|
|
5
|
+
* chain dsh-cli resolves (`DSH_CLI_LANG` env → `~/.dsh-cli/lang.json` → OS
|
|
6
6
|
* locale → en) is read here directly, so a `/lang en|zh` switch (or the
|
|
7
7
|
* /settings language pick) hot-swaps rendered status-line copy. Model-facing
|
|
8
8
|
* narration instructions are locale-independent.
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* Resolution order:
|
|
11
11
|
* 1. `setLangOverride()` — a plugin-level `lang: zh|en` config key
|
|
12
12
|
* (cordis.yml) or an explicit test pin.
|
|
13
|
-
* 2. `
|
|
14
|
-
* 3. `~/.dsh-
|
|
13
|
+
* 2. `DSH_CLI_LANG` env var — pinned at process start.
|
|
14
|
+
* 3. `~/.dsh-cli/lang.json` — the persisted dsh-cli choice, mtime-cached
|
|
15
15
|
* so the per-tick status render never re-reads an unchanged file.
|
|
16
16
|
* 4. OS locale guess (`LC_ALL` / `LC_MESSAGES` / `LANG`); POSIX/C means
|
|
17
17
|
* "no locale selected" and maps to English.
|
|
@@ -64,8 +64,8 @@ export function detectInputLanguage(input: string): Lang | undefined {
|
|
|
64
64
|
return undefined
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
/** The dsh-
|
|
68
|
-
const LANG_FILE = join(homedir(), '.dsh-
|
|
67
|
+
/** The dsh-cli prefs file this plugin mirrors (shared language contract). */
|
|
68
|
+
const LANG_FILE = join(homedir(), '.dsh-cli', 'lang.json')
|
|
69
69
|
|
|
70
70
|
/** Model instructions never inherit the interface or terminal language. */
|
|
71
71
|
export const NARRATE_INSTRUCTION = '[Status line] You have a status line visible to the user. [Required] At the start of each step or subtask (not only before tool calls), write exactly one standalone line at the very beginning of your response: ⏵ a concrete description of what you are doing (20 words max), then continue with the normal response on the next line. Write only one ⏵ line per response and do not repeat it. Prioritize information so the user can understand the current work at a glance; keep the style natural and optionally playful. Examples: ⏵ Fixing the login page styles, ⏵ Investigating the error, ⏵ Running validation for the patch. Update it when the task changes. Write the status description in the same response language chosen for the user request; use English when unclear.'
|
|
@@ -118,7 +118,7 @@ export function langNow(): Lang {
|
|
|
118
118
|
const scoped = progressLanguage.getStore()
|
|
119
119
|
if (scoped !== undefined) return scoped
|
|
120
120
|
if (override !== 'auto') return override
|
|
121
|
-
const env = process.env.
|
|
121
|
+
const env = process.env.DSH_CLI_LANG
|
|
122
122
|
if (env === 'zh' || env === 'en') return env
|
|
123
123
|
return readLangFile() ?? detectLocaleLang()
|
|
124
124
|
}
|
|
@@ -145,7 +145,7 @@ export function isLang(value: unknown): value is Lang {
|
|
|
145
145
|
const LANG_FILE_PROBE_TTL_MS = 1000
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
|
-
* Read the persisted dsh-
|
|
148
|
+
* Read the persisted dsh-cli language choice.
|
|
149
149
|
*
|
|
150
150
|
* The probe is cached twice over: the parsed value is reused while the file's
|
|
151
151
|
* mtime is unchanged, and even the `statSync` itself is skipped for
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The browser cannot see the host's in-process state, and the previous
|
|
5
5
|
* transport (appending `activity/status` events into the shared session log)
|
|
6
|
-
* made the log unreadable for other readers — the reason dsh-
|
|
6
|
+
* made the log unreadable for other readers — the reason dsh-cli mounts this
|
|
7
7
|
* plugin with `publish: false`. A **session projection** is the supported
|
|
8
8
|
* replacement: the host folds committed events into a value and ships it to
|
|
9
9
|
* clients through the projection store, so nothing is written to the log.
|
|
@@ -643,7 +643,7 @@ export class ActivityTracker {
|
|
|
643
643
|
/**
|
|
644
644
|
* Feed one raw durable session event.
|
|
645
645
|
* @deprecated Host-shape input kept for one release so an already-published
|
|
646
|
-
* consumer that drives this tracker itself (dsh-
|
|
646
|
+
* consumer that drives this tracker itself (dsh-CLI ≤ 0.11.x calls this
|
|
647
647
|
* method) keeps working across the upgrade. New code normalizes through
|
|
648
648
|
* `src/compat/*` and calls {@link onEvent}. The parameter type is inferred
|
|
649
649
|
* from the compat function on purpose — this module must not import a DSH
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askdkc/dsh-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "Interactive terminal interface for DeepSeek Harness agents, sessions and tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
7
|
-
"dsh-
|
|
7
|
+
"dsh-cli",
|
|
8
8
|
"deepseek",
|
|
9
9
|
"deepseek-harness",
|
|
10
10
|
"cordis",
|
|
@@ -39,9 +39,7 @@
|
|
|
39
39
|
"#dsh-ecosystem-spec/tui-contributions": "./dsh-ecosystem-spec/protocols/tui-contributions.js"
|
|
40
40
|
},
|
|
41
41
|
"bin": {
|
|
42
|
-
"dsh-cli": "./bin/dsh-
|
|
43
|
-
"dsh-tui": "./bin/dsh-tui.js",
|
|
44
|
-
"dst": "./bin/dsh-tui.js"
|
|
42
|
+
"dsh-cli": "./bin/dsh-cli.js"
|
|
45
43
|
},
|
|
46
44
|
"main": "lib/types/index.js",
|
|
47
45
|
"types": "lib/types/index.d.ts",
|
|
@@ -125,10 +123,10 @@
|
|
|
125
123
|
"dev:copy-config": "node scripts/dev-copy-config.mjs",
|
|
126
124
|
"dev:test": "node scripts/verify-dev-command.mjs && node scripts/dev-test.mjs --no-launch",
|
|
127
125
|
"prompt:debug": "node scripts/read-prompt-debug.mjs",
|
|
128
|
-
"
|
|
126
|
+
"cli": "node --import tsx/esm scripts/run.ts",
|
|
129
127
|
"smoke": "node --import tsx/esm scripts/smoke.tsx",
|
|
130
128
|
"verify:build": "node scripts/run-verify-build.mjs",
|
|
131
|
-
"verify:build:inner": "npm run verify:boundary && npm run verify:contract && npm run verify:
|
|
129
|
+
"verify:build:inner": "npm run verify:boundary && npm run verify:contract && npm run verify:cli-startup-lifecycle && npm run verify:herdr && npm run verify:manifest-deps && npm run verify:patch-surface && npm run verify:patch-surface-regression && npm run verify:web-coexistence && npm run verify:plugin-spec && npm run verify:plugin-grants && npm run verify:plugin-storage && npm run verify:plugin-messages && npm run verify:plugin-ledger && npm run verify:plugin-commands && npm run verify:plugin-negotiation && npm run verify:plugin-lifecycle && npm run verify:runtime-themes && npm run verify:packaged-presets && npm run verify:history-search && npm run verify:initial-prompt && npm run verify:minimal-preset-tools && npm run verify:liangshen-bootstrap && npm run verify:inject-channel && npm run verify:wheel-selection && npm run verify:win32-protocol && npm run verify:selection-resize && npm run verify:selection-stale-guard && npm run verify:liangshen-instruction-hint && npm run verify:pointer-events && npm run verify:terminal-images && npm run verify:overlay-occlusion && npm run verify:transcript-images && npm run verify:image-preview && npm run verify:backdrop-dim && npm run verify:composer-image-tokens && npm run verify:image-downsample && npm run verify:chat-overlay && npm run verify:i18n && npm run verify:approval-visibility && npm run verify:adapter-skeleton && npm run verify:adapter-ports && npm run verify:adapter-effect-class && npm run verify:adapter-shadow && npm run verify:adapter-descriptor && npm run verify:adapter-upstream-driver && npm run verify:adapter-kernel-runtime && npm run verify:adapter-live-probes && npm run verify:adapter-slices && npm run verify:adapter-channel && npm run verify:binding-transaction && npm run verify:session-extraction && npm run verify:rewind-edit && npm run verify:model-mode-workspace-extraction && npm run verify:model-lifecycle-fences && npm run verify:reports-metadata && npm run verify:background-extraction && npm run verify:plugin-catalog-extraction && npm run verify:session-reset && npm run verify:channel-ui && npm run verify:adapter-detection && npm run verify:adapter-replay-harness && npm run verify:adapter-channel-conformance && npm run verify:protocol-single-source && npm run verify:compat-removal && npm run verify:terminal-images-sixel && npm run verify:sixel-transcript && npm run verify:migrate-sessions && npm run verify:fixed-window && npm run verify:cli-naming && npm run verify:source-hygiene && npm run verify:renderer-primitives && npm run verify:product-migration && npm run verify:spinner-identity && npm run verify:table-layout && npm run verify:mermaid-diagram && npm run verify:btw && npm run verify:session-mounts && npm run verify:progress-language && npm run verify:response-language",
|
|
132
130
|
"verify:boundary": "node --import tsx/esm scripts/verify-adapter-boundary.ts",
|
|
133
131
|
"verify:i18n": "node --import tsx/esm scripts/verify-i18n.ts",
|
|
134
132
|
"verify:contract": "node --import tsx/esm scripts/verify-upstream-contract.ts",
|
|
@@ -188,6 +186,7 @@
|
|
|
188
186
|
"bundle:standalone": "node scripts/make-standalone-bundle.mjs",
|
|
189
187
|
"verify:image-downsample": "node --import tsx/esm scripts/verify-image-downsample.tsx",
|
|
190
188
|
"verify:migrate-sessions": "node --import tsx/esm scripts/verify-migrate-sessions.ts",
|
|
189
|
+
"verify:cli-naming": "node scripts/verify-cli-naming.mjs",
|
|
191
190
|
"verify:source-hygiene": "node scripts/verify-source-hygiene.mjs",
|
|
192
191
|
"verify:renderer-primitives": "node --import tsx/esm scripts/verify-renderer-primitives.tsx",
|
|
193
192
|
"verify:product-migration": "node --import tsx/esm scripts/verify-product-migration.ts",
|
|
@@ -237,7 +236,8 @@
|
|
|
237
236
|
"verify:opencode-profile": "node scripts/verify-opencode-profile.mjs",
|
|
238
237
|
"verify:upstream-source": "node scripts/verify-upstream-source.mjs",
|
|
239
238
|
"update:dsh": "pnpm update '@deepseek-ai/dsh-*'",
|
|
240
|
-
"verify:
|
|
239
|
+
"verify:cli-startup-lifecycle": "node --import tsx/esm scripts/verify-cli-startup-lifecycle.mjs",
|
|
240
|
+
"test:compatibility": "node scripts/verify-compatibility.mjs"
|
|
241
241
|
},
|
|
242
242
|
"peerDependencies": {
|
|
243
243
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
@@ -247,7 +247,6 @@
|
|
|
247
247
|
"@deepseek-ai/dsh-atomic-write": "*",
|
|
248
248
|
"@deepseek-ai/dsh-commands": "*",
|
|
249
249
|
"@deepseek-ai/dsh-cordis-host-runner": "*",
|
|
250
|
-
"@deepseek-ai/dsh-invariants": "*",
|
|
251
250
|
"@deepseek-ai/dsh-llm": "*",
|
|
252
251
|
"@deepseek-ai/dsh-llm-pi-ai": "*",
|
|
253
252
|
"@deepseek-ai/dsh-persona": "*",
|
|
@@ -296,9 +295,6 @@
|
|
|
296
295
|
"@deepseek-ai/dsh-cordis-host-runner": {
|
|
297
296
|
"optional": true
|
|
298
297
|
},
|
|
299
|
-
"@deepseek-ai/dsh-invariants": {
|
|
300
|
-
"optional": true
|
|
301
|
-
},
|
|
302
298
|
"@deepseek-ai/dsh-llm": {
|
|
303
299
|
"optional": true
|
|
304
300
|
},
|
|
@@ -438,7 +434,6 @@
|
|
|
438
434
|
"@deepseek-ai/dsh-fs": "alpha",
|
|
439
435
|
"@deepseek-ai/dsh-fs-local": "alpha",
|
|
440
436
|
"@deepseek-ai/dsh-home-paths": "alpha",
|
|
441
|
-
"@deepseek-ai/dsh-invariants": "alpha",
|
|
442
437
|
"@deepseek-ai/dsh-llm": "alpha",
|
|
443
438
|
"@deepseek-ai/dsh-llm-pi-ai": "alpha",
|
|
444
439
|
"@deepseek-ai/dsh-persona": "alpha",
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
# tool name as the persistent shell with a Minimal-compatible description, but
|
|
170
170
|
# executes through the ordinary cross-platform subprocess seam (`bash -c`)
|
|
171
171
|
# instead of a PTY. The Git Bash executable is DISCOVERED at preset mount:
|
|
172
|
-
# an explicit `config.bashPath` (or
|
|
172
|
+
# an explicit `config.bashPath` (or DSH_CLI_LIANGSHEN_BASH_PATH) is honored as
|
|
173
173
|
# the only candidate, otherwise a PATH git.exe is followed to its install tree
|
|
174
174
|
# (installer/portable/Scoop layouts, Scoop shims followed), then conventional
|
|
175
175
|
# roots, then bare `bash` — never the System32 WSL launcher. A miss warns and
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* Executable resolution, in order (an explicit entry is the ONLY candidate:
|
|
17
17
|
* a miss fails loudly instead of silently substituting a guess):
|
|
18
|
-
* 1. explicit `config.bashPath` or the `
|
|
18
|
+
* 1. explicit `config.bashPath` or the `DSH_CLI_LIANGSHEN_BASH_PATH`
|
|
19
19
|
* environment variable (absolute path to a Git Bash bash.exe);
|
|
20
20
|
* 2. a `git` on PATH followed to its installation tree — every Windows Git
|
|
21
21
|
* install ships bash next to git, wherever it was installed, so this
|
|
@@ -79,7 +79,7 @@ function addCandidate(candidates, seen, candidate) {
|
|
|
79
79
|
|
|
80
80
|
/** The explicit override, if any: `config.bashPath`, else the environment variable. */
|
|
81
81
|
function explicitBashPath(config, environment) {
|
|
82
|
-
for (const value of [config.bashPath, environment.
|
|
82
|
+
for (const value of [config.bashPath, environment.DSH_CLI_LIANGSHEN_BASH_PATH]) {
|
|
83
83
|
if (typeof value === 'string' && value.length > 0) return value
|
|
84
84
|
}
|
|
85
85
|
return undefined
|