@askdkc/dsh-cli 0.13.4 → 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.
Files changed (293) hide show
  1. package/bin/{dsh-tui.js → dsh-cli.js} +27 -27
  2. package/cordis.patch.yml +32 -32
  3. package/cordis.yml +17 -17
  4. package/lib/types/activityPrefs.d.ts +2 -2
  5. package/lib/types/activityPrefs.js +2 -2
  6. package/lib/types/adapter/channel/actions.js +1 -1
  7. package/lib/types/adapter/channel/consumer.js +1 -1
  8. package/lib/types/adapter/channel/internal-token.js +1 -1
  9. package/lib/types/adapter/channel/plugins.js +1 -1
  10. package/lib/types/adapter/channel/session-projection.js +3 -3
  11. package/lib/types/adapter/channel/transcript.js +1 -1
  12. package/lib/types/adapter/channel/ui.js +3 -3
  13. package/lib/types/adapter/kernel/host-facade.d.ts +1 -1
  14. package/lib/types/adapter/kernel/host-facade.js +6 -6
  15. package/lib/types/adapter/kernel/host-probe-access.d.ts +1 -1
  16. package/lib/types/adapter/kernel/host-probe-access.js +6 -6
  17. package/lib/types/adapter/kernel/kernel-runtime.js +1 -1
  18. package/lib/types/adapter/kernel/legacy-facade.d.ts +1 -1
  19. package/lib/types/adapter/kernel/legacy-facade.js +1 -1
  20. package/lib/types/adapter/kernel/replay-isolation.js +1 -1
  21. package/lib/types/adapter/kernel/runtime.d.ts +1 -1
  22. package/lib/types/adapter/kernel/runtime.js +7 -7
  23. package/lib/types/adapter/ports/channel-display.d.ts +1 -1
  24. package/lib/types/adapter/ports/channel-ui.d.ts +15 -15
  25. package/lib/types/adapter/standard/descriptor.d.ts +1 -1
  26. package/lib/types/adapter/standard/descriptor.js +2 -2
  27. package/lib/types/adapter/standard/registry.d.ts +1 -1
  28. package/lib/types/adapter/standard/registry.js +2 -2
  29. package/lib/types/adapter/standard/tui-extension.d.ts +2 -2
  30. package/lib/types/adapter/standard/tui-extension.js +3 -3
  31. package/lib/types/adapter/upstream/channel-driver.js +10 -10
  32. package/lib/types/adapter/upstream/decisions-driver.js +3 -3
  33. package/lib/types/adapter/upstream/extensions-driver.js +18 -18
  34. package/lib/types/adapter/upstream/host-descriptor-driver.js +4 -4
  35. package/lib/types/adapter/upstream/presentation-driver.js +5 -5
  36. package/lib/types/adapter/upstream/scenes-driver.js +4 -4
  37. package/lib/types/adapter/upstream/settings-driver.js +4 -4
  38. package/lib/types/adapter/upstream/workspace-driver.js +2 -2
  39. package/lib/types/bootstrap/state.d.ts +4 -4
  40. package/lib/types/bootstrap/state.js +4 -4
  41. package/lib/types/{tuiDisplayPrefs.d.ts → cliDisplayPrefs.d.ts} +1 -1
  42. package/lib/types/{tuiDisplayPrefs.d.ts.map → cliDisplayPrefs.d.ts.map} +1 -1
  43. package/lib/types/{tuiDisplayPrefs.js → cliDisplayPrefs.js} +1 -1
  44. package/lib/types/commands.js +7 -7
  45. package/lib/types/components/AutoRecapRow.d.ts +1 -1
  46. package/lib/types/components/AutoRecapRow.js +1 -1
  47. package/lib/types/components/HelpMenu.d.ts +1 -1
  48. package/lib/types/components/HelpMenu.js +1 -1
  49. package/lib/types/components/LogoV2.d.ts +2 -2
  50. package/lib/types/components/LogoV2.d.ts.map +1 -1
  51. package/lib/types/components/LogoV2.js +5 -19
  52. package/lib/types/components/MermaidDiagram.js +1 -1
  53. package/lib/types/components/MessageList.d.ts +2 -2
  54. package/lib/types/components/MessageList.js +1 -1
  55. package/lib/types/components/PageMargin.d.ts +3 -3
  56. package/lib/types/components/PageMargin.js +1 -1
  57. package/lib/types/components/PluginSceneBoundary.d.ts +1 -1
  58. package/lib/types/components/PluginSceneBoundary.js +1 -1
  59. package/lib/types/components/PromptInput.d.ts +1 -1
  60. package/lib/types/components/PromptInput.js +3 -3
  61. package/lib/types/components/ScrollbarGutter.d.ts +1 -1
  62. package/lib/types/components/ScrollbarGutter.js +1 -1
  63. package/lib/types/components/Select.d.ts +1 -1
  64. package/lib/types/components/Select.js +1 -1
  65. package/lib/types/components/SplitDiffView.d.ts +1 -1
  66. package/lib/types/components/ThemePicker.d.ts +1 -1
  67. package/lib/types/components/ThemePicker.js +1 -1
  68. package/lib/types/components/activityFrames.d.ts +1 -1
  69. package/lib/types/components/activityFrames.js +1 -1
  70. package/lib/types/components/design-system/Byline.d.ts +1 -1
  71. package/lib/types/components/design-system/Byline.js +1 -1
  72. package/lib/types/components/design-system/Divider.d.ts +1 -1
  73. package/lib/types/components/design-system/Divider.js +1 -1
  74. package/lib/types/components/design-system/StatusIcon.d.ts +1 -1
  75. package/lib/types/components/design-system/StatusIcon.js +1 -1
  76. package/lib/types/components/design-system/ThemeProvider.d.ts +1 -1
  77. package/lib/types/components/design-system/ThemeProvider.js +11 -11
  78. package/lib/types/components/design-system/ThemedBox.d.ts +1 -1
  79. package/lib/types/components/design-system/ThemedBox.js +1 -1
  80. package/lib/types/components/design-system/ThemedText.d.ts +1 -1
  81. package/lib/types/components/design-system/ThemedText.js +1 -1
  82. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +1 -1
  83. package/lib/types/components/messages/AssistantThinkingMessage.js +1 -1
  84. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +3 -3
  85. package/lib/types/components/messages/AssistantToolUseMessage.js +1 -1
  86. package/lib/types/components/messages/originalImage.js +1 -1
  87. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +1 -1
  88. package/lib/types/components/questions/AskUserQuestionPanel.js +1 -1
  89. package/lib/types/components/smoothReveal.d.ts +1 -1
  90. package/lib/types/components/smoothReveal.js +1 -1
  91. package/lib/types/customTheme.d.ts +5 -5
  92. package/lib/types/customTheme.js +7 -7
  93. package/lib/types/dsh-adapter/activity-store.d.ts +1 -1
  94. package/lib/types/dsh-adapter/activity-store.js +3 -3
  95. package/lib/types/dsh-adapter/bundled-presets.js +2 -2
  96. package/lib/types/dsh-adapter/channel/action-readiness.js +2 -2
  97. package/lib/types/dsh-adapter/channel/agent-view-projection.js +1 -1
  98. package/lib/types/dsh-adapter/channel/background-action.js +1 -1
  99. package/lib/types/dsh-adapter/channel/binding-events.js +1 -1
  100. package/lib/types/dsh-adapter/channel/binding.js +14 -14
  101. package/lib/types/dsh-adapter/channel/external-commands.js +3 -3
  102. package/lib/types/dsh-adapter/channel/input-delivery.js +1 -1
  103. package/lib/types/dsh-adapter/channel/job-projection.js +1 -1
  104. package/lib/types/dsh-adapter/channel/lifetime-resources.js +1 -1
  105. package/lib/types/dsh-adapter/channel/local-actions.js +1 -1
  106. package/lib/types/dsh-adapter/channel/mode-actions.js +1 -1
  107. package/lib/types/dsh-adapter/channel/mode-permission.js +6 -6
  108. package/lib/types/dsh-adapter/channel/mode-roster.js +1 -1
  109. package/lib/types/dsh-adapter/channel/owner.js +2 -2
  110. package/lib/types/dsh-adapter/channel/preferences.js +1 -1
  111. package/lib/types/dsh-adapter/channel/projection.js +1 -1
  112. package/lib/types/dsh-adapter/channel/reports.js +3 -3
  113. package/lib/types/dsh-adapter/channel/session-fork.js +1 -1
  114. package/lib/types/dsh-adapter/channel/session-metadata.d.ts +4 -4
  115. package/lib/types/dsh-adapter/channel/session-metadata.js +2 -2
  116. package/lib/types/dsh-adapter/channel/session-rewind.js +2 -2
  117. package/lib/types/dsh-adapter/channel/state.d.ts +1 -1
  118. package/lib/types/dsh-adapter/channel/state.js +1 -1
  119. package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
  120. package/lib/types/dsh-adapter/channel-ui.js +2 -2
  121. package/lib/types/dsh-adapter/channel.js +9 -9
  122. package/lib/types/dsh-adapter/cli-registration.d.ts.map +1 -1
  123. package/lib/types/dsh-adapter/cli-registration.js +5 -4
  124. package/lib/types/dsh-adapter/command-trees.d.ts +1 -1
  125. package/lib/types/dsh-adapter/command-trees.js +2 -2
  126. package/lib/types/dsh-adapter/compat/sessionLog.d.ts +3 -3
  127. package/lib/types/dsh-adapter/compat/sessionLog.js +5 -5
  128. package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -1
  129. package/lib/types/dsh-adapter/compat/settings.js +15 -7
  130. package/lib/types/dsh-adapter/decision-guard.d.ts +3 -3
  131. package/lib/types/dsh-adapter/decision-guard.js +6 -6
  132. package/lib/types/dsh-adapter/dialogs.d.ts +1 -1
  133. package/lib/types/dsh-adapter/dialogs.js +7 -7
  134. package/lib/types/dsh-adapter/effect-ledger.d.ts +2 -2
  135. package/lib/types/dsh-adapter/effect-ledger.js +5 -5
  136. package/lib/types/dsh-adapter/extension-events.js +10 -10
  137. package/lib/types/dsh-adapter/extensions.d.ts +3 -3
  138. package/lib/types/dsh-adapter/extensions.js +3 -3
  139. package/lib/types/dsh-adapter/host-access.js +11 -11
  140. package/lib/types/dsh-adapter/ide-channel.d.ts +6 -6
  141. package/lib/types/dsh-adapter/ide-channel.js +6 -6
  142. package/lib/types/dsh-adapter/index.d.ts +18 -18
  143. package/lib/types/dsh-adapter/index.js +5 -5
  144. package/lib/types/dsh-adapter/inject-channel.d.ts +4 -4
  145. package/lib/types/dsh-adapter/inject-channel.js +5 -5
  146. package/lib/types/dsh-adapter/invariant.d.ts +1 -1
  147. package/lib/types/dsh-adapter/invariant.js +1 -1
  148. package/lib/types/dsh-adapter/message-observer.d.ts +2 -2
  149. package/lib/types/dsh-adapter/message-observer.js +23 -23
  150. package/lib/types/dsh-adapter/migrate/adapters/scan.js +1 -1
  151. package/lib/types/dsh-adapter/migrate/bin-path.d.ts +1 -1
  152. package/lib/types/dsh-adapter/migrate/bin-path.js +4 -4
  153. package/lib/types/dsh-adapter/migrate/picker.d.ts +1 -1
  154. package/lib/types/dsh-adapter/migrate/picker.js +1 -1
  155. package/lib/types/dsh-adapter/migrate/uuid.js +1 -1
  156. package/lib/types/dsh-adapter/packaged-presets.js +1 -1
  157. package/lib/types/dsh-adapter/plugin-host.d.ts +2 -2
  158. package/lib/types/dsh-adapter/plugin-host.js +32 -32
  159. package/lib/types/dsh-adapter/plugin-storage.d.ts +3 -3
  160. package/lib/types/dsh-adapter/plugin-storage.js +5 -5
  161. package/lib/types/dsh-adapter/plugin.d.ts +4 -4
  162. package/lib/types/dsh-adapter/plugin.js +89 -89
  163. package/lib/types/dsh-adapter/preset-resolution.d.ts +1 -1
  164. package/lib/types/dsh-adapter/presets.js +1 -1
  165. package/lib/types/dsh-adapter/promptDebug.js +1 -1
  166. package/lib/types/dsh-adapter/questions.d.ts +1 -1
  167. package/lib/types/dsh-adapter/questions.js +1 -1
  168. package/lib/types/dsh-adapter/renderers.js +7 -7
  169. package/lib/types/dsh-adapter/scenes.d.ts +1 -1
  170. package/lib/types/dsh-adapter/scenes.js +6 -6
  171. package/lib/types/dsh-adapter/settings-sections.d.ts +1 -1
  172. package/lib/types/dsh-adapter/settings-sections.js +5 -5
  173. package/lib/types/dsh-adapter/sharp.js +1 -1
  174. package/lib/types/dsh-adapter/shortcuts.js +9 -9
  175. package/lib/types/dsh-adapter/status.js +21 -21
  176. package/lib/types/dsh-adapter/themes.js +2 -2
  177. package/lib/types/dsh-adapter/toast.js +7 -7
  178. package/lib/types/dsh-adapter/workspaces.d.ts +1 -1
  179. package/lib/types/dsh-adapter/workspaces.js +6 -6
  180. package/lib/types/effortPrefs.d.ts +2 -2
  181. package/lib/types/effortPrefs.js +2 -2
  182. package/lib/types/force-production-react.js +1 -1
  183. package/lib/types/herdr.js +4 -4
  184. package/lib/types/homePrefs.js +1 -1
  185. package/lib/types/i18n.d.ts +54 -54
  186. package/lib/types/i18n.js +39 -39
  187. package/lib/types/ink/clearTerminal.d.ts +1 -1
  188. package/lib/types/ink/clearTerminal.js +1 -1
  189. package/lib/types/ink/colorize.js +1 -1
  190. package/lib/types/ink/components/App.d.ts +1 -1
  191. package/lib/types/ink/components/App.js +5 -5
  192. package/lib/types/ink/components/Text.d.ts +1 -1
  193. package/lib/types/ink/devtools.d.ts +1 -1
  194. package/lib/types/ink/dom.d.ts +1 -1
  195. package/lib/types/ink/dom.js +1 -1
  196. package/lib/types/ink/geometry-trace.js +4 -4
  197. package/lib/types/ink/ink.d.ts.map +1 -1
  198. package/lib/types/ink/ink.js +8 -19
  199. package/lib/types/ink/reconciler.d.ts +1 -1
  200. package/lib/types/ink/reconciler.d.ts.map +1 -1
  201. package/lib/types/ink/reconciler.js +6 -3
  202. package/lib/types/ink/render-to-screen.d.ts.map +1 -1
  203. package/lib/types/ink/render-to-screen.js +0 -5
  204. package/lib/types/ink/terminal.js +3 -3
  205. package/lib/types/ink/termio/osc.js +1 -1
  206. package/lib/types/ink/update-overflow-guard.js +2 -2
  207. package/lib/types/minimalMode.d.ts +2 -2
  208. package/lib/types/minimalMode.js +2 -2
  209. package/lib/types/modelGroups.d.ts +1 -1
  210. package/lib/types/modelGroups.js +1 -1
  211. package/lib/types/modelPrefs.d.ts +1 -1
  212. package/lib/types/modelPrefs.js +1 -1
  213. package/lib/types/modelRecents.d.ts +2 -2
  214. package/lib/types/modelRecents.js +2 -2
  215. package/lib/types/package-version.d.ts +3 -0
  216. package/lib/types/package-version.d.ts.map +1 -0
  217. package/lib/types/package-version.js +25 -0
  218. package/lib/types/presetPrefs.d.ts +1 -1
  219. package/lib/types/presetPrefs.js +1 -1
  220. package/lib/types/reload.d.ts +8 -8
  221. package/lib/types/reload.js +4 -4
  222. package/lib/types/screens/Chat.js +27 -27
  223. package/lib/types/screens/StatusLine.js +1 -1
  224. package/lib/types/screens/StatusMetrics.js +1 -1
  225. package/lib/types/sessionHistory.d.ts +3 -3
  226. package/lib/types/sessionHistory.js +7 -7
  227. package/lib/types/sessionModes.js +1 -1
  228. package/lib/types/sessionMounts.d.ts +1 -1
  229. package/lib/types/sessionMounts.js +1 -1
  230. package/lib/types/sessionPins.d.ts +1 -1
  231. package/lib/types/sessionPins.js +1 -1
  232. package/lib/types/terminal-utils/cliHighlight.d.ts +1 -1
  233. package/lib/types/terminal-utils/hash.d.ts +1 -1
  234. package/lib/types/terminal-utils/hash.js +1 -1
  235. package/lib/types/terminal-utils/mermaid.d.ts +1 -1
  236. package/lib/types/terminal-utils/syntaxTheme.js +1 -1
  237. package/lib/types/theme.d.ts +3 -3
  238. package/lib/types/theme.js +3 -3
  239. package/lib/types/themePrefs.d.ts +3 -3
  240. package/lib/types/themePrefs.js +3 -3
  241. package/lib/types/tips.js +4 -4
  242. package/lib/types/trajectory/effortIgnition.d.ts +1 -1
  243. package/lib/types/trajectoryPrefs.d.ts +1 -1
  244. package/lib/types/trajectoryPrefs.js +1 -1
  245. package/lib/types/ui.d.ts +1 -1
  246. package/lib/types/ui.js +1 -1
  247. package/lib/types/update.d.ts +25 -26
  248. package/lib/types/update.d.ts.map +1 -1
  249. package/lib/types/update.js +55 -73
  250. package/lib/types/utils/clipboard.js +1 -1
  251. package/lib/types/utils/credentials.js +2 -2
  252. package/lib/types/utils/debug.d.ts +3 -3
  253. package/lib/types/utils/debug.js +6 -6
  254. package/lib/types/utils/earlyInput.d.ts +1 -1
  255. package/lib/types/utils/earlyInput.js +1 -1
  256. package/lib/types/utils/externalEditor.js +1 -1
  257. package/lib/types/utils/fullscreen.d.ts +3 -3
  258. package/lib/types/utils/fullscreen.js +4 -4
  259. package/lib/types/utils/log.js +1 -1
  260. package/lib/types/utils/paths.d.ts +3 -3
  261. package/lib/types/utils/paths.js +4 -4
  262. package/lib/types/working-activity.js +1 -1
  263. package/node_modules/@askdkc/dsh-auth/dsh-plugin.json +1 -1
  264. package/node_modules/@askdkc/dsh-auth/lib/index.d.ts +2 -2
  265. package/node_modules/@askdkc/dsh-auth/lib/index.js +2 -2
  266. package/node_modules/@askdkc/dsh-auth/lib/pi-ai.d.ts +0 -2
  267. package/node_modules/@askdkc/dsh-auth/lib/pi-ai.js +0 -2
  268. package/node_modules/@askdkc/dsh-auth/lib/service.d.ts +1 -1
  269. package/node_modules/@askdkc/dsh-auth/lib/service.js +2 -2
  270. package/node_modules/dsh-working-activity/lib/client.js.map +1 -1
  271. package/node_modules/dsh-working-activity/lib/types/client/index.d.ts +1 -1
  272. package/node_modules/dsh-working-activity/lib/types/config.d.ts +2 -2
  273. package/node_modules/dsh-working-activity/lib/types/config.js +2 -2
  274. package/node_modules/dsh-working-activity/lib/types/frames.d.ts +1 -1
  275. package/node_modules/dsh-working-activity/lib/types/frames.js +1 -1
  276. package/node_modules/dsh-working-activity/lib/types/index.d.ts +1 -1
  277. package/node_modules/dsh-working-activity/lib/types/index.js +2 -2
  278. package/node_modules/dsh-working-activity/lib/types/lang.d.ts +5 -5
  279. package/node_modules/dsh-working-activity/lib/types/lang.js +8 -8
  280. package/node_modules/dsh-working-activity/lib/types/projection.d.ts +1 -1
  281. package/node_modules/dsh-working-activity/lib/types/projection.js +1 -1
  282. package/node_modules/dsh-working-activity/lib/types/status.d.ts +1 -1
  283. package/node_modules/dsh-working-activity/lib/types/status.js +1 -1
  284. package/node_modules/dsh-working-activity/src/client/index.ts +1 -1
  285. package/node_modules/dsh-working-activity/src/config.ts +2 -2
  286. package/node_modules/dsh-working-activity/src/frames.ts +1 -1
  287. package/node_modules/dsh-working-activity/src/index.ts +4 -4
  288. package/node_modules/dsh-working-activity/src/lang.ts +8 -8
  289. package/node_modules/dsh-working-activity/src/projection.ts +1 -1
  290. package/node_modules/dsh-working-activity/src/status.ts +1 -1
  291. package/package.json +8 -8
  292. package/presets/liangshen/agent.cordis.yml +1 -1
  293. package/presets/liangshen/custom-bash.mjs +2 -2
