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

推荐订阅源

P
Proofpoint News Feed
V
V2EX
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
The Cloudflare Blog
T
Tailwind CSS Blog
H
Help Net Security
腾讯CDC
爱范儿
爱范儿
人人都是产品经理
人人都是产品经理
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
D
DataBreaches.Net
C
Check Point Blog
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

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: restore bundled plugin SDK alias · openclaw/openclaw...
steipete · 2026-04-23 · via Recent Commits to openclaw:main

@@ -1454,6 +1454,181 @@ module.exports = {

14541454

expect(registry.plugins.find((entry) => entry.id === "alpha")?.status).toBe("loaded");

14551455

});

145614561457+

it("loads bundled plugins with plugin-sdk imports from an external stage dir", () => {

1458+

const packageRoot = makeTempDir();

1459+

const stageDir = makeTempDir();

1460+

const bundledDir = path.join(packageRoot, "dist", "extensions");

1461+

const pluginRoot = path.join(bundledDir, "telegram");

1462+

fs.mkdirSync(path.join(packageRoot, "dist", "plugin-sdk"), { recursive: true });

1463+

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

1464+

fs.writeFileSync(

1465+

path.join(packageRoot, "package.json"),

1466+

JSON.stringify({ name: "openclaw", version: "2026.4.22", type: "module" }),

1467+

"utf-8",

1468+

);

1469+

fs.writeFileSync(

1470+

path.join(packageRoot, "dist", "plugin-sdk", "text-runtime.js"),

1471+

[

1472+

`export function normalizeLowercaseStringOrEmpty(value) {`,

1473+

` return typeof value === "string" ? value.toLowerCase() : "";`,

1474+

`}`,

1475+

"",

1476+

].join("\n"),

1477+

"utf-8",

1478+

);

1479+

fs.writeFileSync(

1480+

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

1481+

[

1482+

`import runtimeDep from "external-runtime";`,

1483+

`import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";`,

1484+

`export default {`,

1485+

` id: "telegram",`,

1486+

` register(api) {`,

1487+

` api.registerCommand({`,

1488+

` name: "external-runtime",`,

1489+

` handler: () => normalizeLowercaseStringOrEmpty(runtimeDep.marker),`,

1490+

` });`,

1491+

` },`,

1492+

`};`,

1493+

"",

1494+

].join("\n"),

1495+

"utf-8",

1496+

);

1497+

fs.writeFileSync(

1498+

path.join(pluginRoot, "package.json"),

1499+

JSON.stringify(

1500+

{

1501+

name: "@openclaw/telegram",

1502+

version: "1.0.0",

1503+

type: "module",

1504+

dependencies: {

1505+

"external-runtime": "1.0.0",

1506+

},

1507+

openclaw: { extensions: ["./index.js"] },

1508+

},

1509+

null,

1510+

2,

1511+

),

1512+

"utf-8",

1513+

);

1514+

fs.writeFileSync(

1515+

path.join(pluginRoot, "openclaw.plugin.json"),

1516+

JSON.stringify(

1517+

{

1518+

id: "telegram",

1519+

enabledByDefault: true,

1520+

configSchema: EMPTY_PLUGIN_SCHEMA,

1521+

},

1522+

null,

1523+

2,

1524+

),

1525+

"utf-8",

1526+

);

1527+

process.env.OPENCLAW_BUNDLED_PLUGINS_DIR = bundledDir;

1528+

process.env.OPENCLAW_PLUGIN_STAGE_DIR = stageDir;

1529+1530+

const registry = loadOpenClawPlugins({

1531+

cache: false,

1532+

config: {

1533+

plugins: {

1534+

enabled: true,

1535+

},

1536+

},

1537+

bundledRuntimeDepsInstaller: ({ installRoot }) => {

1538+

const depRoot = path.join(installRoot, "node_modules", "external-runtime");

1539+

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

1540+

fs.writeFileSync(

1541+

path.join(depRoot, "package.json"),

1542+

JSON.stringify({

1543+

name: "external-runtime",

1544+

version: "1.0.0",

1545+

type: "module",

1546+

exports: "./index.js",

1547+

}),

1548+

"utf-8",

1549+

);

1550+

fs.writeFileSync(

1551+

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

1552+

"export default { marker: 'SDK-OK' };\n",

1553+

"utf-8",

1554+

);

1555+

},

1556+

});

1557+1558+

expect(registry.plugins.find((entry) => entry.id === "telegram")?.status).toBe("loaded");

1559+

});

1560+1561+

it("loads bundled plugins with plugin-sdk imports from a package dist root", () => {

1562+

const packageRoot = makeTempDir();

1563+

const bundledDir = path.join(packageRoot, "dist", "extensions");

1564+

const pluginRoot = path.join(bundledDir, "discord");

1565+

fs.mkdirSync(path.join(packageRoot, "dist", "plugin-sdk"), { recursive: true });

1566+

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

1567+

fs.writeFileSync(

1568+

path.join(packageRoot, "package.json"),

1569+

JSON.stringify({ name: "openclaw", version: "2026.4.22", type: "module" }),

1570+

"utf-8",

1571+

);

1572+

fs.writeFileSync(

1573+

path.join(packageRoot, "dist", "plugin-sdk", "text-runtime.js"),

1574+

"export const normalizeLowercaseStringOrEmpty = (value) => String(value).toLowerCase();\n",

1575+

"utf-8",

1576+

);

1577+

fs.writeFileSync(

1578+

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

1579+

[

1580+

`import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";`,

1581+

`export default {`,

1582+

` id: "discord",`,

1583+

` register(api) {`,

1584+

` api.registerCommand({ name: normalizeLowercaseStringOrEmpty("DISCORD"), handler: () => "ok" });`,

1585+

` },`,

1586+

`};`,

1587+

"",

1588+

].join("\n"),

1589+

"utf-8",

1590+

);

1591+

fs.writeFileSync(

1592+

path.join(pluginRoot, "package.json"),

1593+

JSON.stringify(

1594+

{

1595+

name: "@openclaw/discord",

1596+

version: "1.0.0",

1597+

type: "module",

1598+

openclaw: { extensions: ["./index.js"] },

1599+

},

1600+

null,

1601+

2,

1602+

),

1603+

"utf-8",

1604+

);

1605+

fs.writeFileSync(

1606+

path.join(pluginRoot, "openclaw.plugin.json"),

1607+

JSON.stringify(

1608+

{

1609+

id: "discord",

1610+

enabledByDefault: true,

1611+

configSchema: EMPTY_PLUGIN_SCHEMA,

1612+

},

1613+

null,

1614+

2,

1615+

),

1616+

"utf-8",

1617+

);

1618+

process.env.OPENCLAW_BUNDLED_PLUGINS_DIR = bundledDir;

1619+1620+

const registry = loadOpenClawPlugins({

1621+

cache: false,

1622+

config: {

1623+

plugins: {

1624+

enabled: true,

1625+

},

1626+

},

1627+

});

1628+1629+

expect(registry.plugins.find((entry) => entry.id === "discord")?.status).toBe("loaded");

1630+

});

1631+14571632

it("loads dist-runtime wrappers from an external stage dir", () => {

14581633

const packageRoot = makeTempDir();

14591634

const stageDir = makeTempDir();