@askdkc/dsh-cli 0.13.5 → 0.14.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/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/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 +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/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/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/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/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 -8
- package/presets/liangshen/agent.cordis.yml +1 -1
- package/presets/liangshen/custom-bash.mjs +2 -2
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* P2 callers normally obtain this from `KernelRuntime.facade()`, which backs
|
|
5
5
|
* the descriptor port with the unified kernel lifecycle evidence.
|
|
6
6
|
* `facadeFromLegacy` remains only as a long-term compatibility fallback for
|
|
7
|
-
* bare/test compositions (outside P6 removal scope; owner: dsh-
|
|
7
|
+
* bare/test compositions (outside P6 removal scope; owner: dsh-cli adapter).
|
|
8
8
|
* Hard rules:
|
|
9
9
|
* - It performs no business logic, no protocol translation, no capability
|
|
10
10
|
* detection, no registry, and stores no mutable host state.
|
|
@@ -91,20 +91,20 @@ const PORT_METHOD_CAPABILITIES = Object.freeze({
|
|
|
91
91
|
function assertPortMethod(mode, capability) {
|
|
92
92
|
const effectClass = effectClassFor(capability);
|
|
93
93
|
if (effectClass === undefined) {
|
|
94
|
-
throw new Error(`dsh-
|
|
94
|
+
throw new Error(`dsh-cli: Host Port method has no registered effect class: ${capability}`);
|
|
95
95
|
}
|
|
96
96
|
assertShadowPolicy(effectClass, mode);
|
|
97
97
|
}
|
|
98
98
|
function wrapPort(port, portName, mode) {
|
|
99
99
|
const capabilities = PORT_METHOD_CAPABILITIES[portName];
|
|
100
100
|
if (capabilities === undefined) {
|
|
101
|
-
throw new Error(`dsh-
|
|
101
|
+
throw new Error(`dsh-cli: no shadow-policy map for Host Port "${portName}"`);
|
|
102
102
|
}
|
|
103
103
|
const wrapped = {};
|
|
104
104
|
for (const key of Object.keys(port)) {
|
|
105
105
|
const capability = capabilities[key];
|
|
106
106
|
if (capability === undefined) {
|
|
107
|
-
throw new Error(`dsh-
|
|
107
|
+
throw new Error(`dsh-cli: Host Port "${portName}" method "${key}" is missing from the shadow-policy map`);
|
|
108
108
|
}
|
|
109
109
|
const descriptor = Object.getOwnPropertyDescriptor(port, key);
|
|
110
110
|
if (descriptor?.get !== undefined) {
|
|
@@ -139,13 +139,13 @@ function wrapChannelPort(port, mode) {
|
|
|
139
139
|
continue;
|
|
140
140
|
const capabilities = CHANNEL_PORT_CAPABILITIES[subName];
|
|
141
141
|
if (capabilities === undefined) {
|
|
142
|
-
throw new Error(`dsh-
|
|
142
|
+
throw new Error(`dsh-cli: Host Channel sub-port "${subName}" is missing from the shadow-policy map`);
|
|
143
143
|
}
|
|
144
144
|
const subWrapped = {};
|
|
145
145
|
for (const key of Object.keys(subPort)) {
|
|
146
146
|
const capability = capabilities[key];
|
|
147
147
|
if (capability === undefined) {
|
|
148
|
-
throw new Error(`dsh-
|
|
148
|
+
throw new Error(`dsh-cli: Host Channel "${subName}" method "${key}" is missing from the shadow-policy map`);
|
|
149
149
|
}
|
|
150
150
|
const original = subPort[key];
|
|
151
151
|
if (typeof original === 'function') {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* IMPORTANT trust boundary:
|
|
11
11
|
*
|
|
12
|
-
* This module is NOT a security boundary. dsh-
|
|
12
|
+
* This module is NOT a security boundary. dsh-CLI's plugin model is
|
|
13
13
|
* trusted-in-process; any code running in the same process can locate the
|
|
14
14
|
* package root through `package.json` and absolutely import the compiled
|
|
15
15
|
* internal file (for example `lib/adapter/kernel/host-probe-access.js`).
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* IMPORTANT trust boundary:
|
|
11
11
|
*
|
|
12
|
-
* This module is NOT a security boundary. dsh-
|
|
12
|
+
* This module is NOT a security boundary. dsh-CLI's plugin model is
|
|
13
13
|
* trusted-in-process; any code running in the same process can locate the
|
|
14
14
|
* package root through `package.json` and absolutely import the compiled
|
|
15
15
|
* internal file (for example `lib/adapter/kernel/host-probe-access.js`).
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* public API.
|
|
31
31
|
*/
|
|
32
32
|
/** Opaque host-only token. Module-local; deliberately not exported. */
|
|
33
|
-
const HOST_PROBE_TOKEN = Symbol('dsh-
|
|
33
|
+
const HOST_PROBE_TOKEN = Symbol('dsh-cli.host-probe-token');
|
|
34
34
|
/** The Cordis traceable-proxy unwrap marker used by the host-access module. */
|
|
35
35
|
const CORDIS_ORIGINAL = Symbol.for('cordis.original');
|
|
36
36
|
function unwrapService(service) {
|
|
@@ -92,7 +92,7 @@ export function hasMessageLiveProbe(service) {
|
|
|
92
92
|
}
|
|
93
93
|
function assertOptionalHostToken(token) {
|
|
94
94
|
if (token !== undefined && token !== HOST_PROBE_TOKEN) {
|
|
95
|
-
throw new Error('dsh-
|
|
95
|
+
throw new Error('dsh-cli: host-only live probe access denied');
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
export async function runCommandLiveProbe(service, token) {
|
|
@@ -100,7 +100,7 @@ export async function runCommandLiveProbe(service, token) {
|
|
|
100
100
|
const key = unwrapService(service);
|
|
101
101
|
const runner = key === undefined ? undefined : commandRunners.get(key);
|
|
102
102
|
if (runner === undefined)
|
|
103
|
-
throw new Error('dsh-
|
|
103
|
+
throw new Error('dsh-cli: host command live probe accessor is not registered');
|
|
104
104
|
return runner(token);
|
|
105
105
|
}
|
|
106
106
|
export async function runStorageLiveProbe(service, token) {
|
|
@@ -108,7 +108,7 @@ export async function runStorageLiveProbe(service, token) {
|
|
|
108
108
|
const key = unwrapService(service);
|
|
109
109
|
const runner = key === undefined ? undefined : storageRunners.get(key);
|
|
110
110
|
if (runner === undefined)
|
|
111
|
-
throw new Error('dsh-
|
|
111
|
+
throw new Error('dsh-cli: host storage live probe accessor is not registered');
|
|
112
112
|
return runner(token);
|
|
113
113
|
}
|
|
114
114
|
export async function runMessageLiveProbe(service, token) {
|
|
@@ -116,6 +116,6 @@ export async function runMessageLiveProbe(service, token) {
|
|
|
116
116
|
const key = unwrapService(service);
|
|
117
117
|
const runner = key === undefined ? undefined : messageRunners.get(key);
|
|
118
118
|
if (runner === undefined)
|
|
119
|
-
throw new Error('dsh-
|
|
119
|
+
throw new Error('dsh-cli: host message live probe accessor is not registered');
|
|
120
120
|
return runner(token);
|
|
121
121
|
}
|
|
@@ -450,7 +450,7 @@ export class KernelRuntime {
|
|
|
450
450
|
if (this.mountedDriverIds.has(driver.id))
|
|
451
451
|
continue;
|
|
452
452
|
if (driver.mountEffectClass === undefined) {
|
|
453
|
-
throw new Error(`dsh-
|
|
453
|
+
throw new Error(`dsh-cli: driver "${driver.id}" must declare mountEffectClass`);
|
|
454
454
|
}
|
|
455
455
|
// Shadow modes must not abort the whole mount transaction because the
|
|
456
456
|
// first selected driver is non-read-only. Skip disallowed drivers and
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* `facadeFromLegacy` is a retained long-term compatibility fallback for
|
|
12
12
|
* bare/test compositions and is explicitly outside the P6 removal scope.
|
|
13
|
-
* OWNER: dsh-
|
|
13
|
+
* OWNER: dsh-cli adapter. UNTIL: no scheduled removal.
|
|
14
14
|
*/
|
|
15
15
|
import type { HostDescriptorBuild } from '../standard/descriptor.js';
|
|
16
16
|
import { type HostFacade } from './host-facade.js';
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* `facadeFromLegacy` is a retained long-term compatibility fallback for
|
|
12
12
|
* bare/test compositions and is explicitly outside the P6 removal scope.
|
|
13
|
-
* OWNER: dsh-
|
|
13
|
+
* OWNER: dsh-cli adapter. UNTIL: no scheduled removal.
|
|
14
14
|
*/
|
|
15
15
|
import { createHostFacade } from './host-facade.js';
|
|
16
16
|
export function facadeFromLegacy(services) {
|
|
@@ -28,7 +28,7 @@ export function withReplayIsolation(callback) {
|
|
|
28
28
|
export function enterReplayIsolation() {
|
|
29
29
|
const state = replayIsolationStorage.getStore();
|
|
30
30
|
if (state === undefined) {
|
|
31
|
-
throw new Error('dsh-
|
|
31
|
+
throw new Error('dsh-cli: replay isolation must be entered through withReplayIsolation() or runReplayShadow(); a process-global replay permit is not allowed');
|
|
32
32
|
}
|
|
33
33
|
state.depth += 1;
|
|
34
34
|
let released = false;
|
|
@@ -34,7 +34,7 @@ export declare const ADAPTER_SLICE_ALIASES: Readonly<Record<string, string>>;
|
|
|
34
34
|
* Slice ids are case-insensitive and surrounding whitespace is ignored.
|
|
35
35
|
* Known aliases are mapped to their canonical slice id. Unknown ids are
|
|
36
36
|
* rejected loudly (fail-closed) instead of being silently ignored: a typo in
|
|
37
|
-
* `
|
|
37
|
+
* `DSH_CLI_ADAPTER_SLICES` must never accidentally broaden or narrow the
|
|
38
38
|
* governed adapter surface without the operator noticing.
|
|
39
39
|
*/
|
|
40
40
|
export declare function normalizeAdapterSliceList(slices: readonly string[]): readonly string[];
|
|
@@ -206,7 +206,7 @@ export function parseAdapterMode(value) {
|
|
|
206
206
|
case 'new':
|
|
207
207
|
return normalized;
|
|
208
208
|
default:
|
|
209
|
-
throw new Error(`dsh-
|
|
209
|
+
throw new Error(`dsh-cli: unknown DSH_CLI_ADAPTER_MODE ${JSON.stringify(value)}; valid modes: legacy, passive-shadow, replay-shadow, new`);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
export const ADAPTER_SLICE_ALIASES = Object.freeze({
|
|
@@ -235,7 +235,7 @@ function canonicalAdapterSlice(value) {
|
|
|
235
235
|
* Slice ids are case-insensitive and surrounding whitespace is ignored.
|
|
236
236
|
* Known aliases are mapped to their canonical slice id. Unknown ids are
|
|
237
237
|
* rejected loudly (fail-closed) instead of being silently ignored: a typo in
|
|
238
|
-
* `
|
|
238
|
+
* `DSH_CLI_ADAPTER_SLICES` must never accidentally broaden or narrow the
|
|
239
239
|
* governed adapter surface without the operator noticing.
|
|
240
240
|
*/
|
|
241
241
|
export function normalizeAdapterSliceList(slices) {
|
|
@@ -245,7 +245,7 @@ export function normalizeAdapterSliceList(slices) {
|
|
|
245
245
|
if (name === '')
|
|
246
246
|
continue;
|
|
247
247
|
if (!KNOWN_ADAPTER_SLICES.has(name)) {
|
|
248
|
-
throw new Error(`dsh-
|
|
248
|
+
throw new Error(`dsh-cli: unknown adapter slice "${raw}"; valid slices: ${[...KNOWN_ADAPTER_SLICES].sort().join(', ')}`);
|
|
249
249
|
}
|
|
250
250
|
if (!normalized.includes(name))
|
|
251
251
|
normalized.push(name);
|
|
@@ -254,8 +254,8 @@ export function normalizeAdapterSliceList(slices) {
|
|
|
254
254
|
}
|
|
255
255
|
export function parseAdapterRuntime(env = process.env) {
|
|
256
256
|
return Object.freeze({
|
|
257
|
-
mode: parseAdapterMode(env.
|
|
258
|
-
slices: normalizeAdapterSliceList((env.
|
|
257
|
+
mode: parseAdapterMode(env.DSH_CLI_ADAPTER_MODE),
|
|
258
|
+
slices: normalizeAdapterSliceList((env.DSH_CLI_ADAPTER_SLICES ?? '').split(',')),
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
@@ -294,7 +294,7 @@ export function shadowPolicyAllowed(effectClass, mode) {
|
|
|
294
294
|
}
|
|
295
295
|
export function assertShadowPolicy(effectClass, mode) {
|
|
296
296
|
if (!shadowPolicyAllowed(effectClass, mode)) {
|
|
297
|
-
throw new Error(`dsh-
|
|
297
|
+
throw new Error(`dsh-cli: shadow policy denies ${effectClass} in ${mode} mode`);
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
/**
|
|
@@ -313,7 +313,7 @@ export function assertCapabilityShadowPolicy(capability, mode, slices) {
|
|
|
313
313
|
return;
|
|
314
314
|
const effectClass = effectClassFor(capability);
|
|
315
315
|
if (effectClass === undefined) {
|
|
316
|
-
throw new Error(`dsh-
|
|
316
|
+
throw new Error(`dsh-cli: capability has no registered effect class: ${capability}`);
|
|
317
317
|
}
|
|
318
318
|
assertShadowPolicy(effectClass, mode);
|
|
319
319
|
}
|
|
@@ -18,7 +18,7 @@ export type ScrollGutterMode = 'timeline' | 'scrollbar' | 'hidden';
|
|
|
18
18
|
/** A stored page-margin setting: a preset name or a custom spec. */
|
|
19
19
|
export type PageMarginSetting = PageMarginMode | PageMarginSpec;
|
|
20
20
|
/**
|
|
21
|
-
* Root page inset (settings `dsh-
|
|
21
|
+
* Root page inset (settings `dsh-cli.pageMargin`): some terminals carry
|
|
22
22
|
* their own viewport padding (Windows Terminal's 8px default, GUI
|
|
23
23
|
* emulators), others — bare WSL, tmux, SSH — have none, so the UI text
|
|
24
24
|
* touches the screen edges. A setting is either a preset name
|
|
@@ -35,7 +35,7 @@ export interface ChannelUi {
|
|
|
35
35
|
readonly sessionId: string;
|
|
36
36
|
/** TUI-owned generation that changes on every live Agent rebind. */
|
|
37
37
|
readonly agentBindingGeneration: number;
|
|
38
|
-
/** `dsh-
|
|
38
|
+
/** `dsh-cli.recapOnOpen` (default on): auto-summarize the session tail
|
|
39
39
|
* into the dim AutoRecapRow when the session opens/resumes. Read live
|
|
40
40
|
* (settings service), so a `/settings` change applies on the next
|
|
41
41
|
* session switch; absent settings service → on. */
|
|
@@ -116,39 +116,39 @@ export interface ChannelUi {
|
|
|
116
116
|
/** Live tool-card background treatment. */
|
|
117
117
|
readonly toolBackground: ToolBackground;
|
|
118
118
|
/** What the fullscreen transcript's right gutter shows (settings
|
|
119
|
-
* `dsh-
|
|
119
|
+
* `dsh-cli.scrollGutter`: turn timeline / proportional scrollbar /
|
|
120
120
|
* nothing). */
|
|
121
121
|
readonly scrollGutter: ScrollGutterMode;
|
|
122
|
-
/** Root page inset (settings `dsh-
|
|
122
|
+
/** Root page inset (settings `dsh-cli.pageMargin`): a preset name
|
|
123
123
|
* (`none` / `slim` / `normal` (default) / `roomy`) or a custom `NxM`
|
|
124
124
|
* spec (columns per side × rows top/bottom) inset the whole UI from the
|
|
125
125
|
* terminal edges — terminals without their own viewport padding (bare
|
|
126
126
|
* WSL, tmux, SSH) otherwise hug the screen border. */
|
|
127
127
|
readonly pageMargin: PageMarginSetting;
|
|
128
|
-
/** Terminal-card header folding (settings `dsh-
|
|
128
|
+
/** Terminal-card header folding (settings `dsh-cli.foldTerminalCommand`):
|
|
129
129
|
* collapse a multi-line command title to its first line + count hint. */
|
|
130
130
|
readonly foldTerminalCommand: boolean;
|
|
131
131
|
/** Whether the session-name chip shows on the prompt top border's right
|
|
132
|
-
* side (settings `dsh-
|
|
132
|
+
* side (settings `dsh-cli.promptSessionLabel`; off by default). */
|
|
133
133
|
readonly promptSessionLabel: boolean;
|
|
134
134
|
/** Whether the fullscreen draft editor is enabled (settings
|
|
135
|
-
* `dsh-
|
|
135
|
+
* `dsh-cli.expandEditor`; on by default) — gates the ⛶ affordance and
|
|
136
136
|
* the expandEditor shortcut. */
|
|
137
137
|
readonly expandEditor: boolean;
|
|
138
|
-
/** Smooth streaming reveal (settings `dsh-
|
|
138
|
+
/** Smooth streaming reveal (settings `dsh-cli.smoothStreaming`; on by
|
|
139
139
|
* default): live-arriving assistant text, expanded thinking, and tool
|
|
140
140
|
* call bodies paint through a ~30fps reveal instead of jumping per
|
|
141
141
|
* provider burst. */
|
|
142
142
|
readonly smoothStreaming: boolean;
|
|
143
143
|
/** Live status-footer visibility and compactness preferences. */
|
|
144
144
|
readonly statusBar: Readonly<StatusBarConfig>;
|
|
145
|
-
/** Whether the header's pixel whale art shows (settings `dsh-
|
|
145
|
+
/** Whether the header's pixel whale art shows (settings `dsh-cli.whale`). */
|
|
146
146
|
readonly whale: boolean;
|
|
147
|
-
/** Idle whale behaviors switch (settings `dsh-
|
|
147
|
+
/** Idle whale behaviors switch (settings `dsh-cli.whaleIdle`). */
|
|
148
148
|
readonly whaleIdle: boolean;
|
|
149
149
|
/** Apply an idle-whale-behavior change (see the public Channel type). */
|
|
150
150
|
setWhaleIdle(enabled: boolean): void;
|
|
151
|
-
/** Minimal mode (settings `dsh-
|
|
151
|
+
/** Minimal mode (settings `dsh-cli.minimal`): no header splash, no emoji
|
|
152
152
|
* glyphs, no decorative colors; code highlight and tool colors stay. */
|
|
153
153
|
readonly minimal: boolean;
|
|
154
154
|
/** Whether the working-activity line is shown (config.activity); the line
|
|
@@ -207,7 +207,7 @@ export interface ChannelUi {
|
|
|
207
207
|
runExternalCommandOutcome(name: string, rawInput: string, images?: readonly ComposerImageRef[]): Promise<ExternalCommandOutcome | undefined>;
|
|
208
208
|
/**
|
|
209
209
|
* Plugin-registered full-screen scene currently replacing the conversation
|
|
210
|
-
* (the `dsh-
|
|
210
|
+
* (the `dsh-cli-scenes` runtime), if any. The chat screen renders its
|
|
211
211
|
* component INSTEAD of the transcript — the same whole-terminal treatment
|
|
212
212
|
* the trajectory scene gets — and hands it the keyboard; `undefined`
|
|
213
213
|
* renders the conversation normally.
|
|
@@ -368,7 +368,7 @@ export interface ChannelUi {
|
|
|
368
368
|
}>;
|
|
369
369
|
/** Set one effort level by id (validated against the adapter list);
|
|
370
370
|
* false + a notify when the id is not offered. Persists like the old
|
|
371
|
-
* Shift+Tab cycle (~/.dsh-
|
|
371
|
+
* Shift+Tab cycle (~/.dsh-cli/effort.json). */
|
|
372
372
|
setEffort(id: string): Promise<boolean>;
|
|
373
373
|
/** Re-seat the future-sessions default reasoning effort (cordis.yml
|
|
374
374
|
* `effort` → persisted /effort choice → adapter default). The live agent
|
|
@@ -417,7 +417,7 @@ export interface ChannelUi {
|
|
|
417
417
|
timeoutMs?: number;
|
|
418
418
|
}): () => void;
|
|
419
419
|
/** Switch the working-activity indicator preset (`/activity`): validates
|
|
420
|
-
* the name, persists it to `~/.dsh-
|
|
420
|
+
* the name, persists it to `~/.dsh-cli/working-activity.json`, and
|
|
421
421
|
* re-renders the indicator immediately; false when the name is unknown
|
|
422
422
|
* or the preference cannot be written. */
|
|
423
423
|
setActivityFrames(name: string): boolean;
|
|
@@ -473,7 +473,7 @@ export interface ChannelUi {
|
|
|
473
473
|
listSessions(onEnriched?: (summary: SessionSummary) => void): Promise<readonly SessionSummary[]>;
|
|
474
474
|
/** Trailing exchanges of a persisted session, for the browser's preview. */
|
|
475
475
|
previewSession(sessionId: string): Promise<readonly PreviewEntry[]>;
|
|
476
|
-
/** Mark a session for `dsh-
|
|
476
|
+
/** Mark a session for `dsh-cli --resume` on the next launch. */
|
|
477
477
|
setResumeTarget(sessionId: string): void;
|
|
478
478
|
/** Rename the current session (`/rename`): appends a `session/title`
|
|
479
479
|
* event, which the status line and the /resume picker both read. */
|
|
@@ -504,7 +504,7 @@ export interface ChannelUi {
|
|
|
504
504
|
pushLocal(title: string, lines: readonly string[]): void;
|
|
505
505
|
/** MCP server/tool status for /mcp: one line per server, or setup guidance. */
|
|
506
506
|
mcpStatus(): string[];
|
|
507
|
-
/** Write the conversation transcript to `dsh-
|
|
507
|
+
/** Write the conversation transcript to `dsh-cli-export-<ts>.md` in the
|
|
508
508
|
* session cwd; returns the written path, or null on failure. */
|
|
509
509
|
exportSession(): string | null;
|
|
510
510
|
/** Create `AGENTS.md` in the session cwd (DSH workspace-context file);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Build the current dsh-
|
|
1
|
+
/** Build the current dsh-CLI Host Descriptor from live Kernel lifecycle evidence. */
|
|
2
2
|
import type { ContractCoordinate, HostDescriptor } from './types.js';
|
|
3
3
|
import type { CapabilityLifecycle } from '../kernel/lifecycle.js';
|
|
4
4
|
import { HOST_SUPPORTED_CONTRACTS } from '../spec/protocol-constants.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Build the current dsh-
|
|
1
|
+
/** Build the current dsh-CLI Host Descriptor from live Kernel lifecycle evidence. */
|
|
2
2
|
import { readFileSync } from 'node:fs';
|
|
3
3
|
import { dirname, join } from 'node:path';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
@@ -316,7 +316,7 @@ export function buildHostDescriptor(options) {
|
|
|
316
316
|
}
|
|
317
317
|
const descriptor = {
|
|
318
318
|
$schema: 'urn:dsh-tui:host-descriptor:0.15',
|
|
319
|
-
hostId: options.hostId ?? 'dsh-
|
|
319
|
+
hostId: options.hostId ?? 'dsh-cli',
|
|
320
320
|
hostVersion: options.hostVersion ?? readOwnPackageVersion(),
|
|
321
321
|
facetApiVersions: [...facetApiVersions],
|
|
322
322
|
contracts,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Load and verify the pinned dsh-
|
|
1
|
+
/** Load and verify the pinned dsh-CLI admission profile. */
|
|
2
2
|
import type { ContractRegistry, PermissionRegistry, RegistryEntry } from './types.js';
|
|
3
3
|
export declare const DSH_STD_REVISION = "614dfa1ac168db79fcf4577cf0ebb34e2e3b944b";
|
|
4
4
|
export declare const ECOSYSTEM_SPEC_REVISION = "d28c267fe7fd775428ec2dccd65b0b7efd4dacee";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Load and verify the pinned dsh-
|
|
1
|
+
/** Load and verify the pinned dsh-CLI admission profile. */
|
|
2
2
|
import { createHash } from 'node:crypto';
|
|
3
3
|
import { existsSync, readFileSync } from 'node:fs';
|
|
4
4
|
import { dirname, join } from 'node:path';
|
|
@@ -172,7 +172,7 @@ export function verifyRegistry(data) {
|
|
|
172
172
|
failures.push(`${key}: duplicate registry coordinate`);
|
|
173
173
|
coordinates.add(key);
|
|
174
174
|
if ('authority' in entry && !entry.coordinates.apiVersion.startsWith('tui.dsh/')) {
|
|
175
|
-
failures.push(`${key}: dsh-
|
|
175
|
+
failures.push(`${key}: dsh-cli definition must use the private protocol group`);
|
|
176
176
|
}
|
|
177
177
|
if (!protocols.understands(entry.coordinates))
|
|
178
178
|
failures.push(`${key}: ProtocolCatalog definition unavailable`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* dsh-
|
|
2
|
+
* dsh-CLI private protocol registration on the shared dsh-std catalog.
|
|
3
3
|
*
|
|
4
4
|
* Private protocol definitions are NOT authored here. The canonical
|
|
5
5
|
* dsh-ecosystem-spec definitions are loaded through `src/adapter/spec/`; this
|
|
@@ -19,7 +19,7 @@ export declare function getAdmissionCatalog(): AdmissionCatalog;
|
|
|
19
19
|
/** Backward-compatible factory retained as a long-term compatibility face
|
|
20
20
|
* for existing callers. It now returns the same process-level canonical
|
|
21
21
|
* catalog rather than allocating a new one, so no second admission core can
|
|
22
|
-
* appear in production. OWNER: dsh-
|
|
22
|
+
* appear in production. OWNER: dsh-cli adapter. UNTIL: no scheduled removal.
|
|
23
23
|
*/
|
|
24
24
|
export declare function createAdmissionCatalog(): AdmissionCatalog;
|
|
25
25
|
//# sourceMappingURL=tui-extension.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* dsh-
|
|
2
|
+
* dsh-CLI private protocol registration on the shared dsh-std catalog.
|
|
3
3
|
*
|
|
4
4
|
* Private protocol definitions are NOT authored here. The canonical
|
|
5
5
|
* dsh-ecosystem-spec definitions are loaded through `src/adapter/spec/`; this
|
|
@@ -19,7 +19,7 @@ export { TUI_EXTENSION_API_VERSION, DECISION_EVENTS_COORDINATE, DECISION_EVENTS,
|
|
|
19
19
|
* Keeping the builder private prevents a second canonical catalog from being
|
|
20
20
|
* created by product code. */
|
|
21
21
|
function buildAdmissionCatalog() {
|
|
22
|
-
const protocols = new ProtocolCatalog({ name: 'dsh-
|
|
22
|
+
const protocols = new ProtocolCatalog({ name: 'dsh-cli-admission', version: '0.15' });
|
|
23
23
|
const manifests = new ManifestDefinitionCatalog();
|
|
24
24
|
registerCommand(protocols, manifests);
|
|
25
25
|
registerStorage(protocols);
|
|
@@ -38,7 +38,7 @@ export function getAdmissionCatalog() {
|
|
|
38
38
|
/** Backward-compatible factory retained as a long-term compatibility face
|
|
39
39
|
* for existing callers. It now returns the same process-level canonical
|
|
40
40
|
* catalog rather than allocating a new one, so no second admission core can
|
|
41
|
-
* appear in production. OWNER: dsh-
|
|
41
|
+
* appear in production. OWNER: dsh-cli adapter. UNTIL: no scheduled removal.
|
|
42
42
|
*/
|
|
43
43
|
export function createAdmissionCatalog() {
|
|
44
44
|
return getAdmissionCatalog();
|
|
@@ -210,7 +210,7 @@ function verifyChannelLiveSync(ctx) {
|
|
|
210
210
|
function requireChannel(ctx) {
|
|
211
211
|
const channel = channelFor(ctx);
|
|
212
212
|
if (channel === undefined) {
|
|
213
|
-
throw new Error('dsh-
|
|
213
|
+
throw new Error('dsh-cli: live TUI Channel is not registered for this composition root');
|
|
214
214
|
}
|
|
215
215
|
return channel;
|
|
216
216
|
}
|
|
@@ -234,10 +234,10 @@ function createChannelPortLease(ctx, ownDriver, isDriverActive) {
|
|
|
234
234
|
const cleanups = new Set();
|
|
235
235
|
const assertActive = () => {
|
|
236
236
|
if (!active || !isDriverActive())
|
|
237
|
-
throw new Error('dsh-
|
|
237
|
+
throw new Error('dsh-cli: Channel driver has been disposed');
|
|
238
238
|
if (captured !== undefined && getTuiChannelRegistration(ctx) !== captured) {
|
|
239
239
|
dispose();
|
|
240
|
-
throw new Error('dsh-
|
|
240
|
+
throw new Error('dsh-cli: Channel port lifetime has ended');
|
|
241
241
|
}
|
|
242
242
|
};
|
|
243
243
|
const dispose = () => {
|
|
@@ -253,7 +253,7 @@ function createChannelPortLease(ctx, ownDriver, isDriverActive) {
|
|
|
253
253
|
failures.push(error);
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
throwCleanupFailures(failures, 'dsh-
|
|
256
|
+
throwCleanupFailures(failures, 'dsh-cli: Channel port cleanup failed');
|
|
257
257
|
};
|
|
258
258
|
const own = (cleanup) => {
|
|
259
259
|
let released = false;
|
|
@@ -274,7 +274,7 @@ function createChannelPortLease(ctx, ownDriver, isDriverActive) {
|
|
|
274
274
|
assertActive();
|
|
275
275
|
const current = getTuiChannelRegistration(ctx);
|
|
276
276
|
if (current === undefined || current.channel === null || typeof current.channel !== 'object') {
|
|
277
|
-
throw new Error('dsh-
|
|
277
|
+
throw new Error('dsh-cli: live TUI Channel is not registered for this composition root');
|
|
278
278
|
}
|
|
279
279
|
if (captured === undefined) {
|
|
280
280
|
captured = current;
|
|
@@ -285,7 +285,7 @@ function createChannelPortLease(ctx, ownDriver, isDriverActive) {
|
|
|
285
285
|
}
|
|
286
286
|
if (captured !== current) {
|
|
287
287
|
dispose();
|
|
288
|
-
throw new Error('dsh-
|
|
288
|
+
throw new Error('dsh-cli: Channel port lifetime has ended');
|
|
289
289
|
}
|
|
290
290
|
// Registering with an already released owner revokes synchronously.
|
|
291
291
|
assertActive();
|
|
@@ -309,7 +309,7 @@ function createChannelPortLease(ctx, ownDriver, isDriverActive) {
|
|
|
309
309
|
failures.push(error);
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
throwCleanupFailures(failures, 'dsh-
|
|
312
|
+
throwCleanupFailures(failures, 'dsh-cli: Channel driver cleanup failed');
|
|
313
313
|
});
|
|
314
314
|
return { assertActive, channel, own, dispose };
|
|
315
315
|
}
|
|
@@ -394,8 +394,8 @@ function createChannelPort(ctx, own, isActive) {
|
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
export const channelDriver = {
|
|
397
|
-
id: 'dsh-
|
|
398
|
-
upstreamFamily: 'dsh-
|
|
397
|
+
id: 'dsh-cli-channel',
|
|
398
|
+
upstreamFamily: 'dsh-cli',
|
|
399
399
|
capability: CAPABILITY,
|
|
400
400
|
mountEffectClass: 'read-only',
|
|
401
401
|
detect: detectChannelCapability,
|
|
@@ -416,7 +416,7 @@ export const channelDriver = {
|
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
disposers.clear();
|
|
419
|
-
throwCleanupFailures(failures, 'dsh-
|
|
419
|
+
throwCleanupFailures(failures, 'dsh-cli: Channel driver cleanup failed');
|
|
420
420
|
},
|
|
421
421
|
ports: { channel: createChannelPort(context, dispose => { disposers.add(dispose); }, () => active) },
|
|
422
422
|
};
|
|
@@ -121,13 +121,13 @@ function createDecisionsPort(ctx) {
|
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
subscribe() {
|
|
124
|
-
throw new Error('dsh-
|
|
124
|
+
throw new Error('dsh-cli: host.decisions.subscribe is staged; plugin subscriptions must use the mediated DecisionEvents API');
|
|
125
125
|
},
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
export const decisionsDriver = {
|
|
129
|
-
id: 'dsh-
|
|
130
|
-
upstreamFamily: 'dsh-
|
|
129
|
+
id: 'dsh-cli-decisions',
|
|
130
|
+
upstreamFamily: 'dsh-cli',
|
|
131
131
|
capability: 'host.decisions',
|
|
132
132
|
mountEffectClass: 'read-only',
|
|
133
133
|
detect: detectDecisionsCapability,
|
|
@@ -77,7 +77,7 @@ async function verifyStatusLive(ctx) {
|
|
|
77
77
|
];
|
|
78
78
|
}
|
|
79
79
|
const evidence = [serviceEvidence('tuiStatus')];
|
|
80
|
-
const key = `
|
|
80
|
+
const key = `dsh_cli_probe_${randomUUID().replace(/-/g, '').slice(0, 12)}`;
|
|
81
81
|
const token = Math.floor(Math.random() * 0x7fffffff);
|
|
82
82
|
let setLive = false;
|
|
83
83
|
try {
|
|
@@ -177,7 +177,7 @@ async function verifyShortcutsLive(ctx) {
|
|
|
177
177
|
const evidence = [serviceEvidence('tuiShortcuts')];
|
|
178
178
|
const shortcutKeys = ['9', '0', 'u', 'i', 'o', 'p', 'h', 'j', 'k', 'l', 'b', 'n', 'm'];
|
|
179
179
|
const combo = `ctrl+alt+shift+${shortcutKeys[Math.floor(Math.random() * shortcutKeys.length)]}`;
|
|
180
|
-
const options = { description: 'dsh-
|
|
180
|
+
const options = { description: 'dsh-cli reversible shortcut probe', handler: () => undefined };
|
|
181
181
|
let activeCombo = combo;
|
|
182
182
|
let dispose;
|
|
183
183
|
let observed = false;
|
|
@@ -280,7 +280,7 @@ async function verifyRenderersLive(ctx) {
|
|
|
280
280
|
];
|
|
281
281
|
}
|
|
282
282
|
const evidence = [serviceEvidence('tuiRenderers')];
|
|
283
|
-
const type = `dsh-
|
|
283
|
+
const type = `dsh-cli/probe-${randomUUID().replace(/-/g, '').slice(0, 8)}`;
|
|
284
284
|
let dispose;
|
|
285
285
|
let registerLive = false;
|
|
286
286
|
try {
|
|
@@ -368,11 +368,11 @@ async function verifyThemesLive(ctx) {
|
|
|
368
368
|
];
|
|
369
369
|
}
|
|
370
370
|
const evidence = [serviceEvidence('tuiThemes')];
|
|
371
|
-
const name = `
|
|
371
|
+
const name = `dshcliprobe${randomUUID().replace(/-/g, '').slice(0, 8)}`;
|
|
372
372
|
let dispose;
|
|
373
373
|
let registerLive = false;
|
|
374
374
|
try {
|
|
375
|
-
dispose = host.register({ name, displayName: 'dsh-
|
|
375
|
+
dispose = host.register({ name, displayName: 'dsh-cli probe', base: 'dark', colors: {} });
|
|
376
376
|
const snapshot = host.getSnapshot();
|
|
377
377
|
if (!snapshot.some(entry => entry.name === name)) {
|
|
378
378
|
throw new Error('temporary theme was not visible');
|
|
@@ -520,7 +520,7 @@ async function verifyCommandTreesLive(ctx) {
|
|
|
520
520
|
];
|
|
521
521
|
}
|
|
522
522
|
const evidence = [serviceEvidence('tuiCommandTrees')];
|
|
523
|
-
const root = `
|
|
523
|
+
const root = `dshcliprobe${randomUUID().replace(/-/g, '').slice(0, 8)}`;
|
|
524
524
|
let dispose;
|
|
525
525
|
let registerLive = false;
|
|
526
526
|
try {
|
|
@@ -570,8 +570,8 @@ function createCommandTreesPort(host) {
|
|
|
570
570
|
}
|
|
571
571
|
// ── driver objects ────────────────────────────────────────────────────────
|
|
572
572
|
export const statusDriver = {
|
|
573
|
-
id: 'dsh-
|
|
574
|
-
upstreamFamily: 'dsh-
|
|
573
|
+
id: 'dsh-cli-status',
|
|
574
|
+
upstreamFamily: 'dsh-cli',
|
|
575
575
|
capability: 'host.status',
|
|
576
576
|
mountEffectClass: 'mutate',
|
|
577
577
|
detect: detectStatusCapability,
|
|
@@ -591,8 +591,8 @@ export const statusDriver = {
|
|
|
591
591
|
},
|
|
592
592
|
};
|
|
593
593
|
export const shortcutsDriver = {
|
|
594
|
-
id: 'dsh-
|
|
595
|
-
upstreamFamily: 'dsh-
|
|
594
|
+
id: 'dsh-cli-shortcuts',
|
|
595
|
+
upstreamFamily: 'dsh-cli',
|
|
596
596
|
capability: 'host.shortcuts',
|
|
597
597
|
mountEffectClass: 'register',
|
|
598
598
|
detect: detectShortcutsCapability,
|
|
@@ -612,8 +612,8 @@ export const shortcutsDriver = {
|
|
|
612
612
|
},
|
|
613
613
|
};
|
|
614
614
|
export const renderersDriver = {
|
|
615
|
-
id: 'dsh-
|
|
616
|
-
upstreamFamily: 'dsh-
|
|
615
|
+
id: 'dsh-cli-renderers',
|
|
616
|
+
upstreamFamily: 'dsh-cli',
|
|
617
617
|
capability: 'host.renderers',
|
|
618
618
|
mountEffectClass: 'register',
|
|
619
619
|
detect: detectRenderersCapability,
|
|
@@ -633,8 +633,8 @@ export const renderersDriver = {
|
|
|
633
633
|
},
|
|
634
634
|
};
|
|
635
635
|
export const themesDriver = {
|
|
636
|
-
id: 'dsh-
|
|
637
|
-
upstreamFamily: 'dsh-
|
|
636
|
+
id: 'dsh-cli-themes',
|
|
637
|
+
upstreamFamily: 'dsh-cli',
|
|
638
638
|
capability: 'host.themes',
|
|
639
639
|
mountEffectClass: 'register',
|
|
640
640
|
detect: detectThemesCapability,
|
|
@@ -654,8 +654,8 @@ export const themesDriver = {
|
|
|
654
654
|
},
|
|
655
655
|
};
|
|
656
656
|
export const toastDriver = {
|
|
657
|
-
id: 'dsh-
|
|
658
|
-
upstreamFamily: 'dsh-
|
|
657
|
+
id: 'dsh-cli-toast',
|
|
658
|
+
upstreamFamily: 'dsh-cli',
|
|
659
659
|
capability: 'host.toast',
|
|
660
660
|
mountEffectClass: 'mutate',
|
|
661
661
|
detect: detectToastCapability,
|
|
@@ -675,8 +675,8 @@ export const toastDriver = {
|
|
|
675
675
|
},
|
|
676
676
|
};
|
|
677
677
|
export const commandTreesDriver = {
|
|
678
|
-
id: 'dsh-
|
|
679
|
-
upstreamFamily: 'dsh-
|
|
678
|
+
id: 'dsh-cli-command-trees',
|
|
679
|
+
upstreamFamily: 'dsh-cli',
|
|
680
680
|
capability: 'host.command-trees',
|
|
681
681
|
mountEffectClass: 'register',
|
|
682
682
|
detect: detectCommandTreesCapability,
|