hyperplane-eval 0.1.8__tar.gz → 0.1.10__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 (74) hide show
  1. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/MANIFEST.in +1 -1
  2. {hyperplane_eval-0.1.8/hyperplane_eval.egg-info → hyperplane_eval-0.1.10}/PKG-INFO +3 -2
  3. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/README.md +2 -1
  4. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/evaluator.py +8 -5
  5. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/domain/dimensions/__init__.py +1 -1
  6. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/plane_evaluator.py +7 -0
  7. hyperplane_eval-0.1.10/hyperplane/framework/reporting/templates/report_template.html +988 -0
  8. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10/hyperplane_eval.egg-info}/PKG-INFO +3 -2
  9. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane_eval.egg-info/SOURCES.txt +1 -0
  10. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/setup.py +1 -1
  11. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/LICENSE +0 -0
  12. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/__init__.py +0 -0
  13. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/cli/__init__.py +0 -0
  14. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/cli/app.py +0 -0
  15. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/cli/llms/__init__.py +0 -0
  16. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/cli/llms/llm_client.py +0 -0
  17. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/cli/local_bindings/__init__.py +0 -0
  18. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/cli/local_bindings/executor.py +0 -0
  19. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/cli/local_bindings/scanner.py +0 -0
  20. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/cli/runners/__init__.py +0 -0
  21. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/cli/runners/agent_runner.py +0 -0
  22. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/__init__.py +0 -0
  23. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/config.py +0 -0
  24. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/domain/__init__.py +0 -0
  25. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/domain/dimensions/adversarial_features.json +0 -0
  26. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/domain/dimensions/conversational_features.json +0 -0
  27. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/domain/dimensions/prompt_feature.py +0 -0
  28. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/domain/vectors/__init__.py +0 -0
  29. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/domain/vectors/base.py +0 -0
  30. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/domain/vectors/evaluated.py +0 -0
  31. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/domain/vectors/executed.py +0 -0
  32. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/domain/vectors/synthesized.py +0 -0
  33. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/input_space/__init__.py +0 -0
  34. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/input_space/input_space.py +0 -0
  35. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/input_space/input_space_factory.py +0 -0
  36. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/orchestrator.py +0 -0
  37. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/reporting/__init__.py +0 -0
  38. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/reporting/analyser.py +0 -0
  39. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/reporting/templates/__init__.py +0 -0
  40. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/stages/__init__.py +0 -0
  41. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/stages/evaluator.py +0 -0
  42. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/stages/generator.py +0 -0
  43. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/framework/stages/navigator.py +0 -0
  44. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/__init__.py +0 -0
  45. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/llms/schema_prompt.txt +0 -0
  46. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/prompt_loader.py +0 -0
  47. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/reporting/__init__.py +0 -0
  48. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/reporting/dimension_mitigation.txt +0 -0
  49. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/reporting/vulnerability_patch.txt +0 -0
  50. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/__init__.py +0 -0
  51. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/creator/__init__.py +0 -0
  52. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/creator/anchors_sys.txt +0 -0
  53. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/creator/anchors_user.txt +0 -0
  54. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/creator/brainstorm_sys.txt +0 -0
  55. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/creator/brainstorm_user.txt +0 -0
  56. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/creator/refine_sys.txt +0 -0
  57. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/creator/refine_user.txt +0 -0
  58. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/evaluator/__init__.py +0 -0
  59. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/evaluator/judge.txt +0 -0
  60. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/generator/__init__.py +0 -0
  61. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/generator/continue_sys.txt +0 -0
  62. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/generator/continue_user.txt +0 -0
  63. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/generator/copyeditor_sys.txt +0 -0
  64. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/generator/copyeditor_user.txt +0 -0
  65. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/generator/eval_checks_sys.txt +0 -0
  66. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/generator/eval_checks_user.txt +0 -0
  67. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/generator/seed_sys.txt +0 -0
  68. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane/prompts/stages/generator/seed_user.txt +0 -0
  69. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane_eval.egg-info/dependency_links.txt +0 -0
  70. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane_eval.egg-info/entry_points.txt +0 -0
  71. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane_eval.egg-info/requires.txt +0 -0
  72. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/hyperplane_eval.egg-info/top_level.txt +0 -0
  73. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/requirements.txt +0 -0
  74. {hyperplane_eval-0.1.8 → hyperplane_eval-0.1.10}/setup.cfg +0 -0
@@ -3,4 +3,4 @@ include README.md
3
3
  include LICENSE
4
4
  recursive-include hyperplane/prompts *.txt
