aicodeman 1.42.0 → 1.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/README.md +13 -12
  2. package/dist/claude-session-title.d.ts +6 -4
  3. package/dist/claude-session-title.d.ts.map +1 -1
  4. package/dist/claude-session-title.js +6 -4
  5. package/dist/claude-session-title.js.map +1 -1
  6. package/dist/cli-agent.d.ts +3 -3
  7. package/dist/cli-agent.d.ts.map +1 -1
  8. package/dist/cli-agent.js +8 -6
  9. package/dist/cli-agent.js.map +1 -1
  10. package/dist/config/cli-registry/patterns.d.ts +1 -1
  11. package/dist/config/cli-registry/patterns.d.ts.map +1 -1
  12. package/dist/config/cli-registry/patterns.js +3 -0
  13. package/dist/config/cli-registry/patterns.js.map +1 -1
  14. package/dist/config/cli-registry/schema.d.ts +1 -0
  15. package/dist/config/cli-registry/schema.d.ts.map +1 -1
  16. package/dist/config/cli-registry/schema.js +5 -3
  17. package/dist/config/cli-registry/schema.js.map +1 -1
  18. package/dist/config/cli-registry/stock.d.ts.map +1 -1
  19. package/dist/config/cli-registry/stock.js +263 -4
  20. package/dist/config/cli-registry/stock.js.map +1 -1
  21. package/dist/config/cli-registry/types.d.ts +13 -5
  22. package/dist/config/cli-registry/types.d.ts.map +1 -1
  23. package/dist/config/map-limits.d.ts +13 -1
  24. package/dist/config/map-limits.d.ts.map +1 -1
  25. package/dist/config/map-limits.js +28 -1
  26. package/dist/config/map-limits.js.map +1 -1
  27. package/dist/config-backup.d.ts +279 -0
  28. package/dist/config-backup.d.ts.map +1 -0
  29. package/dist/config-backup.js +794 -0
  30. package/dist/config-backup.js.map +1 -0
  31. package/dist/cron/cron-service.d.ts +5 -5
  32. package/dist/cron/cron-service.js +6 -6
  33. package/dist/cron/cron-service.js.map +1 -1
  34. package/dist/custom-model-hosts.d.ts +16 -0
  35. package/dist/custom-model-hosts.d.ts.map +1 -1
  36. package/dist/custom-model-hosts.js.map +1 -1
  37. package/dist/hooks-config.d.ts +24 -0
  38. package/dist/hooks-config.d.ts.map +1 -1
  39. package/dist/hooks-config.js +47 -0
  40. package/dist/hooks-config.js.map +1 -1
  41. package/dist/intent-store.d.ts +2 -0
  42. package/dist/intent-store.d.ts.map +1 -1
  43. package/dist/intent-store.js +9 -0
  44. package/dist/intent-store.js.map +1 -1
  45. package/dist/mcp-sync-targets.d.ts +6 -3
  46. package/dist/mcp-sync-targets.d.ts.map +1 -1
  47. package/dist/mcp-sync-targets.js +6 -3
  48. package/dist/mcp-sync-targets.js.map +1 -1
  49. package/dist/mux-interface.d.ts +28 -7
  50. package/dist/mux-interface.d.ts.map +1 -1
  51. package/dist/prompt-cache-keepwarm.d.ts +193 -0
  52. package/dist/prompt-cache-keepwarm.d.ts.map +1 -0
  53. package/dist/prompt-cache-keepwarm.js +359 -0
  54. package/dist/prompt-cache-keepwarm.js.map +1 -0
  55. package/dist/respawn-controller.d.ts.map +1 -1
  56. package/dist/respawn-controller.js +6 -5
  57. package/dist/respawn-controller.js.map +1 -1
  58. package/dist/session-auto-ops.d.ts.map +1 -1
  59. package/dist/session-auto-ops.js +6 -1
  60. package/dist/session-auto-ops.js.map +1 -1
  61. package/dist/session-cli-registry-bridge.d.ts +15 -1
  62. package/dist/session-cli-registry-bridge.d.ts.map +1 -1
  63. package/dist/session-cli-registry-bridge.js +20 -3
  64. package/dist/session-cli-registry-bridge.js.map +1 -1
  65. package/dist/session-submit-verifier.d.ts +19 -0
  66. package/dist/session-submit-verifier.d.ts.map +1 -1
  67. package/dist/session-submit-verifier.js +88 -0
  68. package/dist/session-submit-verifier.js.map +1 -1
  69. package/dist/session.d.ts +83 -12
  70. package/dist/session.d.ts.map +1 -1
  71. package/dist/session.js +150 -16
  72. package/dist/session.js.map +1 -1
  73. package/dist/state-store.d.ts +10 -0
  74. package/dist/state-store.d.ts.map +1 -1
  75. package/dist/state-store.js +35 -0
  76. package/dist/state-store.js.map +1 -1
  77. package/dist/tab-layout-service.d.ts +33 -0
  78. package/dist/tab-layout-service.d.ts.map +1 -1
  79. package/dist/tab-layout-service.js +75 -3
  80. package/dist/tab-layout-service.js.map +1 -1
  81. package/dist/tmux-manager.d.ts +52 -9
  82. package/dist/tmux-manager.d.ts.map +1 -1
  83. package/dist/tmux-manager.js +148 -30
  84. package/dist/tmux-manager.js.map +1 -1
  85. package/dist/tmux-prefix-table.d.ts +54 -0
  86. package/dist/tmux-prefix-table.d.ts.map +1 -0
  87. package/dist/tmux-prefix-table.js +137 -0
  88. package/dist/tmux-prefix-table.js.map +1 -0
  89. package/dist/tui/tui-app.d.ts +9 -1
  90. package/dist/tui/tui-app.d.ts.map +1 -1
  91. package/dist/tui/tui-app.js +21 -8
  92. package/dist/tui/tui-app.js.map +1 -1
  93. package/dist/tui/tui-client.d.ts +3 -2
  94. package/dist/tui/tui-client.d.ts.map +1 -1
  95. package/dist/tui/tui-client.js +3 -2
  96. package/dist/tui/tui-client.js.map +1 -1
  97. package/dist/types/app-state.d.ts +6 -0
  98. package/dist/types/app-state.d.ts.map +1 -1
  99. package/dist/types/app-state.js.map +1 -1
  100. package/dist/types/session.d.ts +72 -5
  101. package/dist/types/session.d.ts.map +1 -1
  102. package/dist/types/session.js +2 -1
  103. package/dist/types/session.js.map +1 -1
  104. package/dist/usage-telemetry.d.ts +15 -0
  105. package/dist/usage-telemetry.d.ts.map +1 -1
  106. package/dist/usage-telemetry.js +45 -2
  107. package/dist/usage-telemetry.js.map +1 -1
  108. package/dist/utils/cli-installed-probes.d.ts +1 -1
  109. package/dist/utils/cli-installed-probes.d.ts.map +1 -1
  110. package/dist/utils/cli-installed-probes.js +4 -2
  111. package/dist/utils/cli-installed-probes.js.map +1 -1
  112. package/dist/utils/copilot-cli-resolver.d.ts +48 -0
  113. package/dist/utils/copilot-cli-resolver.d.ts.map +1 -0
  114. package/dist/utils/copilot-cli-resolver.js +112 -0
  115. package/dist/utils/copilot-cli-resolver.js.map +1 -0
  116. package/dist/utils/copilot-plan-usage.d.ts +46 -0
  117. package/dist/utils/copilot-plan-usage.d.ts.map +1 -0
  118. package/dist/utils/copilot-plan-usage.js +95 -0
  119. package/dist/utils/copilot-plan-usage.js.map +1 -0
  120. package/dist/utils/index.d.ts +3 -0
  121. package/dist/utils/index.d.ts.map +1 -1
  122. package/dist/utils/index.js +3 -0
  123. package/dist/utils/index.js.map +1 -1
  124. package/dist/utils/single-line.d.ts +22 -0
  125. package/dist/utils/single-line.d.ts.map +1 -0
  126. package/dist/utils/single-line.js +30 -0
  127. package/dist/utils/single-line.js.map +1 -0
  128. package/dist/web/approval-inbox.d.ts +6 -0
  129. package/dist/web/approval-inbox.d.ts.map +1 -1
  130. package/dist/web/approval-inbox.js +2 -2
  131. package/dist/web/approval-inbox.js.map +1 -1
  132. package/dist/web/case-path.d.ts +4 -2
  133. package/dist/web/case-path.d.ts.map +1 -1
  134. package/dist/web/case-path.js +13 -4
  135. package/dist/web/case-path.js.map +1 -1
  136. package/dist/web/plan-usage-latest.d.ts +2 -1
  137. package/dist/web/plan-usage-latest.d.ts.map +1 -1
  138. package/dist/web/plan-usage-latest.js +12 -2
  139. package/dist/web/plan-usage-latest.js.map +1 -1
  140. package/dist/web/ports/index.d.ts +1 -0
  141. package/dist/web/ports/index.d.ts.map +1 -1
  142. package/dist/web/ports/keep-warm-port.d.ts +9 -0
  143. package/dist/web/ports/keep-warm-port.d.ts.map +1 -0
  144. package/dist/web/ports/keep-warm-port.js +6 -0
  145. package/dist/web/ports/keep-warm-port.js.map +1 -0
  146. package/dist/web/ports/session-port.d.ts +3 -1
  147. package/dist/web/ports/session-port.d.ts.map +1 -1
  148. package/dist/web/public/admin-ui.js.gz +0 -0
  149. package/dist/web/public/api-client.c9b1cddc.js.gz +0 -0
  150. package/dist/web/public/app.9314ee60.js +43 -0
  151. package/dist/web/public/app.9314ee60.js.br +0 -0
  152. package/dist/web/public/app.9314ee60.js.gz +0 -0
  153. package/dist/web/public/approvals-ui.js.gz +0 -0
  154. package/dist/web/public/{constants.12b0c247.js → constants.4866ecc3.js} +205 -3
  155. package/dist/web/public/constants.4866ecc3.js.br +0 -0
  156. package/dist/web/public/constants.4866ecc3.js.gz +0 -0
  157. package/dist/web/public/cron-ui.js.gz +0 -0
  158. package/dist/web/public/entrance-animations.js.gz +0 -0
  159. package/dist/web/public/git-status-ui.js.gz +0 -0
  160. package/dist/web/public/home-sessions.js.gz +0 -0
  161. package/dist/web/public/host-wake-ui.js.gz +0 -0
  162. package/dist/web/public/i18n.22ca902b.js +2 -0
  163. package/dist/web/public/i18n.22ca902b.js.br +0 -0
  164. package/dist/web/public/i18n.22ca902b.js.gz +0 -0
  165. package/dist/web/public/{image-input.fcdcb46c.js → image-input.941386e7.js} +24 -14
  166. package/dist/web/public/image-input.941386e7.js.br +0 -0
  167. package/dist/web/public/image-input.941386e7.js.gz +0 -0
  168. package/dist/web/public/index.html +110 -16
  169. package/dist/web/public/index.html.br +0 -0
  170. package/dist/web/public/index.html.gz +0 -0
  171. package/dist/web/public/input-cjk.8bc46081.js.gz +0 -0
  172. package/dist/web/public/{keyboard-accessory.b42f539b.js → keyboard-accessory.4e8b20ac.js} +51 -22
  173. package/dist/web/public/keyboard-accessory.4e8b20ac.js.br +0 -0
  174. package/dist/web/public/keyboard-accessory.4e8b20ac.js.gz +0 -0
  175. package/dist/web/public/{mobile-handlers.0ef9c311.js → mobile-handlers.44adaa07.js} +48 -16
  176. package/dist/web/public/mobile-handlers.44adaa07.js.br +0 -0
  177. package/dist/web/public/mobile-handlers.44adaa07.js.gz +0 -0
  178. package/dist/web/public/mobile-ime-preview.2dbaf262.js.gz +0 -0
  179. package/dist/web/public/mobile-overview.js +1 -0
  180. package/dist/web/public/mobile-overview.js.br +0 -0
  181. package/dist/web/public/mobile-overview.js.gz +0 -0
  182. package/dist/web/public/mobile.12fb18de.css +1 -0
  183. package/dist/web/public/mobile.12fb18de.css.br +0 -0
  184. package/dist/web/public/mobile.12fb18de.css.gz +0 -0
  185. package/dist/web/public/notification-manager.feb82c04.js.gz +0 -0
  186. package/dist/web/public/orchestrator-panel.js.gz +0 -0
  187. package/dist/web/public/{panels-ui.73ec0137.js → panels-ui.cbb24ba1.js} +66 -66
  188. package/dist/web/public/panels-ui.cbb24ba1.js.br +0 -0
  189. package/dist/web/public/panels-ui.cbb24ba1.js.gz +0 -0
  190. package/dist/web/public/ralph-panel.b350e2ef.js.gz +0 -0
  191. package/dist/web/public/ralph-wizard.b6c0dd19.js.gz +0 -0
  192. package/dist/web/public/readmymind-ui.js.gz +0 -0
  193. package/dist/web/public/reboot-restore-ui.js.gz +0 -0
  194. package/dist/web/public/respawn-ui.d7adcf6a.js.gz +0 -0
  195. package/dist/web/public/sanitize-html.e7147e76.js.gz +0 -0
  196. package/dist/web/public/security-notices.json +21 -0
  197. package/dist/web/public/session-lineage.js.gz +0 -0
  198. package/dist/web/public/{session-ui.d52ff6aa.js → session-ui.9c1f009b.js} +8 -4
  199. package/dist/web/public/session-ui.9c1f009b.js.br +0 -0
  200. package/dist/web/public/session-ui.9c1f009b.js.gz +0 -0
  201. package/dist/web/public/settings-ui.fea9ddae.js +106 -0
  202. package/dist/web/public/settings-ui.fea9ddae.js.br +0 -0
  203. package/dist/web/public/settings-ui.fea9ddae.js.gz +0 -0
  204. package/dist/web/public/spreadsheet-preview-worker.js.gz +0 -0
  205. package/dist/web/public/spreadsheet-preview.75c751de.js.gz +0 -0
  206. package/dist/web/public/spreadsheet-xlsx-core.js.gz +0 -0
  207. package/dist/web/public/styles.e096fcd6.css +1 -0
  208. package/dist/web/public/styles.e096fcd6.css.br +0 -0
  209. package/dist/web/public/styles.e096fcd6.css.gz +0 -0
  210. package/dist/web/public/subagent-windows.07277a58.js.gz +0 -0
  211. package/dist/web/public/sw.js +2 -2
  212. package/dist/web/public/sw.js.br +0 -0
  213. package/dist/web/public/sw.js.gz +0 -0
  214. package/dist/web/public/tab-layout-browser.2d6189f7.js.gz +0 -0
  215. package/dist/web/public/tab-rail-resize.7157e0bd.js.gz +0 -0
  216. package/dist/web/public/terminal-keycode229-recovery.af09f99a.js.gz +0 -0
  217. package/dist/web/public/terminal-split.js.gz +0 -0
  218. package/dist/web/public/terminal-tile.js +41 -22
  219. package/dist/web/public/terminal-tile.js.br +0 -0
  220. package/dist/web/public/terminal-tile.js.gz +0 -0
  221. package/dist/web/public/terminal-ui.68dbd352.js +2 -0
  222. package/dist/web/public/terminal-ui.68dbd352.js.br +0 -0
  223. package/dist/web/public/terminal-ui.68dbd352.js.gz +0 -0
  224. package/dist/web/public/tile-grid.js +3 -6
  225. package/dist/web/public/tile-grid.js.br +0 -0
  226. package/dist/web/public/tile-grid.js.gz +0 -0
  227. package/dist/web/public/ultracode-panel.js.gz +0 -0
  228. package/dist/web/public/ultracode-windows.js.gz +0 -0
  229. package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
  230. package/dist/web/public/vendor/exceljs.min.js.gz +0 -0
  231. package/dist/web/public/vendor/fflate.min.js.gz +0 -0
  232. package/dist/web/public/vendor/marked.min.js.gz +0 -0
  233. package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
  234. package/dist/web/public/vendor/xterm-addon-serialize.min.js.gz +0 -0
  235. package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
  236. package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
  237. package/dist/web/public/vendor/xterm-predictive-echo.ae5e3d5d.js.gz +0 -0
  238. package/dist/web/public/vendor/xterm-zerolag-input.0b69623c.js.gz +0 -0
  239. package/dist/web/public/vendor/xterm.css.gz +0 -0
  240. package/dist/web/public/vendor/xterm.min.js.gz +0 -0
  241. package/dist/web/public/voice-input.2342c37b.js.gz +0 -0
  242. package/dist/web/public/voice-pcm-worklet.js.gz +0 -0
  243. package/dist/web/public/webview-tabs.js.gz +0 -0
  244. package/dist/web/public/whats-new.json +9 -9
  245. package/dist/web/response-viewer-transcript.d.ts +6 -0
  246. package/dist/web/response-viewer-transcript.d.ts.map +1 -1
  247. package/dist/web/response-viewer-transcript.js +134 -1
  248. package/dist/web/response-viewer-transcript.js.map +1 -1
  249. package/dist/web/routes/admin-routes.d.ts +2 -1
  250. package/dist/web/routes/admin-routes.d.ts.map +1 -1
  251. package/dist/web/routes/admin-routes.js +3 -0
  252. package/dist/web/routes/admin-routes.js.map +1 -1
  253. package/dist/web/routes/case-routes.d.ts +2 -2
  254. package/dist/web/routes/case-routes.d.ts.map +1 -1
  255. package/dist/web/routes/case-routes.js +81 -3
  256. package/dist/web/routes/case-routes.js.map +1 -1
  257. package/dist/web/routes/config-backup-routes.d.ts +54 -0
  258. package/dist/web/routes/config-backup-routes.d.ts.map +1 -0
  259. package/dist/web/routes/config-backup-routes.js +268 -0
  260. package/dist/web/routes/config-backup-routes.js.map +1 -0
  261. package/dist/web/routes/custom-model-routes.d.ts +17 -1
  262. package/dist/web/routes/custom-model-routes.d.ts.map +1 -1
  263. package/dist/web/routes/custom-model-routes.js +118 -13
  264. package/dist/web/routes/custom-model-routes.js.map +1 -1
  265. package/dist/web/routes/hook-event-routes.d.ts.map +1 -1
  266. package/dist/web/routes/hook-event-routes.js +26 -5
  267. package/dist/web/routes/hook-event-routes.js.map +1 -1
  268. package/dist/web/routes/index.d.ts +1 -0
  269. package/dist/web/routes/index.d.ts.map +1 -1
  270. package/dist/web/routes/index.js +1 -0
  271. package/dist/web/routes/index.js.map +1 -1
  272. package/dist/web/routes/mcp-sync-routes.d.ts +4 -4
  273. package/dist/web/routes/mcp-sync-routes.js +4 -4
  274. package/dist/web/routes/ralph-routes.js +2 -2
  275. package/dist/web/routes/ralph-routes.js.map +1 -1
  276. package/dist/web/routes/reboot-restore-routes.d.ts.map +1 -1
  277. package/dist/web/routes/reboot-restore-routes.js +2 -0
  278. package/dist/web/routes/reboot-restore-routes.js.map +1 -1
  279. package/dist/web/routes/session-routes.d.ts +14 -4
  280. package/dist/web/routes/session-routes.d.ts.map +1 -1
  281. package/dist/web/routes/session-routes.js +131 -30
  282. package/dist/web/routes/session-routes.js.map +1 -1
  283. package/dist/web/routes/status-telemetry-routes.d.ts +2 -2
  284. package/dist/web/routes/status-telemetry-routes.d.ts.map +1 -1
  285. package/dist/web/routes/status-telemetry-routes.js +8 -4
  286. package/dist/web/routes/status-telemetry-routes.js.map +1 -1
  287. package/dist/web/routes/system-routes.d.ts +2 -2
  288. package/dist/web/routes/system-routes.d.ts.map +1 -1
  289. package/dist/web/routes/system-routes.js +18 -0
  290. package/dist/web/routes/system-routes.js.map +1 -1
  291. package/dist/web/routes/webview-routes.d.ts.map +1 -1
  292. package/dist/web/routes/webview-routes.js +1 -0
  293. package/dist/web/routes/webview-routes.js.map +1 -1
  294. package/dist/web/schemas.d.ts +32 -0
  295. package/dist/web/schemas.d.ts.map +1 -1
  296. package/dist/web/schemas.js +64 -4
  297. package/dist/web/schemas.js.map +1 -1
  298. package/dist/web/server.d.ts +12 -2
  299. package/dist/web/server.d.ts.map +1 -1
  300. package/dist/web/server.js +127 -6
  301. package/dist/web/server.js.map +1 -1
  302. package/dist/web/session-listener-wiring.d.ts +6 -0
  303. package/dist/web/session-listener-wiring.d.ts.map +1 -1
  304. package/dist/web/session-listener-wiring.js +10 -3
  305. package/dist/web/session-listener-wiring.js.map +1 -1
  306. package/dist/web/sse-events.d.ts +5 -2
  307. package/dist/web/sse-events.d.ts.map +1 -1
  308. package/dist/web/sse-events.js +5 -2
  309. package/dist/web/sse-events.js.map +1 -1
  310. package/dist/web/webview-proxy.d.ts +8 -3
  311. package/dist/web/webview-proxy.d.ts.map +1 -1
  312. package/dist/web/webview-proxy.js +23 -5
  313. package/dist/web/webview-proxy.js.map +1 -1
  314. package/package.json +1 -1
  315. package/skills/codeman/SKILL.md +23 -11
  316. package/skills/codeman/preamble.sh +12 -2
  317. package/skills/codeman/reference/endpoints.md +16 -15
  318. package/skills/codeman/reference/messaging.md +5 -5
  319. package/skills/codeman/reference/recipes.md +2 -2
  320. package/skills/codeman/reference/verbs.md +25 -17
  321. package/dist/web/public/app.f04bb2a5.js +0 -43
  322. package/dist/web/public/app.f04bb2a5.js.br +0 -0
  323. package/dist/web/public/app.f04bb2a5.js.gz +0 -0
  324. package/dist/web/public/constants.12b0c247.js.br +0 -0
  325. package/dist/web/public/constants.12b0c247.js.gz +0 -0
  326. package/dist/web/public/i18n.06659676.js +0 -2
  327. package/dist/web/public/i18n.06659676.js.br +0 -0
  328. package/dist/web/public/i18n.06659676.js.gz +0 -0
  329. package/dist/web/public/image-input.fcdcb46c.js.br +0 -0
  330. package/dist/web/public/image-input.fcdcb46c.js.gz +0 -0
  331. package/dist/web/public/keyboard-accessory.b42f539b.js.br +0 -0
  332. package/dist/web/public/keyboard-accessory.b42f539b.js.gz +0 -0
  333. package/dist/web/public/mobile-handlers.0ef9c311.js.br +0 -0
  334. package/dist/web/public/mobile-handlers.0ef9c311.js.gz +0 -0
  335. package/dist/web/public/mobile.2dff1580.css +0 -1
  336. package/dist/web/public/mobile.2dff1580.css.br +0 -0
  337. package/dist/web/public/mobile.2dff1580.css.gz +0 -0
  338. package/dist/web/public/panels-ui.73ec0137.js.br +0 -0
  339. package/dist/web/public/panels-ui.73ec0137.js.gz +0 -0
  340. package/dist/web/public/session-ui.d52ff6aa.js.br +0 -0
  341. package/dist/web/public/session-ui.d52ff6aa.js.gz +0 -0
  342. package/dist/web/public/settings-ui.3a22bd2a.js +0 -97
  343. package/dist/web/public/settings-ui.3a22bd2a.js.br +0 -0
  344. package/dist/web/public/settings-ui.3a22bd2a.js.gz +0 -0
  345. package/dist/web/public/styles.ba6a9b84.css +0 -1
  346. package/dist/web/public/styles.ba6a9b84.css.br +0 -0
  347. package/dist/web/public/styles.ba6a9b84.css.gz +0 -0
  348. package/dist/web/public/terminal-ui.0a7ccc29.js +0 -2
  349. package/dist/web/public/terminal-ui.0a7ccc29.js.br +0 -0
  350. package/dist/web/public/terminal-ui.0a7ccc29.js.gz +0 -0
