fix: isolate active memory auth health (#71539)

* fix(agents): scope helper auth failures

* fix(active-memory): isolate recall auth health

* fix: isolate active memory auth health (#71539)

* fix: avoid auth policy import cycle (#71539)
This commit is contained in:
Ayaan Zaidi
2026-04-25 16:50:38 +05:30
committed by GitHub
parent be1d716427
commit bdba4fa1bf
8 changed files with 89 additions and 14 deletions

View File

@@ -162,6 +162,24 @@ describe("active-memory plugin", () => {
expect(api.on).toHaveBeenCalledWith("before_prompt_build", expect.any(Function));
});
it("runs recall without recording shared auth-profile failures", async () => {
await hooks.before_prompt_build(
{ prompt: "what wings should i order?", messages: [] },
{
agentId: "main",
trigger: "user",
sessionKey: "agent:main:main",
messageProvider: "webchat",
},
);
expect(runEmbeddedPiAgent).toHaveBeenCalledWith(
expect.objectContaining({
authProfileFailurePolicy: "local",
}),
);
});
it("registers a session-scoped active-memory toggle command", async () => {
const command = registeredCommands["active-memory"];
const sessionKey = "agent:main:active-memory-toggle";

View File

@@ -1685,6 +1685,7 @@ async function runRecallSubagent(params: {
thinkLevel: params.config.thinking,
reasoningLevel: "off",
silentExpected: true,
authProfileFailurePolicy: "local",
cleanupBundleMcpOnRunEnd: true,
abortSignal: params.abortSignal,
});