@sagmans/dsh-tui 0.3.0 → 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 (253) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +407 -53
  3. package/cordis.patch.yml +14 -0
  4. package/lib/agent/present.js +1 -1
  5. package/lib/agent/present.js.map +1 -1
  6. package/lib/agent/projections.d.ts +22 -6
  7. package/lib/agent/projections.d.ts.map +1 -1
  8. package/lib/agent/projections.js +21 -10
  9. package/lib/agent/projections.js.map +1 -1
  10. package/lib/agent/prompt-history.d.ts +89 -0
  11. package/lib/agent/prompt-history.d.ts.map +1 -0
  12. package/lib/agent/prompt-history.js +382 -0
  13. package/lib/agent/prompt-history.js.map +1 -0
  14. package/lib/agent/status.d.ts +6 -0
  15. package/lib/agent/status.d.ts.map +1 -1
  16. package/lib/agent/status.js +1 -0
  17. package/lib/agent/status.js.map +1 -1
  18. package/lib/cards.d.ts +83 -13
  19. package/lib/cards.d.ts.map +1 -1
  20. package/lib/cards.js +96 -28
  21. package/lib/cards.js.map +1 -1
  22. package/lib/export.d.ts +3 -3
  23. package/lib/export.d.ts.map +1 -1
  24. package/lib/export.js +23 -13
  25. package/lib/export.js.map +1 -1
  26. package/lib/fold-cursor.d.ts +12 -5
  27. package/lib/fold-cursor.d.ts.map +1 -1
  28. package/lib/fold-cursor.js +16 -5
  29. package/lib/fold-cursor.js.map +1 -1
  30. package/lib/gates.d.ts.map +1 -1
  31. package/lib/gates.js +42 -9
  32. package/lib/gates.js.map +1 -1
  33. package/lib/herdr/client.d.ts +57 -0
  34. package/lib/herdr/client.d.ts.map +1 -0
  35. package/lib/herdr/client.js +218 -0
  36. package/lib/herdr/client.js.map +1 -0
  37. package/lib/herdr/constants.d.ts +93 -0
  38. package/lib/herdr/constants.d.ts.map +1 -0
  39. package/lib/herdr/constants.js +79 -0
  40. package/lib/herdr/constants.js.map +1 -0
  41. package/lib/herdr/reporter.d.ts +60 -0
  42. package/lib/herdr/reporter.d.ts.map +1 -0
  43. package/lib/herdr/reporter.js +217 -0
  44. package/lib/herdr/reporter.js.map +1 -0
  45. package/lib/herdr/state.d.ts +57 -0
  46. package/lib/herdr/state.d.ts.map +1 -0
  47. package/lib/herdr/state.js +62 -0
  48. package/lib/herdr/state.js.map +1 -0
  49. package/lib/index.d.ts.map +1 -1
  50. package/lib/index.js +700 -81
  51. package/lib/index.js.map +1 -1
  52. package/lib/injection.d.ts +9 -0
  53. package/lib/injection.d.ts.map +1 -0
  54. package/lib/injection.js +128 -0
  55. package/lib/injection.js.map +1 -0
  56. package/lib/input/actions.d.ts +19 -2
  57. package/lib/input/actions.d.ts.map +1 -1
  58. package/lib/input/actions.js +60 -11
  59. package/lib/input/actions.js.map +1 -1
  60. package/lib/input/cancel.d.ts +55 -0
  61. package/lib/input/cancel.d.ts.map +1 -0
  62. package/lib/input/cancel.js +47 -0
  63. package/lib/input/cancel.js.map +1 -0
  64. package/lib/input/completion.d.ts +5 -2
  65. package/lib/input/completion.d.ts.map +1 -1
  66. package/lib/input/completion.js +79 -4
  67. package/lib/input/completion.js.map +1 -1
  68. package/lib/input/file-search.d.ts +105 -0
  69. package/lib/input/file-search.d.ts.map +1 -0
  70. package/lib/input/file-search.js +665 -0
  71. package/lib/input/file-search.js.map +1 -0
  72. package/lib/input/fuzzy.d.ts +42 -0
  73. package/lib/input/fuzzy.d.ts.map +1 -0
  74. package/lib/input/fuzzy.js +289 -0
  75. package/lib/input/fuzzy.js.map +1 -0
  76. package/lib/input/ghost.d.ts +46 -0
  77. package/lib/input/ghost.d.ts.map +1 -0
  78. package/lib/input/ghost.js +58 -0
  79. package/lib/input/ghost.js.map +1 -0
  80. package/lib/input/keymap.d.ts +3 -1
  81. package/lib/input/keymap.d.ts.map +1 -1
  82. package/lib/input/keymap.js +16 -3
  83. package/lib/input/keymap.js.map +1 -1
  84. package/lib/input/match.d.ts +12 -4
  85. package/lib/input/match.d.ts.map +1 -1
  86. package/lib/input/match.js +50 -51
  87. package/lib/input/match.js.map +1 -1
  88. package/lib/input/submission.d.ts +34 -1
  89. package/lib/input/submission.d.ts.map +1 -1
  90. package/lib/input/submission.js +33 -5
  91. package/lib/input/submission.js.map +1 -1
  92. package/lib/keys-command.d.ts +19 -3
  93. package/lib/keys-command.d.ts.map +1 -1
  94. package/lib/keys-command.js +34 -31
  95. package/lib/keys-command.js.map +1 -1
  96. package/lib/settings-notice.d.ts +5 -0
  97. package/lib/settings-notice.d.ts.map +1 -1
  98. package/lib/settings-notice.js +9 -7
  99. package/lib/settings-notice.js.map +1 -1
  100. package/lib/stash/lock.d.ts +72 -0
  101. package/lib/stash/lock.d.ts.map +1 -0
  102. package/lib/stash/lock.js +374 -0
  103. package/lib/stash/lock.js.map +1 -0
  104. package/lib/stash/paths.d.ts +22 -0
  105. package/lib/stash/paths.d.ts.map +1 -0
  106. package/lib/stash/paths.js +84 -0
  107. package/lib/stash/paths.js.map +1 -0
  108. package/lib/stash/private-fs.d.ts +61 -0
  109. package/lib/stash/private-fs.d.ts.map +1 -0
  110. package/lib/stash/private-fs.js +379 -0
  111. package/lib/stash/private-fs.js.map +1 -0
  112. package/lib/stash/schema.d.ts +56 -0
  113. package/lib/stash/schema.d.ts.map +1 -0
  114. package/lib/stash/schema.js +108 -0
  115. package/lib/stash/schema.js.map +1 -0
  116. package/lib/stash/store.d.ts +92 -0
  117. package/lib/stash/store.d.ts.map +1 -0
  118. package/lib/stash/store.js +262 -0
  119. package/lib/stash/store.js.map +1 -0
  120. package/lib/stash.d.ts +122 -0
  121. package/lib/stash.d.ts.map +1 -0
  122. package/lib/stash.js +353 -0
  123. package/lib/stash.js.map +1 -0
  124. package/lib/terminal/external-editor.d.ts +93 -0
  125. package/lib/terminal/external-editor.d.ts.map +1 -0
  126. package/lib/terminal/external-editor.js +263 -0
  127. package/lib/terminal/external-editor.js.map +1 -0
  128. package/lib/terminal/host-writes.d.ts +39 -0
  129. package/lib/terminal/host-writes.d.ts.map +1 -0
  130. package/lib/terminal/host-writes.js +136 -0
  131. package/lib/terminal/host-writes.js.map +1 -0
  132. package/lib/terminal/signals.d.ts +25 -0
  133. package/lib/terminal/signals.d.ts.map +1 -0
  134. package/lib/terminal/signals.js +39 -0
  135. package/lib/terminal/signals.js.map +1 -0
  136. package/lib/terminal/warning-screen.d.ts +19 -1
  137. package/lib/terminal/warning-screen.d.ts.map +1 -1
  138. package/lib/terminal/warning-screen.js +37 -1
  139. package/lib/terminal/warning-screen.js.map +1 -1
  140. package/lib/terminal-text.d.ts +72 -0
  141. package/lib/terminal-text.d.ts.map +1 -0
  142. package/lib/terminal-text.js +603 -0
  143. package/lib/terminal-text.js.map +1 -0
  144. package/lib/text.d.ts +45 -6
  145. package/lib/text.d.ts.map +1 -1
  146. package/lib/text.js +106 -46
  147. package/lib/text.js.map +1 -1
  148. package/lib/theme-command.d.ts +7 -4
  149. package/lib/theme-command.d.ts.map +1 -1
  150. package/lib/theme-command.js +32 -12
  151. package/lib/theme-command.js.map +1 -1
  152. package/lib/theme-files.d.ts +110 -0
  153. package/lib/theme-files.d.ts.map +1 -0
  154. package/lib/theme-files.js +352 -0
  155. package/lib/theme-files.js.map +1 -0
  156. package/lib/theme-schema.d.ts +121 -0
  157. package/lib/theme-schema.d.ts.map +1 -0
  158. package/lib/theme-schema.js +87 -0
  159. package/lib/theme-schema.js.map +1 -0
  160. package/lib/theme-settings.d.ts +72 -10
  161. package/lib/theme-settings.d.ts.map +1 -1
  162. package/lib/theme-settings.js +162 -45
  163. package/lib/theme-settings.js.map +1 -1
  164. package/lib/theme-tokens.d.ts +39 -7
  165. package/lib/theme-tokens.d.ts.map +1 -1
  166. package/lib/theme-tokens.js +104 -13
  167. package/lib/theme-tokens.js.map +1 -1
  168. package/lib/theme.d.ts +24 -2
  169. package/lib/theme.d.ts.map +1 -1
  170. package/lib/theme.js +49 -6
  171. package/lib/theme.js.map +1 -1
  172. package/lib/todo-guard.d.ts +116 -0
  173. package/lib/todo-guard.d.ts.map +1 -0
  174. package/lib/todo-guard.js +259 -0
  175. package/lib/todo-guard.js.map +1 -0
  176. package/lib/tool-display.d.ts +57 -0
  177. package/lib/tool-display.d.ts.map +1 -0
  178. package/lib/tool-display.js +51 -0
  179. package/lib/tool-display.js.map +1 -0
  180. package/lib/transcript.d.ts +28 -0
  181. package/lib/transcript.d.ts.map +1 -1
  182. package/lib/transcript.js +126 -37
  183. package/lib/transcript.js.map +1 -1
  184. package/lib/ui/diff.d.ts +49 -0
  185. package/lib/ui/diff.d.ts.map +1 -0
  186. package/lib/ui/diff.js +208 -0
  187. package/lib/ui/diff.js.map +1 -0
  188. package/lib/ui/dock.d.ts.map +1 -1
  189. package/lib/ui/dock.js +9 -6
  190. package/lib/ui/dock.js.map +1 -1
  191. package/lib/ui/editor.d.ts +41 -1
  192. package/lib/ui/editor.d.ts.map +1 -1
  193. package/lib/ui/editor.js +100 -4
  194. package/lib/ui/editor.js.map +1 -1
  195. package/lib/ui/frame.d.ts +16 -5
  196. package/lib/ui/frame.d.ts.map +1 -1
  197. package/lib/ui/frame.js +32 -13
  198. package/lib/ui/frame.js.map +1 -1
  199. package/lib/ui/history-picker.d.ts +15 -0
  200. package/lib/ui/history-picker.d.ts.map +1 -0
  201. package/lib/ui/history-picker.js +26 -0
  202. package/lib/ui/history-picker.js.map +1 -0
  203. package/lib/ui/keymap-picker.d.ts +16 -0
  204. package/lib/ui/keymap-picker.d.ts.map +1 -0
  205. package/lib/ui/keymap-picker.js +41 -0
  206. package/lib/ui/keymap-picker.js.map +1 -0
  207. package/lib/ui/layout.d.ts +33 -0
  208. package/lib/ui/layout.d.ts.map +1 -0
  209. package/lib/ui/layout.js +33 -0
  210. package/lib/ui/layout.js.map +1 -0
  211. package/lib/ui/markdown.d.ts +25 -3
  212. package/lib/ui/markdown.d.ts.map +1 -1
  213. package/lib/ui/markdown.js +12 -8
  214. package/lib/ui/markdown.js.map +1 -1
  215. package/lib/ui/picker-card.d.ts +42 -0
  216. package/lib/ui/picker-card.d.ts.map +1 -0
  217. package/lib/ui/picker-card.js +148 -0
  218. package/lib/ui/picker-card.js.map +1 -0
  219. package/lib/ui/picker.d.ts +50 -2
  220. package/lib/ui/picker.d.ts.map +1 -1
  221. package/lib/ui/picker.js +66 -7
  222. package/lib/ui/picker.js.map +1 -1
  223. package/lib/ui/prompt.d.ts +12 -2
  224. package/lib/ui/prompt.d.ts.map +1 -1
  225. package/lib/ui/prompt.js +25 -2
  226. package/lib/ui/prompt.js.map +1 -1
  227. package/lib/ui/rows.d.ts +8 -6
  228. package/lib/ui/rows.d.ts.map +1 -1
  229. package/lib/ui/rows.js +10 -18
  230. package/lib/ui/rows.js.map +1 -1
  231. package/lib/ui/stash-picker.d.ts +43 -0
  232. package/lib/ui/stash-picker.d.ts.map +1 -0
  233. package/lib/ui/stash-picker.js +78 -0
  234. package/lib/ui/stash-picker.js.map +1 -0
  235. package/lib/ui/status.d.ts +2 -0
  236. package/lib/ui/status.d.ts.map +1 -1
  237. package/lib/ui/status.js +25 -16
  238. package/lib/ui/status.js.map +1 -1
  239. package/lib/ui/theme-picker.d.ts +18 -0
  240. package/lib/ui/theme-picker.d.ts.map +1 -0
  241. package/lib/ui/theme-picker.js +68 -0
  242. package/lib/ui/theme-picker.js.map +1 -0
  243. package/lib/ui/view.d.ts +146 -22
  244. package/lib/ui/view.d.ts.map +1 -1
  245. package/lib/ui/view.js +461 -154
  246. package/lib/ui/view.js.map +1 -1
  247. package/lib/work.d.ts +3 -1
  248. package/lib/work.d.ts.map +1 -1
  249. package/lib/work.js +9 -1
  250. package/lib/work.js.map +1 -1
  251. package/package.json +7 -1
  252. package/themes/deepseek-blue.yaml +183 -0
  253. package/themes/violet-orbit.yaml +178 -0