package/dist/session.js CHANGED
@@ -49,6 +49,7 @@ import { DEFAULT_TMUX_HISTORY_LIMIT } from './config/terminal-history.js';
49
49
  import { EXEC_TIMEOUT_MS } from './config/exec-timeout.js';
50
50
  import { getCli } from './config/cli-registry/registry.js';
51
51
  import { SubmitVerifier } from './session-submit-verifier.js';
52
+ import { KEEP_WARM_NUDGE } from './prompt-cache-keepwarm.js';
52
53
  import { compileVersionRegex } from './config/cli-registry/patterns.js';
53
54
  import { resolveSessionCliVersion } from './utils/cli-resolver.js';
54
55
  import { buildInteractiveArgs, buildPromptArgs, buildClaudeEnv, buildMuxAttachEnv, buildShellEnv, } from './session-cli-builder.js';
@@ -297,6 +298,14 @@ export function resolveMuxAttachCwd(workingDir, remote, docker) {
297
298
  // wrapper pane never needs the workspace as its cwd, so launch it in /tmp.
298
299
  return remote || docker ? '/tmp' : workingDir;
299
300
  }
301
+ /**
302
+ * Whether a programmatic write leaves the keep-alive turn running: the nudge itself, or a bare
303
+ * Enter (which submits nothing new). Anything else carrying an Enter starts a turn of its own.
304
+ */
305
+ function isKeepAliveWrite(data) {
306
+ const text = data.replace(/[\r\n]/g, '').trim();
307
+ return text === '' || text === KEEP_WARM_NUDGE;
308
+ }
300
309
  /**
301
310
  * Event signatures emitted by the Session class.
302
311
  * Subscribe using `session.on('eventName', handler)`.
@@ -341,6 +350,8 @@ export class Session extends EventEmitter {
341
350
  _taskCache = new SessionTaskCache();
342
351
  _name;
343
352
  _nameSource;
353
+ /** `pinCliSessionName` as of the last spawn (see {@link _refreshCliNamePin}). */
354
+ _pinEveryCliName = false;
344
355
  /**
345
356
  * Reconstructs the composer draft from USER keystrokes so the first real
346
357
  * prompt can name the tab. Fed only when a write says `fromUser`, and never
@@ -434,6 +445,16 @@ export class Session extends EventEmitter {
434
445
  _watching = null;
435
446
  /** Last `prompt_cache` report from the statusline exporter; null until Claude sends one. */
