@agi-fans/dsh-tui 0.18.0 → 0.20.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 (227) hide show
  1. package/lib/CHANGELOG.md +115 -1
  2. package/lib/chrome/box.d.ts +2 -0
  3. package/lib/chrome/box.js +6 -12
  4. package/lib/chrome/box.js.map +1 -1
  5. package/lib/chrome/code-highlight.d.ts +26 -18
  6. package/lib/chrome/code-highlight.js +114 -39
  7. package/lib/chrome/code-highlight.js.map +1 -1
  8. package/lib/chrome/diff-render.d.ts +1 -2
  9. package/lib/chrome/diff-render.js +41 -90
  10. package/lib/chrome/diff-render.js.map +1 -1
  11. package/lib/chrome/main-screen-renderer.d.ts +52 -30
  12. package/lib/chrome/main-screen-renderer.js +1730 -79
  13. package/lib/chrome/main-screen-renderer.js.map +1 -1
  14. package/lib/chrome/markdown.js +144 -101
  15. package/lib/chrome/markdown.js.map +1 -1
  16. package/lib/chrome/math.d.ts +4 -0
  17. package/lib/chrome/math.js +340 -0
  18. package/lib/chrome/math.js.map +1 -0
  19. package/lib/chrome/md-style.d.ts +3 -0
  20. package/lib/chrome/md-style.js.map +1 -1
  21. package/lib/chrome/mermaid.d.ts +6 -0
  22. package/lib/chrome/mermaid.js +56 -0
  23. package/lib/chrome/mermaid.js.map +1 -0
  24. package/lib/chrome/renderer.d.ts +78 -0
  25. package/lib/chrome/renderer.js.map +1 -1
  26. package/lib/chrome/status-config.d.ts +5 -0
  27. package/lib/chrome/status-config.js +3 -0
  28. package/lib/chrome/status-config.js.map +1 -1
  29. package/lib/chrome/status-line.d.ts +0 -21
  30. package/lib/chrome/status-line.js +8 -65
  31. package/lib/chrome/status-line.js.map +1 -1
  32. package/lib/chrome/terminal-images.d.ts +31 -0
  33. package/lib/chrome/terminal-images.js +34 -0
  34. package/lib/chrome/terminal-images.js.map +1 -0
  35. package/lib/chrome/theme.d.ts +23 -6
  36. package/lib/chrome/theme.js +217 -109
  37. package/lib/chrome/theme.js.map +1 -1
  38. package/lib/chrome/tool-args.d.ts +24 -1
  39. package/lib/chrome/tool-args.js +40 -1
  40. package/lib/chrome/tool-args.js.map +1 -1
  41. package/lib/chrome/tool-renderers.d.ts +11 -0
  42. package/lib/chrome/tool-renderers.js +55 -5
  43. package/lib/chrome/tool-renderers.js.map +1 -1
  44. package/lib/chrome/welcome-tips.js +2 -2
  45. package/lib/chrome/welcome-tips.js.map +1 -1
  46. package/lib/chrome/width.d.ts +7 -3
  47. package/lib/chrome/width.js +78 -14
  48. package/lib/chrome/width.js.map +1 -1
  49. package/lib/commands/diff.js +49 -3
  50. package/lib/commands/diff.js.map +1 -1
  51. package/lib/commands/export.js +28 -5
  52. package/lib/commands/export.js.map +1 -1
  53. package/lib/commands/files.d.ts +8 -0
  54. package/lib/commands/files.js +137 -0
  55. package/lib/commands/files.js.map +1 -0
  56. package/lib/commands/plugins.d.ts +8 -0
  57. package/lib/commands/plugins.js +158 -0
  58. package/lib/commands/plugins.js.map +1 -0
  59. package/lib/commands/session-configuration.d.ts +4 -0
  60. package/lib/commands/session-configuration.js +39 -8
  61. package/lib/commands/session-configuration.js.map +1 -1
  62. package/lib/commands/session.js +47 -15
  63. package/lib/commands/session.js.map +1 -1
  64. package/lib/commands/steer.js +2 -2
  65. package/lib/commands/steer.js.map +1 -1
  66. package/lib/commands/terminal.d.ts +7 -0
  67. package/lib/commands/terminal.js +99 -0
  68. package/lib/commands/terminal.js.map +1 -0
  69. package/lib/definition.d.ts +180 -14
  70. package/lib/definition.js.map +1 -1
  71. package/lib/input/clipboard.d.ts +12 -7
  72. package/lib/input/clipboard.js +79 -20
  73. package/lib/input/clipboard.js.map +1 -1
  74. package/lib/input/composer-files.d.ts +26 -0
  75. package/lib/input/composer-files.js +50 -0
  76. package/lib/input/composer-files.js.map +1 -0
  77. package/lib/input/editor-discovery.d.ts +21 -0
  78. package/lib/input/editor-discovery.js +99 -0
  79. package/lib/input/editor-discovery.js.map +1 -0
  80. package/lib/input/editor.d.ts +26 -1
  81. package/lib/input/editor.js +126 -12
  82. package/lib/input/editor.js.map +1 -1
  83. package/lib/input/external-editor.d.ts +5 -2
  84. package/lib/input/external-editor.js +14 -12
  85. package/lib/input/external-editor.js.map +1 -1
  86. package/lib/input/fuzzy-search.d.ts +9 -0
  87. package/lib/input/fuzzy-search.js +113 -0
  88. package/lib/input/fuzzy-search.js.map +1 -0
  89. package/lib/input/keybindings-config.d.ts +1 -1
  90. package/lib/input/keybindings-config.js +7 -1
  91. package/lib/input/keybindings-config.js.map +1 -1
  92. package/lib/input/keys.d.ts +17 -0
  93. package/lib/input/keys.js +21 -5
  94. package/lib/input/keys.js.map +1 -1
  95. package/lib/input/mouse-policy.d.ts +3 -0
  96. package/lib/input/mouse-policy.js +14 -0
  97. package/lib/input/mouse-policy.js.map +1 -0
  98. package/lib/input/paste-burst.d.ts +16 -0
  99. package/lib/input/paste-burst.js +61 -0
  100. package/lib/input/paste-burst.js.map +1 -0
  101. package/lib/input/text-selection.d.ts +20 -0
  102. package/lib/input/text-selection.js +195 -0
  103. package/lib/input/text-selection.js.map +1 -0
  104. package/lib/runtime/composer-images.d.ts +1 -0
  105. package/lib/runtime/composer-images.js +11 -3
  106. package/lib/runtime/composer-images.js.map +1 -1
  107. package/lib/runtime/file-open.d.ts +2 -0
  108. package/lib/runtime/file-open.js +12 -0
  109. package/lib/runtime/file-open.js.map +1 -0
  110. package/lib/runtime/file-review.d.ts +24 -0
  111. package/lib/runtime/file-review.js +188 -0
  112. package/lib/runtime/file-review.js.map +1 -0
  113. package/lib/runtime/herdr-agent.d.ts +7 -15
  114. package/lib/runtime/herdr-agent.js +151 -79
  115. package/lib/runtime/herdr-agent.js.map +1 -1
  116. package/lib/runtime/hook-settings.d.ts +17 -0
  117. package/lib/runtime/hook-settings.js +57 -0
  118. package/lib/runtime/hook-settings.js.map +1 -0
  119. package/lib/runtime/human-interaction.js +1 -1
  120. package/lib/runtime/human-interaction.js.map +1 -1
  121. package/lib/runtime/image-preview.d.ts +8 -0
  122. package/lib/runtime/image-preview.js +119 -0
  123. package/lib/runtime/image-preview.js.map +1 -0
  124. package/lib/runtime/plain-tui.d.ts +2 -0
  125. package/lib/runtime/plain-tui.js +2 -2
  126. package/lib/runtime/plain-tui.js.map +1 -1
  127. package/lib/runtime/plugin-settings.d.ts +17 -0
  128. package/lib/runtime/plugin-settings.js +154 -0
  129. package/lib/runtime/plugin-settings.js.map +1 -0
  130. package/lib/runtime/provider-local.d.ts +58 -7
  131. package/lib/runtime/provider-local.js +1394 -137
  132. package/lib/runtime/provider-local.js.map +1 -1
  133. package/lib/runtime/runner.js +3 -3
  134. package/lib/runtime/runner.js.map +1 -1
  135. package/lib/runtime/session-archive.d.ts +5 -0
  136. package/lib/runtime/session-archive.js +114 -0
  137. package/lib/runtime/session-archive.js.map +1 -0
  138. package/lib/runtime/subagent-model-selection.d.ts +5 -0
  139. package/lib/runtime/subagent-model-selection.js +15 -0
  140. package/lib/runtime/subagent-model-selection.js.map +1 -0
  141. package/lib/runtime/terminal-notifications.d.ts +8 -0
  142. package/lib/runtime/terminal-notifications.js +16 -0
  143. package/lib/runtime/terminal-notifications.js.map +1 -1
  144. package/lib/runtime/terminal-reader.d.ts +11 -0
  145. package/lib/runtime/terminal-reader.js +87 -0
  146. package/lib/runtime/terminal-reader.js.map +1 -0
  147. package/lib/runtime/tool-presentation.js +43 -30
  148. package/lib/runtime/tool-presentation.js.map +1 -1
  149. package/lib/session/composer-drafts.d.ts +20 -0
  150. package/lib/session/composer-drafts.js +103 -0
  151. package/lib/session/composer-drafts.js.map +1 -0
  152. package/lib/session/conversation-turns.d.ts +16 -0
  153. package/lib/session/conversation-turns.js +33 -0
  154. package/lib/session/conversation-turns.js.map +1 -0
  155. package/lib/session/feature-toggles.d.ts +79 -0
  156. package/lib/session/feature-toggles.js +139 -0
  157. package/lib/session/feature-toggles.js.map +1 -0
  158. package/lib/session/fold-policy.d.ts +4 -0
  159. package/lib/session/fold-policy.js +4 -0
  160. package/lib/session/fold-policy.js.map +1 -0
  161. package/lib/session/interaction-adapter.d.ts +2 -2
  162. package/lib/session/interaction-adapter.js +156 -25
  163. package/lib/session/interaction-adapter.js.map +1 -1
  164. package/lib/session/job-notice.d.ts +4 -0
  165. package/lib/session/job-notice.js +44 -3
  166. package/lib/session/job-notice.js.map +1 -1
  167. package/lib/session/message-queue.d.ts +22 -0
  168. package/lib/session/message-queue.js +157 -0
  169. package/lib/session/message-queue.js.map +1 -0
  170. package/lib/session/project-file-search.js +3 -21
  171. package/lib/session/project-file-search.js.map +1 -1
  172. package/lib/session/session-controller.d.ts +11 -18
  173. package/lib/session/session-controller.js +246 -100
  174. package/lib/session/session-controller.js.map +1 -1
  175. package/lib/session/session-library.d.ts +11 -3
  176. package/lib/session/session-library.js +48 -8
  177. package/lib/session/session-library.js.map +1 -1
  178. package/lib/session/session-tree.d.ts +26 -0
  179. package/lib/session/session-tree.js +112 -0
  180. package/lib/session/session-tree.js.map +1 -0
  181. package/lib/session/steering.d.ts +3 -0
  182. package/lib/session/steering.js +9 -0
  183. package/lib/session/steering.js.map +1 -0
  184. package/lib/session/tui-settings.d.ts +23 -1
  185. package/lib/session/tui-settings.js +15 -2
  186. package/lib/session/tui-settings.js.map +1 -1
  187. package/lib/session/workflow-projection.d.ts +9 -0
  188. package/lib/session/workflow-projection.js +44 -0
  189. package/lib/session/workflow-projection.js.map +1 -0
  190. package/lib/views/agent-hub.js +9 -4
  191. package/lib/views/agent-hub.js.map +1 -1
  192. package/lib/views/autocomplete.js +5 -25
  193. package/lib/views/autocomplete.js.map +1 -1
  194. package/lib/views/document-reader.d.ts +34 -0
  195. package/lib/views/document-reader.js +145 -0
  196. package/lib/views/document-reader.js.map +1 -0
  197. package/lib/views/event-views.d.ts +26 -2
  198. package/lib/views/event-views.js +196 -42
  199. package/lib/views/event-views.js.map +1 -1
  200. package/lib/views/hotkeys.d.ts +2 -0
  201. package/lib/views/hotkeys.js +20 -8
  202. package/lib/views/hotkeys.js.map +1 -1
  203. package/lib/views/prompt-selector.d.ts +33 -3
  204. package/lib/views/prompt-selector.js +287 -43
  205. package/lib/views/prompt-selector.js.map +1 -1
  206. package/lib/views/prompt-tree.d.ts +11 -0
  207. package/lib/views/prompt-tree.js +74 -0
  208. package/lib/views/prompt-tree.js.map +1 -0
  209. package/lib/views/session-files.d.ts +7 -0
  210. package/lib/views/session-files.js +62 -0
  211. package/lib/views/session-files.js.map +1 -0
  212. package/lib/views/settings-list.d.ts +32 -4
  213. package/lib/views/settings-list.js +148 -37
  214. package/lib/views/settings-list.js.map +1 -1
  215. package/lib/views/transcript-render.d.ts +117 -18
  216. package/lib/views/transcript-render.js +1084 -126
  217. package/lib/views/transcript-render.js.map +1 -1
  218. package/lib/views/transcript-types.d.ts +80 -2
  219. package/lib/views/transcript-types.js +11 -0
  220. package/lib/views/transcript-types.js.map +1 -1
  221. package/lib/views/workspace-changes.d.ts +27 -0
  222. package/lib/views/workspace-changes.js +128 -0
  223. package/lib/views/workspace-changes.js.map +1 -0
  224. package/package.json +77 -41
  225. package/lib/chrome/style.d.ts +0 -22
  226. package/lib/chrome/style.js +0 -23
  227. package/lib/chrome/style.js.map +0 -1
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Pure rendering of one turn's changed-file summary.
3
+ *
4
+ * The Harness keeps the summary on the host and announces only the turn, so
5
+ * this module renders both the served form and the turn-only fallback a
6
+ * resumed or replayed log has. Everything here is a pure function of the
7
+ * block, theme and width: no terminal, no service, no clock.
8
+ * @module @agi-fans/dsh-tui
9
+ */
10
+ import { paintDiffStats } from "../chrome/diff-render.js";
11
+ import { truncateToWidth, visibleWidth } from "../chrome/width.js";
12
+ /** File rows a collapsed changed-files block paints before folding. */
13
+ export const WORKSPACE_COLLAPSED_LINES = 8;
14
+ /** Left inset shared by the header and every file row. */
15
+ const HEADER_PREFIX = ' ';
16
+ /** Continuation indent under the header. */
17
+ const FILE_PREFIX = ' ';
18
+ /** Columns between the path and its counts. */
19
+ const GUTTER = ' ';
20
+ /**
21
+ * Build one render row, omitting `note` entirely for a file whose line counts
22
+ * are meaningful. The row type declares `note` as an optional string rather
23
+ * than `string | undefined`, so an absent note cannot be passed explicitly.
24
+ */
25
+ function toRow(file) {
26
+ const note = fileNote(file);
27
+ return note === undefined
28
+ ? { display: file.display, added: file.added, deleted: file.deleted }
29
+ : { display: file.display, added: file.added, deleted: file.deleted, note };
30
+ }
31
+ /**
32
+ * Headline for a turn whose summary the host no longer serves.
33
+ *
34
+ * A resumed log replays the durable event but has no recorder behind it, and a
35
+ * composition without the plugin never had one. Both cases must read as a
36
+ * record that exists rather than as a failure.
37
+ */
38
+ function fallbackLines(block, theme, width) {
39
+ const text = theme.fg('dim', `Workspace changes recorded for turn ${block.turn}`);
40
+ return [truncateToWidth(HEADER_PREFIX + text, width)];
41
+ }
42
+ /**
43
+ * Plain-language marker for a file whose line counts are not meaningful.
44
+ */
45
+ function fileNote(row) {
46
+ if (row.binary === true)
47
+ return 'binary';
48
+ if (row.oversized === true)
49
+ return 'too large';
50
+ return undefined;
51
+ }
52
+ /** Plain width of a row's trailing label, which sizes the stats column. */
53
+ function statsWidth(row) {
54
+ if (row.note !== undefined)
55
+ return visibleWidth(row.note);
56
+ const parts = [];
57
+ if (row.added > 0)
58
+ parts.push(`+${row.added}`);
59
+ if (row.deleted > 0)
60
+ parts.push(`-${row.deleted}`);
61
+ return parts.length === 0 ? 0 : parts.join('/').length;
62
+ }
63
+ /**
64
+ * Paint the file rows, aligning the counts into one column sized to the widest
65
+ * visible path rather than to the terminal edge, so a short list reads as a
66
+ * list instead of as a full-width ruler.
67
+ *
68
+ * @param rows - the visible rows, already folded.
69
+ * @param theme - active theme.
70
+ * @param width - terminal width in display cells.
71
+ * @returns one painted line per row.
72
+ */
73
+ function paintRows(rows, theme, width) {
74
+ const widestStats = rows.reduce((widest, row) => Math.max(widest, statsWidth(row)), 0);
75
+ const column = Math.max(1, Math.min(rows.reduce((widest, row) => Math.max(widest, visibleWidth(row.display)), 0), width - visibleWidth(FILE_PREFIX) - GUTTER.length - widestStats));
76
+ return rows.map((row) => {
77
+ const path = visibleWidth(row.display) > column
78
+ ? `…${row.display.slice(-(column - 1))}`
79
+ : row.display;
80
+ const stats = row.note === undefined
81
+ ? paintDiffStats(row.added, row.deleted, theme)
82
+ : theme.fg('dim', row.note);
83
+ return truncateToWidth(FILE_PREFIX + theme.fg('muted', path)
84
+ + ' '.repeat(Math.max(GUTTER.length, column - visibleWidth(path) + GUTTER.length))
85
+ + stats, width);
86
+ });
87
+ }
88
+ /**
89
+ * Render the changed-file rows of one summary, folding past the collapsed
90
+ * limit and reporting how many files the cap omitted.
91
+ */
92
+ export function paintWorkspaceFileRows(summary, theme, width, expanded) {
93
+ const rows = summary.files.map(toRow);
94
+ const visible = expanded ? rows : rows.slice(0, WORKSPACE_COLLAPSED_LINES);
95
+ const lines = paintRows(visible, theme, width);
96
+ if (!expanded && rows.length > visible.length) {
97
+ lines.push(truncateToWidth(FILE_PREFIX + theme.fg('dim', `… ${rows.length - visible.length} more files · ⟨Ctrl+O: Expand⟩`), width));
98
+ }
99
+ const omitted = summary.total - summary.files.length;
100
+ if (omitted > 0) {
101
+ lines.push(truncateToWidth(FILE_PREFIX + theme.fg('dim', `… ${omitted} more files not listed`), width));
102
+ }
103
+ return lines;
104
+ }
105
+ /**
106
+ * Render one changed-files block: a headline naming the file count and the
107
+ * turn's line totals, then the file rows.
108
+ *
109
+ * A turn that changed nothing still produces a block; it says so rather than
110
+ * rendering an empty list, so the transcript shows the turn was measured.
111
+ */
112
+ export function workspaceBlockLines(block, theme, width, toolsExpanded) {
113
+ const summary = block.summary;
114
+ if (summary === undefined)
115
+ return fallbackLines(block, theme, width);
116
+ const count = summary.total === 1 ? '1 file' : `${summary.total} files`;
117
+ const label = `${HEADER_PREFIX}Changed ${count}`;
118
+ const stats = paintDiffStats(summary.added, summary.deleted, theme);
119
+ const headline = stats === '' ? theme.fg('dim', label) : theme.fg('dim', `${label} `) + stats;
120
+ const lines = [truncateToWidth(headline, width)];
121
+ if (summary.files.length === 0) {
122
+ lines.push(truncateToWidth(FILE_PREFIX + theme.fg('dim', 'No file changes'), width));
123
+ return lines;
124
+ }
125
+ lines.push(...paintWorkspaceFileRows(summary, theme, width, toolsExpanded));
126
+ return lines;
127
+ }
128
+ //# sourceMappingURL=workspace-changes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-changes.js","sourceRoot":"","sources":["../../src/views/workspace-changes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAEzD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGlE,uEAAuE;AACvE,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAA;AAE1C,0DAA0D;AAC1D,MAAM,aAAa,GAAG,IAAI,CAAA;AAE1B,4CAA4C;AAC5C,MAAM,WAAW,GAAG,MAAM,CAAA;AAE1B,+CAA+C;AAC/C,MAAM,MAAM,GAAG,IAAI,CAAA;AAUnB;;;;GAIG;AACH,SAAS,KAAK,CAAC,IAA0F;IACvG,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC3B,OAAO,IAAI,KAAK,SAAS;QACvB,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;QACrE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,CAAA;AAC/E,CAAC;AAED;;;;;;GAMG;AACH,SAAS,aAAa,CAAC,KAAqB,EAAE,KAAY,EAAE,KAAa;IACvE,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,uCAAuC,KAAK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AAW,KAAK,EAAE,CAAA;IAChD,MAAM,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IACnE,MAAM,QAAQ,GAAG,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG,KAAK,CAAA;IAC7F,MAAM,KAAK,GAAG,CAAC,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAA;IAChD,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,GAAG,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;QACpF,OAAO,KAAK,CAAA;IACd,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,GAAG,sBAAsB,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAA;IAC3E,OAAO,KAAK,CAAA;AACd,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agi-fans/dsh-tui",
3
3
  "description": "Library-only Cordis plugin suite for DeepSeek Harness terminal presentation and interaction",