5
5
  recursive-include hyperplane/framework/domain *.json
6
- recursive-include hyperplane/reporting/templates *.html
6
+ recursive-include hyperplane/framework/reporting/templates *.html
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyperplane-eval
3
- Version: 0.1.8
3
+ Version: 0.1.10
4
4
  Summary: Local tool to evaluate AI agents and find their weak points.
5
5
  Author: Marten Panchev
6
6
  Author-email: marten@aquithm.com
@@ -110,7 +110,8 @@ evaluator = Evaluator(
110
110
  agent_desc="A helpful AI assistant",
111
111
  param_desc={"prompt": "The user input prompt"},
112
112
  target_callable=my_agent,
113
- llm_client=router
113
+ llm_client=router,
114
+ model_name="gpt-4o"
114
115
  )
115
116
 
116
117
  # 4. Add constraints and run
@@ -76,7 +76,8 @@ evaluator = Evaluator(
76
76
  agent_desc="A helpful AI assistant",
77
77
  param_desc={"prompt": "The user input prompt"},
78
78
  target_callable=my_agent,
79
- llm_client=router
79
+ llm_client=router,
80
+ model_name="gpt-4o"
80
81
  )
81
82
 
82
83
  # 4. Add constraints and run
@@ -21,6 +21,7 @@ class Evaluator:
21
21
  param_desc: dict,
22
22
  target_callable: Callable,
23
23
  llm_client: litellm.Router,
24
+ model_name: str,
24
25
  ):
25
26
  """
26
27
  Initialize the Evaluator.
@@ -35,6 +36,7 @@ class Evaluator:
35
36
  self.param_desc = param_desc
36
37
  self.target_callable = target_callable
37
38
  self.llm_client = llm_client
39
+ self.model_name = model_name
38
40
 
39
41
  def run(
40
42
  self,
@@ -83,9 +85,9 @@ class Evaluator:
83
85
 
84
86
  # 3. Resolve LLM configuration
85
87
  class RouterWrapper(LLMClient):
86
- def __init__(self, router):
88
+ def __init__(self, router, model_name):
87
89
  self.router = router
88
- self.model = "router"
90
+ self.model = model_name
89
91
  self._semaphore = asyncio.Semaphore(10)
90
92
 
91
93
  async def generate(
@@ -97,7 +99,7 @@ class Evaluator:
97
99
  prompt += "\n\n" + load_prompt("llms/schema_prompt", schema=schema_str)
98
100
 
99
101
  kwargs = {
100
- "model": "",
102
+ "model": self.model,
101
103
  "messages": [{"role": "user", "content": prompt}],
102
104
  "temperature": temperature,
103
105
  "response_format": {"type": "json_object"},
@@ -108,7 +110,7 @@ class Evaluator:
108
110
  except Exception as e:
109
111
  raise RuntimeError(f"LLM Server Error: {e}")
110
112
 
111
- llm_client_resolved = RouterWrapper(self.llm_client)
113
+ llm_client_resolved = RouterWrapper(self.llm_client, self.model_name)
112
114
 
113
115
  # 4. Setup Custom Execution Environment
114
116
  selected_func = {
@@ -122,7 +124,8 @@ class Evaluator:
122
124
  if asyncio.iscoroutinefunction(self.target_callable):
123
125
  res = await self.target_callable(**params)
124
126
  else:
125
- res = self.target_callable(**params)
127
+ import functools
128
+ res = await asyncio.to_thread(functools.partial(self.target_callable, **params))
126
129
 
127
130
  if not isinstance(res, str):
128
131
  res_str = json.dumps(res)
@@ -1,3 +1,3 @@
1
1
  from .prompt_feature import PromptFeature
2
2
 
3
- __all__ = ["PromptFeature"]
3
+ __all__ = ["PromptFeature"]
@@ -94,6 +94,13 @@ class PlaneEvaluator:
94
94
  if vector.id in self.active_scenarios:
95
95
  del self.active_scenarios[vector.id]
96
96
  self.update_dashboard()
97
+
98
+ if self.generator.discard_count > max(10, self.target):
99
+ print(f"\n[Fatal Error] Target agent has crashed {self.generator.discard_count} times. Aborting to prevent infinite stall. Last error: {agent_output}", file=sys.stderr)
100
+ self.stop_event.set()
101
+ self.synth_queue.task_done()
102
+ break
103
+
97
104
  await self.coord_queue.put(self.navigator.get_next_point())
98
105
  self.synth_queue.task_done()
99
106
  continue