@@ -113,13 +113,13 @@ export function createPermissionIdentity(ctx, deps) {
113
113
  return true;
114
114
  await new Promise(resolve => setTimeout(resolve, 50));
115
115
  }
116
- ctx.logger.warn(`dsh-tui: permission mode "${target}" was not confirmed by permissionPresets.current()/permission/preset`);
116
+ ctx.logger.warn(`dsh-cli: permission mode "${target}" was not confirmed by permissionPresets.current()/permission/preset`);
117
117
  deps.notify(t('mode-permission-unconfirmed'), { color: 'warning' });
118
118
  return false;
119
119
  };
120
120
  const apply = async (target) => {
121
121
  if (!isCommandCompletionToken(target)) {
122
- ctx.logger.warn(`dsh-tui: permission mode "${target}" skipped because its identity is not a safe command token`);
122
+ ctx.logger.warn(`dsh-cli: permission mode "${target}" skipped because its identity is not a safe command token`);
123
123
  return false;
124
124
  }
125
125
  const agent = deps.agent();
@@ -149,13 +149,13 @@ export function createPermissionIdentity(ctx, deps) {
149
149
  runtime.set(session, target);
150
150
  }
151
151
  catch (error) {
152
- ctx.logger.warn(`dsh-tui: permission mode "${target}" could not be applied by the permissionPresets service: ${error instanceof Error ? error.message : String(error)}`);
152
+ ctx.logger.warn(`dsh-cli: permission mode "${target}" could not be applied by the permissionPresets service: ${error instanceof Error ? error.message : String(error)}`);
153
153
  deps.notify(t('mode-permission-invoke-failed'), { color: 'warning' });
154
154
  return false;
155
155
  }
156
156
  return await confirmTarget(target, session, 2000);
157
157
  }
