@better-openclaw/core 1.0.26 → 1.0.31
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.
- package/README.md +67 -7
- package/dist/addon-stack.cjs +41 -28
- package/dist/addon-stack.cjs.map +1 -1
- package/dist/addon-stack.d.cts +1 -1
- package/dist/addon-stack.d.cts.map +1 -1
- package/dist/addon-stack.d.mts +1 -1
- package/dist/addon-stack.d.mts.map +1 -1
- package/dist/addon-stack.mjs +40 -27
- package/dist/addon-stack.mjs.map +1 -1
- package/dist/addon-stack.test.cjs +14 -14
- package/dist/addon-stack.test.cjs.map +1 -1
- package/dist/addon-stack.test.mjs +13 -13
- package/dist/addon-stack.test.mjs.map +1 -1
- package/dist/bare-metal-partition.d.cts +1 -1
- package/dist/bare-metal-partition.d.mts +1 -1
- package/dist/bare-metal-partition.test.cjs +1 -1
- package/dist/bare-metal-partition.test.mjs +1 -1
- package/dist/callback-sink-CdMKYayY.d.mts +15 -0
- package/dist/callback-sink-CdMKYayY.d.mts.map +1 -0
- package/dist/callback-sink-iNThWRnQ.d.cts +15 -0
- package/dist/callback-sink-iNThWRnQ.d.cts.map +1 -0
- package/dist/claude-code-fw-CrbAlzTM.d.mts +7 -0
- package/dist/claude-code-fw-CrbAlzTM.d.mts.map +1 -0
- package/dist/claude-code-fw-dKYH2prH.d.cts +7 -0
- package/dist/claude-code-fw-dKYH2prH.d.cts.map +1 -0
- package/dist/codex-fw-Ct8q4pzo.d.mts +7 -0
- package/dist/codex-fw-Ct8q4pzo.d.mts.map +1 -0
- package/dist/codex-fw-l7Ku8ZI8.d.cts +7 -0
- package/dist/codex-fw-l7Ku8ZI8.d.cts.map +1 -0
- package/dist/compose-validation.test.cjs +1 -1
- package/dist/composer.cjs +89 -129
- package/dist/composer.cjs.map +1 -1
- package/dist/composer.d.cts +3 -3
- package/dist/composer.d.cts.map +1 -1
- package/dist/composer.d.mts +3 -3
- package/dist/composer.d.mts.map +1 -1
- package/dist/composer.mjs +88 -128
- package/dist/composer.mjs.map +1 -1
- package/dist/composer.snapshot.test.cjs +1 -1
- package/dist/composer.snapshot.test.mjs +1 -1
- package/dist/composer.test.cjs +53 -2
- package/dist/composer.test.cjs.map +1 -1
- package/dist/composer.test.mjs +52 -1
- package/dist/composer.test.mjs.map +1 -1
- package/dist/console-sink-BHQpRyCt.d.cts +13 -0
- package/dist/console-sink-BHQpRyCt.d.cts.map +1 -0
- package/dist/console-sink-bouG_M1K.d.mts +13 -0
- package/dist/console-sink-bouG_M1K.d.mts.map +1 -0
- package/dist/{coolify-BVGGcMrT.d.mts → coolify-D5E0z01M.d.mts} +2 -2
- package/dist/{coolify-BVGGcMrT.d.mts.map → coolify-D5E0z01M.d.mts.map} +1 -1
- package/dist/{coolify-vlb1G9V2.d.cts → coolify-DjHecHCr.d.cts} +2 -2
- package/dist/{coolify-vlb1G9V2.d.cts.map → coolify-DjHecHCr.d.cts.map} +1 -1
- package/dist/copaw-BQyjioz7.d.cts +7 -0
- package/dist/copaw-BQyjioz7.d.cts.map +1 -0
- package/dist/copaw-C_3N7eQu.d.mts +7 -0
- package/dist/copaw-C_3N7eQu.d.mts.map +1 -0
- package/dist/deployers/coolify.cjs +25 -0
- package/dist/deployers/coolify.cjs.map +1 -1
- package/dist/deployers/coolify.d.cts +1 -1
- package/dist/deployers/coolify.d.mts +1 -1
- package/dist/deployers/coolify.mjs +25 -0
- package/dist/deployers/coolify.mjs.map +1 -1
- package/dist/deployers/coolify.test.cjs +156 -0
- package/dist/deployers/coolify.test.cjs.map +1 -0
- package/dist/deployers/coolify.test.d.cts +1 -0
- package/dist/deployers/coolify.test.d.mts +1 -0
- package/dist/deployers/coolify.test.mjs +157 -0
- package/dist/deployers/coolify.test.mjs.map +1 -0
- package/dist/deployers/dokploy.cjs +25 -0
- package/dist/deployers/dokploy.cjs.map +1 -1
- package/dist/deployers/dokploy.d.cts +1 -1
- package/dist/deployers/dokploy.d.mts +1 -1
- package/dist/deployers/dokploy.mjs +25 -0
- package/dist/deployers/dokploy.mjs.map +1 -1
- package/dist/deployers/dokploy.test.cjs +108 -0
- package/dist/deployers/dokploy.test.cjs.map +1 -0
- package/dist/deployers/dokploy.test.d.cts +1 -0
- package/dist/deployers/dokploy.test.d.mts +1 -0
- package/dist/deployers/dokploy.test.mjs +109 -0
- package/dist/deployers/dokploy.test.mjs.map +1 -0
- package/dist/deployers/index.d.cts +3 -3
- package/dist/deployers/index.d.mts +3 -3
- package/dist/deployers/strip-host-ports.cjs +1 -1
- package/dist/deployers/strip-host-ports.test.cjs +1 -1
- package/dist/deployers/strip-host-ports.test.mjs +1 -1
- package/dist/deployers/types.d.cts +1 -1
- package/dist/deployers/types.d.mts +1 -1
- package/dist/{dokploy-8cbrxUun.d.cts → dokploy-BnVDjWCV.d.cts} +2 -2
- package/dist/{dokploy-8cbrxUun.d.cts.map → dokploy-BnVDjWCV.d.cts.map} +1 -1
- package/dist/{dokploy-BTflLhTM.d.mts → dokploy-BqLdCfyR.d.mts} +2 -2
- package/dist/{dokploy-BTflLhTM.d.mts.map → dokploy-BqLdCfyR.d.mts.map} +1 -1
- package/dist/frameworks/claude-code-fw.cjs +79 -0
- package/dist/frameworks/claude-code-fw.cjs.map +1 -0
- package/dist/frameworks/claude-code-fw.d.cts +2 -0
- package/dist/frameworks/claude-code-fw.d.mts +2 -0
- package/dist/frameworks/claude-code-fw.mjs +78 -0
- package/dist/frameworks/claude-code-fw.mjs.map +1 -0
- package/dist/frameworks/codex-fw.cjs +67 -0
- package/dist/frameworks/codex-fw.cjs.map +1 -0
- package/dist/frameworks/codex-fw.d.cts +2 -0
- package/dist/frameworks/codex-fw.d.mts +2 -0
- package/dist/frameworks/codex-fw.mjs +66 -0
- package/dist/frameworks/codex-fw.mjs.map +1 -0
- package/dist/frameworks/copaw.cjs +118 -0
- package/dist/frameworks/copaw.cjs.map +1 -0
- package/dist/frameworks/copaw.d.cts +2 -0
- package/dist/frameworks/copaw.d.mts +2 -0
- package/dist/frameworks/copaw.mjs +117 -0
- package/dist/frameworks/copaw.mjs.map +1 -0
- package/dist/frameworks/frameworks.test.cjs +94 -0
- package/dist/frameworks/frameworks.test.cjs.map +1 -0
- package/dist/frameworks/frameworks.test.d.cts +1 -0
- package/dist/frameworks/frameworks.test.d.mts +1 -0
- package/dist/frameworks/frameworks.test.mjs +94 -0
- package/dist/frameworks/frameworks.test.mjs.map +1 -0
- package/dist/frameworks/index.cjs +35 -0
- package/dist/frameworks/index.cjs.map +1 -0
- package/dist/frameworks/index.d.cts +11 -0
- package/dist/frameworks/index.d.mts +11 -0
- package/dist/frameworks/index.mjs +22 -0
- package/dist/frameworks/index.mjs.map +1 -0
- package/dist/frameworks/memu.cjs +118 -0
- package/dist/frameworks/memu.cjs.map +1 -0
- package/dist/frameworks/memu.d.cts +2 -0
- package/dist/frameworks/memu.d.mts +2 -0
- package/dist/frameworks/memu.mjs +117 -0
- package/dist/frameworks/memu.mjs.map +1 -0
- package/dist/frameworks/nanobot.cjs +126 -0
- package/dist/frameworks/nanobot.cjs.map +1 -0
- package/dist/frameworks/nanobot.d.cts +2 -0
- package/dist/frameworks/nanobot.d.mts +2 -0
- package/dist/frameworks/nanobot.mjs +125 -0
- package/dist/frameworks/nanobot.mjs.map +1 -0
- package/dist/frameworks/nanoclaw.cjs +99 -0
- package/dist/frameworks/nanoclaw.cjs.map +1 -0
- package/dist/frameworks/nanoclaw.d.cts +2 -0
- package/dist/frameworks/nanoclaw.d.mts +2 -0
- package/dist/frameworks/nanoclaw.mjs +98 -0
- package/dist/frameworks/nanoclaw.mjs.map +1 -0
- package/dist/frameworks/openclaw.cjs +253 -0
- package/dist/frameworks/openclaw.cjs.map +1 -0
- package/dist/frameworks/openclaw.d.cts +2 -0
- package/dist/frameworks/openclaw.d.mts +2 -0
- package/dist/frameworks/openclaw.mjs +251 -0
- package/dist/frameworks/openclaw.mjs.map +1 -0
- package/dist/frameworks/registry.cjs +31 -0
- package/dist/frameworks/registry.cjs.map +1 -0
- package/dist/frameworks/registry.d.cts +2 -0
- package/dist/frameworks/registry.d.mts +2 -0
- package/dist/frameworks/registry.mjs +26 -0
- package/dist/frameworks/registry.mjs.map +1 -0
- package/dist/frameworks/registry.test.cjs +110 -0
- package/dist/frameworks/registry.test.cjs.map +1 -0
- package/dist/frameworks/registry.test.d.cts +1 -0
- package/dist/frameworks/registry.test.d.mts +1 -0
- package/dist/frameworks/registry.test.mjs +111 -0
- package/dist/frameworks/registry.test.mjs.map +1 -0
- package/dist/frameworks/types.cjs +0 -0
- package/dist/frameworks/types.d.cts +2 -0
- package/dist/frameworks/types.d.mts +2 -0
- package/dist/frameworks/types.mjs +1 -0
- package/dist/frameworks/zeroclaw.cjs +123 -0
- package/dist/frameworks/zeroclaw.cjs.map +1 -0
- package/dist/frameworks/zeroclaw.d.cts +2 -0
- package/dist/frameworks/zeroclaw.d.mts +2 -0
- package/dist/frameworks/zeroclaw.mjs +122 -0
- package/dist/frameworks/zeroclaw.mjs.map +1 -0
- package/dist/generate.cjs +64 -13
- package/dist/generate.cjs.map +1 -1
- package/dist/generate.d.cts +5 -2
- package/dist/generate.d.cts.map +1 -1
- package/dist/generate.d.mts +5 -2
- package/dist/generate.d.mts.map +1 -1
- package/dist/generate.mjs +63 -12
- package/dist/generate.mjs.map +1 -1
- package/dist/generate.test.cjs +42 -6
- package/dist/generate.test.cjs.map +1 -1
- package/dist/generate.test.mjs +41 -5
- package/dist/generate.test.mjs.map +1 -1
- package/dist/generators/bare-metal-install.d.cts +1 -1
- package/dist/generators/bare-metal-install.d.mts +1 -1
- package/dist/generators/bare-metal-install.test.cjs +1 -1
- package/dist/generators/bare-metal-install.test.mjs +1 -1
- package/dist/generators/caddy.cjs +9 -3
- package/dist/generators/caddy.cjs.map +1 -1
- package/dist/generators/caddy.d.cts +1 -1
- package/dist/generators/caddy.d.mts +1 -1
- package/dist/generators/caddy.mjs +9 -3
- package/dist/generators/caddy.mjs.map +1 -1
- package/dist/generators/caddy.test.cjs +30 -2
- package/dist/generators/caddy.test.cjs.map +1 -1
- package/dist/generators/caddy.test.mjs +30 -2
- package/dist/generators/caddy.test.mjs.map +1 -1
- package/dist/generators/clone-repos.cjs.map +1 -1
- package/dist/generators/clone-repos.d.cts +1 -1
- package/dist/generators/clone-repos.d.mts +1 -1
- package/dist/generators/clone-repos.mjs.map +1 -1
- package/dist/generators/clone-repos.test.cjs +1 -1
- package/dist/generators/clone-repos.test.cjs.map +1 -1
- package/dist/generators/clone-repos.test.mjs +1 -1
- package/dist/generators/clone-repos.test.mjs.map +1 -1
- package/dist/generators/cloud-init.test.cjs +58 -0
- package/dist/generators/cloud-init.test.cjs.map +1 -0
- package/dist/generators/cloud-init.test.d.cts +1 -0
- package/dist/generators/cloud-init.test.d.mts +1 -0
- package/dist/generators/cloud-init.test.mjs +59 -0
- package/dist/generators/cloud-init.test.mjs.map +1 -0
- package/dist/generators/env.cjs +28 -103
- package/dist/generators/env.cjs.map +1 -1
- package/dist/generators/env.d.cts +4 -1
- package/dist/generators/env.d.cts.map +1 -1
- package/dist/generators/env.d.mts +4 -1
- package/dist/generators/env.d.mts.map +1 -1
- package/dist/generators/env.mjs +27 -102
- package/dist/generators/env.mjs.map +1 -1
- package/dist/generators/env.test.cjs +3 -3
- package/dist/generators/env.test.cjs.map +1 -1
- package/dist/generators/env.test.mjs +3 -3
- package/dist/generators/env.test.mjs.map +1 -1
- package/dist/generators/get-shit-done.d.cts +1 -1
- package/dist/generators/get-shit-done.d.mts +1 -1
- package/dist/generators/get-shit-done.test.cjs +48 -0
- package/dist/generators/get-shit-done.test.cjs.map +1 -0
- package/dist/generators/get-shit-done.test.d.cts +1 -0
- package/dist/generators/get-shit-done.test.d.mts +1 -0
- package/dist/generators/get-shit-done.test.mjs +49 -0
- package/dist/generators/get-shit-done.test.mjs.map +1 -0
- package/dist/generators/grafana.test.cjs +74 -0
- package/dist/generators/grafana.test.cjs.map +1 -0
- package/dist/generators/grafana.test.d.cts +1 -0
- package/dist/generators/grafana.test.d.mts +1 -0
- package/dist/generators/grafana.test.mjs +74 -0
- package/dist/generators/grafana.test.mjs.map +1 -0
- package/dist/generators/health-check.cjs +6 -6
- package/dist/generators/health-check.cjs.map +1 -1
- package/dist/generators/health-check.d.cts +1 -1
- package/dist/generators/health-check.d.mts +1 -1
- package/dist/generators/health-check.mjs +6 -6
- package/dist/generators/health-check.mjs.map +1 -1
- package/dist/generators/health-check.test.cjs +1 -1
- package/dist/generators/health-check.test.mjs +1 -1
- package/dist/generators/n8n-workflows.d.cts +1 -1
- package/dist/generators/n8n-workflows.d.mts +1 -1
- package/dist/generators/n8n-workflows.test.cjs +75 -0
- package/dist/generators/n8n-workflows.test.cjs.map +1 -0
- package/dist/generators/n8n-workflows.test.d.cts +1 -0
- package/dist/generators/n8n-workflows.test.d.mts +1 -0
- package/dist/generators/n8n-workflows.test.mjs +76 -0
- package/dist/generators/n8n-workflows.test.mjs.map +1 -0
- package/dist/generators/native-services.d.cts +1 -1
- package/dist/generators/native-services.d.mts +1 -1
- package/dist/generators/openclaw-install-script.test.cjs +35 -0
- package/dist/generators/openclaw-install-script.test.cjs.map +1 -0
- package/dist/generators/openclaw-install-script.test.d.cts +1 -0
- package/dist/generators/openclaw-install-script.test.d.mts +1 -0
- package/dist/generators/openclaw-install-script.test.mjs +36 -0
- package/dist/generators/openclaw-install-script.test.mjs.map +1 -0
- package/dist/generators/openclaw-json.cjs +60 -4
- package/dist/generators/openclaw-json.cjs.map +1 -1
- package/dist/generators/openclaw-json.d.cts +1 -5
- package/dist/generators/openclaw-json.d.cts.map +1 -1
- package/dist/generators/openclaw-json.d.mts +1 -5
- package/dist/generators/openclaw-json.d.mts.map +1 -1
- package/dist/generators/openclaw-json.mjs +60 -4
- package/dist/generators/openclaw-json.mjs.map +1 -1
- package/dist/generators/postgres-init.cjs +20 -0
- package/dist/generators/postgres-init.cjs.map +1 -1
- package/dist/generators/postgres-init.d.cts +1 -1
- package/dist/generators/postgres-init.d.cts.map +1 -1
- package/dist/generators/postgres-init.d.mts +1 -1
- package/dist/generators/postgres-init.d.mts.map +1 -1
- package/dist/generators/postgres-init.mjs +20 -0
- package/dist/generators/postgres-init.mjs.map +1 -1
- package/dist/generators/postgres-init.test.cjs +111 -0
- package/dist/generators/postgres-init.test.cjs.map +1 -0
- package/dist/generators/postgres-init.test.d.cts +1 -0
- package/dist/generators/postgres-init.test.d.mts +1 -0
- package/dist/generators/postgres-init.test.mjs +112 -0
- package/dist/generators/postgres-init.test.mjs.map +1 -0
- package/dist/generators/prometheus.d.cts +1 -1
- package/dist/generators/prometheus.d.mts +1 -1
- package/dist/generators/prometheus.test.cjs +99 -0
- package/dist/generators/prometheus.test.cjs.map +1 -0
- package/dist/generators/prometheus.test.d.cts +1 -0
- package/dist/generators/prometheus.test.d.mts +1 -0
- package/dist/generators/prometheus.test.mjs +99 -0
- package/dist/generators/prometheus.test.mjs.map +1 -0
- package/dist/generators/readme.cjs +50 -7
- package/dist/generators/readme.cjs.map +1 -1
- package/dist/generators/readme.d.cts +3 -1
- package/dist/generators/readme.d.cts.map +1 -1
- package/dist/generators/readme.d.mts +3 -1
- package/dist/generators/readme.d.mts.map +1 -1
- package/dist/generators/readme.mjs +50 -7
- package/dist/generators/readme.mjs.map +1 -1
- package/dist/generators/scripts.test.cjs +2 -2
- package/dist/generators/scripts.test.cjs.map +1 -1
- package/dist/generators/scripts.test.mjs +2 -2
- package/dist/generators/scripts.test.mjs.map +1 -1
- package/dist/generators/skills.cjs +1 -1
- package/dist/generators/skills.d.cts +1 -1
- package/dist/generators/skills.d.cts.map +1 -1
- package/dist/generators/skills.d.mts +1 -1
- package/dist/generators/skills.d.mts.map +1 -1
- package/dist/generators/skills.mjs +310 -0
- package/dist/generators/skills.mjs.map +1 -1
- package/dist/generators/stack-manifest.d.cts +1 -1
- package/dist/generators/stack-manifest.d.mts +1 -1
- package/dist/generators/stack-manifest.test.cjs +97 -0
- package/dist/generators/stack-manifest.test.cjs.map +1 -0
- package/dist/generators/stack-manifest.test.d.cts +1 -0
- package/dist/generators/stack-manifest.test.d.mts +1 -0
- package/dist/generators/stack-manifest.test.mjs +98 -0
- package/dist/generators/stack-manifest.test.mjs.map +1 -0
- package/dist/generators/traefik.d.cts +1 -1
- package/dist/generators/traefik.d.mts +1 -1
- package/dist/generators/traefik.test.cjs +12 -12
- package/dist/generators/traefik.test.cjs.map +1 -1
- package/dist/generators/traefik.test.mjs +12 -12
- package/dist/generators/traefik.test.mjs.map +1 -1
- package/dist/index.cjs +18 -2
- package/dist/index.d.cts +13 -7
- package/dist/index.d.mts +13 -7
- package/dist/index.mjs +9 -3
- package/dist/logger/__tests__/logger.test.cjs +308 -0
- package/dist/logger/__tests__/logger.test.cjs.map +1 -0
- package/dist/logger/__tests__/logger.test.d.cts +1 -0
- package/dist/logger/__tests__/logger.test.d.mts +1 -0
- package/dist/logger/__tests__/logger.test.mjs +308 -0
- package/dist/logger/__tests__/logger.test.mjs.map +1 -0
- package/dist/logger/index.cjs +8 -0
- package/dist/logger/index.d.cts +5 -0
- package/dist/logger/index.d.mts +5 -0
- package/dist/logger/index.mjs +4 -0
- package/dist/logger/logger.cjs +270 -0
- package/dist/logger/logger.cjs.map +1 -0
- package/dist/logger/logger.d.cts +2 -0
- package/dist/logger/logger.d.mts +2 -0
- package/dist/logger/logger.mjs +267 -0
- package/dist/logger/logger.mjs.map +1 -0
- package/dist/logger/sinks/callback-sink.cjs +18 -0
- package/dist/logger/sinks/callback-sink.cjs.map +1 -0
- package/dist/logger/sinks/callback-sink.d.cts +2 -0
- package/dist/logger/sinks/callback-sink.d.mts +2 -0
- package/dist/logger/sinks/callback-sink.mjs +17 -0
- package/dist/logger/sinks/callback-sink.mjs.map +1 -0
- package/dist/logger/sinks/console-sink.cjs +39 -0
- package/dist/logger/sinks/console-sink.cjs.map +1 -0
- package/dist/logger/sinks/console-sink.d.cts +2 -0
- package/dist/logger/sinks/console-sink.d.mts +2 -0
- package/dist/logger/sinks/console-sink.mjs +38 -0
- package/dist/logger/sinks/console-sink.mjs.map +1 -0
- package/dist/logger/sinks/file-sink.cjs +72 -0
- package/dist/logger/sinks/file-sink.cjs.map +1 -0
- package/dist/logger/sinks/file-sink.d.cts +36 -0
- package/dist/logger/sinks/file-sink.d.cts.map +1 -0
- package/dist/logger/sinks/file-sink.d.mts +36 -0
- package/dist/logger/sinks/file-sink.d.mts.map +1 -0
- package/dist/logger/sinks/file-sink.mjs +70 -0
- package/dist/logger/sinks/file-sink.mjs.map +1 -0
- package/dist/logger/types.cjs +0 -0
- package/dist/logger/types.d.cts +2 -0
- package/dist/logger/types.d.mts +2 -0
- package/dist/logger/types.mjs +1 -0
- package/dist/logger-CZ0Qnyiu.d.mts +66 -0
- package/dist/logger-CZ0Qnyiu.d.mts.map +1 -0
- package/dist/logger-DDfwai-A.d.cts +66 -0
- package/dist/logger-DDfwai-A.d.cts.map +1 -0
- package/dist/memu-BfRXtwmL.d.cts +7 -0
- package/dist/memu-BfRXtwmL.d.cts.map +1 -0
- package/dist/memu-C-fXbWr-.d.mts +7 -0
- package/dist/memu-C-fXbWr-.d.mts.map +1 -0
- package/dist/migrations.cjs +17 -9
- package/dist/migrations.cjs.map +1 -1
- package/dist/migrations.d.cts +1 -1
- package/dist/migrations.d.cts.map +1 -1
- package/dist/migrations.d.mts +1 -1
- package/dist/migrations.d.mts.map +1 -1
- package/dist/migrations.mjs +17 -9
- package/dist/migrations.mjs.map +1 -1
- package/dist/migrations.test.cjs +4 -4
- package/dist/migrations.test.mjs +4 -4
- package/dist/nanobot-2c0bS4lu.d.cts +7 -0
- package/dist/nanobot-2c0bS4lu.d.cts.map +1 -0
- package/dist/nanobot-BUO6pVQc.d.mts +7 -0
- package/dist/nanobot-BUO6pVQc.d.mts.map +1 -0
- package/dist/nanoclaw-CgHubEig.d.mts +7 -0
- package/dist/nanoclaw-CgHubEig.d.mts.map +1 -0
- package/dist/nanoclaw-Dvz0ef6J.d.cts +7 -0
- package/dist/nanoclaw-Dvz0ef6J.d.cts.map +1 -0
- package/dist/openclaw-D8lVecjC.d.mts +7 -0
- package/dist/openclaw-D8lVecjC.d.mts.map +1 -0
- package/dist/openclaw-DThj8i3N.d.cts +7 -0
- package/dist/openclaw-DThj8i3N.d.cts.map +1 -0
- package/dist/port-scanner.d.cts +1 -1
- package/dist/port-scanner.d.mts +1 -1
- package/dist/port-scanner.test.cjs +155 -0
- package/dist/port-scanner.test.cjs.map +1 -0
- package/dist/port-scanner.test.d.cts +1 -0
- package/dist/port-scanner.test.d.mts +1 -0
- package/dist/port-scanner.test.mjs +156 -0
- package/dist/port-scanner.test.mjs.map +1 -0
- package/dist/presets/presets.test.cjs +5 -5
- package/dist/presets/presets.test.cjs.map +1 -1
- package/dist/presets/presets.test.mjs +4 -4
- package/dist/presets/presets.test.mjs.map +1 -1
- package/dist/presets/registry.d.cts +1 -1
- package/dist/presets/registry.d.mts +1 -1
- package/dist/presets/registry.test.cjs +7 -7
- package/dist/presets/registry.test.cjs.map +1 -1
- package/dist/presets/registry.test.mjs +7 -7
- package/dist/presets/registry.test.mjs.map +1 -1
- package/dist/registry-DHX7vnVo.d.cts +16 -0
- package/dist/registry-DHX7vnVo.d.cts.map +1 -0
- package/dist/registry-DTAILnga.d.mts +16 -0
- package/dist/registry-DTAILnga.d.mts.map +1 -0
- package/dist/resolver.cjs +13 -3
- package/dist/resolver.cjs.map +1 -1
- package/dist/resolver.d.cts +1 -1
- package/dist/resolver.d.cts.map +1 -1
- package/dist/resolver.d.mts +1 -1
- package/dist/resolver.d.mts.map +1 -1
- package/dist/resolver.mjs +13 -3
- package/dist/resolver.mjs.map +1 -1
- package/dist/resolver.test.cjs +35 -3
- package/dist/resolver.test.cjs.map +1 -1
- package/dist/resolver.test.mjs +35 -3
- package/dist/resolver.test.mjs.map +1 -1
- package/dist/{schema-BQnZrcw8.d.cts → schema-BSl9wiFe.d.mts} +134 -2
- package/dist/schema-BSl9wiFe.d.mts.map +1 -0
- package/dist/{schema-SBpL0bdI.d.mts → schema-Bd9l2r7p.d.cts} +134 -2
- package/dist/schema-Bd9l2r7p.d.cts.map +1 -0
- package/dist/schema.cjs +28 -4
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.cts +2 -2
- package/dist/schema.d.mts +2 -2
- package/dist/schema.mjs +27 -4
- package/dist/schema.mjs.map +1 -1
- package/dist/schema.test.cjs +3 -3
- package/dist/schema.test.cjs.map +1 -1
- package/dist/schema.test.mjs +3 -3
- package/dist/schema.test.mjs.map +1 -1
- package/dist/services/definitions/adguard-home.d.cts +1 -1
- package/dist/services/definitions/adguard-home.d.mts +1 -1
- package/dist/services/definitions/agent-browser.cjs +161 -0
- package/dist/services/definitions/agent-browser.cjs.map +1 -0
- package/dist/services/definitions/agent-browser.d.cts +7 -0
- package/dist/services/definitions/agent-browser.d.cts.map +1 -0
- package/dist/services/definitions/agent-browser.d.mts +7 -0
- package/dist/services/definitions/agent-browser.d.mts.map +1 -0
- package/dist/services/definitions/agent-browser.mjs +160 -0
- package/dist/services/definitions/agent-browser.mjs.map +1 -0
- package/dist/services/definitions/airbyte.d.cts +1 -1
- package/dist/services/definitions/airbyte.d.mts +1 -1
- package/dist/services/definitions/airflow.d.cts +1 -1
- package/dist/services/definitions/airflow.d.mts +1 -1
- package/dist/services/definitions/anything-llm.d.cts +1 -1
- package/dist/services/definitions/anything-llm.d.mts +1 -1
- package/dist/services/definitions/appflowy.d.cts +1 -1
- package/dist/services/definitions/appflowy.d.mts +1 -1
- package/dist/services/definitions/apptension-saas.cjs.map +1 -1
- package/dist/services/definitions/apptension-saas.d.cts +1 -1
- package/dist/services/definitions/apptension-saas.d.mts +1 -1
- package/dist/services/definitions/apptension-saas.mjs.map +1 -1
- package/dist/services/definitions/appwrite.d.cts +1 -1
- package/dist/services/definitions/appwrite.d.mts +1 -1
- package/dist/services/definitions/audiobookshelf.d.cts +1 -1
- package/dist/services/definitions/audiobookshelf.d.mts +1 -1
- package/dist/services/definitions/authelia.d.cts +1 -1
- package/dist/services/definitions/authelia.d.mts +1 -1
- package/dist/services/definitions/authentik.d.cts +1 -1
- package/dist/services/definitions/authentik.d.mts +1 -1
- package/dist/services/definitions/axolotl.d.cts +1 -1
- package/dist/services/definitions/axolotl.d.mts +1 -1
- package/dist/services/definitions/baserow.d.cts +1 -1
- package/dist/services/definitions/baserow.d.mts +1 -1
- package/dist/services/definitions/beszel.d.cts +1 -1
- package/dist/services/definitions/beszel.d.mts +1 -1
- package/dist/services/definitions/boxyhq-saas.d.cts +1 -1
- package/dist/services/definitions/boxyhq-saas.d.mts +1 -1
- package/dist/services/definitions/browserless.d.cts +1 -1
- package/dist/services/definitions/browserless.d.mts +1 -1
- package/dist/services/definitions/burnlink.d.cts +1 -1
- package/dist/services/definitions/burnlink.d.mts +1 -1
- package/dist/services/definitions/caddy.d.cts +1 -1
- package/dist/services/definitions/caddy.d.mts +1 -1
- package/dist/services/definitions/cal-com.d.cts +1 -1
- package/dist/services/definitions/cal-com.d.mts +1 -1
- package/dist/services/definitions/calibre-web.d.cts +1 -1
- package/dist/services/definitions/calibre-web.d.mts +1 -1
- package/dist/services/definitions/chatwoot-worker.d.cts +1 -1
- package/dist/services/definitions/chatwoot-worker.d.mts +1 -1
- package/dist/services/definitions/chatwoot.d.cts +1 -1
- package/dist/services/definitions/chatwoot.d.mts +1 -1
- package/dist/services/definitions/chromadb.cjs +4 -1
- package/dist/services/definitions/chromadb.cjs.map +1 -1
- package/dist/services/definitions/chromadb.d.cts +1 -1
- package/dist/services/definitions/chromadb.d.mts +1 -1
- package/dist/services/definitions/chromadb.mjs +4 -1
- package/dist/services/definitions/chromadb.mjs.map +1 -1
- package/dist/services/definitions/claude-code.cjs +1 -1
- package/dist/services/definitions/claude-code.cjs.map +1 -1
- package/dist/services/definitions/claude-code.d.cts +1 -1
- package/dist/services/definitions/claude-code.d.mts +1 -1
- package/dist/services/definitions/claude-code.mjs +1 -1
- package/dist/services/definitions/claude-code.mjs.map +1 -1
- package/dist/services/definitions/clawrouter.cjs +138 -0
- package/dist/services/definitions/clawrouter.cjs.map +1 -0
- package/dist/services/definitions/clawrouter.d.cts +7 -0
- package/dist/services/definitions/clawrouter.d.cts.map +1 -0
- package/dist/services/definitions/clawrouter.d.mts +7 -0
- package/dist/services/definitions/clawrouter.d.mts.map +1 -0
- package/dist/services/definitions/clawrouter.mjs +137 -0
- package/dist/services/definitions/clawrouter.mjs.map +1 -0
- package/dist/services/definitions/clickhouse.d.cts +1 -1
- package/dist/services/definitions/clickhouse.d.mts +1 -1
- package/dist/services/definitions/cloudflared.d.cts +1 -1
- package/dist/services/definitions/cloudflared.d.mts +1 -1
- package/dist/services/definitions/cmsaas-starter.d.cts +1 -1
- package/dist/services/definitions/cmsaas-starter.d.mts +1 -1
- package/dist/services/definitions/cockroachdb.d.cts +1 -1
- package/dist/services/definitions/cockroachdb.d.mts +1 -1
- package/dist/services/definitions/code-server.d.cts +1 -1
- package/dist/services/definitions/code-server.d.mts +1 -1
- package/dist/services/definitions/coder.d.cts +1 -1
- package/dist/services/definitions/coder.d.mts +1 -1
- package/dist/services/definitions/codex.cjs +1 -1
- package/dist/services/definitions/codex.cjs.map +1 -1
- package/dist/services/definitions/codex.d.cts +1 -1
- package/dist/services/definitions/codex.d.mts +1 -1
- package/dist/services/definitions/codex.mjs +1 -1
- package/dist/services/definitions/codex.mjs.map +1 -1
- package/dist/services/definitions/comfyui.d.cts +1 -1
- package/dist/services/definitions/comfyui.d.mts +1 -1
- package/dist/services/definitions/convex-dashboard.d.cts +1 -1
- package/dist/services/definitions/convex-dashboard.d.mts +1 -1
- package/dist/services/definitions/convex.cjs.map +1 -1
- package/dist/services/definitions/convex.d.cts +1 -1
- package/dist/services/definitions/convex.d.mts +1 -1
- package/dist/services/definitions/convex.mjs.map +1 -1
- package/dist/services/definitions/coolify.d.cts +1 -1
- package/dist/services/definitions/coolify.d.mts +1 -1
- package/dist/services/definitions/copaw.cjs +97 -0
- package/dist/services/definitions/copaw.cjs.map +1 -0
- package/dist/services/definitions/copaw.d.cts +7 -0
- package/dist/services/definitions/copaw.d.cts.map +1 -0
- package/dist/services/definitions/copaw.d.mts +7 -0
- package/dist/services/definitions/copaw.d.mts.map +1 -0
- package/dist/services/definitions/copaw.mjs +96 -0
- package/dist/services/definitions/copaw.mjs.map +1 -0
- package/dist/services/definitions/crowdsec.d.cts +1 -1
- package/dist/services/definitions/crowdsec.d.mts +1 -1
- package/dist/services/definitions/dagster.d.cts +1 -1
- package/dist/services/definitions/dagster.d.mts +1 -1
- package/dist/services/definitions/desktop-environment.cjs +2 -1
- package/dist/services/definitions/desktop-environment.cjs.map +1 -1
- package/dist/services/definitions/desktop-environment.d.cts +1 -1
- package/dist/services/definitions/desktop-environment.d.mts +1 -1
- package/dist/services/definitions/desktop-environment.mjs +2 -1
- package/dist/services/definitions/desktop-environment.mjs.map +1 -1
- package/dist/services/definitions/dify.d.cts +1 -1
- package/dist/services/definitions/dify.d.mts +1 -1
- package/dist/services/definitions/directus.d.cts +1 -1
- package/dist/services/definitions/directus.d.mts +1 -1
- package/dist/services/definitions/docsgpt.d.cts +1 -1
- package/dist/services/definitions/docsgpt.d.mts +1 -1
- package/dist/services/definitions/dokploy.d.cts +1 -1
- package/dist/services/definitions/dokploy.d.mts +1 -1
- package/dist/services/definitions/dozzle.d.cts +1 -1
- package/dist/services/definitions/dozzle.d.mts +1 -1
- package/dist/services/definitions/dragonfly.d.cts +1 -1
- package/dist/services/definitions/dragonfly.d.mts +1 -1
- package/dist/services/definitions/drone-ci.d.cts +1 -1
- package/dist/services/definitions/drone-ci.d.mts +1 -1
- package/dist/services/definitions/duplicati.d.cts +1 -1
- package/dist/services/definitions/duplicati.d.mts +1 -1
- package/dist/services/definitions/element-web.d.cts +1 -1
- package/dist/services/definitions/element-web.d.mts +1 -1
- package/dist/services/definitions/excalidraw.d.cts +1 -1
- package/dist/services/definitions/excalidraw.d.mts +1 -1
- package/dist/services/definitions/ffmpeg.d.cts +1 -1
- package/dist/services/definitions/ffmpeg.d.mts +1 -1
- package/dist/services/definitions/firecrawl-playwright.d.cts +1 -1
- package/dist/services/definitions/firecrawl-playwright.d.mts +1 -1
- package/dist/services/definitions/firecrawl.d.cts +1 -1
- package/dist/services/definitions/firecrawl.d.mts +1 -1
- package/dist/services/definitions/flagsmith.d.cts +1 -1
- package/dist/services/definitions/flagsmith.d.mts +1 -1
- package/dist/services/definitions/flowise.d.cts +1 -1
- package/dist/services/definitions/flowise.d.mts +1 -1
- package/dist/services/definitions/focalboard.d.cts +1 -1
- package/dist/services/definitions/focalboard.d.mts +1 -1
- package/dist/services/definitions/fonoster.d.cts +1 -1
- package/dist/services/definitions/fonoster.d.mts +1 -1
- package/dist/services/definitions/forgejo.d.cts +1 -1
- package/dist/services/definitions/forgejo.d.mts +1 -1
- package/dist/services/definitions/formbricks.d.cts +1 -1
- package/dist/services/definitions/formbricks.d.mts +1 -1
- package/dist/services/definitions/gemini-cli.d.cts +1 -1
- package/dist/services/definitions/gemini-cli.d.mts +1 -1
- package/dist/services/definitions/ghost.d.cts +1 -1
- package/dist/services/definitions/ghost.d.mts +1 -1
- package/dist/services/definitions/gitea.d.cts +1 -1
- package/dist/services/definitions/gitea.d.mts +1 -1
- package/dist/services/definitions/gotify.d.cts +1 -1
- package/dist/services/definitions/gotify.d.mts +1 -1
- package/dist/services/definitions/grafana.d.cts +1 -1
- package/dist/services/definitions/grafana.d.mts +1 -1
- package/dist/services/definitions/graylog.d.cts +1 -1
- package/dist/services/definitions/graylog.d.mts +1 -1
- package/dist/services/definitions/headscale.d.cts +1 -1
- package/dist/services/definitions/headscale.d.mts +1 -1
- package/dist/services/definitions/hedgedoc.d.cts +1 -1
- package/dist/services/definitions/hedgedoc.d.mts +1 -1
- package/dist/services/definitions/hexstrike.d.cts +1 -1
- package/dist/services/definitions/hexstrike.d.mts +1 -1
- package/dist/services/definitions/heyform.d.cts +1 -1
- package/dist/services/definitions/heyform.d.mts +1 -1
- package/dist/services/definitions/hindsight.cjs +4 -1
- package/dist/services/definitions/hindsight.cjs.map +1 -1
- package/dist/services/definitions/hindsight.d.cts +1 -1
- package/dist/services/definitions/hindsight.d.mts +1 -1
- package/dist/services/definitions/hindsight.mjs +4 -1
- package/dist/services/definitions/hindsight.mjs.map +1 -1
- package/dist/services/definitions/homeassistant.d.cts +1 -1
- package/dist/services/definitions/homeassistant.d.mts +1 -1
- package/dist/services/definitions/hoppscotch.d.cts +1 -1
- package/dist/services/definitions/hoppscotch.d.mts +1 -1
- package/dist/services/definitions/immich.d.cts +1 -1
- package/dist/services/definitions/immich.d.mts +1 -1
- package/dist/services/definitions/index.cjs +42 -6
- package/dist/services/definitions/index.cjs.map +1 -1
- package/dist/services/definitions/index.d.cts +16 -4
- package/dist/services/definitions/index.d.cts.map +1 -1
- package/dist/services/definitions/index.d.mts +16 -4
- package/dist/services/definitions/index.d.mts.map +1 -1
- package/dist/services/definitions/index.mjs +31 -7
- package/dist/services/definitions/index.mjs.map +1 -1
- package/dist/services/definitions/infisical.d.cts +1 -1
- package/dist/services/definitions/infisical.d.mts +1 -1
- package/dist/services/definitions/influxdb.d.cts +1 -1
- package/dist/services/definitions/influxdb.d.mts +1 -1
- package/dist/services/definitions/invoke-ai.d.cts +1 -1
- package/dist/services/definitions/invoke-ai.d.mts +1 -1
- package/dist/services/definitions/ixartz-saas.d.cts +1 -1
- package/dist/services/definitions/ixartz-saas.d.mts +1 -1
- package/dist/services/definitions/jaeger.d.cts +1 -1
- package/dist/services/definitions/jaeger.d.mts +1 -1
- package/dist/services/definitions/jan.d.cts +1 -1
- package/dist/services/definitions/jan.d.mts +1 -1
- package/dist/services/definitions/jellyfin.d.cts +1 -1
- package/dist/services/definitions/jellyfin.d.mts +1 -1
- package/dist/services/definitions/jenkins.d.cts +1 -1
- package/dist/services/definitions/jenkins.d.mts +1 -1
- package/dist/services/definitions/jitsi-meet.d.cts +1 -1
- package/dist/services/definitions/jitsi-meet.d.mts +1 -1
- package/dist/services/definitions/keycloak.d.cts +1 -1
- package/dist/services/definitions/keycloak.d.mts +1 -1
- package/dist/services/definitions/kimi.d.cts +1 -1
- package/dist/services/definitions/kimi.d.mts +1 -1
- package/dist/services/definitions/kong.d.cts +1 -1
- package/dist/services/definitions/kong.d.mts +1 -1
- package/dist/services/definitions/lago.d.cts +1 -1
- package/dist/services/definitions/lago.d.mts +1 -1
- package/dist/services/definitions/langflow.d.cts +1 -1
- package/dist/services/definitions/langflow.d.mts +1 -1
- package/dist/services/definitions/langfuse.d.cts +1 -1
- package/dist/services/definitions/langfuse.d.mts +1 -1
- package/dist/services/definitions/lasuite-meet-agents.d.cts +1 -1
- package/dist/services/definitions/lasuite-meet-agents.d.mts +1 -1
- package/dist/services/definitions/lasuite-meet-backend.d.cts +1 -1
- package/dist/services/definitions/lasuite-meet-backend.d.mts +1 -1
- package/dist/services/definitions/lasuite-meet-frontend.d.cts +1 -1
- package/dist/services/definitions/lasuite-meet-frontend.d.mts +1 -1
- package/dist/services/definitions/librechat.d.cts +1 -1
- package/dist/services/definitions/librechat.d.mts +1 -1
- package/dist/services/definitions/lightpanda.d.cts +1 -1
- package/dist/services/definitions/lightpanda.d.mts +1 -1
- package/dist/services/definitions/listmonk.d.cts +1 -1
- package/dist/services/definitions/listmonk.d.mts +1 -1
- package/dist/services/definitions/litellm.d.cts +1 -1
- package/dist/services/definitions/litellm.d.mts +1 -1
- package/dist/services/definitions/livekit.d.cts +1 -1
- package/dist/services/definitions/livekit.d.mts +1 -1
- package/dist/services/definitions/local-ai.d.cts +1 -1
- package/dist/services/definitions/local-ai.d.mts +1 -1
- package/dist/services/definitions/loki.d.cts +1 -1
- package/dist/services/definitions/loki.d.mts +1 -1
- package/dist/services/definitions/mariadb.d.cts +1 -1
- package/dist/services/definitions/mariadb.d.mts +1 -1
- package/dist/services/definitions/matomo.d.cts +1 -1
- package/dist/services/definitions/matomo.d.mts +1 -1
- package/dist/services/definitions/matrix-synapse.d.cts +1 -1
- package/dist/services/definitions/matrix-synapse.d.mts +1 -1
- package/dist/services/definitions/mattermost.d.cts +1 -1
- package/dist/services/definitions/mattermost.d.mts +1 -1
- package/dist/services/definitions/mautic.d.cts +1 -1
- package/dist/services/definitions/mautic.d.mts +1 -1
- package/dist/services/definitions/medusa.d.cts +1 -1
- package/dist/services/definitions/medusa.d.mts +1 -1
- package/dist/services/definitions/meilisearch.d.cts +1 -1
- package/dist/services/definitions/meilisearch.d.mts +1 -1
- package/dist/services/definitions/mem0.cjs +133 -0
- package/dist/services/definitions/mem0.cjs.map +1 -0
- package/dist/services/definitions/mem0.d.cts +7 -0
- package/dist/services/definitions/mem0.d.cts.map +1 -0
- package/dist/services/definitions/mem0.d.mts +7 -0
- package/dist/services/definitions/mem0.d.mts.map +1 -0
- package/dist/services/definitions/mem0.mjs +132 -0
- package/dist/services/definitions/mem0.mjs.map +1 -0
- package/dist/services/definitions/memu.cjs +96 -0
- package/dist/services/definitions/memu.cjs.map +1 -0
- package/dist/services/definitions/memu.d.cts +7 -0
- package/dist/services/definitions/memu.d.cts.map +1 -0
- package/dist/services/definitions/memu.d.mts +7 -0
- package/dist/services/definitions/memu.d.mts.map +1 -0
- package/dist/services/definitions/memu.mjs +95 -0
- package/dist/services/definitions/memu.mjs.map +1 -0
- package/dist/services/definitions/metabase.d.cts +1 -1
- package/dist/services/definitions/metabase.d.mts +1 -1
- package/dist/services/definitions/milvus.cjs +4 -1
- package/dist/services/definitions/milvus.cjs.map +1 -1
- package/dist/services/definitions/milvus.d.cts +1 -1
- package/dist/services/definitions/milvus.d.mts +1 -1
- package/dist/services/definitions/milvus.mjs +4 -1
- package/dist/services/definitions/milvus.mjs.map +1 -1
- package/dist/services/definitions/minio.d.cts +1 -1
- package/dist/services/definitions/minio.d.mts +1 -1
- package/dist/services/definitions/mission-control.d.cts +1 -1
- package/dist/services/definitions/mission-control.d.mts +1 -1
- package/dist/services/definitions/mixpost.d.cts +1 -1
- package/dist/services/definitions/mixpost.d.mts +1 -1
- package/dist/services/definitions/mosquitto.d.cts +1 -1
- package/dist/services/definitions/mosquitto.d.mts +1 -1
- package/dist/services/definitions/motion-canvas.d.cts +1 -1
- package/dist/services/definitions/motion-canvas.d.mts +1 -1
- package/dist/services/definitions/mysql.d.cts +1 -1
- package/dist/services/definitions/mysql.d.mts +1 -1
- package/dist/services/definitions/n8n.d.cts +1 -1
- package/dist/services/definitions/n8n.d.mts +1 -1
- package/dist/services/definitions/nanobot.cjs +86 -0
- package/dist/services/definitions/nanobot.cjs.map +1 -0
- package/dist/services/definitions/nanobot.d.cts +7 -0
- package/dist/services/definitions/nanobot.d.cts.map +1 -0
- package/dist/services/definitions/nanobot.d.mts +7 -0
- package/dist/services/definitions/nanobot.d.mts.map +1 -0
- package/dist/services/definitions/nanobot.mjs +85 -0
- package/dist/services/definitions/nanobot.mjs.map +1 -0
- package/dist/services/definitions/nanoclaw.cjs +79 -0
- package/dist/services/definitions/nanoclaw.cjs.map +1 -0
- package/dist/services/definitions/nanoclaw.d.cts +7 -0
- package/dist/services/definitions/nanoclaw.d.cts.map +1 -0
- package/dist/services/definitions/nanoclaw.d.mts +7 -0
- package/dist/services/definitions/nanoclaw.d.mts.map +1 -0
- package/dist/services/definitions/nanoclaw.mjs +78 -0
- package/dist/services/definitions/nanoclaw.mjs.map +1 -0
- package/dist/services/definitions/navidrome.d.cts +1 -1
- package/dist/services/definitions/navidrome.d.mts +1 -1
- package/dist/services/definitions/neo4j.d.cts +1 -1
- package/dist/services/definitions/neo4j.d.mts +1 -1
- package/dist/services/definitions/nextcloud.d.cts +1 -1
- package/dist/services/definitions/nextcloud.d.mts +1 -1
- package/dist/services/definitions/nginx-proxy-manager.d.cts +1 -1
- package/dist/services/definitions/nginx-proxy-manager.d.mts +1 -1
- package/dist/services/definitions/nocodb.d.cts +1 -1
- package/dist/services/definitions/nocodb.d.mts +1 -1
- package/dist/services/definitions/node-red.d.cts +1 -1
- package/dist/services/definitions/node-red.d.mts +1 -1
- package/dist/services/definitions/ntfy.d.cts +1 -1
- package/dist/services/definitions/ntfy.d.mts +1 -1
- package/dist/services/definitions/ollama.d.cts +1 -1
- package/dist/services/definitions/ollama.d.mts +1 -1
- package/dist/services/definitions/open-saas.d.cts +1 -1
- package/dist/services/definitions/open-saas.d.mts +1 -1
- package/dist/services/definitions/open-webui.d.cts +1 -1
- package/dist/services/definitions/open-webui.d.mts +1 -1
- package/dist/services/definitions/opencode.d.cts +1 -1
- package/dist/services/definitions/opencode.d.mts +1 -1
- package/dist/services/definitions/openhands.d.cts +1 -1
- package/dist/services/definitions/openhands.d.mts +1 -1
- package/dist/services/definitions/openpanel.d.cts +1 -1
- package/dist/services/definitions/openpanel.d.mts +1 -1
- package/dist/services/definitions/opensandbox.cjs +2 -1
- package/dist/services/definitions/opensandbox.cjs.map +1 -1
- package/dist/services/definitions/opensandbox.d.cts +1 -1
- package/dist/services/definitions/opensandbox.d.mts +1 -1
- package/dist/services/definitions/opensandbox.mjs +2 -1
- package/dist/services/definitions/opensandbox.mjs.map +1 -1
- package/dist/services/definitions/opensearch.d.cts +1 -1
- package/dist/services/definitions/opensearch.d.mts +1 -1
- package/dist/services/definitions/outline.d.cts +1 -1
- package/dist/services/definitions/outline.d.mts +1 -1
- package/dist/services/definitions/paperless-ngx.d.cts +1 -1
- package/dist/services/definitions/paperless-ngx.d.mts +1 -1
- package/dist/services/definitions/pentagi.d.cts +1 -1
- package/dist/services/definitions/pentagi.d.mts +1 -1
- package/dist/services/definitions/pentestagent.d.cts +1 -1
- package/dist/services/definitions/pentestagent.d.mts +1 -1
- package/dist/services/definitions/photoprism.d.cts +1 -1
- package/dist/services/definitions/photoprism.d.mts +1 -1
- package/dist/services/definitions/pihole.d.cts +1 -1
- package/dist/services/definitions/pihole.d.mts +1 -1
- package/dist/services/definitions/piper-tts.d.cts +1 -1
- package/dist/services/definitions/piper-tts.d.mts +1 -1
- package/dist/services/definitions/plane.d.cts +1 -1
- package/dist/services/definitions/plane.d.mts +1 -1
- package/dist/services/definitions/plausible.d.cts +1 -1
- package/dist/services/definitions/plausible.d.mts +1 -1
- package/dist/services/definitions/playwright-server.d.cts +1 -1
- package/dist/services/definitions/playwright-server.d.mts +1 -1
- package/dist/services/definitions/pocket-id.d.cts +1 -1
- package/dist/services/definitions/pocket-id.d.mts +1 -1
- package/dist/services/definitions/pocketbase.d.cts +1 -1
- package/dist/services/definitions/pocketbase.d.mts +1 -1
- package/dist/services/definitions/portainer.d.cts +1 -1
- package/dist/services/definitions/portainer.d.mts +1 -1
- package/dist/services/definitions/postgresql.d.cts +1 -1
- package/dist/services/definitions/postgresql.d.mts +1 -1
- package/dist/services/definitions/posthog.d.cts +1 -1
- package/dist/services/definitions/posthog.d.mts +1 -1
- package/dist/services/definitions/postiz.d.cts +1 -1
- package/dist/services/definitions/postiz.d.mts +1 -1
- package/dist/services/definitions/prometheus.d.cts +1 -1
- package/dist/services/definitions/prometheus.d.mts +1 -1
- package/dist/services/definitions/qdrant.d.cts +1 -1
- package/dist/services/definitions/qdrant.d.mts +1 -1
- package/dist/services/definitions/rabbitmq.d.cts +1 -1
- package/dist/services/definitions/rabbitmq.d.mts +1 -1
- package/dist/services/definitions/ragflow.d.cts +1 -1
- package/dist/services/definitions/ragflow.d.mts +1 -1
- package/dist/services/definitions/redis.d.cts +1 -1
- package/dist/services/definitions/redis.d.mts +1 -1
- package/dist/services/definitions/relaticle-horizon.cjs +48 -0
- package/dist/services/definitions/relaticle-horizon.cjs.map +1 -0
- package/dist/services/definitions/relaticle-horizon.d.cts +7 -0
- package/dist/services/definitions/relaticle-horizon.d.cts.map +1 -0
- package/dist/services/definitions/relaticle-horizon.d.mts +7 -0
- package/dist/services/definitions/relaticle-horizon.d.mts.map +1 -0
- package/dist/services/definitions/relaticle-horizon.mjs +48 -0
- package/dist/services/definitions/relaticle-horizon.mjs.map +1 -0
- package/dist/services/definitions/relaticle-scheduler.cjs +44 -0
- package/dist/services/definitions/relaticle-scheduler.cjs.map +1 -0
- package/dist/services/definitions/relaticle-scheduler.d.cts +7 -0
- package/dist/services/definitions/relaticle-scheduler.d.cts.map +1 -0
- package/dist/services/definitions/relaticle-scheduler.d.mts +7 -0
- package/dist/services/definitions/relaticle-scheduler.d.mts.map +1 -0
- package/dist/services/definitions/relaticle-scheduler.mjs +44 -0
- package/dist/services/definitions/relaticle-scheduler.mjs.map +1 -0
- package/dist/services/definitions/relaticle.cjs +151 -0
- package/dist/services/definitions/relaticle.cjs.map +1 -0
- package/dist/services/definitions/relaticle.d.cts +80 -0
- package/dist/services/definitions/relaticle.d.cts.map +1 -0
- package/dist/services/definitions/relaticle.d.mts +80 -0
- package/dist/services/definitions/relaticle.d.mts.map +1 -0
- package/dist/services/definitions/relaticle.mjs +149 -0
- package/dist/services/definitions/relaticle.mjs.map +1 -0
- package/dist/services/definitions/remotion.d.cts +1 -1
- package/dist/services/definitions/remotion.d.mts +1 -1
- package/dist/services/definitions/restic.d.cts +1 -1
- package/dist/services/definitions/restic.d.mts +1 -1
- package/dist/services/definitions/revolt.d.cts +1 -1
- package/dist/services/definitions/revolt.d.mts +1 -1
- package/dist/services/definitions/rocketchat.d.cts +1 -1
- package/dist/services/definitions/rocketchat.d.mts +1 -1
- package/dist/services/definitions/saleor.d.cts +1 -1
- package/dist/services/definitions/saleor.d.mts +1 -1
- package/dist/services/definitions/scrapling.d.cts +1 -1
- package/dist/services/definitions/scrapling.d.mts +1 -1
- package/dist/services/definitions/searxng.d.cts +1 -1
- package/dist/services/definitions/searxng.d.mts +1 -1
- package/dist/services/definitions/sentry.d.cts +1 -1
- package/dist/services/definitions/sentry.d.mts +1 -1
- package/dist/services/definitions/signoz.d.cts +1 -1
- package/dist/services/definitions/signoz.d.mts +1 -1
- package/dist/services/definitions/solidityguard.d.cts +1 -1
- package/dist/services/definitions/solidityguard.d.mts +1 -1
- package/dist/services/definitions/sonarqube.d.cts +1 -1
- package/dist/services/definitions/sonarqube.d.mts +1 -1
- package/dist/services/definitions/stable-diffusion.d.cts +1 -1
- package/dist/services/definitions/stable-diffusion.d.mts +1 -1
- package/dist/services/definitions/steel-browser.d.cts +1 -1
- package/dist/services/definitions/steel-browser.d.mts +1 -1
- package/dist/services/definitions/stirling-pdf.d.cts +1 -1
- package/dist/services/definitions/stirling-pdf.d.mts +1 -1
- package/dist/services/definitions/strapi.d.cts +1 -1
- package/dist/services/definitions/strapi.d.mts +1 -1
- package/dist/services/definitions/stream-gateway.d.cts +1 -1
- package/dist/services/definitions/stream-gateway.d.mts +1 -1
- package/dist/services/definitions/supabase.d.cts +1 -1
- package/dist/services/definitions/supabase.d.mts +1 -1
- package/dist/services/definitions/superset.d.cts +1 -1
- package/dist/services/definitions/superset.d.mts +1 -1
- package/dist/services/definitions/surrealdb.d.cts +1 -1
- package/dist/services/definitions/surrealdb.d.mts +1 -1
- package/dist/services/definitions/tabby-ml.d.cts +1 -1
- package/dist/services/definitions/tabby-ml.d.mts +1 -1
- package/dist/services/definitions/tailscale.d.cts +1 -1
- package/dist/services/definitions/tailscale.d.mts +1 -1
- package/dist/services/definitions/tempo.d.cts +1 -1
- package/dist/services/definitions/tempo.d.mts +1 -1
- package/dist/services/definitions/temporal.d.cts +1 -1
- package/dist/services/definitions/temporal.d.mts +1 -1
- package/dist/services/definitions/text-gen-webui.d.cts +1 -1
- package/dist/services/definitions/text-gen-webui.d.mts +1 -1
- package/dist/services/definitions/timescaledb.d.cts +1 -1
- package/dist/services/definitions/timescaledb.d.mts +1 -1
- package/dist/services/definitions/traefik.d.cts +1 -1
- package/dist/services/definitions/traefik.d.mts +1 -1
- package/dist/services/definitions/twenty-worker.cjs +73 -0
- package/dist/services/definitions/twenty-worker.cjs.map +1 -0
- package/dist/services/definitions/twenty-worker.d.cts +7 -0
- package/dist/services/definitions/twenty-worker.d.cts.map +1 -0
- package/dist/services/definitions/twenty-worker.d.mts +7 -0
- package/dist/services/definitions/twenty-worker.d.mts.map +1 -0
- package/dist/services/definitions/twenty-worker.mjs +72 -0
- package/dist/services/definitions/twenty-worker.mjs.map +1 -0
- package/dist/services/definitions/twenty.cjs +24 -2
- package/dist/services/definitions/twenty.cjs.map +1 -1
- package/dist/services/definitions/twenty.d.cts +1 -1
- package/dist/services/definitions/twenty.d.mts +1 -1
- package/dist/services/definitions/twenty.mjs +24 -2
- package/dist/services/definitions/twenty.mjs.map +1 -1
- package/dist/services/definitions/umami.d.cts +1 -1
- package/dist/services/definitions/umami.d.mts +1 -1
- package/dist/services/definitions/uptime-kuma.d.cts +1 -1
- package/dist/services/definitions/uptime-kuma.d.mts +1 -1
- package/dist/services/definitions/usesend.d.cts +1 -1
- package/dist/services/definitions/usesend.d.mts +1 -1
- package/dist/services/definitions/valkey.d.cts +1 -1
- package/dist/services/definitions/valkey.d.mts +1 -1
- package/dist/services/definitions/vault.d.cts +1 -1
- package/dist/services/definitions/vault.d.mts +1 -1
- package/dist/services/definitions/vaultwarden.d.cts +1 -1
- package/dist/services/definitions/vaultwarden.d.mts +1 -1
- package/dist/services/definitions/vector-log.d.cts +1 -1
- package/dist/services/definitions/vector-log.d.mts +1 -1
- package/dist/services/definitions/vikunja.d.cts +1 -1
- package/dist/services/definitions/vikunja.d.mts +1 -1
- package/dist/services/definitions/watchtower.d.cts +1 -1
- package/dist/services/definitions/watchtower.d.mts +1 -1
- package/dist/services/definitions/weaviate.cjs +4 -1
- package/dist/services/definitions/weaviate.cjs.map +1 -1
- package/dist/services/definitions/weaviate.d.cts +1 -1
- package/dist/services/definitions/weaviate.d.mts +1 -1
- package/dist/services/definitions/weaviate.mjs +4 -1
- package/dist/services/definitions/weaviate.mjs.map +1 -1
- package/dist/services/definitions/whisper.d.cts +1 -1
- package/dist/services/definitions/whisper.d.mts +1 -1
- package/dist/services/definitions/wireguard.d.cts +1 -1
- package/dist/services/definitions/wireguard.d.mts +1 -1
- package/dist/services/definitions/woodpecker-ci.d.cts +1 -1
- package/dist/services/definitions/woodpecker-ci.d.mts +1 -1
- package/dist/services/definitions/xyops.d.cts +1 -1
- package/dist/services/definitions/xyops.d.mts +1 -1
- package/dist/services/definitions/zeroclaw.cjs +103 -0
- package/dist/services/definitions/zeroclaw.cjs.map +1 -0
- package/dist/services/definitions/zeroclaw.d.cts +7 -0
- package/dist/services/definitions/zeroclaw.d.cts.map +1 -0
- package/dist/services/definitions/zeroclaw.d.mts +7 -0
- package/dist/services/definitions/zeroclaw.d.mts.map +1 -0
- package/dist/services/definitions/zeroclaw.mjs +102 -0
- package/dist/services/definitions/zeroclaw.mjs.map +1 -0
- package/dist/services/definitions/zulip.d.cts +1 -1
- package/dist/services/definitions/zulip.d.mts +1 -1
- package/dist/services/registry.d.cts +1 -1
- package/dist/services/registry.d.mts +1 -1
- package/dist/services/registry.test.cjs +8 -8
- package/dist/services/registry.test.cjs.map +1 -1
- package/dist/services/registry.test.mjs +8 -8
- package/dist/services/registry.test.mjs.map +1 -1
- package/dist/skills/registry.cjs +19 -0
- package/dist/skills/registry.cjs.map +1 -1
- package/dist/skills/registry.d.cts +1 -1
- package/dist/skills/registry.d.cts.map +1 -1
- package/dist/skills/registry.d.mts +1 -1
- package/dist/skills/registry.d.mts.map +1 -1
- package/dist/skills/registry.mjs +19 -0
- package/dist/skills/registry.mjs.map +1 -1
- package/dist/{skills-BSF7iNa4.cjs → skills-uPxJVmKk.cjs} +311 -1
- package/dist/skills-uPxJVmKk.cjs.map +1 -0
- package/dist/{test.CTcmp4Su-ClCHJ3FA.mjs → test.CTcmp4Su-BRa7-bTj.mjs} +2 -2
- package/dist/{test.CTcmp4Su-ClCHJ3FA.mjs.map → test.CTcmp4Su-BRa7-bTj.mjs.map} +1 -1
- package/dist/{test.CTcmp4Su-DlzTarwH.cjs → test.CTcmp4Su-BWSPM8ZQ.cjs} +19 -1
- package/dist/{test.CTcmp4Su-DlzTarwH.cjs.map → test.CTcmp4Su-BWSPM8ZQ.cjs.map} +1 -1
- package/dist/track-analytics.d.cts +1 -1
- package/dist/track-analytics.d.mts +1 -1
- package/dist/track-analytics.test.cjs +1 -1
- package/dist/track-analytics.test.mjs +1 -1
- package/dist/types-BREUfzzq.d.mts +77 -0
- package/dist/types-BREUfzzq.d.mts.map +1 -0
- package/dist/types-Bsn0XzSP.d.cts +95 -0
- package/dist/types-Bsn0XzSP.d.cts.map +1 -0
- package/dist/types-CyZ5mn6w.d.cts +77 -0
- package/dist/types-CyZ5mn6w.d.cts.map +1 -0
- package/dist/types-DIsPc-hb.d.cts +100 -0
- package/dist/types-DIsPc-hb.d.cts.map +1 -0
- package/dist/types-DbXajvYq.d.mts +100 -0
- package/dist/types-DbXajvYq.d.mts.map +1 -0
- package/dist/types-DwTKyCZ9.d.mts +95 -0
- package/dist/types-DwTKyCZ9.d.mts.map +1 -0
- package/dist/{types-CR83OJiq.d.cts → types-dyBnrHm9.d.cts} +5 -1
- package/dist/types-dyBnrHm9.d.cts.map +1 -0
- package/dist/{types-zYjGTuyn.d.mts → types-fRSnaZTX.d.mts} +5 -1
- package/dist/types-fRSnaZTX.d.mts.map +1 -0
- package/dist/types.cjs +7 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +2 -93
- package/dist/types.d.mts +2 -93
- package/dist/types.mjs +7 -0
- package/dist/types.mjs.map +1 -1
- package/dist/validator.cjs +1 -1
- package/dist/validator.d.cts +1 -1
- package/dist/validator.d.mts +1 -1
- package/dist/validator.test.cjs +1 -1
- package/dist/validator.test.mjs +1 -1
- package/dist/version-manager.d.cts +1 -1
- package/dist/version-manager.d.mts +1 -1
- package/dist/version-manager.test.cjs +3 -3
- package/dist/version-manager.test.cjs.map +1 -1
- package/dist/version-manager.test.mjs +3 -3
- package/dist/version-manager.test.mjs.map +1 -1
- package/dist/zeroclaw-B-0TuOfZ.d.mts +7 -0
- package/dist/zeroclaw-B-0TuOfZ.d.mts.map +1 -0
- package/dist/zeroclaw-BvKpDHKe.d.cts +7 -0
- package/dist/zeroclaw-BvKpDHKe.d.cts.map +1 -0
- package/package.json +6 -2
- package/src/addon-stack.test.ts +19 -23
- package/src/addon-stack.ts +67 -44
- package/src/composer.test.ts +59 -0
- package/src/composer.ts +135 -194
- package/src/deployers/coolify.test.ts +180 -0
- package/src/deployers/coolify.ts +38 -0
- package/src/deployers/dokploy.test.ts +120 -0
- package/src/deployers/dokploy.ts +38 -0
- package/src/deployers/types.ts +2 -0
- package/src/frameworks/claude-code-fw.ts +118 -0
- package/src/frameworks/codex-fw.ts +102 -0
- package/src/frameworks/copaw.ts +154 -0
- package/src/frameworks/frameworks.test.ts +119 -0
- package/src/frameworks/index.ts +46 -0
- package/src/frameworks/memu.ts +149 -0
- package/src/frameworks/nanobot.ts +156 -0
- package/src/frameworks/nanoclaw.ts +126 -0
- package/src/frameworks/openclaw.ts +325 -0
- package/src/frameworks/registry.test.ts +131 -0
- package/src/frameworks/registry.ts +28 -0
- package/src/frameworks/types.ts +146 -0
- package/src/frameworks/zeroclaw.ts +148 -0
- package/src/generate.test.ts +55 -4
- package/src/generate.ts +67 -14
- package/src/generators/caddy.test.ts +41 -1
- package/src/generators/caddy.ts +16 -2
- package/src/generators/clone-repos.test.ts +1 -1
- package/src/generators/clone-repos.ts +7 -2
- package/src/generators/cloud-init.test.ts +70 -0
- package/src/generators/env.test.ts +2 -2
- package/src/generators/env.ts +30 -180
- package/src/generators/get-shit-done.test.ts +54 -0
- package/src/generators/grafana.test.ts +90 -0
- package/src/generators/health-check.ts +4 -4
- package/src/generators/n8n-workflows.test.ts +80 -0
- package/src/generators/openclaw-install-script.test.ts +42 -0
- package/src/generators/openclaw-json.ts +57 -5
- package/src/generators/postgres-init.test.ts +116 -0
- package/src/generators/postgres-init.ts +9 -0
- package/src/generators/prometheus.test.ts +108 -0
- package/src/generators/readme.ts +75 -9
- package/src/generators/scripts.test.ts +1 -1
- package/src/generators/skills.ts +316 -0
- package/src/generators/stack-manifest.test.ts +104 -0
- package/src/generators/traefik.test.ts +13 -13
- package/src/index.ts +47 -7
- package/src/logger/__tests__/logger.test.ts +388 -0
- package/src/logger/index.ts +15 -0
- package/src/logger/logger.ts +326 -0
- package/src/logger/sinks/callback-sink.ts +13 -0
- package/src/logger/sinks/console-sink.ts +51 -0
- package/src/logger/sinks/file-sink.ts +121 -0
- package/src/logger/types.ts +90 -0
- package/src/migrations.ts +8 -1
- package/src/port-scanner.test.ts +167 -0
- package/src/presets/presets.test.ts +4 -4
- package/src/presets/registry.test.ts +6 -6
- package/src/resolver.test.ts +31 -3
- package/src/resolver.ts +19 -3
- package/src/schema.test.ts +2 -2
- package/src/schema.ts +58 -17
- package/src/services/definitions/agent-browser.ts +177 -0
- package/src/services/definitions/apptension-saas.ts +2 -1
- package/src/services/definitions/chromadb.ts +1 -1
- package/src/services/definitions/claude-code.ts +1 -1
- package/src/services/definitions/clawrouter.ts +141 -0
- package/src/services/definitions/codex.ts +1 -1
- package/src/services/definitions/convex.ts +1 -2
- package/src/services/definitions/copaw.ts +101 -0
- package/src/services/definitions/desktop-environment.ts +1 -0
- package/src/services/definitions/hindsight.ts +3 -2
- package/src/services/definitions/index.ts +53 -16
- package/src/services/definitions/mem0.ts +132 -0
- package/src/services/definitions/memu.ts +96 -0
- package/src/services/definitions/milvus.ts +1 -1
- package/src/services/definitions/nanobot.ts +89 -0
- package/src/services/definitions/nanoclaw.ts +78 -0
- package/src/services/definitions/opensandbox.ts +6 -15
- package/src/services/definitions/relaticle-horizon.ts +48 -0
- package/src/services/definitions/relaticle-scheduler.ts +42 -0
- package/src/services/definitions/relaticle.ts +142 -0
- package/src/services/definitions/twenty-worker.ts +70 -0
- package/src/services/definitions/twenty.ts +16 -2
- package/src/services/definitions/weaviate.ts +1 -1
- package/src/services/definitions/zeroclaw.ts +102 -0
- package/src/services/registry.test.ts +7 -7
- package/src/skills/registry.ts +10 -0
- package/src/types.ts +11 -1
- package/src/version-manager.test.ts +2 -2
- package/dist/schema-BQnZrcw8.d.cts.map +0 -1
- package/dist/schema-SBpL0bdI.d.mts.map +0 -1
- package/dist/skills-BSF7iNa4.cjs.map +0 -1
- package/dist/types-CR83OJiq.d.cts.map +0 -1
- package/dist/types-zYjGTuyn.d.mts.map +0 -1
- package/dist/types.d.cts.map +0 -1
- package/dist/types.d.mts.map +0 -1
package/dist/generate.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getFrameworkById } from "./frameworks/registry.mjs";
|
|
2
|
+
import "./frameworks/index.mjs";
|
|
1
3
|
import { generatePostgresInit } from "./generators/postgres-init.mjs";
|
|
2
4
|
import { composeMultiFile } from "./composer.mjs";
|
|
3
5
|
import { generateSkillFiles } from "./generators/skills.mjs";
|
|
@@ -15,7 +17,6 @@ import { generateHealthCheck } from "./generators/health-check.mjs";
|
|
|
15
17
|
import { generateN8nWorkflows } from "./generators/n8n-workflows.mjs";
|
|
16
18
|
import { generateNativeInstallScripts } from "./generators/native-services.mjs";
|
|
17
19
|
import { generateOpenclawInstallScript } from "./generators/openclaw-install-script.mjs";
|
|
18
|
-
import { generateOpenClawConfig } from "./generators/openclaw-json.mjs";
|
|
19
20
|
import { generatePrometheusConfig } from "./generators/prometheus.mjs";
|
|
20
21
|
import { generateReadme } from "./generators/readme.mjs";
|
|
21
22
|
import { generateScripts } from "./generators/scripts.mjs";
|
|
@@ -33,19 +34,40 @@ function getComposePlatform(platform) {
|
|
|
33
34
|
* Main orchestration function: takes generation input, resolves dependencies,
|
|
34
35
|
* generates all files, validates, and returns the complete file tree.
|
|
35
36
|
*/
|
|
36
|
-
function generate(rawInput) {
|
|
37
|
+
function generate(rawInput, options) {
|
|
38
|
+
const logger = options?.logger;
|
|
37
39
|
const input = migrateConfig(rawInput);
|
|
38
40
|
const composePlatform = getComposePlatform(input.platform);
|
|
39
|
-
|
|
41
|
+
logger?.info("generation", "Starting stack generation", {
|
|
42
|
+
projectName: input.projectName,
|
|
43
|
+
services: input.services,
|
|
44
|
+
platform: input.platform,
|
|
45
|
+
proxy: input.proxy,
|
|
46
|
+
deploymentType: input.deploymentType
|
|
47
|
+
});
|
|
48
|
+
const resolverInput = {
|
|
40
49
|
services: input.services,
|
|
41
50
|
skillPacks: input.skillPacks,
|
|
42
51
|
aiProviders: input.aiProviders,
|
|
52
|
+
primaryFramework: input.primaryFramework,
|
|
43
53
|
proxy: input.proxy,
|
|
44
54
|
gpu: input.gpu,
|
|
45
55
|
platform: composePlatform,
|
|
46
56
|
monitoring: input.monitoring
|
|
57
|
+
};
|
|
58
|
+
logger?.debug("resolution", "Resolving dependencies");
|
|
59
|
+
const resolved = resolve(resolverInput);
|
|
60
|
+
if (!resolved.isValid) {
|
|
61
|
+
const errMsg = `Invalid stack configuration: ${resolved.errors.map((e) => e.message).join("; ")}`;
|
|
62
|
+
logger?.error("resolution", errMsg);
|
|
63
|
+
throw new StackConfigError(errMsg);
|
|
64
|
+
}
|
|
65
|
+
logger?.info("resolution", `Resolved ${resolved.services.length} services`, {
|
|
66
|
+
serviceCount: resolved.services.length,
|
|
67
|
+
addedDeps: resolved.addedDependencies.length,
|
|
68
|
+
warnings: resolved.warnings.length,
|
|
69
|
+
estimatedMemoryMB: resolved.estimatedMemoryMB
|
|
47
70
|
});
|
|
48
|
-
if (!resolved.isValid) throw new StackConfigError(`Invalid stack configuration: ${resolved.errors.map((e) => e.message).join("; ")}`);
|
|
49
71
|
const isBareMetal = input.deploymentType === "bare-metal";
|
|
50
72
|
let resolvedForCompose = resolved;
|
|
51
73
|
let nativeIds = /* @__PURE__ */ new Set();
|
|
@@ -58,10 +80,13 @@ function generate(rawInput) {
|
|
|
58
80
|
nativeIds = partition.nativeIds;
|
|
59
81
|
if (nativeServices.length > 0) resolvedForCompose = resolvedWithOnlyServices(resolved, dockerOnlyServices);
|
|
60
82
|
}
|
|
83
|
+
logger?.debug("generation", "Generating Docker Compose YAML");
|
|
61
84
|
let traefikOutput;
|
|
62
85
|
if (input.proxy === "traefik" && input.domain) traefikOutput = generateTraefikConfig(resolvedForCompose, input.domain);
|
|
63
86
|
const composeOptions = {
|
|
64
87
|
projectName: input.projectName,
|
|
88
|
+
primaryFramework: input.primaryFramework,
|
|
89
|
+
companionFrameworks: input.companionFrameworks,
|
|
65
90
|
proxy: input.proxy,
|
|
66
91
|
proxyHttpPort: input.proxyHttpPort,
|
|
67
92
|
proxyHttpsPort: input.proxyHttpsPort,
|
|
@@ -78,11 +103,17 @@ function generate(rawInput) {
|
|
|
78
103
|
openclawInstallMethod: input.openclawInstallMethod ?? "docker"
|
|
79
104
|
};
|
|
80
105
|
const composeResult = composeMultiFile(resolvedForCompose, composeOptions);
|
|
106
|
+
logger?.info("generation", `Generated ${Object.keys(composeResult.files).length} compose files`);
|
|
81
107
|
const validation = validate(resolvedForCompose, composeResult.files["docker-compose.yml"] ?? "", {
|
|
82
108
|
domain: input.domain,
|
|
83
109
|
generateSecrets: input.generateSecrets
|
|
84
110
|
});
|
|
85
|
-
if (!validation.valid)
|
|
111
|
+
if (!validation.valid) {
|
|
112
|
+
const errMsg = `Validation failed: ${validation.errors.map((e) => e.message).join("; ")}`;
|
|
113
|
+
logger?.error("validation", errMsg);
|
|
114
|
+
throw new ValidationError(errMsg);
|
|
115
|
+
}
|
|
116
|
+
logger?.debug("validation", "Stack validation passed");
|
|
86
117
|
const files = {};
|
|
87
118
|
for (const [filename, content] of Object.entries(composeResult.files)) files[filename] = content;
|
|
88
119
|
const envFiles = generateEnvFiles(resolved, {
|
|
@@ -92,7 +123,8 @@ function generate(rawInput) {
|
|
|
92
123
|
nativeServiceIds: isBareMetal ? nativeIds : void 0,
|
|
93
124
|
composeFiles: Object.keys(composeResult.files),
|
|
94
125
|
composeProfiles: composeResult.profiles,
|
|
95
|
-
openclawImage: input.openclawImage
|
|
126
|
+
openclawImage: input.openclawImage,
|
|
127
|
+
primaryFramework: input.primaryFramework
|
|
96
128
|
});
|
|
97
129
|
files[".env.example"] = envFiles.envExample;
|
|
98
130
|
files[".env"] = envFiles.env;
|
|
@@ -108,18 +140,23 @@ function generate(rawInput) {
|
|
|
108
140
|
for (const [path, content] of Object.entries(manifestFiles)) files[path] = content;
|
|
109
141
|
const skillFiles = generateSkillFiles(resolved);
|
|
110
142
|
for (const [path, content] of Object.entries(skillFiles)) files[path] = content;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
143
|
+
const framework = getFrameworkById(input.primaryFramework ?? "openclaw");
|
|
144
|
+
if (framework) {
|
|
145
|
+
const fwConfig = framework.generateConfig(resolved, {
|
|
146
|
+
deploymentType: input.deploymentType,
|
|
147
|
+
gatewayPort: 18789,
|
|
148
|
+
frameworkVersion: input.openclawVersion
|
|
149
|
+
});
|
|
150
|
+
if (fwConfig) files[fwConfig.path] = fwConfig.content;
|
|
151
|
+
}
|
|
116
152
|
files["README.md"] = generateReadme(resolved, {
|
|
117
153
|
projectName: input.projectName,
|
|
118
154
|
domain: input.domain,
|
|
119
155
|
proxy: input.proxy,
|
|
120
156
|
deploymentType: input.deploymentType,
|
|
121
157
|
hasNativeServices: isBareMetal && nativeServices.length > 0,
|
|
122
|
-
openclawInstallMethod: input.openclawInstallMethod
|
|
158
|
+
openclawInstallMethod: input.openclawInstallMethod,
|
|
159
|
+
primaryFramework: input.primaryFramework
|
|
123
160
|
});
|
|
124
161
|
const scripts = generateScripts({ hasGitServices: resolvedForCompose.services.some((s) => s.definition.gitSource) });
|
|
125
162
|
for (const [path, content] of Object.entries(scripts)) files[path] = content;
|
|
@@ -184,6 +221,20 @@ function generate(rawInput) {
|
|
|
184
221
|
gatewayPort: 18789
|
|
185
222
|
});
|
|
186
223
|
const skillCount = resolved.services.reduce((sum, s) => sum + s.definition.skills.length, 0);
|
|
224
|
+
const fileCount = Object.keys(files).length;
|
|
225
|
+
logger?.log({
|
|
226
|
+
level: "info",
|
|
227
|
+
category: "generation",
|
|
228
|
+
message: `Stack generation complete: ${fileCount} files, ${resolved.services.length} services`,
|
|
229
|
+
outcome: "success",
|
|
230
|
+
context: {
|
|
231
|
+
fileCount,
|
|
232
|
+
serviceCount: resolved.services.length,
|
|
233
|
+
skillCount,
|
|
234
|
+
estimatedMemoryMB: resolved.estimatedMemoryMB
|
|
235
|
+
},
|
|
236
|
+
filesAffected: { created: Object.keys(files) }
|
|
237
|
+
});
|
|
187
238
|
return {
|
|
188
239
|
files,
|
|
189
240
|
metadata: {
|
package/dist/generate.mjs.map
CHANGED
|
@@ -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 { generateCloneScripts } from \"./generators/clone-repos.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\t\"repos/\",\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 hasGitServices = resolvedForCompose.services.some((s) => s.definition.gitSource);\n\tconst scripts = generateScripts({ hasGitServices });\n\tfor (const [path, content] of Object.entries(scripts)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Clone scripts for git-based services (SaaS boilerplates)\n\tconst cloneScripts = generateCloneScripts(resolvedForCompose);\n\tfor (const [path, content] of Object.entries(cloneScripts)) {\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\tresolvedServices: resolved.services.map((s) => s.definition.id),\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,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,KA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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 { getFrameworkById } from \"./frameworks/index.js\";\nimport { generateBareMetalInstall } from \"./generators/bare-metal-install.js\";\nimport { generateCaddyfile } from \"./generators/caddy.js\";\nimport { generateCloneScripts } from \"./generators/clone-repos.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 { 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 type { OperationsLogger } from \"./logger/logger.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(\n\trawInput: GenerationInput,\n\toptions?: { logger?: OperationsLogger },\n): GenerationResult {\n\tconst logger = options?.logger;\n\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\tlogger?.info(\"generation\", \"Starting stack generation\", {\n\t\tprojectName: input.projectName,\n\t\tservices: input.services,\n\t\tplatform: input.platform,\n\t\tproxy: input.proxy,\n\t\tdeploymentType: input.deploymentType,\n\t});\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\tprimaryFramework: input.primaryFramework,\n\t\tproxy: input.proxy,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tmonitoring: input.monitoring,\n\t};\n\tlogger?.debug(\"resolution\", \"Resolving dependencies\");\n\tconst resolved = resolve(resolverInput);\n\n\tif (!resolved.isValid) {\n\t\tconst errMsg = `Invalid stack configuration: ${resolved.errors.map((e) => e.message).join(\"; \")}`;\n\t\tlogger?.error(\"resolution\", errMsg);\n\t\tthrow new StackConfigError(errMsg);\n\t}\n\n\tlogger?.info(\"resolution\", `Resolved ${resolved.services.length} services`, {\n\t\tserviceCount: resolved.services.length,\n\t\taddedDeps: resolved.addedDependencies.length,\n\t\twarnings: resolved.warnings.length,\n\t\testimatedMemoryMB: resolved.estimatedMemoryMB,\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\tlogger?.debug(\"generation\", \"Generating Docker Compose YAML\");\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\tprimaryFramework: input.primaryFramework,\n\t\tcompanionFrameworks: input.companionFrameworks,\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\tlogger?.info(\"generation\", `Generated ${Object.keys(composeResult.files).length} compose files`);\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\tconst errMsg = `Validation failed: ${validation.errors.map((e) => e.message).join(\"; \")}`;\n\t\tlogger?.error(\"validation\", errMsg);\n\t\tthrow new ValidationError(errMsg);\n\t}\n\tlogger?.debug(\"validation\", \"Stack validation passed\");\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\tprimaryFramework: input.primaryFramework,\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\t\"repos/\",\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// Framework-specific configuration\n\tconst framework = getFrameworkById(input.primaryFramework ?? \"openclaw\");\n\tif (framework) {\n\t\tconst fwConfig = framework.generateConfig(resolved, {\n\t\t\tdeploymentType: input.deploymentType,\n\t\t\tgatewayPort: 18789,\n\t\t\tframeworkVersion: input.openclawVersion,\n\t\t});\n\t\tif (fwConfig) {\n\t\t\tfiles[fwConfig.path] = fwConfig.content;\n\t\t}\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\tprimaryFramework: input.primaryFramework,\n\t});\n\n\t// Scripts\n\tconst hasGitServices = resolvedForCompose.services.some((s) => s.definition.gitSource);\n\tconst scripts = generateScripts({ hasGitServices });\n\tfor (const [path, content] of Object.entries(scripts)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Clone scripts for git-based services (SaaS boilerplates)\n\tconst cloneScripts = generateCloneScripts(resolvedForCompose);\n\tfor (const [path, content] of Object.entries(cloneScripts)) {\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\tconst fileCount = Object.keys(files).length;\n\n\tlogger?.log({\n\t\tlevel: \"info\",\n\t\tcategory: \"generation\",\n\t\tmessage: `Stack generation complete: ${fileCount} files, ${resolved.services.length} services`,\n\t\toutcome: \"success\",\n\t\tcontext: {\n\t\t\tfileCount,\n\t\t\tserviceCount: resolved.services.length,\n\t\t\tskillCount,\n\t\t\testimatedMemoryMB: resolved.estimatedMemoryMB,\n\t\t},\n\t\tfilesAffected: { created: Object.keys(files) },\n\t});\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\tresolvedServices: resolved.services.map((s) => s.definition.id),\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,SAAS,mBAAmB,UAAmD;AAC9E,KAAI,aAAa,iBAAiB,aAAa,cAAe,QAAO;AACrE,QAAO;;;;;;AAOR,SAAgB,SACf,UACA,SACmB;CACnB,MAAM,SAAS,SAAS;CAGxB,MAAM,QAAQ,cAAc,SAAoC;CAEhE,MAAM,kBAAkB,mBAAmB,MAAM,SAAS;AAE1D,SAAQ,KAAK,cAAc,6BAA6B;EACvD,aAAa,MAAM;EACnB,UAAU,MAAM;EAChB,UAAU,MAAM;EAChB,OAAO,MAAM;EACb,gBAAgB,MAAM;EACtB,CAAC;CAGF,MAAM,gBAA+B;EACpC,UAAU,MAAM;EAChB,YAAY,MAAM;EAClB,aAAa,MAAM;EACnB,kBAAkB,MAAM;EACxB,OAAO,MAAM;EACb,KAAK,MAAM;EACX,UAAU;EACV,YAAY,MAAM;EAClB;AACD,SAAQ,MAAM,cAAc,yBAAyB;CACrD,MAAM,WAAW,QAAQ,cAAc;AAEvC,KAAI,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ills-uPxJVmKk.cjs");
|
|
2
|
+
const require_test_CTcmp4Su = require("./test.CTcmp4Su-BWSPM8ZQ.cjs");
|
|
3
3
|
const require_generate = require("./generate.cjs");
|
|
4
4
|
let yaml = require("yaml");
|
|
5
5
|
//#region src/generate.test.ts
|
|
@@ -102,7 +102,7 @@ require_test_CTcmp4Su.describe("generate (end-to-end)", () => {
|
|
|
102
102
|
openclawVersion: "latest"
|
|
103
103
|
});
|
|
104
104
|
require_test_CTcmp4Su.globalExpect(result.files).toHaveProperty("caddy/Caddyfile");
|
|
105
|
-
require_test_CTcmp4Su.globalExpect(result.files["caddy/Caddyfile"]
|
|
105
|
+
require_test_CTcmp4Su.globalExpect(result.files["caddy/Caddyfile"]?.length).toBeGreaterThan(0);
|
|
106
106
|
});
|
|
107
107
|
require_test_CTcmp4Su.it("generates prometheus config when monitoring enabled", () => {
|
|
108
108
|
const result = require_generate.generate({
|
|
@@ -239,9 +239,45 @@ require_test_CTcmp4Su.describe("generate (end-to-end)", () => {
|
|
|
239
239
|
"scripts/status.sh"
|
|
240
240
|
]) {
|
|
241
241
|
require_test_CTcmp4Su.globalExpect(result.files).toHaveProperty(script);
|
|
242
|
-
require_test_CTcmp4Su.globalExpect(result.files[script]
|
|
242
|
+
require_test_CTcmp4Su.globalExpect(result.files[script]?.length).toBeGreaterThan(0);
|
|
243
243
|
}
|
|
244
244
|
});
|
|
245
|
+
require_test_CTcmp4Su.it("generates a stack with zeroclaw as primary framework", () => {
|
|
246
|
+
const composed = (0, yaml.parse)(require_generate.generate({
|
|
247
|
+
projectName: "zeroclaw-stack",
|
|
248
|
+
services: ["redis"],
|
|
249
|
+
skillPacks: [],
|
|
250
|
+
proxy: "none",
|
|
251
|
+
gpu: false,
|
|
252
|
+
platform: "linux/amd64",
|
|
253
|
+
deployment: "local",
|
|
254
|
+
generateSecrets: true,
|
|
255
|
+
openclawVersion: "latest",
|
|
256
|
+
primaryFramework: "zeroclaw"
|
|
257
|
+
}).files["docker-compose.yml"]);
|
|
258
|
+
require_test_CTcmp4Su.globalExpect(composed.services).toHaveProperty("zeroclaw-gateway");
|
|
259
|
+
require_test_CTcmp4Su.globalExpect(composed.services).not.toHaveProperty("openclaw-gateway");
|
|
260
|
+
require_test_CTcmp4Su.globalExpect(composed.services).not.toHaveProperty("convex");
|
|
261
|
+
require_test_CTcmp4Su.globalExpect(composed.services).not.toHaveProperty("mission-control");
|
|
262
|
+
require_test_CTcmp4Su.globalExpect(composed.services).not.toHaveProperty("tailscale");
|
|
263
|
+
require_test_CTcmp4Su.globalExpect(composed.networks).toHaveProperty("zeroclaw-network");
|
|
264
|
+
});
|
|
265
|
+
require_test_CTcmp4Su.it("generates a stack with companion frameworks", () => {
|
|
266
|
+
const composed = (0, yaml.parse)(require_generate.generate({
|
|
267
|
+
projectName: "multi-fw-stack",
|
|
268
|
+
services: ["redis"],
|
|
269
|
+
skillPacks: [],
|
|
270
|
+
proxy: "none",
|
|
271
|
+
gpu: false,
|
|
272
|
+
platform: "linux/amd64",
|
|
273
|
+
deployment: "local",
|
|
274
|
+
generateSecrets: true,
|
|
275
|
+
openclawVersion: "latest",
|
|
276
|
+
companionFrameworks: ["claude-code"]
|
|
277
|
+
}).files["docker-compose.yml"]);
|
|
278
|
+
require_test_CTcmp4Su.globalExpect(composed.services).toHaveProperty("openclaw-gateway");
|
|
279
|
+
require_test_CTcmp4Su.globalExpect(composed.services).toHaveProperty("claude-code-companion");
|
|
280
|
+
});
|
|
245
281
|
require_test_CTcmp4Su.it("all generated .env.example vars have comments", () => {
|
|
246
282
|
const lines = require_generate.generate({
|
|
247
283
|
projectName: "env-comments-stack",
|
|
@@ -259,12 +295,12 @@ require_test_CTcmp4Su.describe("generate (end-to-end)", () => {
|
|
|
259
295
|
openclawVersion: "latest"
|
|
260
296
|
}).files[".env.example"].split("\n");
|
|
261
297
|
for (let i = 0; i < lines.length; i++) {
|
|
262
|
-
const line = lines[i]
|
|
298
|
+
const line = lines[i]?.trim();
|
|
263
299
|
if (line === "" || line.startsWith("#")) continue;
|
|
264
300
|
if (line.includes("=")) {
|
|
265
301
|
let foundComment = false;
|
|
266
302
|
for (let j = i - 1; j >= 0; j--) {
|
|
267
|
-
const prev = lines[j]
|
|
303
|
+
const prev = lines[j]?.trim();
|
|
268
304
|
if (prev === "") continue;
|
|
269
305
|
if (prev.startsWith("#")) {
|
|
270
306
|
foundComment = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.test.cjs","names":["describe","generate"],"sources":["../src/generate.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { parse } from \"yaml\";\nimport { generate } from \"./generate.js\";\n\ndescribe(\"generate (end-to-end)\", () => {\n\tit(\"generates a minimal stack (redis only)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"test-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Core files must be present\n\t\texpect(result.files).toHaveProperty(\"docker-compose.yml\");\n\t\texpect(result.files).toHaveProperty(\".env.example\");\n\t\texpect(result.files).toHaveProperty(\".env\");\n\t\texpect(result.files).toHaveProperty(\"README.md\");\n\n\t\t// docker-compose.yml must be valid YAML\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed).toHaveProperty(\"services\");\n\n\t\t// .env.example should reference REDIS_PASSWORD\n\t\texpect(result.files[\".env.example\"]).toContain(\"REDIS_PASSWORD\");\n\n\t\t// README should mention the project name\n\t\texpect(result.files[\"README.md\"]).toContain(\"test-stack\");\n\n\t\t// At least one service resolved\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(1);\n\t});\n\n\tit(\"generates research-agent stack from skill pack\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"research-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [\"research-agent\"],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Skill SKILL.md files for each skill in the research-agent pack\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/qdrant-memory/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/searxng-search/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/browserless-browse/SKILL.md\");\n\n\t\t// docker-compose.yml should contain the expected services\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).toHaveProperty(\"qdrant\");\n\t\texpect(composed.services).toHaveProperty(\"searxng\");\n\t\texpect(composed.services).toHaveProperty(\"browserless\");\n\t});\n\n\tit(\"generates full preset stack\", () => {\n\t\tconst fullServices = [\n\t\t\t\"redis\",\n\t\t\t\"postgresql\",\n\t\t\t\"qdrant\",\n\t\t\t\"n8n\",\n\t\t\t\"ffmpeg\",\n\t\t\t\"remotion\",\n\t\t\t\"minio\",\n\t\t\t\"caddy\",\n\t\t\t\"browserless\",\n\t\t\t\"searxng\",\n\t\t\t\"meilisearch\",\n\t\t\t\"uptime-kuma\",\n\t\t\t\"grafana\",\n\t\t\t\"prometheus\",\n\t\t\t\"ollama\",\n\t\t\t\"whisper\",\n\t\t\t\"gotify\",\n\t\t];\n\n\t\tconst result = generate({\n\t\t\tprojectName: \"full-stack\",\n\t\t\tservices: fullServices,\n\t\t\tskillPacks: [\n\t\t\t\t\"video-creator\",\n\t\t\t\t\"research-agent\",\n\t\t\t\t\"social-media\",\n\t\t\t\t\"dev-ops\",\n\t\t\t\t\"knowledge-base\",\n\t\t\t\t\"local-ai\",\n\t\t\t],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Should have many files\n\t\tconst fileCount = Object.keys(result.files).length;\n\t\texpect(fileCount).toBeGreaterThan(10);\n\n\t\t// Should include the start script\n\t\texpect(result.files).toHaveProperty(\"scripts/start.sh\");\n\n\t\t// Should not throw (it already didn't if we got here)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThan(5);\n\t});\n\n\tit(\"generates caddy config when proxy is caddy\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"caddy-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"caddy/Caddyfile\");\n\t\texpect(result.files[\"caddy/Caddyfile\"]!.length).toBeGreaterThan(0);\n\t});\n\n\tit(\"generates prometheus config when monitoring enabled\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"monitored-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tmonitoring: true,\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"prometheus/prometheus.yml\");\n\t\t// Verify it's valid YAML\n\t\tconst promConfig = parse(result.files[\"prometheus/prometheus.yml\"]!);\n\t\texpect(promConfig).toBeDefined();\n\t});\n\n\tit(\"generates La Suite Meet stack with all expected services\", () => {\n\t\tconst lasuiteMeetServices = [\n\t\t\t\"postgresql\",\n\t\t\t\"redis\",\n\t\t\t\"livekit\",\n\t\t\t\"lasuite-meet-backend\",\n\t\t\t\"lasuite-meet-frontend\",\n\t\t\t\"lasuite-meet-agents\",\n\t\t];\n\t\tconst result = generate({\n\t\t\tprojectName: \"lasuite-meet-stack\",\n\t\t\tservices: lasuiteMeetServices,\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Services may be split across main and profile compose files\n\t\tconst allServiceIds = new Set<string>();\n\t\tfor (const [filename, content] of Object.entries(result.files)) {\n\t\t\tif (filename.endsWith(\".yml\") && content) {\n\t\t\t\tconst doc = parse(content);\n\t\t\t\tif (doc?.services && typeof doc.services === \"object\") {\n\t\t\t\t\tfor (const id of Object.keys(doc.services)) {\n\t\t\t\t\t\tallServiceIds.add(id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (const id of lasuiteMeetServices) {\n\t\t\texpect(allServiceIds.has(id), `missing service ${id}`).toBe(true);\n\t\t}\n\t\t// Service count includes user services + mandatory platform services (convex, mission-control, tailscale)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(lasuiteMeetServices.length);\n\t});\n\n\tit(\"generates bare-metal installer for Windows (install.ps1)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"win-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"windows/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.ps1\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"docker compose\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"PowerShell\");\n\t});\n\n\tit(\"generates bare-metal installer for Linux/macOS (install.sh)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"linux-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.sh\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"docker\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"compose\");\n\t});\n\n\tit(\"bare-metal with redis on Linux: native script, compose excludes redis, gateway has extra_hosts\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"bare-metal-redis\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Native install script for Linux\n\t\texpect(result.files).toHaveProperty(\"native/install-linux.sh\");\n\t\texpect(result.files[\"native/install-linux.sh\"]).toContain(\"redis\");\n\n\t\t// Docker compose must NOT include redis (native); only gateway/openclaw\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).not.toHaveProperty(\"redis\");\n\t\texpect(composed.services).toHaveProperty(\"openclaw-gateway\");\n\n\t\t// Gateway must have extra_hosts for host.docker.internal\n\t\tconst gateway = composed.services[\"openclaw-gateway\"];\n\t\texpect(gateway).toBeDefined();\n\t\texpect(gateway.extra_hosts).toBeDefined();\n\t\texpect(\n\t\t\t(gateway.extra_hosts as string[]).some(\n\t\t\t\t(h: string) => h.includes(\"host.docker.internal\") && h.includes(\"host-gateway\"),\n\t\t\t),\n\t\t).toBe(true);\n\n\t\t// .env should set REDIS_HOST to host.docker.internal for gateway to reach native Redis\n\t\texpect(result.files[\".env\"]).toContain(\"REDIS_HOST=host.docker.internal\");\n\t});\n\n\tit(\"throws on conflicting services\", () => {\n\t\texpect(() =>\n\t\t\tgenerate({\n\t\t\t\tprojectName: \"conflict-stack\",\n\t\t\t\tservices: [\"redis\", \"valkey\"],\n\t\t\t\tskillPacks: [],\n\t\t\t\tproxy: \"none\",\n\t\t\t\tgpu: false,\n\t\t\t\tplatform: \"linux/amd64\",\n\t\t\t\tdeployment: \"local\",\n\t\t\t\tgenerateSecrets: true,\n\t\t\t\topenclawVersion: \"latest\",\n\t\t\t}),\n\t\t).toThrow();\n\t});\n\n\tit(\"generates scripts directory\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"scripts-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst expectedScripts = [\n\t\t\t\"scripts/start.sh\",\n\t\t\t\"scripts/stop.sh\",\n\t\t\t\"scripts/update.sh\",\n\t\t\t\"scripts/backup.sh\",\n\t\t\t\"scripts/status.sh\",\n\t\t];\n\n\t\tfor (const script of expectedScripts) {\n\t\t\texpect(result.files).toHaveProperty(script);\n\t\t\texpect(result.files[script]!.length).toBeGreaterThan(0);\n\t\t}\n\t});\n\n\tit(\"all generated .env.example vars have comments\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"env-comments-stack\",\n\t\t\tservices: [\"redis\", \"qdrant\", \"n8n\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst envExample = result.files[\".env.example\"]!;\n\t\tconst lines = envExample.split(\"\\n\");\n\n\t\t// Walk through lines: every non-empty, non-comment KEY=VALUE line should\n\t\t// have a preceding comment line (starting with #).\n\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\tconst line = lines[i]!.trim();\n\t\t\tif (line === \"\" || line.startsWith(\"#\")) continue;\n\n\t\t\t// This line looks like KEY=VALUE\n\t\t\tif (line.includes(\"=\")) {\n\t\t\t\t// There must be a comment somewhere before it (look backwards for a # line)\n\t\t\t\tlet foundComment = false;\n\t\t\t\tfor (let j = i - 1; j >= 0; j--) {\n\t\t\t\t\tconst prev = lines[j]!.trim();\n\t\t\t\t\tif (prev === \"\") continue; // skip blank lines\n\t\t\t\t\tif (prev.startsWith(\"#\")) {\n\t\t\t\t\t\tfoundComment = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// Hit another non-comment, non-empty line — no comment found\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\texpect(foundComment).toBe(true);\n\t\t\t}\n\t\t}\n\t});\n});\n"],"mappings":";;;;;AAIAA,sBAAAA,SAAS,+BAA+B;AACvC,uBAAA,GAAG,gDAAgD;EAClD,MAAM,SAASC,iBAAAA,SAAS;GACvB,aAAa;GACb,UAAU,CAAC,QAAQ;GACnB,YAAY,EAAE;GACd,OAAO;GACP,KAAK;GACL,UAAU;GACV,YAAY;GACZ,iBAAiB;GACjB,iBAAiB;GACjB,CAAC;AAGF,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,qBAAqB;AACzD,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,eAAe;AACnD,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,OAAO;AAC3C,wBAAA,aAAO,OAAO,MAAM,CAAC,eAAe,YAAY;AAIhD,wBAAA,cAAA,GAAA,KAAA,OADuB,OAAO,MAAM,sBAAuB,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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,0BAAA,aAAO,aAAa,CAAC,KAAK,KAAK;;;GAGhC;EACD"}
|
|
1
|
+
{"version":3,"file":"generate.test.cjs","names":["describe","generate"],"sources":["../src/generate.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { parse } from \"yaml\";\nimport { generate } from \"./generate.js\";\n\ndescribe(\"generate (end-to-end)\", () => {\n\tit(\"generates a minimal stack (redis only)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"test-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Core files must be present\n\t\texpect(result.files).toHaveProperty(\"docker-compose.yml\");\n\t\texpect(result.files).toHaveProperty(\".env.example\");\n\t\texpect(result.files).toHaveProperty(\".env\");\n\t\texpect(result.files).toHaveProperty(\"README.md\");\n\n\t\t// docker-compose.yml must be valid YAML\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed).toHaveProperty(\"services\");\n\n\t\t// .env.example should reference REDIS_PASSWORD\n\t\texpect(result.files[\".env.example\"]).toContain(\"REDIS_PASSWORD\");\n\n\t\t// README should mention the project name\n\t\texpect(result.files[\"README.md\"]).toContain(\"test-stack\");\n\n\t\t// At least one service resolved\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(1);\n\t});\n\n\tit(\"generates research-agent stack from skill pack\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"research-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [\"research-agent\"],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Skill SKILL.md files for each skill in the research-agent pack\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/qdrant-memory/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/searxng-search/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/browserless-browse/SKILL.md\");\n\n\t\t// docker-compose.yml should contain the expected services\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).toHaveProperty(\"qdrant\");\n\t\texpect(composed.services).toHaveProperty(\"searxng\");\n\t\texpect(composed.services).toHaveProperty(\"browserless\");\n\t});\n\n\tit(\"generates full preset stack\", () => {\n\t\tconst fullServices = [\n\t\t\t\"redis\",\n\t\t\t\"postgresql\",\n\t\t\t\"qdrant\",\n\t\t\t\"n8n\",\n\t\t\t\"ffmpeg\",\n\t\t\t\"remotion\",\n\t\t\t\"minio\",\n\t\t\t\"caddy\",\n\t\t\t\"browserless\",\n\t\t\t\"searxng\",\n\t\t\t\"meilisearch\",\n\t\t\t\"uptime-kuma\",\n\t\t\t\"grafana\",\n\t\t\t\"prometheus\",\n\t\t\t\"ollama\",\n\t\t\t\"whisper\",\n\t\t\t\"gotify\",\n\t\t];\n\n\t\tconst result = generate({\n\t\t\tprojectName: \"full-stack\",\n\t\t\tservices: fullServices,\n\t\t\tskillPacks: [\n\t\t\t\t\"video-creator\",\n\t\t\t\t\"research-agent\",\n\t\t\t\t\"social-media\",\n\t\t\t\t\"dev-ops\",\n\t\t\t\t\"knowledge-base\",\n\t\t\t\t\"local-ai\",\n\t\t\t],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Should have many files\n\t\tconst fileCount = Object.keys(result.files).length;\n\t\texpect(fileCount).toBeGreaterThan(10);\n\n\t\t// Should include the start script\n\t\texpect(result.files).toHaveProperty(\"scripts/start.sh\");\n\n\t\t// Should not throw (it already didn't if we got here)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThan(5);\n\t});\n\n\tit(\"generates caddy config when proxy is caddy\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"caddy-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"caddy/Caddyfile\");\n\t\texpect(result.files[\"caddy/Caddyfile\"]?.length).toBeGreaterThan(0);\n\t});\n\n\tit(\"generates prometheus config when monitoring enabled\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"monitored-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tmonitoring: true,\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"prometheus/prometheus.yml\");\n\t\t// Verify it's valid YAML\n\t\tconst promConfig = parse(result.files[\"prometheus/prometheus.yml\"]!);\n\t\texpect(promConfig).toBeDefined();\n\t});\n\n\tit(\"generates La Suite Meet stack with all expected services\", () => {\n\t\tconst lasuiteMeetServices = [\n\t\t\t\"postgresql\",\n\t\t\t\"redis\",\n\t\t\t\"livekit\",\n\t\t\t\"lasuite-meet-backend\",\n\t\t\t\"lasuite-meet-frontend\",\n\t\t\t\"lasuite-meet-agents\",\n\t\t];\n\t\tconst result = generate({\n\t\t\tprojectName: \"lasuite-meet-stack\",\n\t\t\tservices: lasuiteMeetServices,\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Services may be split across main and profile compose files\n\t\tconst allServiceIds = new Set<string>();\n\t\tfor (const [filename, content] of Object.entries(result.files)) {\n\t\t\tif (filename.endsWith(\".yml\") && content) {\n\t\t\t\tconst doc = parse(content);\n\t\t\t\tif (doc?.services && typeof doc.services === \"object\") {\n\t\t\t\t\tfor (const id of Object.keys(doc.services)) {\n\t\t\t\t\t\tallServiceIds.add(id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (const id of lasuiteMeetServices) {\n\t\t\texpect(allServiceIds.has(id), `missing service ${id}`).toBe(true);\n\t\t}\n\t\t// Service count includes user services + mandatory platform services (convex, mission-control, tailscale)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(lasuiteMeetServices.length);\n\t});\n\n\tit(\"generates bare-metal installer for Windows (install.ps1)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"win-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"windows/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.ps1\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"docker compose\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"PowerShell\");\n\t});\n\n\tit(\"generates bare-metal installer for Linux/macOS (install.sh)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"linux-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.sh\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"docker\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"compose\");\n\t});\n\n\tit(\"bare-metal with redis on Linux: native script, compose excludes redis, gateway has extra_hosts\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"bare-metal-redis\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Native install script for Linux\n\t\texpect(result.files).toHaveProperty(\"native/install-linux.sh\");\n\t\texpect(result.files[\"native/install-linux.sh\"]).toContain(\"redis\");\n\n\t\t// Docker compose must NOT include redis (native); only gateway/openclaw\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).not.toHaveProperty(\"redis\");\n\t\texpect(composed.services).toHaveProperty(\"openclaw-gateway\");\n\n\t\t// Gateway must have extra_hosts for host.docker.internal\n\t\tconst gateway = composed.services[\"openclaw-gateway\"];\n\t\texpect(gateway).toBeDefined();\n\t\texpect(gateway.extra_hosts).toBeDefined();\n\t\texpect(\n\t\t\t(gateway.extra_hosts as string[]).some(\n\t\t\t\t(h: string) => h.includes(\"host.docker.internal\") && h.includes(\"host-gateway\"),\n\t\t\t),\n\t\t).toBe(true);\n\n\t\t// .env should set REDIS_HOST to host.docker.internal for gateway to reach native Redis\n\t\texpect(result.files[\".env\"]).toContain(\"REDIS_HOST=host.docker.internal\");\n\t});\n\n\tit(\"throws on conflicting services\", () => {\n\t\texpect(() =>\n\t\t\tgenerate({\n\t\t\t\tprojectName: \"conflict-stack\",\n\t\t\t\tservices: [\"redis\", \"valkey\"],\n\t\t\t\tskillPacks: [],\n\t\t\t\tproxy: \"none\",\n\t\t\t\tgpu: false,\n\t\t\t\tplatform: \"linux/amd64\",\n\t\t\t\tdeployment: \"local\",\n\t\t\t\tgenerateSecrets: true,\n\t\t\t\topenclawVersion: \"latest\",\n\t\t\t}),\n\t\t).toThrow();\n\t});\n\n\tit(\"generates scripts directory\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"scripts-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst expectedScripts = [\n\t\t\t\"scripts/start.sh\",\n\t\t\t\"scripts/stop.sh\",\n\t\t\t\"scripts/update.sh\",\n\t\t\t\"scripts/backup.sh\",\n\t\t\t\"scripts/status.sh\",\n\t\t];\n\n\t\tfor (const script of expectedScripts) {\n\t\t\texpect(result.files).toHaveProperty(script);\n\t\t\texpect(result.files[script]?.length).toBeGreaterThan(0);\n\t\t}\n\t});\n\n\tit(\"generates a stack with zeroclaw as primary framework\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"zeroclaw-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tprimaryFramework: \"zeroclaw\",\n\t\t});\n\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\n\t\t// Should have zeroclaw-gateway, not openclaw-gateway\n\t\texpect(composed.services).toHaveProperty(\"zeroclaw-gateway\");\n\t\texpect(composed.services).not.toHaveProperty(\"openclaw-gateway\");\n\n\t\t// Should NOT have convex/mission-control/tailscale\n\t\texpect(composed.services).not.toHaveProperty(\"convex\");\n\t\texpect(composed.services).not.toHaveProperty(\"mission-control\");\n\t\texpect(composed.services).not.toHaveProperty(\"tailscale\");\n\n\t\t// Network should be zeroclaw-network\n\t\texpect(composed.networks).toHaveProperty(\"zeroclaw-network\");\n\t});\n\n\tit(\"generates a stack with companion frameworks\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"multi-fw-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tcompanionFrameworks: [\"claude-code\"],\n\t\t});\n\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\n\t\t// Primary OpenClaw gateway should be present\n\t\texpect(composed.services).toHaveProperty(\"openclaw-gateway\");\n\t\t// Companion Claude Code should be present\n\t\texpect(composed.services).toHaveProperty(\"claude-code-companion\");\n\t});\n\n\tit(\"all generated .env.example vars have comments\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"env-comments-stack\",\n\t\t\tservices: [\"redis\", \"qdrant\", \"n8n\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst envExample = result.files[\".env.example\"]!;\n\t\tconst lines = envExample.split(\"\\n\");\n\n\t\t// Walk through lines: every non-empty, non-comment KEY=VALUE line should\n\t\t// have a preceding comment line (starting with #).\n\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\tconst line = lines[i]?.trim();\n\t\t\tif (line === \"\" || line.startsWith(\"#\")) continue;\n\n\t\t\t// This line looks like KEY=VALUE\n\t\t\tif (line.includes(\"=\")) {\n\t\t\t\t// There must be a comment somewhere before it (look backwards for a # line)\n\t\t\t\tlet foundComment = false;\n\t\t\t\tfor (let j = i - 1; j >= 0; j--) {\n\t\t\t\t\tconst prev = lines[j]?.trim();\n\t\t\t\t\tif (prev === \"\") continue; // skip blank lines\n\t\t\t\t\tif (prev.startsWith(\"#\")) {\n\t\t\t\t\t\tfoundComment = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// Hit another non-comment, non-empty line — no comment found\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\texpect(foundComment).toBe(true);\n\t\t\t}\n\t\t}\n\t});\n});\n"],"mappings":";;;;;AAIAA,sBAAAA,SAAS,+BAA+B;AACvC,uBAAA,GAAG,gDAAgD;EAClD,MAAM,SAASC,iBAAAA,SAAS;GACvB,aAAa;GACb,UAAU,CAAC,QAAQ;GACnB,YAAY,EAAE;GACd,OAAO;GACP,KAAK;GACL,UAAU;GACV,YAAY;GACZ,iBAAi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AczD,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,IAAI,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,IAAI,MAAM;AAC7B,SAAI,SAAS,GAAI;AACjB,SAAI,KAAK,WAAW,IAAI,EAAE;AACzB,qBAAe;AACf;;AAGD;;AAED,0BAAA,aAAO,aAAa,CAAC,KAAK,KAAK;;;GAGhC;EACD"}
|
package/dist/generate.test.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as describe, o as it, t as globalExpect } from "./test.CTcmp4Su-BRa7-bTj.mjs";
|
|
2
2
|
import { generate } from "./generate.mjs";
|
|
3
3
|
import { parse } from "yaml";
|
|
4
4
|
//#region src/generate.test.ts
|
|
@@ -101,7 +101,7 @@ describe("generate (end-to-end)", () => {
|
|
|
101
101
|
openclawVersion: "latest"
|
|
102
102
|
});
|
|
103
103
|
globalExpect(result.files).toHaveProperty("caddy/Caddyfile");
|
|
104
|
-
globalExpect(result.files["caddy/Caddyfile"]
|
|
104
|
+
globalExpect(result.files["caddy/Caddyfile"]?.length).toBeGreaterThan(0);
|
|
105
105
|
});
|
|
106
106
|
it("generates prometheus config when monitoring enabled", () => {
|
|
107
107
|
const result = generate({
|
|
@@ -238,9 +238,45 @@ describe("generate (end-to-end)", () => {
|
|
|
238
238
|
"scripts/status.sh"
|
|
239
239
|
]) {
|
|
240
240
|
globalExpect(result.files).toHaveProperty(script);
|
|
241
|
-
globalExpect(result.files[script]
|
|
241
|
+
globalExpect(result.files[script]?.length).toBeGreaterThan(0);
|
|
242
242
|
}
|
|
243
243
|
});
|
|
244
|
+
it("generates a stack with zeroclaw as primary framework", () => {
|
|
245
|
+
const composed = parse(generate({
|
|
246
|
+
projectName: "zeroclaw-stack",
|
|
247
|
+
services: ["redis"],
|
|
248
|
+
skillPacks: [],
|
|
249
|
+
proxy: "none",
|
|
250
|
+
gpu: false,
|
|
251
|
+
platform: "linux/amd64",
|
|
252
|
+
deployment: "local",
|
|
253
|
+
generateSecrets: true,
|
|
254
|
+
openclawVersion: "latest",
|
|
255
|
+
primaryFramework: "zeroclaw"
|
|
256
|
+
}).files["docker-compose.yml"]);
|
|
257
|
+
globalExpect(composed.services).toHaveProperty("zeroclaw-gateway");
|
|
258
|
+
globalExpect(composed.services).not.toHaveProperty("openclaw-gateway");
|
|
259
|
+
globalExpect(composed.services).not.toHaveProperty("convex");
|
|
260
|
+
globalExpect(composed.services).not.toHaveProperty("mission-control");
|
|
261
|
+
globalExpect(composed.services).not.toHaveProperty("tailscale");
|
|
262
|
+
globalExpect(composed.networks).toHaveProperty("zeroclaw-network");
|
|
263
|
+
});
|
|
264
|
+
it("generates a stack with companion frameworks", () => {
|
|
265
|
+
const composed = parse(generate({
|
|
266
|
+
projectName: "multi-fw-stack",
|
|
267
|
+
services: ["redis"],
|
|
268
|
+
skillPacks: [],
|
|
269
|
+
proxy: "none",
|
|
270
|
+
gpu: false,
|
|
271
|
+
platform: "linux/amd64",
|
|
272
|
+
deployment: "local",
|
|
273
|
+
generateSecrets: true,
|
|
274
|
+
openclawVersion: "latest",
|
|
275
|
+
companionFrameworks: ["claude-code"]
|
|
276
|
+
}).files["docker-compose.yml"]);
|
|
277
|
+
globalExpect(composed.services).toHaveProperty("openclaw-gateway");
|
|
278
|
+
globalExpect(composed.services).toHaveProperty("claude-code-companion");
|
|
279
|
+
});
|
|
244
280
|
it("all generated .env.example vars have comments", () => {
|
|
245
281
|
const lines = generate({
|
|
246
282
|
projectName: "env-comments-stack",
|
|
@@ -258,12 +294,12 @@ describe("generate (end-to-end)", () => {
|
|
|
258
294
|
openclawVersion: "latest"
|
|
259
295
|
}).files[".env.example"].split("\n");
|
|
260
296
|
for (let i = 0; i < lines.length; i++) {
|
|
261
|
-
const line = lines[i]
|
|
297
|
+
const line = lines[i]?.trim();
|
|
262
298
|
if (line === "" || line.startsWith("#")) continue;
|
|
263
299
|
if (line.includes("=")) {
|
|
264
300
|
let foundComment = false;
|
|
265
301
|
for (let j = i - 1; j >= 0; j--) {
|
|
266
|
-
const prev = lines[j]
|
|
302
|
+
const prev = lines[j]?.trim();
|
|
267
303
|
if (prev === "") continue;
|
|
268
304
|
if (prev.startsWith("#")) {
|
|
269
305
|
foundComment = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.test.mjs","names":[],"sources":["../src/generate.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { parse } from \"yaml\";\nimport { generate } from \"./generate.js\";\n\ndescribe(\"generate (end-to-end)\", () => {\n\tit(\"generates a minimal stack (redis only)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"test-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Core files must be present\n\t\texpect(result.files).toHaveProperty(\"docker-compose.yml\");\n\t\texpect(result.files).toHaveProperty(\".env.example\");\n\t\texpect(result.files).toHaveProperty(\".env\");\n\t\texpect(result.files).toHaveProperty(\"README.md\");\n\n\t\t// docker-compose.yml must be valid YAML\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed).toHaveProperty(\"services\");\n\n\t\t// .env.example should reference REDIS_PASSWORD\n\t\texpect(result.files[\".env.example\"]).toContain(\"REDIS_PASSWORD\");\n\n\t\t// README should mention the project name\n\t\texpect(result.files[\"README.md\"]).toContain(\"test-stack\");\n\n\t\t// At least one service resolved\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(1);\n\t});\n\n\tit(\"generates research-agent stack from skill pack\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"research-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [\"research-agent\"],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Skill SKILL.md files for each skill in the research-agent pack\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/qdrant-memory/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/searxng-search/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/browserless-browse/SKILL.md\");\n\n\t\t// docker-compose.yml should contain the expected services\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).toHaveProperty(\"qdrant\");\n\t\texpect(composed.services).toHaveProperty(\"searxng\");\n\t\texpect(composed.services).toHaveProperty(\"browserless\");\n\t});\n\n\tit(\"generates full preset stack\", () => {\n\t\tconst fullServices = [\n\t\t\t\"redis\",\n\t\t\t\"postgresql\",\n\t\t\t\"qdrant\",\n\t\t\t\"n8n\",\n\t\t\t\"ffmpeg\",\n\t\t\t\"remotion\",\n\t\t\t\"minio\",\n\t\t\t\"caddy\",\n\t\t\t\"browserless\",\n\t\t\t\"searxng\",\n\t\t\t\"meilisearch\",\n\t\t\t\"uptime-kuma\",\n\t\t\t\"grafana\",\n\t\t\t\"prometheus\",\n\t\t\t\"ollama\",\n\t\t\t\"whisper\",\n\t\t\t\"gotify\",\n\t\t];\n\n\t\tconst result = generate({\n\t\t\tprojectName: \"full-stack\",\n\t\t\tservices: fullServices,\n\t\t\tskillPacks: [\n\t\t\t\t\"video-creator\",\n\t\t\t\t\"research-agent\",\n\t\t\t\t\"social-media\",\n\t\t\t\t\"dev-ops\",\n\t\t\t\t\"knowledge-base\",\n\t\t\t\t\"local-ai\",\n\t\t\t],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Should have many files\n\t\tconst fileCount = Object.keys(result.files).length;\n\t\texpect(fileCount).toBeGreaterThan(10);\n\n\t\t// Should include the start script\n\t\texpect(result.files).toHaveProperty(\"scripts/start.sh\");\n\n\t\t// Should not throw (it already didn't if we got here)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThan(5);\n\t});\n\n\tit(\"generates caddy config when proxy is caddy\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"caddy-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"caddy/Caddyfile\");\n\t\texpect(result.files[\"caddy/Caddyfile\"]!.length).toBeGreaterThan(0);\n\t});\n\n\tit(\"generates prometheus config when monitoring enabled\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"monitored-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tmonitoring: true,\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"prometheus/prometheus.yml\");\n\t\t// Verify it's valid YAML\n\t\tconst promConfig = parse(result.files[\"prometheus/prometheus.yml\"]!);\n\t\texpect(promConfig).toBeDefined();\n\t});\n\n\tit(\"generates La Suite Meet stack with all expected services\", () => {\n\t\tconst lasuiteMeetServices = [\n\t\t\t\"postgresql\",\n\t\t\t\"redis\",\n\t\t\t\"livekit\",\n\t\t\t\"lasuite-meet-backend\",\n\t\t\t\"lasuite-meet-frontend\",\n\t\t\t\"lasuite-meet-agents\",\n\t\t];\n\t\tconst result = generate({\n\t\t\tprojectName: \"lasuite-meet-stack\",\n\t\t\tservices: lasuiteMeetServices,\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Services may be split across main and profile compose files\n\t\tconst allServiceIds = new Set<string>();\n\t\tfor (const [filename, content] of Object.entries(result.files)) {\n\t\t\tif (filename.endsWith(\".yml\") && content) {\n\t\t\t\tconst doc = parse(content);\n\t\t\t\tif (doc?.services && typeof doc.services === \"object\") {\n\t\t\t\t\tfor (const id of Object.keys(doc.services)) {\n\t\t\t\t\t\tallServiceIds.add(id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (const id of lasuiteMeetServices) {\n\t\t\texpect(allServiceIds.has(id), `missing service ${id}`).toBe(true);\n\t\t}\n\t\t// Service count includes user services + mandatory platform services (convex, mission-control, tailscale)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(lasuiteMeetServices.length);\n\t});\n\n\tit(\"generates bare-metal installer for Windows (install.ps1)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"win-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"windows/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.ps1\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"docker compose\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"PowerShell\");\n\t});\n\n\tit(\"generates bare-metal installer for Linux/macOS (install.sh)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"linux-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.sh\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"docker\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"compose\");\n\t});\n\n\tit(\"bare-metal with redis on Linux: native script, compose excludes redis, gateway has extra_hosts\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"bare-metal-redis\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Native install script for Linux\n\t\texpect(result.files).toHaveProperty(\"native/install-linux.sh\");\n\t\texpect(result.files[\"native/install-linux.sh\"]).toContain(\"redis\");\n\n\t\t// Docker compose must NOT include redis (native); only gateway/openclaw\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).not.toHaveProperty(\"redis\");\n\t\texpect(composed.services).toHaveProperty(\"openclaw-gateway\");\n\n\t\t// Gateway must have extra_hosts for host.docker.internal\n\t\tconst gateway = composed.services[\"openclaw-gateway\"];\n\t\texpect(gateway).toBeDefined();\n\t\texpect(gateway.extra_hosts).toBeDefined();\n\t\texpect(\n\t\t\t(gateway.extra_hosts as string[]).some(\n\t\t\t\t(h: string) => h.includes(\"host.docker.internal\") && h.includes(\"host-gateway\"),\n\t\t\t),\n\t\t).toBe(true);\n\n\t\t// .env should set REDIS_HOST to host.docker.internal for gateway to reach native Redis\n\t\texpect(result.files[\".env\"]).toContain(\"REDIS_HOST=host.docker.internal\");\n\t});\n\n\tit(\"throws on conflicting services\", () => {\n\t\texpect(() =>\n\t\t\tgenerate({\n\t\t\t\tprojectName: \"conflict-stack\",\n\t\t\t\tservices: [\"redis\", \"valkey\"],\n\t\t\t\tskillPacks: [],\n\t\t\t\tproxy: \"none\",\n\t\t\t\tgpu: false,\n\t\t\t\tplatform: \"linux/amd64\",\n\t\t\t\tdeployment: \"local\",\n\t\t\t\tgenerateSecrets: true,\n\t\t\t\topenclawVersion: \"latest\",\n\t\t\t}),\n\t\t).toThrow();\n\t});\n\n\tit(\"generates scripts directory\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"scripts-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst expectedScripts = [\n\t\t\t\"scripts/start.sh\",\n\t\t\t\"scripts/stop.sh\",\n\t\t\t\"scripts/update.sh\",\n\t\t\t\"scripts/backup.sh\",\n\t\t\t\"scripts/status.sh\",\n\t\t];\n\n\t\tfor (const script of expectedScripts) {\n\t\t\texpect(result.files).toHaveProperty(script);\n\t\t\texpect(result.files[script]!.length).toBeGreaterThan(0);\n\t\t}\n\t});\n\n\tit(\"all generated .env.example vars have comments\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"env-comments-stack\",\n\t\t\tservices: [\"redis\", \"qdrant\", \"n8n\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst envExample = result.files[\".env.example\"]!;\n\t\tconst lines = envExample.split(\"\\n\");\n\n\t\t// Walk through lines: every non-empty, non-comment KEY=VALUE line should\n\t\t// have a preceding comment line (starting with #).\n\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\tconst line = lines[i]!.trim();\n\t\t\tif (line === \"\" || line.startsWith(\"#\")) continue;\n\n\t\t\t// This line looks like KEY=VALUE\n\t\t\tif (line.includes(\"=\")) {\n\t\t\t\t// There must be a comment somewhere before it (look backwards for a # line)\n\t\t\t\tlet foundComment = false;\n\t\t\t\tfor (let j = i - 1; j >= 0; j--) {\n\t\t\t\t\tconst prev = lines[j]!.trim();\n\t\t\t\t\tif (prev === \"\") continue; // skip blank lines\n\t\t\t\t\tif (prev.startsWith(\"#\")) {\n\t\t\t\t\t\tfoundComment = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// 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,iB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KAAK;GACtC,MAAM,OAAO,MAAM,GAAI,MAAM;AAC7B,OAAI,SAAS,MAAM,KAAK,WAAW,IAAI,CAAE;AAGzC,OAAI,KAAK,SAAS,IAAI,EAAE;IAEvB,IAAI,eAAe;AACnB,SAAK,IAAI,IAAI,IAAI,GAAG,KAAK,GAAG,KAAK;KAChC,MAAM,OAAO,MAAM,GAAI,MAAM;AAC7B,SAAI,SAAS,GAAI;AACjB,SAAI,KAAK,WAAW,IAAI,EAAE;AACzB,qBAAe;AACf;;AAGD;;AAED,iBAAO,aAAa,CAAC,KAAK,KAAK;;;GAGhC;EACD"}
|
|
1
|
+
{"version":3,"file":"generate.test.mjs","names":[],"sources":["../src/generate.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { parse } from \"yaml\";\nimport { generate } from \"./generate.js\";\n\ndescribe(\"generate (end-to-end)\", () => {\n\tit(\"generates a minimal stack (redis only)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"test-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Core files must be present\n\t\texpect(result.files).toHaveProperty(\"docker-compose.yml\");\n\t\texpect(result.files).toHaveProperty(\".env.example\");\n\t\texpect(result.files).toHaveProperty(\".env\");\n\t\texpect(result.files).toHaveProperty(\"README.md\");\n\n\t\t// docker-compose.yml must be valid YAML\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed).toHaveProperty(\"services\");\n\n\t\t// .env.example should reference REDIS_PASSWORD\n\t\texpect(result.files[\".env.example\"]).toContain(\"REDIS_PASSWORD\");\n\n\t\t// README should mention the project name\n\t\texpect(result.files[\"README.md\"]).toContain(\"test-stack\");\n\n\t\t// At least one service resolved\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(1);\n\t});\n\n\tit(\"generates research-agent stack from skill pack\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"research-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [\"research-agent\"],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Skill SKILL.md files for each skill in the research-agent pack\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/qdrant-memory/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/searxng-search/SKILL.md\");\n\t\texpect(result.files).toHaveProperty(\"openclaw/workspace/skills/browserless-browse/SKILL.md\");\n\n\t\t// docker-compose.yml should contain the expected services\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).toHaveProperty(\"qdrant\");\n\t\texpect(composed.services).toHaveProperty(\"searxng\");\n\t\texpect(composed.services).toHaveProperty(\"browserless\");\n\t});\n\n\tit(\"generates full preset stack\", () => {\n\t\tconst fullServices = [\n\t\t\t\"redis\",\n\t\t\t\"postgresql\",\n\t\t\t\"qdrant\",\n\t\t\t\"n8n\",\n\t\t\t\"ffmpeg\",\n\t\t\t\"remotion\",\n\t\t\t\"minio\",\n\t\t\t\"caddy\",\n\t\t\t\"browserless\",\n\t\t\t\"searxng\",\n\t\t\t\"meilisearch\",\n\t\t\t\"uptime-kuma\",\n\t\t\t\"grafana\",\n\t\t\t\"prometheus\",\n\t\t\t\"ollama\",\n\t\t\t\"whisper\",\n\t\t\t\"gotify\",\n\t\t];\n\n\t\tconst result = generate({\n\t\t\tprojectName: \"full-stack\",\n\t\t\tservices: fullServices,\n\t\t\tskillPacks: [\n\t\t\t\t\"video-creator\",\n\t\t\t\t\"research-agent\",\n\t\t\t\t\"social-media\",\n\t\t\t\t\"dev-ops\",\n\t\t\t\t\"knowledge-base\",\n\t\t\t\t\"local-ai\",\n\t\t\t],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Should have many files\n\t\tconst fileCount = Object.keys(result.files).length;\n\t\texpect(fileCount).toBeGreaterThan(10);\n\n\t\t// Should include the start script\n\t\texpect(result.files).toHaveProperty(\"scripts/start.sh\");\n\n\t\t// Should not throw (it already didn't if we got here)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThan(5);\n\t});\n\n\tit(\"generates caddy config when proxy is caddy\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"caddy-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"caddy\",\n\t\t\tdomain: \"example.com\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"caddy/Caddyfile\");\n\t\texpect(result.files[\"caddy/Caddyfile\"]?.length).toBeGreaterThan(0);\n\t});\n\n\tit(\"generates prometheus config when monitoring enabled\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"monitored-stack\",\n\t\t\tservices: [],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tmonitoring: true,\n\t\t});\n\n\t\texpect(result.files).toHaveProperty(\"prometheus/prometheus.yml\");\n\t\t// Verify it's valid YAML\n\t\tconst promConfig = parse(result.files[\"prometheus/prometheus.yml\"]!);\n\t\texpect(promConfig).toBeDefined();\n\t});\n\n\tit(\"generates La Suite Meet stack with all expected services\", () => {\n\t\tconst lasuiteMeetServices = [\n\t\t\t\"postgresql\",\n\t\t\t\"redis\",\n\t\t\t\"livekit\",\n\t\t\t\"lasuite-meet-backend\",\n\t\t\t\"lasuite-meet-frontend\",\n\t\t\t\"lasuite-meet-agents\",\n\t\t];\n\t\tconst result = generate({\n\t\t\tprojectName: \"lasuite-meet-stack\",\n\t\t\tservices: lasuiteMeetServices,\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Services may be split across main and profile compose files\n\t\tconst allServiceIds = new Set<string>();\n\t\tfor (const [filename, content] of Object.entries(result.files)) {\n\t\t\tif (filename.endsWith(\".yml\") && content) {\n\t\t\t\tconst doc = parse(content);\n\t\t\t\tif (doc?.services && typeof doc.services === \"object\") {\n\t\t\t\t\tfor (const id of Object.keys(doc.services)) {\n\t\t\t\t\t\tallServiceIds.add(id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (const id of lasuiteMeetServices) {\n\t\t\texpect(allServiceIds.has(id), `missing service ${id}`).toBe(true);\n\t\t}\n\t\t// Service count includes user services + mandatory platform services (convex, mission-control, tailscale)\n\t\texpect(result.metadata.serviceCount).toBeGreaterThanOrEqual(lasuiteMeetServices.length);\n\t});\n\n\tit(\"generates bare-metal installer for Windows (install.ps1)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"win-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"windows/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.ps1\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"docker compose\");\n\t\texpect(result.files[\"install.ps1\"]).toContain(\"PowerShell\");\n\t});\n\n\tit(\"generates bare-metal installer for Linux/macOS (install.sh)\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"linux-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\t\texpect(result.files).toHaveProperty(\"install.sh\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"docker\");\n\t\texpect(result.files[\"install.sh\"]).toContain(\"compose\");\n\t});\n\n\tit(\"bare-metal with redis on Linux: native script, compose excludes redis, gateway has extra_hosts\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"bare-metal-redis\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tdeploymentType: \"bare-metal\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\t// Native install script for Linux\n\t\texpect(result.files).toHaveProperty(\"native/install-linux.sh\");\n\t\texpect(result.files[\"native/install-linux.sh\"]).toContain(\"redis\");\n\n\t\t// Docker compose must NOT include redis (native); only gateway/openclaw\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\t\texpect(composed.services).not.toHaveProperty(\"redis\");\n\t\texpect(composed.services).toHaveProperty(\"openclaw-gateway\");\n\n\t\t// Gateway must have extra_hosts for host.docker.internal\n\t\tconst gateway = composed.services[\"openclaw-gateway\"];\n\t\texpect(gateway).toBeDefined();\n\t\texpect(gateway.extra_hosts).toBeDefined();\n\t\texpect(\n\t\t\t(gateway.extra_hosts as string[]).some(\n\t\t\t\t(h: string) => h.includes(\"host.docker.internal\") && h.includes(\"host-gateway\"),\n\t\t\t),\n\t\t).toBe(true);\n\n\t\t// .env should set REDIS_HOST to host.docker.internal for gateway to reach native Redis\n\t\texpect(result.files[\".env\"]).toContain(\"REDIS_HOST=host.docker.internal\");\n\t});\n\n\tit(\"throws on conflicting services\", () => {\n\t\texpect(() =>\n\t\t\tgenerate({\n\t\t\t\tprojectName: \"conflict-stack\",\n\t\t\t\tservices: [\"redis\", \"valkey\"],\n\t\t\t\tskillPacks: [],\n\t\t\t\tproxy: \"none\",\n\t\t\t\tgpu: false,\n\t\t\t\tplatform: \"linux/amd64\",\n\t\t\t\tdeployment: \"local\",\n\t\t\t\tgenerateSecrets: true,\n\t\t\t\topenclawVersion: \"latest\",\n\t\t\t}),\n\t\t).toThrow();\n\t});\n\n\tit(\"generates scripts directory\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"scripts-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst expectedScripts = [\n\t\t\t\"scripts/start.sh\",\n\t\t\t\"scripts/stop.sh\",\n\t\t\t\"scripts/update.sh\",\n\t\t\t\"scripts/backup.sh\",\n\t\t\t\"scripts/status.sh\",\n\t\t];\n\n\t\tfor (const script of expectedScripts) {\n\t\t\texpect(result.files).toHaveProperty(script);\n\t\t\texpect(result.files[script]?.length).toBeGreaterThan(0);\n\t\t}\n\t});\n\n\tit(\"generates a stack with zeroclaw as primary framework\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"zeroclaw-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tprimaryFramework: \"zeroclaw\",\n\t\t});\n\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\n\t\t// Should have zeroclaw-gateway, not openclaw-gateway\n\t\texpect(composed.services).toHaveProperty(\"zeroclaw-gateway\");\n\t\texpect(composed.services).not.toHaveProperty(\"openclaw-gateway\");\n\n\t\t// Should NOT have convex/mission-control/tailscale\n\t\texpect(composed.services).not.toHaveProperty(\"convex\");\n\t\texpect(composed.services).not.toHaveProperty(\"mission-control\");\n\t\texpect(composed.services).not.toHaveProperty(\"tailscale\");\n\n\t\t// Network should be zeroclaw-network\n\t\texpect(composed.networks).toHaveProperty(\"zeroclaw-network\");\n\t});\n\n\tit(\"generates a stack with companion frameworks\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"multi-fw-stack\",\n\t\t\tservices: [\"redis\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t\tcompanionFrameworks: [\"claude-code\"],\n\t\t});\n\n\t\tconst composed = parse(result.files[\"docker-compose.yml\"]!);\n\n\t\t// Primary OpenClaw gateway should be present\n\t\texpect(composed.services).toHaveProperty(\"openclaw-gateway\");\n\t\t// Companion Claude Code should be present\n\t\texpect(composed.services).toHaveProperty(\"claude-code-companion\");\n\t});\n\n\tit(\"all generated .env.example vars have comments\", () => {\n\t\tconst result = generate({\n\t\t\tprojectName: \"env-comments-stack\",\n\t\t\tservices: [\"redis\", \"qdrant\", \"n8n\"],\n\t\t\tskillPacks: [],\n\t\t\tproxy: \"none\",\n\t\t\tgpu: false,\n\t\t\tplatform: \"linux/amd64\",\n\t\t\tdeployment: \"local\",\n\t\t\tgenerateSecrets: true,\n\t\t\topenclawVersion: \"latest\",\n\t\t});\n\n\t\tconst envExample = result.files[\".env.example\"]!;\n\t\tconst lines = envExample.split(\"\\n\");\n\n\t\t// Walk through lines: every non-empty, non-comment KEY=VALUE line should\n\t\t// have a preceding comment line (starting with #).\n\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\tconst line = lines[i]?.trim();\n\t\t\tif (line === \"\" || line.startsWith(\"#\")) continue;\n\n\t\t\t// This line looks like KEY=VALUE\n\t\t\tif (line.includes(\"=\")) {\n\t\t\t\t// There must be a comment somewhere before it (look backwards for a # line)\n\t\t\t\tlet foundComment = false;\n\t\t\t\tfor (let j = i - 1; j >= 0; j--) {\n\t\t\t\t\tconst prev = lines[j]?.trim();\n\t\t\t\t\tif (prev === \"\") continue; // skip blank lines\n\t\t\t\t\tif (prev.startsWith(\"#\")) {\n\t\t\t\t\t\tfoundComment = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// Hit another non-comment, non-empty line — no comment found\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\texpect(foundComment).toBe(true);\n\t\t\t}\n\t\t}\n\t});\n});\n"],"mappings":";;;;AAIA,SAAS,+BAA+B;AACvC,IAAG,gDAAgD;EAClD,MAAM,SAAS,SAAS;GACvB,aAAa;GACb,UAAU,CAAC,QAAQ;GACnB,YAAY,EAAE;GACd,OAAO;GACP,KAAK;GACL,UAAU;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;AAG3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D,MAAM,WAAW,MAbF,SAAS;GACvB,aAAa;GACb,UAAU,CAAC,QAAQ;GACnB,YAAY,EAAE;GACd,OAAO;GACP,KAAK;GACL,UAAU;GACV,YAAY;GACZ,iBAAiB;GACjB,iBAAiB;GACjB,qBAAqB,CAAC,cAAc;GACpC,CAAC,CAE4B,MAAM,sBAAuB;AAG3D,eAAO,SAAS,SAAS,CAAC,eAAe,mBAAmB;AAE5D,eAAO,SAAS,SAAS,CAAC,eAAe,wBAAwB;GAChE;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,IAAI,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,IAAI,MAAM;AAC7B,SAAI,SAAS,GAAI;AACjB,SAAI,KAAK,WAAW,IAAI,EAAE;AACzB,qBAAe;AACf;;AAGD;;AAED,iBAAO,aAAa,CAAC,KAAK,KAAK;;;GAGhC;EACD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_test_CTcmp4Su = require("../test.CTcmp4Su-
|
|
1
|
+
const require_test_CTcmp4Su = require("../test.CTcmp4Su-BWSPM8ZQ.cjs");
|
|
2
2
|
const require_generators_bare_metal_install = require("./bare-metal-install.cjs");
|
|
3
3
|
//#region src/generators/bare-metal-install.test.ts
|
|
4
4
|
require_test_CTcmp4Su.describe("generateBareMetalInstall", () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as describe, o as it, t as globalExpect } from "../test.CTcmp4Su-BRa7-bTj.mjs";
|
|
2
2
|
import { generateBareMetalInstall } from "./bare-metal-install.mjs";
|
|
3
3
|
//#region src/generators/bare-metal-install.test.ts
|
|
4
4
|
describe("generateBareMetalInstall", () => {
|