atbash-hermes-plugin 0.4.15.dev0__tar.gz → 0.4.16__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 (18) hide show
  1. {atbash_hermes_plugin-0.4.15.dev0/atbash_hermes_plugin.egg-info → atbash_hermes_plugin-0.4.16}/PKG-INFO +2 -2
  2. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/atbash_hermes_plugin/__init__.py +19 -1
  3. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16/atbash_hermes_plugin.egg-info}/PKG-INFO +2 -2
  4. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/atbash_hermes_plugin.egg-info/requires.txt +1 -1
  5. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/plugin.yaml +1 -1
  6. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/pyproject.toml +2 -2
  7. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/LICENSE +0 -0
  8. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/MANIFEST.in +0 -0
  9. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/README.md +0 -0
  10. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/atbash_hermes_plugin.egg-info/SOURCES.txt +0 -0
  11. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/atbash_hermes_plugin.egg-info/dependency_links.txt +0 -0
  12. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/atbash_hermes_plugin.egg-info/entry_points.txt +0 -0
  13. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/atbash_hermes_plugin.egg-info/top_level.txt +0 -0
  14. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/setup.cfg +0 -0
  15. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/tests/test_memory_poisoning.py +0 -0
  16. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/tests/test_memory_write_fail_closed.py +0 -0
  17. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/tests/test_pre_tool_call_verdicts.py +0 -0
  18. {atbash_hermes_plugin-0.4.15.dev0 → atbash_hermes_plugin-0.4.16}/tests/test_release_contract.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atbash-hermes-plugin
3
- Version: 0.4.15.dev0
3
+ Version: 0.4.16
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.9.0.dev0
13
+ Requires-Dist: atbash-sdk==0.6.0
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
@@ -614,6 +614,19 @@ def _infer_action_class(tool_name: str) -> str:
614
614
  return "unknown"
615
615
 
616
616
 
617
+ def _parse_timeout(value: Optional[str]) -> Optional[float]:
618
+ if not value or not value.strip():
619
+ return None
620
+ try:
621
+ t = float(value.strip())
622
+ if t <= 0:
623
+ raise ValueError
624
+ return t
625
+ except ValueError:
626
+ logger.warning("ATBASH_JUDGE_TIMEOUT_S=%r is not a positive number; using SDK default", value)
627
+ return None
628
+
629
+
617
630
  def _as_bool(value: Optional[str], default: bool) -> bool:
618
631
  """Parse a boolean env var, refusing to guess.
619
632
 
@@ -792,6 +805,7 @@ class AtbashHermesGuard:
792
805
  self.key_path = os.getenv("ATBASH_KEY_PATH")
793
806
  self.privkey = os.getenv("ATBASH_AGENT_PRIVKEY")
794
807
  self.org_name = os.getenv("ATBASH_ORG_NAME")
808
+ self.judge_timeout: Optional[float] = _parse_timeout(os.getenv("ATBASH_JUDGE_TIMEOUT_S"))
795
809
  self.provider = os.getenv("HERMES_PROVIDER")
796
810
  self.model = os.getenv("HERMES_MODEL")
797
811
  self.tool_map_path = Path(
@@ -834,7 +848,7 @@ class AtbashHermesGuard:
834
848
  from atbash import Atbash # type: ignore
835
849
  from atbash.types import ToolCallInput # type: ignore
836
850
  except Exception:
837
- raise RuntimeError("atbash-sdk is required. Install with: pip install atbash-sdk==0.9.0.dev0") from e
851
+ raise RuntimeError("atbash-sdk is required. Install with: pip install atbash-sdk==0.6.0") from e
838
852
 
839
853
  self.ToolCallInput = ToolCallInput
840
854
  judge_cfg = self._judge_config()
@@ -847,6 +861,7 @@ class AtbashHermesGuard:
847
861
  judge=judge_cfg,
848
862
  org_name=self.org_name,
849
863
  fail_closed=self.fail_closed,
864
+ **({} if self.judge_timeout is None else {"timeout": self.judge_timeout}),
850
865
  )
851
866
  except TypeError:
852
867
  kwargs: Dict[str, Any] = {
@@ -857,6 +872,8 @@ class AtbashHermesGuard:
857
872
  kwargs["endpoint"] = self.endpoint
858
873
  if self.judge_verify_pubkey:
859
874
  kwargs["verify_pubkey"] = self.judge_verify_pubkey
875
+ if self.judge_timeout is not None:
876
+ kwargs["timeout"] = self.judge_timeout
860
877
  return Atbash(self.privkey, **kwargs)
861
878
 
862
879
  # Use SDK-native config loader for key file/env/config.
@@ -865,6 +882,7 @@ class AtbashHermesGuard:
865
882
  judge=judge_cfg,
866
883
  org_name=self.org_name,
867
884
  fail_closed=self.fail_closed,
885
+ **({} if self.judge_timeout is None else {"timeout": self.judge_timeout}),
868
886
  )
869
887
 
870
888
  def _judge_config(self) -> Optional[Dict[str, str]]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atbash-hermes-plugin
3
- Version: 0.4.15.dev0
3
+ Version: 0.4.16
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.9.0.dev0
13
+ Requires-Dist: atbash-sdk==0.6.0
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
@@ -1,4 +1,4 @@
1
- atbash-sdk==0.9.0.dev0
1
+ atbash-sdk==0.6.0
2
2
  httpx<1,>=0.27
3
3
  opentelemetry-exporter-otlp-proto-http<2,>=1.29
4
4
  opentelemetry-sdk<2,>=1.29
@@ -1,5 +1,5 @@
1
1
  name: atbash-hermes-plugin
2
- version: 0.4.15.dev0
2
+ version: 0.4.16
3
3
  description: Atbash guardrail plugin for Hermes Agent (pre-tool-call policy enforcement)
4
4
  author: Chromia
5
5
  entry: atbash_hermes_plugin
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "atbash-hermes-plugin"
7
- version = "0.4.15.dev0"
7
+ version = "0.4.16"
8
8
  description = "Atbash safety plugin for Hermes Agent"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9,<3.13"
@@ -24,7 +24,7 @@ keywords = [
24
24
  "policy"
25
25
  ]
26
26
  dependencies = [
27
- "atbash-sdk==0.9.0.dev0",
27
+ "atbash-sdk==0.6.0",
28
28
  "httpx>=0.27,<1",
29
29
  "opentelemetry-exporter-otlp-proto-http>=1.29,<2",
30
30
  "opentelemetry-sdk>=1.29,<2",