atbash-hermes-plugin 0.4.8.dev0__tar.gz → 0.4.10.dev0__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 (17) hide show
  1. atbash_hermes_plugin-0.4.10.dev0/MANIFEST.in +1 -0
  2. {atbash_hermes_plugin-0.4.8.dev0 → atbash_hermes_plugin-0.4.10.dev0}/PKG-INFO +44 -43
  3. {atbash_hermes_plugin-0.4.8.dev0 → atbash_hermes_plugin-0.4.10.dev0}/README.md +42 -41
  4. {atbash_hermes_plugin-0.4.8.dev0 → atbash_hermes_plugin-0.4.10.dev0}/atbash_hermes_plugin/__init__.py +281 -28
  5. {atbash_hermes_plugin-0.4.8.dev0 → atbash_hermes_plugin-0.4.10.dev0}/atbash_hermes_plugin.egg-info/PKG-INFO +44 -43
  6. {atbash_hermes_plugin-0.4.8.dev0 → atbash_hermes_plugin-0.4.10.dev0}/atbash_hermes_plugin.egg-info/SOURCES.txt +5 -1
  7. {atbash_hermes_plugin-0.4.8.dev0 → atbash_hermes_plugin-0.4.10.dev0}/atbash_hermes_plugin.egg-info/requires.txt +1 -1
  8. atbash_hermes_plugin-0.4.10.dev0/plugin.yaml +9 -0
  9. {atbash_hermes_plugin-0.4.8.dev0 → atbash_hermes_plugin-0.4.10.dev0}/pyproject.toml +3 -3
  10. atbash_hermes_plugin-0.4.10.dev0/tests/test_pre_tool_call_verdicts.py +474 -0
  11. atbash_hermes_plugin-0.4.10.dev0/tests/test_release_contract.py +207 -0
  12. {atbash_hermes_plugin-0.4.8.dev0 → atbash_hermes_plugin-0.4.10.dev0}/LICENSE +0 -0
  13. {atbash_hermes_plugin-0.4.8.dev0 → atbash_hermes_plugin-0.4.10.dev0}/atbash_hermes_plugin.egg-info/dependency_links.txt +0 -0
  14. {atbash_hermes_plugin-0.4.8.dev0 → atbash_hermes_plugin-0.4.10.dev0}/atbash_hermes_plugin.egg-info/entry_points.txt +0 -0
  15. {atbash_hermes_plugin-0.4.8.dev0 → atbash_hermes_plugin-0.4.10.dev0}/atbash_hermes_plugin.egg-info/top_level.txt +0 -0
  16. {atbash_hermes_plugin-0.4.8.dev0 → atbash_hermes_plugin-0.4.10.dev0}/setup.cfg +0 -0
  17. {atbash_hermes_plugin-0.4.8.dev0 → atbash_hermes_plugin-0.4.10.dev0}/tests/test_memory_poisoning.py +0 -0
@@ -0,0 +1 @@
1
+ include plugin.yaml
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atbash-hermes-plugin
3
- Version: 0.4.8.dev0
3
+ Version: 0.4.10.dev0
4
4
  Summary: Atbash safety plugin for Hermes Agent
5
5
  Author: atbash
6
6
  License-Expression: LicenseRef-Atbash-Proprietary
@@ -10,7 +10,7 @@ Keywords: atbash,hermes,hermes-agent,agent-safety,ai-safety,tool-guard,judge,pol
10
10
  Requires-Python: <3.13,>=3.9
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
- Requires-Dist: atbash-sdk==0.5.0
13
+ Requires-Dist: atbash-sdk==0.5.2.dev0
14
14
  Requires-Dist: httpx<1,>=0.27
15
15
  Requires-Dist: opentelemetry-exporter-otlp-proto-http<2,>=1.29
16
16
  Requires-Dist: opentelemetry-sdk<2,>=1.29
@@ -30,37 +30,26 @@ stopped before execution.
30
30
  - Intercepts Hermes tool calls through `pre_tool_call`.
31
31
  - Sends the tool name, arguments, command-like payload, session metadata, and
32
32
  inferred action class to Atbash.
33
- - Blocks tool execution on `BLOCK`, `DENY`, `REJECT`, or `DISALLOW`; holds it for operator review on `HOLD`.
33
+ - Blocks tool execution on `BLOCK`, `DENY`, `REJECT`, `DISALLOW`, or `HOLD`.
34
34
  - Persists learned Hermes tool classifications across sessions.
