Repository navigation
v0.12.1
Fixes calls whose requests or answers did not match the server. Each was checked against
ghcr.io/dakera-ai/dakera:0.12.0; the v0.11.108 server has the same request and response types.
Fixed
UpdateMemorysendsagent_idas a query parameter (PUT /v1/memory/update/{id}?agent_id=).
Without it every update failed with400 INVALID_REQUEST("missing fieldagent_id"). The
server answers with the memory object itself, which is now returned in
StoreMemoryResponse.Memory(it was always nil); a{"memory": ...}answer is still accepted.MemoryLinksends theagent_idthe server requires (it answered422on every call) and
an optionallabel; it no longer sendsedge_type, which the server ignores (explicit links are
alwayslinked_by). The server's{from_id, to_id, edge_type}answer is parsed:GraphLinkResponse
gainsFromID,ToID,EdgeType, andEdgeis built from them (Weight1.0, the weight of an
explicit link;CreatedAt0 = not sent). An{"edge": ...}answer is still accepted.- Graph edges: the server sends
{from_id, to_id, edge_type, weight, created_at}and no edge
id.GraphEdgenow readsfrom_id/to_idintoSourceID/TargetID(both spellings are
accepted);IDis empty for server edges. This fixes the edges ofMemoryGraph,
AgentGraphExport,KnowledgeQueryandKnowledgeExport, which came back with empty ids. MemoryGraph: the server returns the edges per node (nodes[].edges) plusnode_count;
GraphNode.EdgesandMemoryGraph.NodeCountare added andMemoryGraph.Edgesis collected from
the nodes.GraphOptions.Typesis applied to the returned edges (the server does not filter the
traversal by type).MemoryPathsends the target asto(it senttarget, a400on every call) and reads the
{from_id, to_id, path, hop_count}answer intoSourceID,TargetID,Path,Hops(new:
HopCount).AgentGraphExport: the route always answers JSON{agent_id, namespace, node_count, edge_count, edges};GraphExportgainsNamespaceandEdges,Formatis"json", and the
ignoredformatquery parameter is no longer sent (useKnowledgeExportfor GraphML).MemoryEntities: the server answers{entities, count}without the memory id;
MemoryEntitiesResponse.MemoryIDis now the requested id andCountis added.
Changed (breaking for code that called MemoryLink)
MemoryLink(ctx, sourceID, targetID string, edgeType EdgeType)is now
MemoryLink(ctx, agentID, sourceID, targetID, label string). The old form could not work: the
server requires the agent id, so every call failed with422. Callers that passed anEdgeType
no longer compile, which points them at the change.GraphLinkRequestgainsAgentIDandLabel.
Tests
- httptest coverage of the server's answer shapes for update, link, graph, path, export, knowledge
query and entities, plusTestIntegration_GraphContractRoundTrip, which runs the same calls
against the real server in CI.
What's Changed
Bug Fixes
- fix: graph, link and entities calls match the server (0.12.1) @ferhimedamine (#160)
Full Changelog: v0.12.0...v0.12.1