158
- ctx.logger.warn(`dsh-tui: permission mode "${target}" skipped because /permission is not registered`);
158
+ ctx.logger.warn(`dsh-cli: permission mode "${target}" skipped because /permission is not registered`);
159
159
  deps.notify(t('mode-permission-unregistered'), { color: 'warning' });
160
160
  return false;
161
161
  }
@@ -163,7 +163,7 @@ export function createPermissionIdentity(ctx, deps) {
163
163
  if (session !== deps.agent().session)
164
164
  return false;
165
165
  if (result === undefined) {
166
- ctx.logger.warn(`dsh-tui: permission mode "${target}" could not invoke /permission`);
166
+ ctx.logger.warn(`dsh-cli: permission mode "${target}" could not invoke /permission`);
167
167
  deps.notify(t('mode-permission-invoke-failed'), { color: 'warning' });
168
168
  return false;
169
169
  }
@@ -188,7 +188,7 @@ export function createPermissionIdentity(ctx, deps) {
188
188
  return true;
189
189
  const canonical = canonicalForMode(spec, session);
190
190
  if (canonical === undefined) {
191
- ctx.logger.warn(`dsh-tui: static mode "${spec.id}" cannot safely clear permission identity "${current}"`);
191
+ ctx.logger.warn(`dsh-cli: static mode "${spec.id}" cannot safely clear permission identity "${current}"`);
192
192
  deps.notify(t('mode-permission-no-canonical', { name: modeDisplayName(spec) }), { color: 'warning' });
193
193
  return false;
194
194
  }
@@ -46,7 +46,7 @@ export function warnOnceForPermissionEntry(warned, warn, target, value, reason)
46
46
  if (warned.size >= 200)
47
47
  warned.clear();
48
48
  warned.add(key);
49
- warn(`dsh-tui: permission preset "${value}" skipped from Shift+Tab (${reason})`);
49
+ warn(`dsh-cli: permission preset "${value}" skipped from Shift+Tab (${reason})`);
50
50
  }
51
51
  /**
52
52
  * Dynamic session-mode roster (main's `sessionModes` / `rebuildSessionModes`).
@@ -16,7 +16,7 @@ export function createChannelOwner() {
16
16
  };
17
17
  const assertActive = () => {
18
18
  if (!current())
19
- throw new Error('dsh-tui: Channel lifetime has ended');
19
+ throw new Error('dsh-cli: Channel lifetime has ended');
20
20
  };
21
21
  return {
22
22
  current, assertActive,
@@ -57,7 +57,7 @@ export function createChannelOwner() {
57
57
  if (failures.length === 1)
58
58
  throw failures[0];
59
59
  if (failures.length > 1)
60
- throw new AggregateError(failures, 'dsh-tui: Channel cleanup failed');
60
+ throw new AggregateError(failures, 'dsh-cli: Channel cleanup failed');
61
61
  },
62
62
  };
63
63
  }
@@ -1,5 +1,5 @@
1
1
  import { setMinimalMode } from '../../minimalMode.js';
2
- import { normalizePageMargin, normalizeScrollGutter, normalizeStatusBar, normalizeToolBackground } from '../../tuiDisplayPrefs.js';
2
+ import { normalizePageMargin, normalizeScrollGutter, normalizeStatusBar, normalizeToolBackground } from '../../cliDisplayPrefs.js';
3
3
  export function createPreferences(getState) {
4
4
  return {
5
5
  setDiffLayout(layout) {
@@ -926,7 +926,7 @@ export function createChannelProjection(state, deps) {
926
926
  deps.rowIds.value += 1;
927
927
  break;
928
928
  }
929
- // `/color` accent (dsh-tui plugin event, replayed on resume/rewind
929
+ // `/color` accent (dsh-cli plugin event, replayed on resume/rewind
930
930
  // like session/title): last write wins, '' clears to the default.
931
931
  if (event.type === 'session/color') {
932
932
  const data = event.data;
@@ -95,7 +95,7 @@ export function createReportActions(ctx, deps) {
95
95
  if (!current(capture))
96
96
  return null;
97
97
  try {
98
- const target = join(deps.cwd(), `dsh-tui-export-${Date.now()}.md`);
98
+ const target = join(deps.cwd(), `dsh-cli-export-${Date.now()}.md`);
99
99
  writeFileSync(target, parts.join('\n'), 'utf8');
100
100
  return current(capture) ? target : null;
101
101
  }
@@ -122,7 +122,7 @@ export function createReportActions(ctx, deps) {
122
122
  const doctorInfo = () => {
123
123
  const lines = [
124
124
  `Node ${process.version} · ${process.platform} ${process.arch}`,
125
- // Same predicate as the launcher's doctor (bin/dsh-tui.js): dsh resolves
125
+ // Same predicate as the launcher's doctor (bin/dsh-cli.js): dsh resolves
126
126
  // credential-store refs into the session at launch, so an environment-only
127
127
  // check reports a working key as missing. The two doctors must not diverge.
128
128
  t('doctor-api-key', {
@@ -137,7 +137,7 @@ export function createReportActions(ctx, deps) {
137
137
  t('doctor-context-window', { window: deps.contextWindow() ?? t('doctor-unknown') }),
138
138
  `${t('doctor-session', { id: deps.capture().agent.id })}${deps.sessionTitle() ? ` · ${deps.sessionTitle()}` : ''}`,
139
139
  ];
140
- for (const candidate of [join(homeDir(), '.dsh-tui/cordis.yml'), join(homeDir(), '.dsh/profiles/dsh-tui/cordis.patch.yml')]) {
140
+ for (const candidate of [join(homeDir(), '.dsh-cli/cordis.yml'), join(homeDir(), '.dsh/profiles/dsh-cli/cordis.patch.yml')]) {
141
141
  lines.push(t('doctor-config', { candidate, state: existsSync(candidate) ? '✓' : t('doctor-config-missing') }));
142
142
  }
143
143
  for (const dir of sessionsRoots())
@@ -87,7 +87,7 @@ export function createForkSessionAction(ctx, state, deps) {
87
87
  await detached.release();
88
88
  }
89
89
  catch (error) {
90
- ctx.logger.warn('dsh-tui: forked session dispose failed: %o', error);
90
+ ctx.logger.warn('dsh-cli: forked session dispose failed: %o', error);
91
91
  }
92
92
  try {
93
93
  const sourceTitle = state.sessionTitle.trim();
@@ -6,11 +6,11 @@ import type { ChannelOwner } from './owner.js';
6
6
  import type { CredentialStatus } from './types.js';
7
7
  declare module '@deepseek-ai/dsh-llm' {
8
8
  interface MessageSourceMap {
9
- 'dsh-tui-btw': {
10
- kind: 'dsh-tui-btw';
9
+ 'dsh-cli-btw': {
10
+ kind: 'dsh-cli-btw';
11
11
  };
12
- 'dsh-tui-recap': {
13
- kind: 'dsh-tui-recap';
12
+ 'dsh-cli-recap': {
13
+ kind: 'dsh-cli-recap';
14
14
  };
15
15
  }
16
16
  }
@@ -130,7 +130,7 @@ export function createSessionMetadataActions(ctx, deps) {
130
130
  stream: llm.stream.bind(llm),
131
131
  options: llmRequest(capture, [
132
132
  ...capture.agent.session.deriveMessages(),
133
- createUserMessage({ content: [{ type: 'text', text: wrapSideQuestion(question) }], source: { kind: 'dsh-tui-btw' } }),
133
+ createUserMessage({ content: [{ type: 'text', text: wrapSideQuestion(question) }], source: { kind: 'dsh-cli-btw' } }),
134
134
  ], true, signal),
135
135
  // Do not let an old session append streamed UI facts after a switch.
136
136
  onText: delta => { if (current(capture) && !options?.signal?.aborted)
@@ -154,7 +154,7 @@ export function createSessionMetadataActions(ctx, deps) {
154
154
  const outcome = await runSideQuestion({
155
155
  stream: llm.stream.bind(llm),
156
156
  options: llmRequest(capture, [
157
- createUserMessage({ content: [{ type: 'text', text: wrapRecapPrompt(activity) }], source: { kind: 'dsh-tui-recap' } }),
157
+ createUserMessage({ content: [{ type: 'text', text: wrapRecapPrompt(activity) }], source: { kind: 'dsh-cli-recap' } }),
158
158
  ], false, signal),
159
159
  onText: delta => { if (current(capture) && !options?.signal?.aborted)
160
160
  options?.onText?.(delta); },
@@ -129,10 +129,10 @@ export function createRewindToAction(ctx, state, deps) {
129
129
  }, normalizeRewindDoneSummary).then(summary => {
130
130
  if (typeof summary === 'string')
131
131
  deps.notify(summary, { timeoutMs: 6000 });
132
- }).catch((error) => ctx.logger.warn('dsh-tui: tui/rewind-done dispatch failed: %o', error));
132
+ }).catch((error) => ctx.logger.warn('dsh-cli: tui/rewind-done dispatch failed: %o', error));
133
133
  }
134
134
  catch (error) {
135
- ctx.logger.warn('dsh-tui: tui/rewind-done dispatch failed: %o', error);
135
+ ctx.logger.warn('dsh-cli: tui/rewind-done dispatch failed: %o', error);
136
136
  }
137
137
  deps.notifySessionSwitched('rewind', String(childId), sourceSessionId);
138
138
  return row.text;
@@ -1,6 +1,6 @@
1
1
  import type { AgentHandle } from '@deepseek-ai/dsh-agent';
2
2
  import type { SessionModeSpec } from '../../sessionModes.js';
3
- import { type PageMarginSetting, type ScrollGutterMode, type StatusBarConfig, type ToolBackground } from '../../tuiDisplayPrefs.js';
3
+ import { type PageMarginSetting, type ScrollGutterMode, type StatusBarConfig, type ToolBackground } from '../../cliDisplayPrefs.js';
4
4
  import type { ChannelState } from './types.js';
5
5
  /** Launch configuration belongs to channel construction, not the composition root. */
6
6
  export interface ChannelLaunchOptions {
@@ -1,5 +1,5 @@
1
1
  import { terminalProgressLang } from 'dsh-working-activity/lang';
2
- import { normalizePageMargin, normalizeScrollGutter, normalizeStatusBar, normalizeToolBackground } from '../../tuiDisplayPrefs.js';
2
+ import { normalizePageMargin, normalizeScrollGutter, normalizeStatusBar, normalizeToolBackground } from '../../cliDisplayPrefs.js';
3
3
  import { normalizeActivityPreset } from '../../components/activityFrames.js';
4
4
  /**
5
5
  * Neutral observable fields only. Behaviour is assembled explicitly by the
@@ -19,7 +19,7 @@ export type ChannelImageBlock = Extract<ContentBlock, {
19
19
  type: 'image';
20
20
  }>;
21
21
  export type ChannelImageMediaType = ChannelImageBlock['attachment']['mediaType'];
22
- /** The dsh-tools registry seam dsh-tui reads presentations through. The
22
+ /** The dsh-tools registry seam dsh-cli reads presentations through. The
23
23
  * registry lives on the host plane; `get` takes the live agent as the
24
24
  * scope so a preset's own tool definitions resolve (dsh-host-apiproxy's
25
25
  * presenter pattern). */
@@ -75,7 +75,7 @@ export function mountChannelUi(ctx, channel, pluginHost, mode) {
75
75
  const ui = facade?.channel?.projection.ui;
76
76
  if (ui === undefined) {
77
77
  if (mounted !== undefined)
78
- throw new Error('dsh-tui: mounted HostFacade lost Channel UI');
78
+ throw new Error('dsh-cli: mounted HostFacade lost Channel UI');
79
79
  return local;
80
80
  }
81
81
  const next = ui();
@@ -122,7 +122,7 @@ export function mountChannelUi(ctx, channel, pluginHost, mode) {
122
122
  failures.push(error);
123
123
  }
124
124
  }
125
- throwCleanupFailures(failures, 'dsh-tui: Channel UI cleanup failed');
125
+ throwCleanupFailures(failures, 'dsh-cli: Channel UI cleanup failed');
126
126
  },
127
127
  };
