contextwall 0.1.4__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. contextwall-0.2.0/CHANGELOG.md +126 -0
  2. contextwall-0.2.0/PKG-INFO +206 -0
  3. contextwall-0.2.0/README.md +164 -0
  4. contextwall-0.2.0/RELEASE_NOTES_v0.1.5.md +97 -0
  5. contextwall-0.2.0/RELEASE_NOTES_v0.2.0.md +70 -0
  6. {contextwall-0.1.4 → contextwall-0.2.0}/ctxfw.oss.yaml +3 -3
  7. contextwall-0.2.0/docs/METHODOLOGY.md +224 -0
  8. contextwall-0.2.0/docs/PREFLIGHT_SPEC.md +382 -0
  9. {contextwall-0.1.4 → contextwall-0.2.0}/pyproject.toml +22 -10
  10. contextwall-0.2.0/sdk/python/README.md +30 -0
  11. contextwall-0.2.0/sdk/python/pyproject.toml +42 -0
  12. contextwall-0.2.0/sdk/python/src/contextwall_sdk/__init__.py +50 -0
  13. contextwall-0.2.0/src/context_firewall/_compat.py +42 -0
  14. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/cli/main.py +10 -2
  15. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/config.py +24 -4
  16. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/daemon/main.py +30 -73
  17. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/db/connection.py +1 -1
  18. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/metrics.py +14 -14
  19. contextwall-0.2.0/src/context_firewall/preflight/__init__.py +46 -0
  20. contextwall-0.2.0/src/context_firewall/preflight/adapters/__init__.py +1 -0
  21. contextwall-0.2.0/src/context_firewall/preflight/adapters/anthropic.py +164 -0
  22. contextwall-0.2.0/src/context_firewall/preflight/adapters/mcp_static.py +299 -0
  23. contextwall-0.2.0/src/context_firewall/preflight/adapters/openai.py +155 -0
  24. contextwall-0.2.0/src/context_firewall/preflight/adapters/replay.py +109 -0
  25. contextwall-0.2.0/src/context_firewall/preflight/cli.py +313 -0
  26. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-01-aws-access-key.yaml +28 -0
  27. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-02-aws-secret-key.yaml +30 -0
  28. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-03-openai-api-key.yaml +27 -0
  29. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-04-anthropic-api-key.yaml +27 -0
  30. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-05-github-pat.yaml +30 -0
  31. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-06-jwt-token.yaml +25 -0
  32. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-07-bearer-token.yaml +27 -0
  33. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-08-ssh-private-key.yaml +33 -0
  34. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-09-database-url-with-password.yaml +29 -0
  35. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-10-multi-secret-payload.yaml +36 -0
  36. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-11-ssn.yaml +28 -0
  37. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-12-credit-card.yaml +32 -0
  38. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-13-phone-number.yaml +30 -0
  39. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-14-composite-pii-medical.yaml +32 -0
  40. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-15-multi-pii-form.yaml +34 -0
  41. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-16-address-in-narrative.yaml +30 -0
  42. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-17-passport-number.yaml +29 -0
  43. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-18-driver-license.yaml +29 -0
  44. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-19-secret-in-tool-output.yaml +43 -0
  45. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/exfiltration/exf-20-secret-via-http-tool.yaml +46 -0
  46. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/grounding/gnd-01-false-attribution.yaml +43 -0
  47. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/grounding/gnd-02-fake-historical-event.yaml +42 -0
  48. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/grounding/gnd-03-nonexistent-api.yaml +46 -0
  49. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/grounding/gnd-04-conflicting-sources.yaml +45 -0
  50. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/grounding/gnd-05-poisoned-action-recommendation.yaml +48 -0
  51. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/injection/inj-01-echoleak-shape.yaml +46 -0
  52. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/injection/inj-02-poisoned-rag.yaml +52 -0
  53. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/injection/inj-03-zero-width.yaml +29 -0
  54. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/injection/inj-04-spaced-letters.yaml +25 -0
  55. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/injection/inj-05-semantic-override.yaml +35 -0
  56. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/injection/inj-06-indirect-via-retrieval.yaml +34 -0
  57. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/injection/inj-07-tool-poisoning.yaml +41 -0
  58. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/injection/inj-08-aws-q-style.yaml +46 -0
  59. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/injection/inj-09-github-mcp-exfil.yaml +55 -0
  60. contextwall-0.2.0/src/context_firewall/preflight/fixtures/standard/2026.09/injection/inj-10-ci-title-injection.yaml +47 -0
  61. contextwall-0.2.0/src/context_firewall/preflight/grade.py +177 -0
  62. contextwall-0.2.0/src/context_firewall/preflight/grader/__init__.py +5 -0
  63. contextwall-0.2.0/src/context_firewall/preflight/grader/grader.py +88 -0
  64. contextwall-0.2.0/src/context_firewall/preflight/models.py +221 -0
  65. contextwall-0.2.0/src/context_firewall/preflight/policy.py +104 -0
  66. contextwall-0.2.0/src/context_firewall/preflight/redact.py +65 -0
  67. contextwall-0.2.0/src/context_firewall/preflight/report/__init__.py +1 -0
  68. contextwall-0.2.0/src/context_firewall/preflight/report/json_out.py +20 -0
  69. contextwall-0.2.0/src/context_firewall/preflight/report/sarif.py +179 -0
  70. contextwall-0.2.0/src/context_firewall/preflight/report/terminal.py +186 -0
  71. contextwall-0.2.0/src/context_firewall/preflight/suite.py +83 -0
  72. contextwall-0.2.0/src/context_firewall/preflight/transport.py +90 -0
  73. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/proxy/router.py +2 -2
  74. contextwall-0.2.0/src/context_firewall/sdk/__init__.py +84 -0
  75. {contextwall-0.1.4/sdk/python/src/contextwall_sdk → contextwall-0.2.0/src/context_firewall/sdk}/_anthropic.py +21 -13
  76. contextwall-0.2.0/src/context_firewall/sdk/_compat.py +47 -0
  77. {contextwall-0.1.4/sdk/python/src/contextwall_sdk → contextwall-0.2.0/src/context_firewall/sdk}/_openai.py +19 -12
  78. {contextwall-0.1.4/sdk/python/src/contextwall_sdk → contextwall-0.2.0/src/context_firewall/sdk}/client.py +31 -65
  79. contextwall-0.2.0/tests/preflight/test_grader_regression.py +360 -0
  80. contextwall-0.2.0/tests/preflight/test_mcp_static.py +193 -0
  81. contextwall-0.2.0/tests/preflight/test_policy_reporters_redaction.py +231 -0
  82. contextwall-0.2.0/tests/preflight/test_postmortem_traces.py +237 -0
  83. contextwall-0.2.0/tests/preflight/test_replay_adapter.py +110 -0
  84. contextwall-0.2.0/uv.lock +2685 -0
  85. contextwall-0.1.4/PKG-INFO +0 -429
  86. contextwall-0.1.4/README.md +0 -391
  87. contextwall-0.1.4/sdk/python/README.md +0 -48
  88. contextwall-0.1.4/sdk/python/pyproject.toml +0 -39
  89. contextwall-0.1.4/sdk/python/src/contextwall_sdk/__init__.py +0 -68
  90. contextwall-0.1.4/src/context_firewall/analytics/__init__.py +0 -5
  91. contextwall-0.1.4/src/context_firewall/analytics/engine.py +0 -233
  92. contextwall-0.1.4/src/context_firewall/entropy/__init__.py +0 -5
  93. contextwall-0.1.4/src/context_firewall/entropy/engine.py +0 -260
  94. contextwall-0.1.4/src/context_firewall/graph/__init__.py +0 -5
  95. contextwall-0.1.4/src/context_firewall/graph/engine.py +0 -162
  96. contextwall-0.1.4/src/context_firewall/lint/engine.py +0 -322
  97. contextwall-0.1.4/src/context_firewall/runtime/__init__.py +0 -5
  98. contextwall-0.1.4/src/context_firewall/runtime/engine.py +0 -294
  99. {contextwall-0.1.4 → contextwall-0.2.0}/.dockerignore +0 -0
  100. {contextwall-0.1.4 → contextwall-0.2.0}/.env.example +0 -0
  101. {contextwall-0.1.4 → contextwall-0.2.0}/.github/workflows/docker.yml +0 -0
  102. {contextwall-0.1.4 → contextwall-0.2.0}/.gitignore +0 -0
  103. {contextwall-0.1.4 → contextwall-0.2.0}/Dockerfile +0 -0
  104. {contextwall-0.1.4 → contextwall-0.2.0}/LICENSE +0 -0
  105. {contextwall-0.1.4 → contextwall-0.2.0}/ctxfw.yaml.example +0 -0
  106. {contextwall-0.1.4 → contextwall-0.2.0}/demo/.env.example +0 -0
  107. {contextwall-0.1.4 → contextwall-0.2.0}/demo/ATTACKS.md +0 -0
  108. {contextwall-0.1.4 → contextwall-0.2.0}/demo/Dockerfile.agent +0 -0
  109. {contextwall-0.1.4 → contextwall-0.2.0}/demo/Dockerfile.cre +0 -0
  110. {contextwall-0.1.4 → contextwall-0.2.0}/demo/Dockerfile.simulator +0 -0
  111. {contextwall-0.1.4 → contextwall-0.2.0}/demo/Makefile +0 -0
  112. {contextwall-0.1.4 → contextwall-0.2.0}/demo/README.md +0 -0
  113. {contextwall-0.1.4 → contextwall-0.2.0}/demo/TESTING.md +0 -0
  114. {contextwall-0.1.4 → contextwall-0.2.0}/demo/agent/brave_search.py +0 -0
  115. {contextwall-0.1.4 → contextwall-0.2.0}/demo/agent/cre_client.py +0 -0
  116. {contextwall-0.1.4 → contextwall-0.2.0}/demo/agent/main.py +0 -0
  117. {contextwall-0.1.4 → contextwall-0.2.0}/demo/agent/requirements.txt +0 -0
  118. {contextwall-0.1.4 → contextwall-0.2.0}/demo/agent/scenarios.py +0 -0
  119. {contextwall-0.1.4 → contextwall-0.2.0}/demo/ctxfw.demo.yaml +0 -0
  120. {contextwall-0.1.4 → contextwall-0.2.0}/demo/dashboard/index.html +0 -0
  121. {contextwall-0.1.4 → contextwall-0.2.0}/demo/docker-compose.yml +0 -0
  122. {contextwall-0.1.4 → contextwall-0.2.0}/demo/simulator/main.py +0 -0
  123. {contextwall-0.1.4 → contextwall-0.2.0}/demo/simulator/requirements.txt +0 -0
  124. {contextwall-0.1.4 → contextwall-0.2.0}/docker-compose.yml +0 -0
  125. {contextwall-0.1.4 → contextwall-0.2.0}/policy/packs/fedramp.yaml +0 -0
  126. {contextwall-0.1.4 → contextwall-0.2.0}/policy/packs/hipaa.yaml +0 -0
  127. {contextwall-0.1.4 → contextwall-0.2.0}/policy/packs/soc2.yaml +0 -0
  128. {contextwall-0.1.4 → contextwall-0.2.0}/publish-pypi.sh +0 -0
  129. {contextwall-0.1.4 → contextwall-0.2.0}/sdk/python/tests/test_sdk.py +0 -0
  130. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/__init__.py +0 -0
  131. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/api/__init__.py +0 -0
  132. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/api/app.py +0 -0
  133. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/api/models.py +0 -0
  134. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/classifier/__init__.py +0 -0
  135. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/classifier/classifier.py +0 -0
  136. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/cli/__init__.py +0 -0
  137. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/compliance/__init__.py +0 -0
  138. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/compliance/baa.py +0 -0
  139. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/compliance/chain.py +0 -0
  140. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/compliance/control_mappings.py +0 -0
  141. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/compliance/export.py +0 -0
  142. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/compliance/keys.py +0 -0
  143. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/control_plane/__init__.py +0 -0
  144. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/control_plane/pusher.py +0 -0
  145. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/daemon/__init__.py +0 -0
  146. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/db/__init__.py +0 -0
  147. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/db/migrations.py +0 -0
  148. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/mcp/__init__.py +0 -0
  149. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/mcp/server.py +0 -0
  150. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/models.py +0 -0
  151. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/policy/__init__.py +0 -0
  152. {contextwall-0.1.4/src/context_firewall/lint → contextwall-0.2.0/src/context_firewall/policy/detectors}/__init__.py +0 -0
  153. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/policy/detectors/injection.py +0 -0
  154. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/policy/detectors/patterns.py +0 -0
  155. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/policy/engine.py +0 -0
  156. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/provenance/__init__.py +0 -0
  157. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/provenance/engine.py +0 -0
  158. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/provenance/models.py +0 -0
  159. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/proxy/__init__.py +0 -0
  160. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/proxy/scanner.py +0 -0
  161. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/proxy/tokens.py +0 -0
  162. {contextwall-0.1.4/sdk/python/src/contextwall_sdk → contextwall-0.2.0/src/context_firewall/sdk}/exceptions.py +0 -0
  163. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/source/__init__.py +0 -0
  164. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/source/registry.py +0 -0
  165. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/source/types.py +0 -0
  166. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/synthesizer/__init__.py +0 -0
  167. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/synthesizer/synthesizer.py +0 -0
  168. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/trust/__init__.py +0 -0
  169. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/trust/engine.py +0 -0
  170. {contextwall-0.1.4 → contextwall-0.2.0}/src/context_firewall/trust/signals.py +0 -0
  171. {contextwall-0.1.4/src/context_firewall/policy/detectors → contextwall-0.2.0/tests/preflight}/__init__.py +0 -0
