@sagmans/dsh-tui 0.6.0 → 0.8.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 (271) hide show
  1. package/.agents/skills/dsh-tui-dogfood/SKILL.md +83 -0
  2. package/.agents/skills/dsh-tui-dogfood/references/home-state.md +78 -0
  3. package/.agents/skills/dsh-tui-dogfood/scripts/clone-links.mjs +133 -0
  4. package/.agents/skills/dsh-tui-dogfood/scripts/run-plugin-from-worktree.sh +417 -0
  5. package/.agents/skills/dsh-tui-update-models/SKILL.md +199 -0
  6. package/.agents/skills/dsh-tui-update-models/references/model-wiring.md +292 -0
  7. package/.agents/skills/dsh-tui-update-models/scripts/dump-model-catalog.mjs +314 -0
  8. package/README.md +154 -27
  9. package/lib/agent/present.d.ts.map +1 -1
  10. package/lib/agent/present.js +2 -1
  11. package/lib/agent/present.js.map +1 -1
  12. package/lib/cards/composition.d.ts +68 -0
  13. package/lib/cards/composition.d.ts.map +1 -0
  14. package/lib/cards/composition.js +117 -0
  15. package/lib/cards/composition.js.map +1 -0
  16. package/lib/cards/presenter.d.ts +23 -0
  17. package/lib/cards/presenter.d.ts.map +1 -0
  18. package/lib/cards/presenter.js +394 -0
  19. package/lib/cards/presenter.js.map +1 -0
  20. package/lib/cards/preview.d.ts +42 -0
  21. package/lib/cards/preview.d.ts.map +1 -0
  22. package/lib/cards/preview.js +51 -0
  23. package/lib/cards/preview.js.map +1 -0
  24. package/lib/cards.d.ts +12 -120
  25. package/lib/cards.d.ts.map +1 -1
  26. package/lib/cards.js +4 -556
  27. package/lib/cards.js.map +1 -1
  28. package/lib/compat/section.d.ts +29 -0
  29. package/lib/compat/section.d.ts.map +1 -0
  30. package/lib/compat/section.js +82 -0
  31. package/lib/compat/section.js.map +1 -0
  32. package/lib/config.d.ts +27 -2
  33. package/lib/config.d.ts.map +1 -1
  34. package/lib/config.js +61 -1
  35. package/lib/config.js.map +1 -1
  36. package/lib/contracts.d.ts +28 -0
  37. package/lib/contracts.d.ts.map +1 -1
  38. package/lib/fold-cursor.d.ts +8 -0
  39. package/lib/fold-cursor.d.ts.map +1 -1
  40. package/lib/fold-cursor.js +18 -0
  41. package/lib/fold-cursor.js.map +1 -1
  42. package/lib/gates/question-card.d.ts +77 -0
  43. package/lib/gates/question-card.d.ts.map +1 -0
  44. package/lib/gates/question-card.js +113 -0
  45. package/lib/gates/question-card.js.map +1 -0
  46. package/lib/gates/questions.d.ts +127 -0
  47. package/lib/gates/questions.d.ts.map +1 -0
  48. package/lib/gates/questions.js +418 -0
  49. package/lib/gates/questions.js.map +1 -0
  50. package/lib/gates.d.ts +1 -113
  51. package/lib/gates.d.ts.map +1 -1
  52. package/lib/gates.js +1 -484
  53. package/lib/gates.js.map +1 -1
  54. package/lib/herdr/client.d.ts +8 -0
  55. package/lib/herdr/client.d.ts.map +1 -1
  56. package/lib/herdr/client.js +13 -1
  57. package/lib/herdr/client.js.map +1 -1
  58. package/lib/herdr/constants.d.ts +18 -0
  59. package/lib/herdr/constants.d.ts.map +1 -1
  60. package/lib/herdr/constants.js +18 -0
  61. package/lib/herdr/constants.js.map +1 -1
  62. package/lib/herdr/reporter.d.ts +20 -4
  63. package/lib/herdr/reporter.d.ts.map +1 -1
  64. package/lib/herdr/reporter.js +70 -20
  65. package/lib/herdr/reporter.js.map +1 -1
  66. package/lib/herdr/state.d.ts +10 -0
  67. package/lib/herdr/state.d.ts.map +1 -1
  68. package/lib/herdr/state.js +21 -4
  69. package/lib/herdr/state.js.map +1 -1
  70. package/lib/index.d.ts +1 -0
  71. package/lib/index.d.ts.map +1 -1
  72. package/lib/index.js +348 -2602
  73. package/lib/index.js.map +1 -1
  74. package/lib/input/action-catalog.d.ts +74 -0
  75. package/lib/input/action-catalog.d.ts.map +1 -0
  76. package/lib/input/action-catalog.js +137 -0
  77. package/lib/input/action-catalog.js.map +1 -0
  78. package/lib/input/actions.d.ts +5 -81
  79. package/lib/input/actions.d.ts.map +1 -1
  80. package/lib/input/actions.js +4 -625
  81. package/lib/input/actions.js.map +1 -1
  82. package/lib/input/completion.d.ts +1 -1
  83. package/lib/input/completion.d.ts.map +1 -1
  84. package/lib/input/completion.js +2 -1
  85. package/lib/input/completion.js.map +1 -1
  86. package/lib/input/file-index.d.ts +40 -0
  87. package/lib/input/file-index.d.ts.map +1 -0
  88. package/lib/input/file-index.js +141 -0
  89. package/lib/input/file-index.js.map +1 -0
  90. package/lib/input/file-search.d.ts +1 -38
  91. package/lib/input/file-search.d.ts.map +1 -1
  92. package/lib/input/file-search.js +1 -487
  93. package/lib/input/file-search.js.map +1 -1
  94. package/lib/input/key-press.d.ts +57 -0
  95. package/lib/input/key-press.d.ts.map +1 -0
  96. package/lib/input/key-press.js +218 -0
  97. package/lib/input/key-press.js.map +1 -0
  98. package/lib/input/keymap-conflicts.d.ts +59 -0
  99. package/lib/input/keymap-conflicts.d.ts.map +1 -0
  100. package/lib/input/keymap-conflicts.js +292 -0
  101. package/lib/input/keymap-conflicts.js.map +1 -0
  102. package/lib/input/keymap-settings.js +1 -1
  103. package/lib/input/keymap-settings.js.map +1 -1
  104. package/lib/input/keymap.d.ts.map +1 -1
  105. package/lib/input/keymap.js +3 -1
  106. package/lib/input/keymap.js.map +1 -1
  107. package/lib/input/workspace-files.d.ts +10 -0
  108. package/lib/input/workspace-files.d.ts.map +1 -0
  109. package/lib/input/workspace-files.js +359 -0
  110. package/lib/input/workspace-files.js.map +1 -0
  111. package/lib/install-skills.d.ts +39 -0
  112. package/lib/install-skills.d.ts.map +1 -0
  113. package/lib/install-skills.js +273 -0
  114. package/lib/install-skills.js.map +1 -0
  115. package/lib/keys-command.d.ts +2 -1
  116. package/lib/keys-command.d.ts.map +1 -1
  117. package/lib/keys-command.js +2 -1
  118. package/lib/keys-command.js.map +1 -1
  119. package/lib/model-list.d.ts +37 -0
  120. package/lib/model-list.d.ts.map +1 -0
  121. package/lib/model-list.js +60 -0
  122. package/lib/model-list.js.map +1 -0
  123. package/lib/startup.d.ts +8 -0
  124. package/lib/startup.d.ts.map +1 -1
  125. package/lib/startup.js +120 -24
  126. package/lib/startup.js.map +1 -1
  127. package/lib/subagents.d.ts +7 -3
  128. package/lib/subagents.d.ts.map +1 -1
  129. package/lib/subagents.js +28 -4
  130. package/lib/subagents.js.map +1 -1
  131. package/lib/surface/appearance-preferences.d.ts +26 -0
  132. package/lib/surface/appearance-preferences.d.ts.map +1 -0
  133. package/lib/surface/appearance-preferences.js +139 -0
  134. package/lib/surface/appearance-preferences.js.map +1 -0
  135. package/lib/surface/appearance.d.ts +87 -0
  136. package/lib/surface/appearance.d.ts.map +1 -0
  137. package/lib/surface/appearance.js +353 -0
  138. package/lib/surface/appearance.js.map +1 -0
  139. package/lib/surface/background-work.d.ts +51 -0
  140. package/lib/surface/background-work.d.ts.map +1 -0
  141. package/lib/surface/background-work.js +172 -0
  142. package/lib/surface/background-work.js.map +1 -0
  143. package/lib/surface/commands.d.ts +82 -0
  144. package/lib/surface/commands.d.ts.map +1 -0
  145. package/lib/surface/commands.js +370 -0
  146. package/lib/surface/commands.js.map +1 -0
  147. package/lib/surface/modal-input.d.ts +59 -0
  148. package/lib/surface/modal-input.d.ts.map +1 -0
  149. package/lib/surface/modal-input.js +243 -0
  150. package/lib/surface/modal-input.js.map +1 -0
  151. package/lib/surface/model-choice.d.ts +54 -0
  152. package/lib/surface/model-choice.d.ts.map +1 -0
  153. package/lib/surface/model-choice.js +325 -0
  154. package/lib/surface/model-choice.js.map +1 -0
  155. package/lib/surface/preset-choice.d.ts +78 -0
  156. package/lib/surface/preset-choice.d.ts.map +1 -0
  157. package/lib/surface/preset-choice.js +163 -0
  158. package/lib/surface/preset-choice.js.map +1 -0
  159. package/lib/surface/prompt-input.d.ts +97 -0
  160. package/lib/surface/prompt-input.d.ts.map +1 -0
  161. package/lib/surface/prompt-input.js +215 -0
  162. package/lib/surface/prompt-input.js.map +1 -0
  163. package/lib/surface/prompt-memory.d.ts +76 -0
  164. package/lib/surface/prompt-memory.d.ts.map +1 -0
  165. package/lib/surface/prompt-memory.js +167 -0
  166. package/lib/surface/prompt-memory.js.map +1 -0
  167. package/lib/surface/session-lifecycle.d.ts +120 -0
  168. package/lib/surface/session-lifecycle.d.ts.map +1 -0
  169. package/lib/surface/session-lifecycle.js +324 -0
  170. package/lib/surface/session-lifecycle.js.map +1 -0
  171. package/lib/surface/session-picker.d.ts +39 -0
  172. package/lib/surface/session-picker.d.ts.map +1 -0
  173. package/lib/surface/session-picker.js +107 -0
  174. package/lib/surface/session-picker.js.map +1 -0
  175. package/lib/surface/session-view.d.ts +86 -0
  176. package/lib/surface/session-view.d.ts.map +1 -0
  177. package/lib/surface/session-view.js +215 -0
  178. package/lib/surface/session-view.js.map +1 -0
  179. package/lib/surface/staged-turns.d.ts +81 -0
  180. package/lib/surface/staged-turns.d.ts.map +1 -0
  181. package/lib/surface/staged-turns.js +206 -0
  182. package/lib/surface/staged-turns.js.map +1 -0
  183. package/lib/surface/terminal-lifecycle.d.ts +76 -0
  184. package/lib/surface/terminal-lifecycle.d.ts.map +1 -0
  185. package/lib/surface/terminal-lifecycle.js +222 -0
  186. package/lib/surface/terminal-lifecycle.js.map +1 -0
  187. package/lib/terminal-text/scan.d.ts +44 -0
  188. package/lib/terminal-text/scan.d.ts.map +1 -0
  189. package/lib/terminal-text/scan.js +195 -0
  190. package/lib/terminal-text/scan.js.map +1 -0
  191. package/lib/terminal-text/sgr.d.ts +32 -0
  192. package/lib/terminal-text/sgr.d.ts.map +1 -0
  193. package/lib/terminal-text/sgr.js +203 -0
  194. package/lib/terminal-text/sgr.js.map +1 -0
  195. package/lib/terminal-text.d.ts +1 -1
  196. package/lib/terminal-text.d.ts.map +1 -1
  197. package/lib/terminal-text.js +2 -379
  198. package/lib/terminal-text.js.map +1 -1
  199. package/lib/theme-command.js +2 -1
  200. package/lib/theme-command.js.map +1 -1
  201. package/lib/theme-defaults.d.ts +64 -0
  202. package/lib/theme-defaults.d.ts.map +1 -0
  203. package/lib/theme-defaults.js +248 -0
  204. package/lib/theme-defaults.js.map +1 -0
  205. package/lib/theme-files.d.ts +1 -1
  206. package/lib/theme-files.d.ts.map +1 -1
  207. package/lib/theme-files.js +1 -1
  208. package/lib/theme-files.js.map +1 -1
  209. package/lib/theme-resolver.d.ts +36 -0
  210. package/lib/theme-resolver.d.ts.map +1 -0
  211. package/lib/theme-resolver.js +112 -0
  212. package/lib/theme-resolver.js.map +1 -0
  213. package/lib/theme-schema.d.ts.map +1 -1
  214. package/lib/theme-schema.js +3 -2
  215. package/lib/theme-schema.js.map +1 -1
  216. package/lib/theme-settings.d.ts +5 -7
  217. package/lib/theme-settings.d.ts.map +1 -1
  218. package/lib/theme-settings.js +37 -21
  219. package/lib/theme-settings.js.map +1 -1
  220. package/lib/theme-tokens.d.ts +0 -89
  221. package/lib/theme-tokens.d.ts.map +1 -1
  222. package/lib/theme-tokens.js +0 -356
  223. package/lib/theme-tokens.js.map +1 -1
  224. package/lib/theme.d.ts +1 -1
  225. package/lib/theme.d.ts.map +1 -1
  226. package/lib/theme.js +2 -1
  227. package/lib/theme.js.map +1 -1
  228. package/lib/tool-display.d.ts.map +1 -1
  229. package/lib/tool-display.js +2 -1
  230. package/lib/tool-display.js.map +1 -1
  231. package/lib/transcript/message-content.d.ts +21 -0
  232. package/lib/transcript/message-content.d.ts.map +1 -0
  233. package/lib/transcript/message-content.js +61 -0
  234. package/lib/transcript/message-content.js.map +1 -0
  235. package/lib/transcript/tool-calls.d.ts +106 -0
  236. package/lib/transcript/tool-calls.d.ts.map +1 -0
  237. package/lib/transcript/tool-calls.js +254 -0
  238. package/lib/transcript/tool-calls.js.map +1 -0
  239. package/lib/transcript.d.ts +14 -55
  240. package/lib/transcript.d.ts.map +1 -1
  241. package/lib/transcript.js +31 -253
  242. package/lib/transcript.js.map +1 -1
  243. package/lib/ui/dock.d.ts +14 -2
  244. package/lib/ui/dock.d.ts.map +1 -1
  245. package/lib/ui/dock.js +52 -10
  246. package/lib/ui/dock.js.map +1 -1
  247. package/lib/ui/editor.d.ts.map +1 -1
  248. package/lib/ui/editor.js +2 -1
  249. package/lib/ui/editor.js.map +1 -1
  250. package/lib/ui/keymap-picker.d.ts +2 -1
  251. package/lib/ui/keymap-picker.d.ts.map +1 -1
  252. package/lib/ui/keymap-picker.js +1 -0
  253. package/lib/ui/keymap-picker.js.map +1 -1
  254. package/lib/ui/view/gate-card.d.ts +21 -0
  255. package/lib/ui/view/gate-card.d.ts.map +1 -0
  256. package/lib/ui/view/gate-card.js +104 -0
  257. package/lib/ui/view/gate-card.js.map +1 -0
  258. package/lib/ui/view/tool-card.d.ts +149 -0
  259. package/lib/ui/view/tool-card.d.ts.map +1 -0
  260. package/lib/ui/view/tool-card.js +429 -0
  261. package/lib/ui/view/tool-card.js.map +1 -0
  262. package/lib/ui/view/transcript-message.d.ts +62 -0
  263. package/lib/ui/view/transcript-message.d.ts.map +1 -0
  264. package/lib/ui/view/transcript-message.js +158 -0
  265. package/lib/ui/view/transcript-message.js.map +1 -0
  266. package/lib/ui/view.d.ts +105 -223
  267. package/lib/ui/view.d.ts.map +1 -1
  268. package/lib/ui/view.js +132 -679
  269. package/lib/ui/view.js.map +1 -1
  270. package/package.json +3 -1
  271. package/themes/violet-orbit.yaml +7 -5
