mixle.experimental.typed_runtime.context_execution module¶
Transactional execution adapters for context graph actions.
- class ContextActionExecutor(graph, adapters=None)[source]
Bases:
objectApply adapter results atomically to a versioned context graph.
- Parameters:
graph (ContextGraph)
adapters (Mapping[ContextActionKind, ContextActionAdapter] | None)
- register(kind, adapter)[source]
Register or deliberately replace one action adapter.
- Parameters:
kind (ContextActionKind)
adapter (Callable[[ContextAction, ContextGraphView], ContextActionResult])
- Return type:
None
- execute(action)[source]
Execute one context action and return success or rollback receipt.
- Parameters:
action (ContextAction)
- Return type:
ContextActionReceipt
- class ContextActionResult(nodes=(), edges=(), verifications=(), remove_nodes=(), external_latency_seconds=0.0, materialized_tokens=0, tool_calls=0, monetary_cost=0.0, measured_information_gain=None, outcome='completed')[source]
Bases:
objectPure graph mutations and actual external work returned by an adapter.
- Parameters: