atbash-hermes-plugin 0.1.3.dev1__tar.gz → 0.1.3.dev2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atbash-hermes-plugin
3
- Version: 0.1.3.dev1
3
+ Version: 0.1.3.dev2
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.10
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
- Requires-Dist: atbash-sdk==0.1.3.dev0
13
+ Requires-Dist: atbash-sdk==0.1.3.dev2
14
14
  Dynamic: license-file
15
15
 
16
16
  # Atbash Hermes Plugin
@@ -35,13 +35,13 @@ stopped before execution.
35
35
  Install the plugin into the same Python environment that runs Hermes:
36
36
 
37
37
  ```bash
38
- pip install atbash-hermes-plugin
38
+ pip install atbash-hermes-plugin==0.1.3.dev2
39
39
  ```
40
40
 
41
41
  If Hermes is installed in a virtual environment, use that environment's Python:
42
42
 
43
43
  ```bash
44
- /path/to/hermes/venv/bin/python -m pip install atbash-hermes-plugin
44
+ /path/to/hermes/venv/bin/python -m pip install atbash-hermes-plugin==0.1.3.dev2
45
45
  ```
46
46
 
47
47
  ## Configure Atbash
@@ -228,8 +228,13 @@ For `HOLD`, the user-facing block message is:
228
228
  ```text
229
229
  Action held for operator review. The agent will not be jailed — please approve or reject this request from the Atbash dashboard, then ask the agent to try again.
230
230
  Reason: <original reason from judge>
231
+ Judgment ID: <held judgment id, when provided by the SDK>
231
232
  ```
232
233
 
234
+ After dashboard approval or rejection, the SDK can query held-action status with
235
+ the judgment ID. The Hermes plugin blocks the original tool call and asks the
236
+ user to retry after review, rather than automatically re-running the action.
237
+
233
238
  ## Troubleshooting
234
239
 
235
240
  If Hermes does not show the plugin:
@@ -20,13 +20,13 @@ stopped before execution.
20
20
  Install the plugin into the same Python environment that runs Hermes:
21
21
 
22
22
  ```bash
23
- pip install atbash-hermes-plugin
23
+ pip install atbash-hermes-plugin==0.1.3.dev2
24
24
  ```
25
25
 
26
26
  If Hermes is installed in a virtual environment, use that environment's Python:
27
27
 
28
28
  ```bash
29
- /path/to/hermes/venv/bin/python -m pip install atbash-hermes-plugin
29
+ /path/to/hermes/venv/bin/python -m pip install atbash-hermes-plugin==0.1.3.dev2
30
30
  ```
31
31
 
32
32
  ## Configure Atbash
@@ -213,8 +213,13 @@ For `HOLD`, the user-facing block message is:
213
213
  ```text
214
214
  Action held for operator review. The agent will not be jailed — please approve or reject this request from the Atbash dashboard, then ask the agent to try again.
215
215
  Reason: <original reason from judge>
216
+ Judgment ID: <held judgment id, when provided by the SDK>
216
217
  ```
217
218
 
219
+ After dashboard approval or rejection, the SDK can query held-action status with
220
+ the judgment ID. The Hermes plugin blocks the original tool call and asks the
221
+ user to retry after review, rather than automatically re-running the action.
222
+
218
223
  ## Troubleshooting
219
224
 
220
225
  If Hermes does not show the plugin:
@@ -142,6 +142,27 @@ def _extract_reason(raw: Any) -> str:
142
142
  return str(raw)
143
143
 
144
144
 
145
+ def _extract_judgment_id(raw: Any) -> str:
146
+ for attr in ("tool_call_id", "judgment_id", "id"):
147
+ value = getattr(raw, attr, None)
148
+ if isinstance(value, str) and value.strip():
149
+ return value.strip()
150
+
151
+ if isinstance(raw, dict):
152
+ for key in ("tool_call_id", "judgment_id", "id"):
153
+ value = raw.get(key)
154
+ if isinstance(value, str) and value.strip():
155
+ return value.strip()
156
+ return ""
157
+
158
+
159
+ def _format_hold_message(reason: str, judgment_id: str = "") -> str:
160
+ message = HOLD_MESSAGE.format(reason=reason)
161
+ if judgment_id:
162
+ message += f"\nJudgment ID: {judgment_id}"
163
+ return message
164
+
165
+
145
166
  def _safe_json_value(value: Any) -> Any:
