memory-wiki: require write scope for Obsidian search [AI] (#80904) · openclaw/openclaw@c3f1f0c
pgondhi987
·
2026-05-12
·
via Recent Commits to openclaw:main
File tree
extensions/memory-wiki/src
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,6 +6,7 @@ Docs: https://docs.openclaw.ai
|
6 | 6 | |
7 | 7 | ### Fixes |
8 | 8 | |
| 9 | +- memory-wiki: require write scope for Obsidian search [AI]. (#80904) Thanks @pgondhi987. |
9 | 10 | - Build: skip copied metadata for bundled plugins that are excluded from build entries, preventing update/status rebuilds from advertising missing QQ Bot runtime files. (#80925) |
10 | 11 | - Control UI/sessions: nest subagent sessions under their parent session in the session picker dropdown using a visual `└─ ` prefix, making the parent-child relationship clear. Fixes #77628. (#78623) Thanks @chinar-amrutkar. |
11 | 12 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -154,6 +154,27 @@ describe("memory-wiki gateway methods", () => {
|
154 | 154 | } as never); |
155 | 155 | }); |
156 | 156 | |
| 157 | +it("registers Obsidian CLI methods with write scope", async () => { |
| 158 | +const { config } = await createVault({ prefix: "memory-wiki-gateway-" }); |
| 159 | +const { api, registerGatewayMethod } = createPluginApi(); |
| 160 | + |
| 161 | +registerMemoryWikiGatewayMethods({ api, config }); |
| 162 | + |
| 163 | +expect( |
| 164 | +Object.fromEntries( |
| 165 | +registerGatewayMethod.mock.calls |
| 166 | +.filter(([method]) => typeof method === "string" && method.startsWith("wiki.obsidian.")) |
| 167 | +.map(([method, , options]) => [method, options]), |
| 168 | +), |
| 169 | +).toEqual({ |
| 170 | +"wiki.obsidian.status": { scope: "operator.read" }, |
| 171 | +"wiki.obsidian.search": { scope: "operator.write" }, |
| 172 | +"wiki.obsidian.open": { scope: "operator.write" }, |
| 173 | +"wiki.obsidian.command": { scope: "operator.write" }, |
| 174 | +"wiki.obsidian.daily": { scope: "operator.write" }, |
| 175 | +}); |
| 176 | +}); |
| 177 | + |
157 | 178 | it("returns wiki status over the gateway", async () => { |
158 | 179 | const { config } = await createVault({ prefix: "memory-wiki-gateway-" }); |
159 | 180 | const { api, registerGatewayMethod } = createPluginApi(); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -367,7 +367,7 @@ export function registerMemoryWikiGatewayMethods(params: {
|
367 | 367 | respondError(respond, error); |
368 | 368 | } |
369 | 369 | }, |
370 | | -{ scope: READ_SCOPE }, |
| 370 | +{ scope: WRITE_SCOPE }, |
371 | 371 | ); |
372 | 372 | |
373 | 373 | api.registerGatewayMethod( |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。