128
128
  }
@@ -169,11 +169,11 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
169
169
  // built-in local commands exist.
170
170
  const commandService = ctx.get('commands');
171
171
  // messages.observe broker (optional service, C-042): mounted by the
172
- // dsh-tui-plugin-host row; absent the row, publish is a no-op and nothing
172
+ // dsh-cli-plugin-host row; absent the row, publish is a no-op and nothing
173
173
  // else changes (soft degradation, #183).
174
174
  const messageObserver = getHostMessageObserver(ctx.get('tuiMessageObserver'));
175
175
  // Workspace registry runtime (optional service, issue #183): mounted by
176
- // the bundle patch's dsh-tui-workspaces row; absent the row (stale patch
176
+ // the bundle patch's dsh-cli-workspaces row; absent the row (stale patch
177
177
  // or a bare embedder), degrade to the local-only runtime. plugin.ts owns
178
178
  // the degraded-boot warning for profile launches.
179
179
  const workspaceService = getHostWorkspaceRuntime(ctx.get('tuiWorkspaces')) ?? createLocalWorkspaceRuntime();
@@ -185,13 +185,13 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
185
185
  // so compute once and cache.
186
186
  // Plugin scene runtime (optional service, same degradation rule as
187
187
  // tuiWorkspaces/tuiCommandTrees): mounted by the bundle patch's