146
167
  if value is None or isinstance(value, (str, int, float, bool)):
147
168
  return value
@@ -199,7 +220,7 @@ class AtbashHermesGuard:
199
220
  from atbash import Atbash # type: ignore
200
221
  from atbash.types import ToolCallInput # type: ignore
201
222
  except Exception:
202
- raise RuntimeError("atbash-sdk is required. Install with: pip install atbash-sdk==0.1.3.dev0") from e
223
+ raise RuntimeError("atbash-sdk is required. Install with: pip install atbash-sdk==0.1.3.dev2") from e
203
224
 
204
225
  self.ToolCallInput = ToolCallInput
205
226
  judge_cfg = self._judge_config()
@@ -325,10 +346,19 @@ class AtbashHermesGuard:
325
346
  reason = _extract_reason(verdict_raw)
326
347
 
327
348
  if self.debug:
328
- logger.info("Atbash verdict tool=%s verdict=%s reason=%s", tool_name, verdict, reason)
349
+ logger.info(
350
+ "Atbash verdict tool=%s verdict=%s reason=%s judgment_id=%s",
351
+ tool_name,
352
+ verdict,
353
+ reason,
354
+ _extract_judgment_id(verdict_raw),
355
+ )
329
356
 
330
357
  if verdict == "HOLD":
331
- hold_message = HOLD_MESSAGE.format(reason=reason)
358
+ hold_message = _format_hold_message(
359
+ reason,
360
+ _extract_judgment_id(verdict_raw),
361
+ )
332
362
  return {
333
363
  "action": "block",
334
364
  "message": hold_message,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atbash-hermes-plugin
3
- Version: 0.1.3.dev1
3
+ Version: 0.1.3.dev2
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.10
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
- Requires-Dist: atbash-sdk==0.1.3.dev0
13
+ Requires-Dist: atbash-sdk==0.1.3.dev2
14
14
  Dynamic: license-file
15
15
 
16
16
  # Atbash Hermes Plugin
@@ -35,13 +35,13 @@ stopped before execution.
35
35
  Install the plugin into the same Python environment that runs Hermes:
36
36
 
37
37
  ```bash
38
- pip install atbash-hermes-plugin
38
+ pip install atbash-hermes-plugin==0.1.3.dev2
39
39
  ```
40
40
 
41
41
  If Hermes is installed in a virtual environment, use that environment's Python:
42
42
 
43
43
  ```bash
44
- /path/to/hermes/venv/bin/python -m pip install atbash-hermes-plugin
44
+ /path/to/hermes/venv/bin/python -m pip install atbash-hermes-plugin==0.1.3.dev2
45
45
  ```
46
46
 
47
47
  ## Configure Atbash
@@ -228,8 +228,13 @@ For `HOLD`, the user-facing block message is:
228
228
  ```text
229
229
  Action held for operator review. The agent will not be jailed — please approve or reject this request from the Atbash dashboard, then ask the agent to try again.
230
230
  Reason: <original reason from judge>
231
+ Judgment ID: <held judgment id, when provided by the SDK>
231
232
  ```
232
233
 
234
+ After dashboard approval or rejection, the SDK can query held-action status with
235
+ the judgment ID. The Hermes plugin blocks the original tool call and asks the
236
+ user to retry after review, rather than automatically re-running the action.
237
+
233
238
  ## Troubleshooting
234
239
 
235
240
  If Hermes does not show the plugin:
@@ -0,0 +1 @@
1
+ atbash-sdk==0.1.3.dev2
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "atbash-hermes-plugin"
7
- version = "0.1.3.dev1"
7
+ version = "0.1.3.dev2"
8
8
  description = "Atbash safety plugin for Hermes Agent"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -24,7 +24,7 @@ keywords = [
24
24
  "policy"
25
25
  ]
26
26
  dependencies = [
27
- "atbash-sdk==0.1.3.dev0"
27
+ "atbash-sdk==0.1.3.dev2"
28
28
  ]
29
29
 
30
30
  [project.urls]
@@ -1 +0,0 @@
1
- atbash-sdk==0.1.3.dev0