Skip to content

Add required openclaw.build metadata for ClawHub publishing - #3

Merged
Haakam21 merged 1 commit into
mainfrom
missing-plugin-json-error
Jul 22, 2026
Merged

Add required openclaw.build metadata for ClawHub publishing#3
Haakam21 merged 1 commit into
mainfrom
missing-plugin-json-error

Conversation

@Haakam21

Copy link
Copy Markdown
Contributor

Problem

clawhub package publish was failing. Two distinct issues were found:

  1. Manifest-missing error (openclaw.plugin.json is required for plugin packages) — this happened when publishing from a checkout that predated the manifest / had no built dist/. Publishing from up-to-date, built code resolves it.

  2. Missing required package.json field — ClawHub's validator (clawhub's schema/openclawContract.js) requires both openclaw.compat.pluginApi and openclaw.build.openclawVersion for external code plugins. Only the first was present, so publish was rejected with:

    Error: openclaw.build.openclawVersion is required for external code plugins published to ClawHub.
    

Fix

Add the openclaw.build block (openclawVersion + pluginSdkVersion) and compat.minGatewayVersion, pinned to 2026.7.2-beta.3 (the version this plugin builds and tests against).

Verification

Reproduced the failure and confirmed the fix with the real clawhub CLI (clawhub package pack .):

  • Before: Error: openclaw.build.openclawVersion is required ...
  • After: packs cleanly; the produced clawpack contains openclaw.plugin.json, dist/tools/index.js, and dist/channel/index.js.

Note for publishing

ClawHub packs with npm pack --ignore-scripts, so it does not run the build. Publish from a locally-built folder or tarball (npm run plugin:build first), not a raw GitHub ref — otherwise dist/ (gitignored) is absent from the package.

🤖 Generated with Claude Code

ClawHub's package validation requires both openclaw.compat.pluginApi and
openclaw.build.openclawVersion in package.json for external code plugins.
Only the former was present, so `clawhub package publish` rejected the
package with "openclaw.build.openclawVersion is required for external code
plugins published to ClawHub."

Add the openclaw.build block (openclawVersion + pluginSdkVersion) and
compat.minGatewayVersion, pinned to the openclaw version this plugin builds
and tests against.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Haakam21
Haakam21 merged commit ed042a3 into main Jul 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant