Metadata-Version: 2.4
Name: algovoi-keystone-adk
Version: 0.5.0
Summary: Carry an AlgoVoi keystone decision into a Google ADK run: a recomputable execution_ref under algovoi.keystone.*, verifiable offline
Author-email: AlgoVoi <chopmob@gmail.com>
License-Expression: Apache-2.0
Project-URL: Repository, https://github.com/chopmob-cloud/algovoi-keystone
Project-URL: Documentation, https://docs.algovoi.co.uk
Project-URL: Homepage, https://www.algovoi.co.uk
Keywords: google-adk,adk,agent,tracing,observability,keystone,execution_ref,jcs,rfc8785,algovoi
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: algovoi-substrate>=0.4.0
Requires-Dist: rfc8785>=0.1.4
Provides-Extra: adk
Requires-Dist: google-adk; extra == "adk"
Dynamic: license-file

# algovoi-keystone-adk

Carry an AlgoVoi keystone decision into a Google ADK run. The decision's content-addressed
`execution_ref` is stamped into the ADK session state under `algovoi.keystone.*` (never inside an
ADK reserved field), so anyone reading the run's events recomputes it offline with only JCS
(RFC 8785) and SHA-256 and confirms the action is consistent with the decision that authorized it.

```python
from algovoi_keystone_adk import keystone_before_agent_callback, verify_trace_execution_ref

agent = LlmAgent(
    ...,
    before_agent_callback=keystone_before_agent_callback(
        decision_ref="sha256:2a444c62...", action_type="payment", scope="bilateral",
        outcome="COMMITTED", executed_at_ms=1716460800000,
    ),
)
# after a run, the keystone metadata is in the session state:
verify_trace_execution_ref(session.state)   # True iff execution_ref recomputes
```

`keystone_state_update(...)` returns the dict if you prefer to merge it into a `State` /
`tool_context.state` yourself. The callback only touches `callback_context.state`, so there is no
version coupling. Apache-2.0.
