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.
Files changed (214) hide show
  1. {hackagent-0.4.3 → hackagent-0.4.4}/.gitignore +1 -0
  2. {hackagent-0.4.3 → hackagent-0.4.4}/PKG-INFO +1 -1
  3. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/evaluation.py +22 -5
  4. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/evaluators.py +8 -1
  5. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/base.py +1 -1
  6. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/adapters/google_adk.py +24 -5
  7. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/router.py +9 -0
  8. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/tracking/step.py +3 -1
  9. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/tracking/tracker.py +45 -3
  10. {hackagent-0.4.3 → hackagent-0.4.4}/pyproject.toml +1 -1
  11. {hackagent-0.4.3 → hackagent-0.4.4}/LICENSE +0 -0
  12. {hackagent-0.4.3 → hackagent-0.4.4}/README.md +0 -0
  13. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/__init__.py +0 -0
  14. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/agent.py +0 -0
  15. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/__init__.py +0 -0
  16. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/__init__.py +0 -0
  17. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/agent_create.py +0 -0
  18. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/agent_destroy.py +0 -0
  19. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/agent_list.py +0 -0
  20. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/agent_partial_update.py +0 -0
  21. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/agent_retrieve.py +0 -0
  22. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/agent/agent_update.py +0 -0
  23. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/apilogs/__init__.py +0 -0
  24. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/apilogs/apilogs_list.py +0 -0
  25. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/apilogs/apilogs_retrieve.py +0 -0
  26. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/__init__.py +0 -0
  27. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/attack_create.py +0 -0
  28. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/attack_destroy.py +0 -0
  29. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/attack_list.py +0 -0
  30. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/attack_partial_update.py +0 -0
  31. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/attack_retrieve.py +0 -0
  32. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/attack/attack_update.py +0 -0
  33. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/checkout/__init__.py +0 -0
  34. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/checkout/checkout_create.py +0 -0
  35. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/generate/__init__.py +0 -0
  36. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/generate/generate_create.py +0 -0
  37. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/judge/__init__.py +0 -0
  38. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/judge/judge_create.py +0 -0
  39. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/key/__init__.py +0 -0
  40. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/key/key_create.py +0 -0
  41. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/key/key_destroy.py +0 -0
  42. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/key/key_list.py +0 -0
  43. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/key/key_retrieve.py +0 -0
  44. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/__init__.py +0 -0
  45. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_create.py +0 -0
  46. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_destroy.py +0 -0
  47. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_list.py +0 -0
  48. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_me_retrieve.py +0 -0
  49. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_partial_update.py +0 -0
  50. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_retrieve.py +0 -0
  51. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/organization/organization_update.py +0 -0
  52. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/__init__.py +0 -0
  53. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/prompt_create.py +0 -0
  54. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/prompt_destroy.py +0 -0
  55. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/prompt_list.py +0 -0
  56. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/prompt_partial_update.py +0 -0
  57. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/prompt_retrieve.py +0 -0
  58. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/prompt/prompt_update.py +0 -0
  59. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/__init__.py +0 -0
  60. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_create.py +0 -0
  61. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_destroy.py +0 -0
  62. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_list.py +0 -0
  63. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_partial_update.py +0 -0
  64. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_retrieve.py +0 -0
  65. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_trace_create.py +0 -0
  66. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/result/result_update.py +0 -0
  67. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/__init__.py +0 -0
  68. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_create.py +0 -0
  69. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_destroy.py +0 -0
  70. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_list.py +0 -0
  71. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_partial_update.py +0 -0
  72. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_result_create.py +0 -0
  73. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_retrieve.py +0 -0
  74. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_run_tests_create.py +0 -0
  75. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/run/run_update.py +0 -0
  76. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/__init__.py +0 -0
  77. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_create.py +0 -0
  78. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_destroy.py +0 -0
  79. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_list.py +0 -0
  80. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_me_retrieve.py +0 -0
  81. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_me_update.py +0 -0
  82. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_partial_update.py +0 -0
  83. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_retrieve.py +0 -0
  84. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/api/user/user_update.py +0 -0
  85. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/__init__.py +0 -0
  86. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/base.py +0 -0
  87. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/objectives/__init__.py +0 -0
  88. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/objectives/base.py +0 -0
  89. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/objectives/harmful_behavior.py +0 -0
  90. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/objectives/jailbreak.py +0 -0
  91. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/objectives/policy_violation.py +0 -0
  92. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/orchestrator.py +0 -0
  93. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/registry.py +0 -0
  94. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/shared/__init__.py +0 -0
  95. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/shared/evaluators.py +0 -0
  96. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/shared/metrics.py +0 -0
  97. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/shared/progress.py +0 -0
  98. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/shared/templates.py +0 -0
  99. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/shared/utils.py +0 -0
  100. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/__init__.py +0 -0
  101. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/__init__.py +0 -0
  102. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/attack.py +0 -0
  103. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/completions.py +0 -0
  104. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/config.py +0 -0
  105. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/generate.py +0 -0
  106. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/advprefix/utils.py +0 -0
  107. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/baseline/__init__.py +0 -0
  108. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/baseline/attack.py +0 -0
  109. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/baseline/config.py +0 -0
  110. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/baseline/evaluation.py +0 -0
  111. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/baseline/generation.py +0 -0
  112. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/pair/__init__.py +0 -0
  113. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/pair/attack.py +0 -0
  114. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/attacks/techniques/pair/config.py +0 -0
  115. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/__init__.py +0 -0
  116. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/commands/__init__.py +0 -0
  117. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/commands/agent.py +0 -0
  118. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/commands/attack.py +0 -0
  119. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/commands/config.py +0 -0
  120. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/commands/results.py +0 -0
  121. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/config.py +0 -0
  122. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/main.py +0 -0
  123. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/__init__.py +0 -0
  124. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/actions_logger.py +0 -0
  125. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/app.py +0 -0
  126. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/base.py +0 -0
  127. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/logger.py +0 -0
  128. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/views/__init__.py +0 -0
  129. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/views/agents.py +0 -0
  130. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/views/attacks.py +0 -0
  131. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/views/config.py +0 -0
  132. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/views/dashboard.py +0 -0
  133. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/views/results.py +0 -0
  134. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/widgets/__init__.py +0 -0
  135. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/widgets/actions.py +0 -0
  136. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/tui/widgets/logs.py +0 -0
  137. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/cli/utils.py +0 -0
  138. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/client.py +0 -0
  139. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/__init__.py +0 -0
  140. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/base.py +0 -0
  141. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/presets.py +0 -0
  142. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/providers/__init__.py +0 -0
  143. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/providers/file.py +0 -0
  144. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/providers/huggingface.py +0 -0
  145. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/datasets/registry.py +0 -0
  146. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/errors.py +0 -0
  147. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/logger.py +0 -0
  148. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/__init__.py +0 -0
  149. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/agent.py +0 -0
  150. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/agent_request.py +0 -0
  151. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/api_token_log.py +0 -0
  152. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/attack.py +0 -0
  153. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/attack_request.py +0 -0
  154. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/checkout_session_request_request.py +0 -0
  155. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/checkout_session_response.py +0 -0
  156. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/choice.py +0 -0
  157. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/choice_message.py +0 -0
  158. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/evaluation_status_enum.py +0 -0
  159. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/generate_error_response.py +0 -0
  160. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/generate_request_request.py +0 -0
  161. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/generate_success_response.py +0 -0
  162. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/generic_error_response.py +0 -0
  163. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/message_request.py +0 -0
  164. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/organization.py +0 -0
  165. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/organization_minimal.py +0 -0
  166. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/organization_request.py +0 -0
  167. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_agent_list.py +0 -0
  168. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_api_token_log_list.py +0 -0
  169. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_attack_list.py +0 -0
  170. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_organization_list.py +0 -0
  171. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_prompt_list.py +0 -0
  172. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_result_list.py +0 -0
  173. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_run_list.py +0 -0
  174. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_user_api_key_list.py +0 -0
  175. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/paginated_user_profile_list.py +0 -0
  176. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_agent_request.py +0 -0
  177. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_attack_request.py +0 -0
  178. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_organization_request.py +0 -0
  179. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_prompt_request.py +0 -0
  180. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_result_request.py +0 -0
  181. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_run_request.py +0 -0
  182. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/patched_user_profile_request.py +0 -0
  183. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/prompt.py +0 -0
  184. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/prompt_request.py +0 -0
  185. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/result.py +0 -0
  186. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/result_list_evaluation_status.py +0 -0
  187. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/result_request.py +0 -0
  188. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/run.py +0 -0
  189. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/run_list_status.py +0 -0
  190. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/run_request.py +0 -0
  191. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/status_enum.py +0 -0
  192. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/step_type_enum.py +0 -0
  193. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/trace.py +0 -0
  194. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/trace_request.py +0 -0
  195. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/usage.py +0 -0
  196. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/user_api_key.py +0 -0
  197. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/user_api_key_request.py +0 -0
  198. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/user_profile.py +0 -0
  199. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/user_profile_minimal.py +0 -0
  200. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/models/user_profile_request.py +0 -0
  201. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/__init__.py +0 -0
  202. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/adapters/__init__.py +0 -0
  203. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/adapters/base.py +0 -0
  204. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/adapters/litellm.py +0 -0
  205. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/adapters/ollama.py +0 -0
  206. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/adapters/openai.py +0 -0
  207. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/tracking/__init__.py +0 -0
  208. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/tracking/context.py +0 -0
  209. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/tracking/decorators.py +0 -0
  210. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/router/types.py +0 -0
  211. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/types.py +0 -0
  212. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/utils.py +0 -0
  213. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/vulnerabilities/__init__.py +0 -0
  214. {hackagent-0.4.3 → hackagent-0.4.4}/hackagent/vulnerabilities/prompts.py +0 -0
@@ -3,6 +3,7 @@ logs/
3
3
  *.sbatch
4
4
  .ruff_cache/
5
5
  reports/
6
+ .adk/
6
7
 
7
8
  # Editors
8
9
  .vscode/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hackagent
3
- Version: 0.4.3
3
+ Version: 0.4.4
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
@@ -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
- evaluation_notes = " | ".join(eval_notes_parts) if eval_notes_parts else ""
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__(client, config, run_id=run_id, tracking_client=tracking_client)
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 = None
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(f"ADKAgent initialized with session_id: {self.session_id}")
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
- status = http_err.response.status_code if http_err.response else "Unknown"
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
- session_id_to_use = (
588
- session_id_from_request if session_id_from_request else self.session_id
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=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": 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=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=evaluation_notes,
478
+ evaluation_notes=notes,
437
479
  agent_specific_data={
438
480
  **ctx.metadata,
439
481
  "goal": ctx.goal,
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "hackagent"
3
- version = "0.4.3"
3
+ version = "0.4.4"
4
4
  description = "HackAgent is an open-source security toolkit to detect vulnerabilities of your AI Agents."
5
5
  authors = [
6
6
  {name = "AI Security Lab", email = "ais@ai4i.it"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes