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

推荐订阅源

Vercel News
Vercel News
B
Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
GbyAI
GbyAI
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
博客园_首页
C
Check Point Blog
博客园 - 【当耐特】
美团技术团队
Last Week in AI
Last Week in AI
A
About on SuperTechFans
雷峰网
雷峰网
MongoDB | Blog
MongoDB | Blog
Microsoft Azure Blog
Microsoft Azure Blog
M
MIT News - Artificial intelligence
Martin Fowler
Martin Fowler
J
Java Code Geeks
B
Blog RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
Google Developers Blog
F
Fortinet All Blogs

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): narrow session extension registry coverage...
vincentkoc · 2026-06-16 · via Recent Commits to openclaw:main

@@ -40,11 +40,7 @@ import {

4040

import { buildPluginAgentTurnPrepareContext, isPluginJsonValue } from "../host-hooks.js";

4141

import { createEmptyPluginRegistry } from "../registry-empty.js";

4242

import { createPluginRegistry } from "../registry.js";

43-

import {

44-

pinActivePluginSessionExtensionRegistry,

45-

releasePinnedPluginSessionExtensionRegistry,

46-

setActivePluginRegistry,

47-

} from "../runtime.js";

43+

import { setActivePluginRegistry } from "../runtime.js";

4844

import type { PluginRuntime } from "../runtime/types.js";

4945

import { createPluginRecord } from "../status.test-helpers.js";

5046

import { runTrustedToolPolicies } from "../trusted-tool-policy.js";

@@ -124,7 +120,6 @@ async function withHostHookState(

124120125121

describe("host-hook fixture plugin contract", () => {

126122

afterEach(() => {

127-

releasePinnedPluginSessionExtensionRegistry();

128123

setActivePluginRegistry(createEmptyPluginRegistry());

129124

clearPluginHostRuntimeState();

130125

resetAgentEventsForTest();

@@ -1563,138 +1558,6 @@ describe("host-hook fixture plugin contract", () => {

15631558

});

15641559

});

156515601566-

it("patches and projects pinned session extensions after active registry churn", async () => {

1567-

const { config, registry } = createPluginRegistryFixture();

1568-

registerTestPlugin({

1569-

registry,

1570-

config,

1571-

record: createPluginRecord({

1572-

id: "session-pin-fixture",

1573-

name: "Session Pin Fixture",

1574-

}),

1575-

register(api) {

1576-

api.registerSessionExtension({

1577-

namespace: "workflow",

1578-

description: "Pinned workflow state",

1579-

});

1580-

},

1581-

});

1582-

setActivePluginRegistry(registry.registry);

1583-

pinActivePluginSessionExtensionRegistry(registry.registry);

1584-

setActivePluginRegistry(createEmptyPluginRegistry());

1585-1586-

await withHostHookState(

1587-

"openclaw-host-hooks-session-pin-",

1588-

async ({ storePath, tempConfig }) => {

1589-

await updateSessionStore(storePath, (store) => {

1590-

store["agent:main:main"] = {

1591-

sessionId: "session-1",

1592-

updatedAt: Date.now(),

1593-

};

1594-

return undefined;

1595-

});

1596-1597-

await expect(

1598-

patchPluginSessionExtension({

1599-

cfg: tempConfig,

1600-

sessionKey: "agent:main:main",

1601-

pluginId: "session-pin-fixture",

1602-

namespace: "workflow",

1603-

value: { state: "approved" },

1604-

}),

1605-

).resolves.toEqual({

1606-

ok: true,

1607-

key: "agent:main:main",

1608-

value: { state: "approved" },

1609-

});

1610-1611-

const entry = loadSessionStore(storePath)["agent:main:main"];

1612-

expect(entry).toBeDefined();

1613-

expect(

1614-

projectPluginSessionExtensionsSync({

1615-

sessionKey: "agent:main:main",

1616-

entry,

1617-

}),

1618-

).toEqual([

1619-

{

1620-

pluginId: "session-pin-fixture",

1621-

namespace: "workflow",

1622-

value: { state: "approved" },

1623-

},

1624-

]);

1625-

},

1626-

);

1627-

});

1628-1629-

it("stops patching released pinned session extensions after registry removal", async () => {

1630-

const { config, registry } = createPluginRegistryFixture();

1631-

registerTestPlugin({

1632-

registry,

1633-

config,

1634-

record: createPluginRecord({

1635-

id: "session-release-fixture",

1636-

name: "Session Release Fixture",

1637-

}),

1638-

register(api) {

1639-

api.registerSessionExtension({

1640-

namespace: "workflow",

1641-

description: "Released workflow state",

1642-

});

1643-

},

1644-

});

1645-

setActivePluginRegistry(registry.registry);

1646-

pinActivePluginSessionExtensionRegistry(registry.registry);

1647-

setActivePluginRegistry(createEmptyPluginRegistry());

1648-1649-

await withHostHookState(

1650-

"openclaw-host-hooks-session-release-",

1651-

async ({ storePath, tempConfig }) => {

1652-

await updateSessionStore(storePath, (store) => {

1653-

store["agent:main:main"] = {

1654-

sessionId: "session-1",

1655-

updatedAt: Date.now(),

1656-

};

1657-

return undefined;

1658-

});

1659-1660-

await expect(

1661-

patchPluginSessionExtension({

1662-

cfg: tempConfig,

1663-

sessionKey: "agent:main:main",

1664-

pluginId: "session-release-fixture",

1665-

namespace: "workflow",

1666-

value: { state: "before-release" },

1667-

}),

1668-

).resolves.toEqual({

1669-

ok: true,

1670-

key: "agent:main:main",

1671-

value: { state: "before-release" },

1672-

});

1673-1674-

releasePinnedPluginSessionExtensionRegistry(registry.registry);

1675-1676-

await expect(

1677-

patchPluginSessionExtension({

1678-

cfg: tempConfig,

1679-

sessionKey: "agent:main:main",

1680-

pluginId: "session-release-fixture",

1681-

namespace: "workflow",

1682-

value: { state: "after-release" },

1683-

}),

1684-

).resolves.toEqual({

1685-

ok: false,

1686-

error: "unknown plugin session extension: session-release-fixture/workflow",

1687-

});

1688-1689-

const entry = loadSessionStore(storePath)["agent:main:main"];

1690-

expect(entry).toBeDefined();

1691-

expect(

1692-

projectPluginSessionExtensionsSync({ sessionKey: "agent:main:main", entry }),

1693-

).toEqual([]);

1694-

},

1695-

);

1696-

});

1697-16981561

it("models queued next-turn injections and agent_turn_prepare as one prompt context", async () => {

16991562

const { config, registry } = createPluginRegistryFixture();

17001563

registerTestPlugin({