4
- "version": "0.18.0",
4
+ "version": "0.20.0",
5
5
  "homepage": "https://omdsh.agi.fans/",
6
6
  "keywords": [
7
7
  "omdsh",
@@ -110,7 +110,27 @@
110
110
  "types": "./lib/runtime/startup-notices.d.ts",
111
111
  "default": "./lib/runtime/startup-notices.js"
112
112
  },
113
- "./package.json": "./package.json"
113
+ "./package.json": "./package.json",
114
+ "./command-plugins": {
115
+ "types": "./lib/commands/plugins.d.ts",
116
+ "default": "./lib/commands/plugins.js"
117
+ },
118
+ "./subagent-model-selection": {
119
+ "types": "./lib/runtime/subagent-model-selection.d.ts",
120
+ "default": "./lib/runtime/subagent-model-selection.js"
121
+ },
122
+ "./command-terminal": {
123
+ "types": "./lib/commands/terminal.d.ts",
124
+ "default": "./lib/commands/terminal.js"
125
+ },
126
+ "./command-files": {
127
+ "types": "./lib/commands/files.d.ts",
128
+ "default": "./lib/commands/files.js"
129
+ },
130
+ "./hook-settings": {
131
+ "types": "./lib/runtime/hook-settings.d.ts",
132
+ "default": "./lib/runtime/hook-settings.js"
133
+ }
114
134
  },
