Repository navigation
v0.12.1
Fixes the knowledge-graph calls against the real server contract (checked live against
ghcr.io/dakera-ai/dakera:0.12.0; the v0.11.108 server has the same request and response
types). Before this release none of them matched what the server sends or needs.
Changed (breaking for calls that never worked)
memoryLink(sourceId, targetId, { agentId, label? }):POST /v1/memories/{id}/links
requiresagent_id(the agent owning both memories); the old
memoryLink(sourceId, targetId, edgeType)sent none, so every call failed with
422 INVALID_REQUEST(missing fieldagent_id). The server records every explicit link as
linked_by, so the edge-type argument is gone; passing a string as the third argument (the old
call) or omittingagentIdthrows aTypeErrorbefore any request.labelis sent, but the
server does not store it.DakeraDelegationHelper.linkDelegation()(TealTiger integration) takesagentIdand creates a
linked_byedge;getDelegationChain()followslinked_byedges, the type the server stores
delegation links as (it never had adelegated_fromtype, so the old chain was always empty).
Fixed
- Graph edges (
memoryGraph,agentGraphExport,knowledgeQuery,knowledgeExport, the
link answer): the server sendsfrom_id,to_id,edge_type,weight,created_atand no
edge id. Edges are now normalized:from_id/to_idplus the oldersource_id/
target_id(same values) andid: '', so code reading either name works.GraphEdgegains
from_id/to_id. memoryLink()answer: the server answers{from_id, to_id, edge_type};GraphLinkResponse
now has those fields, andedgeis built from them (weight 1.0, as the server stores explicit
links;created_at0 because the answer omits it). It used to beundefined.memoryGraph(): the server answers{root_id, depth, node_count, nodes}with each node's
edges on the node (nodes[].edges), no top-leveledgesand nocontent_preview/
importance.MemoryGraphgainsnode_count;GraphNodegainsedges(the two never-sent
fields are now optional);edgescollects every node's edges (it wasundefined). Thetypes
filter is applied client-side and no longer sent (the route has no such parameter).memoryPath()sent?target=; the route reads?to=, so every call failed with
400 INVALID_REQUEST(missing fieldto). The answer is{from_id, to_id, path, hop_count};
GraphPathgains those fields and keepssource_id/target_id/hopsas the same values
(the never-sentedgesfield is removed).agentGraphExport(): the route always answers JSON
{agent_id, namespace, node_count, edge_count, edges}and ignoresformat, which is no longer
sent (the argument stays so existing calls compile; useknowledgeExport(agentId, 'graphml')
for GraphML).GraphExportnow hasnamespaceandedgesinstead of the never-sent
format/data.memoryEntities(): the server answers{entities, count}withoutmemory_id;
memory_idis now filled from the requested id andcountis typed.recall()/searchMemories()accepttags(the server's request has it; it could not be
sent).- Path segments of the graph routes are URL-encoded.
Tests
- Unit tests use the server's real shapes (the old fixtures encoded the wrong contract), and
check thetoparameter, the link body, theTypeErrorfor old calls, client-side type
filtering,tags, and theagent_idquery ofgetMemory/updateMemory. src/integration.test.tshas a live round trip against the CI server: store two memories,
update, link withagentId, graph, path, export, knowledge query and entities.
What's Changed
Bug Fixes
- fix: graph, link and entities calls match the server (0.12.1) @ferhimedamine (#248)
Full Changelog: v0.12.0...v0.12.1