@better-openclaw/core 1.0.21 → 1.0.22

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 (958) hide show
  1. package/dist/bare-metal-partition.cjs +2 -3
  2. package/dist/bare-metal-partition.cjs.map +1 -1
  3. package/dist/bare-metal-partition.d.mts.map +1 -1
  4. package/dist/bare-metal-partition.mjs +1 -1
  5. package/dist/bare-metal-partition.test.cjs +4 -5
  6. package/dist/bare-metal-partition.test.cjs.map +1 -1
  7. package/dist/bare-metal-partition.test.mjs +3 -4
  8. package/dist/bare-metal-partition.test.mjs.map +1 -1
  9. package/dist/compose-validation.test.cjs +5 -6
  10. package/dist/compose-validation.test.cjs.map +1 -1
  11. package/dist/compose-validation.test.mjs +2 -3
  12. package/dist/compose-validation.test.mjs.map +1 -1
  13. package/dist/composer.cjs +4 -5
  14. package/dist/composer.cjs.map +1 -1
  15. package/dist/composer.d.mts.map +1 -1
  16. package/dist/composer.mjs +1 -2
  17. package/dist/composer.mjs.map +1 -1
  18. package/dist/composer.snapshot.test.cjs +4 -5
  19. package/dist/composer.snapshot.test.cjs.map +1 -1
  20. package/dist/composer.snapshot.test.mjs +3 -4
  21. package/dist/composer.snapshot.test.mjs.map +1 -1
  22. package/dist/composer.test.cjs +5 -6
  23. package/dist/composer.test.cjs.map +1 -1
  24. package/dist/composer.test.mjs +3 -4
  25. package/dist/composer.test.mjs.map +1 -1
  26. package/dist/coolify-BVGGcMrT.d.mts +18 -0
  27. package/dist/coolify-BVGGcMrT.d.mts.map +1 -0
  28. package/dist/coolify-vlb1G9V2.d.cts +18 -0
  29. package/dist/coolify-vlb1G9V2.d.cts.map +1 -0
  30. package/dist/deployers/coolify.cjs +3 -4
  31. package/dist/deployers/coolify.cjs.map +1 -1
  32. package/dist/deployers/coolify.d.cts +2 -18
  33. package/dist/deployers/coolify.d.mts +2 -18
  34. package/dist/deployers/coolify.mjs +1 -2
  35. package/dist/deployers/coolify.mjs.map +1 -1
  36. package/dist/deployers/dokploy.cjs +3 -4
  37. package/dist/deployers/dokploy.cjs.map +1 -1
  38. package/dist/deployers/dokploy.d.cts +2 -25
  39. package/dist/deployers/dokploy.d.mts +2 -25
  40. package/dist/deployers/dokploy.mjs +1 -2
  41. package/dist/deployers/dokploy.mjs.map +1 -1
  42. package/dist/deployers/index.cjs +4 -5
  43. package/dist/deployers/index.cjs.map +1 -1
  44. package/dist/deployers/index.d.cts +3 -3
  45. package/dist/deployers/index.d.mts +3 -3
  46. package/dist/deployers/index.mjs +1 -2
  47. package/dist/deployers/index.mjs.map +1 -1
  48. package/dist/deployers/strip-host-ports.cjs +3 -4
  49. package/dist/deployers/strip-host-ports.cjs.map +1 -1
  50. package/dist/deployers/strip-host-ports.mjs +1 -2
  51. package/dist/deployers/strip-host-ports.mjs.map +1 -1
  52. package/dist/deployers/strip-host-ports.test.cjs +3 -4
  53. package/dist/deployers/strip-host-ports.test.cjs.map +1 -1
  54. package/dist/deployers/strip-host-ports.test.mjs +3 -4
  55. package/dist/deployers/strip-host-ports.test.mjs.map +1 -1
  56. package/dist/deployers/types.d.cts +2 -243
  57. package/dist/deployers/types.d.mts +2 -243
  58. package/dist/deployers/types.mjs +1 -1
  59. package/dist/dokploy-8cbrxUun.d.cts +25 -0
  60. package/dist/dokploy-8cbrxUun.d.cts.map +1 -0
  61. package/dist/dokploy-BTflLhTM.d.mts +25 -0
  62. package/dist/dokploy-BTflLhTM.d.mts.map +1 -0
  63. package/dist/errors.cjs +2 -3
  64. package/dist/errors.cjs.map +1 -1
  65. package/dist/errors.mjs +1 -1
  66. package/dist/errors.mjs.map +1 -1
  67. package/dist/generate.cjs +27 -28
  68. package/dist/generate.cjs.map +1 -1
  69. package/dist/generate.d.mts.map +1 -1
  70. package/dist/generate.mjs +1 -2
  71. package/dist/generate.mjs.map +1 -1
  72. package/dist/generate.test.cjs +4 -5
  73. package/dist/generate.test.cjs.map +1 -1
  74. package/dist/generate.test.mjs +3 -4
  75. package/dist/generate.test.mjs.map +1 -1
  76. package/dist/generators/bare-metal-install.cjs +2 -3
  77. package/dist/generators/bare-metal-install.cjs.map +1 -1
  78. package/dist/generators/bare-metal-install.d.mts.map +1 -1
  79. package/dist/generators/bare-metal-install.mjs +1 -1
  80. package/dist/generators/bare-metal-install.test.cjs +3 -4
  81. package/dist/generators/bare-metal-install.test.cjs.map +1 -1
  82. package/dist/generators/bare-metal-install.test.mjs +3 -4
  83. package/dist/generators/bare-metal-install.test.mjs.map +1 -1
  84. package/dist/generators/caddy.cjs +2 -3
  85. package/dist/generators/caddy.cjs.map +1 -1
  86. package/dist/generators/caddy.d.mts.map +1 -1
  87. package/dist/generators/caddy.mjs +1 -1
  88. package/dist/generators/caddy.test.cjs +3 -4
  89. package/dist/generators/caddy.test.cjs.map +1 -1
  90. package/dist/generators/caddy.test.mjs +3 -4
  91. package/dist/generators/caddy.test.mjs.map +1 -1
  92. package/dist/generators/cloud-init.cjs +2 -3
  93. package/dist/generators/cloud-init.cjs.map +1 -1
  94. package/dist/generators/cloud-init.mjs +1 -1
  95. package/dist/generators/env.cjs +4 -5
  96. package/dist/generators/env.cjs.map +1 -1
  97. package/dist/generators/env.d.mts.map +1 -1
  98. package/dist/generators/env.mjs +1 -2
  99. package/dist/generators/env.mjs.map +1 -1
  100. package/dist/generators/env.test.cjs +3 -4
  101. package/dist/generators/env.test.cjs.map +1 -1
  102. package/dist/generators/env.test.mjs +3 -4
  103. package/dist/generators/env.test.mjs.map +1 -1
  104. package/dist/generators/get-shit-done.cjs +2 -3
  105. package/dist/generators/get-shit-done.cjs.map +1 -1
  106. package/dist/generators/get-shit-done.mjs +1 -1
  107. package/dist/generators/grafana.cjs +2 -3
  108. package/dist/generators/grafana.cjs.map +1 -1
  109. package/dist/generators/grafana.mjs +1 -1
  110. package/dist/generators/health-check.cjs +2 -3
  111. package/dist/generators/health-check.cjs.map +1 -1
  112. package/dist/generators/health-check.d.mts.map +1 -1
  113. package/dist/generators/health-check.mjs +1 -1
  114. package/dist/generators/health-check.test.cjs +3 -4
  115. package/dist/generators/health-check.test.cjs.map +1 -1
  116. package/dist/generators/health-check.test.mjs +3 -4
  117. package/dist/generators/health-check.test.mjs.map +1 -1
  118. package/dist/generators/n8n-workflows.cjs +2 -3
  119. package/dist/generators/n8n-workflows.cjs.map +1 -1
  120. package/dist/generators/n8n-workflows.d.mts.map +1 -1
  121. package/dist/generators/n8n-workflows.mjs +1 -1
  122. package/dist/generators/native-services.cjs +2 -3
  123. package/dist/generators/native-services.cjs.map +1 -1
  124. package/dist/generators/native-services.mjs +1 -1
  125. package/dist/generators/openclaw-install-script.cjs +2 -3
  126. package/dist/generators/openclaw-install-script.cjs.map +1 -1
  127. package/dist/generators/openclaw-install-script.mjs +1 -1
  128. package/dist/generators/openclaw-json.cjs +2 -3
  129. package/dist/generators/openclaw-json.cjs.map +1 -1
  130. package/dist/generators/openclaw-json.mjs +1 -1
  131. package/dist/generators/postgres-init.cjs +32 -3
  132. package/dist/generators/postgres-init.cjs.map +1 -1
  133. package/dist/generators/postgres-init.d.cts.map +1 -1
  134. package/dist/generators/postgres-init.d.mts.map +1 -1
  135. package/dist/generators/postgres-init.mjs +31 -1
  136. package/dist/generators/postgres-init.mjs.map +1 -1
  137. package/dist/generators/prometheus.cjs +2 -3
  138. package/dist/generators/prometheus.cjs.map +1 -1
  139. package/dist/generators/prometheus.d.mts.map +1 -1
  140. package/dist/generators/prometheus.mjs +1 -1
  141. package/dist/generators/readme.cjs +2 -3
  142. package/dist/generators/readme.cjs.map +1 -1
  143. package/dist/generators/readme.d.mts.map +1 -1
  144. package/dist/generators/readme.mjs +1 -1
  145. package/dist/generators/scripts.cjs +2 -3
  146. package/dist/generators/scripts.cjs.map +1 -1
  147. package/dist/generators/scripts.mjs +1 -1
  148. package/dist/generators/scripts.test.cjs +3 -4
  149. package/dist/generators/scripts.test.cjs.map +1 -1
  150. package/dist/generators/scripts.test.mjs +3 -4
  151. package/dist/generators/scripts.test.mjs.map +1 -1
  152. package/dist/generators/skills.cjs +3 -590
  153. package/dist/generators/skills.d.mts.map +1 -1
  154. package/dist/generators/skills.mjs +1 -2
  155. package/dist/generators/skills.mjs.map +1 -1
  156. package/dist/generators/stack-manifest.cjs +2 -3
  157. package/dist/generators/stack-manifest.cjs.map +1 -1
  158. package/dist/generators/stack-manifest.mjs +1 -1
  159. package/dist/generators/traefik.cjs +2 -3
  160. package/dist/generators/traefik.cjs.map +1 -1
  161. package/dist/generators/traefik.mjs +1 -1
  162. package/dist/generators/traefik.test.cjs +4 -5
  163. package/dist/generators/traefik.test.cjs.map +1 -1
  164. package/dist/generators/traefik.test.mjs +3 -4
  165. package/dist/generators/traefik.test.mjs.map +1 -1
  166. package/dist/index.cjs +35 -36
  167. package/dist/index.d.cts +4 -4
  168. package/dist/index.d.mts +4 -4
  169. package/dist/index.mjs +2 -3
  170. package/dist/{magic-string.es-D2agHT3I.cjs → magic-string.es-CJq41xdM.cjs} +2 -4
  171. package/dist/{magic-string.es-CfFonO_S.mjs.map → magic-string.es-CJq41xdM.cjs.map} +1 -1
  172. package/dist/{magic-string.es-CfFonO_S.mjs → magic-string.es-CoDyF8pj.mjs} +2 -3
  173. package/dist/{magic-string.es-D2agHT3I.cjs.map → magic-string.es-CoDyF8pj.mjs.map} +1 -1
  174. package/dist/migrations.cjs +5 -6
  175. package/dist/migrations.cjs.map +1 -1
  176. package/dist/migrations.mjs +4 -4
  177. package/dist/migrations.mjs.map +1 -1
  178. package/dist/migrations.test.cjs +6 -7
  179. package/dist/migrations.test.cjs.map +1 -1
  180. package/dist/migrations.test.mjs +7 -8
  181. package/dist/migrations.test.mjs.map +1 -1
  182. package/dist/port-scanner.cjs +2 -3
  183. package/dist/port-scanner.cjs.map +1 -1
  184. package/dist/port-scanner.d.mts.map +1 -1
  185. package/dist/port-scanner.mjs +1 -1
  186. package/dist/presets/presets.test.cjs +11 -8
  187. package/dist/presets/presets.test.cjs.map +1 -1
  188. package/dist/presets/presets.test.mjs +7 -4
  189. package/dist/presets/presets.test.mjs.map +1 -1
  190. package/dist/presets/registry.cjs +152 -3
  191. package/dist/presets/registry.cjs.map +1 -1
  192. package/dist/presets/registry.d.cts.map +1 -1
  193. package/dist/presets/registry.d.mts.map +1 -1
  194. package/dist/presets/registry.mjs +151 -1
  195. package/dist/presets/registry.mjs.map +1 -1
  196. package/dist/presets/registry.test.cjs +3 -4
  197. package/dist/presets/registry.test.cjs.map +1 -1
  198. package/dist/presets/registry.test.mjs +3 -4
  199. package/dist/presets/registry.test.mjs.map +1 -1
  200. package/dist/resolver.cjs +4 -5
  201. package/dist/resolver.cjs.map +1 -1
  202. package/dist/resolver.d.mts.map +1 -1
  203. package/dist/resolver.mjs +1 -2
  204. package/dist/resolver.mjs.map +1 -1
  205. package/dist/resolver.test.cjs +3 -4
  206. package/dist/resolver.test.cjs.map +1 -1
  207. package/dist/resolver.test.mjs +3 -4
  208. package/dist/resolver.test.mjs.map +1 -1
  209. package/dist/schema-C_hc7e4k.d.cts +898 -0
  210. package/dist/schema-C_hc7e4k.d.cts.map +1 -0
  211. package/dist/schema-CaesJaS2.d.mts +898 -0
  212. package/dist/schema-CaesJaS2.d.mts.map +1 -0
  213. package/dist/schema.cjs +15 -5
  214. package/dist/schema.cjs.map +1 -1
  215. package/dist/schema.d.cts +2 -854
  216. package/dist/schema.d.mts +2 -854
  217. package/dist/schema.mjs +13 -3
  218. package/dist/schema.mjs.map +1 -1
  219. package/dist/schema.test.cjs +3 -4
  220. package/dist/schema.test.cjs.map +1 -1
  221. package/dist/schema.test.mjs +3 -4
  222. package/dist/schema.test.mjs.map +1 -1
  223. package/dist/services/definitions/airbyte.cjs +76 -0
  224. package/dist/services/definitions/airbyte.cjs.map +1 -0
  225. package/dist/services/definitions/airbyte.d.cts +7 -0
  226. package/dist/services/definitions/airbyte.d.cts.map +1 -0
  227. package/dist/services/definitions/airbyte.d.mts +7 -0
  228. package/dist/services/definitions/airbyte.d.mts.map +1 -0
  229. package/dist/services/definitions/airbyte.mjs +75 -0
  230. package/dist/services/definitions/airbyte.mjs.map +1 -0
  231. package/dist/services/definitions/airflow.cjs +109 -0
  232. package/dist/services/definitions/airflow.cjs.map +1 -0
  233. package/dist/services/definitions/airflow.d.cts +7 -0
  234. package/dist/services/definitions/airflow.d.cts.map +1 -0
  235. package/dist/services/definitions/airflow.d.mts +7 -0
  236. package/dist/services/definitions/airflow.d.mts.map +1 -0
  237. package/dist/services/definitions/airflow.mjs +108 -0
  238. package/dist/services/definitions/airflow.mjs.map +1 -0
  239. package/dist/services/definitions/anything-llm.cjs +2 -3
  240. package/dist/services/definitions/anything-llm.cjs.map +1 -1
  241. package/dist/services/definitions/anything-llm.mjs +1 -1
  242. package/dist/services/definitions/appflowy.cjs +2 -3
  243. package/dist/services/definitions/appflowy.cjs.map +1 -1
  244. package/dist/services/definitions/appflowy.mjs +1 -1
  245. package/dist/services/definitions/appwrite.cjs +190 -0
  246. package/dist/services/definitions/appwrite.cjs.map +1 -0
  247. package/dist/services/definitions/appwrite.d.cts +7 -0
  248. package/dist/services/definitions/appwrite.d.cts.map +1 -0
  249. package/dist/services/definitions/appwrite.d.mts +7 -0
  250. package/dist/services/definitions/appwrite.d.mts.map +1 -0
  251. package/dist/services/definitions/appwrite.mjs +189 -0
  252. package/dist/services/definitions/appwrite.mjs.map +1 -0
  253. package/dist/services/definitions/authelia.cjs +145 -0
  254. package/dist/services/definitions/authelia.cjs.map +1 -0
  255. package/dist/services/definitions/authelia.d.cts +7 -0
  256. package/dist/services/definitions/authelia.d.cts.map +1 -0
  257. package/dist/services/definitions/authelia.d.mts +7 -0
  258. package/dist/services/definitions/authelia.d.mts.map +1 -0
  259. package/dist/services/definitions/authelia.mjs +144 -0
  260. package/dist/services/definitions/authelia.mjs.map +1 -0
  261. package/dist/services/definitions/authentik.cjs +2 -3
  262. package/dist/services/definitions/authentik.cjs.map +1 -1
  263. package/dist/services/definitions/authentik.mjs +1 -1
  264. package/dist/services/definitions/axolotl.cjs +67 -0
  265. package/dist/services/definitions/axolotl.cjs.map +1 -0
  266. package/dist/services/definitions/axolotl.d.cts +7 -0
  267. package/dist/services/definitions/axolotl.d.cts.map +1 -0
  268. package/dist/services/definitions/axolotl.d.mts +7 -0
  269. package/dist/services/definitions/axolotl.d.mts.map +1 -0
  270. package/dist/services/definitions/axolotl.mjs +66 -0
  271. package/dist/services/definitions/axolotl.mjs.map +1 -0
  272. package/dist/services/definitions/beszel.cjs +2 -3
  273. package/dist/services/definitions/beszel.cjs.map +1 -1
  274. package/dist/services/definitions/beszel.mjs +1 -1
  275. package/dist/services/definitions/browserless.cjs +2 -3
  276. package/dist/services/definitions/browserless.cjs.map +1 -1
  277. package/dist/services/definitions/browserless.mjs +1 -1
  278. package/dist/services/definitions/caddy.cjs +2 -3
  279. package/dist/services/definitions/caddy.cjs.map +1 -1
  280. package/dist/services/definitions/caddy.mjs +1 -1
  281. package/dist/services/definitions/cal-com.cjs +2 -3
  282. package/dist/services/definitions/cal-com.cjs.map +1 -1
  283. package/dist/services/definitions/cal-com.mjs +1 -1
  284. package/dist/services/definitions/chatwoot-worker.cjs +95 -0
  285. package/dist/services/definitions/chatwoot-worker.cjs.map +1 -0
  286. package/dist/services/definitions/chatwoot-worker.d.cts +7 -0
  287. package/dist/services/definitions/chatwoot-worker.d.cts.map +1 -0
  288. package/dist/services/definitions/chatwoot-worker.d.mts +7 -0
  289. package/dist/services/definitions/chatwoot-worker.d.mts.map +1 -0
  290. package/dist/services/definitions/chatwoot-worker.mjs +94 -0
  291. package/dist/services/definitions/chatwoot-worker.mjs.map +1 -0
  292. package/dist/services/definitions/chatwoot.cjs +112 -0
  293. package/dist/services/definitions/chatwoot.cjs.map +1 -0
  294. package/dist/services/definitions/chatwoot.d.cts +7 -0
  295. package/dist/services/definitions/chatwoot.d.cts.map +1 -0
  296. package/dist/services/definitions/chatwoot.d.mts +7 -0
  297. package/dist/services/definitions/chatwoot.d.mts.map +1 -0
  298. package/dist/services/definitions/chatwoot.mjs +111 -0
  299. package/dist/services/definitions/chatwoot.mjs.map +1 -0
  300. package/dist/services/definitions/chromadb.cjs +2 -3
  301. package/dist/services/definitions/chromadb.cjs.map +1 -1
  302. package/dist/services/definitions/chromadb.mjs +1 -1
  303. package/dist/services/definitions/claude-code.cjs +2 -3
  304. package/dist/services/definitions/claude-code.cjs.map +1 -1
  305. package/dist/services/definitions/claude-code.mjs +1 -1
  306. package/dist/services/definitions/code-server.cjs +2 -3
  307. package/dist/services/definitions/code-server.cjs.map +1 -1
  308. package/dist/services/definitions/code-server.mjs +1 -1
  309. package/dist/services/definitions/codex.cjs +2 -3
  310. package/dist/services/definitions/codex.cjs.map +1 -1
  311. package/dist/services/definitions/codex.mjs +1 -1
  312. package/dist/services/definitions/comfyui.cjs +2 -3
  313. package/dist/services/definitions/comfyui.cjs.map +1 -1
  314. package/dist/services/definitions/comfyui.mjs +1 -1
  315. package/dist/services/definitions/convex-dashboard.cjs +2 -3
  316. package/dist/services/definitions/convex-dashboard.cjs.map +1 -1
  317. package/dist/services/definitions/convex-dashboard.mjs +1 -1
  318. package/dist/services/definitions/convex.cjs +2 -3
  319. package/dist/services/definitions/convex.cjs.map +1 -1
  320. package/dist/services/definitions/convex.mjs +1 -1
  321. package/dist/services/definitions/coolify.cjs +2 -3
  322. package/dist/services/definitions/coolify.cjs.map +1 -1
  323. package/dist/services/definitions/coolify.mjs +1 -1
  324. package/dist/services/definitions/crowdsec.cjs +2 -3
  325. package/dist/services/definitions/crowdsec.cjs.map +1 -1
  326. package/dist/services/definitions/crowdsec.mjs +1 -1
  327. package/dist/services/definitions/dagster.cjs +83 -0
  328. package/dist/services/definitions/dagster.cjs.map +1 -0
  329. package/dist/services/definitions/dagster.d.cts +7 -0
  330. package/dist/services/definitions/dagster.d.cts.map +1 -0
  331. package/dist/services/definitions/dagster.d.mts +7 -0
  332. package/dist/services/definitions/dagster.d.mts.map +1 -0
  333. package/dist/services/definitions/dagster.mjs +82 -0
  334. package/dist/services/definitions/dagster.mjs.map +1 -0
  335. package/dist/services/definitions/desktop-environment.cjs +2 -3
  336. package/dist/services/definitions/desktop-environment.cjs.map +1 -1
  337. package/dist/services/definitions/desktop-environment.mjs +1 -1
  338. package/dist/services/definitions/dify.cjs +2 -3
  339. package/dist/services/definitions/dify.cjs.map +1 -1
  340. package/dist/services/definitions/dify.mjs +1 -1
  341. package/dist/services/definitions/directus.cjs +115 -0
  342. package/dist/services/definitions/directus.cjs.map +1 -0
  343. package/dist/services/definitions/directus.d.cts +7 -0
  344. package/dist/services/definitions/directus.d.cts.map +1 -0
  345. package/dist/services/definitions/directus.d.mts +7 -0
  346. package/dist/services/definitions/directus.d.mts.map +1 -0
  347. package/dist/services/definitions/directus.mjs +114 -0
  348. package/dist/services/definitions/directus.mjs.map +1 -0
  349. package/dist/services/definitions/docsgpt.cjs +2 -3
  350. package/dist/services/definitions/docsgpt.cjs.map +1 -1
  351. package/dist/services/definitions/docsgpt.mjs +1 -1
  352. package/dist/services/definitions/dokploy.cjs +2 -3
  353. package/dist/services/definitions/dokploy.cjs.map +1 -1
  354. package/dist/services/definitions/dokploy.mjs +1 -1
  355. package/dist/services/definitions/dozzle.cjs +2 -3
  356. package/dist/services/definitions/dozzle.cjs.map +1 -1
  357. package/dist/services/definitions/dozzle.mjs +1 -1
  358. package/dist/services/definitions/duplicati.cjs +76 -0
  359. package/dist/services/definitions/duplicati.cjs.map +1 -0
  360. package/dist/services/definitions/duplicati.d.cts +7 -0
  361. package/dist/services/definitions/duplicati.d.cts.map +1 -0
  362. package/dist/services/definitions/duplicati.d.mts +7 -0
  363. package/dist/services/definitions/duplicati.d.mts.map +1 -0
  364. package/dist/services/definitions/duplicati.mjs +75 -0
  365. package/dist/services/definitions/duplicati.mjs.map +1 -0
  366. package/dist/services/definitions/excalidraw.cjs +48 -0
  367. package/dist/services/definitions/excalidraw.cjs.map +1 -0
  368. package/dist/services/definitions/excalidraw.d.cts +7 -0
  369. package/dist/services/definitions/excalidraw.d.cts.map +1 -0
  370. package/dist/services/definitions/excalidraw.d.mts +7 -0
  371. package/dist/services/definitions/excalidraw.d.mts.map +1 -0
  372. package/dist/services/definitions/excalidraw.mjs +47 -0
  373. package/dist/services/definitions/excalidraw.mjs.map +1 -0
  374. package/dist/services/definitions/ffmpeg.cjs +2 -3
  375. package/dist/services/definitions/ffmpeg.cjs.map +1 -1
  376. package/dist/services/definitions/ffmpeg.mjs +1 -1
  377. package/dist/services/definitions/firecrawl-playwright.cjs +61 -0
  378. package/dist/services/definitions/firecrawl-playwright.cjs.map +1 -0
  379. package/dist/services/definitions/firecrawl-playwright.d.cts +7 -0
  380. package/dist/services/definitions/firecrawl-playwright.d.cts.map +1 -0
  381. package/dist/services/definitions/firecrawl-playwright.d.mts +7 -0
  382. package/dist/services/definitions/firecrawl-playwright.d.mts.map +1 -0
  383. package/dist/services/definitions/firecrawl-playwright.mjs +60 -0
  384. package/dist/services/definitions/firecrawl-playwright.mjs.map +1 -0
  385. package/dist/services/definitions/firecrawl.cjs +163 -0
  386. package/dist/services/definitions/firecrawl.cjs.map +1 -0
  387. package/dist/services/definitions/firecrawl.d.cts +7 -0
  388. package/dist/services/definitions/firecrawl.d.cts.map +1 -0
  389. package/dist/services/definitions/firecrawl.d.mts +7 -0
  390. package/dist/services/definitions/firecrawl.d.mts.map +1 -0
  391. package/dist/services/definitions/firecrawl.mjs +162 -0
  392. package/dist/services/definitions/firecrawl.mjs.map +1 -0
  393. package/dist/services/definitions/flagsmith.cjs +77 -0
  394. package/dist/services/definitions/flagsmith.cjs.map +1 -0
  395. package/dist/services/definitions/flagsmith.d.cts +7 -0
  396. package/dist/services/definitions/flagsmith.d.cts.map +1 -0
  397. package/dist/services/definitions/flagsmith.d.mts +7 -0
  398. package/dist/services/definitions/flagsmith.d.mts.map +1 -0
  399. package/dist/services/definitions/flagsmith.mjs +76 -0
  400. package/dist/services/definitions/flagsmith.mjs.map +1 -0
  401. package/dist/services/definitions/flowise.cjs +2 -3
  402. package/dist/services/definitions/flowise.cjs.map +1 -1
  403. package/dist/services/definitions/flowise.mjs +1 -1
  404. package/dist/services/definitions/fonoster.cjs +66 -0
  405. package/dist/services/definitions/fonoster.cjs.map +1 -0
  406. package/dist/services/definitions/fonoster.d.cts +7 -0
  407. package/dist/services/definitions/fonoster.d.cts.map +1 -0
  408. package/dist/services/definitions/fonoster.d.mts +7 -0
  409. package/dist/services/definitions/fonoster.d.mts.map +1 -0
  410. package/dist/services/definitions/fonoster.mjs +65 -0
  411. package/dist/services/definitions/fonoster.mjs.map +1 -0
  412. package/dist/services/definitions/formbricks.cjs +75 -0
  413. package/dist/services/definitions/formbricks.cjs.map +1 -0
  414. package/dist/services/definitions/formbricks.d.cts +7 -0
  415. package/dist/services/definitions/formbricks.d.cts.map +1 -0
  416. package/dist/services/definitions/formbricks.d.mts +7 -0
  417. package/dist/services/definitions/formbricks.d.mts.map +1 -0
  418. package/dist/services/definitions/formbricks.mjs +74 -0
  419. package/dist/services/definitions/formbricks.mjs.map +1 -0
  420. package/dist/services/definitions/gemini-cli.cjs +2 -3
  421. package/dist/services/definitions/gemini-cli.cjs.map +1 -1
  422. package/dist/services/definitions/gemini-cli.mjs +1 -1
  423. package/dist/services/definitions/ghost.cjs +2 -3
  424. package/dist/services/definitions/ghost.cjs.map +1 -1
  425. package/dist/services/definitions/ghost.mjs +1 -1
  426. package/dist/services/definitions/gitea.cjs +2 -3
  427. package/dist/services/definitions/gitea.cjs.map +1 -1
  428. package/dist/services/definitions/gitea.mjs +1 -1
  429. package/dist/services/definitions/gotify.cjs +2 -3
  430. package/dist/services/definitions/gotify.cjs.map +1 -1
  431. package/dist/services/definitions/gotify.mjs +1 -1
  432. package/dist/services/definitions/grafana.cjs +2 -3
  433. package/dist/services/definitions/grafana.cjs.map +1 -1
  434. package/dist/services/definitions/grafana.mjs +1 -1
  435. package/dist/services/definitions/headscale.cjs +2 -3
  436. package/dist/services/definitions/headscale.cjs.map +1 -1
  437. package/dist/services/definitions/headscale.mjs +1 -1
  438. package/dist/services/definitions/hedgedoc.cjs +82 -0
  439. package/dist/services/definitions/hedgedoc.cjs.map +1 -0
  440. package/dist/services/definitions/hedgedoc.d.cts +7 -0
  441. package/dist/services/definitions/hedgedoc.d.cts.map +1 -0
  442. package/dist/services/definitions/hedgedoc.d.mts +7 -0
  443. package/dist/services/definitions/hedgedoc.d.mts.map +1 -0
  444. package/dist/services/definitions/hedgedoc.mjs +81 -0
  445. package/dist/services/definitions/hedgedoc.mjs.map +1 -0
  446. package/dist/services/definitions/hexstrike.cjs +2 -3
  447. package/dist/services/definitions/hexstrike.cjs.map +1 -1
  448. package/dist/services/definitions/hexstrike.mjs +1 -1
  449. package/dist/services/definitions/heyform.cjs +64 -0
  450. package/dist/services/definitions/heyform.cjs.map +1 -0
  451. package/dist/services/definitions/heyform.d.cts +7 -0
  452. package/dist/services/definitions/heyform.d.cts.map +1 -0
  453. package/dist/services/definitions/heyform.d.mts +7 -0
  454. package/dist/services/definitions/heyform.d.mts.map +1 -0
  455. package/dist/services/definitions/heyform.mjs +63 -0
  456. package/dist/services/definitions/heyform.mjs.map +1 -0
  457. package/dist/services/definitions/homeassistant.cjs +2 -3
  458. package/dist/services/definitions/homeassistant.cjs.map +1 -1
  459. package/dist/services/definitions/homeassistant.mjs +1 -1
  460. package/dist/services/definitions/hoppscotch.cjs +76 -0
  461. package/dist/services/definitions/hoppscotch.cjs.map +1 -0
  462. package/dist/services/definitions/hoppscotch.d.cts +7 -0
  463. package/dist/services/definitions/hoppscotch.d.cts.map +1 -0
  464. package/dist/services/definitions/hoppscotch.d.mts +7 -0
  465. package/dist/services/definitions/hoppscotch.d.mts.map +1 -0
  466. package/dist/services/definitions/hoppscotch.mjs +75 -0
  467. package/dist/services/definitions/hoppscotch.mjs.map +1 -0
  468. package/dist/services/definitions/immich.cjs +2 -3
  469. package/dist/services/definitions/immich.cjs.map +1 -1
  470. package/dist/services/definitions/immich.mjs +1 -1
  471. package/dist/services/definitions/index.cjs +220 -98
  472. package/dist/services/definitions/index.cjs.map +1 -1
  473. package/dist/services/definitions/index.d.cts +42 -1
  474. package/dist/services/definitions/index.d.cts.map +1 -1
  475. package/dist/services/definitions/index.d.mts +42 -1
  476. package/dist/services/definitions/index.d.mts.map +1 -1
  477. package/dist/services/definitions/index.mjs +85 -4
  478. package/dist/services/definitions/index.mjs.map +1 -1
  479. package/dist/services/definitions/infisical.cjs +99 -0
  480. package/dist/services/definitions/infisical.cjs.map +1 -0
  481. package/dist/services/definitions/infisical.d.cts +7 -0
  482. package/dist/services/definitions/infisical.d.cts.map +1 -0
  483. package/dist/services/definitions/infisical.d.mts +7 -0
  484. package/dist/services/definitions/infisical.d.mts.map +1 -0
  485. package/dist/services/definitions/infisical.mjs +98 -0
  486. package/dist/services/definitions/infisical.mjs.map +1 -0
  487. package/dist/services/definitions/jellyfin.cjs +2 -3
  488. package/dist/services/definitions/jellyfin.cjs.map +1 -1
  489. package/dist/services/definitions/jellyfin.mjs +1 -1
  490. package/dist/services/definitions/jenkins.cjs +2 -3
  491. package/dist/services/definitions/jenkins.cjs.map +1 -1
  492. package/dist/services/definitions/jenkins.mjs +1 -1
  493. package/dist/services/definitions/keycloak.cjs +122 -0
  494. package/dist/services/definitions/keycloak.cjs.map +1 -0
  495. package/dist/services/definitions/keycloak.d.cts +7 -0
  496. package/dist/services/definitions/keycloak.d.cts.map +1 -0
  497. package/dist/services/definitions/keycloak.d.mts +7 -0
  498. package/dist/services/definitions/keycloak.d.mts.map +1 -0
  499. package/dist/services/definitions/keycloak.mjs +121 -0
  500. package/dist/services/definitions/keycloak.mjs.map +1 -0
  501. package/dist/services/definitions/kimi.cjs +2 -3
  502. package/dist/services/definitions/kimi.cjs.map +1 -1
  503. package/dist/services/definitions/kimi.mjs +1 -1
  504. package/dist/services/definitions/kong.cjs +121 -0
  505. package/dist/services/definitions/kong.cjs.map +1 -0
  506. package/dist/services/definitions/kong.d.cts +7 -0
  507. package/dist/services/definitions/kong.d.cts.map +1 -0
  508. package/dist/services/definitions/kong.d.mts +7 -0
  509. package/dist/services/definitions/kong.d.mts.map +1 -0
  510. package/dist/services/definitions/kong.mjs +120 -0
  511. package/dist/services/definitions/kong.mjs.map +1 -0
  512. package/dist/services/definitions/lago.cjs +95 -0
  513. package/dist/services/definitions/lago.cjs.map +1 -0
  514. package/dist/services/definitions/lago.d.cts +7 -0
  515. package/dist/services/definitions/lago.d.cts.map +1 -0
  516. package/dist/services/definitions/lago.d.mts +7 -0
  517. package/dist/services/definitions/lago.d.mts.map +1 -0
  518. package/dist/services/definitions/lago.mjs +94 -0
  519. package/dist/services/definitions/lago.mjs.map +1 -0
  520. package/dist/services/definitions/langflow.cjs +88 -0
  521. package/dist/services/definitions/langflow.cjs.map +1 -0
  522. package/dist/services/definitions/langflow.d.cts +7 -0
  523. package/dist/services/definitions/langflow.d.cts.map +1 -0
  524. package/dist/services/definitions/langflow.d.mts +7 -0
  525. package/dist/services/definitions/langflow.d.mts.map +1 -0
  526. package/dist/services/definitions/langflow.mjs +87 -0
  527. package/dist/services/definitions/langflow.mjs.map +1 -0
  528. package/dist/services/definitions/langfuse.cjs +79 -0
  529. package/dist/services/definitions/langfuse.cjs.map +1 -0
  530. package/dist/services/definitions/langfuse.d.cts +7 -0
  531. package/dist/services/definitions/langfuse.d.cts.map +1 -0
  532. package/dist/services/definitions/langfuse.d.mts +7 -0
  533. package/dist/services/definitions/langfuse.d.mts.map +1 -0
  534. package/dist/services/definitions/langfuse.mjs +78 -0
  535. package/dist/services/definitions/langfuse.mjs.map +1 -0
  536. package/dist/services/definitions/lasuite-meet-agents.cjs +2 -3
  537. package/dist/services/definitions/lasuite-meet-agents.cjs.map +1 -1
  538. package/dist/services/definitions/lasuite-meet-agents.mjs +1 -1
  539. package/dist/services/definitions/lasuite-meet-backend.cjs +2 -3
  540. package/dist/services/definitions/lasuite-meet-backend.cjs.map +1 -1
  541. package/dist/services/definitions/lasuite-meet-backend.mjs +1 -1
  542. package/dist/services/definitions/lasuite-meet-frontend.cjs +2 -3
  543. package/dist/services/definitions/lasuite-meet-frontend.cjs.map +1 -1
  544. package/dist/services/definitions/lasuite-meet-frontend.mjs +1 -1
  545. package/dist/services/definitions/librechat.cjs +2 -3
  546. package/dist/services/definitions/librechat.cjs.map +1 -1
  547. package/dist/services/definitions/librechat.mjs +1 -1
  548. package/dist/services/definitions/lightpanda.cjs +2 -3
  549. package/dist/services/definitions/lightpanda.cjs.map +1 -1
  550. package/dist/services/definitions/lightpanda.mjs +1 -1
  551. package/dist/services/definitions/listmonk.cjs +118 -0
  552. package/dist/services/definitions/listmonk.cjs.map +1 -0
  553. package/dist/services/definitions/listmonk.d.cts +7 -0
  554. package/dist/services/definitions/listmonk.d.cts.map +1 -0
  555. package/dist/services/definitions/listmonk.d.mts +7 -0
  556. package/dist/services/definitions/listmonk.d.mts.map +1 -0
  557. package/dist/services/definitions/listmonk.mjs +117 -0
  558. package/dist/services/definitions/listmonk.mjs.map +1 -0
  559. package/dist/services/definitions/litellm.cjs +2 -3
  560. package/dist/services/definitions/litellm.cjs.map +1 -1
  561. package/dist/services/definitions/litellm.mjs +1 -1
  562. package/dist/services/definitions/livekit.cjs +2 -3
  563. package/dist/services/definitions/livekit.cjs.map +1 -1
  564. package/dist/services/definitions/livekit.mjs +1 -1
  565. package/dist/services/definitions/loki.cjs +2 -3
  566. package/dist/services/definitions/loki.cjs.map +1 -1
  567. package/dist/services/definitions/loki.mjs +1 -1
  568. package/dist/services/definitions/mariadb.cjs +81 -0
  569. package/dist/services/definitions/mariadb.cjs.map +1 -0
  570. package/dist/services/definitions/mariadb.d.cts +7 -0
  571. package/dist/services/definitions/mariadb.d.cts.map +1 -0
  572. package/dist/services/definitions/mariadb.d.mts +7 -0
  573. package/dist/services/definitions/mariadb.d.mts.map +1 -0
  574. package/dist/services/definitions/mariadb.mjs +80 -0
  575. package/dist/services/definitions/mariadb.mjs.map +1 -0
  576. package/dist/services/definitions/matomo.cjs +2 -3
  577. package/dist/services/definitions/matomo.cjs.map +1 -1
  578. package/dist/services/definitions/matomo.mjs +1 -1
  579. package/dist/services/definitions/matrix-synapse.cjs +2 -3
  580. package/dist/services/definitions/matrix-synapse.cjs.map +1 -1
  581. package/dist/services/definitions/matrix-synapse.mjs +1 -1
  582. package/dist/services/definitions/mattermost.cjs +2 -3
  583. package/dist/services/definitions/mattermost.cjs.map +1 -1
  584. package/dist/services/definitions/mattermost.mjs +1 -1
  585. package/dist/services/definitions/mautic.cjs +83 -0
  586. package/dist/services/definitions/mautic.cjs.map +1 -0
  587. package/dist/services/definitions/mautic.d.cts +7 -0
  588. package/dist/services/definitions/mautic.d.cts.map +1 -0
  589. package/dist/services/definitions/mautic.d.mts +7 -0
  590. package/dist/services/definitions/mautic.d.mts.map +1 -0
  591. package/dist/services/definitions/mautic.mjs +82 -0
  592. package/dist/services/definitions/mautic.mjs.map +1 -0
  593. package/dist/services/definitions/medusa.cjs +83 -0
  594. package/dist/services/definitions/medusa.cjs.map +1 -0
  595. package/dist/services/definitions/medusa.d.cts +7 -0
  596. package/dist/services/definitions/medusa.d.cts.map +1 -0
  597. package/dist/services/definitions/medusa.d.mts +7 -0
  598. package/dist/services/definitions/medusa.d.mts.map +1 -0
  599. package/dist/services/definitions/medusa.mjs +82 -0
  600. package/dist/services/definitions/medusa.mjs.map +1 -0
  601. package/dist/services/definitions/meilisearch.cjs +2 -3
  602. package/dist/services/definitions/meilisearch.cjs.map +1 -1
  603. package/dist/services/definitions/meilisearch.mjs +1 -1
  604. package/dist/services/definitions/milvus.cjs +2 -3
  605. package/dist/services/definitions/milvus.cjs.map +1 -1
  606. package/dist/services/definitions/milvus.mjs +1 -1
  607. package/dist/services/definitions/minio.cjs +2 -3
  608. package/dist/services/definitions/minio.cjs.map +1 -1
  609. package/dist/services/definitions/minio.mjs +1 -1
  610. package/dist/services/definitions/mission-control.cjs +2 -3
  611. package/dist/services/definitions/mission-control.cjs.map +1 -1
  612. package/dist/services/definitions/mission-control.mjs +1 -1
  613. package/dist/services/definitions/mixpost.cjs +2 -3
  614. package/dist/services/definitions/mixpost.cjs.map +1 -1
  615. package/dist/services/definitions/mixpost.mjs +1 -1
  616. package/dist/services/definitions/motion-canvas.cjs +2 -3
  617. package/dist/services/definitions/motion-canvas.cjs.map +1 -1
  618. package/dist/services/definitions/motion-canvas.mjs +1 -1
  619. package/dist/services/definitions/mysql.cjs +81 -0
  620. package/dist/services/definitions/mysql.cjs.map +1 -0
  621. package/dist/services/definitions/mysql.d.cts +7 -0
  622. package/dist/services/definitions/mysql.d.cts.map +1 -0
  623. package/dist/services/definitions/mysql.d.mts +7 -0
  624. package/dist/services/definitions/mysql.d.mts.map +1 -0
  625. package/dist/services/definitions/mysql.mjs +80 -0
  626. package/dist/services/definitions/mysql.mjs.map +1 -0
  627. package/dist/services/definitions/n8n.cjs +2 -3
  628. package/dist/services/definitions/n8n.cjs.map +1 -1
  629. package/dist/services/definitions/n8n.mjs +1 -1
  630. package/dist/services/definitions/neo4j.cjs +2 -3
  631. package/dist/services/definitions/neo4j.cjs.map +1 -1
  632. package/dist/services/definitions/neo4j.mjs +1 -1
  633. package/dist/services/definitions/nextcloud.cjs +2 -3
  634. package/dist/services/definitions/nextcloud.cjs.map +1 -1
  635. package/dist/services/definitions/nextcloud.mjs +1 -1
  636. package/dist/services/definitions/nocodb.cjs +2 -3
  637. package/dist/services/definitions/nocodb.cjs.map +1 -1
  638. package/dist/services/definitions/nocodb.mjs +1 -1
  639. package/dist/services/definitions/ntfy.cjs +2 -3
  640. package/dist/services/definitions/ntfy.cjs.map +1 -1
  641. package/dist/services/definitions/ntfy.mjs +1 -1
  642. package/dist/services/definitions/ollama.cjs +2 -3
  643. package/dist/services/definitions/ollama.cjs.map +1 -1
  644. package/dist/services/definitions/ollama.mjs +1 -1
  645. package/dist/services/definitions/open-webui.cjs +2 -3
  646. package/dist/services/definitions/open-webui.cjs.map +1 -1
  647. package/dist/services/definitions/open-webui.mjs +1 -1
  648. package/dist/services/definitions/opencode.cjs +2 -3
  649. package/dist/services/definitions/opencode.cjs.map +1 -1
  650. package/dist/services/definitions/opencode.mjs +1 -1
  651. package/dist/services/definitions/openhands.cjs +58 -0
  652. package/dist/services/definitions/openhands.cjs.map +1 -0
  653. package/dist/services/definitions/openhands.d.cts +7 -0
  654. package/dist/services/definitions/openhands.d.cts.map +1 -0
  655. package/dist/services/definitions/openhands.d.mts +7 -0
  656. package/dist/services/definitions/openhands.d.mts.map +1 -0
  657. package/dist/services/definitions/openhands.mjs +57 -0
  658. package/dist/services/definitions/openhands.mjs.map +1 -0
  659. package/dist/services/definitions/openpanel.cjs +2 -3
  660. package/dist/services/definitions/openpanel.cjs.map +1 -1
  661. package/dist/services/definitions/openpanel.mjs +1 -1
  662. package/dist/services/definitions/opensearch.cjs +94 -0
  663. package/dist/services/definitions/opensearch.cjs.map +1 -0
  664. package/dist/services/definitions/opensearch.d.cts +7 -0
  665. package/dist/services/definitions/opensearch.d.cts.map +1 -0
  666. package/dist/services/definitions/opensearch.d.mts +7 -0
  667. package/dist/services/definitions/opensearch.d.mts.map +1 -0
  668. package/dist/services/definitions/opensearch.mjs +93 -0
  669. package/dist/services/definitions/opensearch.mjs.map +1 -0
  670. package/dist/services/definitions/outline.cjs +2 -3
  671. package/dist/services/definitions/outline.cjs.map +1 -1
  672. package/dist/services/definitions/outline.mjs +1 -1
  673. package/dist/services/definitions/paperless-ngx.cjs +2 -3
  674. package/dist/services/definitions/paperless-ngx.cjs.map +1 -1
  675. package/dist/services/definitions/paperless-ngx.mjs +1 -1
  676. package/dist/services/definitions/pentagi.cjs +2 -3
  677. package/dist/services/definitions/pentagi.cjs.map +1 -1
  678. package/dist/services/definitions/pentagi.mjs +1 -1
  679. package/dist/services/definitions/pentestagent.cjs +2 -3
  680. package/dist/services/definitions/pentestagent.cjs.map +1 -1
  681. package/dist/services/definitions/pentestagent.mjs +1 -1
  682. package/dist/services/definitions/playwright-server.cjs +2 -3
  683. package/dist/services/definitions/playwright-server.cjs.map +1 -1
  684. package/dist/services/definitions/playwright-server.mjs +1 -1
  685. package/dist/services/definitions/pocketbase.cjs +61 -0
  686. package/dist/services/definitions/pocketbase.cjs.map +1 -0
  687. package/dist/services/definitions/pocketbase.d.cts +7 -0
  688. package/dist/services/definitions/pocketbase.d.cts.map +1 -0
  689. package/dist/services/definitions/pocketbase.d.mts +7 -0
  690. package/dist/services/definitions/pocketbase.d.mts.map +1 -0
  691. package/dist/services/definitions/pocketbase.mjs +60 -0
  692. package/dist/services/definitions/pocketbase.mjs.map +1 -0
  693. package/dist/services/definitions/portainer.cjs +2 -3
  694. package/dist/services/definitions/portainer.cjs.map +1 -1
  695. package/dist/services/definitions/portainer.mjs +1 -1
  696. package/dist/services/definitions/postgresql.cjs +2 -3
  697. package/dist/services/definitions/postgresql.cjs.map +1 -1
  698. package/dist/services/definitions/postgresql.mjs +1 -1
  699. package/dist/services/definitions/postiz.cjs +2 -3
  700. package/dist/services/definitions/postiz.cjs.map +1 -1
  701. package/dist/services/definitions/postiz.mjs +1 -1
  702. package/dist/services/definitions/prometheus.cjs +2 -3
  703. package/dist/services/definitions/prometheus.cjs.map +1 -1
  704. package/dist/services/definitions/prometheus.mjs +1 -1
  705. package/dist/services/definitions/qdrant.cjs +2 -3
  706. package/dist/services/definitions/qdrant.cjs.map +1 -1
  707. package/dist/services/definitions/qdrant.mjs +1 -1
  708. package/dist/services/definitions/rabbitmq.cjs +80 -0
  709. package/dist/services/definitions/rabbitmq.cjs.map +1 -0
  710. package/dist/services/definitions/rabbitmq.d.cts +7 -0
  711. package/dist/services/definitions/rabbitmq.d.cts.map +1 -0
  712. package/dist/services/definitions/rabbitmq.d.mts +7 -0
  713. package/dist/services/definitions/rabbitmq.d.mts.map +1 -0
  714. package/dist/services/definitions/rabbitmq.mjs +79 -0
  715. package/dist/services/definitions/rabbitmq.mjs.map +1 -0
  716. package/dist/services/definitions/ragflow.cjs +192 -0
  717. package/dist/services/definitions/ragflow.cjs.map +1 -0
  718. package/dist/services/definitions/ragflow.d.cts +7 -0
  719. package/dist/services/definitions/ragflow.d.cts.map +1 -0
  720. package/dist/services/definitions/ragflow.d.mts +7 -0
  721. package/dist/services/definitions/ragflow.d.mts.map +1 -0
  722. package/dist/services/definitions/ragflow.mjs +191 -0
  723. package/dist/services/definitions/ragflow.mjs.map +1 -0
  724. package/dist/services/definitions/redis.cjs +2 -3
  725. package/dist/services/definitions/redis.cjs.map +1 -1
  726. package/dist/services/definitions/redis.mjs +1 -1
  727. package/dist/services/definitions/remotion.cjs +2 -3
  728. package/dist/services/definitions/remotion.cjs.map +1 -1
  729. package/dist/services/definitions/remotion.mjs +1 -1
  730. package/dist/services/definitions/restic.cjs +58 -0
  731. package/dist/services/definitions/restic.cjs.map +1 -0
  732. package/dist/services/definitions/restic.d.cts +7 -0
  733. package/dist/services/definitions/restic.d.cts.map +1 -0
  734. package/dist/services/definitions/restic.d.mts +7 -0
  735. package/dist/services/definitions/restic.d.mts.map +1 -0
  736. package/dist/services/definitions/restic.mjs +57 -0
  737. package/dist/services/definitions/restic.mjs.map +1 -0
  738. package/dist/services/definitions/rocketchat.cjs +2 -3
  739. package/dist/services/definitions/rocketchat.cjs.map +1 -1
  740. package/dist/services/definitions/rocketchat.mjs +1 -1
  741. package/dist/services/definitions/saleor.cjs +76 -0
  742. package/dist/services/definitions/saleor.cjs.map +1 -0
  743. package/dist/services/definitions/saleor.d.cts +7 -0
  744. package/dist/services/definitions/saleor.d.cts.map +1 -0
  745. package/dist/services/definitions/saleor.d.mts +7 -0
  746. package/dist/services/definitions/saleor.d.mts.map +1 -0
  747. package/dist/services/definitions/saleor.mjs +75 -0
  748. package/dist/services/definitions/saleor.mjs.map +1 -0
  749. package/dist/services/definitions/scrapling.cjs +2 -3
  750. package/dist/services/definitions/scrapling.cjs.map +1 -1
  751. package/dist/services/definitions/scrapling.mjs +1 -1
  752. package/dist/services/definitions/searxng.cjs +2 -3
  753. package/dist/services/definitions/searxng.cjs.map +1 -1
  754. package/dist/services/definitions/searxng.mjs +1 -1
  755. package/dist/services/definitions/signoz.cjs +2 -3
  756. package/dist/services/definitions/signoz.cjs.map +1 -1
  757. package/dist/services/definitions/signoz.mjs +1 -1
  758. package/dist/services/definitions/solidityguard.cjs +2 -3
  759. package/dist/services/definitions/solidityguard.cjs.map +1 -1
  760. package/dist/services/definitions/solidityguard.mjs +1 -1
  761. package/dist/services/definitions/stable-diffusion.cjs +2 -3
  762. package/dist/services/definitions/stable-diffusion.cjs.map +1 -1
  763. package/dist/services/definitions/stable-diffusion.mjs +1 -1
  764. package/dist/services/definitions/steel-browser.cjs +2 -3
  765. package/dist/services/definitions/steel-browser.cjs.map +1 -1
  766. package/dist/services/definitions/steel-browser.mjs +1 -1
  767. package/dist/services/definitions/stirling-pdf.cjs +74 -0
  768. package/dist/services/definitions/stirling-pdf.cjs.map +1 -0
  769. package/dist/services/definitions/stirling-pdf.d.cts +7 -0
  770. package/dist/services/definitions/stirling-pdf.d.cts.map +1 -0
  771. package/dist/services/definitions/stirling-pdf.d.mts +7 -0
  772. package/dist/services/definitions/stirling-pdf.d.mts.map +1 -0
  773. package/dist/services/definitions/stirling-pdf.mjs +73 -0
  774. package/dist/services/definitions/stirling-pdf.mjs.map +1 -0
  775. package/dist/services/definitions/strapi.cjs +124 -0
  776. package/dist/services/definitions/strapi.cjs.map +1 -0
  777. package/dist/services/definitions/strapi.d.cts +7 -0
  778. package/dist/services/definitions/strapi.d.cts.map +1 -0
  779. package/dist/services/definitions/strapi.d.mts +7 -0
  780. package/dist/services/definitions/strapi.d.mts.map +1 -0
  781. package/dist/services/definitions/strapi.mjs +123 -0
  782. package/dist/services/definitions/strapi.mjs.map +1 -0
  783. package/dist/services/definitions/stream-gateway.cjs +2 -3
  784. package/dist/services/definitions/stream-gateway.cjs.map +1 -1
  785. package/dist/services/definitions/stream-gateway.mjs +1 -1
  786. package/dist/services/definitions/supabase.cjs +2 -3
  787. package/dist/services/definitions/supabase.cjs.map +1 -1
  788. package/dist/services/definitions/supabase.mjs +1 -1
  789. package/dist/services/definitions/tailscale.cjs +2 -3
  790. package/dist/services/definitions/tailscale.cjs.map +1 -1
  791. package/dist/services/definitions/tailscale.mjs +1 -1
  792. package/dist/services/definitions/temporal.cjs +2 -3
  793. package/dist/services/definitions/temporal.cjs.map +1 -1
  794. package/dist/services/definitions/temporal.mjs +1 -1
  795. package/dist/services/definitions/traefik.cjs +2 -3
  796. package/dist/services/definitions/traefik.cjs.map +1 -1
  797. package/dist/services/definitions/traefik.mjs +1 -1
  798. package/dist/services/definitions/twenty.cjs +83 -0
  799. package/dist/services/definitions/twenty.cjs.map +1 -0
  800. package/dist/services/definitions/twenty.d.cts +7 -0
  801. package/dist/services/definitions/twenty.d.cts.map +1 -0
  802. package/dist/services/definitions/twenty.d.mts +7 -0
  803. package/dist/services/definitions/twenty.d.mts.map +1 -0
  804. package/dist/services/definitions/twenty.mjs +82 -0
  805. package/dist/services/definitions/twenty.mjs.map +1 -0
  806. package/dist/services/definitions/umami.cjs +2 -3
  807. package/dist/services/definitions/umami.cjs.map +1 -1
  808. package/dist/services/definitions/umami.mjs +1 -1
  809. package/dist/services/definitions/uptime-kuma.cjs +2 -3
  810. package/dist/services/definitions/uptime-kuma.cjs.map +1 -1
  811. package/dist/services/definitions/uptime-kuma.mjs +1 -1
  812. package/dist/services/definitions/usesend.cjs +2 -3
  813. package/dist/services/definitions/usesend.cjs.map +1 -1
  814. package/dist/services/definitions/usesend.mjs +1 -1
  815. package/dist/services/definitions/valkey.cjs +2 -3
  816. package/dist/services/definitions/valkey.cjs.map +1 -1
  817. package/dist/services/definitions/valkey.mjs +1 -1
  818. package/dist/services/definitions/vault.cjs +71 -0
  819. package/dist/services/definitions/vault.cjs.map +1 -0
  820. package/dist/services/definitions/vault.d.cts +7 -0
  821. package/dist/services/definitions/vault.d.cts.map +1 -0
  822. package/dist/services/definitions/vault.d.mts +7 -0
  823. package/dist/services/definitions/vault.d.mts.map +1 -0
  824. package/dist/services/definitions/vault.mjs +70 -0
  825. package/dist/services/definitions/vault.mjs.map +1 -0
  826. package/dist/services/definitions/vaultwarden.cjs +2 -3
  827. package/dist/services/definitions/vaultwarden.cjs.map +1 -1
  828. package/dist/services/definitions/vaultwarden.mjs +1 -1
  829. package/dist/services/definitions/watchtower.cjs +2 -3
  830. package/dist/services/definitions/watchtower.cjs.map +1 -1
  831. package/dist/services/definitions/watchtower.mjs +1 -1
  832. package/dist/services/definitions/weaviate.cjs +2 -3
  833. package/dist/services/definitions/weaviate.cjs.map +1 -1
  834. package/dist/services/definitions/weaviate.mjs +1 -1
  835. package/dist/services/definitions/whisper.cjs +2 -3
  836. package/dist/services/definitions/whisper.cjs.map +1 -1
  837. package/dist/services/definitions/whisper.mjs +1 -1
  838. package/dist/services/definitions/xyops.cjs +2 -3
  839. package/dist/services/definitions/xyops.cjs.map +1 -1
  840. package/dist/services/definitions/xyops.mjs +1 -1
  841. package/dist/services/registry.cjs +3 -4
  842. package/dist/services/registry.cjs.map +1 -1
  843. package/dist/services/registry.d.mts.map +1 -1
  844. package/dist/services/registry.mjs +1 -2
  845. package/dist/services/registry.mjs.map +1 -1
  846. package/dist/services/registry.test.cjs +3 -4
  847. package/dist/services/registry.test.cjs.map +1 -1
  848. package/dist/services/registry.test.mjs +3 -4
  849. package/dist/services/registry.test.mjs.map +1 -1
  850. package/dist/{manifest-4uLbISXV.cjs → skill-manifest--IgY9REK.cjs} +40 -10
  851. package/dist/skill-manifest--IgY9REK.cjs.map +1 -0
  852. package/dist/{manifest-B8UDsVlR.mjs → skill-manifest-BVUXU0__.mjs} +24 -5
  853. package/dist/skill-manifest-BVUXU0__.mjs.map +1 -0
  854. package/dist/skills/registry.cjs +262 -3
  855. package/dist/skills/registry.cjs.map +1 -1
  856. package/dist/skills/registry.d.cts.map +1 -1
  857. package/dist/skills/registry.d.mts.map +1 -1
  858. package/dist/skills/registry.mjs +261 -1
  859. package/dist/skills/registry.mjs.map +1 -1
  860. package/dist/skills/skill-manifest.cjs +5 -23
  861. package/dist/skills/skill-manifest.mjs +1 -19
  862. package/dist/skills-BlzpHmpH.cjs +620 -0
  863. package/dist/skills-BlzpHmpH.cjs.map +1 -0
  864. package/dist/types-CR83OJiq.d.cts +243 -0
  865. package/dist/types-CR83OJiq.d.cts.map +1 -0
  866. package/dist/types-zYjGTuyn.d.mts +243 -0
  867. package/dist/types-zYjGTuyn.d.mts.map +1 -0
  868. package/dist/types.cjs +79 -3
  869. package/dist/types.cjs.map +1 -1
  870. package/dist/types.d.cts +1 -1
  871. package/dist/types.d.mts +1 -1
  872. package/dist/types.mjs +78 -1
  873. package/dist/types.mjs.map +1 -1
  874. package/dist/validator.cjs +3 -4
  875. package/dist/validator.cjs.map +1 -1
  876. package/dist/validator.mjs +1 -2
  877. package/dist/validator.mjs.map +1 -1
  878. package/dist/validator.test.cjs +5 -6
  879. package/dist/validator.test.cjs.map +1 -1
  880. package/dist/validator.test.mjs +3 -4
  881. package/dist/validator.test.mjs.map +1 -1
  882. package/dist/version-manager.cjs +3 -4
  883. package/dist/version-manager.cjs.map +1 -1
  884. package/dist/version-manager.d.mts.map +1 -1
  885. package/dist/version-manager.mjs +1 -2
  886. package/dist/version-manager.mjs.map +1 -1
  887. package/dist/version-manager.test.cjs +5 -6
  888. package/dist/version-manager.test.cjs.map +1 -1
  889. package/dist/version-manager.test.mjs +3 -4
  890. package/dist/version-manager.test.mjs.map +1 -1
  891. package/dist/{vi.2VT5v0um-BmRMvymT.cjs → vi.2VT5v0um-CRqXre87.cjs} +82 -202
  892. package/dist/{vi.2VT5v0um-CFyDIn0m.mjs.map → vi.2VT5v0um-CRqXre87.cjs.map} +1 -1
  893. package/dist/{vi.2VT5v0um-CFyDIn0m.mjs → vi.2VT5v0um-DvC3SVNc.mjs} +67 -186
  894. package/dist/{vi.2VT5v0um-BmRMvymT.cjs.map → vi.2VT5v0um-DvC3SVNc.mjs.map} +1 -1
  895. package/package.json +3 -3
  896. package/src/generators/postgres-init.ts +6 -0
  897. package/src/presets/presets.test.ts +4 -0
  898. package/src/presets/registry.ts +88 -0
  899. package/src/schema.ts +11 -0
  900. package/src/services/definitions/airbyte.ts +75 -0
  901. package/src/services/definitions/airflow.ts +109 -0
  902. package/src/services/definitions/appwrite.ts +181 -0
  903. package/src/services/definitions/authelia.ts +145 -0
  904. package/src/services/definitions/axolotl.ts +65 -0
  905. package/src/services/definitions/chatwoot-worker.ts +93 -0
  906. package/src/services/definitions/chatwoot.ts +106 -0
  907. package/src/services/definitions/dagster.ts +82 -0
  908. package/src/services/definitions/directus.ts +115 -0
  909. package/src/services/definitions/duplicati.ts +77 -0
  910. package/src/services/definitions/excalidraw.ts +46 -0
  911. package/src/services/definitions/firecrawl-playwright.ts +62 -0
  912. package/src/services/definitions/firecrawl.ts +146 -0
  913. package/src/services/definitions/flagsmith.ts +76 -0
  914. package/src/services/definitions/fonoster.ts +67 -0
  915. package/src/services/definitions/formbricks.ts +75 -0
  916. package/src/services/definitions/hedgedoc.ts +81 -0
  917. package/src/services/definitions/heyform.ts +67 -0
  918. package/src/services/definitions/hoppscotch.ts +74 -0
  919. package/src/services/definitions/index.ts +124 -0
  920. package/src/services/definitions/infisical.ts +97 -0
  921. package/src/services/definitions/keycloak.ts +119 -0
  922. package/src/services/definitions/kong.ts +116 -0
  923. package/src/services/definitions/lago.ts +95 -0
  924. package/src/services/definitions/langflow.ts +82 -0
  925. package/src/services/definitions/langfuse.ts +76 -0
  926. package/src/services/definitions/listmonk.ts +118 -0
  927. package/src/services/definitions/mariadb.ts +82 -0
  928. package/src/services/definitions/mautic.ts +82 -0
  929. package/src/services/definitions/medusa.ts +82 -0
  930. package/src/services/definitions/mysql.ts +82 -0
  931. package/src/services/definitions/openhands.ts +60 -0
  932. package/src/services/definitions/opensearch.ts +95 -0
  933. package/src/services/definitions/pocketbase.ts +62 -0
  934. package/src/services/definitions/rabbitmq.ts +81 -0
  935. package/src/services/definitions/ragflow.ts +175 -0
  936. package/src/services/definitions/restic.ts +60 -0
  937. package/src/services/definitions/saleor.ts +75 -0
  938. package/src/services/definitions/stirling-pdf.ts +73 -0
  939. package/src/services/definitions/strapi.ts +124 -0
  940. package/src/services/definitions/twenty.ts +82 -0
  941. package/src/services/definitions/vault.ts +74 -0
  942. package/src/skills/manifest.json +8 -0
  943. package/src/skills/registry.ts +119 -0
  944. package/src/types.ts +91 -2
  945. package/dist/chunk-C0xms8kb.cjs +0 -34
  946. package/dist/deployers/coolify.d.cts.map +0 -1
  947. package/dist/deployers/coolify.d.mts.map +0 -1
  948. package/dist/deployers/dokploy.d.cts.map +0 -1
  949. package/dist/deployers/dokploy.d.mts.map +0 -1
  950. package/dist/deployers/types.d.cts.map +0 -1
  951. package/dist/deployers/types.d.mts.map +0 -1
  952. package/dist/generators/skills.cjs.map +0 -1
  953. package/dist/manifest-4uLbISXV.cjs.map +0 -1
  954. package/dist/manifest-B8UDsVlR.mjs.map +0 -1
  955. package/dist/schema.d.cts.map +0 -1
  956. package/dist/schema.d.mts.map +0 -1
  957. package/dist/skills/skill-manifest.cjs.map +0 -1
  958. package/dist/skills/skill-manifest.mjs.map +0 -1
