sum-engine 0.1.0__tar.gz → 0.2.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 (56) hide show
  1. {sum_engine-0.1.0/sum_engine.egg-info → sum_engine-0.2.0}/PKG-INFO +22 -9
  2. {sum_engine-0.1.0 → sum_engine-0.2.0}/README.md +19 -8
  3. {sum_engine-0.1.0 → sum_engine-0.2.0}/pyproject.toml +9 -2
  4. {sum_engine-0.1.0 → sum_engine-0.2.0}/sum_cli/main.py +10 -10
  5. {sum_engine-0.1.0 → sum_engine-0.2.0/sum_engine.egg-info}/PKG-INFO +22 -9
  6. sum_engine-0.2.0/sum_engine.egg-info/SOURCES.txt +52 -0
  7. {sum_engine-0.1.0 → sum_engine-0.2.0}/sum_engine.egg-info/requires.txt +2 -0
  8. sum_engine-0.2.0/sum_engine.egg-info/top_level.txt +2 -0
  9. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/algorithms/semantic_arithmetic.py +3 -3
  10. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/algorithms/syntactic_sieve.py +1 -1
  11. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/automated_scientist.py +5 -5
  12. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/autonomous_agent.py +3 -3
  13. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/causal_triggers.py +4 -4
  14. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/confidence_calibrator.py +1 -1
  15. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/epistemic_loop.py +1 -1
  16. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/extraction_validator.py +1 -1
  17. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/mass_semantic_engine.py +2 -2
  18. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/ouroboros.py +4 -4
  19. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/tome_generator.py +2 -2
  20. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/vector_bridge.py +1 -1
  21. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/akashic_ledger.py +5 -5
  22. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/canonical_codec.py +6 -6
  23. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/p2p_mesh.py +4 -4
  24. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/provenance.py +1 -1
  25. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/telemetry.py +1 -1
  26. sum_engine-0.1.0/sum_engine.egg-info/SOURCES.txt +0 -52
  27. sum_engine-0.1.0/sum_engine.egg-info/top_level.txt +0 -2
  28. {sum_engine-0.1.0 → sum_engine-0.2.0}/LICENSE +0 -0
  29. {sum_engine-0.1.0 → sum_engine-0.2.0}/setup.cfg +0 -0
  30. {sum_engine-0.1.0 → sum_engine-0.2.0}/sum_cli/__init__.py +0 -0
  31. {sum_engine-0.1.0 → sum_engine-0.2.0}/sum_engine.egg-info/dependency_links.txt +0 -0
  32. {sum_engine-0.1.0 → sum_engine-0.2.0}/sum_engine.egg-info/entry_points.txt +0 -0
  33. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/__init__.py +0 -0
  34. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/algorithms/__init__.py +0 -0
  35. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/algorithms/causal_discovery.py +0 -0
  36. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/algorithms/predicate_canon.py +0 -0
  37. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/algorithms/zk_semantics.py +0 -0
  38. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/__init__.py +0 -0
  39. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/epistemic_arbiter.py +0 -0
  40. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/gauge_orchestrator.py +0 -0
  41. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/live_llm_adapter.py +0 -0
  42. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/llm_entailment.py +0 -0
  43. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/semantic_dedup.py +0 -0
  44. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/tome_sliders.py +0 -0
  45. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/ensemble/venn_abers.py +0 -0
  46. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/__init__.py +0 -0
  47. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/jcs.py +0 -0
  48. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/key_manager.py +0 -0
  49. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/prov_o.py +0 -0
  50. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/rate_limiter.py +0 -0
  51. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/resource_guards.py +0 -0
  52. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/scheme_registry.py +0 -0
  53. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/state_encoding.py +0 -0
  54. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/tome_parser.py +0 -0
  55. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/verifiable_credential.py +0 -0
  56. {sum_engine-0.1.0/internal → sum_engine-0.2.0/sum_engine_internal}/infrastructure/zig_bridge.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sum-engine
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: SUM — bidirectional knowledge distillation with optional cryptographic attestation. Pipe prose, get a CanonicalBundle (HMAC / Ed25519 / W3C VC 2.0), verify anywhere.
5
5
  Author: ototao
6
6
  License: Apache-2.0
@@ -34,6 +34,8 @@ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
34
34
  Requires-Dist: mypy>=1.0.0; extra == "dev"
35
35
  Requires-Dist: ruff>=0.1.0; extra == "dev"
36
36
  Requires-Dist: types-setuptools; extra == "dev"
37
+ Requires-Dist: PyJWT>=2.8.0; extra == "dev"
38
+ Requires-Dist: build>=1.0.0; extra == "dev"
37
39
  Provides-Extra: all
38
40
  Requires-Dist: sum-engine[sieve]; extra == "all"
39
41
  Requires-Dist: sum-engine[llm]; extra == "all"
@@ -52,6 +54,17 @@ Dynamic: license-file
52
54
  </em></p>
53
55
 
