fix: copy plugin manifests into dist/extensions#81
fix: copy plugin manifests into dist/extensions#81bobberb wants to merge 1 commit intoopenclaw:mainfrom
Conversation
The TypeScript build emits compiled .js files into dist/extensions/*/ but does not copy the openclaw.plugin.json manifests. The gateway discovers plugins by looking for manifests at dist/extensions/*/openclaw.plugin.json, so they were never found. After copying the source extensions/ tree, iterate over its plugin manifests and place them into the corresponding dist/extensions/ directories so the gateway can load them at runtime. Relates to openclaw#6, openclaw#14. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Temporary fork until PR #81 is merged upstream: openclaw/nix-openclaw#81
|
Tested and confirmed this approach works. We independently arrived at the same fix via a NixOS overlay: # overlays/openclaw-fix-manifests.nix
final: prev: {
openclaw-gateway = final.runCommand "openclaw-gateway-fixed" {
inherit (prev.openclaw-gateway) meta;
nativeBuildInputs = [final.gnused];
} ''
cp -r ${prev.openclaw-gateway} $out
chmod -R u+w $out
for ext_dir in $out/lib/openclaw/extensions/*/; do
ext_name=$(basename "$ext_dir")
manifest="$ext_dir/openclaw.plugin.json"
dist_dir="$out/lib/openclaw/dist/extensions/$ext_name"
if [ -f "$manifest" ] && [ -d "$dist_dir" ]; then
cp "$manifest" "$dist_dir/"
fi
done
for wrapper in $out/bin/*; do
if [ -f "$wrapper" ]; then
sed -i "s|${prev.openclaw-gateway}|$out|g" "$wrapper"
fi
done
'';
}With this overlay applied, all 74 plugin manifests land in |
|
Two additional packaging issues found beyond the manifests fix in this PR: 1. Bundled The gateway resolves bundled skills via Result: Gateway supports 2. Wrapper script hardcodes original store path The nix wrapper at exec node /nix/store/<original-hash>-openclaw-gateway-unstable-.../lib/openclaw/dist/index.jsIf you patch the package (e.g., to fix manifests), the wrapper still points to the unpatched original. Any overlay using Our full overlay handling all three issues: #82 (comment) |
|
@Weirdei good to close this one? |
|
This PR should be merged, not closed — it correctly fixes the manifests issue. The two additional packaging problems I mentioned (missing Merging this lets us drop part of our overlay already. |
Temporary fork until PR #81 is merged upstream: openclaw/nix-openclaw#81
Summary
openclaw.plugin.jsonmanifests atdist/extensions/*/openclaw.plugin.json.jsfiles intodist/extensions/*/but does not copy theopenclaw.plugin.jsonmanifests from the sourceextensions/treegateway-install.sh, iterate overextensions/*/openclaw.plugin.jsonand copy each manifest into its correspondingdist/extensions/*/directory so the gateway can discover plugins at runtimeRelates to #6, #14.
Test plan
dist/extensions/*/openclaw.plugin.jsonfiles exist in the output🤖 Generated with Claude Code