


























@@ -11,6 +11,15 @@ const JSZip = requireFromApp("jszip");
1111const packageName = "@openclaw/kitchen-sink";
1212const pluginId = "openclaw-kitchen-sink-fixture";
131314+const buildClawPackSummary = ({ sha256hash, manifestSha256, size }) => ({
15+available: true,
16+specVersion: 1,
17+format: "clawpack.zip",
18+sha256: sha256hash,
19+ size,
20+ manifestSha256,
21+});
22+1423const profiles = {
1524"kitchen-sink-plugin": {
1625version: "0.1.3",
@@ -87,7 +96,8 @@ export default definePluginEntry({
8796properties: {},
8897},
8998},
90-packageDetail(sha256hash) {
99+packageDetail(artifact) {
100+const clawpack = buildClawPackSummary(artifact);
91101const packageDetail = {
92102package: {
93103name: packageName,
@@ -121,6 +131,7 @@ export default definePluginEntry({
121131hasProvenance: false,
122132scanStatus: "passed",
123133},
134+ clawpack,
124135},
125136};
126137return {
@@ -136,10 +147,11 @@ export default definePluginEntry({
136147createdAt: 0,
137148changelog: "Fixture package for kitchen-sink plugin prerelease CI.",
138149distTags: ["latest"],
139- sha256hash,
150+sha256hash: artifact.sha256hash,
140151compatibility: packageDetail.package.compatibility,
141152capabilities: packageDetail.package.capabilities,
142153verification: packageDetail.package.verification,
154+ clawpack,
143155},
144156},
145157betaStatus: 404,
@@ -191,11 +203,12 @@ export default definePluginEntry({
191203properties: {},
192204},
193205},
194-packageDetail(sha256hash) {
206+packageDetail(artifact) {
195207const compatibility = {
196208pluginApiRange: ">=2026.4.26",
197209minGatewayVersion: "2026.4.26",
198210};
211+const clawpack = buildClawPackSummary(artifact);
199212return {
200213packageDetail: {
201214package: {
@@ -209,15 +222,17 @@ export default definePluginEntry({
209222createdAt: 0,
210223updatedAt: 0,
211224 compatibility,
225+ clawpack,
212226},
213227},
214228versionDetail: {
215229version: {
216230version: this.version,
217231createdAt: 0,
218232changelog: "Kitchen-sink fixture package for Docker plugin E2E.",
219- sha256hash,
233+sha256hash: artifact.sha256hash,
220234 compatibility,
235+ clawpack,
221236},
222237},
223238};
@@ -237,13 +252,17 @@ async function main() {
237252date: new Date(0),
238253});
239254zip.file("package/index.js", fixture.indexJs, { date: new Date(0) });
240-zip.file("package/openclaw.plugin.json", `${JSON.stringify(fixture.manifest, null, 2)}\n`, {
241-date: new Date(0),
242-});
255+const manifestJson = `${JSON.stringify(fixture.manifest, null, 2)}\n`;
256+zip.file("package/openclaw.plugin.json", manifestJson, { date: new Date(0) });
243257244258const archive = await zip.generateAsync({ type: "nodebuffer", compression: "DEFLATE" });
245259const sha256hash = crypto.createHash("sha256").update(archive).digest("hex");
246-const { packageDetail, versionDetail, betaStatus } = fixture.packageDetail(sha256hash);
260+const manifestSha256 = crypto.createHash("sha256").update(manifestJson).digest("hex");
261+const { packageDetail, versionDetail, betaStatus } = fixture.packageDetail({
262+ sha256hash,
263+ manifestSha256,
264+size: archive.length,
265+});
247266248267const json = (response, value, status = 200) => {
249268response.writeHead(status, { "content-type": "application/json" });
@@ -283,6 +302,19 @@ async function main() {
283302response.end(archive);
284303return;
285304}
305+if (
306+url.pathname ===
307+`/api/v1/packages/${encodeURIComponent(packageName)}/versions/${fixture.version}/clawpack`
308+) {
309+response.writeHead(200, {
310+"content-type": "application/zip",
311+"content-length": String(archive.length),
312+"X-ClawHub-ClawPack-Sha256": sha256hash,
313+"X-ClawHub-ClawPack-Spec-Version": "1",
314+});
315+response.end(archive);
316+return;
317+}
286318response.writeHead(404, { "content-type": "text/plain" });
287319response.end(`not found: ${url.pathname}`);
288320});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。