@deepseek-harness-tui/dsh-tui 0.5.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 (638) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +235 -0
  3. package/bin/dsh-tui.js +95 -0
  4. package/cordis.patch.yml +218 -0
  5. package/cordis.yml +185 -0
  6. package/lib/invariant.js +28 -0
  7. package/lib/types/activityPrefs.d.ts +29 -0
  8. package/lib/types/activityPrefs.d.ts.map +1 -0
  9. package/lib/types/activityPrefs.js +60 -0
  10. package/lib/types/bootstrap/state.d.ts +13 -0
  11. package/lib/types/bootstrap/state.d.ts.map +1 -0
  12. package/lib/types/bootstrap/state.js +12 -0
  13. package/lib/types/cc/cliHighlight.d.ts +20 -0
  14. package/lib/types/cc/cliHighlight.d.ts.map +1 -0
  15. package/lib/types/cc/cliHighlight.js +53 -0
  16. package/lib/types/cc/figures.d.ts +59 -0
  17. package/lib/types/cc/figures.d.ts.map +1 -0
  18. package/lib/types/cc/figures.js +69 -0
  19. package/lib/types/cc/format.d.ts +26 -0
  20. package/lib/types/cc/format.d.ts.map +1 -0
  21. package/lib/types/cc/format.js +55 -0
  22. package/lib/types/cc/hash.d.ts +25 -0
  23. package/lib/types/cc/hash.d.ts.map +1 -0
  24. package/lib/types/cc/hash.js +41 -0
  25. package/lib/types/cc/hyperlink.d.ts +21 -0
  26. package/lib/types/cc/hyperlink.d.ts.map +1 -0
  27. package/lib/types/cc/hyperlink.js +31 -0
  28. package/lib/types/cc/markdown.d.ts +43 -0
  29. package/lib/types/cc/markdown.d.ts.map +1 -0
  30. package/lib/types/cc/markdown.js +345 -0
  31. package/lib/types/cc/spinnerVerbs.d.ts +3 -0
  32. package/lib/types/cc/spinnerVerbs.d.ts.map +1 -0
  33. package/lib/types/cc/spinnerVerbs.js +190 -0
  34. package/lib/types/cc/terminal.d.ts +15 -0
  35. package/lib/types/cc/terminal.d.ts.map +1 -0
  36. package/lib/types/cc/terminal.js +84 -0
  37. package/lib/types/channel.d.ts +672 -0
  38. package/lib/types/channel.d.ts.map +1 -0
  39. package/lib/types/channel.js +2427 -0
  40. package/lib/types/childStderr.d.ts +63 -0
  41. package/lib/types/childStderr.d.ts.map +1 -0
  42. package/lib/types/childStderr.js +161 -0
  43. package/lib/types/commands.d.ts +55 -0
  44. package/lib/types/commands.d.ts.map +1 -0
  45. package/lib/types/commands.js +101 -0
  46. package/lib/types/components/ActivityLine.d.ts +29 -0
  47. package/lib/types/components/ActivityLine.d.ts.map +1 -0
  48. package/lib/types/components/ActivityLine.js +47 -0
  49. package/lib/types/components/ActivityPicker.d.ts +13 -0
  50. package/lib/types/components/ActivityPicker.d.ts.map +1 -0
  51. package/lib/types/components/ActivityPicker.js +24 -0
  52. package/lib/types/components/CommandSuggestions.d.ts +14 -0
  53. package/lib/types/components/CommandSuggestions.d.ts.map +1 -0
  54. package/lib/types/components/CommandSuggestions.js +33 -0
  55. package/lib/types/components/FileSuggestions.d.ts +12 -0
  56. package/lib/types/components/FileSuggestions.d.ts.map +1 -0
  57. package/lib/types/components/FileSuggestions.js +26 -0
  58. package/lib/types/components/GoalTodoPanel.d.ts +13 -0
  59. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -0
  60. package/lib/types/components/GoalTodoPanel.js +57 -0
  61. package/lib/types/components/HelpMenu.d.ts +12 -0
  62. package/lib/types/components/HelpMenu.d.ts.map +1 -0
  63. package/lib/types/components/HelpMenu.js +12 -0
  64. package/lib/types/components/HistorySearchDialog.d.ts +16 -0
  65. package/lib/types/components/HistorySearchDialog.d.ts.map +1 -0
  66. package/lib/types/components/HistorySearchDialog.js +31 -0
  67. package/lib/types/components/InterruptedByUser.d.ts +7 -0
  68. package/lib/types/components/InterruptedByUser.d.ts.map +1 -0
  69. package/lib/types/components/InterruptedByUser.js +9 -0
  70. package/lib/types/components/LoadedContextPanel.d.ts +20 -0
  71. package/lib/types/components/LoadedContextPanel.d.ts.map +1 -0
  72. package/lib/types/components/LoadedContextPanel.js +30 -0
  73. package/lib/types/components/LogoV2.d.ts +23 -0
  74. package/lib/types/components/LogoV2.d.ts.map +1 -0
  75. package/lib/types/components/LogoV2.js +95 -0
  76. package/lib/types/components/Markdown.d.ts +24 -0
  77. package/lib/types/components/Markdown.d.ts.map +1 -0
  78. package/lib/types/components/Markdown.js +106 -0
  79. package/lib/types/components/MarkdownTable.d.ts +17 -0
  80. package/lib/types/components/MarkdownTable.d.ts.map +1 -0
  81. package/lib/types/components/MarkdownTable.js +272 -0
  82. package/lib/types/components/MessageList.d.ts +41 -0
  83. package/lib/types/components/MessageList.d.ts.map +1 -0
  84. package/lib/types/components/MessageList.js +303 -0
  85. package/lib/types/components/ModelPicker.d.ts +14 -0
  86. package/lib/types/components/ModelPicker.d.ts.map +1 -0
  87. package/lib/types/components/ModelPicker.js +15 -0
  88. package/lib/types/components/PresetPicker.d.ts +17 -0
  89. package/lib/types/components/PresetPicker.d.ts.map +1 -0
  90. package/lib/types/components/PresetPicker.js +25 -0
  91. package/lib/types/components/PromptInput.d.ts +67 -0
  92. package/lib/types/components/PromptInput.d.ts.map +1 -0
  93. package/lib/types/components/PromptInput.js +778 -0
  94. package/lib/types/components/ResumePicker.d.ts +15 -0
  95. package/lib/types/components/ResumePicker.d.ts.map +1 -0
  96. package/lib/types/components/ResumePicker.js +34 -0
  97. package/lib/types/components/RewindPicker.d.ts +14 -0
  98. package/lib/types/components/RewindPicker.d.ts.map +1 -0
  99. package/lib/types/components/RewindPicker.js +23 -0
  100. package/lib/types/components/SearchBox.d.ts +20 -0
  101. package/lib/types/components/SearchBox.d.ts.map +1 -0
  102. package/lib/types/components/SearchBox.js +33 -0
  103. package/lib/types/components/Select.d.ts +22 -0
  104. package/lib/types/components/Select.d.ts.map +1 -0
  105. package/lib/types/components/Select.js +19 -0
  106. package/lib/types/components/Spinner/GlimmerMessage.d.ts +19 -0
  107. package/lib/types/components/Spinner/GlimmerMessage.d.ts.map +1 -0
  108. package/lib/types/components/Spinner/GlimmerMessage.js +78 -0
  109. package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts +31 -0
  110. package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts.map +1 -0
  111. package/lib/types/components/Spinner/SpinnerAnimationRow.js +162 -0
  112. package/lib/types/components/Spinner/SpinnerGlyph.d.ts +16 -0
  113. package/lib/types/components/Spinner/SpinnerGlyph.d.ts.map +1 -0
  114. package/lib/types/components/Spinner/SpinnerGlyph.js +36 -0
  115. package/lib/types/components/Spinner/spinnerMode.d.ts +6 -0
  116. package/lib/types/components/Spinner/spinnerMode.d.ts.map +1 -0
  117. package/lib/types/components/Spinner/spinnerMode.js +1 -0
  118. package/lib/types/components/Spinner/spinnerUtils.d.ts +41 -0
  119. package/lib/types/components/Spinner/spinnerUtils.d.ts.map +1 -0
  120. package/lib/types/components/Spinner/spinnerUtils.js +104 -0
  121. package/lib/types/components/Spinner/useStalledAnimation.d.ts +16 -0
  122. package/lib/types/components/Spinner/useStalledAnimation.d.ts.map +1 -0
  123. package/lib/types/components/Spinner/useStalledAnimation.js +71 -0
  124. package/lib/types/components/StreamingMarkdown.d.ts +12 -0
  125. package/lib/types/components/StreamingMarkdown.d.ts.map +1 -0
  126. package/lib/types/components/StreamingMarkdown.js +39 -0
  127. package/lib/types/components/ThemePicker.d.ts +22 -0
  128. package/lib/types/components/ThemePicker.d.ts.map +1 -0
  129. package/lib/types/components/ThemePicker.js +51 -0
  130. package/lib/types/components/ThinkingToggle.d.ts +17 -0
  131. package/lib/types/components/ThinkingToggle.d.ts.map +1 -0
  132. package/lib/types/components/ThinkingToggle.js +30 -0
  133. package/lib/types/components/ToolUseLoader.d.ts +13 -0
  134. package/lib/types/components/ToolUseLoader.d.ts.map +1 -0
  135. package/lib/types/components/ToolUseLoader.js +17 -0
  136. package/lib/types/components/Whale.d.ts +22 -0
  137. package/lib/types/components/Whale.d.ts.map +1 -0
  138. package/lib/types/components/Whale.js +78 -0
  139. package/lib/types/components/WorkingSpinner.d.ts +26 -0
  140. package/lib/types/components/WorkingSpinner.d.ts.map +1 -0
  141. package/lib/types/components/WorkingSpinner.js +68 -0
  142. package/lib/types/components/activityFrames.d.ts +31 -0
  143. package/lib/types/components/activityFrames.d.ts.map +1 -0
  144. package/lib/types/components/activityFrames.js +83 -0
  145. package/lib/types/components/bigfont.d.ts +28 -0
  146. package/lib/types/components/bigfont.d.ts.map +1 -0
  147. package/lib/types/components/bigfont.js +91 -0
  148. package/lib/types/components/design-system/Byline.d.ts +14 -0
  149. package/lib/types/components/design-system/Byline.d.ts.map +1 -0
  150. package/lib/types/components/design-system/Byline.js +17 -0
  151. package/lib/types/components/design-system/Divider.d.ts +40 -0
  152. package/lib/types/components/design-system/Divider.d.ts.map +1 -0
  153. package/lib/types/components/design-system/Divider.js +24 -0
  154. package/lib/types/components/design-system/KeyboardShortcutHint.d.ts +19 -0
  155. package/lib/types/components/design-system/KeyboardShortcutHint.d.ts.map +1 -0
  156. package/lib/types/components/design-system/KeyboardShortcutHint.js +14 -0
  157. package/lib/types/components/design-system/ListItem.d.ts +36 -0
  158. package/lib/types/components/design-system/ListItem.d.ts.map +1 -0
  159. package/lib/types/components/design-system/ListItem.js +48 -0
  160. package/lib/types/components/design-system/LoadingState.d.ts +19 -0
  161. package/lib/types/components/design-system/LoadingState.d.ts.map +1 -0
  162. package/lib/types/components/design-system/LoadingState.js +22 -0
  163. package/lib/types/components/design-system/Pane.d.ts +17 -0
  164. package/lib/types/components/design-system/Pane.d.ts.map +1 -0
  165. package/lib/types/components/design-system/Pane.js +15 -0
  166. package/lib/types/components/design-system/ProgressBar.d.ts +22 -0
  167. package/lib/types/components/design-system/ProgressBar.d.ts.map +1 -0
  168. package/lib/types/components/design-system/ProgressBar.js +27 -0
  169. package/lib/types/components/design-system/StatusIcon.d.ts +15 -0
  170. package/lib/types/components/design-system/StatusIcon.d.ts.map +1 -0
  171. package/lib/types/components/design-system/StatusIcon.js +20 -0
  172. package/lib/types/components/design-system/ThemeProvider.d.ts +11 -0
  173. package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -0
  174. package/lib/types/components/design-system/ThemeProvider.js +135 -0
  175. package/lib/types/components/design-system/ThemedBox.d.ts +37 -0
  176. package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -0
  177. package/lib/types/components/design-system/ThemedBox.js +26 -0
  178. package/lib/types/components/design-system/ThemedText.d.ts +56 -0
  179. package/lib/types/components/design-system/ThemedText.d.ts.map +1 -0
  180. package/lib/types/components/design-system/ThemedText.js +45 -0
  181. package/lib/types/components/messages/AssistantTextMessage.d.ts +18 -0
  182. package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -0
  183. package/lib/types/components/messages/AssistantTextMessage.js +15 -0
  184. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +23 -0
  185. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -0
  186. package/lib/types/components/messages/AssistantThinkingMessage.js +23 -0
  187. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +23 -0
  188. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -0
  189. package/lib/types/components/messages/AssistantToolUseMessage.js +220 -0
  190. package/lib/types/components/messages/MessageMetadata.d.ts +15 -0
  191. package/lib/types/components/messages/MessageMetadata.d.ts.map +1 -0
  192. package/lib/types/components/messages/MessageMetadata.js +20 -0
  193. package/lib/types/components/messages/UserPromptMessage.d.ts +19 -0
  194. package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -0
  195. package/lib/types/components/messages/UserPromptMessage.js +15 -0
  196. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +39 -0
  197. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -0
  198. package/lib/types/components/questions/AskUserQuestionPanel.js +228 -0
  199. package/lib/types/components/shimmer.d.ts +35 -0
  200. package/lib/types/components/shimmer.d.ts.map +1 -0
  201. package/lib/types/components/shimmer.js +43 -0
  202. package/lib/types/components/whaleFrames.d.ts +25 -0
  203. package/lib/types/components/whaleFrames.d.ts.map +1 -0
  204. package/lib/types/components/whaleFrames.js +419 -0
  205. package/lib/types/customTheme.d.ts +104 -0
  206. package/lib/types/customTheme.d.ts.map +1 -0
  207. package/lib/types/customTheme.js +268 -0
  208. package/lib/types/effortPrefs.d.ts +22 -0
  209. package/lib/types/effortPrefs.d.ts.map +1 -0
  210. package/lib/types/effortPrefs.js +45 -0
  211. package/lib/types/history.d.ts +24 -0
  212. package/lib/types/history.d.ts.map +1 -0
  213. package/lib/types/history.js +75 -0
  214. package/lib/types/hooks/useBlink.d.ts +11 -0
  215. package/lib/types/hooks/useBlink.d.ts.map +1 -0
  216. package/lib/types/hooks/useBlink.js +20 -0
  217. package/lib/types/i18n.d.ts +926 -0
  218. package/lib/types/i18n.d.ts.map +1 -0
  219. package/lib/types/i18n.js +356 -0
  220. package/lib/types/index.d.ts +70 -0
  221. package/lib/types/index.d.ts.map +1 -0
  222. package/lib/types/index.js +31 -0
  223. package/lib/types/ink/Ansi.d.ts +11 -0
  224. package/lib/types/ink/Ansi.d.ts.map +1 -0
  225. package/lib/types/ink/Ansi.js +269 -0
  226. package/lib/types/ink/bidi.d.ts +18 -0
  227. package/lib/types/ink/bidi.d.ts.map +1 -0
  228. package/lib/types/ink/bidi.js +119 -0
  229. package/lib/types/ink/clearTerminal.d.ts +22 -0
  230. package/lib/types/ink/clearTerminal.d.ts.map +1 -0
  231. package/lib/types/ink/clearTerminal.js +72 -0
  232. package/lib/types/ink/colorize.d.ts +33 -0
  233. package/lib/types/ink/colorize.d.ts.map +1 -0
  234. package/lib/types/ink/colorize.js +213 -0
  235. package/lib/types/ink/components/AlternateScreen.d.ts +22 -0
  236. package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -0
  237. package/lib/types/ink/components/AlternateScreen.js +74 -0
  238. package/lib/types/ink/components/App.d.ts +73 -0
  239. package/lib/types/ink/components/App.d.ts.map +1 -0
  240. package/lib/types/ink/components/App.js +597 -0
  241. package/lib/types/ink/components/AppContext.d.ts +15 -0
  242. package/lib/types/ink/components/AppContext.d.ts.map +1 -0
  243. package/lib/types/ink/components/AppContext.js +11 -0
  244. package/lib/types/ink/components/Box.d.ts +49 -0
  245. package/lib/types/ink/components/Box.d.ts.map +1 -0
  246. package/lib/types/ink/components/Box.js +153 -0
  247. package/lib/types/ink/components/Button.d.ts +37 -0
  248. package/lib/types/ink/components/Button.d.ts.map +1 -0
  249. package/lib/types/ink/components/Button.js +166 -0
  250. package/lib/types/ink/components/ClockContext.d.ts +10 -0
  251. package/lib/types/ink/components/ClockContext.d.ts.map +1 -0
  252. package/lib/types/ink/components/ClockContext.js +108 -0
  253. package/lib/types/ink/components/CursorDeclarationContext.d.ts +30 -0
  254. package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -0
  255. package/lib/types/ink/components/CursorDeclarationContext.js +6 -0
  256. package/lib/types/ink/components/ErrorOverview.d.ts +7 -0
  257. package/lib/types/ink/components/ErrorOverview.d.ts.map +1 -0
  258. package/lib/types/ink/components/ErrorOverview.js +49 -0
  259. package/lib/types/ink/components/Link.d.ts +8 -0
  260. package/lib/types/ink/components/Link.d.ts.map +1 -0
  261. package/lib/types/ink/components/Link.js +33 -0
  262. package/lib/types/ink/components/Newline.d.ts +13 -0
  263. package/lib/types/ink/components/Newline.d.ts.map +1 -0
  264. package/lib/types/ink/components/Newline.js +29 -0
  265. package/lib/types/ink/components/NoSelect.d.ts +20 -0
  266. package/lib/types/ink/components/NoSelect.d.ts.map +1 -0
  267. package/lib/types/ink/components/NoSelect.js +56 -0
  268. package/lib/types/ink/components/RawAnsi.d.ts +17 -0
  269. package/lib/types/ink/components/RawAnsi.d.ts.map +1 -0
  270. package/lib/types/ink/components/RawAnsi.js +45 -0
  271. package/lib/types/ink/components/ScrollBox.d.ts +78 -0
  272. package/lib/types/ink/components/ScrollBox.d.ts.map +1 -0
  273. package/lib/types/ink/components/ScrollBox.js +174 -0
  274. package/lib/types/ink/components/Spacer.d.ts +6 -0
  275. package/lib/types/ink/components/Spacer.d.ts.map +1 -0
  276. package/lib/types/ink/components/Spacer.js +19 -0
  277. package/lib/types/ink/components/StdinContext.d.ts +32 -0
  278. package/lib/types/ink/components/StdinContext.d.ts.map +1 -0
  279. package/lib/types/ink/components/StdinContext.js +16 -0
  280. package/lib/types/ink/components/TerminalFocusContext.d.ts +11 -0
  281. package/lib/types/ink/components/TerminalFocusContext.d.ts.map +1 -0
  282. package/lib/types/ink/components/TerminalFocusContext.js +45 -0
  283. package/lib/types/ink/components/TerminalSizeContext.d.ts +6 -0
  284. package/lib/types/ink/components/TerminalSizeContext.d.ts.map +1 -0
  285. package/lib/types/ink/components/TerminalSizeContext.js +3 -0
  286. package/lib/types/ink/components/Text.d.ts +56 -0
  287. package/lib/types/ink/components/Text.d.ts.map +1 -0
  288. package/lib/types/ink/components/Text.js +194 -0
  289. package/lib/types/ink/constants.d.ts +3 -0
  290. package/lib/types/ink/constants.d.ts.map +1 -0
  291. package/lib/types/ink/constants.js +2 -0
  292. package/lib/types/ink/cursor.d.ts +11 -0
  293. package/lib/types/ink/cursor.d.ts.map +1 -0
  294. package/lib/types/ink/cursor.js +1 -0
  295. package/lib/types/ink/devtools.d.ts +7 -0
  296. package/lib/types/ink/devtools.d.ts.map +1 -0
  297. package/lib/types/ink/devtools.js +1 -0
  298. package/lib/types/ink/dom.d.ts +178 -0
  299. package/lib/types/ink/dom.d.ts.map +1 -0
  300. package/lib/types/ink/dom.js +424 -0
  301. package/lib/types/ink/events/click-event.d.ts +32 -0
  302. package/lib/types/ink/events/click-event.d.ts.map +1 -0
  303. package/lib/types/ink/events/click-event.js +36 -0
  304. package/lib/types/ink/events/dispatcher.d.ts +63 -0
  305. package/lib/types/ink/events/dispatcher.d.ts.map +1 -0
  306. package/lib/types/ink/events/dispatcher.js +194 -0
  307. package/lib/types/ink/events/emitter.d.ts +20 -0
  308. package/lib/types/ink/events/emitter.d.ts.map +1 -0
  309. package/lib/types/ink/events/emitter.js +43 -0
  310. package/lib/types/ink/events/event-handlers.d.ts +47 -0
  311. package/lib/types/ink/events/event-handlers.d.ts.map +1 -0
  312. package/lib/types/ink/events/event-handlers.js +30 -0
  313. package/lib/types/ink/events/event.d.ts +19 -0
  314. package/lib/types/ink/events/event.d.ts.map +1 -0
  315. package/lib/types/ink/events/event.js +22 -0
  316. package/lib/types/ink/events/focus-event.d.ts +19 -0
  317. package/lib/types/ink/events/focus-event.d.ts.map +1 -0
  318. package/lib/types/ink/events/focus-event.js +21 -0
  319. package/lib/types/ink/events/input-event.d.ts +53 -0
  320. package/lib/types/ink/events/input-event.d.ts.map +1 -0
  321. package/lib/types/ink/events/input-event.js +180 -0
  322. package/lib/types/ink/events/keyboard-event.d.ts +40 -0
  323. package/lib/types/ink/events/keyboard-event.d.ts.map +1 -0
  324. package/lib/types/ink/events/keyboard-event.js +65 -0
  325. package/lib/types/ink/events/paste-event.d.ts +11 -0
  326. package/lib/types/ink/events/paste-event.d.ts.map +1 -0
  327. package/lib/types/ink/events/paste-event.js +13 -0
  328. package/lib/types/ink/events/resize-event.d.ts +13 -0
  329. package/lib/types/ink/events/resize-event.d.ts.map +1 -0
  330. package/lib/types/ink/events/resize-event.js +16 -0
  331. package/lib/types/ink/events/terminal-event.d.ts +112 -0
  332. package/lib/types/ink/events/terminal-event.d.ts.map +1 -0
  333. package/lib/types/ink/events/terminal-event.js +131 -0
  334. package/lib/types/ink/events/terminal-focus-event.d.ts +21 -0
  335. package/lib/types/ink/events/terminal-focus-event.d.ts.map +1 -0
  336. package/lib/types/ink/events/terminal-focus-event.js +18 -0
  337. package/lib/types/ink/focus.d.ts +74 -0
  338. package/lib/types/ink/focus.d.ts.map +1 -0
  339. package/lib/types/ink/focus.js +188 -0
  340. package/lib/types/ink/frame.d.ts +119 -0
  341. package/lib/types/ink/frame.d.ts.map +1 -0
  342. package/lib/types/ink/frame.js +43 -0
  343. package/lib/types/ink/get-max-width.d.ts +20 -0
  344. package/lib/types/ink/get-max-width.d.ts.map +1 -0
  345. package/lib/types/ink/get-max-width.js +25 -0
  346. package/lib/types/ink/hit-test.d.ts +47 -0
  347. package/lib/types/ink/hit-test.d.ts.map +1 -0
  348. package/lib/types/ink/hit-test.js +126 -0
  349. package/lib/types/ink/hooks/use-animation-frame.d.ts +27 -0
  350. package/lib/types/ink/hooks/use-animation-frame.d.ts.map +1 -0
  351. package/lib/types/ink/hooks/use-animation-frame.js +48 -0
  352. package/lib/types/ink/hooks/use-app.d.ts +8 -0
  353. package/lib/types/ink/hooks/use-app.d.ts.map +1 -0
  354. package/lib/types/ink/hooks/use-app.js +8 -0
  355. package/lib/types/ink/hooks/use-copy-on-select.d.ts +22 -0
  356. package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -0
  357. package/lib/types/ink/hooks/use-copy-on-select.js +40 -0
  358. package/lib/types/ink/hooks/use-declared-cursor.d.ts +31 -0
  359. package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -0
  360. package/lib/types/ink/hooks/use-declared-cursor.js +65 -0
  361. package/lib/types/ink/hooks/use-input.d.ts +41 -0
  362. package/lib/types/ink/hooks/use-input.d.ts.map +1 -0
  363. package/lib/types/ink/hooks/use-input.js +73 -0
  364. package/lib/types/ink/hooks/use-interval.d.ts +23 -0
  365. package/lib/types/ink/hooks/use-interval.d.ts.map +1 -0
  366. package/lib/types/ink/hooks/use-interval.js +58 -0
  367. package/lib/types/ink/hooks/use-search-highlight.d.ts +34 -0
  368. package/lib/types/ink/hooks/use-search-highlight.d.ts.map +1 -0
  369. package/lib/types/ink/hooks/use-search-highlight.js +35 -0
  370. package/lib/types/ink/hooks/use-selection.d.ts +44 -0
  371. package/lib/types/ink/hooks/use-selection.d.ts.map +1 -0
  372. package/lib/types/ink/hooks/use-selection.js +64 -0
  373. package/lib/types/ink/hooks/use-stdin.d.ts +8 -0
  374. package/lib/types/ink/hooks/use-stdin.d.ts.map +1 -0
  375. package/lib/types/ink/hooks/use-stdin.js +8 -0
  376. package/lib/types/ink/hooks/use-tab-status.d.ts +18 -0
  377. package/lib/types/ink/hooks/use-tab-status.d.ts.map +1 -0
  378. package/lib/types/ink/hooks/use-tab-status.js +58 -0
  379. package/lib/types/ink/hooks/use-terminal-focus.d.ts +11 -0
  380. package/lib/types/ink/hooks/use-terminal-focus.d.ts.map +1 -0
  381. package/lib/types/ink/hooks/use-terminal-focus.js +15 -0
  382. package/lib/types/ink/hooks/use-terminal-size.d.ts +6 -0
  383. package/lib/types/ink/hooks/use-terminal-size.d.ts.map +1 -0
  384. package/lib/types/ink/hooks/use-terminal-size.js +12 -0
  385. package/lib/types/ink/hooks/use-terminal-title.d.ts +14 -0
  386. package/lib/types/ink/hooks/use-terminal-title.d.ts.map +1 -0
  387. package/lib/types/ink/hooks/use-terminal-title.js +30 -0
  388. package/lib/types/ink/hooks/use-terminal-viewport.d.ts +32 -0
  389. package/lib/types/ink/hooks/use-terminal-viewport.d.ts.map +1 -0
  390. package/lib/types/ink/hooks/use-terminal-viewport.js +79 -0
  391. package/lib/types/ink/ink.d.ts +370 -0
  392. package/lib/types/ink/ink.d.ts.map +1 -0
  393. package/lib/types/ink/ink.js +1665 -0
  394. package/lib/types/ink/instances.d.ts +10 -0
  395. package/lib/types/ink/instances.d.ts.map +1 -0
  396. package/lib/types/ink/instances.js +13 -0
  397. package/lib/types/ink/layout/engine.d.ts +7 -0
  398. package/lib/types/ink/layout/engine.d.ts.map +1 -0
  399. package/lib/types/ink/layout/engine.js +8 -0
  400. package/lib/types/ink/layout/geometry.d.ts +86 -0
  401. package/lib/types/ink/layout/geometry.d.ts.map +1 -0
  402. package/lib/types/ink/layout/geometry.js +95 -0
  403. package/lib/types/ink/layout/node.d.ts +151 -0
  404. package/lib/types/ink/layout/node.d.ts.map +1 -0
  405. package/lib/types/ink/layout/node.js +72 -0
  406. package/lib/types/ink/layout/yoga.d.ts +69 -0
  407. package/lib/types/ink/layout/yoga.d.ts.map +1 -0
  408. package/lib/types/ink/layout/yoga.js +249 -0
  409. package/lib/types/ink/line-width-cache.d.ts +9 -0
  410. package/lib/types/ink/line-width-cache.d.ts.map +1 -0
  411. package/lib/types/ink/line-width-cache.js +45 -0
  412. package/lib/types/ink/log-update.d.ts +57 -0
  413. package/lib/types/ink/log-update.d.ts.map +1 -0
  414. package/lib/types/ink/log-update.js +710 -0
  415. package/lib/types/ink/measure-element.d.ts +19 -0
  416. package/lib/types/ink/measure-element.d.ts.map +1 -0
  417. package/lib/types/ink/measure-element.js +10 -0
  418. package/lib/types/ink/measure-text.d.ts +13 -0
  419. package/lib/types/ink/measure-text.d.ts.map +1 -0
  420. package/lib/types/ink/measure-text.js +38 -0
  421. package/lib/types/ink/node-cache.d.ts +33 -0
  422. package/lib/types/ink/node-cache.d.ts.map +1 -0
  423. package/lib/types/ink/node-cache.js +42 -0
  424. package/lib/types/ink/optimizer.d.ts +18 -0
  425. package/lib/types/ink/optimizer.d.ts.map +1 -0
  426. package/lib/types/ink/optimizer.js +83 -0
  427. package/lib/types/ink/output.d.ts +200 -0
  428. package/lib/types/ink/output.d.ts.map +1 -0
  429. package/lib/types/ink/output.js +663 -0
  430. package/lib/types/ink/parse-keypress.d.ts +132 -0
  431. package/lib/types/ink/parse-keypress.d.ts.map +1 -0
  432. package/lib/types/ink/parse-keypress.js +707 -0
  433. package/lib/types/ink/reconciler.d.ts +43 -0
  434. package/lib/types/ink/reconciler.d.ts.map +1 -0
  435. package/lib/types/ink/reconciler.js +413 -0
  436. package/lib/types/ink/render-border.d.ts +36 -0
  437. package/lib/types/ink/render-border.d.ts.map +1 -0
  438. package/lib/types/ink/render-border.js +143 -0
  439. package/lib/types/ink/render-node-to-output.d.ts +93 -0
  440. package/lib/types/ink/render-node-to-output.d.ts.map +1 -0
  441. package/lib/types/ink/render-node-to-output.js +1290 -0
  442. package/lib/types/ink/render-to-screen.d.ts +65 -0
  443. package/lib/types/ink/render-to-screen.d.ts.map +1 -0
  444. package/lib/types/ink/render-to-screen.js +189 -0
  445. package/lib/types/ink/renderer.d.ts +24 -0
  446. package/lib/types/ink/renderer.d.ts.map +1 -0
  447. package/lib/types/ink/renderer.js +136 -0
  448. package/lib/types/ink/root.d.ts +91 -0
  449. package/lib/types/ink/root.d.ts.map +1 -0
  450. package/lib/types/ink/root.js +93 -0
  451. package/lib/types/ink/screen.d.ts +443 -0
  452. package/lib/types/ink/screen.d.ts.map +1 -0
  453. package/lib/types/ink/screen.js +1295 -0
  454. package/lib/types/ink/searchHighlight.d.ts +25 -0
  455. package/lib/types/ink/searchHighlight.d.ts.map +1 -0
  456. package/lib/types/ink/searchHighlight.js +82 -0
  457. package/lib/types/ink/selection.d.ts +323 -0
  458. package/lib/types/ink/selection.d.ts.map +1 -0
  459. package/lib/types/ink/selection.js +881 -0
  460. package/lib/types/ink/squash-text-nodes.d.ts +30 -0
  461. package/lib/types/ink/squash-text-nodes.d.ts.map +1 -0
  462. package/lib/types/ink/squash-text-nodes.js +63 -0
  463. package/lib/types/ink/stringWidth.d.ts +11 -0
  464. package/lib/types/ink/stringWidth.d.ts.map +1 -0
  465. package/lib/types/ink/stringWidth.js +209 -0
  466. package/lib/types/ink/styles.d.ts +324 -0
  467. package/lib/types/ink/styles.d.ts.map +1 -0
  468. package/lib/types/ink/styles.js +307 -0
  469. package/lib/types/ink/supports-hyperlinks.d.ts +20 -0
  470. package/lib/types/ink/supports-hyperlinks.d.ts.map +1 -0
  471. package/lib/types/ink/supports-hyperlinks.js +44 -0
  472. package/lib/types/ink/tabstops.d.ts +9 -0
  473. package/lib/types/ink/tabstops.d.ts.map +1 -0
  474. package/lib/types/ink/tabstops.js +46 -0
  475. package/lib/types/ink/terminal-focus-state.d.ts +35 -0
  476. package/lib/types/ink/terminal-focus-state.d.ts.map +1 -0
  477. package/lib/types/ink/terminal-focus-state.js +57 -0
  478. package/lib/types/ink/terminal-querier.d.ts +161 -0
  479. package/lib/types/ink/terminal-querier.d.ts.map +1 -0
  480. package/lib/types/ink/terminal-querier.js +204 -0
  481. package/lib/types/ink/terminal.d.ts +80 -0
  482. package/lib/types/ink/terminal.d.ts.map +1 -0
  483. package/lib/types/ink/terminal.js +268 -0
  484. package/lib/types/ink/termio/ansi.d.ts +75 -0
  485. package/lib/types/ink/termio/ansi.d.ts.map +1 -0
  486. package/lib/types/ink/termio/ansi.js +79 -0
  487. package/lib/types/ink/termio/csi.d.ts +253 -0
  488. package/lib/types/ink/termio/csi.d.ts.map +1 -0
  489. package/lib/types/ink/termio/csi.js +347 -0
  490. package/lib/types/ink/termio/dec.d.ts +61 -0
  491. package/lib/types/ink/termio/dec.d.ts.map +1 -0
  492. package/lib/types/ink/termio/dec.js +76 -0
  493. package/lib/types/ink/termio/esc.d.ts +15 -0
  494. package/lib/types/ink/termio/esc.d.ts.map +1 -0
  495. package/lib/types/ink/termio/esc.js +57 -0
  496. package/lib/types/ink/termio/osc.d.ts +208 -0
  497. package/lib/types/ink/termio/osc.d.ts.map +1 -0
  498. package/lib/types/ink/termio/osc.js +466 -0
  499. package/lib/types/ink/termio/parser.d.ts +46 -0
  500. package/lib/types/ink/termio/parser.d.ts.map +1 -0
  501. package/lib/types/ink/termio/parser.js +366 -0
  502. package/lib/types/ink/termio/sgr.d.ts +17 -0
  503. package/lib/types/ink/termio/sgr.d.ts.map +1 -0
  504. package/lib/types/ink/termio/sgr.js +300 -0
  505. package/lib/types/ink/termio/tokenize.d.ts +50 -0
  506. package/lib/types/ink/termio/tokenize.d.ts.map +1 -0
  507. package/lib/types/ink/termio/tokenize.js +266 -0
  508. package/lib/types/ink/termio/types.d.ts +211 -0
  509. package/lib/types/ink/termio/types.d.ts.map +1 -0
  510. package/lib/types/ink/termio/types.js +68 -0
  511. package/lib/types/ink/termio.d.ts +25 -0
  512. package/lib/types/ink/termio.d.ts.map +1 -0
  513. package/lib/types/ink/termio.js +24 -0
  514. package/lib/types/ink/truncateToWidth.d.ts +7 -0
  515. package/lib/types/ink/truncateToWidth.d.ts.map +1 -0
  516. package/lib/types/ink/truncateToWidth.js +18 -0
  517. package/lib/types/ink/useTerminalNotification.d.ts +45 -0
  518. package/lib/types/ink/useTerminalNotification.d.ts.map +1 -0
  519. package/lib/types/ink/useTerminalNotification.js +70 -0
  520. package/lib/types/ink/warn.d.ts +7 -0
  521. package/lib/types/ink/warn.d.ts.map +1 -0
  522. package/lib/types/ink/warn.js +15 -0
  523. package/lib/types/ink/widest-line.d.ts +7 -0
  524. package/lib/types/ink/widest-line.d.ts.map +1 -0
  525. package/lib/types/ink/widest-line.js +19 -0
  526. package/lib/types/ink/wrap-text.d.ts +10 -0
  527. package/lib/types/ink/wrap-text.d.ts.map +1 -0
  528. package/lib/types/ink/wrap-text.js +61 -0
  529. package/lib/types/ink/wrapAnsi.d.ts +18 -0
  530. package/lib/types/ink/wrapAnsi.d.ts.map +1 -0
  531. package/lib/types/ink/wrapAnsi.js +16 -0
  532. package/lib/types/invariant.d.ts +20 -0
  533. package/lib/types/invariant.d.ts.map +1 -0
  534. package/lib/types/invariant.js +26 -0
  535. package/lib/types/modelPrefs.d.ts +37 -0
  536. package/lib/types/modelPrefs.d.ts.map +1 -0
  537. package/lib/types/modelPrefs.js +66 -0
  538. package/lib/types/modelRoute.d.ts +79 -0
  539. package/lib/types/modelRoute.d.ts.map +1 -0
  540. package/lib/types/modelRoute.js +96 -0
  541. package/lib/types/native-ts/yoga-layout/enums.d.ts +183 -0
  542. package/lib/types/native-ts/yoga-layout/enums.d.ts.map +1 -0
  543. package/lib/types/native-ts/yoga-layout/enums.js +150 -0
  544. package/lib/types/native-ts/yoga-layout/index.d.ts +788 -0
  545. package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -0
  546. package/lib/types/native-ts/yoga-layout/index.js +2571 -0
  547. package/lib/types/packaged-skills.d.ts +10 -0
  548. package/lib/types/packaged-skills.d.ts.map +1 -0
  549. package/lib/types/packaged-skills.js +63 -0
  550. package/lib/types/plugin.d.ts +33 -0
  551. package/lib/types/plugin.d.ts.map +1 -0
  552. package/lib/types/plugin.js +454 -0
  553. package/lib/types/presetPrefs.d.ts +29 -0
  554. package/lib/types/presetPrefs.d.ts.map +1 -0
  555. package/lib/types/presetPrefs.js +61 -0
  556. package/lib/types/presets.d.ts +110 -0
  557. package/lib/types/presets.d.ts.map +1 -0
  558. package/lib/types/presets.js +114 -0
  559. package/lib/types/questions.d.ts +97 -0
  560. package/lib/types/questions.d.ts.map +1 -0
  561. package/lib/types/questions.js +201 -0
  562. package/lib/types/screens/Chat.d.ts +23 -0
  563. package/lib/types/screens/Chat.d.ts.map +1 -0
  564. package/lib/types/screens/Chat.js +1263 -0
  565. package/lib/types/screens/StatusLine.d.ts +16 -0
  566. package/lib/types/screens/StatusLine.d.ts.map +1 -0
  567. package/lib/types/screens/StatusLine.js +105 -0
  568. package/lib/types/screens/StatusMetrics.d.ts +87 -0
  569. package/lib/types/screens/StatusMetrics.d.ts.map +1 -0
  570. package/lib/types/screens/StatusMetrics.js +252 -0
  571. package/lib/types/sessionHistory.d.ts +32 -0
  572. package/lib/types/sessionHistory.d.ts.map +1 -0
  573. package/lib/types/sessionHistory.js +87 -0
  574. package/lib/types/theme.d.ts +115 -0
  575. package/lib/types/theme.d.ts.map +1 -0
  576. package/lib/types/theme.js +300 -0
  577. package/lib/types/themePrefs.d.ts +28 -0
  578. package/lib/types/themePrefs.d.ts.map +1 -0
  579. package/lib/types/themePrefs.js +59 -0
  580. package/lib/types/ui.d.ts +28 -0
  581. package/lib/types/ui.d.ts.map +1 -0
  582. package/lib/types/ui.js +25 -0
  583. package/lib/types/update.d.ts +76 -0
  584. package/lib/types/update.d.ts.map +1 -0
  585. package/lib/types/update.js +203 -0
  586. package/lib/types/utils/clipboard.d.ts +43 -0
  587. package/lib/types/utils/clipboard.d.ts.map +1 -0
  588. package/lib/types/utils/clipboard.js +82 -0
  589. package/lib/types/utils/debug.d.ts +8 -0
  590. package/lib/types/utils/debug.d.ts.map +1 -0
  591. package/lib/types/utils/debug.js +12 -0
  592. package/lib/types/utils/earlyInput.d.ts +7 -0
  593. package/lib/types/utils/earlyInput.d.ts.map +1 -0
  594. package/lib/types/utils/earlyInput.js +6 -0
  595. package/lib/types/utils/env.d.ts +10 -0
  596. package/lib/types/utils/env.d.ts.map +1 -0
  597. package/lib/types/utils/env.js +9 -0
  598. package/lib/types/utils/envUtils.d.ts +8 -0
  599. package/lib/types/utils/envUtils.d.ts.map +1 -0
  600. package/lib/types/utils/envUtils.js +13 -0
  601. package/lib/types/utils/execFileNoThrow.d.ts +34 -0
  602. package/lib/types/utils/execFileNoThrow.d.ts.map +1 -0
  603. package/lib/types/utils/execFileNoThrow.js +31 -0
  604. package/lib/types/utils/fullscreen.d.ts +8 -0
  605. package/lib/types/utils/fullscreen.d.ts.map +1 -0
  606. package/lib/types/utils/fullscreen.js +10 -0
  607. package/lib/types/utils/intl.d.ts +7 -0
  608. package/lib/types/utils/intl.d.ts.map +1 -0
  609. package/lib/types/utils/intl.js +9 -0
  610. package/lib/types/utils/loaded-context.d.ts +20 -0
  611. package/lib/types/utils/loaded-context.d.ts.map +1 -0
  612. package/lib/types/utils/loaded-context.js +36 -0
  613. package/lib/types/utils/log.d.ts +7 -0
  614. package/lib/types/utils/log.d.ts.map +1 -0
  615. package/lib/types/utils/log.js +9 -0
  616. package/lib/types/utils/mentions.d.ts +30 -0
  617. package/lib/types/utils/mentions.d.ts.map +1 -0
  618. package/lib/types/utils/mentions.js +72 -0
  619. package/lib/types/utils/narration.d.ts +11 -0
  620. package/lib/types/utils/narration.d.ts.map +1 -0
  621. package/lib/types/utils/narration.js +16 -0
  622. package/lib/types/utils/semver.d.ts +9 -0
  623. package/lib/types/utils/semver.d.ts.map +1 -0
  624. package/lib/types/utils/semver.js +24 -0
  625. package/lib/types/utils/sliceAnsi.d.ts +12 -0
  626. package/lib/types/utils/sliceAnsi.d.ts.map +1 -0
  627. package/lib/types/utils/sliceAnsi.js +79 -0
  628. package/lib/types/working-activity.d.ts +19 -0
  629. package/lib/types/working-activity.d.ts.map +1 -0
  630. package/lib/types/working-activity.js +18 -0
  631. package/package.json +141 -0
  632. package/skills/audit/SKILL.md +24 -0
  633. package/skills/bug/SKILL.md +27 -0
  634. package/skills/pr-comments/SKILL.md +20 -0
  635. package/skills/practice/SKILL.md +22 -0
  636. package/skills/release-notes/SKILL.md +25 -0
  637. package/skills/review/SKILL.md +25 -0
  638. package/skills/vuln-check/SKILL.md +25 -0
