vcp-sdk 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,316 @@
1
+ # Local per-collaborator overrides (top of Scope Hierarchy; must not be committed)
2
+ CLAUDE.local.md
3
+
4
+ # Build artifacts
5
+ bin/creed-crypto
6
+
7
+ # Dependencies
8
+ node_modules
9
+ node_modules/
10
+ .pnp
11
+ .pnp.js
12
+ venv/
13
+ __pycache__/
14
+ *.pyc
15
+ *.pyo
16
+ *.pyd
17
+ .Python
18
+ .mypy_cache/
19
+ env/
20
+ build/
21
+ dist/
22
+ *.egg-info/
23
+
24
+ # Testing
25
+ coverage/
26
+ *.lcov
27
+ .nyc_output
28
+ .coverage
29
+ .coverage.*
30
+ htmlcov/
31
+ .pytest_cache/
32
+
33
+ # Production
34
+ /build
35
+ /dist
36
+ */dist
37
+ */build
38
+
39
+ # SvelteKit build artifacts
40
+ .svelte-kit/
41
+ */.svelte-kit/
42
+
43
+ # Logs and output files
44
+ logs
45
+ *.log
46
+ *.out
47
+
48
+ # Backup files
49
+ *.bak
50
+ *.backup
51
+ *.old
52
+ npm-debug.log*
53
+ yarn-debug.log*
54
+ yarn-error.log*
55
+ pnpm-debug.log*
56
+ lerna-debug.log*
57
+
58
+ # Environment (comprehensive — covers .env, .env.*, and *.env)
59
+ .env
60
+ .env.*
61
+ *.env
62
+
63
+ # IDE
64
+ .vscode/*
65
+ !.vscode/extensions.json
66
+ !.vscode/settings.json.example
67
+ .idea
68
+ *.swp
69
+ *.swo
70
+ *~
71
+ .DS_Store
72
+ # macOS AppleDouble sidecars and archive metadata (non-UTF-8; crash py scans)
73
+ ._*
74
+ __MACOSX/
75
+
76
+ # Turborepo
77
+ .turbo
78
+
79
+ # Changesets
80
+ .changeset/
81
+
82
+ # Temporary
83
+ tmp/
84
+ temp/
85
+ *.tmp
86
+
87
+ # Production PostgreSQL configuration
88
+ .env.production.postgresql
89
+ .mypy_baseline.json
90
+
91
+ # Test artifacts and reports
92
+ test_artifacts/
93
+ test-results/
94
+ test_results/
95
+ test_reports/
96
+ reports/memory/
97
+ reports/fagan/
98
+ reports/performance/
99
+ reports/qa/
100
+ reports/qa-crawl/*/
101
+ output/playwright/
102
+ test*.db
103
+ dump.rdb
104
+
105
+ # Large regenerable artifacts — build output, research dumps (never in git history)
106
+ superego-frontend/output/
107
+ research/fablereconstruction/
108
+
109
+ # SSL private material (never commit secrets)
110
+ ssl/*.key
111
+ ssl/*.srl
112
+ ssl/*.csr
113
+
114
+ # Temporary test files
115
+ test-*.html
116
+ test-*.js
117
+ test_*.html
118
+ test_*.js
119
+
120
+ # Report files in root (should be in reports/)
121
+ *_report*.json
122
+ *_report*.md
123
+ fagan*.json
124
+ memory_leak*.json
125
+ smart_memory*.json
126
+ security-scan*.json
127
+ # Re-assert env exclusions for nested paths
128
+ config/*.env
129
+ superego-frontend/.env*
130
+ !.env.example
131
+ !.env.template
132
+ !.env.staging.example
133
+ !superego-frontend/.env.example
134
+ data/sessions/superego.db
135
+ docs/UVC_CSM_EMOJI_DUMP.md
136
+ *.db
137
+ *.db-shm
138
+ *.db-wal
139
+
140
+
141
+ # Signing keys (never commit private key material)
142
+ *.key
143
+ data/constitutions/registry/.keys/signing.key
144
+ data/attestation_keys/*.pem
145
+
146
+ # Browser/session state
147
+ cookies.txt
148
+ **/cookies.txt
149
+
150
+ # Secrets directory (salts, encrypted keys — never commit)
151
+ data/secrets/
152
+ # Local JWT/encryption key material (finding #6: .secrets/jwt_secret has no .key suffix
153
+ # so *.key alone did not cover it). Rotate + untrack existing tracked copies separately.
154
+ .secrets/
155
+
156
+ # GPG keyring (contains private key)
157
+ data/keys/.gnupg/
158
+ .venv
159
+ .venv_check/
160
+
161
+ # Coverage reports
162
+ coverage.xml
163
+
164
+ # Test artifacts in registry
165
+ data/constitutions/registry/test_safety_*.json
166
+
167
+ # ML Model Cache
168
+ .cache/
169
+ # Hypothesis database (property-based testing)
170
+ .hypothesis/
171
+ .mcp.json
172
+
173
+ # Runtime data (not source code)
174
+ data/compliance_reports/
175
+ data/gdpr_trust_states.json
176
+ data/billing/dead_letters/
177
+ data/audit_logs/
178
+ services/data/audit_logs/
179
+ profiling_data/
180
+ memory/superego/welfare/
181
+ :memory:
182
+
183
+ # Flash Review Cache
184
+ .flash_findings.json
185
+ .flash_full_review_checkpoint.json
186
+ .review_for_claude.diff
187
+ reports/flash_full_review_*.json
188
+ reports/flash_full_review_*.md
189
+ reports/red_team_audit/
190
+ data/deployment_snapshots/snapshot_*/
191
+ archives/reports/untracked/
192
+
193
+ # Runtime audit logs (regenerated, can contain sensitive session metadata)
194
+ data/audit/*.jsonl
195
+
196
+ # Security audit reports (regenerable, large files)
197
+ archives/docs/security/security_audit_*.json
198
+ archives/docs/security/security_audit_*.txt
199
+ archives/docs/security/type_safety_report.json
200
+ **/security_audit_*.json
201
+ **/security_audit_*.txt
202
+
203
+ # Gitleaks and security scan reports (regenerable)
204
+ gitleaks-report.json
205
+ bandit_report.json
206
+
207
+ # UVC debug dumps (keep UVC_CSM_EMOJI_COMPLETE_DUMP.json - it's conversation history)
208
+
209
+ # Playwright MCP artifacts
210
+ .playwright-mcp/
211
+
212
+ # LibreOffice lock files
213
+ .~lock.*
214
+
215
+ # Claude Code agent execution logs
216
+ .code/agents/*/exec-call_*.txt
217
+ # Claude Code agent worktrees (isolated agent copies)
218
+ .claude/worktrees/
219
+ .flash_costs.json
220
+
221
+ # Large benchmark results (use Git LFS or external storage)
222
+ benchmarks/results/*.jsonl
223
+ logs/flash_review.log
224
+
225
+ # Archived audit logs (local reference only)
226
+ archives/audit_logs/
227
+
228
+ # Mutation Testing
229
+ reports/mutation/*.html
230
+ reports/mutation/*.json
231
+ reports/mutation/*.sqlite
232
+ reports/mutation/*.toml
233
+ superego-frontend/mutation-report/
234
+ superego-frontend/mutation-report.json
235
+ superego-frontend/.stryker-tmp/
236
+ superego-frontend/.stryker-tmp-*/
237
+ .stryker-tmp/
238
+ .stryker-tmp-*/
239
+
240
+ # Performance benchmark baselines
241
+ .benchmarks/
242
+ # Rust build artifacts
243
+ crates/*/target/
244
+ /target/
245
+
246
+ # Session diaries and retrospectives (PRIVATE - never commit)
247
+ memory/diary/
248
+ memory/retrospective/
249
+ scripts/test_api_keys.py
250
+
251
+ # Vector stores (too large for GitHub)
252
+ memory/vector_stores/
253
+
254
+ # Session transcript backups (local only)
255
+ memory/transcript_backups/
256
+ mettle-api/
257
+
258
+ # Screenshots (use archives/ or external storage)
259
+ *.png
260
+ *.jpg
261
+ *.jpeg
262
+ !superego-frontend/static/**/*.png
263
+ !superego-frontend/static/**/*.jpg
264
+ !docs/**/*.png
265
+ # public/ is the served static-asset dir — its brand images are deliberate app
266
+ # assets, not screenshots. Without this, *.png assets there 404 in every deploy
267
+ # (e.g. creed-logo.png → blank hero wave) while .webp siblings ship fine.
268
+ !superego-frontend/public/**/*.png
269
+ !superego-frontend/public/**/*.jpg
270
+ !superego-frontend/public/**/*.jpeg
271
+ ~$lue Context Protocol MDPI I3D1.docx
272
+
273
+ # Runtime state (process IDs, lock files)
274
+ .backend.pid
275
+ .frontend.pid
276
+ .claude/scheduled_tasks.lock
277
+
278
+ # Playwright CLI local snapshots (distinct from .playwright-mcp)
279
+ .playwright-cli/
280
+ creed_guardian/models/
281
+
282
+ # Model weights (large binaries)
283
+ weights/
284
+ *.gguf
285
+
286
+ # Paper preparation scripts (moved to _papers/scripts/)
287
+ apply_i3d8_*.py
288
+ diag_*.py
289
+ fix_narrative*.py
290
+ restore_*.py
291
+ validate_docx.py
292
+ deep_validate.py
293
+ compare_structure.py
294
+ check_ordering.py
295
+ minimal_edit.py
296
+ test_repack.py
297
+ test_minimal_edit.py
298
+ diff_parts.py
299
+ probe_refs.py
300
+ strip_numpr_refs.py
301
+ find_*.py
302
+
303
+ # VCP concordance debug artifacts (binary, not source)
304
+ *.docx
305
+
306
+ # Fagan reports and audit artifacts
307
+ fagan_*.md
308
+ *_fagan_report*.md
309
+ *_audit_report*.md
310
+
311
+ # design-sync upload staging (regenerable; source of truth is the claude.ai/design project + .design-sync/)
312
+ ds-bundle/
313
+ fleet-server/target/
314
+
315
+ # freeze skill session config (per-checkout, not shared)
316
+ .claude/skills/freeze/.active-freeze.json
vcp_sdk-0.3.0/PKG-INFO ADDED
@@ -0,0 +1,95 @@
1
+ Metadata-Version: 2.4
2
+ Name: vcp-sdk
3
+ Version: 0.3.0
4
+ Summary: Value Context Protocol SDK — portable AI ethics validation
5
+ Project-URL: Homepage, https://valuecontextprotocol.org
6
+ Project-URL: Repository, https://github.com/Creed-Space/vcp-sdk-python
7
+ Project-URL: Documentation, https://valuecontextprotocol.org/docs/sdk
8
+ Author-email: Creed Space <hello@creed.space>
9
+ License-Expression: Apache-2.0
10
+ Keywords: ai,alignment,ethics,safety,values,vcp
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.10
22
+ Provides-Extra: dev
23
+ Requires-Dist: jsonschema>=4.0; extra == 'dev'
24
+ Requires-Dist: pytest>=7.0; extra == 'dev'
25
+ Provides-Extra: jsonschema
26
+ Requires-Dist: jsonschema>=4.0; extra == 'jsonschema'
27
+ Description-Content-Type: text/markdown
28
+
29
+ # vcp-sdk
30
+
31
+ Python SDK for the **Value Context Protocol (VCP)** — a standard for encoding
32
+ values context (personas, scopes, and behavioral constraints) so AI systems can
33
+ carry, validate, and exchange it portably. Zero runtime dependencies.
34
+
35
+ Learn more at [valuecontextprotocol.org](https://valuecontextprotocol.org).
36
+
37
+ ## Install
38
+
39
+ ```bash
40
+ pip install vcp-sdk
41
+ ```
42
+
43
+ Python 3.10+. Optional extra `vcp-sdk[jsonschema]` enables JSON-schema
44
+ validation of VCP-Lite documents.
45
+
46
+ ## What's in the box
47
+
48
+ | API | Purpose |
49
+ | --- | --- |
50
+ | `Token` | Parse and validate VCP/I identity tokens (`family.safe.guide@1.0.0:SEC`) |
51
+ | `canonicalize_token`, `tokens_equal`, `uri_to_canonical` | Token normalization helpers |
52
+ | `CSM1Code` | Parse and validate VCP/S CSM1 structured codes |
53
+ | `validate_lite`, `lite_to_token`, `lite_to_csm1` | Validate VCP-Lite JSON documents and convert them |
54
+ | `Context` | Encode/decode full VCP context payloads |
55
+
56
+ ## Quick start
57
+
58
+ ```python
59
+ from vcp import Token, CSM1Code, canonicalize_token
60
+ from vcp.lite import validate_lite, lite_to_token
61
+
62
+ # VCP/I tokens
63
+ token = Token.parse("family.safe.guide@1.0.0:SEC")
64
+
65
+ # Normalization
66
+ canonicalize_token("Family.Safe.Guide@01.0.0") # -> "family.safe.guide@1.0.0"
67
+
68
+ # VCP/S CSM1 codes
69
+ code = CSM1Code.parse("Z4+P+T+W:SEC")
70
+
71
+ # VCP-Lite documents
72
+ import json
73
+ with open("my-values.vcp-lite.json") as f:
74
+ doc = json.load(f)
75
+ errors = validate_lite(doc) # [] when valid, list of messages otherwise
76
+ if not errors:
77
+ print(lite_to_token(doc))
78
+ ```
79
+
80
+ Parse failures raise `ValueError` with a message describing the grammar
81
+ violation; `validate_lite` returns error strings instead of raising.
82
+
83
+ ## Command-line validation
84
+
85
+ The [`creed-space-cli`](https://pypi.org/project/creed-space-cli/) package
86
+ builds a lint-style CLI on top of this SDK:
87
+
88
+ ```bash
89
+ creed vcp validate family.safe.guide@1.0.0
90
+ creed vcp parse "Z4+P+T+W:SEC"
91
+ ```
92
+
93
+ ## License
94
+
95
+ Apache-2.0. Maintained by [Creed Space](https://creed.space).
@@ -0,0 +1,67 @@
1
+ # vcp-sdk
2
+
3
+ Python SDK for the **Value Context Protocol (VCP)** — a standard for encoding
4
+ values context (personas, scopes, and behavioral constraints) so AI systems can
5
+ carry, validate, and exchange it portably. Zero runtime dependencies.
6
+
7
+ Learn more at [valuecontextprotocol.org](https://valuecontextprotocol.org).
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ pip install vcp-sdk
13
+ ```
14
+
15
+ Python 3.10+. Optional extra `vcp-sdk[jsonschema]` enables JSON-schema
16
+ validation of VCP-Lite documents.
17
+
18
+ ## What's in the box
19
+
20
+ | API | Purpose |
21
+ | --- | --- |
22
+ | `Token` | Parse and validate VCP/I identity tokens (`family.safe.guide@1.0.0:SEC`) |
23
+ | `canonicalize_token`, `tokens_equal`, `uri_to_canonical` | Token normalization helpers |
24
+ | `CSM1Code` | Parse and validate VCP/S CSM1 structured codes |
25
+ | `validate_lite`, `lite_to_token`, `lite_to_csm1` | Validate VCP-Lite JSON documents and convert them |
26
+ | `Context` | Encode/decode full VCP context payloads |
27
+
28
+ ## Quick start
29
+
30
+ ```python
31
+ from vcp import Token, CSM1Code, canonicalize_token
32
+ from vcp.lite import validate_lite, lite_to_token
33
+
34
+ # VCP/I tokens
35
+ token = Token.parse("family.safe.guide@1.0.0:SEC")
36
+
37
+ # Normalization
38
+ canonicalize_token("Family.Safe.Guide@01.0.0") # -> "family.safe.guide@1.0.0"
39
+
40
+ # VCP/S CSM1 codes
41
+ code = CSM1Code.parse("Z4+P+T+W:SEC")
42
+
43
+ # VCP-Lite documents
44
+ import json
45
+ with open("my-values.vcp-lite.json") as f:
46
+ doc = json.load(f)
47
+ errors = validate_lite(doc) # [] when valid, list of messages otherwise
48
+ if not errors:
49
+ print(lite_to_token(doc))
50
+ ```
51
+
52
+ Parse failures raise `ValueError` with a message describing the grammar
53
+ violation; `validate_lite` returns error strings instead of raising.
54
+
55
+ ## Command-line validation
56
+
57
+ The [`creed-space-cli`](https://pypi.org/project/creed-space-cli/) package
58
+ builds a lint-style CLI on top of this SDK:
59
+
60
+ ```bash
61
+ creed vcp validate family.safe.guide@1.0.0
62
+ creed vcp parse "Z4+P+T+W:SEC"
63
+ ```
64
+
65
+ ## License
66
+
67
+ Apache-2.0. Maintained by [Creed Space](https://creed.space).
@@ -0,0 +1,39 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "vcp-sdk"
7
+ version = "0.3.0"
8
+ description = "Value Context Protocol SDK — portable AI ethics validation"
9
+ readme = "README.md"
10
+ license = "Apache-2.0"
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ {name = "Creed Space", email = "hello@creed.space"},
14
+ ]
15
+ keywords = ["ai", "ethics", "values", "alignment", "safety", "vcp"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: Apache Software License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
26
+ "Topic :: Software Development :: Libraries :: Python Modules",
27
+ ]
28
+
29
+ [project.urls]
30
+ Homepage = "https://valuecontextprotocol.org"
31
+ Repository = "https://github.com/Creed-Space/vcp-sdk-python"
32
+ Documentation = "https://valuecontextprotocol.org/docs/sdk"
33
+
34
+ [project.optional-dependencies]
35
+ jsonschema = ["jsonschema>=4.0"]
36
+ dev = ["pytest>=7.0", "jsonschema>=4.0"]
37
+
38
+ [tool.hatch.build.targets.wheel]
39
+ packages = ["src/vcp"]
@@ -0,0 +1,50 @@
1
+ """VCP SDK — Value Context Protocol for portable AI ethics.
2
+
3
+ Validate tokens, parse CSM1 codes, and work with VCP-Lite definitions.
4
+
5
+ >>> from vcp import Token, CSM1Code, validate_lite
6
+ >>> token = Token.parse("family.safe.guide@1.0.0")
7
+ >>> code = CSM1Code.parse("N5+F+E")
8
+ >>> errors = validate_lite({"vcp_version": "lite-1.0", ...})
9
+ """
10
+
11
+ from .context import Context
12
+ from .csm1 import (
13
+ ADHERENCE_BEHAVIORS,
14
+ PERSONA_NAMES,
15
+ SCOPE_CONFLICTS,
16
+ SCOPE_SYNERGIES,
17
+ V2_SCOPE_CHARS,
18
+ CSM1Code,
19
+ Persona,
20
+ Scope,
21
+ check_scope_conflicts,
22
+ )
23
+ from .lite import lite_to_csm1, lite_to_token, validate_lite
24
+ from .token import Token, canonicalize_token, tokens_equal, uri_to_canonical
25
+
26
+ __all__ = [
27
+ # Context (v0.2.0)
28
+ "Context",
29
+ # Token
30
+ "Token",
31
+ "canonicalize_token",
32
+ "tokens_equal",
33
+ "uri_to_canonical",
34
+ # CSM1
35
+ "CSM1Code",
36
+ "Persona",
37
+ "Scope",
38
+ "PERSONA_NAMES",
39
+ "V2_SCOPE_CHARS",
40
+ "SCOPE_CONFLICTS",
41
+ "SCOPE_SYNERGIES",
42
+ "ADHERENCE_BEHAVIORS",
43
+ "check_scope_conflicts",
44
+ # Lite
45
+ "validate_lite",
46
+ "lite_to_csm1",
47
+ "lite_to_token",
48
+ ]
49
+
50
+ __version__ = "0.3.0"