@wrongstack/tui 0.295.1 → 0.296.2

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 (274) hide show
  1. package/dist/app-action-type.d.ts +987 -0
  2. package/dist/app-action-type.d.ts.map +1 -0
  3. package/dist/app-initial-state.d.ts.map +1 -1
  4. package/dist/app-key-handler.d.ts +11 -3
  5. package/dist/app-key-handler.d.ts.map +1 -1
  6. package/dist/app-props.d.ts +4 -2
  7. package/dist/app-props.d.ts.map +1 -1
  8. package/dist/app-reducer.d.ts +4 -2
  9. package/dist/app-reducer.d.ts.map +1 -1
  10. package/dist/app-settings-type.d.ts +73 -0
  11. package/dist/app-settings-type.d.ts.map +1 -0
  12. package/dist/app-state-core-types.d.ts +52 -0
  13. package/dist/app-state-core-types.d.ts.map +1 -0
  14. package/dist/app-state-fleet.d.ts +44 -0
  15. package/dist/app-state-fleet.d.ts.map +1 -0
  16. package/dist/app-state.d.ts +46 -1179
  17. package/dist/app-state.d.ts.map +1 -1
  18. package/dist/app-ui-state.d.ts +5 -0
  19. package/dist/app-ui-state.d.ts.map +1 -0
  20. package/dist/app-view-contract.d.ts +8 -1
  21. package/dist/app-view-contract.d.ts.map +1 -1
  22. package/dist/app-view.d.ts.map +1 -1
  23. package/dist/app.d.ts.map +1 -1
  24. package/dist/brain-panel-model.d.ts +8 -0
  25. package/dist/brain-panel-model.d.ts.map +1 -1
  26. package/dist/clipboard.d.ts +1 -1
  27. package/dist/clipboard.d.ts.map +1 -1
  28. package/dist/components/agents-monitor-constants.d.ts +12 -0
  29. package/dist/components/agents-monitor-constants.d.ts.map +1 -0
  30. package/dist/components/agents-monitor.d.ts +1 -7
  31. package/dist/components/agents-monitor.d.ts.map +1 -1
  32. package/dist/components/auth-panel.d.ts +2 -0
  33. package/dist/components/auth-panel.d.ts.map +1 -1
  34. package/dist/components/brain-panel.d.ts.map +1 -1
  35. package/dist/components/connections-panel.d.ts +7 -0
  36. package/dist/components/connections-panel.d.ts.map +1 -0
  37. package/dist/components/f-key-picker.d.ts.map +1 -1
  38. package/dist/components/history/basic-format.d.ts +19 -0
  39. package/dist/components/history/basic-format.d.ts.map +1 -0
  40. package/dist/components/history/code-block-diff-helpers.d.ts +28 -0
  41. package/dist/components/history/code-block-diff-helpers.d.ts.map +1 -0
  42. package/dist/components/history/code-block.d.ts +1 -1
  43. package/dist/components/history/code-block.d.ts.map +1 -1
  44. package/dist/components/history/copy-icon.d.ts +25 -0
  45. package/dist/components/history/copy-icon.d.ts.map +1 -0
  46. package/dist/components/history/entry.d.ts.map +1 -1
  47. package/dist/components/history/index.d.ts +5 -6
  48. package/dist/components/history/index.d.ts.map +1 -1
  49. package/dist/components/history/sage-output-format.d.ts +20 -0
  50. package/dist/components/history/sage-output-format.d.ts.map +1 -0
  51. package/dist/components/history/stream-box.d.ts +23 -0
  52. package/dist/components/history/stream-box.d.ts.map +1 -0
  53. package/dist/components/history/tool-arg-format.d.ts +5 -0
  54. package/dist/components/history/tool-arg-format.d.ts.map +1 -0
  55. package/dist/components/history/tool-group.d.ts.map +1 -1
  56. package/dist/components/history/tool-output-summary.d.ts +4 -0
  57. package/dist/components/history/tool-output-summary.d.ts.map +1 -0
  58. package/dist/components/history/tool-visual-command.d.ts +3 -0
  59. package/dist/components/history/tool-visual-command.d.ts.map +1 -0
  60. package/dist/components/history/tool-visual-domain.d.ts +8 -0
  61. package/dist/components/history/tool-visual-domain.d.ts.map +1 -0
  62. package/dist/components/history/tool-visual-format.d.ts +13 -0
  63. package/dist/components/history/tool-visual-format.d.ts.map +1 -0
  64. package/dist/components/history/tool-visual-lsp.d.ts +4 -0
  65. package/dist/components/history/tool-visual-lsp.d.ts.map +1 -0
  66. package/dist/components/history/tool-visual-misc.d.ts +7 -0
  67. package/dist/components/history/tool-visual-misc.d.ts.map +1 -0
  68. package/dist/components/history/tool-visual-mode-workdir.d.ts +4 -0
  69. package/dist/components/history/tool-visual-mode-workdir.d.ts.map +1 -0
  70. package/dist/components/history/tool-visual-types.d.ts +9 -0
  71. package/dist/components/history/tool-visual-types.d.ts.map +1 -0
  72. package/dist/components/history/utils.d.ts +14 -54
  73. package/dist/components/history/utils.d.ts.map +1 -1
  74. package/dist/components/history/visual-lines.d.ts +7 -0
  75. package/dist/components/history/visual-lines.d.ts.map +1 -0
  76. package/dist/components/history/visual-memory-logs.d.ts +4 -0
  77. package/dist/components/history/visual-memory-logs.d.ts.map +1 -0
  78. package/dist/components/input.d.ts.map +1 -1
  79. package/dist/components/kanban-panel.d.ts.map +1 -1
  80. package/dist/components/key-hint-bar.d.ts +11 -0
  81. package/dist/components/key-hint-bar.d.ts.map +1 -1
  82. package/dist/components/powerline-rail.d.ts +11 -4
  83. package/dist/components/powerline-rail.d.ts.map +1 -1
  84. package/dist/components/provider-colors.d.ts.map +1 -1
  85. package/dist/components/refine-countdown-panel.d.ts +25 -0
  86. package/dist/components/refine-countdown-panel.d.ts.map +1 -0
  87. package/dist/components/refine-failure-panel.d.ts +1 -0
  88. package/dist/components/refine-failure-panel.d.ts.map +1 -1
  89. package/dist/components/resume-picker.d.ts.map +1 -1
  90. package/dist/components/scrollable-history.d.ts +96 -17
  91. package/dist/components/scrollable-history.d.ts.map +1 -1
  92. package/dist/components/settings-picker-filter.d.ts +20 -0
  93. package/dist/components/settings-picker-filter.d.ts.map +1 -0
  94. package/dist/components/settings-picker-jumps.d.ts +16 -0
  95. package/dist/components/settings-picker-jumps.d.ts.map +1 -0
  96. package/dist/components/settings-picker-model.d.ts +270 -0
  97. package/dist/components/settings-picker-model.d.ts.map +1 -0
  98. package/dist/components/settings-picker-row-list.d.ts +21 -0
  99. package/dist/components/settings-picker-row-list.d.ts.map +1 -0
  100. package/dist/components/settings-picker.d.ts +6 -313
  101. package/dist/components/settings-picker.d.ts.map +1 -1
  102. package/dist/components/status-bar-format.d.ts +65 -0
  103. package/dist/components/status-bar-format.d.ts.map +1 -0
  104. package/dist/components/status-bar-helpers.d.ts +19 -0
  105. package/dist/components/status-bar-helpers.d.ts.map +1 -0
  106. package/dist/components/status-bar-types.d.ts +350 -0
  107. package/dist/components/status-bar-types.d.ts.map +1 -0
  108. package/dist/components/status-bar.d.ts +4 -444
  109. package/dist/components/status-bar.d.ts.map +1 -1
  110. package/dist/components/statusline-detail-panel.d.ts.map +1 -1
  111. package/dist/components/statusline-picker.d.ts +5 -3
  112. package/dist/components/statusline-picker.d.ts.map +1 -1
  113. package/dist/connections-health.d.ts +39 -0
  114. package/dist/connections-health.d.ts.map +1 -0
  115. package/dist/connections-slash.d.ts +12 -0
  116. package/dist/connections-slash.d.ts.map +1 -0
  117. package/dist/esc-close-panels.d.ts.map +1 -1
  118. package/dist/f-key-panels.d.ts +4 -2
  119. package/dist/f-key-panels.d.ts.map +1 -1
  120. package/dist/heap-watchdog.d.ts.map +1 -1
  121. package/dist/height-cache.d.ts.map +1 -1
  122. package/dist/history-archive.d.ts +69 -0
  123. package/dist/history-archive.d.ts.map +1 -0
  124. package/dist/history-entry.d.ts +2 -0
  125. package/dist/history-entry.d.ts.map +1 -1
  126. package/dist/hit-test.d.ts +3 -4
  127. package/dist/hit-test.d.ts.map +1 -1
  128. package/dist/hooks/use-app-picker-keys.d.ts +3 -2
  129. package/dist/hooks/use-app-picker-keys.d.ts.map +1 -1
  130. package/dist/hooks/use-app-runtime-refs.d.ts +38 -0
  131. package/dist/hooks/use-app-runtime-refs.d.ts.map +1 -0
  132. package/dist/hooks/use-app-session-state.d.ts +28 -0
  133. package/dist/hooks/use-app-session-state.d.ts.map +1 -0
  134. package/dist/hooks/use-autonomy-drivers.d.ts +1 -1
  135. package/dist/hooks/use-autonomy-drivers.d.ts.map +1 -1
  136. package/dist/hooks/use-brain-panel.d.ts +1 -1
  137. package/dist/hooks/use-brain-panel.d.ts.map +1 -1
  138. package/dist/hooks/use-brain-risk-sync.d.ts +11 -0
  139. package/dist/hooks/use-brain-risk-sync.d.ts.map +1 -0
  140. package/dist/hooks/use-client-telemetry.d.ts +1 -1
  141. package/dist/hooks/use-client-telemetry.d.ts.map +1 -1
  142. package/dist/hooks/use-core-tui-commands.d.ts +2 -1
  143. package/dist/hooks/use-core-tui-commands.d.ts.map +1 -1
  144. package/dist/hooks/use-director-fleet-bridge.d.ts.map +1 -1
  145. package/dist/hooks/use-enhance-runtime-state.d.ts +23 -0
  146. package/dist/hooks/use-enhance-runtime-state.d.ts.map +1 -0
  147. package/dist/hooks/use-help-panel.d.ts +6 -0
  148. package/dist/hooks/use-help-panel.d.ts.map +1 -0
  149. package/dist/hooks/use-history-copy-notice.d.ts +4 -0
  150. package/dist/hooks/use-history-copy-notice.d.ts.map +1 -0
  151. package/dist/hooks/use-history-viewport-sync.d.ts +13 -0
  152. package/dist/hooks/use-history-viewport-sync.d.ts.map +1 -0
  153. package/dist/hooks/use-initial-prompt.d.ts +1 -1
  154. package/dist/hooks/use-initial-prompt.d.ts.map +1 -1
  155. package/dist/hooks/use-interrupt-ladder.d.ts +2 -1
  156. package/dist/hooks/use-interrupt-ladder.d.ts.map +1 -1
  157. package/dist/hooks/use-kanban-board-focus.d.ts +8 -0
  158. package/dist/hooks/use-kanban-board-focus.d.ts.map +1 -0
  159. package/dist/hooks/use-live-settings-state.d.ts +20 -0
  160. package/dist/hooks/use-live-settings-state.d.ts.map +1 -0
  161. package/dist/hooks/use-mailbox-view-model.d.ts.map +1 -1
  162. package/dist/hooks/use-model-pick.d.ts +1 -1
  163. package/dist/hooks/use-model-pick.d.ts.map +1 -1
  164. package/dist/hooks/use-mouse-tracking.d.ts +15 -0
  165. package/dist/hooks/use-mouse-tracking.d.ts.map +1 -0
  166. package/dist/hooks/use-next-steps-auto-submit.d.ts +2 -1
  167. package/dist/hooks/use-next-steps-auto-submit.d.ts.map +1 -1
  168. package/dist/hooks/use-panel-controllers.d.ts +2 -1
  169. package/dist/hooks/use-panel-controllers.d.ts.map +1 -1
  170. package/dist/hooks/use-picker-keys-types.d.ts +56 -0
  171. package/dist/hooks/use-picker-keys-types.d.ts.map +1 -0
  172. package/dist/hooks/use-picker-keys.d.ts +2 -64
  173. package/dist/hooks/use-picker-keys.d.ts.map +1 -1
  174. package/dist/hooks/use-provider-event-bridge.d.ts +1 -1
  175. package/dist/hooks/use-provider-event-bridge.d.ts.map +1 -1
  176. package/dist/hooks/use-session-interrupt-controller.d.ts +6 -1
  177. package/dist/hooks/use-session-interrupt-controller.d.ts.map +1 -1
  178. package/dist/hooks/use-settings-auto-save.d.ts +2 -1
  179. package/dist/hooks/use-settings-auto-save.d.ts.map +1 -1
  180. package/dist/hooks/use-shadow-panel.d.ts +17 -0
  181. package/dist/hooks/use-shadow-panel.d.ts.map +1 -0
  182. package/dist/hooks/use-slash-picker.d.ts +2 -1
  183. package/dist/hooks/use-slash-picker.d.ts.map +1 -1
  184. package/dist/hooks/use-stable-key-handler.d.ts +5 -0
  185. package/dist/hooks/use-stable-key-handler.d.ts.map +1 -0
  186. package/dist/hooks/use-subagent-events.d.ts.map +1 -1
  187. package/dist/hooks/use-terminal-render-lifecycle.d.ts.map +1 -1
  188. package/dist/hooks/use-todos-auto-clear.d.ts +3 -0
  189. package/dist/hooks/use-todos-auto-clear.d.ts.map +1 -0
  190. package/dist/hooks/use-tui-activity.d.ts +7 -1
  191. package/dist/hooks/use-tui-activity.d.ts.map +1 -1
  192. package/dist/hooks/use-tui-environment-state.d.ts +1 -0
  193. package/dist/hooks/use-tui-environment-state.d.ts.map +1 -1
  194. package/dist/hooks/use-tui-slash-commands.d.ts +2 -1
  195. package/dist/hooks/use-tui-slash-commands.d.ts.map +1 -1
  196. package/dist/index.js +19676 -17853
  197. package/dist/index.js.map +4 -4
  198. package/dist/input-validation/action-helpers.d.ts +12 -0
  199. package/dist/input-validation/action-helpers.d.ts.map +1 -0
  200. package/dist/input-validation/action-types.d.ts +4 -0
  201. package/dist/input-validation/action-types.d.ts.map +1 -0
  202. package/dist/input-validation/allow-lists.d.ts +29 -0
  203. package/dist/input-validation/allow-lists.d.ts.map +1 -0
  204. package/dist/input-validation/limits.d.ts +27 -0
  205. package/dist/input-validation/limits.d.ts.map +1 -0
  206. package/dist/input-validation/result.d.ts +10 -0
  207. package/dist/input-validation/result.d.ts.map +1 -0
  208. package/dist/input-validation/state-entries.d.ts +22 -0
  209. package/dist/input-validation/state-entries.d.ts.map +1 -0
  210. package/dist/input-validation/terminal.d.ts +69 -0
  211. package/dist/input-validation/terminal.d.ts.map +1 -0
  212. package/dist/input-validation.d.ts +7 -176
  213. package/dist/input-validation.d.ts.map +1 -1
  214. package/dist/layout-engine.d.ts +1 -1
  215. package/dist/layout-engine.d.ts.map +1 -1
  216. package/dist/layout-store.d.ts.map +1 -1
  217. package/dist/mailbox-view-model-types.d.ts +19 -0
  218. package/dist/mailbox-view-model-types.d.ts.map +1 -0
  219. package/dist/memory-context-monitor.d.ts.map +1 -1
  220. package/dist/memory-slash-format.d.ts +10 -0
  221. package/dist/memory-slash-format.d.ts.map +1 -0
  222. package/dist/memory-slash.d.ts.map +1 -1
  223. package/dist/mouse.d.ts +11 -4
  224. package/dist/mouse.d.ts.map +1 -1
  225. package/dist/on-panel-open.d.ts +1 -1
  226. package/dist/on-panel-open.d.ts.map +1 -1
  227. package/dist/overlay-key-router.d.ts.map +1 -1
  228. package/dist/reducers/activity.d.ts +2 -1
  229. package/dist/reducers/activity.d.ts.map +1 -1
  230. package/dist/reducers/composer.d.ts +2 -1
  231. package/dist/reducers/composer.d.ts.map +1 -1
  232. package/dist/reducers/conversation.d.ts +3 -2
  233. package/dist/reducers/conversation.d.ts.map +1 -1
  234. package/dist/reducers/dialogs.d.ts +3 -2
  235. package/dist/reducers/dialogs.d.ts.map +1 -1
  236. package/dist/reducers/fleet.d.ts +2 -1
  237. package/dist/reducers/fleet.d.ts.map +1 -1
  238. package/dist/reducers/helpers.d.ts +1 -1
  239. package/dist/reducers/helpers.d.ts.map +1 -1
  240. package/dist/reducers/panel-pickers.d.ts +2 -1
  241. package/dist/reducers/panel-pickers.d.ts.map +1 -1
  242. package/dist/reducers/settings-panel.d.ts +2 -1
  243. package/dist/reducers/settings-panel.d.ts.map +1 -1
  244. package/dist/reducers/settings-values.d.ts +2 -1
  245. package/dist/reducers/settings-values.d.ts.map +1 -1
  246. package/dist/reducers/workspace-panels.d.ts +3 -2
  247. package/dist/reducers/workspace-panels.d.ts.map +1 -1
  248. package/dist/run-tui-client-registration.d.ts +18 -0
  249. package/dist/run-tui-client-registration.d.ts.map +1 -0
  250. package/dist/run-tui-options.d.ts +569 -0
  251. package/dist/run-tui-options.d.ts.map +1 -0
  252. package/dist/run-tui-title-controller.d.ts +16 -0
  253. package/dist/run-tui-title-controller.d.ts.map +1 -0
  254. package/dist/run-tui.d.ts +5 -572
  255. package/dist/run-tui.d.ts.map +1 -1
  256. package/dist/scroll-anchor.d.ts +10 -14
  257. package/dist/scroll-anchor.d.ts.map +1 -1
  258. package/dist/settings-contracts.d.ts +1 -1
  259. package/dist/settings-contracts.d.ts.map +1 -1
  260. package/dist/submit-controller.d.ts +4 -0
  261. package/dist/submit-controller.d.ts.map +1 -1
  262. package/dist/submit-prompt-refinement.d.ts +2 -0
  263. package/dist/submit-prompt-refinement.d.ts.map +1 -1
  264. package/dist/terminal-modes.d.ts +3 -0
  265. package/dist/terminal-modes.d.ts.map +1 -0
  266. package/dist/terminal-silence.d.ts +3 -0
  267. package/dist/terminal-silence.d.ts.map +1 -0
  268. package/dist/terminal-title.d.ts +7 -1
  269. package/dist/terminal-title.d.ts.map +1 -1
  270. package/dist/tui-host-capabilities.d.ts +1 -1
  271. package/dist/tui-host-capabilities.d.ts.map +1 -1
  272. package/dist/ui-contracts.d.ts +2 -1
  273. package/dist/ui-contracts.d.ts.map +1 -1
  274. package/package.json +11 -12
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Normalize an action type string before allow-list comparison:
3
+ * - Trim whitespace
4
+ * - Reject empty/null/undefined
5
+ */
6
+ export declare function normalizeActionType(type: string): string | null;
7
+ /**
8
+ * Measure the maximum nesting depth of a value.
9
+ * Used to prevent prototype-pollution / deep-object DoS.
10
+ */
11
+ export declare function measureDepth(value: unknown, depth: number): number;
12
+ //# sourceMappingURL=action-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-helpers.d.ts","sourceRoot":"","sources":["../../src/input-validation/action-helpers.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAoBlE"}
@@ -0,0 +1,4 @@
1
+ /** Known reducer action types — exact, compile-time checked allow-list. */
2
+ export declare const ALLOWED_ACTION_TYPES: readonly ["addEntry", "archiveLoaded", "startArchiveLoad", "authBusy", "authCatalog", "authClose", "authConfirmEnd", "authConfirmStart", "authFilter", "authFlowDone", "authFlowLog", "authFlowStart", "authHint", "authMove", "authOpen", "authPromptChange", "authPromptEnd", "authPromptStart", "authProviders", "authView", "autonomyPickerClose", "autonomyPickerHint", "autonomyPickerMove", "autonomyPickerOpen", "brainBusy", "brainClose", "brainHint", "brainMove", "brainOpen", "brainPromptClear", "brainPromptSet", "brainRiskChange", "brainRowMove", "brainSetLog", "brainSettingsLoaded", "brainStatus", "brainView", "checkpointReceived", "clearConfirmClose", "clearConfirmOpen", "clearConfirmSetValue", "clearHistory", "clearInput", "clearInputHistory", "closeAllPanels", "collabBugFound", "collabEvalComplete", "collabPlanEmitted", "collabSessionDone", "collabSubagentSpawned", "compactHistory", "confirmClearAll", "confirmClose", "confirmOpen", "continueConfirmClose", "continueConfirmOpen", "copiedNotice", "coordinatorEvent", "countdownEnded", "countdownTick", "debugStreamStats", "debugStreamStatsClear", "dequeueFirst", "designPickerClose", "designPickerMove", "designPickerOpen", "designPickerStack", "enhanceBusy", "enhanceClose", "enhanceOpen", "enhanceSet", "enqueue", "escConfirmClose", "escConfirmOpen", "eternalStage", "exitConfirmClose", "exitConfirmOpen", "fKeyPickerClose", "fKeyPickerMove", "fKeyPickerOpen", "fleetBatch", "fleetBudgetExtended", "fleetBudgetWarning", "fleetConcurrency", "fleetCost", "fleetCtxPct", "fleetDelta", "fleetDone", "fleetMessage", "fleetRemove", "fleetSeed", "fleetSpawn", "fleetStart", "fleetTool", "fleetToolEnd", "fleetToolStart", "fleetUsage", "goalRunElapsed", "goalRunInit", "goalRunMonitorToggle", "goalRunPhaseUpdate", "goalRunReset", "goalRunRunningPhases", "goalRunTaskActive", "goalSummary", "helpClose", "helpFilter", "helpHint", "helpMove", "helpOpen", "hint", "historyDown", "historyPush", "historyUp", "interrupt", "leaderCtxPct", "leaderIterEnd", "leaderIterStart", "leaderToolEnd", "leaderToolStart", "mcpPickerBusy", "mcpPickerClose", "mcpPickerHint", "mcpPickerMove", "mcpPickerOpen", "mcpPickerSetItems", "modePickerClose", "modePickerHint", "modePickerMove", "modePickerOpen", "modelPickerBack", "modelPickerClose", "modelPickerHint", "modelPickerMove", "modelPickerOpen", "modelPickerPickProvider", "modelPickerSearch", "pickerClose", "pickerMove", "pickerOpen", "pickerSetMatches", "pluginPickerBusy", "pluginPickerClose", "pluginPickerHint", "pluginPickerMove", "pluginPickerOpen", "pluginPickerSetItems", "projectPickerClose", "projectPickerFilter", "projectPickerHint", "projectPickerMove", "projectPickerOpen", "promptPickerCategory", "promptPickerClose", "promptPickerMove", "promptPickerOpen", "queueClear", "queueDelete", "queueToggleRefine", "refineCountdownClose", "refineCountdownOpen", "refineFailureClose", "refineFailureOpen", "replaceHistory", "resetContextChip", "resetInterrupts", "resumePickerBusy", "resumePickerClose", "resumePickerError", "resumePickerHint", "resumePickerMove", "resumePickerOpen", "rewindOverlayClose", "rewindOverlayMove", "rewindOverlayOpen", "sddBoardSnapshot", "sddBoardFocusNext", "sddBoardFocusPrev", "sendModePickerClose", "sendModePickerMove", "sendModePickerOpen", "sessionResumeConfirmClear", "sessionResumeConfirmSet", "sessionRewound", "sessionsPanelBusy", "sessionsPanelMove", "sessionsPanelSet", "setBuffer", "setFleetChat", "setHistoryScrolled", "setInputHistory", "setViewportRows", "settingsClose", "settingsFieldMove", "settingsFieldSet", "settingsFilterSet", "settingsHint", "settingsOpen", "settingsThinkingEditCancel", "settingsThinkingEditChange", "settingsThinkingEditCommit", "settingsThinkingEditStart", "settingsValueChange", "settingsValueSet", "shadowClose", "shadowHint", "shadowOpen", "shadowUpdate", "shellCommandWarningClose", "shellCommandWarningOpen", "slashConfirmClose", "slashConfirmOpen", "slashPickerClose", "slashPickerMove", "slashPickerOpen", "status", "statuslineChipExpire", "statuslineChipShow", "statuslineClose", "statuslineFieldMove", "statuslineFieldSet", "statuslineHint", "statuslineOpen", "statuslineToggle", "statuslineVisibleChipsSync", "steerConsume", "steerStart", "streamDelta", "streamReset", "toggleAgentsMonitor", "toggleAuditPanel", "toggleContextPanel", "toggleConnectionsPanel", "toggleCoordinatorMonitor", "toggleCronMonitor", "toggleGoalKanbanPanel", "toggleGoalPanel", "toggleHelp", "toggleKanbanPanel", "toggleMonitor", "togglePlanPanel", "toggleProcessList", "toggleQueuePanel", "toggleSddBoardMonitor", "toggleSessionsPanel", "toggleTodosMonitor", "toggleWorktreeMonitor", "toolEnded", "toolStarted", "toolStreamAppend", "toolStreamClear", "toolsPickerBusy", "toolsPickerClose", "toolsPickerFilter", "toolsPickerHint", "toolsPickerMove", "toolsPickerOpen", "toolsPickerSetItems", "toolsPickerToggle", "worktreeRemove", "worktreeUpsert"];
3
+ export type AllowedActionType = (typeof ALLOWED_ACTION_TYPES)[number];
4
+ //# sourceMappingURL=action-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-types.d.ts","sourceRoot":"","sources":["../../src/input-validation/action-types.ts"],"names":[],"mappings":"AAgBA,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,+yJAsQtB,CAAC;AAEZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ /** History entry kinds that carry text (must be non-empty to be stored). */
2
+ export declare const TEXT_BEARING_ENTRY_KINDS: Set<string>;
3
+ /** All valid history entry kinds. */
4
+ export declare const ALLOWED_ENTRY_KINDS: Set<string>;
5
+ /** Fleet subagent status values. */
6
+ export declare const ALLOWED_FLEET_STATUSES: Set<string>;
7
+ /** Mouse event kinds */
8
+ export declare const ALLOWED_MOUSE_KINDS: Set<string>;
9
+ /** Mouse buttons */
10
+ export declare const ALLOWED_MOUSE_BUTTONS: Set<string>;
11
+ /** Keyboard modifier keys. */
12
+ export declare const ALLOWED_KEY_EVENT_FIELDS: Set<string>;
13
+ /** Scroll direction for scrollPage. */
14
+ export declare const ALLOWED_SCROLL_DIRS: Set<string>;
15
+ /** Autonomy mode values. */
16
+ export declare const ALLOWED_AUTONOMY_MODES: Set<string>;
17
+ /** Known send modes. */
18
+ export declare const ALLOWED_SEND_MODES: Set<string>;
19
+ /** FleetChat verbosity modes. */
20
+ export declare const ALLOWED_FLEET_CHAT_MODES: Set<string>;
21
+ /** SDD lifecycle ops. */
22
+ export declare const ALLOWED_SDD_OPS: Set<string>;
23
+ /** Project picker item kinds. */
24
+ export declare const ALLOWED_PICKER_KINDS: Set<string>;
25
+ /** Collaboration verdicts. */
26
+ export declare const ALLOWED_COLLAB_VERDICTS: Set<string>;
27
+ /** Known terminal capability keys. */
28
+ export declare const ALLOWED_CAPABILITY_FIELDS: Set<string>;
29
+ //# sourceMappingURL=allow-lists.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allow-lists.d.ts","sourceRoot":"","sources":["../../src/input-validation/allow-lists.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,aAQnC,CAAC;AAEH,qCAAqC;AACrC,eAAO,MAAM,mBAAmB,aAQ9B,CAAC;AAEH,oCAAoC;AACpC,eAAO,MAAM,sBAAsB,aAOjC,CAAC;AAEH,wBAAwB;AACxB,eAAO,MAAM,mBAAmB,aAAiD,CAAC;AAElF,oBAAoB;AACpB,eAAO,MAAM,qBAAqB,aAA+C,CAAC;AAElF,8BAA8B;AAC9B,eAAO,MAAM,wBAAwB,aAoBnC,CAAC;AAEH,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,aAA0B,CAAC;AAE3D,4BAA4B;AAC5B,eAAO,MAAM,sBAAsB,aAMjC,CAAC;AAEH,wBAAwB;AACxB,eAAO,MAAM,kBAAkB,aAA+C,CAAC;AAE/E,iCAAiC;AACjC,eAAO,MAAM,wBAAwB,aAAsC,CAAC;AAE5E,yBAAyB;AACzB,eAAO,MAAM,eAAe,aAAwD,CAAC;AAErF,iCAAiC;AACjC,eAAO,MAAM,oBAAoB,aAAiC,CAAC;AAEnE,8BAA8B;AAC9B,eAAO,MAAM,uBAAuB,aAAmD,CAAC;AAExF,sCAAsC;AACtC,eAAO,MAAM,yBAAyB,aAA4D,CAAC"}
@@ -0,0 +1,27 @@
1
+ /** Maximum length of a single input line from stdin (before Enter). */
2
+ export declare const MAX_INPUT_BUFFER_CHARS = 100000;
3
+ /** Maximum size of a single paste operation (prevents OOM from 10MB paste). */
4
+ export declare const MAX_PASTE_CHARS = 50000;
5
+ /** Maximum length of a single history entry text payload. */
6
+ export declare const MAX_ENTRY_TEXT_CHARS = 500000;
7
+ /** Maximum entries in the history array (matches history-retention.ts). */
8
+ export declare const MAX_HISTORY_ENTRIES = 400;
9
+ /** Maximum actions in a fleetBatch dispatch (prevents render-thrashing). */
10
+ export declare const MAX_BATCHED_ACTIONS = 500;
11
+ /** Maximum length of a single action payload string field. */
12
+ export declare const MAX_ACTION_STRING_FIELD = 10000;
13
+ /** Maximum subagents tracked in fleet state. */
14
+ export declare const MAX_FLEET_ENTRIES = 200;
15
+ /** Maximum tools tracked per-subagent. */
16
+ export declare const MAX_RECENT_TOOLS = 100;
17
+ /** Maximum messages tracked per-subagent. */
18
+ export declare const MAX_RECENT_MESSAGES = 50;
19
+ /** Maximum depth of nested action payload objects. */
20
+ export declare const MAX_ACTION_DEPTH = 8;
21
+ /** Maximum characters in a paste fragment (single stdin chunk). */
22
+ export declare const MAX_PASTE_FRAGMENT_CHARS = 100000;
23
+ /** Maximum length for any host-provided string (model, provider, etc). */
24
+ export declare const MAX_HOST_STRING_FIELD = 500;
25
+ /** Maximum entries in a picker matches list. */
26
+ export declare const MAX_PICKER_MATCHES = 500;
27
+ //# sourceMappingURL=limits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../src/input-validation/limits.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,eAAO,MAAM,sBAAsB,SAAU,CAAC;AAE9C,+EAA+E;AAC/E,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC,6DAA6D;AAC7D,eAAO,MAAM,oBAAoB,SAAU,CAAC;AAE5C,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,8DAA8D;AAC9D,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAE9C,gDAAgD;AAChD,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC,0CAA0C;AAC1C,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,6CAA6C;AAC7C,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,sDAAsD;AACtD,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,mEAAmE;AACnE,eAAO,MAAM,wBAAwB,SAAU,CAAC;AAEhD,0EAA0E;AAC1E,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,gDAAgD;AAChD,eAAO,MAAM,kBAAkB,MAAM,CAAC"}
@@ -0,0 +1,10 @@
1
+ export interface ValidationOk<T> {
2
+ valid: true;
3
+ value: T;
4
+ }
5
+ export interface ValidationError {
6
+ valid: false;
7
+ error: string;
8
+ }
9
+ export type ValidationResult<T> = ValidationOk<T> | ValidationError;
10
+ //# sourceMappingURL=result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/input-validation/result.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,KAAK,EAAE,IAAI,CAAC;IACZ,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { ValidationResult } from './result.js';
2
+ export declare function validateFleetEntry(entry: {
3
+ id: string;
4
+ name: string;
5
+ status: string;
6
+ streamingText?: string;
7
+ iterations?: number;
8
+ toolCalls?: number;
9
+ recentTools?: unknown[];
10
+ recentMessages?: unknown[];
11
+ cost?: number;
12
+ }): ValidationResult<Record<string, unknown>>;
13
+ /**
14
+ * Validate a restored session entry (from JSONL).
15
+ *
16
+ * Rejects:
17
+ * - Non-object entries
18
+ * - Unknown entry kinds
19
+ * - Oversized payloads
20
+ */
21
+ export declare function validateRestoreEntry(entry: unknown, index: number): ValidationResult<Record<string, unknown>>;
22
+ //# sourceMappingURL=state-entries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state-entries.d.ts","sourceRoot":"","sources":["../../src/input-validation/state-entries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAQpD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAkD5C;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,GACZ,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA+B3C"}
@@ -0,0 +1,69 @@
1
+ import type { ValidationResult } from './result.js';
2
+ /**
3
+ * Validate a keyboard input fragment from stdin.
4
+ *
5
+ * This catches raw bytes from the terminal BEFORE they enter the input
6
+ * buffer. The allow-list is: known control sequences, printable ASCII,
7
+ * and common Unicode (which terminals emit as normal keystrokes).
8
+ *
9
+ * Rejects:
10
+ * - Raw escape sequences that don't match known patterns
11
+ * - Fragments containing C0 control chars other than tab/newline (0x09, 0x0a)
12
+ * - Fragments longer than MAX_PASTE_FRAGMENT_CHARS (likely a flood)
13
+ */
14
+ export declare function validateStdinFragment(data: Buffer | string): ValidationResult<string>;
15
+ /**
16
+ * Validate a fully-assembled paste payload AFTER the terminal markers
17
+ * have been stripped by paste-accumulator.ts.
18
+ *
19
+ * Rejects:
20
+ * - Paste > MAX_PASTE_CHARS
21
+ * - Paste containing C0 control chars (except \n, \t)
22
+ * - Paste that looks binary (>30% non-printable)
23
+ * - Paste with unbalanced surrogate pairs
24
+ */
25
+ export declare function validatePasteContent(content: string): ValidationResult<string>;
26
+ /**
27
+ * Validate a parsed mouse event from the SGR protocol.
28
+ *
29
+ * Rejects:
30
+ * - Unknown mouse event kinds
31
+ * - Unknown button values
32
+ * - Coordinates outside reasonable terminal bounds (0 < x < 5000, 0 < y < 5000)
33
+ * - Wheel values other than -1, 0, 1
34
+ */
35
+ export declare function validateMouseEvent(event: {
36
+ kind: string;
37
+ button: string;
38
+ x: number;
39
+ y: number;
40
+ wheel: number;
41
+ shift?: boolean;
42
+ meta?: boolean;
43
+ ctrl?: boolean;
44
+ motion?: boolean;
45
+ }): ValidationResult<{
46
+ kind: string;
47
+ button: string;
48
+ x: number;
49
+ y: number;
50
+ wheel: number;
51
+ shift: boolean;
52
+ meta: boolean;
53
+ ctrl: boolean;
54
+ motion: boolean;
55
+ }>;
56
+ /**
57
+ * Validate a KeyEvent from stdin against the known allow-list.
58
+ *
59
+ * Every boolean field in a KeyEvent must be exactly `true` or `false`.
60
+ * `fn` must be 1–12 when present. `wheelDeltaY` must be an integer.
61
+ *
62
+ * Rejects:
63
+ * - Unknown fields on the key event object
64
+ * - Non-boolean values for boolean fields
65
+ * - fn outside 1–12
66
+ * - wheelDeltaY that is not an integer
67
+ */
68
+ export declare function validateKeyEventFields(key: Record<string, unknown>): ValidationResult<Record<string, unknown>>;
69
+ //# sourceMappingURL=terminal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../src/input-validation/terminal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAQpD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAgDrF;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAkC9E;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,gBAAgB,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC,CAuDD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAwC3C"}
@@ -50,186 +50,17 @@
50
50
  * - Enum/union allow-lists are defined as `const` arrays and kept in
