fix(memory): use edge role=child (valid EA2 vocab)
build-and-publish / test (push) Has been cancelled
build-and-publish / image (push) Has been cancelled

Probed backend's defines edge role vocabulary. Accepted: child,
dispatch. Rejected: memory, observation, note, recall, vault, step,
view. Switching from invalid 'memory' to valid 'child' so the edge
attach actually lands without 500.
This commit is contained in:
canvas-bot
2026-06-16 21:21:52 +04:00
parent 2b91368a23
commit 14a98056ed
+2 -2
View File
@@ -94,7 +94,7 @@ export const agentMemory = {
body: JSON.stringify({
request_id: newRequestId(),
ops: [
{ op: "create_edge", edge_coll: "defines", from: `flow/${vaultKey}`, to: `flow/${mem._key}`, role: "memory" },
{ op: "create_edge", edge_coll: "defines", from: `flow/${vaultKey}`, to: `flow/${mem._key}`, role: "child" },
],
}),
signal,
@@ -116,7 +116,7 @@ export const agentMemory = {
if (!edgesRes.ok) return [];
const edges = (await edgesRes.json())?.items || [];
const memKeys = (edges as any[])
.filter((e) => e?.role === "memory" || e?.role === "presentation")
.filter((e) => e?.role === "child" || e?.role === "presentation")
.map((e) => (e._to || "").split("/").pop())
.filter(Boolean)
.slice(0, cap) as string[];