cephios-core 0.1.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.
Files changed (46) hide show
  1. cephios_core-0.1.0/.gitattributes +6 -0
  2. cephios_core-0.1.0/.github/workflows/ci.yml +65 -0
  3. cephios_core-0.1.0/.gitignore +24 -0
  4. cephios_core-0.1.0/LICENSE +21 -0
  5. cephios_core-0.1.0/PKG-INFO +116 -0
  6. cephios_core-0.1.0/README.md +88 -0
  7. cephios_core-0.1.0/pyproject.toml +110 -0
  8. cephios_core-0.1.0/src/cephios_core/__init__.py +10 -0
  9. cephios_core-0.1.0/src/cephios_core/buffer.py +766 -0
  10. cephios_core-0.1.0/src/cephios_core/conformance.py +593 -0
  11. cephios_core-0.1.0/src/cephios_core/control.py +553 -0
  12. cephios_core-0.1.0/src/cephios_core/envelope.py +78 -0
  13. cephios_core-0.1.0/src/cephios_core/errors.py +234 -0
  14. cephios_core-0.1.0/src/cephios_core/ingest.py +443 -0
  15. cephios_core-0.1.0/src/cephios_core/keyderiv.py +116 -0
  16. cephios_core-0.1.0/src/cephios_core/py.typed +0 -0
  17. cephios_core-0.1.0/src/cephios_core/uploader.py +266 -0
  18. cephios_core-0.1.0/src/cephios_core/wrapped_dek.py +93 -0
  19. cephios_core-0.1.0/tests/test_buffer.py +517 -0
  20. cephios_core-0.1.0/tests/test_buffer_kc.py +79 -0
  21. cephios_core-0.1.0/tests/test_buffer_nd.py +271 -0
  22. cephios_core-0.1.0/tests/test_buffer_reason.py +78 -0
  23. cephios_core-0.1.0/tests/test_capture_kc.py +129 -0
  24. cephios_core-0.1.0/tests/test_conformance.py +165 -0
  25. cephios_core-0.1.0/tests/test_control.py +430 -0
  26. cephios_core-0.1.0/tests/test_envelope.py +90 -0
  27. cephios_core-0.1.0/tests/test_errors.py +54 -0
  28. cephios_core-0.1.0/tests/test_errors_decode.py +207 -0
  29. cephios_core-0.1.0/tests/test_ingest.py +304 -0
  30. cephios_core-0.1.0/tests/test_kc.py +27 -0
  31. cephios_core-0.1.0/tests/test_key_derivation.py +45 -0
  32. cephios_core-0.1.0/tests/test_permanent_loss.py +139 -0
  33. cephios_core-0.1.0/tests/test_smoke.py +12 -0
  34. cephios_core-0.1.0/tests/test_uploader.py +346 -0
  35. cephios_core-0.1.0/tests/test_vector_pin.py +18 -0
  36. cephios_core-0.1.0/tests/test_wrapped_dek.py +40 -0
  37. cephios_core-0.1.0/tests/vector_loader.py +26 -0
  38. cephios_core-0.1.0/tests/vectors/UPSTREAM.json +16 -0
  39. cephios_core-0.1.0/tests/vectors/v1.0/control_plane_erasure.json +51 -0
  40. cephios_core-0.1.0/tests/vectors/v1.0/envelope_encryption.json +91 -0
  41. cephios_core-0.1.0/tests/vectors/v1.0/envelope_versioning.json +40 -0
  42. cephios_core-0.1.0/tests/vectors/v1.0/error_taxonomy.json +178 -0
  43. cephios_core-0.1.0/tests/vectors/v1.0/ingestion_idempotency.json +47 -0
  44. cephios_core-0.1.0/tests/vectors/v1.0/key_derivation.json +24 -0
  45. cephios_core-0.1.0/tests/vectors/v1.0/session_lifecycle.json +71 -0
  46. cephios_core-0.1.0/tests/vectors/v1.0/wrapped_dek.json +163 -0