51
51
  * ONE place so the allowed set is auditable.
52
52
  */
53
- export interface ValidationOk<T> {
54
- valid: true;
55
- value: T;
56
- }
57
- export interface ValidationError {
58
- valid: false;
59
- error: string;
60
- }
61
- export type ValidationResult<T> = ValidationOk<T> | ValidationError;
62
- /** Maximum length of a single input line from stdin (before Enter). */
63
- export declare const MAX_INPUT_BUFFER_CHARS = 100000;
64
- /** Maximum size of a single paste operation (prevents OOM from 10MB paste). */
65
- export declare const MAX_PASTE_CHARS = 50000;
66
- /** Maximum length of a single history entry text payload. */
67
- export declare const MAX_ENTRY_TEXT_CHARS = 500000;
68
- /** Maximum entries in the history array (matches history-retention.ts). */
69
- export declare const MAX_HISTORY_ENTRIES = 400;
70
- /** Maximum actions in a fleetBatch dispatch (prevents render-thrashing). */
71
- export declare const MAX_BATCHED_ACTIONS = 500;
72
- /** Maximum length of a single action payload string field. */
73
- export declare const MAX_ACTION_STRING_FIELD = 10000;
74
- /** Maximum subagents tracked in fleet state. */
75
- export declare const MAX_FLEET_ENTRIES = 200;
76
- /** Maximum tools tracked per-subagent. */
77
- export declare const MAX_RECENT_TOOLS = 100;
78
- /** Maximum messages tracked per-subagent. */
79
- export declare const MAX_RECENT_MESSAGES = 50;
80
- /** Maximum depth of nested action payload objects. */
81
- export declare const MAX_ACTION_DEPTH = 8;
82
- /** Maximum characters in a paste fragment (single stdin chunk). */
83
- export declare const MAX_PASTE_FRAGMENT_CHARS = 100000;
84
- /** Maximum length for any host-provided string (model, provider, etc). */
85
- export declare const MAX_HOST_STRING_FIELD = 500;
86
- /** Maximum entries in a picker matches list. */
87
- export declare const MAX_PICKER_MATCHES = 500;
88
- /** Known reducer action types — exact, compile-time checked allow-list. */
89
- export declare const ALLOWED_ACTION_TYPES: readonly ["addEntry", "authBusy", "authCatalog", "authClose", "authConfirmEnd", "authConfirmStart", "authFilter", "authFlowDone", "authFlowLog", "authFlowStart", "authHint", "authMove", "authOpen", "authPromptChange", "authPromptEnd", "authPromptStart", "authProviders", "authView", "autonomyPickerClose", "autonomyPickerHint", "autonomyPickerMove", "autonomyPickerOpen", "brainBusy", "brainClose", "brainHint", "brainMove", "brainOpen", "brainPromptClear", "brainPromptSet", "brainRiskChange", "brainRowMove", "brainSetLog", "brainSettingsLoaded", "brainStatus", "brainView", "checkpointReceived", "clearConfirmClose", "clearConfirmOpen", "clearConfirmSetValue", "clearHistory", "clearInput", "clearInputHistory", "closeAllPanels", "collabBugFound", "collabEvalComplete", "collabPlanEmitted", "collabSessionDone", "collabSubagentSpawned", "compactHistory", "confirmClearAll", "confirmClose", "confirmOpen", "continueConfirmClose", "continueConfirmOpen", "coordinatorEvent", "countdownEnded", "countdownTick", "debugStreamStats", "debugStreamStatsClear", "dequeueFirst", "designPickerClose", "designPickerMove", "designPickerOpen", "designPickerStack", "enhanceBusy", "enhanceClose", "enhanceOpen", "enhanceSet", "enqueue", "escConfirmClose", "escConfirmOpen", "eternalStage", "exitConfirmClose", "exitConfirmOpen", "fKeyPickerClose", "fKeyPickerMove", "fKeyPickerOpen", "fleetBatch", "fleetBudgetExtended", "fleetBudgetWarning", "fleetConcurrency", "fleetCost", "fleetCtxPct", "fleetDelta", "fleetDone", "fleetMessage", "fleetRemove", "fleetSeed", "fleetSpawn", "fleetStart", "fleetTool", "fleetToolEnd", "fleetToolStart", "fleetUsage", "goalRunElapsed", "goalRunInit", "goalRunMonitorToggle", "goalRunPhaseUpdate", "goalRunReset", "goalRunRunningPhases", "goalRunTaskActive", "goalSummary", "helpClose", "helpFilter", "helpHint", "helpMove", "helpOpen", "hint", "historyDown", "historyPush", "historyUp", "interrupt", "leaderCtxPct", "leaderIterEnd", "leaderIterStart", "leaderToolEnd", "leaderToolStart", "mcpPickerBusy", "mcpPickerClose", "mcpPickerHint", "mcpPickerMove", "mcpPickerOpen", "mcpPickerSetItems", "modePickerClose", "modePickerHint", "modePickerMove", "modePickerOpen", "modelPickerBack", "modelPickerClose", "modelPickerHint", "modelPickerMove", "modelPickerOpen", "modelPickerPickProvider", "modelPickerSearch", "pickerClose", "pickerMove", "pickerOpen", "pickerSetMatches", "pluginPickerBusy", "pluginPickerClose", "pluginPickerHint", "pluginPickerMove", "pluginPickerOpen", "pluginPickerSetItems", "projectPickerClose", "projectPickerFilter", "projectPickerHint", "projectPickerMove", "projectPickerOpen", "promptPickerCategory", "promptPickerClose", "promptPickerMove", "promptPickerOpen", "queueClear", "queueDelete", "queueToggleRefine", "refineFailureClose", "refineFailureOpen", "replaceHistory", "resetContextChip", "resetInterrupts", "resumePickerBusy", "resumePickerClose", "resumePickerError", "resumePickerHint", "resumePickerMove", "resumePickerOpen", "rewindOverlayClose", "rewindOverlayMove", "rewindOverlayOpen", "sddBoardSnapshot", "sddBoardFocusNext", "sddBoardFocusPrev", "sendModePickerClose", "sendModePickerMove", "sendModePickerOpen", "sessionResumeConfirmClear", "sessionResumeConfirmSet", "sessionRewound", "sessionsPanelBusy", "sessionsPanelMove", "sessionsPanelSet", "setBuffer", "setFleetChat", "setHistoryScrolled", "setInputHistory", "setViewportRows", "settingsClose", "settingsFieldMove", "settingsFieldSet", "settingsFilterSet", "settingsHint", "settingsOpen", "settingsThinkingEditCancel", "settingsThinkingEditChange", "settingsThinkingEditCommit", "settingsThinkingEditStart", "settingsValueChange", "settingsValueSet", "shadowClose", "shadowHint", "shadowOpen", "shadowUpdate", "shellCommandWarningClose", "shellCommandWarningOpen", "slashConfirmClose", "slashConfirmOpen", "slashPickerClose", "slashPickerMove", "slashPickerOpen", "status", "statuslineChipExpire", "statuslineChipShow", "statuslineClose", "statuslineFieldMove", "statuslineFieldSet", "statuslineHint", "statuslineOpen", "statuslineToggle", "statuslineVisibleChipsSync", "steerConsume", "steerStart", "streamDelta", "streamReset", "toggleAgentsMonitor", "toggleAuditPanel", "toggleContextPanel", "toggleCoordinatorMonitor", "toggleCronMonitor", "toggleGoalKanbanPanel", "toggleGoalPanel", "toggleHelp", "toggleKanbanPanel", "toggleMonitor", "togglePlanPanel", "toggleProcessList", "toggleQueuePanel", "toggleSddBoardMonitor", "toggleSessionsPanel", "toggleTodosMonitor", "toggleWorktreeMonitor", "toolEnded", "toolStarted", "toolStreamAppend", "toolStreamClear", "toolsPickerBusy", "toolsPickerClose", "toolsPickerFilter", "toolsPickerHint", "toolsPickerMove", "toolsPickerOpen", "toolsPickerSetItems", "toolsPickerToggle", "worktreeRemove", "worktreeUpsert"];
90
- export type AllowedActionType = (typeof ALLOWED_ACTION_TYPES)[number];
91
- /** History entry kinds that carry text (must be non-empty to be stored). */
92
- export declare const TEXT_BEARING_ENTRY_KINDS: Set<string>;
93
- /** All valid history entry kinds. */
94
- export declare const ALLOWED_ENTRY_KINDS: Set<string>;
95
- /** Fleet subagent status values. */
96
- export declare const ALLOWED_FLEET_STATUSES: Set<string>;
97
- /** Mouse event kinds */
98
- export declare const ALLOWED_MOUSE_KINDS: Set<string>;
99
- /** Mouse buttons */
100
- export declare const ALLOWED_MOUSE_BUTTONS: Set<string>;
101
- /** Keyboard modifier keys. */
102
- export declare const ALLOWED_KEY_EVENT_FIELDS: Set<string>;
103
- /** Scroll direction for scrollPage. */
104
- export declare const ALLOWED_SCROLL_DIRS: Set<string>;
105
- /** Autonomy mode values. */
106
- export declare const ALLOWED_AUTONOMY_MODES: Set<string>;
107
- /** Known send modes. */
108
- export declare const ALLOWED_SEND_MODES: Set<string>;
109
- /** FleetChat verbosity modes. */
110
- export declare const ALLOWED_FLEET_CHAT_MODES: Set<string>;
111
- /** SDD lifecycle ops. */
112
- export declare const ALLOWED_SDD_OPS: Set<string>;
113
- /** Project picker item kinds. */
114
- export declare const ALLOWED_PICKER_KINDS: Set<string>;
115
- /** Collaboration verdicts. */
116
- export declare const ALLOWED_COLLAB_VERDICTS: Set<string>;
117
- /** Known terminal capability keys. */
118
- export declare const ALLOWED_CAPABILITY_FIELDS: Set<string>;
119
- /**
120
- * Validate a keyboard input fragment from stdin.
121
- *
122
- * This catches raw bytes from the terminal BEFORE they enter the input
123
- * buffer. The allow-list is: known control sequences, printable ASCII,
124
- * and common Unicode (which terminals emit as normal keystrokes).
125
- *
126
- * Rejects:
127
- * - Raw escape sequences that don't match known patterns
128
- * - Fragments containing C0 control chars other than tab/newline (0x09, 0x0a)
129
- * - Fragments longer than MAX_PASTE_FRAGMENT_CHARS (likely a flood)
130
- */
131
- export declare function validateStdinFragment(data: Buffer | string): ValidationResult<string>;
132
- /**
133
- * Validate a fully-assembled paste payload AFTER the terminal markers
134
- * have been stripped by paste-accumulator.ts.
135
- *
136
- * Rejects:
137
- * - Paste > MAX_PASTE_CHARS
138
- * - Paste containing C0 control chars (except \n, \t)
139
- * - Paste that looks binary (>30% non-printable)
140
- * - Paste with unbalanced surrogate pairs
141
- */
142
- export declare function validatePasteContent(content: string): ValidationResult<string>;
143
- /**
144
- * Validate a parsed mouse event from the SGR protocol.
145
- *
146
- * Rejects:
147
- * - Unknown mouse event kinds
148
- * - Unknown button values
149
- * - Coordinates outside reasonable terminal bounds (0 < x < 5000, 0 < y < 5000)
150
- * - Wheel values other than -1, 0, 1
151
- */
152
- export declare function validateMouseEvent(event: {
153
- kind: string;
154
- button: string;
155
- x: number;
156
- y: number;
157
- wheel: number;
158
- shift?: boolean;
159
- meta?: boolean;
160
- ctrl?: boolean;
161
- motion?: boolean;
162
- }): ValidationResult<{
163
- kind: string;
164
- button: string;
165
- x: number;
166
- y: number;
167
- wheel: number;
168
- shift: boolean;
169
- meta: boolean;
170
- ctrl: boolean;
171
- motion: boolean;
172
- }>;
173
- /**
174
- * Validate a KeyEvent from stdin against the known allow-list.
175
- *
176
- * Every boolean field in a KeyEvent must be exactly `true` or `false`.
177
- * `fn` must be 1–12 when present. `wheelDeltaY` must be an integer.
178
- *
179
- * Rejects:
180
- * - Unknown fields on the key event object
181
- * - Non-boolean values for boolean fields
182
- * - fn outside 1–12
183
- * - wheelDeltaY that is not an integer
184
- */
185
- export declare function validateKeyEventFields(key: Record<string, unknown>): ValidationResult<Record<string, unknown>>;
186
- /**
187
- * Validate a reducer Action before dispatch.
188
- *
189
- * This is the central gate for all state mutations. EVERY dispatch from
190
- * external sources (keyboard, host callbacks, fleet events, restore data)
191
- * should run through this before reaching the reducer.
192
- *
193
- * Rejects:
194
- * - Unknown action types
195
- * - Malformed payload types
196
- * - Oversized strings/arrays
197
- * - Out-of-range numeric values
198
- * - Deeply nested payloads (prototype poison / DoS)
199
- */
53
+ import type { ValidationResult } from './input-validation/result.js';
54
+ export { ALLOWED_ACTION_TYPES, type AllowedActionType, } from './input-validation/action-types.js';
55
+ export { ALLOWED_AUTONOMY_MODES, ALLOWED_CAPABILITY_FIELDS, ALLOWED_COLLAB_VERDICTS, ALLOWED_ENTRY_KINDS, ALLOWED_FLEET_CHAT_MODES, ALLOWED_FLEET_STATUSES, ALLOWED_KEY_EVENT_FIELDS, ALLOWED_MOUSE_BUTTONS, ALLOWED_MOUSE_KINDS, ALLOWED_PICKER_KINDS, ALLOWED_SCROLL_DIRS, ALLOWED_SDD_OPS, ALLOWED_SEND_MODES, TEXT_BEARING_ENTRY_KINDS, } from './input-validation/allow-lists.js';
56
+ export { MAX_ACTION_DEPTH, MAX_ACTION_STRING_FIELD, MAX_BATCHED_ACTIONS, MAX_ENTRY_TEXT_CHARS, MAX_FLEET_ENTRIES, MAX_HISTORY_ENTRIES, MAX_HOST_STRING_FIELD, MAX_INPUT_BUFFER_CHARS, MAX_PASTE_CHARS, MAX_PASTE_FRAGMENT_CHARS, MAX_PICKER_MATCHES, MAX_RECENT_MESSAGES, MAX_RECENT_TOOLS, } from './input-validation/limits.js';
57
+ export type { ValidationError, ValidationOk, ValidationResult, } from './input-validation/result.js';
58
+ export { validateKeyEventFields, validateMouseEvent, validatePasteContent, validateStdinFragment, } from './input-validation/terminal.js';
59
+ export { validateFleetEntry, validateRestoreEntry } from './input-validation/state-entries.js';
200
60
  export declare function validateAction(action: {
201
61
  type: string;
202
62
  [key: string]: unknown;
203
63
  }): ValidationResult<Record<string, unknown>>;
