aicodeman 1.41.0 → 1.41.1

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 (287) hide show
  1. package/README.md +58 -8
  2. package/dist/attachment-registry.d.ts +2 -0
  3. package/dist/attachment-registry.d.ts.map +1 -1
  4. package/dist/attachment-registry.js +14 -3
  5. package/dist/attachment-registry.js.map +1 -1
  6. package/dist/cli-agent.d.ts +2 -0
  7. package/dist/cli-agent.d.ts.map +1 -1
  8. package/dist/cli-agent.js +12 -8
  9. package/dist/cli-agent.js.map +1 -1
  10. package/dist/cli.d.ts +25 -1
  11. package/dist/cli.d.ts.map +1 -1
  12. package/dist/cli.js +97 -11
  13. package/dist/cli.js.map +1 -1
  14. package/dist/config/buffer-limits.d.ts +9 -0
  15. package/dist/config/buffer-limits.d.ts.map +1 -1
  16. package/dist/config/buffer-limits.js +9 -0
  17. package/dist/config/buffer-limits.js.map +1 -1
  18. package/dist/config/cli-registry/schema.d.ts +8 -0
  19. package/dist/config/cli-registry/schema.d.ts.map +1 -1
  20. package/dist/config/cli-registry/schema.js +12 -0
  21. package/dist/config/cli-registry/schema.js.map +1 -1
  22. package/dist/config/cli-registry/stock.d.ts.map +1 -1
  23. package/dist/config/cli-registry/stock.js +42 -0
  24. package/dist/config/cli-registry/stock.js.map +1 -1
  25. package/dist/config/cli-registry/types.d.ts +35 -0
  26. package/dist/config/cli-registry/types.d.ts.map +1 -1
  27. package/dist/folder-listing.d.ts +94 -0
  28. package/dist/folder-listing.d.ts.map +1 -0
  29. package/dist/folder-listing.js +241 -0
  30. package/dist/folder-listing.js.map +1 -0
  31. package/dist/hooks-config.d.ts +36 -16
  32. package/dist/hooks-config.d.ts.map +1 -1
  33. package/dist/hooks-config.js +45 -20
  34. package/dist/hooks-config.js.map +1 -1
  35. package/dist/html-view-capabilities.d.ts +54 -0
  36. package/dist/html-view-capabilities.d.ts.map +1 -0
  37. package/dist/html-view-capabilities.js +103 -0
  38. package/dist/html-view-capabilities.js.map +1 -0
  39. package/dist/mcp-server.d.ts +114 -0
  40. package/dist/mcp-server.d.ts.map +1 -0
  41. package/dist/mcp-server.js +917 -0
  42. package/dist/mcp-server.js.map +1 -0
  43. package/dist/mcp-sync.d.ts +5 -0
  44. package/dist/mcp-sync.d.ts.map +1 -1
  45. package/dist/mcp-sync.js +51 -5
  46. package/dist/mcp-sync.js.map +1 -1
  47. package/dist/mux-interface.d.ts +36 -1
  48. package/dist/mux-interface.d.ts.map +1 -1
  49. package/dist/remote-files.d.ts +37 -0
  50. package/dist/remote-files.d.ts.map +1 -1
  51. package/dist/remote-files.js +103 -0
  52. package/dist/remote-files.js.map +1 -1
  53. package/dist/remote-pane-history.d.ts +103 -0
  54. package/dist/remote-pane-history.d.ts.map +1 -0
  55. package/dist/remote-pane-history.js +258 -0
  56. package/dist/remote-pane-history.js.map +1 -0
  57. package/dist/remote-ssh-limiter.d.ts +16 -3
  58. package/dist/remote-ssh-limiter.d.ts.map +1 -1
  59. package/dist/remote-ssh-limiter.js +37 -6
  60. package/dist/remote-ssh-limiter.js.map +1 -1
  61. package/dist/session.d.ts +29 -1
  62. package/dist/session.d.ts.map +1 -1
  63. package/dist/session.js +53 -0
  64. package/dist/session.js.map +1 -1
  65. package/dist/tab-layout-legacy-order.d.ts.map +1 -1
  66. package/dist/tab-layout-legacy-order.js +72 -13
  67. package/dist/tab-layout-legacy-order.js.map +1 -1
  68. package/dist/tab-layout-service.d.ts +33 -2
  69. package/dist/tab-layout-service.d.ts.map +1 -1
  70. package/dist/tab-layout-service.js +102 -7
  71. package/dist/tab-layout-service.js.map +1 -1
  72. package/dist/tab-layout.d.ts +9 -0
  73. package/dist/tab-layout.d.ts.map +1 -1
  74. package/dist/tab-layout.js +15 -2
  75. package/dist/tab-layout.js.map +1 -1
  76. package/dist/tmux-manager.d.ts +71 -2
  77. package/dist/tmux-manager.d.ts.map +1 -1
  78. package/dist/tmux-manager.js +169 -18
  79. package/dist/tmux-manager.js.map +1 -1
  80. package/dist/types/session.d.ts +53 -0
  81. package/dist/types/session.d.ts.map +1 -1
  82. package/dist/types/session.js.map +1 -1
  83. package/dist/usage-telemetry.d.ts +44 -7
  84. package/dist/usage-telemetry.d.ts.map +1 -1
  85. package/dist/usage-telemetry.js +72 -7
  86. package/dist/usage-telemetry.js.map +1 -1
  87. package/dist/web/approval-inbox.d.ts +12 -0
  88. package/dist/web/approval-inbox.d.ts.map +1 -1
  89. package/dist/web/approval-inbox.js +1 -0
  90. package/dist/web/approval-inbox.js.map +1 -1
  91. package/dist/web/middleware/auth.d.ts.map +1 -1
  92. package/dist/web/middleware/auth.js +33 -0
  93. package/dist/web/middleware/auth.js.map +1 -1
  94. package/dist/web/ports/session-port.d.ts +8 -1
  95. package/dist/web/ports/session-port.d.ts.map +1 -1
  96. package/dist/web/public/admin-ui.js.gz +0 -0
  97. package/dist/web/public/api-client.c9b1cddc.js.gz +0 -0
  98. package/dist/web/public/app.24689381.js +43 -0
  99. package/dist/web/public/app.24689381.js.br +0 -0
  100. package/dist/web/public/app.24689381.js.gz +0 -0
  101. package/dist/web/public/approvals-ui.js +4 -0
  102. package/dist/web/public/approvals-ui.js.br +0 -0
  103. package/dist/web/public/approvals-ui.js.gz +0 -0
  104. package/dist/web/public/{constants.bc9c1f63.js → constants.17d77b65.js} +395 -7
  105. package/dist/web/public/constants.17d77b65.js.br +0 -0
  106. package/dist/web/public/constants.17d77b65.js.gz +0 -0
  107. package/dist/web/public/cron-ui.js.gz +0 -0
  108. package/dist/web/public/entrance-animations.js.gz +0 -0
  109. package/dist/web/public/gesture/gesture-codeman.js +112 -6
  110. package/dist/web/public/git-status-ui.js.gz +0 -0
  111. package/dist/web/public/home-sessions.js.gz +0 -0
  112. package/dist/web/public/host-wake-ui.js.gz +0 -0
  113. package/dist/web/public/i18n.9afd8e4d.js +2 -0
  114. package/dist/web/public/i18n.9afd8e4d.js.br +0 -0
  115. package/dist/web/public/i18n.9afd8e4d.js.gz +0 -0
  116. package/dist/web/public/{image-input.e00471c6.js → image-input.9ed1d0d2.js} +186 -16
  117. package/dist/web/public/image-input.9ed1d0d2.js.br +0 -0
  118. package/dist/web/public/image-input.9ed1d0d2.js.gz +0 -0
  119. package/dist/web/public/index.html +105 -23
  120. package/dist/web/public/index.html.br +0 -0
  121. package/dist/web/public/index.html.gz +0 -0
  122. package/dist/web/public/input-cjk.8bc46081.js.gz +0 -0
  123. package/dist/web/public/{keyboard-accessory.c1e7c7b7.js → keyboard-accessory.c458eea8.js} +115 -35
  124. package/dist/web/public/keyboard-accessory.c458eea8.js.br +0 -0
  125. package/dist/web/public/keyboard-accessory.c458eea8.js.gz +0 -0
  126. package/dist/web/public/mobile-handlers.0ef9c311.js.gz +0 -0
  127. package/dist/web/public/mobile-ime-preview.2dbaf262.js.gz +0 -0
  128. package/dist/web/public/mobile-overview.js +11 -2
  129. package/dist/web/public/mobile-overview.js.br +0 -0
  130. package/dist/web/public/mobile-overview.js.gz +0 -0
  131. package/dist/web/public/mobile.2dff1580.css +1 -0
  132. package/dist/web/public/mobile.2dff1580.css.br +0 -0
  133. package/dist/web/public/mobile.2dff1580.css.gz +0 -0
  134. package/dist/web/public/notification-manager.feb82c04.js.gz +0 -0
  135. package/dist/web/public/orchestrator-panel.js.gz +0 -0
  136. package/dist/web/public/{panels-ui.71846fcb.js → panels-ui.73ec0137.js} +87 -87
  137. package/dist/web/public/panels-ui.73ec0137.js.br +0 -0
  138. package/dist/web/public/panels-ui.73ec0137.js.gz +0 -0
  139. package/dist/web/public/ralph-panel.b350e2ef.js.gz +0 -0
  140. package/dist/web/public/ralph-wizard.b6c0dd19.js.gz +0 -0
  141. package/dist/web/public/readmymind-ui.js.gz +0 -0
  142. package/dist/web/public/reboot-restore-ui.js.gz +0 -0
  143. package/dist/web/public/respawn-ui.ff0dae4c.js.gz +0 -0
  144. package/dist/web/public/sanitize-html.e7147e76.js.gz +0 -0
  145. package/dist/web/public/session-lineage.js.gz +0 -0
  146. package/dist/web/public/{session-ui.f731602c.js → session-ui.dbc6819b.js} +33 -33
  147. package/dist/web/public/session-ui.dbc6819b.js.br +0 -0
  148. package/dist/web/public/session-ui.dbc6819b.js.gz +0 -0
  149. package/dist/web/public/{settings-ui.4e33390f.js → settings-ui.81ac264e.js} +9 -9
  150. package/dist/web/public/settings-ui.81ac264e.js.br +0 -0
  151. package/dist/web/public/settings-ui.81ac264e.js.gz +0 -0
  152. package/dist/web/public/spreadsheet-preview-worker.js +11 -0
  153. package/dist/web/public/spreadsheet-preview-worker.js.br +0 -0
  154. package/dist/web/public/spreadsheet-preview-worker.js.gz +0 -0
  155. package/dist/web/public/{spreadsheet-preview.af82fa2f.js → spreadsheet-preview.75c751de.js} +1 -1
  156. package/dist/web/public/spreadsheet-preview.75c751de.js.br +0 -0
  157. package/dist/web/public/spreadsheet-preview.75c751de.js.gz +0 -0
  158. package/dist/web/public/spreadsheet-xlsx-core.js +110 -0
  159. package/dist/web/public/spreadsheet-xlsx-core.js.br +0 -0
  160. package/dist/web/public/spreadsheet-xlsx-core.js.gz +0 -0
  161. package/dist/web/public/styles.900a28e4.css +1 -0
  162. package/dist/web/public/styles.900a28e4.css.br +0 -0
  163. package/dist/web/public/styles.900a28e4.css.gz +0 -0
  164. package/dist/web/public/subagent-windows.07277a58.js.gz +0 -0
  165. package/dist/web/public/sw.js +6 -2
  166. package/dist/web/public/sw.js.br +0 -0
  167. package/dist/web/public/sw.js.gz +0 -0
  168. package/dist/web/public/tab-layout-browser.2d6189f7.js +1 -0
  169. package/dist/web/public/tab-layout-browser.2d6189f7.js.br +0 -0
  170. package/dist/web/public/tab-layout-browser.2d6189f7.js.gz +0 -0
  171. package/dist/web/public/{tab-rail-resize.a5867793.js → tab-rail-resize.7157e0bd.js} +1 -1
  172. package/dist/web/public/tab-rail-resize.7157e0bd.js.br +0 -0
  173. package/dist/web/public/tab-rail-resize.7157e0bd.js.gz +0 -0
  174. package/dist/web/public/terminal-keycode229-recovery.af09f99a.js.gz +0 -0
  175. package/dist/web/public/terminal-split.js.gz +0 -0
  176. package/dist/web/public/terminal-tile.js +44 -24
  177. package/dist/web/public/terminal-tile.js.br +0 -0
  178. package/dist/web/public/terminal-tile.js.gz +0 -0
  179. package/dist/web/public/terminal-ui.858f5da5.js +2 -0
  180. package/dist/web/public/terminal-ui.858f5da5.js.br +0 -0
  181. package/dist/web/public/terminal-ui.858f5da5.js.gz +0 -0
  182. package/dist/web/public/tile-grid.js +439 -18
  183. package/dist/web/public/tile-grid.js.br +0 -0
  184. package/dist/web/public/tile-grid.js.gz +0 -0
  185. package/dist/web/public/ultracode-panel.js.gz +0 -0
  186. package/dist/web/public/ultracode-windows.js.gz +0 -0
  187. package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
  188. package/dist/web/public/vendor/exceljs.min.js.gz +0 -0
  189. package/dist/web/public/vendor/fflate.min.js.gz +0 -0
  190. package/dist/web/public/vendor/marked.min.js.gz +0 -0
  191. package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
  192. package/dist/web/public/vendor/xterm-addon-serialize.min.js.gz +0 -0
  193. package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
  194. package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
  195. package/dist/web/public/vendor/xterm-predictive-echo.ae5e3d5d.js.gz +0 -0
  196. package/dist/web/public/vendor/xterm-zerolag-input.0b69623c.js.gz +0 -0
  197. package/dist/web/public/vendor/xterm.css.gz +0 -0
  198. package/dist/web/public/vendor/xterm.min.js.gz +0 -0
  199. package/dist/web/public/voice-input.2342c37b.js.gz +0 -0
  200. package/dist/web/public/voice-pcm-worklet.js.gz +0 -0
  201. package/dist/web/public/webview-tabs.js +12 -0
  202. package/dist/web/public/webview-tabs.js.br +0 -0
  203. package/dist/web/public/webview-tabs.js.gz +0 -0
  204. package/dist/web/route-helpers.d.ts +8 -0
  205. package/dist/web/route-helpers.d.ts.map +1 -1
  206. package/dist/web/route-helpers.js +8 -0
  207. package/dist/web/route-helpers.js.map +1 -1
  208. package/dist/web/routes/admin-routes.d.ts.map +1 -1
  209. package/dist/web/routes/admin-routes.js +4 -1
  210. package/dist/web/routes/admin-routes.js.map +1 -1
  211. package/dist/web/routes/approval-routes.d.ts.map +1 -1
  212. package/dist/web/routes/approval-routes.js +6 -8
  213. package/dist/web/routes/approval-routes.js.map +1 -1
  214. package/dist/web/routes/case-routes.js +1 -1
  215. package/dist/web/routes/case-routes.js.map +1 -1
  216. package/dist/web/routes/file-routes.d.ts +46 -1
  217. package/dist/web/routes/file-routes.d.ts.map +1 -1
  218. package/dist/web/routes/file-routes.js +214 -27
  219. package/dist/web/routes/file-routes.js.map +1 -1
  220. package/dist/web/routes/hook-event-routes.d.ts.map +1 -1
  221. package/dist/web/routes/hook-event-routes.js +8 -1
  222. package/dist/web/routes/hook-event-routes.js.map +1 -1
  223. package/dist/web/routes/html-view-routes.d.ts +60 -0
  224. package/dist/web/routes/html-view-routes.d.ts.map +1 -0
  225. package/dist/web/routes/html-view-routes.js +288 -0
  226. package/dist/web/routes/html-view-routes.js.map +1 -0
  227. package/dist/web/routes/index.d.ts +1 -0
  228. package/dist/web/routes/index.d.ts.map +1 -1
  229. package/dist/web/routes/index.js +1 -0
  230. package/dist/web/routes/index.js.map +1 -1
  231. package/dist/web/routes/reboot-restore-routes.js +2 -2
  232. package/dist/web/routes/reboot-restore-routes.js.map +1 -1
  233. package/dist/web/routes/session-routes.d.ts +1 -0
  234. package/dist/web/routes/session-routes.d.ts.map +1 -1
  235. package/dist/web/routes/session-routes.js +278 -56
  236. package/dist/web/routes/session-routes.js.map +1 -1
  237. package/dist/web/routes/status-telemetry-routes.d.ts.map +1 -1
  238. package/dist/web/routes/status-telemetry-routes.js +16 -2
  239. package/dist/web/routes/status-telemetry-routes.js.map +1 -1
  240. package/dist/web/schemas.d.ts +29 -0
  241. package/dist/web/schemas.d.ts.map +1 -1
  242. package/dist/web/schemas.js +65 -0
  243. package/dist/web/schemas.js.map +1 -1
  244. package/dist/web/server.d.ts +6 -1
  245. package/dist/web/server.d.ts.map +1 -1
  246. package/dist/web/server.js +62 -14
  247. package/dist/web/server.js.map +1 -1
  248. package/dist/web/sse-events.d.ts +5 -2
  249. package/dist/web/sse-events.d.ts.map +1 -1
  250. package/dist/web/sse-events.js +5 -2
  251. package/dist/web/sse-events.js.map +1 -1
  252. package/package.json +2 -1
  253. package/skills/codeman/SKILL.md +29 -12
  254. package/dist/web/public/app.6f8552e1.js +0 -43
  255. package/dist/web/public/app.6f8552e1.js.br +0 -0
  256. package/dist/web/public/app.6f8552e1.js.gz +0 -0
  257. package/dist/web/public/constants.bc9c1f63.js.br +0 -0
  258. package/dist/web/public/constants.bc9c1f63.js.gz +0 -0
  259. package/dist/web/public/i18n.a9840ea2.js +0 -2
  260. package/dist/web/public/i18n.a9840ea2.js.br +0 -0
  261. package/dist/web/public/i18n.a9840ea2.js.gz +0 -0
  262. package/dist/web/public/image-input.e00471c6.js.br +0 -0
  263. package/dist/web/public/image-input.e00471c6.js.gz +0 -0
  264. package/dist/web/public/keyboard-accessory.c1e7c7b7.js.br +0 -0
  265. package/dist/web/public/keyboard-accessory.c1e7c7b7.js.gz +0 -0
  266. package/dist/web/public/mobile.111b187d.css +0 -1
  267. package/dist/web/public/mobile.111b187d.css.br +0 -0
  268. package/dist/web/public/mobile.111b187d.css.gz +0 -0
  269. package/dist/web/public/panels-ui.71846fcb.js.br +0 -0
  270. package/dist/web/public/panels-ui.71846fcb.js.gz +0 -0
  271. package/dist/web/public/session-ui.f731602c.js.br +0 -0
  272. package/dist/web/public/session-ui.f731602c.js.gz +0 -0
  273. package/dist/web/public/settings-ui.4e33390f.js.br +0 -0
  274. package/dist/web/public/settings-ui.4e33390f.js.gz +0 -0
  275. package/dist/web/public/spreadsheet-preview.af82fa2f.js.br +0 -0
  276. package/dist/web/public/spreadsheet-preview.af82fa2f.js.gz +0 -0
  277. package/dist/web/public/styles.81a72906.css +0 -1
  278. package/dist/web/public/styles.81a72906.css.br +0 -0
  279. package/dist/web/public/styles.81a72906.css.gz +0 -0
  280. package/dist/web/public/tab-layout-browser.065fcba4.js +0 -1
  281. package/dist/web/public/tab-layout-browser.065fcba4.js.br +0 -0
  282. package/dist/web/public/tab-layout-browser.065fcba4.js.gz +0 -0
  283. package/dist/web/public/tab-rail-resize.a5867793.js.br +0 -0
  284. package/dist/web/public/tab-rail-resize.a5867793.js.gz +0 -0
  285. package/dist/web/public/terminal-ui.b7267005.js +0 -2
  286. package/dist/web/public/terminal-ui.b7267005.js.br +0 -0
  287. package/dist/web/public/terminal-ui.b7267005.js.gz +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"remote-files.js","sourceRoot":"","sources":["../src/remote-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAiB,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AAElC;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAEvC,oFAAoF;AACpF,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAEtC,kFAAkF;AAClF,MAAM,uBAAuB,GAAG,EAAE,GAAG,IAAI,CAAC;AAE1C,6EAA6E;AAC7E,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC,mFAAmF;AACnF,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC;;;;;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,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QAC5C,MAAM,MAAM,GAAG,GAA6D,CAAC;QAC7E,MAAM,MAAM,GACV,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAClH,MAAM,IAAI,GAAG,MAAM;aAChB,KAAK,CAAC,IAAI,CAAC;aACX,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;aAC5B,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACrC,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACpC,IAAI,MAAM,CAAC,MAAM;YAAE,OAAO,WAAW,CAAC;QACtC,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,YAAY,MAAM,CAAC,IAAI,EAAE,CAAC;QACtE,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,6BAA6B,MAAM,CAAC,IAAI,GAAG,CAAC;IAC1F,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * @fileoverview Scrollback of a remote SSH session, read from the REMOTE tmux.
3
+ *
4
+ * A remote session's local pane runs `ssh -t … tmux new-session -A` (or `attach`),
5
+ * so the local tmux only ever sees what the remote tmux CLIENT draws: full-screen
6
+ * repaints, not scrolling output. The local pane therefore keeps a fraction of the
7
+ * history (measured: 48 of 279 lines while output streamed, none after a reattach),
8
+ * while the remote pane, where the shell really runs, keeps all of it. A full-history
9
+ * load of a remote session reads the scrollback from there instead, and the caller
10
+ * splices it above the LOCAL visible frame (`PaneCaptureOptions.scrollbackOverride`):
11
+ * the local pane is what the live stream keeps drawing into, so its frame and caret
12
+ * position are the ones the browser must end up with.
13
+ *
14
+ * ONE ssh round trip reads the remote pane's scrollback rows (`capture-pane -S -<N>
15
+ * -E -1`), its `#{history_size}` and its screen. The size is load-bearing: with no
16
+ * history at all, tmux clamps `-E -1` to the first VISIBLE row and would return it
17
+ * as history. The screen closes the seam between the remote read and the local
18
+ * frame, which is read only after the round trip: rows that scrolled in between,
19
+ * and the top of a remote screen taller than the local pane, are on that screen
20
+ * alone, and the caller keeps the screen rows above where the local frame overlaps
21
+ * it (`joinScrollbackAndFrame`).
22
+ *
23
+ * ⚠️ The three reads are ONE tmux command list (`a \; b \; c`), not three tmux
24
+ * runs. tmux runs a client's command list back to back without reading pane output
25
+ * in between, so the history ends exactly where the screen begins. As separate runs
26
+ * the shell kept writing between them, and the rows that scrolled in those
27
+ * milliseconds were in neither capture (measured on a busy pane: every read lost
28
+ * rows). This rests on how tmux's command queue behaves, not on a documented
29
+ * guarantee. tmux output cannot carry the NUL markers, so a random marker line
30
+ * printed by `display-message` separates the history from the size and screen.
31
+ * tmux before 3.2 prints no newline after `capture-pane -p`, so the marker can be
32
+ * glued onto an unterminated last history row; the parser accepts it there too.
33
+ *
34
+ * Bounded and fail-soft. Any failure (unreachable host, auth, missing session, odd
35
+ * output) returns null and the caller keeps the local capture, so a remote load is
36
+ * never worse than before. A transport failure also starts a short per-host back-off,
37
+ * so a host that is asleep costs one timeout, not one per tab switch. The child runs
38
+ * under the shared remote-ssh limiter (`remote-ssh-limiter.ts`) like every other
39
+ * short-lived remote ssh, but gives up on a slot it waited too long for (`maxWaitMs`,
40
+ * enforced in the queue), and the connection options come from
41
+ * `buildSshConnectionArgs()`.
42
+ *
43
+ * How much history exists is the REMOTE tmux's `history-limit` (2000 lines unless
44
+ * the remote user's tmux.conf raises it); the launch command does not set it.
45
+ */
46
+ import type { SessionRemote } from './types/session.js';
47
+ /** The remote `tail -c` bound for a configured byte cap; 0 (unbounded) stays 0. */
48
+ export declare function remoteTailBytes(maxBytes: number): number;
49
+ /**
50
+ * A fresh marker line for one read. Random, so no row the pane really holds can be
51
+ * taken for it.
52
+ */
53
+ export declare function newScrollbackMarker(): string;
54
+ /**
55
+ * The remote shell script. It prints a NUL, the tmux output, then a second NUL:
56
+ * the first separates a login banner or an rc-file `echo` printed before the
57
+ * script runs without guessing (the same marker `buildRemoteProbeCommand` uses),
58
+ * and both are printed whether or not tmux succeeds, so their presence says the
59
+ * script ran on the host. The tmux output is the history rows, `marker`, the
60
+ * history size, then the screen rows.
61
+ */
62
+ export declare function buildRemoteScrollbackScript(socket: string, sessionName: string, historyLines: number, tailBytes: number, marker: string): string;
63
+ /** The full ssh command line for {@link buildRemoteScrollbackScript}. */
64
+ export declare function buildRemoteScrollbackCommand(remote: SessionRemote, sessionId: string, historyLines: number, tailBytes: number, marker: string): string;
65
+ /** What one round trip read from the remote pane: its scrollback rows, then its screen. */
66
+ export interface RemoteScrollback {
67
+ /** History rows above the screen, oldest first; '' when the pane has none. */
68
+ scrollback: string;
69
+ /** The screen's rows, read in the same tmux command list, so they begin where the scrollback ends. */
70
+ screen: string;
71
+ }
72
+ /**
73
+ * The scrollback and screen rows from the script's stdout, or null when the
74
+ * output is not the script's or tmux printed nothing usable (no such session,
75
+ * or a byte cap so small it cut into the screen). The marker may end an
76
+ * unterminated history row (tmux before 3.2); when the output reached
77
+ * `tailBytes`, the history's partial first row is dropped.
78
+ */
79
+ export declare function parseRemoteScrollbackOutput(stdout: string, marker: string, tailBytes: number): RemoteScrollback | null;
80
+ /** Runs the ssh command line and resolves its stdout; rejects like `exec` does. */
81
+ export type RemoteScrollbackRunner = (command: string, opts: {
82
+ timeout: number;
83
+ maxBuffer: number;
84
+ }) => Promise<string>;
85
+ /**
86
+ * Read a remote session's scrollback from the remote tmux, or null to keep the
87
+ * local capture. Never throws.
88
+ *
89
+ * Only a TRANSPORT failure backs the host off (ssh's own exit 255, a timeout, a
90
+ * spawn error, output that is not the script's): those say the host is
91
+ * unreachable for every session on it. A remote command failing (a session
92
+ * that is gone: tmux answers nothing between the NULs, and the closing `printf`
93
+ * hides its exit status) is about this session only, so it returns
94
+ * null and the next session on that host still tries. Same split as
95
+ * `classifyRemoteAliveExit()`.
96
+ *
97
+ * `run` is a test seam: without it nothing runs under vitest, as in
98
+ * remote-files.ts / remote-hosts.ts.
99
+ */
100
+ export declare function fetchRemoteScrollback(remote: SessionRemote, sessionId: string, historyLines: number, maxBytes: number, run?: RemoteScrollbackRunner): Promise<RemoteScrollback | null>;
101
+ /** Test hook: forget every host back-off. */
102
+ export declare function resetRemoteScrollbackBackoff(): void;
103
+ //# sourceMappingURL=remote-pane-history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-pane-history.d.ts","sourceRoot":"","sources":["../src/remote-pane-history.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAsCxD,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExD;AAWD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAqBR;AAED,yEAAyE;AACzE,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAKR;AAED,2FAA2F;AAC3F,MAAM,WAAW,gBAAgB;IAC/B,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,sGAAsG;IACtG,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,gBAAgB,GAAG,IAAI,CAgCzB;AAED,mFAAmF;AACnF,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAKxH;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,sBAAsB,GAC3B,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAuDlC;AAED,6CAA6C;AAC7C,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD"}
@@ -0,0 +1,258 @@
1
+ /**
2
+ * @fileoverview Scrollback of a remote SSH session, read from the REMOTE tmux.
3
+ *
4
+ * A remote session's local pane runs `ssh -t … tmux new-session -A` (or `attach`),
5
+ * so the local tmux only ever sees what the remote tmux CLIENT draws: full-screen
6
+ * repaints, not scrolling output. The local pane therefore keeps a fraction of the
7
+ * history (measured: 48 of 279 lines while output streamed, none after a reattach),
8
+ * while the remote pane, where the shell really runs, keeps all of it. A full-history
9
+ * load of a remote session reads the scrollback from there instead, and the caller
10
+ * splices it above the LOCAL visible frame (`PaneCaptureOptions.scrollbackOverride`):
11
+ * the local pane is what the live stream keeps drawing into, so its frame and caret
12
+ * position are the ones the browser must end up with.
13
+ *
14
+ * ONE ssh round trip reads the remote pane's scrollback rows (`capture-pane -S -<N>
15
+ * -E -1`), its `#{history_size}` and its screen. The size is load-bearing: with no
16
+ * history at all, tmux clamps `-E -1` to the first VISIBLE row and would return it
17
+ * as history. The screen closes the seam between the remote read and the local
18
+ * frame, which is read only after the round trip: rows that scrolled in between,
19
+ * and the top of a remote screen taller than the local pane, are on that screen
20
+ * alone, and the caller keeps the screen rows above where the local frame overlaps
21
+ * it (`joinScrollbackAndFrame`).
22
+ *
23
+ * ⚠️ The three reads are ONE tmux command list (`a \; b \; c`), not three tmux
24
+ * runs. tmux runs a client's command list back to back without reading pane output
25
+ * in between, so the history ends exactly where the screen begins. As separate runs
26
+ * the shell kept writing between them, and the rows that scrolled in those
27
+ * milliseconds were in neither capture (measured on a busy pane: every read lost
28
+ * rows). This rests on how tmux's command queue behaves, not on a documented
29
+ * guarantee. tmux output cannot carry the NUL markers, so a random marker line
30
+ * printed by `display-message` separates the history from the size and screen.
31
+ * tmux before 3.2 prints no newline after `capture-pane -p`, so the marker can be
32
+ * glued onto an unterminated last history row; the parser accepts it there too.
33
+ *
34
+ * Bounded and fail-soft. Any failure (unreachable host, auth, missing session, odd
35
+ * output) returns null and the caller keeps the local capture, so a remote load is
36
+ * never worse than before. A transport failure also starts a short per-host back-off,
37
+ * so a host that is asleep costs one timeout, not one per tab switch. The child runs
38
+ * under the shared remote-ssh limiter (`remote-ssh-limiter.ts`) like every other
39
+ * short-lived remote ssh, but gives up on a slot it waited too long for (`maxWaitMs`,
40
+ * enforced in the queue), and the connection options come from
41
+ * `buildSshConnectionArgs()`.
42
+ *
43
+ * How much history exists is the REMOTE tmux's `history-limit` (2000 lines unless
44
+ * the remote user's tmux.conf raises it); the launch command does not set it.
45
+ */
46
+ import { exec } from 'node:child_process';
47
+ import { randomBytes } from 'node:crypto';
48
+ import { promisify } from 'node:util';
49
+ import { buildSshConnectionArgs, classifyRemoteAliveExit, remoteSshTarget, shellescape } from './remote-hosts.js';
50
+ import { RemoteSshSlotTimeoutError, runWithRemoteSshLimit } from './remote-ssh-limiter.js';
51
+ import { remoteTmuxLocation } from './tmux-manager.js';
52
+ const execAsync = promisify(exec);
53
+ /**
54
+ * Bound on the whole round trip. A full load waits on it, so it is far below the
55
+ * 10 s `ConnectTimeout` the shared ssh options carry: past this the local capture
56
+ * is the better answer.
57
+ */
58
+ const REMOTE_HISTORY_TIMEOUT_MS = 5_000;
59
+ /**
60
+ * Longest a load waits for a slot in the shared ssh pool, which file previews and
61
+ * attachment probes (20 s each) also hold. Past it the local capture is used.
62
+ */
63
+ const REMOTE_HISTORY_SLOT_WAIT_MS = 1_500;
64
+ /** After a failed read, skip that host for this long and use the local capture. */
65
+ const REMOTE_HISTORY_BACKOFF_MS = 30_000;
66
+ /**
67
+ * Headroom over the remote `tail -c` bound for what it does not cover: the two NUL
68
+ * markers and anything a login banner or rc file prints before the script.
69
+ */
70
+ const REMOTE_HISTORY_SLACK_BYTES = 64 * 1024;
71
+ /**
72
+ * Added to the configured byte cap for the remote `tail -c` bound. That bound
73
+ * covers the whole tmux output, and the marker, the size and the screen come last
74
+ * (a wide, tall screen of colored rows runs to a few hundred KB); without this, a
75
+ * small cap would cut into the screen and lose the read. The route trims what it
76
+ * returns to the configured cap anyway, keeping the newest bytes.
77
+ */
78
+ const REMOTE_SCREEN_ALLOWANCE_BYTES = 1024 * 1024;
79
+ /** The remote `tail -c` bound for a configured byte cap; 0 (unbounded) stays 0. */
80
+ export function remoteTailBytes(maxBytes) {
81
+ return maxBytes > 0 ? Math.trunc(maxBytes) + REMOTE_SCREEN_ALLOWANCE_BYTES : 0;
82
+ }
83
+ /** Read ceiling when the configured byte cap is 0 (unbounded) and no `tail -c` runs. */
84
+ const UNBOUNDED_READ_MAX_BYTES = 64 * 1024 * 1024;
85
+ /**
86
+ * Host id → time the back-off ends. Keyed by HOST, so a sleeping host with five
87
+ * sessions costs one timeout, and the map is bounded by the configured hosts.
88
+ */
89
+ const backoffUntil = new Map();
90
+ /**
91
+ * A fresh marker line for one read. Random, so no row the pane really holds can be
92
+ * taken for it.
93
+ */
94
+ export function newScrollbackMarker() {
95
+ return `codeman-history-${randomBytes(8).toString('hex')}`;
96
+ }
97
+ /**
98
+ * The remote shell script. It prints a NUL, the tmux output, then a second NUL:
99
+ * the first separates a login banner or an rc-file `echo` printed before the
100
+ * script runs without guessing (the same marker `buildRemoteProbeCommand` uses),
101
+ * and both are printed whether or not tmux succeeds, so their presence says the
102
+ * script ran on the host. The tmux output is the history rows, `marker`, the
103
+ * history size, then the screen rows.
104
+ */
105
+ export function buildRemoteScrollbackScript(socket, sessionName, historyLines, tailBytes, marker) {
106
+ // `=name:` is an EXACT session match, then its active pane. A bare name is
107
+ // read as a pane index or window name first, so a discovered session named
108
+ // `0` would capture some other session's pane.
109
+ const target = shellescape(`=${sessionName}:`);
110
+ const lines = Math.max(1, Math.trunc(historyLines));
111
+ // The newest rows are the ones worth keeping, so the byte bound is applied on
112
+ // the remote side (`tail -c`) rather than by killing the read at maxBuffer.
113
+ // It covers the whole tmux output, history first, so with the screen
114
+ // allowance in `remoteTailBytes()` a cut lands in the history. 0 means
115
+ // unbounded, as in the route.
116
+ const bound = tailBytes > 0 ? ` | tail -c ${Math.trunc(tailBytes)}` : '';
117
+ // ONE tmux command list, so no pane output is read between the history and
118
+ // the screen (see the @fileoverview). `\;` reaches tmux as a lone `;`.
119
+ return (`printf '\\0'; tmux -L ${shellescape(socket)} ` +
120
+ `capture-pane -p -e -J -S -${lines} -E -1 -t ${target} \\; ` +
121
+ `display-message -p -t ${target} ${shellescape(marker)} \\; ` +
122
+ `display-message -p -t ${target} '#{history_size}' \\; ` +
123
+ `capture-pane -p -e -J -t ${target}${bound}; printf '\\0'`);
124
+ }
125
+ /** The full ssh command line for {@link buildRemoteScrollbackScript}. */
126
+ export function buildRemoteScrollbackCommand(remote, sessionId, historyLines, tailBytes, marker) {
127
+ const { socket, sessionName } = remoteTmuxLocation(remote, sessionId);
128
+ const script = buildRemoteScrollbackScript(socket, sessionName, historyLines, tailBytes, marker);
129
+ // `exec` so a timeout kill reaches ssh itself, not only the local `sh -c`.
130
+ return ['exec', ...buildSshConnectionArgs(remote), remoteSshTarget(remote), shellescape(script)].join(' ');
131
+ }
132
+ /**
133
+ * The scrollback and screen rows from the script's stdout, or null when the
134
+ * output is not the script's or tmux printed nothing usable (no such session,
135
+ * or a byte cap so small it cut into the screen). The marker may end an
136
+ * unterminated history row (tmux before 3.2); when the output reached
137
+ * `tailBytes`, the history's partial first row is dropped.
138
+ */
139
+ export function parseRemoteScrollbackOutput(stdout, marker, tailBytes) {
140
+ const start = stdout.indexOf('\0');
141
+ if (start === -1)
142
+ return null;
143
+ const end = stdout.indexOf('\0', start + 1);
144
+ if (end === -1)
145
+ return null;
146
+ // The marker ends a row, after the history's last row. Usually it is a row of
147
+ // its own, but tmux before 3.2 prints no newline after `capture-pane -p`, so
148
+ // when the history ends inside a wrapped line (`-J` leaves it unterminated)
149
+ // the marker is glued onto that row. It is random per read, so no row the
150
+ // pane really holds ends with it.
151
+ const markerRow = `${marker}\n`;
152
+ const raw = stdout.slice(start + 1, end);
153
+ const at = raw.indexOf(markerRow);
154
+ if (at === -1)
155
+ return null;
156
+ const sizeStart = at + markerRow.length;
157
+ const sizeEnd = raw.indexOf('\n', sizeStart);
158
+ if (sizeEnd === -1)
159
+ return null;
160
+ const sizeText = raw.slice(sizeStart, sizeEnd).trim();
161
+ if (!/^\d+$/.test(sizeText))
162
+ return null;
163
+ const screen = raw.slice(sizeEnd + 1);
164
+ // With no history at all, tmux clamps `-E -1` to the first visible row.
165
+ if (Number(sizeText) === 0)
166
+ return { scrollback: '', screen };
167
+ // A tail -c cut lands in the history (the bound leaves room for the rest),
168
+ // mid-row and possibly mid-escape, so the first, partial row is dropped. A
169
+ // cut exactly on the marker row leaves no history at all.
170
+ let scrollback = raw.slice(0, at);
171
+ if (tailBytes > 0 && Buffer.byteLength(raw, 'utf-8') >= tailBytes) {
172
+ const newline = scrollback.indexOf('\n');
173
+ scrollback = newline === -1 ? '' : scrollback.slice(newline + 1);
174
+ }
175
+ if (scrollback !== '' && !scrollback.endsWith('\n'))
176
+ scrollback += '\n';
177
+ return { scrollback, screen };
178
+ }
179
+ const execRunner = async (command, opts) => (await execAsync(command, { encoding: 'utf-8', ...opts })).stdout;
180
+ /**
181
+ * Read a remote session's scrollback from the remote tmux, or null to keep the
182
+ * local capture. Never throws.
183
+ *
184
+ * Only a TRANSPORT failure backs the host off (ssh's own exit 255, a timeout, a
185
+ * spawn error, output that is not the script's): those say the host is
186
+ * unreachable for every session on it. A remote command failing (a session
187
+ * that is gone: tmux answers nothing between the NULs, and the closing `printf`
188
+ * hides its exit status) is about this session only, so it returns
189
+ * null and the next session on that host still tries. Same split as
190
+ * `classifyRemoteAliveExit()`.
191
+ *
192
+ * `run` is a test seam: without it nothing runs under vitest, as in
193
+ * remote-files.ts / remote-hosts.ts.
194
+ */
195
+ export async function fetchRemoteScrollback(remote, sessionId, historyLines, maxBytes, run) {
196
+ if (!run && process.env.VITEST)
197
+ return null;
198
+ const runner = run ?? execRunner;
199
+ const until = backoffUntil.get(remote.hostId);
200
+ if (until !== undefined) {
201
+ if (Date.now() < until)
202
+ return null;
203
+ backoffUntil.delete(remote.hostId);
204
+ }
205
+ const marker = newScrollbackMarker();
206
+ const tailBytes = remoteTailBytes(maxBytes);
207
+ const command = buildRemoteScrollbackCommand(remote, sessionId, historyLines, tailBytes, marker);
208
+ try {
209
+ const stdout = await runWithRemoteSshLimit(() => runner(command, {
210
+ timeout: REMOTE_HISTORY_TIMEOUT_MS,
211
+ maxBuffer: (tailBytes > 0 ? tailBytes : UNBOUNDED_READ_MAX_BYTES) + REMOTE_HISTORY_SLACK_BYTES,
212
+ }),
213
+ // The pool is shared with 20 s file probes; past this the local capture
214
+ // is the better answer than waiting behind them.
215
+ { maxWaitMs: REMOTE_HISTORY_SLOT_WAIT_MS });
216
+ const parsed = parseRemoteScrollbackOutput(stdout, marker, tailBytes);
217
+ if (parsed === null) {
218
+ // Both NULs arrived, so the script ran on the host and only tmux had
219
+ // nothing to say: no such session. The script's last command is the
220
+ // closing `printf`, so this comes back as exit 0 rather than tmux's
221
+ // exit 1, and it is about this session alone. Output without the NULs
222
+ // is not the script's at all, which says the host is not answering as
223
+ // expected.
224
+ const parts = stdout.split('\0');
225
+ const ranOnHost = parts.length >= 3;
226
+ if (!ranOnHost)
227
+ backoffUntil.set(remote.hostId, Date.now() + REMOTE_HISTORY_BACKOFF_MS);
228
+ // tmux printed something, but not the marker, size and screen in order.
229
+ const unreadable = ranOnHost && parts[1] !== '';
230
+ const what = !ranOnHost
231
+ ? 'unexpected output'
232
+ : unreadable
233
+ ? 'unreadable remote tmux output'
234
+ : 'no such remote tmux session';
235
+ console.warn(`[remote-history] ${remote.label}: ${what}; using the local capture`);
236
+ return null;
237
+ }
238
+ return parsed;
239
+ }
240
+ catch (err) {
241
+ // A busy pool says nothing about the host.
242
+ if (err instanceof RemoteSshSlotTimeoutError)
243
+ return null;
244
+ const e = err;
245
+ const code = typeof e.code === 'number' ? e.code : null;
246
+ const transport = classifyRemoteAliveExit(code, e.killed === true) === undefined;
247
+ if (transport)
248
+ backoffUntil.set(remote.hostId, Date.now() + REMOTE_HISTORY_BACKOFF_MS);
249
+ const reason = e.killed ? 'timed out' : code !== null ? `exit ${code}` : 'failed';
250
+ console.warn(`[remote-history] ${remote.label}: remote scrollback read ${reason}; using the local capture`);
251
+ return null;
252
+ }
253
+ }
254
+ /** Test hook: forget every host back-off. */
255
+ export function resetRemoteScrollbackBackoff() {
256
+ backoffUntil.clear();
257
+ }
258
+ //# sourceMappingURL=remote-pane-history.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-pane-history.js","sourceRoot":"","sources":["../src/remote-pane-history.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,WAA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ileoverview Global concurrency limiter for the short-lived `ssh` children that
3
3
  * remote-case file access spawns (`src/remote-files.ts`: the realpath+stat probe and
4
- * the buffered text read).
4
+ * the buffered text read). A remote session's full-history load reads its scrollback
5
+ * from the remote tmux through the same pool (`src/remote-pane-history.ts`), with a
6
+ * bounded wait (`maxWaitMs`) because it has the local capture to fall back on.
5
7
  *
