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

推荐订阅源

美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Martin Fowler
Martin Fowler
雷峰网
雷峰网
IT之家
IT之家
小众软件
小众软件
M
MIT News - Artificial intelligence
博客园 - 聂微东
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
C
Check Point Blog
云风的 BLOG
云风的 BLOG
腾讯CDC
H
Help Net Security
Y
Y Combinator Blog
I
InfoQ

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
perf: prefer bundled plugin dist entries · openclaw/openc...
steipete · 2026-05-29 · via Recent Commits to openclaw:main

@@ -390,6 +390,127 @@ describe("bundled channel entry shape guards", () => {

390390

}

391391

});

392392393+

it("falls back through the cached loader for package-local dist entries needing SDK aliases", async () => {

394+

const root = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-bundled-package-dist-"));

395+

const pluginDir = path.join(root, "extensions", "alpha", "dist");

396+

fs.mkdirSync(pluginDir, { recursive: true });

397+

fs.writeFileSync(path.join(root, "package.json"), '{"type":"module"}\n', "utf8");

398+

fs.writeFileSync(

399+

path.join(pluginDir, "index.js"),

400+

[

401+

'import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";',

402+

"export default defineBundledChannelEntry({",

403+

" id: 'alpha',",

404+

" name: 'Alpha',",

405+

" description: 'Alpha',",

406+

" importMetaUrl: import.meta.url,",

407+

" plugin: { specifier: './plugin.js', exportName: 'plugin' },",

408+

"});",

409+

"",

410+

].join("\n"),

411+

"utf8",

412+

);

413+

fs.writeFileSync(

414+

path.join(pluginDir, "plugin.js"),

415+

[

416+

"export const plugin = {",

417+

" id: 'alpha',",

418+

" meta: { id: 'alpha', label: 'Package dist Alpha' },",

419+

" capabilities: {},",

420+

" config: {},",

421+

"};",

422+

"",

423+

].join("\n"),

424+

"utf8",

425+

);

426+427+

vi.doMock("./bundled-root.js", () => ({

428+

resolveBundledChannelRootScope: () => ({

429+

packageRoot: root,

430+

cacheKey: `${root}:package-local-dist`,

431+

}),

432+

}));

433+

vi.doMock("../../plugins/bundled-channel-runtime.js", () => ({

434+

listBundledChannelPluginMetadata: () => [

435+

{

436+

...alphaChannelMetadata(),

437+

source: {

438+

source: path.join(root, "extensions", "alpha", "index.ts"),

439+

built: path.join(root, "extensions", "alpha", "index.ts"),

440+

},

441+

},

442+

],

443+

resolveBundledChannelGeneratedPath: () => path.join(pluginDir, "index.js"),

444+

}));

445+446+

try {

447+

const bundled = await importFreshModule<typeof import("./bundled.js")>(

448+

import.meta.url,

449+

"./bundled.js?scope=bundled-package-local-dist-sdk-alias",

450+

);

451+452+

expect(bundled.requireBundledChannelPlugin("alpha").meta.label).toBe("Package dist Alpha");

453+

} finally {

454+

fs.rmSync(root, { recursive: true, force: true });

455+

}

456+

});

457+458+

it("falls back through the cached loader for direct override dist entries needing SDK aliases", async () => {

459+

const root = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-bundled-direct-dist-"));

460+

const previousBundledPluginsDir = process.env.OPENCLAW_BUNDLED_PLUGINS_DIR;

461+

const pluginsRoot = path.join(root, "bundled-plugins");

462+

const pluginDir = path.join(pluginsRoot, "alpha", "dist");

463+

fs.mkdirSync(pluginDir, { recursive: true });

464+

fs.writeFileSync(path.join(pluginsRoot, "package.json"), '{"type":"module"}\n', "utf8");

465+

fs.writeFileSync(

466+

path.join(pluginDir, "index.js"),

467+

[

468+

'import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";',

469+

"export default defineBundledChannelEntry({",

470+

" id: 'alpha',",

471+

" name: 'Alpha',",

472+

" description: 'Alpha',",

473+

" importMetaUrl: import.meta.url,",

474+

" plugin: { specifier: './plugin.js', exportName: 'plugin' },",

475+

"});",

476+

"",

477+

].join("\n"),

478+

"utf8",

479+

);

480+

fs.writeFileSync(

481+

path.join(pluginDir, "plugin.js"),

482+

[

483+

"export const plugin = {",

484+

" id: 'alpha',",

485+

" meta: { id: 'alpha', label: 'Direct dist Alpha' },",

486+

" capabilities: {},",

487+

" config: {},",

488+

"};",

489+

"",

490+

].join("\n"),

491+

"utf8",

492+

);

493+494+

vi.doMock("../../plugins/bundled-channel-runtime.js", () => ({

495+

listBundledChannelPluginMetadata: () => [alphaChannelMetadata()],

496+

resolveBundledChannelGeneratedPath: () => path.join(pluginDir, "index.js"),

497+

}));

498+499+

try {

500+

process.env.OPENCLAW_BUNDLED_PLUGINS_DIR = pluginsRoot;

501+502+

const bundled = await importFreshModule<typeof import("./bundled.js")>(

503+

import.meta.url,

504+

"./bundled.js?scope=bundled-direct-dist-sdk-alias",

505+

);

506+507+

expect(bundled.requireBundledChannelPlugin("alpha").meta.label).toBe("Direct dist Alpha");

508+

} finally {

509+

restoreBundledPluginsDir(previousBundledPluginsDir);

510+

fs.rmSync(root, { recursive: true, force: true });

511+

}

512+

});

513+393514

it("treats direct bundled plugin-tree overrides as scan roots", async () => {

394515

const tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-bundled-direct-override-"));

395516

const previousBundledPluginsDir = process.env.OPENCLAW_BUNDLED_PLUGINS_DIR;