204
- /**
205
- * Validate a fleet subagent entry from telemetry.
206
- *
207
- * Rejects:
208
- * - Unknown status
209
- * - Oversized streamingText
210
- * - Malformed recent tools/messages arrays
211
- * - Non-finite cost
212
- */
213
- export declare function validateFleetEntry(entry: {
214
- id: string;
215
- name: string;
216
- status: string;
217
- streamingText?: string;
218
- iterations?: number;
219
- toolCalls?: number;
220
- recentTools?: unknown[];
221
- recentMessages?: unknown[];
222
- cost?: number;
223
- }): ValidationResult<Record<string, unknown>>;
224
- /**
225
- * Validate a restored session entry (from JSONL).
226
- *
227
- * Rejects:
228
- * - Non-object entries
229
- * - Unknown entry kinds
230
- * - Oversized payloads
231
- */
232
- export declare function validateRestoreEntry(entry: unknown, index: number): ValidationResult<Record<string, unknown>>;
233
64
  /**
234
65
  * Validate that an action dispatch is safe for the reducer.
235
66
  * This is a convenience wrapper used at the dispatch boundary.
@@ -1 +1 @@
1
- {"version":3,"file":"input-validation.d.ts","sourceRoot":"","sources":["../src/input-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G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AK,EAAE,MAAM,GACZ,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA+B3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAM1B;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE;IACN,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,EACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAClD,OAAO,CAgBT;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAE9D"}
1
+ {"version":3,"file":"input-validation.d.ts","sourceRoot":"","sources":["../src/input-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AA0BH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EACL,oBAAoB,EACpB,KAAK,iBAAiB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,eAAe,EACf,YAAY,EACZ,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAI/F,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA4uB5C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAM1B;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE;IACN,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,EACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAClD,OAAO,CAgBT;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAE9D"}
@@ -50,7 +50,7 @@ export interface LayoutSnapshot {
50
50
  entries: Record<number, EntryLayout>;
51
51
  }
52
52
  /** Current layout computation version. Bump when the algorithm changes. */
