fix(ci): install plugin manifests into dist extensions

Copy each upstream extension manifest into dist/extensions during gateway
install. The current package output ships JS bundles there but leaves
openclaw.plugin.json only under extensions/, so plugin discovery fails at
runtime and gateway send tests see channels like slack as unsupported.

Tests:
- sh -n nix/scripts/gateway-install.sh
- nix build .#openclaw-gateway --accept-flake-config (running locally to verify output)
This commit is contained in:
joshp123 2026-04-09 22:54:45 +02:00
parent cfa94476f5
commit 9a7eb2cb64

View File

@ -45,6 +45,19 @@ if [ -d extensions ]; then
log_step "copy extensions" cp -r extensions "$out/lib/openclaw/"
fi
# Gateway plugin discovery looks under dist/extensions/*/openclaw.plugin.json.
# Upstream's build emits JS into dist/extensions but leaves manifests in extensions/.
if [ -d "$out/lib/openclaw/extensions" ] && [ -d "$out/lib/openclaw/dist/extensions" ]; then
for manifest in "$out/lib/openclaw/extensions"/*/openclaw.plugin.json; do
[ -f "$manifest" ] || continue
name="$(basename "$(dirname "$manifest")")"
dist_ext="$out/lib/openclaw/dist/extensions/$name"
if [ -d "$dist_ext" ] && [ ! -f "$dist_ext/openclaw.plugin.json" ]; then
cp "$manifest" "$dist_ext/openclaw.plugin.json"
fi
done
fi
if [ -d docs/reference/templates ]; then
mkdir -p "$out/lib/openclaw/docs/reference"
log_step "copy reference templates" cp -r docs/reference/templates "$out/lib/openclaw/docs/reference/"