Skip to content

Releases: zenprocess/cacp

v0.2.0 — parse_structured added

26 Apr 16:40

Choose a tag to compare

What's new

  • parse_structured(data: dict) -> CACPResponse | None — new public entry point for consumers with pre-parsed CACP envelopes (e.g. switchyard's `claude -p` JSON output path). Closes #8.
  • CI Python test gate — pytest 3.10 / 3.11 / 3.12 matrix in `ci.yml` (closes #9 prerequisite).

Install

PyPI publish is pending operator setup. Until then, pin to this tag from a git URL:

```bash
pip install "cacp-protocol @ git+https://github.com/zenprocess/cacp.git@v0.2.0#subdirectory=cacp-python\"
```

Or in pyproject.toml:

```toml
dependencies = [
"cacp-protocol @ git+https://github.com/zenprocess/cacp.git@v0.2.0#subdirectory=cacp-python",
]
```

Consumers should pin to `v0.2.0` rather than `main` for reproducible installs.

Consumers

Contract

`parse(text: str) -> CACPResponse | None` — original regex-text parser
`parse_structured(data: dict) -> CACPResponse | None` — new structured-envelope parser

Both return `None` on unparseable input; both normalise STATUS / TESTS / BUILD to lowercase; both enforce canonical vocabulary (no permissive coercion). 40 new tests in `tests/test_structured.py` lock the contract.