@@ -0,0 +1,6 @@
1
+ # Hash-pinned conformance vectors (see tests/vectors/UPSTREAM.json): the SHA-256 pin enforced by
2
+ # tests/test_vector_pin.py requires a byte-identical checkout on every OS. Mark the vector tree as
3
+ # binary (-text) so git performs NO end-of-line conversion at checkout/check-in — in particular,
4
+ # git-for-Windows autocrlf never rewrites LF->CRLF. -text is the unambiguous "never touch these
5
+ # bytes" intent for SHA-pinned data; this is scoped to the vector tree only (no *.py / pyproject).
6
+ tests/vectors/** -text
@@ -0,0 +1,65 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ test:
14
+ name: test (py${{ matrix.python-version }} / ${{ matrix.os }})
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ python-version: ['3.10', '3.11', '3.12', '3.13']
20
+ os: [ubuntu-latest, macos-latest, windows-latest]
21
+ steps:
22
+ - name: checkout
23
+ uses: actions/checkout@v5
24
+
25
+ - name: install uv
26
+ uses: astral-sh/setup-uv@v7
27
+ with:
28
+ python-version: ${{ matrix.python-version }}
29
+ enable-cache: false
30
+
31
+ - name: sync (install package + dev deps)
32
+ run: uv sync
33
+
34
+ - name: lint (ruff)
35
+ run: uv run ruff check .
36
+
37
+ - name: type (mypy)
38
+ run: uv run mypy
39
+
40
+ - name: test (pytest)
41
+ run: uv run pytest
42
+
43
+ - name: conformance (§17.3 gate)
44
+ # Runs the full v1.0 vector suite and enforces the §17.3 per-category thresholds; exits
45
+ # non-zero if any gated category misses. OS-agnostic invocation (python -m, no shell-ism).
46
+ run: uv run python -m cephios_core.conformance
47
+
48
+ build:
49
+ name: build (sdist + wheel)
50
+ runs-on: ubuntu-latest
51
+ steps:
52
+ - name: checkout
53
+ uses: actions/checkout@v5
54
+
55
+ - name: install uv
56
+ uses: astral-sh/setup-uv@v7
57
+ with:
58
+ python-version: '3.12'
59
+ enable-cache: false
60
+
61
+ - name: build
62
+ run: uv build
63
+
64
+ - name: list artifacts
65
+ run: ls -l dist
@@ -0,0 +1,24 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .eggs/
6
+
7
+ # Build artifacts
8
+ build/
9
+ dist/
10
+
11
+ # Virtual environments
12
+ .venv/
13
+ venv/
14
+
15
+ # uv (lock resolved fresh in CI for this scaffold; not committed)
16
+ uv.lock
17
+
18
+ # Tool caches
19
+ .mypy_cache/
20
+ .ruff_cache/
21
+ .pytest_cache/
22
+
23
+ # OS
24
+ .DS_Store
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Cephios
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: cephios-core
3
+ Version: 0.1.0
4
+ Summary: The Python reference implementation of The Cephios Protocol v1.0
5
+ Project-URL: Homepage, https://github.com/cephios/cephios-core
6
+ Project-URL: Repository, https://github.com/cephios/cephios-core
7
+ Project-URL: Conformance suite, https://github.com/cephios/protocol-tests
8
+ Author: Cephios
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: cephios,conformance,encryption,neural-data,protocol
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Security :: Cryptography
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: apsw>=3.47
23
+ Requires-Dist: argon2-cffi>=23.1
24
+ Requires-Dist: cryptography>=42
25
+ Requires-Dist: httpx>=0.27
26
+ Provides-Extra: conformance
27
+ Description-Content-Type: text/markdown
28
+
29
+ # cephios-core
30
+
31
+ The Python reference implementation of **The Cephios Protocol, version 1.0** — the
32
+ language-independent wire protocol for end-to-end-encrypted neural-data capture and ingestion.
33
+
34
+ `cephios-core` implements the **client side** of the protocol (the device/SDK side that runs on
35
+ the tenant's own machine). It is verified against the published [conformance test-vector
36
+ suite](https://github.com/cephios/protocol-tests): it passes every §17.3 gated category — the six
37
+ 100%-threshold categories (`envelope_encryption`, `wrapped_dek`, `key_derivation`,
38
+ `error_taxonomy`, `envelope_versioning`, `control_plane_erasure`) and `ingestion_idempotency`
39
+ (threshold ≥ 90%). `session_lifecycle` is executed and reported but is not a §17.3 gating criterion.
40
+
41
+ ## Install
42
+
43
+ ```bash
44
+ pip install cephios-core
45
+ ```
46
+
47
+ Requires **Python 3.10+**. Runtime dependencies: `cryptography`, `httpx`, `argon2-cffi`, `apsw`.
48
+
49
+ ## What it implements
50
+
51
+ Each surface is exposed from its own submodule (the top-level package deliberately exports only
52
+ `__version__`):
53
+
54
+ - **Argon2id member-key derivation** (`cephios_core.keyderiv`) — §5.2/§5.3 derivation of the
55
+ X25519 private-key seed + auth-verification token from a master password, client-side only.
56
+ - **AES-256-GCM envelope** (`cephios_core.envelope`) — §6.1/§6.4/§6.5 `construct` (fresh random
57
+ nonce) / `deconstruct`, with the 16-byte header bound as AEAD associated data.
58
+ - **X25519-ECIES wrapped DEK** (`cephios_core.wrapped_dek`) — §6.3 `wrap_dek` / `unwrap_dek` of
59
+ the 76-byte wrapped-DEK envelope.
60
+ - **Durable ingestion buffer + uploader** (`cephios_core.buffer`, `cephios_core.ingest`,
61
+ `cephios_core.uploader`) — the §7 HTTP ingestion path (`POST /v1/ingest`, raw octet-stream body)
62
+ with a **persist-before-ack, never-silent** local buffer (four typed events —
63
+ `BufferPressure` / `BufferDrop` / `BufferRejected` / `BufferLost`) and the §7.7.4 disposition
64
+ uploader (200 → purge; 429 → retain + honor `Retry-After`; 5xx → retain + retry;
65
+ non-retryable 4xx → emit-then-purge). The `capture()` path encrypts **before** the record
66
+ reaches the buffer, so the buffer only ever holds ciphertext.
67
+ - **Control-plane + key-management client** (`cephios_core.control`) — §9 sessions
68
+ (open / close / read), the §8 wrapped-DEK HTTP shapes (public-key upload, wrapped-DEK
69
+ upload / fetch / revoke), and §10.5 subject erasure.
70
+ - **Typed error taxonomy** (`cephios_core.errors`) — the full §14 twelve-category `CephiosError`
71
+ hierarchy and the §14.1 wire-error decoder.
72
+
73
+ The network client is async-first (`httpx.AsyncClient`) with a synchronous facade; the crypto and
74
+ the buffer are synchronous.
75
+
76
+ ## Example
77
+
78
+ ```python
79
+ import os
80
+ from cephios_core.envelope import construct, deconstruct
81
+
82
+ dek = os.urandom(32) # 32-byte AES-256 data-encryption key
83
+ plaintext = b"neural-sample-bytes"
84
+ envelope = construct(dek, plaintext) # §6.4 — fresh random nonce per call
85
+ assert deconstruct(envelope, dek) == plaintext
86
+ ```
87
+
88
+ ## Conformance
89
+
90
+ The package ships a runner that executes the published v1.0 vectors and enforces the §17.3
91
+ thresholds, exiting non-zero if any gated category misses. The vectors are **not** bundled in the
92
+ wheel (they are the separate [cephios/protocol-tests](https://github.com/cephios/protocol-tests)
93
+ suite), so pass the vector directory explicitly:
94
+
95
+ ```bash
96
+ cephios-conformance path/to/protocol-tests/v1.0
97
+ # equivalently: python -m cephios_core.conformance path/to/protocol-tests/v1.0
98
+ ```
99
+
100
+ ## Status & limits
101
+
102
+ This is an early (**0.1.0**) release. The client-side v1.0 surface above is implemented and passes
103
+ the published §17.3 conformance suite, but the public API may still evolve and the package is not
104
+ yet production-hardened. The buffer's durability is proven against a **process kill** (a real
105
+ SIGKILL of a subprocess mid-write, after which acked records survive on reopen); power-loss /
106
+ kernel-crash durability is not yet independently proven. The Cephios cloud/server is a separate
107
+ system and is **not** part of this package, and the realtime protocol (§11) is not implemented here.
108
+
109
+ ## References
110
+
111
+ - Protocol specification: *The Cephios Protocol, version 1.0* (`CONTRACT_SPEC.md`).
112
+ - Conformance test-vector suite: [cephios/protocol-tests](https://github.com/cephios/protocol-tests).
113
+
114
+ ## License
115
+
116
+ MIT — see [LICENSE](https://github.com/cephios/cephios-core/blob/main/LICENSE).
@@ -0,0 +1,88 @@
1
+ # cephios-core
2
+
3
+ The Python reference implementation of **The Cephios Protocol, version 1.0** — the
4
+ language-independent wire protocol for end-to-end-encrypted neural-data capture and ingestion.
5
+
6
+ `cephios-core` implements the **client side** of the protocol (the device/SDK side that runs on
7
+ the tenant's own machine). It is verified against the published [conformance test-vector
8
+ suite](https://github.com/cephios/protocol-tests): it passes every §17.3 gated category — the six
9
+ 100%-threshold categories (`envelope_encryption`, `wrapped_dek`, `key_derivation`,
10
+ `error_taxonomy`, `envelope_versioning`, `control_plane_erasure`) and `ingestion_idempotency`
11
+ (threshold ≥ 90%). `session_lifecycle` is executed and reported but is not a §17.3 gating criterion.
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ pip install cephios-core
17
+ ```
18
+
19
+ Requires **Python 3.10+**. Runtime dependencies: `cryptography`, `httpx`, `argon2-cffi`, `apsw`.
20
+
21
+ ## What it implements
22
+
23
+ Each surface is exposed from its own submodule (the top-level package deliberately exports only
24
+ `__version__`):
25
+
26
+ - **Argon2id member-key derivation** (`cephios_core.keyderiv`) — §5.2/§5.3 derivation of the
27
+ X25519 private-key seed + auth-verification token from a master password, client-side only.
28
+ - **AES-256-GCM envelope** (`cephios_core.envelope`) — §6.1/§6.4/§6.5 `construct` (fresh random
29
+ nonce) / `deconstruct`, with the 16-byte header bound as AEAD associated data.
30
+ - **X25519-ECIES wrapped DEK** (`cephios_core.wrapped_dek`) — §6.3 `wrap_dek` / `unwrap_dek` of
31
+ the 76-byte wrapped-DEK envelope.
32
+ - **Durable ingestion buffer + uploader** (`cephios_core.buffer`, `cephios_core.ingest`,
33
+ `cephios_core.uploader`) — the §7 HTTP ingestion path (`POST /v1/ingest`, raw octet-stream body)
34
+ with a **persist-before-ack, never-silent** local buffer (four typed events —
35
+ `BufferPressure` / `BufferDrop` / `BufferRejected` / `BufferLost`) and the §7.7.4 disposition
36
+ uploader (200 → purge; 429 → retain + honor `Retry-After`; 5xx → retain + retry;
37
+ non-retryable 4xx → emit-then-purge). The `capture()` path encrypts **before** the record
38
+ reaches the buffer, so the buffer only ever holds ciphertext.
39
+ - **Control-plane + key-management client** (`cephios_core.control`) — §9 sessions
40
+ (open / close / read), the §8 wrapped-DEK HTTP shapes (public-key upload, wrapped-DEK
41
+ upload / fetch / revoke), and §10.5 subject erasure.
42
+ - **Typed error taxonomy** (`cephios_core.errors`) — the full §14 twelve-category `CephiosError`
43
+ hierarchy and the §14.1 wire-error decoder.
44
+
45
+ The network client is async-first (`httpx.AsyncClient`) with a synchronous facade; the crypto and
46
+ the buffer are synchronous.
47
+
48
+ ## Example
49
+
50
+ ```python
51
+ import os
52
+ from cephios_core.envelope import construct, deconstruct
53
+
54
+ dek = os.urandom(32) # 32-byte AES-256 data-encryption key
55
+ plaintext = b"neural-sample-bytes"
56
+ envelope = construct(dek, plaintext) # §6.4 — fresh random nonce per call
57
+ assert deconstruct(envelope, dek) == plaintext
58
+ ```
59
+
60
+ ## Conformance
61
+
62
+ The package ships a runner that executes the published v1.0 vectors and enforces the §17.3
63
+ thresholds, exiting non-zero if any gated category misses. The vectors are **not** bundled in the
64
+ wheel (they are the separate [cephios/protocol-tests](https://github.com/cephios/protocol-tests)
65
+ suite), so pass the vector directory explicitly:
66
+
67
+ ```bash
68
+ cephios-conformance path/to/protocol-tests/v1.0
69
+ # equivalently: python -m cephios_core.conformance path/to/protocol-tests/v1.0
70
+ ```
71
+
72
+ ## Status & limits
73
+
74
+ This is an early (**0.1.0**) release. The client-side v1.0 surface above is implemented and passes
75
+ the published §17.3 conformance suite, but the public API may still evolve and the package is not
76
+ yet production-hardened. The buffer's durability is proven against a **process kill** (a real
77
+ SIGKILL of a subprocess mid-write, after which acked records survive on reopen); power-loss /
78
+ kernel-crash durability is not yet independently proven. The Cephios cloud/server is a separate
79
+ system and is **not** part of this package, and the realtime protocol (§11) is not implemented here.
80
+
81
+ ## References
82
+
83
+ - Protocol specification: *The Cephios Protocol, version 1.0* (`CONTRACT_SPEC.md`).
84
+ - Conformance test-vector suite: [cephios/protocol-tests](https://github.com/cephios/protocol-tests).
85
+
86
+ ## License
87
+
88
+ MIT — see [LICENSE](https://github.com/cephios/cephios-core/blob/main/LICENSE).
@@ -0,0 +1,110 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "cephios-core"
7
+ dynamic = ["version"]
8
+ description = "The Python reference implementation of The Cephios Protocol v1.0"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [{ name = "Cephios" }]
14
+ keywords = ["cephios", "neural-data", "encryption", "protocol", "conformance"]
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Intended Audience :: Developers",
18
+ "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Topic :: Security :: Cryptography",
25
+ ]
26
+ dependencies = [
27
+ "cryptography>=42",
28
+ "httpx>=0.27",
29
+ "argon2-cffi>=23.1",
30
+ # apsw is the §7.7.1 SDK durable-buffer storage engine (WAL + synchronous=FULL).
31
+ # Lower-bound pin only, NO upper cap: apsw uses SQLite-style versioning, NOT semver.
32
+ # Its version is <bundled-SQLite-version>.<apsw-packaging-revision> (e.g. 3.47.0.0 =
33
+ # SQLite 3.47.0, apsw rev 0). The leading "3" is SQLite's major, not a semver
34
+ # breaking-change boundary, so a `>=X,<4` cap would be wrong. The 3.47 floor selects a
35
+ # SQLite (Oct 2024) whose WAL + synchronous + PRAGMA features (all present since SQLite
36
+ # 3.7) we rely on, and which ships cp310-cp313 manylinux/macos/win wheels (the CI matrix).
37
+ "apsw>=3.47",
38
+ ]
39
+
40
+ [project.optional-dependencies]
41
+ # Conformance-runner extra (Group 12 Commit 6). Intentionally EMPTY: the §17.3 runner
42
+ # (cephios_core.conformance) drives only the in-package crypto + the httpx-based clients, and
43
+ # httpx is already a core dependency — so the runner needs ZERO additional dependencies. The
44
+ # extra name is kept stable (declared in C2) for forward compatibility; install plain
45
+ # `cephios-core` and run `cephios-conformance` (or `python -m cephios_core.conformance`).
46
+ conformance = []
47
+
48
+ # The §17.3 conformance runner CLI (Group 12 Commit 6). OS-agnostic console entry point; CI
49
+ # invokes `python -m cephios_core.conformance` (equivalent) so it does not depend on the script
50
+ # being on PATH across the {ubuntu,macos,windows} matrix.
51
+ [project.scripts]
52
+ cephios-conformance = "cephios_core.conformance:main"
53
+
54
+ [project.urls]
55
+ Homepage = "https://github.com/cephios/cephios-core"
56
+ Repository = "https://github.com/cephios/cephios-core"
57
+ "Conformance suite" = "https://github.com/cephios/protocol-tests"
58
+
59
+ [dependency-groups]
60
+ dev = [
61
+ "ruff>=0.6",
62
+ "mypy>=1.11",
63
+ "pytest>=8",
64
+ ]
65
+
66
+ [tool.hatch.version]
67
+ path = "src/cephios_core/__init__.py"
68
+
69
+ [tool.hatch.build.targets.wheel]
70
+ packages = ["src/cephios_core"]
71
+
72
+ # hatchling does not ship non-.py package data by default; force-include the PEP 561
73
+ # marker so an installed cephios-core is type-checkable (the by-package mypy gate).
74
+ [tool.hatch.build.targets.wheel.force-include]
75
+ "src/cephios_core/py.typed" = "cephios_core/py.typed"
76
+
77
+ [tool.ruff]
78
+ line-length = 100
79
+ target-version = "py310"
80
+
81
+ [tool.ruff.lint]
82
+ select = ["E", "F", "I", "UP", "B", "W"]
83
+
84
+ [tool.ruff.lint.isort]
85
+ known-first-party = ["cephios_core", "vector_loader"]
86
+
87
+ [tool.mypy]
88
+ python_version = "3.10"
89
+ strict = true
90
+ packages = ["cephios_core"]
91
+
92
+ # apsw (3.53.x) ships a PEP 646 stub: apsw/__init__.pyi:138 uses `*tuple[...]` unpacking in a
93
+ # subscript, valid only on Python >=3.11. Under the 3.10-target check the 3.10-interpreter CI
94
+ # cells reject it at parse time (Invalid syntax), failing the gate on a third-party stub — not
95
+ # our code. Keep apsw opaque to mypy (skip following its stub); cephios_core stays strict.
96
+ [[tool.mypy.overrides]]
97
+ # Both the top-level `apsw` module (where the offending __init__.pyi:138 lives, reached via
98
+ # `import apsw`) and any submodules: the `apsw.*` wildcard alone does NOT cover `apsw` itself.
99
+ module = ["apsw", "apsw.*"]
100
+ follow_imports = "skip"
101
+ # apsw ships a .pyi stub; `follow_imports = skip` does NOT apply to stub files unless
102
+ # follow_imports_for_stubs is also set (it defaults to false), so this key is what actually
103
+ # stops mypy parsing apsw/__init__.pyi:138.
104
+ follow_imports_for_stubs = true
105
+ ignore_missing_imports = true
106
+
107
+ [tool.pytest.ini_options]
108
+ testpaths = ["tests"]
109
+ addopts = "-ra"
110
+ pythonpath = ["tests"]
@@ -0,0 +1,10 @@
1
+ """cephios-core — the Python reference implementation of The Cephios Protocol v1.0.
2
+
3
+ This module is the single source of truth for the package version: hatchling reads
4
+ ``__version__`` here via ``[tool.hatch.version]`` in ``pyproject.toml``. The protocol
5
+ surface itself (key derivation, envelope, wrapped-DEK, ingestion, buffer, errors) is
6
+ implemented in subsequent Group 12 commits; this scaffold deliberately exposes nothing
7
+ beyond the version so the public API can be added deliberately under the IS commitment.
8
+ """
9
+
10
+ __version__ = "0.1.0"