188
- // dsh-tui-scenes row; absent the row, `pluginScene` simply stays undefined.
188
+ // dsh-cli-scenes row; absent the row, `pluginScene` simply stays undefined.
189
189
  const sceneRuntime = getHostSceneRuntime(ctx.get('tuiScenes'));
190
190
  // Falls back to the in-package local host when the composition's service
191
191
  // row is unavailable (issue #557: the row can be disposed right after
192
192
  // load in real compositions); the TUI's own section registers there.
193
193
  const settingsSectionsRuntime = getHostSettingsSections(ctx.get('tuiSettingsSections')) ?? getLocalSettingsSectionsHost(ctx);
194
- // Custom-entry text renderers (optional service, dsh-tui-extensions row):
194
+ // Custom-entry text renderers (optional service, dsh-cli-extensions row):
195
195
  // absent the row, unknown plugin event types stay invisible in the
196
196
  // transcript, exactly as before the seam existed.
197
197
  const rendererRuntime = getHostRenderers(ctx.get('tuiRenderers'));
@@ -210,7 +210,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
210
210
  ? filteredConfiguredSessionModes
211
211
  : DEFAULT_SESSION_MODES;
212
212
  if (droppedModeIds.length > 0) {
213
- ctx.logger.warn(`dsh-tui: session modes ${droppedModeIds.map(id => `"${id}"`).join(', ')} declare no plan/sandbox/approval/permission atom; dropped from the Shift+Tab cycle`);
213
+ ctx.logger.warn(`dsh-cli: session modes ${droppedModeIds.map(id => `"${id}"`).join(', ')} declare no plan/sandbox/approval/permission atom; dropped from the Shift+Tab cycle`);
214
214
  }
215
215
  // Runtime permission roster: third-party presets enter the Shift+Tab cycle
216
216
  // after the configured/default modes, rebuilt from the live service snapshot.
@@ -313,13 +313,13 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
313
313
  const notifySessionSwitched = (kind, sessionId, previousSessionId) => {
314
314
  try {
315
315
  void dispatchTuiNotification(ctx, 'tui/session-switched', { kind, sessionId, previousSessionId, cwd: state.cwd }).catch((error) => {
316
- ctx.logger.warn('dsh-tui: tui/session-switched listener failed: %o', error);
316
+ ctx.logger.warn('dsh-cli: tui/session-switched listener failed: %o', error);
317
317
  });
318
318
  }
319
319
  catch (error) {
320
320
  // A bare embedder's context may lack the event bus entirely; the
321
321
  // switch itself already succeeded, so this stays a log line.
322
- ctx.logger.warn('dsh-tui: tui/session-switched dispatch failed: %o', error);
322
+ ctx.logger.warn('dsh-cli: tui/session-switched dispatch failed: %o', error);
323
323
  }
324
324
  };