115
135
  "files": [
116
136
  "lib/**/*"
@@ -120,50 +140,66 @@
120
140
  "access": "public"
121
141
  },
122
142
  "dependencies": {
123
- "@deepseek-ai/cordis-plugin-loader": "1.0.5",
124
- "@deepseek-ai/dsh-agent": "0.1.7-rc.1",
125
- "@deepseek-ai/dsh-agent-default-model": "0.1.7-rc.1",
126
- "@deepseek-ai/dsh-agent-preset-registry": "0.1.7-rc.1",
127
- "@deepseek-ai/dsh-attachment": "0.1.7-rc.1",
128
- "@deepseek-ai/dsh-authorization": "0.1.7-rc.1",
129
- "@deepseek-ai/dsh-cmdline": "0.1.7-rc.1",
130
- "@deepseek-ai/dsh-commands": "0.1.7-rc.1",
131
- "@deepseek-ai/dsh-compaction": "0.1.7-rc.1",
132
- "@deepseek-ai/dsh-credentials": "0.1.7-rc.1",
133
- "@deepseek-ai/dsh-file-reference": "0.1.7-rc.1",
134
- "@deepseek-ai/dsh-goal": "0.1.7-rc.1",
135
- "@deepseek-ai/dsh-jobs": "0.1.7-rc.1",
136
- "@deepseek-ai/dsh-llm": "0.1.7-rc.1",
137
- "@deepseek-ai/dsh-llm-retry": "0.1.7-rc.1",
138
- "@deepseek-ai/dsh-permission-presets": "0.1.7-rc.1",
139
- "@deepseek-ai/dsh-plan-mode": "0.1.7-rc.1",
140
- "@deepseek-ai/dsh-session": "0.1.7-rc.1",
141
- "@deepseek-ai/dsh-session-persistence": "0.1.7-rc.1",
142
- "@deepseek-ai/dsh-session-projection": "0.1.7-rc.1",
143
- "@deepseek-ai/dsh-session-query": "0.1.7-rc.1",
144
- "@deepseek-ai/dsh-session-reference": "0.1.7-rc.1",
145
- "@deepseek-ai/dsh-session-stats": "0.1.7-rc.1",
146
- "@deepseek-ai/dsh-session-title": "0.1.7-rc.1",
147
- "@deepseek-ai/dsh-settings": "0.1.7-rc.1",
148
- "@deepseek-ai/dsh-skill": "0.1.7-rc.1",
149
- "@deepseek-ai/dsh-subagent": "0.1.7-rc.1",
150
- "@deepseek-ai/dsh-token-meter": "0.1.7-rc.1",
151
- "@deepseek-ai/dsh-tool-todo": "0.1.7-rc.1",
152
- "@deepseek-ai/dsh-tools": "0.1.7-rc.1",
153
- "@deepseek-ai/dsh-user-approval": "0.1.7-rc.1",
154
- "@deepseek-ai/dsh-user-questions": "0.1.7-rc.1",
155
- "@deepseek-ai/dsh-workspace": "0.1.7-rc.1",
156
- "@deepseek-ai/schemastery": "3.18.4",
157
- "marked": "15.0.12"
143
+ "@deepseek-ai/cordis-plugin-loader": "1.0.6-alpha.1",
144
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
145
+ "@deepseek-ai/dsh-agent-default-model": "0.2.1-alpha.1",
146
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.1-alpha.1",
147
+ "@deepseek-ai/dsh-attachment": "0.2.1-alpha.1",
148
+ "@deepseek-ai/dsh-authorization": "0.2.1-alpha.1",
149
+ "@deepseek-ai/dsh-cmdline": "0.2.1-alpha.1",
150
+ "@deepseek-ai/dsh-commands": "0.2.1-alpha.1",
151
+ "@deepseek-ai/dsh-compaction": "0.2.1-alpha.1",
152
+ "@deepseek-ai/dsh-credentials": "0.2.1-alpha.1",
153
+ "@deepseek-ai/dsh-file-reference": "0.2.1-alpha.1",
154
+ "@deepseek-ai/dsh-goal": "0.2.1-alpha.1",
155
+ "@deepseek-ai/dsh-hook-protocol": "0.2.1-alpha.1",
156
+ "@deepseek-ai/dsh-hooks-claude-code": "0.2.1-alpha.1",
157
+ "@deepseek-ai/dsh-hooks-codex": "0.2.1-alpha.1",
158
+ "@deepseek-ai/dsh-jobs": "0.2.1-alpha.1",
159
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
160
+ "@deepseek-ai/dsh-llm-retry": "0.2.1-alpha.1",
161
+ "@deepseek-ai/dsh-permission-presets": "0.2.1-alpha.1",
162
+ "@deepseek-ai/dsh-plan-mode": "0.2.1-alpha.1",
163
+ "@deepseek-ai/dsh-plugin-manager": "0.2.1-alpha.1",
164
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.1",
165
+ "@deepseek-ai/dsh-session-persistence": "0.2.1-alpha.1",
166
+ "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.1",
167
+ "@deepseek-ai/dsh-session-query": "0.2.1-alpha.1",
168
+ "@deepseek-ai/dsh-session-reference": "0.2.1-alpha.1",
169
+ "@deepseek-ai/dsh-session-stats": "0.2.1-alpha.1",
170
+ "@deepseek-ai/dsh-session-title": "0.2.1-alpha.1",
171
+ "@deepseek-ai/dsh-settings": "0.2.1-alpha.1",
172
+ "@deepseek-ai/dsh-skill": "0.2.1-alpha.1",
173
+ "@deepseek-ai/dsh-subagent": "0.2.1-alpha.1",
174
+ "@deepseek-ai/dsh-terminal": "0.2.1-alpha.1",
175
+ "@deepseek-ai/dsh-token-meter": "0.2.1-alpha.1",
176
+ "@deepseek-ai/dsh-tool-present": "0.2.1-alpha.1",
177
+ "@deepseek-ai/dsh-tool-subagent": "0.2.1-alpha.1",
178
+ "@deepseek-ai/dsh-tool-todo": "0.2.1-alpha.1",
179
+ "@deepseek-ai/dsh-tool-workflow": "0.2.1-alpha.1",
180
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.1",
181
+ "@deepseek-ai/dsh-user-approval": "0.2.1-alpha.1",
182
+ "@deepseek-ai/dsh-user-questions": "0.2.1-alpha.1",
183
+ "@deepseek-ai/dsh-workspace": "0.2.1-alpha.1",
184
+ "@deepseek-ai/dsh-workspace-changes": "0.2.1-alpha.1",
185
+ "@deepseek-ai/schemastery": "3.18.5-alpha.1",
186
+ "diff": "9.0.0",
187
+ "fflate": "0.8.3",
188
+ "lovely-mermaid": "0.3.3",
189
+ "marked": "15.0.12",
190
+ "prismjs": "1.30.0",
191
+ "sharp": "0.35.3"
158
192
  },