@@ -0,0 +1,115 @@
1
+ /**
2
+ * dsh-tui color themes — Gentle Mist Blue (雾蓝) family.
3
+ *
4
+ * Two truecolor palettes share one identity: mist blues carry brand, focus,
5
+ * and interaction; body text stays neutral. `light` is the strict Gentle
6
+ * Mist Blue card (warm off-white background #F6F3ED, ink text #343945) for
7
+ * light terminals; `dark` is its dark-terminal adaptation (warm off-white
8
+ * text, accent-soft blues). `dark-ansi` is the 16-color fallback for
9
+ * terminals without truecolor. The active palette is chosen at startup by
10
+ * querying the terminal background (OSC 11) — see ThemeProvider.
11
+ */
12
+ export type Theme = {
13
+ autoAccept: string;
14
+ bashBorder: string;
15
+ claude: string;
16
+ claudeShimmer: string;
17
+ claudeBlue_FOR_SYSTEM_SPINNER: string;
18
+ claudeBlueShimmer_FOR_SYSTEM_SPINNER: string;
19
+ permission: string;
20
+ permissionShimmer: string;
21
+ planMode: string;
22
+ ide: string;
23
+ promptBorder: string;
24
+ promptBorderShimmer: string;
25
+ text: string;
26
+ inverseText: string;
27
+ inactive: string;
28
+ inactiveShimmer: string;
29
+ subtle: string;
30
+ suggestion: string;
31
+ remember: string;
32
+ background: string;
33
+ success: string;
34
+ error: string;
35
+ warning: string;
36
+ merged: string;
37
+ warningShimmer: string;
38
+ diffAdded: string;
39
+ diffRemoved: string;
40
+ diffAddedDimmed: string;
41
+ diffRemovedDimmed: string;
42
+ diffAddedWord: string;
43
+ diffRemovedWord: string;
44
+ red_FOR_SUBAGENTS_ONLY: string;
45
+ blue_FOR_SUBAGENTS_ONLY: string;
46
+ green_FOR_SUBAGENTS_ONLY: string;
47
+ yellow_FOR_SUBAGENTS_ONLY: string;
48
+ purple_FOR_SUBAGENTS_ONLY: string;
49
+ orange_FOR_SUBAGENTS_ONLY: string;
50
+ pink_FOR_SUBAGENTS_ONLY: string;
51
+ cyan_FOR_SUBAGENTS_ONLY: string;
52
+ professionalBlue: string;
53
+ chromeYellow: string;
54
+ clawd_body: string;
55
+ clawd_background: string;
56
+ userMessageBackground: string;
57
+ userMessageBackgroundHover: string;
58
+ messageActionsBackground: string;
59
+ selectionBg: string;
60
+ bashMessageBackgroundColor: string;
61
+ memoryBackgroundColor: string;
62
+ rate_limit_fill: string;
63
+ rate_limit_empty: string;
64
+ fastMode: string;
65
+ fastModeShimmer: string;
66
+ briefLabelYou: string;
67
+ briefLabelClaude: string;
68
+ rainbow_red: string;
69
+ rainbow_orange: string;
70
+ rainbow_yellow: string;
71
+ rainbow_green: string;
72
+ rainbow_blue: string;
73
+ rainbow_indigo: string;
74
+ rainbow_violet: string;
75
+ rainbow_red_shimmer: string;
76
+ rainbow_orange_shimmer: string;
77
+ rainbow_yellow_shimmer: string;
78
+ rainbow_green_shimmer: string;
79
+ rainbow_blue_shimmer: string;
80
+ rainbow_indigo_shimmer: string;
81
+ rainbow_violet_shimmer: string;
82
+ };
83
+ /** The built-in theme names, in display order. */
84
+ export declare const THEME_NAMES: readonly ["dark", "dark-ansi", "light"];
85
+ /**
86
+ * Any theme name: a built-in palette (`light`/`dark`/`dark-ansi`) or a user
87
+ * theme from ~/.dsh-cc/themes/<name>.json. Always resolvable to a concrete
88
+ * color palette via getTheme() (unknown names fall back to `dark`).
89
+ */
90
+ export type ThemeName = string;
91
+ /**
92
+ * Resolve a theme name to its concrete color palette.
93
+ * @param themeName - The theme to resolve (built-in or user theme name).
94
+ * @returns The matching palette; unknown names fall back to `dark`.
95
+ */
96
+ export declare function getTheme(themeName: ThemeName): Theme;
97
+ /**
98
+ * Register the custom-theme resolver. Called once by ThemeProvider; the
99
+ * resolver must return `undefined` for names it does not know so getTheme
100
+ * falls back to `dark`.
101
+ * @param resolver - Resolves a user theme name to a built palette.
102
+ */
103
+ export declare function registerCustomThemeResolver(resolver: (name: string) => Theme | undefined): void;
104
+ /**
105
+ * Set the module-level active theme; ThemeProvider calls this once
106
+ * background detection settles and on every runtime theme switch.
107
+ * @param name - The theme to activate.
108
+ */
109
+ export declare function setActiveThemeName(name: ThemeName): void;
110
+ /**
111
+ * Resolve the currently active theme for non-React rendering.
112
+ * @returns The palette of the module-level active theme.
113
+ */
114
+ export declare function getActiveTheme(): Theme;
115
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,KAAK,GAAG;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,6BAA6B,EAAE,MAAM,CAAA;IACrC,oCAAoC,EAAE,MAAM,CAAA;IAC5C,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,MAAM,CAAA;IACpB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAElB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IAEtB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,MAAM,CAAA;IACvB,iBAAiB,EAAE,MAAM,CAAA;IACzB,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IAEvB,sBAAsB,EAAE,MAAM,CAAA;IAC9B,uBAAuB,EAAE,MAAM,CAAA;IAC/B,wBAAwB,EAAE,MAAM,CAAA;IAChC,yBAAyB,EAAE,MAAM,CAAA;IACjC,yBAAyB,EAAE,MAAM,CAAA;IACjC,yBAAyB,EAAE,MAAM,CAAA;IACjC,uBAAuB,EAAE,MAAM,CAAA;IAC/B,uBAAuB,EAAE,MAAM,CAAA;IAE/B,gBAAgB,EAAE,MAAM,CAAA;IAExB,YAAY,EAAE,MAAM,CAAA;IAEpB,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;IACxB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,0BAA0B,EAAE,MAAM,CAAA;IAClC,wBAAwB,EAAE,MAAM,CAAA;IAChC,WAAW,EAAE,MAAM,CAAA;IACnB,0BAA0B,EAAE,MAAM,CAAA;IAClC,qBAAqB,EAAE,MAAM,CAAA;IAC7B,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MAAM,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,sBAAsB,EAAE,MAAM,CAAA;IAC9B,sBAAsB,EAAE,MAAM,CAAA;IAC9B,qBAAqB,EAAE,MAAM,CAAA;IAC7B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,sBAAsB,EAAE,MAAM,CAAA;IAC9B,sBAAsB,EAAE,MAAM,CAAA;CAC/B,CAAA;AAED,kDAAkD;AAClD,eAAO,MAAM,WAAW,yCAA0C,CAAA;AAElE;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAkP9B;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,KAAK,CASpD;AASD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,GAAG,SAAS,GAC5C,IAAI,CAEN;AASD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAExD;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,KAAK,CAEtC"}
@@ -0,0 +1,300 @@
1
+ /**
2
+ * dsh-tui color themes — Gentle Mist Blue (雾蓝) family.
3
+ *
4
+ * Two truecolor palettes share one identity: mist blues carry brand, focus,
5
+ * and interaction; body text stays neutral. `light` is the strict Gentle
6
+ * Mist Blue card (warm off-white background #F6F3ED, ink text #343945) for
7
+ * light terminals; `dark` is its dark-terminal adaptation (warm off-white
8
+ * text, accent-soft blues). `dark-ansi` is the 16-color fallback for
9
+ * terminals without truecolor. The active palette is chosen at startup by
10
+ * querying the terminal background (OSC 11) — see ThemeProvider.
11
+ */
12
+ /** The built-in theme names, in display order. */
13
+ export const THEME_NAMES = ['dark', 'dark-ansi', 'light'];
14
+ const rgb = (hex) => {
15
+ const n = parseInt(hex.slice(1), 16);
16
+ return `rgb(${(n >> 16) & 255},${(n >> 8) & 255},${n & 255})`;
17
+ };
18
+ /**
19
+ * Gentle Mist Blue dark adaptation. The blues come straight from the card
20
+ * (#27478C–#ABC2EC); neutrals are warm (derived from #F6F3ED/#343945) so
21
+ * the palette reads calm rather than cyber-hard on a dark terminal.
22
+ */
23
+ const darkTheme = {
24
+ autoAccept: rgb('#B3A0D4'), // Soft violet
25
+ bashBorder: rgb('#D194AE'), // Mist rose
26
+ claude: rgb('#7DA1DE'), // Accent Soft — mist brand blue
27
+ claudeShimmer: rgb('#ABC2EC'), // Border Blue for shimmer effect
28
+ claudeBlue_FOR_SYSTEM_SPINNER: rgb('#7DA1DE'),
29
+ claudeBlueShimmer_FOR_SYSTEM_SPINNER: rgb('#ABC2EC'),
30
+ permission: rgb('#ABC2EC'), // Border Blue — pane/dialog accent
31
+ permissionShimmer: rgb('#C9D7F2'),
32
+ planMode: rgb('#7FAE99'), // Muted sage green
33
+ ide: rgb('#5E88CC'), // Accent Blue
34
+ promptBorder: rgb('#55606F'), // Muted blue-gray
35
+ promptBorderShimmer: rgb('#7DA1DE'),
36
+ text: rgb('#E8E6E0'), // Warm off-white (from #F6F3ED)
37
+ inverseText: rgb('#22262E'), // Deep warm charcoal (from #343945)
38
+ inactive: rgb('#8D95A6'), // Mist gray-blue — feeds dimColor
39
+ inactiveShimmer: rgb('#AAB2C2'),
40
+ subtle: rgb('#5E6673'), // Dimmer blue-gray
41
+ suggestion: rgb('#ABC2EC'), // Border Blue — focus/selection
42
+ remember: rgb('#ABC2EC'),
43
+ background: rgb('#5E88CC'), // Accent Blue — badge fill
44
+ success: rgb('#82B89D'), // Mist green (from #4E9675)
45
+ error: rgb('#DA8A93'), // Soft rose
46
+ warning: rgb('#D8B270'), // Soft amber
47
+ merged: rgb('#B3A0D4'), // Soft violet (matches autoAccept)
48
+ warningShimmer: rgb('#E4C78E'),
49
+ diffAdded: rgb('#27392C'),
50
+ diffRemoved: rgb('#3E2A2C'),
51
+ diffAddedDimmed: rgb('#2B352C'),
52
+ diffRemovedDimmed: rgb('#362B2C'),
53
+ diffAddedWord: rgb('#57956B'),
54
+ diffRemovedWord: rgb('#B26671'),
55
+ red_FOR_SUBAGENTS_ONLY: rgb('#D4685E'),
56
+ blue_FOR_SUBAGENTS_ONLY: rgb('#7496D6'),
57
+ green_FOR_SUBAGENTS_ONLY: rgb('#66B285'),
58
+ yellow_FOR_SUBAGENTS_ONLY: rgb('#D1A94E'),
59
+ purple_FOR_SUBAGENTS_ONLY: rgb('#AC8CD2'),
60
+ orange_FOR_SUBAGENTS_ONLY: rgb('#DB8C50'),
61
+ pink_FOR_SUBAGENTS_ONLY: rgb('#D384A8'),
62
+ cyan_FOR_SUBAGENTS_ONLY: rgb('#6FAFB4'),
63
+ professionalBlue: rgb('#7DA1DE'),
64
+ chromeYellow: rgb('#D8B270'),
65
+ clawd_body: rgb('#D98A63'), // Warm mascot orange
66
+ clawd_background: rgb('#000000'),
67
+ userMessageBackground: rgb('#292D36'),
68
+ userMessageBackgroundHover: rgb('#343945'),
69
+ messageActionsBackground: rgb('#2E333D'),
70
+ selectionBg: rgb('#3B4A66'), // Mist-blue tint on dark
71
+ bashMessageBackgroundColor: rgb('#2C3038'),
72
+ memoryBackgroundColor: rgb('#30353D'),
73
+ rate_limit_fill: rgb('#7DA1DE'),
74
+ rate_limit_empty: rgb('#3C414B'),
75
+ fastMode: rgb('#E09A58'),
76
+ fastModeShimmer: rgb('#EAB478'),
77
+ briefLabelYou: rgb('#ABC2EC'),
78
+ briefLabelClaude: rgb('#7DA1DE'),
79
+ rainbow_red: rgb('#D98F8A'),
80
+ rainbow_orange: rgb('#D9A97E'),
81
+ rainbow_yellow: rgb('#D6BE78'),
82
+ rainbow_green: rgb('#93BBA0'),
83
+ rainbow_blue: rgb('#8FA9D6'),
84
+ rainbow_indigo: rgb('#A89CD4'),
85
+ rainbow_violet: rgb('#C29CC0'),
86
+ rainbow_red_shimmer: rgb('#E4AAAA'),
87
+ rainbow_orange_shimmer: rgb('#E4C09C'),
88
+ rainbow_yellow_shimmer: rgb('#E2D29C'),
89
+ rainbow_green_shimmer: rgb('#B0CEBA'),
90
+ rainbow_blue_shimmer: rgb('#AFBFE2'),
91
+ rainbow_indigo_shimmer: rgb('#BFB4DE'),
92
+ rainbow_violet_shimmer: rgb('#D1B4D1'),
93
+ };
94
+ /**
95
+ * Gentle Mist Blue light theme — the strict original card. Blue carries
96
+ * brand, focus, interaction, and highlight only; body text stays ink gray
97
+ * on the warm off-white family (background #F6F3ED, surface #EEE5D2,
98
+ * surface-alt #E4D9E5).
99
+ */
100
+ const lightTheme = {
101
+ autoAccept: rgb('#9B86B8'), // Muted violet (from surface-alt pink-mist)
102
+ bashBorder: rgb('#C07A93'), // Muted rose (from surface-alt pink-mist)
103
+ claude: rgb('#3F6CC4'), // Primary Blue — brand
104
+ claudeShimmer: rgb('#5E88CC'), // Accent Blue for shimmer effect
105
+ claudeBlue_FOR_SYSTEM_SPINNER: rgb('#3F6CC4'),
106
+ claudeBlueShimmer_FOR_SYSTEM_SPINNER: rgb('#5E88CC'),
107
+ permission: rgb('#3F6CC4'), // Primary Blue — pane/dialog accent
108
+ permissionShimmer: rgb('#5E88CC'),
109
+ planMode: rgb('#4E9675'), // Sage green
110
+ ide: rgb('#5E88CC'), // Accent Blue
111
+ promptBorder: rgb('#ABC2EC'), // Border Blue
112
+ promptBorderShimmer: rgb('#7DA1DE'), // Accent Soft
113
+ text: rgb('#343945'), // Ink
114
+ inverseText: rgb('#F6F3ED'), // Warm off-white (on colored fills)
115
+ inactive: rgb('#8991A0'), // Text-muted — feeds dimColor
116
+ inactiveShimmer: rgb('#626978'), // Text-secondary
117
+ subtle: rgb('#A6ADBA'), // Lower contrast than inactive
118
+ suggestion: rgb('#3F6CC4'), // Primary Blue — focus/selection
119
+ remember: rgb('#27478C'), // Deep Outline — picker titles
120
+ background: rgb('#3F6CC4'), // Primary Blue — badge fill
121
+ success: rgb('#4E9675'),
122
+ error: rgb('#C65D6B'), // Muted rose-red
123
+ warning: rgb('#C08A3E'), // Muted amber
124
+ merged: rgb('#9B86B8'), // Muted violet (matches autoAccept)
125
+ warningShimmer: rgb('#D0A050'),
126
+ diffAdded: rgb('#DCEBDD'),
127
+ diffRemoved: rgb('#F2DEDE'),
128
+ diffAddedDimmed: rgb('#E4EFE5'),
129
+ diffRemovedDimmed: rgb('#F5E6E4'),
130
+ diffAddedWord: rgb('#A9D3B4'),
131
+ diffRemovedWord: rgb('#E5B3AE'),
132
+ red_FOR_SUBAGENTS_ONLY: rgb('#BE5A52'),
133
+ blue_FOR_SUBAGENTS_ONLY: rgb('#3F6CC4'),
134
+ green_FOR_SUBAGENTS_ONLY: rgb('#4E9675'),
135
+ yellow_FOR_SUBAGENTS_ONLY: rgb('#B98A34'),
136
+ purple_FOR_SUBAGENTS_ONLY: rgb('#9678B4'),
137
+ orange_FOR_SUBAGENTS_ONLY: rgb('#C97F4A'),
138
+ pink_FOR_SUBAGENTS_ONLY: rgb('#C06E97'),
139
+ cyan_FOR_SUBAGENTS_ONLY: rgb('#5698A0'),
140
+ professionalBlue: rgb('#5E88CC'),
141
+ chromeYellow: rgb('#C99A3F'),
142
+ clawd_body: rgb('#D98A63'), // Warm mascot orange
143
+ clawd_background: rgb('#F6F3ED'),
144
+ userMessageBackground: rgb('#EEE5D2'), // Surface
145
+ userMessageBackgroundHover: rgb('#E4D9E5'), // Surface Alt
146
+ messageActionsBackground: rgb('#E4D9E5'),
147
+ selectionBg: rgb('#D5DEF2'), // Mist-blue tint on warm white
148
+ bashMessageBackgroundColor: rgb('#EAE1D3'),
149
+ memoryBackgroundColor: rgb('#E4D9E5'),
150
+ rate_limit_fill: rgb('#7DA1DE'),
151
+ rate_limit_empty: rgb('#DDD5C7'),
152
+ fastMode: rgb('#D98E4A'),
153
+ fastModeShimmer: rgb('#E2A465'),
154
+ briefLabelYou: rgb('#5E88CC'),
155
+ briefLabelClaude: rgb('#3F6CC4'),
156
+ rainbow_red: rgb('#D98888'),
157
+ rainbow_orange: rgb('#D9A276'),
158
+ rainbow_yellow: rgb('#CEB264'),
159
+ rainbow_green: rgb('#8AB392'),
160
+ rainbow_blue: rgb('#87A3D3'),
161
+ rainbow_indigo: rgb('#9C92C8'),
162
+ rainbow_violet: rgb('#BB92B8'),
163
+ rainbow_red_shimmer: rgb('#E4A6A6'),
164
+ rainbow_orange_shimmer: rgb('#E4BB96'),
165
+ rainbow_yellow_shimmer: rgb('#DEC988'),
166
+ rainbow_green_shimmer: rgb('#A9C8AF'),
167
+ rainbow_blue_shimmer: rgb('#A9BCE0'),
168
+ rainbow_indigo_shimmer: rgb('#B7AFD8'),
169
+ rainbow_violet_shimmer: rgb('#CFB0CC'),
170
+ };
171
+ /**
172
+ * Dark ANSI theme using only the 16 standard ANSI colors, for terminals
173
+ * without true color support (verbatim from the leak).
174
+ *
175
+ * User themes (JSON files in ~/.dsh-cc/themes/) overlay one of these three
176
+ * bases — see customTheme.ts. `getTheme` resolves them through a resolver
177
+ * registered by ThemeProvider.
178
+ */
179
+ const darkAnsiTheme = {
180
+ autoAccept: 'ansi:magentaBright',
181
+ bashBorder: 'ansi:magentaBright',
182
+ claude: 'ansi:blueBright',
183
+ claudeShimmer: 'ansi:blueBright',
184
+ claudeBlue_FOR_SYSTEM_SPINNER: 'ansi:blueBright',
185
+ claudeBlueShimmer_FOR_SYSTEM_SPINNER: 'ansi:blueBright',
186
+ permission: 'ansi:blueBright',
187
+ permissionShimmer: 'ansi:blueBright',
188
+ planMode: 'ansi:cyanBright',
189
+ ide: 'ansi:blue',
190
+ promptBorder: 'ansi:white',
191
+ promptBorderShimmer: 'ansi:whiteBright',
192
+ text: 'ansi:whiteBright',
193
+ inverseText: 'ansi:black',
194
+ inactive: 'ansi:white',
195
+ inactiveShimmer: 'ansi:whiteBright',
196
+ subtle: 'ansi:white',
197
+ suggestion: 'ansi:blueBright',
198
+ remember: 'ansi:blueBright',
199
+ background: 'ansi:cyanBright',
200
+ success: 'ansi:greenBright',
201
+ error: 'ansi:redBright',
202
+ warning: 'ansi:yellowBright',
203
+ merged: 'ansi:magentaBright',
204
+ warningShimmer: 'ansi:yellowBright',
205
+ diffAdded: 'ansi:green',
206
+ diffRemoved: 'ansi:red',
207
+ diffAddedDimmed: 'ansi:green',
208
+ diffRemovedDimmed: 'ansi:red',
209
+ diffAddedWord: 'ansi:greenBright',
210
+ diffRemovedWord: 'ansi:redBright',
211
+ red_FOR_SUBAGENTS_ONLY: 'ansi:redBright',
212
+ blue_FOR_SUBAGENTS_ONLY: 'ansi:blueBright',
213
+ green_FOR_SUBAGENTS_ONLY: 'ansi:greenBright',
214
+ yellow_FOR_SUBAGENTS_ONLY: 'ansi:yellowBright',
215
+ purple_FOR_SUBAGENTS_ONLY: 'ansi:magentaBright',
216
+ orange_FOR_SUBAGENTS_ONLY: 'ansi:redBright',
217
+ pink_FOR_SUBAGENTS_ONLY: 'ansi:magentaBright',
218
+ cyan_FOR_SUBAGENTS_ONLY: 'ansi:cyanBright',
219
+ professionalBlue: 'ansi:blueBright',
220
+ chromeYellow: 'ansi:yellowBright',
221
+ clawd_body: 'ansi:redBright',
222
+ clawd_background: 'ansi:black',
223
+ userMessageBackground: 'ansi:blackBright',
224
+ userMessageBackgroundHover: 'ansi:white',
225
+ messageActionsBackground: 'ansi:blackBright',
226
+ selectionBg: 'ansi:blue',
227
+ bashMessageBackgroundColor: 'ansi:black',
228
+ memoryBackgroundColor: 'ansi:blackBright',
229
+ rate_limit_fill: 'ansi:yellow',
230
+ rate_limit_empty: 'ansi:white',
231
+ fastMode: 'ansi:redBright',
232
+ fastModeShimmer: 'ansi:redBright',
233
+ briefLabelYou: 'ansi:blueBright',
234
+ briefLabelClaude: 'ansi:blueBright',
235
+ rainbow_red: 'ansi:red',
236
+ rainbow_orange: 'ansi:redBright',
237
+ rainbow_yellow: 'ansi:yellow',
238
+ rainbow_green: 'ansi:green',
239
+ rainbow_blue: 'ansi:cyan',
240
+ rainbow_indigo: 'ansi:blue',
241
+ rainbow_violet: 'ansi:magenta',
242
+ rainbow_red_shimmer: 'ansi:redBright',
243
+ rainbow_orange_shimmer: 'ansi:yellow',
244
+ rainbow_yellow_shimmer: 'ansi:yellowBright',
245
+ rainbow_green_shimmer: 'ansi:greenBright',
246
+ rainbow_blue_shimmer: 'ansi:cyanBright',
247
+ rainbow_indigo_shimmer: 'ansi:blueBright',
248
+ rainbow_violet_shimmer: 'ansi:magentaBright',
249
+ };
250
+ /**
251
+ * Resolve a theme name to its concrete color palette.
252
+ * @param themeName - The theme to resolve (built-in or user theme name).
253
+ * @returns The matching palette; unknown names fall back to `dark`.
254
+ */
255
+ export function getTheme(themeName) {
256
+ switch (themeName) {
257
+ case 'light':
258
+ return lightTheme;
259
+ case 'dark-ansi':
260
+ return darkAnsiTheme;
261
+ default:
262
+ return customThemeResolver?.(themeName) ?? darkTheme;
263
+ }
264
+ }
265
+ /**
266
+ * Resolver that maps a user theme name to a fully built palette (see
267
+ * customTheme.ts). Wired by ThemeProvider at startup so non-React rendering
268
+ * (markdown inline code) resolves user themes through getActiveTheme().
269
+ */
270
+ let customThemeResolver;
271
+ /**
272
+ * Register the custom-theme resolver. Called once by ThemeProvider; the
273
+ * resolver must return `undefined` for names it does not know so getTheme
274
+ * falls back to `dark`.
275
+ * @param resolver - Resolves a user theme name to a built palette.
276
+ */
277
+ export function registerCustomThemeResolver(resolver) {
278
+ customThemeResolver = resolver;
279
+ }
280
+ /**
281
+ * The theme chosen at startup, mirrored module-level so non-React rendering
282
+ * (markdown inline code in cc/markdown.ts) can resolve palette colors
283
+ * without a context. ThemeProvider sets this once detection settles.
284
+ */
285
+ let activeThemeName = 'dark';
286
+ /**
287
+ * Set the module-level active theme; ThemeProvider calls this once
288
+ * background detection settles and on every runtime theme switch.
289
+ * @param name - The theme to activate.
290
+ */
291
+ export function setActiveThemeName(name) {
292
+ activeThemeName = name;
293
+ }
294
+ /**
295
+ * Resolve the currently active theme for non-React rendering.
296
+ * @returns The palette of the module-level active theme.
297
+ */
298
+ export function getActiveTheme() {
299
+ return getTheme(activeThemeName);
300
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Persisted color-theme preference. The `/theme` choice (built-in palette
3
+ * or user theme name) survives restarts in `~/.dsh-cc/theme.json`, mirroring
4
+ * the working-activity preference (`~/.dsh-cc/working-activity.json`). The
5
+ * file is best-effort: a missing or corrupt file just falls back to the
6
+ * default (terminal-background auto-detection). The preference only wins
7
+ * when CC_TUI_THEME is unset — see ThemeProvider.
8
+ */
9
+ /**
10
+ * Parse a persisted `{ theme }` value; anything else yields undefined.
11
+ * @param text - Raw file contents.
12
+ * @returns The theme name when valid, else undefined.
13
+ */
14
+ export declare function parseThemePref(text: string): string | undefined;
15
+ /**
16
+ * The persisted theme name, or undefined when unset or invalid.
17
+ * @param dir - Prefs directory (injectable for tests).
18
+ * @returns The persisted theme name, if any.
19
+ */
20
+ export declare function readThemePref(dir?: string): string | undefined;
21
+ /**
22
+ * Persist the chosen theme name (best effort).
23
+ * @param name - Theme name to persist.
24
+ * @param dir - Prefs directory (injectable for tests).
25
+ * @returns True when the file was written, false on failure.
26
+ */
27
+ export declare function writeThemePref(name: string, dir?: string): boolean;
28
+ //# sourceMappingURL=themePrefs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themePrefs.d.ts","sourceRoot":"","sources":["../../src/themePrefs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAS/D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,GAAE,MAAkB,GAAG,MAAM,GAAG,SAAS,CAMzE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAQ7E"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Persisted color-theme preference. The `/theme` choice (built-in palette
3
+ * or user theme name) survives restarts in `~/.dsh-cc/theme.json`, mirroring
4
+ * the working-activity preference (`~/.dsh-cc/working-activity.json`). The
5
+ * file is best-effort: a missing or corrupt file just falls back to the
6
+ * default (terminal-background auto-detection). The preference only wins
7
+ * when CC_TUI_THEME is unset — see ThemeProvider.
8
+ */
9
+ import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
10
+ import { homedir } from 'node:os';
11
+ import { join } from 'node:path';
12
+ import { isSafeThemeName } from './customTheme.js';
13
+ const PREFS_DIR = join(homedir(), '.dsh-cc');
14
+ /**
15
+ * Parse a persisted `{ theme }` value; anything else yields undefined.
16
+ * @param text - Raw file contents.
17
+ * @returns The theme name when valid, else undefined.
18
+ */
19
+ export function parseThemePref(text) {
20
+ try {
21
+ const parsed = JSON.parse(text);
22
+ if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed))
23
+ return undefined;
24
+ const theme = parsed.theme;
25
+ return typeof theme === 'string' && isSafeThemeName(theme) ? theme : undefined;
26
+ }
27
+ catch {
28
+ return undefined;
29
+ }
30
+ }
31
+ /**
32
+ * The persisted theme name, or undefined when unset or invalid.
33
+ * @param dir - Prefs directory (injectable for tests).
34
+ * @returns The persisted theme name, if any.
35
+ */
36
+ export function readThemePref(dir = PREFS_DIR) {
37
+ try {
38
+ return parseThemePref(readFileSync(join(dir, 'theme.json'), 'utf8'));
39
+ }
40
+ catch {
41
+ return undefined;
42
+ }
43
+ }
44
+ /**
45
+ * Persist the chosen theme name (best effort).
46
+ * @param name - Theme name to persist.
47
+ * @param dir - Prefs directory (injectable for tests).
48
+ * @returns True when the file was written, false on failure.
49
+ */
50
+ export function writeThemePref(name, dir = PREFS_DIR) {
51
+ try {
52
+ mkdirSync(dir, { recursive: true });
53
+ writeFileSync(join(dir, 'theme.json'), JSON.stringify({ theme: name }, null, 2));
54
+ return true;
55
+ }
56
+ catch {
57
+ return false;
58
+ }
59
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Public surface of the ported Ink core, themed for dsh-tui.
3
+ *
4
+ * The original Claude Code source wrapped the Ink core in a themed facade
5
+ * (`src/ink.ts` + design-system ThemedBox/ThemedText). dsh-tui does the same:
6
+ * `Box`/`Text` here are the theme-aware versions, so every ported CC
7
+ * component can use `color="subtle"`-style theme keys unchanged.
8
+ */
9
+ export { default as render, renderSync, createRoot } from './ink/root.js';
10
+ export type { RenderOptions, Instance, Root } from './ink/root.js';
11
+ export { ThemeProvider, useTheme } from './components/design-system/ThemeProvider.js';
12
+ export { default as Box } from './components/design-system/ThemedBox.js';
13
+ export { default as Text } from './components/design-system/ThemedText.js';
14
+ export { default as Spacer } from './ink/components/Spacer.js';
15
+ export { default as Newline, type Props as NewlineProps } from './ink/components/Newline.js';
16
+ export { NoSelect } from './ink/components/NoSelect.js';
17
+ export { AlternateScreen } from './ink/components/AlternateScreen.js';
18
+ export { default as ScrollBox, type ScrollBoxProps, type ScrollBoxHandle, } from './ink/components/ScrollBox.js';
19
+ export { default as useInput } from './ink/hooks/use-input.js';
20
+ export { useCopyOnSelect } from './ink/hooks/use-copy-on-select.js';
21
+ export { default as useStdin } from './ink/hooks/use-stdin.js';
22
+ export { default as useApp } from './ink/hooks/use-app.js';
23
+ export { useAnimationFrame } from './ink/hooks/use-animation-frame.js';
24
+ export { useTerminalSize } from './ink/hooks/use-terminal-size.js';
25
+ export { useBlink } from './hooks/useBlink.js';
26
+ export { Ansi } from './ink/Ansi.js';
27
+ export type { Key } from './ink/events/input-event.js';
28
+ //# sourceMappingURL=ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/ui.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACzE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAA;AACrF,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,0CAA0C,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,KAAK,IAAI,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AACrE,OAAO,EACL,OAAO,IAAI,SAAS,EACpB,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,YAAY,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAA"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Public surface of the ported Ink core, themed for dsh-tui.
3
+ *
4
+ * The original Claude Code source wrapped the Ink core in a themed facade
5
+ * (`src/ink.ts` + design-system ThemedBox/ThemedText). dsh-tui does the same:
6
+ * `Box`/`Text` here are the theme-aware versions, so every ported CC
7
+ * component can use `color="subtle"`-style theme keys unchanged.
8
+ */
9
+ export { default as render, renderSync, createRoot } from './ink/root.js';
10
+ export { ThemeProvider, useTheme } from './components/design-system/ThemeProvider.js';
11
+ export { default as Box } from './components/design-system/ThemedBox.js';
12
+ export { default as Text } from './components/design-system/ThemedText.js';
13
+ export { default as Spacer } from './ink/components/Spacer.js';
14
+ export { default as Newline } from './ink/components/Newline.js';
15
+ export { NoSelect } from './ink/components/NoSelect.js';
16
+ export { AlternateScreen } from './ink/components/AlternateScreen.js';
17
+ export { default as ScrollBox, } from './ink/components/ScrollBox.js';
18
+ export { default as useInput } from './ink/hooks/use-input.js';
19
+ export { useCopyOnSelect } from './ink/hooks/use-copy-on-select.js';
20
+ export { default as useStdin } from './ink/hooks/use-stdin.js';
21
+ export { default as useApp } from './ink/hooks/use-app.js';
22
+ export { useAnimationFrame } from './ink/hooks/use-animation-frame.js';
23
+ export { useTerminalSize } from './ink/hooks/use-terminal-size.js';
24
+ export { useBlink } from './hooks/useBlink.js';
25
+ export { Ansi } from './ink/Ansi.js';
@@ -0,0 +1,76 @@
1
+ export interface TuiUpdateInfo {
2
+ current: string;
3
+ latest: string;
4
+ }
5
+ /** What a fresh registry lookup says about this install. */
6
+ export type TuiUpdateTarget = {
7
+ kind: 'update';
8
+ current: string;
9
+ latest: string;
10
+ } | {
11
+ kind: 'latest';
12
+ current: string;
13
+ } | {
14
+ kind: 'unknown';
15
+ };
16
+ export interface TuiUpdateResult {
17
+ /** Exit code of the `dsh plugin update` run (0 = the package was updated). */
18
+ updateCode: number;
19
+ /**
20
+ * Exit code of the restarted TUI process. Equals `updateCode` when the
21
+ * failure happened before a restart was attempted.
22
+ */
23
+ restartCode: number;
24
+ }
25
+ /** Read the version from either the compiled package or the source checkout. */
26
+ export declare function installedTuiVersion(): string | undefined;
27
+ /**
28
+ * The profile this TUI was booted with (`dsh --profile <name>`), read from
29
+ * the launcher argv the process inherited. dsh sets no profile env var, and
30
+ * its launcher parses its own flags first, so the first `--profile` token in
31
+ * argv is the launcher's. Undefined for non-profile launches (source
32
+ * checkouts, `--config` overlays) — there is no profile installation for
33
+ * `/update` to act on, so the command must stay disabled there.
34
+ */
35
+ export declare function resolveDshProfileName(argv?: readonly string[]): string | undefined;
36
+ /**
37
+ * Resolve the registry base URL the way npm/pnpm would: `NPM_CONFIG_REGISTRY`
38
+ * (both spellings) over the `registry=` line in ~/.npmrc over npmjs.org, so
39
+ * mirror users see the same `latest` their package manager would install.
40
+ */
41
+ export declare function resolveRegistryBase(): string;
42
+ /** True when `current` is a strictly newer valid version than `previous`. */
43
+ export declare function isVersionNewer(current: string, previous: string): boolean;
44
+ /**
45
+ * Classify this install against a fresh registry lookup: an update is
46
+ * available, the install is already latest, or the answer is unknown
47
+ * (offline / registry error / unreadable own version).
48
+ */
49
+ export declare function resolveTuiUpdateTarget(): Promise<TuiUpdateTarget>;
50
+ /**
51
+ * Check npm for a newer published TUI version. Network and registry errors
52
+ * are intentionally treated as "no result" so an offline launch never delays
53
+ * or blocks the interactive TUI.
54
+ */
55
+ export declare function checkForTuiUpdate(): Promise<TuiUpdateInfo | undefined>;
56
+ /** cmd.exe joins spawn arguments with spaces; quote anything that could split. */
57
+ export declare function shellQuote(args: readonly string[]): string[];
58
+ /**
59
+ * Update the installed dsh-tui package and restart the same launcher while
60
+ * preserving the active session. The TUI must already be unmounted before
61
+ * this is called so pnpm output cannot corrupt the rendered terminal frame.
62
+ *
63
+ * `--latest` is required: `pnpm add` writes a caret range into the profile
64
+ * manifest, and a plain `pnpm update` stays inside that range — with this
65
+ * project's minor-per-release cadence the TUI would restart unchanged while
66
+ * reporting success. The restart carries `DSH_CC_UPDATED_FROM` so the new
67
+ * process can warn when the version did not actually move (e.g. a mirror
68
+ * registry still serving the old `latest`).
69
+ *
70
+ * @param sessionId - Session to resume in the replacement process.
71
+ * @param profile - The dsh profile this TUI was launched with; updating any
72
+ * other profile would leave the running install untouched.
73
+ * @returns Exit codes for the update run and the replacement process.
74
+ */
75
+ export declare function updateTuiAndRestart(sessionId: string, profile: string): Promise<TuiUpdateResult>;
76
+ //# sourceMappingURL=update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf;AAED,4DAA4D;AAC5D,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAA;AAEvB,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,SAAS,CAiBxD;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,GAAE,SAAS,MAAM,EAAiB,GAAG,MAAM,GAAG,SAAS,CAahG;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAW5C;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAIzE;AA4BD;;;;GAIG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,eAAe,CAAC,CASvE;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAG5E;AAED,kFAAkF;AAClF,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAE5D;AAyCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAoBtG"}