Metadata-Version: 2.4
Name: vcp-sdk
Version: 0.3.0
Summary: Value Context Protocol SDK — portable AI ethics validation
Project-URL: Homepage, https://valuecontextprotocol.org
Project-URL: Repository, https://github.com/Creed-Space/vcp-sdk-python
Project-URL: Documentation, https://valuecontextprotocol.org/docs/sdk
Author-email: Creed Space <hello@creed.space>
License-Expression: Apache-2.0
Keywords: ai,alignment,ethics,safety,values,vcp
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
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
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: jsonschema>=4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Provides-Extra: jsonschema
Requires-Dist: jsonschema>=4.0; extra == 'jsonschema'
Description-Content-Type: text/markdown

# vcp-sdk

Python SDK for the **Value Context Protocol (VCP)** — a standard for encoding
values context (personas, scopes, and behavioral constraints) so AI systems can
carry, validate, and exchange it portably. Zero runtime dependencies.

Learn more at [valuecontextprotocol.org](https://valuecontextprotocol.org).

## Install

```bash
pip install vcp-sdk
```

Python 3.10+. Optional extra `vcp-sdk[jsonschema]` enables JSON-schema
validation of VCP-Lite documents.

## What's in the box

| API | Purpose |
| --- | --- |
| `Token` | Parse and validate VCP/I identity tokens (`family.safe.guide@1.0.0:SEC`) |
| `canonicalize_token`, `tokens_equal`, `uri_to_canonical` | Token normalization helpers |
| `CSM1Code` | Parse and validate VCP/S CSM1 structured codes |
| `validate_lite`, `lite_to_token`, `lite_to_csm1` | Validate VCP-Lite JSON documents and convert them |
| `Context` | Encode/decode full VCP context payloads |

## Quick start

```python
from vcp import Token, CSM1Code, canonicalize_token
from vcp.lite import validate_lite, lite_to_token

# VCP/I tokens
token = Token.parse("family.safe.guide@1.0.0:SEC")

# Normalization
canonicalize_token("Family.Safe.Guide@01.0.0")  # -> "family.safe.guide@1.0.0"

# VCP/S CSM1 codes
code = CSM1Code.parse("Z4+P+T+W:SEC")

# VCP-Lite documents
import json
with open("my-values.vcp-lite.json") as f:
    doc = json.load(f)
errors = validate_lite(doc)  # [] when valid, list of messages otherwise
if not errors:
    print(lite_to_token(doc))
```

Parse failures raise `ValueError` with a message describing the grammar
violation; `validate_lite` returns error strings instead of raising.

## Command-line validation

The [`creed-space-cli`](https://pypi.org/project/creed-space-cli/) package
builds a lint-style CLI on top of this SDK:

```bash
creed vcp validate family.safe.guide@1.0.0
creed vcp parse "Z4+P+T+W:SEC"
```

## License

Apache-2.0. Maintained by [Creed Space](https://creed.space).