6
8
  * Two paths can fan those out without a human behind each one:
7
9
  *
@@ -37,6 +39,17 @@ export declare function getActiveRemoteSshCount(): number;
37
39
  export declare function getQueuedRemoteSshCount(): number;
38
40
  /** The configured cap, so a test can assert against the real number. */
39
41
  export declare function getRemoteSshLimit(): number;
40
- /** Run `task` once an ssh slot is free, releasing the slot afterward. */
41
- export declare function runWithRemoteSshLimit<T>(task: () => Promise<T>): Promise<T>;
42
+ /** Thrown by {@link runWithRemoteSshLimit} when `maxWaitMs` passed before a slot freed up. */
43
+ export declare class RemoteSshSlotTimeoutError extends Error {
44
+ constructor(maxWaitMs: number);
45
+ }
46
+ /**
47
+ * Run `task` once an ssh slot is free, releasing the slot afterward. With
48
+ * `maxWaitMs`, give up instead (rejecting with {@link RemoteSshSlotTimeoutError},
49
+ * `task` never runs) when no slot frees up in time: for a caller that has a
50
+ * cheaper answer than waiting behind the queue.
51
+ */
52
+ export declare function runWithRemoteSshLimit<T>(task: () => Promise<T>, opts?: {
53
+ maxWaitMs?: number;
54
+ }): Promise<T>;
42
55
  //# sourceMappingURL=remote-ssh-limiter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote-ssh-limiter.d.ts","sourceRoot":"","sources":["../src/remote-ssh-limiter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAeH,mEAAmE;AACnE,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,gEAAgE;AAChE,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,wEAAwE;AACxE,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAoBD,yEAAyE;AACzE,wBAAsB,qBAAqB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAOjF"}
