aicodeman 1.49.0 → 1.50.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 (324) hide show
  1. package/README.md +30 -4
  2. package/dist/cli-install-runner.d.ts +112 -0
  3. package/dist/cli-install-runner.d.ts.map +1 -0
  4. package/dist/cli-install-runner.js +289 -0
  5. package/dist/cli-install-runner.js.map +1 -0
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +2 -2
  8. package/dist/cli.js.map +1 -1
  9. package/dist/config/attachment-guard.d.ts +11 -0
  10. package/dist/config/attachment-guard.d.ts.map +1 -1
  11. package/dist/config/attachment-guard.js +21 -1
  12. package/dist/config/attachment-guard.js.map +1 -1
  13. package/dist/config/local-model-catalog.d.ts +188 -0
  14. package/dist/config/local-model-catalog.d.ts.map +1 -0
  15. package/dist/config/local-model-catalog.js +556 -0
  16. package/dist/config/local-model-catalog.js.map +1 -0
  17. package/dist/config-backup.js +1 -1
  18. package/dist/config-backup.js.map +1 -1
  19. package/dist/custom-model-hosts-writer.d.ts +50 -0
  20. package/dist/custom-model-hosts-writer.d.ts.map +1 -0
  21. package/dist/custom-model-hosts-writer.js +110 -0
  22. package/dist/custom-model-hosts-writer.js.map +1 -0
  23. package/dist/git-clone.d.ts.map +1 -1
  24. package/dist/git-clone.js +21 -1
  25. package/dist/git-clone.js.map +1 -1
  26. package/dist/git-fetch.d.ts.map +1 -1
  27. package/dist/git-fetch.js +6 -0
  28. package/dist/git-fetch.js.map +1 -1
  29. package/dist/git-workspace-status.d.ts.map +1 -1
  30. package/dist/git-workspace-status.js +4 -0
  31. package/dist/git-workspace-status.js.map +1 -1
  32. package/dist/git-worktrees.d.ts.map +1 -1
  33. package/dist/git-worktrees.js +6 -0
  34. package/dist/git-worktrees.js.map +1 -1
  35. package/dist/hooks-config.d.ts +15 -3
  36. package/dist/hooks-config.d.ts.map +1 -1
  37. package/dist/hooks-config.js +108 -4
  38. package/dist/hooks-config.js.map +1 -1
  39. package/dist/live-worktree.d.ts +73 -15
  40. package/dist/live-worktree.d.ts.map +1 -1
  41. package/dist/live-worktree.js +200 -32
  42. package/dist/live-worktree.js.map +1 -1
  43. package/dist/local-model/connect.d.ts +155 -0
  44. package/dist/local-model/connect.d.ts.map +1 -0
  45. package/dist/local-model/connect.js +243 -0
  46. package/dist/local-model/connect.js.map +1 -0
  47. package/dist/local-model/developer-tools.d.ts +45 -0
  48. package/dist/local-model/developer-tools.d.ts.map +1 -0
  49. package/dist/local-model/developer-tools.js +105 -0
  50. package/dist/local-model/developer-tools.js.map +1 -0
  51. package/dist/local-model/format.d.ts +39 -0
  52. package/dist/local-model/format.d.ts.map +1 -0
  53. package/dist/local-model/format.js +48 -0
  54. package/dist/local-model/format.js.map +1 -0
  55. package/dist/local-model/hardware.d.ts +125 -0
  56. package/dist/local-model/hardware.d.ts.map +1 -0
  57. package/dist/local-model/hardware.js +336 -0
  58. package/dist/local-model/hardware.js.map +1 -0
  59. package/dist/local-model/harness-facts.d.ts +77 -0
  60. package/dist/local-model/harness-facts.d.ts.map +1 -0
  61. package/dist/local-model/harness-facts.js +145 -0
  62. package/dist/local-model/harness-facts.js.map +1 -0
  63. package/dist/local-model/install-job.d.ts +431 -0
  64. package/dist/local-model/install-job.d.ts.map +1 -0
  65. package/dist/local-model/install-job.js +1822 -0
  66. package/dist/local-model/install-job.js.map +1 -0
  67. package/dist/local-model/ollama-client.d.ts +216 -0
  68. package/dist/local-model/ollama-client.d.ts.map +1 -0
  69. package/dist/local-model/ollama-client.js +636 -0
  70. package/dist/local-model/ollama-client.js.map +1 -0
  71. package/dist/local-model/paths.d.ts +64 -0
  72. package/dist/local-model/paths.d.ts.map +1 -0
  73. package/dist/local-model/paths.js +75 -0
  74. package/dist/local-model/paths.js.map +1 -0
  75. package/dist/local-model/recommend.d.ts +118 -0
  76. package/dist/local-model/recommend.d.ts.map +1 -0
  77. package/dist/local-model/recommend.js +430 -0
  78. package/dist/local-model/recommend.js.map +1 -0
  79. package/dist/local-model/runtime.d.ts +339 -0
  80. package/dist/local-model/runtime.d.ts.map +1 -0
  81. package/dist/local-model/runtime.js +1240 -0
  82. package/dist/local-model/runtime.js.map +1 -0
  83. package/dist/local-model/state-store.d.ts +45 -0
  84. package/dist/local-model/state-store.d.ts.map +1 -0
  85. package/dist/local-model/state-store.js +261 -0
  86. package/dist/local-model/state-store.js.map +1 -0
  87. package/dist/readmymind-collectors.d.ts.map +1 -1
  88. package/dist/readmymind-collectors.js +4 -0
  89. package/dist/readmymind-collectors.js.map +1 -1
  90. package/dist/reboot-restore.d.ts +3 -1
  91. package/dist/reboot-restore.d.ts.map +1 -1
  92. package/dist/reboot-restore.js.map +1 -1
  93. package/dist/session.d.ts +29 -7
  94. package/dist/session.d.ts.map +1 -1
  95. package/dist/session.js +63 -10
  96. package/dist/session.js.map +1 -1
  97. package/dist/types/common.d.ts +5 -0
  98. package/dist/types/common.d.ts.map +1 -1
  99. package/dist/types/index.d.ts +4 -0
  100. package/dist/types/index.d.ts.map +1 -1
  101. package/dist/types/index.js +4 -0
  102. package/dist/types/index.js.map +1 -1
  103. package/dist/types/local-model-install.d.ts +533 -0
  104. package/dist/types/local-model-install.d.ts.map +1 -0
  105. package/dist/types/local-model-install.js +169 -0
  106. package/dist/types/local-model-install.js.map +1 -0
  107. package/dist/types/local-model.d.ts +551 -0
  108. package/dist/types/local-model.d.ts.map +1 -0
  109. package/dist/types/local-model.js +115 -0
  110. package/dist/types/local-model.js.map +1 -0
  111. package/dist/types/session.d.ts +17 -6
  112. package/dist/types/session.d.ts.map +1 -1
  113. package/dist/types/session.js.map +1 -1
  114. package/dist/utils/cli-executable-resolver.d.ts +18 -0
  115. package/dist/utils/cli-executable-resolver.d.ts.map +1 -1
  116. package/dist/utils/cli-executable-resolver.js +34 -2
  117. package/dist/utils/cli-executable-resolver.js.map +1 -1
  118. package/dist/utils/git-availability.d.ts +65 -0
  119. package/dist/utils/git-availability.d.ts.map +1 -0
  120. package/dist/utils/git-availability.js +134 -0
  121. package/dist/utils/git-availability.js.map +1 -0
  122. package/dist/web/agent-skill-default-migration.d.ts +60 -0
  123. package/dist/web/agent-skill-default-migration.d.ts.map +1 -0
  124. package/dist/web/agent-skill-default-migration.js +97 -0
  125. package/dist/web/agent-skill-default-migration.js.map +1 -0
  126. package/dist/web/approval-inbox.d.ts +10 -0
  127. package/dist/web/approval-inbox.d.ts.map +1 -1
  128. package/dist/web/approval-inbox.js +15 -0
  129. package/dist/web/approval-inbox.js.map +1 -1
  130. package/dist/web/case-state-sync.d.ts +28 -0
  131. package/dist/web/case-state-sync.d.ts.map +1 -0
  132. package/dist/web/case-state-sync.js +41 -0
  133. package/dist/web/case-state-sync.js.map +1 -0
  134. package/dist/web/ports/config-port.d.ts +1 -1
  135. package/dist/web/ports/config-port.d.ts.map +1 -1
  136. package/dist/web/public/admin-ui.js.gz +0 -0
  137. package/dist/web/public/api-client.c9b1cddc.js.gz +0 -0
  138. package/dist/web/public/{app.9ea37070.js → app.07398d90.js} +1 -1
  139. package/dist/web/public/app.07398d90.js.br +0 -0
  140. package/dist/web/public/app.07398d90.js.gz +0 -0
  141. package/dist/web/public/approvals-ui.js.gz +0 -0
  142. package/dist/web/public/constants.782170e1.js.gz +0 -0
  143. package/dist/web/public/cron-ui.js.gz +0 -0
  144. package/dist/web/public/edit-history-ui.js.gz +0 -0
  145. package/dist/web/public/entrance-animations.js.gz +0 -0
  146. package/dist/web/public/foreign-sessions.js.gz +0 -0
  147. package/dist/web/public/git-status-ui.js.gz +0 -0
  148. package/dist/web/public/header-divider.eb2d2463.js.gz +0 -0
  149. package/dist/web/public/home-sessions.js +38 -18
  150. package/dist/web/public/home-sessions.js.br +0 -0
  151. package/dist/web/public/home-sessions.js.gz +0 -0
  152. package/dist/web/public/host-wake-ui.js.gz +0 -0
  153. package/dist/web/public/{i18n.a5e82c95.js → i18n.519d025e.js} +2 -2
  154. package/dist/web/public/i18n.519d025e.js.br +0 -0
  155. package/dist/web/public/i18n.519d025e.js.gz +0 -0
  156. package/dist/web/public/image-input.a5d0f8f3.js.gz +0 -0
  157. package/dist/web/public/index.html +88 -13
  158. package/dist/web/public/index.html.br +0 -0
  159. package/dist/web/public/index.html.gz +0 -0
  160. package/dist/web/public/input-cjk.8bc46081.js.gz +0 -0
  161. package/dist/web/public/{keyboard-accessory.b941676c.js → keyboard-accessory.0800fc44.js} +160 -2
  162. package/dist/web/public/keyboard-accessory.0800fc44.js.br +0 -0
  163. package/dist/web/public/keyboard-accessory.0800fc44.js.gz +0 -0
  164. package/dist/web/public/local-model-ui.js +1735 -0
  165. package/dist/web/public/local-model-ui.js.br +0 -0
  166. package/dist/web/public/local-model-ui.js.gz +0 -0
  167. package/dist/web/public/mobile-handlers.f7c3f692.js.gz +0 -0
  168. package/dist/web/public/mobile-ime-preview.2dbaf262.js.gz +0 -0
  169. package/dist/web/public/mobile-overview.js +30 -14
  170. package/dist/web/public/mobile-overview.js.br +0 -0
  171. package/dist/web/public/mobile-overview.js.gz +0 -0
  172. package/dist/web/public/mobile.4dfd5c55.css +1 -0
  173. package/dist/web/public/mobile.4dfd5c55.css.br +0 -0
  174. package/dist/web/public/mobile.4dfd5c55.css.gz +0 -0
  175. package/dist/web/public/notification-manager.feb82c04.js.gz +0 -0
  176. package/dist/web/public/orchestrator-panel.js.gz +0 -0
  177. package/dist/web/public/{panels-ui.8bcd4473.js → panels-ui.9ba2683e.js} +100 -98
  178. package/dist/web/public/panels-ui.9ba2683e.js.br +0 -0
  179. package/dist/web/public/panels-ui.9ba2683e.js.gz +0 -0
  180. package/dist/web/public/ralph-panel.b350e2ef.js.gz +0 -0
  181. package/dist/web/public/ralph-wizard.b6c0dd19.js.gz +0 -0
  182. package/dist/web/public/readmymind-ui.js.gz +0 -0
  183. package/dist/web/public/reboot-restore-ui.js +2 -0
  184. package/dist/web/public/reboot-restore-ui.js.br +0 -0
  185. package/dist/web/public/reboot-restore-ui.js.gz +0 -0
  186. package/dist/web/public/respawn-ui.304ba0d4.js.gz +0 -0
  187. package/dist/web/public/sanitize-html.e7147e76.js.gz +0 -0
  188. package/dist/web/public/session-lineage.js.gz +0 -0
  189. package/dist/web/public/{session-ui.a7c8c095.js → session-ui.8f300b14.js} +21 -21
  190. package/dist/web/public/session-ui.8f300b14.js.br +0 -0
  191. package/dist/web/public/session-ui.8f300b14.js.gz +0 -0
  192. package/dist/web/public/{settings-ui.18f92052.js → settings-ui.8b37cf07.js} +14 -14
  193. package/dist/web/public/settings-ui.8b37cf07.js.br +0 -0
  194. package/dist/web/public/settings-ui.8b37cf07.js.gz +0 -0
  195. package/dist/web/public/spreadsheet-preview-worker.js.gz +0 -0
  196. package/dist/web/public/spreadsheet-preview.75c751de.js.gz +0 -0
  197. package/dist/web/public/spreadsheet-xlsx-core.js.gz +0 -0
  198. package/dist/web/public/styles.21b93520.css +1 -0
  199. package/dist/web/public/styles.21b93520.css.br +0 -0
  200. package/dist/web/public/styles.21b93520.css.gz +0 -0
  201. package/dist/web/public/subagent-windows.07277a58.js.gz +0 -0
  202. package/dist/web/public/sw.js +2 -2
  203. package/dist/web/public/sw.js.br +0 -0
  204. package/dist/web/public/sw.js.gz +0 -0
  205. package/dist/web/public/tab-layout-browser.2d6189f7.js.gz +0 -0
  206. package/dist/web/public/tab-rail-resize.b5cdceaf.js.gz +0 -0
  207. package/dist/web/public/terminal-keycode229-recovery.98843069.js.gz +0 -0
  208. package/dist/web/public/terminal-split.js.gz +0 -0
  209. package/dist/web/public/terminal-tile.js.gz +0 -0
  210. package/dist/web/public/{terminal-ui.a7883640.js → terminal-ui.f92eae28.js} +2 -2
  211. package/dist/web/public/terminal-ui.f92eae28.js.br +0 -0
  212. package/dist/web/public/terminal-ui.f92eae28.js.gz +0 -0
  213. package/dist/web/public/tile-grid.js.gz +0 -0
  214. package/dist/web/public/ultracode-panel.js.gz +0 -0
  215. package/dist/web/public/ultracode-windows.js.gz +0 -0
  216. package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
  217. package/dist/web/public/vendor/exceljs.min.js.gz +0 -0
  218. package/dist/web/public/vendor/fflate.min.js.gz +0 -0
  219. package/dist/web/public/vendor/marked.min.js.gz +0 -0
  220. package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
  221. package/dist/web/public/vendor/xterm-addon-serialize.min.js.gz +0 -0
  222. package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
  223. package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
  224. package/dist/web/public/vendor/xterm-predictive-echo.276b11d9.js.gz +0 -0
  225. package/dist/web/public/vendor/xterm-zerolag-input.1be42307.js.gz +0 -0
  226. package/dist/web/public/vendor/xterm.css.gz +0 -0
  227. package/dist/web/public/vendor/xterm.min.js.gz +0 -0
  228. package/dist/web/public/{voice-input.2342c37b.js → voice-input.d0580528.js} +232 -137
  229. package/dist/web/public/voice-input.d0580528.js.br +0 -0
  230. package/dist/web/public/voice-input.d0580528.js.gz +0 -0
  231. package/dist/web/public/voice-pcm-worklet.js.gz +0 -0
  232. package/dist/web/public/webview-tabs.js.gz +0 -0
  233. package/dist/web/public/whats-new.json +9 -9
  234. package/dist/web/repo-status.d.ts.map +1 -1
  235. package/dist/web/repo-status.js +4 -0
  236. package/dist/web/repo-status.js.map +1 -1
  237. package/dist/web/route-helpers.d.ts +29 -0
  238. package/dist/web/route-helpers.d.ts.map +1 -1
  239. package/dist/web/route-helpers.js +37 -0
  240. package/dist/web/route-helpers.js.map +1 -1
  241. package/dist/web/routes/approval-routes.d.ts.map +1 -1
  242. package/dist/web/routes/approval-routes.js +3 -2
  243. package/dist/web/routes/approval-routes.js.map +1 -1
  244. package/dist/web/routes/case-routes.d.ts.map +1 -1
  245. package/dist/web/routes/case-routes.js +31 -5
  246. package/dist/web/routes/case-routes.js.map +1 -1
  247. package/dist/web/routes/cli-registry-routes.d.ts +1 -27
  248. package/dist/web/routes/cli-registry-routes.d.ts.map +1 -1
  249. package/dist/web/routes/cli-registry-routes.js +11 -202
  250. package/dist/web/routes/cli-registry-routes.js.map +1 -1
  251. package/dist/web/routes/custom-model-routes.d.ts +15 -0
  252. package/dist/web/routes/custom-model-routes.d.ts.map +1 -1
  253. package/dist/web/routes/custom-model-routes.js +114 -33
  254. package/dist/web/routes/custom-model-routes.js.map +1 -1
  255. package/dist/web/routes/file-routes.d.ts +4 -2
  256. package/dist/web/routes/file-routes.d.ts.map +1 -1
  257. package/dist/web/routes/file-routes.js +160 -24
  258. package/dist/web/routes/file-routes.js.map +1 -1
  259. package/dist/web/routes/html-view-routes.d.ts.map +1 -1
  260. package/dist/web/routes/html-view-routes.js +12 -3
  261. package/dist/web/routes/html-view-routes.js.map +1 -1
  262. package/dist/web/routes/index.d.ts +1 -0
  263. package/dist/web/routes/index.d.ts.map +1 -1
  264. package/dist/web/routes/index.js +1 -0
  265. package/dist/web/routes/index.js.map +1 -1
  266. package/dist/web/routes/local-model-routes.d.ts +103 -0
  267. package/dist/web/routes/local-model-routes.d.ts.map +1 -0
  268. package/dist/web/routes/local-model-routes.js +210 -0
  269. package/dist/web/routes/local-model-routes.js.map +1 -0
  270. package/dist/web/routes/reboot-restore-routes.d.ts.map +1 -1
  271. package/dist/web/routes/reboot-restore-routes.js +16 -0
  272. package/dist/web/routes/reboot-restore-routes.js.map +1 -1
  273. package/dist/web/routes/session-routes.d.ts.map +1 -1
  274. package/dist/web/routes/session-routes.js +22 -27
  275. package/dist/web/routes/session-routes.js.map +1 -1
  276. package/dist/web/routes/system-routes.d.ts +2 -2
  277. package/dist/web/routes/system-routes.d.ts.map +1 -1
  278. package/dist/web/routes/system-routes.js +23 -4
  279. package/dist/web/routes/system-routes.js.map +1 -1
  280. package/dist/web/schemas.d.ts +30 -0
  281. package/dist/web/schemas.d.ts.map +1 -1
  282. package/dist/web/schemas.js +52 -5
  283. package/dist/web/schemas.js.map +1 -1
  284. package/dist/web/self-update.d.ts.map +1 -1
  285. package/dist/web/self-update.js +4 -0
  286. package/dist/web/self-update.js.map +1 -1
  287. package/dist/web/sensitive-path.d.ts.map +1 -1
  288. package/dist/web/sensitive-path.js +5 -0
  289. package/dist/web/sensitive-path.js.map +1 -1
  290. package/dist/web/server.d.ts +20 -0
  291. package/dist/web/server.d.ts.map +1 -1
  292. package/dist/web/server.js +83 -7
  293. package/dist/web/server.js.map +1 -1
  294. package/dist/web/voice-stream.d.ts +4 -3
  295. package/dist/web/voice-stream.d.ts.map +1 -1
  296. package/dist/web/voice-stream.js +5 -4
  297. package/dist/web/voice-stream.js.map +1 -1
  298. package/package.json +2 -1
  299. package/skills/codeman/SKILL.md +318 -24
  300. package/skills/codeman/preamble.sh +242 -16
  301. package/skills/codeman/reference/recipes.md +1 -1
  302. package/skills/codeman/reference/verbs.md +101 -1
  303. package/dist/web/public/app.9ea37070.js.br +0 -0
  304. package/dist/web/public/app.9ea37070.js.gz +0 -0
  305. package/dist/web/public/i18n.a5e82c95.js.br +0 -0
  306. package/dist/web/public/i18n.a5e82c95.js.gz +0 -0
  307. package/dist/web/public/keyboard-accessory.b941676c.js.br +0 -0
  308. package/dist/web/public/keyboard-accessory.b941676c.js.gz +0 -0
  309. package/dist/web/public/mobile.67c8eb5b.css +0 -1
  310. package/dist/web/public/mobile.67c8eb5b.css.br +0 -0
  311. package/dist/web/public/mobile.67c8eb5b.css.gz +0 -0
  312. package/dist/web/public/panels-ui.8bcd4473.js.br +0 -0
  313. package/dist/web/public/panels-ui.8bcd4473.js.gz +0 -0
  314. package/dist/web/public/session-ui.a7c8c095.js.br +0 -0
  315. package/dist/web/public/session-ui.a7c8c095.js.gz +0 -0
  316. package/dist/web/public/settings-ui.18f92052.js.br +0 -0
  317. package/dist/web/public/settings-ui.18f92052.js.gz +0 -0
  318. package/dist/web/public/styles.6a718331.css +0 -1
  319. package/dist/web/public/styles.6a718331.css.br +0 -0
  320. package/dist/web/public/styles.6a718331.css.gz +0 -0
  321. package/dist/web/public/terminal-ui.a7883640.js.br +0 -0
  322. package/dist/web/public/terminal-ui.a7883640.js.gz +0 -0
  323. package/dist/web/public/voice-input.2342c37b.js.br +0 -0
  324. package/dist/web/public/voice-input.2342c37b.js.gz +0 -0