package/dist/generate.cjs CHANGED
@@ -1,29 +1,28 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_bare_metal_partition = require('./bare-metal-partition.cjs');
3
- const require_resolver = require('./resolver.cjs');
4
- const require_generators_postgres_init = require('./generators/postgres-init.cjs');
5
- const require_composer = require('./composer.cjs');
6
- const require_errors = require('./errors.cjs');
7
- const require_generators_bare_metal_install = require('./generators/bare-metal-install.cjs');
8
- const require_generators_caddy = require('./generators/caddy.cjs');
9
- const require_generators_cloud_init = require('./generators/cloud-init.cjs');
10
- const require_generators_env = require('./generators/env.cjs');
11
- const require_generators_get_shit_done = require('./generators/get-shit-done.cjs');
12
- const require_generators_grafana = require('./generators/grafana.cjs');
13
- const require_generators_health_check = require('./generators/health-check.cjs');
14
- const require_generators_n8n_workflows = require('./generators/n8n-workflows.cjs');
15
- const require_generators_native_services = require('./generators/native-services.cjs');
16
- const require_generators_openclaw_install_script = require('./generators/openclaw-install-script.cjs');
17
- const require_generators_openclaw_json = require('./generators/openclaw-json.cjs');
18
- const require_generators_prometheus = require('./generators/prometheus.cjs');
19
- const require_generators_readme = require('./generators/readme.cjs');
20
- const require_generators_scripts = require('./generators/scripts.cjs');
21
- const require_generators_skills = require('./generators/skills.cjs');
22
- const require_generators_stack_manifest = require('./generators/stack-manifest.cjs');
23
- const require_generators_traefik = require('./generators/traefik.cjs');
24
- const require_migrations = require('./migrations.cjs');
25
- const require_validator = require('./validator.cjs');
26
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_skills = require("./skills-BlzpHmpH.cjs");
3
+ const require_bare_metal_partition = require("./bare-metal-partition.cjs");
4
+ const require_resolver = require("./resolver.cjs");
5
+ const require_generators_postgres_init = require("./generators/postgres-init.cjs");
6
+ const require_composer = require("./composer.cjs");
7
+ const require_errors = require("./errors.cjs");
8
+ const require_generators_bare_metal_install = require("./generators/bare-metal-install.cjs");
9
+ const require_generators_caddy = require("./generators/caddy.cjs");
10
+ const require_generators_cloud_init = require("./generators/cloud-init.cjs");
11
+ const require_generators_env = require("./generators/env.cjs");
12
+ const require_generators_get_shit_done = require("./generators/get-shit-done.cjs");
13
+ const require_generators_grafana = require("./generators/grafana.cjs");
14
+ const require_generators_health_check = require("./generators/health-check.cjs");
15
+ const require_generators_n8n_workflows = require("./generators/n8n-workflows.cjs");
16
+ const require_generators_native_services = require("./generators/native-services.cjs");
17
+ const require_generators_openclaw_install_script = require("./generators/openclaw-install-script.cjs");
18
+ const require_generators_openclaw_json = require("./generators/openclaw-json.cjs");
19
+ const require_generators_prometheus = require("./generators/prometheus.cjs");
20
+ const require_generators_readme = require("./generators/readme.cjs");
21
+ const require_generators_scripts = require("./generators/scripts.cjs");
22
+ const require_generators_stack_manifest = require("./generators/stack-manifest.cjs");
23
+ const require_generators_traefik = require("./generators/traefik.cjs");
24
+ const require_migrations = require("./migrations.cjs");
25
+ const require_validator = require("./validator.cjs");
27
26
  //#region src/generate.ts
