Skip to content

Commit 93d0e2c

Browse files
adolagoampcode-com
andcommitted
feat(zee): use agent-core as default memory backend
- Change default memory slot from 'memory-core' plugin to 'agent-core' - Add 'agent-core' and 'none' as built-in memory slots in validation - Update status.scan.ts to check for 'agent-core' slot - Update tests to reflect new default This makes agent-core's Qdrant-based memory the single source of truth, removing the dependency on Zee's memory-core plugin. Amp-Thread-ID: https://ampcode.com/threads/T-019c1279-49ff-7694-bd55-5099fe7ccd11 Co-authored-by: Amp <[email protected]>
1 parent 479d41a commit 93d0e2c

5 files changed

Lines changed: 20 additions & 14 deletions

File tree

packages/personas/zee/src/commands/status.scan.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function resolveMemoryPluginStatus(cfg: ReturnType<typeof loadConfig>): MemoryPl
3131
if (raw && raw.toLowerCase() === "none") {
3232
return { enabled: false, slot: null, reason: 'plugins.slots.memory="none"' };
3333
}
34-
return { enabled: true, slot: raw || "memory-core" };
34+
return { enabled: true, slot: raw || "agent-core" };
3535
}
3636

3737
export type StatusScanResult = {
@@ -146,7 +146,7 @@ export async function scanStatus(
146146
const memoryPlugin = resolveMemoryPluginStatus(cfg);
147147
const memory = await (async (): Promise<MemoryStatusSnapshot | null> => {
148148
if (!memoryPlugin.enabled) return null;
149-
if (memoryPlugin.slot !== "memory-core") return null;
149+
if (memoryPlugin.slot !== "agent-core") return null;
150150
const agentId = agentStatus.defaultId ?? "main";
151151
const { MemoryIndexManager } = await import("../memory/manager.js");
152152
const manager = await MemoryIndexManager.get({ cfg, agentId }).catch(() => null);

packages/personas/zee/src/config/validation.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,13 @@ export function validateConfigObjectWithPlugins(raw: unknown):
199199
}
200200

201201
const memorySlot = normalizedPlugins.slots.memory;
202-
if (typeof memorySlot === "string" && memorySlot.trim() && !knownIds.has(memorySlot)) {
202+
const builtInMemorySlots = new Set(["agent-core", "none"]);
203+
if (
204+
typeof memorySlot === "string" &&
205+
memorySlot.trim() &&
206+
!knownIds.has(memorySlot) &&
207+
!builtInMemorySlots.has(memorySlot.toLowerCase())
208+
) {
203209
issues.push({
204210
path: "plugins.slots.memory",
205211
message: `plugin not found: ${memorySlot}`,

packages/personas/zee/src/plugins/config-state.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { normalizePluginsConfig } from "./config-state.js";
55
describe("normalizePluginsConfig", () => {
66
it("uses default memory slot when not specified", () => {
77
const result = normalizePluginsConfig({});
8-
expect(result.slots.memory).toBe("memory-core");
8+
expect(result.slots.memory).toBe("agent-core");
99
});
1010

1111
it("respects explicit memory slot value", () => {
@@ -40,13 +40,13 @@ describe("normalizePluginsConfig", () => {
4040
const result = normalizePluginsConfig({
4141
slots: { memory: "" },
4242
});
43-
expect(result.slots.memory).toBe("memory-core");
43+
expect(result.slots.memory).toBe("agent-core");
4444
});
4545

4646
it("uses default when memory slot is whitespace only", () => {
4747
const result = normalizePluginsConfig({
4848
slots: { memory: " " },
4949
});
50-
expect(result.slots.memory).toBe("memory-core");
50+
expect(result.slots.memory).toBe("agent-core");
5151
});
5252
});

packages/personas/zee/src/plugins/slots.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ describe("applyExclusiveSlotSelection", () => {
77
it("selects the slot and disables other entries for the same kind", () => {
88
const config: ZeeConfig = {
99
plugins: {
10-
slots: { memory: "memory-core" },
10+
slots: { memory: "old-memory" },
1111
entries: {
12-
"memory-core": { enabled: true },
12+
"old-memory": { enabled: true },
1313
memory: { enabled: true },
1414
},
1515
},
@@ -21,19 +21,19 @@ describe("applyExclusiveSlotSelection", () => {
2121
selectedKind: "memory",
2222
registry: {
2323
plugins: [
24-
{ id: "memory-core", kind: "memory" },
24+
{ id: "old-memory", kind: "memory" },
2525
{ id: "memory", kind: "memory" },
2626
],
2727
},
2828
});
2929

3030
expect(result.changed).toBe(true);
3131
expect(result.config.plugins?.slots?.memory).toBe("memory");
32-
expect(result.config.plugins?.entries?.["memory-core"]?.enabled).toBe(false);
32+
expect(result.config.plugins?.entries?.["old-memory"]?.enabled).toBe(false);
3333
expect(result.warnings).toContain(
34-
'Exclusive slot "memory" switched from "memory-core" to "memory".',
34+
'Exclusive slot "memory" switched from "old-memory" to "memory".',
3535
);
36-
expect(result.warnings).toContain('Disabled other "memory" slot plugins: memory-core.');
36+
expect(result.warnings).toContain('Disabled other "memory" slot plugins: old-memory.');
3737
});
3838

3939
it("does nothing when the slot already matches", () => {
@@ -76,7 +76,7 @@ describe("applyExclusiveSlotSelection", () => {
7676

7777
expect(result.changed).toBe(true);
7878
expect(result.warnings).toContain(
79-
'Exclusive slot "memory" switched from "memory-core" to "memory".',
79+
'Exclusive slot "memory" switched from "agent-core" to "memory".',
8080
);
8181
});
8282

packages/personas/zee/src/plugins/slots.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const SLOT_BY_KIND: Record<PluginKind, PluginSlotKey> = {
1414
};
1515

1616
const DEFAULT_SLOT_BY_KEY: Record<PluginSlotKey, string> = {
17-
memory: "memory-core",
17+
memory: "agent-core",
1818
};
1919

2020
export function slotKeyForPluginKind(kind?: PluginKind): PluginSlotKey | null {

0 commit comments

Comments
 (0)