436
447
  _promptCache = null;
448
+ /** Prompt-cache keep-warm opt-in; undefined = follow the app-wide default. Persisted. */
449
+ _keepWarmEnabled;
450
+ /** Last status the keep-warm service published for this session; ephemeral. */
451
+ _keepWarm = null;
452
+ /** Until when the current turn counts as Codeman's own keep-alive (hooks open pre-acknowledged). */
453
+ _keepAliveTurnUntil = 0;
454
+ /** Last keystroke a person sent through a `fromUser` write. */
455
+ _lastHumanInputAt = 0;
456
+ /** Last submit that was not the keep-alive's own; the keep-warm cap's clock. Persisted. */
457
+ _lastRealPromptAt = 0;
437
458
  /** Lazily compiled `capabilities.workDetect.workingLine`. See _workingLinePattern(). */
438
459
  _workingLineRe = undefined;
439
460
  /** Lazily compiled `capabilities.workDetect.watchingLine`. See _watchingLinePattern(). */
@@ -573,6 +594,8 @@ export class Session extends EventEmitter {
573
594
  _piConfig;
574
595
  // Grok configuration (only for mode === 'grok')
575
596
  _grokConfig;
597
+ // GitHub Copilot configuration (only for mode === 'copilot')
598
+ _copilotConfig;
576
599
  // DeepSeek Harness configuration (only for mode === 'deepseek')
577
600
  _deepSeekConfig;
578
601
  // OMP configuration (only for mode === 'omp')
@@ -613,7 +636,7 @@ export class Session extends EventEmitter {
613
636
  _owner;
614
637
  // The session that spawned this one (tab lineage lines). Resolved by the create
615
638
  // route before it reaches here, so this is always either an id that existed at
616
- // create time or undefined. Decoration only — see SessionState.parentSessionId.
639
+ // create time or undefined. Decoration only (plus the keep-warm default); see SessionState.parentSessionId.
617
640
  _parentSessionId;
618
641
  // Session color for visual differentiation
619
642
  _color = 'default';
@@ -683,6 +706,10 @@ export class Session extends EventEmitter {
683
706
  // response viewer re-derive the live conversation without waiting for the
684
707
  // user to type again.
685
708
  this._lastSubmitAt = config.lastSubmitAt ?? 0;
709
+ // Restored so a restart neither reopens the keep-warm window nor drops the choice. A state.json
710
+ // from before the field has only `lastSubmitAt`, and every submit then was a real one.
711
+ this._lastRealPromptAt = config.lastRealPromptAt ?? config.lastSubmitAt ?? 0;
712
+ this._keepWarmEnabled = config.keepWarmEnabled;
686
713
  // Restored chain: its tail is the conversation the CLI was actually on when
687
714
  // the server stopped, which outranks the launch id seeded just above. The
688
715
  // FIRST-HAND flag is deliberately NOT restored — a persisted claim is not a
@@ -741,6 +768,10 @@ export class Session extends EventEmitter {
741
768
  if (config.grokConfig) {
742
769
  this._grokConfig = config.grokConfig;
743
770
  }
771
+ // Apply GitHub Copilot configuration
772
+ if (config.copilotConfig) {
773
+ this._copilotConfig = config.copilotConfig;
774
+ }
744
775
  // Apply env overrides (exported at spawn, not persisted to disk).
745
776
  // Legacy migration: pre-0.7.2 carried effort as the CLAUDE_CODE_EFFORT_LEVEL env var,
746
777
  // which hard-locks /effort switching. Extract it into _effort (--settings soft default)
@@ -1137,11 +1168,15 @@ export class Session extends EventEmitter {
1137
1168
  * report. It rides `toState()` for the Session Options readout and is restored on a
1138
1169
  * Codeman restart (constructor `promptCache`) so the row is not blank until the pane's
1139
1170
  * next render; the readout is time-aware, so a value whose `expiresAt` has passed renders
1140
- * as cold rather than as a stale warm.
1171
+ * as cold rather than as a stale warm, and a future one lets the keep-warm re-arm without a turn.
1141
1172
  */
1142
1173
  get promptCache() {
1143
1174
  return this._promptCache;
1144
1175
  }
1176
+ /** Whether the current launch carries the statusLine exporter (`MuxSession.statusLine`); undefined when unknown. */
1177
+ get statusLineExporter() {
1178
+ return this._muxSession?.statusLine;
1179
+ }
1145
1180
  /**
1146
1181
  * Replace the prompt-cache report; true when it differs from the previous one. Stamps
1147
1182
  * `compactedAt` when this report ENTERS the window in which Claude Code reads
@@ -1170,6 +1205,56 @@ export class Session extends EventEmitter {
1170
1205
  this._promptCache = next;
1171
1206
  return changed;
1172
1207
  }
1208
+ /** Prompt-cache keep-warm opt-in; undefined means the app-wide default applies. */
1209
+ get keepWarmEnabled() {
1210
+ return this._keepWarmEnabled;
1211
+ }
1212
+ setKeepWarmEnabled(enabled) {
1213
+ this._keepWarmEnabled = enabled;
1214
+ }
1215
+ /** What the keep-warm service last published for this session, or null before its first evaluation. */
1216
+ get keepWarm() {
1217
+ return this._keepWarm;
1218
+ }
1219
+ /** Replace the keep-warm status; true when it differs from the previous one. */
1220
+ setKeepWarmStatus(status) {
1221
+ const changed = JSON.stringify(status) !== JSON.stringify(this._keepWarm);
1222
+ this._keepWarm = status;
1223
+ return changed;
1224
+ }
1225
+ /**
1226
+ * True while the running turn is Codeman's own keep-alive nudge: its stop hook and idle
1227
+ * prompt open pre-acknowledged, and its submit moves `lastSubmitAt` (it IS a submit, and the
1228
+ * response viewer's conversation correlation needs it) but not `lastRealPromptAt`. The turn's
1229
+ * own idle prompt ends it (`endKeepAliveTurn()`), and so does any other submit: a `fromUser`
1230
+ * write, a programmatic write of anything but the nudge, or a `prompt_submitted` hook for
1231
+ * another prompt, so a prompt right after a nudge counts and alerts normally.
1232
+ */
1233
+ get keepAliveTurnActive() {
1234
+ return Date.now() < this._keepAliveTurnUntil;
1235
+ }
1236
+ beginKeepAliveTurn(windowMs) {
1237
+ this._keepAliveTurnUntil = Date.now() + windowMs;
1238
+ }
1239
+ endKeepAliveTurn() {
1240
+ this._keepAliveTurnUntil = 0;
1241
+ }
1242
+ /** Last keystroke a person sent (`fromUser` write), epoch ms; 0 when none this process. */
1243
+ get lastHumanInputAt() {
1244
+ return this._lastHumanInputAt;
1245
+ }
1246
+ /**
1247
+ * Last submit that was not the keep-alive's own, from any writer or the UserPromptSubmit hook
1248
+ * (a person typing in an attached tmux client reaches Codeman only through the hook); epoch
1249
+ * ms, 0 if none. The keep-warm cap counts from it; persisted so a restart keeps it.
1250
+ */
1251
+ get lastRealPromptAt() {
1252
+ return this._lastRealPromptAt;
1253
+ }
1254
+ /** Whether this launch carries `idleCompaction: false` (`MuxSession.idleCompactionOff`). */
1255
+ get idleCompactionOptOut() {
1256
+ return this._muxSession?.idleCompactionOff === true;
1257
+ }
1173
1258
  /**
1174
1259
  * Check if the session's process tree has active child processes beyond Claude itself.
1175
1260
  * Detects running bash tools, test suites, builds, servers, etc. that Claude spawned.
@@ -1434,16 +1519,31 @@ export class Session extends EventEmitter {
1434
1519
  return this._nameSource;
1435
1520
  }
1436
1521
  /**
1437
- * The name to pin on the Claude CLI as `--name`, or undefined to let Claude
1438
- * title the conversation itself. `--name` is the prompt-box label, the
1439
- * `/resume` picker entry and the terminal title all at once, and a pinned
1440
- * title stops Claude generating its own, so only a name the user chose is
1441
- * worth pinning. Pinning the `w1-myapp` placeholder gave every conversation
1442
- * in a case the same `/resume` entry; an auto name is a cut of the first
1443
- * prompt, which Claude's own generated title already beats.
1522
+ * The name to pin on the Claude CLI as `--name`, or undefined to let Claude title the
1523
+ * conversation itself. `--name` is the prompt-box label, the `/resume` picker entry and the
1524
+ * terminal title all at once, and a pinned title stops Claude generating its own.
1525
+ *
1526
+ * By default only a name the user chose is pinned. Pinning the `w1-myapp` placeholder gave
1527
+ * every conversation in a case the same `/resume` entry (the tab number restarts once a
1528
+ * case's tabs are closed), and an auto name is a cut of the first prompt, which Claude's
1529
+ * own generated title already beats.
1530
+ *
1531
+ * With the opt-in `pinCliSessionName` setting every non-blank tab name is pinned, so the
1532
+ * CLI's labels read the same as the tabs, at the cost of those generated titles. A rename
1533
+ * in Codeman then holds only until the next turn: a process started with `--name`
1534
+ * re-appends its in-memory title (see claude-session-title.ts). The setting is re-read
1535
+ * at each spawn and respawn by {@link _refreshCliNamePin}.
1444
1536
  */
1445
1537
  get cliPinnedName() {
1446
- return this._nameSource === 'manual' ? this._name : undefined;
1538
+ if (!this._pinEveryCliName)
1539
+ return this._nameSource === 'manual' ? this._name : undefined;
1540
+ return this._name.trim() ? this._name : undefined;
1541
+ }
1542
+ /** Re-read `pinCliSessionName` so `cliPinnedName` decides per launch, with no server restart. */
1543
+ async _refreshCliNamePin() {
1544
+ // Dynamic: hooks-config -> route-helpers imports Session, so a static import would be a cycle.
1545
+ const { readPinCliSessionNameEnabled } = await import('./hooks-config.js');
1546
+ this._pinEveryCliName = await readPinCliSessionNameEnabled();
1447
1547
  }
1448
1548
  setAutoClear(enabled, threshold) {
1449
1549
  this._autoOps.setAutoClear(enabled, threshold);
@@ -1585,7 +1685,9 @@ export class Session extends EventEmitter {
1585
1685
  autoResumeEnabled: this._autoOps.autoResumeEnabled,
1586
1686
  autoResumeAt: this._autoOps.autoResumeAt ?? undefined,
1587
1687
  promptCache: this._promptCache ?? undefined,
1588
- statusLineExporter: this._muxSession?.statusLine,
1688
+ statusLineExporter: this.statusLineExporter,
1689
+ keepWarmEnabled: this._keepWarmEnabled,
1690
+ keepWarm: this._keepWarm ?? undefined,
1589
1691
  imageWatcherEnabled: this._imageWatcherEnabled,
1590
1692
  pinned: this._pinned || undefined,
1591
1693
  pinnedAt: this._pinned ? (this._pinnedAt ?? undefined) : undefined,
@@ -1612,6 +1714,7 @@ export class Session extends EventEmitter {
1612
1714
  antigravityConfig: this._antigravityConfig,
1613
1715
  piConfig: this._piConfig,
1614
1716
  grokConfig: this._grokConfig,
1717
+ copilotConfig: this._copilotConfig,
1615
1718
  deepSeekConfig: this._deepSeekConfig,
1616
1719
  ompConfig: this._ompConfig,
1617
1720
  resumeSessionId: this._resumeSessionId,
@@ -1633,6 +1736,7 @@ export class Session extends EventEmitter {
1633
1736
  paneExit: this._paneExit ?? undefined,
1634
1737
  attachmentHistory: this.attachmentHistory.length > 0 ? this.attachmentHistory : undefined,
1635
1738
  lastSubmitAt: this._lastSubmitAt || undefined,
1739
+ lastRealPromptAt: this._lastRealPromptAt || undefined,
1636
1740
  // Only a chain the CLI's own hooks vouched for is persisted, and only when
1637
1741
  // the pane actually moved conversation. Its LAST entry is the live one, so
1638
1742
  // it is also what restores `claudeSessionId` across a restart — `start()`
@@ -1963,6 +2067,7 @@ export class Session extends EventEmitter {
1963
2067
  antigravityConfig: this._antigravityConfig,
1964
2068
  piConfig: this._piConfig,
1965
2069
  grokConfig: this._grokConfig,
2070
+ copilotConfig: this._copilotConfig,
1966
2071
  deepSeekConfig: this._deepSeekConfig,
1967
2072
  // OMP resolution/pinning does NOT happen here. This object is built
1968
2073
  // EAGERLY — including on every boot-recovery reattach, before anyone
@@ -1979,6 +2084,8 @@ export class Session extends EventEmitter {
1979
2084
  unsetEnvKeys: this._pendingEnvUnsets.size > 0 ? [...this._pendingEnvUnsets] : undefined,
1980
2085
  effort: this._effort,
1981
2086
  advisorModel: this._advisorModel,
2087
+ keepWarm: this._keepWarmEnabled,
2088
+ spawnedByAgent: !!this._parentSessionId,
1982
2089
  historyLimit: this._tmuxHistoryLimit,
1983
2090
  remote: this._remote,
1984
2091
  docker: this._docker,
@@ -2056,6 +2163,7 @@ export class Session extends EventEmitter {
2056
2163
  * still inside it and renders no local `--session-id` to collide.
2057
2164
  */
2058
2165
  async _buildRespawnPaneOptionsWithResumePin() {
2166
+ await this._refreshCliNamePin();
2059
2167
  const options = this._buildRespawnPaneOptions();
2060
2168
  if (this._remote || this._docker)
2061
2169
  return options;
@@ -2320,6 +2428,7 @@ export class Session extends EventEmitter {
2320
2428
  if (this._closing) {
2321
2429
  throw new Error('Session is being closed');
2322
2430
  }
2431
+ await this._refreshCliNamePin();
2323
2432
  // Bounds the workspace-trust scan (see _maybeAcceptTrustDialog). Stamped here
2324
2433
  // rather than at PTY spawn so a slow mux attach still counts as startup.
2325
2434
  this._interactiveStartedAt = Date.now();
@@ -2439,12 +2548,15 @@ export class Session extends EventEmitter {
2439
2548
  antigravityConfig: this._antigravityConfig,
2440
2549
  piConfig: this._piConfig,
2441
2550
  grokConfig: this._grokConfig,
2551
+ copilotConfig: this._copilotConfig,
2442
2552
  deepSeekConfig: this._deepSeekConfig,
2443
2553
  ompConfig: this._ompConfig,
2444
2554
  resumeSessionId: this._resumeSessionId,
2445
2555
  envOverrides: this._envOverrides,
2446
2556
  effort: this._effort,
2447
2557
  advisorModel: this._advisorModel,
2558
+ keepWarm: this._keepWarmEnabled,
2559
+ spawnedByAgent: !!this._parentSessionId,
2448
2560
  historyLimit: this._tmuxHistoryLimit,
2449
2561
  remote: this._remote,
2450
2562
  docker: this._docker,
@@ -2977,6 +3089,7 @@ export class Session extends EventEmitter {
2977
3089
  antigravityConfig: this._antigravityConfig,
2978
3090
  piConfig: this._piConfig,
2979
3091
  grokConfig: this._grokConfig,
3092
+ copilotConfig: this._copilotConfig,
2980
3093
  deepSeekConfig: this._deepSeekConfig,
2981
3094
  ompConfig: this._ompConfig,
2982
3095
  };
@@ -4064,9 +4177,18 @@ export class Session extends EventEmitter {
4064
4177
  */
4065
4178
  _trackSubmit(data, options) {
4066
4179
  const submitted = options.fromUser && this._acceptsPrompts ? this._submittedPromptTracker.feed(data) : [];
4067
- if (data.includes('\r') || data.includes('\n')) {
4068
- this._lastSubmitAt = Date.now();
4069
- }
4180
+ const hasEnter = data.includes('\r') || data.includes('\n');
4181
+ if (options.fromUser) {
4182
+ this._lastHumanInputAt = Date.now();
4183
+ // A person is here: whatever turn follows is theirs, not the keep-alive's.
4184
+ this._keepAliveTurnUntil = 0;
4185
+ }
4186
+ else if (hasEnter && !isKeepAliveWrite(data)) {
4187
+ // Anything else submitted (an agent, respawn, auto-resume) starts a turn of its own.
4188
+ this._keepAliveTurnUntil = 0;
4189
+ }
4190
+ if (hasEnter)
4191
+ this._stampSubmit();
4070
4192
  return submitted;
4071
4193
  }
4072
4194
  /**
@@ -4090,9 +4212,21 @@ export class Session extends EventEmitter {
4090
4212
  * `_trackSubmit` only sees input that flows through Codeman's write path, so
4091
4213
  * a pane the user drives by attaching to tmux directly never stamped this and
4092
4214
  * `lastSubmitAt` stayed 0 for its whole life.
4215
+ *
4216
+ * `prompt` is the hook's own prompt text: anything but the keep-alive's ends the keep-alive
4217
+ * window, because a person typing in an attached tmux client reaches Codeman only here, and
4218
+ * their prompt must count as real and alert normally.
4093
4219
  */
4094
- markPromptSubmitted() {
4220
+ markPromptSubmitted(prompt) {
4221
+ if (prompt !== undefined && prompt.trim() !== KEEP_WARM_NUDGE)
4222
+ this._keepAliveTurnUntil = 0;
4223
+ this._stampSubmit();
4224
+ }
4225
+ /** Every submit moves `lastSubmitAt`; only one outside a keep-alive turn moves `lastRealPromptAt`. */
4226
+ _stampSubmit() {
4095
4227
  this._lastSubmitAt = Date.now();
4228
+ if (!this.keepAliveTurnActive)
4229
+ this._lastRealPromptAt = this._lastSubmitAt;
4096
4230
  }
4097
4231
  /**
4098
4232
  * Per-client highest-applied input sequence, for exactly-once input delivery.
@@ -4222,7 +4356,7 @@ export class Session extends EventEmitter {
4222
4356
  : this._mux.capturePaneText?.(this._muxSession.muxName),
4223
4357
  sendEnter: () => this._mux?.sendInput(this.id, '\r'),
4224
4358
  // ⚠ NO fallback glyph here, unlike the screen-reading probe elsewhere in this file.
4225
- // Only claude, codex, pi, opencode, omp and gemini declare a promptGlyph; the other modes would fall back
4359
+ // Only claude, codex, pi, opencode, omp, gemini and antigravity declare a promptGlyph; the other modes would fall back
4226
4360
  // to claude's `❯`, which is ALSO starship's default shell prompt (and pure's, and
4227
4361
  // spaceship's, and p10k lean's). On a shell session the line `❯ npm run build` sits
4228
4362
  // on screen for as long as the command runs, promptStillInComposer() reads that as