35
35
 
36
36
  ## Install
37
37
 
38
- Hermes manages its own Python environment. Install the plugin directly into it —
39
- do **not** use your system `pip` on macOS and some Linux distros it will be blocked by the OS.
40
-
41
- **If you installed Hermes via the official install script (`curl … | bash`):**
38
+ Install the plugin into the same Python environment that runs Hermes.
39
+ This prerelease requires Python 3.10 through 3.12, matching `atbash-sdk==0.4.3.dev0`.
42
40
 
43
41
  ```bash
44
- ~/.hermes/hermes-agent/venv/bin/pip3 install atbash-hermes-plugin
42
+ pip install --pre atbash-hermes-plugin==0.4.3.dev0
45
43
  ```
46
44
 
47
- **If you installed Hermes via `uv`:**
45
+ If Hermes is installed in a virtual environment, use that environment's Python:
48
46
 
49
47
  ```bash
50
- uv pip install --python ~/.hermes/hermes-agent/venv/bin/python atbash-hermes-plugin
48
+ /path/to/hermes/venv/bin/python -m pip install --pre atbash-hermes-plugin==0.4.3.dev0
51
49
  ```
52
50
 
53
- To install the latest dev release, add `--pre` (pip) or `--prerelease=allow` (uv):
54
-
55
- ```bash
56
- # pip
57
- ~/.hermes/hermes-agent/venv/bin/pip3 install --pre atbash-hermes-plugin
58
-
59
- # uv
60
- uv pip install --python ~/.hermes/hermes-agent/venv/bin/python --prerelease=allow atbash-hermes-plugin
61
- ```
62
-
63
- No further activation step is needed — Hermes discovers the plugin automatically on next start.
51
+ Maintainers: releases use clean staged source, live PyPI monotonic checks, and
52
+ Trusted Publishing. See [the release process](docs/release.md).
64
53
 
65
54
  ## Configure Atbash
66
55
 
@@ -70,10 +59,10 @@ The plugin needs an Atbash agent key. Configure either `ATBASH_KEY_PATH` or
70
59
  Recommended:
71
60
 
72
61
  ```bash
73
- ATBASH_KEY_PATH=~/.config/atbash/guard-client-key
62
+ ATBASH_KEY_PATH=$HOME/.config/atbash/guard-client-key
74
63
  ```
75
64
 
76
- Alternative (paste the key JSON directly):
65
+ Alternative:
77
66
 
78
67
  ```bash
79
68
  ATBASH_AGENT_PRIVKEY='{"pubkey":"...","privkey":"..."}'
@@ -81,7 +70,7 @@ ATBASH_AGENT_PRIVKEY='{"pubkey":"...","privkey":"..."}'
81
70
 
82
71
  ## Where To Set Environment Variables
83
72
 
84
- Hermes loads environment variables from `~/.hermes/.env`.
73
+ Hermes commonly loads environment variables from `~/.hermes/.env`.
85
74
 
86
75
  Create or edit that file:
87
76
 
@@ -92,7 +81,7 @@ nano ~/.hermes/.env
92
81
  Add:
93
82
 
94
83
  ```bash
95
- ATBASH_KEY_PATH=~/.config/atbash/guard-client-key
84
+ ATBASH_KEY_PATH=$HOME/.config/atbash/guard-client-key
96
85
  ATBASH_ENFORCE_DECISION=true
97
86
  ATBASH_DEBUG=false
98
87
  ATBASH_ORG_NAME=your-org-name
@@ -132,11 +121,7 @@ ATBASH_DEBUG=false
132
121
  ATBASH_ORG_NAME=your-org-name
133
122
 
134
123
  # Override where learned Hermes tool classifications are saved.
