From 7cbc79ce52f141ed2de491596eb8785f2448662a Mon Sep 17 00:00:00 2001 From: joshp123 Date: Wed, 6 May 2026 13:08:57 +0200 Subject: [PATCH] Install only bundled plugin manifests The gateway runtime loads built plugins from dist/extensions, so the source extensions tree only needs manifest metadata for compatibility. Copy only openclaw.plugin.json files and assert the memory-core manifest exists in both compatibility and runtime trees. Tests: sh -n nix/scripts/gateway-install.sh nix/scripts/check-package-contents.sh; git diff --check; nix build --dry-run .#checks.aarch64-darwin.package-contents .#checks.x86_64-linux.package-contents --accept-flake-config --- nix/scripts/check-package-contents.sh | 2 ++ nix/scripts/gateway-install.sh | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/nix/scripts/check-package-contents.sh b/nix/scripts/check-package-contents.sh index be26670..c183679 100755 --- a/nix/scripts/check-package-contents.sh +++ b/nix/scripts/check-package-contents.sh @@ -17,6 +17,8 @@ require_path() { require_path "${root}/extensions" require_path "${root}/extensions/memory-core" +require_path "${root}/extensions/memory-core/openclaw.plugin.json" +require_path "${root}/dist/extensions/memory-core/openclaw.plugin.json" require_path "${root}/docs/reference/templates" require_path "${root}/docs/reference/templates/AGENTS.md" require_path "${root}/docs/reference/templates/SOUL.md" diff --git a/nix/scripts/gateway-install.sh b/nix/scripts/gateway-install.sh index 4ec0914..dd777ce 100755 --- a/nix/scripts/gateway-install.sh +++ b/nix/scripts/gateway-install.sh @@ -42,11 +42,24 @@ check_no_broken_symlinks() { rm -f "$broken_tmp" } +copy_extension_manifests() { + if [ ! -d extensions ]; then + return 0 + fi + + mkdir -p "$out/lib/openclaw/extensions" + find extensions -mindepth 2 -maxdepth 2 -name openclaw.plugin.json -type f -print | while IFS= read -r manifest; do + name="$(basename "$(dirname "$manifest")")" + mkdir -p "$out/lib/openclaw/extensions/$name" + cp "$manifest" "$out/lib/openclaw/extensions/$name/openclaw.plugin.json" + done +} + mkdir -p "$out/lib/openclaw" "$out/bin" log_step "copy build outputs" cp -R dist node_modules package.json "$out/lib/openclaw/" if [ -d extensions ]; then - log_step "copy extensions" cp -r extensions "$out/lib/openclaw/" + log_step "copy extension manifests" copy_extension_manifests fi if [ -d skills ]; then log_step "copy bundled skills" cp -r skills "$out/lib/openclaw/"