Skip to content

Commit a6a1967

Browse files
fix(cli): load memory plugin for doctor/status when registry is cold
1 parent 3aac50a commit a6a1967

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

src/plugins/memory-runtime.test.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,40 @@ describe("memory runtime auto-enable loading", () => {
265265
expectNoMemoryRuntimeBootstrap();
266266
});
267267

268+
it.each([
269+
{
270+
name: "denied",
271+
plugins: {
272+
deny: ["memory-core"],
273+
slots: {
274+
memory: "memory-core",
275+
},
276+
},
277+
},
278+
{
279+
name: "entry-disabled",
280+
plugins: {
281+
entries: {
282+
"memory-core": { enabled: false },
283+
},
284+
slots: {
285+
memory: "memory-core",
286+
},
287+
},
288+
},
289+
] as const)("does not standalone-load a $name memory slot plugin", async ({ plugins }) => {
290+
getMemoryRuntimeMock.mockReturnValue(undefined);
291+
292+
await expect(
293+
getActiveMemorySearchManager({
294+
cfg: { plugins } as never,
295+
agentId: "main",
296+
}),
297+
).resolves.toEqual({ manager: null, error: "memory plugin unavailable" });
298+
299+
expectNoMemoryRuntimeBootstrap();
300+
});
301+
268302
it("does not standalone-load plugins when the memory runtime is already registered", () => {
269303
const rawConfig = {
270304
plugins: {

0 commit comments

Comments
 (0)