28
27
  /** Resolver/compose only support linux image platforms; normalize for bare-metal (windows/macos). */
29
28
  function getComposePlatform(platform) {
@@ -106,7 +105,7 @@ function generate(rawInput) {
106
105
  ].join("\n");
107
106
  const manifestFiles = require_generators_stack_manifest.generateStackManifest(resolved, input);
108
107
  for (const [path, content] of Object.entries(manifestFiles)) files[path] = content;
109
- const skillFiles = require_generators_skills.generateSkillFiles(resolved);
108
+ const skillFiles = require_skills.generateSkillFiles(resolved);
110
109
  for (const [path, content] of Object.entries(skillFiles)) files[path] = content;
111
110
  files["openclaw/config/openclaw.json"] = require_generators_openclaw_json.generateOpenClawConfig(resolved, {
112
111
  deploymentType: input.deploymentType,
@@ -218,8 +217,8 @@ function generateServicesDoc(resolved) {
218
217
  }
219
218
  return lines.join("\n");
220
219
  }
221
-
222
220
  //#endregion
223
221
  exports.generate = generate;
224
222
  exports.generateServicesDoc = generateServicesDoc;
223
+
225
224
  //# sourceMappingURL=generate.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate.cjs","names":["migrateConfig","resolve","StackConfigError","partitionBareMetal","resolvedWithOnlyServices","generateTraefikConfig","composeMultiFile","validate","ValidationError","generateEnvFiles","generateStackManifest","generateSkillFiles","generateOpenClawConfig","generateReadme","generateScripts","generateHealthCheck","generateN8nWorkflows","generatePostgresInit","generateCaddyfile","generatePrometheusConfig","generateGrafanaConfig","generateGrafanaDashboard","platformToNativePlatform","generateNativeInstallScripts","generateBareMetalInstall","generateGsdScripts","generateOpenclawInstallScript","generateCloudInit"],"sources":["../src/generate.ts"],"sourcesContent":["import {\n\tpartitionBareMetal,\n\tplatformToNativePlatform,\n\tresolvedWithOnlyServices,\n} from \"./bare-metal-partition.js\";\nimport { composeMultiFile } from \"./composer.js\";\nimport { StackConfigError, ValidationError } from \"./errors.js\";\nimport { generateBareMetalInstall } from \"./generators/bare-metal-install.js\";\nimport { generateCaddyfile } from \"./generators/caddy.js\";\nimport { generateCloudInit } from \"./generators/cloud-init.js\";\nimport { generateEnvFiles } from \"./generators/env.js\";\nimport { generateGsdScripts } from \"./generators/get-shit-done.js\";\nimport { generateGrafanaConfig, generateGrafanaDashboard } from \"./generators/grafana.js\";\nimport { generateHealthCheck } from \"./generators/health-check.js\";\nimport { generateN8nWorkflows } from \"./generators/n8n-workflows.js\";\nimport { generateNativeInstallScripts } from \"./generators/native-services.js\";\nimport { generateOpenclawInstallScript } from \"./generators/openclaw-install-script.js\";\nimport { generateOpenClawConfig } from \"./generators/openclaw-json.js\";\nimport { generatePostgresInit } from \"./generators/postgres-init.js\";\nimport { generatePrometheusConfig } from \"./generators/prometheus.js\";\nimport { generateReadme } from \"./generators/readme.js\";\nimport { generateScripts } from \"./generators/scripts.js\";\nimport { generateSkillFiles } from \"./generators/skills.js\";\nimport { generateStackManifest } from \"./generators/stack-manifest.js\";\nimport { generateTraefikConfig } from \"./generators/traefik.js\";\nimport { migrateConfig } from \"./migrations.js\";\nimport { resolve } from \"./resolver.js\";\nimport type {\n\tGeneratedFiles,\n\tGenerationInput,\n\tGenerationResult,\n\tPlatform,\n\tResolverInput,\n} from \"./types.js\";\nimport { validate } from \"./validator.js\";\n\n/** Resolver/compose only support linux image platforms; normalize for bare-metal (windows/macos). */\nfunction getComposePlatform(platform: Platform): \"linux/amd64\" | \"linux/arm64\" {\n\tif (platform === \"linux/amd64\" || platform === \"linux/arm64\") return platform;\n\treturn \"linux/amd64\";\n}\n\n/**\n * Main orchestration function: takes generation input, resolves dependencies,\n * generates all files, validates, and returns the complete file tree.\n */\nexport function generate(rawInput: GenerationInput): GenerationResult {\n\t// Apply config migrations if needed\n\tconst input = migrateConfig(rawInput as Record<string, unknown>) as GenerationInput;\n\n\tconst composePlatform = getComposePlatform(input.platform);\n\n\t// 1. Resolve dependencies\n\tconst resolverInput: ResolverInput = {\n\t\tservices: input.services,\n\t\tskillPacks: input.skillPacks,\n\t\taiProviders: input.aiProviders,\n\t\tproxy: input.proxy,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tmonitoring: input.monitoring,\n\t};\n\tconst resolved = resolve(resolverInput);\n\n\tif (!resolved.isValid) {\n\t\tthrow new StackConfigError(\n\t\t\t`Invalid stack configuration: ${resolved.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\tconst isBareMetal = input.deploymentType === \"bare-metal\";\n\tlet resolvedForCompose = resolved;\n\tlet nativeIds = new Set<string>();\n\tlet nativeServices: typeof resolved.services = [];\n\tlet dockerOnlyServices: typeof resolved.services = [];\n\n\tif (isBareMetal) {\n\t\tconst partition = partitionBareMetal(resolved, input.platform);\n\t\tnativeServices = partition.nativeServices;\n\t\tdockerOnlyServices = partition.dockerOnlyServices;\n\t\tnativeIds = partition.nativeIds;\n\t\tif (nativeServices.length > 0) {\n\t\t\tresolvedForCompose = resolvedWithOnlyServices(resolved, dockerOnlyServices);\n\t\t}\n\t}\n\n\t// 2. Generate Docker Compose YAML (multi-file)\n\t// Compute Traefik labels before composing (labels get injected into docker-compose services)\n\tlet traefikOutput: ReturnType<typeof generateTraefikConfig> | undefined;\n\tif (input.proxy === \"traefik\" && input.domain) {\n\t\ttraefikOutput = generateTraefikConfig(resolvedForCompose, input.domain);\n\t}\n\n\tconst composeOptions = {\n\t\tprojectName: input.projectName,\n\t\tproxy: input.proxy,\n\t\tproxyHttpPort: input.proxyHttpPort,\n\t\tproxyHttpsPort: input.proxyHttpsPort,\n\t\tportOverrides: input.portOverrides,\n\t\tdomain: input.domain,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tdeployment: input.deployment,\n\t\topenclawVersion: input.openclawVersion,\n\t\tbareMetalNativeHost: isBareMetal && nativeIds.size > 0,\n\t\ttraefikLabels: traefikOutput?.serviceLabels,\n\t\topenclawImage: input.openclawImage ?? \"official\",\n\t\thardened: input.hardened ?? true,\n\t\topenclawInstallMethod: input.openclawInstallMethod ?? \"docker\",\n\t};\n\tconst composeResult = composeMultiFile(resolvedForCompose, composeOptions);\n\n\t// 3. Validate (using the base docker-compose.yml)\n\tconst validation = validate(resolvedForCompose, composeResult.files[\"docker-compose.yml\"] ?? \"\", {\n\t\tdomain: input.domain,\n\t\tgenerateSecrets: input.generateSecrets,\n\t});\n\tif (!validation.valid) {\n\t\tthrow new ValidationError(\n\t\t\t`Validation failed: ${validation.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\t// 4. Generate all files\n\tconst files: GeneratedFiles = {};\n\n\t// Docker Compose (multi-file output)\n\tfor (const [filename, content] of Object.entries(composeResult.files)) {\n\t\tfiles[filename] = content;\n\t}\n\n\t// Environment files (when bare-metal with native services, host vars use host.docker.internal)\n\tconst envFiles = generateEnvFiles(resolved, {\n\t\tgenerateSecrets: input.generateSecrets,\n\t\tdomain: input.domain,\n\t\topenclawVersion: input.openclawVersion,\n\t\tnativeServiceIds: isBareMetal ? nativeIds : undefined,\n\t\tcomposeFiles: Object.keys(composeResult.files),\n\t\tcomposeProfiles: composeResult.profiles,\n\t\topenclawImage: input.openclawImage,\n\t});\n\tfiles[\".env.example\"] = envFiles.envExample;\n\tfiles[\".env\"] = envFiles.env;\n\n\t// .gitignore\n\tfiles[\".gitignore\"] = [\n\t\t\".env\",\n\t\t\".env.local\",\n\t\t\".env.*.local\",\n\t\t\"*.log\",\n\t\t\"docker-compose.override.yml\",\n\t].join(\"\\n\");\n\n\t// Stack manifest (consumed by Mission Control)\n\tconst manifestFiles = generateStackManifest(resolved, input);\n\tfor (const [path, content] of Object.entries(manifestFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Skills\n\tconst skillFiles = generateSkillFiles(resolved);\n\tfor (const [path, content] of Object.entries(skillFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// OpenClaw Core Configuration\n\tfiles[\"openclaw/config/openclaw.json\"] = generateOpenClawConfig(resolved, {\n\t\tdeploymentType: input.deploymentType,\n\t\tgatewayPort: 18789,\n\t\topenclawVersion: input.openclawVersion,\n\t});\n\n\t// README\n\tfiles[\"README.md\"] = generateReadme(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdomain: input.domain,\n\t\tproxy: input.proxy,\n\t\tdeploymentType: input.deploymentType,\n\t\thasNativeServices: isBareMetal && nativeServices.length > 0,\n\t\topenclawInstallMethod: input.openclawInstallMethod,\n\t});\n\n\t// Scripts\n\tconst scripts = generateScripts();\n\tfor (const [path, content] of Object.entries(scripts)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Health check scripts (dynamic, stack-specific)\n\tconst healthCheckFiles = generateHealthCheck(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdeploymentType: input.deploymentType,\n\t});\n\tfor (const [path, content] of Object.entries(healthCheckFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// n8n workflows\n\tconst n8nWorkflows = generateN8nWorkflows(resolved);\n\tfor (const [path, content] of Object.entries(n8nWorkflows)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// PostgreSQL init script (creates per-service databases and users)\n\tconst postgresInit = generatePostgresInit(resolved);\n\tif (postgresInit) {\n\t\tfiles[\"postgres/init-databases.sh\"] = postgresInit;\n\t}\n\n\t// Caddy config\n\tif (input.proxy === \"caddy\" && input.domain) {\n\t\tfiles[\"caddy/Caddyfile\"] = generateCaddyfile(resolved, input.domain);\n\t}\n\n\t// Traefik config (labels are already injected via composeOptions.traefikLabels)\n\tif (traefikOutput) {\n\t\tfiles[\"traefik/traefik.yml\"] = traefikOutput.staticConfig;\n\t}\n\n\t// Prometheus config\n\tconst hasPrometheus = resolved.services.some((s) => s.definition.id === \"prometheus\");\n\tif (hasPrometheus) {\n\t\tfiles[\"prometheus/prometheus.yml\"] = generatePrometheusConfig(resolved);\n\t}\n\n\t// Grafana config\n\tconst hasGrafana = resolved.services.some((s) => s.definition.id === \"grafana\");\n\tif (hasGrafana) {\n\t\tconst grafanaFiles = generateGrafanaConfig();\n\t\tfor (const [path, content] of Object.entries(grafanaFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t\t// Grafana dashboard\n\t\tfiles[\"config/grafana/dashboards/openclaw-stack-overview.json\"] = generateGrafanaDashboard();\n\t}\n\n\t// Docker Compose override (empty template)\n\tfiles[\"docker-compose.override.yml\"] = [\n\t\t\"# Local overrides for docker-compose.yml\",\n\t\t\"# This file is gitignored — use it for personal port changes, extra volumes, etc.\",\n\t\t\"services: {}\",\n\t\t\"\",\n\t].join(\"\\n\");\n\n\t// SERVICES.md documentation\n\tfiles[\"docs/SERVICES.md\"] = generateServicesDoc(resolved);\n\n\t// Bare-metal: native install scripts + top-level installer\n\tif (isBareMetal) {\n\t\tif (nativeServices.length > 0) {\n\t\t\tconst nativePlatform = platformToNativePlatform(input.platform);\n\t\t\tconst nativeScripts = generateNativeInstallScripts({\n\t\t\t\tnativeServices,\n\t\t\t\tplatform: nativePlatform,\n\t\t\t\tprojectName: input.projectName,\n\t\t\t});\n\t\t\tfor (const [path, content] of Object.entries(nativeScripts)) {\n\t\t\t\tfiles[path] = content;\n\t\t\t}\n\t\t}\n\t\tconst bareMetalFiles = generateBareMetalInstall({\n\t\t\tplatform: input.platform,\n\t\t\tprojectName: input.projectName,\n\t\t\thasNativeServices: nativeServices.length > 0,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(bareMetalFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Get-Shit-Done setup scripts\n\tif (input.gsdRuntimes && input.gsdRuntimes.length > 0) {\n\t\tconst gsdScripts = generateGsdScripts(input.gsdRuntimes);\n\t\tif (gsdScripts) {\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.sh\"] = gsdScripts.sh;\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.ps1\"] = gsdScripts.ps1;\n\t\t}\n\t}\n\n\t// OpenClaw direct install scripts (host-based, no Docker gateway)\n\tif (input.openclawInstallMethod === \"direct\") {\n\t\tconst installScripts = generateOpenclawInstallScript({\n\t\t\tprojectName: input.projectName,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(installScripts)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Cloud-init deploy target\n\tif (input.deployTarget === \"cloud-init\") {\n\t\tconst mainCompose = composeResult.files[\"docker-compose.yml\"] ?? \"\";\n\t\tfiles[\"cloud-init.yml\"] = generateCloudInit({\n\t\t\tcomposeYaml: mainCompose,\n\t\t\tenvContent: envFiles.env,\n\t\t\tprojectName: input.projectName,\n\t\t\tgatewayPort: 18789,\n\t\t});\n\t}\n\n\t// 5. Calculate metadata\n\tconst skillCount = resolved.services.reduce((sum, s) => sum + s.definition.skills.length, 0);\n\n\treturn {\n\t\tfiles,\n\t\tmetadata: {\n\t\t\tserviceCount: resolved.services.length,\n\t\t\tskillCount,\n\t\t\testimatedMemoryMB: resolved.estimatedMemoryMB,\n\t\t\tgeneratedAt: new Date().toISOString(),\n\t\t},\n\t};\n}\n\nexport function generateServicesDoc(resolved: import(\"./types.js\").ResolverOutput): string {\n\tconst lines: string[] = [\n\t\t\"# Service Reference\",\n\t\t\"\",\n\t\t\"This document describes all companion services in your OpenClaw stack.\",\n\t\t\"\",\n\t];\n\n\tfor (const svc of resolved.services) {\n\t\tconst def = svc.definition;\n\t\tlines.push(`## ${def.icon} ${def.name}`);\n\t\tlines.push(\"\");\n\t\tlines.push(def.description);\n\t\tlines.push(\"\");\n\t\tlines.push(`- **Image**: \\`${def.image}:${def.imageTag}\\``);\n\t\tlines.push(`- **Category**: ${def.category}`);\n\t\tlines.push(`- **Maturity**: ${def.maturity}`);\n\t\tif (def.minMemoryMB) {\n\t\t\tlines.push(`- **Min Memory**: ${def.minMemoryMB}MB`);\n\t\t}\n\t\tif (def.ports.length > 0) {\n\t\t\tlines.push(\"- **Ports**:\");\n\t\t\tfor (const p of def.ports) {\n\t\t\t\tlines.push(\n\t\t\t\t\t` - \\`${p.container}\\` — ${p.description}${p.exposed ? \"\" : \" (internal only)\"}`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tlines.push(`- **Docs**: ${def.docsUrl}`);\n\t\tlines.push(\"\");\n\t}\n\n\treturn lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;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KAAK,mBAAmB,IAAI,WAAW;AAC7C,MAAI,IAAI,YACP,OAAM,KAAK,qBAAqB,IAAI,YAAY,IAAI;AAErD,MAAI,IAAI,MAAM,SAAS,GAAG;AACzB,SAAM,KAAK,eAAe;AAC1B,QAAK,MAAM,KAAK,IAAI,MACnB,OAAM,KACL,SAAS,EAAE,UAAU,OAAO,EAAE,cAAc,EAAE,UAAU,KAAK,qBAC7D;;AAGH,QAAM,KAAK,eAAe,IAAI,UAAU;AACxC,QAAM,KAAK,GAAG;;AAGf,QAAO,MAAM,KAAK,KAAK"}
1
+ {"version":3,"file":"generate.cjs","names":["migrateConfig","resolve","StackConfigError","partitionBareMetal","resolvedWithOnlyServices","generateTraefikConfig","composeMultiFile","validate","ValidationError","generateEnvFiles","generateStackManifest","generateSkillFiles","generateOpenClawConfig","generateReadme","generateScripts","generateHealthCheck","generateN8nWorkflows","generatePostgresInit","generateCaddyfile","generatePrometheusConfig","generateGrafanaConfig","generateGrafanaDashboard","platformToNativePlatform","generateNativeInstallScripts","generateBareMetalInstall","generateGsdScripts","generateOpenclawInstallScript","generateCloudInit"],"sources":["../src/generate.ts"],"sourcesContent":["import {\n\tpartitionBareMetal,\n\tplatformToNativePlatform,\n\tresolvedWithOnlyServices,\n} from \"./bare-metal-partition.js\";\nimport { composeMultiFile } from \"./composer.js\";\nimport { StackConfigError, ValidationError } from \"./errors.js\";\nimport { generateBareMetalInstall } from \"./generators/bare-metal-install.js\";\nimport { generateCaddyfile } from \"./generators/caddy.js\";\nimport { generateCloudInit } from \"./generators/cloud-init.js\";\nimport { generateEnvFiles } from \"./generators/env.js\";\nimport { generateGsdScripts } from \"./generators/get-shit-done.js\";\nimport { generateGrafanaConfig, generateGrafanaDashboard } from \"./generators/grafana.js\";\nimport { generateHealthCheck } from \"./generators/health-check.js\";\nimport { generateN8nWorkflows } from \"./generators/n8n-workflows.js\";\nimport { generateNativeInstallScripts } from \"./generators/native-services.js\";\nimport { generateOpenclawInstallScript } from \"./generators/openclaw-install-script.js\";\nimport { generateOpenClawConfig } from \"./generators/openclaw-json.js\";\nimport { generatePostgresInit } from \"./generators/postgres-init.js\";\nimport { generatePrometheusConfig } from \"./generators/prometheus.js\";\nimport { generateReadme } from \"./generators/readme.js\";\nimport { generateScripts } from \"./generators/scripts.js\";\nimport { generateSkillFiles } from \"./generators/skills.js\";\nimport { generateStackManifest } from \"./generators/stack-manifest.js\";\nimport { generateTraefikConfig } from \"./generators/traefik.js\";\nimport { migrateConfig } from \"./migrations.js\";\nimport { resolve } from \"./resolver.js\";\nimport type {\n\tGeneratedFiles,\n\tGenerationInput,\n\tGenerationResult,\n\tPlatform,\n\tResolverInput,\n} from \"./types.js\";\nimport { validate } from \"./validator.js\";\n\n/** Resolver/compose only support linux image platforms; normalize for bare-metal (windows/macos). */\nfunction getComposePlatform(platform: Platform): \"linux/amd64\" | \"linux/arm64\" {\n\tif (platform === \"linux/amd64\" || platform === \"linux/arm64\") return platform;\n\treturn \"linux/amd64\";\n}\n\n/**\n * Main orchestration function: takes generation input, resolves dependencies,\n * generates all files, validates, and returns the complete file tree.\n */\nexport function generate(rawInput: GenerationInput): GenerationResult {\n\t// Apply config migrations if needed\n\tconst input = migrateConfig(rawInput as Record<string, unknown>) as GenerationInput;\n\n\tconst composePlatform = getComposePlatform(input.platform);\n\n\t// 1. Resolve dependencies\n\tconst resolverInput: ResolverInput = {\n\t\tservices: input.services,\n\t\tskillPacks: input.skillPacks,\n\t\taiProviders: input.aiProviders,\n\t\tproxy: input.proxy,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tmonitoring: input.monitoring,\n\t};\n\tconst resolved = resolve(resolverInput);\n\n\tif (!resolved.isValid) {\n\t\tthrow new StackConfigError(\n\t\t\t`Invalid stack configuration: ${resolved.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\tconst isBareMetal = input.deploymentType === \"bare-metal\";\n\tlet resolvedForCompose = resolved;\n\tlet nativeIds = new Set<string>();\n\tlet nativeServices: typeof resolved.services = [];\n\tlet dockerOnlyServices: typeof resolved.services = [];\n\n\tif (isBareMetal) {\n\t\tconst partition = partitionBareMetal(resolved, input.platform);\n\t\tnativeServices = partition.nativeServices;\n\t\tdockerOnlyServices = partition.dockerOnlyServices;\n\t\tnativeIds = partition.nativeIds;\n\t\tif (nativeServices.length > 0) {\n\t\t\tresolvedForCompose = resolvedWithOnlyServices(resolved, dockerOnlyServices);\n\t\t}\n\t}\n\n\t// 2. Generate Docker Compose YAML (multi-file)\n\t// Compute Traefik labels before composing (labels get injected into docker-compose services)\n\tlet traefikOutput: ReturnType<typeof generateTraefikConfig> | undefined;\n\tif (input.proxy === \"traefik\" && input.domain) {\n\t\ttraefikOutput = generateTraefikConfig(resolvedForCompose, input.domain);\n\t}\n\n\tconst composeOptions = {\n\t\tprojectName: input.projectName,\n\t\tproxy: input.proxy,\n\t\tproxyHttpPort: input.proxyHttpPort,\n\t\tproxyHttpsPort: input.proxyHttpsPort,\n\t\tportOverrides: input.portOverrides,\n\t\tdomain: input.domain,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tdeployment: input.deployment,\n\t\topenclawVersion: input.openclawVersion,\n\t\tbareMetalNativeHost: isBareMetal && nativeIds.size > 0,\n\t\ttraefikLabels: traefikOutput?.serviceLabels,\n\t\topenclawImage: input.openclawImage ?? \"official\",\n\t\thardened: input.hardened ?? true,\n\t\topenclawInstallMethod: input.openclawInstallMethod ?? \"docker\",\n\t};\n\tconst composeResult = composeMultiFile(resolvedForCompose, composeOptions);\n\n\t// 3. Validate (using the base docker-compose.yml)\n\tconst validation = validate(resolvedForCompose, composeResult.files[\"docker-compose.yml\"] ?? \"\", {\n\t\tdomain: input.domain,\n\t\tgenerateSecrets: input.generateSecrets,\n\t});\n\tif (!validation.valid) {\n\t\tthrow new ValidationError(\n\t\t\t`Validation failed: ${validation.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\t// 4. Generate all files\n\tconst files: GeneratedFiles = {};\n\n\t// Docker Compose (multi-file output)\n\tfor (const [filename, content] of Object.entries(composeResult.files)) {\n\t\tfiles[filename] = content;\n\t}\n\n\t// Environment files (when bare-metal with native services, host vars use host.docker.internal)\n\tconst envFiles = generateEnvFiles(resolved, {\n\t\tgenerateSecrets: input.generateSecrets,\n\t\tdomain: input.domain,\n\t\topenclawVersion: input.openclawVersion,\n\t\tnativeServiceIds: isBareMetal ? nativeIds : undefined,\n\t\tcomposeFiles: Object.keys(composeResult.files),\n\t\tcomposeProfiles: composeResult.profiles,\n\t\topenclawImage: input.openclawImage,\n\t});\n\tfiles[\".env.example\"] = envFiles.envExample;\n\tfiles[\".env\"] = envFiles.env;\n\n\t// .gitignore\n\tfiles[\".gitignore\"] = [\n\t\t\".env\",\n\t\t\".env.local\",\n\t\t\".env.*.local\",\n\t\t\"*.log\",\n\t\t\"docker-compose.override.yml\",\n\t].join(\"\\n\");\n\n\t// Stack manifest (consumed by Mission Control)\n\tconst manifestFiles = generateStackManifest(resolved, input);\n\tfor (const [path, content] of Object.entries(manifestFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Skills\n\tconst skillFiles = generateSkillFiles(resolved);\n\tfor (const [path, content] of Object.entries(skillFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// OpenClaw Core Configuration\n\tfiles[\"openclaw/config/openclaw.json\"] = generateOpenClawConfig(resolved, {\n\t\tdeploymentType: input.deploymentType,\n\t\tgatewayPort: 18789,\n\t\topenclawVersion: input.openclawVersion,\n\t});\n\n\t// README\n\tfiles[\"README.md\"] = generateReadme(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdomain: input.domain,\n\t\tproxy: input.proxy,\n\t\tdeploymentType: input.deploymentType,\n\t\thasNativeServices: isBareMetal && nativeServices.length > 0,\n\t\topenclawInstallMethod: input.openclawInstallMethod,\n\t});\n\n\t// Scripts\n\tconst scripts = generateScripts();\n\tfor (const [path, content] of Object.entries(scripts)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Health check scripts (dynamic, stack-specific)\n\tconst healthCheckFiles = generateHealthCheck(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdeploymentType: input.deploymentType,\n\t});\n\tfor (const [path, content] of Object.entries(healthCheckFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// n8n workflows\n\tconst n8nWorkflows = generateN8nWorkflows(resolved);\n\tfor (const [path, content] of Object.entries(n8nWorkflows)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// PostgreSQL init script (creates per-service databases and users)\n\tconst postgresInit = generatePostgresInit(resolved);\n\tif (postgresInit) {\n\t\tfiles[\"postgres/init-databases.sh\"] = postgresInit;\n\t}\n\n\t// Caddy config\n\tif (input.proxy === \"caddy\" && input.domain) {\n\t\tfiles[\"caddy/Caddyfile\"] = generateCaddyfile(resolved, input.domain);\n\t}\n\n\t// Traefik config (labels are already injected via composeOptions.traefikLabels)\n\tif (traefikOutput) {\n\t\tfiles[\"traefik/traefik.yml\"] = traefikOutput.staticConfig;\n\t}\n\n\t// Prometheus config\n\tconst hasPrometheus = resolved.services.some((s) => s.definition.id === \"prometheus\");\n\tif (hasPrometheus) {\n\t\tfiles[\"prometheus/prometheus.yml\"] = generatePrometheusConfig(resolved);\n\t}\n\n\t// Grafana config\n\tconst hasGrafana = resolved.services.some((s) => s.definition.id === \"grafana\");\n\tif (hasGrafana) {\n\t\tconst grafanaFiles = generateGrafanaConfig();\n\t\tfor (const [path, content] of Object.entries(grafanaFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t\t// Grafana dashboard\n\t\tfiles[\"config/grafana/dashboards/openclaw-stack-overview.json\"] = generateGrafanaDashboard();\n\t}\n\n\t// Docker Compose override (empty template)\n\tfiles[\"docker-compose.override.yml\"] = [\n\t\t\"# Local overrides for docker-compose.yml\",\n\t\t\"# This file is gitignored — use it for personal port changes, extra volumes, etc.\",\n\t\t\"services: {}\",\n\t\t\"\",\n\t].join(\"\\n\");\n\n\t// SERVICES.md documentation\n\tfiles[\"docs/SERVICES.md\"] = generateServicesDoc(resolved);\n\n\t// Bare-metal: native install scripts + top-level installer\n\tif (isBareMetal) {\n\t\tif (nativeServices.length > 0) {\n\t\t\tconst nativePlatform = platformToNativePlatform(input.platform);\n\t\t\tconst nativeScripts = generateNativeInstallScripts({\n\t\t\t\tnativeServices,\n\t\t\t\tplatform: nativePlatform,\n\t\t\t\tprojectName: input.projectName,\n\t\t\t});\n\t\t\tfor (const [path, content] of Object.entries(nativeScripts)) {\n\t\t\t\tfiles[path] = content;\n\t\t\t}\n\t\t}\n\t\tconst bareMetalFiles = generateBareMetalInstall({\n\t\t\tplatform: input.platform,\n\t\t\tprojectName: input.projectName,\n\t\t\thasNativeServices: nativeServices.length > 0,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(bareMetalFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Get-Shit-Done setup scripts\n\tif (input.gsdRuntimes && input.gsdRuntimes.length > 0) {\n\t\tconst gsdScripts = generateGsdScripts(input.gsdRuntimes);\n\t\tif (gsdScripts) {\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.sh\"] = gsdScripts.sh;\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.ps1\"] = gsdScripts.ps1;\n\t\t}\n\t}\n\n\t// OpenClaw direct install scripts (host-based, no Docker gateway)\n\tif (input.openclawInstallMethod === \"direct\") {\n\t\tconst installScripts = generateOpenclawInstallScript({\n\t\t\tprojectName: input.projectName,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(installScripts)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Cloud-init deploy target\n\tif (input.deployTarget === \"cloud-init\") {\n\t\tconst mainCompose = composeResult.files[\"docker-compose.yml\"] ?? \"\";\n\t\tfiles[\"cloud-init.yml\"] = generateCloudInit({\n\t\t\tcomposeYaml: mainCompose,\n\t\t\tenvContent: envFiles.env,\n\t\t\tprojectName: input.projectName,\n\t\t\tgatewayPort: 18789,\n\t\t});\n\t}\n\n\t// 5. Calculate metadata\n\tconst skillCount = resolved.services.reduce((sum, s) => sum + s.definition.skills.length, 0);\n\n\treturn {\n\t\tfiles,\n\t\tmetadata: {\n\t\t\tserviceCount: resolved.services.length,\n\t\t\tskillCount,\n\t\t\testimatedMemoryMB: resolved.estimatedMemoryMB,\n\t\t\tgeneratedAt: new Date().toISOString(),\n\t\t},\n\t};\n}\n\nexport function generateServicesDoc(resolved: import(\"./types.js\").ResolverOutput): string {\n\tconst lines: string[] = [\n\t\t\"# Service Reference\",\n\t\t\"\",\n\t\t\"This document describes all companion services in your OpenClaw stack.\",\n\t\t\"\",\n\t];\n\n\tfor (const svc of resolved.services) {\n\t\tconst def = svc.definition;\n\t\tlines.push(`## ${def.icon} ${def.name}`);\n\t\tlines.push(\"\");\n\t\tlines.push(def.description);\n\t\tlines.push(\"\");\n\t\tlines.push(`- **Image**: \\`${def.image}:${def.imageTag}\\``);\n\t\tlines.push(`- **Category**: ${def.category}`);\n\t\tlines.push(`- **Maturity**: ${def.maturity}`);\n\t\tif (def.minMemoryMB) {\n\t\t\tlines.push(`- **Min Memory**: ${def.minMemoryMB}MB`);\n\t\t}\n\t\tif (def.ports.length > 0) {\n\t\t\tlines.push(\"- **Ports**:\");\n\t\t\tfor (const p of def.ports) {\n\t\t\t\tlines.push(\n\t\t\t\t\t` - \\`${p.container}\\` — ${p.description}${p.exposed ? \"\" : \" (internal only)\"}`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tlines.push(`- **Docs**: ${def.docsUrl}`);\n\t\tlines.push(\"\");\n\t}\n\n\treturn lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAS,mBAAmB,UAAmD;AAC9E,KAAI,aAAa,iBAAiB,aAAa,cAAe,QAAO;AACrE,QAAO;;;;;;AAOR,SAAgB,SAAS,UAA6C;CAErE,MAAM,QAAQA,mBAAAA,cAAc,SAAoC;CAEhE,MAAM,kBAAkB,mBAA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AK,mBAAmB,IAAI,WAAW;AAC7C,QAAM,KAAK,mBAAmB,IAAI,WAAW;AAC7C,MAAI,IAAI,YACP,OAAM,KAAK,qBAAqB,IAAI,YAAY,IAAI;AAErD,MAAI,IAAI,MAAM,SAAS,GAAG;AACzB,SAAM,KAAK,eAAe;AAC1B,QAAK,MAAM,KAAK,IAAI,MACnB,OAAM,KACL,SAAS,EAAE,UAAU,OAAO,EAAE,cAAc,EAAE,UAAU,KAAK,qBAC7D;;AAGH,QAAM,KAAK,eAAe,IAAI,UAAU;AACxC,QAAM,KAAK,GAAG;;AAGf,QAAO,MAAM,KAAK,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"generate.d.mts","names":[],"sources":["../src/generate.ts"],"mappings":";;;;;AA8CA;;iBAAgB,QAAA,CAAS,QAAA,EAAU,eAAA,GAAkB,gBAAA;AAAA,iBA4QrC,mBAAA,CAAoB,QAAA,EAAD,cAAA"}
1
+ {"version":3,"file":"generate.d.mts","names":[],"sources":["../src/generate.ts"],"mappings":";;;;;;AA8CA;iBAAgB,QAAA,CAAS,QAAA,EAAU,eAAA,GAAkB,gBAAA;AAAA,iBA4QrC,mBAAA,CAAoB,QAAA,EAAD,cAAA"}
package/dist/generate.mjs CHANGED
@@ -22,7 +22,6 @@ import { generateStackManifest } from "./generators/stack-manifest.mjs";
22
22
  import { generateTraefikConfig } from "./generators/traefik.mjs";
23
23
  import { migrateConfig } from "./migrations.mjs";
24
24
  import { validate } from "./validator.mjs";
25
-
26
25
  //#region src/generate.ts
27
26
  /** Resolver/compose only support linux image platforms; normalize for bare-metal (windows/macos). */
28
27
  function getComposePlatform(platform) {
@@ -217,7 +216,7 @@ function generateServicesDoc(resolved) {
217
216
  }
218
217
  return lines.join("\n");
219
218
  }
220
-
221
219
  //#endregion
222
220
  export { generate, generateServicesDoc };
221
+
223
222
  //# sourceMappingURL=generate.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate.mjs","names":[],"sources":["../src/generate.ts"],"sourcesContent":["import {\n\tpartitionBareMetal,\n\tplatformToNativePlatform,\n\tresolvedWithOnlyServices,\n} from \"./bare-metal-partition.js\";\nimport { composeMultiFile } from \"./composer.js\";\nimport { StackConfigError, ValidationError } from \"./errors.js\";\nimport { generateBareMetalInstall } from \"./generators/bare-metal-install.js\";\nimport { generateCaddyfile } from \"./generators/caddy.js\";\nimport { generateCloudInit } from \"./generators/cloud-init.js\";\nimport { generateEnvFiles } from \"./generators/env.js\";\nimport { generateGsdScripts } from \"./generators/get-shit-done.js\";\nimport { generateGrafanaConfig, generateGrafanaDashboard } from \"./generators/grafana.js\";\nimport { generateHealthCheck } from \"./generators/health-check.js\";\nimport { generateN8nWorkflows } from \"./generators/n8n-workflows.js\";\nimport { generateNativeInstallScripts } from \"./generators/native-services.js\";\nimport { generateOpenclawInstallScript } from \"./generators/openclaw-install-script.js\";\nimport { generateOpenClawConfig } from \"./generators/openclaw-json.js\";\nimport { generatePostgresInit } from \"./generators/postgres-init.js\";\nimport { generatePrometheusConfig } from \"./generators/prometheus.js\";\nimport { generateReadme } from \"./generators/readme.js\";\nimport { generateScripts } from \"./generators/scripts.js\";\nimport { generateSkillFiles } from \"./generators/skills.js\";\nimport { generateStackManifest } from \"./generators/stack-manifest.js\";\nimport { generateTraefikConfig } from \"./generators/traefik.js\";\nimport { migrateConfig } from \"./migrations.js\";\nimport { resolve } from \"./resolver.js\";\nimport type {\n\tGeneratedFiles,\n\tGenerationInput,\n\tGenerationResult,\n\tPlatform,\n\tResolverInput,\n} from \"./types.js\";\nimport { validate } from \"./validator.js\";\n\n/** Resolver/compose only support linux image platforms; normalize for bare-metal (windows/macos). */\nfunction getComposePlatform(platform: Platform): \"linux/amd64\" | \"linux/arm64\" {\n\tif (platform === \"linux/amd64\" || platform === \"linux/arm64\") return platform;\n\treturn \"linux/amd64\";\n}\n\n/**\n * Main orchestration function: takes generation input, resolves dependencies,\n * generates all files, validates, and returns the complete file tree.\n */\nexport function generate(rawInput: GenerationInput): GenerationResult {\n\t// Apply config migrations if needed\n\tconst input = migrateConfig(rawInput as Record<string, unknown>) as GenerationInput;\n\n\tconst composePlatform = getComposePlatform(input.platform);\n\n\t// 1. Resolve dependencies\n\tconst resolverInput: ResolverInput = {\n\t\tservices: input.services,\n\t\tskillPacks: input.skillPacks,\n\t\taiProviders: input.aiProviders,\n\t\tproxy: input.proxy,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tmonitoring: input.monitoring,\n\t};\n\tconst resolved = resolve(resolverInput);\n\n\tif (!resolved.isValid) {\n\t\tthrow new StackConfigError(\n\t\t\t`Invalid stack configuration: ${resolved.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\tconst isBareMetal = input.deploymentType === \"bare-metal\";\n\tlet resolvedForCompose = resolved;\n\tlet nativeIds = new Set<string>();\n\tlet nativeServices: typeof resolved.services = [];\n\tlet dockerOnlyServices: typeof resolved.services = [];\n\n\tif (isBareMetal) {\n\t\tconst partition = partitionBareMetal(resolved, input.platform);\n\t\tnativeServices = partition.nativeServices;\n\t\tdockerOnlyServices = partition.dockerOnlyServices;\n\t\tnativeIds = partition.nativeIds;\n\t\tif (nativeServices.length > 0) {\n\t\t\tresolvedForCompose = resolvedWithOnlyServices(resolved, dockerOnlyServices);\n\t\t}\n\t}\n\n\t// 2. Generate Docker Compose YAML (multi-file)\n\t// Compute Traefik labels before composing (labels get injected into docker-compose services)\n\tlet traefikOutput: ReturnType<typeof generateTraefikConfig> | undefined;\n\tif (input.proxy === \"traefik\" && input.domain) {\n\t\ttraefikOutput = generateTraefikConfig(resolvedForCompose, input.domain);\n\t}\n\n\tconst composeOptions = {\n\t\tprojectName: input.projectName,\n\t\tproxy: input.proxy,\n\t\tproxyHttpPort: input.proxyHttpPort,\n\t\tproxyHttpsPort: input.proxyHttpsPort,\n\t\tportOverrides: input.portOverrides,\n\t\tdomain: input.domain,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tdeployment: input.deployment,\n\t\topenclawVersion: input.openclawVersion,\n\t\tbareMetalNativeHost: isBareMetal && nativeIds.size > 0,\n\t\ttraefikLabels: traefikOutput?.serviceLabels,\n\t\topenclawImage: input.openclawImage ?? \"official\",\n\t\thardened: input.hardened ?? true,\n\t\topenclawInstallMethod: input.openclawInstallMethod ?? \"docker\",\n\t};\n\tconst composeResult = composeMultiFile(resolvedForCompose, composeOptions);\n\n\t// 3. Validate (using the base docker-compose.yml)\n\tconst validation = validate(resolvedForCompose, composeResult.files[\"docker-compose.yml\"] ?? \"\", {\n\t\tdomain: input.domain,\n\t\tgenerateSecrets: input.generateSecrets,\n\t});\n\tif (!validation.valid) {\n\t\tthrow new ValidationError(\n\t\t\t`Validation failed: ${validation.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\t// 4. Generate all files\n\tconst files: GeneratedFiles = {};\n\n\t// Docker Compose (multi-file output)\n\tfor (const [filename, content] of Object.entries(composeResult.files)) {\n\t\tfiles[filename] = content;\n\t}\n\n\t// Environment files (when bare-metal with native services, host vars use host.docker.internal)\n\tconst envFiles = generateEnvFiles(resolved, {\n\t\tgenerateSecrets: input.generateSecrets,\n\t\tdomain: input.domain,\n\t\topenclawVersion: input.openclawVersion,\n\t\tnativeServiceIds: isBareMetal ? nativeIds : undefined,\n\t\tcomposeFiles: Object.keys(composeResult.files),\n\t\tcomposeProfiles: composeResult.profiles,\n\t\topenclawImage: input.openclawImage,\n\t});\n\tfiles[\".env.example\"] = envFiles.envExample;\n\tfiles[\".env\"] = envFiles.env;\n\n\t// .gitignore\n\tfiles[\".gitignore\"] = [\n\t\t\".env\",\n\t\t\".env.local\",\n\t\t\".env.*.local\",\n\t\t\"*.log\",\n\t\t\"docker-compose.override.yml\",\n\t].join(\"\\n\");\n\n\t// Stack manifest (consumed by Mission Control)\n\tconst manifestFiles = generateStackManifest(resolved, input);\n\tfor (const [path, content] of Object.entries(manifestFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Skills\n\tconst skillFiles = generateSkillFiles(resolved);\n\tfor (const [path, content] of Object.entries(skillFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// OpenClaw Core Configuration\n\tfiles[\"openclaw/config/openclaw.json\"] = generateOpenClawConfig(resolved, {\n\t\tdeploymentType: input.deploymentType,\n\t\tgatewayPort: 18789,\n\t\topenclawVersion: input.openclawVersion,\n\t});\n\n\t// README\n\tfiles[\"README.md\"] = generateReadme(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdomain: input.domain,\n\t\tproxy: input.proxy,\n\t\tdeploymentType: input.deploymentType,\n\t\thasNativeServices: isBareMetal && nativeServices.length > 0,\n\t\topenclawInstallMethod: input.openclawInstallMethod,\n\t});\n\n\t// Scripts\n\tconst scripts = generateScripts();\n\tfor (const [path, content] of Object.entries(scripts)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Health check scripts (dynamic, stack-specific)\n\tconst healthCheckFiles = generateHealthCheck(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdeploymentType: input.deploymentType,\n\t});\n\tfor (const [path, content] of Object.entries(healthCheckFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// n8n workflows\n\tconst n8nWorkflows = generateN8nWorkflows(resolved);\n\tfor (const [path, content] of Object.entries(n8nWorkflows)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// PostgreSQL init script (creates per-service databases and users)\n\tconst postgresInit = generatePostgresInit(resolved);\n\tif (postgresInit) {\n\t\tfiles[\"postgres/init-databases.sh\"] = postgresInit;\n\t}\n\n\t// Caddy config\n\tif (input.proxy === \"caddy\" && input.domain) {\n\t\tfiles[\"caddy/Caddyfile\"] = generateCaddyfile(resolved, input.domain);\n\t}\n\n\t// Traefik config (labels are already injected via composeOptions.traefikLabels)\n\tif (traefikOutput) {\n\t\tfiles[\"traefik/traefik.yml\"] = traefikOutput.staticConfig;\n\t}\n\n\t// Prometheus config\n\tconst hasPrometheus = resolved.services.some((s) => s.definition.id === \"prometheus\");\n\tif (hasPrometheus) {\n\t\tfiles[\"prometheus/prometheus.yml\"] = generatePrometheusConfig(resolved);\n\t}\n\n\t// Grafana config\n\tconst hasGrafana = resolved.services.some((s) => s.definition.id === \"grafana\");\n\tif (hasGrafana) {\n\t\tconst grafanaFiles = generateGrafanaConfig();\n\t\tfor (const [path, content] of Object.entries(grafanaFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t\t// Grafana dashboard\n\t\tfiles[\"config/grafana/dashboards/openclaw-stack-overview.json\"] = generateGrafanaDashboard();\n\t}\n\n\t// Docker Compose override (empty template)\n\tfiles[\"docker-compose.override.yml\"] = [\n\t\t\"# Local overrides for docker-compose.yml\",\n\t\t\"# This file is gitignored — use it for personal port changes, extra volumes, etc.\",\n\t\t\"services: {}\",\n\t\t\"\",\n\t].join(\"\\n\");\n\n\t// SERVICES.md documentation\n\tfiles[\"docs/SERVICES.md\"] = generateServicesDoc(resolved);\n\n\t// Bare-metal: native install scripts + top-level installer\n\tif (isBareMetal) {\n\t\tif (nativeServices.length > 0) {\n\t\t\tconst nativePlatform = platformToNativePlatform(input.platform);\n\t\t\tconst nativeScripts = generateNativeInstallScripts({\n\t\t\t\tnativeServices,\n\t\t\t\tplatform: nativePlatform,\n\t\t\t\tprojectName: input.projectName,\n\t\t\t});\n\t\t\tfor (const [path, content] of Object.entries(nativeScripts)) {\n\t\t\t\tfiles[path] = content;\n\t\t\t}\n\t\t}\n\t\tconst bareMetalFiles = generateBareMetalInstall({\n\t\t\tplatform: input.platform,\n\t\t\tprojectName: input.projectName,\n\t\t\thasNativeServices: nativeServices.length > 0,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(bareMetalFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Get-Shit-Done setup scripts\n\tif (input.gsdRuntimes && input.gsdRuntimes.length > 0) {\n\t\tconst gsdScripts = generateGsdScripts(input.gsdRuntimes);\n\t\tif (gsdScripts) {\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.sh\"] = gsdScripts.sh;\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.ps1\"] = gsdScripts.ps1;\n\t\t}\n\t}\n\n\t// OpenClaw direct install scripts (host-based, no Docker gateway)\n\tif (input.openclawInstallMethod === \"direct\") {\n\t\tconst installScripts = generateOpenclawInstallScript({\n\t\t\tprojectName: input.projectName,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(installScripts)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Cloud-init deploy target\n\tif (input.deployTarget === \"cloud-init\") {\n\t\tconst mainCompose = composeResult.files[\"docker-compose.yml\"] ?? \"\";\n\t\tfiles[\"cloud-init.yml\"] = generateCloudInit({\n\t\t\tcomposeYaml: mainCompose,\n\t\t\tenvContent: envFiles.env,\n\t\t\tprojectName: input.projectName,\n\t\t\tgatewayPort: 18789,\n\t\t});\n\t}\n\n\t// 5. Calculate metadata\n\tconst skillCount = resolved.services.reduce((sum, s) => sum + s.definition.skills.length, 0);\n\n\treturn {\n\t\tfiles,\n\t\tmetadata: {\n\t\t\tserviceCount: resolved.services.length,\n\t\t\tskillCount,\n\t\t\testimatedMemoryMB: resolved.estimatedMemoryMB,\n\t\t\tgeneratedAt: new Date().toISOString(),\n\t\t},\n\t};\n}\n\nexport function generateServicesDoc(resolved: import(\"./types.js\").ResolverOutput): string {\n\tconst lines: string[] = [\n\t\t\"# Service Reference\",\n\t\t\"\",\n\t\t\"This document describes all companion services in your OpenClaw stack.\",\n\t\t\"\",\n\t];\n\n\tfor (const svc of resolved.services) {\n\t\tconst def = svc.definition;\n\t\tlines.push(`## ${def.icon} ${def.name}`);\n\t\tlines.push(\"\");\n\t\tlines.push(def.description);\n\t\tlines.push(\"\");\n\t\tlines.push(`- **Image**: \\`${def.image}:${def.imageTag}\\``);\n\t\tlines.push(`- **Category**: ${def.category}`);\n\t\tlines.push(`- **Maturity**: ${def.maturity}`);\n\t\tif (def.minMemoryMB) {\n\t\t\tlines.push(`- **Min Memory**: ${def.minMemoryMB}MB`);\n\t\t}\n\t\tif (def.ports.length > 0) {\n\t\t\tlines.push(\"- **Ports**:\");\n\t\t\tfor (const p of def.ports) {\n\t\t\t\tlines.push(\n\t\t\t\t\t` - \\`${p.container}\\` — ${p.description}${p.exposed ? \"\" : \" (internal only)\"}`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tlines.push(`- **Docs**: ${def.docsUrl}`);\n\t\tlines.push(\"\");\n\t}\n\n\treturn lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAS,mBAAmB,UAAmD;AAC9E,KAAI,aAAa,iBAAiB,aAAa,cAAe,QAAO;AACrE,QAAO;;;;;;AAOR,SAAgB,SAAS,UAA6C;CAErE,MAAM,QAAQ,cAAc,SAAoC;CAEhE,MAAM,kBAAkB,mBAAmB,MAAM,SAAS;CAY1D,MAAM,WAAW,QAToB;EACpC,UAAU,MAAM;EAChB,YAAY,MAAM;EAClB,aAAa,MAAM;EACnB,OAAO,MAAM;EACb,KAAK,MAAM;EACX,UAAU;EACV,YAAY,MAAM;EAClB,CACsC;AAEvC,KAAI,CAAC,SAAS,QACb,OAAM,IAAI,iBACT,gCAAgC,SAAS,OAAO,KAAK,MAAM,EAAE,QAAQ,CAAC,KAAK,KAAK,GAChF;CAGF,MAAM,cAAc,MAAM,mBAAmB;CAC7C,IAAI,qBAAqB;CACzB,IAAI,4BAAY,IAAI,KAAa;CACjC,IAAI,iBAA2C,EAAE;CACjD,IAAI,qBAA+C,EAAE;AAErD,KAAI,aAAa;EAChB,MAAM,YAAY,mBAAmB,UAAU,MAAM,SAAS;AAC9D,mBAAiB,UAAU;AAC3B,uBAAqB,UAAU;AAC/B,cAAY,UAAU;AACtB,MAAI,eAAe,SAAS,EAC3B,sBAAqB,yBAAyB,UAAU,mBAAmB;;CAM7E,IAAI;AACJ,KAAI,MAAM,UAAU,aAAa,MAAM,OACtC,iBAAgB,sBAAsB,oBAAoB,MAAM,OAAO;CAGxE,MA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,OAAO,SAAS,UAAU;EACpC,MAAM,MAAM,IAAI;AAChB,QAAM,KAAK,MAAM,IAAI,KAAK,GAAG,IAAI,OAAO;AACxC,QAAM,KAAK,GAAG;AACd,QAAM,KAAK,IAAI,YAAY;AAC3B,QAAM,KAAK,GAAG;AACd,QAAM,KAAK,kBAAkB,IAAI,MAAM,GAAG,IAAI,SAAS,IAAI;AAC3D,QAAM,KAAK,mBAAmB,IAAI,WAAW;AAC7C,QAAM,KAAK,mBAAmB,IAAI,WAAW;AAC7C,MAAI,IAAI,YACP,OAAM,KAAK,qBAAqB,IAAI,YAAY,IAAI;AAErD,MAAI,IAAI,MAAM,SAAS,GAAG;AACzB,SAAM,KAAK,eAAe;AAC1B,QAAK,MAAM,KAAK,IAAI,MACnB,OAAM,KACL,SAAS,EAAE,UAAU,OAAO,EAAE,cAAc,EAAE,UAAU,KAAK,qBAC7D;;AAGH,QAAM,KAAK,eAAe,IAAI,UAAU;AACxC,QAAM,KAAK,GAAG;;AAGf,QAAO,MAAM,KAAK,KAAK"}
1
+ {"version":3,"file":"generate.mjs","names":[],"sources":["../src/generate.ts"],"sourcesContent":["import {\n\tpartitionBareMetal,\n\tplatformToNativePlatform,\n\tresolvedWithOnlyServices,\n} from \"./bare-metal-partition.js\";\nimport { composeMultiFile } from \"./composer.js\";\nimport { StackConfigError, ValidationError } from \"./errors.js\";\nimport { generateBareMetalInstall } from \"./generators/bare-metal-install.js\";\nimport { generateCaddyfile } from \"./generators/caddy.js\";\nimport { generateCloudInit } from \"./generators/cloud-init.js\";\nimport { generateEnvFiles } from \"./generators/env.js\";\nimport { generateGsdScripts } from \"./generators/get-shit-done.js\";\nimport { generateGrafanaConfig, generateGrafanaDashboard } from \"./generators/grafana.js\";\nimport { generateHealthCheck } from \"./generators/health-check.js\";\nimport { generateN8nWorkflows } from \"./generators/n8n-workflows.js\";\nimport { generateNativeInstallScripts } from \"./generators/native-services.js\";\nimport { generateOpenclawInstallScript } from \"./generators/openclaw-install-script.js\";\nimport { generateOpenClawConfig } from \"./generators/openclaw-json.js\";\nimport { generatePostgresInit } from \"./generators/postgres-init.js\";\nimport { generatePrometheusConfig } from \"./generators/prometheus.js\";\nimport { generateReadme } from \"./generators/readme.js\";\nimport { generateScripts } from \"./generators/scripts.js\";\nimport { generateSkillFiles } from \"./generators/skills.js\";\nimport { generateStackManifest } from \"./generators/stack-manifest.js\";\nimport { generateTraefikConfig } from \"./generators/traefik.js\";\nimport { migrateConfig } from \"./migrations.js\";\nimport { resolve } from \"./resolver.js\";\nimport type {\n\tGeneratedFiles,\n\tGenerationInput,\n\tGenerationResult,\n\tPlatform,\n\tResolverInput,\n} from \"./types.js\";\nimport { validate } from \"./validator.js\";\n\n/** Resolver/compose only support linux image platforms; normalize for bare-metal (windows/macos). */\nfunction getComposePlatform(platform: Platform): \"linux/amd64\" | \"linux/arm64\" {\n\tif (platform === \"linux/amd64\" || platform === \"linux/arm64\") return platform;\n\treturn \"linux/amd64\";\n}\n\n/**\n * Main orchestration function: takes generation input, resolves dependencies,\n * generates all files, validates, and returns the complete file tree.\n */\nexport function generate(rawInput: GenerationInput): GenerationResult {\n\t// Apply config migrations if needed\n\tconst input = migrateConfig(rawInput as Record<string, unknown>) as GenerationInput;\n\n\tconst composePlatform = getComposePlatform(input.platform);\n\n\t// 1. Resolve dependencies\n\tconst resolverInput: ResolverInput = {\n\t\tservices: input.services,\n\t\tskillPacks: input.skillPacks,\n\t\taiProviders: input.aiProviders,\n\t\tproxy: input.proxy,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tmonitoring: input.monitoring,\n\t};\n\tconst resolved = resolve(resolverInput);\n\n\tif (!resolved.isValid) {\n\t\tthrow new StackConfigError(\n\t\t\t`Invalid stack configuration: ${resolved.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\tconst isBareMetal = input.deploymentType === \"bare-metal\";\n\tlet resolvedForCompose = resolved;\n\tlet nativeIds = new Set<string>();\n\tlet nativeServices: typeof resolved.services = [];\n\tlet dockerOnlyServices: typeof resolved.services = [];\n\n\tif (isBareMetal) {\n\t\tconst partition = partitionBareMetal(resolved, input.platform);\n\t\tnativeServices = partition.nativeServices;\n\t\tdockerOnlyServices = partition.dockerOnlyServices;\n\t\tnativeIds = partition.nativeIds;\n\t\tif (nativeServices.length > 0) {\n\t\t\tresolvedForCompose = resolvedWithOnlyServices(resolved, dockerOnlyServices);\n\t\t}\n\t}\n\n\t// 2. Generate Docker Compose YAML (multi-file)\n\t// Compute Traefik labels before composing (labels get injected into docker-compose services)\n\tlet traefikOutput: ReturnType<typeof generateTraefikConfig> | undefined;\n\tif (input.proxy === \"traefik\" && input.domain) {\n\t\ttraefikOutput = generateTraefikConfig(resolvedForCompose, input.domain);\n\t}\n\n\tconst composeOptions = {\n\t\tprojectName: input.projectName,\n\t\tproxy: input.proxy,\n\t\tproxyHttpPort: input.proxyHttpPort,\n\t\tproxyHttpsPort: input.proxyHttpsPort,\n\t\tportOverrides: input.portOverrides,\n\t\tdomain: input.domain,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tdeployment: input.deployment,\n\t\topenclawVersion: input.openclawVersion,\n\t\tbareMetalNativeHost: isBareMetal && nativeIds.size > 0,\n\t\ttraefikLabels: traefikOutput?.serviceLabels,\n\t\topenclawImage: input.openclawImage ?? \"official\",\n\t\thardened: input.hardened ?? true,\n\t\topenclawInstallMethod: input.openclawInstallMethod ?? \"docker\",\n\t};\n\tconst composeResult = composeMultiFile(resolvedForCompose, composeOptions);\n\n\t// 3. Validate (using the base docker-compose.yml)\n\tconst validation = validate(resolvedForCompose, composeResult.files[\"docker-compose.yml\"] ?? \"\", {\n\t\tdomain: input.domain,\n\t\tgenerateSecrets: input.generateSecrets,\n\t});\n\tif (!validation.valid) {\n\t\tthrow new ValidationError(\n\t\t\t`Validation failed: ${validation.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\t// 4. Generate all files\n\tconst files: GeneratedFiles = {};\n\n\t// Docker Compose (multi-file output)\n\tfor (const [filename, content] of Object.entries(composeResult.files)) {\n\t\tfiles[filename] = content;\n\t}\n\n\t// Environment files (when bare-metal with native services, host vars use host.docker.internal)\n\tconst envFiles = generateEnvFiles(resolved, {\n\t\tgenerateSecrets: input.generateSecrets,\n\t\tdomain: input.domain,\n\t\topenclawVersion: input.openclawVersion,\n\t\tnativeServiceIds: isBareMetal ? nativeIds : undefined,\n\t\tcomposeFiles: Object.keys(composeResult.files),\n\t\tcomposeProfiles: composeResult.profiles,\n\t\topenclawImage: input.openclawImage,\n\t});\n\tfiles[\".env.example\"] = envFiles.envExample;\n\tfiles[\".env\"] = envFiles.env;\n\n\t// .gitignore\n\tfiles[\".gitignore\"] = [\n\t\t\".env\",\n\t\t\".env.local\",\n\t\t\".env.*.local\",\n\t\t\"*.log\",\n\t\t\"docker-compose.override.yml\",\n\t].join(\"\\n\");\n\n\t// Stack manifest (consumed by Mission Control)\n\tconst manifestFiles = generateStackManifest(resolved, input);\n\tfor (const [path, content] of Object.entries(manifestFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Skills\n\tconst skillFiles = generateSkillFiles(resolved);\n\tfor (const [path, content] of Object.entries(skillFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// OpenClaw Core Configuration\n\tfiles[\"openclaw/config/openclaw.json\"] = generateOpenClawConfig(resolved, {\n\t\tdeploymentType: input.deploymentType,\n\t\tgatewayPort: 18789,\n\t\topenclawVersion: input.openclawVersion,\n\t});\n\n\t// README\n\tfiles[\"README.md\"] = generateReadme(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdomain: input.domain,\n\t\tproxy: input.proxy,\n\t\tdeploymentType: input.deploymentType,\n\t\thasNativeServices: isBareMetal && nativeServices.length > 0,\n\t\topenclawInstallMethod: input.openclawInstallMethod,\n\t});\n\n\t// Scripts\n\tconst scripts = generateScripts();\n\tfor (const [path, content] of Object.entries(scripts)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Health check scripts (dynamic, stack-specific)\n\tconst healthCheckFiles = generateHealthCheck(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdeploymentType: input.deploymentType,\n\t});\n\tfor (const [path, content] of Object.entries(healthCheckFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// n8n workflows\n\tconst n8nWorkflows = generateN8nWorkflows(resolved);\n\tfor (const [path, content] of Object.entries(n8nWorkflows)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// PostgreSQL init script (creates per-service databases and users)\n\tconst postgresInit = generatePostgresInit(resolved);\n\tif (postgresInit) {\n\t\tfiles[\"postgres/init-databases.sh\"] = postgresInit;\n\t}\n\n\t// Caddy config\n\tif (input.proxy === \"caddy\" && input.domain) {\n\t\tfiles[\"caddy/Caddyfile\"] = generateCaddyfile(resolved, input.domain);\n\t}\n\n\t// Traefik config (labels are already injected via composeOptions.traefikLabels)\n\tif (traefikOutput) {\n\t\tfiles[\"traefik/traefik.yml\"] = traefikOutput.staticConfig;\n\t}\n\n\t// Prometheus config\n\tconst hasPrometheus = resolved.services.some((s) => s.definition.id === \"prometheus\");\n\tif (hasPrometheus) {\n\t\tfiles[\"prometheus/prometheus.yml\"] = generatePrometheusConfig(resolved);\n\t}\n\n\t// Grafana config\n\tconst hasGrafana = resolved.services.some((s) => s.definition.id === \"grafana\");\n\tif (hasGrafana) {\n\t\tconst grafanaFiles = generateGrafanaConfig();\n\t\tfor (const [path, content] of Object.entries(grafanaFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t\t// Grafana dashboard\n\t\tfiles[\"config/grafana/dashboards/openclaw-stack-overview.json\"] = generateGrafanaDashboard();\n\t}\n\n\t// Docker Compose override (empty template)\n\tfiles[\"docker-compose.override.yml\"] = [\n\t\t\"# Local overrides for docker-compose.yml\",\n\t\t\"# This file is gitignored — use it for personal port changes, extra volumes, etc.\",\n\t\t\"services: {}\",\n\t\t\"\",\n\t].join(\"\\n\");\n\n\t// SERVICES.md documentation\n\tfiles[\"docs/SERVICES.md\"] = generateServicesDoc(resolved);\n\n\t// Bare-metal: native install scripts + top-level installer\n\tif (isBareMetal) {\n\t\tif (nativeServices.length > 0) {\n\t\t\tconst nativePlatform = platformToNativePlatform(input.platform);\n\t\t\tconst nativeScripts = generateNativeInstallScripts({\n\t\t\t\tnativeServices,\n\t\t\t\tplatform: nativePlatform,\n\t\t\t\tprojectName: input.projectName,\n\t\t\t});\n\t\t\tfor (const [path, content] of Object.entries(nativeScripts)) {\n\t\t\t\tfiles[path] = content;\n\t\t\t}\n\t\t}\n\t\tconst bareMetalFiles = generateBareMetalInstall({\n\t\t\tplatform: input.platform,\n\t\t\tprojectName: input.projectName,\n\t\t\thasNativeServices: nativeServices.length > 0,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(bareMetalFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Get-Shit-Done setup scripts\n\tif (input.gsdRuntimes && input.gsdRuntimes.length > 0) {\n\t\tconst gsdScripts = generateGsdScripts(input.gsdRuntimes);\n\t\tif (gsdScripts) {\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.sh\"] = gsdScripts.sh;\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.ps1\"] = gsdScripts.ps1;\n\t\t}\n\t}\n\n\t// OpenClaw direct install scripts (host-based, no Docker gateway)\n\tif (input.openclawInstallMethod === \"direct\") {\n\t\tconst installScripts = generateOpenclawInstallScript({\n\t\t\tprojectName: input.projectName,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(installScripts)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Cloud-init deploy target\n\tif (input.deployTarget === \"cloud-init\") {\n\t\tconst mainCompose = composeResult.files[\"docker-compose.yml\"] ?? \"\";\n\t\tfiles[\"cloud-init.yml\"] = generateCloudInit({\n\t\t\tcomposeYaml: mainCompose,\n\t\t\tenvContent: envFiles.env,\n\t\t\tprojectName: input.projectName,\n\t\t\tgatewayPort: 18789,\n\t\t});\n\t}\n\n\t// 5. Calculate metadata\n\tconst skillCount = resolved.services.reduce((sum, s) => sum + s.definition.skills.length, 0);\n\n\treturn {\n\t\tfiles,\n\t\tmetadata: {\n\t\t\tserviceCount: resolved.services.length,\n\t\t\tskillCount,\n\t\t\testimatedMemoryMB: resolved.estimatedMemoryMB,\n\t\t\tgeneratedAt: new Date().toISOString(),\n\t\t},\n\t};\n}\n\nexport function generateServicesDoc(resolved: import(\"./types.js\").ResolverOutput): string {\n\tconst lines: string[] = [\n\t\t\"# Service Reference\",\n\t\t\"\",\n\t\t\"This document describes all companion services in your OpenClaw stack.\",\n\t\t\"\",\n\t];\n\n\tfor (const svc of resolved.services) {\n\t\tconst def = svc.definition;\n\t\tlines.push(`## ${def.icon} ${def.name}`);\n\t\tlines.push(\"\");\n\t\tlines.push(def.description);\n\t\tlines.push(\"\");\n\t\tlines.push(`- **Image**: \\`${def.image}:${def.imageTag}\\``);\n\t\tlines.push(`- **Category**: ${def.category}`);\n\t\tlines.push(`- **Maturity**: ${def.maturity}`);\n\t\tif (def.minMemoryMB) {\n\t\t\tlines.push(`- **Min Memory**: ${def.minMemoryMB}MB`);\n\t\t}\n\t\tif (def.ports.length > 0) {\n\t\t\tlines.push(\"- **Ports**:\");\n\t\t\tfor (const p of def.ports) {\n\t\t\t\tlines.push(\n\t\t\t\t\t` - \\`${p.container}\\` — ${p.description}${p.exposed ? \"\" : \" (internal only)\"}`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tlines.push(`- **Docs**: ${def.docsUrl}`);\n\t\tlines.push(\"\");\n\t}\n\n\treturn lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAS,mBAAmB,UAAmD;AAC9E,KAAI,aAAa,iBAAiB,aAAa,cAAe,QAAO;AACrE,QAAO;;;;;;AAOR,SAAgB,SAAS,UAA6C;CAErE,MAAM,QAAQ,cAAc,SAAoC;CAEhE,MAAM,kBAAkB,mBAAmB,MAAM,SAAS;CAY1D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AAU,KAAK,qBAC7D;;AAGH,QAAM,KAAK,eAAe,IAAI,UAAU;AACxC,QAAM,KAAK,GAAG;;AAGf,QAAO,MAAM,KAAK,KAAK"}
@@ -1,8 +1,7 @@
1
- const require_chunk = require('./chunk-C0xms8kb.cjs');
2
- const require_vi_2VT5v0um = require('./vi.2VT5v0um-BmRMvymT.cjs');
3
- const require_generate = require('./generate.cjs');
1
+ require("./skills-BlzpHmpH.cjs");
2
+ const require_vi_2VT5v0um = require("./vi.2VT5v0um-CRqXre87.cjs");
3
+ const require_generate = require("./generate.cjs");
4
4
  let yaml = require("yaml");
5
-
6
5
  //#region src/generate.test.ts
7
6
  require_vi_2VT5v0um.describe("generate (end-to-end)", () => {
8
7
  require_vi_2VT5v0um.it("generates a minimal stack (redis only)", () => {
@@ -278,6 +277,6 @@ require_vi_2VT5v0um.describe("generate (end-to-end)", () => {
278
277
  }
279
278
  });
280
279
  });
281
-
282
280
  //#endregion
281
+
283
282
  //# sourceMappingURL=generate.test.cjs.map
@@ -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\texpect(result.metadata.serviceCount).toBe(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,6BAAS,+BAA+B;AACvC,wBAAG,gDAAgD;EAClD,MAAM,SAASC,0BAAS;GACvB,aAAa;GACb,UAAU,CAAC,QAAQ;GACnB,YAAY,EAAE;GACd,OAAO;GACP,KAAK;GACL,UAAU;GACV,YAAY;GACZ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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,qCAAO,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\texpect(result.metadata.serviceCount).toBe(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,oBAAAA,SAAS,+BAA+B;AACvC,qBAAA,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,sBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,qBAAqB;AACzD,sBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,eAAe;AACnD,sBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,OAAO;A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M,QAAS,OAAO,CAAC,gBAAgB,EAAE;;GAEvD;AAEF,qBAAA,GAAG,uDAAuD;EAczD,MAAM,QAbSA,iBAAAA,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,wBAAA,aAAO,aAAa,CAAC,KAAK,KAAK;;;GAGhC;EACD"}
@@ -1,7 +1,6 @@
1
- import { n as describe, r as it, t as globalExpect } from "./vi.2VT5v0um-CFyDIn0m.mjs";
1
+ import { n as describe, r as it, t as globalExpect } from "./vi.2VT5v0um-DvC3SVNc.mjs";
2
2
  import { generate } from "./generate.mjs";
3
3
  import { parse } from "yaml";
4
-
5
4
  //#region src/generate.test.ts
6
5
  describe("generate (end-to-end)", () => {
7
6
  it("generates a minimal stack (redis only)", () => {
@@ -277,7 +276,7 @@ describe("generate (end-to-end)", () => {
277
276
  }
278
277
  });
279
278
  });
280
-
281
279
  //#endregion
282
- export { };
280
+ export {};
281
+
283
282
  //# sourceMappingURL=generate.test.mjs.map
@@ -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\texpect(result.metadata.serviceCount).toBe(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":";;;;;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;GACV,YAAY;GACZ,iBAAiB;GACjB,iBAAiB;GACjB,CAAC;AAGF,eAAO,OAAO,MAAM,CAAC,eAAe,qBAAqB;AACzD,eAAO,OAAO,MAAM,CAAC,eAAe,eAAe;AACnD,eAAO,OAAO,MAAM,CAAC,eAAe,OAAO;AAC3C,eAAO,OAAO,MAAM,CAAC,eAAe,YAAY;AAIhD,eADiB,MAAM,OAAO,MAAM,sBAAuB,CAC3C,CAAC,eAAe,WAAW;AAG3C,eAAO,OAAO,MAAM,gBAAgB,CAAC,UAAU,iBAAiB;AAGhE,eAAO,OAAO,MAAM,aAAa,CAAC,UAAU,aAAa;AAGzD,eAAO,OAAO,SAAS,aAAa,CAAC,uBAAuB,EAAE;GAC7D;AAEF,IAAG,wDAAwD;EAC1D,MAAM,SAAS,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,eAAO,OAAO,MAAM,CAAC,eAAe,mDAAmD;AACvF,eAAO,OAAO,MAAM,CAAC,eAAe,oDAAoD;AACxF,eAAO,OAAO,MAAM,CAA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AAY;GACZ,iBAAiB;GACjB,iBAAiB;GACjB,CAAC;AAUF,OAAK,MAAM,UARa;GACvB;GACA;GACA;GACA;GACA;GACA,EAEqC;AACrC,gBAAO,OAAO,MAAM,CAAC,eAAe,OAAO;AAC3C,gBAAO,OAAO,MAAM,QAAS,OAAO,CAAC,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\texpect(result.metadata.serviceCount).toBe(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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;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,5 +1,4 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
2
  //#region src/generators/bare-metal-install.ts
4
3
  const LINUX_SCRIPT_PREFIX_NATIVE = `
5
4
  # Native services (install/start on host first)
@@ -220,7 +219,7 @@ function generateBareMetalInstall(options) {
220
219
  files["install.sh"] = baseScript.replace("__NATIVE_BLOCK__", prefix);
221
220
  return files;
222
221
  }
223
-
224
222
  //#endregion
225
223
  exports.generateBareMetalInstall = generateBareMetalInstall;
224
+
226
225
  //# sourceMappingURL=bare-metal-install.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"bare-metal-install.cjs","names":[],"sources":["../../src/generators/bare-metal-install.ts"],"sourcesContent":["/**\n * Generates platform-specific installer scripts for bare-metal (VPS, computer) deployment.\n * Each script ensures Docker and Docker Compose are installed, then runs the stack.\n * Returns a map of one file: install.sh (Linux/macOS) or install.ps1 (Windows).\n */\nimport type { Platform } from \"../types.js\";\n\nconst LINUX_SCRIPT_PREFIX_NATIVE = `\n# Native services (install/start on host first)\nif [ -f \"native/install-linux.sh\" ]; then\n info \"Installing and starting native services...\"\n bash native/install-linux.sh\n ok \"Native services ready.\"\nfi\n`;\n\nconst LINUX_SCRIPT = `#!/usr/bin/env bash\nset -euo pipefail\n\n# OpenClaw bare-metal installer (Linux)\n# Optionally runs native services script, then Docker + Compose.\n# Idempotent: safe to re-run.\n\nSCRIPT_DIR=\"$(cd \"$(dirname \"\\${BASH_SOURCE[0]}\")\" && pwd)\"\ncd \"$SCRIPT_DIR\"\n\nif [ -t 1 ]; then\n RED='\\\\033[0;31m'; GREEN='\\\\033[0;32m'; YELLOW='\\\\033[1;33m'; CYAN='\\\\033[0;36m'; NC='\\\\033[0m'\nelse\n RED=''; GREEN=''; YELLOW=''; CYAN=''; NC=''\nfi\ninfo() { echo -e \"\\${CYAN}ℹ $*\\${NC}\"; }\nok() { echo -e \"\\${GREEN}✅ $*\\${NC}\"; }\nwarn() { echo -e \"\\${YELLOW}⚠️ $*\\${NC}\"; }\nerr() { echo -e \"\\${RED}❌ $*\\${NC}\" >&2; }\n__NATIVE_BLOCK__\n# Install Docker if missing\nif ! command -v docker &> /dev/null; then\n info \"Installing Docker...\"\n if command -v apt-get &> /dev/null; then\n sudo apt-get update -qq\n sudo apt-get install -y -qq ca-certificates curl\n curl -fsSL https://get.docker.com | sudo sh\n sudo usermod -aG docker \"$USER\" 2>/dev/null || true\n ok \"Docker installed. You may need to log out and back in for group changes.\"\n elif command -v dnf &> /dev/null || command -v yum &> /dev/null; then\n sudo dnf install -y dnf-plugins-core 2>/dev/null || sudo yum install -y yum-utils\n sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo 2>/dev/null || sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo\n sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin 2>/dev/null || sudo yum install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin\n sudo systemctl enable --now docker\n sudo usermod -aG docker \"$USER\" 2>/dev/null || true\n ok \"Docker installed.\"\n else\n err \"Unsupported package manager. Install Docker manually: https://docs.docker.com/engine/install/\"\n exit 1\n fi\nelse\n ok \"Docker already installed.\"\nfi\n\nif ! docker compose version &> /dev/null; then\n err \"Docker Compose (v2) plugin not found. Install it: https://docs.docker.com/compose/install/\"\n exit 1\nfi\n\nif ! docker info &> /dev/null 2>&1; then\n err \"Docker daemon not running. Start it (e.g. sudo systemctl start docker) and re-run this script.\"\n exit 1\nfi\n\n# Use project start script if present, else docker compose up\nif [ -f \"scripts/start.sh\" ]; then\n info \"Starting stack via scripts/start.sh...\"\n bash scripts/start.sh\nelse\n if [ -f \".env.example\" ] && [ ! -f \".env\" ]; then cp .env.example .env; fi\n info \"Starting stack...\"\n docker compose up -d --remove-orphans\n echo \"\"\n ok \"Stack started. Gateway: http://localhost:\\${OPENCLAW_GATEWAY_PORT:-18789}\"\nfi\n`;\n\nconst MACOS_SCRIPT_PREFIX_NATIVE = `\nif [ -f \"native/install-macos.sh\" ]; then\n info \"Installing and starting native services...\"\n bash native/install-macos.sh\n ok \"Native services ready.\"\nfi\n`;\n\nconst MACOS_SCRIPT = `#!/usr/bin/env bash\nset -euo pipefail\n\n# OpenClaw bare-metal installer (macOS)\n# Optionally runs native services, then Docker Desktop + compose.\n# Idempotent: safe to re-run.\n\nSCRIPT_DIR=\"$(cd \"$(dirname \"\\${BASH_SOURCE[0]}\")\" && pwd)\"\ncd \"$SCRIPT_DIR\"\n\nif [ -t 1 ]; then\n RED='\\\\033[0;31m'; GREEN='\\\\033[0;32m'; YELLOW='\\\\033[1;33m'; CYAN='\\\\033[0;36m'; NC='\\\\033[0m'\nelse\n RED=''; GREEN=''; YELLOW=''; CYAN=''; NC=''\nfi\ninfo() { echo -e \"\\${CYAN}ℹ $*\\${NC}\"; }\nok() { echo -e \"\\${GREEN}✅ $*\\${NC}\"; }\nwarn() { echo -e \"\\${YELLOW}⚠️ $*\\${NC}\"; }\nerr() { echo -e \"\\${RED}❌ $*\\${NC}\" >&2; }\n__NATIVE_BLOCK__\nif ! command -v docker &> /dev/null; then\n if command -v brew &> /dev/null; then\n info \"Installing Docker via Homebrew...\"\n brew install --cask docker\n warn \"Docker Desktop was installed. Please open Docker from Applications, then re-run this script.\"\n exit 0\n else\n err \"Docker not found. Install Docker Desktop from https://docs.docker.com/desktop/install/mac-install/ or run: brew install --cask docker\"\n exit 1\n fi\nfi\n\nif ! docker info &> /dev/null 2>&1; then\n err \"Docker daemon not running. Open Docker Desktop from Applications, then re-run this script.\"\n exit 1\nfi\n\nif ! docker compose version &> /dev/null; then\n err \"Docker Compose (v2) not available. Ensure Docker Desktop is up to date.\"\n exit 1\nfi\n\nif [ -f \"scripts/start.sh\" ]; then\n info \"Starting stack via scripts/start.sh...\"\n bash scripts/start.sh\nelse\n if [ -f \".env.example\" ] && [ ! -f \".env\" ]; then cp .env.example .env; fi\n info \"Starting stack...\"\n docker compose up -d --remove-orphans\n echo \"\"\n ok \"Stack started. Gateway: http://localhost:\\${OPENCLAW_GATEWAY_PORT:-18789}\"\nfi\n`;\n\nconst WINDOWS_SCRIPT_PREFIX_NATIVE = `\nif (Test-Path \"native/install-windows.ps1\") {\n Info \"Installing and starting native services...\"\n & .\\\\native\\\\install-windows.ps1\n Ok \"Native services ready.\"\n}\n`;\n\nconst WINDOWS_SCRIPT = `# OpenClaw bare-metal installer (Windows PowerShell)\n# Optionally runs native services, then Docker Desktop + compose.\n# Idempotent: safe to re-run. Run in PowerShell as Administrator if installing Docker.\n\n$ErrorActionPreference = \"Stop\"\n$ProjectDir = $PSScriptRoot\nSet-Location $ProjectDir\n\nfunction Info { Write-Host \" $args\" -ForegroundColor Cyan }\nfunction Ok { Write-Host \" $args\" -ForegroundColor Green }\nfunction Warn { Write-Host \" $args\" -ForegroundColor Yellow }\nfunction Err { Write-Host \" $args\" -ForegroundColor Red; exit 1 }\n__NATIVE_BLOCK__\n# Check Docker\n$docker = Get-Command docker -ErrorAction SilentlyContinue\nif (-not $docker) {\n Write-Host \"\"\n Write-Host \" Docker not found.\" -ForegroundColor Red\n Write-Host \" Install Docker Desktop from: https://docs.docker.com/desktop/install/windows-install/\"\n Write-Host \" Then restart PowerShell and run this script again.\"\n exit 1\n}\n\ntry { docker info 2>$null | Out-Null } catch {\n Write-Host \"\"\n Write-Host \" Docker daemon is not running.\" -ForegroundColor Red\n Write-Host \" Start Docker Desktop from the Start menu, then run this script again.\"\n exit 1\n}\n\ntry { docker compose version 2>$null | Out-Null } catch {\n Write-Host \"\"\n Write-Host \" Docker Compose (v2) not available. Update Docker Desktop.\" -ForegroundColor Red\n exit 1\n}\n\nOk \"Docker is ready.\"\n\n# Prepare .env\nif (-not (Test-Path \".env\")) {\n if (Test-Path \".env.example\") {\n Copy-Item \".env.example\" \".env\"\n Info \"Created .env from .env.example\"\n }\n}\n\n# Create dirs\n$configDir = if ($env:OPENCLAW_CONFIG_DIR) { $env:OPENCLAW_CONFIG_DIR } else { \"./openclaw/config\" }\n$workspaceDir = if ($env:OPENCLAW_WORKSPACE_DIR) { $env:OPENCLAW_WORKSPACE_DIR } else { \"./openclaw/workspace\" }\nNew-Item -ItemType Directory -Force -Path $configDir | Out-Null\nNew-Item -ItemType Directory -Force -Path $workspaceDir | Out-Null\nOk \"Directories ready.\"\n\n# Start stack\nInfo \"Starting stack...\"\ndocker compose up -d --remove-orphans\n\n$port = if ($env:OPENCLAW_GATEWAY_PORT) { $env:OPENCLAW_GATEWAY_PORT } else { \"18789\" }\nWrite-Host \"\"\nOk \"Stack started. Gateway: http://localhost:$port\"\n`;\n\nexport interface BareMetalInstallOptions {\n\tplatform: Platform;\n\tprojectName: string;\n\t/** When true, top-level script runs native/install-*.sh|ps1 first, then Docker + compose. */\n\thasNativeServices?: boolean;\n}\n\n/**\n * Returns one file: install.sh (Linux/macOS) or install.ps1 (Windows).\n * When hasNativeServices is true, the script runs the native installer first, then Docker + compose.\n */\nexport function generateBareMetalInstall(options: BareMetalInstallOptions): Record<string, string> {\n\tconst { platform, hasNativeServices } = options;\n\tconst files: Record<string, string> = {};\n\n\tif (platform === \"windows/amd64\") {\n\t\tconst script = hasNativeServices\n\t\t\t? WINDOWS_SCRIPT.replace(\"__NATIVE_BLOCK__\", WINDOWS_SCRIPT_PREFIX_NATIVE)\n\t\t\t: WINDOWS_SCRIPT.replace(\"__NATIVE_BLOCK__\", \"\");\n\t\tfiles[\"install.ps1\"] = script;\n\t\treturn files;\n\t}\n\n\tconst isMac = platform.startsWith(\"macos/\");\n\tconst baseScript = isMac ? MACOS_SCRIPT : LINUX_SCRIPT;\n\tconst prefix = hasNativeServices\n\t\t? isMac\n\t\t\t? MACOS_SCRIPT_PREFIX_NATIVE\n\t\t\t: LINUX_SCRIPT_PREFIX_NATIVE\n\t\t: \"\";\n\tconst script = baseScript.replace(\"__NATIVE_BLOCK__\", prefix);\n\tfiles[\"install.sh\"] = script;\n\treturn files;\n}\n"],"mappings":";;;AAOA,MAAM,6BAA6B;;;;;;;;AASnC,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmErB,MAAM,6BAA6B;;;;;;;AAQnC,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDrB,MAAM,+BAA+B;;;;;;;AAQrC,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEvB,SAAgB,yBAAyB,SAA0D;CAClG,MAAM,EAAE,UAAU,sBAAsB;CACxC,MAAM,QAAgC,EAAE;AAExC,KAAI,aAAa,iBAAiB;AAIjC,QAAM,iBAHS,oBACZ,eAAe,QAAQ,oBAAoB,6BAA6B,GACxE,eAAe,QAAQ,oBAAoB,GAAG;AAEjD,SAAO;;CAGR,MAAM,QAAQ,SAAS,WAAW,SAAS;CAC3C,MAAM,aAAa,QAAQ,eAAe;CAC1C,MAAM,SAAS,oBACZ,QACC,6BACA,6BACD;AAEH,OAAM,gBADS,WAAW,QAAQ,oBAAoB,OAAO;AAE7D,QAAO"}
1
+ {"version":3,"file":"bare-metal-install.cjs","names":[],"sources":["../../src/generators/bare-metal-install.ts"],"sourcesContent":["/**\n * Generates platform-specific installer scripts for bare-metal (VPS, computer) deployment.\n * Each script ensures Docker and Docker Compose are installed, then runs the stack.\n * Returns a map of one file: install.sh (Linux/macOS) or install.ps1 (Windows).\n */\nimport type { Platform } from \"../types.js\";\n\nconst LINUX_SCRIPT_PREFIX_NATIVE = `\n# Native services (install/start on host first)\nif [ -f \"native/install-linux.sh\" ]; then\n info \"Installing and starting native services...\"\n bash native/install-linux.sh\n ok \"Native services ready.\"\nfi\n`;\n\nconst LINUX_SCRIPT = `#!/usr/bin/env bash\nset -euo pipefail\n\n# OpenClaw bare-metal installer (Linux)\n# Optionally runs native services script, then Docker + Compose.\n# Idempotent: safe to re-run.\n\nSCRIPT_DIR=\"$(cd \"$(dirname \"\\${BASH_SOURCE[0]}\")\" && pwd)\"\ncd \"$SCRIPT_DIR\"\n\nif [ -t 1 ]; then\n RED='\\\\033[0;31m'; GREEN='\\\\033[0;32m'; YELLOW='\\\\033[1;33m'; CYAN='\\\\033[0;36m'; NC='\\\\033[0m'\nelse\n RED=''; GREEN=''; YELLOW=''; CYAN=''; NC=''\nfi\ninfo() { echo -e \"\\${CYAN}ℹ $*\\${NC}\"; }\nok() { echo -e \"\\${GREEN}✅ $*\\${NC}\"; }\nwarn() { echo -e \"\\${YELLOW}⚠️ $*\\${NC}\"; }\nerr() { echo -e \"\\${RED}❌ $*\\${NC}\" >&2; }\n__NATIVE_BLOCK__\n# Install Docker if missing\nif ! command -v docker &> /dev/null; then\n info \"Installing Docker...\"\n if command -v apt-get &> /dev/null; then\n sudo apt-get update -qq\n sudo apt-get install -y -qq ca-certificates curl\n curl -fsSL https://get.docker.com | sudo sh\n sudo usermod -aG docker \"$USER\" 2>/dev/null || true\n ok \"Docker installed. You may need to log out and back in for group changes.\"\n elif command -v dnf &> /dev/null || command -v yum &> /dev/null; then\n sudo dnf install -y dnf-plugins-core 2>/dev/null || sudo yum install -y yum-utils\n sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo 2>/dev/null || sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo\n sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin 2>/dev/null || sudo yum install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin\n sudo systemctl enable --now docker\n sudo usermod -aG docker \"$USER\" 2>/dev/null || true\n ok \"Docker installed.\"\n else\n err \"Unsupported package manager. Install Docker manually: https://docs.docker.com/engine/install/\"\n exit 1\n fi\nelse\n ok \"Docker already installed.\"\nfi\n\nif ! docker compose version &> /dev/null; then\n err \"Docker Compose (v2) plugin not found. Install it: https://docs.docker.com/compose/install/\"\n exit 1\nfi\n\nif ! docker info &> /dev/null 2>&1; then\n err \"Docker daemon not running. Start it (e.g. sudo systemctl start docker) and re-run this script.\"\n exit 1\nfi\n\n# Use project start script if present, else docker compose up\nif [ -f \"scripts/start.sh\" ]; then\n info \"Starting stack via scripts/start.sh...\"\n bash scripts/start.sh\nelse\n if [ -f \".env.example\" ] && [ ! -f \".env\" ]; then cp .env.example .env; fi\n info \"Starting stack...\"\n docker compose up -d --remove-orphans\n echo \"\"\n ok \"Stack started. Gateway: http://localhost:\\${OPENCLAW_GATEWAY_PORT:-18789}\"\nfi\n`;\n\nconst MACOS_SCRIPT_PREFIX_NATIVE = `\nif [ -f \"native/install-macos.sh\" ]; then\n info \"Installing and starting native services...\"\n bash native/install-macos.sh\n ok \"Native services ready.\"\nfi\n`;\n\nconst MACOS_SCRIPT = `#!/usr/bin/env bash\nset -euo pipefail\n\n# OpenClaw bare-metal installer (macOS)\n# Optionally runs native services, then Docker Desktop + compose.\n# Idempotent: safe to re-run.\n\nSCRIPT_DIR=\"$(cd \"$(dirname \"\\${BASH_SOURCE[0]}\")\" && pwd)\"\ncd \"$SCRIPT_DIR\"\n\nif [ -t 1 ]; then\n RED='\\\\033[0;31m'; GREEN='\\\\033[0;32m'; YELLOW='\\\\033[1;33m'; CYAN='\\\\033[0;36m'; NC='\\\\033[0m'\nelse\n RED=''; GREEN=''; YELLOW=''; CYAN=''; NC=''\nfi\ninfo() { echo -e \"\\${CYAN}ℹ $*\\${NC}\"; }\nok() { echo -e \"\\${GREEN}✅ $*\\${NC}\"; }\nwarn() { echo -e \"\\${YELLOW}⚠️ $*\\${NC}\"; }\nerr() { echo -e \"\\${RED}❌ $*\\${NC}\" >&2; }\n__NATIVE_BLOCK__\nif ! command -v docker &> /dev/null; then\n if command -v brew &> /dev/null; then\n info \"Installing Docker via Homebrew...\"\n brew install --cask docker\n warn \"Docker Desktop was installed. Please open Docker from Applications, then re-run this script.\"\n exit 0\n else\n err \"Docker not found. Install Docker Desktop from https://docs.docker.com/desktop/install/mac-install/ or run: brew install --cask docker\"\n exit 1\n fi\nfi\n\nif ! docker info &> /dev/null 2>&1; then\n err \"Docker daemon not running. Open Docker Desktop from Applications, then re-run this script.\"\n exit 1\nfi\n\nif ! docker compose version &> /dev/null; then\n err \"Docker Compose (v2) not available. Ensure Docker Desktop is up to date.\"\n exit 1\nfi\n\nif [ -f \"scripts/start.sh\" ]; then\n info \"Starting stack via scripts/start.sh...\"\n bash scripts/start.sh\nelse\n if [ -f \".env.example\" ] && [ ! -f \".env\" ]; then cp .env.example .env; fi\n info \"Starting stack...\"\n docker compose up -d --remove-orphans\n echo \"\"\n ok \"Stack started. Gateway: http://localhost:\\${OPENCLAW_GATEWAY_PORT:-18789}\"\nfi\n`;\n\nconst WINDOWS_SCRIPT_PREFIX_NATIVE = `\nif (Test-Path \"native/install-windows.ps1\") {\n Info \"Installing and starting native services...\"\n & .\\\\native\\\\install-windows.ps1\n Ok \"Native services ready.\"\n}\n`;\n\nconst WINDOWS_SCRIPT = `# OpenClaw bare-metal installer (Windows PowerShell)\n# Optionally runs native services, then Docker Desktop + compose.\n# Idempotent: safe to re-run. Run in PowerShell as Administrator if installing Docker.\n\n$ErrorActionPreference = \"Stop\"\n$ProjectDir = $PSScriptRoot\nSet-Location $ProjectDir\n\nfunction Info { Write-Host \" $args\" -ForegroundColor Cyan }\nfunction Ok { Write-Host \" $args\" -ForegroundColor Green }\nfunction Warn { Write-Host \" $args\" -ForegroundColor Yellow }\nfunction Err { Write-Host \" $args\" -ForegroundColor Red; exit 1 }\n__NATIVE_BLOCK__\n# Check Docker\n$docker = Get-Command docker -ErrorAction SilentlyContinue\nif (-not $docker) {\n Write-Host \"\"\n Write-Host \" Docker not found.\" -ForegroundColor Red\n Write-Host \" Install Docker Desktop from: https://docs.docker.com/desktop/install/windows-install/\"\n Write-Host \" Then restart PowerShell and run this script again.\"\n exit 1\n}\n\ntry { docker info 2>$null | Out-Null } catch {\n Write-Host \"\"\n Write-Host \" Docker daemon is not running.\" -ForegroundColor Red\n Write-Host \" Start Docker Desktop from the Start menu, then run this script again.\"\n exit 1\n}\n\ntry { docker compose version 2>$null | Out-Null } catch {\n Write-Host \"\"\n Write-Host \" Docker Compose (v2) not available. Update Docker Desktop.\" -ForegroundColor Red\n exit 1\n}\n\nOk \"Docker is ready.\"\n\n# Prepare .env\nif (-not (Test-Path \".env\")) {\n if (Test-Path \".env.example\") {\n Copy-Item \".env.example\" \".env\"\n Info \"Created .env from .env.example\"\n }\n}\n\n# Create dirs\n$configDir = if ($env:OPENCLAW_CONFIG_DIR) { $env:OPENCLAW_CONFIG_DIR } else { \"./openclaw/config\" }\n$workspaceDir = if ($env:OPENCLAW_WORKSPACE_DIR) { $env:OPENCLAW_WORKSPACE_DIR } else { \"./openclaw/workspace\" }\nNew-Item -ItemType Directory -Force -Path $configDir | Out-Null\nNew-Item -ItemType Directory -Force -Path $workspaceDir | Out-Null\nOk \"Directories ready.\"\n\n# Start stack\nInfo \"Starting stack...\"\ndocker compose up -d --remove-orphans\n\n$port = if ($env:OPENCLAW_GATEWAY_PORT) { $env:OPENCLAW_GATEWAY_PORT } else { \"18789\" }\nWrite-Host \"\"\nOk \"Stack started. Gateway: http://localhost:$port\"\n`;\n\nexport interface BareMetalInstallOptions {\n\tplatform: Platform;\n\tprojectName: string;\n\t/** When true, top-level script runs native/install-*.sh|ps1 first, then Docker + compose. */\n\thasNativeServices?: boolean;\n}\n\n/**\n * Returns one file: install.sh (Linux/macOS) or install.ps1 (Windows).\n * When hasNativeServices is true, the script runs the native installer first, then Docker + compose.\n */\nexport function generateBareMetalInstall(options: BareMetalInstallOptions): Record<string, string> {\n\tconst { platform, hasNativeServices } = options;\n\tconst files: Record<string, string> = {};\n\n\tif (platform === \"windows/amd64\") {\n\t\tconst script = hasNativeServices\n\t\t\t? WINDOWS_SCRIPT.replace(\"__NATIVE_BLOCK__\", WINDOWS_SCRIPT_PREFIX_NATIVE)\n\t\t\t: WINDOWS_SCRIPT.replace(\"__NATIVE_BLOCK__\", \"\");\n\t\tfiles[\"install.ps1\"] = script;\n\t\treturn files;\n\t}\n\n\tconst isMac = platform.startsWith(\"macos/\");\n\tconst baseScript = isMac ? MACOS_SCRIPT : LINUX_SCRIPT;\n\tconst prefix = hasNativeServices\n\t\t? isMac\n\t\t\t? MACOS_SCRIPT_PREFIX_NATIVE\n\t\t\t: LINUX_SCRIPT_PREFIX_NATIVE\n\t\t: \"\";\n\tconst script = baseScript.replace(\"__NATIVE_BLOCK__\", prefix);\n\tfiles[\"install.sh\"] = script;\n\treturn files;\n}\n"],"mappings":";;AAOA,MAAM,6BAA6B;;;;;;;;AASnC,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmErB,MAAM,6BAA6B;;;;;;;AAQnC,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDrB,MAAM,+BAA+B;;;;;;;AAQrC,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEvB,SAAgB,yBAAyB,SAA0D;CAClG,MAAM,EAAE,UAAU,sBAAsB;CACxC,MAAM,QAAgC,EAAE;AAExC,KAAI,aAAa,iBAAiB;AAIjC,QAAM,iBAHS,oBACZ,eAAe,QAAQ,oBAAoB,6BAA6B,GACxE,eAAe,QAAQ,oBAAoB,GAAG;AAEjD,SAAO;;CAGR,MAAM,QAAQ,SAAS,WAAW,SAAS;CAC3C,MAAM,aAAa,QAAQ,eAAe;CAC1C,MAAM,SAAS,oBACZ,QACC,6BACA,6BACD;AAEH,OAAM,gBADS,WAAW,QAAQ,oBAAoB,OAAO;AAE7D,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"bare-metal-install.d.mts","names":[],"sources":["../../src/generators/bare-metal-install.ts"],"mappings":";;;UAuNiB,uBAAA;EAChB,QAAA,EAAU,QAAA;EACV,WAAA;EAAA;EAEA,iBAAA;AAAA;;AAOD;;;iBAAgB,wBAAA,CAAyB,OAAA,EAAS,uBAAA,GAA0B,MAAA"}
1
+ {"version":3,"file":"bare-metal-install.d.mts","names":[],"sources":["../../src/generators/bare-metal-install.ts"],"mappings":";;;UAuNiB,uBAAA;EAChB,QAAA,EAAU,QAAA;EACV,WAAA;EADU;EAGV,iBAAA;AAAA;;;AAOD;;iBAAgB,wBAAA,CAAyB,OAAA,EAAS,uBAAA,GAA0B,MAAA"}
@@ -218,7 +218,7 @@ function generateBareMetalInstall(options) {
218
218
  files["install.sh"] = baseScript.replace("__NATIVE_BLOCK__", prefix);
219
219
  return files;
220
220
  }
221
-
222
221
  //#endregion
223
222
  export { generateBareMetalInstall };
223
+
224
224
  //# sourceMappingURL=bare-metal-install.mjs.map