package/README.md CHANGED
@@ -8,6 +8,12 @@
8
8
  <em>Claude Code &bull; OpenCode &bull; Codex &bull; Antigravity &bull; Gemini &bull; Pi &bull; Grok &bull; DeepSeek &bull; OMP &bull; Copilot &bull; Terminal - One Dashboard &bull; Any Device</em>
9
9
  </p>
10
10
 
11
+ <p align="center">
12
+ <a href="https://github.com/Ark0N/Codeman/releases/latest/download/Codeman.dmg"><img src="https://img.shields.io/badge/Download_for_Mac-Codeman.dmg-2f6fe0?style=for-the-badge&logo=apple&logoColor=white&labelColor=000000" alt="Download Codeman for Mac (Codeman.dmg)" width="354"></a>
13
+ <br>
14
+ <sub>The native Mac app: signed and notarized, Apple Silicon and Intel, macOS 11.3 or later. <a href="#on-a-mac-the-codeman-app">What it does</a></sub>
15
+ </p>
16
+
11
17
  <p align="center">
12
18
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-1e3a5f?style=flat-square" alt="License: MIT"></a>
13
19
  <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/Node.js-22%2B-22c55e?style=flat-square&logo=node.js&logoColor=white" alt="Node.js 22+"></a>
@@ -17,7 +23,6 @@
17
23
  <a href="https://github.com/Ark0N/Codeman/stargazers"><img src="https://img.shields.io/github/stars/Ark0N/Codeman?style=flat-square&color=eab308" alt="GitHub stars"></a>