@@ -1,15 +1,28 @@
1
+ import { foldSimple, fuzzyScore } from "./fuzzy.js";
1
2
  /**
2
3
  * Where each kind of hit starts.
3
4
  *
4
5
  * A reader comparing rows expects an exact name to stay above a name that
5
- * merely contains what they typed, so one band always outranks the next.
6
+ * merely contains what they typed, so one band always outranks the next. The
7
+ * gaps between bands are wide enough that every fuzzy reading of a band stays
8
+ * inside it.
6
9
  */
7
- const EXACT_HIT = 4_000;
8
- const PREFIX_HIT = 3_000;
9
- const CONTIGUOUS_HIT = 2_000;
10
- const SCATTERED_HIT = 1_000;
11
- /** Most a hit's position can cost, so a worse kind never overtakes a better one. */
10
+ const EXACT_HIT = 4_000_000;
11
+ const PREFIX_HIT = 3_000_000;
12
+ const CONTIGUOUS_HIT = 2_000_000;
13
+ const SCATTERED_HIT = 1_000_000;
14
+ /**
15
+ * What one character of distance from the start of the row costs.
16
+ *
17
+ * A contiguous hit that starts earlier is the class the reader is aiming at,
18
+ * so its position has to outrank any difference the fuzzy reading can make
19
+ * inside the same band; the fuzzy score is clamped below this step for that
20
+ * reason.
21
+ */
22
+ const POSITION_PENALTY_PER_CHAR = 1_000;
12
23
  const POSITION_PENALTY_CAP = 500;