135
- ATBASH_TOOL_MAP_PATH=~/.config/atbash/hermes-tool-map.json
136
-
137
- # HTTP request timeout in seconds for judge API calls. Default: 60.
138
- # Raise this if you see "read operation timed out" errors on a slow endpoint.
139
- ATBASH_REQUEST_TIMEOUT=60
124
+ ATBASH_TOOL_MAP_PATH=$HOME/.config/atbash/hermes-tool-map.json
140
125
  ```
141
126
 
142
127
  ## Telemetry
@@ -154,13 +139,19 @@ printf '{"enabled": false}\n' > ~/.config/atbash/telemetry.json
154
139
 
155
140
  ## Enable Or Check The Plugin
156
141
 
157
- Hermes discovers the plugin automatically via Python entry points no manual
158
- enable step is needed. Restarting Hermes after installation is sufficient.
142
+ Hermes should discover installed Python packages that expose the
143
+ `hermes_agent.plugins` entry point.
159
144
 
160
- To confirm the package is installed in the right environment:
145
+ Check whether Hermes sees the plugin:
161
146
 
162
147
  ```bash
163
- ~/.hermes/hermes-agent/venv/bin/pip3 show atbash-hermes-plugin
148
+ hermes plugins list | grep atbash
149
+ ```
150
+
151
+ If needed, enable it:
152
+
153
+ ```bash
154
+ hermes plugins enable atbash-hermes-plugin
164
155
  ```
165
156
 
166
157
  ## Verify It Is Working
@@ -171,7 +162,7 @@ file or opening a website.
171
162
  In another terminal, watch the Hermes log:
172
163
 
173
164
  ```bash
174
- tail -f ~/.hermes/logs/agent.log | grep -i atbash
165
+ tail -f ~/.hermes/logs/agent.log
175
166
  ```
176
167
 
177
168
  With `ATBASH_DEBUG=true`, you should see lines similar to:
@@ -245,13 +236,21 @@ Hermes sessions.
245
236
 
246
237
  ## Verdict Behavior
247
238
 
248
- - `ALLOW`: the tool proceeds.
239
+ - `ALLOW` with `allow is True`: the tool proceeds. A missing `allow` flag is denied.
249
240
  - `HOLD`: the tool is blocked with a review message.
250
241
  - `BLOCK`, `DENY`, `REJECT`, `DISALLOW`: the tool is blocked.
251
242
  - Atbash API error:
252
243
  - `ATBASH_ENFORCE_DECISION=true`: fail closed and block.
253
244
  - `ATBASH_ENFORCE_DECISION=false`: fail open and allow.
254
245
 
246
+ Atbash ships fail-closed on every tier. Setting `ATBASH_ENFORCE_DECISION=false`
247
+ inverts that for this agent: a judge outage becomes a silent allow, and the
248
+ governance layer stops governing for as long as it lasts. That is supported, but
249
+ record a written risk acceptance in the deployment's security summary before
250
+ turning it off, so the trade-off is auditable after an incident rather than
251
+ discovered during one. See decision 0003 (fail-closed default) in the dashboard
252
+ repo.
253
+
255
254
  For `HOLD`, the user-facing block message is:
256
255
 
257
256
  ```text
@@ -266,24 +265,26 @@ user to retry after review, rather than automatically re-running the action.
266
265
 
267
266
  ## Troubleshooting
268
267
 
269
- If the plugin is not being picked up, confirm it is installed in the Hermes
270
- environment (not the system Python):
268
+ If Hermes does not show the plugin:
271
269
 
272
270
  ```bash
273
- ~/.hermes/hermes-agent/venv/bin/pip3 show atbash-hermes-plugin
271
+ hermes plugins list | grep atbash
272
+ python -m pip show atbash-hermes-plugin
274
273
  ```
275
274
 
276
- If Atbash verdicts are not appearing in logs, enable debug mode by adding this
277
- to `~/.hermes/.env`:
275
+ Make sure the package was installed into the same Python environment that runs
276
+ Hermes.
277
+
278
+ If Atbash verdicts are not appearing in logs:
278
279
 
279
280
  ```bash
280
281
  ATBASH_DEBUG=true
281
282
  ```
282
283
 
283
- Then restart Hermes and watch in a second terminal:
284
+ Then restart Hermes and watch:
284
285
 
285
286
  ```bash
286
- tail -f ~/.hermes/logs/agent.log | grep -i atbash
287
+ tail -f ~/.hermes/logs/agent.log
287
288
  ```
288
289
 
289
290
  If the plugin blocks everything with an unavailable-key or authentication error,
@@ -12,37 +12,26 @@ stopped before execution.
12
12
  - Intercepts Hermes tool calls through `pre_tool_call`.
13
13
  - Sends the tool name, arguments, command-like payload, session metadata, and