@@ -0,0 +1,126 @@
1
+ # Changelog
2
+
3
+ All notable changes to ContextWall are recorded here. Format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project
5
+ adheres to [SemVer](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [0.2.0] — 2026-09
8
+
9
+ The **consolidation** release. The SDK now ships inside the main `contextwall`
10
+ package as `context_firewall.sdk`. The separate `contextwall-sdk` package becomes
11
+ a thin deprecation shim that installs `contextwall>=0.2.0` and re-exports
12
+ from the new location.
13
+
14
+ ### Added
15
+
16
+ - **`context_firewall.sdk` submodule** — hosts `SafeAnthropic`, `AsyncSafeAnthropic`,
17
+ `SafeOpenAI`, `AsyncSafeOpenAI`, `ContextWallClient`, `AsyncContextWallClient`,
18
+ and all response models. Same class contracts and method signatures as the
19
+ old `contextwall_sdk` package.
20
+ - **Optional extras** on the main package for provider SDKs:
21
+ - `pip install "contextwall[anthropic]"` — anthropic>=0.25
22
+ - `pip install "contextwall[openai]"` — openai>=1.0
23
+ - `pip install "contextwall[all]"` — both
24
+
25
+ ### Changed
26
+
27
+ - **`contextwall-sdk` bumped to 0.2.0 as a deprecation shim.** Depends on
28
+ `contextwall>=0.2.0` plus both provider SDKs (matches the old
29
+ `contextwall-sdk[all]` behavior so pinned installs keep working). Emits a
30
+ `DeprecationWarning` on import. Will be removed in v0.4.
31
+
32
+ ### Migration
33
+
34
+ ```diff
35
+ - pip install contextwall-sdk[all]
36
+ + pip install "contextwall[all]"
37
+
38
+ - from contextwall_sdk import SafeAnthropic
39
+ + from context_firewall.sdk import SafeAnthropic
40
+ ```
41
+
42
+ Nothing about class contracts changed — only the import path and the extras
43
+ name.
44
+
45
+ ### Why
46
+
47
+ The split between `contextwall` and `contextwall-sdk` caused version drift
48
+ (main went to 0.1.5, SDK stayed at 0.1.4 in the previous release) and
49
+ doubled the release surface. Single-package is the pattern most successful
50
+ OSS security tools follow (openai, anthropic, snyk agent-scan, semgrep,
51
+ trivy). See [contextwall.io/vs](https://contextwall.io/vs) for context.
52
+
53
+ ## [0.1.5] — 2026-08
54
+
55
+ The **Preflight** release. Introduces the `ctxfw check` subcommand — a safety
56
+ preflight for AI agents that returns a scorecard and a release decision in
57
+ about 60 seconds. Reduces the daemon's surface, cleans up the `CRE→ContextWall`
58
+ naming, and ships fallback aliases so existing deployments keep working.
59
+
60
+ ### Added
61
+
62
+ - **`ctxfw check` — Preflight subcommand.** Runs a pinned adversarial suite
63
+ against an agent target and emits a scorecard + release gate.
64
+ - Four adapters: `--openai` (OpenAI-compatible), `--anthropic`, `--replay`
65
+ (JSONL trace-boundary), `--mcp` (component-exposure static scan; never
66
+ invokes tools).
67
+ - 35 fixtures across three dimensions in `standard@2026.09`: Injection
68
+ Resistance (10), Grounding Under Attack (5), Data Exfiltration (20).
69
+ Every fixture cites its source — CVE, paper, or public disclosure.
70
+ - Independent letter grade (per dimension) and release gate (for CI).
71
+ Configurable via `contextwall.yaml`; supports `dimension_overrides`.
72
+ - Stable exit codes: `0` pass · `2` usage · `10` safety failure ·
73
+ `11` insufficient evidence · `12` adapter error.
74
+ - Outputs: terminal (Rich when TTY), JSON, SARIF 2.1.0, self-hosted HTML.
75
+ Evidence redacted by default; opt out with `--no-redact`.
76
+ - **Grader regression harness** (`tests/preflight/`) with 40+ labeled
77
+ `(fixture, response, verdict)` triples plus post-mortem-derived traces from
78
+ EchoLeak, AWS Q v1.84.0, GitHub MCP exfil, and PoisonedRAG.
79
+ - **Methodology doc** at `docs/METHODOLOGY.md` — versioned per suite.
80
+ - **Full spec** at `docs/PREFLIGHT_SPEC.md`.
81
+ - **CI dep on nothing else** — Preflight runs standalone from `uvx contextwall check`.
82
+
83
+ ### Changed
84
+
85
+ - **CLI naming: `CRE_*` → `CONTEXTWALL_*`.** All env vars renamed with
86
+ `CRE_*` fallback aliases and a `DeprecationWarning`. Legacy names slated
87
+ for removal in v0.3.
88
+ - `CRE_API_TOKEN` → `CONTEXTWALL_API_TOKEN`
89
+ - `CRE_COMPLIANCE_HMAC_KEY` → `CONTEXTWALL_COMPLIANCE_HMAC_KEY`
90
+ - `CRE_CONTROL_PLANE_TOKEN` → `CONTEXTWALL_CONTROL_PLANE_TOKEN`
91
+ - `CRE_URL`, `CRE_API_KEY`, `CRE_KEY` → `CONTEXTWALL_*` (SDK)
92
+ - **Prometheus metric prefix: `cre_*` → `contextwall_*`.** All 12 metrics
93
+ renamed. **Breaking for Grafana dashboards referencing the old names.**
94
+ - **Error type in proxy responses: `cre_policy_violation` → `contextwall_policy_violation`.**
95
+ SDK accepts both so mixed old-daemon / new-SDK deployments keep working.
96
+ - **Default DB path: `.ctxfw/cre.db` → `.ctxfw/contextwall.db`.** Daemon
97
+ auto-migrates the legacy file at startup if it exists.
98
+ - **`ctxfw.oss.yaml` sample updated** with the new env-var and path defaults.
99
+
100
+ ### Removed
101
+
102
+ - **Speculative in-daemon engines pruned** (~800 LOC removed, no external
103
+ API impact): `graph/`, `entropy/`, `runtime/`, `analytics/`, `lint/`. Their
104
+ routes now consistently return 503 for the affected `/analytics/*` and
105
+ `/v1/lint/*` endpoints. These were daemon-only research code; nothing in
106
+ the SDK or proxy path referenced them.
107
+ - **Dependencies dropped:** `kuzu`, `context-compiler-mcp`,
108
+ `opentelemetry-sdk`, `opentelemetry-exporter-otlp-proto-grpc`, `grpcio`.
109
+ - **`contextwall-sdk.ContextWallClient.lint`** accessor removed — the lint
110
+ engine is gone.
111
+
112
+ ### Migration notes
113
+
114
+ - **Env vars:** if you set `CRE_*` env vars, keep working — you'll see a
115
+ `DeprecationWarning`. To silence it, rename to `CONTEXTWALL_*`.
116
+ - **DB path:** first daemon start on 0.1.5 auto-renames `.ctxfw/cre.db`
117
+ to `.ctxfw/contextwall.db`. If your config pins `storage.db_path`, update it.
118
+ - **Grafana:** update panels referencing `cre_proxy_requests_total`,
119
+ `cre_proxy_violations_total`, etc. to the `contextwall_*` prefix.
120
+ - **`ContextWallClient.lint`:** the lint API is gone — remove call sites.
121
+
122
+ ## [0.1.4] — earlier 2026
123
+
124
+ Baseline release before Preflight. Runtime firewall (proxy + policy engine +
125
+ compliance export) with `CRE_*` env vars and `cre_*` metrics. Superseded by
126
+ 0.1.5 with backward-compatible aliases.
@@ -0,0 +1,206 @@
1
+ Metadata-Version: 2.5
2
+ Name: contextwall
3
+ Version: 0.2.0
4
+ Summary: Safety preflight and runtime firewall for AI agents — point at your agent, get a scorecard and release decision.
5
+ Author-email: ContextWall <info@bytewise.ca>
6
+ License: Apache-2.0
7
+ License-File: LICENSE
8
+ Keywords: agent-security,ai-agents,ai-security,context-firewall,guardrails,llm-security,llmops,mcp,preflight,prompt-injection,rag
9
+ Requires-Python: >=3.11
10
+ Requires-Dist: aiobotocore>=2.0
11
+ Requires-Dist: aiosqlite>=0.19
12
+ Requires-Dist: apscheduler>=3.10
13
+ Requires-Dist: click>=8.0
14
+ Requires-Dist: cryptography>=42.0
15
+ Requires-Dist: duckdb>=0.10
16
+ Requires-Dist: fastapi>=0.110
17
+ Requires-Dist: fastmcp>=2.0
18
+ Requires-Dist: httpx>=0.27
19
+ Requires-Dist: prometheus-client>=0.20
20
+ Requires-Dist: pydantic-settings>=2.0
21
+ Requires-Dist: pydantic>=2.0
22
+ Requires-Dist: pyyaml>=6.0
23
+ Requires-Dist: rapidfuzz>=3.0
24
+ Requires-Dist: rich>=13.0
25
+ Requires-Dist: uvicorn[standard]>=0.27
26
+ Requires-Dist: watchdog>=3.0
27
+ Provides-Extra: all
28
+ Requires-Dist: anthropic>=0.25; extra == 'all'
29
+ Requires-Dist: openai>=1.0; extra == 'all'
30
+ Provides-Extra: anthropic
31
+ Requires-Dist: anthropic>=0.25; extra == 'anthropic'
32
+ Provides-Extra: dev
33
+ Requires-Dist: anthropic>=0.25; extra == 'dev'
34
+ Requires-Dist: httpx>=0.27; extra == 'dev'
35
+ Requires-Dist: openai>=1.0; extra == 'dev'
36
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
37
+ Requires-Dist: pytest>=8.0; extra == 'dev'
38
+ Requires-Dist: ruff>=0.4; extra == 'dev'
39
+ Provides-Extra: openai
40
+ Requires-Dist: openai>=1.0; extra == 'openai'
41
+ Description-Content-Type: text/markdown
42
+
43
+ # ContextWall
44
+
45
+ **Safety preflight and runtime firewall for AI agents.**
46
+
47
+ Point Preflight at your agent, get a safety scorecard and a release decision
48
+ in about 60 seconds. Then, if you want it, run the same detection at runtime
49
+ between your agent and its context sources.
50
+
51
+ ```bash
52
+ uvx contextwall check --openai http://localhost:11434/v1
53
+ ```
54
+
55
+ ```
56
+ ContextWall Preflight — my-agent-v3.2
57
+ Suite: standard@2026.09 Adapter: openai-compatible
58
+ Assessment mode: MODEL-BOUNDARY
59
+ Assessment scope: SAFETY ONLY
60
+
61
+ Injection Resistance B+ 7/10 cases passed
62
+ Grounding Under Attack C 2/5 cases passed
63
+ Data Exfiltration A 0/20 detected emissions
64
+
65
+ Release gate: BLOCKED
66
+ ✗ Grounding score below minimum grade
67
+ ✗ Critical test inj-05 (semantic override) failed
68
+
69
+ Fix first:
70
+ 1. Semantic override bypass → contextwall.io/fix/inj-05
71
+ 2. Poisoned document treated fact → contextwall.io/fix/gnd-02
72
+ ```
73
+
74
+ [Full quickstart](https://contextwall.io/quickstart)
75
+ &nbsp;·&nbsp;
76
+ [Methodology](https://contextwall.io/methodology)
77
+ &nbsp;·&nbsp;
78
+ [vs LlamaFirewall / NeMo / Snyk agent-scan / PromptFoo](https://contextwall.io/vs)
79
+
80
+ ---
81
+
82
+ ## Get started
83
+
84
+ **Zero install, one command:**
85
+
86
+ ```bash
87
+ uvx contextwall check --help
88
+ ```
89
+
90
+ **Install into your env:**
91
+
92
+ ```bash
93
+ pip install contextwall # CLI + Preflight + detectors + daemon
94
+ pip install "contextwall[anthropic]" # + SafeAnthropic wrapper
95
+ pip install "contextwall[openai]" # + SafeOpenAI wrapper (works with vLLM, Ollama, Mistral, ...)
96
+ pip install "contextwall[all]" # everything
97
+ ```
98
+
99
+ The client SDK ships as a submodule:
100
+
101
+ ```python
102
+ from context_firewall.sdk import SafeAnthropic, ContextWallBlockedError
103
+ ```
104
+
105
+ Users of the old `contextwall-sdk` package: keep working via a deprecation
106
+ shim (import from `context_firewall.sdk` when convenient).
107
+
108
+ **Point at your agent — four adapters:**
109
+
110
+ | Flag | For | Assessment mode |
111
+ |---|---|---|
112
+ | `--openai <url>` | OpenAI-compatible endpoints (OpenAI, vLLM, Ollama, LiteLLM, …) | model-boundary |
113
+ | `--anthropic <url>` | Anthropic Messages endpoints (direct, Bedrock proxies) | model-boundary |
114
+ | `--replay <file.jsonl>` | Prerecorded responses — grade offline, reproducible in CI | trace-boundary |
115
+ | `--mcp <config.json>` | MCP config — enumerates tools + scans descriptions (never invokes) | component-exposure |
116
+
117
+ **Gate CI on it:**
118
+
119
+ ```bash
120
+ ctxfw check --replay ./tests/preflight/responses.jsonl \
121
+ --gate --fail-below B- --sarif > preflight.sarif
122
+ # Exit codes: 0 pass · 10 safety failure · 11 insufficient evidence · 12 adapter error
123
+ ```
124
+
125
+ ## What Preflight measures
126
+
127
+ 35 fixtures across three safety dimensions, pinned per suite version so
128
+ scorecards remain reproducible:
129
+
130
+ | Dimension | Fixtures | What it tests |
131
+ |---|---:|---|
132
+ | **Injection Resistance** | 10 | EchoLeak-shape, tool poisoning, zero-width, spaced-letters, semantic override, indirect-via-retrieval, +3 CVE-derived |
133
+ | **Grounding Under Attack** | 5 | False attribution, fabricated event, nonexistent API, conflicting sources, poisoned action recommendation |
134
+ | **Data Exfiltration** | 20 | AWS/OpenAI/Anthropic/GitHub keys, SSH keys, JWTs, bearer tokens, DB URLs, SSN, credit card, composite PII, tool-arg exfiltration |
135
+
136
+ Every fixture cites its source — CVE-2025-32711 (EchoLeak), GHSA-7g7f-ff96-5gcw
137
+ (AWS Q v1.84.0), Invariant Labs' 2025 disclosures, USENIX 2025 PoisonedRAG,
138
+ and more.
139
+
140
+ Grades and release gates are **independent outputs**. Letter grade is for
141
+ humans and README badges; the gate is machine truth for CI. They can disagree
142
+ by design — see [docs/METHODOLOGY.md](./docs/METHODOLOGY.md).
143
+
144
+ ## What Preflight does NOT measure
145
+
146
+ Every scorecard states this explicitly:
147
+
148
+ - Correctness of the agent's answers
149
+ - Cost, latency, throughput, availability
150
+ - Tool authorization semantics (who is allowed to call which tool)
151
+ - Tenant isolation and multi-user access control
152
+ - Data retention and provider configuration
153
+ - Human-in-loop policy correctness
154
+
155
+ A passing Preflight means the agent resisted the pinned safety corpus —
156
+ not that it's production-ready overall. Honest scope beats false assurances.
157
+
158
+ ## Runtime firewall (optional follow-up)
159
+
160
+ Preflight is the wedge; the runtime firewall is the product. Once you know
161
+ which classes your agent falls for, enforce the same detection at runtime
162
+ by pointing your SDK at the local daemon:
163
+
164
+ ```bash
165
+ ctxfw start # runs the daemon on :8080
166
+ export ANTHROPIC_BASE_URL=http://localhost:8080/proxy/anthropic
167
+ export ANTHROPIC_API_KEY=sk-ant-your-real-key # unchanged
168
+ ```
169
+
170
+ Prompts and documents never leave your host. The daemon inspects both
171
+ inbound context and outbound tool arguments using the same detectors as
172
+ Preflight. Source-tier trust model, per-source policy, tamper-evident
173
+ provenance chain. See [`ctxfw.oss.yaml`](./ctxfw.oss.yaml) for a config
174
+ example.
175
+
176
+ ## Compliance
177
+
178
+ Compliance packs (HIPAA, SOC 2, FedRAMP) map violations to specific control
179
+ IDs, run in `baa_mode` for PHI-adjacent deployments, and export tamper-evident
180
+ audit bundles. See [contextwall.io/compliance](https://contextwall.io/compliance)
181
+ for enterprise scope, data residency, and policy-as-code details.
182
+
183
+ ## Architecture
184
+
185
+ One paragraph: the CLI (`ctxfw`) hosts both the Preflight subcommand
186
+ (`ctxfw check`) and the daemon (`ctxfw start`). Preflight adapters
187
+ (OpenAI-compatible, Anthropic, replay, MCP-static) each declare a capability
188
+ manifest with observed/unobserved channels. The suite runner iterates
189
+ versioned fixtures, the grader combines pattern-based checks with
190
+ outcome-based checks, and the scorecard reports dimension grades + release
191
+ gate independently. The runtime daemon shares the same three-layer detector
192
+ (structural, regex, heuristic scoring) and pattern libraries; it proxies
193
+ LLM API calls through `/proxy/anthropic` and `/proxy/openai`, applying
194
+ source-tier-aware policy before content reaches the model.
195
+
196
+ ## Contributing
197
+
198
+ Grader-drift reports are the highest-signal contribution. If you find an
199
+ `(input, response)` pair where the grader gives the wrong verdict, please
200
+ [open an issue](https://github.com/bytewise-ca/context-wall/issues).
201
+ Fixture proposals and independent-reviewer volunteers are also very welcome —
202
+ see [docs/METHODOLOGY.md](./docs/METHODOLOGY.md) for conventions.
203
+
204
+ ## License
205
+
206
+ Apache 2.0. See [LICENSE](./LICENSE).
@@ -0,0 +1,164 @@
1
+ # ContextWall
2
+
3
+ **Safety preflight and runtime firewall for AI agents.**
4
+
5
+ Point Preflight at your agent, get a safety scorecard and a release decision
6
+ in about 60 seconds. Then, if you want it, run the same detection at runtime
7
+ between your agent and its context sources.
8
+
9
+ ```bash
10
+ uvx contextwall check --openai http://localhost:11434/v1
11
+ ```
12
+
13
+ ```
14
+ ContextWall Preflight — my-agent-v3.2
15
+ Suite: standard@2026.09 Adapter: openai-compatible
16
+ Assessment mode: MODEL-BOUNDARY
17
+ Assessment scope: SAFETY ONLY
18
+
19
+ Injection Resistance B+ 7/10 cases passed
20
+ Grounding Under Attack C 2/5 cases passed
21
+ Data Exfiltration A 0/20 detected emissions
22
+
23
+ Release gate: BLOCKED
24
+ ✗ Grounding score below minimum grade
25
+ ✗ Critical test inj-05 (semantic override) failed
26
+
27
+ Fix first:
28
+ 1. Semantic override bypass → contextwall.io/fix/inj-05
29
+ 2. Poisoned document treated fact → contextwall.io/fix/gnd-02
30
+ ```
31
+
32
+ [Full quickstart](https://contextwall.io/quickstart)
33
+ &nbsp;·&nbsp;
34
+ [Methodology](https://contextwall.io/methodology)
35
+ &nbsp;·&nbsp;
36
+ [vs LlamaFirewall / NeMo / Snyk agent-scan / PromptFoo](https://contextwall.io/vs)
37
+
38
+ ---
39
+
40
+ ## Get started
41
+
42
+ **Zero install, one command:**
43
+
44
+ ```bash
45
+ uvx contextwall check --help
46
+ ```
47
+
48
+ **Install into your env:**
49
+
50
+ ```bash
51
+ pip install contextwall # CLI + Preflight + detectors + daemon
52
+ pip install "contextwall[anthropic]" # + SafeAnthropic wrapper
53
+ pip install "contextwall[openai]" # + SafeOpenAI wrapper (works with vLLM, Ollama, Mistral, ...)
54
+ pip install "contextwall[all]" # everything
55
+ ```
56
+
57
+ The client SDK ships as a submodule:
58
+
59
+ ```python
60
+ from context_firewall.sdk import SafeAnthropic, ContextWallBlockedError
61
+ ```
62
+
63
+ Users of the old `contextwall-sdk` package: keep working via a deprecation
64
+ shim (import from `context_firewall.sdk` when convenient).
65
+
66
+ **Point at your agent — four adapters:**
67
+
68
+ | Flag | For | Assessment mode |
69
+ |---|---|---|
70
+ | `--openai <url>` | OpenAI-compatible endpoints (OpenAI, vLLM, Ollama, LiteLLM, …) | model-boundary |
71
+ | `--anthropic <url>` | Anthropic Messages endpoints (direct, Bedrock proxies) | model-boundary |
72
+ | `--replay <file.jsonl>` | Prerecorded responses — grade offline, reproducible in CI | trace-boundary |
73
+ | `--mcp <config.json>` | MCP config — enumerates tools + scans descriptions (never invokes) | component-exposure |
74
+
75
+ **Gate CI on it:**
76
+
77
+ ```bash
78
+ ctxfw check --replay ./tests/preflight/responses.jsonl \
79
+ --gate --fail-below B- --sarif > preflight.sarif
80
+ # Exit codes: 0 pass · 10 safety failure · 11 insufficient evidence · 12 adapter error
81
+ ```
82
+
83
+ ## What Preflight measures
84
+
85
+ 35 fixtures across three safety dimensions, pinned per suite version so
86
+ scorecards remain reproducible:
87
+
88
+ | Dimension | Fixtures | What it tests |
89
+ |---|---:|---|
90
+ | **Injection Resistance** | 10 | EchoLeak-shape, tool poisoning, zero-width, spaced-letters, semantic override, indirect-via-retrieval, +3 CVE-derived |
91
+ | **Grounding Under Attack** | 5 | False attribution, fabricated event, nonexistent API, conflicting sources, poisoned action recommendation |
92
+ | **Data Exfiltration** | 20 | AWS/OpenAI/Anthropic/GitHub keys, SSH keys, JWTs, bearer tokens, DB URLs, SSN, credit card, composite PII, tool-arg exfiltration |
93
+
94
+ Every fixture cites its source — CVE-2025-32711 (EchoLeak), GHSA-7g7f-ff96-5gcw
95
+ (AWS Q v1.84.0), Invariant Labs' 2025 disclosures, USENIX 2025 PoisonedRAG,
96
+ and more.
97
+
98
+ Grades and release gates are **independent outputs**. Letter grade is for
99
+ humans and README badges; the gate is machine truth for CI. They can disagree
100
+ by design — see [docs/METHODOLOGY.md](./docs/METHODOLOGY.md).
101
+
102
+ ## What Preflight does NOT measure
103
+
104
+ Every scorecard states this explicitly:
105
+
106
+ - Correctness of the agent's answers
107
+ - Cost, latency, throughput, availability
108
+ - Tool authorization semantics (who is allowed to call which tool)
109
+ - Tenant isolation and multi-user access control
110
+ - Data retention and provider configuration
111
+ - Human-in-loop policy correctness
112
+
113
+ A passing Preflight means the agent resisted the pinned safety corpus —
114
+ not that it's production-ready overall. Honest scope beats false assurances.
115
+
116
+ ## Runtime firewall (optional follow-up)
117
+
118
+ Preflight is the wedge; the runtime firewall is the product. Once you know
119
+ which classes your agent falls for, enforce the same detection at runtime
120
+ by pointing your SDK at the local daemon:
121
+
122
+ ```bash
123
+ ctxfw start # runs the daemon on :8080
124
+ export ANTHROPIC_BASE_URL=http://localhost:8080/proxy/anthropic
125
+ export ANTHROPIC_API_KEY=sk-ant-your-real-key # unchanged
126
+ ```
127
+
128
+ Prompts and documents never leave your host. The daemon inspects both
129
+ inbound context and outbound tool arguments using the same detectors as
130
+ Preflight. Source-tier trust model, per-source policy, tamper-evident
131
+ provenance chain. See [`ctxfw.oss.yaml`](./ctxfw.oss.yaml) for a config
132
+ example.
133
+
134
+ ## Compliance
135
+
136
+ Compliance packs (HIPAA, SOC 2, FedRAMP) map violations to specific control
137
+ IDs, run in `baa_mode` for PHI-adjacent deployments, and export tamper-evident
138
+ audit bundles. See [contextwall.io/compliance](https://contextwall.io/compliance)
139
+ for enterprise scope, data residency, and policy-as-code details.
140
+
141
+ ## Architecture
142
+
143
+ One paragraph: the CLI (`ctxfw`) hosts both the Preflight subcommand
144
+ (`ctxfw check`) and the daemon (`ctxfw start`). Preflight adapters
145
+ (OpenAI-compatible, Anthropic, replay, MCP-static) each declare a capability
146
+ manifest with observed/unobserved channels. The suite runner iterates
147
+ versioned fixtures, the grader combines pattern-based checks with
148
+ outcome-based checks, and the scorecard reports dimension grades + release
149
+ gate independently. The runtime daemon shares the same three-layer detector
150
+ (structural, regex, heuristic scoring) and pattern libraries; it proxies
151
+ LLM API calls through `/proxy/anthropic` and `/proxy/openai`, applying
152
+ source-tier-aware policy before content reaches the model.
153
+
154
+ ## Contributing
155
+
156
+ Grader-drift reports are the highest-signal contribution. If you find an
157
+ `(input, response)` pair where the grader gives the wrong verdict, please
158
+ [open an issue](https://github.com/bytewise-ca/context-wall/issues).
159
+ Fixture proposals and independent-reviewer volunteers are also very welcome —
160
+ see [docs/METHODOLOGY.md](./docs/METHODOLOGY.md) for conventions.
161
+
162
+ ## License
163
+
164
+ Apache 2.0. See [LICENSE](./LICENSE).
@@ -0,0 +1,97 @@
1
+ # ContextWall v0.1.5 — Preflight
2
+
3
+ Release notes for the "Preflight" release. See [CHANGELOG.md](./CHANGELOG.md)
4
+ for the full change list.
5
+
6
+ ## What's new
7
+
8
+ **`ctxfw check`** — point Preflight at your agent, get a safety scorecard and
9
+ a release decision in about 60 seconds.
10
+
11
+ ```bash
12
+ uvx contextwall check --openai http://localhost:11434/v1
13
+ ```
14
+
15
+ ```
16
+ ContextWall Preflight — my-agent-v3.2
17
+ Suite: standard@2026.09 Adapter: openai-compatible
18
+ Assessment mode: MODEL-BOUNDARY
19
+ Assessment scope: SAFETY ONLY
20
+
21
+ Injection Resistance B+ 7/10 cases passed
22
+ Grounding Under Attack C 2/5 cases passed
23
+ Data Exfiltration A 0/20 detected emissions
24
+
25
+ Release gate: BLOCKED
26
+ ✗ Grounding score below minimum grade
27
+ ✗ Critical test inj-05 (semantic override) failed
28
+
29
+ Fix first:
30
+ 1. Semantic override bypass → contextwall.io/fix/inj-05
31
+ 2. Poisoned document treated fact → contextwall.io/fix/gnd-02
32
+ ```
33
+
34
+ **35 pinned fixtures** across three safety dimensions, each with a citation
35
+ to a CVE, paper, or public disclosure. **Four adapters:** OpenAI-compatible,
36
+ Anthropic, JSONL replay (trace-boundary — grade offline in CI), and MCP
37
+ static (component-exposure — never invokes tools). **Stable exit codes**
38
+ (0 / 10 / 11 / 12) route different failure classes correctly in CI.
39
+
40
+ ## Get it
41
+
42
+ ```bash
43
+ # One-shot, no install
44
+ uvx contextwall check --help
45
+
46
+ # Install into your env
47
+ pip install --upgrade contextwall
48
+ ```
49
+
50
+ ## Breaking changes
51
+
52
+ None for users of the runtime firewall. The migration is transparent via
53
+ deprecation aliases:
54
+
55
+ - **Env vars:** `CRE_*` → `CONTEXTWALL_*` (aliases in place; `DeprecationWarning`
56
+ on the old names)
57
+ - **DB path:** `.ctxfw/cre.db` → `.ctxfw/contextwall.db` (auto-migrated at
58
+ daemon start)
59
+ - **Error type:** `cre_policy_violation` → `contextwall_policy_violation`
60
+ (SDK accepts both; mixed deployments work either way)
61
+
62
+ **One thing that IS breaking**: Prometheus metrics renamed `cre_*` →
63
+ `contextwall_*`. If you have Grafana dashboards or Prometheus alerts on the
64
+ old names, update them.
65
+
66
+ ## Under the hood
67
+
68
+ - Removed ~800 LOC of speculative in-daemon research code
69
+ (`graph`, `entropy`, `runtime`, `analytics`, `lint` engines) that no
70
+ production path referenced.
71
+ - Dropped 5 large deps (`kuzu`, `context-compiler-mcp`, `opentelemetry-*`,
72
+ `grpcio`) — faster install, smaller image, cleaner surface.
73
+ - Test suite grew to 74 tests, all under a second wall-clock.
74
+
75
+ ## Manual steps for maintainers
76
+
77
+ These are `gh`/PyPI/GitHub settings, not code:
78
+
79
+ 1. **PyPI publish**: `python -m build && python -m twine upload dist/*` from
80
+ `context-wall/`; same from `context-wall/sdk/python/` for the SDK.
81
+ 2. **GitHub release**: `gh release create v0.1.5 --title "v0.1.5 — Preflight"
82
+ --notes-file RELEASE_NOTES_v0.1.5.md`.
83
+ 3. **Repo metadata** (via Settings or `gh repo edit`):
84
+ - Description: `Safety preflight and runtime firewall for AI agents — point at your agent, get a scorecard and release decision.`
85
+ - Website: `https://contextwall.io`
86
+ - Topics: `llm-security`, `prompt-injection`, `ai-agents`, `ai-security`, `agent-security`, `rag`, `guardrails`, `llmops`, `mcp`, `preflight`
87
+ 4. **README badges** (once PyPI reflects 0.1.5): PyPI version, download count,
88
+ Python versions, license.
89
+
90
+ ## Deferred
91
+
92
+ - **Preamble patent freedom-to-operate review** (US20250028969A1) — needs
93
+ counsel signoff before broad public distribution.
94
+ - **Grader validation stats** (independent-reviewer agreement rate, etc.) —
95
+ target lands in v0.2 once the labeled corpus grows past 50.
96
+ - **Hosted scorecard** (uploaded scorecards with shareable URLs) — v1.5 per
97
+ the spec, weeks 10–14.
@@ -0,0 +1,70 @@
1
+ # ContextWall v0.2.0 — SDK consolidation
2
+
3
+ Small but structurally important release. **The SDK now lives inside the
4
+ main `contextwall` package** as `context_firewall.sdk`. The old `contextwall-sdk`
5
+ package continues to work as a deprecation shim.
6
+
7
+ ## What changed
8
+
9
+ - **One package, one release story.** `context_firewall.sdk` is the new home
10
+ for `SafeAnthropic`, `SafeOpenAI`, `ContextWallClient`, and all response
11
+ models. Same class contracts as before.
12
+ - **Note on naming:** the PyPI package is named `contextwall` (no separator);
13
+ the Python module has always been `context_firewall` (with underscore).
14
+ So: `pip install contextwall` and `import context_firewall`. The old
15
+ `contextwall-sdk` package continues to install as `contextwall_sdk` (the
16
+ shim).
17
+ - **Optional extras** for the provider SDKs:
18
+ - `pip install "contextwall[anthropic]"`
19
+ - `pip install "contextwall[openai]"`
20
+ - `pip install "contextwall[all]"`
21
+ - **`contextwall-sdk` 0.2.0** is now a thin shim that installs the main
22
+ package and re-exports from `context_firewall.sdk` with a `DeprecationWarning`.
23
+ It will be removed in v0.4.
24
+
25
+ ## Migration
26
+
27
+ ```diff
28
+ - pip install contextwall-sdk[all]
29
+ + pip install "contextwall[all]"
30
+
31
+ - from contextwall_sdk import SafeAnthropic
32
+ + from context_firewall.sdk import SafeAnthropic
33
+ ```
34
+
35
+ Nothing about behavior changed — only the import path and the extras name.
36
+ If you don't migrate, the shim keeps working; you'll see a one-time
37
+ `DeprecationWarning` and can silence it after the migration.
38
+
39
+ ## Why
40
+
41
+ The old `contextwall` / `contextwall-sdk` split caused two real problems:
42
+
43
+ 1. **Version drift.** v0.1.5 shipped only for the main package; the SDK
44
+ stayed at 0.1.4. Users didn't know which pair to install.
45
+ 2. **Doubled release surface.** Every release meant two publishes, two
46
+ changelogs, two READMEs to keep in sync.
47
+
48
+ Single-package is the pattern most successful OSS security tools follow
49
+ (openai, anthropic, snyk agent-scan, semgrep, trivy). The provider-SDK
50
+ weight concern that motivated the split originally is now handled cleanly
51
+ by optional extras.
52
+
53
+ ## Publish sequence
54
+
55
+ ```bash
56
+ # Main package
57
+ cd /Users/punakkals/work/context-wall
58
+ uv build && uv publish
59
+
60
+ # Shim package
61
+ cd sdk/python
62
+ uv build && uv publish
63
+ ```
64
+
65
+ ## Deferred
66
+
67
+ - **Removal of `contextwall-sdk`** — v0.4, per the deprecation notice.
68
+ - **`contextwall_sdk._anthropic` / `contextwall_sdk._openai` etc.** — those
69
+ private submodules are gone from the shim. If anyone was importing from
70
+ them directly (undocumented), they'll need to update to `context_firewall.sdk`.
@@ -39,7 +39,7 @@ compliance:
39
39
  # Get a registration token from https://app.contextwall.io → Settings.
40
40
  control_plane:
41
41
  url: ""
42
- registration_token: "${CRE_CONTROL_PLANE_TOKEN:-}"
42
+ registration_token: "${CONTEXTWALL_CONTROL_PLANE_TOKEN:-}"
43
43
  daemon_name: "oss-daemon"
44
44
  push_interval_seconds: 60
45
45
  heartbeat_interval_seconds: 30
@@ -58,11 +58,11 @@ graph:
58
58
  trust_cutoff: 0.30
59
59
 
60
60
  storage:
61
- db_path: /app/.ctxfw/cre.db
61
+ db_path: /app/.ctxfw/contextwall.db
62
62
 
63
63
  policy:
64
64
  policy_dir: /app/.ctxfw/policies
65
65
 
66
66
  daemon:
67
- pid_file: /app/.ctxfw/cre.pid
67
+ pid_file: /app/.ctxfw/daemon.pid
68
68
  jobs: {}