crprotocol 2.3.1__tar.gz → 4.1.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.
- crprotocol-4.1.1/.github/PULL_REQUEST_TEMPLATE.md +34 -0
- crprotocol-4.1.1/.github/workflows/docs.yml +41 -0
- crprotocol-4.1.1/.gitignore +81 -0
- crprotocol-4.1.1/.kimi/skills/crp-auth-expert/SKILL.md +450 -0
- crprotocol-4.1.1/.kimi/skills/crp-comply-expert/SKILL.md +134 -0
- crprotocol-4.1.1/.kimi/skills/crp-gateway-expert/SKILL.md +130 -0
- crprotocol-4.1.1/.kimi/skills/crp-v4-expert/SKILL.md +223 -0
- crprotocol-4.1.1/.kimi/skills/crp-v4-specs/SKILL.md +152 -0
- crprotocol-4.1.1/.kimi/skills/programmatic-video-production/SKILL.md +87 -0
- crprotocol-4.1.1/.kimi/skills/programmatic-video-production/references/tool-comparison.md +20 -0
- crprotocol-4.1.1/AGENTS.md +940 -0
- crprotocol-4.1.1/AI Agent adoption/CRP-AGENT-ADOPTION-STRATEGY.md +143 -0
- crprotocol-4.1.1/AI Agent adoption/CRP-MCP-SERVER-SPECIFICATION.md +543 -0
- crprotocol-4.1.1/AI Agent adoption/CRP-SKILL.md +203 -0
- crprotocol-4.1.1/AI Agent adoption/llms-full.txt +203 -0
- crprotocol-4.1.1/AI Agent adoption/llms.txt +37 -0
- crprotocol-4.1.1/CHANGELOG.md +727 -0
- crprotocol-4.1.1/CRP Comply LLM connection methods issues prompt.txt +208 -0
- crprotocol-4.1.1/CRP protocol ecosystem figure.png +0 -0
- crprotocol-4.1.1/CRP-COMPLY-AI-SAFETY-PLAN.md +106 -0
- crprotocol-4.1.1/CRP-COMPLY-UPGRADE-REPORT-v2.md +159 -0
- crprotocol-4.1.1/CRP-COMPLY-UPGRADE-REPORT.md +320 -0
- crprotocol-4.1.1/CRP-SHARED-HERO-POSITIONING.md +167 -0
- crprotocol-4.1.1/CRP-v4-SPRINT-REPORT.md +147 -0
- crprotocol-4.1.1/CRP-v4-VISUAL-AUDIT-RATING.md +165 -0
- crprotocol-4.1.1/CRP_Comply_github_app_details.txt +45 -0
- crprotocol-4.1.1/CRP_protocol_FULL_transparent_white.png +0 -0
- crprotocol-4.1.1/CRPv4_Implementation_Rounds.md +1619 -0
- crprotocol-4.1.1/CRPv4_realised_deliverables.md +359 -0
- crprotocol-4.1.1/D1_CRP_Protocol_Marketing_Update.docx +0 -0
- crprotocol-4.1.1/PKG-INFO +1404 -0
- crprotocol-4.1.1/README.md +1331 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/CRP-BUILD-PROMPT.md +441 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/CRP-CODER-BRIEF.md +246 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/CRP-GATEWAY-BLUEPRINT.md +349 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/CRP-MASTER-INDEX.md +90 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/CRP-SDK-REFERENCE.md +353 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-FEASIBILITY.md +132 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-IANA-RESPONSE-STRATEGY.md +246 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-IETF-EMAIL-TEMPLATES.md +461 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-PUBLIC-CHECKLIST.md +109 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SITE-STRATEGY.md +549 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-001-core-protocol.md +246 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-002-headers.md +1775 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-003-envelope.md +678 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-004-continuation.md +792 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-005-dpe.md +1070 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-006-safety-policy.md +466 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-007-session-token.md +400 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-008-dispatch.md +463 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-009-ckf.md +332 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-010-regulatory-mapping.md +153 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-011-audit-trail.md +276 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-012-multi-agent-safety.md +396 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-013-github-action.md +374 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-014-conformance.md +600 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-015-security-privacy.md +396 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-016-gateway-service.md +735 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-017-zero-ckf-mode.md +545 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-018-air.md +423 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-019-cognitive-quality.md +225 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-020-cognitive-load-distribution.md +279 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-021-reasoning-orchestration.md +294 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-022-execution-fabric.md +296 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-023-amplification-boundary.md +276 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-024-coverage-differential-retrieval.md +533 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-025-graph-retrieval.md +266 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-026-semantic-quality-benchmark.md +239 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-027-retrieval-integrity.md +322 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-028-conversational-context.md +358 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-029-ephemeral-tool-context.md +329 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-030-cognitive-state-relay.md +361 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-031-semantic-task-layer.md +340 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-032-developer-experience.md +302 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-033-safety-control-plane.md +471 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-034-safety-coverage.md +277 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-035-context-lifecycle.md +235 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-036-scan-remediation.md +245 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-037-unified-config.md +240 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-038-storage-backends.md +275 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-039-semantic-code-ingestion.md +265 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-040-crp-comply.md +267 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-041-adoption-ecosystem.md +208 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SPEC-HOSTING-CONTROL.md +188 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-COMPLETE-PACKAGE/crp-coder-package/specs/CRP-SUBMISSION-GUIDE.md +467 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-MASTER-INDEX.md +90 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-SPEC-040-crp-comply.md +267 -0
- crprotocol-4.1.1/SPECS-2.06.2026/CRP-SPEC-041-adoption-ecosystem.md +208 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-FEASIBILITY.md +132 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-IETF-EMAIL-TEMPLATES.md +500 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-PUBLIC-CHECKLIST.md +109 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SITE-STRATEGY.md +549 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-001-core-protocol.md +246 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-002-headers.md +1775 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-003-envelope.md +678 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-004-continuation.md +792 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-005-dpe.md +1070 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-006-safety-policy.md +466 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-007-session-token.md +400 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-008-dispatch.md +463 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-009-ckf.md +332 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-010-regulatory-mapping.md +153 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-011-audit-trail.md +276 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-012-multi-agent-safety.md +396 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-013-github-action.md +374 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-014-conformance.md +600 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-015-security-privacy.md +396 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-016-gateway-service.md +735 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-017-zero-ckf-mode.md +545 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SPEC-HOSTING-CONTROL.md +188 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-SUBMISSION-GUIDE.md +467 -0
- crprotocol-4.1.1/SPECS_27-05-2027/CRP-V3-IMPLEMENTATION-PLAN.md +295 -0
- crprotocol-4.1.1/SPECS_27-05-2027/Overview of all documents.docx +0 -0
- crprotocol-4.1.1/SPECS_27-05-2027/SUBMISSION-GUIDE.md +577 -0
- crprotocol-4.1.1/SPECS_27-05-2027/TRACKING_OF_PROGRESS.MD +447 -0
- crprotocol-4.1.1/SPECS_27-05-2027/crp-headers-spec.html +1533 -0
- crprotocol-4.1.1/SPECS_27-05-2027/crp-product-ecosystem.html +1058 -0
- crprotocol-4.1.1/SPECS_27-05-2027/crp-v3-complete-spec.html +1047 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/Automated prompt-response review, questions, actions and insights.txt +246 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-AUTH-MIGRATION-SPRINT-SUMMARY.md +94 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-AUTH-POSTGRESQL-MIGRATION-PLAN.md +968 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-AUTH-USER-MANAGEMENT-SOLUTION.md +295 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-BUILD-PROMPT.md +441 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-CODER-BRIEF.md +246 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-COMPLY-BUILDER-PROMPT.md +146 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-COMPLY-UPGRADE-HANDOFF.md +240 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-ECOSYSTEM-BOUNDARIES.md +155 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-GATEWAY-BLUEPRINT.md +349 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-GATEWAY-PRODUCT-OVERVIEW.md +253 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-GITHUB-APP-GUIDE.md +240 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-GITHUB-CONNECTIVITY-SOLUTION.md +313 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-MARKET-STRATEGY.md +225 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-MASTER-INDEX.md +157 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-RAILWAY-SETUP-GUIDE.md +250 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-SDK-REFERENCE.md +353 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-STRIPE-SETUP-GUIDE.md +63 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-V4-UPGRADE-PROMPT.md +225 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/CRP-v4-PHASED-IMPLEMENTATION-REPORT.md +339 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/adversarially-robust-safety.md +88 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/mfa_plan.md +73 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-FEASIBILITY.md +132 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-IANA-RESPONSE-STRATEGY.md +246 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-IETF-EMAIL-TEMPLATES.md +461 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-PUBLIC-CHECKLIST.md +109 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SITE-STRATEGY.md +549 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-001-core-protocol.md +246 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-002-headers.md +1775 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-003-envelope.md +678 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-004-continuation.md +792 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-005-dpe.md +1070 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-006-safety-policy.md +466 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-007-session-token.md +400 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-008-dispatch.md +463 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-009-ckf.md +332 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-010-regulatory-mapping.md +153 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-011-audit-trail.md +276 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-012-multi-agent-safety.md +396 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-013-github-action.md +374 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-014-conformance.md +600 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-015-security-privacy.md +396 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-016-gateway-service.md +735 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-017-zero-ckf-mode.md +545 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-018-air.md +423 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-019-cognitive-quality.md +225 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-020-cognitive-load-distribution.md +279 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-021-reasoning-orchestration.md +294 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-022-execution-fabric.md +296 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-023-amplification-boundary.md +276 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-024-coverage-differential-retrieval.md +533 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-025-graph-retrieval.md +266 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-026-semantic-quality-benchmark.md +239 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-027-retrieval-integrity.md +322 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-028-conversational-context.md +358 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-029-ephemeral-tool-context.md +329 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-030-cognitive-state-relay.md +361 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-031-semantic-task-layer.md +340 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-032-developer-experience.md +302 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-033-safety-control-plane.md +471 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-034-safety-coverage.md +277 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-035-context-lifecycle.md +235 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-036-scan-remediation.md +245 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-037-unified-config.md +240 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-038-storage-backends.md +275 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-039-semantic-code-ingestion.md +265 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-040-crp-comply.md +311 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-041-adoption-ecosystem.md +208 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-042-comply-upgrade-integration.md +276 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-043-gateway-runtime-product.md +200 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-044-authoritative-domain-agent.md +199 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-045-knowledge-learning.md +213 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-046-user-defined-cognition.md +197 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-047-monetisation-payments.md +532 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-048-comply-lowcode-github.md +262 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-HOSTING-CONTROL.md +188 -0
- crprotocol-4.1.1/SPECS_5_06_2026_CRP_v4/specs/CRP-SUBMISSION-GUIDE.md +467 -0
- crprotocol-4.1.1/android-chrome-192x192.png +0 -0
- crprotocol-4.1.1/android-chrome-512x512.png +0 -0
- crprotocol-4.1.1/apple-touch-icon.png +0 -0
- crprotocol-4.1.1/crp/__init__.py +221 -0
- crprotocol-4.1.1/crp/_version.py +5 -0
- crprotocol-4.1.1/crp/activation/__init__.py +73 -0
- crprotocol-4.1.1/crp/activation/mode.py +260 -0
- crprotocol-4.1.1/crp/activation/onboarding.py +130 -0
- crprotocol-4.1.1/crp/activation/policy_adjust.py +89 -0
- crprotocol-4.1.1/crp/activation/stages.py +90 -0
- crprotocol-4.1.1/crp/advanced/cqs.py +298 -0
- crprotocol-4.1.1/crp/advanced/cross_window.py +622 -0
- crprotocol-4.1.1/crp/advanced/curator.py +277 -0
- crprotocol-4.1.1/crp/advanced/feedback.py +149 -0
- crprotocol-4.1.1/crp/advanced/meta_learning.py +560 -0
- crprotocol-4.1.1/crp/advanced/source_grounding.py +277 -0
- crprotocol-4.1.1/crp/agent/__init__.py +88 -0
- crprotocol-4.1.1/crp/agent/budget.py +249 -0
- crprotocol-4.1.1/crp/agent/chain.py +230 -0
- crprotocol-4.1.1/crp/agent/oversight.py +101 -0
- crprotocol-4.1.1/crp/agent/propagation.py +146 -0
- crprotocol-4.1.1/crp/ckf/__init__.py +48 -0
- crprotocol-4.1.1/crp/ckf/cdgr.py +375 -0
- crprotocol-4.1.1/crp/ckf/community.py +378 -0
- crprotocol-4.1.1/crp/ckf/fabric.py +565 -0
- crprotocol-4.1.1/crp/ckf/gc.py +177 -0
- crprotocol-4.1.1/crp/ckf/graph_edges.py +274 -0
- crprotocol-4.1.1/crp/ckf/semantic.py +214 -0
- crprotocol-4.1.1/crp/cli/main.py +469 -0
- crprotocol-4.1.1/crp/cli/sidecar.py +943 -0
- crprotocol-4.1.1/crp/cli/startup.py +274 -0
- crprotocol-4.1.1/crp/comply/__init__.py +13 -0
- crprotocol-4.1.1/crp/comply/billing/__init__.py +41 -0
- crprotocol-4.1.1/crp/comply/billing/checkout.py +159 -0
- crprotocol-4.1.1/crp/comply/billing/constants.py +117 -0
- crprotocol-4.1.1/crp/comply/billing/entitlements.py +110 -0
- crprotocol-4.1.1/crp/comply/billing/metering.py +114 -0
- crprotocol-4.1.1/crp/comply/billing/reconciliation.py +117 -0
- crprotocol-4.1.1/crp/comply/billing/webhook.py +262 -0
- crprotocol-4.1.1/crp/comply/checkpoint_inbox.py +128 -0
- crprotocol-4.1.1/crp/comply/gateway_client.py +136 -0
- crprotocol-4.1.1/crp/comply/gateway_proxy.py +152 -0
- crprotocol-4.1.1/crp/comply/github_routes.py +191 -0
- crprotocol-4.1.1/crp/comply/header_mapping.py +99 -0
- crprotocol-4.1.1/crp/comply/no_code.py +197 -0
- crprotocol-4.1.1/crp/comply/quota_gate.py +69 -0
- crprotocol-4.1.1/crp/comply/signup.py +106 -0
- crprotocol-4.1.1/crp/config.py +273 -0
- crprotocol-4.1.1/crp/config_schema.py +211 -0
- crprotocol-4.1.1/crp/continuation/__init__.py +130 -0
- crprotocol-4.1.1/crp/continuation/degradation.py +159 -0
- crprotocol-4.1.1/crp/continuation/document_map.py +169 -0
- crprotocol-4.1.1/crp/continuation/flow.py +253 -0
- crprotocol-4.1.1/crp/continuation/gap.py +420 -0
- crprotocol-4.1.1/crp/continuation/manager.py +576 -0
- crprotocol-4.1.1/crp/continuation/quality_monitor.py +180 -0
- crprotocol-4.1.1/crp/continuation/voice.py +166 -0
- crprotocol-4.1.1/crp/core/__init__.py +84 -0
- crprotocol-4.1.1/crp/core/config.py +397 -0
- crprotocol-4.1.1/crp/core/context_enforcer.py +783 -0
- crprotocol-4.1.1/crp/core/context_source.py +736 -0
- crprotocol-4.1.1/crp/core/context_tools.py +542 -0
- crprotocol-4.1.1/crp/core/dispatch_router.py +4023 -0
- crprotocol-4.1.1/crp/core/errors.py +161 -0
- crprotocol-4.1.1/crp/core/facilitator.py +716 -0
- crprotocol-4.1.1/crp/core/idempotency.py +220 -0
- crprotocol-4.1.1/crp/core/ledger_backends.py +201 -0
- crprotocol-4.1.1/crp/core/manifest_ledger.py +639 -0
- crprotocol-4.1.1/crp/core/orchestrator.py +1514 -0
- crprotocol-4.1.1/crp/core/session.py +227 -0
- crprotocol-4.1.1/crp/core/task_intent.py +55 -0
- crprotocol-4.1.1/crp/core/window.py +641 -0
- crprotocol-4.1.1/crp/envelope/__init__.py +43 -0
- crprotocol-4.1.1/crp/envelope/builder.py +323 -0
- crprotocol-4.1.1/crp/envelope/cdr.py +311 -0
- crprotocol-4.1.1/crp/envelope/formatter.py +209 -0
- crprotocol-4.1.1/crp/envelope/reranker.py +226 -0
- crprotocol-4.1.1/crp/envelope/retrieval_integrity.py +216 -0
- crprotocol-4.1.1/crp/envelope/scoring.py +319 -0
- crprotocol-4.1.1/crp/extraction/pipeline.py +394 -0
- crprotocol-4.1.1/crp/extraction/stage1_regex.py +174 -0
- crprotocol-4.1.1/crp/extraction/stage3_gliner.py +211 -0
- crprotocol-4.1.1/crp/extraction/stage4_uie.py +185 -0
- crprotocol-4.1.1/crp/extraction/stage6_llm.py +184 -0
- crprotocol-4.1.1/crp/extraction/structured_output.py +221 -0
- crprotocol-4.1.1/crp/extraction/types.py +447 -0
- crprotocol-4.1.1/crp/gateway/__init__.py +29 -0
- crprotocol-4.1.1/crp/gateway/api.py +1115 -0
- crprotocol-4.1.1/crp/gateway/key_vault.py +211 -0
- crprotocol-4.1.1/crp/gateway/router.py +332 -0
- crprotocol-4.1.1/crp/headers/__init__.py +54 -0
- crprotocol-4.1.1/crp/headers/conditional.py +164 -0
- crprotocol-4.1.1/crp/headers/emit.py +270 -0
- crprotocol-4.1.1/crp/headers/halt.py +82 -0
- crprotocol-4.1.1/crp/headers/middleware.py +102 -0
- crprotocol-4.1.1/crp/headers/names.py +141 -0
- crprotocol-4.1.1/crp/headers/parse.py +180 -0
- crprotocol-4.1.1/crp/integrations/anthropic_hook.py +111 -0
- crprotocol-4.1.1/crp/integrations/langchain_hook.py +132 -0
- crprotocol-4.1.1/crp/integrations/openai_hook.py +201 -0
- crprotocol-4.1.1/crp/observability/events.py +240 -0
- crprotocol-4.1.1/crp/observability/metrics.py +293 -0
- crprotocol-4.1.1/crp/observability/quality.py +142 -0
- crprotocol-4.1.1/crp/observability/structured_logging.py +89 -0
- crprotocol-4.1.1/crp/observability/telemetry.py +124 -0
- crprotocol-4.1.1/crp/policy/__init__.py +77 -0
- crprotocol-4.1.1/crp/policy/enforce.py +270 -0
- crprotocol-4.1.1/crp/policy/grammar.py +158 -0
- crprotocol-4.1.1/crp/policy/inheritance.py +136 -0
- crprotocol-4.1.1/crp/policy/mode.py +129 -0
- crprotocol-4.1.1/crp/policy/model.py +277 -0
- crprotocol-4.1.1/crp/policy/nonce.py +37 -0
- crprotocol-4.1.1/crp/policy/profiles.py +76 -0
- crprotocol-4.1.1/crp/policy/report.py +125 -0
- crprotocol-4.1.1/crp/provenance/__init__.py +542 -0
- crprotocol-4.1.1/crp/provenance/_types.py +563 -0
- crprotocol-4.1.1/crp/provenance/amplifiers.py +121 -0
- crprotocol-4.1.1/crp/provenance/attribution_scorer.py +265 -0
- crprotocol-4.1.1/crp/provenance/calibration.py +235 -0
- crprotocol-4.1.1/crp/provenance/distortion_detector.py +418 -0
- crprotocol-4.1.1/crp/provenance/fabrication_detector.py +210 -0
- crprotocol-4.1.1/crp/provenance/hallucination_scorer.py +329 -0
- crprotocol-4.1.1/crp/provenance/provenance_chain.py +202 -0
- crprotocol-4.1.1/crp/provenance/rqa.py +104 -0
- crprotocol-4.1.1/crp/provenance/rqa_stages.py +611 -0
- crprotocol-4.1.1/crp/provenance/window_chain.py +231 -0
- crprotocol-4.1.1/crp/providers/__init__.py +58 -0
- crprotocol-4.1.1/crp/providers/anthropic.py +277 -0
- crprotocol-4.1.1/crp/providers/base.py +185 -0
- crprotocol-4.1.1/crp/providers/custom.py +99 -0
- crprotocol-4.1.1/crp/providers/diagnostic.py +254 -0
- crprotocol-4.1.1/crp/providers/discovery.py +486 -0
- crprotocol-4.1.1/crp/providers/llamacpp.py +231 -0
- crprotocol-4.1.1/crp/providers/manager.py +179 -0
- crprotocol-4.1.1/crp/providers/ollama.py +250 -0
- crprotocol-4.1.1/crp/providers/openai.py +641 -0
- crprotocol-4.1.1/crp/py.typed +0 -0
- crprotocol-4.1.1/crp/resources/adaptive_allocator.py +529 -0
- crprotocol-4.1.1/crp/resources/cost_model.py +398 -0
- crprotocol-4.1.1/crp/resources/overhead_manager.py +222 -0
- crprotocol-4.1.1/crp/resources/resource_manager.py +276 -0
- crprotocol-4.1.1/crp/scan/__init__.py +28 -0
- crprotocol-4.1.1/crp/scan/github_app.py +332 -0
- crprotocol-4.1.1/crp/scan/remediation.py +506 -0
- crprotocol-4.1.1/crp/scan/semantic_ingestion.py +691 -0
- crprotocol-4.1.1/crp/scan/templates/README.md +3 -0
- crprotocol-4.1.1/crp/sdk/__init__.py +98 -0
- crprotocol-4.1.1/crp/sdk/client.py +1316 -0
- crprotocol-4.1.1/crp/sdk/dynamic.py +143 -0
- crprotocol-4.1.1/crp/sdk/proxies.py +1468 -0
- crprotocol-4.1.1/crp/sdk/proxies_extra.py +664 -0
- crprotocol-4.1.1/crp/sdk/proxies_more.py +684 -0
- crprotocol-4.1.1/crp/sdk/response.py +92 -0
- crprotocol-4.1.1/crp/security/__init__.py +140 -0
- crprotocol-4.1.1/crp/security/audit_trail.py +652 -0
- crprotocol-4.1.1/crp/security/binding.py +193 -0
- crprotocol-4.1.1/crp/security/checkpoint.py +313 -0
- crprotocol-4.1.1/crp/security/compliance.py +885 -0
- crprotocol-4.1.1/crp/security/consent.py +734 -0
- crprotocol-4.1.1/crp/security/control_plane.py +402 -0
- crprotocol-4.1.1/crp/security/coverage.py +223 -0
- crprotocol-4.1.1/crp/security/embedding_defense.py +170 -0
- crprotocol-4.1.1/crp/security/encryption.py +211 -0
- crprotocol-4.1.1/crp/security/injection.py +353 -0
- crprotocol-4.1.1/crp/security/integrity.py +278 -0
- crprotocol-4.1.1/crp/security/privacy.py +667 -0
- crprotocol-4.1.1/crp/security/quarantine.py +250 -0
- crprotocol-4.1.1/crp/security/rbac.py +224 -0
- crprotocol-4.1.1/crp/security/safety_manifest.py +179 -0
- crprotocol-4.1.1/crp/security/session_token.py +397 -0
- crprotocol-4.1.1/crp/state/__init__.py +81 -0
- crprotocol-4.1.1/crp/state/backends/__init__.py +40 -0
- crprotocol-4.1.1/crp/state/backends/base.py +49 -0
- crprotocol-4.1.1/crp/state/backends/memory.py +96 -0
- crprotocol-4.1.1/crp/state/backends/redis.py +88 -0
- crprotocol-4.1.1/crp/state/backends/s3.py +123 -0
- crprotocol-4.1.1/crp/state/backends/sqlite.py +130 -0
- crprotocol-4.1.1/crp/state/cold_storage.py +267 -0
- crprotocol-4.1.1/crp/state/coverage_set.py +314 -0
- crprotocol-4.1.1/crp/state/critical_state.py +122 -0
- crprotocol-4.1.1/crp/state/cso.py +657 -0
- crprotocol-4.1.1/crp/state/event_log.py +328 -0
- crprotocol-4.1.1/crp/state/fact.py +203 -0
- crprotocol-4.1.1/crp/state/horizons.py +203 -0
- crprotocol-4.1.1/crp/state/scratch_buffer.py +226 -0
- crprotocol-4.1.1/crp/state/snapshot.py +301 -0
- crprotocol-4.1.1/crp/state/storage/__init__.py +35 -0
- crprotocol-4.1.1/crp/state/storage/ephemeral_store.py +210 -0
- crprotocol-4.1.1/crp/state/storage/hot_cache.py +112 -0
- crprotocol-4.1.1/crp/state/storage/inverted_index.py +144 -0
- crprotocol-4.1.1/crp/state/storage/rolling_log.py +92 -0
- crprotocol-4.1.1/crp/state/storage/router.py +239 -0
- crprotocol-4.1.1/crp/state/warm_store.py +517 -0
- crprotocol-4.1.1/crp/stl/__init__.py +33 -0
- crprotocol-4.1.1/crp/stl/classifier.py +132 -0
- crprotocol-4.1.1/crp/stl/depth_model.py +160 -0
- crprotocol-4.1.1/crp/stl/frame_builder.py +189 -0
- crprotocol-4.1.1/crp/stl/goal_compass.py +133 -0
- crprotocol-4.1.1/crp/stl/orchestrator.py +192 -0
- crprotocol-4.1.1/crp_envelope_budget +0 -0
- crprotocol-4.1.1/crp_mcp/.env.example +81 -0
- crprotocol-4.1.1/crp_mcp/.env.hosted.template +81 -0
- crprotocol-4.1.1/crp_mcp/__init__.py +18 -0
- crprotocol-4.1.1/crp_mcp/agent_tools.py +325 -0
- crprotocol-4.1.1/crp_mcp/auth.py +325 -0
- crprotocol-4.1.1/crp_mcp/backend_client.py +162 -0
- crprotocol-4.1.1/crp_mcp/billing.py +268 -0
- crprotocol-4.1.1/crp_mcp/capabilities.py +240 -0
- crprotocol-4.1.1/crp_mcp/checkpoint_policy.py +275 -0
- crprotocol-4.1.1/crp_mcp/checkpoint_service.py +437 -0
- crprotocol-4.1.1/crp_mcp/completions.py +93 -0
- crprotocol-4.1.1/crp_mcp/comply_tools.py +236 -0
- crprotocol-4.1.1/crp_mcp/config_tools.py +142 -0
- crprotocol-4.1.1/crp_mcp/connectors/__init__.py +69 -0
- crprotocol-4.1.1/crp_mcp/connectors/base.py +22 -0
- crprotocol-4.1.1/crp_mcp/connectors/comply.py +54 -0
- crprotocol-4.1.1/crp_mcp/connectors/console.py +40 -0
- crprotocol-4.1.1/crp_mcp/connectors/email.py +116 -0
- crprotocol-4.1.1/crp_mcp/connectors/fcm.py +171 -0
- crprotocol-4.1.1/crp_mcp/connectors/gmail.py +67 -0
- crprotocol-4.1.1/crp_mcp/connectors/pagerduty.py +83 -0
- crprotocol-4.1.1/crp_mcp/connectors/slack.py +70 -0
- crprotocol-4.1.1/crp_mcp/connectors/sms.py +91 -0
- crprotocol-4.1.1/crp_mcp/connectors/webhook.py +48 -0
- crprotocol-4.1.1/crp_mcp/corpus.py +244 -0
- crprotocol-4.1.1/crp_mcp/dpe_tools.py +249 -0
- crprotocol-4.1.1/crp_mcp/gateway_tools.py +393 -0
- crprotocol-4.1.1/crp_mcp/headers_lint.py +73 -0
- crprotocol-4.1.1/crp_mcp/local_tools.py +351 -0
- crprotocol-4.1.1/crp_mcp/permissions.py +295 -0
- crprotocol-4.1.1/crp_mcp/prompts.py +83 -0
- crprotocol-4.1.1/crp_mcp/resources.py +158 -0
- crprotocol-4.1.1/crp_mcp/safety_tools.py +311 -0
- crprotocol-4.1.1/crp_mcp/scaffold.py +277 -0
- crprotocol-4.1.1/crp_mcp/scan_tools.py +274 -0
- crprotocol-4.1.1/crp_mcp/server.py +964 -0
- crprotocol-4.1.1/crp_mcp/types.py +83 -0
- crprotocol-4.1.1/crp_shared/__init__.py +62 -0
- crprotocol-4.1.1/crp_shared/audit.py +543 -0
- crprotocol-4.1.1/crp_shared/auth.py +247 -0
- crprotocol-4.1.1/crp_shared/crp_headers.py +181 -0
- crprotocol-4.1.1/crp_shared/db.py +62 -0
- crprotocol-4.1.1/crp_shared/passkey.py +667 -0
- crprotocol-4.1.1/crp_shared/schema.py +142 -0
- crprotocol-4.1.1/crp_shared/session_token.py +236 -0
- crprotocol-4.1.1/docs/AUDIT_REPORT_ROUND_1_SITE_FIXES.md +288 -0
- crprotocol-4.1.1/docs/AUDIT_REPORT_ROUND_2_VISUAL_IMPROVEMENTS.md +360 -0
- crprotocol-4.1.1/docs/Analysis_of_benchmark_results.md +312 -0
- crprotocol-4.1.1/docs/CRP_AVAILABILITY.md +93 -0
- crprotocol-4.1.1/docs/CRP_CHECKPOINTS_SETUP_GUIDE.md +475 -0
- crprotocol-4.1.1/docs/CRP_DEMO_VIDEO_SCRIPT.md +135 -0
- crprotocol-4.1.1/docs/CRP_MCP_ACTIONABLE_DEPLOYMENT_GUIDE.md +775 -0
- crprotocol-4.1.1/docs/CRP_MCP_CONNECTORS_SETUP_GUIDE.md +302 -0
- crprotocol-4.1.1/docs/CRP_MCP_ENVIRONMENT_MAPPING.md +134 -0
- crprotocol-4.1.1/docs/CRP_MCP_PRODUCTION_CHECKLIST.md +357 -0
- crprotocol-4.1.1/docs/CRP_MCP_SECURITY_AND_CHECKPOINTS_REPORT.md +298 -0
- crprotocol-4.1.1/docs/CRP_SCAN_ACTION_GUIDE.md +467 -0
- crprotocol-4.1.1/docs/CRP_SCAN_ACTION_PLAN.md +126 -0
- crprotocol-4.1.1/docs/CRP_SCAN_MARKETPLACE_AND_PARTNERSHIP.md +29 -0
- crprotocol-4.1.1/docs/CRP_SDK_CONTEXT_SAFETY_GAP_REPORT.md +144 -0
- crprotocol-4.1.1/docs/CRP_SPEC_REALITY_MAP.md +94 -0
- crprotocol-4.1.1/docs/CRP_V3_COMPLETENESS.md +157 -0
- crprotocol-4.1.1/docs/DEMO_REPRODUCTION_AND_VIDEO_GUIDE.md +1805 -0
- crprotocol-4.1.1/docs/DOCS_PLATFORM_EVALUATION.md +126 -0
- crprotocol-4.1.1/docs/DOCS_QUALITY_STRATEGY.md +159 -0
- crprotocol-4.1.1/docs/GATEWAY_BACKEND_INTEGRATION.md +275 -0
- crprotocol-4.1.1/docs/GATEWAY_RAILWAY_DEPLOY.md +32 -0
- crprotocol-4.1.1/docs/GITHUB_ACTION_PUBLISH.md +116 -0
- crprotocol-4.1.1/docs/LINKEDIN_LAUNCH_SERIES.md +115 -0
- crprotocol-4.1.1/docs/OPERATIONS_RUNBOOK.md +266 -0
- crprotocol-4.1.1/docs/SEO_AEO_GEO_STRATEGY.md +212 -0
- crprotocol-4.1.1/docs/UX_ACCESSIBILITY_IMPROVEMENTS.md +76 -0
- crprotocol-4.1.1/docs/VS_CODE_EXTENSION_PUBLISH.md +75 -0
- crprotocol-4.1.1/examples/crp_demos/README.md +78 -0
- crprotocol-4.1.1/examples/crp_demos/__init__.py +17 -0
- crprotocol-4.1.1/examples/crp_demos/_benchmark_results/20260601_140350_comparison.json +331 -0
- crprotocol-4.1.1/examples/crp_demos/_benchmark_results/20260601_140350_crp_document.md +452 -0
- crprotocol-4.1.1/examples/crp_demos/_benchmark_results/20260601_140350_hierarchical_document.md +185 -0
- crprotocol-4.1.1/examples/crp_demos/_benchmark_results/20260601_140350_injection_document.md +266 -0
- crprotocol-4.1.1/examples/crp_demos/_benchmark_results/20260601_140350_rag_document.md +262 -0
- crprotocol-4.1.1/examples/crp_demos/comparison_backend.py +314 -0
- crprotocol-4.1.1/examples/crp_demos/pipeline.py +596 -0
- crprotocol-4.1.1/examples/crp_demos/run_benchmark.py +186 -0
- crprotocol-4.1.1/examples/crp_demos/server.py +249 -0
- crprotocol-4.1.1/examples/crp_demos/sqb_benchmark.py +1225 -0
- crprotocol-4.1.1/examples/crp_demos/static/app.js +72 -0
- crprotocol-4.1.1/examples/crp_demos/static/comparison.html +717 -0
- crprotocol-4.1.1/examples/crp_demos/static/context.html +88 -0
- crprotocol-4.1.1/examples/crp_demos/static/context.js +127 -0
- crprotocol-4.1.1/examples/crp_demos/static/index.html +117 -0
- crprotocol-4.1.1/examples/crp_demos/static/safety.html +99 -0
- crprotocol-4.1.1/examples/crp_demos/static/safety.js +134 -0
- crprotocol-4.1.1/examples/crp_demos/static/style.css +165 -0
- crprotocol-4.1.1/examples/crp_demos/strategies/__init__.py +1 -0
- crprotocol-4.1.1/examples/crp_demos/strategies/base.py +290 -0
- crprotocol-4.1.1/examples/crp_demos/strategies/crp_strategy.py +597 -0
- crprotocol-4.1.1/examples/crp_demos/strategies/hierarchical_strategy.py +242 -0
- crprotocol-4.1.1/examples/crp_demos/strategies/injection_strategy.py +161 -0
- crprotocol-4.1.1/examples/crp_demos/strategies/rag_strategy.py +216 -0
- crprotocol-4.1.1/examples/crp_demos/v4/server.py +1314 -0
- crprotocol-4.1.1/examples/crp_demos/v4/static/app.js +571 -0
- crprotocol-4.1.1/examples/crp_demos/v4/static/index.html +311 -0
- crprotocol-4.1.1/examples/crp_demos/v4/static/style.css +488 -0
- crprotocol-4.1.1/favicon-16x16.png +0 -0
- crprotocol-4.1.1/favicon-32x32.png +0 -0
- crprotocol-4.1.1/favicon.ico +0 -0
- crprotocol-4.1.1/hooks/mkdocs_hooks.py +45 -0
- crprotocol-4.1.1/media/FINAL_CRP_Full_logo-transparent.png +0 -0
- crprotocol-4.1.1/message for AI safety.txt +26 -0
- crprotocol-4.1.1/migrations/001_initial.sql +225 -0
- crprotocol-4.1.1/mkdocs.yml +437 -0
- crprotocol-4.1.1/overrides/404.html +42 -0
- crprotocol-4.1.1/overrides/main.html +194 -0
- crprotocol-4.1.1/overrides/partials/logo.html +11 -0
- crprotocol-4.1.1/pyproject.toml +145 -0
- crprotocol-4.1.1/scripts/audit_docs.py +223 -0
- crprotocol-4.1.1/scripts/audit_docstrings.py +156 -0
- crprotocol-4.1.1/scripts/auto_docstrings.py +354 -0
- crprotocol-4.1.1/scripts/demo_varied_tests.py +140 -0
- crprotocol-4.1.1/scripts/gen_changelog.py +86 -0
- crprotocol-4.1.1/scripts/generate_api_reference.py +237 -0
- crprotocol-4.1.1/scripts/probe_safety.py +187 -0
- crprotocol-4.1.1/scripts/probe_varied_use_cases.py +201 -0
- crprotocol-4.1.1/scripts/validate_crp_mcp.py +346 -0
- crprotocol-4.1.1/scripts/verify_v4_demo.py +183 -0
- crprotocol-4.1.1/site-docs/BingSiteAuth.xml +4 -0
- crprotocol-4.1.1/site-docs/CNAME +1 -0
- crprotocol-4.1.1/site-docs/aiuc-1.md +468 -0
- crprotocol-4.1.1/site-docs/api/.meta.yml +6 -0
- crprotocol-4.1.1/site-docs/api/activation.md +17 -0
- crprotocol-4.1.1/site-docs/api/advanced.md +3 -0
- crprotocol-4.1.1/site-docs/api/agent.md +17 -0
- crprotocol-4.1.1/site-docs/api/ckf.md +24 -0
- crprotocol-4.1.1/site-docs/api/cli.md +3 -0
- crprotocol-4.1.1/site-docs/api/client.md +74 -0
- crprotocol-4.1.1/site-docs/api/compliance.md +95 -0
- crprotocol-4.1.1/site-docs/api/comply.md +10 -0
- crprotocol-4.1.1/site-docs/api/config.md +10 -0
- crprotocol-4.1.1/site-docs/api/continuation.md +3 -0
- crprotocol-4.1.1/site-docs/api/core.md +3 -0
- crprotocol-4.1.1/site-docs/api/cso.md +17 -0
- crprotocol-4.1.1/site-docs/api/dispatch.md +117 -0
- crprotocol-4.1.1/site-docs/api/envelope.md +3 -0
- crprotocol-4.1.1/site-docs/api/errors.md +3 -0
- crprotocol-4.1.1/site-docs/api/events.md +10 -0
- crprotocol-4.1.1/site-docs/api/extraction.md +24 -0
- crprotocol-4.1.1/site-docs/api/gateway.md +10 -0
- crprotocol-4.1.1/site-docs/api/headers.md +10 -0
- crprotocol-4.1.1/site-docs/api/index.md +83 -0
- crprotocol-4.1.1/site-docs/api/modules/activation.md +44 -0
- crprotocol-4.1.1/site-docs/api/modules/adapters.md +12 -0
- crprotocol-4.1.1/site-docs/api/modules/advanced.md +100 -0
- crprotocol-4.1.1/site-docs/api/modules/agent.md +44 -0
- crprotocol-4.1.1/site-docs/api/modules/ckf.md +92 -0
- crprotocol-4.1.1/site-docs/api/modules/cli.md +36 -0
- crprotocol-4.1.1/site-docs/api/modules/comply.md +116 -0
- crprotocol-4.1.1/site-docs/api/modules/config.md +12 -0
- crprotocol-4.1.1/site-docs/api/modules/config_schema.md +12 -0
- crprotocol-4.1.1/site-docs/api/modules/continuation.md +92 -0
- crprotocol-4.1.1/site-docs/api/modules/core.md +172 -0
- crprotocol-4.1.1/site-docs/api/modules/envelope.md +76 -0
- crprotocol-4.1.1/site-docs/api/modules/extraction.md +108 -0
- crprotocol-4.1.1/site-docs/api/modules/gateway.md +36 -0
- crprotocol-4.1.1/site-docs/api/modules/headers.md +60 -0
- crprotocol-4.1.1/site-docs/api/modules/index.md +43 -0
- crprotocol-4.1.1/site-docs/api/modules/integrations.md +36 -0
- crprotocol-4.1.1/site-docs/api/modules/license_guard.md +12 -0
- crprotocol-4.1.1/site-docs/api/modules/observability.md +60 -0
- crprotocol-4.1.1/site-docs/api/modules/policy.md +76 -0
- crprotocol-4.1.1/site-docs/api/modules/provenance.md +124 -0
- crprotocol-4.1.1/site-docs/api/modules/providers.md +92 -0
- crprotocol-4.1.1/site-docs/api/modules/resources.md +44 -0
- crprotocol-4.1.1/site-docs/api/modules/scan.md +36 -0
- crprotocol-4.1.1/site-docs/api/modules/schemas.md +12 -0
- crprotocol-4.1.1/site-docs/api/modules/sdk.md +28 -0
- crprotocol-4.1.1/site-docs/api/modules/security.md +148 -0
- crprotocol-4.1.1/site-docs/api/modules/state.md +212 -0
- crprotocol-4.1.1/site-docs/api/modules/stl.md +52 -0
- crprotocol-4.1.1/site-docs/api/observability.md +10 -0
- crprotocol-4.1.1/site-docs/api/policy.md +10 -0
- crprotocol-4.1.1/site-docs/api/provenance.md +17 -0
- crprotocol-4.1.1/site-docs/api/providers.md +17 -0
- crprotocol-4.1.1/site-docs/api/reasoning.md +17 -0
- crprotocol-4.1.1/site-docs/api/resources.md +3 -0
- crprotocol-4.1.1/site-docs/api/safety.md +24 -0
- crprotocol-4.1.1/site-docs/api/scan.md +10 -0
- crprotocol-4.1.1/site-docs/api/schemas.md +252 -0
- crprotocol-4.1.1/site-docs/api/security.md +3 -0
- crprotocol-4.1.1/site-docs/api/state.md +3 -0
- crprotocol-4.1.1/site-docs/assets/CRP_protocol_ecosystem_transparent.png +0 -0
- crprotocol-4.1.1/site-docs/assets/favicon/android-chrome-192x192.png +0 -0
- crprotocol-4.1.1/site-docs/assets/favicon/android-chrome-512x512.png +0 -0
- crprotocol-4.1.1/site-docs/assets/favicon/apple-touch-icon.png +0 -0
- crprotocol-4.1.1/site-docs/assets/favicon/favicon-16x16.png +0 -0
- crprotocol-4.1.1/site-docs/assets/favicon/favicon-32x32.png +0 -0
- crprotocol-4.1.1/site-docs/assets/favicon/favicon.ico +0 -0
- crprotocol-4.1.1/site-docs/assets/favicon/site.webmanifest +1 -0
- crprotocol-4.1.1/site-docs/assets/logo-full-readme.png +0 -0
- crprotocol-4.1.1/site-docs/assets/logo-full.png +0 -0
- crprotocol-4.1.1/site-docs/assets/logo-small.png +0 -0
- crprotocol-4.1.1/site-docs/assets/og-image.png +0 -0
- crprotocol-4.1.1/site-docs/capabilities.md +378 -0
- crprotocol-4.1.1/site-docs/cite.md +98 -0
- crprotocol-4.1.1/site-docs/compliance/.meta.yml +6 -0
- crprotocol-4.1.1/site-docs/compliance/eu-ai-act.md +175 -0
- crprotocol-4.1.1/site-docs/compliance/gdpr.md +170 -0
- crprotocol-4.1.1/site-docs/compliance/index.md +132 -0
- crprotocol-4.1.1/site-docs/compliance/iso-42001.md +150 -0
- crprotocol-4.1.1/site-docs/compliance/nist-ai-rmf.md +139 -0
- crprotocol-4.1.1/site-docs/compliance/security.md +201 -0
- crprotocol-4.1.1/site-docs/contributing.md +107 -0
- crprotocol-4.1.1/site-docs/control-evidence.md +194 -0
- crprotocol-4.1.1/site-docs/crpv4-roadmap.md +199 -0
- crprotocol-4.1.1/site-docs/faq.md +162 -0
- crprotocol-4.1.1/site-docs/getting-started/.meta.yml +6 -0
- crprotocol-4.1.1/site-docs/getting-started/cli.md +122 -0
- crprotocol-4.1.1/site-docs/getting-started/index.md +46 -0
- crprotocol-4.1.1/site-docs/getting-started/installation.md +71 -0
- crprotocol-4.1.1/site-docs/getting-started/licensing.md +206 -0
- crprotocol-4.1.1/site-docs/getting-started/local-models.md +236 -0
- crprotocol-4.1.1/site-docs/getting-started/operating-the-ecosystem.md +116 -0
- crprotocol-4.1.1/site-docs/getting-started/providers.md +122 -0
- crprotocol-4.1.1/site-docs/getting-started/quickstart.md +83 -0
- crprotocol-4.1.1/site-docs/guides/.meta.yml +6 -0
- crprotocol-4.1.1/site-docs/guides/demo-app.md +135 -0
- crprotocol-4.1.1/site-docs/guides/gateway-railway.md +44 -0
- crprotocol-4.1.1/site-docs/guides/index.md +67 -0
- crprotocol-4.1.1/site-docs/guides/ingestion.md +102 -0
- crprotocol-4.1.1/site-docs/guides/multi-turn.md +157 -0
- crprotocol-4.1.1/site-docs/guides/sdk-phases.md +79 -0
- crprotocol-4.1.1/site-docs/guides/sdk.md +431 -0
- crprotocol-4.1.1/site-docs/guides/session-persistence.md +66 -0
- crprotocol-4.1.1/site-docs/guides/sidecar.md +108 -0
- crprotocol-4.1.1/site-docs/guides/streaming.md +102 -0
- crprotocol-4.1.1/site-docs/index.md +489 -0
- crprotocol-4.1.1/site-docs/javascripts/ticker.js +220 -0
- crprotocol-4.1.1/site-docs/legal/.meta.yml +5 -0
- crprotocol-4.1.1/site-docs/legal/ai-policy.md +234 -0
- crprotocol-4.1.1/site-docs/legal/cookie-policy.md +94 -0
- crprotocol-4.1.1/site-docs/legal/index.md +46 -0
- crprotocol-4.1.1/site-docs/legal/information-security-policy.md +215 -0
- crprotocol-4.1.1/site-docs/legal/privacy-policy.md +181 -0
- crprotocol-4.1.1/site-docs/llms-full.txt +203 -0
- crprotocol-4.1.1/site-docs/llms.txt +36 -0
- crprotocol-4.1.1/site-docs/pricing.md +214 -0
- crprotocol-4.1.1/site-docs/products/.meta.yml +7 -0
- crprotocol-4.1.1/site-docs/products/comply.md +532 -0
- crprotocol-4.1.1/site-docs/products/gateway.md +150 -0
- crprotocol-4.1.1/site-docs/products/index.md +258 -0
- crprotocol-4.1.1/site-docs/products/scan.md +139 -0
- crprotocol-4.1.1/site-docs/products/scribe.md +232 -0
- crprotocol-4.1.1/site-docs/products/visualise.md +46 -0
- crprotocol-4.1.1/site-docs/protocol/.meta.yml +6 -0
- crprotocol-4.1.1/site-docs/protocol/ckf.md +153 -0
- crprotocol-4.1.1/site-docs/protocol/conformance.md +50 -0
- crprotocol-4.1.1/site-docs/protocol/context-sources.md +519 -0
- crprotocol-4.1.1/site-docs/protocol/continuation.md +192 -0
- crprotocol-4.1.1/site-docs/protocol/core.md +141 -0
- crprotocol-4.1.1/site-docs/protocol/dispatch-strategies.md +273 -0
- crprotocol-4.1.1/site-docs/protocol/envelope.md +147 -0
- crprotocol-4.1.1/site-docs/protocol/extraction.md +188 -0
- crprotocol-4.1.1/site-docs/protocol/headers.md +54 -0
- crprotocol-4.1.1/site-docs/protocol/index.md +101 -0
- crprotocol-4.1.1/site-docs/protocol/meta-learning.md +257 -0
- crprotocol-4.1.1/site-docs/protocol/multi-agent.md +75 -0
- crprotocol-4.1.1/site-docs/protocol/provenance.md +262 -0
- crprotocol-4.1.1/site-docs/protocol/quality-tiers.md +164 -0
- crprotocol-4.1.1/site-docs/protocol/research.md +295 -0
- crprotocol-4.1.1/site-docs/protocol/safety-policy.md +60 -0
- crprotocol-4.1.1/site-docs/protocol/session-token.md +55 -0
- crprotocol-4.1.1/site-docs/protocol/zero-ckf-mode.md +71 -0
- crprotocol-4.1.1/site-docs/robots.txt +10 -0
- crprotocol-4.1.1/site-docs/safety/.meta.yml +6 -0
- crprotocol-4.1.1/site-docs/safety/black-box.md +91 -0
- crprotocol-4.1.1/site-docs/safety/coverage.md +52 -0
- crprotocol-4.1.1/site-docs/safety/dpe.md +55 -0
- crprotocol-4.1.1/site-docs/safety/index.md +196 -0
- crprotocol-4.1.1/site-docs/safety/safety-policy.md +62 -0
- crprotocol-4.1.1/site-docs/sdk/.meta.yml +6 -0
- crprotocol-4.1.1/site-docs/sdk/ai-safety.md +390 -0
- crprotocol-4.1.1/site-docs/sdk/async.md +71 -0
- crprotocol-4.1.1/site-docs/sdk/configuration.md +158 -0
- crprotocol-4.1.1/site-docs/sdk/context-management.md +283 -0
- crprotocol-4.1.1/site-docs/sdk/errors.md +122 -0
- crprotocol-4.1.1/site-docs/sdk/index.md +384 -0
- crprotocol-4.1.1/site-docs/sdk/tools-and-agents.md +168 -0
- crprotocol-4.1.1/site-docs/spec/.meta.yml +6 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-001-core-protocol.md +293 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-002-headers.md +1775 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-003-envelope.md +678 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-004-continuation.md +796 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-005-dpe.md +1088 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-006-safety-policy.md +466 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-007-session-token.md +400 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-008-dispatch.md +463 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-009-ckf.md +332 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-010-regulatory-mapping.md +153 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-011-audit-trail.md +276 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-012-multi-agent-safety.md +396 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-013-github-action.md +374 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-014-conformance.md +600 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-015-security-privacy.md +396 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-016-gateway-service.md +735 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-017-zero-ckf-mode.md +545 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-018-air.md +423 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-019-cognitive-quality.md +225 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-020-cognitive-load-distribution.md +279 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-021-reasoning-orchestration.md +294 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-022-execution-fabric.md +296 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-023-amplification-boundary.md +276 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-024-coverage-differential-retrieval.md +533 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-025-graph-retrieval.md +266 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-026-semantic-quality-benchmark.md +239 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-027-retrieval-integrity.md +322 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-028-conversational-context.md +358 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-029-ephemeral-tool-context.md +329 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-030-cognitive-state-relay.md +361 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-031-semantic-task-layer.md +340 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-032-developer-experience.md +302 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-033-safety-control-plane.md +471 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-034-safety-coverage.md +277 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-035-context-lifecycle.md +235 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-036-scan-remediation.md +245 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-037-unified-config.md +240 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-038-storage-backends.md +275 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-039-semantic-code-ingestion.md +265 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-040-crp-comply.md +309 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-041-adoption-ecosystem.md +185 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-042-comply-upgrade-integration.md +276 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-043-gateway-runtime-product.md +200 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-044-authoritative-domain-agent.md +199 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-045-knowledge-learning.md +213 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-046-user-defined-cognition.md +197 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-047-monetisation-payments.md +20 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-048-comply-lowcode-github.md +262 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SPEC-HOSTING-CONTROL.md +17 -0
- crprotocol-4.1.1/site-docs/spec/CRP-SUBMISSION-GUIDE.md +17 -0
- crprotocol-4.1.1/site-docs/spec/index.md +121 -0
- crprotocol-4.1.1/site-docs/standards.md +61 -0
- crprotocol-4.1.1/site-docs/stylesheets/extra.css +1887 -0
- crprotocol-4.1.1/site-docs/tags.md +12 -0
- crprotocol-4.1.1/site-docs/terms-of-service.md +200 -0
- crprotocol-4.1.1/site-docs/testing/.meta.yml +6 -0
- crprotocol-4.1.1/site-docs/testing/benchmarks.md +212 -0
- crprotocol-4.1.1/site-docs/testing/index.md +56 -0
- crprotocol-4.1.1/site-docs/testing/reproduce.md +200 -0
- crprotocol-4.1.1/site-docs/testing/running-tests.md +292 -0
- crprotocol-4.1.1/site-docs/topics/.meta.yml +7 -0
- crprotocol-4.1.1/site-docs/topics/ai-compliance.md +185 -0
- crprotocol-4.1.1/site-docs/topics/ai-governance.md +182 -0
- crprotocol-4.1.1/site-docs/topics/ai-safety.md +205 -0
- crprotocol-4.1.1/site-docs/topics/context-management.md +163 -0
- crprotocol-4.1.1/site-docs/topics/crp-vs-rag-mcp.md +159 -0
- crprotocol-4.1.1/site-docs/topics/index.md +68 -0
- crprotocol-4.1.1/site-docs/who-is-it-for.md +207 -0
- crprotocol-4.1.1/site-docs/why-crp.md +319 -0
- crprotocol-4.1.1/skills/visual-expert/SKILL.md +165 -0
- crprotocol-4.1.1/specification/02_CORE_PROTOCOL.md +6960 -0
- crprotocol-4.1.1/tests/__init__.py +3 -0
- crprotocol-4.1.1/tests/conformance/__init__.py +35 -0
- crprotocol-4.1.1/tests/conformance/levels.py +74 -0
- crprotocol-4.1.1/tests/conformance/runner.py +376 -0
- crprotocol-4.1.1/tests/conformance/test_conformance.py +33 -0
- crprotocol-4.1.1/tests/conformance/vectors/agent.json +31 -0
- crprotocol-4.1.1/tests/conformance/vectors/dpe.json +61 -0
- crprotocol-4.1.1/tests/conformance/vectors/headers.json +64 -0
- crprotocol-4.1.1/tests/conformance/vectors/hmac.json +58 -0
- crprotocol-4.1.1/tests/conformance/vectors/safety_policy.json +58 -0
- crprotocol-4.1.1/tests/conformance/vectors/session.json +51 -0
- crprotocol-4.1.1/tests/test_audit.py +117 -0
- crprotocol-4.1.1/tests/test_audit_integration.py +83 -0
- crprotocol-4.1.1/tests/test_checkpoint_inbox.py +56 -0
- crprotocol-4.1.1/tests/test_comply_billing.py +326 -0
- crprotocol-4.1.1/tests/test_comply_gateway_proxy.py +157 -0
- crprotocol-4.1.1/tests/test_comply_quota_gate.py +57 -0
- crprotocol-4.1.1/tests/test_crp_headers.py +76 -0
- crprotocol-4.1.1/tests/test_crp_mcp.py +444 -0
- crprotocol-4.1.1/tests/test_crp_mcp_auth.py +187 -0
- crprotocol-4.1.1/tests/test_crp_mcp_backends.py +132 -0
- crprotocol-4.1.1/tests/test_crp_mcp_billing.py +52 -0
- crprotocol-4.1.1/tests/test_crp_mcp_checkpoint.py +152 -0
- crprotocol-4.1.1/tests/test_crp_mcp_checkpoint_policy.py +80 -0
- crprotocol-4.1.1/tests/test_crp_mcp_connectors.py +168 -0
- crprotocol-4.1.1/tests/test_crp_mcp_coverage.py +226 -0
- crprotocol-4.1.1/tests/test_crp_mcp_permissions.py +283 -0
- crprotocol-4.1.1/tests/test_cso.py +349 -0
- crprotocol-4.1.1/tests/test_decision_provenance_engine.py +891 -0
- crprotocol-4.1.1/tests/test_entailment_risk.py +1048 -0
- crprotocol-4.1.1/tests/test_fidelity_verification.py +986 -0
- crprotocol-4.1.1/tests/test_gateway.py +355 -0
- crprotocol-4.1.1/tests/test_gateway_client.py +66 -0
- crprotocol-4.1.1/tests/test_github_app.py +116 -0
- crprotocol-4.1.1/tests/test_github_routes.py +113 -0
- crprotocol-4.1.1/tests/test_horizons.py +72 -0
- crprotocol-4.1.1/tests/test_no_code.py +82 -0
- crprotocol-4.1.1/tests/test_orchestrator_perf.py +76 -0
- crprotocol-4.1.1/tests/test_phase1.py +967 -0
- crprotocol-4.1.1/tests/test_retrieval_integrity.py +85 -0
- crprotocol-4.1.1/tests/test_safety_control_plane.py +138 -0
- crprotocol-4.1.1/tests/test_scan_r3.py +298 -0
- crprotocol-4.1.1/tests/test_scoring_robustness.py +567 -0
- crprotocol-4.1.1/tests/test_scratch_buffer.py +71 -0
- crprotocol-4.1.1/tests/test_sdk_dynamic.py +80 -0
- crprotocol-4.1.1/tests/test_sdk_extra_namespaces.py +96 -0
- crprotocol-4.1.1/tests/test_sdk_generated_reference.py +65 -0
- crprotocol-4.1.1/tests/test_sdk_level0.py +79 -0
- crprotocol-4.1.1/tests/test_sdk_level2.py +61 -0
- crprotocol-4.1.1/tests/test_sdk_more_namespaces.py +158 -0
- crprotocol-4.1.1/tests/test_sdk_namespaces.py +209 -0
- crprotocol-4.1.1/tests/test_security_modules.py +396 -0
- crprotocol-4.1.1/tests/test_session_token.py +82 -0
- crprotocol-4.1.1/tests/test_signup.py +81 -0
- crprotocol-4.1.1/tests/test_smoke.py +62 -0
- crprotocol-4.1.1/tests/test_stl.py +135 -0
- crprotocol-4.1.1/tests/test_unified_config.py +109 -0
- crprotocol-2.3.1/.github/PULL_REQUEST_TEMPLATE.md +0 -34
- crprotocol-2.3.1/.github/workflows/docs.yml +0 -32
- crprotocol-2.3.1/.gitignore +0 -61
- crprotocol-2.3.1/CHANGELOG.md +0 -519
- crprotocol-2.3.1/PKG-INFO +0 -1296
- crprotocol-2.3.1/README.md +0 -1239
- crprotocol-2.3.1/crp/__init__.py +0 -208
- crprotocol-2.3.1/crp/_version.py +0 -5
- crprotocol-2.3.1/crp/advanced/cqs.py +0 -235
- crprotocol-2.3.1/crp/advanced/cross_window.py +0 -477
- crprotocol-2.3.1/crp/advanced/curator.py +0 -265
- crprotocol-2.3.1/crp/advanced/feedback.py +0 -146
- crprotocol-2.3.1/crp/advanced/meta_learning.py +0 -401
- crprotocol-2.3.1/crp/advanced/source_grounding.py +0 -207
- crprotocol-2.3.1/crp/ckf/__init__.py +0 -35
- crprotocol-2.3.1/crp/ckf/community.py +0 -377
- crprotocol-2.3.1/crp/ckf/fabric.py +0 -468
- crprotocol-2.3.1/crp/ckf/gc.py +0 -175
- crprotocol-2.3.1/crp/ckf/semantic.py +0 -207
- crprotocol-2.3.1/crp/cli/main.py +0 -329
- crprotocol-2.3.1/crp/cli/sidecar.py +0 -929
- crprotocol-2.3.1/crp/cli/startup.py +0 -272
- crprotocol-2.3.1/crp/continuation/__init__.py +0 -103
- crprotocol-2.3.1/crp/continuation/degradation.py +0 -157
- crprotocol-2.3.1/crp/continuation/document_map.py +0 -160
- crprotocol-2.3.1/crp/continuation/flow.py +0 -109
- crprotocol-2.3.1/crp/continuation/gap.py +0 -419
- crprotocol-2.3.1/crp/continuation/manager.py +0 -484
- crprotocol-2.3.1/crp/continuation/quality_monitor.py +0 -179
- crprotocol-2.3.1/crp/continuation/voice.py +0 -157
- crprotocol-2.3.1/crp/core/__init__.py +0 -69
- crprotocol-2.3.1/crp/core/config.py +0 -384
- crprotocol-2.3.1/crp/core/context_enforcer.py +0 -769
- crprotocol-2.3.1/crp/core/context_source.py +0 -725
- crprotocol-2.3.1/crp/core/context_tools.py +0 -540
- crprotocol-2.3.1/crp/core/dispatch_router.py +0 -4014
- crprotocol-2.3.1/crp/core/errors.py +0 -132
- crprotocol-2.3.1/crp/core/facilitator.py +0 -713
- crprotocol-2.3.1/crp/core/idempotency.py +0 -215
- crprotocol-2.3.1/crp/core/ledger_backends.py +0 -186
- crprotocol-2.3.1/crp/core/manifest_ledger.py +0 -602
- crprotocol-2.3.1/crp/core/orchestrator.py +0 -1435
- crprotocol-2.3.1/crp/core/session.py +0 -134
- crprotocol-2.3.1/crp/core/task_intent.py +0 -36
- crprotocol-2.3.1/crp/core/window.py +0 -363
- crprotocol-2.3.1/crp/envelope/__init__.py +0 -30
- crprotocol-2.3.1/crp/envelope/builder.py +0 -288
- crprotocol-2.3.1/crp/envelope/formatter.py +0 -208
- crprotocol-2.3.1/crp/envelope/reranker.py +0 -209
- crprotocol-2.3.1/crp/envelope/scoring.py +0 -310
- crprotocol-2.3.1/crp/extraction/pipeline.py +0 -360
- crprotocol-2.3.1/crp/extraction/stage1_regex.py +0 -173
- crprotocol-2.3.1/crp/extraction/stage3_gliner.py +0 -210
- crprotocol-2.3.1/crp/extraction/stage4_uie.py +0 -183
- crprotocol-2.3.1/crp/extraction/stage6_llm.py +0 -178
- crprotocol-2.3.1/crp/extraction/structured_output.py +0 -219
- crprotocol-2.3.1/crp/extraction/types.py +0 -310
- crprotocol-2.3.1/crp/integrations/anthropic_hook.py +0 -92
- crprotocol-2.3.1/crp/integrations/langchain_hook.py +0 -118
- crprotocol-2.3.1/crp/integrations/openai_hook.py +0 -171
- crprotocol-2.3.1/crp/observability/events.py +0 -233
- crprotocol-2.3.1/crp/observability/metrics.py +0 -264
- crprotocol-2.3.1/crp/observability/quality.py +0 -135
- crprotocol-2.3.1/crp/observability/structured_logging.py +0 -81
- crprotocol-2.3.1/crp/observability/telemetry.py +0 -117
- crprotocol-2.3.1/crp/provenance/__init__.py +0 -314
- crprotocol-2.3.1/crp/provenance/_types.py +0 -378
- crprotocol-2.3.1/crp/provenance/attribution_scorer.py +0 -252
- crprotocol-2.3.1/crp/provenance/distortion_detector.py +0 -397
- crprotocol-2.3.1/crp/provenance/fabrication_detector.py +0 -203
- crprotocol-2.3.1/crp/provenance/hallucination_scorer.py +0 -320
- crprotocol-2.3.1/crp/provenance/provenance_chain.py +0 -205
- crprotocol-2.3.1/crp/providers/__init__.py +0 -43
- crprotocol-2.3.1/crp/providers/anthropic.py +0 -270
- crprotocol-2.3.1/crp/providers/base.py +0 -135
- crprotocol-2.3.1/crp/providers/custom.py +0 -63
- crprotocol-2.3.1/crp/providers/diagnostic.py +0 -251
- crprotocol-2.3.1/crp/providers/llamacpp.py +0 -224
- crprotocol-2.3.1/crp/providers/manager.py +0 -139
- crprotocol-2.3.1/crp/providers/ollama.py +0 -243
- crprotocol-2.3.1/crp/providers/openai.py +0 -634
- crprotocol-2.3.1/crp/resources/adaptive_allocator.py +0 -525
- crprotocol-2.3.1/crp/resources/cost_model.py +0 -388
- crprotocol-2.3.1/crp/resources/overhead_manager.py +0 -217
- crprotocol-2.3.1/crp/resources/resource_manager.py +0 -262
- crprotocol-2.3.1/crp/security/__init__.py +0 -93
- crprotocol-2.3.1/crp/security/audit_trail.py +0 -392
- crprotocol-2.3.1/crp/security/binding.py +0 -192
- crprotocol-2.3.1/crp/security/compliance.py +0 -813
- crprotocol-2.3.1/crp/security/consent.py +0 -593
- crprotocol-2.3.1/crp/security/embedding_defense.py +0 -161
- crprotocol-2.3.1/crp/security/encryption.py +0 -202
- crprotocol-2.3.1/crp/security/injection.py +0 -335
- crprotocol-2.3.1/crp/security/integrity.py +0 -267
- crprotocol-2.3.1/crp/security/privacy.py +0 -662
- crprotocol-2.3.1/crp/security/quarantine.py +0 -249
- crprotocol-2.3.1/crp/security/rbac.py +0 -221
- crprotocol-2.3.1/crp/state/__init__.py +0 -31
- crprotocol-2.3.1/crp/state/cold_storage.py +0 -258
- crprotocol-2.3.1/crp/state/critical_state.py +0 -104
- crprotocol-2.3.1/crp/state/event_log.py +0 -313
- crprotocol-2.3.1/crp/state/fact.py +0 -189
- crprotocol-2.3.1/crp/state/snapshot.py +0 -290
- crprotocol-2.3.1/crp/state/warm_store.py +0 -378
- crprotocol-2.3.1/docs/OPERATIONS_RUNBOOK.md +0 -265
- crprotocol-2.3.1/media/logo.svg +0 -41
- crprotocol-2.3.1/mkdocs.yml +0 -151
- crprotocol-2.3.1/pyproject.toml +0 -122
- crprotocol-2.3.1/scripts/gen_changelog.py +0 -86
- crprotocol-2.3.1/site-docs/api/client.md +0 -159
- crprotocol-2.3.1/site-docs/api/compliance.md +0 -224
- crprotocol-2.3.1/site-docs/api/dispatch.md +0 -242
- crprotocol-2.3.1/site-docs/api/index.md +0 -50
- crprotocol-2.3.1/site-docs/api/schemas.md +0 -249
- crprotocol-2.3.1/site-docs/benchmarks.md +0 -122
- crprotocol-2.3.1/site-docs/compliance/eu-ai-act.md +0 -158
- crprotocol-2.3.1/site-docs/compliance/gdpr.md +0 -141
- crprotocol-2.3.1/site-docs/compliance/index.md +0 -98
- crprotocol-2.3.1/site-docs/compliance/iso-42001.md +0 -117
- crprotocol-2.3.1/site-docs/compliance/nist-ai-rmf.md +0 -101
- crprotocol-2.3.1/site-docs/compliance/security.md +0 -182
- crprotocol-2.3.1/site-docs/contributing.md +0 -88
- crprotocol-2.3.1/site-docs/getting-started/cli.md +0 -89
- crprotocol-2.3.1/site-docs/getting-started/index.md +0 -20
- crprotocol-2.3.1/site-docs/getting-started/installation.md +0 -58
- crprotocol-2.3.1/site-docs/getting-started/licensing.md +0 -206
- crprotocol-2.3.1/site-docs/getting-started/local-models.md +0 -231
- crprotocol-2.3.1/site-docs/getting-started/providers.md +0 -103
- crprotocol-2.3.1/site-docs/getting-started/quickstart.md +0 -75
- crprotocol-2.3.1/site-docs/guides/demo-app.md +0 -126
- crprotocol-2.3.1/site-docs/guides/index.md +0 -35
- crprotocol-2.3.1/site-docs/guides/ingestion.md +0 -106
- crprotocol-2.3.1/site-docs/guides/multi-turn.md +0 -132
- crprotocol-2.3.1/site-docs/guides/session-persistence.md +0 -143
- crprotocol-2.3.1/site-docs/guides/sidecar.md +0 -171
- crprotocol-2.3.1/site-docs/guides/streaming.md +0 -92
- crprotocol-2.3.1/site-docs/index.md +0 -290
- crprotocol-2.3.1/site-docs/products/comply-autocyber.md +0 -263
- crprotocol-2.3.1/site-docs/products/comply.md +0 -457
- crprotocol-2.3.1/site-docs/products/index.md +0 -179
- crprotocol-2.3.1/site-docs/products/scribe.md +0 -223
- crprotocol-2.3.1/site-docs/protocol/ckf.md +0 -131
- crprotocol-2.3.1/site-docs/protocol/context-sources.md +0 -499
- crprotocol-2.3.1/site-docs/protocol/continuation.md +0 -175
- crprotocol-2.3.1/site-docs/protocol/core.md +0 -133
- crprotocol-2.3.1/site-docs/protocol/dispatch-strategies.md +0 -207
- crprotocol-2.3.1/site-docs/protocol/envelope.md +0 -121
- crprotocol-2.3.1/site-docs/protocol/extraction.md +0 -161
- crprotocol-2.3.1/site-docs/protocol/index.md +0 -88
- crprotocol-2.3.1/site-docs/protocol/meta-learning.md +0 -218
- crprotocol-2.3.1/site-docs/protocol/provenance.md +0 -233
- crprotocol-2.3.1/site-docs/protocol/quality-tiers.md +0 -154
- crprotocol-2.3.1/site-docs/protocol/research.md +0 -270
- crprotocol-2.3.1/site-docs/terms-of-service.md +0 -178
- crprotocol-2.3.1/site-docs/testing/benchmarks.md +0 -141
- crprotocol-2.3.1/site-docs/testing/index.md +0 -46
- crprotocol-2.3.1/site-docs/testing/reproduce.md +0 -165
- crprotocol-2.3.1/site-docs/testing/running-tests.md +0 -230
- crprotocol-2.3.1/site-docs/why-crp.md +0 -198
- crprotocol-2.3.1/specification/02_CORE_PROTOCOL.md +0 -6960
- crprotocol-2.3.1/tests/test_decision_provenance_engine.py +0 -889
- crprotocol-2.3.1/tests/test_entailment_risk.py +0 -1045
- crprotocol-2.3.1/tests/test_fidelity_verification.py +0 -984
- crprotocol-2.3.1/tests/test_phase1.py +0 -964
- crprotocol-2.3.1/tests/test_security_modules.py +0 -396
- crprotocol-2.3.1/tests/test_smoke.py +0 -62
- {crprotocol-2.3.1 → crprotocol-4.1.1}/.dockerignore +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/.github/CODEOWNERS +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/.github/FUNDING.yml +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/.github/ISSUE_TEMPLATE/feature-request.yml +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/.github/ISSUE_TEMPLATE/spec-clarification.yml +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/.github/workflows/ci.yml +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/.github/workflows/link-check-config.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/.github/workflows/link-check.yml +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/.github/workflows/validate-schemas.yml +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/.pre-commit-config.yaml +0 -0
- /crprotocol-2.3.1/crp/py.typed → /crprotocol-4.1.1/3.1.0 +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/BENCHMARKS.md +0 -0
- {crprotocol-2.3.1/site-docs → crprotocol-4.1.1}/CNAME +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/CODE_OF_CONDUCT.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/CONTRIBUTING.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/CRP_CAPABILITIES.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/Dockerfile +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/GOVERNANCE.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/HOSTING_POSITIONING.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/INTERNAL_DOCS.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/LICENSE.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/NOTICE +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/RAILWAY_DEPLOYMENT_GUIDE.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/RAILWAY_VARIABLES.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/SECURITY.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/SITE_NAVIGATION_AND_PUBLISHING.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/STRIPE_MONETISATION.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/TRADEMARK.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/__main__.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/_typing.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/adapters.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/advanced/__init__.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/advanced/auto_ingest.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/advanced/hierarchical.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/advanced/parallel.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/advanced/review_cycle.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/advanced/scale_mode.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/ckf/graph_walk.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/ckf/merge.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/ckf/pattern_query.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/ckf/pubsub.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/cli/__init__.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/continuation/completion.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/continuation/stitch.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/continuation/trigger.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/core/batch.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/core/circuit_breaker.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/core/extraction_facade.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/core/manifest_derive.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/core/relay_strategies.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/core/security_manager.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/envelope/decomposer.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/envelope/packer.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/extraction/__init__.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/extraction/complexity.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/extraction/contradiction.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/extraction/quality_gate.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/extraction/stage2_statistical.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/extraction/stage5_discourse.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/integrations/__init__.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/integrations/_common.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/license_guard.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/observability/__init__.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/observability/audit.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/provenance/_embeddings.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/provenance/claim_detector.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/provenance/contradiction_detector.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/provenance/entailment_verifier.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/provenance/omission_analyzer.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/provenance/report_generator.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/providers/tokenizers.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/resources/__init__.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/schemas/__init__.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/schemas/cost-estimate.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/schemas/crp-error.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/schemas/envelope-preview.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/schemas/persisted-state-header.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/schemas/quality-report.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/schemas/session-handle.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/schemas/session-status.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/schemas/stream-event.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/schemas/task-intent.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/security/validation.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/state/compaction.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/state/serialization.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/crp/state/session_cleanup.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/docs/WASA_INTEGRATION_TUTORIAL.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/async_usage.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/benchmark_continuation.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/choose_provider.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/comply_demo.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/demo_app/README.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/demo_app/demo.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/demo_app/demo_v1.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/extraction-pipeline.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/ingestion.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/local-model.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/multi-provider.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/multi_turn.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/quickstart.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/quickstart.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/scribe_demo.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/session-resumption.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/examples/streaming.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/rfcs/0000-template.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/rfcs/0001-initial-release.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/schemas/cost-estimate.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/schemas/crp-error.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/schemas/envelope-preview.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/schemas/openapi.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/schemas/persisted-state-header.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/schemas/quality-report.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/schemas/session-handle.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/schemas/session-status.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/schemas/stream-event.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/schemas/task-intent.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/specification/01_RESEARCH_FOUNDATIONS.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/specification/03_CONTEXT_ENVELOPE.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/specification/04_TOKEN_GENERATION_PROTOCOL.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/specification/05_SYSTEM_WIDE_INTEGRATION.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/specification/06_IMPLEMENTATION_PLAN.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/specification/07_SECURITY.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/specification/08_MONETIZATION.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/specification/09_DEPLOYMENT.md +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/conftest.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/killer_test/crp_killer_report.json +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/killer_test/crp_killer_report.txt +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/killer_test/crp_killer_test.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/killer_test/debug_gap.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/killer_test/debug_gap2.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_adaptive_allocator.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_adversarial_provenance.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_agentic.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_benchmarks.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_ckf_gate.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_compliance_security.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_compliance_wiring.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_context_enforcer.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_context_source.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_decision_provenance.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_gap_fixes_live.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_gaps_2_3.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_integration.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_ip_protection.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_live_comprehensive.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_live_full_capture.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_live_long_generation.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_live_verification.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_manifest_ledger.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_phase2.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_phase3.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_phase4.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_phase5.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_phase6.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_phase7.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_phase8.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_phase9.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_production_hardening.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_relay_strategies.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_resource_manager.py +0 -0
- {crprotocol-2.3.1 → crprotocol-4.1.1}/tests/test_tool_relay.py +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
<!-- Briefly describe what this PR changes and why -->
|
|
4
|
+
|
|
5
|
+
## Type of Change
|
|
6
|
+
|
|
7
|
+
- [ ] Typo / wording fix
|
|
8
|
+
- [ ] Specification clarification (no semantic change)
|
|
9
|
+
- [ ] Non-breaking addition (new optional field, new example)
|
|
10
|
+
- [ ] Breaking change (requires RFC)
|
|
11
|
+
- [ ] Schema change
|
|
12
|
+
- [ ] Example addition/update
|
|
13
|
+
- [ ] Documentation (README, CONTRIBUTING, etc.)
|
|
14
|
+
|
|
15
|
+
## Specification Sections Affected
|
|
16
|
+
|
|
17
|
+
<!-- List affected sections, e.g., §3.8, §6.10.2, §22 -->
|
|
18
|
+
|
|
19
|
+
## RFC 2119 Impact
|
|
20
|
+
|
|
21
|
+
<!-- If this changes any MUST/SHOULD/MAY requirements, list them here -->
|
|
22
|
+
|
|
23
|
+
- [ ] No RFC 2119 changes
|
|
24
|
+
- [ ] Changes MUST/MUST NOT requirements
|
|
25
|
+
- [ ] Changes SHOULD/SHOULD NOT requirements
|
|
26
|
+
- [ ] Changes MAY requirements
|
|
27
|
+
|
|
28
|
+
## Checklist
|
|
29
|
+
|
|
30
|
+
- [ ] I have read the [Contributing Guide](../CONTRIBUTING.md)
|
|
31
|
+
- [ ] JSON Schemas validate correctly (if modified)
|
|
32
|
+
- [ ] Cross-references are correct (§ references point to valid sections)
|
|
33
|
+
- [ ] CHANGELOG.md is updated (for user-facing changes)
|
|
34
|
+
- [ ] No broken links in modified documents
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Copyright © 2025 Constantinos Vidiniotis. All rights reserved.
|
|
2
|
+
# Licensed under Elastic License 2.0 - see LICENSE.md for details.
|
|
3
|
+
|
|
4
|
+
name: Deploy Docs
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [main]
|
|
9
|
+
paths:
|
|
10
|
+
- 'site-docs/**'
|
|
11
|
+
- 'mkdocs.yml'
|
|
12
|
+
- '.github/workflows/docs.yml'
|
|
13
|
+
- 'pyproject.toml'
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: write
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
deploy:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
env:
|
|
23
|
+
DISABLE_MKDOCS_2_WARNING: true
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
with:
|
|
27
|
+
fetch-depth: 0
|
|
28
|
+
|
|
29
|
+
- name: Set up Python
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: '3.13'
|
|
33
|
+
|
|
34
|
+
- name: Install docs dependencies
|
|
35
|
+
run: pip install -e ".[docs]"
|
|
36
|
+
|
|
37
|
+
- name: Regenerate API reference
|
|
38
|
+
run: python scripts/generate_api_reference.py
|
|
39
|
+
|
|
40
|
+
- name: Build and deploy
|
|
41
|
+
run: mkdocs gh-deploy --force --strict
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# OS files
|
|
2
|
+
.DS_Store
|
|
3
|
+
Thumbs.db
|
|
4
|
+
desktop.ini
|
|
5
|
+
|
|
6
|
+
# Editor files
|
|
7
|
+
*.swp
|
|
8
|
+
*.swo
|
|
9
|
+
*~
|
|
10
|
+
.vscode/
|
|
11
|
+
.idea/
|
|
12
|
+
*.sublime-*
|
|
13
|
+
|
|
14
|
+
# Node modules (for schema validation)
|
|
15
|
+
node_modules/
|
|
16
|
+
|
|
17
|
+
# Build outputs
|
|
18
|
+
dist/
|
|
19
|
+
build/
|
|
20
|
+
*.egg-info/
|
|
21
|
+
site/
|
|
22
|
+
.cache/
|
|
23
|
+
|
|
24
|
+
# Python
|
|
25
|
+
__pycache__/
|
|
26
|
+
*.py[cod]
|
|
27
|
+
*.so
|
|
28
|
+
.mypy_cache/
|
|
29
|
+
.pytest_cache/
|
|
30
|
+
.ruff_cache/
|
|
31
|
+
*.egg
|
|
32
|
+
pip-wheel-metadata/
|
|
33
|
+
|
|
34
|
+
# Temporary files
|
|
35
|
+
*.tmp
|
|
36
|
+
*.bak
|
|
37
|
+
|
|
38
|
+
# Runtime session data
|
|
39
|
+
crp_sessions/
|
|
40
|
+
.hypothesis/
|
|
41
|
+
|
|
42
|
+
# Private keys / secrets — NEVER commit
|
|
43
|
+
*.pem
|
|
44
|
+
*.key
|
|
45
|
+
*.p8
|
|
46
|
+
encrypted-*.pem
|
|
47
|
+
*.env
|
|
48
|
+
*_railway.env
|
|
49
|
+
.env.local
|
|
50
|
+
.env.production
|
|
51
|
+
.env.staging
|
|
52
|
+
.env.development
|
|
53
|
+
secrets/
|
|
54
|
+
|
|
55
|
+
# Dev scratch files (root-level only)
|
|
56
|
+
/_*.py
|
|
57
|
+
/_*.txt
|
|
58
|
+
/_*.json
|
|
59
|
+
/_*.jsonl
|
|
60
|
+
/_full_*
|
|
61
|
+
/_long_gen*
|
|
62
|
+
/_live_*
|
|
63
|
+
/_check_*
|
|
64
|
+
/_dep_*
|
|
65
|
+
/_pytest_count*
|
|
66
|
+
/_test_*
|
|
67
|
+
/_tr.*
|
|
68
|
+
/_batch*
|
|
69
|
+
/0.80)
|
|
70
|
+
/_long_gen_results/
|
|
71
|
+
/type_confidence
|
|
72
|
+
/[0-9][0-9][0-9]*
|
|
73
|
+
|
|
74
|
+
# Numeric test output directories
|
|
75
|
+
/[0-9]*/
|
|
76
|
+
|
|
77
|
+
# Logs
|
|
78
|
+
*.log
|
|
79
|
+
|
|
80
|
+
.coverage
|
|
81
|
+
.env.hosted
|
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
# CRP Auth & User Management Expert
|
|
2
|
+
|
|
3
|
+
**Scope:** Project
|
|
4
|
+
**Purpose:** Deep expertise on CRP's unified authentication, identity, entitlement, and PostgreSQL persistence layer. Use this whenever working on auth, billing, user state, Clerk integration, GitHub connectivity, or database schema across CRP Gateway and CRP Comply.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Canonical Documents
|
|
9
|
+
|
|
10
|
+
Always read these first before modifying auth-related code:
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
SPECS_5_06_2026_CRP_v4/CRP-AUTH-POSTGRESQL-MIGRATION-PLAN.md # This plan
|
|
14
|
+
SPECS_5_06_2026_CRP_v4/CRP-AUTH-USER-MANAGEMENT-SOLUTION.md # Auth spec
|
|
15
|
+
SPECS_5_06_2026_CRP_v4/CRP-GITHUB-CONNECTIVITY-SOLUTION.md # GitHub spec
|
|
16
|
+
SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-047-monetisation-payments.md # Billing spec
|
|
17
|
+
SPECS_5_06_2026_CRP_v4/specs/CRP-SPEC-048-comply-lowcode-github.md # GitHub App spec
|
|
18
|
+
AGENTS.md # Project conventions
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Architecture Overview
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
27
|
+
│ CLERK (clerk.crprotocol.io) — Identity + Entitlement │
|
|
28
|
+
│ - Users, orgs, memberships │
|
|
29
|
+
│ - public_metadata: {comply_plan, gateway_plan, scan_plan, │
|
|
30
|
+
│ stripeCustomerId, creditBalanceCents} │
|
|
31
|
+
│ - Stripe webhooks write here ONLY │
|
|
32
|
+
└────────────────────────┬────────────────────────────────────┘
|
|
33
|
+
│ verify JWT (JWKS)
|
|
34
|
+
┌─────────────┼───────────────┐
|
|
35
|
+
▼ ▼ ▼
|
|
36
|
+
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
|
37
|
+
│ Gateway │ │ Comply │ │ Scan │
|
|
38
|
+
│ FastAPI │ │ FastAPI │ │ (in Comply) │
|
|
39
|
+
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
|
|
40
|
+
│ read entitlement│ read entitlement│ read entitlement
|
|
41
|
+
│ (Clerk metadata)│ (Clerk metadata)│ (Clerk metadata)
|
|
42
|
+
▼ ▼ ▼
|
|
43
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
44
|
+
│ POSTGRESQL (Railway managed) — Application State │
|
|
45
|
+
│ - tenants, api_keys, github_installations, github_repos, │
|
|
46
|
+
│ gateway_systems, gateway_usage, scan_results, etc. │
|
|
47
|
+
└─────────────────────────────────────────────────────────────┘
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Golden rule:** Clerk stores WHO you are and WHAT you can do. PostgreSQL stores WHAT you have done.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## The Identity Model
|
|
55
|
+
|
|
56
|
+
### Identity Dataclass
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
from dataclasses import dataclass
|
|
60
|
+
|
|
61
|
+
@dataclass(frozen=True)
|
|
62
|
+
class Identity:
|
|
63
|
+
user_id: str # Clerk "sub" claim
|
|
64
|
+
org_id: str | None # Clerk "org_id" claim (null = personal account)
|
|
65
|
+
org_role: str | None # Clerk "org_role" claim
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### resolve_account()
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
def resolve_account(identity: Identity) -> tuple[str, str]:
|
|
72
|
+
"""Return (account_type, account_id)."""
|
|
73
|
+
if identity.org_id:
|
|
74
|
+
return ("org", identity.org_id)
|
|
75
|
+
return ("user", identity.user_id)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Usage pattern:**
|
|
79
|
+
```python
|
|
80
|
+
identity = await current_clerk_identity(request)
|
|
81
|
+
account_type, account_id = resolve_account(identity)
|
|
82
|
+
tenant_id = account_id # tenant_id = org_id for teams, user_id for personal
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Personal vs Organization Accounts
|
|
86
|
+
|
|
87
|
+
| Context | `org_id` | `resolve_account()` returns | `tenant_id` |
|
|
88
|
+
|---------|----------|----------------------------|-------------|
|
|
89
|
+
| Personal (solo developer) | `None` | `("user", "user_abc")` | `"user_abc"` |
|
|
90
|
+
| Organization (team/company) | `"org_xyz"` | `("org", "org_xyz")` | `"org_xyz"` |
|
|
91
|
+
|
|
92
|
+
**Critical:** Always use `resolve_account()` — never branch on `org_id` directly in route handlers.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Entitlement: Clerk Metadata
|
|
97
|
+
|
|
98
|
+
### The Five Rules
|
|
99
|
+
|
|
100
|
+
1. **Stripe webhook is the ONLY writer.** Never write entitlement from app code.
|
|
101
|
+
2. **Per-product keys.** `comply_plan`, `gateway_plan`, `scan_plan` — never `"plan"`.
|
|
102
|
+
3. **Apps read via `get_entitlement()`.** Caches for 60s, reads from Clerk Backend API.
|
|
103
|
+
4. **PostgreSQL never stores entitlement.** No `plan` column on any table.
|
|
104
|
+
5. **Customer ID lives in Clerk metadata.** `stripeCustomerId` is the linkage.
|
|
105
|
+
|
|
106
|
+
### Clerk Metadata Schema
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"comply_plan": "free | starter | scale",
|
|
111
|
+
"gateway_plan": "free | developer | team",
|
|
112
|
+
"scan_plan": "free | pro | business",
|
|
113
|
+
"comply_quota": 100,
|
|
114
|
+
"gateway_quota": 1000,
|
|
115
|
+
"scan_quota": 50,
|
|
116
|
+
"stripeCustomerId": "cus_...",
|
|
117
|
+
"stripeSubscriptionId": "sub_...",
|
|
118
|
+
"creditBalanceCents": 0,
|
|
119
|
+
"features": ["advanced_analytics", "multi_org"]
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Reading Entitlement
|
|
124
|
+
|
|
125
|
+
```python
|
|
126
|
+
from crp_shared.auth import get_entitlement, Identity
|
|
127
|
+
|
|
128
|
+
async def some_endpoint(identity: Identity = Depends(current_clerk_identity)):
|
|
129
|
+
entitlement = await get_entitlement(identity, product="comply")
|
|
130
|
+
# Returns: {"plan": "scale", "quota": 50000, "credits": 2000, "stripe_customer_id": "cus_..."}
|
|
131
|
+
if entitlement["plan"] == "free":
|
|
132
|
+
raise HTTPException(403, "This feature requires a paid plan")
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Writing Entitlement (Stripe Webhook Only)
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
# In Stripe webhook handler — NEVER in app code
|
|
139
|
+
async def handle_checkout_completed(event):
|
|
140
|
+
price_id = event["data"]["object"]["items"][0]["price"]["id"]
|
|
141
|
+
product = price_id_to_product(price_id) # "comply" | "gateway" | "scan"
|
|
142
|
+
plan = price_id_to_plan(price_id) # "starter" | "developer" | "pro"
|
|
143
|
+
|
|
144
|
+
meta_update = {
|
|
145
|
+
f"{product}_plan": plan,
|
|
146
|
+
f"{product}_quota": PLAN_QUOTAS[plan],
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
await clerk_backend_api.update_org_metadata(
|
|
150
|
+
org_id=org_id,
|
|
151
|
+
public_metadata=meta_update
|
|
152
|
+
)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## PostgreSQL Schema
|
|
158
|
+
|
|
159
|
+
### Shared Tables (both databases)
|
|
160
|
+
|
|
161
|
+
```sql
|
|
162
|
+
-- tenants: links Clerk identity to app state
|
|
163
|
+
CREATE TABLE tenants (
|
|
164
|
+
tenant_id TEXT PRIMARY KEY, -- user_id (personal) or tnt_xxx (org)
|
|
165
|
+
clerk_org_id TEXT UNIQUE, -- NULL for personal
|
|
166
|
+
clerk_user_id TEXT NOT NULL,
|
|
167
|
+
account_type TEXT NOT NULL
|
|
168
|
+
CHECK (account_type IN ('org', 'personal'))
|
|
169
|
+
DEFAULT 'org',
|
|
170
|
+
name TEXT,
|
|
171
|
+
created_at TIMESTAMPTZ DEFAULT NOW(),
|
|
172
|
+
updated_at TIMESTAMPTZ DEFAULT NOW()
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
-- api_keys: hashed, per-tenant
|
|
176
|
+
CREATE TABLE api_keys (
|
|
177
|
+
key_id TEXT PRIMARY KEY,
|
|
178
|
+
tenant_id TEXT NOT NULL REFERENCES tenants(tenant_id) ON DELETE CASCADE,
|
|
179
|
+
key_hash TEXT NOT NULL, -- SHA-256
|
|
180
|
+
key_preview TEXT, -- last 8 chars
|
|
181
|
+
name TEXT DEFAULT 'default',
|
|
182
|
+
scopes TEXT[] DEFAULT '{}',
|
|
183
|
+
revoked BOOLEAN DEFAULT FALSE,
|
|
184
|
+
created_at TIMESTAMPTZ DEFAULT NOW(),
|
|
185
|
+
last_used_at TIMESTAMPTZ
|
|
186
|
+
);
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Gateway-Specific Tables
|
|
190
|
+
|
|
191
|
+
```sql
|
|
192
|
+
CREATE TABLE gateway_systems (
|
|
193
|
+
system_id TEXT PRIMARY KEY,
|
|
194
|
+
tenant_id TEXT NOT NULL REFERENCES tenants(tenant_id) ON DELETE CASCADE,
|
|
195
|
+
name TEXT NOT NULL,
|
|
196
|
+
domain TEXT,
|
|
197
|
+
intended_purpose TEXT,
|
|
198
|
+
eu_ai_act_class TEXT CHECK (eu_ai_act_class IN ('MINIMAL','LIMITED','HIGH','UNACCEPTABLE')),
|
|
199
|
+
created_at TIMESTAMPTZ DEFAULT NOW()
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
CREATE TABLE gateway_providers (
|
|
203
|
+
provider_id TEXT PRIMARY KEY,
|
|
204
|
+
tenant_id TEXT NOT NULL REFERENCES tenants(tenant_id) ON DELETE CASCADE,
|
|
205
|
+
provider_type TEXT NOT NULL CHECK (provider_type IN ('openai','anthropic','ollama','custom')),
|
|
206
|
+
api_key_encrypted TEXT NOT NULL,
|
|
207
|
+
default_model TEXT,
|
|
208
|
+
created_at TIMESTAMPTZ DEFAULT NOW()
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
CREATE TABLE gateway_usage (
|
|
212
|
+
usage_id BIGSERIAL PRIMARY KEY,
|
|
213
|
+
tenant_id TEXT NOT NULL REFERENCES tenants(tenant_id) ON DELETE CASCADE,
|
|
214
|
+
call_type TEXT CHECK (call_type IN ('chat','completion','embedding')),
|
|
215
|
+
model TEXT,
|
|
216
|
+
tokens_in INT DEFAULT 0,
|
|
217
|
+
tokens_out INT DEFAULT 0,
|
|
218
|
+
risk_class TEXT,
|
|
219
|
+
halted BOOLEAN DEFAULT FALSE,
|
|
220
|
+
created_at TIMESTAMPTZ DEFAULT NOW()
|
|
221
|
+
);
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Comply-Specific Tables
|
|
225
|
+
|
|
226
|
+
```sql
|
|
227
|
+
CREATE TABLE github_installations (
|
|
228
|
+
installation_id BIGINT PRIMARY KEY,
|
|
229
|
+
tenant_id TEXT NOT NULL REFERENCES tenants(tenant_id) ON DELETE CASCADE,
|
|
230
|
+
account_login TEXT NOT NULL,
|
|
231
|
+
account_type TEXT NOT NULL DEFAULT 'Organization' CHECK (account_type IN ('User','Organization')),
|
|
232
|
+
suspended BOOLEAN DEFAULT FALSE,
|
|
233
|
+
created_at TIMESTAMPTZ DEFAULT NOW()
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
CREATE TABLE github_repos (
|
|
237
|
+
repo_internal_id BIGSERIAL PRIMARY KEY,
|
|
238
|
+
installation_id BIGINT NOT NULL REFERENCES github_installations(installation_id) ON DELETE CASCADE,
|
|
239
|
+
repo_id BIGINT NOT NULL,
|
|
240
|
+
full_name TEXT NOT NULL,
|
|
241
|
+
private BOOLEAN NOT NULL DEFAULT TRUE,
|
|
242
|
+
connected BOOLEAN DEFAULT FALSE,
|
|
243
|
+
last_scanned_at TIMESTAMPTZ,
|
|
244
|
+
findings_count INT DEFAULT 0,
|
|
245
|
+
UNIQUE(installation_id, repo_id)
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
CREATE TABLE scan_results (
|
|
249
|
+
scan_id BIGSERIAL PRIMARY KEY,
|
|
250
|
+
repo_id BIGINT NOT NULL REFERENCES github_repos(repo_internal_id) ON DELETE CASCADE,
|
|
251
|
+
tenant_id TEXT NOT NULL REFERENCES tenants(tenant_id) ON DELETE CASCADE,
|
|
252
|
+
commit_sha TEXT,
|
|
253
|
+
findings JSONB DEFAULT '[]',
|
|
254
|
+
status TEXT DEFAULT 'pending' CHECK (status IN ('pending','running','completed','failed')),
|
|
255
|
+
created_at TIMESTAMPTZ DEFAULT NOW(),
|
|
256
|
+
completed_at TIMESTAMPTZ
|
|
257
|
+
);
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## GitHub App Connectivity
|
|
263
|
+
|
|
264
|
+
### The Correct Flow
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
[Frontend] clicks "Connect GitHub"
|
|
268
|
+
│
|
|
269
|
+
▼ POST /api/v1/github/connect-start (Clerk-authed)
|
|
270
|
+
[Backend] creates signed state token → returns install URL
|
|
271
|
+
│
|
|
272
|
+
▼ User installs on GitHub
|
|
273
|
+
[GitHub] redirects to Setup URL
|
|
274
|
+
│
|
|
275
|
+
▼ GET /api/v1/github/setup?installation_id=NNN&state=TOKEN
|
|
276
|
+
[Backend] validates state → recovers identity → fetches repos → persists → redirects to app
|
|
277
|
+
│
|
|
278
|
+
▼ Frontend calls GET /api/v1/github/repos
|
|
279
|
+
[Backend] returns repos from PostgreSQL (no GitHub API call)
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### State Token Format
|
|
283
|
+
|
|
284
|
+
```python
|
|
285
|
+
import hmac, hashlib, base64, json, time, secrets
|
|
286
|
+
|
|
287
|
+
STATE_SECRET = os.environ["GITHUB_STATE_SECRET"].encode()
|
|
288
|
+
|
|
289
|
+
def _sign_state(payload: dict) -> str:
|
|
290
|
+
raw = base64.urlsafe_b64encode(json.dumps(payload).encode()).decode()
|
|
291
|
+
sig = hmac.new(STATE_SECRET, raw.encode(), hashlib.sha256).hexdigest()
|
|
292
|
+
return f"{raw}.{sig}"
|
|
293
|
+
|
|
294
|
+
def _verify_state(state: str) -> dict:
|
|
295
|
+
raw, sig = state.split(".")
|
|
296
|
+
expect = hmac.new(STATE_SECRET, raw.encode(), hashlib.sha256).hexdigest()
|
|
297
|
+
if not hmac.compare_digest(sig, expect):
|
|
298
|
+
raise ValueError("bad signature")
|
|
299
|
+
payload = json.loads(base64.urlsafe_b64decode(raw))
|
|
300
|
+
if payload["exp"] < time.time():
|
|
301
|
+
raise ValueError("expired")
|
|
302
|
+
return payload
|
|
303
|
+
|
|
304
|
+
# Usage in connect-start:
|
|
305
|
+
state = _sign_state({
|
|
306
|
+
"clerk_user_id": identity.user_id,
|
|
307
|
+
"clerk_org_id": identity.org_id,
|
|
308
|
+
"exp": time.time() + 600,
|
|
309
|
+
"nonce": secrets.token_hex(8),
|
|
310
|
+
})
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Critical GitHub Webhook Events
|
|
314
|
+
|
|
315
|
+
| Event | Action | SQL Operation |
|
|
316
|
+
|-------|--------|---------------|
|
|
317
|
+
| `installation` + `deleted`/`suspend` | User uninstalled app | `DELETE FROM github_installations WHERE installation_id = $1` |
|
|
318
|
+
| `installation_repositories` + `added` | Repos granted | `INSERT INTO github_repos ... ON CONFLICT DO NOTHING` |
|
|
319
|
+
| `installation_repositories` + `removed` | Repos revoked | `DELETE FROM github_repos WHERE repo_id = $1` |
|
|
320
|
+
| `push` | New commit | Enqueue scan job (async worker) |
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## API Key Handling
|
|
325
|
+
|
|
326
|
+
### Creation
|
|
327
|
+
|
|
328
|
+
```python
|
|
329
|
+
import secrets, hashlib
|
|
330
|
+
|
|
331
|
+
async def create_api_key(tenant_id: str, name: str = "default") -> str:
|
|
332
|
+
prefix = "crp_gw_" if is_gateway else "crp_cm_"
|
|
333
|
+
random_part = secrets.token_urlsafe(24)
|
|
334
|
+
full_key = f"{prefix}{random_part}"
|
|
335
|
+
|
|
336
|
+
key_hash = hashlib.sha256(full_key.encode()).hexdigest()
|
|
337
|
+
key_preview = full_key[-8:]
|
|
338
|
+
|
|
339
|
+
await db.execute("""
|
|
340
|
+
INSERT INTO api_keys (key_id, tenant_id, key_hash, key_preview, name)
|
|
341
|
+
VALUES ($1, $2, $3, $4, $5)
|
|
342
|
+
""", f"key_{secrets.token_urlsafe(8)}", tenant_id, key_hash, key_preview, name)
|
|
343
|
+
|
|
344
|
+
return full_key # Returned ONCE — never stored or logged
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### Validation
|
|
348
|
+
|
|
349
|
+
```python
|
|
350
|
+
async def validate_api_key(full_key: str) -> str | None:
|
|
351
|
+
key_hash = hashlib.sha256(full_key.encode()).hexdigest()
|
|
352
|
+
row = await db.fetchrow("""
|
|
353
|
+
SELECT tenant_id FROM api_keys
|
|
354
|
+
WHERE key_hash = $1 AND revoked = FALSE
|
|
355
|
+
""", key_hash)
|
|
356
|
+
return row["tenant_id"] if row else None
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## Railway Environment Variables
|
|
362
|
+
|
|
363
|
+
### Both Apps (must be identical)
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
CLERK_ISSUER=https://clerk.crprotocol.io
|
|
367
|
+
CLERK_SECRET_KEY=sk_live_...
|
|
368
|
+
CLERK_PUBLISHABLE_KEY=pk_live_Y2xlcmsuY3Jwcm90b2NvbC5pbyQ
|
|
369
|
+
DATABASE_URL=postgresql://USER:PASS@HOST:5432/DB_NAME
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
### Comply Only
|
|
373
|
+
|
|
374
|
+
```bash
|
|
375
|
+
GITHUB_APP_ID=...
|
|
376
|
+
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n..."
|
|
377
|
+
GITHUB_APP_WEBHOOK_SECRET=...
|
|
378
|
+
GITHUB_STATE_SECRET=<openssl rand -hex 32>
|
|
379
|
+
STRIPE_SECRET_KEY=sk_live_...
|
|
380
|
+
STRIPE_WEBHOOK_SECRET=whsec_...
|
|
381
|
+
STRIPE_COMPLY_STARTER_PRICE_ID=price_...
|
|
382
|
+
STRIPE_COMPLY_SCALE_PRICE_ID=price_...
|
|
383
|
+
STRIPE_SCAN_PRO_PRICE_ID=price_...
|
|
384
|
+
STRIPE_SCAN_BUSINESS_PRICE_ID=price_...
|
|
385
|
+
STRIPE_GATEWAY_DEVELOPER_PRICE_ID=price_...
|
|
386
|
+
STRIPE_GATEWAY_TEAM_PRICE_ID=price_...
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
### Gateway Only
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
SECRET_KEY=<openssl rand -hex 32>
|
|
393
|
+
STRIPE_SECRET_KEY=sk_live_...
|
|
394
|
+
STRIPE_WEBHOOK_SECRET=whsec_...
|
|
395
|
+
STRIPE_GATEWAY_DEVELOPER_PRICE_ID=price_...
|
|
396
|
+
STRIPE_GATEWAY_TEAM_PRICE_ID=price_...
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Common Bugs & Fixes
|
|
402
|
+
|
|
403
|
+
| Bug | Cause | Fix |
|
|
404
|
+
|-----|-------|-----|
|
|
405
|
+
| Repos disappear after restart | `_connected_repos` is in-memory dict | Migrate to `github_repos` table |
|
|
406
|
+
| Billing plan overwritten | Shared `"plan"` key in Clerk metadata | Use `comply_plan` / `gateway_plan` / `scan_plan` |
|
|
407
|
+
| GitHub callback forged | Raw `user_id` in state param | Use HMAC-signed state tokens with TTL |
|
|
408
|
+
| Gateway loses all tenants | `_tenants` is module-level dict | Migrate to PostgreSQL `tenants` table |
|
|
409
|
+
| API keys visible in logs | Stored plaintext | Hash with SHA-256, store hash only |
|
|
410
|
+
| Entitlement drift | Stripe webhook writes local JSON | Write to Clerk metadata ONLY |
|
|
411
|
+
| Personal account 404s | `org_id` missing, no fallback | Use `resolve_account()` — falls back to `user_id` |
|
|
412
|
+
| CORS errors on cross-product links | Different Clerk instances | Align both apps to `clerk.crprotocol.io` |
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
## Testing Auth Changes
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
# Test Clerk JWT verification
|
|
420
|
+
curl -H "Authorization: Bearer $(clerk_token)" https://gateway.crprotocol.io/api/v1/systems
|
|
421
|
+
|
|
422
|
+
# Test API key validation
|
|
423
|
+
curl -H "Authorization: Bearer crp_gw_xxx" https://gateway.crprotocol.io/v1/chat/completions
|
|
424
|
+
|
|
425
|
+
# Test GitHub connect-start
|
|
426
|
+
curl -X POST -H "Authorization: Bearer $(clerk_token)" \
|
|
427
|
+
https://comply.crprotocol.io/api/v1/github/connect-start
|
|
428
|
+
|
|
429
|
+
# Test entitlement read
|
|
430
|
+
python -c "
|
|
431
|
+
import asyncio
|
|
432
|
+
from crp_shared.auth import get_entitlement, Identity
|
|
433
|
+
async def test():
|
|
434
|
+
e = await get_entitlement(Identity('user_xxx', 'org_yyy', 'admin'), 'comply')
|
|
435
|
+
print(e)
|
|
436
|
+
asyncio.run(test())
|
|
437
|
+
"
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
## Related Skills
|
|
443
|
+
|
|
444
|
+
- `crp-comply-expert` — Comply-specific architecture, frontend patterns, dead code
|
|
445
|
+
- `crp-gateway-expert` — Gateway-specific endpoints, provider vault, deployment
|
|
446
|
+
- `crp-v4-specs` — Spec lookup, implementation rounds, ownership
|
|
447
|
+
|
|
448
|
+
---
|
|
449
|
+
|
|
450
|
+
*Last updated: 2026-06-05. Keep in sync with CRP-AUTH-POSTGRESQL-MIGRATION-PLAN.md.*
|