24
+ /** Room a fuzzy reading has inside its band, one point less than a band step. */
25
+ const FUZZY_BAND_CAP = POSITION_PENALTY_PER_CHAR - 1;
13
26
  /**
14
27
  * Shortest fragment allowed to gather scattered characters.
15
28
  *
@@ -20,64 +33,50 @@ const SCATTERED_MIN_LENGTH = 3;
20
33
  /**
21
34
  * How well a row answers what the reader typed.
22
35
  *
23
- * A reader types fragments — `glm53` for `GLM-5.3`, `gptcdx` for a provider
24
- * name — so matching only a contiguous run makes them remember punctuation the
25
- * list already renders for them. Higher is a better match; `undefined` is the
26
- * only answer that means no match at all.
36
+ * A reader types fragments — `glm53` for `GLM-5.3`, `edtr` for a path — so
37
+ * matching only a contiguous run makes them remember punctuation the list
38
+ * already renders for them. The band a hit lands in answers "what kind of hit
39
+ * is this": an exact row, a row that opens with the fragment, one that holds
40
+ * it whole, or one that only carries its characters in order. Inside a band
41
+ * the fuzzy reading decides, which is what keeps a match on a word boundary
42
+ * above the same letters spread through the middle of a word.
43
+ *
44
+ * Higher is a better match; `undefined` is the only answer that means no
45
+ * match at all. The bands are decided on the folded text and the reading
46
+ * itself on the row as it was written, because only the original spelling
47
+ * still carries the humps and separators the reading pays for.
27
48
  */
