@better-openclaw/core 1.0.26 → 1.0.30

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 (1038) hide show
  1. package/README.md +66 -7
  2. package/dist/addon-stack.cjs +41 -28
  3. package/dist/addon-stack.cjs.map +1 -1
  4. package/dist/addon-stack.d.cts +1 -1
  5. package/dist/addon-stack.d.cts.map +1 -1
  6. package/dist/addon-stack.d.mts +1 -1
  7. package/dist/addon-stack.d.mts.map +1 -1
  8. package/dist/addon-stack.mjs +40 -27
  9. package/dist/addon-stack.mjs.map +1 -1
  10. package/dist/addon-stack.test.cjs +14 -14
  11. package/dist/addon-stack.test.cjs.map +1 -1
  12. package/dist/addon-stack.test.mjs +13 -13
  13. package/dist/addon-stack.test.mjs.map +1 -1
  14. package/dist/bare-metal-partition.d.cts +1 -1
  15. package/dist/bare-metal-partition.d.mts +1 -1
  16. package/dist/bare-metal-partition.test.cjs +1 -1
  17. package/dist/bare-metal-partition.test.mjs +1 -1
  18. package/dist/callback-sink-CdMKYayY.d.mts +15 -0
  19. package/dist/callback-sink-CdMKYayY.d.mts.map +1 -0
  20. package/dist/callback-sink-iNThWRnQ.d.cts +15 -0
  21. package/dist/callback-sink-iNThWRnQ.d.cts.map +1 -0
  22. package/dist/claude-code-fw-CrbAlzTM.d.mts +7 -0
  23. package/dist/claude-code-fw-CrbAlzTM.d.mts.map +1 -0
  24. package/dist/claude-code-fw-dKYH2prH.d.cts +7 -0
  25. package/dist/claude-code-fw-dKYH2prH.d.cts.map +1 -0
  26. package/dist/codex-fw-Ct8q4pzo.d.mts +7 -0
  27. package/dist/codex-fw-Ct8q4pzo.d.mts.map +1 -0
  28. package/dist/codex-fw-l7Ku8ZI8.d.cts +7 -0
  29. package/dist/codex-fw-l7Ku8ZI8.d.cts.map +1 -0
  30. package/dist/compose-validation.test.cjs +1 -1
  31. package/dist/composer.cjs +89 -129
  32. package/dist/composer.cjs.map +1 -1
  33. package/dist/composer.d.cts +3 -3
  34. package/dist/composer.d.cts.map +1 -1
  35. package/dist/composer.d.mts +3 -3
  36. package/dist/composer.d.mts.map +1 -1
  37. package/dist/composer.mjs +88 -128
  38. package/dist/composer.mjs.map +1 -1
  39. package/dist/composer.snapshot.test.cjs +1 -1
  40. package/dist/composer.snapshot.test.mjs +1 -1
  41. package/dist/composer.test.cjs +53 -2
  42. package/dist/composer.test.cjs.map +1 -1
  43. package/dist/composer.test.mjs +52 -1
  44. package/dist/composer.test.mjs.map +1 -1
  45. package/dist/console-sink-BHQpRyCt.d.cts +13 -0
  46. package/dist/console-sink-BHQpRyCt.d.cts.map +1 -0
  47. package/dist/console-sink-bouG_M1K.d.mts +13 -0
  48. package/dist/console-sink-bouG_M1K.d.mts.map +1 -0
  49. package/dist/{coolify-BVGGcMrT.d.mts → coolify-D5E0z01M.d.mts} +2 -2
  50. package/dist/{coolify-BVGGcMrT.d.mts.map → coolify-D5E0z01M.d.mts.map} +1 -1
  51. package/dist/{coolify-vlb1G9V2.d.cts → coolify-DjHecHCr.d.cts} +2 -2
  52. package/dist/{coolify-vlb1G9V2.d.cts.map → coolify-DjHecHCr.d.cts.map} +1 -1
  53. package/dist/copaw-BQyjioz7.d.cts +7 -0
  54. package/dist/copaw-BQyjioz7.d.cts.map +1 -0
  55. package/dist/copaw-C_3N7eQu.d.mts +7 -0
  56. package/dist/copaw-C_3N7eQu.d.mts.map +1 -0
  57. package/dist/deployers/coolify.cjs +25 -0
  58. package/dist/deployers/coolify.cjs.map +1 -1
  59. package/dist/deployers/coolify.d.cts +1 -1
  60. package/dist/deployers/coolify.d.mts +1 -1
  61. package/dist/deployers/coolify.mjs +25 -0
  62. package/dist/deployers/coolify.mjs.map +1 -1
  63. package/dist/deployers/dokploy.cjs +25 -0
  64. package/dist/deployers/dokploy.cjs.map +1 -1
  65. package/dist/deployers/dokploy.d.cts +1 -1
  66. package/dist/deployers/dokploy.d.mts +1 -1
  67. package/dist/deployers/dokploy.mjs +25 -0
  68. package/dist/deployers/dokploy.mjs.map +1 -1
  69. package/dist/deployers/index.d.cts +3 -3
  70. package/dist/deployers/index.d.mts +3 -3
  71. package/dist/deployers/strip-host-ports.cjs +1 -1
  72. package/dist/deployers/strip-host-ports.test.cjs +1 -1
  73. package/dist/deployers/strip-host-ports.test.mjs +1 -1
  74. package/dist/deployers/types.d.cts +1 -1
  75. package/dist/deployers/types.d.mts +1 -1
  76. package/dist/{dokploy-8cbrxUun.d.cts → dokploy-BnVDjWCV.d.cts} +2 -2
  77. package/dist/{dokploy-8cbrxUun.d.cts.map → dokploy-BnVDjWCV.d.cts.map} +1 -1
  78. package/dist/{dokploy-BTflLhTM.d.mts → dokploy-BqLdCfyR.d.mts} +2 -2
  79. package/dist/{dokploy-BTflLhTM.d.mts.map → dokploy-BqLdCfyR.d.mts.map} +1 -1
  80. package/dist/frameworks/claude-code-fw.cjs +79 -0
  81. package/dist/frameworks/claude-code-fw.cjs.map +1 -0
  82. package/dist/frameworks/claude-code-fw.d.cts +2 -0
  83. package/dist/frameworks/claude-code-fw.d.mts +2 -0
  84. package/dist/frameworks/claude-code-fw.mjs +78 -0
  85. package/dist/frameworks/claude-code-fw.mjs.map +1 -0
  86. package/dist/frameworks/codex-fw.cjs +67 -0
  87. package/dist/frameworks/codex-fw.cjs.map +1 -0
  88. package/dist/frameworks/codex-fw.d.cts +2 -0
  89. package/dist/frameworks/codex-fw.d.mts +2 -0
  90. package/dist/frameworks/codex-fw.mjs +66 -0
  91. package/dist/frameworks/codex-fw.mjs.map +1 -0
  92. package/dist/frameworks/copaw.cjs +118 -0
  93. package/dist/frameworks/copaw.cjs.map +1 -0
  94. package/dist/frameworks/copaw.d.cts +2 -0
  95. package/dist/frameworks/copaw.d.mts +2 -0
  96. package/dist/frameworks/copaw.mjs +117 -0
  97. package/dist/frameworks/copaw.mjs.map +1 -0
  98. package/dist/frameworks/index.cjs +35 -0
  99. package/dist/frameworks/index.cjs.map +1 -0
  100. package/dist/frameworks/index.d.cts +11 -0
  101. package/dist/frameworks/index.d.mts +11 -0
  102. package/dist/frameworks/index.mjs +22 -0
  103. package/dist/frameworks/index.mjs.map +1 -0
  104. package/dist/frameworks/memu.cjs +118 -0
  105. package/dist/frameworks/memu.cjs.map +1 -0
  106. package/dist/frameworks/memu.d.cts +2 -0
  107. package/dist/frameworks/memu.d.mts +2 -0
  108. package/dist/frameworks/memu.mjs +117 -0
  109. package/dist/frameworks/memu.mjs.map +1 -0
  110. package/dist/frameworks/nanobot.cjs +126 -0
  111. package/dist/frameworks/nanobot.cjs.map +1 -0
  112. package/dist/frameworks/nanobot.d.cts +2 -0
  113. package/dist/frameworks/nanobot.d.mts +2 -0
  114. package/dist/frameworks/nanobot.mjs +125 -0
  115. package/dist/frameworks/nanobot.mjs.map +1 -0
  116. package/dist/frameworks/nanoclaw.cjs +99 -0
  117. package/dist/frameworks/nanoclaw.cjs.map +1 -0
  118. package/dist/frameworks/nanoclaw.d.cts +2 -0
  119. package/dist/frameworks/nanoclaw.d.mts +2 -0
  120. package/dist/frameworks/nanoclaw.mjs +98 -0
  121. package/dist/frameworks/nanoclaw.mjs.map +1 -0
  122. package/dist/frameworks/openclaw.cjs +253 -0
  123. package/dist/frameworks/openclaw.cjs.map +1 -0
  124. package/dist/frameworks/openclaw.d.cts +2 -0
  125. package/dist/frameworks/openclaw.d.mts +2 -0
  126. package/dist/frameworks/openclaw.mjs +251 -0
  127. package/dist/frameworks/openclaw.mjs.map +1 -0
  128. package/dist/frameworks/registry.cjs +31 -0
  129. package/dist/frameworks/registry.cjs.map +1 -0
  130. package/dist/frameworks/registry.d.cts +2 -0
  131. package/dist/frameworks/registry.d.mts +2 -0
  132. package/dist/frameworks/registry.mjs +26 -0
  133. package/dist/frameworks/registry.mjs.map +1 -0
  134. package/dist/frameworks/registry.test.cjs +110 -0
  135. package/dist/frameworks/registry.test.cjs.map +1 -0
  136. package/dist/frameworks/registry.test.d.cts +1 -0
  137. package/dist/frameworks/registry.test.d.mts +1 -0
  138. package/dist/frameworks/registry.test.mjs +111 -0
  139. package/dist/frameworks/registry.test.mjs.map +1 -0
  140. package/dist/frameworks/types.cjs +0 -0
  141. package/dist/frameworks/types.d.cts +2 -0
  142. package/dist/frameworks/types.d.mts +2 -0
  143. package/dist/frameworks/types.mjs +1 -0
  144. package/dist/frameworks/zeroclaw.cjs +123 -0
  145. package/dist/frameworks/zeroclaw.cjs.map +1 -0
  146. package/dist/frameworks/zeroclaw.d.cts +2 -0
  147. package/dist/frameworks/zeroclaw.d.mts +2 -0
  148. package/dist/frameworks/zeroclaw.mjs +122 -0
  149. package/dist/frameworks/zeroclaw.mjs.map +1 -0
  150. package/dist/generate.cjs +64 -13
  151. package/dist/generate.cjs.map +1 -1
  152. package/dist/generate.d.cts +5 -2
  153. package/dist/generate.d.cts.map +1 -1
  154. package/dist/generate.d.mts +5 -2
  155. package/dist/generate.d.mts.map +1 -1
  156. package/dist/generate.mjs +63 -12
  157. package/dist/generate.mjs.map +1 -1
  158. package/dist/generate.test.cjs +42 -6
  159. package/dist/generate.test.cjs.map +1 -1
  160. package/dist/generate.test.mjs +41 -5
  161. package/dist/generate.test.mjs.map +1 -1
  162. package/dist/generators/bare-metal-install.d.cts +1 -1
  163. package/dist/generators/bare-metal-install.d.mts +1 -1
  164. package/dist/generators/bare-metal-install.test.cjs +1 -1
  165. package/dist/generators/bare-metal-install.test.mjs +1 -1
  166. package/dist/generators/caddy.cjs +9 -3
  167. package/dist/generators/caddy.cjs.map +1 -1
  168. package/dist/generators/caddy.d.cts +1 -1
  169. package/dist/generators/caddy.d.mts +1 -1
  170. package/dist/generators/caddy.mjs +9 -3
  171. package/dist/generators/caddy.mjs.map +1 -1
  172. package/dist/generators/caddy.test.cjs +30 -2
  173. package/dist/generators/caddy.test.cjs.map +1 -1
  174. package/dist/generators/caddy.test.mjs +30 -2
  175. package/dist/generators/caddy.test.mjs.map +1 -1
  176. package/dist/generators/clone-repos.cjs.map +1 -1
  177. package/dist/generators/clone-repos.d.cts +1 -1
  178. package/dist/generators/clone-repos.d.mts +1 -1
  179. package/dist/generators/clone-repos.mjs.map +1 -1
  180. package/dist/generators/clone-repos.test.cjs +1 -1
  181. package/dist/generators/clone-repos.test.cjs.map +1 -1
  182. package/dist/generators/clone-repos.test.mjs +1 -1
  183. package/dist/generators/clone-repos.test.mjs.map +1 -1
  184. package/dist/generators/env.cjs +28 -103
  185. package/dist/generators/env.cjs.map +1 -1
  186. package/dist/generators/env.d.cts +4 -1
  187. package/dist/generators/env.d.cts.map +1 -1
  188. package/dist/generators/env.d.mts +4 -1
  189. package/dist/generators/env.d.mts.map +1 -1
  190. package/dist/generators/env.mjs +27 -102
  191. package/dist/generators/env.mjs.map +1 -1
  192. package/dist/generators/env.test.cjs +3 -3
  193. package/dist/generators/env.test.cjs.map +1 -1
  194. package/dist/generators/env.test.mjs +3 -3
  195. package/dist/generators/env.test.mjs.map +1 -1
  196. package/dist/generators/get-shit-done.d.cts +1 -1
  197. package/dist/generators/get-shit-done.d.mts +1 -1
  198. package/dist/generators/health-check.cjs +6 -6
  199. package/dist/generators/health-check.cjs.map +1 -1
  200. package/dist/generators/health-check.d.cts +1 -1
  201. package/dist/generators/health-check.d.mts +1 -1
  202. package/dist/generators/health-check.mjs +6 -6
  203. package/dist/generators/health-check.mjs.map +1 -1
  204. package/dist/generators/health-check.test.cjs +1 -1
  205. package/dist/generators/health-check.test.mjs +1 -1
  206. package/dist/generators/n8n-workflows.d.cts +1 -1
  207. package/dist/generators/n8n-workflows.d.mts +1 -1
  208. package/dist/generators/native-services.d.cts +1 -1
  209. package/dist/generators/native-services.d.mts +1 -1
  210. package/dist/generators/openclaw-json.cjs +60 -4
  211. package/dist/generators/openclaw-json.cjs.map +1 -1
  212. package/dist/generators/openclaw-json.d.cts +1 -5
  213. package/dist/generators/openclaw-json.d.cts.map +1 -1
  214. package/dist/generators/openclaw-json.d.mts +1 -5
  215. package/dist/generators/openclaw-json.d.mts.map +1 -1
  216. package/dist/generators/openclaw-json.mjs +60 -4
  217. package/dist/generators/openclaw-json.mjs.map +1 -1
  218. package/dist/generators/postgres-init.cjs +20 -0
  219. package/dist/generators/postgres-init.cjs.map +1 -1
  220. package/dist/generators/postgres-init.d.cts +1 -1
  221. package/dist/generators/postgres-init.d.cts.map +1 -1
  222. package/dist/generators/postgres-init.d.mts +1 -1
  223. package/dist/generators/postgres-init.d.mts.map +1 -1
  224. package/dist/generators/postgres-init.mjs +20 -0
  225. package/dist/generators/postgres-init.mjs.map +1 -1
  226. package/dist/generators/prometheus.d.cts +1 -1
  227. package/dist/generators/prometheus.d.mts +1 -1
  228. package/dist/generators/readme.cjs +50 -7
  229. package/dist/generators/readme.cjs.map +1 -1
  230. package/dist/generators/readme.d.cts +3 -1
  231. package/dist/generators/readme.d.cts.map +1 -1
  232. package/dist/generators/readme.d.mts +3 -1
  233. package/dist/generators/readme.d.mts.map +1 -1
  234. package/dist/generators/readme.mjs +50 -7
  235. package/dist/generators/readme.mjs.map +1 -1
  236. package/dist/generators/scripts.test.cjs +2 -2
  237. package/dist/generators/scripts.test.cjs.map +1 -1
  238. package/dist/generators/scripts.test.mjs +2 -2
  239. package/dist/generators/scripts.test.mjs.map +1 -1
  240. package/dist/generators/skills.cjs +1 -1
  241. package/dist/generators/skills.d.cts +1 -1
  242. package/dist/generators/skills.d.cts.map +1 -1
  243. package/dist/generators/skills.d.mts +1 -1
  244. package/dist/generators/skills.d.mts.map +1 -1
  245. package/dist/generators/skills.mjs +310 -0
  246. package/dist/generators/skills.mjs.map +1 -1
  247. package/dist/generators/stack-manifest.d.cts +1 -1
  248. package/dist/generators/stack-manifest.d.mts +1 -1
  249. package/dist/generators/traefik.d.cts +1 -1
  250. package/dist/generators/traefik.d.mts +1 -1
  251. package/dist/generators/traefik.test.cjs +12 -12
  252. package/dist/generators/traefik.test.cjs.map +1 -1
  253. package/dist/generators/traefik.test.mjs +12 -12
  254. package/dist/generators/traefik.test.mjs.map +1 -1
  255. package/dist/index.cjs +20 -2
  256. package/dist/index.d.cts +14 -7
  257. package/dist/index.d.mts +14 -7
  258. package/dist/index.mjs +10 -3
  259. package/dist/logger/__tests__/logger.test.cjs +308 -0
  260. package/dist/logger/__tests__/logger.test.cjs.map +1 -0
  261. package/dist/logger/__tests__/logger.test.d.cts +1 -0
  262. package/dist/logger/__tests__/logger.test.d.mts +1 -0
  263. package/dist/logger/__tests__/logger.test.mjs +308 -0
  264. package/dist/logger/__tests__/logger.test.mjs.map +1 -0
  265. package/dist/logger/index.cjs +10 -0
  266. package/dist/logger/index.d.cts +6 -0
  267. package/dist/logger/index.d.mts +6 -0
  268. package/dist/logger/index.mjs +5 -0
  269. package/dist/logger/logger.cjs +270 -0
  270. package/dist/logger/logger.cjs.map +1 -0
  271. package/dist/logger/logger.d.cts +2 -0
  272. package/dist/logger/logger.d.mts +2 -0
  273. package/dist/logger/logger.mjs +267 -0
  274. package/dist/logger/logger.mjs.map +1 -0
  275. package/dist/logger/sinks/callback-sink.cjs +18 -0
  276. package/dist/logger/sinks/callback-sink.cjs.map +1 -0
  277. package/dist/logger/sinks/callback-sink.d.cts +2 -0
  278. package/dist/logger/sinks/callback-sink.d.mts +2 -0
  279. package/dist/logger/sinks/callback-sink.mjs +17 -0
  280. package/dist/logger/sinks/callback-sink.mjs.map +1 -0
  281. package/dist/logger/sinks/console-sink.cjs +39 -0
  282. package/dist/logger/sinks/console-sink.cjs.map +1 -0
  283. package/dist/logger/sinks/console-sink.d.cts +2 -0
  284. package/dist/logger/sinks/console-sink.d.mts +2 -0
  285. package/dist/logger/sinks/console-sink.mjs +38 -0
  286. package/dist/logger/sinks/console-sink.mjs.map +1 -0
  287. package/dist/logger/sinks/file-sink.cjs +72 -0
  288. package/dist/logger/sinks/file-sink.cjs.map +1 -0
  289. package/dist/logger/sinks/file-sink.d.cts +36 -0
  290. package/dist/logger/sinks/file-sink.d.cts.map +1 -0
  291. package/dist/logger/sinks/file-sink.d.mts +36 -0
  292. package/dist/logger/sinks/file-sink.d.mts.map +1 -0
  293. package/dist/logger/sinks/file-sink.mjs +70 -0
  294. package/dist/logger/sinks/file-sink.mjs.map +1 -0
  295. package/dist/logger/types.cjs +0 -0
  296. package/dist/logger/types.d.cts +2 -0
  297. package/dist/logger/types.d.mts +2 -0
  298. package/dist/logger/types.mjs +1 -0
  299. package/dist/logger-CZ0Qnyiu.d.mts +66 -0
  300. package/dist/logger-CZ0Qnyiu.d.mts.map +1 -0
  301. package/dist/logger-DDfwai-A.d.cts +66 -0
  302. package/dist/logger-DDfwai-A.d.cts.map +1 -0
  303. package/dist/memu-BfRXtwmL.d.cts +7 -0
  304. package/dist/memu-BfRXtwmL.d.cts.map +1 -0
  305. package/dist/memu-C-fXbWr-.d.mts +7 -0
  306. package/dist/memu-C-fXbWr-.d.mts.map +1 -0
  307. package/dist/migrations.cjs +17 -9
  308. package/dist/migrations.cjs.map +1 -1
  309. package/dist/migrations.d.cts +1 -1
  310. package/dist/migrations.d.cts.map +1 -1
  311. package/dist/migrations.d.mts +1 -1
  312. package/dist/migrations.d.mts.map +1 -1
  313. package/dist/migrations.mjs +17 -9
  314. package/dist/migrations.mjs.map +1 -1
  315. package/dist/migrations.test.cjs +4 -4
  316. package/dist/migrations.test.mjs +4 -4
  317. package/dist/nanobot-2c0bS4lu.d.cts +7 -0
  318. package/dist/nanobot-2c0bS4lu.d.cts.map +1 -0
  319. package/dist/nanobot-BUO6pVQc.d.mts +7 -0
  320. package/dist/nanobot-BUO6pVQc.d.mts.map +1 -0
  321. package/dist/nanoclaw-CgHubEig.d.mts +7 -0
  322. package/dist/nanoclaw-CgHubEig.d.mts.map +1 -0
  323. package/dist/nanoclaw-Dvz0ef6J.d.cts +7 -0
  324. package/dist/nanoclaw-Dvz0ef6J.d.cts.map +1 -0
  325. package/dist/openclaw-D8lVecjC.d.mts +7 -0
  326. package/dist/openclaw-D8lVecjC.d.mts.map +1 -0
  327. package/dist/openclaw-DThj8i3N.d.cts +7 -0
  328. package/dist/openclaw-DThj8i3N.d.cts.map +1 -0
  329. package/dist/port-scanner.d.cts +1 -1
  330. package/dist/port-scanner.d.mts +1 -1
  331. package/dist/presets/presets.test.cjs +5 -5
  332. package/dist/presets/presets.test.cjs.map +1 -1
  333. package/dist/presets/presets.test.mjs +4 -4
  334. package/dist/presets/presets.test.mjs.map +1 -1
  335. package/dist/presets/registry.d.cts +1 -1
  336. package/dist/presets/registry.d.mts +1 -1
  337. package/dist/presets/registry.test.cjs +7 -7
  338. package/dist/presets/registry.test.cjs.map +1 -1
  339. package/dist/presets/registry.test.mjs +7 -7
  340. package/dist/presets/registry.test.mjs.map +1 -1
  341. package/dist/registry-DHX7vnVo.d.cts +16 -0
  342. package/dist/registry-DHX7vnVo.d.cts.map +1 -0
  343. package/dist/registry-DTAILnga.d.mts +16 -0
  344. package/dist/registry-DTAILnga.d.mts.map +1 -0
  345. package/dist/resolver.cjs +13 -3
  346. package/dist/resolver.cjs.map +1 -1
  347. package/dist/resolver.d.cts +1 -1
  348. package/dist/resolver.d.cts.map +1 -1
  349. package/dist/resolver.d.mts +1 -1
  350. package/dist/resolver.d.mts.map +1 -1
  351. package/dist/resolver.mjs +13 -3
  352. package/dist/resolver.mjs.map +1 -1
  353. package/dist/resolver.test.cjs +35 -3
  354. package/dist/resolver.test.cjs.map +1 -1
  355. package/dist/resolver.test.mjs +35 -3
  356. package/dist/resolver.test.mjs.map +1 -1
  357. package/dist/{schema-BQnZrcw8.d.cts → schema-BSl9wiFe.d.mts} +134 -2
  358. package/dist/schema-BSl9wiFe.d.mts.map +1 -0
  359. package/dist/{schema-SBpL0bdI.d.mts → schema-Bd9l2r7p.d.cts} +134 -2
  360. package/dist/schema-Bd9l2r7p.d.cts.map +1 -0
  361. package/dist/schema.cjs +28 -4
  362. package/dist/schema.cjs.map +1 -1
  363. package/dist/schema.d.cts +2 -2
  364. package/dist/schema.d.mts +2 -2
  365. package/dist/schema.mjs +27 -4
  366. package/dist/schema.mjs.map +1 -1
  367. package/dist/schema.test.cjs +3 -3
  368. package/dist/schema.test.cjs.map +1 -1
  369. package/dist/schema.test.mjs +3 -3
  370. package/dist/schema.test.mjs.map +1 -1
  371. package/dist/services/definitions/adguard-home.d.cts +1 -1
  372. package/dist/services/definitions/adguard-home.d.mts +1 -1
  373. package/dist/services/definitions/agent-browser.cjs +161 -0
  374. package/dist/services/definitions/agent-browser.cjs.map +1 -0
  375. package/dist/services/definitions/agent-browser.d.cts +7 -0
  376. package/dist/services/definitions/agent-browser.d.cts.map +1 -0
  377. package/dist/services/definitions/agent-browser.d.mts +7 -0
  378. package/dist/services/definitions/agent-browser.d.mts.map +1 -0
  379. package/dist/services/definitions/agent-browser.mjs +160 -0
  380. package/dist/services/definitions/agent-browser.mjs.map +1 -0
  381. package/dist/services/definitions/airbyte.d.cts +1 -1
  382. package/dist/services/definitions/airbyte.d.mts +1 -1
  383. package/dist/services/definitions/airflow.d.cts +1 -1
  384. package/dist/services/definitions/airflow.d.mts +1 -1
  385. package/dist/services/definitions/anything-llm.d.cts +1 -1
  386. package/dist/services/definitions/anything-llm.d.mts +1 -1
  387. package/dist/services/definitions/appflowy.d.cts +1 -1
  388. package/dist/services/definitions/appflowy.d.mts +1 -1
  389. package/dist/services/definitions/apptension-saas.cjs.map +1 -1
  390. package/dist/services/definitions/apptension-saas.d.cts +1 -1
  391. package/dist/services/definitions/apptension-saas.d.mts +1 -1
  392. package/dist/services/definitions/apptension-saas.mjs.map +1 -1
  393. package/dist/services/definitions/appwrite.d.cts +1 -1
  394. package/dist/services/definitions/appwrite.d.mts +1 -1
  395. package/dist/services/definitions/audiobookshelf.d.cts +1 -1
  396. package/dist/services/definitions/audiobookshelf.d.mts +1 -1
  397. package/dist/services/definitions/authelia.d.cts +1 -1
  398. package/dist/services/definitions/authelia.d.mts +1 -1
  399. package/dist/services/definitions/authentik.d.cts +1 -1
  400. package/dist/services/definitions/authentik.d.mts +1 -1
  401. package/dist/services/definitions/axolotl.d.cts +1 -1
  402. package/dist/services/definitions/axolotl.d.mts +1 -1
  403. package/dist/services/definitions/baserow.d.cts +1 -1
  404. package/dist/services/definitions/baserow.d.mts +1 -1
  405. package/dist/services/definitions/beszel.d.cts +1 -1
  406. package/dist/services/definitions/beszel.d.mts +1 -1
  407. package/dist/services/definitions/boxyhq-saas.d.cts +1 -1
  408. package/dist/services/definitions/boxyhq-saas.d.mts +1 -1
  409. package/dist/services/definitions/browserless.d.cts +1 -1
  410. package/dist/services/definitions/browserless.d.mts +1 -1
  411. package/dist/services/definitions/burnlink.d.cts +1 -1
  412. package/dist/services/definitions/burnlink.d.mts +1 -1
  413. package/dist/services/definitions/caddy.d.cts +1 -1
  414. package/dist/services/definitions/caddy.d.mts +1 -1
  415. package/dist/services/definitions/cal-com.d.cts +1 -1
  416. package/dist/services/definitions/cal-com.d.mts +1 -1
  417. package/dist/services/definitions/calibre-web.d.cts +1 -1
  418. package/dist/services/definitions/calibre-web.d.mts +1 -1
  419. package/dist/services/definitions/chatwoot-worker.d.cts +1 -1
  420. package/dist/services/definitions/chatwoot-worker.d.mts +1 -1
  421. package/dist/services/definitions/chatwoot.d.cts +1 -1
  422. package/dist/services/definitions/chatwoot.d.mts +1 -1
  423. package/dist/services/definitions/chromadb.cjs +4 -1
  424. package/dist/services/definitions/chromadb.cjs.map +1 -1
  425. package/dist/services/definitions/chromadb.d.cts +1 -1
  426. package/dist/services/definitions/chromadb.d.mts +1 -1
  427. package/dist/services/definitions/chromadb.mjs +4 -1
  428. package/dist/services/definitions/chromadb.mjs.map +1 -1
  429. package/dist/services/definitions/claude-code.cjs +1 -1
  430. package/dist/services/definitions/claude-code.cjs.map +1 -1
  431. package/dist/services/definitions/claude-code.d.cts +1 -1
  432. package/dist/services/definitions/claude-code.d.mts +1 -1
  433. package/dist/services/definitions/claude-code.mjs +1 -1
  434. package/dist/services/definitions/claude-code.mjs.map +1 -1
  435. package/dist/services/definitions/clawrouter.cjs +138 -0
  436. package/dist/services/definitions/clawrouter.cjs.map +1 -0
  437. package/dist/services/definitions/clawrouter.d.cts +7 -0
  438. package/dist/services/definitions/clawrouter.d.cts.map +1 -0
  439. package/dist/services/definitions/clawrouter.d.mts +7 -0
  440. package/dist/services/definitions/clawrouter.d.mts.map +1 -0
  441. package/dist/services/definitions/clawrouter.mjs +137 -0
  442. package/dist/services/definitions/clawrouter.mjs.map +1 -0
  443. package/dist/services/definitions/clickhouse.d.cts +1 -1
  444. package/dist/services/definitions/clickhouse.d.mts +1 -1
  445. package/dist/services/definitions/cloudflared.d.cts +1 -1
  446. package/dist/services/definitions/cloudflared.d.mts +1 -1
  447. package/dist/services/definitions/cmsaas-starter.d.cts +1 -1
  448. package/dist/services/definitions/cmsaas-starter.d.mts +1 -1
  449. package/dist/services/definitions/cockroachdb.d.cts +1 -1
  450. package/dist/services/definitions/cockroachdb.d.mts +1 -1
  451. package/dist/services/definitions/code-server.d.cts +1 -1
  452. package/dist/services/definitions/code-server.d.mts +1 -1
  453. package/dist/services/definitions/coder.d.cts +1 -1
  454. package/dist/services/definitions/coder.d.mts +1 -1
  455. package/dist/services/definitions/codex.cjs +1 -1
  456. package/dist/services/definitions/codex.cjs.map +1 -1
  457. package/dist/services/definitions/codex.d.cts +1 -1
  458. package/dist/services/definitions/codex.d.mts +1 -1
  459. package/dist/services/definitions/codex.mjs +1 -1
  460. package/dist/services/definitions/codex.mjs.map +1 -1
  461. package/dist/services/definitions/comfyui.d.cts +1 -1
  462. package/dist/services/definitions/comfyui.d.mts +1 -1
  463. package/dist/services/definitions/convex-dashboard.d.cts +1 -1
  464. package/dist/services/definitions/convex-dashboard.d.mts +1 -1
  465. package/dist/services/definitions/convex.cjs.map +1 -1
  466. package/dist/services/definitions/convex.d.cts +1 -1
  467. package/dist/services/definitions/convex.d.mts +1 -1
  468. package/dist/services/definitions/convex.mjs.map +1 -1
  469. package/dist/services/definitions/coolify.d.cts +1 -1
  470. package/dist/services/definitions/coolify.d.mts +1 -1
  471. package/dist/services/definitions/copaw.cjs +97 -0
  472. package/dist/services/definitions/copaw.cjs.map +1 -0
  473. package/dist/services/definitions/copaw.d.cts +7 -0
  474. package/dist/services/definitions/copaw.d.cts.map +1 -0
  475. package/dist/services/definitions/copaw.d.mts +7 -0
  476. package/dist/services/definitions/copaw.d.mts.map +1 -0
  477. package/dist/services/definitions/copaw.mjs +96 -0
  478. package/dist/services/definitions/copaw.mjs.map +1 -0
  479. package/dist/services/definitions/crowdsec.d.cts +1 -1
  480. package/dist/services/definitions/crowdsec.d.mts +1 -1
  481. package/dist/services/definitions/dagster.d.cts +1 -1
  482. package/dist/services/definitions/dagster.d.mts +1 -1
  483. package/dist/services/definitions/desktop-environment.cjs +2 -1
  484. package/dist/services/definitions/desktop-environment.cjs.map +1 -1
  485. package/dist/services/definitions/desktop-environment.d.cts +1 -1
  486. package/dist/services/definitions/desktop-environment.d.mts +1 -1
  487. package/dist/services/definitions/desktop-environment.mjs +2 -1
  488. package/dist/services/definitions/desktop-environment.mjs.map +1 -1
  489. package/dist/services/definitions/dify.d.cts +1 -1
  490. package/dist/services/definitions/dify.d.mts +1 -1
  491. package/dist/services/definitions/directus.d.cts +1 -1
  492. package/dist/services/definitions/directus.d.mts +1 -1
  493. package/dist/services/definitions/docsgpt.d.cts +1 -1
  494. package/dist/services/definitions/docsgpt.d.mts +1 -1
  495. package/dist/services/definitions/dokploy.d.cts +1 -1
  496. package/dist/services/definitions/dokploy.d.mts +1 -1
  497. package/dist/services/definitions/dozzle.d.cts +1 -1
  498. package/dist/services/definitions/dozzle.d.mts +1 -1
  499. package/dist/services/definitions/dragonfly.d.cts +1 -1
  500. package/dist/services/definitions/dragonfly.d.mts +1 -1
  501. package/dist/services/definitions/drone-ci.d.cts +1 -1
  502. package/dist/services/definitions/drone-ci.d.mts +1 -1
  503. package/dist/services/definitions/duplicati.d.cts +1 -1
  504. package/dist/services/definitions/duplicati.d.mts +1 -1
  505. package/dist/services/definitions/element-web.d.cts +1 -1
  506. package/dist/services/definitions/element-web.d.mts +1 -1
  507. package/dist/services/definitions/excalidraw.d.cts +1 -1
  508. package/dist/services/definitions/excalidraw.d.mts +1 -1
  509. package/dist/services/definitions/ffmpeg.d.cts +1 -1
  510. package/dist/services/definitions/ffmpeg.d.mts +1 -1
  511. package/dist/services/definitions/firecrawl-playwright.d.cts +1 -1
  512. package/dist/services/definitions/firecrawl-playwright.d.mts +1 -1
  513. package/dist/services/definitions/firecrawl.d.cts +1 -1
  514. package/dist/services/definitions/firecrawl.d.mts +1 -1
  515. package/dist/services/definitions/flagsmith.d.cts +1 -1
  516. package/dist/services/definitions/flagsmith.d.mts +1 -1
  517. package/dist/services/definitions/flowise.d.cts +1 -1
  518. package/dist/services/definitions/flowise.d.mts +1 -1
  519. package/dist/services/definitions/focalboard.d.cts +1 -1
  520. package/dist/services/definitions/focalboard.d.mts +1 -1
  521. package/dist/services/definitions/fonoster.d.cts +1 -1
  522. package/dist/services/definitions/fonoster.d.mts +1 -1
  523. package/dist/services/definitions/forgejo.d.cts +1 -1
  524. package/dist/services/definitions/forgejo.d.mts +1 -1
  525. package/dist/services/definitions/formbricks.d.cts +1 -1
  526. package/dist/services/definitions/formbricks.d.mts +1 -1
  527. package/dist/services/definitions/gemini-cli.d.cts +1 -1
  528. package/dist/services/definitions/gemini-cli.d.mts +1 -1
  529. package/dist/services/definitions/ghost.d.cts +1 -1
  530. package/dist/services/definitions/ghost.d.mts +1 -1
  531. package/dist/services/definitions/gitea.d.cts +1 -1
  532. package/dist/services/definitions/gitea.d.mts +1 -1
  533. package/dist/services/definitions/gotify.d.cts +1 -1
  534. package/dist/services/definitions/gotify.d.mts +1 -1
  535. package/dist/services/definitions/grafana.d.cts +1 -1
  536. package/dist/services/definitions/grafana.d.mts +1 -1
  537. package/dist/services/definitions/graylog.d.cts +1 -1
  538. package/dist/services/definitions/graylog.d.mts +1 -1
  539. package/dist/services/definitions/headscale.d.cts +1 -1
  540. package/dist/services/definitions/headscale.d.mts +1 -1
  541. package/dist/services/definitions/hedgedoc.d.cts +1 -1
  542. package/dist/services/definitions/hedgedoc.d.mts +1 -1
  543. package/dist/services/definitions/hexstrike.d.cts +1 -1
  544. package/dist/services/definitions/hexstrike.d.mts +1 -1
  545. package/dist/services/definitions/heyform.d.cts +1 -1
  546. package/dist/services/definitions/heyform.d.mts +1 -1
  547. package/dist/services/definitions/hindsight.cjs +4 -1
  548. package/dist/services/definitions/hindsight.cjs.map +1 -1
  549. package/dist/services/definitions/hindsight.d.cts +1 -1
  550. package/dist/services/definitions/hindsight.d.mts +1 -1
  551. package/dist/services/definitions/hindsight.mjs +4 -1
  552. package/dist/services/definitions/hindsight.mjs.map +1 -1
  553. package/dist/services/definitions/homeassistant.d.cts +1 -1
  554. package/dist/services/definitions/homeassistant.d.mts +1 -1
  555. package/dist/services/definitions/hoppscotch.d.cts +1 -1
  556. package/dist/services/definitions/hoppscotch.d.mts +1 -1
  557. package/dist/services/definitions/immich.d.cts +1 -1
  558. package/dist/services/definitions/immich.d.mts +1 -1
  559. package/dist/services/definitions/index.cjs +42 -6
  560. package/dist/services/definitions/index.cjs.map +1 -1
  561. package/dist/services/definitions/index.d.cts +16 -4
  562. package/dist/services/definitions/index.d.cts.map +1 -1
  563. package/dist/services/definitions/index.d.mts +16 -4
  564. package/dist/services/definitions/index.d.mts.map +1 -1
  565. package/dist/services/definitions/index.mjs +31 -7
  566. package/dist/services/definitions/index.mjs.map +1 -1
  567. package/dist/services/definitions/infisical.d.cts +1 -1
  568. package/dist/services/definitions/infisical.d.mts +1 -1
  569. package/dist/services/definitions/influxdb.d.cts +1 -1
  570. package/dist/services/definitions/influxdb.d.mts +1 -1
  571. package/dist/services/definitions/invoke-ai.d.cts +1 -1
  572. package/dist/services/definitions/invoke-ai.d.mts +1 -1
  573. package/dist/services/definitions/ixartz-saas.d.cts +1 -1
  574. package/dist/services/definitions/ixartz-saas.d.mts +1 -1
  575. package/dist/services/definitions/jaeger.d.cts +1 -1
  576. package/dist/services/definitions/jaeger.d.mts +1 -1
  577. package/dist/services/definitions/jan.d.cts +1 -1
  578. package/dist/services/definitions/jan.d.mts +1 -1
  579. package/dist/services/definitions/jellyfin.d.cts +1 -1
  580. package/dist/services/definitions/jellyfin.d.mts +1 -1
  581. package/dist/services/definitions/jenkins.d.cts +1 -1
  582. package/dist/services/definitions/jenkins.d.mts +1 -1
  583. package/dist/services/definitions/jitsi-meet.d.cts +1 -1
  584. package/dist/services/definitions/jitsi-meet.d.mts +1 -1
  585. package/dist/services/definitions/keycloak.d.cts +1 -1
  586. package/dist/services/definitions/keycloak.d.mts +1 -1
  587. package/dist/services/definitions/kimi.d.cts +1 -1
  588. package/dist/services/definitions/kimi.d.mts +1 -1
  589. package/dist/services/definitions/kong.d.cts +1 -1
  590. package/dist/services/definitions/kong.d.mts +1 -1
  591. package/dist/services/definitions/lago.d.cts +1 -1
  592. package/dist/services/definitions/lago.d.mts +1 -1
  593. package/dist/services/definitions/langflow.d.cts +1 -1
  594. package/dist/services/definitions/langflow.d.mts +1 -1
  595. package/dist/services/definitions/langfuse.d.cts +1 -1
  596. package/dist/services/definitions/langfuse.d.mts +1 -1
  597. package/dist/services/definitions/lasuite-meet-agents.d.cts +1 -1
  598. package/dist/services/definitions/lasuite-meet-agents.d.mts +1 -1
  599. package/dist/services/definitions/lasuite-meet-backend.d.cts +1 -1
  600. package/dist/services/definitions/lasuite-meet-backend.d.mts +1 -1
  601. package/dist/services/definitions/lasuite-meet-frontend.d.cts +1 -1
  602. package/dist/services/definitions/lasuite-meet-frontend.d.mts +1 -1
  603. package/dist/services/definitions/librechat.d.cts +1 -1
  604. package/dist/services/definitions/librechat.d.mts +1 -1
  605. package/dist/services/definitions/lightpanda.d.cts +1 -1
  606. package/dist/services/definitions/lightpanda.d.mts +1 -1
  607. package/dist/services/definitions/listmonk.d.cts +1 -1
  608. package/dist/services/definitions/listmonk.d.mts +1 -1
  609. package/dist/services/definitions/litellm.d.cts +1 -1
  610. package/dist/services/definitions/litellm.d.mts +1 -1
  611. package/dist/services/definitions/livekit.d.cts +1 -1
  612. package/dist/services/definitions/livekit.d.mts +1 -1
  613. package/dist/services/definitions/local-ai.d.cts +1 -1
  614. package/dist/services/definitions/local-ai.d.mts +1 -1
  615. package/dist/services/definitions/loki.d.cts +1 -1
  616. package/dist/services/definitions/loki.d.mts +1 -1
  617. package/dist/services/definitions/mariadb.d.cts +1 -1
  618. package/dist/services/definitions/mariadb.d.mts +1 -1
  619. package/dist/services/definitions/matomo.d.cts +1 -1
  620. package/dist/services/definitions/matomo.d.mts +1 -1
  621. package/dist/services/definitions/matrix-synapse.d.cts +1 -1
  622. package/dist/services/definitions/matrix-synapse.d.mts +1 -1
  623. package/dist/services/definitions/mattermost.d.cts +1 -1
  624. package/dist/services/definitions/mattermost.d.mts +1 -1
  625. package/dist/services/definitions/mautic.d.cts +1 -1
  626. package/dist/services/definitions/mautic.d.mts +1 -1
  627. package/dist/services/definitions/medusa.d.cts +1 -1
  628. package/dist/services/definitions/medusa.d.mts +1 -1
  629. package/dist/services/definitions/meilisearch.d.cts +1 -1
  630. package/dist/services/definitions/meilisearch.d.mts +1 -1
  631. package/dist/services/definitions/mem0.cjs +133 -0
  632. package/dist/services/definitions/mem0.cjs.map +1 -0
  633. package/dist/services/definitions/mem0.d.cts +7 -0
  634. package/dist/services/definitions/mem0.d.cts.map +1 -0
  635. package/dist/services/definitions/mem0.d.mts +7 -0
  636. package/dist/services/definitions/mem0.d.mts.map +1 -0
  637. package/dist/services/definitions/mem0.mjs +132 -0
  638. package/dist/services/definitions/mem0.mjs.map +1 -0
  639. package/dist/services/definitions/memu.cjs +96 -0
  640. package/dist/services/definitions/memu.cjs.map +1 -0
  641. package/dist/services/definitions/memu.d.cts +7 -0
  642. package/dist/services/definitions/memu.d.cts.map +1 -0
  643. package/dist/services/definitions/memu.d.mts +7 -0
  644. package/dist/services/definitions/memu.d.mts.map +1 -0
  645. package/dist/services/definitions/memu.mjs +95 -0
  646. package/dist/services/definitions/memu.mjs.map +1 -0
  647. package/dist/services/definitions/metabase.d.cts +1 -1
  648. package/dist/services/definitions/metabase.d.mts +1 -1
  649. package/dist/services/definitions/milvus.cjs +4 -1
  650. package/dist/services/definitions/milvus.cjs.map +1 -1
  651. package/dist/services/definitions/milvus.d.cts +1 -1
  652. package/dist/services/definitions/milvus.d.mts +1 -1
  653. package/dist/services/definitions/milvus.mjs +4 -1
  654. package/dist/services/definitions/milvus.mjs.map +1 -1
  655. package/dist/services/definitions/minio.d.cts +1 -1
  656. package/dist/services/definitions/minio.d.mts +1 -1
  657. package/dist/services/definitions/mission-control.d.cts +1 -1
  658. package/dist/services/definitions/mission-control.d.mts +1 -1
  659. package/dist/services/definitions/mixpost.d.cts +1 -1
  660. package/dist/services/definitions/mixpost.d.mts +1 -1
  661. package/dist/services/definitions/mosquitto.d.cts +1 -1
  662. package/dist/services/definitions/mosquitto.d.mts +1 -1
  663. package/dist/services/definitions/motion-canvas.d.cts +1 -1
  664. package/dist/services/definitions/motion-canvas.d.mts +1 -1
  665. package/dist/services/definitions/mysql.d.cts +1 -1
  666. package/dist/services/definitions/mysql.d.mts +1 -1
  667. package/dist/services/definitions/n8n.d.cts +1 -1
  668. package/dist/services/definitions/n8n.d.mts +1 -1
  669. package/dist/services/definitions/nanobot.cjs +86 -0
  670. package/dist/services/definitions/nanobot.cjs.map +1 -0
  671. package/dist/services/definitions/nanobot.d.cts +7 -0
  672. package/dist/services/definitions/nanobot.d.cts.map +1 -0
  673. package/dist/services/definitions/nanobot.d.mts +7 -0
  674. package/dist/services/definitions/nanobot.d.mts.map +1 -0
  675. package/dist/services/definitions/nanobot.mjs +85 -0
  676. package/dist/services/definitions/nanobot.mjs.map +1 -0
  677. package/dist/services/definitions/nanoclaw.cjs +79 -0
  678. package/dist/services/definitions/nanoclaw.cjs.map +1 -0
  679. package/dist/services/definitions/nanoclaw.d.cts +7 -0
  680. package/dist/services/definitions/nanoclaw.d.cts.map +1 -0
  681. package/dist/services/definitions/nanoclaw.d.mts +7 -0
  682. package/dist/services/definitions/nanoclaw.d.mts.map +1 -0
  683. package/dist/services/definitions/nanoclaw.mjs +78 -0
  684. package/dist/services/definitions/nanoclaw.mjs.map +1 -0
  685. package/dist/services/definitions/navidrome.d.cts +1 -1
  686. package/dist/services/definitions/navidrome.d.mts +1 -1
  687. package/dist/services/definitions/neo4j.d.cts +1 -1
  688. package/dist/services/definitions/neo4j.d.mts +1 -1
  689. package/dist/services/definitions/nextcloud.d.cts +1 -1
  690. package/dist/services/definitions/nextcloud.d.mts +1 -1
  691. package/dist/services/definitions/nginx-proxy-manager.d.cts +1 -1
  692. package/dist/services/definitions/nginx-proxy-manager.d.mts +1 -1
  693. package/dist/services/definitions/nocodb.d.cts +1 -1
  694. package/dist/services/definitions/nocodb.d.mts +1 -1
  695. package/dist/services/definitions/node-red.d.cts +1 -1
  696. package/dist/services/definitions/node-red.d.mts +1 -1
  697. package/dist/services/definitions/ntfy.d.cts +1 -1
  698. package/dist/services/definitions/ntfy.d.mts +1 -1
  699. package/dist/services/definitions/ollama.d.cts +1 -1
  700. package/dist/services/definitions/ollama.d.mts +1 -1
  701. package/dist/services/definitions/open-saas.d.cts +1 -1
  702. package/dist/services/definitions/open-saas.d.mts +1 -1
  703. package/dist/services/definitions/open-webui.d.cts +1 -1
  704. package/dist/services/definitions/open-webui.d.mts +1 -1
  705. package/dist/services/definitions/opencode.d.cts +1 -1
  706. package/dist/services/definitions/opencode.d.mts +1 -1
  707. package/dist/services/definitions/openhands.d.cts +1 -1
  708. package/dist/services/definitions/openhands.d.mts +1 -1
  709. package/dist/services/definitions/openpanel.d.cts +1 -1
  710. package/dist/services/definitions/openpanel.d.mts +1 -1
  711. package/dist/services/definitions/opensandbox.cjs +2 -1
  712. package/dist/services/definitions/opensandbox.cjs.map +1 -1
  713. package/dist/services/definitions/opensandbox.d.cts +1 -1
  714. package/dist/services/definitions/opensandbox.d.mts +1 -1
  715. package/dist/services/definitions/opensandbox.mjs +2 -1
  716. package/dist/services/definitions/opensandbox.mjs.map +1 -1
  717. package/dist/services/definitions/opensearch.d.cts +1 -1
  718. package/dist/services/definitions/opensearch.d.mts +1 -1
  719. package/dist/services/definitions/outline.d.cts +1 -1
  720. package/dist/services/definitions/outline.d.mts +1 -1
  721. package/dist/services/definitions/paperless-ngx.d.cts +1 -1
  722. package/dist/services/definitions/paperless-ngx.d.mts +1 -1
  723. package/dist/services/definitions/pentagi.d.cts +1 -1
  724. package/dist/services/definitions/pentagi.d.mts +1 -1
  725. package/dist/services/definitions/pentestagent.d.cts +1 -1
  726. package/dist/services/definitions/pentestagent.d.mts +1 -1
  727. package/dist/services/definitions/photoprism.d.cts +1 -1
  728. package/dist/services/definitions/photoprism.d.mts +1 -1
  729. package/dist/services/definitions/pihole.d.cts +1 -1
  730. package/dist/services/definitions/pihole.d.mts +1 -1
  731. package/dist/services/definitions/piper-tts.d.cts +1 -1
  732. package/dist/services/definitions/piper-tts.d.mts +1 -1
  733. package/dist/services/definitions/plane.d.cts +1 -1
  734. package/dist/services/definitions/plane.d.mts +1 -1
  735. package/dist/services/definitions/plausible.d.cts +1 -1
  736. package/dist/services/definitions/plausible.d.mts +1 -1
  737. package/dist/services/definitions/playwright-server.d.cts +1 -1
  738. package/dist/services/definitions/playwright-server.d.mts +1 -1
  739. package/dist/services/definitions/pocket-id.d.cts +1 -1
  740. package/dist/services/definitions/pocket-id.d.mts +1 -1
  741. package/dist/services/definitions/pocketbase.d.cts +1 -1
  742. package/dist/services/definitions/pocketbase.d.mts +1 -1
  743. package/dist/services/definitions/portainer.d.cts +1 -1
  744. package/dist/services/definitions/portainer.d.mts +1 -1
  745. package/dist/services/definitions/postgresql.d.cts +1 -1
  746. package/dist/services/definitions/postgresql.d.mts +1 -1
  747. package/dist/services/definitions/posthog.d.cts +1 -1
  748. package/dist/services/definitions/posthog.d.mts +1 -1
  749. package/dist/services/definitions/postiz.d.cts +1 -1
  750. package/dist/services/definitions/postiz.d.mts +1 -1
  751. package/dist/services/definitions/prometheus.d.cts +1 -1
  752. package/dist/services/definitions/prometheus.d.mts +1 -1
  753. package/dist/services/definitions/qdrant.d.cts +1 -1
  754. package/dist/services/definitions/qdrant.d.mts +1 -1
  755. package/dist/services/definitions/rabbitmq.d.cts +1 -1
  756. package/dist/services/definitions/rabbitmq.d.mts +1 -1
  757. package/dist/services/definitions/ragflow.d.cts +1 -1
  758. package/dist/services/definitions/ragflow.d.mts +1 -1
  759. package/dist/services/definitions/redis.d.cts +1 -1
  760. package/dist/services/definitions/redis.d.mts +1 -1
  761. package/dist/services/definitions/relaticle-horizon.cjs +48 -0
  762. package/dist/services/definitions/relaticle-horizon.cjs.map +1 -0
  763. package/dist/services/definitions/relaticle-horizon.d.cts +7 -0
  764. package/dist/services/definitions/relaticle-horizon.d.cts.map +1 -0
  765. package/dist/services/definitions/relaticle-horizon.d.mts +7 -0
  766. package/dist/services/definitions/relaticle-horizon.d.mts.map +1 -0
  767. package/dist/services/definitions/relaticle-horizon.mjs +48 -0
  768. package/dist/services/definitions/relaticle-horizon.mjs.map +1 -0
  769. package/dist/services/definitions/relaticle-scheduler.cjs +44 -0
  770. package/dist/services/definitions/relaticle-scheduler.cjs.map +1 -0
  771. package/dist/services/definitions/relaticle-scheduler.d.cts +7 -0
  772. package/dist/services/definitions/relaticle-scheduler.d.cts.map +1 -0
  773. package/dist/services/definitions/relaticle-scheduler.d.mts +7 -0
  774. package/dist/services/definitions/relaticle-scheduler.d.mts.map +1 -0
  775. package/dist/services/definitions/relaticle-scheduler.mjs +44 -0
  776. package/dist/services/definitions/relaticle-scheduler.mjs.map +1 -0
  777. package/dist/services/definitions/relaticle.cjs +151 -0
  778. package/dist/services/definitions/relaticle.cjs.map +1 -0
  779. package/dist/services/definitions/relaticle.d.cts +80 -0
  780. package/dist/services/definitions/relaticle.d.cts.map +1 -0
  781. package/dist/services/definitions/relaticle.d.mts +80 -0
  782. package/dist/services/definitions/relaticle.d.mts.map +1 -0
  783. package/dist/services/definitions/relaticle.mjs +149 -0
  784. package/dist/services/definitions/relaticle.mjs.map +1 -0
  785. package/dist/services/definitions/remotion.d.cts +1 -1
  786. package/dist/services/definitions/remotion.d.mts +1 -1
  787. package/dist/services/definitions/restic.d.cts +1 -1
  788. package/dist/services/definitions/restic.d.mts +1 -1
  789. package/dist/services/definitions/revolt.d.cts +1 -1
  790. package/dist/services/definitions/revolt.d.mts +1 -1
  791. package/dist/services/definitions/rocketchat.d.cts +1 -1
  792. package/dist/services/definitions/rocketchat.d.mts +1 -1
  793. package/dist/services/definitions/saleor.d.cts +1 -1
  794. package/dist/services/definitions/saleor.d.mts +1 -1
  795. package/dist/services/definitions/scrapling.d.cts +1 -1
  796. package/dist/services/definitions/scrapling.d.mts +1 -1
  797. package/dist/services/definitions/searxng.d.cts +1 -1
  798. package/dist/services/definitions/searxng.d.mts +1 -1
  799. package/dist/services/definitions/sentry.d.cts +1 -1
  800. package/dist/services/definitions/sentry.d.mts +1 -1
  801. package/dist/services/definitions/signoz.d.cts +1 -1
  802. package/dist/services/definitions/signoz.d.mts +1 -1
  803. package/dist/services/definitions/solidityguard.d.cts +1 -1
  804. package/dist/services/definitions/solidityguard.d.mts +1 -1
  805. package/dist/services/definitions/sonarqube.d.cts +1 -1
  806. package/dist/services/definitions/sonarqube.d.mts +1 -1
  807. package/dist/services/definitions/stable-diffusion.d.cts +1 -1
  808. package/dist/services/definitions/stable-diffusion.d.mts +1 -1
  809. package/dist/services/definitions/steel-browser.d.cts +1 -1
  810. package/dist/services/definitions/steel-browser.d.mts +1 -1
  811. package/dist/services/definitions/stirling-pdf.d.cts +1 -1
  812. package/dist/services/definitions/stirling-pdf.d.mts +1 -1
  813. package/dist/services/definitions/strapi.d.cts +1 -1
  814. package/dist/services/definitions/strapi.d.mts +1 -1
  815. package/dist/services/definitions/stream-gateway.d.cts +1 -1
  816. package/dist/services/definitions/stream-gateway.d.mts +1 -1
  817. package/dist/services/definitions/supabase.d.cts +1 -1
  818. package/dist/services/definitions/supabase.d.mts +1 -1
  819. package/dist/services/definitions/superset.d.cts +1 -1
  820. package/dist/services/definitions/superset.d.mts +1 -1
  821. package/dist/services/definitions/surrealdb.d.cts +1 -1
  822. package/dist/services/definitions/surrealdb.d.mts +1 -1
  823. package/dist/services/definitions/tabby-ml.d.cts +1 -1
  824. package/dist/services/definitions/tabby-ml.d.mts +1 -1
  825. package/dist/services/definitions/tailscale.d.cts +1 -1
  826. package/dist/services/definitions/tailscale.d.mts +1 -1
  827. package/dist/services/definitions/tempo.d.cts +1 -1
  828. package/dist/services/definitions/tempo.d.mts +1 -1
  829. package/dist/services/definitions/temporal.d.cts +1 -1
  830. package/dist/services/definitions/temporal.d.mts +1 -1
  831. package/dist/services/definitions/text-gen-webui.d.cts +1 -1
  832. package/dist/services/definitions/text-gen-webui.d.mts +1 -1
  833. package/dist/services/definitions/timescaledb.d.cts +1 -1
  834. package/dist/services/definitions/timescaledb.d.mts +1 -1
  835. package/dist/services/definitions/traefik.d.cts +1 -1
  836. package/dist/services/definitions/traefik.d.mts +1 -1
  837. package/dist/services/definitions/twenty-worker.cjs +73 -0
  838. package/dist/services/definitions/twenty-worker.cjs.map +1 -0
  839. package/dist/services/definitions/twenty-worker.d.cts +7 -0
  840. package/dist/services/definitions/twenty-worker.d.cts.map +1 -0
  841. package/dist/services/definitions/twenty-worker.d.mts +7 -0
  842. package/dist/services/definitions/twenty-worker.d.mts.map +1 -0
  843. package/dist/services/definitions/twenty-worker.mjs +72 -0
  844. package/dist/services/definitions/twenty-worker.mjs.map +1 -0
  845. package/dist/services/definitions/twenty.cjs +24 -2
  846. package/dist/services/definitions/twenty.cjs.map +1 -1
  847. package/dist/services/definitions/twenty.d.cts +1 -1
  848. package/dist/services/definitions/twenty.d.mts +1 -1
  849. package/dist/services/definitions/twenty.mjs +24 -2
  850. package/dist/services/definitions/twenty.mjs.map +1 -1
  851. package/dist/services/definitions/umami.d.cts +1 -1
  852. package/dist/services/definitions/umami.d.mts +1 -1
  853. package/dist/services/definitions/uptime-kuma.d.cts +1 -1
  854. package/dist/services/definitions/uptime-kuma.d.mts +1 -1
  855. package/dist/services/definitions/usesend.d.cts +1 -1
  856. package/dist/services/definitions/usesend.d.mts +1 -1
  857. package/dist/services/definitions/valkey.d.cts +1 -1
  858. package/dist/services/definitions/valkey.d.mts +1 -1
  859. package/dist/services/definitions/vault.d.cts +1 -1
  860. package/dist/services/definitions/vault.d.mts +1 -1
  861. package/dist/services/definitions/vaultwarden.d.cts +1 -1
  862. package/dist/services/definitions/vaultwarden.d.mts +1 -1
  863. package/dist/services/definitions/vector-log.d.cts +1 -1
  864. package/dist/services/definitions/vector-log.d.mts +1 -1
  865. package/dist/services/definitions/vikunja.d.cts +1 -1
  866. package/dist/services/definitions/vikunja.d.mts +1 -1
  867. package/dist/services/definitions/watchtower.d.cts +1 -1
  868. package/dist/services/definitions/watchtower.d.mts +1 -1
  869. package/dist/services/definitions/weaviate.cjs +4 -1
  870. package/dist/services/definitions/weaviate.cjs.map +1 -1
  871. package/dist/services/definitions/weaviate.d.cts +1 -1
  872. package/dist/services/definitions/weaviate.d.mts +1 -1
  873. package/dist/services/definitions/weaviate.mjs +4 -1
  874. package/dist/services/definitions/weaviate.mjs.map +1 -1
  875. package/dist/services/definitions/whisper.d.cts +1 -1
  876. package/dist/services/definitions/whisper.d.mts +1 -1
  877. package/dist/services/definitions/wireguard.d.cts +1 -1
  878. package/dist/services/definitions/wireguard.d.mts +1 -1
  879. package/dist/services/definitions/woodpecker-ci.d.cts +1 -1
  880. package/dist/services/definitions/woodpecker-ci.d.mts +1 -1
  881. package/dist/services/definitions/xyops.d.cts +1 -1
  882. package/dist/services/definitions/xyops.d.mts +1 -1
  883. package/dist/services/definitions/zeroclaw.cjs +103 -0
  884. package/dist/services/definitions/zeroclaw.cjs.map +1 -0
  885. package/dist/services/definitions/zeroclaw.d.cts +7 -0
  886. package/dist/services/definitions/zeroclaw.d.cts.map +1 -0
  887. package/dist/services/definitions/zeroclaw.d.mts +7 -0
  888. package/dist/services/definitions/zeroclaw.d.mts.map +1 -0
  889. package/dist/services/definitions/zeroclaw.mjs +102 -0
  890. package/dist/services/definitions/zeroclaw.mjs.map +1 -0
  891. package/dist/services/definitions/zulip.d.cts +1 -1
  892. package/dist/services/definitions/zulip.d.mts +1 -1
  893. package/dist/services/registry.d.cts +1 -1
  894. package/dist/services/registry.d.mts +1 -1
  895. package/dist/services/registry.test.cjs +8 -8
  896. package/dist/services/registry.test.cjs.map +1 -1
  897. package/dist/services/registry.test.mjs +8 -8
  898. package/dist/services/registry.test.mjs.map +1 -1
  899. package/dist/skills/registry.cjs +19 -0
  900. package/dist/skills/registry.cjs.map +1 -1
  901. package/dist/skills/registry.d.cts +1 -1
  902. package/dist/skills/registry.d.cts.map +1 -1
  903. package/dist/skills/registry.d.mts +1 -1
  904. package/dist/skills/registry.d.mts.map +1 -1
  905. package/dist/skills/registry.mjs +19 -0
  906. package/dist/skills/registry.mjs.map +1 -1
  907. package/dist/{skills-BSF7iNa4.cjs → skills-uPxJVmKk.cjs} +311 -1
  908. package/dist/skills-uPxJVmKk.cjs.map +1 -0
  909. package/dist/{test.CTcmp4Su-ClCHJ3FA.mjs → test.CTcmp4Su-BRa7-bTj.mjs} +2 -2
  910. package/dist/{test.CTcmp4Su-ClCHJ3FA.mjs.map → test.CTcmp4Su-BRa7-bTj.mjs.map} +1 -1
  911. package/dist/{test.CTcmp4Su-DlzTarwH.cjs → test.CTcmp4Su-BWSPM8ZQ.cjs} +19 -1
  912. package/dist/{test.CTcmp4Su-DlzTarwH.cjs.map → test.CTcmp4Su-BWSPM8ZQ.cjs.map} +1 -1
  913. package/dist/track-analytics.d.cts +1 -1
  914. package/dist/track-analytics.d.mts +1 -1
  915. package/dist/track-analytics.test.cjs +1 -1
  916. package/dist/track-analytics.test.mjs +1 -1
  917. package/dist/types-BREUfzzq.d.mts +77 -0
  918. package/dist/types-BREUfzzq.d.mts.map +1 -0
  919. package/dist/types-Bsn0XzSP.d.cts +95 -0
  920. package/dist/types-Bsn0XzSP.d.cts.map +1 -0
  921. package/dist/types-CyZ5mn6w.d.cts +77 -0
  922. package/dist/types-CyZ5mn6w.d.cts.map +1 -0
  923. package/dist/types-DIsPc-hb.d.cts +100 -0
  924. package/dist/types-DIsPc-hb.d.cts.map +1 -0
  925. package/dist/types-DbXajvYq.d.mts +100 -0
  926. package/dist/types-DbXajvYq.d.mts.map +1 -0
  927. package/dist/types-DwTKyCZ9.d.mts +95 -0
  928. package/dist/types-DwTKyCZ9.d.mts.map +1 -0
  929. package/dist/{types-CR83OJiq.d.cts → types-dyBnrHm9.d.cts} +5 -1
  930. package/dist/types-dyBnrHm9.d.cts.map +1 -0
  931. package/dist/{types-zYjGTuyn.d.mts → types-fRSnaZTX.d.mts} +5 -1
  932. package/dist/types-fRSnaZTX.d.mts.map +1 -0
  933. package/dist/types.cjs +7 -0
  934. package/dist/types.cjs.map +1 -1
  935. package/dist/types.d.cts +2 -93
  936. package/dist/types.d.mts +2 -93
  937. package/dist/types.mjs +7 -0
  938. package/dist/types.mjs.map +1 -1
  939. package/dist/validator.cjs +1 -1
  940. package/dist/validator.d.cts +1 -1
  941. package/dist/validator.d.mts +1 -1
  942. package/dist/validator.test.cjs +1 -1
  943. package/dist/validator.test.mjs +1 -1
  944. package/dist/version-manager.d.cts +1 -1
  945. package/dist/version-manager.d.mts +1 -1
  946. package/dist/version-manager.test.cjs +3 -3
  947. package/dist/version-manager.test.cjs.map +1 -1
  948. package/dist/version-manager.test.mjs +3 -3
  949. package/dist/version-manager.test.mjs.map +1 -1
  950. package/dist/zeroclaw-B-0TuOfZ.d.mts +7 -0
  951. package/dist/zeroclaw-B-0TuOfZ.d.mts.map +1 -0
  952. package/dist/zeroclaw-BvKpDHKe.d.cts +7 -0
  953. package/dist/zeroclaw-BvKpDHKe.d.cts.map +1 -0
  954. package/package.json +6 -2
  955. package/src/addon-stack.test.ts +19 -23
  956. package/src/addon-stack.ts +67 -44
  957. package/src/composer.test.ts +59 -0
  958. package/src/composer.ts +135 -194
  959. package/src/deployers/coolify.ts +38 -0
  960. package/src/deployers/dokploy.ts +38 -0
  961. package/src/deployers/types.ts +2 -0
  962. package/src/frameworks/claude-code-fw.ts +118 -0
  963. package/src/frameworks/codex-fw.ts +102 -0
  964. package/src/frameworks/copaw.ts +154 -0
  965. package/src/frameworks/index.ts +46 -0
  966. package/src/frameworks/memu.ts +149 -0
  967. package/src/frameworks/nanobot.ts +156 -0
  968. package/src/frameworks/nanoclaw.ts +126 -0
  969. package/src/frameworks/openclaw.ts +325 -0
  970. package/src/frameworks/registry.test.ts +131 -0
  971. package/src/frameworks/registry.ts +28 -0
  972. package/src/frameworks/types.ts +146 -0
  973. package/src/frameworks/zeroclaw.ts +148 -0
  974. package/src/generate.test.ts +55 -4
  975. package/src/generate.ts +67 -14
  976. package/src/generators/caddy.test.ts +41 -1
  977. package/src/generators/caddy.ts +16 -2
  978. package/src/generators/clone-repos.test.ts +1 -1
  979. package/src/generators/clone-repos.ts +7 -2
  980. package/src/generators/env.test.ts +2 -2
  981. package/src/generators/env.ts +30 -180
  982. package/src/generators/health-check.ts +4 -4
  983. package/src/generators/openclaw-json.ts +57 -5
  984. package/src/generators/postgres-init.ts +9 -0
  985. package/src/generators/readme.ts +75 -9
  986. package/src/generators/scripts.test.ts +1 -1
  987. package/src/generators/skills.ts +316 -0
  988. package/src/generators/traefik.test.ts +13 -13
  989. package/src/index.ts +46 -7
  990. package/src/logger/__tests__/logger.test.ts +388 -0
  991. package/src/logger/index.ts +14 -0
  992. package/src/logger/logger.ts +326 -0
  993. package/src/logger/sinks/callback-sink.ts +13 -0
  994. package/src/logger/sinks/console-sink.ts +51 -0
  995. package/src/logger/sinks/file-sink.ts +121 -0
  996. package/src/logger/types.ts +90 -0
  997. package/src/migrations.ts +8 -1
  998. package/src/presets/presets.test.ts +4 -4
  999. package/src/presets/registry.test.ts +6 -6
  1000. package/src/resolver.test.ts +31 -3
  1001. package/src/resolver.ts +19 -3
  1002. package/src/schema.test.ts +2 -2
  1003. package/src/schema.ts +58 -17
  1004. package/src/services/definitions/agent-browser.ts +177 -0
  1005. package/src/services/definitions/apptension-saas.ts +2 -1
  1006. package/src/services/definitions/chromadb.ts +1 -1
  1007. package/src/services/definitions/claude-code.ts +1 -1
  1008. package/src/services/definitions/clawrouter.ts +141 -0
  1009. package/src/services/definitions/codex.ts +1 -1
  1010. package/src/services/definitions/convex.ts +1 -2
  1011. package/src/services/definitions/copaw.ts +101 -0
  1012. package/src/services/definitions/desktop-environment.ts +1 -0
  1013. package/src/services/definitions/hindsight.ts +3 -2
  1014. package/src/services/definitions/index.ts +53 -16
  1015. package/src/services/definitions/mem0.ts +132 -0
  1016. package/src/services/definitions/memu.ts +96 -0
  1017. package/src/services/definitions/milvus.ts +1 -1
  1018. package/src/services/definitions/nanobot.ts +89 -0
  1019. package/src/services/definitions/nanoclaw.ts +78 -0
  1020. package/src/services/definitions/opensandbox.ts +6 -15
  1021. package/src/services/definitions/relaticle-horizon.ts +48 -0
  1022. package/src/services/definitions/relaticle-scheduler.ts +42 -0
  1023. package/src/services/definitions/relaticle.ts +142 -0
  1024. package/src/services/definitions/twenty-worker.ts +70 -0
  1025. package/src/services/definitions/twenty.ts +16 -2
  1026. package/src/services/definitions/weaviate.ts +1 -1
  1027. package/src/services/definitions/zeroclaw.ts +102 -0
  1028. package/src/services/registry.test.ts +7 -7
  1029. package/src/skills/registry.ts +10 -0
  1030. package/src/types.ts +11 -1
  1031. package/src/version-manager.test.ts +2 -2
  1032. package/dist/schema-BQnZrcw8.d.cts.map +0 -1
  1033. package/dist/schema-SBpL0bdI.d.mts.map +0 -1
  1034. package/dist/skills-BSF7iNa4.cjs.map +0 -1
  1035. package/dist/types-CR83OJiq.d.cts.map +0 -1
  1036. package/dist/types-zYjGTuyn.d.mts.map +0 -1
  1037. package/dist/types.d.cts.map +0 -1
  1038. package/dist/types.d.mts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"generate.test.cjs","names":["describe","generate"],"sources":["../src/generate.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { parse } from \"yaml\";\nimport { generate } from \"./generate.js\";\n\ndescribe(\"generate (end-to-end)\", () => {\n\tit(\"generates a minimal stack (redis only)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"test-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Core files must be present\n\t\texpect(result.files).toHaveProperty(\"docker-compose.yml\");\n\t\texpect(result.files).toHaveProperty(\".env.example\");\n\t\texpect(result.files).toHaveProperty(\".env\");\n\t\texpect(result.files).toHaveProperty(\"README.md\");\n\n\t\t// docker-compose.yml must be valid YAML\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed).toHaveProperty(\"services\");\n\n\t\t// .env.example should reference REDIS_PASSWORD\n\t\texpect(result.files[\".env.example\"]).toContain(\"REDIS_PASSWORD\");\n\n\t\t// README should mention the project name\n\t\texpect(result.files[\"README.md\"]).toContain(\"test-stack\");\n\n\t\t// At least one service resolved\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(1);\n\t});\n\n\tit(\"generates research-agent stack from skill pack\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"research-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [\"research-agent\"],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Skill SKILL.md files for each skill in the research-agent pack\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/qdrant-memory/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/searxng-search/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/browserless-browse/SKILL.md\");\n\n\t\t// docker-compose.yml should contain the expected services\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).toHaveProperty(\"qdrant\");\n\t\texpect(composed.services).toHaveProperty(\"searxng\");\n\t\texpect(composed.services).toHaveProperty(\"browserless\");\n\t});\n\n\tit(\"generates full preset stack\", () => {\n\t\tconst fullServices = [\n\t\t\t\"redis\",\n\t\t\t\"postgresql\",\n\t\t\t\"qdrant\",\n\t\t\t\"n8n\",\n\t\t\t\"ffmpeg\",\n\t\t\t\"remotion\",\n\t\t\t\"minio\",\n\t\t\t\"caddy\",\n\t\t\t\"browserless\",\n\t\t\t\"searxng\",\n\t\t\t\"meilisearch\",\n\t\t\t\"uptime-kuma\",\n\t\t\t\"grafana\",\n\t\t\t\"prometheus\",\n\t\t\t\"ollama\",\n\t\t\t\"whisper\",\n\t\t\t\"gotify\",\n\t\t];\n\n\t\tconst result = generate({\n\t\t\tprojectName: \"full-stack\",\n\t\t\tservices: fullServices,\n\t\t\tskillPacks: [\n\t\t\t\t\"video-creator\",\n\t\t\t\t\"research-agent\",\n\t\t\t\t\"social-media\",\n\t\t\t\t\"dev-ops\",\n\t\t\t\t\"knowledge-base\",\n\t\t\t\t\"local-ai\",\n\t\t\t],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Should have many files\n\t\tconst fileCount = Object.keys(result.files).length;\n\t\texpect(fileCount).toBeGreaterThan(10);\n\n\t\t// Should include the start script\n\t\texpect(result.files).toHaveProperty(\"scripts/start.sh\");\n\n\t\t// Should not throw (it already didn't if we got here)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThan(5);\n\t});\n\n\tit(\"generates caddy config when proxy is caddy\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"caddy-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"caddy/Caddyfile\");\n\t\texpect(result.files[\"caddy/Caddyfile\"]!.length).toBeGreaterThan(0);\n\t});\n\n\tit(\"generates prometheus config when monitoring enabled\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"monitored-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tmonitoring: true,\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"prometheus/prometheus.yml\");\n\t\t// Verify it's valid YAML\n\t\tconst promConfig = parse(result.files[\"prometheus/prometheus.yml\"]!);\n\t\texpect(promConfig).toBeDefined();\n\t});\n\n\tit(\"generates La Suite Meet stack with all expected services\", () => {\n\t\tconst lasuiteMeetServices = [\n\t\t\t\"postgresql\",\n\t\t\t\"redis\",\n\t\t\t\"livekit\",\n\t\t\t\"lasuite-meet-backend\",\n\t\t\t\"lasuite-meet-frontend\",\n\t\t\t\"lasuite-meet-agents\",\n\t\t];\n\t\tconst result = generate({\n\t\t\tprojectName: \"lasuite-meet-stack\",\n\t\t\tservices: lasuiteMeetServices,\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Services may be split across main and profile compose files\n\t\tconst allServiceIds = new Set<string>();\n\t\tfor (const [filename, content] of Object.entries(result.files)) {\n\t\t\tif (filename.endsWith(\".yml\") && content) {\n\t\t\t\tconst doc = parse(content);\n\t\t\t\tif (doc?.services && typeof doc.services === \"object\") {\n\t\t\t\t\tfor (const id of Object.keys(doc.services)) {\n\t\t\t\t\t\tallServiceIds.add(id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (const id of lasuiteMeetServices) {\n\t\t\texpect(allServiceIds.has(id), `missing service ${id}`).toBe(true);\n\t\t}\n\t\t// Service count includes user services + mandatory platform services (convex, mission-control, tailscale)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(lasuiteMeetServices.length);\n\t});\n\n\tit(\"generates bare-metal installer for Windows (install.ps1)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"win-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"windows/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.ps1\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"docker compose\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"PowerShell\");\n\t});\n\n\tit(\"generates bare-metal installer for Linux/macOS (install.sh)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"linux-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.sh\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"docker\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"compose\");\n\t});\n\n\tit(\"bare-metal with redis on Linux: native script, compose excludes redis, gateway has extra_hosts\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"bare-metal-redis\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Native install script for Linux\n\t\texpect(result.files).toHaveProperty(\"native/install-linux.sh\");\n\t\texpect(result.files[\"native/install-linux.sh\"]).toContain(\"redis\");\n\n\t\t// Docker compose must NOT include redis (native); only gateway/openclaw\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).not.toHaveProperty(\"redis\");\n\t\texpect(composed.services).toHaveProperty(\"openclaw-gateway\");\n\n\t\t// Gateway must have extra_hosts for host.docker.internal\n\t\tconst gateway = composed.services[\"openclaw-gateway\"];\n\t\texpect(gateway).toBeDefined();\n\t\texpect(gateway.extra_hosts).toBeDefined();\n\t\texpect(\n\t\t\t(gateway.extra_hosts as string[]).some(\n\t\t\t\t(h: string) => h.includes(\"host.docker.internal\") && h.includes(\"host-gateway\"),\n\t\t\t),\n\t\t).toBe(true);\n\n\t\t// .env should set REDIS_HOST to host.docker.internal for gateway to reach native Redis\n\t\texpect(result.files[\".env\"]).toContain(\"REDIS_HOST=host.docker.internal\");\n\t});\n\n\tit(\"throws on conflicting services\", () => {\n\t\texpect(() =>\n\t\t\tgenerate({\n\t\t\t\tprojectName: \"conflict-stack\",\n\t\t\t\tservices: [\"redis\", \"valkey\"],\n\t\t\t\tskillPacks: [],\n\t\t\t\tproxy: \"none\",\n\t\t\t\tgpu: false,\n\t\t\t\tplatform: \"linux/amd64\",\n\t\t\t\tdeployment: \"local\",\n\t\t\t\tgenerateSecrets: true,\n\t\t\t\topenclawVersion: \"latest\",\n\t\t\t}),\n\t\t).toThrow();\n\t});\n\n\tit(\"generates scripts directory\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"scripts-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst expectedScripts = [\n\t\t\t\"scripts/start.sh\",\n\t\t\t\"scripts/stop.sh\",\n\t\t\t\"scripts/update.sh\",\n\t\t\t\"scripts/backup.sh\",\n\t\t\t\"scripts/status.sh\",\n\t\t];\n\n\t\tfor (const script of expectedScripts) {\n\t\t\texpect(result.files).toHaveProperty(script);\n\t\t\texpect(result.files[script]!.length).toBeGreaterThan(0);\n\t\t}\n\t});\n\n\tit(\"all generated .env.example vars have comments\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"env-comments-stack\",\n\t\t\tservices: [\"redis\", \"qdrant\", \"n8n\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst envExample = result.files[\".env.example\"]!;\n\t\tconst lines = envExample.split(\"\\n\");\n\n\t\t// Walk through lines: every non-empty, non-comment KEY=VALUE line should\n\t\t// have a preceding comment line (starting with #).\n\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\tconst line = lines[i]!.trim();\n\t\t\tif (line === \"\" || line.startsWith(\"#\")) continue;\n\n\t\t\t// This line looks like KEY=VALUE\n\t\t\tif (line.includes(\"=\")) {\n\t\t\t\t// There must be a comment somewhere before it (look backwards for a # line)\n\t\t\t\tlet foundComment = false;\n\t\t\t\tfor (let j = i - 1; j >= 0; j--) {\n\t\t\t\t\tconst prev = lines[j]!.trim();\n\t\t\t\t\tif (prev === \"\") continue; // skip blank lines\n\t\t\t\t\tif (prev.startsWith(\"#\")) {\n\t\t\t\t\t\tfoundComment = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// Hit another non-comment, non-empty line — no comment found\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\texpect(foundComment).toBe(true);\n\t\t\t}\n\t\t}\n\t});\n});\n"],"mappings":";;;;;AAIAA,sBAAAA,SAAS,+BAA+B;AACvC,uBAAA,GAAG,gDAAgD;EAClD,MAAM,SAASC,iBAAAA,SAAS;GACvB,aAAa;GACb,UAAU,CAAC,QAAQ;GACnB,YAAY,EAAE;GACd,OAAO;GACP,KAAK;GACL,UAAU;GACV,YAAY;GACZ,iBAAiB;GACjB,iBAAiB;GACjB,CAAC;AAGF,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,qBAAqB;AACzD,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,eAAe;AACnD,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,OAAO;AAC3C,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,YAAY;AAIhD,wBAAA,cAAA,GAAA,KAAA,OADuB,OAAO,MAAM,sBAAuB,CAC3C,CAAC,eAAe,WAAW;AAG3C,wBAAA,aAAO,OAAO,MAAM,gBAAgB,CAAC,UAAU,iBAAiB;AAGhE,wBAAA,aAAO,OAAO,MAAM,aAAa,CAAC,UAAU,aAAa;AAGzD,wBAAA,aAAO,OAAO,SAAS,aAAa,CAAC,uBAAuB,EAAE;GAC7D;AAEF,uBAAA,GAAG,wDAAwD;EAC1D,MAAM,SAASA,iBAAAA,SAAS;GACvB,aAAa;GACb,UAAU,EAAE;GACZ,YAAY,CAAC,iBAAiB;GAC9B,OAAO;GACP,KAAK;GACL,UAAU;GACV,YAAY;GACZ,iBAAiB;GACjB,iBAAiB;GACjB,CAAC;AAGF,wBAAA,aAAO,OAAO,MAAM,CAAC,e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MAAM,GAAI,MAAM;AAC7B,SAAI,SAAS,GAAI;AACjB,SAAI,KAAK,WAAW,IAAI,EAAE;AACzB,qBAAe;AACf;;AAGD;;AAED,0BAAA,aAAO,aAAa,CAAC,KAAK,KAAK;;;GAGhC;EACD"}
1
+ {"version":3,"file":"generate.test.cjs","names":["describe","generate"],"sources":["../src/generate.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { parse } from \"yaml\";\nimport { generate } from \"./generate.js\";\n\ndescribe(\"generate (end-to-end)\", () => {\n\tit(\"generates a minimal stack (redis only)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"test-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Core files must be present\n\t\texpect(result.files).toHaveProperty(\"docker-compose.yml\");\n\t\texpect(result.files).toHaveProperty(\".env.example\");\n\t\texpect(result.files).toHaveProperty(\".env\");\n\t\texpect(result.files).toHaveProperty(\"README.md\");\n\n\t\t// docker-compose.yml must be valid YAML\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed).toHaveProperty(\"services\");\n\n\t\t// .env.example should reference REDIS_PASSWORD\n\t\texpect(result.files[\".env.example\"]).toContain(\"REDIS_PASSWORD\");\n\n\t\t// README should mention the project name\n\t\texpect(result.files[\"README.md\"]).toContain(\"test-stack\");\n\n\t\t// At least one service resolved\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(1);\n\t});\n\n\tit(\"generates research-agent stack from skill pack\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"research-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [\"research-agent\"],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Skill SKILL.md files for each skill in the research-agent pack\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/qdrant-memory/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/searxng-search/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/browserless-browse/SKILL.md\");\n\n\t\t// docker-compose.yml should contain the expected services\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).toHaveProperty(\"qdrant\");\n\t\texpect(composed.services).toHaveProperty(\"searxng\");\n\t\texpect(composed.services).toHaveProperty(\"browserless\");\n\t});\n\n\tit(\"generates full preset stack\", () => {\n\t\tconst fullServices = [\n\t\t\t\"redis\",\n\t\t\t\"postgresql\",\n\t\t\t\"qdrant\",\n\t\t\t\"n8n\",\n\t\t\t\"ffmpeg\",\n\t\t\t\"remotion\",\n\t\t\t\"minio\",\n\t\t\t\"caddy\",\n\t\t\t\"browserless\",\n\t\t\t\"searxng\",\n\t\t\t\"meilisearch\",\n\t\t\t\"uptime-kuma\",\n\t\t\t\"grafana\",\n\t\t\t\"prometheus\",\n\t\t\t\"ollama\",\n\t\t\t\"whisper\",\n\t\t\t\"gotify\",\n\t\t];\n\n\t\tconst result = generate({\n\t\t\tprojectName: \"full-stack\",\n\t\t\tservices: fullServices,\n\t\t\tskillPacks: [\n\t\t\t\t\"video-creator\",\n\t\t\t\t\"research-agent\",\n\t\t\t\t\"social-media\",\n\t\t\t\t\"dev-ops\",\n\t\t\t\t\"knowledge-base\",\n\t\t\t\t\"local-ai\",\n\t\t\t],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Should have many files\n\t\tconst fileCount = Object.keys(result.files).length;\n\t\texpect(fileCount).toBeGreaterThan(10);\n\n\t\t// Should include the start script\n\t\texpect(result.files).toHaveProperty(\"scripts/start.sh\");\n\n\t\t// Should not throw (it already didn't if we got here)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThan(5);\n\t});\n\n\tit(\"generates caddy config when proxy is caddy\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"caddy-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"caddy/Caddyfile\");\n\t\texpect(result.files[\"caddy/Caddyfile\"]?.length).toBeGreaterThan(0);\n\t});\n\n\tit(\"generates prometheus config when monitoring enabled\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"monitored-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tmonitoring: true,\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"prometheus/prometheus.yml\");\n\t\t// Verify it's valid YAML\n\t\tconst promConfig = parse(result.files[\"prometheus/prometheus.yml\"]!);\n\t\texpect(promConfig).toBeDefined();\n\t});\n\n\tit(\"generates La Suite Meet stack with all expected services\", () => {\n\t\tconst lasuiteMeetServices = [\n\t\t\t\"postgresql\",\n\t\t\t\"redis\",\n\t\t\t\"livekit\",\n\t\t\t\"lasuite-meet-backend\",\n\t\t\t\"lasuite-meet-frontend\",\n\t\t\t\"lasuite-meet-agents\",\n\t\t];\n\t\tconst result = generate({\n\t\t\tprojectName: \"lasuite-meet-stack\",\n\t\t\tservices: lasuiteMeetServices,\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Services may be split across main and profile compose files\n\t\tconst allServiceIds = new Set<string>();\n\t\tfor (const [filename, content] of Object.entries(result.files)) {\n\t\t\tif (filename.endsWith(\".yml\") && content) {\n\t\t\t\tconst doc = parse(content);\n\t\t\t\tif (doc?.services && typeof doc.services === \"object\") {\n\t\t\t\t\tfor (const id of Object.keys(doc.services)) {\n\t\t\t\t\t\tallServiceIds.add(id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (const id of lasuiteMeetServices) {\n\t\t\texpect(allServiceIds.has(id), `missing service ${id}`).toBe(true);\n\t\t}\n\t\t// Service count includes user services + mandatory platform services (convex, mission-control, tailscale)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(lasuiteMeetServices.length);\n\t});\n\n\tit(\"generates bare-metal installer for Windows (install.ps1)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"win-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"windows/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.ps1\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"docker compose\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"PowerShell\");\n\t});\n\n\tit(\"generates bare-metal installer for Linux/macOS (install.sh)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"linux-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.sh\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"docker\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"compose\");\n\t});\n\n\tit(\"bare-metal with redis on Linux: native script, compose excludes redis, gateway has extra_hosts\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"bare-metal-redis\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Native install script for Linux\n\t\texpect(result.files).toHaveProperty(\"native/install-linux.sh\");\n\t\texpect(result.files[\"native/install-linux.sh\"]).toContain(\"redis\");\n\n\t\t// Docker compose must NOT include redis (native); only gateway/openclaw\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).not.toHaveProperty(\"redis\");\n\t\texpect(composed.services).toHaveProperty(\"openclaw-gateway\");\n\n\t\t// Gateway must have extra_hosts for host.docker.internal\n\t\tconst gateway = composed.services[\"openclaw-gateway\"];\n\t\texpect(gateway).toBeDefined();\n\t\texpect(gateway.extra_hosts).toBeDefined();\n\t\texpect(\n\t\t\t(gateway.extra_hosts as string[]).some(\n\t\t\t\t(h: string) => h.includes(\"host.docker.internal\") && h.includes(\"host-gateway\"),\n\t\t\t),\n\t\t).toBe(true);\n\n\t\t// .env should set REDIS_HOST to host.docker.internal for gateway to reach native Redis\n\t\texpect(result.files[\".env\"]).toContain(\"REDIS_HOST=host.docker.internal\");\n\t});\n\n\tit(\"throws on conflicting services\", () => {\n\t\texpect(() =>\n\t\t\tgenerate({\n\t\t\t\tprojectName: \"conflict-stack\",\n\t\t\t\tservices: [\"redis\", \"valkey\"],\n\t\t\t\tskillPacks: [],\n\t\t\t\tproxy: \"none\",\n\t\t\t\tgpu: false,\n\t\t\t\tplatform: \"linux/amd64\",\n\t\t\t\tdeployment: \"local\",\n\t\t\t\tgenerateSecrets: true,\n\t\t\t\topenclawVersion: \"latest\",\n\t\t\t}),\n\t\t).toThrow();\n\t});\n\n\tit(\"generates scripts directory\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"scripts-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst expectedScripts = [\n\t\t\t\"scripts/start.sh\",\n\t\t\t\"scripts/stop.sh\",\n\t\t\t\"scripts/update.sh\",\n\t\t\t\"scripts/backup.sh\",\n\t\t\t\"scripts/status.sh\",\n\t\t];\n\n\t\tfor (const script of expectedScripts) {\n\t\t\texpect(result.files).toHaveProperty(script);\n\t\t\texpect(result.files[script]?.length).toBeGreaterThan(0);\n\t\t}\n\t});\n\n\tit(\"generates a stack with zeroclaw as primary framework\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"zeroclaw-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tprimaryFramework: \"zeroclaw\",\n\t\t});\n\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\n\t\t// Should have zeroclaw-gateway, not openclaw-gateway\n\t\texpect(composed.services).toHaveProperty(\"zeroclaw-gateway\");\n\t\texpect(composed.services).not.toHaveProperty(\"openclaw-gateway\");\n\n\t\t// Should NOT have convex/mission-control/tailscale\n\t\texpect(composed.services).not.toHaveProperty(\"convex\");\n\t\texpect(composed.services).not.toHaveProperty(\"mission-control\");\n\t\texpect(composed.services).not.toHaveProperty(\"tailscale\");\n\n\t\t// Network should be zeroclaw-network\n\t\texpect(composed.networks).toHaveProperty(\"zeroclaw-network\");\n\t});\n\n\tit(\"generates a stack with companion frameworks\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"multi-fw-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tcompanionFrameworks: [\"claude-code\"],\n\t\t});\n\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\n\t\t// Primary OpenClaw gateway should be present\n\t\texpect(composed.services).toHaveProperty(\"openclaw-gateway\");\n\t\t// Companion Claude Code should be present\n\t\texpect(composed.services).toHaveProperty(\"claude-code-companion\");\n\t});\n\n\tit(\"all generated .env.example vars have comments\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"env-comments-stack\",\n\t\t\tservices: [\"redis\", \"qdrant\", \"n8n\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst envExample = result.files[\".env.example\"]!;\n\t\tconst lines = envExample.split(\"\\n\");\n\n\t\t// Walk through lines: every non-empty, non-comment KEY=VALUE line should\n\t\t// have a preceding comment line (starting with #).\n\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\tconst line = lines[i]?.trim();\n\t\t\tif (line === \"\" || line.startsWith(\"#\")) continue;\n\n\t\t\t// This line looks like KEY=VALUE\n\t\t\tif (line.includes(\"=\")) {\n\t\t\t\t// There must be a comment somewhere before it (look backwards for a # line)\n\t\t\t\tlet foundComment = false;\n\t\t\t\tfor (let j = i - 1; j >= 0; j--) {\n\t\t\t\t\tconst prev = lines[j]?.trim();\n\t\t\t\t\tif (prev === \"\") continue; // skip blank lines\n\t\t\t\t\tif (prev.startsWith(\"#\")) {\n\t\t\t\t\t\tfoundComment = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// Hit another non-comment, non-empty line — no comment found\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\texpect(foundComment).toBe(true);\n\t\t\t}\n\t\t}\n\t});\n});\n"],"mappings":";;;;;AAIAA,sBAAAA,SAAS,+BAA+B;AACvC,uBAAA,GAAG,gDAAgD;EAClD,MAAM,SAASC,iBAAAA,SAAS;GACvB,aAAa;GACb,UAAU,CAAC,QAAQ;GACnB,YAAY,EAAE;GACd,OAAO;GACP,KAAK;GACL,UAAU;GACV,YAAY;GACZ,iBAAiB;GACjB,iBAAiB;GACjB,CAAC;AAGF,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,qBAAqB;AACzD,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,eAAe;AACnD,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,OAAO;AAC3C,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,YAAY;AAIhD,wBAAA,cAAA,GAAA,KAAA,OADuB,OAAO,MAAM,sBAAuB,CAC3C,CAAC,eAAe,WAAW;AAG3C,wBAAA,aAAO,OAAO,MAAM,gBAAgB,CAAC,UAAU,iBAAiB;AAGhE,wBAAA,aAAO,OAAO,MAAM,aAAa,CAAC,UAAU,aAAa;AAGzD,wBAAA,aAAO,OAAO,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,KAAK;KAChC,MAAM,OAAO,MAAM,IAAI,MAAM;AAC7B,SAAI,SAAS,GAAI;AACjB,SAAI,KAAK,WAAW,IAAI,EAAE;AACzB,qBAAe;AACf;;AAGD;;AAED,0BAAA,aAAO,aAAa,CAAC,KAAK,KAAK;;;GAGhC;EACD"}
@@ -1,4 +1,4 @@
1
- import { n as describe, r as it, t as globalExpect } from "./test.CTcmp4Su-ClCHJ3FA.mjs";
1
+ import { a as describe, o as it, t as globalExpect } from "./test.CTcmp4Su-BRa7-bTj.mjs";
2
2
  import { generate } from "./generate.mjs";
3
3
  import { parse } from "yaml";
4
4
  //#region src/generate.test.ts
@@ -101,7 +101,7 @@ describe("generate (end-to-end)", () => {
101
101
  openclawVersion: "latest"
102
102
  });
103
103
  globalExpect(result.files).toHaveProperty("caddy/Caddyfile");
104
- globalExpect(result.files["caddy/Caddyfile"].length).toBeGreaterThan(0);
104
+ globalExpect(result.files["caddy/Caddyfile"]?.length).toBeGreaterThan(0);
105
105
  });
106
106
  it("generates prometheus config when monitoring enabled", () => {
107
107
  const result = generate({
@@ -238,9 +238,45 @@ describe("generate (end-to-end)", () => {
238
238
  "scripts/status.sh"
239
239
  ]) {
240
240
  globalExpect(result.files).toHaveProperty(script);
241
- globalExpect(result.files[script].length).toBeGreaterThan(0);
241
+ globalExpect(result.files[script]?.length).toBeGreaterThan(0);
242
242
  }
243
243
  });
244
+ it("generates a stack with zeroclaw as primary framework", () => {
245
+ const composed = parse(generate({
246
+ projectName: "zeroclaw-stack",
247
+ services: ["redis"],
248
+ skillPacks: [],
249
+ proxy: "none",
250
+ gpu: false,
251
+ platform: "linux/amd64",
252
+ deployment: "local",
253
+ generateSecrets: true,
254
+ openclawVersion: "latest",
255
+ primaryFramework: "zeroclaw"
256
+ }).files["docker-compose.yml"]);
257
+ globalExpect(composed.services).toHaveProperty("zeroclaw-gateway");
258
+ globalExpect(composed.services).not.toHaveProperty("openclaw-gateway");
259
+ globalExpect(composed.services).not.toHaveProperty("convex");
260
+ globalExpect(composed.services).not.toHaveProperty("mission-control");
261
+ globalExpect(composed.services).not.toHaveProperty("tailscale");
262
+ globalExpect(composed.networks).toHaveProperty("zeroclaw-network");
263
+ });
264
+ it("generates a stack with companion frameworks", () => {
265
+ const composed = parse(generate({
266
+ projectName: "multi-fw-stack",
267
+ services: ["redis"],
268
+ skillPacks: [],
269
+ proxy: "none",
270
+ gpu: false,
271
+ platform: "linux/amd64",
272
+ deployment: "local",
273
+ generateSecrets: true,
274
+ openclawVersion: "latest",
275
+ companionFrameworks: ["claude-code"]
276
+ }).files["docker-compose.yml"]);
277
+ globalExpect(composed.services).toHaveProperty("openclaw-gateway");
278
+ globalExpect(composed.services).toHaveProperty("claude-code-companion");
279
+ });
244
280
  it("all generated .env.example vars have comments", () => {
245
281
  const lines = generate({
246
282
  projectName: "env-comments-stack",
@@ -258,12 +294,12 @@ describe("generate (end-to-end)", () => {
258
294
  openclawVersion: "latest"
259
295
  }).files[".env.example"].split("\n");
260
296
  for (let i = 0; i < lines.length; i++) {
261
- const line = lines[i].trim();
297
+ const line = lines[i]?.trim();
262
298
  if (line === "" || line.startsWith("#")) continue;
263
299
  if (line.includes("=")) {
264
300
  let foundComment = false;
265
301
  for (let j = i - 1; j >= 0; j--) {
266
- const prev = lines[j].trim();
302
+ const prev = lines[j]?.trim();
267
303
  if (prev === "") continue;
268
304
  if (prev.startsWith("#")) {
269
305
  foundComment = true;
@@ -1 +1 @@
1
- {"version":3,"file":"generate.test.mjs","names":[],"sources":["../src/generate.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { parse } from \"yaml\";\nimport { generate } from \"./generate.js\";\n\ndescribe(\"generate (end-to-end)\", () => {\n\tit(\"generates a minimal stack (redis only)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"test-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Core files must be present\n\t\texpect(result.files).toHaveProperty(\"docker-compose.yml\");\n\t\texpect(result.files).toHaveProperty(\".env.example\");\n\t\texpect(result.files).toHaveProperty(\".env\");\n\t\texpect(result.files).toHaveProperty(\"README.md\");\n\n\t\t// docker-compose.yml must be valid YAML\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed).toHaveProperty(\"services\");\n\n\t\t// .env.example should reference REDIS_PASSWORD\n\t\texpect(result.files[\".env.example\"]).toContain(\"REDIS_PASSWORD\");\n\n\t\t// README should mention the project name\n\t\texpect(result.files[\"README.md\"]).toContain(\"test-stack\");\n\n\t\t// At least one service resolved\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(1);\n\t});\n\n\tit(\"generates research-agent stack from skill pack\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"research-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [\"research-agent\"],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Skill SKILL.md files for each skill in the research-agent pack\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/qdrant-memory/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/searxng-search/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/browserless-browse/SKILL.md\");\n\n\t\t// docker-compose.yml should contain the expected services\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).toHaveProperty(\"qdrant\");\n\t\texpect(composed.services).toHaveProperty(\"searxng\");\n\t\texpect(composed.services).toHaveProperty(\"browserless\");\n\t});\n\n\tit(\"generates full preset stack\", () => {\n\t\tconst fullServices = [\n\t\t\t\"redis\",\n\t\t\t\"postgresql\",\n\t\t\t\"qdrant\",\n\t\t\t\"n8n\",\n\t\t\t\"ffmpeg\",\n\t\t\t\"remotion\",\n\t\t\t\"minio\",\n\t\t\t\"caddy\",\n\t\t\t\"browserless\",\n\t\t\t\"searxng\",\n\t\t\t\"meilisearch\",\n\t\t\t\"uptime-kuma\",\n\t\t\t\"grafana\",\n\t\t\t\"prometheus\",\n\t\t\t\"ollama\",\n\t\t\t\"whisper\",\n\t\t\t\"gotify\",\n\t\t];\n\n\t\tconst result = generate({\n\t\t\tprojectName: \"full-stack\",\n\t\t\tservices: fullServices,\n\t\t\tskillPacks: [\n\t\t\t\t\"video-creator\",\n\t\t\t\t\"research-agent\",\n\t\t\t\t\"social-media\",\n\t\t\t\t\"dev-ops\",\n\t\t\t\t\"knowledge-base\",\n\t\t\t\t\"local-ai\",\n\t\t\t],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Should have many files\n\t\tconst fileCount = Object.keys(result.files).length;\n\t\texpect(fileCount).toBeGreaterThan(10);\n\n\t\t// Should include the start script\n\t\texpect(result.files).toHaveProperty(\"scripts/start.sh\");\n\n\t\t// Should not throw (it already didn't if we got here)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThan(5);\n\t});\n\n\tit(\"generates caddy config when proxy is caddy\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"caddy-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"caddy/Caddyfile\");\n\t\texpect(result.files[\"caddy/Caddyfile\"]!.length).toBeGreaterThan(0);\n\t});\n\n\tit(\"generates prometheus config when monitoring enabled\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"monitored-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tmonitoring: true,\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"prometheus/prometheus.yml\");\n\t\t// Verify it's valid YAML\n\t\tconst promConfig = parse(result.files[\"prometheus/prometheus.yml\"]!);\n\t\texpect(promConfig).toBeDefined();\n\t});\n\n\tit(\"generates La Suite Meet stack with all expected services\", () => {\n\t\tconst lasuiteMeetServices = [\n\t\t\t\"postgresql\",\n\t\t\t\"redis\",\n\t\t\t\"livekit\",\n\t\t\t\"lasuite-meet-backend\",\n\t\t\t\"lasuite-meet-frontend\",\n\t\t\t\"lasuite-meet-agents\",\n\t\t];\n\t\tconst result = generate({\n\t\t\tprojectName: \"lasuite-meet-stack\",\n\t\t\tservices: lasuiteMeetServices,\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Services may be split across main and profile compose files\n\t\tconst allServiceIds = new Set<string>();\n\t\tfor (const [filename, content] of Object.entries(result.files)) {\n\t\t\tif (filename.endsWith(\".yml\") && content) {\n\t\t\t\tconst doc = parse(content);\n\t\t\t\tif (doc?.services && typeof doc.services === \"object\") {\n\t\t\t\t\tfor (const id of Object.keys(doc.services)) {\n\t\t\t\t\t\tallServiceIds.add(id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (const id of lasuiteMeetServices) {\n\t\t\texpect(allServiceIds.has(id), `missing service ${id}`).toBe(true);\n\t\t}\n\t\t// Service count includes user services + mandatory platform services (convex, mission-control, tailscale)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(lasuiteMeetServices.length);\n\t});\n\n\tit(\"generates bare-metal installer for Windows (install.ps1)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"win-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"windows/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.ps1\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"docker compose\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"PowerShell\");\n\t});\n\n\tit(\"generates bare-metal installer for Linux/macOS (install.sh)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"linux-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.sh\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"docker\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"compose\");\n\t});\n\n\tit(\"bare-metal with redis on Linux: native script, compose excludes redis, gateway has extra_hosts\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"bare-metal-redis\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Native install script for Linux\n\t\texpect(result.files).toHaveProperty(\"native/install-linux.sh\");\n\t\texpect(result.files[\"native/install-linux.sh\"]).toContain(\"redis\");\n\n\t\t// Docker compose must NOT include redis (native); only gateway/openclaw\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).not.toHaveProperty(\"redis\");\n\t\texpect(composed.services).toHaveProperty(\"openclaw-gateway\");\n\n\t\t// Gateway must have extra_hosts for host.docker.internal\n\t\tconst gateway = composed.services[\"openclaw-gateway\"];\n\t\texpect(gateway).toBeDefined();\n\t\texpect(gateway.extra_hosts).toBeDefined();\n\t\texpect(\n\t\t\t(gateway.extra_hosts as string[]).some(\n\t\t\t\t(h: string) => h.includes(\"host.docker.internal\") && h.includes(\"host-gateway\"),\n\t\t\t),\n\t\t).toBe(true);\n\n\t\t// .env should set REDIS_HOST to host.docker.internal for gateway to reach native Redis\n\t\texpect(result.files[\".env\"]).toContain(\"REDIS_HOST=host.docker.internal\");\n\t});\n\n\tit(\"throws on conflicting services\", () => {\n\t\texpect(() =>\n\t\t\tgenerate({\n\t\t\t\tprojectName: \"conflict-stack\",\n\t\t\t\tservices: [\"redis\", \"valkey\"],\n\t\t\t\tskillPacks: [],\n\t\t\t\tproxy: \"none\",\n\t\t\t\tgpu: false,\n\t\t\t\tplatform: \"linux/amd64\",\n\t\t\t\tdeployment: \"local\",\n\t\t\t\tgenerateSecrets: true,\n\t\t\t\topenclawVersion: \"latest\",\n\t\t\t}),\n\t\t).toThrow();\n\t});\n\n\tit(\"generates scripts directory\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"scripts-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst expectedScripts = [\n\t\t\t\"scripts/start.sh\",\n\t\t\t\"scripts/stop.sh\",\n\t\t\t\"scripts/update.sh\",\n\t\t\t\"scripts/backup.sh\",\n\t\t\t\"scripts/status.sh\",\n\t\t];\n\n\t\tfor (const script of expectedScripts) {\n\t\t\texpect(result.files).toHaveProperty(script);\n\t\t\texpect(result.files[script]!.length).toBeGreaterThan(0);\n\t\t}\n\t});\n\n\tit(\"all generated .env.example vars have comments\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"env-comments-stack\",\n\t\t\tservices: [\"redis\", \"qdrant\", \"n8n\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst envExample = result.files[\".env.example\"]!;\n\t\tconst lines = envExample.split(\"\\n\");\n\n\t\t// Walk through lines: every non-empty, non-comment KEY=VALUE line should\n\t\t// have a preceding comment line (starting with #).\n\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\tconst line = lines[i]!.trim();\n\t\t\tif (line === \"\" || line.startsWith(\"#\")) continue;\n\n\t\t\t// This line looks like KEY=VALUE\n\t\t\tif (line.includes(\"=\")) {\n\t\t\t\t// There must be a comment somewhere before it (look backwards for a # line)\n\t\t\t\tlet foundComment = false;\n\t\t\t\tfor (let j = i - 1; j >= 0; j--) {\n\t\t\t\t\tconst prev = lines[j]!.trim();\n\t\t\t\t\tif (prev === \"\") continue; // skip blank lines\n\t\t\t\t\tif (prev.startsWith(\"#\")) {\n\t\t\t\t\t\tfoundComment = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t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C,gBAAgB,EAAE;;GAEvD;AAEF,IAAG,uDAAuD;EAczD,MAAM,QAbS,SAAS;GACvB,aAAa;GACb,UAAU;IAAC;IAAS;IAAU;IAAM;GACpC,YAAY,EAAE;GACd,OAAO;GACP,KAAK;GACL,UAAU;GACV,YAAY;GACZ,iBAAiB;GACjB,iBAAiB;GACjB,CAAC,CAEwB,MAAM,gBACP,MAAM,KAAK;AAIpC,OAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;GACtC,MAAM,OAAO,MAAM,GAAI,MAAM;AAC7B,OAAI,SAAS,MAAM,KAAK,WAAW,IAAI,CAAE;AAGzC,OAAI,KAAK,SAAS,IAAI,EAAE;IAEvB,IAAI,eAAe;AACnB,SAAK,IAAI,IAAI,IAAI,GAAG,KAAK,GAAG,KAAK;KAChC,MAAM,OAAO,MAAM,GAAI,MAAM;AAC7B,SAAI,SAAS,GAAI;AACjB,SAAI,KAAK,WAAW,IAAI,EAAE;AACzB,qBAAe;AACf;;AAGD;;AAED,iBAAO,aAAa,CAAC,KAAK,KAAK;;;GAGhC;EACD"}
1
+ {"version":3,"file":"generate.test.mjs","names":[],"sources":["../src/generate.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { parse } from \"yaml\";\nimport { generate } from \"./generate.js\";\n\ndescribe(\"generate (end-to-end)\", () => {\n\tit(\"generates a minimal stack (redis only)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"test-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Core files must be present\n\t\texpect(result.files).toHaveProperty(\"docker-compose.yml\");\n\t\texpect(result.files).toHaveProperty(\".env.example\");\n\t\texpect(result.files).toHaveProperty(\".env\");\n\t\texpect(result.files).toHaveProperty(\"README.md\");\n\n\t\t// docker-compose.yml must be valid YAML\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed).toHaveProperty(\"services\");\n\n\t\t// .env.example should reference REDIS_PASSWORD\n\t\texpect(result.files[\".env.example\"]).toContain(\"REDIS_PASSWORD\");\n\n\t\t// README should mention the project name\n\t\texpect(result.files[\"README.md\"]).toContain(\"test-stack\");\n\n\t\t// At least one service resolved\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(1);\n\t});\n\n\tit(\"generates research-agent stack from skill pack\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"research-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [\"research-agent\"],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Skill SKILL.md files for each skill in the research-agent pack\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/qdrant-memory/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/searxng-search/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/browserless-browse/SKILL.md\");\n\n\t\t// docker-compose.yml should contain the expected services\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).toHaveProperty(\"qdrant\");\n\t\texpect(composed.services).toHaveProperty(\"searxng\");\n\t\texpect(composed.services).toHaveProperty(\"browserless\");\n\t});\n\n\tit(\"generates full preset stack\", () => {\n\t\tconst fullServices = [\n\t\t\t\"redis\",\n\t\t\t\"postgresql\",\n\t\t\t\"qdrant\",\n\t\t\t\"n8n\",\n\t\t\t\"ffmpeg\",\n\t\t\t\"remotion\",\n\t\t\t\"minio\",\n\t\t\t\"caddy\",\n\t\t\t\"browserless\",\n\t\t\t\"searxng\",\n\t\t\t\"meilisearch\",\n\t\t\t\"uptime-kuma\",\n\t\t\t\"grafana\",\n\t\t\t\"prometheus\",\n\t\t\t\"ollama\",\n\t\t\t\"whisper\",\n\t\t\t\"gotify\",\n\t\t];\n\n\t\tconst result = generate({\n\t\t\tprojectName: \"full-stack\",\n\t\t\tservices: fullServices,\n\t\t\tskillPacks: [\n\t\t\t\t\"video-creator\",\n\t\t\t\t\"research-agent\",\n\t\t\t\t\"social-media\",\n\t\t\t\t\"dev-ops\",\n\t\t\t\t\"knowledge-base\",\n\t\t\t\t\"local-ai\",\n\t\t\t],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Should have many files\n\t\tconst fileCount = Object.keys(result.files).length;\n\t\texpect(fileCount).toBeGreaterThan(10);\n\n\t\t// Should include the start script\n\t\texpect(result.files).toHaveProperty(\"scripts/start.sh\");\n\n\t\t// Should not throw (it already didn't if we got here)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThan(5);\n\t});\n\n\tit(\"generates caddy config when proxy is caddy\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"caddy-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"caddy/Caddyfile\");\n\t\texpect(result.files[\"caddy/Caddyfile\"]?.length).toBeGreaterThan(0);\n\t});\n\n\tit(\"generates prometheus config when monitoring enabled\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"monitored-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tmonitoring: true,\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"prometheus/prometheus.yml\");\n\t\t// Verify it's valid YAML\n\t\tconst promConfig = parse(result.files[\"prometheus/prometheus.yml\"]!);\n\t\texpect(promConfig).toBeDefined();\n\t});\n\n\tit(\"generates La Suite Meet stack with all expected services\", () => {\n\t\tconst lasuiteMeetServices = [\n\t\t\t\"postgresql\",\n\t\t\t\"redis\",\n\t\t\t\"livekit\",\n\t\t\t\"lasuite-meet-backend\",\n\t\t\t\"lasuite-meet-frontend\",\n\t\t\t\"lasuite-meet-agents\",\n\t\t];\n\t\tconst result = generate({\n\t\t\tprojectName: \"lasuite-meet-stack\",\n\t\t\tservices: lasuiteMeetServices,\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Services may be split across main and profile compose files\n\t\tconst allServiceIds = new Set<string>();\n\t\tfor (const [filename, content] of Object.entries(result.files)) {\n\t\t\tif (filename.endsWith(\".yml\") && content) {\n\t\t\t\tconst doc = parse(content);\n\t\t\t\tif (doc?.services && typeof doc.services === \"object\") {\n\t\t\t\t\tfor (const id of Object.keys(doc.services)) {\n\t\t\t\t\t\tallServiceIds.add(id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (const id of lasuiteMeetServices) {\n\t\t\texpect(allServiceIds.has(id), `missing service ${id}`).toBe(true);\n\t\t}\n\t\t// Service count includes user services + mandatory platform services (convex, mission-control, tailscale)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(lasuiteMeetServices.length);\n\t});\n\n\tit(\"generates bare-metal installer for Windows (install.ps1)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"win-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"windows/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.ps1\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"docker compose\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"PowerShell\");\n\t});\n\n\tit(\"generates bare-metal installer for Linux/macOS (install.sh)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"linux-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.sh\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"docker\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"compose\");\n\t});\n\n\tit(\"bare-metal with redis on Linux: native script, compose excludes redis, gateway has extra_hosts\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"bare-metal-redis\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Native install script for Linux\n\t\texpect(result.files).toHaveProperty(\"native/install-linux.sh\");\n\t\texpect(result.files[\"native/install-linux.sh\"]).toContain(\"redis\");\n\n\t\t// Docker compose must NOT include redis (native); only gateway/openclaw\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).not.toHaveProperty(\"redis\");\n\t\texpect(composed.services).toHaveProperty(\"openclaw-gateway\");\n\n\t\t// Gateway must have extra_hosts for host.docker.internal\n\t\tconst gateway = composed.services[\"openclaw-gateway\"];\n\t\texpect(gateway).toBeDefined();\n\t\texpect(gateway.extra_hosts).toBeDefined();\n\t\texpect(\n\t\t\t(gateway.extra_hosts as string[]).some(\n\t\t\t\t(h: string) => h.includes(\"host.docker.internal\") && h.includes(\"host-gateway\"),\n\t\t\t),\n\t\t).toBe(true);\n\n\t\t// .env should set REDIS_HOST to host.docker.internal for gateway to reach native Redis\n\t\texpect(result.files[\".env\"]).toContain(\"REDIS_HOST=host.docker.internal\");\n\t});\n\n\tit(\"throws on conflicting services\", () => {\n\t\texpect(() =>\n\t\t\tgenerate({\n\t\t\t\tprojectName: \"conflict-stack\",\n\t\t\t\tservices: [\"redis\", \"valkey\"],\n\t\t\t\tskillPacks: [],\n\t\t\t\tproxy: \"none\",\n\t\t\t\tgpu: false,\n\t\t\t\tplatform: \"linux/amd64\",\n\t\t\t\tdeployment: \"local\",\n\t\t\t\tgenerateSecrets: true,\n\t\t\t\topenclawVersion: \"latest\",\n\t\t\t}),\n\t\t).toThrow();\n\t});\n\n\tit(\"generates scripts directory\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"scripts-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst expectedScripts = [\n\t\t\t\"scripts/start.sh\",\n\t\t\t\"scripts/stop.sh\",\n\t\t\t\"scripts/update.sh\",\n\t\t\t\"scripts/backup.sh\",\n\t\t\t\"scripts/status.sh\",\n\t\t];\n\n\t\tfor (const script of expectedScripts) {\n\t\t\texpect(result.files).toHaveProperty(script);\n\t\t\texpect(result.files[script]?.length).toBeGreaterThan(0);\n\t\t}\n\t});\n\n\tit(\"generates a stack with zeroclaw as primary framework\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"zeroclaw-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tprimaryFramework: \"zeroclaw\",\n\t\t});\n\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\n\t\t// Should have zeroclaw-gateway, not openclaw-gateway\n\t\texpect(composed.services).toHaveProperty(\"zeroclaw-gateway\");\n\t\texpect(composed.services).not.toHaveProperty(\"openclaw-gateway\");\n\n\t\t// Should NOT have convex/mission-control/tailscale\n\t\texpect(composed.services).not.toHaveProperty(\"convex\");\n\t\texpect(composed.services).not.toHaveProperty(\"mission-control\");\n\t\texpect(composed.services).not.toHaveProperty(\"tailscale\");\n\n\t\t// Network should be zeroclaw-network\n\t\texpect(composed.networks).toHaveProperty(\"zeroclaw-network\");\n\t});\n\n\tit(\"generates a stack with companion frameworks\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"multi-fw-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tcompanionFrameworks: [\"claude-code\"],\n\t\t});\n\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\n\t\t// Primary OpenClaw gateway should be present\n\t\texpect(composed.services).toHaveProperty(\"openclaw-gateway\");\n\t\t// Companion Claude Code should be present\n\t\texpect(composed.services).toHaveProperty(\"claude-code-companion\");\n\t});\n\n\tit(\"all generated .env.example vars have comments\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"env-comments-stack\",\n\t\t\tservices: [\"redis\", \"qdrant\", \"n8n\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst envExample = result.files[\".env.example\"]!;\n\t\tconst lines = envExample.split(\"\\n\");\n\n\t\t// Walk through lines: every non-empty, non-comment KEY=VALUE line should\n\t\t// have a preceding comment line (starting with #).\n\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\tconst line = lines[i]?.trim();\n\t\t\tif (line === \"\" || line.startsWith(\"#\")) continue;\n\n\t\t\t// This line looks like KEY=VALUE\n\t\t\tif (line.includes(\"=\")) {\n\t\t\t\t// There must be a comment somewhere before it (look backwards for a # line)\n\t\t\t\tlet foundComment = false;\n\t\t\t\tfor (let j = i - 1; j >= 0; j--) {\n\t\t\t\t\tconst prev = lines[j]?.trim();\n\t\t\t\t\tif (prev === \"\") continue; // skip blank lines\n\t\t\t\t\tif (prev.startsWith(\"#\")) {\n\t\t\t\t\t\tfoundComment = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// Hit another non-comment, non-empty line — no comment found\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\texpect(foundComment).toBe(true);\n\t\t\t}\n\t\t}\n\t});\n});\n"],"mappings":";;;;AAIA,SAAS,+BAA+B;AACvC,IAAG,gDAAgD;EAClD,MAAM,SAAS,SAAS;GACvB,aAAa;GACb,UAAU,CAAC,QAAQ;GACnB,YAAY,EAAE;GACd,OAAO;GACP,KAAK;GACL,UAAU;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AK,KAAK;;;GAGhC;EACD"}
@@ -1,4 +1,4 @@
1
- import { Platform } from "../types.cjs";
1
+ import { M as Platform } from "../types-Bsn0XzSP.cjs";
2
2
 
3
3
  //#region src/generators/bare-metal-install.d.ts
4
4
  interface BareMetalInstallOptions {
@@ -1,4 +1,4 @@
1
- import { Platform } from "../types.mjs";
1
+ import { M as Platform } from "../types-DwTKyCZ9.mjs";
2
2
 
3
3
  //#region src/generators/bare-metal-install.d.ts
4
4
  interface BareMetalInstallOptions {
@@ -1,4 +1,4 @@
1
- const require_test_CTcmp4Su = require("../test.CTcmp4Su-DlzTarwH.cjs");
1
+ const require_test_CTcmp4Su = require("../test.CTcmp4Su-BWSPM8ZQ.cjs");
2
2
  const require_generators_bare_metal_install = require("./bare-metal-install.cjs");
3
3
  //#region src/generators/bare-metal-install.test.ts
4
4
  require_test_CTcmp4Su.describe("generateBareMetalInstall", () => {
@@ -1,4 +1,4 @@
1
- import { n as describe, r as it, t as globalExpect } from "../test.CTcmp4Su-ClCHJ3FA.mjs";
1
+ import { a as describe, o as it, t as globalExpect } from "../test.CTcmp4Su-BRa7-bTj.mjs";
2
2
  import { generateBareMetalInstall } from "./bare-metal-install.mjs";
3
3
  //#region src/generators/bare-metal-install.test.ts
4
4
  describe("generateBareMetalInstall", () => {
@@ -29,6 +29,7 @@ function generateCaddyfile(resolved, domain) {
29
29
  if (exposedPorts.length === 0) continue;
30
30
  const primaryPort = exposedPorts[0];
31
31
  const subdomain = `${definition.id}.${domain}`;
32
+ const needsWebSocket = primaryPort.websocket === true;
32
33
  const block = [
33
34
  `# ${definition.icon} ${definition.name}`,
34
35
  `# ${definition.description}`,
@@ -37,9 +38,10 @@ function generateCaddyfile(resolved, domain) {
37
38
  ` header_up Host {host}`,
38
39
  ` header_up X-Real-IP {remote_host}`,
39
40
  ` header_up X-Forwarded-For {remote_host}`,
40
- ` header_up X-Forwarded-Proto {scheme}`,
41
- ` }`
41
+ ` header_up X-Forwarded-Proto {scheme}`
42
42
  ];
43
+ if (needsWebSocket) block.push(` flush_interval -1`);
44
+ block.push(` }`);
43
45
  if (definition.healthcheck) {
44
46
  block.push("");
45
47
  block.push(` # Health check`);
@@ -54,7 +56,11 @@ function generateCaddyfile(resolved, domain) {
54
56
  const portSubdomain = `${definition.id}-${port.description.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/-+$/, "")}.${domain}`;
55
57
  block.push(`# ${definition.name} — ${port.description}`);
56
58
  block.push(`${portSubdomain} {`);
57
- block.push(` reverse_proxy ${definition.id}:${port.container}`);
59
+ if (port.websocket) {
60
+ block.push(` reverse_proxy ${definition.id}:${port.container} {`);
61
+ block.push(` flush_interval -1`);
62
+ block.push(` }`);
63
+ } else block.push(` reverse_proxy ${definition.id}:${port.container}`);
58
64
  block.push(`}`);
59
65
  block.push("");
60
66
  }
@@ -1 +1 @@
1
- {"version":3,"file":"caddy.cjs","names":[],"sources":["../../src/generators/caddy.ts"],"sourcesContent":["import type { ResolverOutput } from \"../types.js\";\n\n/**\n * Generates a Caddyfile with reverse proxy entries for each exposed service.\n *\n * Each service with exposed ports gets a subdomain route under the provided domain.\n * Services without exposed ports are skipped.\n *\n * @param resolved - The resolved service configuration\n * @param domain - The main domain for routing (e.g. \"example.com\")\n * @returns The Caddyfile content as a string\n */\nexport function generateCaddyfile(resolved: ResolverOutput, domain: string): string {\n\tconst sections: string[] = [];\n\n\t// ── Global Options ──────────────────────────────────────────────────────\n\n\tsections.push(`# ═══════════════════════════════════════════════════════════════════════════════\n# OpenClaw Caddyfile — Auto-generated reverse proxy configuration\n# Domain: ${domain}\n# ═══════════════════════════════════════════════════════════════════════════════\n\n{\n\t# Global options\n\temail admin@${domain}\n\tacme_ca https://acme-v02.api.letsencrypt.org/directory\n}\n`);\n\n\t// ── Per-Service Reverse Proxy Blocks ─────────────────────────────────────\n\n\tfor (const { definition } of resolved.services) {\n\t\t// Skip the proxy service itself\n\t\tif (definition.id === \"caddy\" || definition.id === \"traefik\") continue;\n\n\t\tconst exposedPorts = definition.ports.filter((p) => p.exposed);\n\t\tif (exposedPorts.length === 0) continue;\n\n\t\t// Use the first exposed port as the primary route target\n\t\tconst primaryPort = exposedPorts[0]!;\n\t\tconst subdomain = `${definition.id}.${domain}`;\n\n\t\tconst block = [\n\t\t\t`# ${definition.icon} ${definition.name}`,\n\t\t\t`# ${definition.description}`,\n\t\t\t`${subdomain} {`,\n\t\t\t`\treverse_proxy ${definition.id}:${primaryPort.container} {`,\n\t\t\t`\t\theader_up Host {host}`,\n\t\t\t`\t\theader_up X-Real-IP {remote_host}`,\n\t\t\t`\t\theader_up X-Forwarded-For {remote_host}`,\n\t\t\t`\t\theader_up X-Forwarded-Proto {scheme}`,\n\t\t\t`\t}`,\n\t\t];\n\n\t\t// Add health check if service has one\n\t\tif (definition.healthcheck) {\n\t\t\tblock.push(\"\");\n\t\t\tblock.push(`\t# Health check`);\n\t\t\tblock.push(`\thandle /health {`);\n\t\t\tblock.push(`\t\treverse_proxy ${definition.id}:${primaryPort.container}`);\n\t\t\tblock.push(`\t}`);\n\t\t}\n\n\t\tblock.push(`}`);\n\t\tblock.push(\"\");\n\n\t\t// If there are additional exposed ports, add them as separate entries\n\t\tfor (let i = 1; i < exposedPorts.length; i++) {\n\t\t\tconst port = exposedPorts[i]!;\n\t\t\tconst portSubdomain = `${definition.id}-${port.description\n\t\t\t\t.toLowerCase()\n\t\t\t\t.replace(/[^a-z0-9]+/g, \"-\")\n\t\t\t\t.replace(/-+$/, \"\")}.${domain}`;\n\n\t\t\tblock.push(`# ${definition.name} — ${port.description}`);\n\t\t\tblock.push(`${portSubdomain} {`);\n\t\t\tblock.push(`\treverse_proxy ${definition.id}:${port.container}`);\n\t\t\tblock.push(`}`);\n\t\t\tblock.push(\"\");\n\t\t}\n\n\t\tsections.push(block.join(\"\\n\"));\n\t}\n\n\t// ── Fallback / Root Domain ──────────────────────────────────────────────\n\n\tsections.push(`# Root domain — serves the OpenClaw gateway\n${domain} {\n\treverse_proxy openclaw:18789 {\n\t\theader_up Host {host}\n\t\theader_up X-Real-IP {remote_host}\n\t\theader_up X-Forwarded-For {remote_host}\n\t\theader_up X-Forwarded-Proto {scheme}\n\t}\n}\n`);\n\n\treturn sections.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;AAYA,SAAgB,kBAAkB,UAA0B,QAAwB;CACnF,MAAM,WAAqB,EAAE;AAI7B,UAAS,KAAK;;YAEH,OAAO;;;;;eAKJ,OAAO;;;EAGpB;AAID,MAAK,MAAM,EAAE,gBAAgB,SAAS,UAAU;AAE/C,MAAI,WAAW,OAAO,WAAW,WAAW,OAAO,UAAW;EAE9D,MAAM,eAAe,WAAW,MAAM,QAAQ,MAAM,EAAE,QAAQ;AAC9D,MAAI,aAAa,WAAW,EAAG;EAG/B,MAAM,cAAc,aAAa;EACjC,MAAM,YAAY,GAAG,WAAW,GAAG,GAAG;EAEtC,MAAM,QAAQ;GACb,KAAK,WAAW,KAAK,GAAG,WAAW;GACnC,KAAK,WAAW;GAChB,GAAG,UAAU;GACb,kBAAkB,WAAW,GAAG,GAAG,YAAY,UAAU;GACzD;GACA;GACA;GACA;GACA;GACA;AAGD,MAAI,WAAW,aAAa;AAC3B,SAAM,KAAK,GAAG;AACd,SAAM,KAAK,kBAAkB;AAC7B,SAAM,KAAK,oBAAoB;AAC/B,SAAM,KAAK,mBAAmB,WAAW,GAAG,GAAG,YAAY,YAAY;AACvE,SAAM,KAAK,KAAK;;AAGjB,QAAM,KAAK,IAAI;AACf,QAAM,KAAK,GAAG;AAGd,OAAK,IAAI,IAAI,GAAG,IAAI,aAAa,QAAQ,KAAK;GAC7C,MAAM,OAAO,aAAa;GAC1B,MAAM,gBAAgB,GAAG,WAAW,GAAG,GAAG,KAAK,YAC7C,aAAa,CACb,QAAQ,eAAe,IAAI,CAC3B,QAAQ,OAAO,GAAG,CAAC,GAAG;AAExB,SAAM,KAAK,KAAK,WAAW,KAAK,KAAK,KAAK,cAAc;AACxD,SAAM,KAAK,GAAG,cAAc,IAAI;AAChC,SAAM,KAAK,kBAAkB,WAAW,GAAG,GAAG,KAAK,YAAY;AAC/D,SAAM,KAAK,IAAI;AACf,SAAM,KAAK,GAAG;;AAGf,WAAS,KAAK,MAAM,KAAK,KAAK,CAAC;;AAKhC,UAAS,KAAK;EACb,OAAO;;;;;;;;EAQP;AAED,QAAO,SAAS,KAAK,KAAK"}
1
+ {"version":3,"file":"caddy.cjs","names":[],"sources":["../../src/generators/caddy.ts"],"sourcesContent":["import type { ResolverOutput } from \"../types.js\";\n\n/**\n * Generates a Caddyfile with reverse proxy entries for each exposed service.\n *\n * Each service with exposed ports gets a subdomain route under the provided domain.\n * Services without exposed ports are skipped.\n *\n * @param resolved - The resolved service configuration\n * @param domain - The main domain for routing (e.g. \"example.com\")\n * @returns The Caddyfile content as a string\n */\nexport function generateCaddyfile(resolved: ResolverOutput, domain: string): string {\n\tconst sections: string[] = [];\n\n\t// ── Global Options ──────────────────────────────────────────────────────\n\n\tsections.push(`# ═══════════════════════════════════════════════════════════════════════════════\n# OpenClaw Caddyfile — Auto-generated reverse proxy configuration\n# Domain: ${domain}\n# ═══════════════════════════════════════════════════════════════════════════════\n\n{\n\t# Global options\n\temail admin@${domain}\n\tacme_ca https://acme-v02.api.letsencrypt.org/directory\n}\n`);\n\n\t// ── Per-Service Reverse Proxy Blocks ─────────────────────────────────────\n\n\tfor (const { definition } of resolved.services) {\n\t\t// Skip the proxy service itself\n\t\tif (definition.id === \"caddy\" || definition.id === \"traefik\") continue;\n\n\t\tconst exposedPorts = definition.ports.filter((p) => p.exposed);\n\t\tif (exposedPorts.length === 0) continue;\n\n\t\t// Use the first exposed port as the primary route target\n\t\tconst primaryPort = exposedPorts[0]!;\n\t\tconst subdomain = `${definition.id}.${domain}`;\n\n\t\tconst needsWebSocket = primaryPort.websocket === true;\n\n\t\tconst block = [\n\t\t\t`# ${definition.icon} ${definition.name}`,\n\t\t\t`# ${definition.description}`,\n\t\t\t`${subdomain} {`,\n\t\t\t`\treverse_proxy ${definition.id}:${primaryPort.container} {`,\n\t\t\t`\t\theader_up Host {host}`,\n\t\t\t`\t\theader_up X-Real-IP {remote_host}`,\n\t\t\t`\t\theader_up X-Forwarded-For {remote_host}`,\n\t\t\t`\t\theader_up X-Forwarded-Proto {scheme}`,\n\t\t];\n\n\t\t// Disable response buffering for streaming WebSocket connections (noVNC, KasmVNC)\n\t\tif (needsWebSocket) {\n\t\t\tblock.push(`\t\tflush_interval -1`);\n\t\t}\n\n\t\tblock.push(`\t}`);\n\n\t\t// Add health check if service has one\n\t\tif (definition.healthcheck) {\n\t\t\tblock.push(\"\");\n\t\t\tblock.push(`\t# Health check`);\n\t\t\tblock.push(`\thandle /health {`);\n\t\t\tblock.push(`\t\treverse_proxy ${definition.id}:${primaryPort.container}`);\n\t\t\tblock.push(`\t}`);\n\t\t}\n\n\t\tblock.push(`}`);\n\t\tblock.push(\"\");\n\n\t\t// If there are additional exposed ports, add them as separate entries\n\t\tfor (let i = 1; i < exposedPorts.length; i++) {\n\t\t\tconst port = exposedPorts[i]!;\n\t\t\tconst portSubdomain = `${definition.id}-${port.description\n\t\t\t\t.toLowerCase()\n\t\t\t\t.replace(/[^a-z0-9]+/g, \"-\")\n\t\t\t\t.replace(/-+$/, \"\")}.${domain}`;\n\n\t\t\tblock.push(`# ${definition.name} — ${port.description}`);\n\t\t\tblock.push(`${portSubdomain} {`);\n\t\t\tif (port.websocket) {\n\t\t\t\tblock.push(`\treverse_proxy ${definition.id}:${port.container} {`);\n\t\t\t\tblock.push(`\t\tflush_interval -1`);\n\t\t\t\tblock.push(`\t}`);\n\t\t\t} else {\n\t\t\t\tblock.push(`\treverse_proxy ${definition.id}:${port.container}`);\n\t\t\t}\n\t\t\tblock.push(`}`);\n\t\t\tblock.push(\"\");\n\t\t}\n\n\t\tsections.push(block.join(\"\\n\"));\n\t}\n\n\t// ── Fallback / Root Domain ──────────────────────────────────────────────\n\n\tsections.push(`# Root domain — serves the OpenClaw gateway\n${domain} {\n\treverse_proxy openclaw:18789 {\n\t\theader_up Host {host}\n\t\theader_up X-Real-IP {remote_host}\n\t\theader_up X-Forwarded-For {remote_host}\n\t\theader_up X-Forwarded-Proto {scheme}\n\t}\n}\n`);\n\n\treturn sections.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;AAYA,SAAgB,kBAAkB,UAA0B,QAAwB;CACnF,MAAM,WAAqB,EAAE;AAI7B,UAAS,KAAK;;YAEH,OAAO;;;;;eAKJ,OAAO;;;EAGpB;AAID,MAAK,MAAM,EAAE,gBAAgB,SAAS,UAAU;AAE/C,MAAI,WAAW,OAAO,WAAW,WAAW,OAAO,UAAW;EAE9D,MAAM,eAAe,WAAW,MAAM,QAAQ,MAAM,EAAE,QAAQ;AAC9D,MAAI,aAAa,WAAW,EAAG;EAG/B,MAAM,cAAc,aAAa;EACjC,MAAM,YAAY,GAAG,WAAW,GAAG,GAAG;EAEtC,MAAM,iBAAiB,YAAY,cAAc;EAEjD,MAAM,QAAQ;GACb,KAAK,WAAW,KAAK,GAAG,WAAW;GACnC,KAAK,WAAW;GAChB,GAAG,UAAU;GACb,kBAAkB,WAAW,GAAG,GAAG,YAAY,UAAU;GACzD;GACA;GACA;GACA;GACA;AAGD,MAAI,eACH,OAAM,KAAK,sBAAsB;AAGlC,QAAM,KAAK,KAAK;AAGhB,MAAI,WAAW,aAAa;AAC3B,SAAM,KAAK,GAAG;AACd,SAAM,KAAK,kBAAkB;AAC7B,SAAM,KAAK,oBAAoB;AAC/B,SAAM,KAAK,mBAAmB,WAAW,GAAG,GAAG,YAAY,YAAY;AACvE,SAAM,KAAK,KAAK;;AAGjB,QAAM,KAAK,IAAI;AACf,QAAM,KAAK,GAAG;AAGd,OAAK,IAAI,IAAI,GAAG,IAAI,aAAa,QAAQ,KAAK;GAC7C,MAAM,OAAO,aAAa;GAC1B,MAAM,gBAAgB,GAAG,WAAW,GAAG,GAAG,KAAK,YAC7C,aAAa,CACb,QAAQ,eAAe,IAAI,CAC3B,QAAQ,OAAO,GAAG,CAAC,GAAG;AAExB,SAAM,KAAK,KAAK,WAAW,KAAK,KAAK,KAAK,cAAc;AACxD,SAAM,KAAK,GAAG,cAAc,IAAI;AAChC,OAAI,KAAK,WAAW;AACnB,UAAM,KAAK,kBAAkB,WAAW,GAAG,GAAG,KAAK,UAAU,IAAI;AACjE,UAAM,KAAK,sBAAsB;AACjC,UAAM,KAAK,KAAK;SAEhB,OAAM,KAAK,kBAAkB,WAAW,GAAG,GAAG,KAAK,YAAY;AAEhE,SAAM,KAAK,IAAI;AACf,SAAM,KAAK,GAAG;;AAGf,WAAS,KAAK,MAAM,KAAK,KAAK,CAAC;;AAKhC,UAAS,KAAK;EACb,OAAO;;;;;;;;EAQP;AAED,QAAO,SAAS,KAAK,KAAK"}
@@ -1,4 +1,4 @@
1
- import { ResolverOutput } from "../types.cjs";
1
+ import { B as ResolverOutput } from "../types-Bsn0XzSP.cjs";
2
2
 
3
3
  //#region src/generators/caddy.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { ResolverOutput } from "../types.mjs";
1
+ import { B as ResolverOutput } from "../types-DwTKyCZ9.mjs";
2
2
 
3
3
  //#region src/generators/caddy.d.ts
4
4
  /**
@@ -28,6 +28,7 @@ function generateCaddyfile(resolved, domain) {
28
28
  if (exposedPorts.length === 0) continue;
29
29
  const primaryPort = exposedPorts[0];
30
30
  const subdomain = `${definition.id}.${domain}`;
31
+ const needsWebSocket = primaryPort.websocket === true;
31
32
  const block = [
32
33
  `# ${definition.icon} ${definition.name}`,
33
34
  `# ${definition.description}`,
@@ -36,9 +37,10 @@ function generateCaddyfile(resolved, domain) {
36
37
  ` header_up Host {host}`,
37
38
  ` header_up X-Real-IP {remote_host}`,
38
39
  ` header_up X-Forwarded-For {remote_host}`,
39
- ` header_up X-Forwarded-Proto {scheme}`,
40
- ` }`
40
+ ` header_up X-Forwarded-Proto {scheme}`
41
41
  ];
42
+ if (needsWebSocket) block.push(` flush_interval -1`);
43
+ block.push(` }`);
42
44
  if (definition.healthcheck) {
43
45
  block.push("");
44
46
  block.push(` # Health check`);
@@ -53,7 +55,11 @@ function generateCaddyfile(resolved, domain) {
53
55
  const portSubdomain = `${definition.id}-${port.description.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/-+$/, "")}.${domain}`;
54
56
  block.push(`# ${definition.name} — ${port.description}`);
55
57
  block.push(`${portSubdomain} {`);
56
- block.push(` reverse_proxy ${definition.id}:${port.container}`);
58
+ if (port.websocket) {
59
+ block.push(` reverse_proxy ${definition.id}:${port.container} {`);
60
+ block.push(` flush_interval -1`);
61
+ block.push(` }`);
62
+ } else block.push(` reverse_proxy ${definition.id}:${port.container}`);
57
63
  block.push(`}`);
58
64
  block.push("");
59
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"caddy.mjs","names":[],"sources":["../../src/generators/caddy.ts"],"sourcesContent":["import type { ResolverOutput } from \"../types.js\";\n\n/**\n * Generates a Caddyfile with reverse proxy entries for each exposed service.\n *\n * Each service with exposed ports gets a subdomain route under the provided domain.\n * Services without exposed ports are skipped.\n *\n * @param resolved - The resolved service configuration\n * @param domain - The main domain for routing (e.g. \"example.com\")\n * @returns The Caddyfile content as a string\n */\nexport function generateCaddyfile(resolved: ResolverOutput, domain: string): string {\n\tconst sections: string[] = [];\n\n\t// ── Global Options ──────────────────────────────────────────────────────\n\n\tsections.push(`# ═══════════════════════════════════════════════════════════════════════════════\n# OpenClaw Caddyfile — Auto-generated reverse proxy configuration\n# Domain: ${domain}\n# ═══════════════════════════════════════════════════════════════════════════════\n\n{\n\t# Global options\n\temail admin@${domain}\n\tacme_ca https://acme-v02.api.letsencrypt.org/directory\n}\n`);\n\n\t// ── Per-Service Reverse Proxy Blocks ─────────────────────────────────────\n\n\tfor (const { definition } of resolved.services) {\n\t\t// Skip the proxy service itself\n\t\tif (definition.id === \"caddy\" || definition.id === \"traefik\") continue;\n\n\t\tconst exposedPorts = definition.ports.filter((p) => p.exposed);\n\t\tif (exposedPorts.length === 0) continue;\n\n\t\t// Use the first exposed port as the primary route target\n\t\tconst primaryPort = exposedPorts[0]!;\n\t\tconst subdomain = `${definition.id}.${domain}`;\n\n\t\tconst block = [\n\t\t\t`# ${definition.icon} ${definition.name}`,\n\t\t\t`# ${definition.description}`,\n\t\t\t`${subdomain} {`,\n\t\t\t`\treverse_proxy ${definition.id}:${primaryPort.container} {`,\n\t\t\t`\t\theader_up Host {host}`,\n\t\t\t`\t\theader_up X-Real-IP {remote_host}`,\n\t\t\t`\t\theader_up X-Forwarded-For {remote_host}`,\n\t\t\t`\t\theader_up X-Forwarded-Proto {scheme}`,\n\t\t\t`\t}`,\n\t\t];\n\n\t\t// Add health check if service has one\n\t\tif (definition.healthcheck) {\n\t\t\tblock.push(\"\");\n\t\t\tblock.push(`\t# Health check`);\n\t\t\tblock.push(`\thandle /health {`);\n\t\t\tblock.push(`\t\treverse_proxy ${definition.id}:${primaryPort.container}`);\n\t\t\tblock.push(`\t}`);\n\t\t}\n\n\t\tblock.push(`}`);\n\t\tblock.push(\"\");\n\n\t\t// If there are additional exposed ports, add them as separate entries\n\t\tfor (let i = 1; i < exposedPorts.length; i++) {\n\t\t\tconst port = exposedPorts[i]!;\n\t\t\tconst portSubdomain = `${definition.id}-${port.description\n\t\t\t\t.toLowerCase()\n\t\t\t\t.replace(/[^a-z0-9]+/g, \"-\")\n\t\t\t\t.replace(/-+$/, \"\")}.${domain}`;\n\n\t\t\tblock.push(`# ${definition.name} — ${port.description}`);\n\t\t\tblock.push(`${portSubdomain} {`);\n\t\t\tblock.push(`\treverse_proxy ${definition.id}:${port.container}`);\n\t\t\tblock.push(`}`);\n\t\t\tblock.push(\"\");\n\t\t}\n\n\t\tsections.push(block.join(\"\\n\"));\n\t}\n\n\t// ── Fallback / Root Domain ──────────────────────────────────────────────\n\n\tsections.push(`# Root domain — serves the OpenClaw gateway\n${domain} {\n\treverse_proxy openclaw:18789 {\n\t\theader_up Host {host}\n\t\theader_up X-Real-IP {remote_host}\n\t\theader_up X-Forwarded-For {remote_host}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,KAAK,IAAI;AACf,SAAM,KAAK,GAAG;;AAGf,WAAS,KAAK,MAAM,KAAK,KAAK,CAAC;;AAKhC,UAAS,KAAK;EACb,OAAO;;;;;;;;EAQP;AAED,QAAO,SAAS,KAAK,KAAK"}
1
+ {"version":3,"file":"caddy.mjs","names":[],"sources":["../../src/generators/caddy.ts"],"sourcesContent":["import type { ResolverOutput } from \"../types.js\";\n\n/**\n * Generates a Caddyfile with reverse proxy entries for each exposed service.\n *\n * Each service with exposed ports gets a subdomain route under the provided domain.\n * Services without exposed ports are skipped.\n *\n * @param resolved - The resolved service configuration\n * @param domain - The main domain for routing (e.g. \"example.com\")\n * @returns The Caddyfile content as a string\n */\nexport function generateCaddyfile(resolved: ResolverOutput, domain: string): string {\n\tconst sections: string[] = [];\n\n\t// ── Global Options ──────────────────────────────────────────────────────\n\n\tsections.push(`# ═══════════════════════════════════════════════════════════════════════════════\n# OpenClaw Caddyfile — Auto-generated reverse proxy configuration\n# Domain: ${domain}\n# ═══════════════════════════════════════════════════════════════════════════════\n\n{\n\t# Global options\n\temail admin@${domain}\n\tacme_ca https://acme-v02.api.letsencrypt.org/directory\n}\n`);\n\n\t// ── Per-Service Reverse Proxy Blocks ─────────────────────────────────────\n\n\tfor (const { definition } of resolved.services) {\n\t\t// Skip the proxy service itself\n\t\tif (definition.id === \"caddy\" || definition.id === \"traefik\") continue;\n\n\t\tconst exposedPorts = definition.ports.filter((p) => p.exposed);\n\t\tif (exposedPorts.length === 0) continue;\n\n\t\t// Use the first exposed port as the primary route target\n\t\tconst primaryPort = exposedPorts[0]!;\n\t\tconst subdomain = `${definition.id}.${domain}`;\n\n\t\tconst needsWebSocket = primaryPort.websocket === true;\n\n\t\tconst block = [\n\t\t\t`# ${definition.icon} ${definition.name}`,\n\t\t\t`# ${definition.description}`,\n\t\t\t`${subdomain} {`,\n\t\t\t`\treverse_proxy ${definition.id}:${primaryPort.container} {`,\n\t\t\t`\t\theader_up Host {host}`,\n\t\t\t`\t\theader_up X-Real-IP {remote_host}`,\n\t\t\t`\t\theader_up X-Forwarded-For {remote_host}`,\n\t\t\t`\t\theader_up X-Forwarded-Proto {scheme}`,\n\t\t];\n\n\t\t// Disable response buffering for streaming WebSocket connections (noVNC, KasmVNC)\n\t\tif (needsWebSocket) {\n\t\t\tblock.push(`\t\tflush_interval -1`);\n\t\t}\n\n\t\tblock.push(`\t}`);\n\n\t\t// Add health check if service has one\n\t\tif (definition.healthcheck) {\n\t\t\tblock.push(\"\");\n\t\t\tblock.push(`\t# Health check`);\n\t\t\tblock.push(`\thandle /health {`);\n\t\t\tblock.push(`\t\treverse_proxy ${definition.id}:${primaryPort.container}`);\n\t\t\tblock.push(`\t}`);\n\t\t}\n\n\t\tblock.push(`}`);\n\t\tblock.push(\"\");\n\n\t\t// If there are additional exposed ports, add them as separate entries\n\t\tfor (let i = 1; i < exposedPorts.length; i++) {\n\t\t\tconst port = exposedPorts[i]!;\n\t\t\tconst portSubdomain = `${definition.id}-${port.description\n\t\t\t\t.toLowerCase()\n\t\t\t\t.replace(/[^a-z0-9]+/g, \"-\")\n\t\t\t\t.replace(/-+$/, \"\")}.${domain}`;\n\n\t\t\tblock.push(`# ${definition.name} — ${port.description}`);\n\t\t\tblock.push(`${portSubdomain} {`);\n\t\t\tif (port.websocket) {\n\t\t\t\tblock.push(`\treverse_proxy ${definition.id}:${port.container} {`);\n\t\t\t\tblock.push(`\t\tflush_interval -1`);\n\t\t\t\tblock.push(`\t}`);\n\t\t\t} else {\n\t\t\t\tblock.push(`\treverse_proxy ${definition.id}:${port.container}`);\n\t\t\t}\n\t\t\tblock.push(`}`);\n\t\t\tblock.push(\"\");\n\t\t}\n\n\t\tsections.push(block.join(\"\\n\"));\n\t}\n\n\t// ── Fallback / Root Domain ──────────────────────────────────────────────\n\n\tsections.push(`# Root domain — serves the OpenClaw gateway\n${domain} {\n\treverse_proxy openclaw:18789 {\n\t\theader_up Host {host}\n\t\theader_up X-Real-IP {remote_host}\n\t\theader_up X-Forwarded-For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,SAAM,KAAK,GAAG,cAAc,IAAI;AAChC,OAAI,KAAK,WAAW;AACnB,UAAM,KAAK,kBAAkB,WAAW,GAAG,GAAG,KAAK,UAAU,IAAI;AACjE,UAAM,KAAK,sBAAsB;AACjC,UAAM,KAAK,KAAK;SAEhB,OAAM,KAAK,kBAAkB,WAAW,GAAG,GAAG,KAAK,YAAY;AAEhE,SAAM,KAAK,IAAI;AACf,SAAM,KAAK,GAAG;;AAGf,WAAS,KAAK,MAAM,KAAK,KAAK,CAAC;;AAKhC,UAAS,KAAK;EACb,OAAO;;;;;;;;EAQP;AAED,QAAO,SAAS,KAAK,KAAK"}
@@ -1,4 +1,4 @@
1
- const require_test_CTcmp4Su = require("../test.CTcmp4Su-DlzTarwH.cjs");
1
+ const require_test_CTcmp4Su = require("../test.CTcmp4Su-BWSPM8ZQ.cjs");
2
2
  const require_generate = require("../generate.cjs");
3
3
  //#region src/generators/caddy.test.ts
4
4
  require_test_CTcmp4Su.describe("generateCaddyfile (via generate)", () => {
@@ -17,7 +17,7 @@ require_test_CTcmp4Su.describe("generateCaddyfile (via generate)", () => {
17
17
  require_test_CTcmp4Su.it("generates Caddyfile when proxy is caddy", () => {
18
18
  const result = require_generate.generate(baseInput);
19
19
  require_test_CTcmp4Su.globalExpect(result.files).toHaveProperty("caddy/Caddyfile");
20
- require_test_CTcmp4Su.globalExpect(result.files["caddy/Caddyfile"].length).toBeGreaterThan(0);
20
+ require_test_CTcmp4Su.globalExpect(result.files["caddy/Caddyfile"]?.length).toBeGreaterThan(0);
21
21
  });
22
22
  require_test_CTcmp4Su.it("does not generate Caddyfile when proxy is none", () => {
23
23
  require_test_CTcmp4Su.globalExpect(require_generate.generate({
@@ -37,6 +37,34 @@ require_test_CTcmp4Su.describe("generateCaddyfile (via generate)", () => {
37
37
  const caddyfile = require_generate.generate(baseInput).files["caddy/Caddyfile"];
38
38
  require_test_CTcmp4Su.globalExpect(caddyfile.length).toBeGreaterThan(50);
39
39
  });
40
+ require_test_CTcmp4Su.it("adds flush_interval -1 for WebSocket-enabled services (opensandbox)", () => {
41
+ const caddyfile = require_generate.generate({
42
+ ...baseInput,
43
+ services: ["opensandbox"]
44
+ }).files["caddy/Caddyfile"];
45
+ require_test_CTcmp4Su.globalExpect(caddyfile).toContain("opensandbox");
46
+ require_test_CTcmp4Su.globalExpect(caddyfile).toContain("flush_interval -1");
47
+ });
48
+ require_test_CTcmp4Su.it("adds flush_interval -1 for desktop-environment (KasmVNC)", () => {
49
+ const caddyfile = require_generate.generate({
50
+ ...baseInput,
51
+ services: ["desktop-environment"]
52
+ }).files["caddy/Caddyfile"];
53
+ require_test_CTcmp4Su.globalExpect(caddyfile).toContain("desktop-environment");
54
+ require_test_CTcmp4Su.globalExpect(caddyfile).toContain("flush_interval -1");
55
+ });
56
+ require_test_CTcmp4Su.it("adds flush_interval -1 for agent-browser viewport streaming port", () => {
57
+ const caddyfile = require_generate.generate({
58
+ ...baseInput,
59
+ services: ["agent-browser"]
60
+ }).files["caddy/Caddyfile"];
61
+ require_test_CTcmp4Su.globalExpect(caddyfile).toContain("agent-browser");
62
+ require_test_CTcmp4Su.globalExpect(caddyfile).toContain("flush_interval -1");
63
+ });
64
+ require_test_CTcmp4Su.it("does NOT add flush_interval for non-WebSocket services", () => {
65
+ const caddyfile = require_generate.generate(baseInput).files["caddy/Caddyfile"];
66
+ require_test_CTcmp4Su.globalExpect(caddyfile).not.toContain("flush_interval");
67
+ });
40
68
  });
41
69
  //#endregion
42
70
 
@@ -1 +1 @@
1
- {"version":3,"file":"caddy.test.cjs","names":["describe","generate"],"sources":["../../src/generators/caddy.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { generate } from \"../generate.js\";\n\ndescribe(\"generateCaddyfile (via generate)\", () => {\n\tconst baseInput = {\n\t\tprojectName: \"caddy-test\",\n\t\tservices: [\"redis\", \"n8n\"],\n\t\tskillPacks: [] as string[],\n\t\tproxy: \"caddy\" as const,\n\t\tdomain: \"example.com\",\n\t\tgpu: false,\n\t\tplatform: \"linux/amd64\" as const,\n\t\tdeployment: \"local\" as const,\n\t\tgenerateSecrets: true,\n\t\topenclawVersion: \"latest\",\n\t};\n\n\tit(\"generates Caddyfile when proxy is caddy\", () => {\n\t\tconst result = generate(baseInput);\n\n\t\texpect(result.files).toHaveProperty(\"caddy/Caddyfile\");\n\t\texpect(result.files[\"caddy/Caddyfile\"]!.length).toBeGreaterThan(0);\n\t});\n\n\tit(\"does not generate Caddyfile when proxy is none\", () => {\n\t\tconst result = generate({\n\t\t\t...baseInput,\n\t\t\tproxy: \"none\",\n\t\t});\n\n\t\texpect(result.files).not.toHaveProperty(\"caddy/Caddyfile\");\n\t});\n\n\tit(\"Caddyfile contains the domain\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\texpect(caddyfile).toContain(\"example.com\");\n\t});\n\n\tit(\"Caddyfile includes reverse proxy directives for services with exposed ports\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\t// Should reference n8n since it has exposed ports\n\t\texpect(caddyfile).toContain(\"n8n\");\n\t});\n\n\tit(\"Caddyfile includes TLS configuration\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\t// Caddy auto-enables TLS, so should reference HTTPS or TLS\n\t\texpect(caddyfile.length).toBeGreaterThan(50);\n\t});\n});\n"],"mappings":";;;AAGAA,sBAAAA,SAAS,0CAA0C;CAClD,MAAM,YAAY;EACjB,aAAa;EACb,UAAU,CAAC,SAAS,MAAM;EAC1B,YAAY,EAAE;EACd,OAAO;EACP,QAAQ;EACR,KAAK;EACL,UAAU;EACV,YAAY;EACZ,iBAAiB;EACjB,iBAAiB;EACjB;AAED,uBAAA,GAAG,iDAAiD;EACnD,MAAM,SAASC,iBAAAA,SAAS,UAAU;AAElC,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,kBAAkB;AACtD,wBAAA,aAAO,OAAO,MAAM,mBAAoB,OAAO,CAAC,gBAAgB,EAAE;GACjE;AAEF,uBAAA,GAAG,wDAAwD;AAM1D,wBAAA,aALeA,iBAAAA,SAAS;GACvB,GAAG;GACH,OAAO;GACP,CAAC,CAEY,MAAM,CAAC,IAAI,eAAe,kBAAkB;GACzD;AAEF,uBAAA,GAAG,uCAAuC;EAEzC,MAAM,YADSA,iBAAAA,SAAS,UAAU,CACT,MAAM;AAE/B,wBAAA,aAAO,UAAU,CAAC,UAAU,cAAc;GACzC;AAEF,uBAAA,GAAG,qFAAqF;EAEvF,MAAM,YADSA,iBAAAA,SAAS,UAAU,CACT,MAAM;AAG/B,wBAAA,aAAO,UAAU,CAAC,UAAU,MAAM;GACjC;AAEF,uBAAA,GAAG,8CAA8C;EAEhD,MAAM,YADSA,iBAAAA,SAAS,UAAU,CACT,MAAM;AAG/B,wBAAA,aAAO,UAAU,OAAO,CAAC,gBAAgB,GAAG;GAC3C;EACD"}
1
+ {"version":3,"file":"caddy.test.cjs","names":["describe","generate"],"sources":["../../src/generators/caddy.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { generate } from \"../generate.js\";\n\ndescribe(\"generateCaddyfile (via generate)\", () => {\n\tconst baseInput = {\n\t\tprojectName: \"caddy-test\",\n\t\tservices: [\"redis\", \"n8n\"],\n\t\tskillPacks: [] as string[],\n\t\tproxy: \"caddy\" as const,\n\t\tdomain: \"example.com\",\n\t\tgpu: false,\n\t\tplatform: \"linux/amd64\" as const,\n\t\tdeployment: \"local\" as const,\n\t\tgenerateSecrets: true,\n\t\topenclawVersion: \"latest\",\n\t};\n\n\tit(\"generates Caddyfile when proxy is caddy\", () => {\n\t\tconst result = generate(baseInput);\n\n\t\texpect(result.files).toHaveProperty(\"caddy/Caddyfile\");\n\t\texpect(result.files[\"caddy/Caddyfile\"]?.length).toBeGreaterThan(0);\n\t});\n\n\tit(\"does not generate Caddyfile when proxy is none\", () => {\n\t\tconst result = generate({\n\t\t\t...baseInput,\n\t\t\tproxy: \"none\",\n\t\t});\n\n\t\texpect(result.files).not.toHaveProperty(\"caddy/Caddyfile\");\n\t});\n\n\tit(\"Caddyfile contains the domain\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\texpect(caddyfile).toContain(\"example.com\");\n\t});\n\n\tit(\"Caddyfile includes reverse proxy directives for services with exposed ports\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\t// Should reference n8n since it has exposed ports\n\t\texpect(caddyfile).toContain(\"n8n\");\n\t});\n\n\tit(\"Caddyfile includes TLS configuration\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\t// Caddy auto-enables TLS, so should reference HTTPS or TLS\n\t\texpect(caddyfile.length).toBeGreaterThan(50);\n\t});\n\n\tit(\"adds flush_interval -1 for WebSocket-enabled services (opensandbox)\", () => {\n\t\tconst result = generate({\n\t\t\t...baseInput,\n\t\t\tservices: [\"opensandbox\"],\n\t\t});\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\texpect(caddyfile).toContain(\"opensandbox\");\n\t\texpect(caddyfile).toContain(\"flush_interval -1\");\n\t});\n\n\tit(\"adds flush_interval -1 for desktop-environment (KasmVNC)\", () => {\n\t\tconst result = generate({\n\t\t\t...baseInput,\n\t\t\tservices: [\"desktop-environment\"],\n\t\t});\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\texpect(caddyfile).toContain(\"desktop-environment\");\n\t\texpect(caddyfile).toContain(\"flush_interval -1\");\n\t});\n\n\tit(\"adds flush_interval -1 for agent-browser viewport streaming port\", () => {\n\t\tconst result = generate({\n\t\t\t...baseInput,\n\t\t\tservices: [\"agent-browser\"],\n\t\t});\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\texpect(caddyfile).toContain(\"agent-browser\");\n\t\texpect(caddyfile).toContain(\"flush_interval -1\");\n\t});\n\n\tit(\"does NOT add flush_interval for non-WebSocket services\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\texpect(caddyfile).not.toContain(\"flush_interval\");\n\t});\n});\n"],"mappings":";;;AAGAA,sBAAAA,SAAS,0CAA0C;CAClD,MAAM,YAAY;EACjB,aAAa;EACb,UAAU,CAAC,SAAS,MAAM;EAC1B,YAAY,EAAE;EACd,OAAO;EACP,QAAQ;EACR,KAAK;EACL,UAAU;EACV,YAAY;EACZ,iBAAiB;EACjB,iBAAiB;EACjB;AAED,uBAAA,GAAG,iDAAiD;EACnD,MAAM,SAASC,iBAAAA,SAAS,UAAU;AAElC,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,kBAAkB;AACtD,wBAAA,aAAO,OAAO,MAAM,oBAAoB,OAAO,CAAC,gBAAgB,EAAE;GACjE;AAEF,uBAAA,GAAG,wDAAwD;AAM1D,wBAAA,aALeA,iBAAAA,SAAS;GACvB,GAAG;GACH,OAAO;GACP,CAAC,CAEY,MAAM,CAAC,IAAI,eAAe,kBAAkB;GACzD;AAEF,uBAAA,GAAG,uCAAuC;EAEzC,MAAM,YADSA,iBAAAA,SAAS,UAAU,CACT,MAAM;AAE/B,wBAAA,aAAO,UAAU,CAAC,UAAU,cAAc;GACzC;AAEF,uBAAA,GAAG,qFAAqF;EAEvF,MAAM,YADSA,iBAAAA,SAAS,UAAU,CACT,MAAM;AAG/B,wBAAA,aAAO,UAAU,CAAC,UAAU,MAAM;GACjC;AAEF,uBAAA,GAAG,8CAA8C;EAEhD,MAAM,YADSA,iBAAAA,SAAS,UAAU,CACT,MAAM;AAG/B,wBAAA,aAAO,UAAU,OAAO,CAAC,gBAAgB,GAAG;GAC3C;AAEF,uBAAA,GAAG,6EAA6E;EAK/E,MAAM,YAJSA,iBAAAA,SAAS;GACvB,GAAG;GACH,UAAU,CAAC,cAAc;GACzB,CAAC,CACuB,MAAM;AAE/B,wBAAA,aAAO,UAAU,CAAC,UAAU,cAAc;AAC1C,wBAAA,aAAO,UAAU,CAAC,UAAU,oBAAoB;GAC/C;AAEF,uBAAA,GAAG,kEAAkE;EAKpE,MAAM,YAJSA,iBAAAA,SAAS;GACvB,GAAG;GACH,UAAU,CAAC,sBAAsB;GACjC,CAAC,CACuB,MAAM;AAE/B,wBAAA,aAAO,UAAU,CAAC,UAAU,sBAAsB;AAClD,wBAAA,aAAO,UAAU,CAAC,UAAU,oBAAoB;GAC/C;AAEF,uBAAA,GAAG,0EAA0E;EAK5E,MAAM,YAJSA,iBAAAA,SAAS;GACvB,GAAG;GACH,UAAU,CAAC,gBAAgB;GAC3B,CAAC,CACuB,MAAM;AAE/B,wBAAA,aAAO,UAAU,CAAC,UAAU,gBAAgB;AAC5C,wBAAA,aAAO,UAAU,CAAC,UAAU,oBAAoB;GAC/C;AAEF,uBAAA,GAAG,gEAAgE;EAElE,MAAM,YADSA,iBAAAA,SAAS,UAAU,CACT,MAAM;AAE/B,wBAAA,aAAO,UAAU,CAAC,IAAI,UAAU,iBAAiB;GAChD;EACD"}
@@ -1,4 +1,4 @@
1
- import { n as describe, r as it, t as globalExpect } from "../test.CTcmp4Su-ClCHJ3FA.mjs";
1
+ import { a as describe, o as it, t as globalExpect } from "../test.CTcmp4Su-BRa7-bTj.mjs";
2
2
  import { generate } from "../generate.mjs";
3
3
  //#region src/generators/caddy.test.ts
4
4
  describe("generateCaddyfile (via generate)", () => {
@@ -17,7 +17,7 @@ describe("generateCaddyfile (via generate)", () => {
17
17
  it("generates Caddyfile when proxy is caddy", () => {
18
18
  const result = generate(baseInput);
19
19
  globalExpect(result.files).toHaveProperty("caddy/Caddyfile");
20
- globalExpect(result.files["caddy/Caddyfile"].length).toBeGreaterThan(0);
20
+ globalExpect(result.files["caddy/Caddyfile"]?.length).toBeGreaterThan(0);
21
21
  });
22
22
  it("does not generate Caddyfile when proxy is none", () => {
23
23
  globalExpect(generate({
@@ -37,6 +37,34 @@ describe("generateCaddyfile (via generate)", () => {
37
37
  const caddyfile = generate(baseInput).files["caddy/Caddyfile"];
38
38
  globalExpect(caddyfile.length).toBeGreaterThan(50);
39
39
  });
40
+ it("adds flush_interval -1 for WebSocket-enabled services (opensandbox)", () => {
41
+ const caddyfile = generate({
42
+ ...baseInput,
43
+ services: ["opensandbox"]
44
+ }).files["caddy/Caddyfile"];
45
+ globalExpect(caddyfile).toContain("opensandbox");
46
+ globalExpect(caddyfile).toContain("flush_interval -1");
47
+ });
48
+ it("adds flush_interval -1 for desktop-environment (KasmVNC)", () => {
49
+ const caddyfile = generate({
50
+ ...baseInput,
51
+ services: ["desktop-environment"]
52
+ }).files["caddy/Caddyfile"];
53
+ globalExpect(caddyfile).toContain("desktop-environment");
54
+ globalExpect(caddyfile).toContain("flush_interval -1");
55
+ });
56
+ it("adds flush_interval -1 for agent-browser viewport streaming port", () => {
57
+ const caddyfile = generate({
58
+ ...baseInput,
59
+ services: ["agent-browser"]
60
+ }).files["caddy/Caddyfile"];
61
+ globalExpect(caddyfile).toContain("agent-browser");
62
+ globalExpect(caddyfile).toContain("flush_interval -1");
63
+ });
64
+ it("does NOT add flush_interval for non-WebSocket services", () => {
65
+ const caddyfile = generate(baseInput).files["caddy/Caddyfile"];
66
+ globalExpect(caddyfile).not.toContain("flush_interval");
67
+ });
40
68
  });
41
69
  //#endregion
42
70
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"caddy.test.mjs","names":[],"sources":["../../src/generators/caddy.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { generate } from \"../generate.js\";\n\ndescribe(\"generateCaddyfile (via generate)\", () => {\n\tconst baseInput = {\n\t\tprojectName: \"caddy-test\",\n\t\tservices: [\"redis\", \"n8n\"],\n\t\tskillPacks: [] as string[],\n\t\tproxy: \"caddy\" as const,\n\t\tdomain: \"example.com\",\n\t\tgpu: false,\n\t\tplatform: \"linux/amd64\" as const,\n\t\tdeployment: \"local\" as const,\n\t\tgenerateSecrets: true,\n\t\topenclawVersion: \"latest\",\n\t};\n\n\tit(\"generates Caddyfile when proxy is caddy\", () => {\n\t\tconst result = generate(baseInput);\n\n\t\texpect(result.files).toHaveProperty(\"caddy/Caddyfile\");\n\t\texpect(result.files[\"caddy/Caddyfile\"]!.length).toBeGreaterThan(0);\n\t});\n\n\tit(\"does not generate Caddyfile when proxy is none\", () => {\n\t\tconst result = generate({\n\t\t\t...baseInput,\n\t\t\tproxy: \"none\",\n\t\t});\n\n\t\texpect(result.files).not.toHaveProperty(\"caddy/Caddyfile\");\n\t});\n\n\tit(\"Caddyfile contains the domain\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\texpect(caddyfile).toContain(\"example.com\");\n\t});\n\n\tit(\"Caddyfile includes reverse proxy directives for services with exposed ports\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\t// Should reference n8n since it has exposed ports\n\t\texpect(caddyfile).toContain(\"n8n\");\n\t});\n\n\tit(\"Caddyfile includes TLS configuration\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\t// Caddy auto-enables TLS, so should reference HTTPS or TLS\n\t\texpect(caddyfile.length).toBeGreaterThan(50);\n\t});\n});\n"],"mappings":";;;AAGA,SAAS,0CAA0C;CAClD,MAAM,YAAY;EACjB,aAAa;EACb,UAAU,CAAC,SAAS,MAAM;EAC1B,YAAY,EAAE;EACd,OAAO;EACP,QAAQ;EACR,KAAK;EACL,UAAU;EACV,YAAY;EACZ,iBAAiB;EACjB,iBAAiB;EACjB;AAED,IAAG,iDAAiD;EACnD,MAAM,SAAS,SAAS,UAAU;AAElC,eAAO,OAAO,MAAM,CAAC,eAAe,kBAAkB;AACtD,eAAO,OAAO,MAAM,mBAAoB,OAAO,CAAC,gBAAgB,EAAE;GACjE;AAEF,IAAG,wDAAwD;AAM1D,eALe,SAAS;GACvB,GAAG;GACH,OAAO;GACP,CAAC,CAEY,MAAM,CAAC,IAAI,eAAe,kBAAkB;GACzD;AAEF,IAAG,uCAAuC;EAEzC,MAAM,YADS,SAAS,UAAU,CACT,MAAM;AAE/B,eAAO,UAAU,CAAC,UAAU,cAAc;GACzC;AAEF,IAAG,qFAAqF;EAEvF,MAAM,YADS,SAAS,UAAU,CACT,MAAM;AAG/B,eAAO,UAAU,CAAC,UAAU,MAAM;GACjC;AAEF,IAAG,8CAA8C;EAEhD,MAAM,YADS,SAAS,UAAU,CACT,MAAM;AAG/B,eAAO,UAAU,OAAO,CAAC,gBAAgB,GAAG;GAC3C;EACD"}
1
+ {"version":3,"file":"caddy.test.mjs","names":[],"sources":["../../src/generators/caddy.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { generate } from \"../generate.js\";\n\ndescribe(\"generateCaddyfile (via generate)\", () => {\n\tconst baseInput = {\n\t\tprojectName: \"caddy-test\",\n\t\tservices: [\"redis\", \"n8n\"],\n\t\tskillPacks: [] as string[],\n\t\tproxy: \"caddy\" as const,\n\t\tdomain: \"example.com\",\n\t\tgpu: false,\n\t\tplatform: \"linux/amd64\" as const,\n\t\tdeployment: \"local\" as const,\n\t\tgenerateSecrets: true,\n\t\topenclawVersion: \"latest\",\n\t};\n\n\tit(\"generates Caddyfile when proxy is caddy\", () => {\n\t\tconst result = generate(baseInput);\n\n\t\texpect(result.files).toHaveProperty(\"caddy/Caddyfile\");\n\t\texpect(result.files[\"caddy/Caddyfile\"]?.length).toBeGreaterThan(0);\n\t});\n\n\tit(\"does not generate Caddyfile when proxy is none\", () => {\n\t\tconst result = generate({\n\t\t\t...baseInput,\n\t\t\tproxy: \"none\",\n\t\t});\n\n\t\texpect(result.files).not.toHaveProperty(\"caddy/Caddyfile\");\n\t});\n\n\tit(\"Caddyfile contains the domain\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\texpect(caddyfile).toContain(\"example.com\");\n\t});\n\n\tit(\"Caddyfile includes reverse proxy directives for services with exposed ports\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\t// Should reference n8n since it has exposed ports\n\t\texpect(caddyfile).toContain(\"n8n\");\n\t});\n\n\tit(\"Caddyfile includes TLS configuration\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\t// Caddy auto-enables TLS, so should reference HTTPS or TLS\n\t\texpect(caddyfile.length).toBeGreaterThan(50);\n\t});\n\n\tit(\"adds flush_interval -1 for WebSocket-enabled services (opensandbox)\", () => {\n\t\tconst result = generate({\n\t\t\t...baseInput,\n\t\t\tservices: [\"opensandbox\"],\n\t\t});\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\texpect(caddyfile).toContain(\"opensandbox\");\n\t\texpect(caddyfile).toContain(\"flush_interval -1\");\n\t});\n\n\tit(\"adds flush_interval -1 for desktop-environment (KasmVNC)\", () => {\n\t\tconst result = generate({\n\t\t\t...baseInput,\n\t\t\tservices: [\"desktop-environment\"],\n\t\t});\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\texpect(caddyfile).toContain(\"desktop-environment\");\n\t\texpect(caddyfile).toContain(\"flush_interval -1\");\n\t});\n\n\tit(\"adds flush_interval -1 for agent-browser viewport streaming port\", () => {\n\t\tconst result = generate({\n\t\t\t...baseInput,\n\t\t\tservices: [\"agent-browser\"],\n\t\t});\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\texpect(caddyfile).toContain(\"agent-browser\");\n\t\texpect(caddyfile).toContain(\"flush_interval -1\");\n\t});\n\n\tit(\"does NOT add flush_interval for non-WebSocket services\", () => {\n\t\tconst result = generate(baseInput);\n\t\tconst caddyfile = result.files[\"caddy/Caddyfile\"]!;\n\n\t\texpect(caddyfile).not.toContain(\"flush_interval\");\n\t});\n});\n"],"mappings":";;;AAGA,SAAS,0CAA0C;CAClD,MAAM,YAAY;EACjB,aAAa;EACb,UAAU,CAAC,SAAS,MAAM;EAC1B,YAAY,EAAE;EACd,OAAO;EACP,QAAQ;EACR,KAAK;EACL,UAAU;EACV,YAAY;EACZ,iBAAiB;EACjB,iBAAiB;EACjB;AAED,IAAG,iDAAiD;EACnD,MAAM,SAAS,SAAS,UAAU;AAElC,eAAO,OAAO,MAAM,CAAC,eAAe,kBAAkB;AACtD,eAAO,OAAO,MAAM,oBAAoB,OAAO,CAAC,gBAAgB,EAAE;GACjE;AAEF,IAAG,wDAAwD;AAM1D,eALe,SAAS;GACvB,GAAG;GACH,OAAO;GACP,CAAC,CAEY,MAAM,CAAC,IAAI,eAAe,kBAAkB;GACzD;AAEF,IAAG,uCAAuC;EAEzC,MAAM,YADS,SAAS,UAAU,CACT,MAAM;AAE/B,eAAO,UAAU,CAAC,UAAU,cAAc;GACzC;AAEF,IAAG,qFAAqF;EAEvF,MAAM,YADS,SAAS,UAAU,CACT,MAAM;AAG/B,eAAO,UAAU,CAAC,UAAU,MAAM;GACjC;AAEF,IAAG,8CAA8C;EAEhD,MAAM,YADS,SAAS,UAAU,CACT,MAAM;AAG/B,eAAO,UAAU,OAAO,CAAC,gBAAgB,GAAG;GAC3C;AAEF,IAAG,6EAA6E;EAK/E,MAAM,YAJS,SAAS;GACvB,GAAG;GACH,UAAU,CAAC,cAAc;GACzB,CAAC,CACuB,MAAM;AAE/B,eAAO,UAAU,CAAC,UAAU,cAAc;AAC1C,eAAO,UAAU,CAAC,UAAU,oBAAoB;GAC/C;AAEF,IAAG,kEAAkE;EAKpE,MAAM,YAJS,SAAS;GACvB,GAAG;GACH,UAAU,CAAC,sBAAsB;GACjC,CAAC,CACuB,MAAM;AAE/B,eAAO,UAAU,CAAC,UAAU,sBAA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