53
- export declare const LAYOUT_VERSION = 1;
53
+ export declare const LAYOUT_VERSION = 2;
54
54
  /** Default fallback row count for entries without computed layout. */
55
55
  export declare const FALLBACK_ROWS = 3;
56
56
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"layout-engine.d.ts","sourceRoot":"","sources":["../src/layout-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,WAAW,WAAW;IAC1B,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,cAAc,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,IAAI,EAAE,WAAW,GAAG,UAAU,CAAC;IAC/B,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CACtC;AAID,2EAA2E;AAC3E,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC,sEAAsE;AACtE,eAAO,MAAM,aAAa,IAAI,CAAC;AAa/B;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,SAAoB,GAAG,MAAM,CAc5F;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIjD;AAID;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE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,EAAE,MAAM,EAAE,SAAS,SAAwB,GAAG,IAAI,CAsBpF;IAED;;OAEG;IACH,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAYlC;IAED,6CAA6C;IAC7C,KAAK,IAAI,IAAI,CAIZ;IAID;;;;;;;OAOG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAyC5B;IAED;;;OAGG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CA4B9B;IAID,0CAA0C;IAC1C,OAAO,CAAC,aAAa;IASrB,gCAAgC;IAChC,OAAO,CAAC,WAAW;CAMpB"}
@@ -0,0 +1,19 @@
1
+ import type { MailboxAgentStatus, MailboxMessage, MailboxProjectServerStatus } from '@wrongstack/core/coordination';
2
+ export interface TuiMailboxSnapshot {
3
+ actorId?: string | undefined;
4
+ messages: MailboxMessage[];
5
+ agents: MailboxAgentStatus[];
6
+ unread: number;
7
+ clients: {
8
+ tui: number;
9
+ webui: number;
10
+ repl: number;
11
+ };
12
+ service: ({
13
+ state: 'online';
14
+ } & Pick<MailboxProjectServerStatus, 'storageKind' | 'pid' | 'clients' | 'pendingRequests' | 'protocolVersion'>) | {
15
+ state: 'offline';
16
+ error?: string | undefined;
17
+ };
18
+ }
19
+ //# sourceMappingURL=mailbox-view-model-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mailbox-view-model-types.d.ts","sourceRoot":"","sources":["../src/mailbox-view-model-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,0BAA0B,EAC3B,MAAM,+BAA+B,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE;QAAE,GAA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U,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC9C,WAAW,EAAE,uBAAuB,EAAE,CAAC;CACxC;AAED,wBAAgB,yBAAyB,IAAI,yBAAyB,CAErE;AAYD;;;GAGG;AACH,eAAO,MAAM,4BAA4B,MAAM,CAAC;AA6BhD,kFAAkF;AAClF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,yBAAyB,GAAG,MAAM,CAEjF;AAED,uFAAuF;AACvF,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAG7F;AAED,iGAAiG;AACjG,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA+BvF;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,yBAAyB,EAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,yBAAyB,CAwD3B;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,yBAAyB,EAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,yBAAyB,CAqD3B"}
@@ -0,0 +1,10 @@
1
+ import type { MemoryPriority, MemoryScope, MemoryType } from '@wrongstack/core/types';
2
+ export declare const SCOPE_LABEL: Record<MemoryScope, string>;
3
+ export declare const TYPE_EMOJI: Record<MemoryType, string>;
4
+ export declare const PRIORITY_EMOJI: Record<MemoryPriority, string>;
5
+ export declare const KIND_EMOJI: Record<string, string>;
6
+ export declare function parseDate(ts: string): Date | null;
7
+ export declare function daysAgo(ts: string): number | null;
8
+ export declare function fmtDate(ts: string): string;
9
+ export declare function recencyLabel(days: number | null): string;
10
+ //# sourceMappingURL=memory-slash-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-slash-format.d.ts","sourceRoot":"","sources":["../src/memory-slash-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEtF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAInD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAOjD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAKzD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAa7C,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAIjD;AAED,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIjD;AAED,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAI1C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAOxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"memory-slash.d.ts","sourceRoot":"","sources":["../src/memory-slash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,UAAU,EAAe,MAAM,wBAAwB,CAAC;AAInF,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,UAAU,CAAC;CACzB;AA2yBD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,eAAe;IAE1D,IAAI;IACJ,WAAW;IACX,QAAQ;IACR,QAAQ,EAAE,SAAS;IACnB,IAAI;IAeE,GAAG,OAAO,MAAM;iBApIJ,MAAM;;EAgU3B"}
1
+ {"version":3,"file":"memory-slash.d.ts","sourceRoot":"","sources":["../src/memory-slash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,UAAU,EAAe,MAAM,wBAAwB,CAAC;AAanF,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,UAAU,CAAC;CACzB;AAyvBD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,eAAe;IAE1D,IAAI;IACJ,WAAW;IACX,QAAQ;IACR,QAAQ,EAAE,SAAS;IACnB,IAAI;IAiBE,GAAG,OAAO,MAAM;iBAtIJ,MAAM;;EAwgB3B"}
package/dist/mouse.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * SGR mouse protocol (xterm DEC private modes). These are INDEPENDENT of the
3
- * alternate screen buffer (?1049h): we enable tracking while staying in the
4
- * normal buffer. Chat history itself lives in a bounded managed viewport.
2
+ * SGR mouse protocol (xterm DEC private modes). Mouse tracking and alternate
3
+ * screen mode (?1049h) are independent terminal capabilities; the full-screen
4
+ * TUI enables both and tears both down explicitly.
5
5
  *
6
6
  * ?1000h — button press/release tracking (clicks + wheel)
7
7
  * ?1002h — button-event tracking: adds drag (motion while a button is held)
@@ -12,7 +12,8 @@
12
12
  * Trade-off: with ANY of these on, the terminal reports the wheel to us as
13
13
  * buttons 64/65 instead of scrolling its own scrollback. Shift+wheel (and
14
14
  * users keep access to terminal scrollback — but plain wheel events are owned
15
- * by the app while tracking is active. Keep tracking opt-in / overlay-scoped.
15
+ * by the app while tracking is active. Managed history therefore keeps cheap
16
+ * click/wheel tracking active; full pointer/drag behavior remains opt-in.
16
17
  */
17
18
  /** Click + wheel only (mode 1000). Cheapest; no motion events. */
18
19
  export declare const MOUSE_CLICK_ON: string;
@@ -31,6 +32,12 @@ export interface MouseTrackingPolicy {
31
32
  fullMode: boolean;
32
33
  /** A picker that benefits from temporary click/wheel ownership is visible. */
33
34
  overlayOpen: boolean;
35
+ /**
36
+ * The chat transcript is rendered in a bounded, application-managed
37
+ * viewport. Its wheel must be reported to the app because native terminal
38
+ * scrollback cannot move virtualized content.
39
+ */
40
+ managedHistory: boolean;
34
41
  /** Startup terminal capability probe. Undefined keeps legacy callers enabled. */
35
42
  protocol?: 'none' | 'x10' | 'urxvt' | 'sgr' | undefined;
36
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mouse.d.ts","sourceRoot":"","sources":["../src/mouse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,kEAAkE;AAClE,eAAO,MAAM,cAAc,QAA+B,CAAC;AAC3D,uEAAuE;AACvE,eAAO,MAAM,aAAa,QAA4C,CAAC;AACvE,gFAAgF;AAChF,eAAO,MAAM,cAAc,QAA4C,CAAC;AACxE;;;;GAIG;AACH,eAAO,MAAM,SAAS,QAAyD,CAAC;AAEhF,MAAM,WAAW,mBAAmB;IAClC,4EAA4E;IAC5E,QAAQ,EAAE,OAAO,CAAC;IAClB,8EAA8E;IAC9E,WAAW,EAAE,OAAO,CAAC;IACrB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;CACzD;AAED,0EAA0E;AAC1E,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAM9E;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAkB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,cAAc,QAAkB,CAAC;AAE9C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AACpE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,6EAA6E;IAC7E,CAAC,EAAE,MAAM,CAAC;IACV,6DAA6D;IAC7D,CAAC,EAAE,MAAM,CAAC;IACV,mF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AG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AACpE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,6EAA6E;IAC7E,CAAC,EAAE,MAAM,CAAC;IACV,6DAA6D;IAC7D,CAAC,EAAE,MAAM,CAAC;IACV,mFAAmF;IACnF,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,yBAAyB;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,gEAAgE;IAChE,MAAM,EAAE,OAAO,CAAC;CACjB;AA8CD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CASnE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,CAa/D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEzD"}
@@ -5,7 +5,7 @@ import type { PluginPickerItem } from './components/plugin-picker.js';
5
5
  * `Action` type union but kept as a string allow-list here so an unrecognised
6
6
  * action can return `false` (text fallback) without crashing.
7
7
  */
8
- export type PanelAction = 'pluginPickerOpen' | 'mcpPickerOpen' | 'toolsPickerOpen' | 'brainOpen' | 'helpOpen' | 'shadowOpen' | 'projectPickerOpen' | 'statuslineOpen' | 'authOpen' | 'authOauthOpen' | 'modePickerOpen' | 'toggleMonitor' | 'toggleAuditPanel' | 'toggleAgentsMonitor' | 'toggleWorktreeMonitor' | 'togglePlanPanel' | 'toggleKanbanPanel' | 'toggleTodosMonitor' | 'toggleQueuePanel' | 'toggleProcessList' | 'toggleCronMonitor' | 'toggleContextPanel' | 'toggleGoalPanel' | 'toggleGoalKanbanPanel' | 'toggleSessionsPanel' | 'toggleCoordinatorMonitor' | (string & {});
8
+ export type PanelAction = 'pluginPickerOpen' | 'mcpPickerOpen' | 'toolsPickerOpen' | 'brainOpen' | 'helpOpen' | 'shadowOpen' | 'projectPickerOpen' | 'statuslineOpen' | 'authOpen' | 'authOauthOpen' | 'modePickerOpen' | 'toggleMonitor' | 'toggleAuditPanel' | 'toggleAgentsMonitor' | 'toggleWorktreeMonitor' | 'togglePlanPanel' | 'toggleKanbanPanel' | 'toggleTodosMonitor' | 'toggleQueuePanel' | 'toggleProcessList' | 'toggleCronMonitor' | 'toggleContextPanel' | 'toggleConnectionsPanel' | 'toggleGoalPanel' | 'toggleGoalKanbanPanel' | 'toggleSessionsPanel' | 'toggleCoordinatorMonitor' | (string & {});
9
9
  export interface PanelOpenDeps {
10
10
  /**
11
11
  * Reducer dispatcher. For an action that has typed reducer cases the
@@ -1 +1 @@
1
- {"version":3,"file":"on-panel-open.d.ts","sourceRoot":"","sources":["../src/on-panel-open.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,WAAW,GACnB,kBAAkB,GAClB,eAAe,GACf,iBAAiB,GACjB,WAAW,GACX,UAAU,GACV,YAAY,GACZ,mBAAmB,GACnB,gBAAgB,GAChB,UAAU,GACV,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,qBAAqB,GACrB,uBAAuB,GACvB,iBAAiB,GACjB,mBAAmB,GACnB,oBAAoB,GACpB,kBAAkB,GAClB,mBAAmB,GACnB,mBAAmB,GACnB,oBAAoB,GACpB,iBAAiB,GACjB,uBAAuB,GACvB,qBAAqB,GACrB,0BAA0B,GAC1B,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,MAAM,WAAW,aAAa;IAC5B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