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

推荐订阅源

K
Kaspersky official blog
云风的 BLOG
云风的 BLOG
IT之家
IT之家
T
The Blog of Author Tim Ferriss
C
Check Point Blog
N
Netflix TechBlog - Medium
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog
G
Google Developers Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
F
Fortinet All Blogs
D
DataBreaches.Net
The Register - Security
The Register - Security
L
LINUX DO - 最新话题
W
WeLiveSecurity
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V2EX - 技术
V2EX - 技术
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
小众软件
小众软件
F
Full Disclosure
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
I
InfoQ
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
MyScale Blog
MyScale Blog
AI
AI
Recent Announcements
Recent Announcements
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CXSECURITY Database RSS Feed - CXSecurity.com
V
Vulnerabilities – Threatpost
NISL@THU
NISL@THU
SecWiki News
SecWiki News
Cisco Talos Blog
Cisco Talos Blog
H
Heimdal Security Blog
Y
Y Combinator Blog
N
News | PayPal Newsroom
P
Privacy International News Feed
美团技术团队
Attack and Defense Labs
Attack and Defense Labs
D
Docker
PCI Perspectives
PCI Perspectives
Webroot Blog
Webroot Blog
A
About on SuperTechFans
A
Arctic Wolf
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
MongoDB | Blog
MongoDB | Blog
T
Threat Research - Cisco 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: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
fix(memory): enforce wiki session visibility (#75722) · openclaw/openclaw@1daba52
eleqtrizit · 2026-05-06 · via Recent Commits to openclaw:main

@@ -6,17 +6,22 @@ import type { OpenClawConfig } from "../api.js";

66

import { compileMemoryWikiVault } from "./compile.js";

77

import type { MemoryWikiPluginConfig } from "./config.js";

88

import { renderWikiMarkdown } from "./markdown.js";

9-

import { getMemoryWikiPage, searchMemoryWiki } from "./query.js";

9+

import { getMemoryWikiPage, isSessionMemoryPath, searchMemoryWiki } from "./query.js";

1010

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

111112-

const { getActiveMemorySearchManagerMock, resolveDefaultAgentIdMock, resolveSessionAgentIdMock } =

13-

vi.hoisted(() => ({

14-

getActiveMemorySearchManagerMock: vi.fn(),

15-

resolveDefaultAgentIdMock: vi.fn(() => "main"),

16-

resolveSessionAgentIdMock: vi.fn(({ sessionKey }: { sessionKey?: string }) =>

17-

sessionKey === "agent:secondary:thread" ? "secondary" : "main",

18-

),

19-

}));

12+

const {

13+

getActiveMemorySearchManagerMock,

14+

loadCombinedSessionStoreForGatewayMock,

15+

resolveDefaultAgentIdMock,

16+

resolveSessionAgentIdMock,

17+

} = vi.hoisted(() => ({

18+

getActiveMemorySearchManagerMock: vi.fn(),

19+

loadCombinedSessionStoreForGatewayMock: vi.fn(),

20+

resolveDefaultAgentIdMock: vi.fn(() => "main"),

21+

resolveSessionAgentIdMock: vi.fn(({ sessionKey }: { sessionKey?: string }) =>

22+

sessionKey === "agent:secondary:thread" ? "secondary" : "main",

23+

),

24+

}));

20252126

vi.mock("openclaw/plugin-sdk/memory-host-search", () => ({

2227

getActiveMemorySearchManager: getActiveMemorySearchManagerMock,

@@ -27,13 +32,24 @@ vi.mock("openclaw/plugin-sdk/memory-host-core", () => ({

2732

resolveSessionAgentId: resolveSessionAgentIdMock,

2833

}));

293435+

vi.mock("openclaw/plugin-sdk/session-transcript-hit", async (importOriginal) => {

36+

const actual =

37+

await importOriginal<typeof import("openclaw/plugin-sdk/session-transcript-hit")>();

38+

return {

39+

...actual,

40+

loadCombinedSessionStoreForGateway: loadCombinedSessionStoreForGatewayMock,

41+

};

42+

});

43+3044

const { createVault } = createMemoryWikiTestHarness();

3145

let suiteRoot = "";

3246

let caseIndex = 0;

33473448

beforeEach(() => {

3549

getActiveMemorySearchManagerMock.mockReset();

3650

getActiveMemorySearchManagerMock.mockResolvedValue({ manager: null, error: "unavailable" });

51+

loadCombinedSessionStoreForGatewayMock.mockReset();

52+

loadCombinedSessionStoreForGatewayMock.mockReturnValue({ storePath: "(test)", store: {} });

3753

resolveDefaultAgentIdMock.mockClear();

3854

resolveSessionAgentIdMock.mockClear();

3955

});

@@ -68,6 +84,36 @@ function createAppConfig(): OpenClawConfig {

6884

} as OpenClawConfig;

6985

}

708687+

function createSessionVisibilityAppConfig(): OpenClawConfig {

88+

return {

89+

agents: {

90+

defaults: { sandbox: { sessionToolsVisibility: "all" } },

91+

list: [{ id: "main", default: true }],

92+

},

93+

tools: {

94+

sessions: { visibility: "self" },

95+

},

96+

} as OpenClawConfig;

97+

}

98+99+

function mockSessionTranscriptStore() {

100+

loadCombinedSessionStoreForGatewayMock.mockReturnValue({

101+

storePath: "(test)",

102+

store: {

103+

"agent:main:child-session": {

104+

sessionId: "child-session",

105+

updatedAt: 1,

106+

sessionFile: "/tmp/openclaw/child-session.jsonl",

107+

},

108+

"agent:main:sibling-session": {

109+

sessionId: "sibling-session",

110+

updatedAt: 2,

111+

sessionFile: "/tmp/openclaw/sibling-session.jsonl",

112+

},

113+

},

114+

});

115+

}

116+71117

function createMemoryManager(overrides?: {

72118

searchResults?: Array<{

73119

path: string;

@@ -95,6 +141,29 @@ function createMemoryManager(overrides?: {

95141

};

96142

}

97143144+

describe("isSessionMemoryPath", () => {

145+

it("classifies all current session storage layouts", () => {

146+

for (const relPath of [

147+

"sessions/child-session.jsonl",

148+

"qmd/sessions/child-session.md",

149+

"qmd/sessions-main/child-session.md",

150+

"qmd\\sessions-main\\child-session.md",

151+

"qmd/sessions",

152+

]) {

153+

expect(isSessionMemoryPath(relPath)).toBe(true);

154+

}

155+156+

for (const relPath of [

157+

"sessionsx/child-session.jsonl",

158+

"qmd/sessionsxxx",

159+

"wiki/sessions/foo.md",

160+

"wiki\\sessions\\foo.md",

161+

]) {

162+

expect(isSessionMemoryPath(relPath)).toBe(false);

163+

}

164+

});

165+

});

166+98167

describe("searchMemoryWiki", () => {

99168

it("finds wiki pages by title and body", async () => {

100169

const { rootDir, config } = await createQueryVault({

@@ -634,6 +703,132 @@ describe("searchMemoryWiki", () => {

634703

expect(manager.search).toHaveBeenCalledWith("alpha", { maxResults: 5 });

635704

});

636705706+

it("filters session memory hits outside the caller visibility policy", async () => {

707+

const { config } = await createQueryVault({

708+

initialize: true,

709+

config: {

710+

search: { backend: "shared", corpus: "memory" },

711+

},

712+

});

713+

mockSessionTranscriptStore();

714+

const manager = createMemoryManager({

715+

searchResults: [

716+

{

717+

path: "sessions/child-session.jsonl",

718+

startLine: 1,

719+

endLine: 2,

720+

score: 30,

721+

snippet: "caller transcript",

722+

source: "sessions",

723+

},

724+

{

725+

path: "qmd/sessions-main/sibling-session.md",

726+

startLine: 3,

727+

endLine: 4,

728+

score: 20,

729+

snippet: "sibling transcript",

730+

source: "sessions",

731+

},

732+

{

733+

path: "MEMORY.md",

734+

startLine: 5,

735+

endLine: 6,

736+

score: 10,

737+

snippet: "durable memory",

738+

source: "memory",

739+

},

740+

],

741+

});

742+

getActiveMemorySearchManagerMock.mockResolvedValue({ manager });

743+744+

const results = await searchMemoryWiki({

745+

config,

746+

appConfig: createSessionVisibilityAppConfig(),

747+

agentSessionKey: "agent:main:child-session",

748+

sandboxed: true,

749+

query: "transcript",

750+

maxResults: 10,

751+

});

752+753+

expect(results.map((result) => result.path)).toEqual([

754+

"sessions/child-session.jsonl",

755+

"MEMORY.md",

756+

]);

757+

expect(results.some((result) => result.path.includes("sibling-session"))).toBe(false);

758+

});

759+760+

it("filters session memory hits for session-bound non-sandboxed callers", async () => {

761+

const { config } = await createQueryVault({

762+

initialize: true,

763+

config: {

764+

search: { backend: "shared", corpus: "memory" },

765+

},

766+

});

767+

mockSessionTranscriptStore();

768+

const manager = createMemoryManager({

769+

searchResults: [

770+

{

771+

path: "sessions/child-session.jsonl",

772+

startLine: 1,

773+

endLine: 2,

774+

score: 30,

775+

snippet: "caller transcript",

776+

source: "sessions",

777+

},

778+

{

779+

path: "qmd/sessions-main/sibling-session.md",

780+

startLine: 3,

781+

endLine: 4,

782+

score: 20,

783+

snippet: "sibling transcript",

784+

source: "sessions",

785+

},

786+

{

787+

path: "MEMORY.md",

788+

startLine: 5,

789+

endLine: 6,

790+

score: 10,

791+

snippet: "durable memory",

792+

source: "memory",

793+

},

794+

],

795+

});

796+

getActiveMemorySearchManagerMock.mockResolvedValue({ manager });

797+798+

const results = await searchMemoryWiki({

799+

config,

800+

appConfig: createSessionVisibilityAppConfig(),

801+

agentSessionKey: "agent:main:child-session",

802+

sandboxed: false,

803+

query: "transcript",

804+

maxResults: 10,

805+

});

806+807+

expect(results.map((result) => result.path)).toEqual([

808+

"sessions/child-session.jsonl",

809+

"MEMORY.md",

810+

]);

811+

expect(results.some((result) => result.path.includes("sibling-session"))).toBe(false);

812+

});

813+814+

it("requires appConfig for session-bound shared memory searches", async () => {

815+

const { config } = await createQueryVault({

816+

initialize: true,

817+

config: {

818+

search: { backend: "shared", corpus: "memory" },

819+

},

820+

});

821+822+

await expect(

823+

searchMemoryWiki({

824+

config,

825+

agentSessionKey: "agent:main:child-session",

826+

sandboxed: true,

827+

query: "transcript",

828+

}),

829+

).rejects.toThrow(/wiki_search requires appConfig/);

830+

});

831+637832

it("uses the active session agent for shared memory search", async () => {

638833

const { config } = await createQueryVault({

639834

initialize: true,

@@ -902,6 +1097,89 @@ describe("getMemoryWikiPage", () => {

9021097

});

9031098

});

90410991100+

it("skips session memory reads outside the caller visibility policy", async () => {

1101+

const { config } = await createQueryVault({

1102+

initialize: true,

1103+

config: {

1104+

search: { backend: "shared", corpus: "memory" },

1105+

},

1106+

});

1107+

mockSessionTranscriptStore();

1108+

const manager = createMemoryManager({

1109+

readResult: {

1110+

path: "qmd/sessions-main/sibling-session.md",

1111+

text: "sibling transcript content",

1112+

},

1113+

});

1114+

getActiveMemorySearchManagerMock.mockResolvedValue({ manager });

1115+1116+

const result = await getMemoryWikiPage({

1117+

config,

1118+

appConfig: createSessionVisibilityAppConfig(),

1119+

agentSessionKey: "agent:main:child-session",

1120+

sandboxed: true,

1121+

lookup: "qmd/sessions-main/sibling-session.md",

1122+

});

1123+1124+

expect(result).toBeNull();

1125+

expect(manager.readFile).not.toHaveBeenCalled();

1126+

});

1127+1128+

it("permits session memory reads inside the caller visibility policy", async () => {

1129+

const { config } = await createQueryVault({

1130+

initialize: true,

1131+

config: {

1132+

search: { backend: "shared", corpus: "memory" },

1133+

},

1134+

});

1135+

mockSessionTranscriptStore();

1136+

const manager = createMemoryManager({

1137+

readResult: {

1138+

path: "qmd/sessions-main/child-session.md",

1139+

text: "own transcript content",

1140+

},

1141+

});

1142+

getActiveMemorySearchManagerMock.mockResolvedValue({ manager });

1143+1144+

const result = await getMemoryWikiPage({

1145+

config,

1146+

appConfig: createSessionVisibilityAppConfig(),

1147+

agentSessionKey: "agent:main:child-session",

1148+

sandboxed: true,

1149+

lookup: "qmd/sessions-main/child-session.md",

1150+

});

1151+1152+

expect(result).toMatchObject({

1153+

corpus: "memory",

1154+

path: "qmd/sessions-main/child-session.md",

1155+

content: "own transcript content",

1156+

});

1157+

expect(manager.readFile).toHaveBeenCalledTimes(1);

1158+

expect(manager.readFile).toHaveBeenCalledWith({

1159+

relPath: "qmd/sessions-main/child-session.md",

1160+

from: 1,

1161+

lines: 200,

1162+

});

1163+

});

1164+1165+

it("requires appConfig for session-bound shared memory reads", async () => {

1166+

const { config } = await createQueryVault({

1167+

initialize: true,

1168+

config: {

1169+

search: { backend: "shared", corpus: "memory" },

1170+

},

1171+

});

1172+1173+

await expect(

1174+

getMemoryWikiPage({

1175+

config,

1176+

agentSessionKey: "agent:main:child-session",

1177+

sandboxed: true,

1178+

lookup: "sessions/child-session.jsonl",

1179+

}),

1180+

).rejects.toThrow(/wiki_get requires appConfig/);

1181+

});

1182+9051183

it("uses the active session agent for shared memory reads", async () => {

9061184

const { config } = await createQueryVault({

9071185

initialize: true,