325
325
  /**
@@ -400,7 +400,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
400
400
  const settings = ctx.get('settings');
401
401
  if (settings === undefined)
402
402
  return false;
403
- const ns = settings.describe({ redactSecrets: true }).find(entry => entry.ns === 'dsh-tui');
403
+ const ns = settings.describe({ redactSecrets: true }).find(entry => entry.ns === 'dsh-cli');
404
404
  return ns?.value?.recapOnOpen !== false;
405
405
  },
406
406
  ...createInitialChannelView(options, {
@@ -954,7 +954,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
954
954
  // The context owns the complete Channel lifetime, not merely the skill
955
955
  // command contribution. Keep emitter teardown in the same finally funnel.
956
956
  state.releaseContributions();
957
- }, 'dsh-tui channel lifecycle');
957
+ }, 'dsh-cli channel lifecycle');
958
958
  // Statusline breadcrumb: current git branch of the session cwd (best-effort).
959
959
  // Re-run when an agent swap adopts a different persisted cwd (/resume,
960
960
  // issue #96) so the breadcrumb never shows the previous workspace's branch.
@@ -1 +1 @@
1
- {"version":3,"file":"cli-registration.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/cli-registration.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE;QAAE,IAAI,IAAI,MAAM,CAAC;QAAC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAA;CACjE;AAqFD,gGAAgG;AAChG,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,sBAA2B,GAAG,MAAM,CAgFhF"}
1
+ {"version":3,"file":"cli-registration.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/cli-registration.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE;QAAE,IAAI,IAAI,MAAM,CAAC;QAAC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAA;CACjE;AAqFD,gGAAgG;AAChG,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,sBAA2B,GAAG,MAAM,CAiFhF"}
@@ -107,7 +107,7 @@ export function ensureCliRegistered(options = {}) {
107
107
  const shell = options.shell ?? process.env.SHELL ?? '';
108
108
  const pathValue = options.path ?? process.env.PATH ?? '';
109
109
  const sourceRoot = harnessSourceRoot(options.cliEntry ?? process.argv[1])
110
- ?? configuredHarnessRoot(options.dshRoot ?? process.env.DSH_TUI_DSH_ROOT);
110
+ ?? configuredHarnessRoot(options.dshRoot ?? process.env.DSH_CLI_DSH_ROOT);
111
111
  const binDir = platform === 'win32'
112
112
  ? join(options.localAppData ?? process.env.LOCALAPPDATA ?? join(home, 'AppData', 'Local'), 'dsh-cli', 'bin')
113
113
  : join(home, '.local', 'bin');
@@ -122,6 +122,7 @@ export function ensureCliRegistered(options = {}) {
122
122
  throw new Error(`dsh-cli profile package is missing or unreadable at ${profilePackage}`);
123
123
  }
124
124
  const currentCommand = pathValue.split(platform === 'win32' ? ';' : ':')
125
+ .filter(dir => dir.length > 0)
125
126
  .map(dir => join(dir, platform === 'win32' ? 'dsh-cli.cmd' : 'dsh-cli'))
126
127
  .find(candidate => candidate !== command && pathExists(candidate) && !candidate.includes(`${join('node_modules', '.bin')}`));
127
128
  if (currentCommand !== undefined)
@@ -142,7 +143,7 @@ export function ensureCliRegistered(options = {}) {
142
143
  }
143
144
  }
144
145
  try {
145
- const target = join('profiles', 'dsh-cli', 'node_modules', '@askdkc', 'dsh-cli', 'bin', 'dsh-tui.js');
146
+ const target = join('profiles', 'dsh-cli', 'node_modules', '@askdkc', 'dsh-cli', 'bin', 'dsh-cli.js');
146
147
  const content = platform === 'win32'
147
148
  ? `@echo off\r\nrem dsh-cli managed launcher\r\nsetlocal DisableDelayedExpansion\r\nif not defined DSH_HOME set "DSH_HOME=${dshHome.replace(/%/g, '%%')}"\r\nnode "%DSH_HOME%\\${target.replace(/\//g, '\\')}" %*\r\nexit /b %ERRORLEVEL%\r\n`
148
149
  : `#!/bin/sh\n${marker}\nDEFAULT_DSH_HOME=${quoted(dshHome)}\n: "\${DSH_HOME:=$DEFAULT_DSH_HOME}"\nexport DSH_HOME\nexec node "$DSH_HOME/${target}" "$@"\n`;
@@ -174,8 +175,8 @@ export function ensureCliRegistered(options = {}) {
174
175
  ? `contains -- ${quoted(binDir)} $PATH; or set -gx PATH ${quoted(binDir)} $PATH`
175
176
  : `case ":$PATH:" in *:${quoted(binDir)}:*) ;; *) export PATH=${quoted(binDir)}:"$PATH" ;; esac`;
176
177
  const sourceLine = sourceRoot === undefined ? '' : basename(shell) === 'fish'
177
- ? `\nset -q DSH_TUI_DSH_ROOT; or set -gx DSH_TUI_DSH_ROOT ${quoted(sourceRoot)}`
178
- : `\nif [ -z "\${DSH_TUI_DSH_ROOT:-}" ]; then export DSH_TUI_DSH_ROOT=${quoted(sourceRoot)}; fi`;
178
+ ? `\nset -q DSH_CLI_DSH_ROOT; or set -gx DSH_CLI_DSH_ROOT ${quoted(sourceRoot)}`
179
+ : `\nif [ -z "\${DSH_CLI_DSH_ROOT:-}" ]; then export DSH_CLI_DSH_ROOT=${quoted(sourceRoot)}; fi`;
179
180
  const line = pathLine + sourceLine;
180
181
  for (const file of files)
181
182
  updateShellFile(file, line);
@@ -21,7 +21,7 @@ declare module '@deepseek-ai/cordis' {
21
21
  tuiCommandTrees: TuiCommandTreeRuntime;
22
22
  }
23
23
  }
24
- export declare const name = "dsh-tui-command-trees";
24
+ export declare const name = "dsh-cli-command-trees";
25
25
  /** Small host-only registry; command execution remains owned by dsh-commands. */