28
49
  export function matchScore(needle, haystack) {
29
- const query = needle.trim().toLowerCase();
50
+ const trimmed = needle.trim();
51
+ const query = foldSimple(trimmed);
30
52
  if (query === '')
31
53
  return EXACT_HIT;
32
- const text = haystack.toLowerCase();
54
+ const text = foldSimple(haystack);
33
55
  if (text === query)
34
56
  return EXACT_HIT;
35
57
  if (text.startsWith(query))
36
- return PREFIX_HIT;
58
+ return PREFIX_HIT + fuzzyWithin(trimmed, haystack);
37
59
  const at = text.indexOf(query);
38
- if (at >= 0)
39
- return CONTIGUOUS_HIT - Math.min(at, POSITION_PENALTY_CAP);
60
+ if (at >= 0) {
61
+ return CONTIGUOUS_HIT - Math.min(at, POSITION_PENALTY_CAP) * POSITION_PENALTY_PER_CHAR + fuzzyWithin(trimmed, haystack);
62
+ }
40
63
  if (query.length < SCATTERED_MIN_LENGTH)
41
64
  return undefined;
42
- return scatteredScore(query, text);
65
+ const raw = fuzzyScore(trimmed, haystack);
66
+ return raw === undefined ? undefined : SCATTERED_HIT + clampToBand(raw);
43
67
  }
44
68
  /**
45
- * The tightest scattered reading of a fragment, or undefined when its
46
- * characters are not all there in order.
69
+ * The fuzzy reading of a hit, held inside the band that hit already earned.
47
70
  *
48
- * Every occurrence of the first character is tried, because the tightest
49
- * reading can start past an earlier one — the `g` inside a provider id is not
50
- * the `g` in the model name. How far into the row the fragment starts is the
51
- * contiguous bands' concern; counting it here would rank a spread-out hit that
52
- * happens to start early above a tighter one, which is the opposite of what
53
- * the reader typed.
71
+ * A row that reaches one band must never overtake a row in the band above it,
72
+ * however good its letters look.
54
73
  */