@@ -0,0 +1,82 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import type { Agent } from '@deepseek-ai/dsh-agent';
3
+ import type { PresetRoster } from '../agent/presets.ts';
4
+ import type { RegisteredCommand } from '../input/completion.ts';
5
+ import { type Submission } from '../input/submission.ts';
6
+ import type { PromptStash } from '../stash.ts';
7
+ import type { StatusFacts } from '../ui/status.ts';
8
+ import type { Appearance } from './appearance.ts';
9
+ import type { BackgroundWork } from './background-work.ts';
10
+ import type { ModalInput } from './modal-input.ts';
11
+ import type { ModelChoice } from './model-choice.ts';
12
+ import type { PresetChoice, PresetLaunch } from './preset-choice.ts';
13
+ import type { PromptMemory } from './prompt-memory.ts';
14
+ import type { SessionLifecycle } from './session-lifecycle.ts';
15
+ import type { SessionView } from './session-view.ts';
16
+ import type { StagedTurns } from './staged-turns.ts';
17
+ import type { TerminalLifecycle } from './terminal-lifecycle.ts';
18
+ /**
19
+ * What the command plane needs from the surface that composes it.
20
+ *
21
+ * Each owner arrives whole, because this module is the one place that knows
22
+ * which of their operations a typed line, a chord, or the launch maps onto; the
23
+ * reads it takes of them are live, so a command typed after a session switch
24
+ * answers for the session now on screen. The launch facts and the mode roster
25
+ * are the two things no owner holds, and the notice and render sinks are what a
26
+ * refusal and a repaint are printed through.
27
+ */
28
+ export interface CommandsPorts {
29
+ /** The launch this run was started for, and the mode its own flag named. */
30
+ readonly launch: PresetLaunch;
31
+ readonly preset: string | undefined;
32
+ /** The roster that can say whether a stored session's mode still exists. */
33
+ readonly presetRoster: PresetRoster | undefined;
34
+ /** A composition row that is missing, printed before the screen is taken. */
35
+ readonly missingOptional: () => string | undefined;
36
+ /** An installed skill this build moved past, printed once at startup. */
37
+ readonly skillDrift: () => string | undefined;
38
+ readonly session: SessionLifecycle;
39
+ readonly transcript: SessionView;
40
+ readonly route: ModelChoice;
41
+ readonly modes: PresetChoice;
42
+ readonly work: BackgroundWork;
43
+ readonly staged: StagedTurns;
44
+ readonly memory: PromptMemory;
45
+ readonly appearance: Appearance;
46
+ /** The terminal this surface owns, which is where a copy is written. */
47
+ readonly terminal: TerminalLifecycle;
48
+ /** The one modal interaction at a time, which lends its keyboard to a list. */
49
+ readonly modals: ModalInput;
50
+ readonly statusFacts: () => StatusFacts;
51
+ /** The bank the parked-draft commands read, late-bound behind the picker it needs. */
52
+ readonly stash: () => PromptStash | undefined;
53
+ readonly render: () => void;
54
+ }
55
+ /** The operations the composing surface routes back into the command plane. */
56
+ export interface Commands {
57
+ /** Carry out one classified line, wherever it was asked for. */
58
+ readonly runSubmission: (submission: Submission) => void;
59
+ /**
60
+ * The commands one agent can run, or undefined when no registry answers.
61
+ *
62
+ * A scoped read rather than the registry itself: the registry stays with this
63
+ * owner, and completion only ever needs the names it offers.
64
+ */
65
+ readonly registeredCommands: (agent: Agent) => readonly RegisteredCommand[] | undefined;
66
+ /**
67
+ * Take the screen, then open the session this run was launched for.
68
+ *
69
+ * The launch belongs to this owner because the resume it may ask is the same
70
+ * question the resume command asks, answered by the same list.
71
+ */
72
+ readonly start: () => Promise<void>;
73
+ }
74
+ /**
75
+ * The router over everything the reader and the launcher can ask for.
76
+ *
77
+ * The registry is read from the composition rather than taken as a port: it is
78
+ * scoped to the agent in service, so its listing, lookup and dispatch all have
79
+ * to follow whichever agent the surface is driving now.
80
+ */
81
+ export declare function createCommands(ctx: Context, ports: CommandsPorts): Commands;
82
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/surface/commands.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAGvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAK9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE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SAAS,CAAA;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAA;CAC5B;AAED,+EAA+E;AAC/E,MAAM,WAAW,QAAQ;IACvB,gEAAgE;IAChE,QAAQ,CAAC,aAAa,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAA;IACxD;;;;;OAKG;IACH,QAAQ,CAAC,kBAAkB,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,iBAAiB,EAAE,GAAG,SAAS,CAAA;IACvF;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACpC;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,GAAG,QAAQ,CAgW3E"}
@@ -0,0 +1,370 @@
1
+ import { writeFileSync } from 'node:fs';
2
+ import { resolve } from 'node:path';
3
+ import { SessionId } from '@deepseek-ai/dsh-session';
4
+ import { defaultExportFile, transcriptToText } from "../export.js";
5
+ import { chordKeysLine, surfaceKeysLine } from "../input/keymap.js";
6
+ import { LOCAL_COMMANDS } from "../input/submission.js";
7
+ import { KEYMAP_LAYERS, keymapLayer } from "../keys-command.js";
8
+ import { clipboardSequence } from "../terminal/clipboard.js";
9
+ import { windowTitle } from "../terminal/title.js";
10
+ import { formatTokens } from "../tokens.js";
11
+ import { KeymapPicker } from "../ui/keymap-picker.js";
12
+ import { describeTodos, planSelectedActive, planToggleLine, readPlanState } from "../work.js";
13
+ import { createSessionPicker } from "./session-picker.js";
14
+ /**
15
+ * The router over everything the reader and the launcher can ask for.
16
+ *
17
+ * The registry is read from the composition rather than taken as a port: it is
18
+ * scoped to the agent in service, so its listing, lookup and dispatch all have
19
+ * to follow whichever agent the surface is driving now.
20
+ */
21
+ export function createCommands(ctx, ports) {
22
+ const registry = () => ctx.get('commands');
23
+ // The copy is the one write that must land even while a child owns the tty:
24
+ // the reader asked for the last answer, not for a title, and a handoff that
25
+ // swallowed it would leave the clipboard silently empty.
26
+ const writeTty = (text) => ports.terminal.terminal.write(text);
27
+ /**
28
+ * Open the key map over the surface.
29
+ *
30
+ * Nothing here is a pick: a row names an action and the keys reaching it, so
31
+ * the id the list settles on is thrown away. What the reader came for is the
32
+ * list itself, and the filter that narrows it.
33
+ */
34
+ const openKeyMap = (layer) => {
35
+ void ports.modals.openPicker(new KeymapPicker(ports.appearance.keymap, layer), undefined, 'popup');
36
+ };
37
+ /**
38
+ * Write what the reader can see to a file.
39
+ *
40
+ * The base's `/export` downloads the log through the browser, which a
41
+ * terminal has no way to do, so this dumps the transcript the reader is
42
+ * looking at — the thing worth pasting into a message.
43
+ */
44
+ const runExportCommand = (argument) => {
45
+ const path = resolve(argument === '' ? defaultExportFile(String(ports.session.activeSession())) : argument);
46
+ try {
47
+ writeFileSync(path, transcriptToText(ports.transcript.model.entries()), 'utf8');
48
+ ports.transcript.notice(`transcript written to ${path}`);
49
+ }
50
+ catch (error) {
51
+ ports.transcript.notice(`could not write ${path}: ${error instanceof Error ? error.message : String(error)}`);
52
+ }
53
+ ports.render();
54
+ };
55
+ /** Show the todo list the agent has been keeping. */
56
+ const runTodoCommand = () => {
57
+ ports.transcript.notice(describeTodos(ports.transcript.workState().todos));
58
+ ports.render();
59
+ };
60
+ /**
61
+ * Put the last answer on the reader's clipboard.
62
+ *
63
+ * The clipboard belongs to the terminal, so this asks it through OSC 52 —
64
+ * which is also the only route that works over SSH.
65
+ */
66
+ const runCopyCommand = () => {
67
+ const last = [...ports.transcript.model.entries()].reverse().find(entry => entry.kind === 'assistant');
68
+ if (last === undefined || last.kind !== 'assistant') {
69
+ ports.transcript.notice('nothing to copy yet');
70
+ ports.render();
71
+ return;
72
+ }
73
+ writeTty(clipboardSequence(last.text));
74
+ ports.transcript.notice(`copied ${last.text.length} characters through the terminal`);
75
+ ports.render();
76
+ };
77
+ const helpText = () => {
78
+ const current = ports.session.drivingAgent()?.agent;
79
+ const registered = current === undefined || registry() === undefined
80
+ ? []
81
+ : registry()?.list(current).map(command => `/${command.name}`) ?? [];
82
+ const commands = registered.length === 0 ? 'none registered yet' : registered.join(' ');
83
+ return `commands: ${commands} · surface: ${LOCAL_COMMANDS.join(' ')} · keys: ${surfaceKeysLine(ports.appearance.keymap())} · ${chordKeysLine(ports.appearance.keymap())}`;
84
+ };
85
+ /**
86
+ * Whether the agent this surface is driving is in plan mode.
87
+ *
88
+ * The dock's fold is the fallback, for a composition without the plan
89
+ * package: with the controller present its answer is the agent's own state
90
+ * rather than a replay of the events this surface happened to see.
91
+ */
92
+ const planState = () => {
93
+ const current = ports.session.drivingAgent()?.agent;
94
+ if (current === undefined)
95
+ return undefined;
96
+ const presets = ctx.get('agentPresets');
97
+ return readPlanState({
98
+ direct: name => ctx.get(name),
99
+ forAgent: (target, name) => presets?.serviceFor(target, name),
100
+ }, current);
101
+ };
102
+ const planActive = () => planSelectedActive(planState(), ports.transcript.workState().planMode);
103
+ const runCommand = (name, line) => {
104
+ const current = ports.session.drivingAgent();
105
+ const commands = registry();
106
+ if (current === undefined) {
107
+ ports.transcript.notice('the agent is still starting; try again in a moment');
108
+ ports.render();
109
+ return;
110
+ }
111
+ if (commands === undefined || commands.find(current.agent, name) === undefined) {
112
+ ports.transcript.notice(`unknown command: /${name} — ${helpText()}`);
113
+ ports.render();
114
+ return;
115
+ }
116
+ const controller = new AbortController();
117
+ void commands.execute(current.agent, line, [], controller.signal).then(execution => {
118
+ const result = execution?.result;
119
+ if (result === undefined)
120
+ return;
121
+ ports.transcript.notice(result.kind === 'error' ? `/${name} failed: ${result.text ?? 'no detail'}` : `/${name} ${result.text ?? 'done'}`);
122
+ ports.render();
123
+ }).catch((error) => {
124
+ ports.transcript.notice(`/${name} failed: ${error instanceof Error ? error.message : String(error)}`);
125
+ ports.render();
126
+ });
127
+ };
128
+ /**
129
+ * Carry out one classified line, wherever it was asked for.
130
+ *
131
+ * A chord asks for the same things the command line does, so both arrive
132
+ * here: a chord cannot behave differently from the command it stands for.
133
+ */
134
+ const runSubmission = (submission) => {
135
+ switch (submission.kind) {
136
+ case 'empty':
137
+ return;
138
+ case 'quit':
139
+ ports.terminal.requestExit(0);
140
+ return;
141
+ case 'model':
142
+ ports.route.runModelCommand(submission.argument);
143
+ return;
144
+ case 'preset':
145
+ ports.modes.runPresetCommand(submission.argument);
146
+ return;
147
+ case 'jobs':
148
+ ports.work.runJobsCommand(submission.argument);
149
+ return;
150
+ case 'rename':
151
+ ports.session.runRenameCommand(submission.title);
152
+ return;
153
+ case 'export':
154
+ runExportCommand(submission.path);
155
+ return;
156
+ case 'subagents':
157
+ ports.work.runSubagentsCommand(submission.argument);
158
+ return;
159
+ case 'fork':
160
+ ports.session.runForkCommand(submission.title);
161
+ return;
162
+ case 'new':
163
+ ports.session.runNewCommand(submission.title);
164
+ return;
165
+ case 'reload':
166
+ ports.session.runReloadCommand();
167
+ return;
168
+ case 'todo':
169
+ runTodoCommand();
170
+ return;
171
+ case 'theme':
172
+ ports.appearance.runThemeCommand(submission.argument);
173
+ return;
174
+ case 'keys': {
175
+ const layer = submission.argument === '' ? undefined : keymapLayer(submission.argument);
176
+ // A layer that does not exist is not a filter that matches nothing: the
177
+ // reader asked for something by name, so the answer names the names.
178
+ if (submission.argument !== '' && layer === undefined) {
179
+ ports.transcript.notice(`unknown layer "${submission.argument}" · ${KEYMAP_LAYERS.join(' ')}`);
180
+ ports.render();
181
+ return;
182
+ }
183
+ openKeyMap(layer);
184
+ return;
185
+ }
186
+ case 'copy':
187
+ runCopyCommand();
188
+ return;
189
+ case 'history':
190
+ ports.memory.runHistoryCommand(submission.argument);
191
+ return;
192
+ case 'stash':
193
+ // Submitting a command consumes the line it was typed on, so this path
194
+ // can only carry a draft it was given; parking the bar's own draft is
195
+ // what the chord is for.
196
+ if (submission.argument.trim() === '')
197
+ ports.transcript.notice('usage: /stash <draft>, or ctrl+x then s to park the editor');
198
+ else
199
+ void ports.stash()?.stashEditor(submission.argument);
200
+ return;
201
+ case 'stash-draft':
202
+ void ports.stash()?.stashEditor();
203
+ return;
204
+ case 'stash-pop':
205
+ void ports.stash()?.pop(submission.selector);
206
+ return;
207
+ case 'stash-apply':
208
+ void ports.stash()?.apply(submission.selector);
209
+ return;
210
+ case 'stash-list':
211
+ void ports.stash()?.list(String(ports.session.activeSession()));
212
+ return;
213
+ case 'stash-drop':
214
+ void ports.stash()?.drop(submission.selector);
215
+ return;
216
+ case 'stash-clear':
217
+ void ports.stash()?.clear();
218
+ return;
219
+ case 'editor':
220
+ ports.terminal.editDraft();
221
+ return;
222
+ case 'status': {
223
+ const facts = ports.statusFacts();
224
+ const context = facts.contextTokens === undefined
225
+ ? undefined
226
+ : `context ${formatTokens(facts.contextTokens)}${facts.contextWindow === undefined ? '' : `/${formatTokens(facts.contextWindow)}`}`;
227
+ ports.transcript.notice([
228
+ `session ${ports.session.activeSession()}`,
229
+ ports.transcript.viewingChild() ? undefined : `viewing ${ports.transcript.viewed()}`,
230
+ facts.model === undefined
231
+ ? undefined
232
+ : `model ${facts.provider === undefined ? '' : `${facts.provider}/`}${facts.model}${facts.effort === undefined ? '' : ` (${facts.effort})`}`,
233
+ facts.agentPreset === undefined ? undefined : `mode ${facts.agentPreset}`,
234
+ facts.preset === undefined ? undefined : `permissions ${facts.preset}`,
235
+ context,
236
+ facts.uncachedInputTokens === undefined && facts.outputTokens === undefined
237
+ ? undefined
238
+ : `tokens in ${formatTokens(facts.uncachedInputTokens ?? 0)} out ${formatTokens(facts.outputTokens ?? 0)}`,
239
+ `cwd ${facts.cwd}`,
240
+ ].filter(part => part !== undefined).join(' · '));
241
+ ports.render();
242
+ return;
243
+ }
244
+ case 'clear':
245
+ ports.transcript.reset();
246
+ ports.render();
247
+ return;
248
+ case 'undo':
249
+ ports.staged.undo();
250
+ return;
251
+ case 'redo':
252
+ ports.staged.redo();
253
+ return;
254
+ case 'help':
255
+ ports.transcript.notice(helpText());
256
+ ports.render();
257
+ return;
258
+ case 'resume':
259
+ void sessionPicker.chooseSession().then(picked => picked === undefined ? undefined : ports.session.switchSession(picked)).catch((error) => {
260
+ ports.transcript.notice(`could not resume: ${error instanceof Error ? error.message : String(error)}`);
261
+ ports.render();
262
+ });
263
+ return;
264
+ // Plan mode is a command the harness owns, so the chord asks the host for
265
+ // the state and names the command for the other one: one key, both ways.
266
+ case 'plan':
267
+ runCommand('plan', planToggleLine(planActive()));
268
+ return;
269
+ case 'command':
270
+ runCommand(submission.name, submission.line);
271
+ return;
272
+ case 'prompt': {
273
+ const driven = ports.session.drivingAgent();
274
+ if (driven === undefined) {
275
+ ports.transcript.notice('the agent is still starting; try again in a moment');
276
+ ports.render();
277
+ return;
278
+ }
279
+ // While a turn is running the human is steering it, not opening another.
280
+ if (ports.session.turnRunning())
281
+ driven.steer(submission.text);
282
+ else {
283
+ ports.route.adoptDefault();
284
+ void ports.staged.send(submission.text);
285
+ }
286
+ return;
287
+ }
288
+ }
289
+ };
290
+ /**
291
+ * Where a bare `--resume` gets its list, and the ports it drives.
292
+ *
293
+ * The keyboard is taken through a port rather than here: how a picker holds
294
+ * it, and how long it may, is the modal owner's business.
295
+ */
296
+ const sessionPicker = createSessionPicker(ctx, {
297
+ keymap: ports.appearance.keymap,
298
+ notice: ports.transcript.notice,
299
+ render: ports.render,
300
+ // A stored session's own mode can only disagree with one this run named, and
301
+ // only a roster can say whether the name it uses still exists.
302
+ validateStoredPreset: async (id) => {
303
+ if (ports.preset === undefined || ports.presetRoster === undefined)
304
+ return;
305
+ await ports.modes.presetFor(SessionId(id), true, undefined);
306
+ },
307
+ openPicker: (picker, vet) => ports.modals.openPicker(picker, vet),
308
+ });
309
+ /**
310
+ * Open the session this run was launched for.
311
+ *
312
+ * A bare `--resume` asks a question only the reader can answer, so the
313
+ * picker runs before anything is created: the agent is then opened on the
314
+ * chosen session rather than swapped afterwards, which would leave the first
315
+ * one's turn half-started.
316
+ */
317
+ const boot = async () => {
318
+ if (!ports.launch.resumePicker) {
319
+ await ports.session.openAgent(ports.launch.sessionId, ports.launch.resume);
320
+ return;
321
+ }
322
+ const picked = await sessionPicker.chooseSession();
323
+ if (picked === undefined) {
324
+ ports.terminal.requestExit(0);
325
+ return;
326
+ }
327
+ await ports.session.openAgent(picked, true);
328
+ };
329
+ /**
330
+ * Take the screen, then open the session this run was launched for.
331
+ *
332
+ * A mode named on the command line is resolved FIRST: the alt screen swallows
333
+ * the launcher's own error output, so a mode this roster does not offer has to
334
+ * be answered while the shell still owns the terminal.
335
+ */
336
+ const start = async () => {
337
+ // A composition row that is missing is a degradation the reader has to be
338
+ // told about, and this is the last moment before the alt screen closes over
339
+ // the shell's own output.
340
+ const missing = ports.missingOptional();
341
+ if (missing !== undefined)
342
+ ports.transcript.notice(missing);
343
+ // A skill an agent loads from ~/.agents/skills is this package's own text,
344
+ // so a stale copy teaches the old wiring; naming it here is cheaper than
345
+ // debugging the profile it misdescribes.
346
+ const drift = ports.skillDrift();
347
+ if (drift !== undefined)
348
+ ports.transcript.notice(drift);
349
+ // A named mode that disagrees with the one this session recorded is refused
350
+ // here as well as at the open, because the alternate screen closes over
351
+ // whatever was painted on it: the reader would see the failure, not the
352
+ // reason.
353
+ await ports.modes.validateLaunch(ports.launch);
354
+ ports.terminal.tui.start();
355
+ ports.terminal.writeTerminal(windowTitle(process.cwd(), 'ready'));
356
+ // Claiming the pane's agent row does not wait for a session: the pane is
357
+ // already on screen and already idle, and a session may still be chosen.
358
+ ports.terminal.herdr.publish();
359
+ // A refused settings edit is only visible now that the surface owns the
360
+ // screen; whatever the scope found before this point prints here instead.
361
+ ports.appearance.openNotices(message => ports.transcript.notice(message));
362
+ await boot();
363
+ };
364
+ return {
365
+ runSubmission,
366
+ registeredCommands: agent => registry()?.list(agent),
367
+ start,
368
+ };
369
+ }
370
+ //# sourceMappingURL=commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/surface/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAA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YAAE,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;QAC3D,2EAA2E;QAC3E,yEAAyE;QACzE,yCAAyC;QACzC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,EAAE,CAAA;QAChC,IAAI,KAAK,KAAK,SAAS;YAAE,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QACvD,4EAA4E;QAC5E,wEAAwE;QACxE,wEAAwE;QACxE,UAAU;QACV,MAAM,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QAC9C,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,CAAA;QAC1B,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA;QACjE,yEAAyE;QACzE,yEAAyE;QACzE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,CAAA;QAC9B,wEAAwE;QACxE,0EAA0E;QAC1E,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;QACzE,MAAM,IAAI,EAAE,CAAA;IACd,CAAC,CAAA;IAED,OAAO;QACL,aAAa;QACb,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC;QACpD,KAAK;KACN,CAAA;AACH,CAAC"}
@@ -0,0 +1,59 @@
1
+ import type { ProcessTerminal } from '@earendil-works/pi-tui';
2
+ import type { Context } from '@deepseek-ai/cordis';
3
+ import type { SessionId } from '@deepseek-ai/dsh-session';
4
+ import { type GateCard } from '../gates.ts';
5
+ import type { HerdrReporter } from '../herdr/reporter.ts';
6
+ import type { Keymap } from '../input/actions.ts';
7
+ import type { TuiTheme } from '../theme.ts';
8
+ import type { WarningSafeTui } from '../terminal/warning-screen.ts';
9
+ import type { GateInputBar } from '../ui/gate-input.ts';
10
+ import type { PickerAction, PickerCard } from '../ui/picker.ts';
11
+ import type { PromptBar } from '../ui/prompt.ts';
12
+ /** What the surface needs of a list to drive it, wherever that list is drawn. */
13
+ export interface Picker {
14
+ handleKey(data: string): PickerAction | undefined;
15
+ /** The row window the caller can afford, or the shipped window when it names none. */
16
+ card(window?: number): PickerCard;
17
+ setNote(text: string | undefined): void;
18
+ }
19
+ /**
20
+ * What the modal owner needs from the surface that composes it.
21
+ *
22
+ * Every one of these is a live read or an operation on another owner: the
23
+ * keyboard and the screen are the only things this module takes for itself.
24
+ */
25
+ export interface ModalInputPorts {
26
+ readonly herdr: HerdrReporter;
27
+ readonly editor: GateInputBar;
28
+ readonly tui: WarningSafeTui;
29
+ readonly terminal: ProcessTerminal;
30
+ readonly theme: TuiTheme;
31
+ readonly keymap: () => Keymap;
32
+ readonly promptBar: PromptBar;
33
+ /** Rebuild the prompt's own menu once a borrowed bar is given back. */
34
+ readonly refreshCompletion: () => void;
35
+ readonly activeSession: () => SessionId;
36
+ }
37
+ /** The reads, operations and request listeners the composing surface routes here. */
38
+ export interface ModalInput {
39
+ /** The card a pending gate draws, or undefined when no gate is open. */
40
+ readonly gateCard: () => GateCard | undefined;
41
+ /** The card a pending picker draws in the transcript, when it draws one there. */
42
+ readonly pickerCard: () => PickerCard | undefined;
43
+ readonly openPicker: (picker: Picker, vet?: (id: string) => Promise<string | undefined>, placement?: 'inline' | 'popup') => Promise<string | undefined>;
44
+ /** Drive an open gate or picker with one press; false hands the press back. */
45
+ readonly handleKey: (data: string) => boolean;
46
+ /** The gate and question waterfalls, in the order the surface answers them. */
47
+ readonly requestListeners: () => readonly (() => void)[];
48
+ }
49
+ /**
50
+ * The one modal interaction a terminal can be in: a gate or a picker.
51
+ *
52
+ * Both take the keyboard and give it back the same way, and both can be
53
+ * cancelled by something other than a press (an aborted request, a settled
54
+ * list), so the focus, submission flag and popup lifetime belong to one owner
55
+ * rather than to every feature that opens a list. The blocked Herdr row is the
56
+ * gate's alone: see `openPicker`.
57
+ */
58
+ export declare function createModalInput(ctx: Context, ports: ModalInputPorts): ModalInput;
59
+ //# sourceMappingURL=modal-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-input.d.ts","sourceRoot":"","sources":["../../src/surface/modal-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAGzD,OAAO,EAAiC,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAG1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAOhD,iFAAiF;AACjF,MAAM,WAAW,MAAM;IACrB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAAA;IACjD,sFAAsF;IACtF,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;IACjC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAA;CACxC;AA0BD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,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