26
26
  export declare class TuiCommandTreeRuntime extends Service {
27
27
  constructor(ctx: Context);
@@ -3,7 +3,7 @@ import { Service } from '@deepseek-ai/cordis';
3
3
  import { activationFiber, bindCallerEffect, compositionRoot, concreteService, requirePluginCaller } from './host-access.js';
4
4
  import { adapterRuntimeFor } from '../adapter/kernel/runtime-context.js';
5
5
  import { assertCapabilityShadowPolicy, } from '../adapter/kernel/runtime.js';
6
- export const name = 'dsh-tui-command-trees';
6
+ export const name = 'dsh-cli-command-trees';
7
7
  /** Small host-only registry; command execution remains owned by dsh-commands. */
8
8
  export class TuiCommandTreeRuntime extends Service {
9
9
  constructor(ctx) {
@@ -37,7 +37,7 @@ export class TuiCommandTreeRuntime extends Service {
37
37
  const state = commandTreeStateFor(this);
38
38
  const owner = activationFiber(caller);
39
39
  if (owner === undefined)
40
- throw new Error('dsh-tui: tuiCommandTrees.register requires a live activation');
40
+ throw new Error('dsh-cli: tuiCommandTrees.register requires a live activation');
41
41
  const root = provider.root.trim().toLowerCase();
42
42
  if (!/^[a-z][a-z0-9_-]*$/u.test(root))
43
43
  throw new TypeError(`invalid TUI command-tree root: ${provider.root}`);
@@ -3,11 +3,11 @@ import type { SessionEvent } from '@deepseek-ai/dsh-session';
3
3
  export declare const TUI_SESSION_EVENT_TYPES: readonly string[];
4
4
  /**
5
5
  * Session-log storage roots, in priority order, mirroring the persistence
6
- * backend's `root` resolution: cordis.patch.yml sets `DSH_TUI_SESSION_ROOT ?? dshHomePath(
6
+ * backend's `root` resolution: cordis.patch.yml sets `DSH_CLI_SESSION_ROOT ?? dshHomePath(
7
7
  * 'sessions')` where dshHomePath is `$DSH_HOME ?? ~/.dsh`; the unpatched
8
- * cordis.yml base falls back to ~/.dsh-tui/sessions, kept here as the legacy
8
+ * cordis.yml base falls back to ~/.dsh-cli/sessions, kept here as the legacy
9
9
  * last resort. Every candidate is scanned — the first hit wins, so an
10
- * explicit DSH_TUI_SESSION_ROOT always outranks the defaults.
10
+ * explicit DSH_CLI_SESSION_ROOT always outranks the defaults.
11
11
  */
12
12
  export declare function sessionsRoots(): string[];
13
13
  /**
@@ -15,21 +15,21 @@ export const TUI_SESSION_EVENT_TYPES = ['session/color'];
15
15
  const ZSTD_MAGIC = 0xfd2fb528;
16
16
  /**
17
17
  * Session-log storage roots, in priority order, mirroring the persistence
18
- * backend's `root` resolution: cordis.patch.yml sets `DSH_TUI_SESSION_ROOT ?? dshHomePath(
18
+ * backend's `root` resolution: cordis.patch.yml sets `DSH_CLI_SESSION_ROOT ?? dshHomePath(
19
19
  * 'sessions')` where dshHomePath is `$DSH_HOME ?? ~/.dsh`; the unpatched
20
- * cordis.yml base falls back to ~/.dsh-tui/sessions, kept here as the legacy
20
+ * cordis.yml base falls back to ~/.dsh-cli/sessions, kept here as the legacy
21
21
  * last resort. Every candidate is scanned — the first hit wins, so an
22
- * explicit DSH_TUI_SESSION_ROOT always outranks the defaults.
22
+ * explicit DSH_CLI_SESSION_ROOT always outranks the defaults.
23
23
  */
24
24
  export function sessionsRoots() {
25
25
  const home = homeDir();
26
26
  const roots = [];
27
- const override = process.env.DSH_TUI_SESSION_ROOT;
27
+ const override = process.env.DSH_CLI_SESSION_ROOT;
28
28
  if (override !== undefined && override.trim().length > 0)
29
29
  roots.push(override);
30
30
  const dshHome = process.env.DSH_HOME;
31
31
  roots.push(join(dshHome !== undefined && dshHome.trim().length > 0 ? dshHome : join(home, '.dsh'), 'sessions'));
32
- roots.push(join(home, '.dsh-tui', 'sessions'));
32
+ roots.push(join(home, '.dsh-cli', 'sessions'));
33
33
  return [...new Set(roots)];
34
34
  }
35
35
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAA;AAElD,4EAA4E;AAC5E,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE;CAAE,CAAA;AAEzE,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAM5G;AAED,4EAA4E;AAC5E,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAQ3F;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAO1E;AAED,UAAU,aAAa,CAAC,CAAC;IACvB,GAAG,IAAI,CAAC,CAAA;IACR,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CAC/C;AAED,gEAAgE;AAChE,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAKvF;AAED,iDAAiD;AACjD,wBAAgB,aAAa,CAAC,QAAQ,EAAE;IACtC,QAAQ,IAAI,SAAS;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;CACvD,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAEtB"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAA;AAIlD,4EAA4E;AAC5E,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE;CAAE,CAAA;AAEzE,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAY5G;AAED,4EAA4E;AAC5E,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAQ3F;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAO1E;AAED,UAAU,aAAa,CAAC,CAAC;IACvB,GAAG,IAAI,CAAC,CAAA;IACR,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CAC/C;AAED,gEAAgE;AAChE,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAKvF;AAED,iDAAiD;AACjD,wBAAgB,aAAa,CAAC,QAAQ,EAAE;IACtC,QAAQ,IAAI,SAAS;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;CACvD,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAEtB"}
@@ -1,21 +1,29 @@
1
+ const VOLATILE_REQUIRED = 'dsh-cli: profile-backed settings require Schemastery volatile Config support. Update DSH and reinstall the current profile dependencies before starting the TUI.';
1
2
  /** Declare only UI preferences as live fields, never the agent/session route. */
2
3
  export function editableConfig(schema, keys) {
3
- for (const key of keys) {
4
- const field = schema.dict?.[String(key)];
5
- if (field !== undefined)
6
- schema.dict[String(key)] = field.volatile();
4
+ const fields = keys.map(String).filter(key => schema.dict?.[key] !== undefined);
5
+ for (const key of fields) {
6
+ if (typeof schema.dict[key]?.volatile !== 'function')
7
+ throw new Error(VOLATILE_REQUIRED);
7
8
  }
9
+ // Stage conversions so a later rejection cannot partially rewrite Config.
10
+ const replacements = new Map();
11
+ for (const key of fields) {
12
+ replacements.set(key, (replacements.get(key) ?? schema.dict[key]).volatile());
13
+ }
14
+ for (const [key, field] of replacements)
15
+ schema.dict[key] = field;
8
16
  return schema;
9
17
  }
10
18
  /** Settings forms use the Config owner's Loader ID, not the plugin name. */
11
19
  export function resolveSettingsNamespace(ctx, schema) {
12
20
  if (!Object.values(schema.dict ?? {}).some(field => field.meta.volatile === true)) {
13
- throw new Error('dsh-tui: profile-backed settings require @deepseek-ai/schemastery >= 3.18.3 with volatile Config support. Update DSH and reinstall the current profile dependencies before starting the TUI.');
21
+ throw new Error(VOLATILE_REQUIRED);
14
22
  }
15
23
  const owner = ctx.fiber;
16
- const ns = owner.entry?.options.id;
24
+ const ns = owner?.entry?.options?.id;
17
25
  if (!ns)
18
- throw new Error('dsh-tui: profile-backed settings require a Loader entry for the Config owner.');
26
+ throw new Error('dsh-cli: profile-backed settings require a Loader entry for the Config owner.');
19
27
  return ns;
20
28
  }
21
29
  /** Snapshot at an operation boundary; retain the host refs for later updates. */
@@ -38,13 +38,13 @@ import { type AdapterRuntimeOptions } from '../adapter/kernel/runtime.js';
38
38
  export { DECISION_EVENT_PERMISSIONS };
39
39
  export { EXTENSION_GRANTS_FILE };
40
40
  /** @deprecated Use GrantStore from `../adapter/standard/grants.js` (same shape, plus more).
41
- * Long-term compatibility alias; owner: dsh-tui adapter. */
41
+ * Long-term compatibility alias; owner: dsh-cli adapter. */
42
42
  export type ExtensionGrants = GrantStore;
43
43
  /** @deprecated Use parseGrantStore from `../adapter/standard/grants.js`.
44
- * Long-term compatibility alias; owner: dsh-tui adapter. */
44
+ * Long-term compatibility alias; owner: dsh-cli adapter. */
45
45
  export declare const parseExtensionGrants: (text: string) => GrantStore;
46
46
  /** @deprecated Use readGrantStore from `../adapter/standard/grants.js`.
47
- * Long-term compatibility alias; owner: dsh-tui adapter. */
47
+ * Long-term compatibility alias; owner: dsh-cli adapter. */
48
48
  export declare const readExtensionGrants: (dir?: string) => GrantStore;
49
49
  export interface DecisionHandlerMetadata {
50
50
  componentId: string;
@@ -43,13 +43,13 @@ export { DECISION_EVENT_PERMISSIONS };
43
43
  // These aliases are intentionally outside the P6 removal scope: they are a
44
44
  // long-term compatibility surface for existing embedder/test code. They map
45
45
  // directly to the canonical `../adapter/standard/grants.js` implementation.
46
- // OWNER: dsh-tui adapter. UNTIL: no scheduled removal.
46
+ // OWNER: dsh-cli adapter. UNTIL: no scheduled removal.
47
47
  export { EXTENSION_GRANTS_FILE };
48
48
  /** @deprecated Use parseGrantStore from `../adapter/standard/grants.js`.
49
- * Long-term compatibility alias; owner: dsh-tui adapter. */
49
+ * Long-term compatibility alias; owner: dsh-cli adapter. */
50
50
  export const parseExtensionGrants = parseGrantStore;
51
51
  /** @deprecated Use readGrantStore from `../adapter/standard/grants.js`.
52
- * Long-term compatibility alias; owner: dsh-tui adapter. */
52
+ * Long-term compatibility alias; owner: dsh-cli adapter. */
53
53
  export const readExtensionGrants = readGrantStore;
54
54
  /**
55
55
  * Install the D-7 gate: every subscription to a decision event is checked
@@ -205,7 +205,7 @@ export function registerDecisionHandler(pluginCtx, identity, event, listener, op
205
205
  const currentlyGranted = permission === undefined || registry.grants.allows(principal, permission, scope);
206
206
  if (!currentlyGranted) {
207
207
  try {
208
- pluginCtx.logger.warn(`dsh-tui: ${event} registration denied for Component "${identity.componentId}" — grant ${permission}@${scope} is missing`);
208
+ pluginCtx.logger.warn(`dsh-cli: ${event} registration denied for Component "${identity.componentId}" — grant ${permission}@${scope} is missing`);
209
209
  }
210
210
  catch { /* best effort */ }
211
211
  return () => false;
@@ -443,7 +443,7 @@ export function installDecisionGuard(ctx, grants) {
443
443
  }
444
444
  catch (error) {
445
445
  try {
446
- this.logger.warn(`dsh-tui: ${name} subscription from Component "${identity.componentId}" denied — ` +
446
+ this.logger.warn(`dsh-cli: ${name} subscription from Component "${identity.componentId}" denied — ` +
447
447
  `${error instanceof Error ? error.message : String(error)}`);
448
448
  }
449
449
  catch { /* best effort */ }
@@ -451,7 +451,7 @@ export function installDecisionGuard(ctx, grants) {
451
451
  }
452
452
  }
453
453
  const requiredGrant = permission === undefined ? '' : `; required grant ${permission}`;
454
- ctx.logger.warn(`dsh-tui: ${name} direct subscription from Component "${pluginName}" denied${requiredGrant} — ` +
454
+ ctx.logger.warn(`dsh-cli: ${name} direct subscription from Component "${pluginName}" denied${requiredGrant} — ` +
455
455
  'use the mediated DecisionEvents activation surface; the listener was NOT registered');
456
456
  // Truthy bail result: cordis skips the registration and hands this back
457
457
  // as the caller's disposer — a no-op keeps the ctx.on contract intact.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Managed plugin dialogs — the pi `ctx.ui.select/confirm/input` seam for
3
- * dsh-TUI. Plugins hand the HOST a declarative request; the TUI renders the
3
+ * dsh-CLI. Plugins hand the HOST a declarative request; the TUI renders the
4
4
  * dialog in its own chrome (next to the approval panel), owns the keyboard,
5
5
  * and settles the plugin's promise with the user's answer. Plugins never
6
6
  * touch the TTY themselves.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Managed plugin dialogs — the pi `ctx.ui.select/confirm/input` seam for
3
- * dsh-TUI. Plugins hand the HOST a declarative request; the TUI renders the
3
+ * dsh-CLI. Plugins hand the HOST a declarative request; the TUI renders the
4
4
  * dialog in its own chrome (next to the approval panel), owns the keyboard,
5
5
  * and settles the plugin's promise with the user's answer. Plugins never
6
6
  * touch the TTY themselves.
@@ -235,7 +235,7 @@ export class TuiDialogRuntime extends Service {
235
235
  options.push({ id, label, ...(description === '' ? {} : { description }) });
236
236
  }
237
237
  if (!title || options.length === 0) {
238
- this.ctx.logger.warn('dsh-tui: tuiDialogs.select called without a title or options; cancelled');
238
+ this.ctx.logger.warn('dsh-cli: tuiDialogs.select called without a title or options; cancelled');
239
239
  return Promise.resolve(undefined);
240
240
  }
241
241
  return dialogStoreFor(this)
@@ -243,7 +243,7 @@ export class TuiDialogRuntime extends Service {
243
243
  .then(value => (typeof value === 'string' ? value : undefined));
244
244
  }
245
245
  catch {
246
- this.ctx.logger.warn('dsh-tui: tuiDialogs.select received malformed data; cancelled');
246
+ this.ctx.logger.warn('dsh-cli: tuiDialogs.select received malformed data; cancelled');
247
247
  return Promise.resolve(undefined);
248
248
  }
249
249
  }
@@ -254,7 +254,7 @@ export class TuiDialogRuntime extends Service {
254
254
  const request = (explicitRequest ?? ownerOrRequest);
255
255
  const title = clean(request?.title, TITLE_CELLS);
256
256
  if (!title) {
257
- this.ctx.logger.warn('dsh-tui: tuiDialogs.confirm called without a title; cancelled');
257
+ this.ctx.logger.warn('dsh-cli: tuiDialogs.confirm called without a title; cancelled');
258
258
  return Promise.resolve(false);
259
259
  }
260
260
  const message = clean(request?.message, MESSAGE_CELLS);
@@ -271,7 +271,7 @@ export class TuiDialogRuntime extends Service {
271
271
  .then(value => value === true);
272
272
  }
273
273
  catch {
274
- this.ctx.logger.warn('dsh-tui: tuiDialogs.confirm received malformed data; cancelled');
274
+ this.ctx.logger.warn('dsh-cli: tuiDialogs.confirm received malformed data; cancelled');
275
275
  return Promise.resolve(false);
276
276
  }
277
277
  }
@@ -282,7 +282,7 @@ export class TuiDialogRuntime extends Service {
282
282
  const request = (explicitRequest ?? ownerOrRequest);
283
283
  const title = clean(request?.title, TITLE_CELLS);
284
284
  if (!title) {
285
- this.ctx.logger.warn('dsh-tui: tuiDialogs.input called without a title; cancelled');
285
+ this.ctx.logger.warn('dsh-cli: tuiDialogs.input called without a title; cancelled');
286
286
  return Promise.resolve(undefined);
287
287
  }
288
288
  const placeholder = clean(request?.placeholder, LABEL_CELLS);
@@ -292,7 +292,7 @@ export class TuiDialogRuntime extends Service {
292
292
  .then(value => (typeof value === 'string' ? value : undefined));
293
293
  }
294
294
  catch {
295
- this.ctx.logger.warn('dsh-tui: tuiDialogs.input received malformed data; cancelled');
295
+ this.ctx.logger.warn('dsh-cli: tuiDialogs.input received malformed data; cancelled');
296
296
  return Promise.resolve(undefined);
297
297
  }
298
298
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Effect ledger (C-060): an append-only JSONL journal of plugin-visible
3
- * effects at `~/.dsh-tui/effect-ledger.jsonl`, mounted by the
4
- * dsh-tui-plugin-host row as `ctx.tuiEffectLedger`.
3
+ * effects at `~/.dsh-cli/effect-ledger.jsonl`, mounted by the
4
+ * dsh-cli-plugin-host row as `ctx.tuiEffectLedger`.
5
5
  *
6
6
  * Every record carries the lifecycle triple:
7
7
  *