itself 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 (263) hide show
  1. itself-0.2.0/CHANGELOG.md +270 -0
  2. itself-0.2.0/CONTRIBUTING.md +92 -0
  3. itself-0.2.0/LICENSE +373 -0
  4. itself-0.2.0/MANIFEST.in +10 -0
  5. itself-0.2.0/PKG-INFO +508 -0
  6. itself-0.2.0/README.md +471 -0
  7. itself-0.2.0/SECURITY.md +27 -0
  8. itself-0.2.0/conformance/bundles/invalid/blank-transition-subject.json +39 -0
  9. itself-0.2.0/conformance/bundles/invalid/dangling-reference.json +20 -0
  10. itself-0.2.0/conformance/bundles/invalid/duplicate-id.json +28 -0
  11. itself-0.2.0/conformance/bundles/invalid/invalid-transition.json +90 -0
  12. itself-0.2.0/conformance/bundles/invalid/proto-scope-mismatch.json +142 -0
  13. itself-0.2.0/conformance/bundles/invalid/state-drift.json +39 -0
  14. itself-0.2.0/conformance/bundles/invalid/test-plan-kind-mismatch.json +84 -0
  15. itself-0.2.0/conformance/bundles/invalid/transition-subject-mismatch.json +57 -0
  16. itself-0.2.0/conformance/bundles/invalid/unrelated-evidence.json +147 -0
  17. itself-0.2.0/conformance/bundles/invalid/verdict-after-transition.json +130 -0
  18. itself-0.2.0/conformance/bundles/invalid/wrong-reference-kind.json +33 -0
  19. itself-0.2.0/conformance/bundles/valid/evidence-backed-history.json +231 -0
  20. itself-0.2.0/conformance/bundles/valid/test-execution-lineage.json +94 -0
  21. itself-0.2.0/conformance/canonicalization/rfc8785-jsonl-v1.json +78 -0
  22. itself-0.2.0/conformance/invalid/claim-initially-supported.json +17 -0
  23. itself-0.2.0/conformance/invalid/claim-without-scope.json +14 -0
  24. itself-0.2.0/conformance/invalid/evidence-without-relation.json +21 -0
  25. itself-0.2.0/conformance/invalid/model-self-promotion.json +22 -0
  26. itself-0.2.0/conformance/invalid/promotion-without-evidence.json +22 -0
  27. itself-0.2.0/conformance/invalid/timestamp-leap-second.json +17 -0
  28. itself-0.2.0/conformance/invalid/timestamp-trailing-newline.json +17 -0
  29. itself-0.2.0/conformance/invalid/timestamp-with-space.json +17 -0
  30. itself-0.2.0/conformance/invalid/uri-reference-invalid-port.json +20 -0
  31. itself-0.2.0/conformance/invalid/uri-reference-ipv6-brace-quantifier.json +20 -0
  32. itself-0.2.0/conformance/invalid/uri-reference-ipv6-leading-zero.json +20 -0
  33. itself-0.2.0/conformance/javascript/README.md +41 -0
  34. itself-0.2.0/conformance/javascript/check.mjs +1044 -0
  35. itself-0.2.0/conformance/javascript/package-lock.json +95 -0
  36. itself-0.2.0/conformance/javascript/package.json +17 -0
  37. itself-0.2.0/conformance/javascript/uri-reference.mjs +74 -0
  38. itself-0.2.0/conformance/json/accept/escaped-nul-and-uppercase-hex.json +1 -0
  39. itself-0.2.0/conformance/json/accept/largest-safe-integer.json +1 -0
  40. itself-0.2.0/conformance/json/accept/nesting-128-levels.json +1 -0
  41. itself-0.2.0/conformance/json/accept/proto-key.json +1 -0
  42. itself-0.2.0/conformance/json/accept/surrogate-pair-escape.json +1 -0
  43. itself-0.2.0/conformance/json/accept/zero-with-huge-exponent.json +1 -0
  44. itself-0.2.0/conformance/json/reject/duplicate-key-different-value.json +1 -0
  45. itself-0.2.0/conformance/json/reject/duplicate-key-same-value.json +1 -0
  46. itself-0.2.0/conformance/json/reject/invalid-utf8.json +1 -0
  47. itself-0.2.0/conformance/json/reject/lone-surrogate-escape.json +1 -0
  48. itself-0.2.0/conformance/json/reject/nan-literal.json +1 -0
  49. itself-0.2.0/conformance/json/reject/negative-zero.json +1 -0
  50. itself-0.2.0/conformance/json/reject/nesting-129-levels.json +1 -0
  51. itself-0.2.0/conformance/json/reject/trailing-comma.json +1 -0
  52. itself-0.2.0/conformance/json/reject/underflow-with-huge-exponent.json +1 -0
  53. itself-0.2.0/conformance/json/reject/underflow.json +1 -0
  54. itself-0.2.0/conformance/json/reject/unsafe-integer.json +1 -0
  55. itself-0.2.0/conformance/json/reject/utf16le.json +0 -0
  56. itself-0.2.0/conformance/json/reject/utf8-byte-order-mark.json +1 -0
  57. itself-0.2.0/conformance/valid/artifact-reference-ipv6-host.json +20 -0
  58. itself-0.2.0/conformance/valid/artifact-reference.json +20 -0
  59. itself-0.2.0/conformance/valid/causal-hypothesis.json +20 -0
  60. itself-0.2.0/conformance/valid/completed-test.json +32 -0
  61. itself-0.2.0/conformance/valid/decision.json +29 -0
  62. itself-0.2.0/conformance/valid/evidence.json +36 -0
  63. itself-0.2.0/conformance/valid/minimal-claim.json +17 -0
  64. itself-0.2.0/conformance/valid/prediction.json +19 -0
  65. itself-0.2.0/conformance/valid/proposed-claim.json +30 -0
  66. itself-0.2.0/conformance/valid/status-transition.json +23 -0
  67. itself-0.2.0/conformance/valid/test-plan.json +31 -0
  68. itself-0.2.0/conformance/valid/verdict.json +25 -0
  69. itself-0.2.0/cookbook/README.md +122 -0
  70. itself-0.2.0/cookbook/agent-change-gate/README.md +72 -0
  71. itself-0.2.0/cookbook/agent-change-gate/github-actions.yml +86 -0
  72. itself-0.2.0/cookbook/agent-change-gate/gitlab-ci.yml +41 -0
  73. itself-0.2.0/cookbook/agent-change-gate/run.py +716 -0
  74. itself-0.2.0/cookbook/fixtures/model-assertion.json +5 -0
  75. itself-0.2.0/cookbook/publish-reasoning-receipt/README.md +29 -0
  76. itself-0.2.0/cookbook/publish-reasoning-receipt/github-actions.yml +63 -0
  77. itself-0.2.0/cookbook/publish-reasoning-receipt/gitlab-ci.yml +36 -0
  78. itself-0.2.0/cookbook/verify-evidence-bundle/README.md +28 -0
  79. itself-0.2.0/cookbook/verify-evidence-bundle/github-actions.yml +55 -0
  80. itself-0.2.0/cookbook/verify-evidence-bundle/gitlab-ci.yml +36 -0
  81. itself-0.2.0/docs/DECISION_MODELS.md +336 -0
  82. itself-0.2.0/docs/EVALUATIONS.md +124 -0
  83. itself-0.2.0/docs/EVIDENCE_BUNDLES.md +233 -0
  84. itself-0.2.0/docs/INFERENCE.md +285 -0
  85. itself-0.2.0/docs/PROTOCOL_RECORDS.md +292 -0
  86. itself-0.2.0/docs/README.md +59 -0
  87. itself-0.2.0/docs/REASONING_RECEIPT.md +114 -0
  88. itself-0.2.0/docs/SCHEMAS.md +103 -0
  89. itself-0.2.0/docs/SPECIFICATION.md +312 -0
  90. itself-0.2.0/docs/VERSIONING.md +105 -0
  91. itself-0.2.0/docs/assets/itself-lifecycle-dark.svg +228 -0
  92. itself-0.2.0/evaluations/__init__.py +34 -0
  93. itself-0.2.0/evaluations/capacity_curve.py +356 -0
  94. itself-0.2.0/evaluations/contracts/v1/evaluation-report.schema.json +117 -0
  95. itself-0.2.0/evaluations/reporting.py +420 -0
  96. itself-0.2.0/evaluations/sdk_exercise.py +642 -0
  97. itself-0.2.0/examples/__init__.py +4 -0
  98. itself-0.2.0/examples/cache-key-diagnosis/README.md +73 -0
  99. itself-0.2.0/examples/cache-key-diagnosis/build_bundle.py +127 -0
  100. itself-0.2.0/examples/cache-key-diagnosis/bundle/artifacts/model-assertion.json +1 -0
  101. itself-0.2.0/examples/cache-key-diagnosis/bundle/bundle.json +55 -0
  102. itself-0.2.0/examples/cache-key-diagnosis/bundle/inputs/diagnosis-request.json +116 -0
  103. itself-0.2.0/examples/cache-key-diagnosis/bundle/ledger.jsonl +23 -0
  104. itself-0.2.0/examples/cache-key-diagnosis/bundle/reasoning-receipt.json +376 -0
  105. itself-0.2.0/examples/inference_to_evidence/README.md +57 -0
  106. itself-0.2.0/examples/inference_to_evidence/__init__.py +4 -0
  107. itself-0.2.0/examples/inference_to_evidence/run.py +642 -0
  108. itself-0.2.0/experiments/001-cache-key-omission/COMPARATIVE_STUDY.md +356 -0
  109. itself-0.2.0/experiments/001-cache-key-omission/DESIGN.md +378 -0
  110. itself-0.2.0/experiments/001-cache-key-omission/README.md +60 -0
  111. itself-0.2.0/experiments/001-cache-key-omission/manifests/v1/fireworks-glm-5p2.json +110 -0
  112. itself-0.2.0/experiments/001-cache-key-omission/manifests/v1/fireworks-minimax-m3.json +110 -0
  113. itself-0.2.0/experiments/001-cache-key-omission/manifests/v1/fireworks-qwen3p7-max.json +111 -0
  114. itself-0.2.0/experiments/001-cache-key-omission/manifests/v1/together-glm-5p2.json +110 -0
  115. itself-0.2.0/experiments/001-cache-key-omission/manifests/v1/together-minimax-m3.json +110 -0
  116. itself-0.2.0/experiments/001-cache-key-omission/manifests/v1/together-qwen3p7-max.json +111 -0
  117. itself-0.2.0/experiments/001-cache-key-omission/manifests/v2/fireworks-glm-5p2.json +111 -0
  118. itself-0.2.0/experiments/001-cache-key-omission/manifests/v2/fireworks-minimax-m3.json +111 -0
  119. itself-0.2.0/experiments/001-cache-key-omission/manifests/v2/fireworks-qwen3p7-plus.json +112 -0
  120. itself-0.2.0/experiments/001-cache-key-omission/manifests/v2/together-glm-5p2.json +111 -0
  121. itself-0.2.0/experiments/001-cache-key-omission/manifests/v2/together-minimax-m3.json +111 -0
  122. itself-0.2.0/experiments/001-cache-key-omission/manifests/v3/fireworks-glm-5p2.json +117 -0
  123. itself-0.2.0/experiments/001-cache-key-omission/manifests/v3/fireworks-minimax-m3.json +117 -0
  124. itself-0.2.0/experiments/001-cache-key-omission/manifests/v3/fireworks-qwen3p7-plus.json +118 -0
  125. itself-0.2.0/experiments/001-cache-key-omission/manifests/v3/together-minimax-m3.json +117 -0
  126. itself-0.2.0/experiments/001-cache-key-omission/manifests/v4/fireworks-glm-5p2.json +118 -0
  127. itself-0.2.0/experiments/001-cache-key-omission/manifests/v4/fireworks-minimax-m3.json +118 -0
  128. itself-0.2.0/experiments/001-cache-key-omission/manifests/v4/fireworks-qwen3p7-plus.json +119 -0
  129. itself-0.2.0/experiments/001-cache-key-omission/manifests/v4/together-minimax-m3.json +118 -0
  130. itself-0.2.0/experiments/001-cache-key-omission/manifests/v5/fireworks-glm-5p2.json +120 -0
  131. itself-0.2.0/experiments/001-cache-key-omission/manifests/v5/fireworks-minimax-m3.json +120 -0
  132. itself-0.2.0/experiments/001-cache-key-omission/manifests/v5/fireworks-qwen3p7-plus.json +121 -0
  133. itself-0.2.0/experiments/MODEL_ADAPTERS.md +283 -0
  134. itself-0.2.0/experiments/README.md +158 -0
  135. itself-0.2.0/experiments/__init__.py +4 -0
  136. itself-0.2.0/experiments/_bundle_validation.py +232 -0
  137. itself-0.2.0/experiments/_contract_values.py +90 -0
  138. itself-0.2.0/experiments/_schema_validation.py +35 -0
  139. itself-0.2.0/experiments/cases/__init__.py +4 -0
  140. itself-0.2.0/experiments/cases/cache_key_comparison.py +508 -0
  141. itself-0.2.0/experiments/cases/cache_key_comparison_report.py +1233 -0
  142. itself-0.2.0/experiments/cases/cache_key_comparison_run.py +204 -0
  143. itself-0.2.0/experiments/cases/cache_key_comparison_study.py +597 -0
  144. itself-0.2.0/experiments/cases/cache_key_diagnostician.py +200 -0
  145. itself-0.2.0/experiments/cases/cache_key_exchange.py +188 -0
  146. itself-0.2.0/experiments/cases/cache_key_model_run.py +159 -0
  147. itself-0.2.0/experiments/cases/cache_key_model_trial.py +239 -0
  148. itself-0.2.0/experiments/cases/cache_key_omission.py +295 -0
  149. itself-0.2.0/experiments/cases/cache_key_scripted_run.py +845 -0
  150. itself-0.2.0/experiments/comparison_bundles.py +1150 -0
  151. itself-0.2.0/experiments/comparison_manifests.py +535 -0
  152. itself-0.2.0/experiments/contracts/README.md +114 -0
  153. itself-0.2.0/experiments/contracts/v1/comparison-attempt-report.schema.json +100 -0
  154. itself-0.2.0/experiments/contracts/v1/comparison-bundle.schema.json +202 -0
  155. itself-0.2.0/experiments/contracts/v1/comparison-manifest.schema.json +267 -0
  156. itself-0.2.0/experiments/contracts/v1/diagnosis-assertion.schema.json +65 -0
  157. itself-0.2.0/experiments/contracts/v1/diagnosis-request.schema.json +90 -0
  158. itself-0.2.0/experiments/contracts/v1/diagnosis-result.schema.json +134 -0
  159. itself-0.2.0/experiments/contracts/v1/examples/assertion.json +31 -0
  160. itself-0.2.0/experiments/contracts/v1/examples/comparison-manifest.json +109 -0
  161. itself-0.2.0/experiments/contracts/v1/examples/narrative-assertion.json +5 -0
  162. itself-0.2.0/experiments/contracts/v1/examples/narrative-result.json +29 -0
  163. itself-0.2.0/experiments/contracts/v1/examples/request.json +68 -0
  164. itself-0.2.0/experiments/contracts/v1/examples/result.json +55 -0
  165. itself-0.2.0/experiments/contracts/v1/examples/trial-manifest.json +68 -0
  166. itself-0.2.0/experiments/contracts/v1/narrative-assertion.schema.json +34 -0
  167. itself-0.2.0/experiments/contracts/v1/narrative-result.schema.json +104 -0
  168. itself-0.2.0/experiments/contracts/v1/trial-attempt-report.schema.json +93 -0
  169. itself-0.2.0/experiments/contracts/v1/trial-bundle.schema.json +94 -0
  170. itself-0.2.0/experiments/contracts/v1/trial-manifest.schema.json +192 -0
  171. itself-0.2.0/experiments/diagnostician.py +523 -0
  172. itself-0.2.0/experiments/model_adapters.py +547 -0
  173. itself-0.2.0/experiments/narrative_diagnostician.py +341 -0
  174. itself-0.2.0/experiments/results/README.md +53 -0
  175. itself-0.2.0/experiments/results/archive/2026-07-22-together-case-001-evidence-enforced-pilot.md +149 -0
  176. itself-0.2.0/experiments/results/archive/2026-07-22-together-case-001.md +48 -0
  177. itself-0.2.0/experiments/results/archive/2026-07-24-case-001-comparison-v2.json +1756 -0
  178. itself-0.2.0/experiments/results/archive/2026-07-24-case-001-comparison-v2.md +71 -0
  179. itself-0.2.0/experiments/results/archive/2026-07-24-case-001-comparison-v4.json +1467 -0
  180. itself-0.2.0/experiments/results/archive/2026-07-24-case-001-comparison-v4.md +71 -0
  181. itself-0.2.0/experiments/results/current/2026-07-24-case-001-comparison-v5.json +1237 -0
  182. itself-0.2.0/experiments/results/current/2026-07-24-case-001-comparison-v5.md +69 -0
  183. itself-0.2.0/experiments/trial_bundles.py +806 -0
  184. itself-0.2.0/experiments/trial_manifests.py +290 -0
  185. itself-0.2.0/pyproject.toml +96 -0
  186. itself-0.2.0/setup.cfg +4 -0
  187. itself-0.2.0/src/itself/__init__.py +282 -0
  188. itself-0.2.0/src/itself/_endpoints.py +255 -0
  189. itself-0.2.0/src/itself/_filesystem.py +187 -0
  190. itself-0.2.0/src/itself/_formats.py +104 -0
  191. itself-0.2.0/src/itself/_json.py +223 -0
  192. itself-0.2.0/src/itself/_version.py +8 -0
  193. itself-0.2.0/src/itself/bundle.py +723 -0
  194. itself-0.2.0/src/itself/cli.py +719 -0
  195. itself-0.2.0/src/itself/decision_model.py +1283 -0
  196. itself-0.2.0/src/itself/evidence_bundle.py +981 -0
  197. itself-0.2.0/src/itself/inference.py +1571 -0
  198. itself-0.2.0/src/itself/ledger.py +373 -0
  199. itself-0.2.0/src/itself/py.typed +0 -0
  200. itself-0.2.0/src/itself/receipts.py +621 -0
  201. itself-0.2.0/src/itself/records.py +743 -0
  202. itself-0.2.0/src/itself/reporting.py +125 -0
  203. itself-0.2.0/src/itself/schema_export.py +178 -0
  204. itself-0.2.0/src/itself/schemas/v0alpha/evidence-bundle.schema.json +144 -0
  205. itself-0.2.0/src/itself/schemas/v0alpha/protocol.schema.json +466 -0
  206. itself-0.2.0/src/itself/schemas/v0alpha/reasoning-receipt.schema.json +366 -0
  207. itself-0.2.0/src/itself/schemas/v0alpha2/evidence-bundle.schema.json +145 -0
  208. itself-0.2.0/src/itself/schemas/v0alpha2/protocol.schema.json +503 -0
  209. itself-0.2.0/src/itself/schemas/v0alpha2/reasoning-receipt.schema.json +406 -0
  210. itself-0.2.0/src/itself/state.py +178 -0
  211. itself-0.2.0/src/itself/types.py +21 -0
  212. itself-0.2.0/src/itself/validation.py +185 -0
  213. itself-0.2.0/src/itself.egg-info/PKG-INFO +508 -0
  214. itself-0.2.0/src/itself.egg-info/SOURCES.txt +261 -0
  215. itself-0.2.0/src/itself.egg-info/dependency_links.txt +1 -0
  216. itself-0.2.0/src/itself.egg-info/entry_points.txt +2 -0
  217. itself-0.2.0/src/itself.egg-info/requires.txt +17 -0
  218. itself-0.2.0/src/itself.egg-info/top_level.txt +1 -0
  219. itself-0.2.0/tests/test_bundle.py +345 -0
  220. itself-0.2.0/tests/test_cache_key_comparison.py +321 -0
  221. itself-0.2.0/tests/test_cache_key_comparison_report.py +298 -0
  222. itself-0.2.0/tests/test_cache_key_comparison_run.py +366 -0
  223. itself-0.2.0/tests/test_cache_key_comparison_study.py +336 -0
  224. itself-0.2.0/tests/test_cache_key_exchange.py +100 -0
  225. itself-0.2.0/tests/test_cache_key_model_run.py +201 -0
  226. itself-0.2.0/tests/test_cache_key_model_trial.py +149 -0
  227. itself-0.2.0/tests/test_cache_key_omission.py +149 -0
  228. itself-0.2.0/tests/test_cache_key_scripted_run.py +235 -0
  229. itself-0.2.0/tests/test_canonicalization.py +250 -0
  230. itself-0.2.0/tests/test_capacity_curve.py +139 -0
  231. itself-0.2.0/tests/test_cli.py +655 -0
  232. itself-0.2.0/tests/test_comparison_bundle_schemas.py +200 -0
  233. itself-0.2.0/tests/test_comparison_bundles.py +496 -0
  234. itself-0.2.0/tests/test_comparison_manifests.py +376 -0
  235. itself-0.2.0/tests/test_conformance.py +317 -0
  236. itself-0.2.0/tests/test_cookbook_agent_change_gate.py +179 -0
  237. itself-0.2.0/tests/test_cookbook_workflows.py +67 -0
  238. itself-0.2.0/tests/test_decision_model.py +1228 -0
  239. itself-0.2.0/tests/test_diagnostician.py +244 -0
  240. itself-0.2.0/tests/test_diagnostician_contract_schema.py +121 -0
  241. itself-0.2.0/tests/test_distribution.py +42 -0
  242. itself-0.2.0/tests/test_evaluation_reporting.py +149 -0
  243. itself-0.2.0/tests/test_evidence_bundle.py +636 -0
  244. itself-0.2.0/tests/test_filesystem.py +169 -0
  245. itself-0.2.0/tests/test_inference.py +1046 -0
  246. itself-0.2.0/tests/test_inference_to_evidence_example.py +70 -0
  247. itself-0.2.0/tests/test_ledger.py +406 -0
  248. itself-0.2.0/tests/test_license_headers.py +67 -0
  249. itself-0.2.0/tests/test_model_adapters.py +680 -0
  250. itself-0.2.0/tests/test_narrative_diagnostician.py +220 -0
  251. itself-0.2.0/tests/test_published_schemas.py +87 -0
  252. itself-0.2.0/tests/test_receipts.py +266 -0
  253. itself-0.2.0/tests/test_records.py +606 -0
  254. itself-0.2.0/tests/test_reporting.py +81 -0
  255. itself-0.2.0/tests/test_schema_export.py +162 -0
  256. itself-0.2.0/tests/test_sdk_exercise.py +159 -0
  257. itself-0.2.0/tests/test_state.py +248 -0
  258. itself-0.2.0/tests/test_trial_bundles.py +316 -0
  259. itself-0.2.0/tests/test_trial_manifests.py +167 -0
  260. itself-0.2.0/tests/test_urllib_transport.py +484 -0
  261. itself-0.2.0/typing_tests/diagnostician_api.py +41 -0
  262. itself-0.2.0/typing_tests/public_api.py +217 -0
  263. itself-0.2.0/uv.lock +1228 -0
