Metadata-Version: 2.4
Name: atlas-pca-langgraph
Version: 0.3.0
Summary: LangGraph tool/node guard for Atlas Proof-Carrying Authority (PCA): make every graph tool/node call proof-carrying and policy-gated, with interrupt()-based step-up for risky nodes
Author: Atlas
License-Expression: MIT
Project-URL: Homepage, https://github.com/Atlas-Authorization/pca-python
Project-URL: Repository, https://github.com/Atlas-Authorization/pca-python
Project-URL: Issues, https://github.com/Atlas-Authorization/pca-python/issues
Project-URL: Specification, https://github.com/Atlas-Authorization/pca
Keywords: authorization,agents,proof-carrying-authority,pca,langgraph
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: atlas-pca<0.4,>=0.3.0
Provides-Extra: test-real
Requires-Dist: pytest>=7; extra == "test-real"
Requires-Dist: langgraph==1.2.14; extra == "test-real"
Requires-Dist: langchain-core==1.6.9; extra == "test-real"
Requires-Dist: pytest-asyncio; extra == "test-real"
Provides-Extra: langgraph
Requires-Dist: langgraph>=0.2; extra == "langgraph"
Requires-Dist: langchain-core>=0.3; extra == "langgraph"
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Dynamic: license-file

# atlas-pca-langgraph

LangGraph guard for **Proof-Carrying Authority (PCA)**: make every LangGraph tool call proof-carrying and
policy-gated. A tool only runs when the agent carries a valid, in-plan, resource-correct proof for exactly
that action. The adapter delegates all verification to [`atlas-pca`](https://pypi.org/project/atlas-pca/)
and reimplements no cryptography.

> Status: **0.3.0, unaudited.**

### What is tested

The default test suite runs without the framework, against the shared conformance proofs. A second suite, `make test-real` (needs the framework installed), runs against the real framework and is pinned to LangGraph 1.2.14 with langchain-core 1.6.9. It covers a real `ToolNode` and `StateGraph`: proofs carried in the run config and in graph state, a real `StructuredTool`, and the `interrupt()`/`Command(resume=...)` step-up path (a tampered resume is refused, a valid one proceeds). Each denial test checks that the tool body never ran, and checks the refusal reason wherever the framework surfaces it.

Not covered: other framework versions (only the pinned one is exercised), live model providers (the models are scripted and offline), and any property of the underlying `atlas-pca` verifier beyond what it already documents. This package has not been independently audited.

## Install

```sh
pip install atlas-pca-langgraph
```

This installs `atlas-pca>=0.3.0,<0.4` as a dependency.

## Use

Entry points: `pca_tool / PcaToolNode / pca_guard_node`.

```python
from atlas_pca_langgraph import pca_tool
```

See the module docstrings in `atlas_pca_langgraph` for the full API, and the PCA specification for the model.
The verifier applies the full check order, including `grant_ref_bound` (the signed `grant_ref` must equal
the root capability id), as of `atlas-pca` 0.2.0.

## Links

- Source: https://github.com/Atlas-Authorization/pca-python
- Specification and docs: https://github.com/Atlas-Authorization/pca

License: MIT