54
56
  [![SUM Knowledge OS CI](https://github.com/OtotaO/SUM/actions/workflows/quantum-ci.yml/badge.svg)](https://github.com/OtotaO/SUM/actions/workflows/quantum-ci.yml)
57
+ [![PyPI — sum-engine](https://img.shields.io/pypi/v/sum-engine.svg?label=PyPI%20sum-engine)](https://pypi.org/project/sum-engine/)
58
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
59
+ [![Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
60
+
61
+ ```bash
62
+ pip install 'sum-engine[sieve]'
63
+ echo "Alice likes cats. Bob owns a dog." | sum attest --extractor=sieve | sum verify
64
+ # → sum: ✓ verified 2 axiom(s), state integer matches (hmac=absent, ed25519=absent)
65
+ ```
66
+
67
+ Portfolio-facing overview: [`PORTFOLIO.md`](PORTFOLIO.md). Engineering onboarding + deep-dive: below.
55
68
 
56
69
  > **From Tags to Tomes and Back Again — canonical round-trip proven, full pipeline measured.**
57
70
 
@@ -78,7 +91,7 @@ Every headline number below is reproducible via `python -m scripts.bench.run_ben
78
91
  | `record_provenance_batch` sustained throughput | **~22 k ops/sec** (10.2× the single-write path) | empirical-benchmark |
79
92
  | Merkle-chain integrity under concurrent writers | holds (50–200-event bursts) | **provable** (post `9c4139d`) |
80
93
  | Cross-runtime byte-identity fixtures | **131 / 131 passing** across Python ↔ Node.js ↔ Browser JS | empirical-benchmark |
81
- | Test suite | **907 collected** (4 known jwt-missing collection errors) | continuous |
94
+ | Test suite | **1021 collected** (post v0.1.0, with `.[dev]` extras installed) | **provable** |
82
95
 
83
96
  ---
84
97
 
@@ -231,8 +244,8 @@ POST /ouroboros/verify
231
244
  The `TomeSliders` interface parameterizes rendering across five `[0.0, 1.0]` axes:
232
245
 
233
246
  ```python
234
- from internal.ensemble.tome_sliders import TomeSliders
235
- from internal.ensemble.tome_generator import AutoregressiveTomeGenerator
247
+ from sum_engine_internal.ensemble.tome_sliders import TomeSliders
248
+ from sum_engine_internal.ensemble.tome_generator import AutoregressiveTomeGenerator
236
249
 
237
250
  sliders = TomeSliders(
238
251
  density=0.5, # actioned on canonical path (deterministic axiom subsetting)
@@ -245,7 +258,7 @@ tome = generator.generate_controlled(state, sliders)
245
258
  # Output includes slider metadata in the header for reproducibility.
246
259
  ```
247
260
 
248
- **What ships today:** the 5-axis type, validation, `requires_extrapolator()` gate, `header_line()` serialization, and the density axis actioned on the deterministic canonical path via lexicographic subsetting. 21 tests pin the contract. See `internal/ensemble/tome_sliders.py`.
261
+ **What ships today:** the 5-axis type, validation, `requires_extrapolator()` gate, `header_line()` serialization, and the density axis actioned on the deterministic canonical path via lexicographic subsetting. 21 tests pin the contract. See `sum_engine_internal/ensemble/tome_sliders.py`.
249
262
 
250
263
  **What is roadmap:** the other four axes (length, formality, audience, perspective) require an LLM extrapolator and are no-ops on the canonical path today — their values are captured in the output header as metadata so a future LLM-backed renderer can honour them. Per-perspective functorial bridges (category-theoretic mappings between perspective ontologies) are Phase 26 vision, not current capability.
251
264
 
@@ -379,7 +392,7 @@ These are **roadmap items**, not current capabilities. Each is a concrete piece
379
392
  ### Shipped since the last README pass
380
393
  - ✅ **Per-doc logging in the regeneration runner** (commit `02b4413`) — `RegenerationMetrics.per_doc` names the specific (s, p, o) triples that failed entailment so the aggregate FActScore gap is debuggable at the generator-prompt layer.
381
394
  - ✅ **LLM narrative full round-trip runner** (commit `9fd232d`, first measurement `2c252f0`) — composes `LiveLLMAdapter.extract_triplets → generate_text → extract_triplets`, reports per-doc drift. Measured on `seed_v1`: 107.75 % drift / 0.12 exact-match recall. See PROOF_BOUNDARY §2.5.
382
- - ✅ **W3C Verifiable Credentials 2.0 emission + verification** (commit `e007f94`) — pure-Python `eddsa-jcs-2022` Data Integrity path at `internal/infrastructure/verifiable_credential.py` + RFC 8785 JCS at `internal/infrastructure/jcs.py`. 58 tests. Bundles consumable by any VC-compliant ecosystem.
395
+ - ✅ **W3C Verifiable Credentials 2.0 emission + verification** (commit `e007f94`) — pure-Python `eddsa-jcs-2022` Data Integrity path at `sum_engine_internal/infrastructure/verifiable_credential.py` + RFC 8785 JCS at `sum_engine_internal/infrastructure/jcs.py`. 58 tests. Bundles consumable by any VC-compliant ecosystem.
383
396
  - ✅ **Passive-voice truth fix** (commit `b751222`) — sieve now swaps `agent → pobj` into the subject slot and suppresses agentless passives; seed_v2 F1 rose 0.634 → 0.762, precision to 1.000, zero false positives on the difficulty corpus.
384
397
  - ✅ **`record_provenance_batch`** (commit `9ed49bf`) — single-transaction batched ingest; 10.2× throughput (2 k → 22 k ops/sec), within 30 % of the crypto ceiling.
385
398
  - ✅ **Merkle-chain concurrency fix** (commit `9c4139d`) — `BEGIN IMMEDIATE` serialises writers at the SQLite boundary; tamper-detection invariant now holds under concurrent writers (previously silently broke at two-plus parallel appends).
@@ -387,7 +400,7 @@ These are **roadmap items**, not current capabilities. Each is a concrete piece
387
400
  - ✅ **Single-file browser demo** (`single_file_demo/index.html`) — paste any paragraph, press Attest, download a CanonicalBundle JSON; hand it to anyone with Node + `verify.js` for independent verification. Upgrades automatically to LLM-grade extraction when pasted into a Claude artifact conversation via `window.claude.complete` (commit `e5e57b6`).
388
401
 
389
402
  ### Near-term (next 1–2 milestones)
390
- - **LLM wiring for the 4 remaining sliders** — length / formality / audience / perspective. Interface is already shipped in `internal/ensemble/tome_sliders.py`; what's missing is the prompt-conditioning layer that honours each axis.
403
+ - **LLM wiring for the 4 remaining sliders** — length / formality / audience / perspective. Interface is already shipped in `sum_engine_internal/ensemble/tome_sliders.py`; what's missing is the prompt-conditioning layer that honours each axis.
391
404
  - **Calibration fixture authoring for Venn-Abers** — turns zero-width confidence intervals into meaningful bounds. Needs a labelled `(score, was_correct)` set.
392
405
  - **Remaining sieve recall work** — seed_v2 precision is 1.000, recall 0.615; closing the recall gap means apposition / relative-clause / compound-conjunct extraction. All are RECALL misses now, not truth inversions.
393
406
 
@@ -456,9 +469,9 @@ These are vision items; the shipped today is the static artifact above.
456
469
 
457
470
  ---
458
471
 
459
- ## 🛡️ Verification: 907-Test Suite + 131 Cross-Runtime Fixtures
472
+ ## 🛡️ Verification: 1021-Test Suite + 131 Cross-Runtime Fixtures
460
473
 
461
- The test suite covers both proven invariants and empirically-measured properties; each assertion is scoped to the epistemic status of the thing it tests. 907 tests collected; 4 known collection errors are the jwt-module-missing issue in the quantum-router test stack, tracked as an ops item, not a regression.
474
+ The test suite covers both proven invariants and empirically-measured properties; each assertion is scoped to the epistemic status of the thing it tests. 1021 tests collected with the `[dev]` extras installed (`pip install -e '.[sieve,dev]'` or `make install`). CI runs the full suite every push via `.github/workflows/quantum-ci.yml`.
462
475
 
463
476
  ```text
464
477
  Provable (deterministic code + tests that enforce the proof):
@@ -10,6 +10,17 @@
10
10
  </em></p>
11
11
 
12
12
  [![SUM Knowledge OS CI](https://github.com/OtotaO/SUM/actions/workflows/quantum-ci.yml/badge.svg)](https://github.com/OtotaO/SUM/actions/workflows/quantum-ci.yml)
13
+ [![PyPI — sum-engine](https://img.shields.io/pypi/v/sum-engine.svg?label=PyPI%20sum-engine)](https://pypi.org/project/sum-engine/)
14
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
15
+ [![Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
16
+
17
+ ```bash
18
+ pip install 'sum-engine[sieve]'
19
+ echo "Alice likes cats. Bob owns a dog." | sum attest --extractor=sieve | sum verify
20
+ # → sum: ✓ verified 2 axiom(s), state integer matches (hmac=absent, ed25519=absent)
21
+ ```
22
+
23
+ Portfolio-facing overview: [`PORTFOLIO.md`](PORTFOLIO.md). Engineering onboarding + deep-dive: below.
13
24
 
14
25
  > **From Tags to Tomes and Back Again — canonical round-trip proven, full pipeline measured.**
15
26
 
@@ -36,7 +47,7 @@ Every headline number below is reproducible via `python -m scripts.bench.run_ben
36
47
  | `record_provenance_batch` sustained throughput | **~22 k ops/sec** (10.2× the single-write path) | empirical-benchmark |
37
48
  | Merkle-chain integrity under concurrent writers | holds (50–200-event bursts) | **provable** (post `9c4139d`) |
38
49
  | Cross-runtime byte-identity fixtures | **131 / 131 passing** across Python ↔ Node.js ↔ Browser JS | empirical-benchmark |
39
- | Test suite | **907 collected** (4 known jwt-missing collection errors) | continuous |
50
+ | Test suite | **1021 collected** (post v0.1.0, with `.[dev]` extras installed) | **provable** |
40
51
 
41
52
  ---
42
53
 
@@ -189,8 +200,8 @@ POST /ouroboros/verify
189
200
  The `TomeSliders` interface parameterizes rendering across five `[0.0, 1.0]` axes:
190
201
 
191
202
  ```python
192
- from internal.ensemble.tome_sliders import TomeSliders
193
- from internal.ensemble.tome_generator import AutoregressiveTomeGenerator
203
+ from sum_engine_internal.ensemble.tome_sliders import TomeSliders
204
+ from sum_engine_internal.ensemble.tome_generator import AutoregressiveTomeGenerator
194
205
 
195
206
  sliders = TomeSliders(
196
207
  density=0.5, # actioned on canonical path (deterministic axiom subsetting)
@@ -203,7 +214,7 @@ tome = generator.generate_controlled(state, sliders)
203
214
  # Output includes slider metadata in the header for reproducibility.
204
215
  ```
205
216
 
206
- **What ships today:** the 5-axis type, validation, `requires_extrapolator()` gate, `header_line()` serialization, and the density axis actioned on the deterministic canonical path via lexicographic subsetting. 21 tests pin the contract. See `internal/ensemble/tome_sliders.py`.
217
+ **What ships today:** the 5-axis type, validation, `requires_extrapolator()` gate, `header_line()` serialization, and the density axis actioned on the deterministic canonical path via lexicographic subsetting. 21 tests pin the contract. See `sum_engine_internal/ensemble/tome_sliders.py`.
207
218
 
208
219
  **What is roadmap:** the other four axes (length, formality, audience, perspective) require an LLM extrapolator and are no-ops on the canonical path today — their values are captured in the output header as metadata so a future LLM-backed renderer can honour them. Per-perspective functorial bridges (category-theoretic mappings between perspective ontologies) are Phase 26 vision, not current capability.
209
220
 
@@ -337,7 +348,7 @@ These are **roadmap items**, not current capabilities. Each is a concrete piece
337
348
  ### Shipped since the last README pass
338
349
  - ✅ **Per-doc logging in the regeneration runner** (commit `02b4413`) — `RegenerationMetrics.per_doc` names the specific (s, p, o) triples that failed entailment so the aggregate FActScore gap is debuggable at the generator-prompt layer.
339
350
  - ✅ **LLM narrative full round-trip runner** (commit `9fd232d`, first measurement `2c252f0`) — composes `LiveLLMAdapter.extract_triplets → generate_text → extract_triplets`, reports per-doc drift. Measured on `seed_v1`: 107.75 % drift / 0.12 exact-match recall. See PROOF_BOUNDARY §2.5.
340
- - ✅ **W3C Verifiable Credentials 2.0 emission + verification** (commit `e007f94`) — pure-Python `eddsa-jcs-2022` Data Integrity path at `internal/infrastructure/verifiable_credential.py` + RFC 8785 JCS at `internal/infrastructure/jcs.py`. 58 tests. Bundles consumable by any VC-compliant ecosystem.
351
+ - ✅ **W3C Verifiable Credentials 2.0 emission + verification** (commit `e007f94`) — pure-Python `eddsa-jcs-2022` Data Integrity path at `sum_engine_internal/infrastructure/verifiable_credential.py` + RFC 8785 JCS at `sum_engine_internal/infrastructure/jcs.py`. 58 tests. Bundles consumable by any VC-compliant ecosystem.
341
352
  - ✅ **Passive-voice truth fix** (commit `b751222`) — sieve now swaps `agent → pobj` into the subject slot and suppresses agentless passives; seed_v2 F1 rose 0.634 → 0.762, precision to 1.000, zero false positives on the difficulty corpus.
342
353
  - ✅ **`record_provenance_batch`** (commit `9ed49bf`) — single-transaction batched ingest; 10.2× throughput (2 k → 22 k ops/sec), within 30 % of the crypto ceiling.
343
354
  - ✅ **Merkle-chain concurrency fix** (commit `9c4139d`) — `BEGIN IMMEDIATE` serialises writers at the SQLite boundary; tamper-detection invariant now holds under concurrent writers (previously silently broke at two-plus parallel appends).
@@ -345,7 +356,7 @@ These are **roadmap items**, not current capabilities. Each is a concrete piece
345
356
  - ✅ **Single-file browser demo** (`single_file_demo/index.html`) — paste any paragraph, press Attest, download a CanonicalBundle JSON; hand it to anyone with Node + `verify.js` for independent verification. Upgrades automatically to LLM-grade extraction when pasted into a Claude artifact conversation via `window.claude.complete` (commit `e5e57b6`).
346
357
 
347
358
  ### Near-term (next 1–2 milestones)
348
- - **LLM wiring for the 4 remaining sliders** — length / formality / audience / perspective. Interface is already shipped in `internal/ensemble/tome_sliders.py`; what's missing is the prompt-conditioning layer that honours each axis.
359
+ - **LLM wiring for the 4 remaining sliders** — length / formality / audience / perspective. Interface is already shipped in `sum_engine_internal/ensemble/tome_sliders.py`; what's missing is the prompt-conditioning layer that honours each axis.
349
360
  - **Calibration fixture authoring for Venn-Abers** — turns zero-width confidence intervals into meaningful bounds. Needs a labelled `(score, was_correct)` set.
350
361
  - **Remaining sieve recall work** — seed_v2 precision is 1.000, recall 0.615; closing the recall gap means apposition / relative-clause / compound-conjunct extraction. All are RECALL misses now, not truth inversions.
351
362
 
@@ -414,9 +425,9 @@ These are vision items; the shipped today is the static artifact above.
414
425
 
415
426
  ---
416
427
 
417
- ## 🛡️ Verification: 907-Test Suite + 131 Cross-Runtime Fixtures
428
+ ## 🛡️ Verification: 1021-Test Suite + 131 Cross-Runtime Fixtures
418
429
 
419
- The test suite covers both proven invariants and empirically-measured properties; each assertion is scoped to the epistemic status of the thing it tests. 907 tests collected; 4 known collection errors are the jwt-module-missing issue in the quantum-router test stack, tracked as an ops item, not a regression.
430
+ The test suite covers both proven invariants and empirically-measured properties; each assertion is scoped to the epistemic status of the thing it tests. 1021 tests collected with the `[dev]` extras installed (`pip install -e '.[sieve,dev]'` or `make install`). CI runs the full suite every push via `.github/workflows/quantum-ci.yml`.
420
431
 
421
432
  ```text
422
433
  Provable (deterministic code + tests that enforce the proof):
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sum-engine"
7
- version = "0.1.0"
7
+ version = "0.2.0"
8
8
  description = "SUM — bidirectional knowledge distillation with optional cryptographic attestation. Pipe prose, get a CanonicalBundle (HMAC / Ed25519 / W3C VC 2.0), verify anywhere."
9
9
  readme = "README.md"
10
10
  license = { text = "Apache-2.0" }
@@ -49,6 +49,13 @@ dev = [
49
49
  "mypy>=1.0.0",
50
50
  "ruff>=0.1.0",
51
51
  "types-setuptools",
52
+ # Required to collect Tests/test_phase13_zenith.py, test_phase14_ouroboros.py,
53
+ # test_phase15_abi.py, test_browser_extension.py — they reach through
54
+ # api/quantum_router.py which imports jwt. In CI, requirements-prod.txt
55
+ # pulls PyJWT in as a transitive; `pip install -e .[dev]` on a fresh
56
+ # clone should not silently skip those four test files.
57
+ "PyJWT>=2.8.0",
58
+ "build>=1.0.0",
52
59
  ]
53
60
  all = [
54
61
  "sum-engine[sieve]",
@@ -69,7 +76,7 @@ Repository = "https://github.com/OtotaO/SUM"
69
76
  [tool.setuptools.packages.find]
70
77
  # Include the CLI and the core engine modules it depends on. Tests and
71
78
  # scripts are dev-time only and excluded from the distribution.
72
- include = ["sum_cli*", "internal*"]
79
+ include = ["sum_cli*", "sum_engine_internal*"]
73
80
  exclude = ["Tests*", "Tests.*", "scripts*", "api*", "single_file_demo*"]
74
81
 
75
82
  [tool.setuptools.package-data]
@@ -15,7 +15,7 @@ Design notes (read once, explained here so the code stays terse):
15
15
  cold-start fast (`python -c "import sum_cli"` must stay under 100 ms).
16
16
  - Heavy imports (spacy, openai, akashic ledger) are lazy. Loading the
17
17
  module to call --version or --help must NOT drag the whole
18
- internal.algorithms.* tree into memory.
18
+ sum_engine_internal.algorithms.* tree into memory.
19
19
  - Stdin / stdout / stderr contract is Unix-shaped: one thing in, one
20
20
  thing out, diagnostics on stderr, exit code signals success/failure.
21
21
  Agents can pipe sum into jq, into file > bundle.json, into
@@ -69,7 +69,7 @@ def _pick_extractor(override: Optional[str] = None) -> str:
69
69
 
70
70
 
71
71
  def _extract_sieve(text: str) -> list[tuple[str, str, str]]:
72
- from internal.algorithms.syntactic_sieve import DeterministicSieve
72
+ from sum_engine_internal.algorithms.syntactic_sieve import DeterministicSieve
73
73
  sieve = DeterministicSieve() # type: ignore[no-untyped-call]
74
74
  return sieve.extract_triplets(text)
75
75
 
@@ -85,7 +85,7 @@ def _extract_sieve_with_provenance(text: str, source_uri: str):
85
85
  Triples are the same list _extract_sieve would return; the paired
86
86
  form carries the extra evidence the ledger needs.
87
87
  """
88
- from internal.algorithms.syntactic_sieve import DeterministicSieve
88
+ from sum_engine_internal.algorithms.syntactic_sieve import DeterministicSieve
89
89
 
90
90
  sieve = DeterministicSieve() # type: ignore[no-untyped-call]
91
91
  pairs = sieve.extract_with_provenance(text, source_uri=source_uri)
@@ -95,7 +95,7 @@ def _extract_sieve_with_provenance(text: str, source_uri: str):
95
95
 
96
96
  def _extract_llm(text: str, model: str) -> list[tuple[str, str, str]]:
97
97
  import asyncio
98
- from internal.ensemble.live_llm_adapter import LiveLLMAdapter
98
+ from sum_engine_internal.ensemble.live_llm_adapter import LiveLLMAdapter
99
99
  adapter = LiveLLMAdapter(model=model)
100
100
  return asyncio.run(adapter.extract_triplets(text))
101
101
 
@@ -219,9 +219,9 @@ def cmd_attest(args: argparse.Namespace) -> int:
219
219
  # Build the CanonicalBundle via the existing codec path — no
220
220
  # reimplementation of Ed25519/HMAC, no reimplementation of canonical
221
221
  # tome generation. The CLI is a thin wrapper.
222
- from internal.algorithms.semantic_arithmetic import GodelStateAlgebra
223
- from internal.ensemble.tome_generator import AutoregressiveTomeGenerator
224
- from internal.infrastructure.canonical_codec import CanonicalCodec
222
+ from sum_engine_internal.algorithms.semantic_arithmetic import GodelStateAlgebra
223
+ from sum_engine_internal.ensemble.tome_generator import AutoregressiveTomeGenerator
224
+ from sum_engine_internal.infrastructure.canonical_codec import CanonicalCodec
225
225
 
226
226
  key_manager = _load_ed25519_key(args.ed25519_key) if args.ed25519_key else None
227
227
 
@@ -257,7 +257,7 @@ def cmd_attest(args: argparse.Namespace) -> int:
257
257
  # axiom back to its source byte range and original sentence excerpt.
258
258
  if args.ledger and prov_records is not None:
259
259
  import asyncio
260
- from internal.infrastructure.akashic_ledger import AkashicLedger
260
+ from sum_engine_internal.infrastructure.akashic_ledger import AkashicLedger
261
261
 
262
262
  ledger = AkashicLedger(db_path=args.ledger)
263
263
 
@@ -441,7 +441,7 @@ def cmd_verify(args: argparse.Namespace) -> int:
441
441
  # logic verify.js runs in Node, same bytes Python produces.
442
442
  import math
443
443
  import re
444
- from internal.algorithms.semantic_arithmetic import GodelStateAlgebra
444
+ from sum_engine_internal.algorithms.semantic_arithmetic import GodelStateAlgebra
445
445
 
446
446
  algebra = GodelStateAlgebra() # type: ignore[no-untyped-call]
447
447
  pattern = re.compile(r"^The (\S+) (\S+) (.+)\.$")
@@ -504,7 +504,7 @@ def cmd_verify(args: argparse.Namespace) -> int:
504
504
 
505
505
  def cmd_resolve(args: argparse.Namespace) -> int:
506
506
  import asyncio
507
- from internal.infrastructure.akashic_ledger import AkashicLedger
507
+ from sum_engine_internal.infrastructure.akashic_ledger import AkashicLedger
508
508
 
509
509
  ledger = AkashicLedger(db_path=args.db)
510
510
  record = asyncio.run(ledger.get_provenance_record(args.prov_id))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sum-engine
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: SUM — bidirectional knowledge distillation with optional cryptographic attestation. Pipe prose, get a CanonicalBundle (HMAC / Ed25519 / W3C VC 2.0), verify anywhere.
5
5
  Author: ototao
6
6
  License: Apache-2.0
@@ -34,6 +34,8 @@ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
34
34
  Requires-Dist: mypy>=1.0.0; extra == "dev"
35
35
  Requires-Dist: ruff>=0.1.0; extra == "dev"
36
36
  Requires-Dist: types-setuptools; extra == "dev"
37
+ Requires-Dist: PyJWT>=2.8.0; extra == "dev"
38
+ Requires-Dist: build>=1.0.0; extra == "dev"
37
39
  Provides-Extra: all
38
40
  Requires-Dist: sum-engine[sieve]; extra == "all"
39
41
  Requires-Dist: sum-engine[llm]; extra == "all"
@@ -52,6 +54,17 @@ Dynamic: license-file
52
54
  </em></p>
53
55
 
54
56
  [![SUM Knowledge OS CI](https://github.com/OtotaO/SUM/actions/workflows/quantum-ci.yml/badge.svg)](https://github.com/OtotaO/SUM/actions/workflows/quantum-ci.yml)
57
+ [![PyPI — sum-engine](https://img.shields.io/pypi/v/sum-engine.svg?label=PyPI%20sum-engine)](https://pypi.org/project/sum-engine/)
58
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
59
+ [![Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
60
+
61
+ ```bash
62
+ pip install 'sum-engine[sieve]'
63
+ echo "Alice likes cats. Bob owns a dog." | sum attest --extractor=sieve | sum verify
64
+ # → sum: ✓ verified 2 axiom(s), state integer matches (hmac=absent, ed25519=absent)
65
+ ```
66
+
67
+ Portfolio-facing overview: [`PORTFOLIO.md`](PORTFOLIO.md). Engineering onboarding + deep-dive: below.
55
68
 
56
69
  > **From Tags to Tomes and Back Again — canonical round-trip proven, full pipeline measured.**
57
70
 
@@ -78,7 +91,7 @@ Every headline number below is reproducible via `python -m scripts.bench.run_ben
78
91
  | `record_provenance_batch` sustained throughput | **~22 k ops/sec** (10.2× the single-write path) | empirical-benchmark |
79
92
  | Merkle-chain integrity under concurrent writers | holds (50–200-event bursts) | **provable** (post `9c4139d`) |
80
93
  | Cross-runtime byte-identity fixtures | **131 / 131 passing** across Python ↔ Node.js ↔ Browser JS | empirical-benchmark |
81
- | Test suite | **907 collected** (4 known jwt-missing collection errors) | continuous |
94
+ | Test suite | **1021 collected** (post v0.1.0, with `.[dev]` extras installed) | **provable** |
82
95
 
83
96
  ---
84
97
 
@@ -231,8 +244,8 @@ POST /ouroboros/verify
231
244
  The `TomeSliders` interface parameterizes rendering across five `[0.0, 1.0]` axes:
232
245
 
233
246
  ```python
234
- from internal.ensemble.tome_sliders import TomeSliders
235
- from internal.ensemble.tome_generator import AutoregressiveTomeGenerator
247
+ from sum_engine_internal.ensemble.tome_sliders import TomeSliders
248
+ from sum_engine_internal.ensemble.tome_generator import AutoregressiveTomeGenerator
236
249
 
237
250
  sliders = TomeSliders(
238
251
  density=0.5, # actioned on canonical path (deterministic axiom subsetting)
@@ -245,7 +258,7 @@ tome = generator.generate_controlled(state, sliders)
245
258
  # Output includes slider metadata in the header for reproducibility.
246
259
  ```
247
260
 
248
- **What ships today:** the 5-axis type, validation, `requires_extrapolator()` gate, `header_line()` serialization, and the density axis actioned on the deterministic canonical path via lexicographic subsetting. 21 tests pin the contract. See `internal/ensemble/tome_sliders.py`.
261
+ **What ships today:** the 5-axis type, validation, `requires_extrapolator()` gate, `header_line()` serialization, and the density axis actioned on the deterministic canonical path via lexicographic subsetting. 21 tests pin the contract. See `sum_engine_internal/ensemble/tome_sliders.py`.
249
262
 
250
263
  **What is roadmap:** the other four axes (length, formality, audience, perspective) require an LLM extrapolator and are no-ops on the canonical path today — their values are captured in the output header as metadata so a future LLM-backed renderer can honour them. Per-perspective functorial bridges (category-theoretic mappings between perspective ontologies) are Phase 26 vision, not current capability.
251
264
 
@@ -379,7 +392,7 @@ These are **roadmap items**, not current capabilities. Each is a concrete piece
379
392
  ### Shipped since the last README pass
380
393
  - ✅ **Per-doc logging in the regeneration runner** (commit `02b4413`) — `RegenerationMetrics.per_doc` names the specific (s, p, o) triples that failed entailment so the aggregate FActScore gap is debuggable at the generator-prompt layer.
381
394
  - ✅ **LLM narrative full round-trip runner** (commit `9fd232d`, first measurement `2c252f0`) — composes `LiveLLMAdapter.extract_triplets → generate_text → extract_triplets`, reports per-doc drift. Measured on `seed_v1`: 107.75 % drift / 0.12 exact-match recall. See PROOF_BOUNDARY §2.5.
382
- - ✅ **W3C Verifiable Credentials 2.0 emission + verification** (commit `e007f94`) — pure-Python `eddsa-jcs-2022` Data Integrity path at `internal/infrastructure/verifiable_credential.py` + RFC 8785 JCS at `internal/infrastructure/jcs.py`. 58 tests. Bundles consumable by any VC-compliant ecosystem.
395
+ - ✅ **W3C Verifiable Credentials 2.0 emission + verification** (commit `e007f94`) — pure-Python `eddsa-jcs-2022` Data Integrity path at `sum_engine_internal/infrastructure/verifiable_credential.py` + RFC 8785 JCS at `sum_engine_internal/infrastructure/jcs.py`. 58 tests. Bundles consumable by any VC-compliant ecosystem.
383
396
  - ✅ **Passive-voice truth fix** (commit `b751222`) — sieve now swaps `agent → pobj` into the subject slot and suppresses agentless passives; seed_v2 F1 rose 0.634 → 0.762, precision to 1.000, zero false positives on the difficulty corpus.
384
397
  - ✅ **`record_provenance_batch`** (commit `9ed49bf`) — single-transaction batched ingest; 10.2× throughput (2 k → 22 k ops/sec), within 30 % of the crypto ceiling.
385
398
  - ✅ **Merkle-chain concurrency fix** (commit `9c4139d`) — `BEGIN IMMEDIATE` serialises writers at the SQLite boundary; tamper-detection invariant now holds under concurrent writers (previously silently broke at two-plus parallel appends).
@@ -387,7 +400,7 @@ These are **roadmap items**, not current capabilities. Each is a concrete piece
387
400
  - ✅ **Single-file browser demo** (`single_file_demo/index.html`) — paste any paragraph, press Attest, download a CanonicalBundle JSON; hand it to anyone with Node + `verify.js` for independent verification. Upgrades automatically to LLM-grade extraction when pasted into a Claude artifact conversation via `window.claude.complete` (commit `e5e57b6`).
388
401
 
389
402
  ### Near-term (next 1–2 milestones)
390
- - **LLM wiring for the 4 remaining sliders** — length / formality / audience / perspective. Interface is already shipped in `internal/ensemble/tome_sliders.py`; what's missing is the prompt-conditioning layer that honours each axis.
403
+ - **LLM wiring for the 4 remaining sliders** — length / formality / audience / perspective. Interface is already shipped in `sum_engine_internal/ensemble/tome_sliders.py`; what's missing is the prompt-conditioning layer that honours each axis.
391
404
  - **Calibration fixture authoring for Venn-Abers** — turns zero-width confidence intervals into meaningful bounds. Needs a labelled `(score, was_correct)` set.
392
405
  - **Remaining sieve recall work** — seed_v2 precision is 1.000, recall 0.615; closing the recall gap means apposition / relative-clause / compound-conjunct extraction. All are RECALL misses now, not truth inversions.
393
406
 
@@ -456,9 +469,9 @@ These are vision items; the shipped today is the static artifact above.
456
469
 
457
470
  ---
458
471
 
459
- ## 🛡️ Verification: 907-Test Suite + 131 Cross-Runtime Fixtures
472
+ ## 🛡️ Verification: 1021-Test Suite + 131 Cross-Runtime Fixtures
460
473
 
461
- The test suite covers both proven invariants and empirically-measured properties; each assertion is scoped to the epistemic status of the thing it tests. 907 tests collected; 4 known collection errors are the jwt-module-missing issue in the quantum-router test stack, tracked as an ops item, not a regression.
474
+ The test suite covers both proven invariants and empirically-measured properties; each assertion is scoped to the epistemic status of the thing it tests. 1021 tests collected with the `[dev]` extras installed (`pip install -e '.[sieve,dev]'` or `make install`). CI runs the full suite every push via `.github/workflows/quantum-ci.yml`.
462
475
 
463
476
  ```text
464
477
  Provable (deterministic code + tests that enforce the proof):
@@ -0,0 +1,52 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ sum_cli/__init__.py
5
+ sum_cli/main.py
6
+ sum_engine.egg-info/PKG-INFO
7
+ sum_engine.egg-info/SOURCES.txt
8
+ sum_engine.egg-info/dependency_links.txt
9
+ sum_engine.egg-info/entry_points.txt
10
+ sum_engine.egg-info/requires.txt
11
+ sum_engine.egg-info/top_level.txt
12
+ sum_engine_internal/__init__.py
13
+ sum_engine_internal/algorithms/__init__.py
14
+ sum_engine_internal/algorithms/causal_discovery.py
15
+ sum_engine_internal/algorithms/predicate_canon.py
16
+ sum_engine_internal/algorithms/semantic_arithmetic.py
17
+ sum_engine_internal/algorithms/syntactic_sieve.py
18
+ sum_engine_internal/algorithms/zk_semantics.py
19
+ sum_engine_internal/ensemble/__init__.py
20
+ sum_engine_internal/ensemble/automated_scientist.py
21
+ sum_engine_internal/ensemble/autonomous_agent.py
22
+ sum_engine_internal/ensemble/causal_triggers.py
23
+ sum_engine_internal/ensemble/confidence_calibrator.py
24
+ sum_engine_internal/ensemble/epistemic_arbiter.py
25
+ sum_engine_internal/ensemble/epistemic_loop.py
26
+ sum_engine_internal/ensemble/extraction_validator.py
27
+ sum_engine_internal/ensemble/gauge_orchestrator.py
28
+ sum_engine_internal/ensemble/live_llm_adapter.py
29
+ sum_engine_internal/ensemble/llm_entailment.py
30
+ sum_engine_internal/ensemble/mass_semantic_engine.py
31
+ sum_engine_internal/ensemble/ouroboros.py
32
+ sum_engine_internal/ensemble/semantic_dedup.py
33
+ sum_engine_internal/ensemble/tome_generator.py
34
+ sum_engine_internal/ensemble/tome_sliders.py
35
+ sum_engine_internal/ensemble/vector_bridge.py
36
+ sum_engine_internal/ensemble/venn_abers.py
37
+ sum_engine_internal/infrastructure/__init__.py
38
+ sum_engine_internal/infrastructure/akashic_ledger.py
39
+ sum_engine_internal/infrastructure/canonical_codec.py
40
+ sum_engine_internal/infrastructure/jcs.py
41
+ sum_engine_internal/infrastructure/key_manager.py
42
+ sum_engine_internal/infrastructure/p2p_mesh.py
43
+ sum_engine_internal/infrastructure/prov_o.py
44
+ sum_engine_internal/infrastructure/provenance.py
45
+ sum_engine_internal/infrastructure/rate_limiter.py
46
+ sum_engine_internal/infrastructure/resource_guards.py
47
+ sum_engine_internal/infrastructure/scheme_registry.py
48
+ sum_engine_internal/infrastructure/state_encoding.py
49
+ sum_engine_internal/infrastructure/telemetry.py
50
+ sum_engine_internal/infrastructure/tome_parser.py
51
+ sum_engine_internal/infrastructure/verifiable_credential.py
52
+ sum_engine_internal/infrastructure/zig_bridge.py
@@ -12,6 +12,8 @@ pytest-asyncio>=0.21.0
12
12
  mypy>=1.0.0
13
13
  ruff>=0.1.0
14
14
  types-setuptools
15
+ PyJWT>=2.8.0
16
+ build>=1.0.0
15
17
 
16
18
  [llm]
17
19
  openai>=1.0.0
@@ -0,0 +1,2 @@
1
+ sum_cli
2
+ sum_engine_internal
@@ -28,7 +28,7 @@ from typing import Dict, List, Tuple, Set
28
28
 
29
29
  import sympy
30
30
 
31
- from internal.infrastructure.scheme_registry import CURRENT_SCHEME
31
+ from sum_engine_internal.infrastructure.scheme_registry import CURRENT_SCHEME
32
32
 
33
33
  logger = logging.getLogger(__name__)
34
34
 
@@ -48,7 +48,7 @@ class PrimeCollisionError(Exception):
48
48
  def _get_zig_engine():
49
49
  """Lazy import of the Zig FFI bridge singleton."""
50
50
  try:
51
- from internal.infrastructure.zig_bridge import zig_engine
51
+ from sum_engine_internal.infrastructure.zig_bridge import zig_engine
52
52
  return zig_engine
53
53
  except ImportError:
54
54
  return None
@@ -121,7 +121,7 @@ class GodelStateAlgebra:
121
121
  @staticmethod
122
122
  def _canonicalize_predicate(predicate: str) -> str:
123
123
  """Normalize a free-form predicate to the canonical vocabulary."""
124
- from internal.algorithms.predicate_canon import canonicalize
124
+ from sum_engine_internal.algorithms.predicate_canon import canonicalize
125
125
  return canonicalize(predicate)
126
126
 
127
127
  # ------------------------------------------------------------------
@@ -18,7 +18,7 @@ import re
18
18
  from datetime import datetime, timezone
19
19
  from typing import Dict, List, Optional, Tuple
20
20
 
21
- from internal.infrastructure.provenance import (
21
+ from sum_engine_internal.infrastructure.provenance import (
22
22
  EXCERPT_MAX_CHARS,
23
23
  ProvenanceRecord,
24
24
  sha256_uri_for_text,
@@ -18,7 +18,7 @@ import asyncio
18
18
  import logging
19
19
  from typing import Optional
20
20
 
21
- from internal.algorithms.causal_discovery import CausalDiscoveryEngine
21
+ from sum_engine_internal.algorithms.causal_discovery import CausalDiscoveryEngine
22
22
 
23
23
  logger = logging.getLogger("sum.scientist")
24
24
 
@@ -45,7 +45,7 @@ class AutomatedScientistDaemon:
45
45
 
46
46
  # Broadcast startup
47
47
  try:
48
- from internal.ensemble.epistemic_arbiter import kos_telemetry
48
+ from sum_engine_internal.ensemble.epistemic_arbiter import kos_telemetry
49
49
  await kos_telemetry.broadcast(
50
50
  "🔬 Automated Scientist initialized. Awaiting REM sleep cycles..."
51
51
  )
@@ -82,7 +82,7 @@ class AutomatedScientistDaemon:
82
82
 
83
83
  # Broadcast discovery
84
84
  try:
85
- from internal.ensemble.epistemic_arbiter import kos_telemetry
85
+ from sum_engine_internal.ensemble.epistemic_arbiter import kos_telemetry
86
86
  await kos_telemetry.broadcast(
87
87
  f"🧠 EUREKA! Synthesizing {len(novel_triplets)} novel discoveries..."
88
88
  )
@@ -93,7 +93,7 @@ class AutomatedScientistDaemon:
93
93
 
94
94
  # Batch mint — Zig bare-metal if available
95
95
  try:
96
- from internal.infrastructure.zig_bridge import zig_engine
96
+ from sum_engine_internal.infrastructure.zig_bridge import zig_engine
97
97
  if zig_engine and hasattr(zig_engine, 'batch_mint_primes'):
98
98
  new_primes = zig_engine.batch_mint_primes(axiom_strings)
99
99
  else:
@@ -130,7 +130,7 @@ class AutomatedScientistDaemon:
130
130
  )
131
131
 
132
132
  try:
133
- from internal.ensemble.epistemic_arbiter import kos_telemetry
133
+ from sum_engine_internal.ensemble.epistemic_arbiter import kos_telemetry
134
134
  await kos_telemetry.broadcast(
135
135
  f"🧬 State multiplied. Total autonomous discoveries: {self.total_discoveries}"
136
136
  )
@@ -18,15 +18,15 @@ import math
18
18
  import logging
19
19
  from typing import Callable, Optional
20
20
 
21
- from internal.algorithms.semantic_arithmetic import GodelStateAlgebra
22
- from internal.infrastructure.akashic_ledger import AkashicLedger
21
+ from sum_engine_internal.algorithms.semantic_arithmetic import GodelStateAlgebra
22
+ from sum_engine_internal.infrastructure.akashic_ledger import AkashicLedger
23
23
 
24
24
  logger = logging.getLogger(__name__)
25
25
 
26
26
 
27
27
  def _zig():
28
28
  try:
29
- from internal.infrastructure.zig_bridge import zig_engine
29
+ from sum_engine_internal.infrastructure.zig_bridge import zig_engine
30
30
  return zig_engine
31
31
  except ImportError:
32
32
  return None
@@ -16,14 +16,14 @@ License: Apache License 2.0
16
16
  import math
17
17
  from typing import Callable, List, Tuple
18
18
 
19
- from internal.algorithms.semantic_arithmetic import GodelStateAlgebra
20
- from internal.infrastructure.akashic_ledger import AkashicLedger
21
- from internal.ensemble.epistemic_arbiter import kos_telemetry
19
+ from sum_engine_internal.algorithms.semantic_arithmetic import GodelStateAlgebra
20
+ from sum_engine_internal.infrastructure.akashic_ledger import AkashicLedger
21
+ from sum_engine_internal.ensemble.epistemic_arbiter import kos_telemetry
22
22
 
23
23
 
24
24
  def _zig():
25
25
  try:
26
- from internal.infrastructure.zig_bridge import zig_engine
26
+ from sum_engine_internal.infrastructure.zig_bridge import zig_engine
27
27
  return zig_engine
28
28
  except ImportError:
29
29
  return None
@@ -32,7 +32,7 @@ from pathlib import Path
32
32
  from typing import Optional, Union
33
33
  from urllib.parse import urlparse
34
34
 
35
- from internal.ensemble.venn_abers import ConfidenceInterval, VennAbersCalibrator
35
+ from sum_engine_internal.ensemble.venn_abers import ConfidenceInterval, VennAbersCalibrator
36
36
 
37
37
  logger = logging.getLogger(__name__)
38
38
 
@@ -21,7 +21,7 @@ License: Apache License 2.0
21
21
  import logging
22
22
  from typing import Callable, Awaitable, List, Tuple, Dict, Any
23
23
 
24
- from internal.algorithms.semantic_arithmetic import GodelStateAlgebra
24
+ from sum_engine_internal.algorithms.semantic_arithmetic import GodelStateAlgebra
25
25
 
26
26
  logger = logging.getLogger(__name__)
27
27
 
@@ -22,7 +22,7 @@ import logging
22
22
  from dataclasses import dataclass, field
23
23
  from typing import List, Tuple, Optional
24
24
 
25
- from internal.algorithms.predicate_canon import canonicalize
25
+ from sum_engine_internal.algorithms.predicate_canon import canonicalize
26
26
 
27
27
  logger = logging.getLogger(__name__)
28
28
 
@@ -19,11 +19,11 @@ import asyncio
19
19
  import logging
20
20
  from typing import Callable, Awaitable, List, Tuple, Dict, Any
21
21
 
22
- from internal.algorithms.semantic_arithmetic import (
22
+ from sum_engine_internal.algorithms.semantic_arithmetic import (
23
23
  GodelStateAlgebra,
24
24
  SemanticPrimeNumberTheorem,
25
25
  )
26
- from internal.ensemble.extraction_validator import ExtractionValidator
26
+ from sum_engine_internal.ensemble.extraction_validator import ExtractionValidator
27
27
 
28
28
  logger = logging.getLogger(__name__)
29
29
 
@@ -35,9 +35,9 @@ from datetime import datetime, timezone
35
35
  from typing import List, Tuple
36
36
  from dataclasses import dataclass, field
37
37
 
38
- from internal.algorithms.semantic_arithmetic import GodelStateAlgebra
39
- from internal.algorithms.syntactic_sieve import DeterministicSieve
40
- from internal.ensemble.tome_generator import (
38
+ from sum_engine_internal.algorithms.semantic_arithmetic import GodelStateAlgebra
39
+ from sum_engine_internal.algorithms.syntactic_sieve import DeterministicSieve
40
+ from sum_engine_internal.ensemble.tome_generator import (
41
41
  AutoregressiveTomeGenerator,
42
42
  CANONICAL_FORMAT_VERSION,
43
43
  )
@@ -47,7 +47,7 @@ logger = logging.getLogger(__name__)
47
47
 
48
48
  def _zig():
49
49
  try:
50
- from internal.infrastructure.zig_bridge import zig_engine
50
+ from sum_engine_internal.infrastructure.zig_bridge import zig_engine
51
51
  return zig_engine
52
52
  except ImportError:
53
53
  return None
@@ -23,7 +23,7 @@ License: Apache License 2.0
23
23
  import logging
24
24
  from typing import Dict, List, Optional
25
25
 
26
- from internal.algorithms.semantic_arithmetic import GodelStateAlgebra
26
+ from sum_engine_internal.algorithms.semantic_arithmetic import GodelStateAlgebra
27
27
 
28
28
  logger = logging.getLogger(__name__)
29
29
 
@@ -204,7 +204,7 @@ class AutoregressiveTomeGenerator:
204
204
  A canonical-format tome reflecting the density slider. Output
205
205
  includes the slider header so the rendering is reproducible.
206
206
  """
207
- from internal.ensemble.tome_sliders import (
207
+ from sum_engine_internal.ensemble.tome_sliders import (
208
208
  TomeSliders,
209
209
  apply_density,
210
210
  )
@@ -30,7 +30,7 @@ from typing import Callable, Awaitable, List, Dict, Optional, Tuple
30
30
 
31
31
  import numpy as np
32
32
 
33
- from internal.algorithms.semantic_arithmetic import GodelStateAlgebra
33
+ from sum_engine_internal.algorithms.semantic_arithmetic import GodelStateAlgebra
34
34
 
35
35
  logger = logging.getLogger(__name__)
36
36
 
@@ -37,8 +37,8 @@ import logging
37
37
  from contextlib import contextmanager
38
38
  from typing import Any, Dict, Iterator, List, Optional, Sequence, Tuple
39
39
 
40
- from internal.algorithms.semantic_arithmetic import GodelStateAlgebra
41
- from internal.infrastructure.provenance import (
40
+ from sum_engine_internal.algorithms.semantic_arithmetic import GodelStateAlgebra
41
+ from sum_engine_internal.infrastructure.provenance import (
42
42
  ProvenanceRecord,
43
43
  compute_prov_id,
44
44
  )
@@ -64,7 +64,7 @@ def _zig() -> Optional[Any]:
64
64
  would require stubs for the Zig core. Callers gate on truthiness.
65
65
  """
66
66
  try:
67
- from internal.infrastructure.zig_bridge import zig_engine
67
+ from sum_engine_internal.infrastructure.zig_bridge import zig_engine
68
68
  return zig_engine
69
69
  except ImportError:
70
70
  return None
@@ -547,7 +547,7 @@ class AkashicLedger:
547
547
  """Serialize every event on a branch as a W3C PROV-O JSON-LD graph.
548
548
 
549
549
  Convenience wrapper that joins the ledger's event table with the
550
- stateless PROV-O adapter in ``internal.infrastructure.prov_o``.
550
+ stateless PROV-O adapter in ``sum_engine_internal.infrastructure.prov_o``.
551
551
  The returned string is a valid JSON-LD document any PROV-compliant
552
552
  tool can consume without SUM-specific knowledge.
553
553
 
@@ -558,7 +558,7 @@ class AkashicLedger:
558
558
  Returns:
559
559
  A pretty-printed JSON-LD document string.
560
560
  """
561
- from internal.infrastructure.prov_o import dump_prov_jsonld
561
+ from sum_engine_internal.infrastructure.prov_o import dump_prov_jsonld
562
562
 
563
563
  def _read() -> List[Dict[str, Any]]:
564
564
  with sqlite3.connect(self.db_path) as conn:
@@ -49,26 +49,26 @@ from datetime import datetime, timezone
49
49
  from dataclasses import dataclass, asdict, field
50
50
  from typing import List, Optional, TYPE_CHECKING
51
51
 
52
- from internal.algorithms.semantic_arithmetic import GodelStateAlgebra
53
- from internal.ensemble.tome_generator import (
52
+ from sum_engine_internal.algorithms.semantic_arithmetic import GodelStateAlgebra
53
+ from sum_engine_internal.ensemble.tome_generator import (
54
54
  AutoregressiveTomeGenerator,
55
55
  CANONICAL_FORMAT_VERSION,
56
56
  )
57
- from internal.infrastructure.scheme_registry import (
57
+ from sum_engine_internal.infrastructure.scheme_registry import (
58
58
  CURRENT_SCHEME,
59
59
  validate_scheme_or_raise,
60
60
  )
61
- from internal.infrastructure.state_encoding import to_hex
61
+ from sum_engine_internal.infrastructure.state_encoding import to_hex
62
62
 
63
63
  if TYPE_CHECKING:
64
- from internal.infrastructure.key_manager import KeyManager
64
+ from sum_engine_internal.infrastructure.key_manager import KeyManager
65
65
 
66
66
  logger = logging.getLogger(__name__)
67
67
 
68
68
 
69
69
  def _zig():
70
70
  try:
71
- from internal.infrastructure.zig_bridge import zig_engine
71
+ from sum_engine_internal.infrastructure.zig_bridge import zig_engine
72
72
  return zig_engine
73
73
  except ImportError:
74
74
  return None
@@ -25,16 +25,16 @@ from typing import Set, Callable
25
25
 
26
26
  import httpx
27
27
 
28
- from internal.algorithms.semantic_arithmetic import GodelStateAlgebra
29
- from internal.ensemble.epistemic_arbiter import kos_telemetry
30
- from internal.infrastructure.scheme_registry import CURRENT_SCHEME, is_compatible
28
+ from sum_engine_internal.algorithms.semantic_arithmetic import GodelStateAlgebra
29
+ from sum_engine_internal.ensemble.epistemic_arbiter import kos_telemetry
30
+ from sum_engine_internal.infrastructure.scheme_registry import CURRENT_SCHEME, is_compatible
31
31
 
32
32
  logger = logging.getLogger(__name__)
33
33
 
34
34
 
35
35
  def _zig():
36
36
  try:
37
- from internal.infrastructure.zig_bridge import zig_engine
37
+ from sum_engine_internal.infrastructure.zig_bridge import zig_engine
38
38
  return zig_engine
39
39
  except ImportError:
40
40
  return None
@@ -26,7 +26,7 @@ This module pins the evidence unit:
26
26
  }
27
27
 
28
28
  The record is content-addressable: ``prov_id = "prov:" + hex(sha256(JCS(record)))[:32]``.
29
- Canonicalization uses RFC 8785 JCS (``internal.infrastructure.jcs``) — the
29
+ Canonicalization uses RFC 8785 JCS (``sum_engine_internal.infrastructure.jcs``) — the
30
30
  same canonicalizer the VC 2.0 path uses — so prov_ids are stable across any
31
31
  JSON parser, any language, any reordering of fields on disk.
32
32
 
@@ -70,7 +70,7 @@ def trace_zig_ffi(operation_name: str) -> Callable:
70
70
 
71
71
  # Detect path by checking if zig_engine is loaded
72
72
  try:
73
- from internal.infrastructure.zig_bridge import zig_engine
73
+ from sum_engine_internal.infrastructure.zig_bridge import zig_engine
74
74
  if zig_engine is not None and zig_engine.available:
75
75
  _zig_calls += 1
76
76
  path = "⚡zig"
@@ -1,52 +0,0 @@
1
- LICENSE
2
- README.md
3
- pyproject.toml
4
- internal/__init__.py
5
- internal/algorithms/__init__.py
6
- internal/algorithms/causal_discovery.py
7
- internal/algorithms/predicate_canon.py
8
- internal/algorithms/semantic_arithmetic.py
9
- internal/algorithms/syntactic_sieve.py
10
- internal/algorithms/zk_semantics.py
11
- internal/ensemble/__init__.py
12
- internal/ensemble/automated_scientist.py
13
- internal/ensemble/autonomous_agent.py
14
- internal/ensemble/causal_triggers.py
15
- internal/ensemble/confidence_calibrator.py
16
- internal/ensemble/epistemic_arbiter.py
17
- internal/ensemble/epistemic_loop.py
18
- internal/ensemble/extraction_validator.py
19
- internal/ensemble/gauge_orchestrator.py
20
- internal/ensemble/live_llm_adapter.py
21
- internal/ensemble/llm_entailment.py
22
- internal/ensemble/mass_semantic_engine.py
23
- internal/ensemble/ouroboros.py
24
- internal/ensemble/semantic_dedup.py
25
- internal/ensemble/tome_generator.py
26
- internal/ensemble/tome_sliders.py
27
- internal/ensemble/vector_bridge.py
28
- internal/ensemble/venn_abers.py
29
- internal/infrastructure/__init__.py
30
- internal/infrastructure/akashic_ledger.py
31
- internal/infrastructure/canonical_codec.py
32
- internal/infrastructure/jcs.py
33
- internal/infrastructure/key_manager.py
34
- internal/infrastructure/p2p_mesh.py
35
- internal/infrastructure/prov_o.py
36
- internal/infrastructure/provenance.py
37
- internal/infrastructure/rate_limiter.py
38
- internal/infrastructure/resource_guards.py
39
- internal/infrastructure/scheme_registry.py
40
- internal/infrastructure/state_encoding.py
41
- internal/infrastructure/telemetry.py
42
- internal/infrastructure/tome_parser.py
43
- internal/infrastructure/verifiable_credential.py
44
- internal/infrastructure/zig_bridge.py
45
- sum_cli/__init__.py
46
- sum_cli/main.py
47
- sum_engine.egg-info/PKG-INFO
48
- sum_engine.egg-info/SOURCES.txt
49
- sum_engine.egg-info/dependency_links.txt
50
- sum_engine.egg-info/entry_points.txt
51
- sum_engine.egg-info/requires.txt
52
- sum_engine.egg-info/top_level.txt
@@ -1,2 +0,0 @@
1
- internal
2
- sum_cli
File without changes
File without changes