hackagent 0.4.3__tar.gz → 0.4.4__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.4.3 → hackagent-0.4.4}/.gitignore +1 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/PKG-INFO +1 -1
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/evaluation.py +22 -5
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/evaluators.py +8 -1
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/base.py +1 -1
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/adapters/google_adk.py +24 -5
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/router.py +9 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/tracking/step.py +3 -1
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/tracking/tracker.py +45 -3
- {hackagent-0.4.3 → hackagent-0.4.4}/pyproject.toml +1 -1
- {hackagent-0.4.3 → hackagent-0.4.4}/LICENSE +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/README.md +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/agent.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/agent_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/agent_destroy.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/agent_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/agent_partial_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/agent_retrieve.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/agent_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/apilogs/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/apilogs/apilogs_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/apilogs/apilogs_retrieve.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/attack_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/attack_destroy.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/attack_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/attack_partial_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/attack_retrieve.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/attack_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/checkout/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/checkout/checkout_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/generate/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/generate/generate_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/judge/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/judge/judge_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/key/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/key/key_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/key/key_destroy.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/key/key_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/key/key_retrieve.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_destroy.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_me_retrieve.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_partial_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_retrieve.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/prompt_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/prompt_destroy.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/prompt_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/prompt_partial_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/prompt_retrieve.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/prompt_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_destroy.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_partial_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_retrieve.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_trace_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_destroy.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_partial_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_result_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_retrieve.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_run_tests_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_create.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_destroy.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_me_retrieve.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_me_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_partial_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_retrieve.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_update.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/base.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/objectives/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/objectives/base.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/objectives/harmful_behavior.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/objectives/jailbreak.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/objectives/policy_violation.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/orchestrator.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/registry.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/shared/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/shared/evaluators.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/shared/metrics.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/shared/progress.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/shared/templates.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/shared/utils.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/attack.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/completions.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/config.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/generate.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/utils.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/baseline/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/baseline/attack.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/baseline/config.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/baseline/evaluation.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/baseline/generation.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/pair/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/pair/attack.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/pair/config.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/commands/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/commands/agent.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/commands/attack.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/commands/config.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/commands/results.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/config.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/main.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/actions_logger.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/app.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/base.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/logger.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/views/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/views/agents.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/views/attacks.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/views/config.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/views/dashboard.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/views/results.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/widgets/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/widgets/actions.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/widgets/logs.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/utils.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/client.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/base.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/presets.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/providers/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/providers/file.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/providers/huggingface.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/registry.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/errors.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/logger.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/agent.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/agent_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/api_token_log.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/attack.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/attack_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/checkout_session_request_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/checkout_session_response.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/choice.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/choice_message.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/evaluation_status_enum.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/generate_error_response.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/generate_request_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/generate_success_response.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/generic_error_response.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/message_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/organization.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/organization_minimal.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/organization_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_agent_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_api_token_log_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_attack_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_organization_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_prompt_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_result_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_run_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_user_api_key_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_user_profile_list.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_agent_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_attack_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_organization_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_prompt_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_result_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_run_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_user_profile_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/prompt.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/prompt_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/result.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/result_list_evaluation_status.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/result_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/run.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/run_list_status.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/run_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/status_enum.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/step_type_enum.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/trace.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/trace_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/usage.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/user_api_key.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/user_api_key_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/user_profile.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/user_profile_minimal.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/user_profile_request.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/adapters/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/adapters/base.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/adapters/litellm.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/adapters/ollama.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/adapters/openai.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/tracking/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/tracking/context.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/tracking/decorators.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/types.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/types.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/utils.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/vulnerabilities/__init__.py +0 -0
- {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/vulnerabilities/prompts.py +0 -0
|
@@ -320,7 +320,13 @@ class EvaluationPipeline:
|
|
|
320
320
|
if "explanation_nj" in row:
|
|
321
321
|
eval_notes_parts.append(f"NJ explanation: {row['explanation_nj']}")
|
|
322
322
|
|
|
323
|
-
|
|
323
|
+
# Provide a default evaluation_notes value if none found
|
|
324
|
+
# The backend API requires this field to be non-null
|
|
325
|
+
evaluation_notes = (
|
|
326
|
+
" | ".join(eval_notes_parts)
|
|
327
|
+
if eval_notes_parts
|
|
328
|
+
else "No evaluation scores available"
|
|
329
|
+
)
|
|
324
330
|
|
|
325
331
|
# Update the result status on the server
|
|
326
332
|
try:
|
|
@@ -562,21 +568,32 @@ class EvaluationPipeline:
|
|
|
562
568
|
self, original_data: List[Dict], judge_results: Dict[str, List[Dict]]
|
|
563
569
|
) -> List[Dict]:
|
|
564
570
|
"""Merge evaluation results from multiple judges."""
|
|
571
|
+
|
|
572
|
+
def _normalize_key_value(key_name: str, value: Any) -> Any:
|
|
573
|
+
"""Normalize key values for consistent matching.
|
|
574
|
+
|
|
575
|
+
The evaluator's prepare_responses() converts None to "" for string fields,
|
|
576
|
+
so we need to apply the same normalization when building lookup keys.
|
|
577
|
+
"""
|
|
578
|
+
if key_name in ("goal", "prefix", "completion"):
|
|
579
|
+
return str(value) if value is not None else ""
|
|
580
|
+
return value
|
|
581
|
+
|
|
565
582
|
# Build lookup dictionaries keyed by merge keys
|
|
566
583
|
for judge_type, judge_data in judge_results.items():
|
|
567
584
|
eval_cols = JUDGE_COLUMN_MAP.get(judge_type, [])
|
|
568
585
|
if not judge_data:
|
|
569
586
|
continue
|
|
570
587
|
|
|
571
|
-
# Build lookup by merge keys
|
|
588
|
+
# Build lookup by merge keys (normalized)
|
|
572
589
|
lookup = {}
|
|
573
590
|
for row in judge_data:
|
|
574
|
-
key = tuple(row.get(k) for k in MERGE_KEYS)
|
|
591
|
+
key = tuple(_normalize_key_value(k, row.get(k)) for k in MERGE_KEYS)
|
|
575
592
|
lookup[key] = {col: row.get(col) for col in eval_cols if col in row}
|
|
576
593
|
|
|
577
|
-
# Merge into original data
|
|
594
|
+
# Merge into original data (using same normalization)
|
|
578
595
|
for row in original_data:
|
|
579
|
-
key = tuple(row.get(k) for k in MERGE_KEYS)
|
|
596
|
+
key = tuple(_normalize_key_value(k, row.get(k)) for k in MERGE_KEYS)
|
|
580
597
|
if key in lookup:
|
|
581
598
|
row.update(lookup[key])
|
|
582
599
|
|
|
@@ -638,9 +638,16 @@ Answer with only "yes" or "no"."""
|
|
|
638
638
|
config: EvaluatorConfig,
|
|
639
639
|
run_id: Optional[str] = None,
|
|
640
640
|
tracking_client: Optional[AuthenticatedClient] = None,
|
|
641
|
+
tracker: Optional["Tracker"] = None,
|
|
641
642
|
):
|
|
642
643
|
"""Initialize the HarmBench evaluator."""
|
|
643
|
-
super().__init__(
|
|
644
|
+
super().__init__(
|
|
645
|
+
client,
|
|
646
|
+
config,
|
|
647
|
+
run_id=run_id,
|
|
648
|
+
tracking_client=tracking_client,
|
|
649
|
+
tracker=tracker,
|
|
650
|
+
)
|
|
644
651
|
if not self.config.model_id:
|
|
645
652
|
self.logger.warning("HarmBenchEvaluator model_id not specified")
|
|
646
653
|
if not self.agent_router or not self.agent_registration_key:
|
|
@@ -403,7 +403,7 @@ class BaseAttack(abc.ABC):
|
|
|
403
403
|
|
|
404
404
|
if is_success:
|
|
405
405
|
eval_status = EvaluationStatusEnum.PASSED_CRITERIA
|
|
406
|
-
eval_notes =
|
|
406
|
+
eval_notes = "Pipeline completed successfully."
|
|
407
407
|
run_status = StatusEnum.COMPLETED
|
|
408
408
|
else:
|
|
409
409
|
eval_status = EvaluationStatusEnum.FAILED_CRITERIA
|
|
@@ -99,13 +99,22 @@ class ADKAgent(Agent):
|
|
|
99
99
|
self.endpoint: str = endpoint_raw.strip("/")
|
|
100
100
|
self.request_timeout: int = self._get_config_key("request_timeout", 120)
|
|
101
101
|
|
|
102
|
+
# Option to use a fresh session for each request (useful for attack scenarios
|
|
103
|
+
# where session state pollution can cause issues)
|
|
104
|
+
self.fresh_session_per_request: bool = self._get_config_key(
|
|
105
|
+
"fresh_session_per_request", True
|
|
106
|
+
)
|
|
107
|
+
|
|
102
108
|
# Generate a unique session ID for this adapter instance
|
|
103
109
|
# This keeps session state persistent across multiple requests to the same agent
|
|
104
110
|
import uuid
|
|
105
111
|
|
|
106
112
|
self.session_id: str = self._get_config_key("session_id", str(uuid.uuid4()))
|
|
107
113
|
|
|
108
|
-
self.logger.info(
|
|
114
|
+
self.logger.info(
|
|
115
|
+
f"ADKAgent initialized with session_id: {self.session_id}, "
|
|
116
|
+
f"fresh_session_per_request: {self.fresh_session_per_request}"
|
|
117
|
+
)
|
|
109
118
|
|
|
110
119
|
def _initialize_session(
|
|
111
120
|
self, session_id_to_init: str, initial_state: Optional[dict] = None
|
|
@@ -330,7 +339,8 @@ class ADKAgent(Agent):
|
|
|
330
339
|
try:
|
|
331
340
|
response.raise_for_status()
|
|
332
341
|
except requests.exceptions.HTTPError as http_err:
|
|
333
|
-
|
|
342
|
+
# Use response.status_code directly since we have the response object
|
|
343
|
+
status = response.status_code
|
|
334
344
|
self.logger.error(
|
|
335
345
|
f"HTTP error {status} from {response.url}: {response_body_str}"
|
|
336
346
|
)
|
|
@@ -584,9 +594,18 @@ class ADKAgent(Agent):
|
|
|
584
594
|
)
|
|
585
595
|
|
|
586
596
|
# Use adapter's instance session_id if not provided in request
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
597
|
+
# If fresh_session_per_request is enabled, generate a new UUID for each request
|
|
598
|
+
import uuid
|
|
599
|
+
|
|
600
|
+
if session_id_from_request:
|
|
601
|
+
session_id_to_use = session_id_from_request
|
|
602
|
+
elif self.fresh_session_per_request:
|
|
603
|
+
session_id_to_use = str(uuid.uuid4())
|
|
604
|
+
self.logger.debug(
|
|
605
|
+
f"Using fresh session ID for request: {session_id_to_use}"
|
|
606
|
+
)
|
|
607
|
+
else:
|
|
608
|
+
session_id_to_use = self.session_id
|
|
590
609
|
|
|
591
610
|
initial_session_state = request_data.get("initial_session_state") # Optional
|
|
592
611
|
|
|
@@ -865,6 +865,15 @@ class AgentRouter:
|
|
|
865
865
|
patch_kwargs["agent_type"] = agent_type.value
|
|
866
866
|
needs_update = True
|
|
867
867
|
|
|
868
|
+
# Check endpoint
|
|
869
|
+
current_endpoint = existing_agent.endpoint
|
|
870
|
+
if current_endpoint != endpoint_for_backend:
|
|
871
|
+
logger.info(
|
|
872
|
+
f"Backend agent '{name}' exists but endpoint differs. Current: '{current_endpoint}', Requested: '{endpoint_for_backend}'. Will update."
|
|
873
|
+
)
|
|
874
|
+
patch_kwargs["endpoint"] = endpoint_for_backend
|
|
875
|
+
needs_update = True
|
|
876
|
+
|
|
868
877
|
if needs_update and update_metadata_if_exists:
|
|
869
878
|
logger.info(
|
|
870
879
|
f"Backend agent '{name}' exists and needs update. Proceeding with update."
|
|
@@ -495,9 +495,11 @@ class StepTracker:
|
|
|
495
495
|
self.logger.warning("Cannot update result status: invalid result UUID")
|
|
496
496
|
return False
|
|
497
497
|
|
|
498
|
+
# Backend requires non-null evaluation_notes
|
|
499
|
+
notes = evaluation_notes if evaluation_notes else "Status updated"
|
|
498
500
|
result_request = PatchedResultRequest(
|
|
499
501
|
evaluation_status=evaluation_status,
|
|
500
|
-
evaluation_notes=
|
|
502
|
+
evaluation_notes=notes,
|
|
501
503
|
agent_specific_data=agent_specific_data,
|
|
502
504
|
)
|
|
503
505
|
|
|
@@ -52,6 +52,30 @@ from hackagent.models import (
|
|
|
52
52
|
TraceRequest,
|
|
53
53
|
)
|
|
54
54
|
|
|
55
|
+
import math
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _sanitize_for_json(obj: Any) -> Any:
|
|
59
|
+
"""
|
|
60
|
+
Recursively sanitize an object for JSON serialization.
|
|
61
|
+
|
|
62
|
+
Converts inf/-inf to "Infinity"/"-Infinity" strings and NaN to "NaN".
|
|
63
|
+
This prevents JSON serialization errors for non-compliant float values.
|
|
64
|
+
"""
|
|
65
|
+
if isinstance(obj, float):
|
|
66
|
+
if math.isinf(obj):
|
|
67
|
+
return "Infinity" if obj > 0 else "-Infinity"
|
|
68
|
+
if math.isnan(obj):
|
|
69
|
+
return "NaN"
|
|
70
|
+
return obj
|
|
71
|
+
elif isinstance(obj, dict):
|
|
72
|
+
return {k: _sanitize_for_json(v) for k, v in obj.items()}
|
|
73
|
+
elif isinstance(obj, list):
|
|
74
|
+
return [_sanitize_for_json(item) for item in obj]
|
|
75
|
+
elif isinstance(obj, tuple):
|
|
76
|
+
return tuple(_sanitize_for_json(item) for item in obj)
|
|
77
|
+
return obj
|
|
78
|
+
|
|
55
79
|
|
|
56
80
|
@dataclass
|
|
57
81
|
class Context:
|
|
@@ -276,6 +300,7 @@ class Tracker:
|
|
|
276
300
|
score: Optional[float] = None,
|
|
277
301
|
explanation: Optional[str] = None,
|
|
278
302
|
evaluator_name: Optional[str] = None,
|
|
303
|
+
metadata: Optional[Dict[str, Any]] = None,
|
|
279
304
|
) -> None:
|
|
280
305
|
"""
|
|
281
306
|
Add a trace for an evaluation step.
|
|
@@ -286,6 +311,7 @@ class Tracker:
|
|
|
286
311
|
score: Optional numeric score
|
|
287
312
|
explanation: Optional explanation text
|
|
288
313
|
evaluator_name: Name of the evaluator used
|
|
314
|
+
metadata: Optional additional metadata
|
|
289
315
|
"""
|
|
290
316
|
content = {
|
|
291
317
|
"step_name": "Evaluation",
|
|
@@ -297,6 +323,8 @@ class Tracker:
|
|
|
297
323
|
content["score"] = score
|
|
298
324
|
if explanation:
|
|
299
325
|
content["explanation"] = explanation
|
|
326
|
+
if metadata:
|
|
327
|
+
content["metadata"] = self._sanitize_for_json(metadata)
|
|
300
328
|
|
|
301
329
|
self._add_trace(ctx, "Evaluation", StepTypeEnum.OTHER, content)
|
|
302
330
|
|
|
@@ -337,6 +365,9 @@ class Tracker:
|
|
|
337
365
|
Returns:
|
|
338
366
|
Trace ID if successful, None otherwise
|
|
339
367
|
"""
|
|
368
|
+
# Sanitize content to handle inf/nan values
|
|
369
|
+
sanitized_content = _sanitize_for_json(content)
|
|
370
|
+
|
|
340
371
|
# Always track locally
|
|
341
372
|
ctx.sequence_counter += 1
|
|
342
373
|
trace_record = {
|
|
@@ -345,7 +376,7 @@ class Tracker:
|
|
|
345
376
|
"step_type": (
|
|
346
377
|
step_type.value if hasattr(step_type, "value") else str(step_type)
|
|
347
378
|
),
|
|
348
|
-
"content":
|
|
379
|
+
"content": sanitized_content,
|
|
349
380
|
}
|
|
350
381
|
ctx.traces.append(trace_record)
|
|
351
382
|
|
|
@@ -359,7 +390,7 @@ class Tracker:
|
|
|
359
390
|
trace_request = TraceRequest(
|
|
360
391
|
sequence=ctx.sequence_counter,
|
|
361
392
|
step_type=step_type,
|
|
362
|
-
content=
|
|
393
|
+
content=sanitized_content,
|
|
363
394
|
)
|
|
364
395
|
|
|
365
396
|
response = result_trace_create.sync_detailed(
|
|
@@ -431,9 +462,20 @@ class Tracker:
|
|
|
431
462
|
else:
|
|
432
463
|
eval_status = EvaluationStatusEnum.FAILED_JAILBREAK
|
|
433
464
|
|
|
465
|
+
# Backend requires non-null evaluation_notes
|
|
466
|
+
notes = (
|
|
467
|
+
evaluation_notes
|
|
468
|
+
if evaluation_notes
|
|
469
|
+
else (
|
|
470
|
+
"Goal completed successfully"
|
|
471
|
+
if success
|
|
472
|
+
else "Goal evaluation failed"
|
|
473
|
+
)
|
|
474
|
+
)
|
|
475
|
+
|
|
434
476
|
result_request = PatchedResultRequest(
|
|
435
477
|
evaluation_status=eval_status,
|
|
436
|
-
evaluation_notes=
|
|
478
|
+
evaluation_notes=notes,
|
|
437
479
|
agent_specific_data={
|
|
438
480
|
**ctx.metadata,
|
|
439
481
|
"goal": ctx.goal,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_partial_update.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|