hackagent 0.12.0__tar.gz → 0.13.1__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.
- {hackagent-0.12.0 → hackagent-0.13.1}/.gitignore +4 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/PKG-INFO +13 -6
- {hackagent-0.12.0 → hackagent-0.13.1}/README.md +8 -2
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/agent.py +4 -1
- hackagent-0.13.1/hackagent/async_utils.py +29 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/__init__.py +12 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/evaluator/base.py +162 -49
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/evaluator/evaluation_step.py +94 -37
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/evaluator/inline_step_judge.py +14 -16
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/evaluator/judge_evaluators.py +23 -18
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/evaluator/metrics.py +4 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/generator/templates.py +39 -9
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/orchestrator.py +152 -89
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/registry.py +4 -0
- hackagent-0.13.1/hackagent/attacks/shared/embedding_utils.py +145 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/shared/router_factory.py +5 -1
- hackagent-0.13.1/hackagent/attacks/taxonomy.py +185 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/advprefix/attack.py +5 -5
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/advprefix/config.py +8 -4
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/advprefix/generate.py +13 -13
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/autodan_turbo/attack.py +4 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/autodan_turbo/config.py +7 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/autodan_turbo/core.py +71 -40
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/autodan_turbo/lifelong.py +5 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/autodan_turbo/strategy_library.py +109 -168
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/autodan_turbo/warm_up.py +5 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/baseline/attack.py +1 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/bon/attack.py +2 -2
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/cipherchat/attack.py +1 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/config.py +43 -4
- hackagent-0.13.1/hackagent/attacks/techniques/crescendo/__init__.py +19 -0
- hackagent-0.13.1/hackagent/attacks/techniques/crescendo/attack.py +906 -0
- hackagent-0.13.1/hackagent/attacks/techniques/crescendo/config.py +116 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/fc/attack.py +2 -2
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/flipattack/attack.py +1 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/h4rm3l/attack.py +1 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/indirect_prompt_injection/attack.py +12 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/mml/attack.py +1 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/pair/attack.py +26 -7
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/pap/attack.py +2 -2
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/pap/generation.py +8 -12
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/rag/attack.py +19 -10
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/static_template/attack.py +8 -2
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/static_template/config.py +52 -5
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/static_template/generation.py +9 -2
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/tap/attack.py +2 -2
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/attack/catalog.py +11 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/attack/display.py +21 -4
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/attack/info.py +27 -3
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/attack/strategies.py +10 -2
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/config.py +27 -42
- hackagent-0.13.1/hackagent/cli/commands/web.py +213 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/config.py +54 -29
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/help_page.py +2 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/main.py +4 -5
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/__init__.py +2 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/registry.py +9 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/__init__.py +2 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/advprefix.py +3 -3
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/cipherchat.py +2 -2
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/pap.py +2 -2
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/types.py +25 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/attacks/form.py +31 -9
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/attacks/helpers.py +43 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/attacks/layout.py +13 -15
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/attacks/runner.py +4 -3
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/attacks/tab.py +2 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/config.py +25 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/google_adk/jailbreak_eval/hack.py +4 -3
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/google_adk/multi_tool_agent/hack.py +1 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/langchain/rag/hack.py +2 -2
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/litellm_multi_provider/demo.py +1 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/ollama/hack.py +1 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/multi_judge/run_flipattack_multi_judge.py +1 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/quick_evaluation/run_h4rm3l.py +1 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/vllm/hack.py +5 -5
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/discovery/scanner.py +9 -3
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/router.py +439 -1
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/tracking/coordinator.py +32 -4
- hackagent-0.13.1/hackagent/server/storage/buckets.py +37 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/storage/local.py +2 -3
- hackagent-0.13.1/hackagent/server/webui/__init__.py +182 -0
- hackagent-0.13.1/hackagent/server/webui/_local_api.py +326 -0
- hackagent-0.13.1/hackagent/server/webui/_proxy.py +105 -0
- hackagent-0.13.1/hackagent/server/webui/_serializers.py +234 -0
- hackagent-0.13.1/hackagent/server/webui/_static.py +86 -0
- hackagent-0.13.1/hackagent/server/webui/static/.gitignore +4 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/pyproject.toml +22 -3
- hackagent-0.12.0/hackagent/cli/commands/web.py +0 -150
- hackagent-0.12.0/hackagent/server/dashboard/__init__.py +0 -23
- hackagent-0.12.0/hackagent/server/dashboard/_analysis_data_mixin.py +0 -716
- hackagent-0.12.0/hackagent/server/dashboard/_api.py +0 -210
- hackagent-0.12.0/hackagent/server/dashboard/_attack_builder_mixin.py +0 -558
- hackagent-0.12.0/hackagent/server/dashboard/_builder_config.py +0 -271
- hackagent-0.12.0/hackagent/server/dashboard/_components.py +0 -305
- hackagent-0.12.0/hackagent/server/dashboard/_constants.py +0 -22
- hackagent-0.12.0/hackagent/server/dashboard/_data_mixin.py +0 -802
- hackagent-0.12.0/hackagent/server/dashboard/_helpers.py +0 -137
- hackagent-0.12.0/hackagent/server/dashboard/_layout_mixin.py +0 -846
- hackagent-0.12.0/hackagent/server/dashboard/_page.py +0 -279
- hackagent-0.12.0/hackagent/server/dashboard/_reports_mixin.py +0 -991
- hackagent-0.12.0/hackagent/server/dashboard/_result_detail_mixin.py +0 -808
- hackagent-0.12.0/hackagent/server/dashboard/_run_history_results_mixin.py +0 -1494
- hackagent-0.12.0/hackagent/server/dashboard/_run_results_mixin.py +0 -1284
- hackagent-0.12.0/hackagent/server/dashboard/_runs_mixin.py +0 -991
- hackagent-0.12.0/hackagent/server/dashboard/_tap_trace_mixin.py +0 -723
- hackagent-0.12.0/hackagent/server/dashboard/_trace_analysis_mixin.py +0 -576
- hackagent-0.12.0/hackagent/server/dashboard/_trace_render_mixin.py +0 -1295
- hackagent-0.12.0/hackagent/server/dashboard/app.py +0 -75
- hackagent-0.12.0/hackagent/server/dashboard/attack_cards/__init__.py +0 -21
- hackagent-0.12.0/hackagent/server/dashboard/attack_cards/_advprefix.py +0 -496
- hackagent-0.12.0/hackagent/server/dashboard/attack_cards/_autodan.py +0 -503
- hackagent-0.12.0/hackagent/server/dashboard/attack_cards/_bon.py +0 -318
- hackagent-0.12.0/hackagent/server/dashboard/attack_cards/_fc.py +0 -268
- hackagent-0.12.0/hackagent/server/dashboard/attack_cards/_generic.py +0 -176
- hackagent-0.12.0/hackagent/server/dashboard/attack_cards/_mml.py +0 -245
- hackagent-0.12.0/hackagent/server/dashboard/attack_cards/_pair.py +0 -284
- hackagent-0.12.0/hackagent/server/dashboard/attack_cards/_pap.py +0 -235
- hackagent-0.12.0/hackagent/server/dashboard/attack_cards/_shared.py +0 -496
- hackagent-0.12.0/hackagent/server/dashboard/attack_cards/_static_template.py +0 -350
- hackagent-0.12.0/hackagent/server/dashboard/attack_cards/_tap.py +0 -404
- hackagent-0.12.0/hackagent/server/dashboard/attack_cards/_tfc.py +0 -209
- hackagent-0.12.0/hackagent/server/dashboard/templates/index.html +0 -1288
- {hackagent-0.12.0 → hackagent-0.13.1}/LICENSE +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/_version.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/base.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/evaluator/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/evaluator/pattern_evaluators.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/evaluator/sync.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/generator/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/objectives/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/objectives/base.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/objectives/harmful_behavior.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/objectives/jailbreak.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/objectives/policy_violation.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/objectives/rag.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/shared/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/shared/guardrail.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/shared/progress.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/shared/prompt_parser.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/shared/response_utils.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/shared/translation.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/shared/tui.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/shared/utils.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/advprefix/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/advprefix/completions.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/advprefix/eval_pipeline.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/advprefix/utils.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/autodan_turbo/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/autodan_turbo/autodan_eval.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/autodan_turbo/dashboard_tracing.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/autodan_turbo/log_styles.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/autodan_turbo/summarizer.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/base.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/baseline/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/baseline/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/baseline/generation.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/bon/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/bon/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/bon/generation.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/cipherchat/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/cipherchat/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/cipherchat/encode_experts.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/cipherchat/generation.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/cipherchat/prompts_and_demonstrations.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/fc/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/fc/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/fc/flowchart_renderer.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/fc/generation.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/fc/prompts.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/flipattack/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/flipattack/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/flipattack/generation.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/h4rm3l/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/h4rm3l/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/h4rm3l/decorators.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/h4rm3l/generation.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/indirect_prompt_injection/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/mml/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/mml/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/mml/generation.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/mml/image_encoder.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/mml/prompts.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/pair/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/pair/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/pap/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/pap/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/pap/taxonomy.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/rag/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/rag/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/rag/jailbreak.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/static_template/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/static_template/static_eval.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/tap/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/tap/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/tap/generation.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/techniques/tap/tap_evaluation.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/attacks/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/bootstrap.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/agent.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/attack/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/attack/chain.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/attack/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/attack/group.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/attack/options.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/attack/runner.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/claude.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/codex.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/datasets.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/examples.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/results.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/scan/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/scan/command.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/scan/helpers.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/commands/scan/quick.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/app.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/autodan_turbo.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/baseline.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/bon.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/fc.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/flipattack.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/h4rm3l.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/mml.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/pair.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/static_template.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/tap.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/attack_specs/specs/tfc.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/base.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/events.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/logger.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/theme.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/agents.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/attacks/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/attacks/executor.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/results/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/results/details.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/results/export.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/results/formatters/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/results/formatters/datetimes.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/results/formatters/http.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/results/formatters/run_report.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/results/formatters/summaries.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/results/formatters/text.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/results/formatters/traces.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/results/tab.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/views/results/table.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/widgets/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/widgets/actions.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/widgets/clipboard.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/tui/widgets/logs.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/cli/utils.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/datasets/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/datasets/base.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/datasets/intents.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/datasets/omnisafebench/dataset.json +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/datasets/presets.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/datasets/providers/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/datasets/providers/file.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/datasets/providers/huggingface.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/datasets/providers/url_json.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/datasets/registry.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/errors.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/claude/README.md +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/claude/hack_claude.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/claude/hack_ollama.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/codex/README.md +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/codex/hack_codex.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/codex/hack_ollama.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/google_adk/jailbreak_eval/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/google_adk/jailbreak_eval/agent.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/google_adk/multi_tool_agent/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/google_adk/multi_tool_agent/agent.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/hermes/README.md +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/hermes/hack_hermes.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/langchain/rag/README.md +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/langchain/rag/agent_client.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/langchain/rag/agent_server.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/langchain/rag/ingest.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/langchain/rag/policies.pdf +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/langchain/rag/read_db.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/litellm_multi_provider/README.md +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/litellm_multi_provider/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/ollama/demo.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/ollama/local.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/db_tool_sandbox/README.md +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/db_tool_sandbox/agent.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/db_tool_sandbox/hack.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/db_tool_sandbox/sandbox.db +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/multi_judge/README.md +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/pc_tool_sandbox/README.md +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/pc_tool_sandbox/agent.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/pc_tool_sandbox/confidential/db_credentials.txt +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/pc_tool_sandbox/hack.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/quick_evaluation/README.md +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/rag/README.md +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/rag/agent_server.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/rag/hack.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/rag/ingest.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/openai_sdk/rag/policies.pdf +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/rag/.gitignore +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/rag/test_data/gender_studies_overview.txt +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/rag/test_indirect_injection.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/web/README.md +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/web/hack.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/examples/web/plan.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/logger.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/base.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/craft_adversarial_data/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/craft_adversarial_data/profile.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/craft_adversarial_data/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/craft_adversarial_data/vulnerabilities.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/credential_exposure/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/credential_exposure/profile.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/credential_exposure/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/credential_exposure/vulnerabilities.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/excessive_agency/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/excessive_agency/profile.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/excessive_agency/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/excessive_agency/vulnerabilities.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/input_manipulation_attack/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/input_manipulation_attack/profile.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/input_manipulation_attack/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/input_manipulation_attack/vulnerabilities.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/jailbreak/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/jailbreak/profile.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/jailbreak/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/jailbreak/vulnerabilities.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/malicious_tool_invocation/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/malicious_tool_invocation/profile.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/malicious_tool_invocation/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/malicious_tool_invocation/vulnerabilities.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/misinformation/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/misinformation/profile.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/misinformation/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/misinformation/vulnerabilities.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/model_evasion/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/model_evasion/profile.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/model_evasion/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/model_evasion/vulnerabilities.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/profile_helpers.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/profile_types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/prompt_injection/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/prompt_injection/profile.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/prompt_injection/templates.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/prompt_injection/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/prompt_injection/vulnerabilities.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/public_facing_application_exploitation/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/public_facing_application_exploitation/profile.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/public_facing_application_exploitation/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/public_facing_application_exploitation/vulnerabilities.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/registry.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/sensitive_information_disclosure/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/sensitive_information_disclosure/profile.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/sensitive_information_disclosure/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/sensitive_information_disclosure/vulnerabilities.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/system_prompt_leakage/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/system_prompt_leakage/profile.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/system_prompt_leakage/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/system_prompt_leakage/vulnerabilities.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/utils.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/vector_embedding_weaknesses_exploit/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/vector_embedding_weaknesses_exploit/profile.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/vector_embedding_weaknesses_exploit/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/risks/vector_embedding_weaknesses_exploit/vulnerabilities.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/_chat_registration.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/agent.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/discovery/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/discovery/browser.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/envelope.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/provider_config.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/providers/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/providers/adk.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/providers/claude.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/providers/codex.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/providers/hermes.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/providers/web.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/tracking/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/tracking/audit.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/tracking/category_classifier.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/tracking/context.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/tracking/decorators.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/tracking/step.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/tracking/tracker.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/tracking/utils.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/tracking_logger.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/router/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/agent/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/agent/agent_create.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/agent/agent_destroy.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/agent/agent_list.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/agent/agent_partial_update.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/agent/agent_retrieve.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/agent/agent_update.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/apilogs/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/apilogs/apilogs_list.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/apilogs/apilogs_retrieve.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/apilogs/apilogs_summary_retrieve.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/attack/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/attack/attack_create.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/attack/attack_destroy.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/attack/attack_list.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/attack/attack_partial_update.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/attack/attack_retrieve.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/attack/attack_update.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/checkout/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/checkout/checkout_create.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/generate/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/generate/v1_chat_completions_create.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/judge/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/judge/judge_create.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/key/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/key/key_context_retrieve.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/key/key_create.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/key/key_destroy.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/key/key_list.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/key/key_retrieve.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/models.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/organization/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/organization/organization_create.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/organization/organization_destroy.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/organization/organization_list.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/organization/organization_me_retrieve.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/organization/organization_partial_update.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/organization/organization_retrieve.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/organization/organization_update.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/result/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/result/result_create.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/result/result_destroy.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/result/result_list.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/result/result_partial_update.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/result/result_retrieve.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/result/result_trace_create.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/result/result_update.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/run/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/run/run_create.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/run/run_destroy.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/run/run_list.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/run/run_partial_update.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/run/run_result_create.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/run/run_retrieve.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/run/run_run_tests_create.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/run/run_update.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/scripts/generate.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/scripts/generate.sh +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/scripts/openapi-python-client.yaml +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/user/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/user/user_create.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/user/user_destroy.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/user/user_list.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/user/user_me_retrieve.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/user/user_me_update.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/user/user_partial_update.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/user/user_retrieve.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/api/user/user_update.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/client.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/errors.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/storage/__init__.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/storage/base.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/storage/enums.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/storage/remote.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/server/types.py +0 -0
- {hackagent-0.12.0 → hackagent-0.13.1}/hackagent/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: hackagent
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.1
|
|
4
4
|
Summary: HackAgent is an open-source security toolkit to detect vulnerabilities of your AI Agents.
|
|
5
5
|
Author-email: AI Security Lab <ais@ai4i.it>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -18,10 +18,9 @@ Requires-Python: >=3.10
|
|
|
18
18
|
Requires-Dist: click>=8.1.0
|
|
19
19
|
Requires-Dist: datasets>=2.14.0
|
|
20
20
|
Requires-Dist: faiss-cpu>=1.13.2
|
|
21
|
-
Requires-Dist: flask>=3.1.
|
|
21
|
+
Requires-Dist: flask>=3.1.3
|
|
22
22
|
Requires-Dist: httpx>=0.27.0
|
|
23
23
|
Requires-Dist: litellm>=1.69.2
|
|
24
|
-
Requires-Dist: nicegui>=2.0
|
|
25
24
|
Requires-Dist: openai>=1.0.0
|
|
26
25
|
Requires-Dist: pillow>=10.0.0
|
|
27
26
|
Requires-Dist: playwright>=1.40
|
|
@@ -30,6 +29,8 @@ Requires-Dist: python-dateutil>=2.8.0
|
|
|
30
29
|
Requires-Dist: pyyaml>=6.0.0
|
|
31
30
|
Requires-Dist: rich>=14.0.0
|
|
32
31
|
Requires-Dist: textual>=1.0.0
|
|
32
|
+
Provides-Extra: web
|
|
33
|
+
Requires-Dist: hackagent-webui<1.0,>=0.2; extra == 'web'
|
|
33
34
|
Description-Content-Type: text/markdown
|
|
34
35
|
|
|
35
36
|
<div align="center">
|
|
@@ -139,14 +140,20 @@ HackAgent uses a modular pipeline to test agent robustness end-to-end.
|
|
|
139
140
|
|
|
140
141
|
HackAgent supports both local and remote reporting.
|
|
141
142
|
|
|
142
|
-
- Local mode stores test results in SQLite
|
|
143
|
+
- Local mode stores test results in SQLite, readable offline.
|
|
143
144
|
- Cloud mode syncs runs to the HackAgent remote platform when an API key is configured.
|
|
144
145
|
|
|
146
|
+
`hackagent web` serves the HackAgent dashboard — the same app as
|
|
147
|
+
[app.hackagent.dev](https://app.hackagent.dev) — from your own machine, against
|
|
148
|
+
your cloud data when an API key is configured and against the local SQLite
|
|
149
|
+
database (read-only) when it is not. Your API key stays in the CLI process and
|
|
150
|
+
is never exposed to the browser.
|
|
151
|
+
|
|
145
152
|
```bash
|
|
146
153
|
hackagent web
|
|
147
154
|
```
|
|
148
155
|
|
|
149
|
-
|
|
156
|
+
Install it with `pip install 'hackagent[web]'`; see the [web command docs](docs/docs/cli/web.md) for modes and options.
|
|
150
157
|
|
|
151
158
|
## Responsible Use
|
|
152
159
|
|
|
@@ -105,14 +105,20 @@ HackAgent uses a modular pipeline to test agent robustness end-to-end.
|
|
|
105
105
|
|
|
106
106
|
HackAgent supports both local and remote reporting.
|
|
107
107
|
|
|
108
|
-
- Local mode stores test results in SQLite
|
|
108
|
+
- Local mode stores test results in SQLite, readable offline.
|
|
109
109
|
- Cloud mode syncs runs to the HackAgent remote platform when an API key is configured.
|
|
110
110
|
|
|
111
|
+
`hackagent web` serves the HackAgent dashboard — the same app as
|
|
112
|
+
[app.hackagent.dev](https://app.hackagent.dev) — from your own machine, against
|
|
113
|
+
your cloud data when an API key is configured and against the local SQLite
|
|
114
|
+
database (read-only) when it is not. Your API key stays in the CLI process and
|
|
115
|
+
is never exposed to the browser.
|
|
116
|
+
|
|
111
117
|
```bash
|
|
112
118
|
hackagent web
|
|
113
119
|
```
|
|
114
120
|
|
|
115
|
-
|
|
121
|
+
Install it with `pip install 'hackagent[web]'`; see the [web command docs](docs/docs/cli/web.md) for modes and options.
|
|
116
122
|
|
|
117
123
|
## Responsible Use
|
|
118
124
|
|
|
@@ -5,6 +5,7 @@ from hackagent.logger import get_logger
|
|
|
5
5
|
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
|
|
6
6
|
|
|
7
7
|
from hackagent import utils
|
|
8
|
+
from hackagent.config import resolve_remote_base_url
|
|
8
9
|
from hackagent.errors import HackAgentError
|
|
9
10
|
from hackagent.router import AgentRouter
|
|
10
11
|
from hackagent.router.types import AgentTypeEnum
|
|
@@ -129,7 +130,7 @@ class HackAgent:
|
|
|
129
130
|
from hackagent.server.client import AuthenticatedClient
|
|
130
131
|
from hackagent.server.storage.remote import RemoteBackend
|
|
131
132
|
|
|
132
|
-
_base_url = base_url or
|
|
133
|
+
_base_url = base_url or resolve_remote_base_url()
|
|
133
134
|
_client = AuthenticatedClient(
|
|
134
135
|
base_url=_base_url,
|
|
135
136
|
token=resolved_auth_token,
|
|
@@ -222,6 +223,7 @@ class HackAgent:
|
|
|
222
223
|
StaticTemplateOrchestrator,
|
|
223
224
|
BoNOrchestrator,
|
|
224
225
|
CipherChatOrchestrator,
|
|
226
|
+
CrescendoOrchestrator,
|
|
225
227
|
FCOrchestrator,
|
|
226
228
|
tFCOrchestrator,
|
|
227
229
|
H4rm3lOrchestrator,
|
|
@@ -240,6 +242,7 @@ class HackAgent:
|
|
|
240
242
|
"static_template": StaticTemplateOrchestrator(hackagent_agent=self),
|
|
241
243
|
"bon": BoNOrchestrator(hackagent_agent=self),
|
|
242
244
|
"cipherchat": CipherChatOrchestrator(hackagent_agent=self),
|
|
245
|
+
"crescendo": CrescendoOrchestrator(hackagent_agent=self),
|
|
243
246
|
"fc": FCOrchestrator(hackagent_agent=self),
|
|
244
247
|
"tfc": tFCOrchestrator(hackagent_agent=self),
|
|
245
248
|
"pair": PAIROrchestrator(hackagent_agent=self),
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Copyright 2026 - AI4I. All rights reserved.
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
"""Small shared helpers for bridging synchronous APIs to asyncio internals."""
|
|
5
|
+
|
|
6
|
+
import asyncio
|
|
7
|
+
from typing import Awaitable, Callable, TypeVar
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def run_coroutine_blocking(coro_factory: Callable[[], Awaitable[T]]) -> T:
|
|
13
|
+
"""Run a coroutine factory from synchronous code safely.
|
|
14
|
+
|
|
15
|
+
Uses ``asyncio.run`` directly when no event loop is running yet (the
|
|
16
|
+
common case for a synchronous public API). ``asyncio.run`` cannot be
|
|
17
|
+
nested, so when called from inside an already-running loop (e.g.
|
|
18
|
+
notebooks, async callers) a dedicated bridge thread runs its own loop
|
|
19
|
+
instead, giving synchronous callers the same behavior either way.
|
|
20
|
+
"""
|
|
21
|
+
try:
|
|
22
|
+
asyncio.get_running_loop()
|
|
23
|
+
except RuntimeError:
|
|
24
|
+
return asyncio.run(coro_factory())
|
|
25
|
+
|
|
26
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
27
|
+
|
|
28
|
+
with ThreadPoolExecutor(max_workers=1) as pool:
|
|
29
|
+
return pool.submit(lambda: asyncio.run(coro_factory())).result()
|
|
@@ -41,9 +41,20 @@ from .registry import (
|
|
|
41
41
|
FlipAttackOrchestrator,
|
|
42
42
|
TAPOrchestrator,
|
|
43
43
|
)
|
|
44
|
+
from .taxonomy import (
|
|
45
|
+
ATTACK_TAXONOMY,
|
|
46
|
+
AttackCategory,
|
|
47
|
+
AttackTag,
|
|
48
|
+
AttackTaxonomy,
|
|
49
|
+
get_attack_taxonomy,
|
|
50
|
+
)
|
|
44
51
|
|
|
45
52
|
__all__ = [
|
|
46
53
|
"ATTACK_REGISTRY",
|
|
54
|
+
"ATTACK_TAXONOMY",
|
|
55
|
+
"AttackCategory",
|
|
56
|
+
"AttackTag",
|
|
57
|
+
"AttackTaxonomy",
|
|
47
58
|
"AdvPrefixOrchestrator",
|
|
48
59
|
"AutoDANTurboOrchestrator",
|
|
49
60
|
"BaselineOrchestrator",
|
|
@@ -52,4 +63,5 @@ __all__ = [
|
|
|
52
63
|
"PAIROrchestrator",
|
|
53
64
|
"FlipAttackOrchestrator",
|
|
54
65
|
"TAPOrchestrator",
|
|
66
|
+
"get_attack_taxonomy",
|
|
55
67
|
]
|
|
@@ -24,14 +24,15 @@ Usage:
|
|
|
24
24
|
)
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
|
+
import asyncio
|
|
28
|
+
import inspect
|
|
27
29
|
import logging
|
|
28
30
|
import re
|
|
29
|
-
import threading
|
|
30
31
|
from abc import ABC, abstractmethod
|
|
31
|
-
from concurrent.futures import ThreadPoolExecutor
|
|
32
32
|
from dataclasses import dataclass
|
|
33
33
|
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple
|
|
34
34
|
|
|
35
|
+
from hackagent.async_utils import run_coroutine_blocking
|
|
35
36
|
from hackagent.attacks.shared.progress import create_progress_bar
|
|
36
37
|
from hackagent.attacks.shared.router_factory import create_router
|
|
37
38
|
from hackagent.server.client import AuthenticatedClient
|
|
@@ -443,13 +444,16 @@ class BaseJudgeEvaluator(ABC):
|
|
|
443
444
|
)
|
|
444
445
|
|
|
445
446
|
# ── Parallel judge evaluation ──────────────────────────────────────
|
|
446
|
-
#
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
447
|
+
# Judge requests are independent, so use lightweight cooperative tasks
|
|
448
|
+
# rather than one OS thread per in-flight request.
|
|
449
|
+
raw_concurrency = getattr(self.config, "judge_concurrency", 10)
|
|
450
|
+
try:
|
|
451
|
+
judge_concurrency = max(1, int(raw_concurrency))
|
|
452
|
+
except (TypeError, ValueError):
|
|
453
|
+
judge_concurrency = 10
|
|
450
454
|
results_map: Dict[int, tuple] = {}
|
|
451
455
|
|
|
452
|
-
def
|
|
456
|
+
async def _process_row_async(idx_row: tuple) -> tuple:
|
|
453
457
|
idx, row = idx_row
|
|
454
458
|
import time as _time
|
|
455
459
|
|
|
@@ -465,7 +469,7 @@ class BaseJudgeEvaluator(ABC):
|
|
|
465
469
|
current_eval,
|
|
466
470
|
current_expl,
|
|
467
471
|
current_raw_response,
|
|
468
|
-
) = self.
|
|
472
|
+
) = await self._request_with_assertions_async(
|
|
469
473
|
request_data=request_data,
|
|
470
474
|
original_index=original_index,
|
|
471
475
|
max_retries=max_retries,
|
|
@@ -481,58 +485,69 @@ class BaseJudgeEvaluator(ABC):
|
|
|
481
485
|
)
|
|
482
486
|
finally:
|
|
483
487
|
_eval_elapsed = round(_time.perf_counter() - _t0, 3)
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
488
|
+
if self._tracker and request_data is not None:
|
|
489
|
+
goal = row.get("goal", "")
|
|
490
|
+
if goal:
|
|
491
|
+
goal_ctx = self._tracker.get_goal_context_by_goal(goal)
|
|
492
|
+
if goal_ctx:
|
|
493
|
+
self._tracker.add_evaluation_trace(
|
|
494
|
+
ctx=goal_ctx,
|
|
495
|
+
evaluation_result={
|
|
496
|
+
"score": current_eval,
|
|
497
|
+
"explanation": current_expl,
|
|
498
|
+
},
|
|
499
|
+
score=(
|
|
500
|
+
float(current_eval)
|
|
501
|
+
if isinstance(current_eval, (int, float))
|
|
502
|
+
else 0.0
|
|
503
|
+
),
|
|
504
|
+
explanation=current_expl,
|
|
505
|
+
evaluator_name=self.__class__.__name__,
|
|
506
|
+
metadata={
|
|
507
|
+
"prefix": row.get("prefix", ""),
|
|
508
|
+
"completion": (
|
|
509
|
+
row.get("completion", "")
|
|
510
|
+
if row.get("completion")
|
|
511
|
+
else None
|
|
500
512
|
),
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
"completion": (
|
|
506
|
-
row.get("completion", "")
|
|
507
|
-
if row.get("completion")
|
|
508
|
-
else None
|
|
509
|
-
),
|
|
510
|
-
"judge_model": self.config.model_id,
|
|
511
|
-
"elapsed_s": _eval_elapsed,
|
|
512
|
-
},
|
|
513
|
-
)
|
|
513
|
+
"judge_model": self.config.model_id,
|
|
514
|
+
"elapsed_s": _eval_elapsed,
|
|
515
|
+
},
|
|
516
|
+
)
|
|
514
517
|
return idx, original_index, current_eval, current_expl, current_raw_response
|
|
515
518
|
|
|
516
519
|
with create_progress_bar(task_desc, total=len(rows_to_process)) as (
|
|
517
520
|
progress_bar,
|
|
518
521
|
task,
|
|
519
522
|
):
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
+
|
|
524
|
+
async def _fan_out() -> List[tuple]:
|
|
525
|
+
semaphore = asyncio.Semaphore(judge_concurrency)
|
|
526
|
+
|
|
527
|
+
async def _fan_out_one(idx_row: tuple) -> tuple:
|
|
528
|
+
async with semaphore:
|
|
529
|
+
row_result = await _process_row_async(idx_row)
|
|
530
|
+
progress_bar.update(task, advance=1)
|
|
531
|
+
progress_bar.refresh()
|
|
532
|
+
return row_result
|
|
533
|
+
|
|
534
|
+
return await asyncio.gather(
|
|
535
|
+
*(_fan_out_one(idx_row) for idx_row in enumerate(rows_to_process))
|
|
536
|
+
)
|
|
537
|
+
|
|
538
|
+
for (
|
|
539
|
+
idx,
|
|
540
|
+
original_index,
|
|
541
|
+
current_eval,
|
|
542
|
+
current_expl,
|
|
543
|
+
current_raw_response,
|
|
544
|
+
) in run_coroutine_blocking(_fan_out):
|
|
545
|
+
results_map[idx] = (
|
|
523
546
|
original_index,
|
|
524
547
|
current_eval,
|
|
525
548
|
current_expl,
|
|
526
549
|
current_raw_response,
|
|
527
|
-
)
|
|
528
|
-
results_map[idx] = (
|
|
529
|
-
original_index,
|
|
530
|
-
current_eval,
|
|
531
|
-
current_expl,
|
|
532
|
-
current_raw_response,
|
|
533
|
-
)
|
|
534
|
-
progress_bar.update(task, advance=1)
|
|
535
|
-
progress_bar.refresh()
|
|
550
|
+
)
|
|
536
551
|
|
|
537
552
|
self.logger.info(
|
|
538
553
|
f"{self.config.agent_name}: {self.__class__.__name__} progress {total_rows}/{total_rows}"
|
|
@@ -581,6 +596,11 @@ class BaseJudgeEvaluator(ABC):
|
|
|
581
596
|
Tuple of (score, explanation).
|
|
582
597
|
"""
|
|
583
598
|
# Step 1: Initial request
|
|
599
|
+
configured_thinking = getattr(self.config, "thinking", False)
|
|
600
|
+
if not isinstance(configured_thinking, bool):
|
|
601
|
+
configured_thinking = False
|
|
602
|
+
if request_data.get("thinking") is None:
|
|
603
|
+
request_data["thinking"] = configured_thinking
|
|
584
604
|
response = self.agent_router.route_request(
|
|
585
605
|
registration_key=self.agent_registration_key,
|
|
586
606
|
request_data=request_data,
|
|
@@ -664,6 +684,94 @@ class BaseJudgeEvaluator(ABC):
|
|
|
664
684
|
)
|
|
665
685
|
return final.score, final.explanation + " (retries exhausted)"
|
|
666
686
|
|
|
687
|
+
async def _route_request_async(
|
|
688
|
+
self, registration_key: str, request_data: Dict[str, Any], **kwargs: Any
|
|
689
|
+
) -> Dict[str, Any]:
|
|
690
|
+
"""Use the router's async twin when available, otherwise offload sync I/O."""
|
|
691
|
+
fn = getattr(self.agent_router, "route_request_async", None)
|
|
692
|
+
if fn is not None and inspect.iscoroutinefunction(fn):
|
|
693
|
+
return await fn(registration_key, request_data, **kwargs)
|
|
694
|
+
return await asyncio.to_thread(
|
|
695
|
+
self.agent_router.route_request, registration_key, request_data, **kwargs
|
|
696
|
+
)
|
|
697
|
+
|
|
698
|
+
async def _request_with_assertions_async(
|
|
699
|
+
self,
|
|
700
|
+
request_data: Dict[str, Any],
|
|
701
|
+
original_index: Any,
|
|
702
|
+
max_retries: int = 1,
|
|
703
|
+
include_raw_response: bool = False,
|
|
704
|
+
) -> Tuple[Any, Optional[str]] | Tuple[Any, Optional[str], Optional[str]]:
|
|
705
|
+
"""Async equivalent of :meth:`_request_with_assertions`."""
|
|
706
|
+
configured_thinking = getattr(self.config, "thinking", False)
|
|
707
|
+
if not isinstance(configured_thinking, bool):
|
|
708
|
+
configured_thinking = False
|
|
709
|
+
if request_data.get("thinking") is None:
|
|
710
|
+
request_data["thinking"] = configured_thinking
|
|
711
|
+
response = await self._route_request_async(
|
|
712
|
+
registration_key=self.agent_registration_key,
|
|
713
|
+
request_data=request_data,
|
|
714
|
+
)
|
|
715
|
+
error_msg = response.get("error_message")
|
|
716
|
+
response_content = response.get("processed_response")
|
|
717
|
+
if error_msg:
|
|
718
|
+
if include_raw_response:
|
|
719
|
+
return 0, f"{self.__class__.__name__}: {error_msg}", None
|
|
720
|
+
return 0, f"{self.__class__.__name__}: {error_msg}"
|
|
721
|
+
if response_content is None:
|
|
722
|
+
if include_raw_response:
|
|
723
|
+
return 0, f"{self.__class__.__name__}: No content from router", None
|
|
724
|
+
return 0, f"{self.__class__.__name__}: No content from router"
|
|
725
|
+
|
|
726
|
+
current_eval, current_expl = self._parse_response_content(
|
|
727
|
+
response_content, original_index
|
|
728
|
+
)
|
|
729
|
+
assertion = self._check_assertion(response_content, original_index)
|
|
730
|
+
if assertion.is_confident or max_retries <= 0:
|
|
731
|
+
if include_raw_response:
|
|
732
|
+
return current_eval, current_expl, response_content
|
|
733
|
+
return current_eval, current_expl
|
|
734
|
+
|
|
735
|
+
for retry in range(max_retries):
|
|
736
|
+
self.logger.debug(
|
|
737
|
+
f"Assertion retry {retry + 1}/{max_retries} for index {original_index} "
|
|
738
|
+
f"(response was: '{response_content[:50]}...')"
|
|
739
|
+
)
|
|
740
|
+
retry_response = await self._route_request_async(
|
|
741
|
+
registration_key=self.agent_registration_key,
|
|
742
|
+
request_data=self._build_retry_request(request_data, response_content),
|
|
743
|
+
)
|
|
744
|
+
retry_error = retry_response.get("error_message")
|
|
745
|
+
retry_content = retry_response.get("processed_response")
|
|
746
|
+
if retry_error or retry_content is None:
|
|
747
|
+
self.logger.debug(
|
|
748
|
+
f"Retry {retry + 1} failed: {retry_error or 'no content'}"
|
|
749
|
+
)
|
|
750
|
+
continue
|
|
751
|
+
retry_assertion = self._check_assertion(retry_content, original_index)
|
|
752
|
+
if retry_assertion.is_confident:
|
|
753
|
+
self.logger.info(
|
|
754
|
+
f"✅ Assertion retry {retry + 1} succeeded for index "
|
|
755
|
+
f"{original_index}: score={retry_assertion.score}"
|
|
756
|
+
)
|
|
757
|
+
if include_raw_response:
|
|
758
|
+
return (
|
|
759
|
+
retry_assertion.score,
|
|
760
|
+
retry_assertion.explanation + " (retry)",
|
|
761
|
+
retry_content,
|
|
762
|
+
)
|
|
763
|
+
return retry_assertion.score, retry_assertion.explanation + " (retry)"
|
|
764
|
+
response_content = retry_content
|
|
765
|
+
|
|
766
|
+
final = self._check_assertion(response_content, original_index)
|
|
767
|
+
if include_raw_response:
|
|
768
|
+
return (
|
|
769
|
+
final.score,
|
|
770
|
+
final.explanation + " (retries exhausted)",
|
|
771
|
+
response_content,
|
|
772
|
+
)
|
|
773
|
+
return final.score, final.explanation + " (retries exhausted)"
|
|
774
|
+
|
|
667
775
|
def _check_assertion(
|
|
668
776
|
self, content: Optional[str], original_index: Any
|
|
669
777
|
) -> AssertionResult:
|
|
@@ -869,4 +977,9 @@ Answer (yes or no):"""
|
|
|
869
977
|
"messages": self._build_messages(feedback_prompt),
|
|
870
978
|
"max_tokens": self.config.max_tokens_eval,
|
|
871
979
|
"temperature": 0.0, # Deterministic for retry
|
|
980
|
+
"thinking": (
|
|
981
|
+
original_request_data["thinking"]
|
|
982
|
+
if original_request_data.get("thinking") is not None
|
|
983
|
+
else False
|
|
984
|
+
),
|
|
872
985
|
}
|