Prepare trusted ClawHub publishing - #59
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Prepares a trusted ClawHub publishing path while preserving the canonical npm, plugin, channel, and state identities.
Changes:
- Adds ClawHub metadata and canonical-package validation.
- Builds and tests
openclaw-wechatClawPacks from npm tarballs. - Adds protected OIDC publishing and bilingual release documentation.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/clawhub-publish.yml |
Adds dry-run and protected publishing jobs. |
CHANGELOG.md |
Documents the change in Chinese. |
CHANGELOG_EN.md |
Documents the change in English. |
CONTRIBUTING.md |
Adds ClawPack validation instructions. |
RELEASE.md |
Documents bootstrap, publishing, and recovery. |
docs/site/.vitepress/docs.mjs |
Updates release-guide metadata. |
index.ts |
Aligns runtime presentation metadata. |
openclaw.plugin.json |
Adds ClawHub display metadata. |
package.json |
Adds compatibility and build metadata. |
scripts/check-package.mjs |
Strengthens package identity checks. |
scripts/clawhub-workflow.test.mjs |
Tests workflow security constraints. |
scripts/package-variant.mjs |
Implements validated package variants. |
scripts/prepare-clawhub-package.mjs |
Builds the ClawHub package variant. |
scripts/prepare-clawhub-package.test.mjs |
Tests ClawPack conversion and identity. |
scripts/prepare-github-package.mjs |
Reuses canonical manifest helpers. |
src/compat.test.ts |
Tests compatibility and display metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.
Suppressed comments (2)
scripts/prepare-clawhub-package.test.mjs:119
- This exercises extraction only with an npm-generated safe archive, so the new empty-archive and unsafe-path rejection boundary is untested. Add crafted archives containing absolute and traversal entries, assert rejection, and verify no file is written outside the extraction root.
mkdirSync(join(packageDirectory, "dist"));
scripts/prepare-clawhub-package.test.mjs:111
- The successful test only passes the tarball path, while the production workflow passes the containing directory. This leaves the directory-resolution branch—including the exactly-one-archive invariant—uncovered. Add a success case for a directory with one
.tgzand rejection cases for zero and multiple archives.
additionalProperties: false,
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
协作备注(审阅视角,非合并)先看了已发的 v3.1.0:SDK 再看本 PR(ClawHub trusted publishing)整体方向我认可,几处关键设计也踩对了: 认同的点
CI(含 ClawHub dry-run、双宿主矩阵)目前也是绿的。 小建议(非 blocker)
我这边没有看到会破坏现有 |
Summary
openclaw-weixinnpm package, plugin ID, channel ID, and state identityopenclaw-wechatClawPack only from the canonical npm tarball, retaining the npm fallback and source provenanceclawhub-publishenvironmentValidation
npm run checknpm run pack:check2026.6.1and2026.7.1typecheck, build, fresh-process SDK boundary, and plugin/channel registration smoke checks0.23.3validation: pass with zero breakages and warningsopenclaw-wechat@3.1.0,code-plugin, 92 filesMaintainer setup
Before binding the trusted publisher, create and protect the
clawhub-publishGitHub environment with administrator approval and deployment limited tov*tags. The first ClawHub publication must be performed manually from the next formal release tag containing this change; existing tags, includingv3.1.0, must not be reused. After that bootstrap publication, bindopenclaw-wechattoclawhub-publish.ymland theclawhub-publishenvironment. No long-livedCLAWHUB_TOKENis required.