



























@@ -6,6 +6,7 @@ import {
66collectPublishablePluginPackages,
77collectChangedExtensionIdsFromPaths,
88collectPublishablePluginPackageErrors,
9+OPENCLAW_PLUGIN_NPM_REPOSITORY_URL,
910parsePluginReleaseArgs,
1011parsePluginReleaseSelection,
1112parsePluginReleaseSelectionMode,
@@ -90,6 +91,10 @@ describe("collectPublishablePluginPackageErrors", () => {
9091packageJson: {
9192name: "@openclaw/zalo",
9293version: "2026.3.15",
94+repository: {
95+type: "git",
96+url: OPENCLAW_PLUGIN_NPM_REPOSITORY_URL,
97+},
9398openclaw: {
9499extensions: ["./index.ts"],
95100release: {
@@ -121,10 +126,32 @@ describe("collectPublishablePluginPackageErrors", () => {
121126).toEqual([
122127'package name must start with "@openclaw/"; found "broken".',
123128"package.json private must not be true.",
129+`package.json repository.url must be "${OPENCLAW_PLUGIN_NPM_REPOSITORY_URL}" so npm provenance can validate GitHub trusted publishing; found "<missing>".`,
124130'package.json version must match YYYY.M.D, YYYY.M.D-N, or YYYY.M.D-beta.N; found "latest".',
125131"openclaw.extensions must contain only non-empty strings.",
126132]);
127133});
134+135+it("requires the GitHub repository URL npm provenance validates for trusted publishing", () => {
136+expect(
137+collectPublishablePluginPackageErrors({
138+extensionId: "twitch",
139+packageDir: bundledPluginRoot("twitch"),
140+packageJson: {
141+name: "@openclaw/twitch",
142+version: "2026.5.1-beta.1",
143+openclaw: {
144+extensions: ["./index.ts"],
145+release: {
146+publishToNpm: true,
147+},
148+},
149+},
150+}),
151+).toEqual([
152+`package.json repository.url must be "${OPENCLAW_PLUGIN_NPM_REPOSITORY_URL}" so npm provenance can validate GitHub trusted publishing; found "<missing>".`,
153+]);
154+});
128155});
129156130157describe("collectPublishablePluginPackages", () => {
@@ -134,6 +161,10 @@ describe("collectPublishablePluginPackages", () => {
134161writeJsonFile(join(repoDir, "extensions", "demo-plugin", "package.json"), {
135162name: "@openclaw/demo-plugin",
136163version: "2026.4.10",
164+repository: {
165+type: "git",
166+url: OPENCLAW_PLUGIN_NPM_REPOSITORY_URL,
167+},
137168openclaw: {
138169extensions: ["./index.ts"],
139170install: {
@@ -164,6 +195,10 @@ describe("collectPublishablePluginPackages", () => {
164195writeJsonFile(join(repoDir, "extensions", "demo-plugin", "package.json"), {
165196name: "@openclaw/demo-plugin",
166197version: "2026.4.10-beta.1",
198+repository: {
199+type: "git",
200+url: OPENCLAW_PLUGIN_NPM_REPOSITORY_URL,
201+},
167202openclaw: {
168203extensions: ["./index.ts"],
169204release: {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。