@better-openclaw/core 1.0.22 → 1.0.23
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/dist/composer.cjs +27 -13
- package/dist/composer.cjs.map +1 -1
- package/dist/composer.d.cts.map +1 -1
- package/dist/composer.d.mts.map +1 -1
- package/dist/composer.mjs +27 -13
- package/dist/composer.mjs.map +1 -1
- package/dist/generate.cjs +1 -0
- package/dist/generate.cjs.map +1 -1
- package/dist/generate.d.cts.map +1 -1
- package/dist/generate.d.mts.map +1 -1
- package/dist/generate.mjs +1 -0
- package/dist/generate.mjs.map +1 -1
- package/dist/generators/env.cjs +146 -0
- package/dist/generators/env.cjs.map +1 -1
- package/dist/generators/env.d.cts.map +1 -1
- package/dist/generators/env.d.mts.map +1 -1
- package/dist/generators/env.mjs +146 -0
- package/dist/generators/env.mjs.map +1 -1
- package/dist/generators/openclaw-json.cjs +102 -7
- package/dist/generators/openclaw-json.cjs.map +1 -1
- package/dist/generators/openclaw-json.mjs +102 -7
- package/dist/generators/openclaw-json.mjs.map +1 -1
- package/dist/generators/readme.cjs +2 -1
- package/dist/generators/readme.cjs.map +1 -1
- package/dist/generators/readme.mjs +2 -1
- package/dist/generators/readme.mjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/presets/registry.cjs +19 -0
- package/dist/presets/registry.cjs.map +1 -1
- package/dist/presets/registry.d.cts.map +1 -1
- package/dist/presets/registry.d.mts.map +1 -1
- package/dist/presets/registry.mjs +19 -0
- package/dist/presets/registry.mjs.map +1 -1
- package/dist/{schema-C_hc7e4k.d.cts → schema-B4c64P8N.d.cts} +17 -1
- package/dist/schema-B4c64P8N.d.cts.map +1 -0
- package/dist/{schema-CaesJaS2.d.mts → schema-CXNhYci1.d.mts} +17 -1
- package/dist/schema-CXNhYci1.d.mts.map +1 -0
- package/dist/schema.cjs +5 -1
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.cts +1 -1
- package/dist/schema.d.mts +1 -1
- package/dist/schema.mjs +5 -1
- package/dist/schema.mjs.map +1 -1
- package/dist/services/definitions/adguard-home.cjs +74 -0
- package/dist/services/definitions/adguard-home.cjs.map +1 -0
- package/dist/services/definitions/adguard-home.d.cts +7 -0
- package/dist/services/definitions/adguard-home.d.cts.map +1 -0
- package/dist/services/definitions/adguard-home.d.mts +7 -0
- package/dist/services/definitions/adguard-home.d.mts.map +1 -0
- package/dist/services/definitions/adguard-home.mjs +73 -0
- package/dist/services/definitions/adguard-home.mjs.map +1 -0
- package/dist/services/definitions/audiobookshelf.cjs +81 -0
- package/dist/services/definitions/audiobookshelf.cjs.map +1 -0
- package/dist/services/definitions/audiobookshelf.d.cts +7 -0
- package/dist/services/definitions/audiobookshelf.d.cts.map +1 -0
- package/dist/services/definitions/audiobookshelf.d.mts +7 -0
- package/dist/services/definitions/audiobookshelf.d.mts.map +1 -0
- package/dist/services/definitions/audiobookshelf.mjs +80 -0
- package/dist/services/definitions/audiobookshelf.mjs.map +1 -0
- package/dist/services/definitions/baserow.cjs +115 -0
- package/dist/services/definitions/baserow.cjs.map +1 -0
- package/dist/services/definitions/baserow.d.cts +7 -0
- package/dist/services/definitions/baserow.d.cts.map +1 -0
- package/dist/services/definitions/baserow.d.mts +7 -0
- package/dist/services/definitions/baserow.d.mts.map +1 -0
- package/dist/services/definitions/baserow.mjs +114 -0
- package/dist/services/definitions/baserow.mjs.map +1 -0
- package/dist/services/definitions/calibre-web.cjs +91 -0
- package/dist/services/definitions/calibre-web.cjs.map +1 -0
- package/dist/services/definitions/calibre-web.d.cts +7 -0
- package/dist/services/definitions/calibre-web.d.cts.map +1 -0
- package/dist/services/definitions/calibre-web.d.mts +7 -0
- package/dist/services/definitions/calibre-web.d.mts.map +1 -0
- package/dist/services/definitions/calibre-web.mjs +90 -0
- package/dist/services/definitions/calibre-web.mjs.map +1 -0
- package/dist/services/definitions/clickhouse.cjs +113 -0
- package/dist/services/definitions/clickhouse.cjs.map +1 -0
- package/dist/services/definitions/clickhouse.d.cts +7 -0
- package/dist/services/definitions/clickhouse.d.cts.map +1 -0
- package/dist/services/definitions/clickhouse.d.mts +7 -0
- package/dist/services/definitions/clickhouse.d.mts.map +1 -0
- package/dist/services/definitions/clickhouse.mjs +112 -0
- package/dist/services/definitions/clickhouse.mjs.map +1 -0
- package/dist/services/definitions/cloudflared.cjs +55 -0
- package/dist/services/definitions/cloudflared.cjs.map +1 -0
- package/dist/services/definitions/cloudflared.d.cts +7 -0
- package/dist/services/definitions/cloudflared.d.cts.map +1 -0
- package/dist/services/definitions/cloudflared.d.mts +7 -0
- package/dist/services/definitions/cloudflared.d.mts.map +1 -0
- package/dist/services/definitions/cloudflared.mjs +54 -0
- package/dist/services/definitions/cloudflared.mjs.map +1 -0
- package/dist/services/definitions/cockroachdb.cjs +70 -0
- package/dist/services/definitions/cockroachdb.cjs.map +1 -0
- package/dist/services/definitions/cockroachdb.d.cts +7 -0
- package/dist/services/definitions/cockroachdb.d.cts.map +1 -0
- package/dist/services/definitions/cockroachdb.d.mts +7 -0
- package/dist/services/definitions/cockroachdb.d.mts.map +1 -0
- package/dist/services/definitions/cockroachdb.mjs +69 -0
- package/dist/services/definitions/cockroachdb.mjs.map +1 -0
- package/dist/services/definitions/coder.cjs +64 -0
- package/dist/services/definitions/coder.cjs.map +1 -0
- package/dist/services/definitions/coder.d.cts +7 -0
- package/dist/services/definitions/coder.d.cts.map +1 -0
- package/dist/services/definitions/coder.d.mts +7 -0
- package/dist/services/definitions/coder.d.mts.map +1 -0
- package/dist/services/definitions/coder.mjs +63 -0
- package/dist/services/definitions/coder.mjs.map +1 -0
- package/dist/services/definitions/dragonfly.cjs +64 -0
- package/dist/services/definitions/dragonfly.cjs.map +1 -0
- package/dist/services/definitions/dragonfly.d.cts +7 -0
- package/dist/services/definitions/dragonfly.d.cts.map +1 -0
- package/dist/services/definitions/dragonfly.d.mts +7 -0
- package/dist/services/definitions/dragonfly.d.mts.map +1 -0
- package/dist/services/definitions/dragonfly.mjs +63 -0
- package/dist/services/definitions/dragonfly.mjs.map +1 -0
- package/dist/services/definitions/drone-ci.cjs +95 -0
- package/dist/services/definitions/drone-ci.cjs.map +1 -0
- package/dist/services/definitions/drone-ci.d.cts +7 -0
- package/dist/services/definitions/drone-ci.d.cts.map +1 -0
- package/dist/services/definitions/drone-ci.d.mts +7 -0
- package/dist/services/definitions/drone-ci.d.mts.map +1 -0
- package/dist/services/definitions/drone-ci.mjs +94 -0
- package/dist/services/definitions/drone-ci.mjs.map +1 -0
- package/dist/services/definitions/element-web.cjs +61 -0
- package/dist/services/definitions/element-web.cjs.map +1 -0
- package/dist/services/definitions/element-web.d.cts +7 -0
- package/dist/services/definitions/element-web.d.cts.map +1 -0
- package/dist/services/definitions/element-web.d.mts +7 -0
- package/dist/services/definitions/element-web.d.mts.map +1 -0
- package/dist/services/definitions/element-web.mjs +60 -0
- package/dist/services/definitions/element-web.mjs.map +1 -0
- package/dist/services/definitions/focalboard.cjs +65 -0
- package/dist/services/definitions/focalboard.cjs.map +1 -0
- package/dist/services/definitions/focalboard.d.cts +7 -0
- package/dist/services/definitions/focalboard.d.cts.map +1 -0
- package/dist/services/definitions/focalboard.d.mts +7 -0
- package/dist/services/definitions/focalboard.d.mts.map +1 -0
- package/dist/services/definitions/focalboard.mjs +64 -0
- package/dist/services/definitions/focalboard.mjs.map +1 -0
- package/dist/services/definitions/forgejo.cjs +108 -0
- package/dist/services/definitions/forgejo.cjs.map +1 -0
- package/dist/services/definitions/forgejo.d.cts +7 -0
- package/dist/services/definitions/forgejo.d.cts.map +1 -0
- package/dist/services/definitions/forgejo.d.mts +7 -0
- package/dist/services/definitions/forgejo.d.mts.map +1 -0
- package/dist/services/definitions/forgejo.mjs +107 -0
- package/dist/services/definitions/forgejo.mjs.map +1 -0
- package/dist/services/definitions/graylog.cjs +103 -0
- package/dist/services/definitions/graylog.cjs.map +1 -0
- package/dist/services/definitions/graylog.d.cts +7 -0
- package/dist/services/definitions/graylog.d.cts.map +1 -0
- package/dist/services/definitions/graylog.d.mts +7 -0
- package/dist/services/definitions/graylog.d.mts.map +1 -0
- package/dist/services/definitions/graylog.mjs +102 -0
- package/dist/services/definitions/graylog.mjs.map +1 -0
- package/dist/services/definitions/index.cjs +139 -1
- package/dist/services/definitions/index.cjs.map +1 -1
- package/dist/services/definitions/index.d.cts +47 -1
- package/dist/services/definitions/index.d.cts.map +1 -1
- package/dist/services/definitions/index.d.mts +47 -1
- package/dist/services/definitions/index.d.mts.map +1 -1
- package/dist/services/definitions/index.mjs +94 -2
- package/dist/services/definitions/index.mjs.map +1 -1
- package/dist/services/definitions/influxdb.cjs +105 -0
- package/dist/services/definitions/influxdb.cjs.map +1 -0
- package/dist/services/definitions/influxdb.d.cts +7 -0
- package/dist/services/definitions/influxdb.d.cts.map +1 -0
- package/dist/services/definitions/influxdb.d.mts +7 -0
- package/dist/services/definitions/influxdb.d.mts.map +1 -0
- package/dist/services/definitions/influxdb.mjs +104 -0
- package/dist/services/definitions/influxdb.mjs.map +1 -0
- package/dist/services/definitions/invoke-ai.cjs +70 -0
- package/dist/services/definitions/invoke-ai.cjs.map +1 -0
- package/dist/services/definitions/invoke-ai.d.cts +7 -0
- package/dist/services/definitions/invoke-ai.d.cts.map +1 -0
- package/dist/services/definitions/invoke-ai.d.mts +7 -0
- package/dist/services/definitions/invoke-ai.d.mts.map +1 -0
- package/dist/services/definitions/invoke-ai.mjs +69 -0
- package/dist/services/definitions/invoke-ai.mjs.map +1 -0
- package/dist/services/definitions/jaeger.cjs +95 -0
- package/dist/services/definitions/jaeger.cjs.map +1 -0
- package/dist/services/definitions/jaeger.d.cts +7 -0
- package/dist/services/definitions/jaeger.d.cts.map +1 -0
- package/dist/services/definitions/jaeger.d.mts +7 -0
- package/dist/services/definitions/jaeger.d.mts.map +1 -0
- package/dist/services/definitions/jaeger.mjs +94 -0
- package/dist/services/definitions/jaeger.mjs.map +1 -0
- package/dist/services/definitions/jan.cjs +64 -0
- package/dist/services/definitions/jan.cjs.map +1 -0
- package/dist/services/definitions/jan.d.cts +7 -0
- package/dist/services/definitions/jan.d.cts.map +1 -0
- package/dist/services/definitions/jan.d.mts +7 -0
- package/dist/services/definitions/jan.d.mts.map +1 -0
- package/dist/services/definitions/jan.mjs +63 -0
- package/dist/services/definitions/jan.mjs.map +1 -0
- package/dist/services/definitions/jitsi-meet.cjs +102 -0
- package/dist/services/definitions/jitsi-meet.cjs.map +1 -0
- package/dist/services/definitions/jitsi-meet.d.cts +7 -0
- package/dist/services/definitions/jitsi-meet.d.cts.map +1 -0
- package/dist/services/definitions/jitsi-meet.d.mts +7 -0
- package/dist/services/definitions/jitsi-meet.d.mts.map +1 -0
- package/dist/services/definitions/jitsi-meet.mjs +101 -0
- package/dist/services/definitions/jitsi-meet.mjs.map +1 -0
- package/dist/services/definitions/local-ai.cjs +86 -0
- package/dist/services/definitions/local-ai.cjs.map +1 -0
- package/dist/services/definitions/local-ai.d.cts +7 -0
- package/dist/services/definitions/local-ai.d.cts.map +1 -0
- package/dist/services/definitions/local-ai.d.mts +7 -0
- package/dist/services/definitions/local-ai.d.mts.map +1 -0
- package/dist/services/definitions/local-ai.mjs +85 -0
- package/dist/services/definitions/local-ai.mjs.map +1 -0
- package/dist/services/definitions/metabase.cjs +108 -0
- package/dist/services/definitions/metabase.cjs.map +1 -0
- package/dist/services/definitions/metabase.d.cts +7 -0
- package/dist/services/definitions/metabase.d.cts.map +1 -0
- package/dist/services/definitions/metabase.d.mts +7 -0
- package/dist/services/definitions/metabase.d.mts.map +1 -0
- package/dist/services/definitions/metabase.mjs +107 -0
- package/dist/services/definitions/metabase.mjs.map +1 -0
- package/dist/services/definitions/mosquitto.cjs +82 -0
- package/dist/services/definitions/mosquitto.cjs.map +1 -0
- package/dist/services/definitions/mosquitto.d.cts +7 -0
- package/dist/services/definitions/mosquitto.d.cts.map +1 -0
- package/dist/services/definitions/mosquitto.d.mts +7 -0
- package/dist/services/definitions/mosquitto.d.mts.map +1 -0
- package/dist/services/definitions/mosquitto.mjs +81 -0
- package/dist/services/definitions/mosquitto.mjs.map +1 -0
- package/dist/services/definitions/navidrome.cjs +90 -0
- package/dist/services/definitions/navidrome.cjs.map +1 -0
- package/dist/services/definitions/navidrome.d.cts +7 -0
- package/dist/services/definitions/navidrome.d.cts.map +1 -0
- package/dist/services/definitions/navidrome.d.mts +7 -0
- package/dist/services/definitions/navidrome.d.mts.map +1 -0
- package/dist/services/definitions/navidrome.mjs +89 -0
- package/dist/services/definitions/navidrome.mjs.map +1 -0
- package/dist/services/definitions/nginx-proxy-manager.cjs +71 -0
- package/dist/services/definitions/nginx-proxy-manager.cjs.map +1 -0
- package/dist/services/definitions/nginx-proxy-manager.d.cts +7 -0
- package/dist/services/definitions/nginx-proxy-manager.d.cts.map +1 -0
- package/dist/services/definitions/nginx-proxy-manager.d.mts +7 -0
- package/dist/services/definitions/nginx-proxy-manager.d.mts.map +1 -0
- package/dist/services/definitions/nginx-proxy-manager.mjs +70 -0
- package/dist/services/definitions/nginx-proxy-manager.mjs.map +1 -0
- package/dist/services/definitions/node-red.cjs +77 -0
- package/dist/services/definitions/node-red.cjs.map +1 -0
- package/dist/services/definitions/node-red.d.cts +7 -0
- package/dist/services/definitions/node-red.d.cts.map +1 -0
- package/dist/services/definitions/node-red.d.mts +7 -0
- package/dist/services/definitions/node-red.d.mts.map +1 -0
- package/dist/services/definitions/node-red.mjs +76 -0
- package/dist/services/definitions/node-red.mjs.map +1 -0
- package/dist/services/definitions/photoprism.cjs +126 -0
- package/dist/services/definitions/photoprism.cjs.map +1 -0
- package/dist/services/definitions/photoprism.d.cts +7 -0
- package/dist/services/definitions/photoprism.d.cts.map +1 -0
- package/dist/services/definitions/photoprism.d.mts +7 -0
- package/dist/services/definitions/photoprism.d.mts.map +1 -0
- package/dist/services/definitions/photoprism.mjs +125 -0
- package/dist/services/definitions/photoprism.mjs.map +1 -0
- package/dist/services/definitions/pihole.cjs +73 -0
- package/dist/services/definitions/pihole.cjs.map +1 -0
- package/dist/services/definitions/pihole.d.cts +7 -0
- package/dist/services/definitions/pihole.d.cts.map +1 -0
- package/dist/services/definitions/pihole.d.mts +7 -0
- package/dist/services/definitions/pihole.d.mts.map +1 -0
- package/dist/services/definitions/pihole.mjs +72 -0
- package/dist/services/definitions/pihole.mjs.map +1 -0
- package/dist/services/definitions/piper-tts.cjs +70 -0
- package/dist/services/definitions/piper-tts.cjs.map +1 -0
- package/dist/services/definitions/piper-tts.d.cts +7 -0
- package/dist/services/definitions/piper-tts.d.cts.map +1 -0
- package/dist/services/definitions/piper-tts.d.mts +7 -0
- package/dist/services/definitions/piper-tts.d.mts.map +1 -0
- package/dist/services/definitions/piper-tts.mjs +69 -0
- package/dist/services/definitions/piper-tts.mjs.map +1 -0
- package/dist/services/definitions/plane.cjs +75 -0
- package/dist/services/definitions/plane.cjs.map +1 -0
- package/dist/services/definitions/plane.d.cts +7 -0
- package/dist/services/definitions/plane.d.cts.map +1 -0
- package/dist/services/definitions/plane.d.mts +7 -0
- package/dist/services/definitions/plane.d.mts.map +1 -0
- package/dist/services/definitions/plane.mjs +74 -0
- package/dist/services/definitions/plane.mjs.map +1 -0
- package/dist/services/definitions/plausible.cjs +94 -0
- package/dist/services/definitions/plausible.cjs.map +1 -0
- package/dist/services/definitions/plausible.d.cts +7 -0
- package/dist/services/definitions/plausible.d.cts.map +1 -0
- package/dist/services/definitions/plausible.d.mts +7 -0
- package/dist/services/definitions/plausible.d.mts.map +1 -0
- package/dist/services/definitions/plausible.mjs +93 -0
- package/dist/services/definitions/plausible.mjs.map +1 -0
- package/dist/services/definitions/pocket-id.cjs +101 -0
- package/dist/services/definitions/pocket-id.cjs.map +1 -0
- package/dist/services/definitions/pocket-id.d.cts +7 -0
- package/dist/services/definitions/pocket-id.d.cts.map +1 -0
- package/dist/services/definitions/pocket-id.d.mts +7 -0
- package/dist/services/definitions/pocket-id.d.mts.map +1 -0
- package/dist/services/definitions/pocket-id.mjs +100 -0
- package/dist/services/definitions/pocket-id.mjs.map +1 -0
- package/dist/services/definitions/posthog.cjs +94 -0
- package/dist/services/definitions/posthog.cjs.map +1 -0
- package/dist/services/definitions/posthog.d.cts +7 -0
- package/dist/services/definitions/posthog.d.cts.map +1 -0
- package/dist/services/definitions/posthog.d.mts +7 -0
- package/dist/services/definitions/posthog.d.mts.map +1 -0
- package/dist/services/definitions/posthog.mjs +93 -0
- package/dist/services/definitions/posthog.mjs.map +1 -0
- package/dist/services/definitions/redis.cjs +1 -1
- package/dist/services/definitions/redis.cjs.map +1 -1
- package/dist/services/definitions/redis.mjs +1 -1
- package/dist/services/definitions/redis.mjs.map +1 -1
- package/dist/services/definitions/revolt.cjs +64 -0
- package/dist/services/definitions/revolt.cjs.map +1 -0
- package/dist/services/definitions/revolt.d.cts +7 -0
- package/dist/services/definitions/revolt.d.cts.map +1 -0
- package/dist/services/definitions/revolt.d.mts +7 -0
- package/dist/services/definitions/revolt.d.mts.map +1 -0
- package/dist/services/definitions/revolt.mjs +63 -0
- package/dist/services/definitions/revolt.mjs.map +1 -0
- package/dist/services/definitions/sentry.cjs +101 -0
- package/dist/services/definitions/sentry.cjs.map +1 -0
- package/dist/services/definitions/sentry.d.cts +7 -0
- package/dist/services/definitions/sentry.d.cts.map +1 -0
- package/dist/services/definitions/sentry.d.mts +7 -0
- package/dist/services/definitions/sentry.d.mts.map +1 -0
- package/dist/services/definitions/sentry.mjs +100 -0
- package/dist/services/definitions/sentry.mjs.map +1 -0
- package/dist/services/definitions/sonarqube.cjs +86 -0
- package/dist/services/definitions/sonarqube.cjs.map +1 -0
- package/dist/services/definitions/sonarqube.d.cts +7 -0
- package/dist/services/definitions/sonarqube.d.cts.map +1 -0
- package/dist/services/definitions/sonarqube.d.mts +7 -0
- package/dist/services/definitions/sonarqube.d.mts.map +1 -0
- package/dist/services/definitions/sonarqube.mjs +85 -0
- package/dist/services/definitions/sonarqube.mjs.map +1 -0
- package/dist/services/definitions/superset.cjs +77 -0
- package/dist/services/definitions/superset.cjs.map +1 -0
- package/dist/services/definitions/superset.d.cts +7 -0
- package/dist/services/definitions/superset.d.cts.map +1 -0
- package/dist/services/definitions/superset.d.mts +7 -0
- package/dist/services/definitions/superset.d.mts.map +1 -0
- package/dist/services/definitions/superset.mjs +76 -0
- package/dist/services/definitions/superset.mjs.map +1 -0
- package/dist/services/definitions/surrealdb.cjs +72 -0
- package/dist/services/definitions/surrealdb.cjs.map +1 -0
- package/dist/services/definitions/surrealdb.d.cts +7 -0
- package/dist/services/definitions/surrealdb.d.cts.map +1 -0
- package/dist/services/definitions/surrealdb.d.mts +7 -0
- package/dist/services/definitions/surrealdb.d.mts.map +1 -0
- package/dist/services/definitions/surrealdb.mjs +71 -0
- package/dist/services/definitions/surrealdb.mjs.map +1 -0
- package/dist/services/definitions/tabby-ml.cjs +70 -0
- package/dist/services/definitions/tabby-ml.cjs.map +1 -0
- package/dist/services/definitions/tabby-ml.d.cts +7 -0
- package/dist/services/definitions/tabby-ml.d.cts.map +1 -0
- package/dist/services/definitions/tabby-ml.d.mts +7 -0
- package/dist/services/definitions/tabby-ml.d.mts.map +1 -0
- package/dist/services/definitions/tabby-ml.mjs +69 -0
- package/dist/services/definitions/tabby-ml.mjs.map +1 -0
- package/dist/services/definitions/tempo.cjs +57 -0
- package/dist/services/definitions/tempo.cjs.map +1 -0
- package/dist/services/definitions/tempo.d.cts +7 -0
- package/dist/services/definitions/tempo.d.cts.map +1 -0
- package/dist/services/definitions/tempo.d.mts +7 -0
- package/dist/services/definitions/tempo.d.mts.map +1 -0
- package/dist/services/definitions/tempo.mjs +56 -0
- package/dist/services/definitions/tempo.mjs.map +1 -0
- package/dist/services/definitions/text-gen-webui.cjs +88 -0
- package/dist/services/definitions/text-gen-webui.cjs.map +1 -0
- package/dist/services/definitions/text-gen-webui.d.cts +7 -0
- package/dist/services/definitions/text-gen-webui.d.cts.map +1 -0
- package/dist/services/definitions/text-gen-webui.d.mts +7 -0
- package/dist/services/definitions/text-gen-webui.d.mts.map +1 -0
- package/dist/services/definitions/text-gen-webui.mjs +87 -0
- package/dist/services/definitions/text-gen-webui.mjs.map +1 -0
- package/dist/services/definitions/timescaledb.cjs +87 -0
- package/dist/services/definitions/timescaledb.cjs.map +1 -0
- package/dist/services/definitions/timescaledb.d.cts +7 -0
- package/dist/services/definitions/timescaledb.d.cts.map +1 -0
- package/dist/services/definitions/timescaledb.d.mts +7 -0
- package/dist/services/definitions/timescaledb.d.mts.map +1 -0
- package/dist/services/definitions/timescaledb.mjs +86 -0
- package/dist/services/definitions/timescaledb.mjs.map +1 -0
- package/dist/services/definitions/valkey.cjs +1 -1
- package/dist/services/definitions/valkey.cjs.map +1 -1
- package/dist/services/definitions/valkey.mjs +1 -1
- package/dist/services/definitions/valkey.mjs.map +1 -1
- package/dist/services/definitions/vector-log.cjs +59 -0
- package/dist/services/definitions/vector-log.cjs.map +1 -0
- package/dist/services/definitions/vector-log.d.cts +7 -0
- package/dist/services/definitions/vector-log.d.cts.map +1 -0
- package/dist/services/definitions/vector-log.d.mts +7 -0
- package/dist/services/definitions/vector-log.d.mts.map +1 -0
- package/dist/services/definitions/vector-log.mjs +58 -0
- package/dist/services/definitions/vector-log.mjs.map +1 -0
- package/dist/services/definitions/vikunja.cjs +96 -0
- package/dist/services/definitions/vikunja.cjs.map +1 -0
- package/dist/services/definitions/vikunja.d.cts +7 -0
- package/dist/services/definitions/vikunja.d.cts.map +1 -0
- package/dist/services/definitions/vikunja.d.mts +7 -0
- package/dist/services/definitions/vikunja.d.mts.map +1 -0
- package/dist/services/definitions/vikunja.mjs +95 -0
- package/dist/services/definitions/vikunja.mjs.map +1 -0
- package/dist/services/definitions/wireguard.cjs +88 -0
- package/dist/services/definitions/wireguard.cjs.map +1 -0
- package/dist/services/definitions/wireguard.d.cts +7 -0
- package/dist/services/definitions/wireguard.d.cts.map +1 -0
- package/dist/services/definitions/wireguard.d.mts +7 -0
- package/dist/services/definitions/wireguard.d.mts.map +1 -0
- package/dist/services/definitions/wireguard.mjs +87 -0
- package/dist/services/definitions/wireguard.mjs.map +1 -0
- package/dist/services/definitions/woodpecker-ci.cjs +93 -0
- package/dist/services/definitions/woodpecker-ci.cjs.map +1 -0
- package/dist/services/definitions/woodpecker-ci.d.cts +7 -0
- package/dist/services/definitions/woodpecker-ci.d.cts.map +1 -0
- package/dist/services/definitions/woodpecker-ci.d.mts +7 -0
- package/dist/services/definitions/woodpecker-ci.d.mts.map +1 -0
- package/dist/services/definitions/woodpecker-ci.mjs +92 -0
- package/dist/services/definitions/woodpecker-ci.mjs.map +1 -0
- package/dist/services/definitions/zulip.cjs +116 -0
- package/dist/services/definitions/zulip.cjs.map +1 -0
- package/dist/services/definitions/zulip.d.cts +7 -0
- package/dist/services/definitions/zulip.d.cts.map +1 -0
- package/dist/services/definitions/zulip.d.mts +7 -0
- package/dist/services/definitions/zulip.d.mts.map +1 -0
- package/dist/services/definitions/zulip.mjs +115 -0
- package/dist/services/definitions/zulip.mjs.map +1 -0
- package/dist/types.cjs +28 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +2 -1
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +2 -1
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +28 -0
- package/dist/types.mjs.map +1 -1
- package/package.json +1 -1
- package/src/__snapshots__/composer.snapshot.test.ts.snap +130 -65
- package/src/composer.ts +25 -15
- package/src/generate.ts +1 -0
- package/src/generators/env.ts +214 -0
- package/src/generators/openclaw-json.ts +156 -1
- package/src/generators/readme.ts +2 -1
- package/src/presets/registry.ts +329 -221
- package/src/schema.ts +4 -0
- package/src/services/definitions/adguard-home.ts +79 -0
- package/src/services/definitions/audiobookshelf.ts +83 -0
- package/src/services/definitions/baserow.ts +118 -0
- package/src/services/definitions/calibre-web.ts +95 -0
- package/src/services/definitions/clickhouse.ts +115 -0
- package/src/services/definitions/cloudflared.ts +55 -0
- package/src/services/definitions/cockroachdb.ts +75 -0
- package/src/services/definitions/coder.ts +68 -0
- package/src/services/definitions/dragonfly.ts +68 -0
- package/src/services/definitions/drone-ci.ts +96 -0
- package/src/services/definitions/element-web.ts +62 -0
- package/src/services/definitions/focalboard.ts +69 -0
- package/src/services/definitions/forgejo.ts +109 -0
- package/src/services/definitions/graylog.ts +101 -0
- package/src/services/definitions/index.ts +139 -0
- package/src/services/definitions/influxdb.ts +109 -0
- package/src/services/definitions/invoke-ai.ts +76 -0
- package/src/services/definitions/jaeger.ts +94 -0
- package/src/services/definitions/jan.ts +68 -0
- package/src/services/definitions/jitsi-meet.ts +108 -0
- package/src/services/definitions/local-ai.ts +90 -0
- package/src/services/definitions/metabase.ts +111 -0
- package/src/services/definitions/mosquitto.ts +84 -0
- package/src/services/definitions/navidrome.ts +95 -0
- package/src/services/definitions/nginx-proxy-manager.ts +70 -0
- package/src/services/definitions/node-red.ts +83 -0
- package/src/services/definitions/photoprism.ts +130 -0
- package/src/services/definitions/pihole.ts +79 -0
- package/src/services/definitions/piper-tts.ts +76 -0
- package/src/services/definitions/plane.ts +75 -0
- package/src/services/definitions/plausible.ts +97 -0
- package/src/services/definitions/pocket-id.ts +98 -0
- package/src/services/definitions/posthog.ts +97 -0
- package/src/services/definitions/redis.ts +1 -1
- package/src/services/definitions/revolt.ts +68 -0
- package/src/services/definitions/sentry.ts +104 -0
- package/src/services/definitions/sonarqube.ts +85 -0
- package/src/services/definitions/superset.ts +84 -0
- package/src/services/definitions/surrealdb.ts +77 -0
- package/src/services/definitions/tabby-ml.ts +76 -0
- package/src/services/definitions/tempo.ts +59 -0
- package/src/services/definitions/text-gen-webui.ts +92 -0
- package/src/services/definitions/timescaledb.ts +90 -0
- package/src/services/definitions/valkey.ts +1 -1
- package/src/services/definitions/vector-log.ts +61 -0
- package/src/services/definitions/vikunja.ts +96 -0
- package/src/services/definitions/wireguard.ts +89 -0
- package/src/services/definitions/woodpecker-ci.ts +97 -0
- package/src/services/definitions/zulip.ts +117 -0
- package/src/types.ts +29 -0
- package/dist/schema-C_hc7e4k.d.cts.map +0 -1
- package/dist/schema-CaesJaS2.d.mts.map +0 -1
package/dist/generators/env.mjs
CHANGED
|
@@ -102,12 +102,84 @@ function generateEnvFiles(resolved, options) {
|
|
|
102
102
|
exampleValue: "",
|
|
103
103
|
actualValue: ""
|
|
104
104
|
});
|
|
105
|
+
lines.push({
|
|
106
|
+
comment: formatComment("Alternative auth: gateway password (use token OR password, not both)", "OpenClaw Core", false, true),
|
|
107
|
+
key: "OPENCLAW_GATEWAY_PASSWORD",
|
|
108
|
+
exampleValue: "",
|
|
109
|
+
actualValue: ""
|
|
110
|
+
});
|
|
111
|
+
lines.push({
|
|
112
|
+
comment: formatComment("Override state directory path (default: ~/.openclaw)", "OpenClaw Core", false, false),
|
|
113
|
+
key: "OPENCLAW_STATE_DIR",
|
|
114
|
+
exampleValue: "",
|
|
115
|
+
actualValue: ""
|
|
116
|
+
});
|
|
117
|
+
lines.push({
|
|
118
|
+
comment: formatComment("Override config file path (default: ~/.openclaw/openclaw.json)", "OpenClaw Core", false, false),
|
|
119
|
+
key: "OPENCLAW_CONFIG_PATH",
|
|
120
|
+
exampleValue: "",
|
|
121
|
+
actualValue: ""
|
|
122
|
+
});
|
|
123
|
+
lines.push({
|
|
124
|
+
comment: formatComment("Import missing keys from login shell profile (set to 1 to enable)", "OpenClaw Core", false, false),
|
|
125
|
+
key: "OPENCLAW_LOAD_SHELL_ENV",
|
|
126
|
+
exampleValue: "",
|
|
127
|
+
actualValue: ""
|
|
128
|
+
});
|
|
105
129
|
if (options.domain) lines.push({
|
|
106
130
|
comment: formatComment("Primary domain for service routing", "OpenClaw Core", false, false),
|
|
107
131
|
key: "OPENCLAW_DOMAIN",
|
|
108
132
|
exampleValue: "example.com",
|
|
109
133
|
actualValue: options.domain
|
|
110
134
|
});
|
|
135
|
+
lines.push({
|
|
136
|
+
comment: "\n# ═══════════════════════════════════════════════════════════════════════════════\n# Tools API Keys (web search, fetch, voice)\n# ═══════════════════════════════════════════════════════════════════════════════",
|
|
137
|
+
key: "",
|
|
138
|
+
exampleValue: "",
|
|
139
|
+
actualValue: ""
|
|
140
|
+
});
|
|
141
|
+
lines.push({
|
|
142
|
+
comment: formatComment("Brave Search API key for web search tool (default provider)", "OpenClaw Tools", false, true),
|
|
143
|
+
key: "BRAVE_API_KEY",
|
|
144
|
+
exampleValue: "your_brave_api_key_here",
|
|
145
|
+
actualValue: ""
|
|
146
|
+
});
|
|
147
|
+
lines.push({
|
|
148
|
+
comment: formatComment("Perplexity API key for web search tool (alternative provider)", "OpenClaw Tools", false, true),
|
|
149
|
+
key: "PERPLEXITY_API_KEY",
|
|
150
|
+
exampleValue: "",
|
|
151
|
+
actualValue: ""
|
|
152
|
+
});
|
|
153
|
+
lines.push({
|
|
154
|
+
comment: formatComment("Firecrawl API key for enhanced web fetch fallback", "OpenClaw Tools", false, true),
|
|
155
|
+
key: "FIRECRAWL_API_KEY",
|
|
156
|
+
exampleValue: "",
|
|
157
|
+
actualValue: ""
|
|
158
|
+
});
|
|
159
|
+
lines.push({
|
|
160
|
+
comment: formatComment("ElevenLabs API key for Talk mode (text-to-speech)", "OpenClaw Tools", false, true),
|
|
161
|
+
key: "ELEVENLABS_API_KEY",
|
|
162
|
+
exampleValue: "",
|
|
163
|
+
actualValue: ""
|
|
164
|
+
});
|
|
165
|
+
lines.push({
|
|
166
|
+
comment: "\n# ═══════════════════════════════════════════════════════════════════════════════\n# Swarm / Remote Gateway Connection\n# ═══════════════════════════════════════════════════════════════════════════════",
|
|
167
|
+
key: "",
|
|
168
|
+
exampleValue: "",
|
|
169
|
+
actualValue: ""
|
|
170
|
+
});
|
|
171
|
+
lines.push({
|
|
172
|
+
comment: formatComment("Auth token for connecting to a remote OpenClaw gateway (swarm upstream)", "OpenClaw Swarm", false, true),
|
|
173
|
+
key: "OPENCLAW_REMOTE_GATEWAY_TOKEN",
|
|
174
|
+
exampleValue: "",
|
|
175
|
+
actualValue: ""
|
|
176
|
+
});
|
|
177
|
+
lines.push({
|
|
178
|
+
comment: formatComment("Password for remote gateway auth (alternative to token)", "OpenClaw Swarm", false, true),
|
|
179
|
+
key: "OPENCLAW_REMOTE_GATEWAY_PASSWORD",
|
|
180
|
+
exampleValue: "",
|
|
181
|
+
actualValue: ""
|
|
182
|
+
});
|
|
111
183
|
if (resolved.aiProviders && resolved.aiProviders.length > 0) {
|
|
112
184
|
lines.push({
|
|
113
185
|
comment: "\n# ═══════════════════════════════════════════════════════════════════════════════\n# AI Provider API Keys\n# ═══════════════════════════════════════════════════════════════════════════════",
|
|
@@ -184,7 +256,17 @@ function generateEnvFiles(resolved, options) {
|
|
|
184
256
|
"OPENCLAW_EXTRA_MOUNTS",
|
|
185
257
|
"OPENCLAW_HOME_VOLUME",
|
|
186
258
|
"OPENCLAW_DOCKER_APT_PACKAGES",
|
|
259
|
+
"OPENCLAW_GATEWAY_PASSWORD",
|
|
260
|
+
"OPENCLAW_STATE_DIR",
|
|
261
|
+
"OPENCLAW_CONFIG_PATH",
|
|
262
|
+
"OPENCLAW_LOAD_SHELL_ENV",
|
|
187
263
|
"OPENCLAW_DOMAIN",
|
|
264
|
+
"BRAVE_API_KEY",
|
|
265
|
+
"PERPLEXITY_API_KEY",
|
|
266
|
+
"FIRECRAWL_API_KEY",
|
|
267
|
+
"ELEVENLABS_API_KEY",
|
|
268
|
+
"OPENCLAW_REMOTE_GATEWAY_TOKEN",
|
|
269
|
+
"OPENCLAW_REMOTE_GATEWAY_PASSWORD",
|
|
188
270
|
"CLAUDE_AI_SESSION_KEY",
|
|
189
271
|
"CLAUDE_WEB_SESSION_KEY",
|
|
190
272
|
"CLAUDE_WEB_COOKIE",
|
|
@@ -228,6 +310,7 @@ function generateEnvFiles(resolved, options) {
|
|
|
228
310
|
"# ═══════════════════════════════════════════════════════════════════════════════",
|
|
229
311
|
"# OpenClaw Environment Configuration",
|
|
230
312
|
`# Generated at ${(/* @__PURE__ */ new Date()).toISOString()}`,
|
|
313
|
+
"# Docs: https://better-openclaw.dev/docs | Cloud: https://clawexa.net",
|
|
231
314
|
"# ═══════════════════════════════════════════════════════════════════════════════",
|
|
232
315
|
""
|
|
233
316
|
].join("\n");
|
|
@@ -282,6 +365,69 @@ function getStructuredEnvVars(resolved) {
|
|
|
282
365
|
secret: false,
|
|
283
366
|
required: true,
|
|
284
367
|
defaultValue: "18789"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
key: "OPENCLAW_GATEWAY_PASSWORD",
|
|
371
|
+
description: "Alternative auth: gateway password (use token OR password)",
|
|
372
|
+
secret: true,
|
|
373
|
+
required: false,
|
|
374
|
+
defaultValue: ""
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
key: "OPENCLAW_STATE_DIR",
|
|
378
|
+
description: "Override state directory path (default: ~/.openclaw)",
|
|
379
|
+
secret: false,
|
|
380
|
+
required: false,
|
|
381
|
+
defaultValue: ""
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
key: "OPENCLAW_CONFIG_PATH",
|
|
385
|
+
description: "Override config file path (default: ~/.openclaw/openclaw.json)",
|
|
386
|
+
secret: false,
|
|
387
|
+
required: false,
|
|
388
|
+
defaultValue: ""
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
key: "BRAVE_API_KEY",
|
|
392
|
+
description: "Brave Search API key for web search tool (default provider)",
|
|
393
|
+
secret: true,
|
|
394
|
+
required: false,
|
|
395
|
+
defaultValue: ""
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
key: "PERPLEXITY_API_KEY",
|
|
399
|
+
description: "Perplexity API key for web search (alternative provider)",
|
|
400
|
+
secret: true,
|
|
401
|
+
required: false,
|
|
402
|
+
defaultValue: ""
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
key: "FIRECRAWL_API_KEY",
|
|
406
|
+
description: "Firecrawl API key for enhanced web fetch fallback",
|
|
407
|
+
secret: true,
|
|
408
|
+
required: false,
|
|
409
|
+
defaultValue: ""
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
key: "ELEVENLABS_API_KEY",
|
|
413
|
+
description: "ElevenLabs API key for Talk mode (text-to-speech)",
|
|
414
|
+
secret: true,
|
|
415
|
+
required: false,
|
|
416
|
+
defaultValue: ""
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
key: "OPENCLAW_REMOTE_GATEWAY_TOKEN",
|
|
420
|
+
description: "Auth token for connecting to a remote OpenClaw gateway (swarm upstream)",
|
|
421
|
+
secret: true,
|
|
422
|
+
required: false,
|
|
423
|
+
defaultValue: ""
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
key: "OPENCLAW_REMOTE_GATEWAY_PASSWORD",
|
|
427
|
+
description: "Password for remote gateway auth (alternative to token)",
|
|
428
|
+
secret: true,
|
|
429
|
+
required: false,
|
|
430
|
+
defaultValue: ""
|
|
285
431
|
}
|
|
286
432
|
];
|
|
287
433
|
for (const v of coreVars) seenKeys.add(v.key);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.mjs","names":[],"sources":["../../src/generators/env.ts"],"sourcesContent":["import { randomBytes } from \"node:crypto\";\nimport type { ResolverOutput } from \"../types.js\";\nimport { getDbRequirements } from \"./postgres-init.js\";\n\n/**\n * Options for environment file generation.\n */\nexport interface EnvGeneratorOptions {\n\tgenerateSecrets: boolean;\n\tdomain?: string;\n\topenclawVersion?: string;\n\t/** When set, host-like vars (e.g. REDIS_HOST) for these services use host.docker.internal so gateway in Docker can reach native services on host. */\n\tnativeServiceIds?: Set<string>;\n\t/** Compose file names for COMPOSE_FILE env var (enables `docker compose up` without -f flags). */\n\tcomposeFiles?: string[];\n\t/** Compose profiles for COMPOSE_PROFILES env var (enables `docker compose up` without --profile flags). */\n\tcomposeProfiles?: string[];\n\t/** OpenClaw image variant (official, coolify, alpine). */\n\topenclawImage?: \"official\" | \"coolify\" | \"alpine\";\n}\n\n/**\n * Generates `.env.example` and `.env` file contents from resolved services.\n *\n * - `.env.example`: every env var with descriptive comments, placeholders for secrets\n * - `.env`: same vars but secrets filled with cryptographically random values when generateSecrets is true\n */\nexport function generateEnvFiles(\n\tresolved: ResolverOutput,\n\toptions: EnvGeneratorOptions,\n): { envExample: string; env: string } {\n\tconst version = options.openclawVersion ?? \"latest\";\n\tconst lines: { comment: string; key: string; exampleValue: string; actualValue: string }[] = [];\n\n\t// Track all env var values for resolving references later\n\tconst envVarValues = new Map<string, string>();\n\n\t// ── Docker Compose convenience vars ─────────────────────────────────────\n\t// These let you run `docker compose up -d` without -f and --profile flags.\n\n\tif (options.composeFiles && options.composeFiles.length > 0) {\n\t\tconst separator = process.platform === \"win32\" ? \";\" : \":\";\n\t\tconst composeFileValue = options.composeFiles.join(separator);\n\t\tlines.push({\n\t\t\tcomment: formatComment(\n\t\t\t\t\"Compose files to load (allows plain `docker compose up -d`)\",\n\t\t\t\t\"Docker Compose\",\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t),\n\t\t\tkey: \"COMPOSE_FILE\",\n\t\t\texampleValue: composeFileValue,\n\t\t\tactualValue: composeFileValue,\n\t\t});\n\t}\n\n\tif (options.composeProfiles && options.composeProfiles.length > 0) {\n\t\tconst profilesValue = options.composeProfiles.join(\",\");\n\t\tlines.push({\n\t\t\tcomment: formatComment(\n\t\t\t\t\"Profiles to activate (allows plain `docker compose up -d`)\",\n\t\t\t\t\"Docker Compose\",\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t),\n\t\t\tkey: \"COMPOSE_PROFILES\",\n\t\t\texampleValue: profilesValue,\n\t\t\tactualValue: profilesValue,\n\t\t});\n\t}\n\n\t// ── Base OpenClaw Variables ──────────────────────────────────────────────\n\n\tlines.push({\n\t\tcomment: formatComment(\"OpenClaw version to deploy\", \"OpenClaw Core\", true, false),\n\t\tkey: \"OPENCLAW_VERSION\",\n\t\texampleValue: version,\n\t\tactualValue: version,\n\t});\n\n\tconst gatewayToken = options.generateSecrets ? randomBytes(24).toString(\"hex\") : \"\";\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Authentication token for the OpenClaw gateway API\",\n\t\t\t\"OpenClaw Core\",\n\t\t\ttrue,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"OPENCLAW_GATEWAY_TOKEN\",\n\t\texampleValue: \"your_gateway_token_here\",\n\t\tactualValue: gatewayToken,\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\"Port the OpenClaw gateway listens on\", \"OpenClaw Core\", true, false),\n\t\tkey: \"OPENCLAW_GATEWAY_PORT\",\n\t\texampleValue: \"18789\",\n\t\tactualValue: \"18789\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Port for the OpenClaw ACP bridge (WebSocket)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_BRIDGE_PORT\",\n\t\texampleValue: \"18790\",\n\t\tactualValue: \"18790\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Gateway network bind mode: 'lan' (all interfaces, required for Docker). Use 'loopback' only for native (non-Docker) installs with Tailscale serve/funnel\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_GATEWAY_BIND\",\n\t\texampleValue: \"lan\",\n\t\tactualValue: \"lan\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Host path to OpenClaw configuration directory\",\n\t\t\t\"OpenClaw Core\",\n\t\t\ttrue,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_CONFIG_DIR\",\n\t\texampleValue: \"./openclaw/config\",\n\t\tactualValue: \"./openclaw/config\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Host path to OpenClaw workspace directory\",\n\t\t\t\"OpenClaw Core\",\n\t\t\ttrue,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_WORKSPACE_DIR\",\n\t\texampleValue: \"./openclaw/workspace\",\n\t\tactualValue: \"./openclaw/workspace\",\n\t});\n\n\t// Set OPENCLAW_IMAGE based on variant (empty = use compose default)\n\tconst imageVariantMap: Record<string, string> = {\n\t\tofficial: \"\", // use compose default (ghcr.io/openclaw/openclaw:VERSION)\n\t\tcoolify: \"coollabsio/openclaw:latest\",\n\t\talpine: \"alpine/openclaw:latest\",\n\t};\n\tconst imageValue = imageVariantMap[options.openclawImage ?? \"official\"] ?? \"\";\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t`OpenClaw Docker image variant: ${options.openclawImage ?? \"official\"} (official, coolify, alpine)`,\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_IMAGE\",\n\t\texampleValue: \"\",\n\t\tactualValue: imageValue,\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Extra bind mounts for gateway and CLI containers (comma-separated, format: source:target[:options])\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_EXTRA_MOUNTS\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Named volume or host path for /home/node persistence across container restarts\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_HOME_VOLUME\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Extra apt packages to install during Docker image build (space-separated)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_DOCKER_APT_PACKAGES\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tif (options.domain) {\n\t\tlines.push({\n\t\t\tcomment: formatComment(\"Primary domain for service routing\", \"OpenClaw Core\", false, false),\n\t\t\tkey: \"OPENCLAW_DOMAIN\",\n\t\t\texampleValue: \"example.com\",\n\t\t\tactualValue: options.domain,\n\t\t});\n\t}\n\n\t// ── AI Provider API Keys ─────────────────────────────────────────────────\n\n\tif (resolved.aiProviders && resolved.aiProviders.length > 0) {\n\t\tlines.push({\n\t\t\tcomment:\n\t\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# AI Provider API Keys\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\tkey: \"\",\n\t\t\texampleValue: \"\",\n\t\t\tactualValue: \"\",\n\t\t});\n\n\t\tfor (const provider of resolved.aiProviders) {\n\t\t\t// Local-only providers don't need API keys\n\t\t\tif (provider === \"ollama\" || provider === \"lmstudio\" || provider === \"vllm\") continue;\n\n\t\t\t// Ollama Cloud uses OLLAMA_API_KEY (matches Ollama's official env var name)\n\t\t\tconst envKey =\n\t\t\t\tprovider === \"ollama-cloud\" ? \"OLLAMA_API_KEY\" : `${provider.toUpperCase()}_API_KEY`;\n\t\t\tconst label = provider === \"ollama-cloud\" ? \"Ollama Cloud\" : provider;\n\t\t\tlines.push({\n\t\t\t\tcomment: formatComment(`API Key for ${label} AI models`, \"OpenClaw Core\", true, true),\n\t\t\t\tkey: envKey,\n\t\t\t\texampleValue: `your_${provider.toLowerCase().replace(\"-\", \"_\")}_api_key_here`,\n\t\t\t\tactualValue: \"\",\n\t\t\t});\n\t\t}\n\t}\n\n\t// Claude web-provider session variables (optional)\n\tlines.push({\n\t\tcomment:\n\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# Claude Web Provider (optional)\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\tkey: \"\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Claude AI session key for web provider authentication\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"CLAUDE_AI_SESSION_KEY\",\n\t\texampleValue: \"your_claude_ai_session_key_here\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Claude web session key for web provider authentication\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"CLAUDE_WEB_SESSION_KEY\",\n\t\texampleValue: \"your_claude_web_session_key_here\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Claude web cookie for web provider authentication\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"CLAUDE_WEB_COOKIE\",\n\t\texampleValue: \"your_claude_web_cookie_here\",\n\t\tactualValue: \"\",\n\t});\n\n\t// ── Per-Service Database Passwords ──────────────────────────────────────\n\n\tconst dbReqs = getDbRequirements(resolved);\n\n\tif (dbReqs.length > 0) {\n\t\tlines.push({\n\t\t\tcomment:\n\t\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# Per-Service Database Passwords\\n# Each service gets its own PostgreSQL database and credentials\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\tkey: \"\",\n\t\t\texampleValue: \"\",\n\t\t\tactualValue: \"\",\n\t\t});\n\n\t\tfor (const req of dbReqs) {\n\t\t\tconst secretValue = options.generateSecrets ? randomBytes(24).toString(\"hex\") : \"\";\n\n\t\t\t// Store in map for later reference resolution\n\t\t\tenvVarValues.set(req.passwordEnvVar, secretValue);\n\n\t\t\tlines.push({\n\t\t\t\tcomment: formatComment(\n\t\t\t\t\t`PostgreSQL password for ${req.serviceName} (database: ${req.dbName}, user: ${req.dbUser})`,\n\t\t\t\t\treq.serviceName,\n\t\t\t\t\ttrue,\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tkey: req.passwordEnvVar,\n\t\t\t\texampleValue: `your_${req.passwordEnvVar.toLowerCase()}_here`,\n\t\t\t\tactualValue: secretValue,\n\t\t\t});\n\t\t}\n\t}\n\n\t// ── Service-Specific Variables ───────────────────────────────────────────\n\n\tconst dbPasswordKeys = dbReqs.map((r) => r.passwordEnvVar);\n\tconst aiProviderKeys = (resolved.aiProviders || []).map((p) => `${p.toUpperCase()}_API_KEY`);\n\tconst seenKeys = new Set<string>([\n\t\t\"OPENCLAW_VERSION\",\n\t\t\"OPENCLAW_GATEWAY_TOKEN\",\n\t\t\"OPENCLAW_GATEWAY_PORT\",\n\t\t\"OPENCLAW_BRIDGE_PORT\",\n\t\t\"OPENCLAW_GATEWAY_BIND\",\n\t\t\"OPENCLAW_CONFIG_DIR\",\n\t\t\"OPENCLAW_WORKSPACE_DIR\",\n\t\t\"OPENCLAW_IMAGE\",\n\t\t\"OPENCLAW_EXTRA_MOUNTS\",\n\t\t\"OPENCLAW_HOME_VOLUME\",\n\t\t\"OPENCLAW_DOCKER_APT_PACKAGES\",\n\t\t\"OPENCLAW_DOMAIN\",\n\t\t\"CLAUDE_AI_SESSION_KEY\",\n\t\t\"CLAUDE_WEB_SESSION_KEY\",\n\t\t\"CLAUDE_WEB_COOKIE\",\n\t\t...dbPasswordKeys,\n\t\t...aiProviderKeys,\n\t]);\n\n\tfor (const { definition } of resolved.services) {\n\t\tconst allEnvVars = [...definition.environment, ...definition.openclawEnvVars];\n\n\t\tif (allEnvVars.length === 0) continue;\n\n\t\t// Section separator for this service\n\t\tlines.push({\n\t\t\tcomment: `\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# ${definition.icon} ${definition.name}\\n# ═══════════════════════════════════════════════════════════════════════════════`,\n\t\t\tkey: \"\",\n\t\t\texampleValue: \"\",\n\t\t\tactualValue: \"\",\n\t\t});\n\n\t\tconst isNative = options.nativeServiceIds?.has(definition.id);\n\n\t\tfor (const envVar of allEnvVars) {\n\t\t\tif (seenKeys.has(envVar.key)) continue;\n\t\t\tseenKeys.add(envVar.key);\n\n\t\t\tconst secretValue = options.generateSecrets ? randomBytes(24).toString(\"hex\") : \"\";\n\n\t\t\t// For native services, host-like vars must point to host so gateway (in Docker) can reach them\n\t\t\tconst isHostVar = envVar.key.endsWith(\"_HOST\");\n\t\t\tconst hostValue = isNative && isHostVar ? \"host.docker.internal\" : null;\n\n\t\t\tconst exampleValue = hostValue\n\t\t\t\t? hostValue\n\t\t\t\t: envVar.secret\n\t\t\t\t\t? `your_${envVar.key.toLowerCase()}_here`\n\t\t\t\t\t: envVar.defaultValue;\n\n\t\t\tlet actualValue: string;\n\t\t\tif (hostValue) {\n\t\t\t\tactualValue = hostValue;\n\t\t\t} else if (envVar.secret) {\n\t\t\t\t// Resolve env var references like ${N8N_DB_PASSWORD}\n\t\t\t\tif (envVar.defaultValue.startsWith(\"${\") && envVar.defaultValue.endsWith(\"}\")) {\n\t\t\t\t\tconst refKey = envVar.defaultValue.slice(2, -1); // Extract var name from ${VAR_NAME}\n\t\t\t\t\tactualValue = envVarValues.get(refKey) || envVar.defaultValue;\n\t\t\t\t} else {\n\t\t\t\t\tactualValue = secretValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tactualValue = envVar.defaultValue;\n\t\t\t}\n\n\t\t\t// Store in map for later reference resolution\n\t\t\tenvVarValues.set(envVar.key, actualValue);\n\n\t\t\tlines.push({\n\t\t\t\tcomment: formatComment(envVar.description, definition.name, envVar.required, envVar.secret),\n\t\t\t\tkey: envVar.key,\n\t\t\t\texampleValue,\n\t\t\t\tactualValue,\n\t\t\t});\n\t\t}\n\t}\n\n\t// ── Build output strings ────────────────────────────────────────────────\n\n\tconst header = [\n\t\t\"# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\"# OpenClaw Environment Configuration\",\n\t\t`# Generated at ${new Date().toISOString()}`,\n\t\t\"# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\"\",\n\t].join(\"\\n\");\n\n\tlet envExample = header;\n\tlet env = header;\n\n\tfor (const line of lines) {\n\t\tif (line.key === \"\") {\n\t\t\t// Section comment\n\t\t\tenvExample += `${line.comment}\\n`;\n\t\t\tenv += `${line.comment}\\n`;\n\t\t} else {\n\t\t\tenvExample += `${line.comment}\\n${line.key}=${line.exampleValue}\\n\\n`;\n\t\t\tenv += `${line.comment}\\n${line.key}=${line.actualValue}\\n\\n`;\n\t\t}\n\t}\n\n\treturn { envExample, env };\n}\n\n/**\n * Format a descriptive comment block for an environment variable.\n */\nfunction formatComment(\n\tdescription: string,\n\tserviceName: string,\n\trequired: boolean,\n\tsecret: boolean,\n): string {\n\treturn [\n\t\t`# ${description}`,\n\t\t`# Service: ${serviceName} | Required: ${required ? \"Yes\" : \"No\"} | Secret: ${secret ? \"Yes\" : \"No\"}`,\n\t].join(\"\\n\");\n}\n\n// ── Structured Env Vars ─────────────────────────────────────────────────────\n\nexport interface EnvVarGroup {\n\tserviceName: string;\n\tserviceIcon: string;\n\tserviceId: string;\n\tvars: {\n\t\tkey: string;\n\t\tdescription: string;\n\t\tsecret: boolean;\n\t\trequired: boolean;\n\t\tdefaultValue: string;\n\t}[];\n}\n\n/**\n * Returns environment variables grouped by service, suitable for UI rendering.\n *\n * - First group is always \"OpenClaw Core\" with base variables.\n * - Subsequent groups correspond to each resolved service.\n * - Variables are deduplicated across groups (first occurrence wins).\n */\nexport function getStructuredEnvVars(resolved: ResolverOutput): EnvVarGroup[] {\n\tconst groups: EnvVarGroup[] = [];\n\tconst seenKeys = new Set<string>();\n\n\t// ── OpenClaw Core group ──────────────────────────────────────────────────\n\tconst coreVars: EnvVarGroup[\"vars\"] = [\n\t\t{\n\t\t\tkey: \"OPENCLAW_VERSION\",\n\t\t\tdescription: \"OpenClaw version to deploy\",\n\t\t\tsecret: false,\n\t\t\trequired: true,\n\t\t\tdefaultValue: \"latest\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_GATEWAY_TOKEN\",\n\t\t\tdescription: \"Authentication token for the OpenClaw gateway API\",\n\t\t\tsecret: true,\n\t\t\trequired: true,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_GATEWAY_PORT\",\n\t\t\tdescription: \"Port the OpenClaw gateway listens on\",\n\t\t\tsecret: false,\n\t\t\trequired: true,\n\t\t\tdefaultValue: \"18789\",\n\t\t},\n\t];\n\n\tfor (const v of coreVars) {\n\t\tseenKeys.add(v.key);\n\t}\n\n\tgroups.push({\n\t\tserviceName: \"OpenClaw Core\",\n\t\tserviceIcon: \"⚙️\",\n\t\tserviceId: \"openclaw-core\",\n\t\tvars: coreVars,\n\t});\n\n\t// ── Per-service groups ───────────────────────────────────────────────────\n\tfor (const { definition } of resolved.services) {\n\t\tconst allEnvVars = [...definition.environment, ...definition.openclawEnvVars];\n\n\t\tconst vars: EnvVarGroup[\"vars\"] = [];\n\n\t\tfor (const envVar of allEnvVars) {\n\t\t\tif (seenKeys.has(envVar.key)) continue;\n\t\t\tseenKeys.add(envVar.key);\n\n\t\t\tvars.push({\n\t\t\t\tkey: envVar.key,\n\t\t\t\tdescription: envVar.description,\n\t\t\t\tsecret: envVar.secret,\n\t\t\t\trequired: envVar.required,\n\t\t\t\tdefaultValue: envVar.defaultValue,\n\t\t\t});\n\t\t}\n\n\t\tif (vars.length === 0) continue;\n\n\t\tgroups.push({\n\t\t\tserviceName: definition.name,\n\t\t\tserviceIcon: definition.icon,\n\t\t\tserviceId: definition.id,\n\t\t\tvars,\n\t\t});\n\t}\n\n\treturn groups;\n}\n"],"mappings":";;;;;;;;;AA2BA,SAAgB,iBACf,UACA,SACsC;CACtC,MAAM,UAAU,QAAQ,mBAAmB;CAC3C,MAAM,QAAuF,EAAE;CAG/F,MAAM,+BAAe,IAAI,KAAqB;AAK9C,KAAI,QAAQ,gBAAgB,QAAQ,aAAa,SAAS,GAAG;EAC5D,MAAM,YAAY,QAAQ,aAAa,UAAU,MAAM;EACvD,MAAM,mBAAmB,QAAQ,aAAa,KAAK,UAAU;AAC7D,QAAM,KAAK;GACV,SAAS,cACR,+DACA,kBACA,OACA,MACA;GACD,KAAK;GACL,cAAc;GACd,a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AAgB,qBAAqB,UAAyC;CAC7E,MAAM,SAAwB,EAAE;CAChC,MAAM,2BAAW,IAAI,KAAa;CAGlC,MAAM,WAAgC;EACrC;GACC,KAAK;GACL,aAAa;GACb,QAAQ;GACR,UAAU;GACV,cAAc;GACd;EACD;GACC,KAAK;GACL,aAAa;GACb,QAAQ;GACR,UAAU;GACV,cAAc;GACd;EACD;GACC,KAAK;GACL,aAAa;GACb,QAAQ;GACR,UAAU;GACV,cAAc;GACd;EACD;AAED,MAAK,MAAM,KAAK,SACf,UAAS,IAAI,EAAE,IAAI;AAGpB,QAAO,KAAK;EACX,aAAa;EACb,aAAa;EACb,WAAW;EACX,MAAM;EACN,CAAC;AAGF,MAAK,MAAM,EAAE,gBAAgB,SAAS,UAAU;EAC/C,MAAM,aAAa,CAAC,GAAG,WAAW,aAAa,GAAG,WAAW,gBAAgB;EAE7E,MAAM,OAA4B,EAAE;AAEpC,OAAK,MAAM,UAAU,YAAY;AAChC,OAAI,SAAS,IAAI,OAAO,IAAI,CAAE;AAC9B,YAAS,IAAI,OAAO,IAAI;AAExB,QAAK,KAAK;IACT,KAAK,OAAO;IACZ,aAAa,OAAO;IACpB,QAAQ,OAAO;IACf,UAAU,OAAO;IACjB,cAAc,OAAO;IACrB,CAAC;;AAGH,MAAI,KAAK,WAAW,EAAG;AAEvB,SAAO,KAAK;GACX,aAAa,WAAW;GACxB,aAAa,WAAW;GACxB,WAAW,WAAW;GACtB;GACA,CAAC;;AAGH,QAAO"}
|
|
1
|
+
{"version":3,"file":"env.mjs","names":[],"sources":["../../src/generators/env.ts"],"sourcesContent":["import { randomBytes } from \"node:crypto\";\nimport type { ResolverOutput } from \"../types.js\";\nimport { getDbRequirements } from \"./postgres-init.js\";\n\n/**\n * Options for environment file generation.\n */\nexport interface EnvGeneratorOptions {\n\tgenerateSecrets: boolean;\n\tdomain?: string;\n\topenclawVersion?: string;\n\t/** When set, host-like vars (e.g. REDIS_HOST) for these services use host.docker.internal so gateway in Docker can reach native services on host. */\n\tnativeServiceIds?: Set<string>;\n\t/** Compose file names for COMPOSE_FILE env var (enables `docker compose up` without -f flags). */\n\tcomposeFiles?: string[];\n\t/** Compose profiles for COMPOSE_PROFILES env var (enables `docker compose up` without --profile flags). */\n\tcomposeProfiles?: string[];\n\t/** OpenClaw image variant (official, coolify, alpine). */\n\topenclawImage?: \"official\" | \"coolify\" | \"alpine\";\n}\n\n/**\n * Generates `.env.example` and `.env` file contents from resolved services.\n *\n * - `.env.example`: every env var with descriptive comments, placeholders for secrets\n * - `.env`: same vars but secrets filled with cryptographically random values when generateSecrets is true\n */\nexport function generateEnvFiles(\n\tresolved: ResolverOutput,\n\toptions: EnvGeneratorOptions,\n): { envExample: string; env: string } {\n\tconst version = options.openclawVersion ?? \"latest\";\n\tconst lines: { comment: string; key: string; exampleValue: string; actualValue: string }[] = [];\n\n\t// Track all env var values for resolving references later\n\tconst envVarValues = new Map<string, string>();\n\n\t// ── Docker Compose convenience vars ─────────────────────────────────────\n\t// These let you run `docker compose up -d` without -f and --profile flags.\n\n\tif (options.composeFiles && options.composeFiles.length > 0) {\n\t\tconst separator = process.platform === \"win32\" ? \";\" : \":\";\n\t\tconst composeFileValue = options.composeFiles.join(separator);\n\t\tlines.push({\n\t\t\tcomment: formatComment(\n\t\t\t\t\"Compose files to load (allows plain `docker compose up -d`)\",\n\t\t\t\t\"Docker Compose\",\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t),\n\t\t\tkey: \"COMPOSE_FILE\",\n\t\t\texampleValue: composeFileValue,\n\t\t\tactualValue: composeFileValue,\n\t\t});\n\t}\n\n\tif (options.composeProfiles && options.composeProfiles.length > 0) {\n\t\tconst profilesValue = options.composeProfiles.join(\",\");\n\t\tlines.push({\n\t\t\tcomment: formatComment(\n\t\t\t\t\"Profiles to activate (allows plain `docker compose up -d`)\",\n\t\t\t\t\"Docker Compose\",\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t),\n\t\t\tkey: \"COMPOSE_PROFILES\",\n\t\t\texampleValue: profilesValue,\n\t\t\tactualValue: profilesValue,\n\t\t});\n\t}\n\n\t// ── Base OpenClaw Variables ──────────────────────────────────────────────\n\n\tlines.push({\n\t\tcomment: formatComment(\"OpenClaw version to deploy\", \"OpenClaw Core\", true, false),\n\t\tkey: \"OPENCLAW_VERSION\",\n\t\texampleValue: version,\n\t\tactualValue: version,\n\t});\n\n\tconst gatewayToken = options.generateSecrets ? randomBytes(24).toString(\"hex\") : \"\";\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Authentication token for the OpenClaw gateway API\",\n\t\t\t\"OpenClaw Core\",\n\t\t\ttrue,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"OPENCLAW_GATEWAY_TOKEN\",\n\t\texampleValue: \"your_gateway_token_here\",\n\t\tactualValue: gatewayToken,\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\"Port the OpenClaw gateway listens on\", \"OpenClaw Core\", true, false),\n\t\tkey: \"OPENCLAW_GATEWAY_PORT\",\n\t\texampleValue: \"18789\",\n\t\tactualValue: \"18789\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Port for the OpenClaw ACP bridge (WebSocket)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_BRIDGE_PORT\",\n\t\texampleValue: \"18790\",\n\t\tactualValue: \"18790\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Gateway network bind mode: 'lan' (all interfaces, required for Docker). Use 'loopback' only for native (non-Docker) installs with Tailscale serve/funnel\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_GATEWAY_BIND\",\n\t\texampleValue: \"lan\",\n\t\tactualValue: \"lan\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Host path to OpenClaw configuration directory\",\n\t\t\t\"OpenClaw Core\",\n\t\t\ttrue,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_CONFIG_DIR\",\n\t\texampleValue: \"./openclaw/config\",\n\t\tactualValue: \"./openclaw/config\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Host path to OpenClaw workspace directory\",\n\t\t\t\"OpenClaw Core\",\n\t\t\ttrue,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_WORKSPACE_DIR\",\n\t\texampleValue: \"./openclaw/workspace\",\n\t\tactualValue: \"./openclaw/workspace\",\n\t});\n\n\t// Set OPENCLAW_IMAGE based on variant (empty = use compose default)\n\tconst imageVariantMap: Record<string, string> = {\n\t\tofficial: \"\", // use compose default (ghcr.io/openclaw/openclaw:VERSION)\n\t\tcoolify: \"coollabsio/openclaw:latest\",\n\t\talpine: \"alpine/openclaw:latest\",\n\t};\n\tconst imageValue = imageVariantMap[options.openclawImage ?? \"official\"] ?? \"\";\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t`OpenClaw Docker image variant: ${options.openclawImage ?? \"official\"} (official, coolify, alpine)`,\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_IMAGE\",\n\t\texampleValue: \"\",\n\t\tactualValue: imageValue,\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Extra bind mounts for gateway and CLI containers (comma-separated, format: source:target[:options])\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_EXTRA_MOUNTS\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Named volume or host path for /home/node persistence across container restarts\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_HOME_VOLUME\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Extra apt packages to install during Docker image build (space-separated)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_DOCKER_APT_PACKAGES\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Alternative auth: gateway password (use token OR password, not both)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"OPENCLAW_GATEWAY_PASSWORD\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Override state directory path (default: ~/.openclaw)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_STATE_DIR\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Override config file path (default: ~/.openclaw/openclaw.json)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_CONFIG_PATH\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Import missing keys from login shell profile (set to 1 to enable)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_LOAD_SHELL_ENV\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tif (options.domain) {\n\t\tlines.push({\n\t\t\tcomment: formatComment(\"Primary domain for service routing\", \"OpenClaw Core\", false, false),\n\t\t\tkey: \"OPENCLAW_DOMAIN\",\n\t\t\texampleValue: \"example.com\",\n\t\t\tactualValue: options.domain,\n\t\t});\n\t}\n\n\t// ── Tools API Keys (web search, fetch) ──────────────────────────────────\n\n\tlines.push({\n\t\tcomment:\n\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# Tools API Keys (web search, fetch, voice)\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\tkey: \"\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Brave Search API key for web search tool (default provider)\",\n\t\t\t\"OpenClaw Tools\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"BRAVE_API_KEY\",\n\t\texampleValue: \"your_brave_api_key_here\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Perplexity API key for web search tool (alternative provider)\",\n\t\t\t\"OpenClaw Tools\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"PERPLEXITY_API_KEY\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Firecrawl API key for enhanced web fetch fallback\",\n\t\t\t\"OpenClaw Tools\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"FIRECRAWL_API_KEY\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"ElevenLabs API key for Talk mode (text-to-speech)\",\n\t\t\t\"OpenClaw Tools\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"ELEVENLABS_API_KEY\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\t// ── Swarm / Remote Gateway ───────────────────────────────────────────────\n\n\tlines.push({\n\t\tcomment:\n\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# Swarm / Remote Gateway Connection\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\tkey: \"\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Auth token for connecting to a remote OpenClaw gateway (swarm upstream)\",\n\t\t\t\"OpenClaw Swarm\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"OPENCLAW_REMOTE_GATEWAY_TOKEN\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Password for remote gateway auth (alternative to token)\",\n\t\t\t\"OpenClaw Swarm\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"OPENCLAW_REMOTE_GATEWAY_PASSWORD\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\t// ── AI Provider API Keys ─────────────────────────────────────────────────\n\n\tif (resolved.aiProviders && resolved.aiProviders.length > 0) {\n\t\tlines.push({\n\t\t\tcomment:\n\t\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# AI Provider API Keys\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\tkey: \"\",\n\t\t\texampleValue: \"\",\n\t\t\tactualValue: \"\",\n\t\t});\n\n\t\tfor (const provider of resolved.aiProviders) {\n\t\t\t// Local-only providers don't need API keys\n\t\t\tif (provider === \"ollama\" || provider === \"lmstudio\" || provider === \"vllm\") continue;\n\n\t\t\t// Ollama Cloud uses OLLAMA_API_KEY (matches Ollama's official env var name)\n\t\t\tconst envKey =\n\t\t\t\tprovider === \"ollama-cloud\" ? \"OLLAMA_API_KEY\" : `${provider.toUpperCase()}_API_KEY`;\n\t\t\tconst label = provider === \"ollama-cloud\" ? \"Ollama Cloud\" : provider;\n\t\t\tlines.push({\n\t\t\t\tcomment: formatComment(`API Key for ${label} AI models`, \"OpenClaw Core\", true, true),\n\t\t\t\tkey: envKey,\n\t\t\t\texampleValue: `your_${provider.toLowerCase().replace(\"-\", \"_\")}_api_key_here`,\n\t\t\t\tactualValue: \"\",\n\t\t\t});\n\t\t}\n\t}\n\n\t// Claude web-provider session variables (optional)\n\tlines.push({\n\t\tcomment:\n\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# Claude Web Provider (optional)\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\tkey: \"\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Claude AI session key for web provider authentication\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"CLAUDE_AI_SESSION_KEY\",\n\t\texampleValue: \"your_claude_ai_session_key_here\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Claude web session key for web provider authentication\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"CLAUDE_WEB_SESSION_KEY\",\n\t\texampleValue: \"your_claude_web_session_key_here\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Claude web cookie for web provider authentication\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"CLAUDE_WEB_COOKIE\",\n\t\texampleValue: \"your_claude_web_cookie_here\",\n\t\tactualValue: \"\",\n\t});\n\n\t// ── Per-Service Database Passwords ──────────────────────────────────────\n\n\tconst dbReqs = getDbRequirements(resolved);\n\n\tif (dbReqs.length > 0) {\n\t\tlines.push({\n\t\t\tcomment:\n\t\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# Per-Service Database Passwords\\n# Each service gets its own PostgreSQL database and credentials\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\tkey: \"\",\n\t\t\texampleValue: \"\",\n\t\t\tactualValue: \"\",\n\t\t});\n\n\t\tfor (const req of dbReqs) {\n\t\t\tconst secretValue = options.generateSecrets ? randomBytes(24).toString(\"hex\") : \"\";\n\n\t\t\t// Store in map for later reference resolution\n\t\t\tenvVarValues.set(req.passwordEnvVar, secretValue);\n\n\t\t\tlines.push({\n\t\t\t\tcomment: formatComment(\n\t\t\t\t\t`PostgreSQL password for ${req.serviceName} (database: ${req.dbName}, user: ${req.dbUser})`,\n\t\t\t\t\treq.serviceName,\n\t\t\t\t\ttrue,\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tkey: req.passwordEnvVar,\n\t\t\t\texampleValue: `your_${req.passwordEnvVar.toLowerCase()}_here`,\n\t\t\t\tactualValue: secretValue,\n\t\t\t});\n\t\t}\n\t}\n\n\t// ── Service-Specific Variables ───────────────────────────────────────────\n\n\tconst dbPasswordKeys = dbReqs.map((r) => r.passwordEnvVar);\n\tconst aiProviderKeys = (resolved.aiProviders || []).map((p) => `${p.toUpperCase()}_API_KEY`);\n\tconst seenKeys = new Set<string>([\n\t\t\"OPENCLAW_VERSION\",\n\t\t\"OPENCLAW_GATEWAY_TOKEN\",\n\t\t\"OPENCLAW_GATEWAY_PORT\",\n\t\t\"OPENCLAW_BRIDGE_PORT\",\n\t\t\"OPENCLAW_GATEWAY_BIND\",\n\t\t\"OPENCLAW_CONFIG_DIR\",\n\t\t\"OPENCLAW_WORKSPACE_DIR\",\n\t\t\"OPENCLAW_IMAGE\",\n\t\t\"OPENCLAW_EXTRA_MOUNTS\",\n\t\t\"OPENCLAW_HOME_VOLUME\",\n\t\t\"OPENCLAW_DOCKER_APT_PACKAGES\",\n\t\t\"OPENCLAW_GATEWAY_PASSWORD\",\n\t\t\"OPENCLAW_STATE_DIR\",\n\t\t\"OPENCLAW_CONFIG_PATH\",\n\t\t\"OPENCLAW_LOAD_SHELL_ENV\",\n\t\t\"OPENCLAW_DOMAIN\",\n\t\t\"BRAVE_API_KEY\",\n\t\t\"PERPLEXITY_API_KEY\",\n\t\t\"FIRECRAWL_API_KEY\",\n\t\t\"ELEVENLABS_API_KEY\",\n\t\t\"OPENCLAW_REMOTE_GATEWAY_TOKEN\",\n\t\t\"OPENCLAW_REMOTE_GATEWAY_PASSWORD\",\n\t\t\"CLAUDE_AI_SESSION_KEY\",\n\t\t\"CLAUDE_WEB_SESSION_KEY\",\n\t\t\"CLAUDE_WEB_COOKIE\",\n\t\t...dbPasswordKeys,\n\t\t...aiProviderKeys,\n\t]);\n\n\tfor (const { definition } of resolved.services) {\n\t\tconst allEnvVars = [...definition.environment, ...definition.openclawEnvVars];\n\n\t\tif (allEnvVars.length === 0) continue;\n\n\t\t// Section separator for this service\n\t\tlines.push({\n\t\t\tcomment: `\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# ${definition.icon} ${definition.name}\\n# ═══════════════════════════════════════════════════════════════════════════════`,\n\t\t\tkey: \"\",\n\t\t\texampleValue: \"\",\n\t\t\tactualValue: \"\",\n\t\t});\n\n\t\tconst isNative = options.nativeServiceIds?.has(definition.id);\n\n\t\tfor (const envVar of allEnvVars) {\n\t\t\tif (seenKeys.has(envVar.key)) continue;\n\t\t\tseenKeys.add(envVar.key);\n\n\t\t\tconst secretValue = options.generateSecrets ? randomBytes(24).toString(\"hex\") : \"\";\n\n\t\t\t// For native services, host-like vars must point to host so gateway (in Docker) can reach them\n\t\t\tconst isHostVar = envVar.key.endsWith(\"_HOST\");\n\t\t\tconst hostValue = isNative && isHostVar ? \"host.docker.internal\" : null;\n\n\t\t\tconst exampleValue = hostValue\n\t\t\t\t? hostValue\n\t\t\t\t: envVar.secret\n\t\t\t\t\t? `your_${envVar.key.toLowerCase()}_here`\n\t\t\t\t\t: envVar.defaultValue;\n\n\t\t\tlet actualValue: string;\n\t\t\tif (hostValue) {\n\t\t\t\tactualValue = hostValue;\n\t\t\t} else if (envVar.secret) {\n\t\t\t\t// Resolve env var references like ${N8N_DB_PASSWORD}\n\t\t\t\tif (envVar.defaultValue.startsWith(\"${\") && envVar.defaultValue.endsWith(\"}\")) {\n\t\t\t\t\tconst refKey = envVar.defaultValue.slice(2, -1); // Extract var name from ${VAR_NAME}\n\t\t\t\t\tactualValue = envVarValues.get(refKey) || envVar.defaultValue;\n\t\t\t\t} else {\n\t\t\t\t\tactualValue = secretValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tactualValue = envVar.defaultValue;\n\t\t\t}\n\n\t\t\t// Store in map for later reference resolution\n\t\t\tenvVarValues.set(envVar.key, actualValue);\n\n\t\t\tlines.push({\n\t\t\t\tcomment: formatComment(envVar.description, definition.name, envVar.required, envVar.secret),\n\t\t\t\tkey: envVar.key,\n\t\t\t\texampleValue,\n\t\t\t\tactualValue,\n\t\t\t});\n\t\t}\n\t}\n\n\t// ── Build output strings ────────────────────────────────────────────────\n\n\tconst header = [\n\t\t\"# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\"# OpenClaw Environment Configuration\",\n\t\t`# Generated at ${new Date().toISOString()}`,\n\t\t\"# Docs: https://better-openclaw.dev/docs | Cloud: https://clawexa.net\",\n\t\t\"# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\"\",\n\t].join(\"\\n\");\n\n\tlet envExample = header;\n\tlet env = header;\n\n\tfor (const line of lines) {\n\t\tif (line.key === \"\") {\n\t\t\t// Section comment\n\t\t\tenvExample += `${line.comment}\\n`;\n\t\t\tenv += `${line.comment}\\n`;\n\t\t} else {\n\t\t\tenvExample += `${line.comment}\\n${line.key}=${line.exampleValue}\\n\\n`;\n\t\t\tenv += `${line.comment}\\n${line.key}=${line.actualValue}\\n\\n`;\n\t\t}\n\t}\n\n\treturn { envExample, env };\n}\n\n/**\n * Format a descriptive comment block for an environment variable.\n */\nfunction formatComment(\n\tdescription: string,\n\tserviceName: string,\n\trequired: boolean,\n\tsecret: boolean,\n): string {\n\treturn [\n\t\t`# ${description}`,\n\t\t`# Service: ${serviceName} | Required: ${required ? \"Yes\" : \"No\"} | Secret: ${secret ? \"Yes\" : \"No\"}`,\n\t].join(\"\\n\");\n}\n\n// ── Structured Env Vars ─────────────────────────────────────────────────────\n\nexport interface EnvVarGroup {\n\tserviceName: string;\n\tserviceIcon: string;\n\tserviceId: string;\n\tvars: {\n\t\tkey: string;\n\t\tdescription: string;\n\t\tsecret: boolean;\n\t\trequired: boolean;\n\t\tdefaultValue: string;\n\t}[];\n}\n\n/**\n * Returns environment variables grouped by service, suitable for UI rendering.\n *\n * - First group is always \"OpenClaw Core\" with base variables.\n * - Subsequent groups correspond to each resolved service.\n * - Variables are deduplicated across groups (first occurrence wins).\n */\nexport function getStructuredEnvVars(resolved: ResolverOutput): EnvVarGroup[] {\n\tconst groups: EnvVarGroup[] = [];\n\tconst seenKeys = new Set<string>();\n\n\t// ── OpenClaw Core group ──────────────────────────────────────────────────\n\tconst coreVars: EnvVarGroup[\"vars\"] = [\n\t\t{\n\t\t\tkey: \"OPENCLAW_VERSION\",\n\t\t\tdescription: \"OpenClaw version to deploy\",\n\t\t\tsecret: false,\n\t\t\trequired: true,\n\t\t\tdefaultValue: \"latest\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_GATEWAY_TOKEN\",\n\t\t\tdescription: \"Authentication token for the OpenClaw gateway API\",\n\t\t\tsecret: true,\n\t\t\trequired: true,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_GATEWAY_PORT\",\n\t\t\tdescription: \"Port the OpenClaw gateway listens on\",\n\t\t\tsecret: false,\n\t\t\trequired: true,\n\t\t\tdefaultValue: \"18789\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_GATEWAY_PASSWORD\",\n\t\t\tdescription: \"Alternative auth: gateway password (use token OR password)\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_STATE_DIR\",\n\t\t\tdescription: \"Override state directory path (default: ~/.openclaw)\",\n\t\t\tsecret: false,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_CONFIG_PATH\",\n\t\t\tdescription: \"Override config file path (default: ~/.openclaw/openclaw.json)\",\n\t\t\tsecret: false,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"BRAVE_API_KEY\",\n\t\t\tdescription: \"Brave Search API key for web search tool (default provider)\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"PERPLEXITY_API_KEY\",\n\t\t\tdescription: \"Perplexity API key for web search (alternative provider)\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"FIRECRAWL_API_KEY\",\n\t\t\tdescription: \"Firecrawl API key for enhanced web fetch fallback\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"ELEVENLABS_API_KEY\",\n\t\t\tdescription: \"ElevenLabs API key for Talk mode (text-to-speech)\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_REMOTE_GATEWAY_TOKEN\",\n\t\t\tdescription: \"Auth token for connecting to a remote OpenClaw gateway (swarm upstream)\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_REMOTE_GATEWAY_PASSWORD\",\n\t\t\tdescription: \"Password for remote gateway auth (alternative to token)\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t];\n\n\tfor (const v of coreVars) {\n\t\tseenKeys.add(v.key);\n\t}\n\n\tgroups.push({\n\t\tserviceName: \"OpenClaw Core\",\n\t\tserviceIcon: \"⚙️\",\n\t\tserviceId: \"openclaw-core\",\n\t\tvars: coreVars,\n\t});\n\n\t// ── Per-service groups ───────────────────────────────────────────────────\n\tfor (const { definition } of resolved.services) {\n\t\tconst allEnvVars = [...definition.environment, ...definition.openclawEnvVars];\n\n\t\tconst vars: EnvVarGroup[\"vars\"] = [];\n\n\t\tfor (const envVar of allEnvVars) {\n\t\t\tif (seenKeys.has(envVar.key)) continue;\n\t\t\tseenKeys.add(envVar.key);\n\n\t\t\tvars.push({\n\t\t\t\tkey: envVar.key,\n\t\t\t\tdescription: envVar.description,\n\t\t\t\tsecret: envVar.secret,\n\t\t\t\trequired: envVar.required,\n\t\t\t\tdefaultValue: envVar.defaultValue,\n\t\t\t});\n\t\t}\n\n\t\tif (vars.length === 0) continue;\n\n\t\tgroups.push({\n\t\t\tserviceName: definition.name,\n\t\t\tserviceIcon: definition.icon,\n\t\t\tserviceId: definition.id,\n\t\t\tvars,\n\t\t});\n\t}\n\n\treturn groups;\n}\n"],"mappings":";;;;;;;;;AA2BA,SAAgB,iBACf,UACA,SACsC;CACtC,MAAM,UAAU,QAAQ,mBAAmB;CAC3C,MAAM,QAAuF,EAAE;CAG/F,MAAM,+BAAe,IAAI,KAAqB;AAK9C,KAAI,QAAQ,gBAAgB,QAAQ,aAAa,SAAS,GAAG;EAC5D,MAAM,YAAY,QAAQ,aAAa,UAAU,MAAM;EACvD,MAAM,mBAAmB,QAAQ,aAAa,KAAK,UAAU;AAC7D,QAAM,KAAK;GACV,SAAS,cACR,+DACA,kBACA,OACA,MACA;GACD,KAAK;GACL,cAAc;GACd,aAAa;GACb,CAAC;;AAGH,KAAI,QAAQ,mBAAmB,QAAQ,gBAAgB,SAAS,GAAG;EAClE,MAAM,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI;AACvD,QAAM,KAAK;GACV,SAAS,cACR,8DACA,kBACA,OACA,MACA;GAC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b,CAAC;AAEF,OAAM,KAAK;EACV,SAAS,cACR,6EACA,iBACA,OACA,MACA;EACD,KAAK;EACL,cAAc;EACd,aAAa;EACb,CAAC;AAEF,OAAM,KAAK;EACV,SAAS,cACR,wEACA,iBACA,OACA,KACA;EACD,KAAK;EACL,cAAc;EACd,aAAa;EACb,CAAC;AAEF,OAAM,KAAK;EACV,SAAS,cACR,wDACA,iBACA,OACA,MACA;EACD,KAAK;EACL,cAAc;EACd,aAAa;EACb,CAAC;AAEF,OAAM,KAAK;EACV,SAAS,cACR,kEACA,iBACA,OACA,MACA;EACD,KAAK;EACL,cAAc;EACd,aAAa;EACb,CAAC;AAEF,OAAM,KAAK;EACV,SAAS,cACR,qEACA,iBACA,OACA,MACA;EACD,KAAK;EACL,cAAc;EACd,aAAa;EACb,CAAC;AAEF,KAAI,QAAQ,OACX,OAAM,KAAK;EACV,SAAS,cAAc,sCAAsC,iBAAiB,OAAO,MAAM;EAC3F,KAAK;EACL,cAAc;EACd,aAAa,QAAQ;EACrB,CAAC;AAKH,OAAM,KAAK;EACV,SACC;EACD,KAAK;EACL,cAAc;EACd,aAAa;EACb,CAAC;AAEF,OAAM,KAAK;EACV,SAAS,cACR,+DACA,kBACA,OACA,KACA;EACD,KAAK;EACL,cAAc;EACd,aAAa;EACb,CAAC;AAEF,OAAM,KAAK;EACV,SAAS,cACR,iEACA,kBACA,OACA,KACA;EACD,KAAK;EACL,cAAc;EACd,aAAa;EACb,CAAC;AAEF,OAAM,KAAK;EACV,SAAS,cACR,qDACA,kBACA,OACA,KACA;EACD,KAAK;EACL,cAAc;EACd,aAAa;EACb,CAAC;AAEF,OAAM,KAAK;EACV,SAAS,cACR,qDACA,kBACA,OACA,KACA;EACD,KAAK;EACL,cAAc;EACd,aAAa;EACb,CAAC;AAIF,OAAM,KAAK;EACV,SACC;EACD,KAAK;EACL,cAAc;EACd,aAAa;EACb,CAAC;AAEF,OAAM,KAAK;EACV,SAAS,cACR,2EACA,kBACA,OACA,KACA;EAC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WAAW,WAAW;GACtB;GACA,CAAC;;AAGH,QAAO"}
|
|
@@ -468,7 +468,25 @@ function generateOpenClawConfig(resolved, options) {
|
|
|
468
468
|
workspace: isDocker ? "/home/node/.openclaw/workspace" : "./workspace",
|
|
469
469
|
compaction: { mode: "safeguard" },
|
|
470
470
|
maxConcurrent: 4,
|
|
471
|
-
subagents: {
|
|
471
|
+
subagents: {
|
|
472
|
+
maxConcurrent: 8,
|
|
473
|
+
allowAgents: ["*"]
|
|
474
|
+
},
|
|
475
|
+
...isDocker ? { sandbox: {
|
|
476
|
+
docker: {
|
|
477
|
+
containerPrefix: "openclaw-sandbox",
|
|
478
|
+
workdir: "/workspace",
|
|
479
|
+
readOnlyRoot: true,
|
|
480
|
+
network: "none",
|
|
481
|
+
capDrop: ["ALL"],
|
|
482
|
+
pidsLimit: 256,
|
|
483
|
+
memory: "512m"
|
|
484
|
+
},
|
|
485
|
+
browser: {
|
|
486
|
+
enabled: false,
|
|
487
|
+
autoStart: false
|
|
488
|
+
}
|
|
489
|
+
} } : {}
|
|
472
490
|
} },
|
|
473
491
|
messages: { ackReactionScope: "group-mentions" },
|
|
474
492
|
commands: {
|
|
@@ -486,12 +504,16 @@ function generateOpenClawConfig(resolved, options) {
|
|
|
486
504
|
}
|
|
487
505
|
} },
|
|
488
506
|
web: { enabled: true },
|
|
489
|
-
discovery: {
|
|
507
|
+
discovery: {
|
|
508
|
+
wideArea: { enabled: true },
|
|
509
|
+
mdns: { mode: isDocker ? "off" : "minimal" }
|
|
510
|
+
},
|
|
490
511
|
canvasHost: {
|
|
491
512
|
enabled: true,
|
|
492
513
|
liveReload: true
|
|
493
514
|
},
|
|
494
515
|
channels: {},
|
|
516
|
+
nodeHost: { browserProxy: { enabled: true } },
|
|
495
517
|
gateway: {
|
|
496
518
|
port: options.gatewayPort,
|
|
497
519
|
mode: "local",
|
|
@@ -510,17 +532,90 @@ function generateOpenClawConfig(resolved, options) {
|
|
|
510
532
|
mode: "serve",
|
|
511
533
|
resetOnExit: true
|
|
512
534
|
} },
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
535
|
+
reload: { mode: "hybrid" },
|
|
536
|
+
http: { endpoints: {
|
|
537
|
+
chatCompletions: { enabled: false },
|
|
538
|
+
responses: { enabled: false }
|
|
539
|
+
} },
|
|
540
|
+
nodes: {
|
|
541
|
+
browser: { mode: "auto" },
|
|
542
|
+
allowCommands: [],
|
|
543
|
+
denyCommands: [
|
|
544
|
+
"camera.snap",
|
|
545
|
+
"camera.clip",
|
|
546
|
+
"screen.record"
|
|
547
|
+
]
|
|
548
|
+
},
|
|
549
|
+
remote: { transport: "direct" },
|
|
550
|
+
channelHealthCheckMinutes: 5
|
|
551
|
+
},
|
|
552
|
+
browser: {
|
|
553
|
+
enabled: true,
|
|
554
|
+
...isDocker ? {} : { relayBindHost: "127.0.0.1" }
|
|
518
555
|
},
|
|
519
556
|
skills: {
|
|
520
557
|
install: { nodeManager: "pnpm" },
|
|
521
558
|
load: { watch: true },
|
|
522
559
|
...Object.keys(defaultSkills).length > 0 ? { entries: defaultSkills } : {}
|
|
523
560
|
},
|
|
561
|
+
acp: {
|
|
562
|
+
enabled: false,
|
|
563
|
+
dispatch: { enabled: false },
|
|
564
|
+
maxConcurrentSessions: 4,
|
|
565
|
+
stream: {
|
|
566
|
+
deliveryMode: "live",
|
|
567
|
+
repeatSuppression: true
|
|
568
|
+
},
|
|
569
|
+
runtime: { ttlMinutes: 30 }
|
|
570
|
+
},
|
|
571
|
+
tools: {
|
|
572
|
+
web: {
|
|
573
|
+
search: {
|
|
574
|
+
enabled: true,
|
|
575
|
+
provider: "brave",
|
|
576
|
+
maxResults: 5,
|
|
577
|
+
timeoutSeconds: 10,
|
|
578
|
+
cacheTtlMinutes: 60
|
|
579
|
+
},
|
|
580
|
+
fetch: {
|
|
581
|
+
enabled: true,
|
|
582
|
+
maxChars: 3e4,
|
|
583
|
+
timeoutSeconds: 15,
|
|
584
|
+
cacheTtlMinutes: 30,
|
|
585
|
+
readability: true
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
exec: {
|
|
589
|
+
host: isDocker ? "sandbox" : "gateway",
|
|
590
|
+
security: "allowlist",
|
|
591
|
+
ask: "on-miss",
|
|
592
|
+
backgroundMs: 3e4,
|
|
593
|
+
timeoutSec: 300
|
|
594
|
+
},
|
|
595
|
+
fs: { workspaceOnly: !isDocker },
|
|
596
|
+
loopDetection: {
|
|
597
|
+
enabled: true,
|
|
598
|
+
historySize: 30,
|
|
599
|
+
warningThreshold: 10,
|
|
600
|
+
criticalThreshold: 20,
|
|
601
|
+
globalCircuitBreakerThreshold: 30
|
|
602
|
+
},
|
|
603
|
+
sessions: { visibility: "tree" },
|
|
604
|
+
agentToAgent: {
|
|
605
|
+
enabled: true,
|
|
606
|
+
allow: ["*"]
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
session: { agentToAgent: { maxPingPongTurns: 5 } },
|
|
610
|
+
memory: {
|
|
611
|
+
backend: "builtin",
|
|
612
|
+
citations: "auto"
|
|
613
|
+
},
|
|
614
|
+
ui: { assistant: { name: "OpenClaw" } },
|
|
615
|
+
media: {
|
|
616
|
+
preserveFilenames: true,
|
|
617
|
+
ttlHours: 168
|
|
618
|
+
},
|
|
524
619
|
plugins: {
|
|
525
620
|
enabled: true,
|
|
526
621
|
entries: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw-json.cjs","names":[],"sources":["../../src/generators/openclaw-json.ts"],"sourcesContent":["import type { AiProvider, DeploymentType, ResolverOutput } from \"../types.js\";\n\nexport interface OpenClawConfigOptions {\n\tdeploymentType: DeploymentType;\n\tgatewayPort: number;\n\topenclawVersion: string;\n}\n\nconst PROVIDER_CONFIGS: Record<AiProvider, any> = {\n\topenai: {\n\t\tbaseUrl: \"https://api.openai.com/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${OPENAI_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"gpt-5\",\n\t\t\t\tname: \"GPT-5\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 2.5, output: 10, cacheRead: 1.25, cacheWrite: 2.5 },\n\t\t\t\tcontextWindow: 128000,\n\t\t\t\tmaxTokens: 16384,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"o4-mini\",\n\t\t\t\tname: \"o4-mini\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 1.1, output: 4.4, cacheRead: 0.55, cacheWrite: 1.1 },\n\t\t\t\tcontextWindow: 200000,\n\t\t\t\tmaxTokens: 100000,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"gpt-5-mini\",\n\t\t\t\tname: \"GPT-5 Mini\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 0.15, output: 0.6, cacheRead: 0.075, cacheWrite: 0.15 },\n\t\t\t\tcontextWindow: 128000,\n\t\t\t\tmaxTokens: 16384,\n\t\t\t},\n\t\t],\n\t},\n\tanthropic: {\n\t\tbaseUrl: \"https://api.anthropic.com/v1/messages\",\n\t\tapi: \"anthropic-messages\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${ANTHROPIC_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"claude-opus-4-6\",\n\t\t\t\tname: \"Claude 4.6 Opus\",\n\t\t\t\tapi: \"anthropic-messages\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 15.0, output: 75.0, cacheRead: 1.5, cacheWrite: 18.75 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 128000,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"claude-sonnet-4-6\",\n\t\t\t\tname: \"Claude 4.6 Sonnet\",\n\t\t\t\tapi: \"anthropic-messages\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 3.0, output: 15.0, cacheRead: 0.3, cacheWrite: 3.75 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 128000,\n\t\t\t},\n\t\t],\n\t},\n\tgoogle: {\n\t\tbaseUrl: \"https://generativelanguage.googleapis.com/v1beta/openai\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${GOOGLE_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"gemini-3.1-pro-preview\",\n\t\t\t\tname: \"Gemini 3.1 Pro\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 2.0, output: 8.0, cacheRead: 0.5, cacheWrite: 2.0 },\n\t\t\t\tcontextWindow: 2000000,\n\t\t\t\tmaxTokens: 8192,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"gemini-3-flash-preview\",\n\t\t\t\tname: \"Gemini 3 Flash\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 0.15, output: 0.6, cacheRead: 0.0375, cacheWrite: 0.15 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 8192,\n\t\t\t},\n\t\t],\n\t},\n\txai: {\n\t\tbaseUrl: \"https://api.x.ai/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${XAI_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"grok-4-fast\",\n\t\t\t\tname: \"Grok 4 Fast\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 2.0, output: 10.0, cacheRead: 1.0, cacheWrite: 2.0 },\n\t\t\t\tcontextWindow: 256000,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t],\n\t},\n\tdeepseek: {\n\t\tbaseUrl: \"https://api.deepseek.com/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${DEEPSEEK_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"deepseek-chat\",\n\t\t\t\tname: \"DeepSeek V3\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0.14, output: 0.28, cacheRead: 0.014, cacheWrite: 0.14 },\n\t\t\t\tcontextWindow: 65536,\n\t\t\t\tmaxTokens: 8192,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"deepseek-reasoner\",\n\t\t\t\tname: \"DeepSeek R1\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0.55, output: 2.19, cacheRead: 0.14, cacheWrite: 0.55 },\n\t\t\t\tcontextWindow: 65536,\n\t\t\t\tmaxTokens: 8192,\n\t\t\t},\n\t\t],\n\t},\n\tgroq: {\n\t\tbaseUrl: \"https://api.groq.com/openai/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${GROQ_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"llama-4-maverick\",\n\t\t\t\tname: \"LLaMA 4 Maverick (Groq)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 0.59, output: 0.79 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t],\n\t},\n\topenrouter: {\n\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${OPENROUTER_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"anthropic/claude-opus-4-6\",\n\t\t\t\tname: \"Claude 4.6 Opus (OpenRouter)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 15.0, output: 75.0 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 128000,\n\t\t\t},\n\t\t],\n\t},\n\tmistral: {\n\t\tbaseUrl: \"https://api.mistral.ai/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${MISTRAL_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"mistral-large-latest\",\n\t\t\t\tname: \"Mistral Large\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 2.0, output: 6.0 },\n\t\t\t\tcontextWindow: 131000,\n\t\t\t\tmaxTokens: 8192,\n\t\t\t},\n\t\t],\n\t},\n\ttogether: {\n\t\tbaseUrl: \"https://api.together.xyz/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${TOGETHER_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8\", // \"meta-llama/Llama-4-Maverick-Instruct-Turbo\",\n\t\t\t\tname: \"LLaMA 4 Maverick (Together)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 0.88, output: 0.88 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t],\n\t},\n\tollama: {\n\t\tbaseUrl: null, // dynamic: resolved at generation time based on deployment type\n\t\tapi: \"openai-completions\",\n\t\tauth: \"none\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"llama3:latest\",\n\t\t\t\tname: \"LLaMA 3 (Local)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 8192,\n\t\t\t\tmaxTokens: 4096,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"deepseek-r1:latest\",\n\t\t\t\tname: \"DeepSeek R1 (Local)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 8192,\n\t\t\t\tmaxTokens: 4096,\n\t\t\t},\n\t\t],\n\t},\n\t\"ollama-cloud\": {\n\t\tbaseUrl: \"https://ollama.com/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${OLLAMA_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"qwen3.5:397b-cloud\",\n\t\t\t\tname: \"Qwen 3.5 397B (Cloud)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 131072,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"glm-5:cloud\",\n\t\t\t\tname: \"GLM-5 (Cloud)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 131072,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"minimax-m2.5:cloud\",\n\t\t\t\tname: \"MiniMax M2.5 (Cloud)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 131072,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"kimi-k2.5:cloud\",\n\t\t\t\tname: \"Kimi K2.5 (Cloud)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 131072,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"gemini-3-flash-preview:cloud\",\n\t\t\t\tname: \"Gemini 3 Flash (Cloud)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 8192,\n\t\t\t},\n\t\t],\n\t},\n\tlmstudio: {\n\t\tbaseUrl: null, // dynamic: resolved at generation time based on deployment type\n\t\tapi: \"openai-completions\",\n\t\tauth: \"none\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"local-model\",\n\t\t\t\tname: \"LM Studio Model\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 8192,\n\t\t\t\tmaxTokens: 4096,\n\t\t\t},\n\t\t],\n\t},\n\tvllm: {\n\t\tbaseUrl: null, // dynamic: resolved at generation time based on deployment type\n\t\tapi: \"openai-completions\",\n\t\tauth: \"none\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"local-model\",\n\t\t\t\tname: \"vLLM Model\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 8192,\n\t\t\t\tmaxTokens: 4096,\n\t\t\t},\n\t\t],\n\t},\n};\n\n/** Default ports for local inference providers (ollama, lmstudio, vllm). */\nconst LOCAL_PROVIDER_PORTS: Record<string, number> = {\n\tollama: 11434,\n\tlmstudio: 1234,\n\tvllm: 8000,\n};\n\n/**\n * Generates a default `openclaw/config/openclaw.json` tailored\n * to the services installed in the stack.\n */\nexport function generateOpenClawConfig(\n\tresolved: ResolverOutput,\n\toptions: OpenClawConfigOptions,\n): string {\n\tconst isDocker = options.deploymentType === \"docker\";\n\t// Docker containers reach host services via host.docker.internal; bare-metal uses localhost\n\tconst localInferenceHost = isDocker ? \"host.docker.internal\" : \"localhost\";\n\t// Docker: bind to all interfaces (0.0.0.0) so port mapping works from host\n\t// Bare-metal/local: bind to loopback (127.0.0.1) for security, Tailscale can expose if needed\n\tconst gatewayBind = isDocker ? \"lan\" : \"loopback\";\n\tconst defaultSkills: Record<string, { enabled: boolean }> = {};\n\n\t// Auto-enable any OpenClaw skills attached to installed companion services\n\tfor (const { definition } of resolved.services) {\n\t\tfor (const skill of definition.skills) {\n\t\t\tif (skill.autoInstall) {\n\t\t\t\tdefaultSkills[skill.skillId] = { enabled: true };\n\t\t\t}\n\t\t}\n\t}\n\n\tconst providers: Record<string, any> = {};\n\tconst agentsModels: Record<string, { alias: string }> = {};\n\tlet primaryModel = \"\";\n\n\t// Always default to empty or the first choice, fallback to openai if nothing was passed\n\tconst selectedProviders =\n\t\tresolved.aiProviders && resolved.aiProviders.length > 0\n\t\t\t? resolved.aiProviders\n\t\t\t: ([\"openai\"] as AiProvider[]);\n\n\tfor (const provider of selectedProviders) {\n\t\tconst meta = PROVIDER_CONFIGS[provider];\n\t\tif (!meta) continue;\n\n\t\t// Local inference providers have null baseUrl — resolve dynamically based on deployment type\n\t\tconst baseUrl =\n\t\t\tmeta.baseUrl ?? `http://${localInferenceHost}:${LOCAL_PROVIDER_PORTS[provider] ?? 8000}/v1`;\n\n\t\tproviders[provider] = {\n\t\t\tbaseUrl,\n\t\t\tapi: meta.api,\n\t\t\tauth: meta.auth,\n\t\t\t...(meta.apiKey ? { apiKey: meta.apiKey } : {}),\n\t\t\tmodels: meta.models,\n\t\t};\n\n\t\tfor (const m of meta.models) {\n\t\t\tconst fullId = `${provider}/${m.id}`;\n\t\t\tagentsModels[fullId] = { alias: m.name };\n\t\t\tif (!primaryModel) primaryModel = fullId; // Use the very first model mapped as the global system default\n\t\t}\n\t}\n\n\tconst authProfiles: Record<string, any> = {\n\t\t\"local:default\": {\n\t\t\tprovider: \"local\",\n\t\t\tmode: \"token\",\n\t\t},\n\t};\n\n\t// Add provider auth profiles too\n\tfor (const provider of Object.keys(providers)) {\n\t\tauthProfiles[`${provider}:default`] = {\n\t\t\tprovider: provider,\n\t\t\tmode: \"api_key\",\n\t\t};\n\t}\n\n\tconst config = {\n\t\tmeta: {\n\t\t\tlastTouchedVersion: options.openclawVersion,\n\t\t\tlastTouchedAt: new Date().toISOString(),\n\t\t},\n\t\tenv: {\n\t\t\tshellEnv: {\n\t\t\t\tenabled: true,\n\t\t\t},\n\t\t\tvars: {},\n\t\t},\n\t\twizard: {\n\t\t\tlastRunAt: new Date().toISOString(),\n\t\t\tlastRunVersion: options.openclawVersion,\n\t\t\tlastRunCommand: \"auto-generated-by-better-openclaw\",\n\t\t\tlastRunMode: \"local\",\n\t\t},\n\t\tlogging: {\n\t\t\tredactSensitive: \"tools\",\n\t\t},\n\t\tupdate: {\n\t\t\tcheckOnStart: true,\n\t\t},\n\t\tauth: {\n\t\t\tprofiles: authProfiles,\n\t\t},\n\t\tmodels: {\n\t\t\tmode: \"merge\",\n\t\t\tproviders,\n\t\t},\n\t\tagents: {\n\t\t\tdefaults: {\n\t\t\t\tmodel: {\n\t\t\t\t\tprimary: primaryModel,\n\t\t\t\t},\n\t\t\t\tmodels: agentsModels,\n\t\t\t\tworkspace: isDocker ? \"/home/node/.openclaw/workspace\" : \"./workspace\",\n\t\t\t\tcompaction: { mode: \"safeguard\" },\n\t\t\t\tmaxConcurrent: 4,\n\t\t\t\tsubagents: { maxConcurrent: 8 },\n\t\t\t},\n\t\t},\n\t\tmessages: {\n\t\t\tackReactionScope: \"group-mentions\",\n\t\t},\n\t\tcommands: {\n\t\t\tnative: \"auto\",\n\t\t\tnativeSkills: \"auto\",\n\t\t},\n\t\tcron: {\n\t\t\tenabled: true,\n\t\t},\n\t\thooks: {\n\t\t\tinternal: {\n\t\t\t\tenabled: true,\n\t\t\t\tentries: {\n\t\t\t\t\t\"boot-md\": { enabled: true },\n\t\t\t\t\t\"bootstrap-extra-files\": { enabled: true },\n\t\t\t\t\t\"command-logger\": { enabled: true },\n\t\t\t\t\t\"session-memory\": { enabled: true },\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tweb: {\n\t\t\tenabled: true,\n\t\t},\n\t\tdiscovery: {\n\t\t\twideArea: {\n\t\t\t\tenabled: true,\n\t\t\t},\n\t\t},\n\t\tcanvasHost: {\n\t\t\tenabled: true,\n\t\t\tliveReload: true,\n\t\t},\n\t\tchannels: {},\n\t\tgateway: {\n\t\t\tport: options.gatewayPort,\n\t\t\tmode: \"local\",\n\t\t\tbind: gatewayBind,\n\t\t\tcontrolUi: {\n\t\t\t\tenabled: true,\n\t\t\t\t// Docker NAT makes browser connections appear external — skip device pairing, use token-only auth\n\t\t\t\t...(isDocker ? { allowInsecureAuth: true } : {}),\n\t\t\t\t// Non-loopback binds need explicit origin allowlist for control UI CORS\n\t\t\t\t// Reference: docker-setup.sh ensure_control_ui_allowed_origins()\n\t\t\t\t...(gatewayBind !== \"loopback\"\n\t\t\t\t\t? { allowedOrigins: [`http://127.0.0.1:${options.gatewayPort}`] }\n\t\t\t\t\t: {}),\n\t\t\t},\n\t\t\tauth: {\n\t\t\t\tmode: \"token\",\n\t\t\t\ttoken: \"${OPENCLAW_GATEWAY_TOKEN}\",\n\t\t\t\t...(isDocker ? {} : { allowTailscale: true }),\n\t\t\t},\n\t\t\t// Tailscale serve only works on bare-metal/local (not inside Docker containers)\n\t\t\t...(isDocker ? {} : { tailscale: { mode: \"serve\", resetOnExit: true } }),\n\t\t\tnodes: {\n\t\t\t\tdenyCommands: [\"camera.snap\", \"camera.clip\", \"screen.record\"],\n\t\t\t},\n\t\t},\n\t\tskills: {\n\t\t\tinstall: { nodeManager: \"pnpm\" },\n\t\t\tload: {\n\t\t\t\twatch: true,\n\t\t\t},\n\t\t\t...(Object.keys(defaultSkills).length > 0 ? { entries: defaultSkills } : {}),\n\t\t},\n\t\tplugins: {\n\t\t\tenabled: true,\n\t\t\tentries: {\n\t\t\t\ttelegram: { enabled: true },\n\t\t\t\twhatsapp: { enabled: true },\n\t\t\t\tdiscord: { enabled: true },\n\t\t\t\t\"memory-core\": { enabled: true },\n\t\t\t},\n\t\t},\n\t};\n\n\treturn JSON.stringify(config, null, 2);\n}\n"],"mappings":";;AAQA,MAAM,mBAA4C;CACjD,QAAQ;EACP,SAAS;EACT,KAAK;EACL,MAAM;EACN,QAAQ;EACR,QAAQ;GACP;IACC,IAAI;IACJ,MAAM;IACN,KAAK;IACL,WAAW;IACX,OAAO,CAAC,QAAQ,QAAQ;IACxB,MAAM;KAAE,OAAO;KAAK,QAAQ;KAAI,WAAW;KAAM,YAAY;KAAK;IAClE,eAAe;IACf,WAAW;IACX;GACD;IACC,IAAI;IACJ,MAAM;IACN,KAAK;IACL,WAAW;IACX,OAAO,CAAC,OAAO;IACf,MAAM;KAAE,OAAO;KAAK,QAAQ;KAAK,WAAW;KAAM,YAAY;KAAK;IACnE,eAAe;IACf,WAAW;IACX;GACD;IACC,IAAI;IACJ,MAAM;IACN,KAAK;IACL,WAAW;IACX,OAAO,CAAC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AAY;GACZ;EACD,UAAU,EAAE;EACZ,SAAS;GACR,MAAM,QAAQ;GACd,MAAM;GACN,MAAM;GACN,WAAW;IACV,SAAS;IAET,GAAI,WAAW,EAAE,mBAAmB,MAAM,GAAG,EAAE;IAG/C,GAAI,gBAAgB,aACjB,EAAE,gBAAgB,CAAC,oBAAoB,QAAQ,cAAc,EAAE,GAC/D,EAAE;IACL;GACD,MAAM;IACL,MAAM;IACN,OAAO;IACP,GAAI,WAAW,EAAE,GAAG,EAAE,gBAAgB,MAAM;IAC5C;GAED,GAAI,WAAW,EAAE,GAAG,EAAE,WAAW;IAAE,MAAM;IAAS,aAAa;IAAM,EAAE;GACvE,OAAO,EACN,cAAc;IAAC;IAAe;IAAe;IAAgB,EAC7D;GACD;EACD,QAAQ;GACP,SAAS,EAAE,aAAa,QAAQ;GAChC,MAAM,EACL,OAAO,MACP;GACD,GAAI,OAAO,KAAK,cAAc,CAAC,SAAS,IAAI,EAAE,SAAS,eAAe,GAAG,EAAE;GAC3E;EACD,SAAS;GACR,SAAS;GACT,SAAS;IACR,UAAU,EAAE,SAAS,MAAM;IAC3B,UAAU,EAAE,SAAS,MAAM;IAC3B,SAAS,EAAE,SAAS,MAAM;IAC1B,eAAe,EAAE,SAAS,MAAM;IAChC;GACD;EACD;AAED,QAAO,KAAK,UAAU,QAAQ,MAAM,EAAE"}
|
|
1
|
+
{"version":3,"file":"openclaw-json.cjs","names":[],"sources":["../../src/generators/openclaw-json.ts"],"sourcesContent":["import type { AiProvider, DeploymentType, ResolverOutput } from \"../types.js\";\n\nexport interface OpenClawConfigOptions {\n\tdeploymentType: DeploymentType;\n\tgatewayPort: number;\n\topenclawVersion: string;\n}\n\nconst PROVIDER_CONFIGS: Record<AiProvider, any> = {\n\topenai: {\n\t\tbaseUrl: \"https://api.openai.com/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${OPENAI_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"gpt-5\",\n\t\t\t\tname: \"GPT-5\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 2.5, output: 10, cacheRead: 1.25, cacheWrite: 2.5 },\n\t\t\t\tcontextWindow: 128000,\n\t\t\t\tmaxTokens: 16384,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"o4-mini\",\n\t\t\t\tname: \"o4-mini\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 1.1, output: 4.4, cacheRead: 0.55, cacheWrite: 1.1 },\n\t\t\t\tcontextWindow: 200000,\n\t\t\t\tmaxTokens: 100000,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"gpt-5-mini\",\n\t\t\t\tname: \"GPT-5 Mini\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 0.15, output: 0.6, cacheRead: 0.075, cacheWrite: 0.15 },\n\t\t\t\tcontextWindow: 128000,\n\t\t\t\tmaxTokens: 16384,\n\t\t\t},\n\t\t],\n\t},\n\tanthropic: {\n\t\tbaseUrl: \"https://api.anthropic.com/v1/messages\",\n\t\tapi: \"anthropic-messages\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${ANTHROPIC_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"claude-opus-4-6\",\n\t\t\t\tname: \"Claude 4.6 Opus\",\n\t\t\t\tapi: \"anthropic-messages\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 15.0, output: 75.0, cacheRead: 1.5, cacheWrite: 18.75 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 128000,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"claude-sonnet-4-6\",\n\t\t\t\tname: \"Claude 4.6 Sonnet\",\n\t\t\t\tapi: \"anthropic-messages\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 3.0, output: 15.0, cacheRead: 0.3, cacheWrite: 3.75 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 128000,\n\t\t\t},\n\t\t],\n\t},\n\tgoogle: {\n\t\tbaseUrl: \"https://generativelanguage.googleapis.com/v1beta/openai\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${GOOGLE_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"gemini-3.1-pro-preview\",\n\t\t\t\tname: \"Gemini 3.1 Pro\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 2.0, output: 8.0, cacheRead: 0.5, cacheWrite: 2.0 },\n\t\t\t\tcontextWindow: 2000000,\n\t\t\t\tmaxTokens: 8192,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"gemini-3-flash-preview\",\n\t\t\t\tname: \"Gemini 3 Flash\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 0.15, output: 0.6, cacheRead: 0.0375, cacheWrite: 0.15 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 8192,\n\t\t\t},\n\t\t],\n\t},\n\txai: {\n\t\tbaseUrl: \"https://api.x.ai/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${XAI_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"grok-4-fast\",\n\t\t\t\tname: \"Grok 4 Fast\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 2.0, output: 10.0, cacheRead: 1.0, cacheWrite: 2.0 },\n\t\t\t\tcontextWindow: 256000,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t],\n\t},\n\tdeepseek: {\n\t\tbaseUrl: \"https://api.deepseek.com/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${DEEPSEEK_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"deepseek-chat\",\n\t\t\t\tname: \"DeepSeek V3\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0.14, output: 0.28, cacheRead: 0.014, cacheWrite: 0.14 },\n\t\t\t\tcontextWindow: 65536,\n\t\t\t\tmaxTokens: 8192,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"deepseek-reasoner\",\n\t\t\t\tname: \"DeepSeek R1\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0.55, output: 2.19, cacheRead: 0.14, cacheWrite: 0.55 },\n\t\t\t\tcontextWindow: 65536,\n\t\t\t\tmaxTokens: 8192,\n\t\t\t},\n\t\t],\n\t},\n\tgroq: {\n\t\tbaseUrl: \"https://api.groq.com/openai/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${GROQ_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"llama-4-maverick\",\n\t\t\t\tname: \"LLaMA 4 Maverick (Groq)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 0.59, output: 0.79 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t],\n\t},\n\topenrouter: {\n\t\tbaseUrl: \"https://openrouter.ai/api/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${OPENROUTER_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"anthropic/claude-opus-4-6\",\n\t\t\t\tname: \"Claude 4.6 Opus (OpenRouter)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 15.0, output: 75.0 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 128000,\n\t\t\t},\n\t\t],\n\t},\n\tmistral: {\n\t\tbaseUrl: \"https://api.mistral.ai/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${MISTRAL_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"mistral-large-latest\",\n\t\t\t\tname: \"Mistral Large\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 2.0, output: 6.0 },\n\t\t\t\tcontextWindow: 131000,\n\t\t\t\tmaxTokens: 8192,\n\t\t\t},\n\t\t],\n\t},\n\ttogether: {\n\t\tbaseUrl: \"https://api.together.xyz/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${TOGETHER_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8\", // \"meta-llama/Llama-4-Maverick-Instruct-Turbo\",\n\t\t\t\tname: \"LLaMA 4 Maverick (Together)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 0.88, output: 0.88 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t],\n\t},\n\tollama: {\n\t\tbaseUrl: null, // dynamic: resolved at generation time based on deployment type\n\t\tapi: \"openai-completions\",\n\t\tauth: \"none\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"llama3:latest\",\n\t\t\t\tname: \"LLaMA 3 (Local)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 8192,\n\t\t\t\tmaxTokens: 4096,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"deepseek-r1:latest\",\n\t\t\t\tname: \"DeepSeek R1 (Local)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: true,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 8192,\n\t\t\t\tmaxTokens: 4096,\n\t\t\t},\n\t\t],\n\t},\n\t\"ollama-cloud\": {\n\t\tbaseUrl: \"https://ollama.com/v1\",\n\t\tapi: \"openai-completions\",\n\t\tauth: \"api-key\",\n\t\tapiKey: \"${OLLAMA_API_KEY}\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"qwen3.5:397b-cloud\",\n\t\t\t\tname: \"Qwen 3.5 397B (Cloud)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 131072,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"glm-5:cloud\",\n\t\t\t\tname: \"GLM-5 (Cloud)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 131072,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"minimax-m2.5:cloud\",\n\t\t\t\tname: \"MiniMax M2.5 (Cloud)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 131072,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"kimi-k2.5:cloud\",\n\t\t\t\tname: \"Kimi K2.5 (Cloud)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 131072,\n\t\t\t\tmaxTokens: 32768,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"gemini-3-flash-preview:cloud\",\n\t\t\t\tname: \"Gemini 3 Flash (Cloud)\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\", \"image\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 1000000,\n\t\t\t\tmaxTokens: 8192,\n\t\t\t},\n\t\t],\n\t},\n\tlmstudio: {\n\t\tbaseUrl: null, // dynamic: resolved at generation time based on deployment type\n\t\tapi: \"openai-completions\",\n\t\tauth: \"none\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"local-model\",\n\t\t\t\tname: \"LM Studio Model\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 8192,\n\t\t\t\tmaxTokens: 4096,\n\t\t\t},\n\t\t],\n\t},\n\tvllm: {\n\t\tbaseUrl: null, // dynamic: resolved at generation time based on deployment type\n\t\tapi: \"openai-completions\",\n\t\tauth: \"none\",\n\t\tmodels: [\n\t\t\t{\n\t\t\t\tid: \"local-model\",\n\t\t\t\tname: \"vLLM Model\",\n\t\t\t\tapi: \"openai-completions\",\n\t\t\t\treasoning: false,\n\t\t\t\tinput: [\"text\"],\n\t\t\t\tcost: { input: 0, output: 0 },\n\t\t\t\tcontextWindow: 8192,\n\t\t\t\tmaxTokens: 4096,\n\t\t\t},\n\t\t],\n\t},\n};\n\n/** Default ports for local inference providers (ollama, lmstudio, vllm). */\nconst LOCAL_PROVIDER_PORTS: Record<string, number> = {\n\tollama: 11434,\n\tlmstudio: 1234,\n\tvllm: 8000,\n};\n\n/**\n * Generates a default `openclaw/config/openclaw.json` tailored\n * to the services installed in the stack.\n */\nexport function generateOpenClawConfig(\n\tresolved: ResolverOutput,\n\toptions: OpenClawConfigOptions,\n): string {\n\tconst isDocker = options.deploymentType === \"docker\";\n\t// Docker containers reach host services via host.docker.internal; bare-metal uses localhost\n\tconst localInferenceHost = isDocker ? \"host.docker.internal\" : \"localhost\";\n\t// Docker: bind to all interfaces (0.0.0.0) so port mapping works from host\n\t// Bare-metal/local: bind to loopback (127.0.0.1) for security, Tailscale can expose if needed\n\tconst gatewayBind = isDocker ? \"lan\" : \"loopback\";\n\tconst defaultSkills: Record<string, { enabled: boolean }> = {};\n\n\t// Auto-enable any OpenClaw skills attached to installed companion services\n\tfor (const { definition } of resolved.services) {\n\t\tfor (const skill of definition.skills) {\n\t\t\tif (skill.autoInstall) {\n\t\t\t\tdefaultSkills[skill.skillId] = { enabled: true };\n\t\t\t}\n\t\t}\n\t}\n\n\tconst providers: Record<string, any> = {};\n\tconst agentsModels: Record<string, { alias: string }> = {};\n\tlet primaryModel = \"\";\n\n\t// Always default to empty or the first choice, fallback to openai if nothing was passed\n\tconst selectedProviders =\n\t\tresolved.aiProviders && resolved.aiProviders.length > 0\n\t\t\t? resolved.aiProviders\n\t\t\t: ([\"openai\"] as AiProvider[]);\n\n\tfor (const provider of selectedProviders) {\n\t\tconst meta = PROVIDER_CONFIGS[provider];\n\t\tif (!meta) continue;\n\n\t\t// Local inference providers have null baseUrl — resolve dynamically based on deployment type\n\t\tconst baseUrl =\n\t\t\tmeta.baseUrl ?? `http://${localInferenceHost}:${LOCAL_PROVIDER_PORTS[provider] ?? 8000}/v1`;\n\n\t\tproviders[provider] = {\n\t\t\tbaseUrl,\n\t\t\tapi: meta.api,\n\t\t\tauth: meta.auth,\n\t\t\t...(meta.apiKey ? { apiKey: meta.apiKey } : {}),\n\t\t\tmodels: meta.models,\n\t\t};\n\n\t\tfor (const m of meta.models) {\n\t\t\tconst fullId = `${provider}/${m.id}`;\n\t\t\tagentsModels[fullId] = { alias: m.name };\n\t\t\tif (!primaryModel) primaryModel = fullId; // Use the very first model mapped as the global system default\n\t\t}\n\t}\n\n\tconst authProfiles: Record<string, any> = {\n\t\t\"local:default\": {\n\t\t\tprovider: \"local\",\n\t\t\tmode: \"token\",\n\t\t},\n\t};\n\n\t// Add provider auth profiles too\n\tfor (const provider of Object.keys(providers)) {\n\t\tauthProfiles[`${provider}:default`] = {\n\t\t\tprovider: provider,\n\t\t\tmode: \"api_key\",\n\t\t};\n\t}\n\n\tconst config = {\n\t\tmeta: {\n\t\t\tlastTouchedVersion: options.openclawVersion,\n\t\t\tlastTouchedAt: new Date().toISOString(),\n\t\t},\n\t\tenv: {\n\t\t\tshellEnv: {\n\t\t\t\tenabled: true,\n\t\t\t},\n\t\t\tvars: {},\n\t\t},\n\t\twizard: {\n\t\t\tlastRunAt: new Date().toISOString(),\n\t\t\tlastRunVersion: options.openclawVersion,\n\t\t\tlastRunCommand: \"auto-generated-by-better-openclaw\",\n\t\t\tlastRunMode: \"local\",\n\t\t},\n\t\tlogging: {\n\t\t\tredactSensitive: \"tools\",\n\t\t},\n\t\tupdate: {\n\t\t\tcheckOnStart: true,\n\t\t},\n\t\tauth: {\n\t\t\tprofiles: authProfiles,\n\t\t},\n\t\tmodels: {\n\t\t\tmode: \"merge\",\n\t\t\tproviders,\n\t\t},\n\t\tagents: {\n\t\t\tdefaults: {\n\t\t\t\tmodel: {\n\t\t\t\t\tprimary: primaryModel,\n\t\t\t\t},\n\t\t\t\tmodels: agentsModels,\n\t\t\t\tworkspace: isDocker ? \"/home/node/.openclaw/workspace\" : \"./workspace\",\n\t\t\t\tcompaction: { mode: \"safeguard\" },\n\t\t\t\tmaxConcurrent: 4,\n\t\t\t\tsubagents: {\n\t\t\t\t\tmaxConcurrent: 8,\n\t\t\t\t\t// Allow spawning sub-agents under any agent ID (essential for swarm collaboration)\n\t\t\t\t\tallowAgents: [\"*\"],\n\t\t\t\t},\n\t\t\t\t// Sandbox defaults for agent exec isolation\n\t\t\t\t...(isDocker\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tsandbox: {\n\t\t\t\t\t\t\t\tdocker: {\n\t\t\t\t\t\t\t\t\tcontainerPrefix: \"openclaw-sandbox\",\n\t\t\t\t\t\t\t\t\tworkdir: \"/workspace\",\n\t\t\t\t\t\t\t\t\treadOnlyRoot: true,\n\t\t\t\t\t\t\t\t\tnetwork: \"none\",\n\t\t\t\t\t\t\t\t\tcapDrop: [\"ALL\"],\n\t\t\t\t\t\t\t\t\tpidsLimit: 256,\n\t\t\t\t\t\t\t\t\tmemory: \"512m\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tbrowser: {\n\t\t\t\t\t\t\t\t\tenabled: false,\n\t\t\t\t\t\t\t\t\tautoStart: false,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t},\n\t\t},\n\t\tmessages: {\n\t\t\tackReactionScope: \"group-mentions\",\n\t\t},\n\t\tcommands: {\n\t\t\tnative: \"auto\",\n\t\t\tnativeSkills: \"auto\",\n\t\t},\n\t\tcron: {\n\t\t\tenabled: true,\n\t\t},\n\t\thooks: {\n\t\t\tinternal: {\n\t\t\t\tenabled: true,\n\t\t\t\tentries: {\n\t\t\t\t\t\"boot-md\": { enabled: true },\n\t\t\t\t\t\"bootstrap-extra-files\": { enabled: true },\n\t\t\t\t\t\"command-logger\": { enabled: true },\n\t\t\t\t\t\"session-memory\": { enabled: true },\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tweb: {\n\t\t\tenabled: true,\n\t\t},\n\t\tdiscovery: {\n\t\t\twideArea: {\n\t\t\t\tenabled: true,\n\t\t\t},\n\t\t\t// mDNS/Bonjour for local-network instance discovery (swarm auto-discovery)\n\t\t\t// \"minimal\" hides sensitive metadata; \"full\" exposes cliPath/sshPort for easier discovery\n\t\t\tmdns: {\n\t\t\t\tmode: isDocker ? \"off\" : \"minimal\",\n\t\t\t},\n\t\t},\n\t\tcanvasHost: {\n\t\t\tenabled: true,\n\t\t\tliveReload: true,\n\t\t},\n\t\tchannels: {},\n\t\t// Node host config — controls how this instance exposes services to other gateway nodes\n\t\tnodeHost: {\n\t\t\tbrowserProxy: {\n\t\t\t\tenabled: true,\n\t\t\t},\n\t\t},\n\t\tgateway: {\n\t\t\tport: options.gatewayPort,\n\t\t\tmode: \"local\",\n\t\t\tbind: gatewayBind,\n\t\t\tcontrolUi: {\n\t\t\t\tenabled: true,\n\t\t\t\t// Docker NAT makes browser connections appear external — skip device pairing, use token-only auth\n\t\t\t\t...(isDocker ? { allowInsecureAuth: true } : {}),\n\t\t\t\t// Non-loopback binds need explicit origin allowlist for control UI CORS\n\t\t\t\t// Reference: docker-setup.sh ensure_control_ui_allowed_origins()\n\t\t\t\t...(gatewayBind !== \"loopback\"\n\t\t\t\t\t? { allowedOrigins: [`http://127.0.0.1:${options.gatewayPort}`] }\n\t\t\t\t\t: {}),\n\t\t\t},\n\t\t\tauth: {\n\t\t\t\tmode: \"token\",\n\t\t\t\ttoken: \"${OPENCLAW_GATEWAY_TOKEN}\",\n\t\t\t\t...(isDocker ? {} : { allowTailscale: true }),\n\t\t\t},\n\t\t\t// Tailscale serve only works on bare-metal/local (not inside Docker containers)\n\t\t\t...(isDocker ? {} : { tailscale: { mode: \"serve\", resetOnExit: true } }),\n\t\t\treload: {\n\t\t\t\tmode: \"hybrid\",\n\t\t\t},\n\t\t\thttp: {\n\t\t\t\tendpoints: {\n\t\t\t\t\tchatCompletions: { enabled: false },\n\t\t\t\t\tresponses: { enabled: false },\n\t\t\t\t},\n\t\t\t},\n\t\t\tnodes: {\n\t\t\t\tbrowser: {\n\t\t\t\t\t// \"auto\" lets gateway pick best node for browser proxying; \"manual\" pins to specific node\n\t\t\t\t\tmode: \"auto\",\n\t\t\t\t},\n\t\t\t\t// Allowlist/denylist for node.invoke commands across the swarm\n\t\t\t\tallowCommands: [],\n\t\t\t\tdenyCommands: [\"camera.snap\", \"camera.clip\", \"screen.record\"],\n\t\t\t},\n\t\t\t// Remote gateway connection — enables this instance to connect to another OpenClaw gateway\n\t\t\t// Configure for swarm topologies: each instance can connect to one upstream gateway\n\t\t\t// Transport: \"direct\" = WebSocket (ws/wss), \"ssh\" = SSH tunnel for secure remote access\n\t\t\tremote: {\n\t\t\t\t// url: \"wss://gateway.example.com:18789\", // Remote gateway WebSocket URL\n\t\t\t\ttransport: \"direct\",\n\t\t\t\t// token: \"${OPENCLAW_REMOTE_GATEWAY_TOKEN}\", // Auth token for the remote gateway\n\t\t\t\t// sshTarget: \"user@gateway-host\", // For SSH tunnel transport\n\t\t\t\t// sshIdentity: \"~/.ssh/id_ed25519\", // SSH key for tunnel\n\t\t\t\t// tlsFingerprint: \"\", // Pin remote gateway TLS cert (sha256)\n\t\t\t},\n\t\t\tchannelHealthCheckMinutes: 5,\n\t\t},\n\t\tbrowser: {\n\t\t\tenabled: true,\n\t\t\t// WSL2 users may need relayBindHost: \"0.0.0.0\" for cross-namespace access\n\t\t\t...(isDocker ? {} : { relayBindHost: \"127.0.0.1\" }),\n\t\t},\n\t\tskills: {\n\t\t\tinstall: { nodeManager: \"pnpm\" },\n\t\t\tload: {\n\t\t\t\twatch: true,\n\t\t\t},\n\t\t\t...(Object.keys(defaultSkills).length > 0 ? { entries: defaultSkills } : {}),\n\t\t},\n\t\t// ACP (Agent Client Protocol) — external agents can connect to the gateway\n\t\t// Disabled by default; enable when using ACP-compatible agents (e.g. acpx)\n\t\tacp: {\n\t\t\tenabled: false,\n\t\t\tdispatch: { enabled: false },\n\t\t\tmaxConcurrentSessions: 4,\n\t\t\tstream: {\n\t\t\t\tdeliveryMode: \"live\",\n\t\t\t\trepeatSuppression: true,\n\t\t\t},\n\t\t\truntime: {\n\t\t\t\tttlMinutes: 30,\n\t\t\t},\n\t\t},\n\t\t// Tools configuration — web search, fetch, exec security, loop detection\n\t\ttools: {\n\t\t\tweb: {\n\t\t\t\tsearch: {\n\t\t\t\t\t// Enabled when a search API key is available (BRAVE_API_KEY, etc.)\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tprovider: \"brave\",\n\t\t\t\t\tmaxResults: 5,\n\t\t\t\t\ttimeoutSeconds: 10,\n\t\t\t\t\tcacheTtlMinutes: 60,\n\t\t\t\t},\n\t\t\t\tfetch: {\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tmaxChars: 30000,\n\t\t\t\t\ttimeoutSeconds: 15,\n\t\t\t\t\tcacheTtlMinutes: 30,\n\t\t\t\t\treadability: true,\n\t\t\t\t},\n\t\t\t},\n\t\t\texec: {\n\t\t\t\t// Docker: sandbox exec inside a nested container; bare-metal: deny by default\n\t\t\t\thost: isDocker ? \"sandbox\" : \"gateway\",\n\t\t\t\tsecurity: \"allowlist\",\n\t\t\t\task: \"on-miss\",\n\t\t\t\tbackgroundMs: 30000,\n\t\t\t\ttimeoutSec: 300,\n\t\t\t},\n\t\t\t// Filesystem path guards\n\t\t\tfs: {\n\t\t\t\t// In Docker the workspace is already isolated; on bare-metal restrict to workspace\n\t\t\t\tworkspaceOnly: !isDocker,\n\t\t\t},\n\t\t\t// Prevent stuck tool-call loops\n\t\t\tloopDetection: {\n\t\t\t\tenabled: true,\n\t\t\t\thistorySize: 30,\n\t\t\t\twarningThreshold: 10,\n\t\t\t\tcriticalThreshold: 20,\n\t\t\t\tglobalCircuitBreakerThreshold: 30,\n\t\t\t},\n\t\t\tsessions: {\n\t\t\t\tvisibility: \"tree\",\n\t\t\t},\n\t\t\t// Agent-to-agent messaging — allows agents to invoke each other at runtime\n\t\t\t// Essential for swarm architectures where multiple OpenClaw instances collaborate\n\t\t\tagentToAgent: {\n\t\t\t\tenabled: true,\n\t\t\t\t// Allowlist of agent IDs or patterns that can be reached; \"*\" = any agent\n\t\t\t\tallow: [\"*\"],\n\t\t\t},\n\t\t},\n\t\t// Session-level agent-to-agent safety limits\n\t\tsession: {\n\t\t\tagentToAgent: {\n\t\t\t\t// Max ping-pong turns between requester and target agent (prevents infinite loops)\n\t\t\t\tmaxPingPongTurns: 5,\n\t\t\t},\n\t\t},\n\t\t// Memory — vector search over session history and markdown notes\n\t\tmemory: {\n\t\t\tbackend: \"builtin\",\n\t\t\tcitations: \"auto\",\n\t\t},\n\t\t// UI customization\n\t\tui: {\n\t\t\tassistant: {\n\t\t\t\tname: \"OpenClaw\",\n\t\t\t},\n\t\t},\n\t\t// Media retention\n\t\tmedia: {\n\t\t\tpreserveFilenames: true,\n\t\t\tttlHours: 168, // 7 days\n\t\t},\n\t\tplugins: {\n\t\t\tenabled: true,\n\t\t\tentries: {\n\t\t\t\ttelegram: { enabled: true },\n\t\t\t\twhatsapp: { enabled: true },\n\t\t\t\tdiscord: { enabled: true },\n\t\t\t\t\"memory-core\": { enabled: true },\n\t\t\t},\n\t\t},\n\t};\n\n\treturn JSON.stringify(config, null, 2);\n}\n"],"mappings":";;AAQA,MAAM,mBAA4C;CACjD,QAAQ;EACP,SAAS;EACT,KAAK;EACL,MAAM;EACN,QAAQ;EACR,QAAQ;GACP;IACC,IAAI;IACJ,MAAM;IACN,KAAK;IACL,WAAW;IACX,OAAO,CAAC,QAAQ,QAAQ;IACxB,MAAM;KAAE,OAAO;KAAK,QAAQ;KAAI,WAAW;KAAM,YAAY;KAAK;IAClE,eAAe;IACf,WAAW;IACX;GACD;IACC,IAAI;IACJ,MAAM;IACN,KAAK;IACL,WAA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