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

推荐订阅源

月光博客
月光博客
雷峰网
雷峰网
S
SegmentFault 最新的问题
博客园 - 【当耐特】
博客园_首页
量子位
爱范儿
爱范儿
博客园 - 叶小钗
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
V
V2EX
美团技术团队
V
Visual Studio Blog
博客园 - 三生石上(FineUI控件)
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
博客园 - 聂微东
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Cloudflare Blog
宝玉的分享
宝玉的分享
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

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: prefer source plugins in dev runs · openclaw/opencla...
shakkernerd · 2026-05-31 · via Recent Commits to openclaw:main

@@ -29,6 +29,7 @@ function writeFakeOpenClawPackage(root: string): { distRoot: string; loaderModul

2929

exports: {

3030

"./cli-entry": "./dist/cli-entry.js",

3131

"./plugin-sdk": "./dist/plugin-sdk/root-alias.cjs",

32+

"./plugin-sdk/agent-runtime": "./dist/plugin-sdk/agent-runtime.js",

3233

"./plugin-sdk/channel-message": "./dist/plugin-sdk/channel-message.js",

3334

"./plugin-sdk/channel-outbound": "./dist/plugin-sdk/channel-outbound.js",

3435

"./plugin-sdk/source-only": "./dist/plugin-sdk/source-only.js",

@@ -39,6 +40,11 @@ function writeFakeOpenClawPackage(root: string): { distRoot: string; loaderModul

3940

const pluginSdkDir = path.join(distRoot, "plugin-sdk");

4041

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

4142

fs.writeFileSync(path.join(pluginSdkDir, "root-alias.cjs"), "module.exports = {};\n", "utf8");

43+

fs.writeFileSync(

44+

path.join(pluginSdkDir, "agent-runtime.js"),

45+

"export const agentRuntimeSource = import.meta.url;\n",

46+

"utf8",

47+

);

4248

fs.writeFileSync(

4349

path.join(pluginSdkDir, "channel-message.js"),

4450

['export * from "./channel-outbound.js";', ""].join("\n"),

@@ -74,6 +80,37 @@ function writeNormalizationCoreSource(root: string): string {

7480

}

75817682

describe("installOpenClawPluginSdkNativeResolver", () => {

83+

it("resolves installed plugin SDK imports to the dev source root", () => {

84+

const stableRoot = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-sdk-native-stable-"));

85+

const devRoot = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-sdk-native-dev-source-"));

86+

const { loaderModulePath } = writeFakeOpenClawPackage(stableRoot);

87+

writeFakeOpenClawPackage(devRoot);

88+

fs.mkdirSync(path.join(devRoot, "src"), { recursive: true });

89+

fs.mkdirSync(path.join(devRoot, "extensions"), { recursive: true });

90+

const externalPluginEntry = writeExternalPluginEntry(path.join(stableRoot, "external-plugin"));

91+

const previousDevSourceRoot = process.env.OPENCLAW_DEV_SOURCE_ROOT;

92+

process.env.OPENCLAW_DEV_SOURCE_ROOT = devRoot;

93+94+

try {

95+

const installedAliases = installOpenClawPluginSdkNativeResolver({

96+

modulePath: loaderModulePath,

97+

pluginModulePath: externalPluginEntry,

98+

});

99+100+

expect(installedAliases).toContain("openclaw/plugin-sdk/agent-runtime");

101+

const requireFromPlugin = createRequire(externalPluginEntry);

102+

expect(fs.realpathSync(requireFromPlugin.resolve("openclaw/plugin-sdk/agent-runtime"))).toBe(

103+

fs.realpathSync(path.join(devRoot, "dist", "plugin-sdk", "agent-runtime.js")),

104+

);

105+

} finally {

106+

if (previousDevSourceRoot === undefined) {

107+

delete process.env.OPENCLAW_DEV_SOURCE_ROOT;

108+

} else {

109+

process.env.OPENCLAW_DEV_SOURCE_ROOT = previousDevSourceRoot;

110+

}

111+

}

112+

});

113+77114

it("keeps native aliases on JS dist artifacts when source files exist", () => {

78115

const root = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-sdk-native-source-resolver-"));

79116

const { loaderModulePath } = writeFakeOpenClawPackage(root);