18
24
  <a href="https://github.com/Ark0N/Codeman/graphs/contributors"><img src="https://img.shields.io/github/contributors/Ark0N/Codeman?style=flat-square&color=3b82f6" alt="Contributors"></a>
19
25
  <a href="https://github.com/Ark0N/Codeman/commits/master"><img src="https://img.shields.io/github/commit-activity/t/Ark0N/Codeman?style=flat-square&color=1e3a5f" alt="Total commits"></a>
20
- <a href="https://github.com/NipunaRanasinghe/awesome-ai-agents"><img src="https://img.shields.io/badge/Featured_in-Awesome_AI_Agents-2ea44f?style=flat-square" alt="Featured in Awesome AI Agents"></a>
21
26
  </p>
22
27
 
23
28
  <p align="center">
@@ -43,6 +48,8 @@ codeman web
43
48
 
44
49
  The installer asks before every system change, and re-running the same line updates in place. Full details: [Quick Start - Installation](#quick-start---installation).
45
50
 
51
+ On a Mac you can skip the terminal: [download Codeman.dmg](https://github.com/Ark0N/Codeman/releases/latest/download/Codeman.dmg), and the app installs Codeman for you, opens the one already running, or connects to one on another machine. More in [On a Mac: the Codeman app](#on-a-mac-the-codeman-app).
52
+
46
53
  - **One dashboard, ten CLIs** - run [Claude Code, OpenCode, Codex, Antigravity, Gemini, Pi, Grok, DeepSeek, OMP, or GitHub Copilot](#more-features) per session (plus plain shell), locally, [in Docker](#isolated-docker-sessions), or [over SSH](#remote-ssh-sessions), with your own dashboards open as [web tabs](#more-features) beside them
47
54
  - **Truly phone-friendly** - a [touch-optimized terminal](#mobile-optimized-web-ui) with instant local echo, QR login, swipe navigation, and push notifications
48
55
  - **Runs while you sleep** - [idle detection + respawn cycling](#respawn-controller) and auto-resume when a subscription limit resets, for 24+ hour unattended runs
@@ -97,6 +104,21 @@ bash docker/Start-Codeman.sh
97
104
 
98
105
  The first run asks three questions (data folder, port, password; Enter takes the default, including a generated password), writes `docker/.env` for you, builds the image and ends on the URL once Codeman answers. The image already includes Claude Code, Codex, Gemini CLI and OpenCode. Codeman runs in a container and spawns Docker cases as sibling containers through the host socket. To update, use **App Settings → Updates**, or `git pull` and run the script again rather than a plain `docker compose up`, so the rebuilt image, refreshed volumes and entrypoint arrive together. See the [Docker deployment guide](docker/README.md) for Unraid, direct Compose commands, storage and networking options.
99
106
 
107
+ ### On a Mac: the Codeman app
108
+
109
+ **[Download Codeman.dmg](https://github.com/Ark0N/Codeman/releases/latest/download/Codeman.dmg)** · one universal app for Apple Silicon and Intel · macOS 11.3 or later
110
+
111
+ A small native app that opens Codeman in its own window. On a Mac without Codeman it installs it for you, with no Terminal and no administrator password, shows the install as a checklist, and offers to install a coding agent if the Mac has none yet. On a Mac that already runs Codeman it finds the server and opens it, or starts it when it is stopped. Under **Another machine** it connects to Codeman on your Mac mini, a home server or your tailnet, with the password kept in the Keychain, and can start an install over there through SSH. On a MacBook Pro with a PROLED XDR display, whose lid logo lights up, **View > Blink Apple Logo** makes the logo show what your agents are doing: it breathes while they work, blinks when one waits for you and flashes when one needs permission, and each state can take a style of your own. It stays off until you turn it on. The app is Rust around macOS's own WebKit, not a bundled browser, so the download is under 5 MB.
112
+
113
+ Open `Codeman.dmg`, drag Codeman into Applications and open it from there. macOS asks once whether to open an app downloaded from the internet: click **Open**.
114
+
115
+ - **Quitting the app doesn't stop Codeman.** An install from the app runs Codeman as a LaunchAgent that starts at login, so your agents keep working with the window closed, and your browser and phone reach it as before.
116
+ - **Codeman's page needs the WebKit of Safari 16.4.** The app starts on macOS 11.3, but Codeman itself needs macOS 13.3 or later, or macOS 11 or 12 with Safari 16.4 or later installed. On an older WebKit the app says so and does not connect.
117
+ - **The install from the app needs macOS 15, or a tmux that is already there.** tmux comes from the tmux project's own builds, which need macOS 15. On an older Mac without tmux the app offers Terminal instead, where Homebrew installs it (that takes an administrator once).
118
+ - **Updating.** The app doesn't update itself yet: download the new `Codeman.dmg` and drag it over the old copy.
119
+
120
+ First launch, known limits and how to build it yourself: [Installation](https://github.com/Ark0N/Codeman/wiki/Installation#on-a-mac-the-codeman-app) in the wiki and [packages/desktop/README.md](packages/desktop/README.md).
121
+
100
122
  <details>
101
123
  <summary><strong>Keep it running in the background</strong></summary>
102
124
 
@@ -475,6 +497,7 @@ PTY Output → 16ms Server Batch → DEC 2026 Wrap → SSE → Client rAF → xt
475
497
  - **Open a tmux session you started by hand**: a tmux session started outside Codeman shows up on the home screen, on this machine automatically and in your Docker cases' containers or on your saved SSH hosts when you scan for them. One click opens it as a tab. Closing the tab only detaches, and Codeman will not respawn or relaunch an agent it did not start. See [Opened outside Codeman](docs/wiki/The-Dashboard.md#opened-outside-codeman).
476
498
  - **Multi-CLI** — run **Claude Code**, **OpenCode**, **Codex**, **Antigravity**, **Gemini**, **Pi**, **Grok**, **DeepSeek Harness**, **OMP**, or **GitHub Copilot CLI** per session; env-var prefixes auto-gate (`CLAUDE_CODE_*` vs `OPENCODE_*` vs `CODEX_*` vs `ANTIGRAVITY_*` vs `GEMINI_*`/`GOOGLE_*` vs `PI_*` vs `GROK_*`/`XAI_*` vs `DSH_*`/`DEEPSEEK_*` vs `OMP_*` vs `COPILOT_*`). See [`docs/opencode-integration.md`](docs/opencode-integration.md), [`docs/pi-integration.md`](docs/pi-integration.md), [`docs/grok-integration.md`](docs/grok-integration.md), [`docs/deepseek-integration.md`](docs/deepseek-integration.md) [`docs/omp-integration.md`](docs/omp-integration.md) and [`docs/copilot-integration.md`](docs/copilot-integration.md)
477
499
  - **Custom model endpoints** _(new in 1.29.0, HTTP API for now)_ — point a session's CLI at any OpenAI-compatible endpoint instead of its native backend: a local llama.cpp, llama-swap, Ollama or vLLM box, or a cloud gateway such as Azure AI Foundry or OpenRouter. Save an endpoint once (`POST /api/model-endpoints`; its models are discovered from `/v1/models`), apply it to a session (`POST /api/sessions/:id/custom-model`), and the CLI restarts in place on that endpoint. Verified live for Claude, OpenCode, Pi, Grok and OMP; Codex, Gemini and DeepSeek have documented gaps, Antigravity has no mechanism. A toolbar picker is the follow-up. See [`docs/custom-model-endpoints.md`](docs/custom-model-endpoints.md)
500
+ - **A model on this Mac** _(experimental, new in 1.50.0)_: on a Mac with Apple silicon, **Run a local model** on the welcome screen shows which coding model fits, installs it with its runtime and a coding agent, and starts a session on it: no account, no API key, and the prompts and files of that session go to a model on this Mac, not to a cloud provider. Then mix cloud and local: through the [codeman skill](#the-agent-skill-start-here) a Claude Code session hands work to that model (`spawn_worker <name> local`, `sendmark`) and reads the answer back, so Claude plans and reviews in the cloud while the Mac does the bulk: summaries, first drafts, files that should stay here. See [`docs/local-models.md`](docs/local-models.md)
478
501
  - **Web tabs** — open Grafana, Uptime Kuma, a Vite dev server or any dashboard URL as a tab beside your sessions (Run dropdown → **Web / URL** → **Add URL**). Dashboards are proxied through Codeman's own origin, so an `http://` target works from a phone over HTTPS and through the tunnel, single-page apps route on their own paths, and a frame that reloads recovers itself. A `localhost` link an agent prints opens as a web tab automatically. See [`docs/web-tabs.md`](docs/web-tabs.md)
479
502
  - **Docker sessions** — run a case inside an isolated, hardened container. One checkbox on **Create New** spins up a container with sensible defaults and starts the agent inside it; multiple sessions share one per-case container, or attach a case to a container you already run; export a container + its workspace to a portable `.tar.gz` to move it to another machine. See [`docs/docker-cases.md`](docs/docker-cases.md)
480
503
  - **Remote SSH sessions** — point a case at another machine and run the agent there inside a durable remote tmux: survives SSH drops, auto-reconnects, and can discover + attach sessions already running on the host; file previews and downloads come over the same ssh connection. See [`docs/remote-sessions.md`](docs/remote-sessions.md)
@@ -775,13 +798,15 @@ Everything in this section also ships as an **agent skill**, [`skills/codeman`](
775
798
 
776
799
  #### Step 1: install it
777
800
 
801
+ Usually there is nothing to install: since 1.50.0 every new session gets the skill in its folder, where its CLI looks for skills (the web UI row below, on by default). The copy ignores itself in git, so your repository never lists it as a new file. The other routes are for pi, or for a copy that does not depend on that setting.
802
+
778
803
  | How | Command | Scope |
779
804
  | -------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
780
805
  | Skills CLI | `npx skills add Ark0N/Codeman --skill codeman -g` | Global, for any skills-aware agent ([skills.sh](https://skills.sh)); the way to give it to pi |
781
- | Claude Code plugin | `/plugin marketplace add Ark0N/Codeman` then `/plugin install codeman@codeman` | Global, through Claude Code's plugin manager; `/plugin update codeman` follows releases. Pick this OR a `codeman skill install`, not both: a Claude Code with both lists the skill twice (`codeman` and `codeman:codeman`) |
806
+ | Claude Code plugin | `/plugin marketplace add Ark0N/Codeman` then `/plugin install codeman@codeman` | Global, through Claude Code's plugin manager; `/plugin update codeman` follows releases. Pick this OR a `codeman skill install`, not both: a Claude Code with both lists the skill twice (`codeman` and `codeman:codeman`). |
782
807
  | Bundled CLI | `codeman skill install` | Global (`~/.claude/skills/codeman`), for npm installs that never cloned the repo |
783
808
  | Bundled CLI | `codeman skill install --case <name> [--mode <mode>]` | One case only; `--mode codex` (or any other run mode) writes it where that CLI looks for skills |
784
- | Web UI | App Settings → Agents & CLIs → All agent CLIs → **Codeman Agent Skill** | Auto-injects into each case on session create, where that session's CLI looks: `.claude/skills/` for Claude Code, `.agents/skills/` for Codex, Gemini CLI, OpenCode, Antigravity, Grok, DeepSeek and OMP; not pi, whose project skills trigger a trust prompt (`agentSkillEnabled`, SYNCED, default off) |
809
+ | Web UI | App Settings → Agents & CLIs → All agent CLIs → **Codeman Agent Skill** | Auto-injects into each case on session create, where that session's CLI looks: `.claude/skills/` for Claude Code, `.agents/skills/` for Codex, Gemini CLI, OpenCode, Antigravity, Grok, DeepSeek and OMP; not pi, whose project skills trigger a trust prompt (`agentSkillEnabled`, SYNCED, **on by default** since 1.50.0; a Claude Code that also has the plugin lists the skill twice, both work, so drop one if the duplicate bothers you) |
785
810
 
786
811
  `codeman skill uninstall [--case <name>]` reverses the CLI installs (with `--case`, every Codeman-managed copy in that case, whichever CLI's directory it sits in), and never touches a `skills/codeman` you wrote yourself.
787
812
 
@@ -795,6 +820,7 @@ That is the entire interface. No curl, no endpoint names, no session ids. These
795
820
  | _"Start a shell worker on the `myapp` case, run the test suite, tell me if it passes."_ | Spawns, waits on a split completion marker, reads back the exit code, cleans up. |
796
821
  | _"Spin up 3 workers for lint, typecheck and tests. Run them in parallel, report failures."_ | The fan-out flow: one session per task, all started first, then gathered as each finishes. |
797
822
  | _"Have a claude worker on `refactor-auth` summarize `src/session.ts`, then close it."_ | Spawns, runs the readiness ladder (first-run trust dialog included), send-and-wait, reads the clean transcript answer, deletes. |
823
+ | _"Use the local model to summarize every file in `docs/`, then check its summaries."_ | Starts a worker on the model Codeman installed on this Mac, gives it the files, reads its answer back and reviews it in the cloud. Says why instead when no local model is installed. |
798
824
  | _"Watch session w4 and tell me if it gets stuck on a permission prompt."_ | Blocks on the `blocked` signal and surfaces the question to **you**. It never answers another session's prompt itself. |
799
825
 
800
826
  One short line is enough. Here a Claude Code lead gets `use codeman to start 5 claude workers, one per TODO item`, and five real Claude Code workers power on, shown side by side in the tile grid:
@@ -848,7 +874,7 @@ Every recipe in there was verified against a live server, and the comments recor
848
874
  - **It self-gates.** It acts inside a Codeman-managed session. Outside one (`CODEMAN_MUX` unset) it only reads saved Codex conversations offline (`codeman history read`) and refuses everything else, and it never guesses an API URL, so a global install costs an unrelated Claude Code session nothing.
849
875
  - **It is deliberately conservative.** Unprompted, it may only spawn sessions, prompt them, and delete ones **it created in that same conversation, by exact id**, through a fail-closed guard that refuses to delete the agent's own session. Deleting a case (which erases a real directory of your code), bulk kills, respawn/ralph/cron/orchestrator changes and settings writes all require you to ask, naming the target.
850
876
 
851
- ⚠️ Turning `agentSkillEnabled` back off **does not remove already-injected copies** (a create-time sweep would yank the skill out from under other live sessions sharing that workspace). Remove them per case with `codeman skill uninstall --case <name>`.
877
+ ⚠️ The web UI injection is **on by default** since 1.50.0. A `settings.json` without the `agentSkillEnabled` key means on. Existing installs that stored off are switched on once at the first 1.50.0 start (every App Settings save on 1.49.0 or earlier wrote the old default, `false`, whether or not you touched this switch); turning it off afterwards sticks. Turning it off **does not remove already-injected copies** (a create-time sweep would yank the skill out from under other live sessions sharing that workspace). Remove them per case with `codeman skill uninstall --case <name>`.
852
878
 
853
879
  ---
854
880
 
@@ -0,0 +1,112 @@
1
+ /**
2
+ * @fileoverview The shared runner of a STOCK CLI's install command: the one place Codeman
3
+ * executes an install one-liner, used by `POST /api/clis/:id/install`
4
+ * (src/web/routes/cli-registry-routes.ts) and by the local model install job.
5
+ *
6
+ * The code was moved here from cli-registry-routes.ts, and that route keeps its behaviour
7
+ * byte for byte (same answers, same audit entry, same 409 for a second install of one id,
8
+ * same environment).
9
+ *
10
+ * What lives here:
11
+ * - `installEnv()` and `npmGlobalPrefixWritable()`: the installer's environment is the
12
+ * server's minus every `CODEMAN_*` variable, with npm's global prefix pointed at a place
13
+ * the server user can write. test/routes/cli-registry-routes.test.ts imports both from the
14
+ * route module, which re-exports them from here.
15
+ * - `runInstallCommand()`: `shell: true`, its own process group, output capped, the whole
16
+ * group killed on timeout. New: an abort signal that kills the group the same way, so the
17
+ * install job's Cancel has something to stop.
18
+ * - `forgetResolvedCli()`: after an install, successful or not, every cached lookup of the
19
+ * CLI's binaries is dropped, or a pre-install miss is replayed for up to five minutes.
20
+ * - The set of ids with an install running. ONE set for both callers
21
+ * (`tryBeginCliInstall()`), so the route and the job can never run two installers of one
22
+ * CLI over the same prefix.
23
+ *
24
+ * Rules:
25
+ * - Which command runs is the CALLER's choice, and the two callers choose differently. The
26
+ * local model job passes `stockInstallCommand()`, which reads the compiled `STOCK_CLIS`
27
+ * and never the registry merged with `clis.json`, so an override file cannot change what
28
+ * that job runs. The CLI management route passes the merged entry's command
29
+ * (`resolveInstallCommandForPlatform(listClis()...)`), as it did before this module
30
+ * existed: a `clis.json` override of a stock entry's install command IS what that route
31
+ * runs (behind `cliManagementEnabled`, after a confirm that shows the exact text). A custom
32
+ * entry's install text is never executed by either. Switching the route to
33
+ * `stockInstallCommand()` would close that gap at the cost of a behaviour change the route
34
+ * tests pin; it is an owner decision, not made here.
35
+ * - Who may call it is the caller's rule, not this module's: the route keeps its
36
+ * `cliManagementEnabled` gate; the install job runs it only for a harness row of the local
37
+ * model catalogue, after the person's consent click on a screen that showed the literal
38
+ * command, admin only in multi-user mode, and writes the admin audit entry itself.
39
+ */
40
+ /** How long an install command may run before its process group is killed. */
41
+ export declare const CLI_INSTALL_TIMEOUT_MS = 300000;
42
+ /** How an install command ended. */
43
+ export interface CliInstallResult {
44
+ /** The exit code, `null` when the command was killed or could not be started. */
45
+ code: number | null;
46
+ /** stdout and stderr together, capped. */
47
+ output: string;
48
+ /** The timeout killed it. */
49
+ timedOut: boolean;
50
+ /** The abort signal killed it. */
51
+ aborted: boolean;
52
+ }
53
+ export interface RunInstallCommandOptions {
54
+ /** Kills the installer's whole process group (SIGTERM, then SIGKILL). */
55
+ signal?: AbortSignal;
56
+ }
57
+ /**
58
+ * True when `npm install -g` can write to this process's npm global prefix, or when that cannot
59
+ * be determined (then nothing is redirected: a wrong guess would move installs somewhere the
60
+ * user did not choose). `npm config get prefix` is asked rather than guessed from `process.execPath`
61
+ * because a user `.npmrc` / `NPM_CONFIG_PREFIX` can point it anywhere.
62
+ *
63
+ * Async so the server keeps serving while npm boots (130 to 240 ms), and killed with SIGKILL on
64
+ * timeout because `SIGTERM` alone leaves the wait running. A prefix that does not exist yet is
65
+ * judged by the nearest ancestor that does: npm creates the missing directories, so a user
66
+ * `.npmrc` pointing at `~/.npm-global` before it was made is not moved.
67
+ */
68
+ export declare function npmGlobalPrefixWritable(source: NodeJS.ProcessEnv): Promise<boolean>;
69
+ /**
70
+ * The server's environment minus every `CODEMAN_*` variable. An install script is third-party
71
+ * code, and those variables carry Codeman's own secrets and wiring (`CODEMAN_PASSWORD`, the
72
+ * data dir, the tmux socket), none of which an installer needs.
73
+ *
74
+ * It also points `NPM_CONFIG_PREFIX` at `$HOME/.local` so an `npm install -g` lands somewhere the
75
+ * server user can write and Codeman's resolvers already search (`~/.local/bin`):
76
+ * - inside the Docker Compose container (`CODEMAN_IN_CONTAINER=1`), so installs survive an image
77
+ * update (the image's own prefix is image content);
78
+ * - on a native install whose npm global prefix is not writable by the server user (a system node
79
+ * under `/usr`, installed by root). Without this `npm install -g` died with EACCES (exit 243),
80
+ * e.g. DeepSeek's `npm install -g @deepseek-ai/dsh`. An explicit `NPM_CONFIG_PREFIX` the
81
+ * operator set is respected, and so is a prefix that is writable (nvm, `~/.npm-global`, ...).
82
+ */
83
+ export declare function installEnv(source?: NodeJS.ProcessEnv, prefixWritable?: (env: NodeJS.ProcessEnv) => boolean): NodeJS.ProcessEnv;
84
+ /**
85
+ * Runs a STOCK entry's already-vetted install command. `shell: true` is unavoidable here:
86
+ * the shipped commands are genuinely `curl | bash` / `npm install -g` one-liners. This is NOT
87
+ * a reopening of the config-shell-text concern the registry's `shellToken` pattern exists to
88
+ * prevent: the string executed here is NEVER user input, only ever what is already hardcoded
89
+ * and reviewed in `stock.ts`, and a CUSTOM entry can never reach this function at all (see the
90
+ * guard of each caller).
91
+ *
92
+ * Never throws: a spawn that fails is a result with `code: null`.
93
+ */
94
+ export declare function runInstallCommand(command: string, options?: RunInstallCommandOptions): Promise<CliInstallResult>;
95
+ /**
96
+ * The install command of the STOCK CLI `id` for this platform, read from the compiled
97
+ * `STOCK_CLIS`. `undefined` for an id that is not a stock CLI or has no command here.
98
+ */
99
+ export declare function stockInstallCommand(id: string): string | undefined;
100
+ /**
101
+ * Claims the one install slot of `id`. Returns the function that releases it, or `null` when
102
+ * an install of that CLI is already running (the caller answers 409 or waits).
103
+ */
104
+ export declare function tryBeginCliInstall(id: string): (() => void) | null;
105
+ /**
106
+ * Forgets every cached binary lookup of a CLI: the generic per-id resolver (which captures
107
+ * the entry's binaries when first built) and every per-binary cache, hits and negative-cache
108
+ * backoff alike. Called after anything that changes what is on disk or what the CLI's binary
109
+ * IS; see `invalidateCliExecutableResolvers`.
110
+ */
111
+ export declare function forgetResolvedCli(id: string, binaries: readonly string[]): void;
112
+ //# sourceMappingURL=cli-install-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-install-runner.d.ts","sourceRoot":"","sources":["../src/cli-install-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAaH,8EAA8E;AAC9E,eAAO,MAAM,sBAAsB,SAAU,CAAC;AAE9C,oCAAoC;AACpC,MAAM,WAAW,gBAAgB;IAC/B,iFAAiF;IACjF,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,yEAAyE;IACzE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAUD;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CA0BzF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CACxB,MAAM,GAAE,MAAM,CAAC,UAAwB,EACvC,cAAc,GAAE,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,KAAK,OAAoB,GAC/D,MAAM,CAAC,UAAU,CAenB;AA6BD;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,gBAAgB,CAAC,CAiF3B;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKlE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CASlE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAG/E"}
@@ -0,0 +1,289 @@
1
+ /**
2
+ * @fileoverview The shared runner of a STOCK CLI's install command: the one place Codeman
3
+ * executes an install one-liner, used by `POST /api/clis/:id/install`
4
+ * (src/web/routes/cli-registry-routes.ts) and by the local model install job.
5
+ *
6
+ * The code was moved here from cli-registry-routes.ts, and that route keeps its behaviour
7
+ * byte for byte (same answers, same audit entry, same 409 for a second install of one id,
8
+ * same environment).
9
+ *
10
+ * What lives here:
11
+ * - `installEnv()` and `npmGlobalPrefixWritable()`: the installer's environment is the
12
+ * server's minus every `CODEMAN_*` variable, with npm's global prefix pointed at a place
13
+ * the server user can write. test/routes/cli-registry-routes.test.ts imports both from the
14
+ * route module, which re-exports them from here.
15
+ * - `runInstallCommand()`: `shell: true`, its own process group, output capped, the whole
16
+ * group killed on timeout. New: an abort signal that kills the group the same way, so the
17
+ * install job's Cancel has something to stop.
18
+ * - `forgetResolvedCli()`: after an install, successful or not, every cached lookup of the
19
+ * CLI's binaries is dropped, or a pre-install miss is replayed for up to five minutes.
20
+ * - The set of ids with an install running. ONE set for both callers
21
+ * (`tryBeginCliInstall()`), so the route and the job can never run two installers of one
22
+ * CLI over the same prefix.
23
+ *
24
+ * Rules:
25
+ * - Which command runs is the CALLER's choice, and the two callers choose differently. The
26
+ * local model job passes `stockInstallCommand()`, which reads the compiled `STOCK_CLIS`
27
+ * and never the registry merged with `clis.json`, so an override file cannot change what
28
+ * that job runs. The CLI management route passes the merged entry's command
29
+ * (`resolveInstallCommandForPlatform(listClis()...)`), as it did before this module
30
+ * existed: a `clis.json` override of a stock entry's install command IS what that route
31
+ * runs (behind `cliManagementEnabled`, after a confirm that shows the exact text). A custom
32
+ * entry's install text is never executed by either. Switching the route to
33
+ * `stockInstallCommand()` would close that gap at the cost of a behaviour change the route
34
+ * tests pin; it is an owner decision, not made here.
35
+ * - Who may call it is the caller's rule, not this module's: the route keeps its
36
+ * `cliManagementEnabled` gate; the install job runs it only for a harness row of the local
37
+ * model catalogue, after the person's consent click on a screen that showed the literal
38
+ * command, admin only in multi-user mode, and writes the admin audit entry itself.
39
+ */
40
+ import { execFile, spawn } from 'node:child_process';
41
+ import { constants as fsConstants } from 'node:fs';
42
+ import { access } from 'node:fs/promises';
43
+ import { dirname, join } from 'node:path';
44
+ import { promisify } from 'node:util';
45
+ import { resolveInstallCommandForPlatform } from './config/cli-registry/registry.js';
46
+ import { STOCK_CLIS } from './config/cli-registry/stock.js';
47
+ import { getErrorMessage } from './types.js';
48
+ import { invalidateCliExecutableResolvers } from './utils/cli-executable-resolver.js';
49
+ import { invalidateCliResolverCache } from './utils/cli-resolver.js';
50
+ /** How long an install command may run before its process group is killed. */
51
+ export const CLI_INSTALL_TIMEOUT_MS = 300_000;
52
+ /**
53
+ * Ids with an install running right now. A second request for the same id gets 409 rather
54
+ * than a second `curl | bash` or `npm install -g` racing the first over the same prefix.
55
+ */
56
+ const installsInFlight = new Set();
57
+ const execFileAsync = promisify(execFile);
58
+ /**
59
+ * True when `npm install -g` can write to this process's npm global prefix, or when that cannot
60
+ * be determined (then nothing is redirected: a wrong guess would move installs somewhere the
61
+ * user did not choose). `npm config get prefix` is asked rather than guessed from `process.execPath`
62
+ * because a user `.npmrc` / `NPM_CONFIG_PREFIX` can point it anywhere.
63
+ *
64
+ * Async so the server keeps serving while npm boots (130 to 240 ms), and killed with SIGKILL on
65
+ * timeout because `SIGTERM` alone leaves the wait running. A prefix that does not exist yet is
66
+ * judged by the nearest ancestor that does: npm creates the missing directories, so a user
67
+ * `.npmrc` pointing at `~/.npm-global` before it was made is not moved.
68
+ */
69
+ export async function npmGlobalPrefixWritable(source) {
70
+ try {
71
+ const { stdout } = await execFileAsync('npm', ['config', 'get', 'prefix'], {
72
+ env: source,
73
+ encoding: 'utf8',
74
+ timeout: 5_000,
75
+ killSignal: 'SIGKILL',
76
+ });
77
+ const prefix = stdout.trim();
78
+ if (!prefix)
79
+ return true;
80
+ // npm creates lib/node_modules under the prefix; walk up to the first directory that exists.
81
+ let dir = join(prefix, 'lib', 'node_modules');
82
+ for (;;) {
83
+ try {
84
+ await access(dir, fsConstants.W_OK);
85
+ return true;
86
+ }
87
+ catch (err) {
88
+ if (err.code !== 'ENOENT')
89
+ return false;
90
+ const parent = dirname(dir);
91
+ if (parent === dir)
92
+ return false;
93
+ dir = parent;
94
+ }
95
+ }
96
+ }
97
+ catch {
98
+ return true;
99
+ }
100
+ }
101
+ /**
102
+ * The server's environment minus every `CODEMAN_*` variable. An install script is third-party
103
+ * code, and those variables carry Codeman's own secrets and wiring (`CODEMAN_PASSWORD`, the
104
+ * data dir, the tmux socket), none of which an installer needs.
105
+ *
106
+ * It also points `NPM_CONFIG_PREFIX` at `$HOME/.local` so an `npm install -g` lands somewhere the
107
+ * server user can write and Codeman's resolvers already search (`~/.local/bin`):
108
+ * - inside the Docker Compose container (`CODEMAN_IN_CONTAINER=1`), so installs survive an image
109
+ * update (the image's own prefix is image content);
110
+ * - on a native install whose npm global prefix is not writable by the server user (a system node
111
+ * under `/usr`, installed by root). Without this `npm install -g` died with EACCES (exit 243),
112
+ * e.g. DeepSeek's `npm install -g @deepseek-ai/dsh`. An explicit `NPM_CONFIG_PREFIX` the
113
+ * operator set is respected, and so is a prefix that is writable (nvm, `~/.npm-global`, ...).
114
+ */
115
+ export function installEnv(source = process.env, prefixWritable = () => true) {
116
+ const env = {};
117
+ for (const [key, value] of Object.entries(source)) {
118
+ if (!key.startsWith('CODEMAN_'))
119
+ env[key] = value;
120
+ }
121
+ // ⚠️ In the Docker Compose deployment the image sets NPM_CONFIG_PREFIX=/opt/codeman-cli, which is IMAGE
122
+ // content: `Update-Codeman.sh` recreates the container and every CLI installed there (dsh, pi, ...)
123
+ // vanishes. HOME is the persistent bind mount and `~/.local/bin` is already on every resolver's search
124
+ // list, so npm-based installs are redirected there. curl|bash installers already target HOME.
125
+ if (source.CODEMAN_IN_CONTAINER === '1' && source.HOME) {
126
+ redirectNpmPrefix(env, source.HOME);
127
+ }
128
+ else if (process.platform !== 'win32' && source.HOME && !source.NPM_CONFIG_PREFIX && !prefixWritable(env)) {
129
+ redirectNpmPrefix(env, source.HOME);
130
+ }
131
+ return env;
132
+ }
133
+ /**
134
+ * Point npm at `$HOME/.local`, dropping every spelling of the prefix key first. `npm run` exports a
135
+ * lowercase `npm_config_prefix`, npm reads `npm_config_*` case-insensitively, and when both spellings
136
+ * are present a `/bin/sh` that sorts its environment (bash) lets the older value win. The explicit
137
+ * operator guard in `installEnv` stays on the uppercase key only: npm always injects the lowercase one.
138
+ */
139
+ function redirectNpmPrefix(env, home) {
140
+ for (const key of Object.keys(env))
141
+ if (/^npm_config_prefix$/i.test(key))
142
+ delete env[key];
143
+ env.NPM_CONFIG_PREFIX = `${home}/.local`;
144
+ }
145
+ /**
146
+ * `installEnv` for this process, with the (async) npm prefix probe done first and only when the
147
+ * command runs npm at all: a `curl | bash` installer never pays for it.
148
+ */
149
+ async function installEnvFor(command, source = process.env) {
150
+ const usesNpm = /\bnpm\b/.test(command);
151
+ const probeNeeded = usesNpm &&
152
+ source.CODEMAN_IN_CONTAINER !== '1' &&
153
+ process.platform !== 'win32' &&
154
+ !!source.HOME &&
155
+ !source.NPM_CONFIG_PREFIX;
156
+ const writable = probeNeeded ? await npmGlobalPrefixWritable(installEnv(source)) : true;
157
+ return installEnv(source, () => writable);
158
+ }
159
+ /**
160
+ * Runs a STOCK entry's already-vetted install command. `shell: true` is unavoidable here:
161
+ * the shipped commands are genuinely `curl | bash` / `npm install -g` one-liners. This is NOT
162
+ * a reopening of the config-shell-text concern the registry's `shellToken` pattern exists to
163
+ * prevent: the string executed here is NEVER user input, only ever what is already hardcoded
164
+ * and reviewed in `stock.ts`, and a CUSTOM entry can never reach this function at all (see the
165
+ * guard of each caller).
166
+ *
167
+ * Never throws: a spawn that fails is a result with `code: null`.
168
+ */
169
+ export async function runInstallCommand(command, options = {}) {
170
+ const { signal } = options;
171
+ if (signal?.aborted)
172
+ return { code: null, output: '', timedOut: false, aborted: true };
173
+ const env = await installEnvFor(command);
174
+ // The environment probe above can take a moment (npm boots): an abort during it starts nothing.
175
+ if (signal?.aborted)
176
+ return { code: null, output: '', timedOut: false, aborted: true };
177
+ return new Promise((resolve) => {
178
+ let child;
179
+ try {
180
+ child = spawn(command, {
181
+ shell: true,
182
+ stdio: ['ignore', 'pipe', 'pipe'],
183
+ // Own process group; the timeout below kills the whole tree by hand, mirroring
184
+ // the DeepSeek profile-install endpoint's own reasoning: an install command fans
185
+ // out into package-manager children, and spawn's own `timeout` option signals
186
+ // only the direct child, leaving survivors holding the pipes open forever.
187
+ detached: true,
188
+ env,
189
+ });
190
+ }
191
+ catch (err) {
192
+ resolve({ code: null, output: `spawn failed: ${getErrorMessage(err)}`, timedOut: false, aborted: false });
193
+ return;
194
+ }
195
+ let output = '';
196
+ let timedOut = false;
197
+ let aborted = false;
198
+ let settled = false;
199
+ let killTimer;
200
+ let reapTimer;
201
+ const capture = (chunk) => {
202
+ if (output.length < 16_384)
203
+ output += chunk.toString('utf-8');
204
+ };
205
+ child.stdout?.on('data', capture);
206
+ child.stderr?.on('data', capture);
207
+ const killTree = (killSignal) => {
208
+ try {
209
+ if (child.pid)
210
+ process.kill(-child.pid, killSignal);
211
+ }
212
+ catch {
213
+ /* already gone */
214
+ }
215
+ };
216
+ /** SIGTERM to the group, SIGKILL three seconds later, and give up waiting after eight. */
217
+ const stopTree = () => {
218
+ if (killTimer)
219
+ return;
220
+ killTree('SIGTERM');
221
+ killTimer = setTimeout(() => killTree('SIGKILL'), 3_000);
222
+ reapTimer = setTimeout(() => finish(null), 8_000);
223
+ };
224
+ const onAbort = () => {
225
+ aborted = true;
226
+ stopTree();
227
+ };
228
+ const finish = (code) => {
229
+ if (settled)
230
+ return;
231
+ settled = true;
232
+ clearTimeout(timer);
233
+ if (killTimer)
234
+ clearTimeout(killTimer);
235
+ if (reapTimer)
236
+ clearTimeout(reapTimer);
237
+ signal?.removeEventListener('abort', onAbort);
238
+ resolve({ code, output, timedOut, aborted });
239
+ };
240
+ const timer = setTimeout(() => {
241
+ timedOut = true;
242
+ stopTree();
243
+ }, CLI_INSTALL_TIMEOUT_MS);
244
+ signal?.addEventListener('abort', onAbort, { once: true });
245
+ child.on('error', (err) => {
246
+ output = `${output}\n${err.message}`;
247
+ finish(null);
248
+ });
249
+ child.on('close', (code) => finish(code));
250
+ });
251
+ }
252
+ /**
253
+ * The install command of the STOCK CLI `id` for this platform, read from the compiled
254
+ * `STOCK_CLIS`. `undefined` for an id that is not a stock CLI or has no command here.
255
+ */
256
+ export function stockInstallCommand(id) {
257
+ const entry = STOCK_CLIS.find((candidate) => candidate.id === id);
258
+ if (!entry)
259
+ return undefined;
260
+ const command = resolveInstallCommandForPlatform(entry);
261
+ return command !== undefined && command.trim() !== '' ? command : undefined;
262
+ }
263
+ /**
264
+ * Claims the one install slot of `id`. Returns the function that releases it, or `null` when
265
+ * an install of that CLI is already running (the caller answers 409 or waits).
266
+ */
267
+ export function tryBeginCliInstall(id) {
268
+ if (installsInFlight.has(id))
269
+ return null;
270
+ installsInFlight.add(id);
271
+ let released = false;
272
+ return () => {
273
+ if (released)
274
+ return;
275
+ released = true;
276
+ installsInFlight.delete(id);
277
+ };
278
+ }
279
+ /**
280
+ * Forgets every cached binary lookup of a CLI: the generic per-id resolver (which captures
281
+ * the entry's binaries when first built) and every per-binary cache, hits and negative-cache
282
+ * backoff alike. Called after anything that changes what is on disk or what the CLI's binary
283
+ * IS; see `invalidateCliExecutableResolvers`.
284
+ */
285
+ export function forgetResolvedCli(id, binaries) {
286
+ invalidateCliExecutableResolvers(binaries);
287
+ invalidateCliResolverCache(id);
288
+ }
289
+ //# sourceMappingURL=cli-install-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-install-runner.js","sourceRoot":"","sources":["../src/cli-install-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,MAAM,y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;IACd,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,MAAM,CAAC,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAO5F;AAYD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG;IAAE,QAAQ,EAAE,aAAa,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAY3F;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,aAAa,EAAE,CAOxD;AAyrCD,OAAO,EAAE,OAAO,EAAE,CAAC"}
package/dist/cli.js CHANGED
@@ -213,7 +213,7 @@ function describeSkillResult(result, target) {
213
213
  },
214
214
  symlink: {
215
215
  ok: false,
216
- text: `${target} (or its parent) is a symlink, refusing to write through it.`,
216
+ text: `${target}, its parent or its reference folder is a symlink, refusing to write through it.`,
217
217
  },
218
218
  };
219
219
  return messages[result];
@@ -275,7 +275,7 @@ skillCmd
275
275
  if (result === 'symlink') {
276
276
  // A shared-skills layout (`.agents/skills -> ../.claude/skills`) is deliberate:
277
277
  // skip it rather than fail the whole sweep.
278
- console.log(palette.warn(`- Skipped ${target}: it (or its parent) is a symlink, so it was not touched`));
278
+ console.log(palette.warn(`- Skipped ${target}: it, its parent or its reference folder is a symlink, so it was not touched`));
279
279
  continue;
280
280
  }
281
281
  removedAny = true;