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

推荐订阅源

云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
The GitHub Blog
The GitHub Blog
月光博客
月光博客
T
Tailwind CSS Blog
小众软件
小众软件
Y
Y Combinator Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
B
Blog RSS Feed
博客园 - 司徒正美
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 聂微东
Microsoft Security Blog
Microsoft Security Blog
Recent Announcements
Recent Announcements
博客园 - Franky
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Azure Blog
Microsoft Azure Blog
T
The Blog of Author Tim Ferriss
GbyAI
GbyAI
Apple Machine Learning Research
Apple Machine Learning Research

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
test(plugins): alias gateway workspace packages in plugin...
steipete · 2026-05-29 · via Recent Commits to openclaw:main

@@ -154,6 +154,21 @@ function createExtensionApiAliasFixture(params?: {

154154

return { root, srcFile, distFile };

155155

}

156156157+

function writeWorkspacePackageEntry(params: {

158+

root: string;

159+

packageDir: string;

160+

srcFile: string;

161+

distFile: string;

162+

}) {

163+

const srcFile = path.join(params.root, "packages", params.packageDir, "src", params.srcFile);

164+

const distFile = path.join(params.root, "packages", params.packageDir, "dist", params.distFile);

165+

mkdirSafeDir(path.dirname(srcFile));

166+

mkdirSafeDir(path.dirname(distFile));

167+

fs.writeFileSync(srcFile, "export {};\n", "utf-8");

168+

fs.writeFileSync(distFile, "export {};\n", "utf-8");

169+

return { srcFile, distFile };

170+

}

171+157172

function createPluginRuntimeAliasFixture(params?: { srcBody?: string; distBody?: string }) {

158173

const root = makeTempDir();

159174

const srcFile = path.join(root, "src", "plugins", "runtime", "index.ts");

@@ -1331,6 +1346,90 @@ describe("plugin sdk alias helpers", () => {

13311346

});

13321347

});

133313481349+

it("aliases gateway workspace packages to source when dist artifacts are missing", () => {

1350+

const fixture = createPluginSdkAliasFixture();

1351+

const gatewayClient = writeWorkspacePackageEntry({

1352+

root: fixture.root,

1353+

packageDir: "gateway-client",

1354+

srcFile: "index.ts",

1355+

distFile: "index.mjs",

1356+

});

1357+

const gatewayClientTimeouts = writeWorkspacePackageEntry({

1358+

root: fixture.root,

1359+

packageDir: "gateway-client",

1360+

srcFile: "timeouts.ts",

1361+

distFile: "timeouts.mjs",

1362+

});

1363+

const gatewayProtocol = writeWorkspacePackageEntry({

1364+

root: fixture.root,

1365+

packageDir: "gateway-protocol",

1366+

srcFile: "index.ts",

1367+

distFile: "index.mjs",

1368+

});

1369+

const gatewayProtocolSchema = writeWorkspacePackageEntry({

1370+

root: fixture.root,

1371+

packageDir: "gateway-protocol",

1372+

srcFile: "schema.ts",

1373+

distFile: "schema.mjs",

1374+

});

1375+

fs.rmSync(gatewayClient.distFile);

1376+

fs.rmSync(gatewayClientTimeouts.distFile);

1377+

fs.rmSync(gatewayProtocol.distFile);

1378+

fs.rmSync(gatewayProtocolSchema.distFile);

1379+

const sourcePluginEntry = writePluginEntry(

1380+

fixture.root,

1381+

bundledPluginFile("demo", "src/index.ts"),

1382+

);

1383+1384+

const aliases = withEnv({ NODE_ENV: undefined }, () =>

1385+

buildPluginLoaderAliasMap(sourcePluginEntry, undefined, undefined, "dist"),

1386+

);

1387+1388+

expect(fs.realpathSync(aliases["@openclaw/gateway-client"] ?? "")).toBe(

1389+

fs.realpathSync(gatewayClient.srcFile),

1390+

);

1391+

expect(fs.realpathSync(aliases["@openclaw/gateway-client/timeouts"] ?? "")).toBe(

1392+

fs.realpathSync(gatewayClientTimeouts.srcFile),

1393+

);

1394+

expect(fs.realpathSync(aliases["@openclaw/gateway-protocol"] ?? "")).toBe(

1395+

fs.realpathSync(gatewayProtocol.srcFile),

1396+

);

1397+

expect(fs.realpathSync(aliases["@openclaw/gateway-protocol/schema"] ?? "")).toBe(

1398+

fs.realpathSync(gatewayProtocolSchema.srcFile),

1399+

);

1400+

});

1401+1402+

it("aliases gateway workspace package subpaths to dist when available", () => {

1403+

const fixture = createPluginSdkAliasFixture();

1404+

const gatewayClient = writeWorkspacePackageEntry({

1405+

root: fixture.root,

1406+

packageDir: "gateway-client",

1407+

srcFile: "readiness.ts",

1408+

distFile: "readiness.mjs",

1409+

});

1410+

const gatewayProtocol = writeWorkspacePackageEntry({

1411+

root: fixture.root,

1412+

packageDir: "gateway-protocol",

1413+

srcFile: "connect-error-details.ts",

1414+

distFile: "connect-error-details.mjs",

1415+

});

1416+

const sourcePluginEntry = writePluginEntry(

1417+

fixture.root,

1418+

bundledPluginFile("demo", "src/index.ts"),

1419+

);

1420+1421+

const aliases = withEnv({ NODE_ENV: undefined }, () =>

1422+

buildPluginLoaderAliasMap(sourcePluginEntry, undefined, undefined, "dist"),

1423+

);

1424+1425+

expect(fs.realpathSync(aliases["@openclaw/gateway-client/readiness"] ?? "")).toBe(

1426+

fs.realpathSync(gatewayClient.distFile),

1427+

);

1428+

expect(fs.realpathSync(aliases["@openclaw/gateway-protocol/connect-error-details"] ?? "")).toBe(

1429+

fs.realpathSync(gatewayProtocol.distFile),

1430+

);

1431+

});

1432+13341433

it("aliases bundled plugin package public surfaces for source plugin transforms", () => {

13351434

const { fixture, sourceApiPath, sourceRuntimeApiPath } =

13361435

createBundledPluginPackagePublicSurfaceAliasFixture();

@@ -2146,9 +2245,7 @@ describe("buildPluginLoaderJitiOptions", () => {

21462245

),

21472246

);

214822472149-

expect(guardedFsCache).toContain(

2150-

path.join("jiti", "openclaw", "1.2.3-beta.4") + path.sep,

2151-

);

2248+

expect(guardedFsCache).toContain(path.join("jiti", "openclaw", "1.2.3-beta.4") + path.sep);

21522249

expect(guardedFsCache.startsWith(path.join(root, "jiti") + path.sep)).toBe(false);

21532250

expect(respectedFsCache).toContain(

21542251

path.join(root, "jiti", "openclaw", "1.2.3-beta.4") + path.sep,