@@ -0,0 +1,270 @@
1
+ # Changelog
2
+
3
+ User-visible SDK and format changes are recorded here. Protocol, receipt,
4
+ evidence-bundle, and experiment-contract versions remain independent of the
5
+ Python distribution version.
6
+
7
+ ## 0.2.0
8
+
9
+ The first public release of `itself`. It implements these format
10
+ versions, each versioned independently of the package:
11
+
12
+ | Surface | Version |
13
+ | --- | --- |
14
+ | Claim and Evidence Protocol | `0.1.0-alpha.3` |
15
+ | Reasoning receipt | `0.1.0-alpha.2` |
16
+ | Evidence bundle | `0.1.0-alpha.2` |
17
+ | Schema publication line | `v0alpha2` |
18
+ | Ledger canonicalization | `rfc8785-jsonl-v1` |
19
+ | Chat Completions adapter | `0.3.1` |
20
+ | Decision-model adapter | `0.1.0` |
21
+
22
+ ### Added
23
+
24
+ - A CI integration cookbook with a provider-free agent-change gate, independent
25
+ evidence-bundle verification, reasoning-receipt publication, and thin GitHub
26
+ Actions and GitLab CI wrappers.
27
+ - A versioned, content-identified evaluation-report contract with canonical
28
+ JSON output and derived Markdown rendering.
29
+ - A deterministic offline SDK exercise covering the complete
30
+ inference-to-evidence lifecycle, exact invalid-fixture outcomes, bundle
31
+ reproduction, and adversarial bundle mutations.
32
+ - An observational capacity curve for record construction, ledger storage,
33
+ receipt generation, and evidence-bundle validation at increasing sizes.
34
+ - CI automation that publishes evaluation summaries and retains their complete
35
+ reports and evidence bundles for inspection.
36
+ - Typed, schema-validating constructors for every Claim and Evidence Protocol
37
+ record kind, with immutable value objects for shared provenance, scope,
38
+ authority, oracle, relation, digest, and cost fields.
39
+ - A provider-neutral structured-inference protocol and configurable
40
+ OpenAI-compatible Chat Completions client.
41
+ - A typed `EvidenceBundleBuilder` and immutable `EvidenceBundleFile` input
42
+ model for materializing closed evidence bundles.
43
+ - `itself bundle create` for packaging a ledger, its deterministic receipt,
44
+ declared inputs, supplemental files, and every referenced artifact.
45
+ - Atomic bundle creation, default assurance limitations, strict artifact
46
+ mapping, and deterministic creation-time overrides.
47
+ - A complete, independently verifiable cache-key diagnosis evidence bundle.
48
+ - A compact, deterministic inference-to-evidence example exercising the public
49
+ compatible-endpoint adapter, private response capture, typed lifecycle
50
+ records, external verification, and closed evidence-bundle construction.
51
+ - An independent JavaScript conformance runner and CI job covering all
52
+ language-neutral record fixtures, cross-record integrity codes, authorization
53
+ rules, and deterministic bundle replay.
54
+ - Deterministic `itself schema export` tooling with a public catalog, schema
55
+ content digests, and canonical hosted URLs under
56
+ `https://greaterexpanse.com/itself/schemas/`.
57
+ - A top-level `itself --version` command and an automated package-version
58
+ consistency check.
59
+ - Schema guidance defining offline validation, export APIs, checksum
60
+ boundaries, and immutable versioned publication lines.
61
+ - Reproducible source-manifest and distribution-metadata checks, with the
62
+ documentation assets, controlled experiments, typing fixtures, and lockfile
63
+ included in source archives.
64
+ - An immutable `v0alpha2` schema publication line with RFC 8785 canonical JSON
65
+ Lines, I-JSON conformance vectors, and independent JavaScript verification.
66
+ - Configurable evidence-bundle limits for manifest size, inventory size,
67
+ individual and aggregate file bytes, directory traversal, receipts, and
68
+ ledger records.
69
+ - Deterministic publication-race tests for schema exports, evidence bundles,
70
+ and content-addressed inference artifacts.
71
+ - A decision-model adapter for endpoints that implement the `/v1/systemone`
72
+ decision format. `ChoiceQuestion`, `NoulQuestion`, and `ScoreQuestion`
73
+ declare typed questions; `DecisionModelEndpoint` applies the Chat Completions
74
+ endpoint's transport rules; and `DecisionModelClient` captures each exact
75
+ request and bounded response, validates every distribution locally, and by
76
+ default asks each ordered question with its options as declared and reversed,
77
+ reporting the order gap and whether the most likely option flipped. A
78
+ failure after a request is captured raises `DecisionModelError`, which
79
+ references the captured request and, inside `decide`, the attempts that
80
+ completed. Probabilities stay in artifacts, so protocol records and schemas
81
+ are unchanged.
82
+ - `DecisionModelAdapter`, a provider-neutral protocol for decision services
83
+ with other wire formats, and a decision-model guide.
84
+ - `decode_jsonl_records` in `itself.ledger` and `decode_receipt_document` in
85
+ `itself.receipts`, which decode ledger and receipt bytes under the same rules
86
+ as the file loaders.
87
+ - An opt-in `trusted_authorizers` for `BundleValidator` and
88
+ `EvidenceBundleValidator`, and a repeatable `--trusted-authorizer ID` option
89
+ on the `ledger`, `receipt`, and `bundle` commands. Validation then refuses an
90
+ evidence-backed transition whose `authorized_by` declares any other actor id,
91
+ with the new `untrusted_authorizer` integrity code. The list compares
92
+ declared ids and establishes no identity.
93
+ - `EVIDENCE_BACKED_STATUSES`, the statuses a transition reaches only with
94
+ evidence, exported from `itself`.
95
+ - A `max_bytes` limit for `JsonReceiptStore.write`, which refuses a larger
96
+ receipt before writing anything.
97
+ - An opt-in `deadline_seconds` on `OpenAICompatibleEndpoint`,
98
+ `DecisionModelEndpoint`, and `HttpRequest`. The built-in transport shuts a
99
+ request down once it passes, so a server that keeps a connection busy with
100
+ keep-alive comments or chunked trailer lines can no longer hold a call open
101
+ past the per-read `timeout_seconds`. The deadline runs from the moment the
102
+ socket connects, so it also covers a proxy's `CONNECT` exchange and the TLS
103
+ handshake, and a request with a deadline trusts the same certificates as one
104
+ without.
105
+ - A test that pins the SHA-256 digest of every packaged schema file, so a
106
+ published schema line cannot change in place.
107
+ - Shared JSON reader fixtures under `conformance/json/accept` and
108
+ `conformance/json/reject` that both the Python reference and the JavaScript
109
+ validator must accept or refuse, plus a valid record fixture with an IPv6
110
+ artifact host, invalid record fixtures for timestamps with a space separator,
111
+ a leap second, or a trailing newline and for URIs with a malformed port, an
112
+ IPv6 literal written with `{,2}`, or an IPv4 octet with a leading zero inside
113
+ an IPv6 literal, and invalid bundle fixtures for a `__proto__` scope dimension
114
+ and a blank transition subject. The reader fixtures also cover a zero and an
115
+ underflowing number written with exponents beyond the range of any float, and
116
+ an escaped `NUL` with uppercase hexadecimal digits.
117
+
118
+ ### Changed
119
+
120
+ - Public positioning now leads with agent assurance and AI-driven engineering
121
+ workflows, while retaining evidence as the formal result of an external check
122
+ in the provider-neutral protocol.
123
+ - Project licensing changed from the MIT License to the Mozilla Public License
124
+ 2.0.
125
+ - Authored Python and JavaScript sources now carry per-file SPDX license and
126
+ Greater Expanse LLC copyright notices.
127
+ - Public reference material is grouped behind an audience-oriented
128
+ documentation index instead of competing with the README at repository root.
129
+ - The README, evaluation guides, and generated comparison reports now explain
130
+ Itself's assurance boundary and experiment outcomes in plain developer-facing
131
+ language before presenting reproducibility details.
132
+ - The public Python schema-export surface uses `export_schemas`, `SchemaExport`,
133
+ and `SchemaExportError`.
134
+ - Experimental contract identifiers now use self-contained `urn:itself:...`
135
+ references instead of URLs for schemas that are not part of the public hosted
136
+ catalog.
137
+ - Local examples and inference artifacts now stay under the ignored `.itself/`
138
+ workspace, and CI checkouts no longer persist Git credentials.
139
+ - Evidence-backed state transitions now require a preceding verdict whose
140
+ subject, scope, relation, evidence, and authorized transition match exactly.
141
+ - Current-line ledger and receipt identifiers now use RFC 8785 rather than a
142
+ Python-specific JSON serialization profile.
143
+ - Experiment bundle formats now share one validation and filesystem policy;
144
+ repeated schema-diagnostic and runtime-narrowing helpers are centralized.
145
+ - Appending to a `Ledger` or `JsonlLedgerStore` schema-validates only the new
146
+ records instead of the whole history, so an append no longer slows down in
147
+ proportion to the ledger's size.
148
+ - `ProtocolValidator` validates each record against the schema branch for its
149
+ `kind`, so errors name the failing field instead of reporting that a record
150
+ matches none of the nine record kinds, and it compiles the packaged schema
151
+ once per process. The set of accepted records is unchanged: a schema whose
152
+ shape would make the per-kind branch accept a different set, such as one with
153
+ a root `$ref` or a branch with keywords beside its `$ref`, is applied whole.
154
+ Tests check this against every conformance fixture, systematic mutations of
155
+ them, and three custom schemas.
156
+ - Strict JSON decoding requires UTF-8 bytes without a byte-order mark and
157
+ rejects values nested more than 128 levels deep with `IJsonError` instead of
158
+ an uncaught `RecursionError`. `ProtocolValidator` applies the same limit and
159
+ refuses a value that contains itself, so a ledger never stores a record its
160
+ own reader would refuse.
161
+ - The built-in HTTP transport never sends loopback requests through a proxy and
162
+ accepts only `http` and `https` URLs; requests to other hosts still honor the
163
+ standard proxy environment. Endpoints refuse a `base_url` or `resource_path`
164
+ with whitespace, control, or non-ASCII characters, reserve the `Host`,
165
+ `Content-Length`, and `Transfer-Encoding` headers, and limit
166
+ `timeout_seconds` and `deadline_seconds` to `threading.TIMEOUT_MAX`. A URL or
167
+ header value that HTTP cannot carry is a configuration failure instead of a
168
+ retryable transport failure, and a credential value that ends in whitespace
169
+ is refused like one with a line break. The Chat Completions adapter version
170
+ is `0.3.1`.
171
+ - `EvidenceBundleValidator` parses the ledger and receipt from the same bytes
172
+ it checks against the manifest. `EvidenceBundleBuilder.build` validates the
173
+ staged bundle once and then re-hashes the published copy instead of
174
+ validating it a second time.
175
+ - CLI commands that read ledgers or receipts (`bundle create`, `ledger
176
+ validate`, `ledger replay`, `ledger summary`, `receipt generate`, and
177
+ `receipt validate`) enforce the default evidence-bundle ceilings of 100,000
178
+ records or 128 MiB per ledger and 128 MiB per receipt, and `receipt generate
179
+ --output` refuses to write a receipt over its ceiling. Larger ledgers remain
180
+ available through the Python API.
181
+ - Schema format checks use jsonschema's `format-nongpl` extra, so the SDK
182
+ installs no GPL-licensed dependency, and `uri-reference` is checked with the
183
+ SDK's own pattern for RFC 3986's URI-reference rule, whichever URI library is
184
+ installed. The pattern follows the RFC in two cases the earlier checker
185
+ decided the other way: an IPv4 octet with a leading zero inside an IPv6
186
+ literal is refused, and an IPvFuture literal may begin with an uppercase
187
+ `V`.
188
+ - The default receipt ceiling in `EvidenceBundleLimits` is 128 MiB, up from
189
+ 64 MiB, matching the ledger ceiling, because a receipt can be nearly as large
190
+ as its ledger.
191
+ - `TransitionRequest` validates its fields when it is constructed: an unknown
192
+ status, actor type, or role, or `None` for any of them, raises `ValueError`,
193
+ as does an `evidence_refs` that is a single string or `None`.
194
+ - `bundle create` assigns media types from a fixed suffix table owned by the
195
+ SDK instead of the host's `mimetypes` database, so regenerating a bundle with
196
+ `--created-at` gives the same identifier on every host.
197
+ - The protocol specification now states that a completed test MUST cite its
198
+ evidence, as the `v0alpha2` schema already requires; that records citing each
199
+ other are appended together; that the reference reader limits nesting to 128
200
+ levels, which writers must not exceed; that each record declares actor types
201
+ rather than binding them to an identity; and that a trust list compares
202
+ declared identifiers.
203
+
204
+ ### Fixed
205
+
206
+ - Compose conditional `test` and `verdict` rules inside their schema `allOf`
207
+ blocks so independent Draft 2020-12 validators agree on evaluated properties.
208
+ - Reject symlinked or permissively accessible inference-artifact destinations
209
+ before writing raw provider responses.
210
+ - Closed-bundle artifact records without a digest now produce a stable
211
+ validation error instead of an internal key lookup failure.
212
+ - Reject symbolic-link paths at ledger, receipt, and schema-export storage
213
+ boundaries without altering their targets.
214
+ - Reject duplicate keys, non-finite values, unsafe integers, negative zero,
215
+ Unicode surrogates, and ambiguous external references at untrusted JSON
216
+ boundaries.
217
+ - Refuse credential-bearing plaintext endpoints, redirects, unsafe resource
218
+ paths, conflicting transport overrides, oversized responses, malformed
219
+ streaming events, and incomplete model output.
220
+ - Bound evidence-bundle validation before expensive traversal, allocation, or
221
+ hashing, and stream artifact digests instead of loading entire files.
222
+ - Publish completed directories with an atomic no-replace operation so a
223
+ destination created concurrently is preserved.
224
+ - Keep private experiment-directory creation inside its declared boundary
225
+ without changing permissions on caller-owned ancestors.
226
+ - Refuse a credential value that contains a line break or other character not
227
+ allowed in an HTTP header as a configuration failure before any request.
228
+ Previously `http.client` rejected it inside a chained, retryable transport
229
+ error whose traceback could print the secret. Extra header values must be
230
+ printable ASCII, and `base_url` must carry a valid port.
231
+ - `validate_transition` and `Actor` convert plain strings decoded from JSON to
232
+ enum members, so a string-typed model actor can no longer authorize an
233
+ evidence-backed transition through the public function.
234
+ - A bare string passed as a reference list, such as `evidence_refs="ev-1"`,
235
+ raises `RecordConstructionError` instead of being stored as one reference per
236
+ character.
237
+ - Report a response body that ends before its declared length, and other
238
+ `http.client` protocol errors, as retryable transport failures.
239
+ - `InferenceError` survives pickling, so a failure raised in a worker process
240
+ reaches the caller with its failure class, status code, and artifact.
241
+ - `DirectoryArtifactSink` calls `os.fchmod` only on POSIX; Python 3.11 and 3.12
242
+ lack it on Windows.
243
+ - A streamed content part without text is a response-envelope failure instead
244
+ of an uncaught `KeyError`.
245
+ - `receipt generate --output` refuses to replace its own source ledger.
246
+ - The bundle builder rejects `%`, `?`, and `#` in file paths, which URL
247
+ resolvers would decode or truncate.
248
+ - A `size_bytes` in a bundle manifest that is not a JSON integer, such as
249
+ `3302.0`, or an inventory path that cannot be inspected, raises
250
+ `EvidenceBundleValidationError`.
251
+ - The strict reader reports a number whose exponent is beyond `Decimal`'s
252
+ range, such as `1e-99999999999999999999`, as an `IJsonError` instead of
253
+ raising `decimal.InvalidOperation`, and reads a zero with such an exponent
254
+ as zero, as the JavaScript validator does.
255
+ - `EvidenceBundleBuilder.build` removes a published bundle whose files no
256
+ longer match what it verified before it raises, so no unverified bundle is
257
+ left at the destination.
258
+ - `status_transition_record` accepts plain status strings and reports an
259
+ unknown status as `RecordConstructionError`.
260
+ - The JavaScript conformance validator parses JSON with its own strict parser.
261
+ It rejects repeated keys even when their values are equal, keeps `__proto__`
262
+ keys so its ledger digests match Python's, rejects invalid UTF-8 and
263
+ byte-order marks instead of decoding them, and limits nesting to 128 levels.
264
+ It checks `date-time` with the Python reference's grammar and
265
+ `uri-reference` with the reference's own RFC 3986 pattern, refuses blank
266
+ transition subjects as the reference does, and no longer accepts a lone high
267
+ surrogate at the end of a string. `lossless-json` is no longer a dependency.
268
+ - Protocol, receipt, and bundle validation refuse a `date-time` or
269
+ `uri-reference` value that ends in a newline, which the underlying regular
270
+ expressions accepted.
@@ -0,0 +1,92 @@
1
+ # Contributing to Itself SDK
2
+
3
+ Itself SDK is a pre-1.0 open-source assurance SDK for AI agents and AI-driven
4
+ workflows. Contributions should strengthen an executable guarantee, a
5
+ reproducible experiment, an agent integration, or the clarity of the protocol
6
+ boundary.
7
+
8
+ ## Development setup
9
+
10
+ Install [uv](https://docs.astral.sh/uv/), clone the repository, and run:
11
+
12
+ ```bash
13
+ uv sync --locked --extra test --extra typecheck --extra lint --extra release
14
+ uv run --frozen --extra test pytest
15
+ uv run --frozen --extra lint ruff check .
16
+ uv run --frozen --extra lint ruff format --check .
17
+ uv run --frozen --extra typecheck mypy
18
+ uv run --frozen --extra typecheck pyright
19
+ uv run --frozen --extra typecheck pyright --verifytypes itself --ignoreexternal
20
+ uv run --frozen --extra release check-manifest
21
+ uv build
22
+ uv run --frozen --extra release twine check --strict dist/*
23
+
24
+ cd conformance/javascript
25
+ npm ci --ignore-scripts
26
+ npm test
27
+ ```
28
+
29
+ The test suite does not require a model provider, network service, or hosted
30
+ account.
31
+
32
+ ## Evaluation runs
33
+
34
+ Run the assembled SDK exercise and observational capacity curve with fresh
35
+ output paths:
36
+
37
+ ```bash
38
+ mkdir -p .itself/evaluations
39
+ uv run --frozen python -m evaluations.sdk_exercise \
40
+ --output .itself/evaluations/sdk-exercise
41
+ uv run --frozen python -m evaluations.capacity_curve \
42
+ --output .itself/evaluations/capacity-curve
43
+ ```
44
+
45
+ Add or strengthen an evaluation when a change affects a cross-component
46
+ guarantee that is not clear from an isolated test. A mutation check should name
47
+ the boundary it challenges and the exact rejection it expects. A capacity
48
+ observation must remain distinct from a performance threshold unless a
49
+ documented benchmark method and justified regression budget are introduced.
50
+
51
+ See the [evaluation guide](docs/EVALUATIONS.md) for report semantics and
52
+ retained artifacts.
53
+
54
+ ## Feedback and changes
55
+
56
+ Use the repository's issue forms for reproducible bugs and protocol or
57
+ integration feedback. Ground protocol requests in a concrete workflow and an
58
+ executable acceptance case. Do not open a public issue for a suspected
59
+ vulnerability; follow [SECURITY.md](SECURITY.md) instead.
60
+
61
+ ## Change expectations
62
+
63
+ - Keep model assertions distinct from evidence, verdict authority, and task
64
+ performance.
65
+ - Accompany externally observable behavior with tests.
66
+ - Record user-visible SDK or format changes in `CHANGELOG.md`.
67
+ - Accompany protocol changes with specification text, schema changes, and valid
68
+ and invalid conformance fixtures where applicable.
69
+ - Version the ledger protocol, reasoning-receipt format, and diagnostician
70
+ contract independently.
71
+ - Prefer a narrow executable result over an untested platform abstraction.
72
+ - Do not add private chain-of-thought or secrets to fixtures, logs, or receipts.
73
+
74
+ Before submitting a change, run the complete local checks above. Explain what
75
+ guarantee or capability the change addresses and what the tests establish.
76
+
77
+ ## Licensing
78
+
79
+ By contributing, you agree that your contribution is licensed under the
80
+ repository's [Mozilla Public License 2.0](LICENSE).
81
+
82
+ Authored Python and JavaScript source files carry per-file license and
83
+ copyright notices. Place them immediately after a shebang, when present:
84
+
85
+ ```text
86
+ # SPDX-License-Identifier: MPL-2.0
87
+ # Copyright (C) 2026 Greater Expanse LLC
88
+ ```
89
+
90
+ Use the equivalent `//` comment form for JavaScript. Do not add comments to
91
+ formats such as JSON that do not support them; the repository license covers
92
+ those files.