14
14
  inferred action class to Atbash.
15
- - Blocks tool execution on `BLOCK`, `DENY`, `REJECT`, or `DISALLOW`; holds it for operator review on `HOLD`.
15
+ - Blocks tool execution on `BLOCK`, `DENY`, `REJECT`, `DISALLOW`, or `HOLD`.
16
16
  - Persists learned Hermes tool classifications across sessions.
17
17
 
18
18
  ## Install
19
19
 
20
- Hermes manages its own Python environment. Install the plugin directly into it —
21
- do **not** use your system `pip` on macOS and some Linux distros it will be blocked by the OS.
22
-
23
- **If you installed Hermes via the official install script (`curl … | bash`):**
20
+ Install the plugin into the same Python environment that runs Hermes.
21
+ This prerelease requires Python 3.10 through 3.12, matching `atbash-sdk==0.4.3.dev0`.
24
22
 
25
23
  ```bash
26
- ~/.hermes/hermes-agent/venv/bin/pip3 install atbash-hermes-plugin
24
+ pip install --pre atbash-hermes-plugin==0.4.3.dev0
27
25
  ```
28
26
 
29
- **If you installed Hermes via `uv`:**
27
+ If Hermes is installed in a virtual environment, use that environment's Python:
30
28
 
31
29
  ```bash
32
- uv pip install --python ~/.hermes/hermes-agent/venv/bin/python atbash-hermes-plugin
30
+ /path/to/hermes/venv/bin/python -m pip install --pre atbash-hermes-plugin==0.4.3.dev0
33
31
  ```
34
32
 
35
- To install the latest dev release, add `--pre` (pip) or `--prerelease=allow` (uv):
36
-
37
- ```bash
38
- # pip
39
- ~/.hermes/hermes-agent/venv/bin/pip3 install --pre atbash-hermes-plugin
40
-
41
- # uv
42
- uv pip install --python ~/.hermes/hermes-agent/venv/bin/python --prerelease=allow atbash-hermes-plugin
43
- ```
44
-
45
- No further activation step is needed — Hermes discovers the plugin automatically on next start.
33
+ Maintainers: releases use clean staged source, live PyPI monotonic checks, and
34
+ Trusted Publishing. See [the release process](docs/release.md).
46
35
 
47
36
  ## Configure Atbash
48
37
 
@@ -52,10 +41,10 @@ The plugin needs an Atbash agent key. Configure either `ATBASH_KEY_PATH` or
52
41
  Recommended:
53
42
 
54
43
  ```bash
55
- ATBASH_KEY_PATH=~/.config/atbash/guard-client-key
44
+ ATBASH_KEY_PATH=$HOME/.config/atbash/guard-client-key
56
45
  ```
57
46
 
58
- Alternative (paste the key JSON directly):
47
+ Alternative:
59
48
 
60
49
  ```bash
61
50
  ATBASH_AGENT_PRIVKEY='{"pubkey":"...","privkey":"..."}'
@@ -63,7 +52,7 @@ ATBASH_AGENT_PRIVKEY='{"pubkey":"...","privkey":"..."}'
63
52
 
64
53
  ## Where To Set Environment Variables
65
54
 
66
- Hermes loads environment variables from `~/.hermes/.env`.
55
+ Hermes commonly loads environment variables from `~/.hermes/.env`.
67
56
 
68
57
  Create or edit that file:
69
58
 
@@ -74,7 +63,7 @@ nano ~/.hermes/.env
74
63
  Add:
75
64
 
76
65
  ```bash
77
- ATBASH_KEY_PATH=~/.config/atbash/guard-client-key
66
+ ATBASH_KEY_PATH=$HOME/.config/atbash/guard-client-key
78
67
  ATBASH_ENFORCE_DECISION=true
79
68
  ATBASH_DEBUG=false
80
69
  ATBASH_ORG_NAME=your-org-name
@@ -114,11 +103,7 @@ ATBASH_DEBUG=false
114
103
  ATBASH_ORG_NAME=your-org-name
115
104
 
116
105
  # Override where learned Hermes tool classifications are saved.