55
- function scatteredScore(query, text) {
56
- const head = query[0];
57
- if (head === undefined)
58
- return SCATTERED_HIT;
59
- const rest = query.slice(1);
60
- let bestPenalty;
61
- for (let start = text.indexOf(head); start >= 0; start = text.indexOf(head, start + 1)) {
62
- let from = start + 1;
63
- let skipped = 0;
64
- let complete = true;
65
- for (const character of rest) {
66
- const found = text.indexOf(character, from);
67
- if (found < 0) {
68
- complete = false;
69
- break;
70
- }
71
- skipped += found - from;
72
- from = found + 1;
73
- if (bestPenalty !== undefined && skipped >= bestPenalty) {
74
- complete = false;
75
- break;
76
- }
77
- }
78
- if (complete && (bestPenalty === undefined || skipped < bestPenalty))
79
- bestPenalty = skipped;
80
- }
81
- return bestPenalty === undefined ? undefined : SCATTERED_HIT - Math.min(bestPenalty, POSITION_PENALTY_CAP);
74
+ function fuzzyWithin(query, haystack) {
75
+ return clampToBand(fuzzyScore(query, haystack));
76
+ }
77
+ function clampToBand(raw) {
78
+ if (raw === undefined)
79
+ return 0;
80
+ return Math.max(-FUZZY_BAND_CAP, Math.min(FUZZY_BAND_CAP, raw));
82
81
  }
83
82
  //# sourceMappingURL=match.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"match.js","sourceRoot":"","sources":["../../src/input/match.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,SAAS,GAAG,KAAK,CAAA;AACvB,MAAM,UAAU,GAAG,KAAK,CAAA;AACxB,MAAM,cAAc,GAAG,KAAK,CAAA;AAC5B,MAAM,aAAa,GAAG,KAAK,CAAA;AAE3B,oFAAoF;AACpF,MAAM,oBAAoB,GAAG,GAAG,CAAA;AAEhC;;;;;GAKG;AACH,MAAM,oBAAoB,GAAG,CAAC,CAAA;AAE9B;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,QAAgB;IACzD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;IACzC,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,SAAS,CAAA;IAClC,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAA;IACnC,IAAI,IAAI,KAAK,KAAK;QAAE,OAAO,SAAS,CAAA;IACpC,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,OAAO,UAAU,CAAA;IAC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AI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,OAAO,UAAU,GAAG,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IAC9E,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;QACZ,OAAO,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,oBAAoB,CAAC,GAAG,yBAAyB,GAAG,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IACzH,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,GAAG,oBAAoB;QAAE,OAAO,SAAS,CAAA;IACzD,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IACzC,OAAO,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,GAAG,WAAW,CAAC,GAAG,CAAC,CAAA;AACzE,CAAC;AAED;;;;;GAKG;AACH,SAAS,WAAW,CAAC,KAAa,EAAE,QAAgB;IAClD,OAAO,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAA;AACjD,CAAC;AAED,SAAS,WAAW,CAAC,GAAuB;IAC1C,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,CAAC,CAAA;IAC/B,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC,CAAA;AACjE,CAAC"}
@@ -39,6 +39,7 @@ export type Submission = {
39
39
  readonly kind: 'todo';
40
40
  } | {
41
41
  readonly kind: 'theme';
42
+ readonly argument: string;
42
43
  } | {
43
44
  readonly kind: 'keys';
44
45
  readonly argument: string;
@@ -46,6 +47,38 @@ export type Submission = {
46
47
  readonly kind: 'copy';
47
48
  } | {
48
49
  readonly kind: 'plan';
50
+ } | {
51
+ readonly kind: 'history';
52
+ readonly argument: string;
53
+ } | {
54
+ readonly kind: 'stash';
55
+ readonly argument: string;
56
+ }
57
+ /** The chord: park whatever the editor is holding, which a typed command cannot do. */
58
+ | {
59
+ readonly kind: 'stash-draft';
60
+ }
61
+ /**
62
+ * The chord: edit the draft in the reader's own editor.
63
+ *
64
+ * Typed, this would be a command whose own line is already consumed by the
65
+ * time it runs, so the chord is the only way to hand over the draft in hand.
66
+ */
67
+ | {
68
+ readonly kind: 'editor';
69
+ } | {
70
+ readonly kind: 'stash-pop';
71
+ readonly selector: string;
72
+ } | {
73
+ readonly kind: 'stash-apply';
74
+ readonly selector: string;
75
+ } | {
76
+ readonly kind: 'stash-list';
77
+ } | {
78
+ readonly kind: 'stash-drop';
79
+ readonly selector: string;
80
+ } | {
81
+ readonly kind: 'stash-clear';
49
82
  } | {
50
83
  readonly kind: 'command';
51
84
  readonly name: string;
@@ -55,7 +88,7 @@ export type Submission = {
55
88
  readonly text: string;
56
89
  };
57
90
  /** Commands the surface answers itself, without a model turn. */
58
- export declare const LOCAL_COMMANDS: readonly ["/help", "/status", "/model", "/preset", "/todo", "/theme", "/keys", "/jobs", "/subagents", "/fork", "/new", "/rename", "/export", "/copy", "/clear", "/resume", "/quit", "/exit"];
91
+ export declare const LOCAL_COMMANDS: readonly ["/help", "/status", "/model", "/preset", "/todo", "/theme", "/keys", "/jobs", "/subagents", "/fork", "/new", "/rename", "/export", "/copy", "/history", "/clear", "/resume", "/quit", "/exit", "/stash", "/stash-pop", "/stash-apply", "/stash-list", "/stash-drop", "/stash-clear"];
59
92
  /** What each local command does, shown in the editor's completion menu. */
60
93
  export declare const LOCAL_COMMAND_DESCRIPTIONS: Readonly<Record<string, string>>;
61
94
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"submission.d.ts","sourceRoot":"","sources":["../../src/input/submission.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,OA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ork', '/new', '/rename', '/export', '/copy', '/clear', '/resume', '/quit', '/exit',
3
+ '/help', '/status', '/model', '/preset', '/todo', '/theme', '/keys', '/jobs', '/subagents', '/fork', '/new', '/rename', '/export', '/copy', '/history', '/clear', '/resume', '/quit', '/exit',
4
+ '/stash', '/stash-pop', '/stash-apply', '/stash-list', '/stash-drop', '/stash-clear',
4
5
  ];
5
6
  /** What each local command does, shown in the editor's completion menu. */
6
7
  export const LOCAL_COMMAND_DESCRIPTIONS = {
@@ -11,15 +12,22 @@ export const LOCAL_COMMAND_DESCRIPTIONS = {
11
12
  '/jobs': 'list background jobs, read one, or kill one',
12
13
  '/subagents': 'list delegations; /subagents open <id|last> reads one, /subagents kill <id> stops one',
13
14
  '/todo': 'show the list of tasks the agent is keeping',
14
- '/theme': 'list every styled element and the value in force',
15
- '/keys': 'list every action and the keys in force; /keys <layer> narrows it',
15
+ '/theme': 'open the theme picker, the screen previewing each row; /theme <name> applies one; /theme tokens lists the elements',
16
+ '/keys': 'open the key map and filter it by typing; /keys <layer> narrows it',
16
17
  '/fork': 'branch this conversation and continue in the branch',
17
18
  '/new': 'start a fresh session without leaving the terminal',
18
19
  '/copy': 'copy the last answer to the clipboard through the terminal',
20
+ '/history': 'show where prompt history is kept; /history clear forgets every prompt',
19
21
  '/rename': 'give this session a title the picker will show',
20
22
  '/export': 'write the visible transcript to a markdown file',
21
23
  '/clear': 'clear the visible transcript',
22
24
  '/resume': 'open another stored session',
25
+ '/stash': 'store the draft typed after it; ctrl+x then s parks the editor',
26
+ '/stash-pop': 'put a stashed draft (newest by default) into the editor and remove it',
27
+ '/stash-apply': 'put a stashed draft (newest by default) into the editor and keep it',
28
+ '/stash-list': "open this session's stashes; enter pops one",
29
+ '/stash-drop': 'delete a stashed draft (newest by default) without using it',
30
+ '/stash-clear': 'delete every draft stashed in this session after a confirmation',
23
31
  '/quit': 'leave and print the resume command',
24
32
  '/exit': 'leave and print the resume command',
25
33
  };
@@ -67,16 +75,36 @@ export function classifySubmission(text) {
67
75
  }
68
76
  if (trimmed === '/todo')
69
77
  return { kind: 'todo' };
70
- if (trimmed === '/theme')
71
- return { kind: 'theme' };
78
+ if (trimmed === '/theme' || trimmed.startsWith('/theme ')) {
79
+ return { kind: 'theme', argument: trimmed.slice('/theme'.length).trim() };
80
+ }
72
81
  if (trimmed === '/keys' || trimmed.startsWith('/keys ')) {
73
82
  return { kind: 'keys', argument: trimmed.slice('/keys'.length).trim() };
74
83
  }
75
84
  if (trimmed === '/copy')
76
85
  return { kind: 'copy' };
86
+ if (trimmed === '/history' || trimmed.startsWith('/history ')) {
87
+ return { kind: 'history', argument: trimmed.slice('/history'.length).trim() };
88
+ }
77
89
  if (trimmed === '/new' || trimmed.startsWith('/new ')) {
78
90
  return { kind: 'new', title: trimmed.slice('/new'.length).trim() };
79
91
  }
92
+ if (trimmed === '/stash-pop' || trimmed.startsWith('/stash-pop ')) {
93
+ return { kind: 'stash-pop', selector: trimmed.slice('/stash-pop'.length).trim() };
94
+ }
95
+ if (trimmed === '/stash-apply' || trimmed.startsWith('/stash-apply ')) {
96
+ return { kind: 'stash-apply', selector: trimmed.slice('/stash-apply'.length).trim() };
97
+ }
98
+ if (trimmed === '/stash-list')
99
+ return { kind: 'stash-list' };
100
+ if (trimmed === '/stash-drop' || trimmed.startsWith('/stash-drop ')) {
101
+ return { kind: 'stash-drop', selector: trimmed.slice('/stash-drop'.length).trim() };
102
+ }
103
+ if (trimmed === '/stash-clear')
104
+ return { kind: 'stash-clear' };
105
+ if (trimmed === '/stash' || trimmed.startsWith('/stash ')) {
106
+ return { kind: 'stash', argument: trimmed.slice('/stash'.length).trim() };
107
+ }
80
108
  if (trimmed.startsWith('/')) {
81
109
  const [head = ''] = trimmed.slice(1).split(/\s+/u, 1);
82
110
  const name = head.toLowerCase();
@@ -1 +1 @@
1
- {"version":3,"file":"submission.js","sourceRoot":"","sources":["../../src/input/submission.ts"],"names":[],"mappings":"AAwBA,iEAAiE;AACjE,MAAM,CAAC,MAAM,c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AC,EAAE,CAAC;QAC5B,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;QACrD,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAC/B,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA;IACnF,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA;AAC1C,CAAC"}
@@ -3,14 +3,30 @@ import { type ActionLayer, type Keymap } from './input/actions.ts';
3
3
  export declare const KEYMAP_LAYERS: readonly ActionLayer[];
4
4
  /** The layer a reader named, or nothing when the name is not one of them. */
5
5
  export declare function keymapLayer(name: string): ActionLayer | undefined;
6
+ /** What one layer is for, so a list narrowed to it can say what the reader is looking at. */
7
+ export declare function layerNote(layer: ActionLayer): string;
8
+ /** One row of the key map, as the list shows it. */
9
+ export interface KeymapRow {
10
+ /** The action id, or the shadow's own name; what a pick would settle on. */
11
+ readonly id: string;
12
+ /** The row as it reads: the id, the keys in force, and what the action does. */
13
+ readonly label: string;
14
+ /** The part of the map the row belongs to: a layer, or the keys taken from the library. */
15
+ readonly group: string;
16
+ /** Whether the reader wrote this row, which the list's heading counts. */
17
+ readonly written: boolean;
18
+ /** Whether the row names an action rather than a key the map took from the library. */
19
+ readonly action: boolean;
20
+ }
6
21
  /**
7
- * The effective map, one line per action.
22
+ * The effective map, one row per action.
8
23
  *
9
24
  * The id comes first because it is what the reader types into settings.yaml;
10
25
  * the keys follow in the order they are read, so a list action answers its
11
26
  * first key before its second. A mark says which rows the reader wrote, because
12
27
  * a document that no longer matches the shipped map cannot be read off the file
13
- * once the file grows.
28
+ * once the file grows. The keys the reader took from the library are rows too:
29
+ * they are a fact about the map, and whoever remapped is the one reading it.
14
30
  */
15
- export declare function renderKeymap(map: Keymap, only?: ActionLayer): string[];
31
+ export declare function keymapRows(map: Keymap, only?: ActionLayer): readonly KeymapRow[];
16
32
  //# sourceMappingURL=keys-command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"keys-command.d.ts","sourceRoot":"","sources":["../src/keys-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6D,KAAK,WAAW,EAAE,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAE7H,0EAA0E;AAC1E,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EAA4E,CAAA;AAuB5H,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAEjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,CAsBtE"}
1
+ {"version":3,"file":"keys-command.d.ts","sourceRoot":"","sources":["../src/keys-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6D,KAAK,WAAW,EAAE,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAE7H,0EAA0E;AAC1E,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EAA4E,CAAA;AAmB5H,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAEjE;AAED,6FAA6F;AAC7F,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAEpD;AAED,oDAAoD;AACpD,MAAM,WAAW,SAAS;IACxB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,2FAA2F;IAC3F,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,uFAAuF;IACvF,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CACzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,SAAS,EAAE,CAyBhF"}
@@ -1,7 +1,7 @@
1
1
  import { ACTION_CATALOG, actionLabel, keyName, keysFor, newShadows } from "./input/actions.js";
2
2
  /** The layers a reader may ask for, in the order the table lists them. */
3
3
  export const KEYMAP_LAYERS = ['prompt', 'surface', 'chord', 'gate', 'question', 'picker', 'library'];
4
- /** What each layer is for, so a list of ids reads as a surface rather than a dump. */
4
+ /** What each layer is for, so a list narrowed to one reads as a surface rather than a dump. */
5
5
  const LAYER_NOTES = {
6
6
  prompt: 'the prompt bar',
7
7
  surface: 'the surface, answered before the editor',
@@ -11,50 +11,53 @@ const LAYER_NOTES = {
11
11
  picker: 'a list',
12
12
  library: 'the editor and input pi-tui draws, read from the library',
13
13
  };
14
- /** Where the reader edits the section; the home is a variable, not a fixed path. */
15
- const SETTINGS_HINT = 'edit $DSH_HOME/settings.yaml (default ~/.dsh/settings.yaml) under "dsh-tui:" · /keys shows the result';
16
- /** The smallest document that says something, so the shape is never guessed at. */
17
- const EXAMPLE = [
18
- 'keys:',
19
- ' prompt.submit: ctrl+enter # one key, or',
20
- ' prompt.newLine: [enter, shift+enter, ctrl+j] # a list of them',
21
- ];
14
+ /** The mark a row carries when the reader wrote it, so the shipped map and theirs never blur. */
15
+ const WRITTEN_MARK = ' (yours)';
16
+ /** What a row says instead of a layer when it names a key the reader took from the library. */
17
+ const TAKEN_GROUP = 'from the library';
22
18
  /** The layer a reader named, or nothing when the name is not one of them. */
23
19
  export function keymapLayer(name) {
24
20
  return KEYMAP_LAYERS.find(layer => layer === name);
25
21
  }
22
+ /** What one layer is for, so a list narrowed to it can say what the reader is looking at. */
23
+ export function layerNote(layer) {
24
+ return LAYER_NOTES[layer];
25
+ }
26
26
  /**
27
- * The effective map, one line per action.
27
+ * The effective map, one row per action.
28
28
  *
29
29
  * The id comes first because it is what the reader types into settings.yaml;
30
30
  * the keys follow in the order they are read, so a list action answers its
31
31
  * first key before its second. A mark says which rows the reader wrote, because
32
32
  * a document that no longer matches the shipped map cannot be read off the file
33
- * once the file grows.
33
+ * once the file grows. The keys the reader took from the library are rows too:
34
+ * they are a fact about the map, and whoever remapped is the one reading it.
34
35
  */
35
- export function renderKeymap(map, only) {
36
+ export function keymapRows(map, only) {
36
37
  const layers = only === undefined ? KEYMAP_LAYERS : [only];
37
- const actions = ACTION_CATALOG.filter(action => layers.includes(action.layer));
38
- const lines = [`keys · ${actions.length} actions · ${map.written.size} of them yours`, ''];
39
- for (const layer of layers) {
40
- const rows = actions.filter(action => action.layer === layer);
41
- if (rows.length === 0)
38
+ const rows = [];
39
+ for (const action of ACTION_CATALOG) {
40
+ if (!layers.includes(action.layer))
42
41
  continue;
43
- lines.push(`${layer} · ${LAYER_NOTES[layer]}:`);
44
- for (const action of rows) {
45
- const keys = keysFor(map, action.id).map(keyName).join(' · ');
46
- lines.push(` ${action.id} = ${keys === '' ? 'unbound' : keys} · ${actionLabel(action.id)}${map.written.has(action.id) ? ' (yours)' : ''}`);
47
- }
48
- lines.push('');
42
+ const keys = keysFor(map, action.id).map(keyName).join(' · ');
43
+ const written = map.written.has(action.id);
44
+ rows.push({
45
+ id: action.id,
46
+ label: `${action.id} = ${keys === '' ? 'unbound' : keys} · ${actionLabel(action.id)}${written ? WRITTEN_MARK : ''}`,
47
+ group: action.layer,
48
+ written,
49
+ action: true,
50
+ });
49
51
  }
50
- const shadows = newShadows(map);
51
- if (shadows.length > 0) {
52
- lines.push('keys you took from the library:');
53
- for (const shadow of shadows)
54
- lines.push(` ${keyName(shadow.key)}: ${shadow.winner} over ${shadow.loser}`);
55
- lines.push('');
52
+ for (const shadow of newShadows(map)) {
53
+ rows.push({
54
+ id: `shadow:${shadow.key}:${shadow.winner}`,
55
+ label: `${keyName(shadow.key)}: ${shadow.winner} over ${shadow.loser}`,
56
+ group: TAKEN_GROUP,
57
+ written: false,
58
+ action: false,
59
+ });
56
60
  }
57
- lines.push(...EXAMPLE, '', SETTINGS_HINT);
58
- return lines;
61
+ return rows;
59
62
  }
60
63
  //# sourceMappingURL=keys-command.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"keys-command.js","sourceRoot":"","sources":["../src/keys-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAiC,MAAM,oBAAoB,CAAA;AAE7H,0EAA0E;AAC1E,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;AAE5H,sFAAsF;AACtF,MAAM,WAAW,GAA0C;IACzD,MAAM,EAAE,gBAAgB;IACxB,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,gDAAgD;IACvD,IAAI,EAAE,aAAa;IACnB,QAAQ,EAAE,4BAA4B;IACtC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,0DAA0D;CACpE,CAAA;AAED,oFAAoF;AACpF,MAAM,aAAa,GAAG,uGAAuG,CAAA;AAE7H,mFAAmF;AACnF,MAAM,OAAO,GAAG;IACd,OAAO;IACP,kDAAkD;IAClD,mEAAmE;CACpE,CAAA;AAED,6EAA6E;AAC7E,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,CAAA;AACpD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,IAAkB;IAC1D,MAAM,MAAM,GAAG,IAAI,KAAK,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,CAAC;YACR,EAAE,EAAE,UAAU,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE;YAC3C,KAAK,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,SAAS,MAAM,CAAC,KAAK,EAAE;YACtE,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;IACJ,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -14,6 +14,11 @@ export interface DeferredNotice {
14
14
  * is read either before the surface owns the screen or after it: one holder,
15
15
  * opened when the screen is taken, keeps both orders honest — and a notice
16
16
  * written to stderr alone would have been buried under the alternate screen.
17
+ *
18
+ * Everything held is printed, not just the last: a boot can find several things
19
+ * wrong at once — a refused section and the themes beside it — and showing one of
20
+ * them would leave the reader fixing what they were told about while the rest
21
+ * waited for a restart.
17
22
  */
18
23
  export declare function createDeferredNotice(): DeferredNotice;
19
24
  //# sourceMappingURL=settings-notice.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings-notice.d.ts","sourceRoot":"","sources":["../src/settings-notice.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;AAElD,yDAAyD;AACzD,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAA;IAC5B,0EAA0E;IAC1E,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,IAAI,cAAc,CAmBrD"}
1
+ {"version":3,"file":"settings-notice.d.ts","sourceRoot":"","sources":["../src/settings-notice.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;AAElD,yDAAyD;AACzD,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAA;IAC5B,0EAA0E;IAC1E,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,IAAI,cAAc,CAgBrD"}
@@ -5,22 +5,24 @@
5
5
  * is read either before the surface owns the screen or after it: one holder,
6
6
  * opened when the screen is taken, keeps both orders honest — and a notice
7
7
  * written to stderr alone would have been buried under the alternate screen.
8
+ *
9
+ * Everything held is printed, not just the last: a boot can find several things
10
+ * wrong at once — a refused section and the themes beside it — and showing one of
11
+ * them would leave the reader fixing what they were told about while the rest
12
+ * waited for a restart.
8
13
  */
9
14
  export function createDeferredNotice() {
10
15
  let sink;
11
- let pending;
16
+ const held = [];
12
17
  return {
13
18
  open(next) {
14
19
  sink = next;
15
- if (pending === undefined)
16
- return;
17
- const held = pending;
18
- pending = undefined;
19
- next(held);
20
+ for (const message of held.splice(0))
21
+ next(message);
20
22
  },
21
23
  post(message) {
22
24
  if (sink === undefined) {
23
- pending = message;
25
+ held.push(message);
24
26
  return;
25
27
  }
26
28
  sink(message);
@@ -1 +1 @@
1
- {"version":3,"file":"settings-notice.js","sourceRoot":"","sources":["../src/settings-notice.ts"],"names":[],"mappings":"AAWA;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB;IAClC,IAAI,IAA4B,CAAA;IAChC,IAAI,OAA2B,CAAA;IAC/B,OAAO;QACL,IAAI,CAAC,IAAI;YACP,IAAI,GAAG,IAAI,CAAA;YACX,IAAI,OAAO,KAAK,SAAS;gBAAE,OAAM;YACjC,MAAM,IAAI,GAAG,OAAO,CAAA;YACpB,OAAO,GAAG,SAAS,CAAA;YACnB,IAAI,CAAC,IAAI,CAAC,CAAA;QACZ,CAAC;QACD,IAAI,CAAC,OAAO;YACV,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACvB,OAAO,GAAG,OAAO,CAAA;gBACjB,OAAM;YACR,CAAC;YACD,IAAI,CAAC,OAAO,CAAC,CAAA;QACf,CAAC;KACF,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"settings-notice.js","sourceRoot":"","sources":["../src/settings-notice.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,oBAAoB;IAClC,IAAI,IAA4B,CAAA;IAChC,MAAM,IAAI,GAAa,EAAE,CAAA;IACzB,OAAO;QACL,IAAI,CAAC,IAAI;YACP,IAAI,GAAG,IAAI,CAAA;YACX,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBAAE,IAAI,CAAC,OAAO,CAAC,CAAA;QACrD,CAAC;QACD,IAAI,CAAC,OAAO;YACV,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACvB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;gBAClB,OAAM;YACR,CAAC;YACD,IAAI,CAAC,OAAO,CAAC,CAAA;QACf,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,72 @@
1
+ /** Which step failed after a write already committed, so the loss is never implied. */
2
+ export type StashFailurePhase = 'directory-sync' | 'lock-release';
3
+ export interface StashFailure {
4
+ readonly phase: StashFailurePhase;
5
+ readonly error: unknown;
6
+ }
7
+ /**
8
+ * A mutation that landed on disk while a later step failed.
9
+ *
10
+ * The write is not undone — reporting it as a failure would tell the reader
11
+ * their draft was lost when it is readable — so the failure travels beside the
12
+ * result and the caller reports success plus the warning.
13
+ */
14
+ export declare class StashCommittedError<Result = unknown> extends Error {
15
+ readonly committed = true;
16
+ readonly result: Result;
17
+ readonly failure: StashFailure;
18
+ /** Set when the lock could not be released either, so both are reported. */
19
+ readonly releaseFailure: StashFailure | undefined;
20
+ constructor(result: Result, failure: StashFailure, releaseFailure?: StashFailure);
21
+ }
22
+ export interface StashMutationResult<Result> {
23
+ readonly didPersist: boolean;
24
+ readonly result: Result;
25
+ }
26
+ interface LockOwner {
27
+ readonly pid: number;
28
+ readonly host: string;
29
+ readonly token: string;
30
+ readonly createdAt: string;
31
+ }
32
+ /** Take the file lock for a read that must not observe a half-written file. */
33
+ export declare function withStashFileLock<Result>(filePath: string, operation: () => Promise<Result>): Promise<Result>;
34
+ /**
35
+ * Take the lock for a mutation, and classify an unlock failure as committed.
36
+ *
37
+ * Only a callback that reports `didPersist` turns a failed unlock into a
38
+ * committed error: an unlock failure after a refused mutation is an ordinary
39
+ * failure.
40
+ */
41
+ export declare function withStashMutationLock<Result>(filePath: string, operation: () => Promise<StashMutationResult<Result>>): Promise<Result>;
42
+ /**
43
+ * The claim a reclaimer takes, named after the bank whose lock it guards.
44
+ *
45
+ * Exported because it is the path a timeout tells the reader to clear by hand.
46
+ */
47
+ export declare function reclaimMutexPath(lockDir: string): string;
48
+ /**
49
+ * What a reclaim is allowed to act on: one reading of the lock, with the
50
+ * identity of the directory it was read from.
51
+ *
52
+ * The owner bytes alone are not enough, because the directory that held them can
53
+ * be released and replaced between the reading and the removal. A lock is only
54
+ * removed when both the identity and the token still match what was judged.
55
+ */
56
+ export interface LockObservation {
57
+ readonly owner: LockOwner | undefined;
58
+ readonly device: number;
59
+ readonly inode: number;
60
+ readonly modified: number;
61
+ }
62
+ /** Read a lock and the identity of the directory it was read from, in one pass. */
63
+ export declare function observeLock(lockDir: string): Promise<LockObservation | undefined>;
64
+ /**
65
+ * Remove the lock a judgement was made about, and nothing that replaced it.
66
+ *
67
+ * Exported so the race this exists for can be driven from a test: hold an
68
+ * observation, publish a live lock in its place, and the removal has to refuse.
69
+ */
70
+ export declare function removeObservedLock(lockDir: string, observed: LockObservation): Promise<boolean>;
71
+ export {};
72
+ //# sourceMappingURL=lock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/stash/lock.ts"],"names":[],"mappings":"AAiDA,uF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