fix(active-memory): honor agent allowlist in status · openclaw/openclaw@9e4da8c
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -158,6 +158,7 @@ Docs: https://docs.openclaw.ai
|
158 | 158 | - Providers: preserve non-OK `text/event-stream` response bodies so provider HTTP errors keep their JSON detail instead of collapsing to generic streaming failures. Fixes #78180. |
159 | 159 | - Gateway/auth: make explicit `trusted-proxy` mode fail closed instead of accepting local password fallback credentials after trusted-proxy identity checks fail. Fixes #78684. |
160 | 160 | - Active memory: treat Google Chat `spaces/...` conversation ids as scoped targets instead of runnable channel names so recall runs no longer fail bundled-plugin dirName validation. Fixes #78918. |
| 161 | +- Active memory: make `/active-memory status` honor the configured agent allowlist instead of reporting on for agents where recall is disabled. Fixes #78986. |
161 | 162 | - Tools/session status: render the active heartbeat/run model for `session_status({"sessionKey":"current"})` instead of falling back to the persisted session default. Fixes #77493. |
162 | 163 | - Doctor/secrets: allow safe inherited exec SecretRef `passEnv` names such as `HOME` while still blocking dangerous runtime env hooks. Fixes #78216. |
163 | 164 | - Chat commands: make `/model default` reset the session model override instead of treating it as a literal model name. Fixes #78182. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -346,6 +346,28 @@ describe("active-memory plugin", () => {
|
346 | 346 | expect(runEmbeddedPiAgent).toHaveBeenCalledTimes(1); |
347 | 347 | }); |
348 | 348 | |
| 349 | +it("reports session status off when the current agent is outside the active-memory allowlist (#78986)", async () => { |
| 350 | +api.pluginConfig = { |
| 351 | +agents: ["sandbox"], |
| 352 | +logging: true, |
| 353 | +}; |
| 354 | +plugin.register(api as unknown as OpenClawPluginApi); |
| 355 | + |
| 356 | +const statusResult = await registeredCommands["active-memory"].handler({ |
| 357 | +channel: "webchat", |
| 358 | +isAuthorizedSender: true, |
| 359 | +sessionKey: "agent:main:main", |
| 360 | +args: "status", |
| 361 | +commandBody: "/active-memory status", |
| 362 | +config: {}, |
| 363 | +requestConversationBinding: async () => ({ status: "error", message: "unsupported" }), |
| 364 | +detachConversationBinding: async () => ({ removed: false }), |
| 365 | +getCurrentConversationBinding: async () => null, |
| 366 | +}); |
| 367 | + |
| 368 | +expect(statusResult.text).toBe("Active Memory: off for this session."); |
| 369 | +}); |
| 370 | + |
349 | 371 | it("supports an explicit global active-memory config toggle", async () => { |
350 | 372 | const command = registeredCommands["active-memory"]; |
351 | 373 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2863,6 +2863,10 @@ export default definePluginEntry({
|
2863 | 2863 | text: "Active Memory: session toggle unavailable because this command has no session context.", |
2864 | 2864 | }; |
2865 | 2865 | } |
| 2866 | +const commandAgentId = resolveStatusUpdateAgentId({ sessionKey }); |
| 2867 | +if (!isEnabledForAgent(config, commandAgentId)) { |
| 2868 | +return { text: "Active Memory: off for this session." }; |
| 2869 | +} |
2866 | 2870 | if (action === "status") { |
2867 | 2871 | const disabled = await isSessionActiveMemoryDisabled({ api, sessionKey }); |
2868 | 2872 | return { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。