159
193
  "peerDependencies": {
160
- "@deepseek-ai/cordis": "^4.0.4"
194
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1"
161
195
  },
162
196
  "devDependencies": {
163
- "@deepseek-ai/cordis": "4.0.4",
164
- "@deepseek-ai/dsh-scope": "0.1.7-rc.1",
165
- "@deepseek-ai/dsh-session-persistence-jsonl": "0.1.7-rc.1",
197
+ "@deepseek-ai/cordis": "4.0.5-alpha.1",
198
+ "@deepseek-ai/dsh-scope": "0.2.1-alpha.1",
199
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.1",
166
200
  "@types/node": "^22.10.0",
201
+ "@types/prismjs": "1.26.6",
202
+ "@xterm/headless": "6.0.0",
167
203
  "tsx": "^4.19.0",
168
204
  "typescript": "^5.6.0",
169
205
  "vitest": "^2.1.0"
@@ -1,22 +0,0 @@
1
- /**
2
- * Thin adapter over the oh-my-pi theme for callers that still want the
3
- * original six wrap functions. New view code should use `createTheme`.
4
- * @module @agi-fans/dsh-tui
5
- */
6
- /** Per-style wrap functions; every member is (text: string) => string. */
7
- export interface Style {
8
- /** Dimmed. */
9
- dim(text: string): string;
10
- /** Bold. */
11
- bold(text: string): string;
12
- cyan(text: string): string;
13
- green(text: string): string;
14
- red(text: string): string;
15
- yellow(text: string): string;
16
- }
17
- /**
18
- * Build the style set from the OMP theme.
19
- * @param colors - whether to emit SGR color/dim sequences.
20
- * @returns the wrapped style functions.
21
- */
22
- export declare function createStyle(colors: boolean): Style;
@@ -1,23 +0,0 @@
1
- /**
2
- * Thin adapter over the oh-my-pi theme for callers that still want the
3
- * original six wrap functions. New view code should use `createTheme`.
4
- * @module @agi-fans/dsh-tui
5
- */
6
- import { createTheme } from "./theme.js";
7
- /**
8
- * Build the style set from the OMP theme.
9
- * @param colors - whether to emit SGR color/dim sequences.
10
- * @returns the wrapped style functions.
11
- */
12
- export function createStyle(colors) {
13
- const theme = createTheme(colors, false);
14
- return {
15
- dim: (text) => theme.dim(text),
16
- bold: (text) => theme.bold(text),
17
- cyan: (text) => theme.fg('border', text),
18
- green: (text) => theme.fg('success', text),
19
- red: (text) => theme.fg('error', text),
20
- yellow: (text) => theme.fg('warning', text),
21
- };
22
- }
23
- //# sourceMappingURL=style.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["../../src/chrome/style.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAcxC;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAe;IACzC,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;IACxC,OAAO;QACL,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;QAC9B,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;QAChC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;QACxC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;QAC1C,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC;QACtC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;KAC5C,CAAA;AACH,CAAC"}