1
+ {"version":3,"file":"remote-ssh-limiter.d.ts","sourceRoot":"","sources":["../src/remote-ssh-limiter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAeH,mEAAmE;AACnE,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,gEAAgE;AAChE,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,wEAAwE;AACxE,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,8FAA8F;AAC9F,qBAAa,yBAA0B,SAAQ,KAAK;gBACtC,SAAS,EAAE,MAAM;CAI9B;AAmCD;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAOpH"}
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * @fileoverview Global concurrency limiter for the short-lived `ssh` children that
3
3
  * remote-case file access spawns (`src/remote-files.ts`: the realpath+stat probe and
4
- * the buffered text read).
4
+ * the buffered text read). A remote session's full-history load reads its scrollback
5
+ * from the remote tmux through the same pool (`src/remote-pane-history.ts`), with a
6
+ * bounded wait (`maxWaitMs`) because it has the local capture to fall back on.
5
7
  *
6
8
  * Two paths can fan those out without a human behind each one:
7
9
  *
@@ -54,12 +56,36 @@ export function getQueuedRemoteSshCount() {
54
56
  export function getRemoteSshLimit() {
55
57
  return MAX_CONCURRENT_REMOTE_SSH;
56
58
  }
57
- function acquire() {
59
+ /** Thrown by {@link runWithRemoteSshLimit} when `maxWaitMs` passed before a slot freed up. */
60
+ export class RemoteSshSlotTimeoutError extends Error {
61
+ constructor(maxWaitMs) {
62
+ super(`No remote ssh slot within ${maxWaitMs} ms`);
63
+ this.name = 'RemoteSshSlotTimeoutError';
64
+ }
65
+ }
66
+ function acquire(maxWaitMs) {
58
67
  if (active < MAX_CONCURRENT_REMOTE_SSH) {
59
68
  active++;
60
69
  return Promise.resolve();
61
70
  }
62
- return new Promise((resolve) => waiters.push(resolve));
71
+ if (maxWaitMs === undefined)
72
+ return new Promise((resolve) => waiters.push(resolve));
73
+ return new Promise((resolve, reject) => {
74
+ const waiter = () => {
75
+ clearTimeout(timer);
76
+ resolve();
77
+ };
78
+ // A timed-out waiter leaves the queue and is never handed a slot, so it
79
+ // owns nothing to give back: `active` is untouched on this path.
80
+ const timer = setTimeout(() => {
81
+ const index = waiters.indexOf(waiter);
82
+ if (index === -1)
83
+ return; // already handed a slot by release()
84
+ waiters.splice(index, 1);
85
+ reject(new RemoteSshSlotTimeoutError(maxWaitMs));
86
+ }, maxWaitMs);
87
+ waiters.push(waiter);
88
+ });
63
89
  }
64
90
  function release() {
65
91
  const next = waiters.shift();
@@ -71,9 +97,14 @@ function release() {
71
97
  active--;
72
98
  }
73
99
  }
74
- /** Run `task` once an ssh slot is free, releasing the slot afterward. */
75
- export async function runWithRemoteSshLimit(task) {
76
- await acquire();
100
+ /**
101
+ * Run `task` once an ssh slot is free, releasing the slot afterward. With
102
+ * `maxWaitMs`, give up instead (rejecting with {@link RemoteSshSlotTimeoutError},
103
+ * `task` never runs) when no slot frees up in time: for a caller that has a
104
+ * cheaper answer than waiting behind the queue.
105
+ */
106
+ export async function runWithRemoteSshLimit(task, opts = {}) {
107
+ await acquire(opts.maxWaitMs);
77
108
  try {
78
109
  return await task();
79
110
  }
@@ -1 +1 @@
1
- {"version":3,"file":"remote-ssh-limiter.js","sourceRoot":"","sources":["../src/remote-ssh-limiter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;GAIG;AACH,MAAM,yBAAyB,G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
28
28
  * @module session
29
29
  */
30
30
  import { EventEmitter } from 'node:events';
31
- import { SessionState, SessionStatus, SessionConfig, RalphTrackerState, RalphTodoItem, ActiveBashTool, NiceConfig, type ClaudeMode, type SessionMode, type OpenCodeConfig, type CodexConfig, type EffortLevel, type CustomModelBookkeeping, type CustomModelSelection, type GeminiConfig, type AntigravityConfig, type PiConfig, type GrokConfig, type DeepSeekConfig, type OmpConfig, type SessionRemote, type SessionDocker, type SessionNameSource, type SessionWriteOptions, type PaneExit } from './types.js';
31
+ import { SessionState, SessionStatus, SessionConfig, RalphTrackerState, RalphTodoItem, ActiveBashTool, NiceConfig, type ClaudeMode, type SessionMode, type OpenCodeConfig, type CodexConfig, type EffortLevel, type CustomModelBookkeeping, type CustomModelSelection, type GeminiConfig, type AntigravityConfig, type PiConfig, type GrokConfig, type DeepSeekConfig, type OmpConfig, type SessionRemote, type SessionDocker, type SessionNameSource, type SessionWriteOptions, type PaneExit, type PromptCacheStatus } from './types.js';
32
32
  import type { TerminalMultiplexer, MuxSession } from './mux-interface.js';
33
33
  import { TaskTracker, type BackgroundTask } from './task-tracker.js';
34
34
  import { RalphTracker } from './ralph-tracker.js';
@@ -301,6 +301,8 @@ export declare class Session extends EventEmitter {
301
301
  * running. A session that comes back with no label has no chip on its screen.
302
302
  */
303
303
  private _watching;
304
+ /** Last `prompt_cache` report from the statusline exporter; null until Claude sends one. */
305
+ private _promptCache;
304
306
  /** Lazily compiled `capabilities.workDetect.workingLine`. See _workingLinePattern(). */
305
307
  private _workingLineRe;
306
308
  /** Lazily compiled `capabilities.workDetect.watchingLine`. See _watchingLinePattern(). */
@@ -482,6 +484,8 @@ export declare class Session extends EventEmitter {
482
484
  paneExit?: PaneExit;
483
485
  /** The previous run's `displayModel`; a CLI-reported one is restored (see `displayModel`). */
484
486
  displayModel?: DisplayModel;
487
+ /** The previous run's last prompt-cache report, restored so the readout is not blank (see `promptCache`). */
488
+ promptCache?: PromptCacheStatus;
485
489
  /** This session was rebuilt from the tmux socket, so its metadata is a guess. */
486
490
  discoveredMuxSession?: boolean;
487
491
  /** Restored wall-clock ms of the pane's last output (recovery only; see `_wireActivityAt`). */
@@ -645,6 +649,26 @@ export declare class Session extends EventEmitter {
645
649
  * what it is waiting for instead.
646
650
  */
647
651
  get watching(): string | null;
652
+ /**
653
+ * Prompt-cache state of the main conversation as Claude Code last reported it on the
654
+ * statusline (v2.1.251+), fed by `POST /api/status-telemetry`. Null until the first
655
+ * report. It rides `toState()` for the Session Options readout and is restored on a
656
+ * Codeman restart (constructor `promptCache`) so the row is not blank until the pane's
657
+ * next render; the readout is time-aware, so a value whose `expiresAt` has passed renders
658
+ * as cold rather than as a stale warm.
659
+ */
660
+ get promptCache(): PromptCacheStatus | null;
661
+ /**
662
+ * Replace the prompt-cache report; true when it differs from the previous one. Stamps
663
+ * `compactedAt` when this report ENTERS the window in which Claude Code reads
664
+ * `recacheTokensIfCold` as null: a compaction (`/compact` or its own idle compaction) or
665
+ * a clearing of old tool results opened it, and the previous report still had a known
666
+ * value. Claude Code closes the window on the next request (that request is the one that
667
+ * counts as an expected rebuild), so `expectedRebuilds` never rises inside it and is not
668
+ * read here. The stamp is carried while the window holds and dropped once it closes; a
669
+ * first report already inside the window gets none. It is never an alert.
670
+ */
671
+ setPromptCache(status: PromptCacheStatus): boolean;
648
672
  /**
649
673
  * Check if the session's process tree has active child processes beyond Claude itself.
650
674
  * Detects running bash tools, test suites, builds, servers, etc. that Claude spawned.
@@ -883,6 +907,8 @@ export declare class Session extends EventEmitter {
883
907
  autoCompactPrompt?: string;
884
908
  autoResumeEnabled?: boolean;
885
909
  autoResumeAt?: number;
910
+ promptCache?: PromptCacheStatus;
911
+ statusLineExporter?: import("./types.js").StatusLineExporter;
886
912
  pinned?: boolean;
887
913
  pinnedAt?: number;
888
914
  imageWatcherEnabled?: boolean;
@@ -995,6 +1021,8 @@ export declare class Session extends EventEmitter {
995
1021
  autoCompactPrompt?: string;
996
1022
  autoResumeEnabled?: boolean;
997
1023
  autoResumeAt?: number;
1024
+ promptCache?: PromptCacheStatus;
1025
+ statusLineExporter?: import("./types.js").StatusLineExporter;
998
1026
  pinned?: boolean;
999
1027
  pinnedAt?: number;
1000
1028
  imageWatcherEnabled?: boolean;