117
- ATBASH_TOOL_MAP_PATH=~/.config/atbash/hermes-tool-map.json
118
-
119
- # HTTP request timeout in seconds for judge API calls. Default: 60.
120
- # Raise this if you see "read operation timed out" errors on a slow endpoint.
121
- ATBASH_REQUEST_TIMEOUT=60
106
+ ATBASH_TOOL_MAP_PATH=$HOME/.config/atbash/hermes-tool-map.json
122
107
  ```
123
108
 
124
109
  ## Telemetry
@@ -136,13 +121,19 @@ printf '{"enabled": false}\n' > ~/.config/atbash/telemetry.json
136
121
 
137
122
  ## Enable Or Check The Plugin
138
123
 
139
- Hermes discovers the plugin automatically via Python entry points no manual
140
- enable step is needed. Restarting Hermes after installation is sufficient.
124
+ Hermes should discover installed Python packages that expose the
125
+ `hermes_agent.plugins` entry point.
141
126
 
142
- To confirm the package is installed in the right environment:
127
+ Check whether Hermes sees the plugin:
143
128
 
144
129
  ```bash
145
- ~/.hermes/hermes-agent/venv/bin/pip3 show atbash-hermes-plugin
130
+ hermes plugins list | grep atbash
131
+ ```
132
+
133
+ If needed, enable it:
134
+
135
+ ```bash
136
+ hermes plugins enable atbash-hermes-plugin
146
137
  ```
147
138
 
148
139
  ## Verify It Is Working
@@ -153,7 +144,7 @@ file or opening a website.
153
144
  In another terminal, watch the Hermes log:
154
145
 
155
146
  ```bash
156
- tail -f ~/.hermes/logs/agent.log | grep -i atbash
147
+ tail -f ~/.hermes/logs/agent.log
157
148
  ```
158
149
 
159
150
  With `ATBASH_DEBUG=true`, you should see lines similar to:
@@ -227,13 +218,21 @@ Hermes sessions.
227
218
 
228
219
  ## Verdict Behavior
229
220
 
230
- - `ALLOW`: the tool proceeds.
221
+ - `ALLOW` with `allow is True`: the tool proceeds. A missing `allow` flag is denied.
231
222
  - `HOLD`: the tool is blocked with a review message.
232
223
  - `BLOCK`, `DENY`, `REJECT`, `DISALLOW`: the tool is blocked.
233
224
  - Atbash API error:
234
225
  - `ATBASH_ENFORCE_DECISION=true`: fail closed and block.
235
226
  - `ATBASH_ENFORCE_DECISION=false`: fail open and allow.
236
227
 
228
+ Atbash ships fail-closed on every tier. Setting `ATBASH_ENFORCE_DECISION=false`
229
+ inverts that for this agent: a judge outage becomes a silent allow, and the
230
+ governance layer stops governing for as long as it lasts. That is supported, but
231
+ record a written risk acceptance in the deployment's security summary before
232
+ turning it off, so the trade-off is auditable after an incident rather than
233
+ discovered during one. See decision 0003 (fail-closed default) in the dashboard
234
+ repo.
235
+
237
236
  For `HOLD`, the user-facing block message is:
238
237
 
239
238
  ```text
@@ -248,24 +247,26 @@ user to retry after review, rather than automatically re-running the action.
248
247
 
249
248
  ## Troubleshooting
250
249
 
251
- If the plugin is not being picked up, confirm it is installed in the Hermes
252
- environment (not the system Python):
250
+ If Hermes does not show the plugin:
253
251
 
254
252
  ```bash
255
- ~/.hermes/hermes-agent/venv/bin/pip3 show atbash-hermes-plugin
253
+ hermes plugins list | grep atbash
254
+ python -m pip show atbash-hermes-plugin
256
255
  ```
257
256
 
258
- If Atbash verdicts are not appearing in logs, enable debug mode by adding this
259
- to `~/.hermes/.env`:
257
+ Make sure the package was installed into the same Python environment that runs
258
+ Hermes.
259
+
260
+ If Atbash verdicts are not appearing in logs:
260
261
 
261
262
  ```bash
262
263
  ATBASH_DEBUG=true
263
264
  ```
264
265
 
265
- Then restart Hermes and watch in a second terminal:
266
+ Then restart Hermes and watch:
266
267
 
267
268
  ```bash
268
- tail -f ~/.hermes/logs/agent.log | grep -i atbash
269
+ tail -f ~/.hermes/logs/agent.log
269
270
  ```
270
271
 
271
272
  If the plugin blocks everything with an unavailable-key or authentication error,