crprotocol 2.2.0__tar.gz → 2.3.1__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 (329) hide show
  1. {crprotocol-2.2.0 → crprotocol-2.3.1}/CHANGELOG.md +519 -414
  2. {crprotocol-2.2.0 → crprotocol-2.3.1}/PKG-INFO +2 -2
  3. {crprotocol-2.2.0 → crprotocol-2.3.1}/README.md +1 -1
  4. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/__init__.py +24 -0
  5. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/_version.py +1 -1
  6. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/continuation/trigger.py +17 -1
  7. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/config.py +7 -0
  8. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/context_enforcer.py +769 -619
  9. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/dispatch_router.py +5 -2
  10. crprotocol-2.3.1/crp/core/ledger_backends.py +186 -0
  11. crprotocol-2.3.1/crp/core/manifest_derive.py +243 -0
  12. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/manifest_ledger.py +602 -462
  13. crprotocol-2.3.1/crp/integrations/__init__.py +42 -0
  14. crprotocol-2.3.1/crp/integrations/_common.py +66 -0
  15. crprotocol-2.3.1/crp/integrations/anthropic_hook.py +92 -0
  16. crprotocol-2.3.1/crp/integrations/langchain_hook.py +118 -0
  17. crprotocol-2.3.1/crp/integrations/openai_hook.py +171 -0
  18. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/providers/openai.py +10 -4
  19. crprotocol-2.3.1/site-docs/protocol/context-sources.md +499 -0
  20. crprotocol-2.3.1/tests/test_gaps_2_3.py +478 -0
  21. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_phase1.py +964 -962
  22. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_smoke.py +1 -1
  23. crprotocol-2.2.0/site-docs/protocol/context-sources.md +0 -260
  24. {crprotocol-2.2.0 → crprotocol-2.3.1}/.dockerignore +0 -0
  25. {crprotocol-2.2.0 → crprotocol-2.3.1}/.github/CODEOWNERS +0 -0
  26. {crprotocol-2.2.0 → crprotocol-2.3.1}/.github/FUNDING.yml +0 -0
  27. {crprotocol-2.2.0 → crprotocol-2.3.1}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
  28. {crprotocol-2.2.0 → crprotocol-2.3.1}/.github/ISSUE_TEMPLATE/feature-request.yml +0 -0
  29. {crprotocol-2.2.0 → crprotocol-2.3.1}/.github/ISSUE_TEMPLATE/spec-clarification.yml +0 -0
  30. {crprotocol-2.2.0 → crprotocol-2.3.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  31. {crprotocol-2.2.0 → crprotocol-2.3.1}/.github/workflows/ci.yml +0 -0
  32. {crprotocol-2.2.0 → crprotocol-2.3.1}/.github/workflows/docs.yml +0 -0
  33. {crprotocol-2.2.0 → crprotocol-2.3.1}/.github/workflows/link-check-config.json +0 -0
  34. {crprotocol-2.2.0 → crprotocol-2.3.1}/.github/workflows/link-check.yml +0 -0
  35. {crprotocol-2.2.0 → crprotocol-2.3.1}/.github/workflows/validate-schemas.yml +0 -0
  36. {crprotocol-2.2.0 → crprotocol-2.3.1}/.gitignore +0 -0
  37. {crprotocol-2.2.0 → crprotocol-2.3.1}/.pre-commit-config.yaml +0 -0
  38. {crprotocol-2.2.0 → crprotocol-2.3.1}/BENCHMARKS.md +0 -0
  39. {crprotocol-2.2.0 → crprotocol-2.3.1}/CODE_OF_CONDUCT.md +0 -0
  40. {crprotocol-2.2.0 → crprotocol-2.3.1}/CONTRIBUTING.md +0 -0
  41. {crprotocol-2.2.0 → crprotocol-2.3.1}/CRP_CAPABILITIES.md +0 -0
  42. {crprotocol-2.2.0 → crprotocol-2.3.1}/Dockerfile +0 -0
  43. {crprotocol-2.2.0 → crprotocol-2.3.1}/GOVERNANCE.md +0 -0
  44. {crprotocol-2.2.0 → crprotocol-2.3.1}/HOSTING_POSITIONING.md +0 -0
  45. {crprotocol-2.2.0 → crprotocol-2.3.1}/INTERNAL_DOCS.md +0 -0
  46. {crprotocol-2.2.0 → crprotocol-2.3.1}/LICENSE.md +0 -0
  47. {crprotocol-2.2.0 → crprotocol-2.3.1}/NOTICE +0 -0
  48. {crprotocol-2.2.0 → crprotocol-2.3.1}/RAILWAY_DEPLOYMENT_GUIDE.md +0 -0
  49. {crprotocol-2.2.0 → crprotocol-2.3.1}/RAILWAY_VARIABLES.md +0 -0
  50. {crprotocol-2.2.0 → crprotocol-2.3.1}/SECURITY.md +0 -0
  51. {crprotocol-2.2.0 → crprotocol-2.3.1}/SITE_NAVIGATION_AND_PUBLISHING.md +0 -0
  52. {crprotocol-2.2.0 → crprotocol-2.3.1}/STRIPE_MONETISATION.md +0 -0
  53. {crprotocol-2.2.0 → crprotocol-2.3.1}/TRADEMARK.md +0 -0
  54. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/__main__.py +0 -0
  55. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/_typing.py +0 -0
  56. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/adapters.py +0 -0
  57. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/advanced/__init__.py +0 -0
  58. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/advanced/auto_ingest.py +0 -0
  59. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/advanced/cqs.py +0 -0
  60. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/advanced/cross_window.py +0 -0
  61. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/advanced/curator.py +0 -0
  62. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/advanced/feedback.py +0 -0
  63. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/advanced/hierarchical.py +0 -0
  64. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/advanced/meta_learning.py +0 -0
  65. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/advanced/parallel.py +0 -0
  66. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/advanced/review_cycle.py +0 -0
  67. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/advanced/scale_mode.py +0 -0
  68. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/advanced/source_grounding.py +0 -0
  69. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/ckf/__init__.py +0 -0
  70. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/ckf/community.py +0 -0
  71. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/ckf/fabric.py +0 -0
  72. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/ckf/gc.py +0 -0
  73. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/ckf/graph_walk.py +0 -0
  74. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/ckf/merge.py +0 -0
  75. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/ckf/pattern_query.py +0 -0
  76. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/ckf/pubsub.py +0 -0
  77. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/ckf/semantic.py +0 -0
  78. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/cli/__init__.py +0 -0
  79. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/cli/main.py +0 -0
  80. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/cli/sidecar.py +0 -0
  81. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/cli/startup.py +0 -0
  82. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/continuation/__init__.py +0 -0
  83. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/continuation/completion.py +0 -0
  84. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/continuation/degradation.py +0 -0
  85. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/continuation/document_map.py +0 -0
  86. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/continuation/flow.py +0 -0
  87. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/continuation/gap.py +0 -0
  88. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/continuation/manager.py +0 -0
  89. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/continuation/quality_monitor.py +0 -0
  90. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/continuation/stitch.py +0 -0
  91. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/continuation/voice.py +0 -0
  92. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/__init__.py +0 -0
  93. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/batch.py +0 -0
  94. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/circuit_breaker.py +0 -0
  95. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/context_source.py +0 -0
  96. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/context_tools.py +0 -0
  97. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/errors.py +0 -0
  98. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/extraction_facade.py +0 -0
  99. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/facilitator.py +0 -0
  100. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/idempotency.py +0 -0
  101. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/orchestrator.py +0 -0
  102. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/relay_strategies.py +0 -0
  103. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/security_manager.py +0 -0
  104. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/session.py +0 -0
  105. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/task_intent.py +0 -0
  106. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/core/window.py +0 -0
  107. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/envelope/__init__.py +0 -0
  108. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/envelope/builder.py +0 -0
  109. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/envelope/decomposer.py +0 -0
  110. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/envelope/formatter.py +0 -0
  111. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/envelope/packer.py +0 -0
  112. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/envelope/reranker.py +0 -0
  113. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/envelope/scoring.py +0 -0
  114. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/extraction/__init__.py +0 -0
  115. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/extraction/complexity.py +0 -0
  116. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/extraction/contradiction.py +0 -0
  117. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/extraction/pipeline.py +0 -0
  118. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/extraction/quality_gate.py +0 -0
  119. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/extraction/stage1_regex.py +0 -0
  120. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/extraction/stage2_statistical.py +0 -0
  121. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/extraction/stage3_gliner.py +0 -0
  122. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/extraction/stage4_uie.py +0 -0
  123. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/extraction/stage5_discourse.py +0 -0
  124. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/extraction/stage6_llm.py +0 -0
  125. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/extraction/structured_output.py +0 -0
  126. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/extraction/types.py +0 -0
  127. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/license_guard.py +0 -0
  128. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/observability/__init__.py +0 -0
  129. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/observability/audit.py +0 -0
  130. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/observability/events.py +0 -0
  131. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/observability/metrics.py +0 -0
  132. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/observability/quality.py +0 -0
  133. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/observability/structured_logging.py +0 -0
  134. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/observability/telemetry.py +0 -0
  135. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/provenance/__init__.py +0 -0
  136. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/provenance/_embeddings.py +0 -0
  137. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/provenance/_types.py +0 -0
  138. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/provenance/attribution_scorer.py +0 -0
  139. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/provenance/claim_detector.py +0 -0
  140. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/provenance/contradiction_detector.py +0 -0
  141. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/provenance/distortion_detector.py +0 -0
  142. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/provenance/entailment_verifier.py +0 -0
  143. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/provenance/fabrication_detector.py +0 -0
  144. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/provenance/hallucination_scorer.py +0 -0
  145. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/provenance/omission_analyzer.py +0 -0
  146. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/provenance/provenance_chain.py +0 -0
  147. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/provenance/report_generator.py +0 -0
  148. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/providers/__init__.py +0 -0
  149. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/providers/anthropic.py +0 -0
  150. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/providers/base.py +0 -0
  151. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/providers/custom.py +0 -0
  152. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/providers/diagnostic.py +0 -0
  153. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/providers/llamacpp.py +0 -0
  154. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/providers/manager.py +0 -0
  155. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/providers/ollama.py +0 -0
  156. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/providers/tokenizers.py +0 -0
  157. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/py.typed +0 -0
  158. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/resources/__init__.py +0 -0
  159. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/resources/adaptive_allocator.py +0 -0
  160. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/resources/cost_model.py +0 -0
  161. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/resources/overhead_manager.py +0 -0
  162. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/resources/resource_manager.py +0 -0
  163. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/schemas/__init__.py +0 -0
  164. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/schemas/cost-estimate.json +0 -0
  165. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/schemas/crp-error.json +0 -0
  166. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/schemas/envelope-preview.json +0 -0
  167. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/schemas/persisted-state-header.json +0 -0
  168. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/schemas/quality-report.json +0 -0
  169. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/schemas/session-handle.json +0 -0
  170. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/schemas/session-status.json +0 -0
  171. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/schemas/stream-event.json +0 -0
  172. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/schemas/task-intent.json +0 -0
  173. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/security/__init__.py +0 -0
  174. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/security/audit_trail.py +0 -0
  175. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/security/binding.py +0 -0
  176. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/security/compliance.py +0 -0
  177. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/security/consent.py +0 -0
  178. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/security/embedding_defense.py +0 -0
  179. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/security/encryption.py +0 -0
  180. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/security/injection.py +0 -0
  181. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/security/integrity.py +0 -0
  182. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/security/privacy.py +0 -0
  183. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/security/quarantine.py +0 -0
  184. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/security/rbac.py +0 -0
  185. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/security/validation.py +0 -0
  186. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/state/__init__.py +0 -0
  187. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/state/cold_storage.py +0 -0
  188. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/state/compaction.py +0 -0
  189. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/state/critical_state.py +0 -0
  190. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/state/event_log.py +0 -0
  191. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/state/fact.py +0 -0
  192. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/state/serialization.py +0 -0
  193. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/state/session_cleanup.py +0 -0
  194. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/state/snapshot.py +0 -0
  195. {crprotocol-2.2.0 → crprotocol-2.3.1}/crp/state/warm_store.py +0 -0
  196. {crprotocol-2.2.0 → crprotocol-2.3.1}/docs/OPERATIONS_RUNBOOK.md +0 -0
  197. {crprotocol-2.2.0 → crprotocol-2.3.1}/docs/WASA_INTEGRATION_TUTORIAL.md +0 -0
  198. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/async_usage.py +0 -0
  199. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/benchmark_continuation.py +0 -0
  200. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/choose_provider.py +0 -0
  201. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/comply_demo.py +0 -0
  202. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/demo_app/README.md +0 -0
  203. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/demo_app/demo.py +0 -0
  204. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/demo_app/demo_v1.py +0 -0
  205. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/extraction-pipeline.md +0 -0
  206. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/ingestion.py +0 -0
  207. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/local-model.md +0 -0
  208. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/multi-provider.md +0 -0
  209. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/multi_turn.py +0 -0
  210. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/quickstart.md +0 -0
  211. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/quickstart.py +0 -0
  212. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/scribe_demo.py +0 -0
  213. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/session-resumption.md +0 -0
  214. {crprotocol-2.2.0 → crprotocol-2.3.1}/examples/streaming.py +0 -0
  215. {crprotocol-2.2.0 → crprotocol-2.3.1}/media/logo.svg +0 -0
  216. {crprotocol-2.2.0 → crprotocol-2.3.1}/mkdocs.yml +0 -0
  217. {crprotocol-2.2.0 → crprotocol-2.3.1}/pyproject.toml +0 -0
  218. {crprotocol-2.2.0 → crprotocol-2.3.1}/rfcs/0000-template.md +0 -0
  219. {crprotocol-2.2.0 → crprotocol-2.3.1}/rfcs/0001-initial-release.md +0 -0
  220. {crprotocol-2.2.0 → crprotocol-2.3.1}/schemas/cost-estimate.json +0 -0
  221. {crprotocol-2.2.0 → crprotocol-2.3.1}/schemas/crp-error.json +0 -0
  222. {crprotocol-2.2.0 → crprotocol-2.3.1}/schemas/envelope-preview.json +0 -0
  223. {crprotocol-2.2.0 → crprotocol-2.3.1}/schemas/openapi.json +0 -0
  224. {crprotocol-2.2.0 → crprotocol-2.3.1}/schemas/persisted-state-header.json +0 -0
  225. {crprotocol-2.2.0 → crprotocol-2.3.1}/schemas/quality-report.json +0 -0
  226. {crprotocol-2.2.0 → crprotocol-2.3.1}/schemas/session-handle.json +0 -0
  227. {crprotocol-2.2.0 → crprotocol-2.3.1}/schemas/session-status.json +0 -0
  228. {crprotocol-2.2.0 → crprotocol-2.3.1}/schemas/stream-event.json +0 -0
  229. {crprotocol-2.2.0 → crprotocol-2.3.1}/schemas/task-intent.json +0 -0
  230. {crprotocol-2.2.0 → crprotocol-2.3.1}/scripts/gen_changelog.py +0 -0
  231. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/CNAME +0 -0
  232. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/api/client.md +0 -0
  233. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/api/compliance.md +0 -0
  234. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/api/dispatch.md +0 -0
  235. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/api/index.md +0 -0
  236. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/api/schemas.md +0 -0
  237. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/benchmarks.md +0 -0
  238. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/compliance/eu-ai-act.md +0 -0
  239. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/compliance/gdpr.md +0 -0
  240. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/compliance/index.md +0 -0
  241. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/compliance/iso-42001.md +0 -0
  242. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/compliance/nist-ai-rmf.md +0 -0
  243. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/compliance/security.md +0 -0
  244. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/contributing.md +0 -0
  245. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/getting-started/cli.md +0 -0
  246. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/getting-started/index.md +0 -0
  247. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/getting-started/installation.md +0 -0
  248. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/getting-started/licensing.md +0 -0
  249. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/getting-started/local-models.md +0 -0
  250. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/getting-started/providers.md +0 -0
  251. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/getting-started/quickstart.md +0 -0
  252. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/guides/demo-app.md +0 -0
  253. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/guides/index.md +0 -0
  254. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/guides/ingestion.md +0 -0
  255. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/guides/multi-turn.md +0 -0
  256. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/guides/session-persistence.md +0 -0
  257. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/guides/sidecar.md +0 -0
  258. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/guides/streaming.md +0 -0
  259. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/index.md +0 -0
  260. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/products/comply-autocyber.md +0 -0
  261. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/products/comply.md +0 -0
  262. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/products/index.md +0 -0
  263. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/products/scribe.md +0 -0
  264. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/protocol/ckf.md +0 -0
  265. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/protocol/continuation.md +0 -0
  266. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/protocol/core.md +0 -0
  267. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/protocol/dispatch-strategies.md +0 -0
  268. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/protocol/envelope.md +0 -0
  269. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/protocol/extraction.md +0 -0
  270. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/protocol/index.md +0 -0
  271. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/protocol/meta-learning.md +0 -0
  272. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/protocol/provenance.md +0 -0
  273. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/protocol/quality-tiers.md +0 -0
  274. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/protocol/research.md +0 -0
  275. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/terms-of-service.md +0 -0
  276. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/testing/benchmarks.md +0 -0
  277. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/testing/index.md +0 -0
  278. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/testing/reproduce.md +0 -0
  279. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/testing/running-tests.md +0 -0
  280. {crprotocol-2.2.0 → crprotocol-2.3.1}/site-docs/why-crp.md +0 -0
  281. {crprotocol-2.2.0 → crprotocol-2.3.1}/specification/01_RESEARCH_FOUNDATIONS.md +0 -0
  282. {crprotocol-2.2.0 → crprotocol-2.3.1}/specification/02_CORE_PROTOCOL.md +0 -0
  283. {crprotocol-2.2.0 → crprotocol-2.3.1}/specification/03_CONTEXT_ENVELOPE.md +0 -0
  284. {crprotocol-2.2.0 → crprotocol-2.3.1}/specification/04_TOKEN_GENERATION_PROTOCOL.md +0 -0
  285. {crprotocol-2.2.0 → crprotocol-2.3.1}/specification/05_SYSTEM_WIDE_INTEGRATION.md +0 -0
  286. {crprotocol-2.2.0 → crprotocol-2.3.1}/specification/06_IMPLEMENTATION_PLAN.md +0 -0
  287. {crprotocol-2.2.0 → crprotocol-2.3.1}/specification/07_SECURITY.md +0 -0
  288. {crprotocol-2.2.0 → crprotocol-2.3.1}/specification/08_MONETIZATION.md +0 -0
  289. {crprotocol-2.2.0 → crprotocol-2.3.1}/specification/09_DEPLOYMENT.md +0 -0
  290. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/conftest.py +0 -0
  291. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/killer_test/crp_killer_report.json +0 -0
  292. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/killer_test/crp_killer_report.txt +0 -0
  293. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/killer_test/crp_killer_test.py +0 -0
  294. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/killer_test/debug_gap.py +0 -0
  295. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/killer_test/debug_gap2.py +0 -0
  296. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_adaptive_allocator.py +0 -0
  297. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_adversarial_provenance.py +0 -0
  298. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_agentic.py +0 -0
  299. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_benchmarks.py +0 -0
  300. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_ckf_gate.py +0 -0
  301. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_compliance_security.py +0 -0
  302. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_compliance_wiring.py +0 -0
  303. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_context_enforcer.py +0 -0
  304. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_context_source.py +0 -0
  305. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_decision_provenance.py +0 -0
  306. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_decision_provenance_engine.py +0 -0
  307. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_entailment_risk.py +0 -0
  308. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_fidelity_verification.py +0 -0
  309. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_gap_fixes_live.py +0 -0
  310. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_integration.py +0 -0
  311. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_ip_protection.py +0 -0
  312. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_live_comprehensive.py +0 -0
  313. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_live_full_capture.py +0 -0
  314. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_live_long_generation.py +0 -0
  315. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_live_verification.py +0 -0
  316. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_manifest_ledger.py +0 -0
  317. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_phase2.py +0 -0
  318. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_phase3.py +0 -0
  319. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_phase4.py +0 -0
  320. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_phase5.py +0 -0
  321. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_phase6.py +0 -0
  322. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_phase7.py +0 -0
  323. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_phase8.py +0 -0
  324. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_phase9.py +0 -0
  325. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_production_hardening.py +0 -0
  326. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_relay_strategies.py +0 -0
  327. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_resource_manager.py +0 -0
  328. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_security_modules.py +0 -0
  329. {crprotocol-2.2.0 → crprotocol-2.3.1}/tests/test_tool_relay.py +0 -0
@@ -1,414 +1,519 @@
1
- <!--
2
- Copyright (c) 2026 Constantinos Vidiniotis. All rights reserved.
3
- Licensed under the terms described in LICENSE.md in the root of this repository.
4
- -->
5
-
6
- # Changelog
7
-
8
- All notable changes to the CRP specification will be documented in this file.
9
-
10
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11
-
12
- ## [Unreleased]
13
-
14
- ### Added
15
- - (none yet)
16
-
17
- ## [2.2.0] - 2026-04-23
18
-
19
- ### Added — Miscellaneous (from 2.1 Unreleased pool)
20
- - Trademark notice: "Context Relay Protocol" (application pending, Class 9)
21
- - Contact emails: info@crprotocol.io (general), contact@crprotocol.io (enterprise)
22
- - GitHub Discussions enabled
23
- - Operational runbook (`docs/OPERATIONS_RUNBOOK.md`) deployment, monitoring, incident response
24
- - Integrity chain external verification (`export_for_verification()`, `verify_external()`)
25
- - `/metrics` endpoint on HTTP sidecar (Prometheus format)
26
- - Session file schema versioning with forward-compatible migration path
27
- - Bounded ingest queue (`maxsize=1000`) prevents unbounded memory growth
28
- - Pipeline short-circuit skips late extraction stages when early stages produce enough facts
29
- - Config file layer YAML/JSON config files (`~/.crp/config.yaml`, `.crp.yaml`)
30
- - Structured logging wired into orchestrator initialization
31
- - Metadata size limits on `Fact` (64 keys, 128-char key length, 4096-char value size)
32
- - `TypeAlias` annotations and extended type aliases in `crp/_typing.py`
33
- - All error types and config classes exported from `crp.__init__`
34
-
35
- ### Changed Miscellaneous (from 2.1 Unreleased pool)
36
- - `FactGraph` edge lookups now O(1) via indexed dicts (was O(n) list scan)
37
- - Provider error responses sanitized — no internal details leak to clients
38
- - Envelope builder truncates when exceeding token budget, clamps saturation to 1.0
39
- - Test fixtures use `tmp_path` pytest fixture instead of `tempfile.TemporaryDirectory()`
40
- - Correlation IDs propagated through ingest path
41
-
42
- ### FixedMiscellaneous (from 2.1 Unreleased pool)
43
- - Unknown config kwargs now produce a warning log instead of silent ignore
44
-
45
- ### Added Enforcement Pipeline, Ledger & Injection Detection (§7.14.4–§7.14.5)
46
-
47
- CRP 2.1 defined the **vocabulary** for context-source provenance
48
- (`ContextSource`, `ContextManifest`). CRP 2.2 defines the **enforcement
49
- point** — the single wire-side choke-point every envelope assembly flows
50
- through plus cross-turn persistence, key rotation, and content-side
51
- verification of declared trust labels. This closes the gap between
52
- "context is labelled" and "context is actually enforced on the wire".
53
-
54
- - New module `crp.core.context_enforcer` (§7.14.4):
55
- - `EnforcementPolicy` (`OBSERVE` / `WARN` / `REJECT`) — application-
56
- level policy for what happens on a violation.
57
- - `ContextEnforcer` — composes manifest signature-verify, expiry
58
- check, attestation mismatch scan (`check_attestation`), and
59
- injection-signal scan into a single `check(manifest, observed)`
60
- call. Under `REJECT`, raises `CRPError(CONTEXT_ATTESTATION_MISMATCH)`
61
- or `CRPError(CONTEXT_MANIFEST_INVALID)`. Under `OBSERVE` / `WARN`,
62
- emits audit events and continues.
63
- - `detect_injection_signals()` six high-precision regex patterns
64
- (instruction override, role jailbreak, secret exfil, delimiter
65
- forgery, dangerous payload URLs, embedded tool calls) applied to
66
- sources declared `TrustLevel.TRUSTED`. Addresses the gap between
67
- *declared* and *actual* trust developers marking a system prompt
68
- as TRUSTED doesn't make templated user input safe.
69
- - `AuditSink` protocol + `LoggingAuditSink` + thread-safe
70
- `InMemoryAuditSink` (bounded ring buffer). Every mismatch and
71
- injection signal is emitted as a structured event for SIEM / audit
72
- pipelines.
73
- - `default_enforcer()` / `set_default_enforcer()` process-wide
74
- opt-in installer so libraries (dispatch router, CKF, warm store)
75
- can find a configured enforcer without explicit plumbing.
76
- - `observed_content(source, text)` helper for presenting source +
77
- payload pairs to the enforcer for content scanning.
78
-
79
- - New module `crp.core.manifest_ledger` (§7.14.5):
80
- - `ManifestLedger` append-only JSONL store
81
- (`crp_sessions/<session_id>.manifest.jsonl`) of every manifest ever
82
- attached to a session. Supports `record()`, `load()`, `history()`,
83
- `latest()`, `find_by_source_id()`, `find_by_kind()`, and
84
- `verify_signatures()` for periodic integrity audits.
85
- - `KeyProvider` abstraction with two implementations:
86
- - `EnvVarKeyProvider` — reads HMAC secret from an environment
87
- variable, auto-detects hex encoding, enforces ≥32-byte minimum.
88
- - `RotatingKeyProvider` — current + retired key ring with
89
- configurable grace window, allowing in-flight manifests signed
90
- under the previous key to continue verifying after rotation.
91
-
92
- ### Added — Consumer-Side Integration (§7.14.4 wire point)
93
-
94
- - `crp.core.dispatch_router.assemble_messages()` now accepts optional
95
- `manifest`, `observed_sources`, and `enforcer` keyword arguments.
96
- When supplied (or a process-wide default enforcer is installed),
97
- every envelope assembly runs the full enforcement pipeline
98
- **before** messages are constructed. Zero-cost when no enforcer is
99
- configured — fully backward compatible with CRP 2.1 call sites.
100
-
101
- - `crp.state.warm_store.get_active_facts_as_extraction()` now stamps
102
- every un-sourced fact with
103
- `ContextSource(kind=WARM_STORE, origin=OBSERVED, trust_level=TRUSTED)`.
104
-
105
- - `crp.ckf.fabric.ContextKnowledgeFabric.retrieve()` now stamps every
106
- un-sourced merged fact with `ContextSource(kind=CKF_RETRIEVAL, ...)`
107
- carrying the retrieval modes and score in `metadata`.
108
-
109
- ### Changed — Source-Kind Detection
110
-
111
- - `crp.core.context_source.detect_source_kind()` strengthened:
112
- - New structural hint parser: attempts `json.loads(content)` and
113
- inspects object keys (`function_name` + `arguments` → `FUNCTION_CALL`,
114
- `mcp` / `mcp_server` → `MCP_TOOL`, `url` + `snippet` →
115
- `WEB_SEARCH`, `embedding` / `vector` `VECTOR_DB`).
116
- - Six new heuristic regex patterns for JSON/XML/YAML code blocks,
117
- SQL DML, Cypher / graph query keywords, SERPAPI / Google / Bing
118
- signatures, common vector-DB provider names (Pinecone, Weaviate,
119
- Qdrant, Chroma, pgvector, Milvus), and `function_name` / `tool_name`
120
- tokens.
121
- - Structural hints are preferred over regex when parsing succeeds.
122
-
123
- ### Security
124
-
125
- - Manifest verification is now always attempted when both a signature
126
- and a secret are present, even if `require_signed_manifest=False`.
127
- Tampered signatures are detected and emitted as
128
- `CONTEXT_MANIFEST_INVALID` audit events.
129
- - `ManifestLedger` rejects session IDs that sanitize to empty
130
- (prevents directory traversal via crafted session identifiers).
131
- - HMAC verification continues to use `hmac.compare_digest` (constant
132
- time). `RotatingKeyProvider` iterates candidate keys for verification
133
- so key rotation does not create a signature-oracle side channel.
134
-
135
- ### Tests
136
-
137
- - 38 new tests in `tests/test_context_enforcer.py` (injection patterns,
138
- audit sinks, all three policies, default-enforcer install, integration
139
- with `assemble_messages`).
140
- - 34 new tests in `tests/test_manifest_ledger.py` (JSONL round-trip,
141
- cross-instance rehydration, lineage queries, key rotation, hex/utf-8
142
- env secret decode, grace-window verification).
143
- - Total suite: **182 passing** (110 pre-2.2 baseline + 72 new).
144
-
145
- ## [2.1.0] - 2026-04-23
146
-
147
- ### AddedContext-Source Provenance (§7.14.3)
148
- - Contact emails: info@crprotocol.io (general), contact@crprotocol.io (enterprise)
149
- - GitHub Discussions enabled
150
- - Operational runbook (`docs/OPERATIONS_RUNBOOK.md`) deployment, monitoring, incident response
151
- - Integrity chain external verification (`export_for_verification()`, `verify_external()`)
152
- - `/metrics` endpoint on HTTP sidecar (Prometheus format)
153
- - Session file schema versioning with forward-compatible migration path
154
- - Bounded ingest queue (`maxsize=1000`) prevents unbounded memory growth
155
- - Pipeline short-circuit skips late extraction stages when early stages produce enough facts
156
- - Config file layer YAML/JSON config files (`~/.crp/config.yaml`, `.crp.yaml`)
157
- - Structured logging wired into orchestrator initialization
158
- - Metadata size limits on `Fact` (64 keys, 128-char key length, 4096-char value size)
159
- - `TypeAlias` annotations and extended type aliases in `crp/_typing.py`
160
- - All error types and config classes exported from `crp.__init__`
161
-
162
- ### Changed
163
- - `FactGraph` edge lookups now O(1) via indexed dicts (was O(n) list scan)
164
- - Provider error responses sanitized no internal details leak to clients
165
- - Envelope builder truncates when exceeding token budget, clamps saturation to 1.0
166
- - Test fixtures use `tmp_path` pytest fixture instead of `tempfile.TemporaryDirectory()`
167
- - Correlation IDs propagated through ingest path
168
-
169
- ### Fixed
170
- - Unknown config kwargs now produce a warning log instead of silent ignore
171
-
172
- ## [2.1.0] - 2026-04-23
173
-
174
- ### Added Context-Source Provenance (§7.14.3)
175
-
176
- CRP's Decision Provenance Engine already classifies every *output* claim as
177
- `CONTEXT_GROUNDED | PARAMETRIC | MIXED | UNCERTAIN`. This release adds the
178
- symmetric **input-side** primitive: every fact that enters the envelope
179
- can now carry a record of *where it came from* (RAG chunk, vector DB,
180
- database read, MCP tool, function call, web search, user turn, file upload,
181
- agent memory, or parametric). This is foundational for ISO/IEC 42001 §4
182
- (Context of the organisation), EU AI Act Art. 10 (Data governance),
183
- GDPR Art. 30 (Records of Processing), and NIST AI RMF MAP-4.
184
-
185
- - New module `crp.core.context_source` with:
186
- - `SourceKind` — closed enumeration (14 values) of upstream source
187
- categories. Additions require an RFC.
188
- - `ContextSource` — immutable (`frozen=True`) record: `kind`, `source_id`,
189
- `origin` (declared / observed / heuristic), `trust_level`,
190
- `contains_pii`, `sensitivity`, `region`, `retrieval_query`,
191
- `retrieved_at`, `upstream_uri`, `declared_by_manifest_id`, `metadata`.
192
- - `ContextManifest` customer-authored declarative attestation of
193
- intended upstream sources. HMAC-SHA256 signed over canonical JSON,
194
- with `sign()` / `verify()` using constant-time comparison and
195
- `is_expired()` helpers.
196
- - `detect_source_kind(content, role=…)` — detective-mode heuristic
197
- parser that classifies message content by OpenAI-style role plus a
198
- conservative pattern library (`<RAG>`, `[retrieved]`, `<mcp:>`,
199
- `SELECT FROM …`, web-search markers, etc.).
200
- - `check_attestation(observed, manifest)` returns a list of
201
- `AttestationMismatch` rows (reasons: `no_manifest`,
202
- `manifest_expired`, `unattested_kind`, `unattested_source_id`).
203
- `to_audit_event()` produces the §7.14.2 audit-event envelope shape.
204
- - `Fact.source: ContextSource | None` optional field; defaults to
205
- `None` so v2.0 callers see zero behavioural change.
206
- - Envelope section `[CONTEXT_SOURCES]` registered in the Tier 3 priority
207
- list (`crp/envelope/formatter.py::TIER_3_SECTIONS`).
208
- - Error codes `CONTEXT_ATTESTATION_MISMATCH = 1040` and
209
- `CONTEXT_MANIFEST_INVALID = 1041`.
210
- - `ManifestValidationError` raised on malformed JSON / empty signing key.
211
- - All primitives exported from `crp` (`SourceKind`, `SourceOrigin`,
212
- `TrustLevel`, `ContextSource`, `ContextManifest`, `AttestationMismatch`,
213
- `ManifestValidationError`, `detect_source_kind`, `check_attestation`).
214
- - 41-test suite (`tests/test_context_source.py`) covering frozen
215
- invariant, size limits, JSON round-trip, HMAC sign / verify, expiry,
216
- detective-mode classification, attestation-mismatch edge cases, audit
217
- event shape, and public API surface.
218
-
219
- ### Changed
220
-
221
- - `docs/CRP_CAPABILITIES.md` now lists context-source provenance as a
222
- first-class capability.
223
- - MkDocs site gains a dedicated *Protocol → Context Sources* page.
224
-
225
- ### Migration notes
226
-
227
- This release is **fully backward-compatible**. `Fact.source` defaults to
228
- `None`; consumers that ignore the field continue to work unchanged. To
229
- adopt, wrap retrieved chunks with `ContextSource` at ingestion time:
230
-
231
- ```python
232
- from crp import ContextSource, SourceKind, SourceOrigin, Fact
233
-
234
- fact = Fact(
235
- text=chunk.text,
236
- source=ContextSource(
237
- kind=SourceKind.VECTOR_DB,
238
- source_id="acme-hr-policies-vdb",
239
- origin=SourceOrigin.OBSERVED,
240
- contains_pii=True,
241
- region="eu-west-1",
242
- retrieval_query=user_query,
243
- ),
244
- )
245
- ```
246
-
247
- See `docs/protocol/context-sources.md` (published on crprotocol.io) for
248
- the full integration guide.
249
-
250
- ## [2.0.0] - 2026-04-06
251
-
252
- ### Added
253
-
254
- - **HTTP Sidecar Security Hardening & Full Protocol Surface** (§F2-security)
255
- - Defense-in-depth security model: 8 layers enforced on every request
256
- - Bearer-token authentication with timing-safe comparison (`secrets.compare_digest`)
257
- - Session ownership: sessions bound to SHA-256 hash of the creating token, other tokens get `403 Forbidden`
258
- - Per-IP rate limiting with monotonic-clock sliding window (default 120 req/60s, configurable)
259
- - Request body size limit: 10 MB cap, returns `413 Payload Too Large` when exceeded
260
- - Concurrent session cap: default 64, returns `503 Service Unavailable` when exceeded
261
- - Security headers on every response: `X-Content-Type-Options: nosniff`, `Cache-Control: no-store`
262
- - `--bind-all` security gate: requires `--auth-token` unless `--allow-unauthenticated` explicitly set
263
- - Full protocol surface exposed: all 6 dispatch variants (basic, tools, reflexive, progressive, stream-augmented, agentic) over HTTP
264
- - New endpoints: `/facts/feedback` (boost/penalize/reject), `/providers` (register fallback), `/estimate` (cost estimation)
265
- - Input validation on all endpoints: variant validation, required fields, capped limits
266
- - CLI options: `--max-sessions`, `--rate-limit`, `--allow-unauthenticated`
267
- - README: dedicated "Inter-LLM Context Sharing" section with endpoint reference, security model, and usage examples
268
-
269
- - **Deep Audit Gap FixesF1-F6, D1-D9** (§gap-audit)
270
- - F1: README provider claims corrected removed false Google/vLLM/HuggingFace references
271
- - F2: `crp serve` HTTP sidecar implemented (`crp/cli/sidecar.py`) full REST API with inter-LLM context sharing via `/facts/share` endpoint
272
- - F3: Provider fallback chain `LLMProviderManager.generate_with_fallback()` tries primary then registered providers
273
- - F4: README RBAC enforcement note corrected — now accurately reflects full enforcement
274
- - F5: Test count updated 266 → 351
275
- - F6: `EventEmitter` wired into orchestrator 30+ event types emitted at all pipeline stages (dispatch.started/completed, envelope.built, window.opened/continued/completed, fact.created, extraction.completed, session.closed)
276
- - D1: `CQSDetector` wired — context hunger detection after LLM generation
277
- - D2: `CrossWindowValidator` wired — extraction-based consistency validation after continuation loop
278
- - D3: `FeedbackLoop` wired — confidence adjustments after extraction, public API (boost/penalize/reject)
279
- - D4: `ParallelFanOut` wired instantiated with dispatch/extract callables
280
- - D5: `ReviewCycleManager` wired — checkpoint_review in continuation loop
281
- - D6: `ScaleModeSelector` wired configured at dispatch start from session processing_mode
282
- - D7: `EventEmitter` wired (same as F6)
283
- - D8: `TelemetryWriter` wired optional JSONL sink for window telemetry
284
- - D9: `LLMProviderManager` wired with fallback chain (same as F3)
285
- - Public API: `emitter` property, `on()` subscription, `feedback` property, `boost_fact()`/`penalize_fact()`/`reject_fact()`, `register_provider()`, `parallel` property
286
- - HTTP sidecar endpoints: POST /sessions, GET /sessions/:id/status, POST /sessions/:id/dispatch, POST /sessions/:id/ingest, GET /sessions/:id/facts, POST /sessions/:id/facts/share, POST /sessions/:id/close, GET /health
287
- - All 351 tests passing after changes
288
-
289
- - **Adaptive Resource Allocation & Efficiency-First Optimization** (§resource-alloc)
290
- - `AdaptiveAllocator` — dynamic pipeline tuning based on real-time overhead + memory pressure
291
- - **Efficiency-first philosophy**: ML extraction stages (GLiNER, UIE, discourse) are core intelligence — never disabled
292
- - `PROTECTED_INTELLIGENCE` frozenset ML features excluded from shedding cascade and stage scheduling
293
- - Throughput-based throttling: normal → throttled → constrained (adjusts fact limits, batch sizes, packing) instead of disabling stages
294
- - `PromptEfficiency` dataclass LLM-side optimization hints: fact deduplication, system prompt caching, envelope compression, connection reuse, estimated cache hit percentage
295
- - EWMA-smoothed overhead tracking with configurable cap (default 15%)
296
- - `_adapt_throughput()` — adjusts throughput level based on overhead trends without sacrificing intelligence
297
- - `OverheadBudgetManager` wired into orchestrator shedding cascade now live, ML features protected
298
- - `ExtractionProfile` / `EnvelopeProfile` recommended configurations based on resource state (stages always enabled)
299
- - Consecutive over-cap detection: 3+ consecutive windows triggers throughput reduction
300
- - `detect_hardware()` — auto-detects CPU count, total/available RAM (Windows + POSIX)
301
- - `WindowOverheadRecord` per-window metrics with features shed + stages skipped tracking
302
- - `ResourceManager.mark_unloaded()` / `trigger_gc()` model lifecycle + conditional GC
303
- - `_record_dispatch_overhead()` on orchestrator feeds overhead to allocator after every dispatch
304
- - `_allocator_fields()` 4 new WindowMetrics fields: `adaptive_ewma_overhead_pct`, `adaptive_features_shed`, `adaptive_stages_disabled`, `adaptive_consecutive_over`
305
- - All 6 dispatch variants wired: dispatch, dispatch_with_tools, dispatch_reflexive, dispatch_progressive, dispatch_stream_augmented, dispatch_agentic
306
- - Tests covering hardware detection, EWMA smoothing, throughput adaptation, ML protection, prompt efficiency, profile generation, model lifecycle, edge cases
307
- - Test count: 266 → 351
308
-
309
- - **Resource Management & Meta-Learning Hardening** (§audit R2)
310
- - `ResourceManager` centralized model registry, memory pressure tracking, GC orchestration
311
- - `ResourceSnapshot` dataclass — point-in-time view of memory budget, model utilization, pressure level
312
- - Pressure levels: none/low/medium/high/critical based on estimated CRP memory vs. budget
313
- - Model lifecycle tracking: register, load, use, unload, idle detection
314
- - Platform-aware RSS reading (Windows ctypes + POSIX /proc/self/status)
315
- - `CalibrationState` adaptive recalibration drift detection replaces permanent baseline lock
316
- - Rolling window analysis (last 10 windows) with 30% drift threshold triggers recalibration
317
- - `calibration_epoch` counter tracks how many times baselines have been recalibrated
318
- - WindowMetrics `ram_available_mb`, `ram_used_by_crp_mb`, `pressure_level` now live-computed
319
- - WindowMetrics `marginal_gain` now computed as new-fact ratio per window
320
- - WindowMetrics `sections_covered` now counts unique Markdown headers in output
321
- - All 5 formerly-dead WindowMetrics fields are now populated across all 6 dispatch variants
322
- - `_resource_fields()` and `_marginal_fields()` helpers on orchestrator
323
- - GC runs automatically on `close()` for clean session teardown
324
- - 38 tests covering ResourceManager, CalibrationState recalibration, marginal gain, sections
325
-
326
- - **§22 LLM-in-the-Loop Agentic Architecture** (PARADIGM SHIFT)
327
- - CRPFacilitator cognitive engine with 6 LLM-driven decision modules
328
- - Task analysis (§22.1) LLM semantically understands task complexity
329
- - Strategy routing (§22.2) — LLM chooses optimal dispatch strategy
330
- - Fact synthesis (§22.3) — LLM merges/compresses knowledge base facts
331
- - Output evaluation (§22.4) — LLM assesses output quality
332
- - Memory curation (§22.5) LLM manages CRP's knowledge base
333
- - Execution planning (§22.6) LLM decomposes complex tasks into multi-step plans
334
- - Multi-step plan execution each plan step dispatches with its own strategy
335
- - Enhanced revision loop — structured evaluation feedback, strategy adjustment
336
- - Post-revision curation — iterative knowledge refinement
337
- - Continuation awareness inner dispatch continuation state feeds into evaluation
338
- - 12 agentic telemetry fields in WindowMetrics
339
- - 84 tests covering all cognitive modules and integration paths
340
-
341
- - **Multi-Perspective Audit & CKF Gate Fix**
342
- - 5-perspective audit documented in CRP_MULTI_PERSPECTIVE_AUDIT.md
343
- - CKF Phase 6 gate reworked: budget reservation (15% or 120 tokens min) ensures CKF retrieval fires even at high envelope saturation
344
- - CKF_GATE_TOKENS lowered from 500 to 120 tokens
345
- - CKF_RESERVE_RATIO constant (0.15) reserves budget before warm store packing
346
- - Concurrency model documented in README.md
347
- - README badge corrected (709 → 185 tests)
348
- - 11 CKF gate tests added (test_ckf_gate.py)
349
-
350
- - **§21 — Novel Relay Strategies**
351
- - Reflexive dispatch — generate-then-verify with fact-checking
352
- - Progressive dispatch compact index with on-demand expansion
353
- - Stream-augmented dispatch — mid-generation context injection
354
- - 61 tests covering all three strategies
355
-
356
- - **§20 — Tool-Mediated Dispatch**
357
- - `dispatch_with_tools()` — LLM requests context via tool calls
358
- - Multi-round tool negotiation with safety cap
359
- - Fact extraction from tool dispatch outputs
360
- - 34 tests covering tool relay pipeline
361
-
362
- - **Complete CRP v2.0 Specification** 9 documents, ~19,200 lines
363
- - 01_RESEARCH_FOUNDATIONS.md Academic research backing (9 research areas, 40+ papers)
364
- - 02_CORE_PROTOCOL.md Core specification (29 sections, ~6,800 lines)
365
- - 03_CONTEXT_ENVELOPE.md Context envelope architecture
366
- - 04_TOKEN_GENERATION_PROTOCOL.md Unbounded output via continuation
367
- - 05_SYSTEM_WIDE_INTEGRATION.md Integration architecture (87+ call sites)
368
- - 06_IMPLEMENTATION_PLAN.md Implementation roadmap
369
- - 07_SECURITY.md Security architecture (OWASP-aligned, 14 sections)
370
- - 08_MONETIZATION.md Business model (PostgreSQL model full capability free)
371
- - 09_DEPLOYMENT.md Deployment architecture (embedded library)
372
-
373
- - **JSON Schemas** (Draft 2020-12) for all API types:
374
- - task-intent.json, quality-report.json, session-status.json
375
- - cost-estimate.json, envelope-preview.json, session-handle.json
376
- - stream-event.json, crp-error.json, persisted-state-header.json
377
-
378
- - **Contextual Knowledge Fabric (CKF)**normative knowledge layer:
379
- - Graph walk, pattern query, semantic fallback, community summary retrieval
380
- - Event-sourced history, pub-sub architecture
381
- - Cross-session persistence
382
-
383
- - **6-Stage Extraction Pipeline** (blackboard-reactive):
384
- - Regex Statistical (TextRank) GLiNER NER → UIE Relations → RST Discourse → LLM-Assisted Relational
385
-
386
- - **Quality Tier System**S/A/B/C/D with degradation model
387
-
388
- - **Multi-Signal Completion Detection**fact flow + structural flow + vocabulary novelty + structural completion
389
-
390
- - **Meta-Learning Architecture** ORC + ICML + RTL for small model reasoning amplification
391
-
392
- - **Security Architecture** HMAC binding, RBAC, encryption at rest, fact integrity chains, OWASP mapping
393
-
394
- - **API Formalism** (§6.10) RFC 2119 operation contracts, error taxonomy (13 codes), streaming API, async API, stability tiers
395
-
396
- - **Concurrency Model** (§23) thread safety, lock ordering, session-level serialization
397
-
398
- - **Observability & Audit** (§24) event model, telemetry, window DAG traceability
399
-
400
- - **Configuration Management** (§25) 5-layer hierarchy
401
-
402
- - **Multi-Provider LLM Interface** (§26)provider-agnostic adapter pattern
403
-
404
- - **Deployment Architecture** (§27 + 09_DEPLOYMENT) embedded library, Lambda/K8s scenarios
405
-
406
- - **Publication & Adoption Strategy** (§28) repo structure, visibility strategy, standards track
407
-
408
- ### Design Decisions
409
-
410
- - CKF is **free and normative** ships with every conformant SDK (PostgreSQL model)
411
- - CRP is an **embedded library**, not a server zero deployment overhead
412
- - Protocol is **language-neutral** JSON Schema for all types, pseudocode for algorithms
413
- - All 11 Knowledge Backend Interface operations are **REQUIRED**
414
- - GLiNER domain models are **FUTURE** work (Phase 3+)
1
+ <!--
2
+ Copyright (c) 2026 Constantinos Vidiniotis. All rights reserved.
3
+ Licensed under the terms described in LICENSE.md in the root of this repository.
4
+ -->
5
+
6
+ # Changelog
7
+
8
+ All notable changes to the CRP specification will be documented in this file.
9
+
10
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11
+
12
+ ## [Unreleased]
13
+
14
+ ### Added
15
+ - (none yet)
16
+
17
+ ## [2.3.1] - 2026-04-24
18
+
19
+ ### Fixed
20
+
21
+ - **Dispatch infinite-loop on trivial provider outputs** — fixed a hang in
22
+ `DispatchMixin` where the continuation loop could fire repeatedly against
23
+ a provider returning tiny/stop-reason outputs (common with mock/thin
24
+ providers and very cheap local models).
25
+ - `crp.continuation.trigger.TriggerConfig` gained
26
+ `gap_override_min_output_tokens` (default `16`): the gap-score override
27
+ path is now suppressed when the observed output is below this threshold
28
+ **and** the provider already reported `finish_reason="stop"`.
29
+ - `crp.core.config` gained a new `continuation_pause_s` key
30
+ (default `0.0`, bounds `[0.0, 60.0]`) that replaces the previously
31
+ hardcoded `time.sleep(2)` between continuation windows in
32
+ `DispatchMixin`. Local/slow-backend users can opt back in by setting
33
+ `continuation_pause_s=2.0` in their CRP config.
34
+ - Test assertions in `tests/test_phase1.py` were relaxed from exact
35
+ equality to `startswith("fake output")` so they tolerate the CRP 2.3
36
+ tamper-evidence signature tail (`<!-- CRP | ELv2 | ... -->`).
37
+ - Verified: `pytest tests/test_phase1.py::TestOrchestrator` now passes
38
+ 16/16 in ~75s (previously hung indefinitely).
39
+
40
+ ## [2.3.0] - 2026-04-23
41
+
42
+ ### AddedCloses all 5 protocol-oversight gaps identified in 2.2
43
+
44
+ - **G1 — Provider/framework hooks (`crp.integrations`)**: auto-instrument
45
+ uninstrumented call sites so CRP sees every model call even when the
46
+ integrator hand-builds requests or uses a third-party framework.
47
+ - `crp.integrations.openai_hook.install()` / `uninstall()` monkey-patches
48
+ `openai.OpenAI.chat.completions.create` (sync + async) to route through
49
+ the configured `ContextEnforcer` before dispatch.
50
+ - `crp.integrations.anthropic_hook.install()` / `uninstall()` same for
51
+ `anthropic.Anthropic.messages.create`.
52
+ - `crp.integrations.langchain_hook.CRPCallbackHandler` LangChain
53
+ `BaseCallbackHandler` that records every LLM/chain/tool invocation to
54
+ the ledger and enforces policy pre-flight.
55
+ - New exports: `install_openai_hook`, `install_anthropic_hook`,
56
+ `CRPCallbackHandler` on the top-level `crp` package.
57
+
58
+ - **G2 Derived manifests (`crp.core.manifest_derive`)**: infer a manifest
59
+ from observed bytes when integrators skip declaration. Distinguishes
60
+ *lazy* (content exists but no stamp) from *genuinely ephemeral* (no
61
+ durable source to stamp).
62
+ - `derive_manifest_from_content(...)` SHA-256 digest, heuristic
63
+ `SourceKind` classification, `TrustLevel.UNKNOWN` stamp.
64
+ - `derive_manifest_batch(...)` batch-derive across a list of observed
65
+ payloads.
66
+ - Integrators who never stamp sources now get OBSERVE-level enforcement
67
+ benefit: derived manifests flow through the ledger just like declared
68
+ ones, with an explicit `origin=SourceOrigin.DERIVED` marker.
69
+
70
+ - **G3 Turn-level enforcement**: `ContextEnforcer` re-validates every
71
+ turn, including `tool_result` injections mid-conversation.
72
+ - `ContextEnforcer.check_messages(messages, observed=...)` — runs the
73
+ full enforcement pipeline against an entire chat-completions-shape
74
+ message list.
75
+ - `ContextEnforcer.check_tool_result(tool_call_id, content, ...)`
76
+ re-validates a single `tool_result` before it re-enters the prompt.
77
+
78
+ - **G4 — Ledger hardening (`ManifestLedger`)**: tamper-evident hash chain,
79
+ SIEM/JSONL forwarding, pluggable backends.
80
+ - Every appended entry now carries `prev_hash` + `entry_hash`. Breaking
81
+ the chain is detected by `ManifestLedger.verify_chain(session_id)`.
82
+ - `ManifestLedger(forward_to=[AuditSink(...)])` optional list of audit
83
+ sinks; each recorded entry is also emitted as an audit event so SIEM
84
+ forwarders / syslog / JSONL replicators see the ledger write in real
85
+ time. Forwarding never blocks ledger writes.
86
+ - `crp.core.ledger_backends` — `LedgerBackend` protocol plus
87
+ `JsonlFileSink` and `SyslogSink` reference implementations.
88
+
89
+ - **G5 Default observe enforcer**: `assemble_messages` now auto-installs
90
+ an `OBSERVE`-mode enforcer if the integrator forgot to configure one.
91
+ Safer-by-default; closes the silent-skip footgun.
92
+
93
+ - **Custom / local-endpoint providers**: `OpenAIAdapter` now accepts
94
+ empty-string or `None` `api_key` when `base_url` is set. Unblocks
95
+ LM Studio, vLLM, llama.cpp server, Ollama OpenAI-compat, TGI, and any
96
+ unauthenticated local endpoint. Verified live against
97
+ `gemma-3-270m-it-qat` on LM Studio (`http://192.168.0.6:1234`).
98
+
99
+ ### Changed
100
+
101
+ - `ContextEnforcer.__init__` gained `key_provider`, `ledger`, and
102
+ `session_id` kwargs (additive; all optional). No existing call site
103
+ needs to change.
104
+ - `ManifestLedgerEntry` now always contains `prev_hash` + `entry_hash` on
105
+ newly written entries; legacy entries without hash fields are treated
106
+ as "chain origin" and do not break verification.
107
+
108
+ ### Fixed
109
+
110
+ - `AttestationMismatch.observed_source` attribute access regression
111
+ (previously crashed when an enforcer rejected a manifest mismatch).
112
+
113
+ ### Verification
114
+
115
+ - 30 new tests in `tests/test_gaps_2_3.py` covering all 5 gaps end-to-end.
116
+ - Live end-to-end verification against LM Studio (`gemma-3-270m-it-qat`)
117
+ 4/4 stages pass: empty-key adapter, basic generation, dispatch
118
+ through `ContextEnforcer` (OBSERVE) + `ManifestLedger`, multi-turn
119
+ sequential generation with explicit resource management.
120
+ - 163 core + gap tests pass serial (no parallelism).
121
+
122
+ ## [2.2.0] - 2026-04-23
123
+
124
+ ### Added — Miscellaneous (from 2.1 Unreleased pool)
125
+ - Trademark notice: "Context Relay Protocol" (application pending, Class 9)
126
+ - Contact emails: info@crprotocol.io (general), contact@crprotocol.io (enterprise)
127
+ - GitHub Discussions enabled
128
+ - Operational runbook (`docs/OPERATIONS_RUNBOOK.md`) deployment, monitoring, incident response
129
+ - Integrity chain external verification (`export_for_verification()`, `verify_external()`)
130
+ - `/metrics` endpoint on HTTP sidecar (Prometheus format)
131
+ - Session file schema versioning with forward-compatible migration path
132
+ - Bounded ingest queue (`maxsize=1000`) prevents unbounded memory growth
133
+ - Pipeline short-circuit skips late extraction stages when early stages produce enough facts
134
+ - Config file layer — YAML/JSON config files (`~/.crp/config.yaml`, `.crp.yaml`)
135
+ - Structured logging wired into orchestrator initialization
136
+ - Metadata size limits on `Fact` (64 keys, 128-char key length, 4096-char value size)
137
+ - `TypeAlias` annotations and extended type aliases in `crp/_typing.py`
138
+ - All error types and config classes exported from `crp.__init__`
139
+
140
+ ### Changed Miscellaneous (from 2.1 Unreleased pool)
141
+ - `FactGraph` edge lookups now O(1) via indexed dicts (was O(n) list scan)
142
+ - Provider error responses sanitized — no internal details leak to clients
143
+ - Envelope builder truncates when exceeding token budget, clamps saturation to 1.0
144
+ - Test fixtures use `tmp_path` pytest fixture instead of `tempfile.TemporaryDirectory()`
145
+ - Correlation IDs propagated through ingest path
146
+
147
+ ### FixedMiscellaneous (from 2.1 Unreleased pool)
148
+ - Unknown config kwargs now produce a warning log instead of silent ignore
149
+
150
+ ### AddedEnforcement Pipeline, Ledger & Injection Detection (§7.14.4–§7.14.5)
151
+
152
+ CRP 2.1 defined the **vocabulary** for context-source provenance
153
+ (`ContextSource`, `ContextManifest`). CRP 2.2 defines the **enforcement
154
+ point** the single wire-side choke-point every envelope assembly flows
155
+ throughplus cross-turn persistence, key rotation, and content-side
156
+ verification of declared trust labels. This closes the gap between
157
+ "context is labelled" and "context is actually enforced on the wire".
158
+
159
+ - New module `crp.core.context_enforcer` (§7.14.4):
160
+ - `EnforcementPolicy` (`OBSERVE` / `WARN` / `REJECT`) application-
161
+ level policy for what happens on a violation.
162
+ - `ContextEnforcer` — composes manifest signature-verify, expiry
163
+ check, attestation mismatch scan (`check_attestation`), and
164
+ injection-signal scan into a single `check(manifest, observed)`
165
+ call. Under `REJECT`, raises `CRPError(CONTEXT_ATTESTATION_MISMATCH)`
166
+ or `CRPError(CONTEXT_MANIFEST_INVALID)`. Under `OBSERVE` / `WARN`,
167
+ emits audit events and continues.
168
+ - `detect_injection_signals()` — six high-precision regex patterns
169
+ (instruction override, role jailbreak, secret exfil, delimiter
170
+ forgery, dangerous payload URLs, embedded tool calls) applied to
171
+ sources declared `TrustLevel.TRUSTED`. Addresses the gap between
172
+ *declared* and *actual* trust — developers marking a system prompt
173
+ as TRUSTED doesn't make templated user input safe.
174
+ - `AuditSink` protocol + `LoggingAuditSink` + thread-safe
175
+ `InMemoryAuditSink` (bounded ring buffer). Every mismatch and
176
+ injection signal is emitted as a structured event for SIEM / audit
177
+ pipelines.
178
+ - `default_enforcer()` / `set_default_enforcer()` process-wide
179
+ opt-in installer so libraries (dispatch router, CKF, warm store)
180
+ can find a configured enforcer without explicit plumbing.
181
+ - `observed_content(source, text)` helper for presenting source +
182
+ payload pairs to the enforcer for content scanning.
183
+
184
+ - New module `crp.core.manifest_ledger` (§7.14.5):
185
+ - `ManifestLedger` — append-only JSONL store
186
+ (`crp_sessions/<session_id>.manifest.jsonl`) of every manifest ever
187
+ attached to a session. Supports `record()`, `load()`, `history()`,
188
+ `latest()`, `find_by_source_id()`, `find_by_kind()`, and
189
+ `verify_signatures()` for periodic integrity audits.
190
+ - `KeyProvider` abstraction with two implementations:
191
+ - `EnvVarKeyProvider` — reads HMAC secret from an environment
192
+ variable, auto-detects hex encoding, enforces ≥32-byte minimum.
193
+ - `RotatingKeyProvider` current + retired key ring with
194
+ configurable grace window, allowing in-flight manifests signed
195
+ under the previous key to continue verifying after rotation.
196
+
197
+ ### Added Consumer-Side Integration (§7.14.4 wire point)
198
+
199
+ - `crp.core.dispatch_router.assemble_messages()` now accepts optional
200
+ `manifest`, `observed_sources`, and `enforcer` keyword arguments.
201
+ When supplied (or a process-wide default enforcer is installed),
202
+ every envelope assembly runs the full enforcement pipeline
203
+ **before** messages are constructed. Zero-cost when no enforcer is
204
+ configured fully backward compatible with CRP 2.1 call sites.
205
+
206
+ - `crp.state.warm_store.get_active_facts_as_extraction()` now stamps
207
+ every un-sourced fact with
208
+ `ContextSource(kind=WARM_STORE, origin=OBSERVED, trust_level=TRUSTED)`.
209
+
210
+ - `crp.ckf.fabric.ContextKnowledgeFabric.retrieve()` now stamps every
211
+ un-sourced merged fact with `ContextSource(kind=CKF_RETRIEVAL, ...)`
212
+ carrying the retrieval modes and score in `metadata`.
213
+
214
+ ### Changed Source-Kind Detection
215
+
216
+ - `crp.core.context_source.detect_source_kind()` strengthened:
217
+ - New structural hint parser: attempts `json.loads(content)` and
218
+ inspects object keys (`function_name` + `arguments` → `FUNCTION_CALL`,
219
+ `mcp` / `mcp_server` → `MCP_TOOL`, `url` + `snippet` →
220
+ `WEB_SEARCH`, `embedding` / `vector` → `VECTOR_DB`).
221
+ - Six new heuristic regex patterns for JSON/XML/YAML code blocks,
222
+ SQL DML, Cypher / graph query keywords, SERPAPI / Google / Bing
223
+ signatures, common vector-DB provider names (Pinecone, Weaviate,
224
+ Qdrant, Chroma, pgvector, Milvus), and `function_name` / `tool_name`
225
+ tokens.
226
+ - Structural hints are preferred over regex when parsing succeeds.
227
+
228
+ ### Security
229
+
230
+ - Manifest verification is now always attempted when both a signature
231
+ and a secret are present, even if `require_signed_manifest=False`.
232
+ Tampered signatures are detected and emitted as
233
+ `CONTEXT_MANIFEST_INVALID` audit events.
234
+ - `ManifestLedger` rejects session IDs that sanitize to empty
235
+ (prevents directory traversal via crafted session identifiers).
236
+ - HMAC verification continues to use `hmac.compare_digest` (constant
237
+ time). `RotatingKeyProvider` iterates candidate keys for verification
238
+ so key rotation does not create a signature-oracle side channel.
239
+
240
+ ### Tests
241
+
242
+ - 38 new tests in `tests/test_context_enforcer.py` (injection patterns,
243
+ audit sinks, all three policies, default-enforcer install, integration
244
+ with `assemble_messages`).
245
+ - 34 new tests in `tests/test_manifest_ledger.py` (JSONL round-trip,
246
+ cross-instance rehydration, lineage queries, key rotation, hex/utf-8
247
+ env secret decode, grace-window verification).
248
+ - Total suite: **182 passing** (110 pre-2.2 baseline + 72 new).
249
+
250
+ ## [2.1.0] - 2026-04-23
251
+
252
+ ### Added — Context-Source Provenance (§7.14.3)
253
+ - Contact emails: info@crprotocol.io (general), contact@crprotocol.io (enterprise)
254
+ - GitHub Discussions enabled
255
+ - Operational runbook (`docs/OPERATIONS_RUNBOOK.md`) deployment, monitoring, incident response
256
+ - Integrity chain external verification (`export_for_verification()`, `verify_external()`)
257
+ - `/metrics` endpoint on HTTP sidecar (Prometheus format)
258
+ - Session file schema versioning with forward-compatible migration path
259
+ - Bounded ingest queue (`maxsize=1000`) prevents unbounded memory growth
260
+ - Pipeline short-circuit skips late extraction stages when early stages produce enough facts
261
+ - Config file layer YAML/JSON config files (`~/.crp/config.yaml`, `.crp.yaml`)
262
+ - Structured logging wired into orchestrator initialization
263
+ - Metadata size limits on `Fact` (64 keys, 128-char key length, 4096-char value size)
264
+ - `TypeAlias` annotations and extended type aliases in `crp/_typing.py`
265
+ - All error types and config classes exported from `crp.__init__`
266
+
267
+ ### Changed
268
+ - `FactGraph` edge lookups now O(1) via indexed dicts (was O(n) list scan)
269
+ - Provider error responses sanitizedno internal details leak to clients
270
+ - Envelope builder truncates when exceeding token budget, clamps saturation to 1.0
271
+ - Test fixtures use `tmp_path` pytest fixture instead of `tempfile.TemporaryDirectory()`
272
+ - Correlation IDs propagated through ingest path
273
+
274
+ ### Fixed
275
+ - Unknown config kwargs now produce a warning log instead of silent ignore
276
+
277
+ ## [2.1.0] - 2026-04-23
278
+
279
+ ### AddedContext-Source Provenance (§7.14.3)
280
+
281
+ CRP's Decision Provenance Engine already classifies every *output* claim as
282
+ `CONTEXT_GROUNDED | PARAMETRIC | MIXED | UNCERTAIN`. This release adds the
283
+ symmetric **input-side** primitive: every fact that enters the envelope
284
+ can now carry a record of *where it came from* (RAG chunk, vector DB,
285
+ database read, MCP tool, function call, web search, user turn, file upload,
286
+ agent memory, or parametric). This is foundational for ISO/IEC 42001 §4
287
+ (Context of the organisation), EU AI Act Art. 10 (Data governance),
288
+ GDPR Art. 30 (Records of Processing), and NIST AI RMF MAP-4.
289
+
290
+ - New module `crp.core.context_source` with:
291
+ - `SourceKind` closed enumeration (14 values) of upstream source
292
+ categories. Additions require an RFC.
293
+ - `ContextSource` immutable (`frozen=True`) record: `kind`, `source_id`,
294
+ `origin` (declared / observed / heuristic), `trust_level`,
295
+ `contains_pii`, `sensitivity`, `region`, `retrieval_query`,
296
+ `retrieved_at`, `upstream_uri`, `declared_by_manifest_id`, `metadata`.
297
+ - `ContextManifest` — customer-authored declarative attestation of
298
+ intended upstream sources. HMAC-SHA256 signed over canonical JSON,
299
+ with `sign()` / `verify()` using constant-time comparison and
300
+ `is_expired()` helpers.
301
+ - `detect_source_kind(content, role=…)` — detective-mode heuristic
302
+ parser that classifies message content by OpenAI-style role plus a
303
+ conservative pattern library (`<RAG>`, `[retrieved]`, `<mcp:>`,
304
+ `SELECT FROM …`, web-search markers, etc.).
305
+ - `check_attestation(observed, manifest)` returns a list of
306
+ `AttestationMismatch` rows (reasons: `no_manifest`,
307
+ `manifest_expired`, `unattested_kind`, `unattested_source_id`).
308
+ `to_audit_event()` produces the §7.14.2 audit-event envelope shape.
309
+ - `Fact.source: ContextSource | None` optional field; defaults to
310
+ `None` so v2.0 callers see zero behavioural change.
311
+ - Envelope section `[CONTEXT_SOURCES]` registered in the Tier 3 priority
312
+ list (`crp/envelope/formatter.py::TIER_3_SECTIONS`).
313
+ - Error codes `CONTEXT_ATTESTATION_MISMATCH = 1040` and
314
+ `CONTEXT_MANIFEST_INVALID = 1041`.
315
+ - `ManifestValidationError` raised on malformed JSON / empty signing key.
316
+ - All primitives exported from `crp` (`SourceKind`, `SourceOrigin`,
317
+ `TrustLevel`, `ContextSource`, `ContextManifest`, `AttestationMismatch`,
318
+ `ManifestValidationError`, `detect_source_kind`, `check_attestation`).
319
+ - 41-test suite (`tests/test_context_source.py`) covering frozen
320
+ invariant, size limits, JSON round-trip, HMAC sign / verify, expiry,
321
+ detective-mode classification, attestation-mismatch edge cases, audit
322
+ event shape, and public API surface.
323
+
324
+ ### Changed
325
+
326
+ - `docs/CRP_CAPABILITIES.md` now lists context-source provenance as a
327
+ first-class capability.
328
+ - MkDocs site gains a dedicated *Protocol Context Sources* page.
329
+
330
+ ### Migration notes
331
+
332
+ This release is **fully backward-compatible**. `Fact.source` defaults to
333
+ `None`; consumers that ignore the field continue to work unchanged. To
334
+ adopt, wrap retrieved chunks with `ContextSource` at ingestion time:
335
+
336
+ ```python
337
+ from crp import ContextSource, SourceKind, SourceOrigin, Fact
338
+
339
+ fact = Fact(
340
+ text=chunk.text,
341
+ source=ContextSource(
342
+ kind=SourceKind.VECTOR_DB,
343
+ source_id="acme-hr-policies-vdb",
344
+ origin=SourceOrigin.OBSERVED,
345
+ contains_pii=True,
346
+ region="eu-west-1",
347
+ retrieval_query=user_query,
348
+ ),
349
+ )
350
+ ```
351
+
352
+ See `docs/protocol/context-sources.md` (published on crprotocol.io) for
353
+ the full integration guide.
354
+
355
+ ## [2.0.0] - 2026-04-06
356
+
357
+ ### Added
358
+
359
+ - **HTTP Sidecar Security Hardening & Full Protocol Surface** (§F2-security)
360
+ - Defense-in-depth security model: 8 layers enforced on every request
361
+ - Bearer-token authentication with timing-safe comparison (`secrets.compare_digest`)
362
+ - Session ownership: sessions bound to SHA-256 hash of the creating token, other tokens get `403 Forbidden`
363
+ - Per-IP rate limiting with monotonic-clock sliding window (default 120 req/60s, configurable)
364
+ - Request body size limit: 10 MB cap, returns `413 Payload Too Large` when exceeded
365
+ - Concurrent session cap: default 64, returns `503 Service Unavailable` when exceeded
366
+ - Security headers on every response: `X-Content-Type-Options: nosniff`, `Cache-Control: no-store`
367
+ - `--bind-all` security gate: requires `--auth-token` unless `--allow-unauthenticated` explicitly set
368
+ - Full protocol surface exposed: all 6 dispatch variants (basic, tools, reflexive, progressive, stream-augmented, agentic) over HTTP
369
+ - New endpoints: `/facts/feedback` (boost/penalize/reject), `/providers` (register fallback), `/estimate` (cost estimation)
370
+ - Input validation on all endpoints: variant validation, required fields, capped limits
371
+ - CLI options: `--max-sessions`, `--rate-limit`, `--allow-unauthenticated`
372
+ - README: dedicated "Inter-LLM Context Sharing" section with endpoint reference, security model, and usage examples
373
+
374
+ - **Deep Audit Gap Fixes — F1-F6, D1-D9** (§gap-audit)
375
+ - F1: README provider claims corrected — removed false Google/vLLM/HuggingFace references
376
+ - F2: `crp serve` HTTP sidecar implemented (`crp/cli/sidecar.py`) — full REST API with inter-LLM context sharing via `/facts/share` endpoint
377
+ - F3: Provider fallback chain — `LLMProviderManager.generate_with_fallback()` tries primary then registered providers
378
+ - F4: README RBAC enforcement note corrected now accurately reflects full enforcement
379
+ - F5: Test count updated 266 351
380
+ - F6: `EventEmitter` wired into orchestrator — 30+ event types emitted at all pipeline stages (dispatch.started/completed, envelope.built, window.opened/continued/completed, fact.created, extraction.completed, session.closed)
381
+ - D1: `CQSDetector` wired — context hunger detection after LLM generation
382
+ - D2: `CrossWindowValidator` wired — extraction-based consistency validation after continuation loop
383
+ - D3: `FeedbackLoop` wired — confidence adjustments after extraction, public API (boost/penalize/reject)
384
+ - D4: `ParallelFanOut` wired instantiated with dispatch/extract callables
385
+ - D5: `ReviewCycleManager` wired — checkpoint_review in continuation loop
386
+ - D6: `ScaleModeSelector` wiredconfigured at dispatch start from session processing_mode
387
+ - D7: `EventEmitter` wired (same as F6)
388
+ - D8: `TelemetryWriter` wiredoptional JSONL sink for window telemetry
389
+ - D9: `LLMProviderManager` wired with fallback chain (same as F3)
390
+ - Public API: `emitter` property, `on()` subscription, `feedback` property, `boost_fact()`/`penalize_fact()`/`reject_fact()`, `register_provider()`, `parallel` property
391
+ - HTTP sidecar endpoints: POST /sessions, GET /sessions/:id/status, POST /sessions/:id/dispatch, POST /sessions/:id/ingest, GET /sessions/:id/facts, POST /sessions/:id/facts/share, POST /sessions/:id/close, GET /health
392
+ - All 351 tests passing after changes
393
+
394
+ - **Adaptive Resource Allocation & Efficiency-First Optimization** (§resource-alloc)
395
+ - `AdaptiveAllocator` — dynamic pipeline tuning based on real-time overhead + memory pressure
396
+ - **Efficiency-first philosophy**: ML extraction stages (GLiNER, UIE, discourse) are core intelligence never disabled
397
+ - `PROTECTED_INTELLIGENCE` frozenset — ML features excluded from shedding cascade and stage scheduling
398
+ - Throughput-based throttling: normal → throttled → constrained (adjusts fact limits, batch sizes, packing) instead of disabling stages
399
+ - `PromptEfficiency` dataclass — LLM-side optimization hints: fact deduplication, system prompt caching, envelope compression, connection reuse, estimated cache hit percentage
400
+ - EWMA-smoothed overhead tracking with configurable cap (default 15%)
401
+ - `_adapt_throughput()` — adjusts throughput level based on overhead trends without sacrificing intelligence
402
+ - `OverheadBudgetManager` wired into orchestratorshedding cascade now live, ML features protected
403
+ - `ExtractionProfile` / `EnvelopeProfile` — recommended configurations based on resource state (stages always enabled)
404
+ - Consecutive over-cap detection: 3+ consecutive windows triggers throughput reduction
405
+ - `detect_hardware()` — auto-detects CPU count, total/available RAM (Windows + POSIX)
406
+ - `WindowOverheadRecord` per-window metrics with features shed + stages skipped tracking
407
+ - `ResourceManager.mark_unloaded()` / `trigger_gc()` — model lifecycle + conditional GC
408
+ - `_record_dispatch_overhead()` on orchestrator — feeds overhead to allocator after every dispatch
409
+ - `_allocator_fields()` → 4 new WindowMetrics fields: `adaptive_ewma_overhead_pct`, `adaptive_features_shed`, `adaptive_stages_disabled`, `adaptive_consecutive_over`
410
+ - All 6 dispatch variants wired: dispatch, dispatch_with_tools, dispatch_reflexive, dispatch_progressive, dispatch_stream_augmented, dispatch_agentic
411
+ - Tests covering hardware detection, EWMA smoothing, throughput adaptation, ML protection, prompt efficiency, profile generation, model lifecycle, edge cases
412
+ - Test count: 266 351
413
+
414
+ - **Resource Management & Meta-Learning Hardening** (§audit R2)
415
+ - `ResourceManager` — centralized model registry, memory pressure tracking, GC orchestration
416
+ - `ResourceSnapshot` dataclass — point-in-time view of memory budget, model utilization, pressure level
417
+ - Pressure levels: none/low/medium/high/critical based on estimated CRP memory vs. budget
418
+ - Model lifecycle tracking: register, load, use, unload, idle detection
419
+ - Platform-aware RSS reading (Windows ctypes + POSIX /proc/self/status)
420
+ - `CalibrationState` adaptive recalibration — drift detection replaces permanent baseline lock
421
+ - Rolling window analysis (last 10 windows) with 30% drift threshold triggers recalibration
422
+ - `calibration_epoch` counter tracks how many times baselines have been recalibrated
423
+ - WindowMetrics `ram_available_mb`, `ram_used_by_crp_mb`, `pressure_level` now live-computed
424
+ - WindowMetrics `marginal_gain` now computed as new-fact ratio per window
425
+ - WindowMetrics `sections_covered` now counts unique Markdown headers in output
426
+ - All 5 formerly-dead WindowMetrics fields are now populated across all 6 dispatch variants
427
+ - `_resource_fields()` and `_marginal_fields()` helpers on orchestrator
428
+ - GC runs automatically on `close()` for clean session teardown
429
+ - 38 tests covering ResourceManager, CalibrationState recalibration, marginal gain, sections
430
+
431
+ - **§22 — LLM-in-the-Loop Agentic Architecture** (PARADIGM SHIFT)
432
+ - CRPFacilitator cognitive engine with 6 LLM-driven decision modules
433
+ - Task analysis (§22.1) — LLM semantically understands task complexity
434
+ - Strategy routing (§22.2) — LLM chooses optimal dispatch strategy
435
+ - Fact synthesis (§22.3) — LLM merges/compresses knowledge base facts
436
+ - Output evaluation (§22.4) — LLM assesses output quality
437
+ - Memory curation (§22.5) — LLM manages CRP's knowledge base
438
+ - Execution planning (§22.6) — LLM decomposes complex tasks into multi-step plans
439
+ - Multi-step plan execution — each plan step dispatches with its own strategy
440
+ - Enhanced revision loop — structured evaluation feedback, strategy adjustment
441
+ - Post-revision curation — iterative knowledge refinement
442
+ - Continuation awareness — inner dispatch continuation state feeds into evaluation
443
+ - 12 agentic telemetry fields in WindowMetrics
444
+ - 84 tests covering all cognitive modules and integration paths
445
+
446
+ - **Multi-Perspective Audit & CKF Gate Fix**
447
+ - 5-perspective audit documented in CRP_MULTI_PERSPECTIVE_AUDIT.md
448
+ - CKF Phase 6 gate reworked: budget reservation (15% or 120 tokens min) ensures CKF retrieval fires even at high envelope saturation
449
+ - CKF_GATE_TOKENS lowered from 500 to 120 tokens
450
+ - CKF_RESERVE_RATIO constant (0.15) reserves budget before warm store packing
451
+ - Concurrency model documented in README.md
452
+ - README badge corrected (709 → 185 tests)
453
+ - 11 CKF gate tests added (test_ckf_gate.py)
454
+
455
+ - **§21 — Novel Relay Strategies**
456
+ - Reflexive dispatch — generate-then-verify with fact-checking
457
+ - Progressive dispatch — compact index with on-demand expansion
458
+ - Stream-augmented dispatch — mid-generation context injection
459
+ - 61 tests covering all three strategies
460
+
461
+ - **§20 — Tool-Mediated Dispatch**
462
+ - `dispatch_with_tools()` — LLM requests context via tool calls
463
+ - Multi-round tool negotiation with safety cap
464
+ - Fact extraction from tool dispatch outputs
465
+ - 34 tests covering tool relay pipeline
466
+
467
+ - **Complete CRP v2.0 Specification** — 9 documents, ~19,200 lines
468
+ - 01_RESEARCH_FOUNDATIONS.md — Academic research backing (9 research areas, 40+ papers)
469
+ - 02_CORE_PROTOCOL.md — Core specification (29 sections, ~6,800 lines)
470
+ - 03_CONTEXT_ENVELOPE.md — Context envelope architecture
471
+ - 04_TOKEN_GENERATION_PROTOCOL.md — Unbounded output via continuation
472
+ - 05_SYSTEM_WIDE_INTEGRATION.md — Integration architecture (87+ call sites)
473
+ - 06_IMPLEMENTATION_PLAN.md — Implementation roadmap
474
+ - 07_SECURITY.md — Security architecture (OWASP-aligned, 14 sections)
475
+ - 08_MONETIZATION.md — Business model (PostgreSQL model — full capability free)
476
+ - 09_DEPLOYMENT.md — Deployment architecture (embedded library)
477
+
478
+ - **JSON Schemas** (Draft 2020-12) for all API types:
479
+ - task-intent.json, quality-report.json, session-status.json
480
+ - cost-estimate.json, envelope-preview.json, session-handle.json
481
+ - stream-event.json, crp-error.json, persisted-state-header.json
482
+
483
+ - **Contextual Knowledge Fabric (CKF)** — normative knowledge layer:
484
+ - Graph walk, pattern query, semantic fallback, community summary retrieval
485
+ - Event-sourced history, pub-sub architecture
486
+ - Cross-session persistence
487
+
488
+ - **6-Stage Extraction Pipeline** (blackboard-reactive):
489
+ - Regex → Statistical (TextRank) → GLiNER NER → UIE Relations → RST Discourse → LLM-Assisted Relational
490
+
491
+ - **Quality Tier System** — S/A/B/C/D with degradation model
492
+
493
+ - **Multi-Signal Completion Detection** — fact flow + structural flow + vocabulary novelty + structural completion
494
+
495
+ - **Meta-Learning Architecture** — ORC + ICML + RTL for small model reasoning amplification
496
+
497
+ - **Security Architecture** — HMAC binding, RBAC, encryption at rest, fact integrity chains, OWASP mapping
498
+
499
+ - **API Formalism** (§6.10) — RFC 2119 operation contracts, error taxonomy (13 codes), streaming API, async API, stability tiers
500
+
501
+ - **Concurrency Model** (§23) — thread safety, lock ordering, session-level serialization
502
+
503
+ - **Observability & Audit** (§24) — event model, telemetry, window DAG traceability
504
+
505
+ - **Configuration Management** (§25) — 5-layer hierarchy
506
+
507
+ - **Multi-Provider LLM Interface** (§26) — provider-agnostic adapter pattern
508
+
509
+ - **Deployment Architecture** (§27 + 09_DEPLOYMENT) — embedded library, Lambda/K8s scenarios
510
+
511
+ - **Publication & Adoption Strategy** (§28) — repo structure, visibility strategy, standards track
512
+
513
+ ### Design Decisions
514
+
515
+ - CKF is **free and normative** — ships with every conformant SDK (PostgreSQL model)
516
+ - CRP is an **embedded library**, not a server — zero deployment overhead
517
+ - Protocol is **language-neutral** — JSON Schema for all types, pseudocode for algorithms
518
+ - All 11 Knowledge Backend Interface operations are **REQUIRED**
519
+ - GLiNER domain models are **FUTURE** work (Phase 3+)