fix(memory): use edge role=child (valid EA2 vocab)
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:
@@ -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[];
|
||||
|
||||
Reference in New Issue
Block a user