trustgraph/trustgraph-base/trustgraph/api
cybermaggedon 2bcf375103
Wire message_id on all answer chunks, fix DAG structure (#748)
Wire message_id on all answer chunks, fix DAG structure message_id:
- Add message_id to AgentAnswer dataclass and propagate in
  socket_client._parse_chunk
- Wire message_id into answer callbacks and send_final_response
  for all three patterns (react, plan-then-execute, supervisor)
- Supervisor decomposition thought and synthesis answer chunks
  now carry message_id

DAG structure fixes:
- Observation derives from sub-trace Synthesis (not Analysis)
  when a tool produces a sub-trace; tracked via
  last_sub_explain_uri on context
- Subagent sessions derive from parent's Decomposition via
  parent_uri on agent_session_triples
- Findings derive from subagent Conclusions (not Decomposition)
- Synthesis derives from all findings (multiple wasDerivedFrom)
  ensuring single terminal node
- agent_synthesis_triples accepts list of parent URIs
- Explainability chain walker follows from sub-trace terminal
  to find downstream Observation

Emit Analysis before tool execution:
- Add on_action callback to react() in agent_manager.py, called
  after reason() but before tool invocation
- Orchestrator and old service emit Analysis+ToolUse triples via
  on_action so sub-traces appear after their parent in the stream
2026-04-01 13:27:41 +01:00
..
__init__.py Split Analysis into Analysis+ToolUse and Observation, add message_id (#747) 2026-03-31 17:51:22 +01:00
api.py Python API docs (#614) 2026-01-15 15:12:32 +00:00
async_bulk_client.py Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
async_flow.py Embeddings API scores (#671) 2026-03-09 10:53:44 +00:00
async_metrics.py Python API implements streaming interfaces (#577) 2025-12-04 17:38:57 +00:00
async_socket_client.py Persistent websocket connections for socket clients and CLI tools (#723) 2026-03-26 16:46:28 +00:00
bulk_client.py Document chunks not stored in vector store (#665) 2026-03-07 23:10:45 +00:00
collection.py Python API docs (#614) 2026-01-15 15:12:32 +00:00
config.py Python API docs (#614) 2026-01-15 15:12:32 +00:00
exceptions.py Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
explainability.py Wire message_id on all answer chunks, fix DAG structure (#748) 2026-04-01 13:27:41 +01:00
flow.py Add semantic pre-filter for GraphRAG edge scoring (#702) 2026-03-21 20:06:29 +00:00
knowledge.py Fix/extraction prov (#662) 2026-03-06 12:23:58 +00:00
library.py Fix/extraction prov (#662) 2026-03-06 12:23:58 +00:00
metrics.py Python API implements streaming interfaces (#577) 2025-12-04 17:38:57 +00:00
socket_client.py Wire message_id on all answer chunks, fix DAG structure (#748) 2026-04-01 13:27:41 +01:00
types.py Wire message_id on all answer chunks, fix DAG structure (#748) 2026-04-01 13:27:41 +01:00