惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
IT之家
IT之家
博客园_首页
博客园 - 【当耐特】
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Recent Announcements
Recent Announcements
F
Fortinet All Blogs
GbyAI
GbyAI
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ
H
Help Net Security
T
Tailwind CSS Blog
B
Blog RSS Feed
Martin Fowler
Martin Fowler
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
博客园 - 叶小钗
雷峰网
雷峰网
量子位

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(clawhub): accept live artifact resolver field aliases...
RomneyDa · 2026-05-04 · via Recent Commits to openclaw:main

@@ -51,10 +51,12 @@ vi.mock("../infra/archive.js", async () => {

5151

});

52525353

const { ClawHubRequestError } = await import("../infra/clawhub.js");

54+

type ClawHubResolvedArtifact = import("../infra/clawhub.js").ClawHubResolvedArtifact;

5455

const { CLAWHUB_INSTALL_ERROR_CODE, formatClawHubSpecifier, installPluginFromClawHub } =

5556

await import("./clawhub.js");

56575758

const DEMO_ARCHIVE_INTEGRITY = "sha256-qerEjGEpvES2+Tyan0j2xwDRkbcnmh4ZFfKN9vWbsa8=";

59+

const DEMO_ARCHIVE_SHA256 = "a9eac48c6129bc44b6f93c9a9f48f6c700d191b7279a1e1915f28df6f59bb1af";

5860

const DEMO_CLAWPACK_SHA256 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";

5961

const DEMO_CLAWPACK_INTEGRITY = `sha256-${Buffer.from(DEMO_CLAWPACK_SHA256, "hex").toString(

6062

"base64",

@@ -463,6 +465,102 @@ describe("installPluginFromClawHub", () => {

463465

);

464466

});

465467468+

it("accepts the live ClawHub artifact resolver shape with kind/sha256 field names", async () => {

469+

fetchClawHubPackageVersionMock.mockClear();

470+

fetchClawHubPackageArtifactMock.mockResolvedValueOnce({

471+

package: {

472+

name: "demo",

473+

displayName: "Demo",

474+

family: "code-plugin",

475+

},

476+

version: "2026.3.22",

477+

artifact: {

478+

kind: "npm-pack",

479+

sha256: DEMO_CLAWPACK_SHA256,

480+

npmIntegrity: "sha512-clawpack",

481+

npmShasum: "1".repeat(40),

482+

} as unknown as ClawHubResolvedArtifact,

483+

});

484+

downloadClawHubPackageArchiveMock.mockResolvedValueOnce({

485+

archivePath: "/tmp/clawhub-demo/demo-2026.3.22.tgz",

486+

integrity: DEMO_CLAWPACK_INTEGRITY,

487+

sha256Hex: DEMO_CLAWPACK_SHA256,

488+

artifact: "clawpack",

489+

clawpackHeaderSha256: DEMO_CLAWPACK_SHA256,

490+

npmIntegrity: "sha512-clawpack",

491+

npmShasum: "1".repeat(40),

492+

cleanup: archiveCleanupMock,

493+

});

494+495+

const result = await installPluginFromClawHub({

496+

spec: "clawhub:demo",

497+

baseUrl: "https://clawhub.ai",

498+

});

499+500+

expect(result).toMatchObject({

501+

ok: true,

502+

clawhub: {

503+

artifactKind: "npm-pack",

504+

artifactFormat: "tgz",

505+

npmIntegrity: "sha512-clawpack",

506+

npmShasum: "1".repeat(40),

507+

clawpackSha256: DEMO_CLAWPACK_SHA256,

508+

},

509+

});

510+

expect(fetchClawHubPackageVersionMock).not.toHaveBeenCalled();

511+

expect(downloadClawHubPackageArchiveMock).toHaveBeenCalledWith(

512+

expect.objectContaining({

513+

artifact: "clawpack",

514+

name: "demo",

515+

version: "2026.3.22",

516+

}),

517+

);

518+

});

519+520+

it("accepts the live ClawHub legacy zip resolver shape with kind/sha256 field names", async () => {

521+

fetchClawHubPackageVersionMock.mockClear();

522+

fetchClawHubPackageArtifactMock.mockResolvedValueOnce({

523+

package: {

524+

name: "demo",

525+

displayName: "Demo",

526+

family: "code-plugin",

527+

},

528+

version: "2026.3.22",

529+

artifact: {

530+

kind: "legacy-zip",

531+

sha256: DEMO_ARCHIVE_SHA256,

532+

} as unknown as ClawHubResolvedArtifact,

533+

});

534+

downloadClawHubPackageArchiveMock.mockResolvedValueOnce({

535+

archivePath: "/tmp/clawhub-demo/archive.zip",

536+

integrity: DEMO_ARCHIVE_INTEGRITY,

537+

cleanup: archiveCleanupMock,

538+

});

539+540+

const result = await installPluginFromClawHub({

541+

spec: "clawhub:demo",

542+

baseUrl: "https://clawhub.ai",

543+

});

544+545+

expect(result).toMatchObject({

546+

ok: true,

547+

pluginId: "demo",

548+

clawhub: {

549+

artifactKind: "legacy-zip",

550+

artifactFormat: "zip",

551+

integrity: DEMO_ARCHIVE_INTEGRITY,

552+

},

553+

});

554+

expect(fetchClawHubPackageVersionMock).not.toHaveBeenCalled();

555+

expect(downloadClawHubPackageArchiveMock).toHaveBeenCalledWith(

556+

expect.objectContaining({

557+

artifact: "archive",

558+

name: "demo",

559+

version: "2026.3.22",

560+

}),

561+

);

562+

});

563+466564

it("falls back to version metadata when the ClawHub artifact resolver route is missing", async () => {

467565

fetchClawHubPackageArtifactMock.mockRejectedValueOnce(

468566

new ClawHubRequestError({