hackagent 0.5.0__tar.gz → 0.7.0__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 (374) hide show
  1. {hackagent-0.5.0 → hackagent-0.7.0}/.gitignore +5 -1
  2. {hackagent-0.5.0 → hackagent-0.7.0}/PKG-INFO +6 -5
  3. hackagent-0.7.0/hackagent/__init__.py +25 -0
  4. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/agent.py +84 -17
  5. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/__init__.py +8 -0
  6. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/evaluator/__init__.py +15 -0
  7. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/evaluator/base.py +224 -54
  8. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/evaluator/evaluation_step.py +245 -26
  9. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/evaluator/judge_evaluators.py +123 -6
  10. hackagent-0.7.0/hackagent/attacks/evaluator/metrics.py +269 -0
  11. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/evaluator/sync.py +28 -32
  12. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/orchestrator.py +292 -112
  13. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/registry.py +27 -5
  14. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/shared/progress.py +7 -0
  15. hackagent-0.7.0/hackagent/attacks/shared/prompt_parser.py +106 -0
  16. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/shared/router_factory.py +48 -47
  17. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/advprefix/attack.py +118 -39
  18. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/advprefix/completions.py +104 -98
  19. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/advprefix/config.py +65 -58
  20. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/advprefix/evaluation.py +27 -1
  21. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/advprefix/generate.py +224 -153
  22. hackagent-0.7.0/hackagent/attacks/techniques/autodan_turbo/__init__.py +14 -0
  23. hackagent-0.7.0/hackagent/attacks/techniques/autodan_turbo/attack.py +345 -0
  24. hackagent-0.7.0/hackagent/attacks/techniques/autodan_turbo/config.py +252 -0
  25. hackagent-0.7.0/hackagent/attacks/techniques/autodan_turbo/core.py +554 -0
  26. hackagent-0.7.0/hackagent/attacks/techniques/autodan_turbo/dashboard_tracing.py +67 -0
  27. hackagent-0.7.0/hackagent/attacks/techniques/autodan_turbo/evaluation.py +154 -0
  28. hackagent-0.7.0/hackagent/attacks/techniques/autodan_turbo/lifelong.py +466 -0
  29. hackagent-0.7.0/hackagent/attacks/techniques/autodan_turbo/log_styles.py +90 -0
  30. hackagent-0.7.0/hackagent/attacks/techniques/autodan_turbo/strategy_library.py +459 -0
  31. hackagent-0.7.0/hackagent/attacks/techniques/autodan_turbo/summarizer.py +194 -0
  32. hackagent-0.7.0/hackagent/attacks/techniques/autodan_turbo/warm_up.py +356 -0
  33. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/base.py +42 -9
  34. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/baseline/attack.py +90 -14
  35. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/baseline/config.py +15 -28
  36. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/baseline/evaluation.py +114 -42
  37. hackagent-0.7.0/hackagent/attacks/techniques/baseline/generation.py +337 -0
  38. hackagent-0.7.0/hackagent/attacks/techniques/bon/__init__.py +16 -0
  39. hackagent-0.7.0/hackagent/attacks/techniques/bon/attack.py +279 -0
  40. hackagent-0.7.0/hackagent/attacks/techniques/bon/config.py +121 -0
  41. hackagent-0.7.0/hackagent/attacks/techniques/bon/evaluation.py +176 -0
  42. hackagent-0.7.0/hackagent/attacks/techniques/bon/generation.py +859 -0
  43. hackagent-0.7.0/hackagent/attacks/techniques/cipherchat/__init__.py +12 -0
  44. hackagent-0.7.0/hackagent/attacks/techniques/cipherchat/attack.py +202 -0
  45. hackagent-0.7.0/hackagent/attacks/techniques/cipherchat/config.py +54 -0
  46. hackagent-0.7.0/hackagent/attacks/techniques/cipherchat/encode_experts.py +366 -0
  47. hackagent-0.7.0/hackagent/attacks/techniques/cipherchat/evaluation.py +108 -0
  48. hackagent-0.7.0/hackagent/attacks/techniques/cipherchat/generation.py +326 -0
  49. hackagent-0.7.0/hackagent/attacks/techniques/cipherchat/prompts_and_demonstrations.py +331 -0
  50. hackagent-0.7.0/hackagent/attacks/techniques/config.py +370 -0
  51. hackagent-0.7.0/hackagent/attacks/techniques/flipattack/attack.py +506 -0
  52. hackagent-0.7.0/hackagent/attacks/techniques/flipattack/config.py +114 -0
  53. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/flipattack/evaluation.py +1 -1
  54. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/flipattack/generation.py +90 -53
  55. hackagent-0.7.0/hackagent/attacks/techniques/h4rm3l/__init__.py +15 -0
  56. hackagent-0.7.0/hackagent/attacks/techniques/h4rm3l/attack.py +224 -0
  57. hackagent-0.7.0/hackagent/attacks/techniques/h4rm3l/config.py +183 -0
  58. hackagent-0.7.0/hackagent/attacks/techniques/h4rm3l/decorators.py +1242 -0
  59. hackagent-0.7.0/hackagent/attacks/techniques/h4rm3l/evaluation.py +185 -0
  60. hackagent-0.7.0/hackagent/attacks/techniques/h4rm3l/generation.py +361 -0
  61. hackagent-0.7.0/hackagent/attacks/techniques/pair/attack.py +930 -0
  62. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/pair/config.py +58 -22
  63. hackagent-0.7.0/hackagent/attacks/techniques/pair/evaluation.py +90 -0
  64. hackagent-0.7.0/hackagent/attacks/techniques/pap/__init__.py +15 -0
  65. hackagent-0.7.0/hackagent/attacks/techniques/pap/attack.py +228 -0
  66. hackagent-0.7.0/hackagent/attacks/techniques/pap/config.py +157 -0
  67. hackagent-0.7.0/hackagent/attacks/techniques/pap/evaluation.py +105 -0
  68. hackagent-0.7.0/hackagent/attacks/techniques/pap/generation.py +626 -0
  69. hackagent-0.7.0/hackagent/attacks/techniques/pap/taxonomy.py +540 -0
  70. hackagent-0.7.0/hackagent/attacks/techniques/tap/__init__.py +3 -0
  71. hackagent-0.7.0/hackagent/attacks/techniques/tap/attack.py +299 -0
  72. hackagent-0.7.0/hackagent/attacks/techniques/tap/config.py +115 -0
  73. hackagent-0.7.0/hackagent/attacks/techniques/tap/evaluation.py +255 -0
  74. hackagent-0.7.0/hackagent/attacks/techniques/tap/generation.py +941 -0
  75. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/commands/attack.py +2 -2
  76. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/commands/config.py +5 -21
  77. hackagent-0.7.0/hackagent/cli/commands/examples.py +276 -0
  78. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/commands/results.py +144 -73
  79. hackagent-0.7.0/hackagent/cli/commands/web.py +157 -0
  80. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/config.py +24 -30
  81. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/main.py +210 -62
  82. hackagent-0.7.0/hackagent/cli/tui/attack_specs.py +1375 -0
  83. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/base.py +41 -3
  84. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/views/agents.py +28 -61
  85. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/views/attacks.py +275 -22
  86. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/views/config.py +70 -24
  87. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/views/dashboard.py +133 -49
  88. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/views/results.py +864 -408
  89. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/datasets/base.py +2 -1
  90. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/datasets/providers/file.py +2 -2
  91. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/datasets/providers/huggingface.py +2 -24
  92. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/datasets/registry.py +2 -2
  93. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/logger.py +22 -18
  94. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/base.py +2 -2
  95. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/adapters/base.py +20 -13
  96. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/adapters/google_adk.py +6 -6
  97. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/adapters/litellm.py +11 -11
  98. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/adapters/ollama.py +20 -17
  99. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/adapters/openai.py +126 -7
  100. hackagent-0.7.0/hackagent/router/router.py +466 -0
  101. hackagent-0.7.0/hackagent/router/tracking/category_classifier.py +418 -0
  102. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/tracking/context.py +11 -44
  103. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/tracking/coordinator.py +231 -100
  104. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/tracking/decorators.py +8 -4
  105. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/tracking/step.py +44 -189
  106. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/tracking/tracker.py +180 -193
  107. hackagent-0.7.0/hackagent/router/tracking/utils.py +110 -0
  108. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/types.py +32 -0
  109. hackagent-0.7.0/hackagent/server/__init__.py +0 -0
  110. hackagent-0.7.0/hackagent/server/api/agent/__init__.py +1 -0
  111. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/agent/agent_create.py +12 -13
  112. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/agent/agent_destroy.py +11 -8
  113. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/agent/agent_list.py +20 -20
  114. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/agent/agent_partial_update.py +31 -28
  115. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/agent/agent_retrieve.py +15 -12
  116. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/agent/agent_update.py +16 -14
  117. hackagent-0.7.0/hackagent/server/api/apilogs/__init__.py +1 -0
  118. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/apilogs/apilogs_list.py +20 -20
  119. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/apilogs/apilogs_retrieve.py +15 -12
  120. hackagent-0.7.0/hackagent/server/api/apilogs/apilogs_summary_retrieve.py +219 -0
  121. hackagent-0.7.0/hackagent/server/api/attack/__init__.py +1 -0
  122. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/attack/attack_create.py +12 -13
  123. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/attack/attack_destroy.py +11 -8
  124. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/attack/attack_list.py +20 -20
  125. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/attack/attack_partial_update.py +31 -28
  126. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/attack/attack_retrieve.py +15 -12
  127. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/attack/attack_update.py +16 -14
  128. hackagent-0.7.0/hackagent/server/api/checkout/__init__.py +1 -0
  129. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/checkout/checkout_create.py +58 -54
  130. hackagent-0.7.0/hackagent/server/api/generate/__init__.py +1 -0
  131. hackagent-0.7.0/hackagent/server/api/generate/v1_chat_completions_create.py +329 -0
  132. hackagent-0.7.0/hackagent/server/api/judge/__init__.py +1 -0
  133. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/judge/judge_create.py +64 -57
  134. hackagent-0.7.0/hackagent/server/api/key/__init__.py +1 -0
  135. hackagent-0.7.0/hackagent/server/api/key/key_context_retrieve.py +143 -0
  136. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/key/key_create.py +12 -13
  137. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/key/key_destroy.py +11 -8
  138. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/key/key_list.py +20 -20
  139. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/key/key_retrieve.py +15 -12
  140. hackagent-0.7.0/hackagent/server/api/models.py +829 -0
  141. hackagent-0.7.0/hackagent/server/api/organization/__init__.py +1 -0
  142. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/organization/organization_create.py +41 -43
  143. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/organization/organization_destroy.py +11 -8
  144. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/organization/organization_list.py +20 -20
  145. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/organization/organization_me_retrieve.py +11 -11
  146. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/organization/organization_partial_update.py +60 -56
  147. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/organization/organization_retrieve.py +15 -12
  148. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/organization/organization_update.py +45 -44
  149. hackagent-0.7.0/hackagent/server/api/result/__init__.py +1 -0
  150. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/result/result_create.py +12 -13
  151. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/result/result_destroy.py +11 -8
  152. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/result/result_list.py +50 -69
  153. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/result/result_partial_update.py +27 -24
  154. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/result/result_retrieve.py +15 -12
  155. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/result/result_trace_create.py +18 -16
  156. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/result/result_update.py +16 -14
  157. hackagent-0.7.0/hackagent/server/api/run/__init__.py +1 -0
  158. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/run/run_create.py +12 -13
  159. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/run/run_destroy.py +11 -8
  160. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/run/run_list.py +78 -79
  161. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/run/run_partial_update.py +31 -24
  162. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/run/run_result_create.py +18 -16
  163. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/run/run_retrieve.py +15 -12
  164. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/run/run_run_tests_create.py +12 -13
  165. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/run/run_update.py +16 -14
  166. hackagent-0.7.0/hackagent/server/api/scripts/generate.py +334 -0
  167. hackagent-0.7.0/hackagent/server/api/scripts/generate.sh +131 -0
  168. hackagent-0.7.0/hackagent/server/api/scripts/openapi-python-client.yaml +14 -0
  169. hackagent-0.7.0/hackagent/server/api/user/__init__.py +1 -0
  170. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/user/user_create.py +41 -55
  171. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/user/user_destroy.py +11 -8
  172. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/user/user_list.py +20 -20
  173. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/user/user_me_retrieve.py +11 -11
  174. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/user/user_me_update.py +41 -55
  175. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/user/user_partial_update.py +60 -56
  176. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/user/user_retrieve.py +15 -12
  177. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/user/user_update.py +45 -56
  178. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/client.py +93 -77
  179. hackagent-0.7.0/hackagent/server/dashboard/__init__.py +23 -0
  180. hackagent-0.7.0/hackagent/server/dashboard/_api.py +136 -0
  181. hackagent-0.7.0/hackagent/server/dashboard/_components.py +290 -0
  182. hackagent-0.7.0/hackagent/server/dashboard/_helpers.py +137 -0
  183. hackagent-0.7.0/hackagent/server/dashboard/_page.py +4294 -0
  184. hackagent-0.7.0/hackagent/server/dashboard/app.py +75 -0
  185. hackagent-0.7.0/hackagent/server/dashboard/templates/index.html +1288 -0
  186. hackagent-0.7.0/hackagent/server/errors.py +25 -0
  187. hackagent-0.7.0/hackagent/server/storage/__init__.py +0 -0
  188. hackagent-0.7.0/hackagent/server/storage/base.py +239 -0
  189. hackagent-0.7.0/hackagent/server/storage/local.py +718 -0
  190. hackagent-0.7.0/hackagent/server/storage/remote.py +869 -0
  191. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/types.py +8 -5
  192. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/utils.py +21 -17
  193. {hackagent-0.5.0 → hackagent-0.7.0}/pyproject.toml +38 -14
  194. hackagent-0.5.0/hackagent/__init__.py +0 -15
  195. hackagent-0.5.0/hackagent/api/agent/__init__.py +0 -4
  196. hackagent-0.5.0/hackagent/api/apilogs/__init__.py +0 -4
  197. hackagent-0.5.0/hackagent/api/attack/__init__.py +0 -4
  198. hackagent-0.5.0/hackagent/api/checkout/__init__.py +0 -4
  199. hackagent-0.5.0/hackagent/api/generate/__init__.py +0 -4
  200. hackagent-0.5.0/hackagent/api/generate/generate_create.py +0 -254
  201. hackagent-0.5.0/hackagent/api/judge/__init__.py +0 -4
  202. hackagent-0.5.0/hackagent/api/key/__init__.py +0 -4
  203. hackagent-0.5.0/hackagent/api/organization/__init__.py +0 -4
  204. hackagent-0.5.0/hackagent/api/prompt/__init__.py +0 -4
  205. hackagent-0.5.0/hackagent/api/prompt/prompt_create.py +0 -172
  206. hackagent-0.5.0/hackagent/api/prompt/prompt_destroy.py +0 -105
  207. hackagent-0.5.0/hackagent/api/prompt/prompt_list.py +0 -186
  208. hackagent-0.5.0/hackagent/api/prompt/prompt_partial_update.py +0 -186
  209. hackagent-0.5.0/hackagent/api/prompt/prompt_retrieve.py +0 -164
  210. hackagent-0.5.0/hackagent/api/prompt/prompt_update.py +0 -186
  211. hackagent-0.5.0/hackagent/api/result/__init__.py +0 -4
  212. hackagent-0.5.0/hackagent/api/run/__init__.py +0 -4
  213. hackagent-0.5.0/hackagent/api/user/__init__.py +0 -4
  214. hackagent-0.5.0/hackagent/attacks/evaluator/metrics.py +0 -124
  215. hackagent-0.5.0/hackagent/attacks/techniques/baseline/generation.py +0 -269
  216. hackagent-0.5.0/hackagent/attacks/techniques/flipattack/attack.py +0 -242
  217. hackagent-0.5.0/hackagent/attacks/techniques/flipattack/config.py +0 -121
  218. hackagent-0.5.0/hackagent/attacks/techniques/flipattack/evaluation.py.bak +0 -285
  219. hackagent-0.5.0/hackagent/attacks/techniques/flipattack/flip_attack.py +0 -239
  220. hackagent-0.5.0/hackagent/attacks/techniques/pair/attack.py +0 -628
  221. hackagent-0.5.0/hackagent/cli/tui/attack_specs.py +0 -664
  222. hackagent-0.5.0/hackagent/models/__init__.py +0 -112
  223. hackagent-0.5.0/hackagent/models/agent.py +0 -224
  224. hackagent-0.5.0/hackagent/models/agent_request.py +0 -130
  225. hackagent-0.5.0/hackagent/models/api_token_log.py +0 -186
  226. hackagent-0.5.0/hackagent/models/attack.py +0 -156
  227. hackagent-0.5.0/hackagent/models/attack_request.py +0 -83
  228. hackagent-0.5.0/hackagent/models/checkout_session_request_request.py +0 -77
  229. hackagent-0.5.0/hackagent/models/checkout_session_response.py +0 -61
  230. hackagent-0.5.0/hackagent/models/choice.py +0 -81
  231. hackagent-0.5.0/hackagent/models/choice_message.py +0 -69
  232. hackagent-0.5.0/hackagent/models/evaluation_status_enum.py +0 -17
  233. hackagent-0.5.0/hackagent/models/generate_error_response.py +0 -61
  234. hackagent-0.5.0/hackagent/models/generate_request_request.py +0 -211
  235. hackagent-0.5.0/hackagent/models/generate_success_response.py +0 -115
  236. hackagent-0.5.0/hackagent/models/generic_error_response.py +0 -71
  237. hackagent-0.5.0/hackagent/models/message_request.py +0 -69
  238. hackagent-0.5.0/hackagent/models/organization.py +0 -104
  239. hackagent-0.5.0/hackagent/models/organization_minimal.py +0 -70
  240. hackagent-0.5.0/hackagent/models/organization_request.py +0 -72
  241. hackagent-0.5.0/hackagent/models/paginated_agent_list.py +0 -122
  242. hackagent-0.5.0/hackagent/models/paginated_api_token_log_list.py +0 -122
  243. hackagent-0.5.0/hackagent/models/paginated_attack_list.py +0 -122
  244. hackagent-0.5.0/hackagent/models/paginated_organization_list.py +0 -122
  245. hackagent-0.5.0/hackagent/models/paginated_prompt_list.py +0 -122
  246. hackagent-0.5.0/hackagent/models/paginated_result_list.py +0 -122
  247. hackagent-0.5.0/hackagent/models/paginated_run_list.py +0 -122
  248. hackagent-0.5.0/hackagent/models/paginated_user_api_key_list.py +0 -122
  249. hackagent-0.5.0/hackagent/models/paginated_user_profile_list.py +0 -122
  250. hackagent-0.5.0/hackagent/models/patched_agent_request.py +0 -129
  251. hackagent-0.5.0/hackagent/models/patched_attack_request.py +0 -93
  252. hackagent-0.5.0/hackagent/models/patched_organization_request.py +0 -72
  253. hackagent-0.5.0/hackagent/models/patched_prompt_request.py +0 -126
  254. hackagent-0.5.0/hackagent/models/patched_result_request.py +0 -238
  255. hackagent-0.5.0/hackagent/models/patched_run_request.py +0 -139
  256. hackagent-0.5.0/hackagent/models/patched_user_profile_request.py +0 -100
  257. hackagent-0.5.0/hackagent/models/prompt.py +0 -221
  258. hackagent-0.5.0/hackagent/models/prompt_request.py +0 -127
  259. hackagent-0.5.0/hackagent/models/result.py +0 -295
  260. hackagent-0.5.0/hackagent/models/result_list_evaluation_status.py +0 -17
  261. hackagent-0.5.0/hackagent/models/result_request.py +0 -233
  262. hackagent-0.5.0/hackagent/models/run.py +0 -234
  263. hackagent-0.5.0/hackagent/models/run_list_status.py +0 -15
  264. hackagent-0.5.0/hackagent/models/run_request.py +0 -134
  265. hackagent-0.5.0/hackagent/models/status_enum.py +0 -15
  266. hackagent-0.5.0/hackagent/models/step_type_enum.py +0 -17
  267. hackagent-0.5.0/hackagent/models/trace.py +0 -122
  268. hackagent-0.5.0/hackagent/models/trace_request.py +0 -95
  269. hackagent-0.5.0/hackagent/models/usage.py +0 -77
  270. hackagent-0.5.0/hackagent/models/user_api_key.py +0 -201
  271. hackagent-0.5.0/hackagent/models/user_api_key_request.py +0 -74
  272. hackagent-0.5.0/hackagent/models/user_profile.py +0 -136
  273. hackagent-0.5.0/hackagent/models/user_profile_minimal.py +0 -78
  274. hackagent-0.5.0/hackagent/models/user_profile_request.py +0 -100
  275. hackagent-0.5.0/hackagent/router/router.py +0 -1019
  276. {hackagent-0.5.0 → hackagent-0.7.0}/LICENSE +0 -0
  277. {hackagent-0.5.0 → hackagent-0.7.0}/README.md +0 -0
  278. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/base.py +0 -0
  279. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/evaluator/pattern_evaluators.py +0 -0
  280. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/generator/__init__.py +0 -0
  281. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/generator/templates.py +0 -0
  282. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/objectives/__init__.py +0 -0
  283. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/objectives/base.py +0 -0
  284. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/objectives/harmful_behavior.py +0 -0
  285. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/objectives/jailbreak.py +0 -0
  286. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/objectives/policy_violation.py +0 -0
  287. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/shared/__init__.py +0 -0
  288. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/shared/response_utils.py +0 -0
  289. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/shared/tui.py +0 -0
  290. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/shared/utils.py +0 -0
  291. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/__init__.py +0 -0
  292. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/advprefix/__init__.py +0 -0
  293. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/advprefix/utils.py +0 -0
  294. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/baseline/__init__.py +0 -0
  295. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/flipattack/__init__.py +0 -0
  296. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/attacks/techniques/pair/__init__.py +0 -0
  297. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/__init__.py +0 -0
  298. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/commands/__init__.py +0 -0
  299. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/commands/agent.py +0 -0
  300. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/__init__.py +0 -0
  301. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/actions_logger.py +0 -0
  302. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/app.py +0 -0
  303. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/logger.py +0 -0
  304. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/views/__init__.py +0 -0
  305. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/widgets/__init__.py +0 -0
  306. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/widgets/actions.py +0 -0
  307. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/tui/widgets/logs.py +0 -0
  308. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/cli/utils.py +0 -0
  309. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/datasets/__init__.py +0 -0
  310. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/datasets/presets.py +0 -0
  311. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/datasets/providers/__init__.py +0 -0
  312. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/errors.py +0 -0
  313. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/__init__.py +0 -0
  314. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/craft_adversarial_data/__init__.py +0 -0
  315. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/craft_adversarial_data/profile.py +0 -0
  316. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/craft_adversarial_data/types.py +0 -0
  317. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/craft_adversarial_data/vulnerabilities.py +0 -0
  318. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/credential_exposure/__init__.py +0 -0
  319. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/credential_exposure/profile.py +0 -0
  320. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/credential_exposure/types.py +0 -0
  321. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/credential_exposure/vulnerabilities.py +0 -0
  322. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/excessive_agency/__init__.py +0 -0
  323. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/excessive_agency/profile.py +0 -0
  324. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/excessive_agency/types.py +0 -0
  325. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/excessive_agency/vulnerabilities.py +0 -0
  326. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/input_manipulation_attack/__init__.py +0 -0
  327. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/input_manipulation_attack/profile.py +0 -0
  328. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/input_manipulation_attack/types.py +0 -0
  329. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/input_manipulation_attack/vulnerabilities.py +0 -0
  330. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/jailbreak/__init__.py +0 -0
  331. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/jailbreak/profile.py +0 -0
  332. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/jailbreak/types.py +0 -0
  333. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/jailbreak/vulnerabilities.py +0 -0
  334. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/malicious_tool_invocation/__init__.py +0 -0
  335. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/malicious_tool_invocation/profile.py +0 -0
  336. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/malicious_tool_invocation/types.py +0 -0
  337. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/malicious_tool_invocation/vulnerabilities.py +0 -0
  338. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/misinformation/__init__.py +0 -0
  339. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/misinformation/profile.py +0 -0
  340. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/misinformation/types.py +0 -0
  341. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/misinformation/vulnerabilities.py +0 -0
  342. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/model_evasion/__init__.py +0 -0
  343. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/model_evasion/profile.py +0 -0
  344. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/model_evasion/types.py +0 -0
  345. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/model_evasion/vulnerabilities.py +0 -0
  346. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/profile_helpers.py +0 -0
  347. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/profile_types.py +0 -0
  348. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/prompt_injection/__init__.py +0 -0
  349. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/prompt_injection/profile.py +0 -0
  350. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/prompt_injection/templates.py +0 -0
  351. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/prompt_injection/types.py +0 -0
  352. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/prompt_injection/vulnerabilities.py +0 -0
  353. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/public_facing_application_exploitation/__init__.py +0 -0
  354. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/public_facing_application_exploitation/profile.py +0 -0
  355. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/public_facing_application_exploitation/types.py +0 -0
  356. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/public_facing_application_exploitation/vulnerabilities.py +0 -0
  357. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/registry.py +0 -0
  358. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/sensitive_information_disclosure/__init__.py +0 -0
  359. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/sensitive_information_disclosure/profile.py +0 -0
  360. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/sensitive_information_disclosure/types.py +0 -0
  361. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/sensitive_information_disclosure/vulnerabilities.py +0 -0
  362. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/system_prompt_leakage/__init__.py +0 -0
  363. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/system_prompt_leakage/profile.py +0 -0
  364. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/system_prompt_leakage/types.py +0 -0
  365. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/system_prompt_leakage/vulnerabilities.py +0 -0
  366. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/utils.py +0 -0
  367. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/vector_embedding_weaknesses_exploit/__init__.py +0 -0
  368. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/vector_embedding_weaknesses_exploit/profile.py +0 -0
  369. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/vector_embedding_weaknesses_exploit/types.py +0 -0
  370. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/risks/vector_embedding_weaknesses_exploit/vulnerabilities.py +0 -0
  371. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/__init__.py +0 -0
  372. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/adapters/__init__.py +0 -0
  373. {hackagent-0.5.0 → hackagent-0.7.0}/hackagent/router/tracking/__init__.py +0 -0
  374. {hackagent-0.5.0/hackagent → hackagent-0.7.0/hackagent/server}/api/__init__.py +0 -0
@@ -4,6 +4,7 @@ logs/
4
4
  .ruff_cache/
5
5
  reports/
6
6
  .adk/
7
+ slurm/
7
8
 
8
9
  # Editors
9
10
  .vscode/
@@ -129,4 +130,7 @@ venv.bak/
129
130
  # mypy
130
131
  .mypy_cache/
131
132
  .dmypy.json
132
- dmypy.json
133
+ dmypy.json
134
+
135
+
136
+ .copilotignore
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hackagent
3
- Version: 0.5.0
3
+ Version: 0.7.0
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
@@ -15,18 +15,19 @@ Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
16
  Classifier: Programming Language :: Python :: 3.13
17
17
  Requires-Python: >=3.10
18
- Requires-Dist: attrs>=21.0.0
19
18
  Requires-Dist: click>=8.1.0
19
+ Requires-Dist: datasets>=2.14.0
20
+ Requires-Dist: faiss-cpu>=1.13.2
21
+ Requires-Dist: httpx>=0.27.0
20
22
  Requires-Dist: litellm>=1.69.2
23
+ Requires-Dist: nicegui>=2.0
21
24
  Requires-Dist: openai>=1.0.0
22
- Requires-Dist: pydantic>=2.0
25
+ Requires-Dist: pydantic[email]>=2.0
23
26
  Requires-Dist: python-dateutil>=2.8.0
24
27
  Requires-Dist: pyyaml>=6.0.0
25
28
  Requires-Dist: requests>=2.31.0
26
29
  Requires-Dist: rich>=14.0.0
27
30
  Requires-Dist: textual>=1.0.0
28
- Provides-Extra: datasets
29
- Requires-Dist: datasets>=2.14.0; extra == 'datasets'
30
31
  Description-Content-Type: text/markdown
31
32
 
32
33
  <div align="center">
@@ -0,0 +1,25 @@
1
+ # Copyright 2026 - AI4I. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """A client library for accessing HackAgent API"""
5
+
6
+ from .agent import HackAgent
7
+ from .server.client import AuthenticatedClient, Client
8
+ from .logger import setup_package_logging
9
+ from .router.types import AgentTypeEnum
10
+ from .server.storage.base import StorageBackend
11
+ from .server.storage.local import LocalBackend
12
+ from .server.storage.remote import RemoteBackend
13
+
14
+ # Configure RichHandler for all hackagent.* loggers on first import.
15
+ setup_package_logging()
16
+
17
+ __all__ = (
18
+ "AgentTypeEnum",
19
+ "AuthenticatedClient",
20
+ "Client",
21
+ "HackAgent",
22
+ "LocalBackend",
23
+ "RemoteBackend",
24
+ "StorageBackend",
25
+ )
@@ -1,20 +1,36 @@
1
1
  # Copyright 2026 - AI4I. All rights reserved.
2
2
  # SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import logging
4
+ 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.client import AuthenticatedClient
9
8
  from hackagent.errors import HackAgentError
10
9
  from hackagent.router import AgentRouter
11
10
  from hackagent.router.types import AgentTypeEnum
11
+ from hackagent.server.storage.base import StorageBackend
12
12
 
13
13
  # Lazy import for attack orchestrators to avoid ~0.5s startup delay
14
14
  if TYPE_CHECKING:
15
15
  pass
16
16
 
17
- logger = logging.getLogger(__name__)
17
+ logger = get_logger(__name__)
18
+
19
+
20
+ def _resolve_target_config(target_config: Optional[Dict[str, Any]]) -> Dict[str, Any]:
21
+ """Return normalized victim request defaults for the configured router."""
22
+ from hackagent.attacks.techniques.config import default_target
23
+
24
+ resolved = default_target()
25
+ if not target_config:
26
+ return resolved
27
+
28
+ merged = {key: value for key, value in target_config.items() if value is not None}
29
+ if "request_timeout" in merged and "timeout" not in merged:
30
+ merged["timeout"] = merged.pop("request_timeout")
31
+
32
+ resolved.update(merged)
33
+ return resolved
18
34
 
19
35
 
20
36
  class HackAgent:
@@ -50,6 +66,7 @@ class HackAgent:
50
66
  raise_on_unexpected_status: bool = False,
51
67
  timeout: Optional[float] = None,
52
68
  metadata: Optional[Dict[str, Any]] = None,
69
+ target_config: Optional[Dict[str, Any]] = None,
53
70
  adapter_operational_config: Optional[Dict[str, Any]] = None,
54
71
  ):
55
72
  """
@@ -84,32 +101,70 @@ class HackAgent:
84
101
  authenticated client. Defaults to `None` (which might mean a
85
102
  default timeout from the underlying HTTP library is used).
86
103
  metadata: Optional dictionary containing agent-specific metadata.
104
+ target_config: Optional default request settings for the configured
105
+ victim model. This is the preferred place to define target-side
106
+ generation defaults such as `max_tokens`, `temperature`,
107
+ and `timeout`.
87
108
  adapter_operational_config: Optional configuration for the agent adapter.
88
109
  """
89
110
 
90
111
  resolved_auth_token = utils.resolve_api_token(direct_api_key_param=api_key)
91
112
 
92
- # Use default base_url if not provided
93
- if base_url is None:
94
- base_url = "https://api.hackagent.dev"
113
+ if resolved_auth_token:
114
+ from hackagent.server.client import AuthenticatedClient
115
+ from hackagent.server.storage.remote import RemoteBackend
95
116
 
96
- self.client = AuthenticatedClient(
97
- base_url=base_url,
98
- token=resolved_auth_token,
99
- prefix="Bearer",
100
- raise_on_unexpected_status=raise_on_unexpected_status,
101
- timeout=timeout,
102
- )
117
+ _base_url = base_url or "https://api.hackagent.dev"
118
+ _client = AuthenticatedClient(
119
+ base_url=_base_url,
120
+ token=resolved_auth_token,
121
+ prefix="Bearer",
122
+ raise_on_unexpected_status=raise_on_unexpected_status,
123
+ timeout=timeout,
124
+ )
125
+ self.backend: StorageBackend = RemoteBackend(_client)
126
+ logger.info("HackAgent using remote backend → %s", _base_url)
127
+ else:
128
+ from hackagent.server.storage.local import LocalBackend
129
+
130
+ self.backend = LocalBackend()
131
+ logger.info(
132
+ "HackAgent using local backend → ~/.local/share/hackagent/hackagent.db"
133
+ )
134
+
135
+ # Keep self.client as the raw HTTP client for backward compat
136
+ # (adapters that need it can access it via backend.get_api_key())
137
+ self.client = getattr(self.backend, "_client", None)
103
138
 
104
139
  processed_agent_type = utils.resolve_agent_type(agent_type)
140
+ self.target_config = _resolve_target_config(target_config)
141
+ explicit_target_config = (
142
+ {
143
+ key: value
144
+ for key, value in (target_config or {}).items()
145
+ if value is not None
146
+ }
147
+ if target_config
148
+ else {}
149
+ )
150
+
151
+ router_metadata = {
152
+ key: value
153
+ for key, value in {**(metadata or {}), **explicit_target_config}.items()
154
+ if value is not None
155
+ }
156
+ router_operational_config = {
157
+ **self.target_config,
158
+ **(adapter_operational_config or {}),
159
+ }
105
160
 
106
161
  self.router = AgentRouter(
107
- client=self.client,
108
- name=name,
162
+ backend=self.backend,
163
+ name=name or endpoint, # fall back to endpoint if no name provided
109
164
  agent_type=processed_agent_type,
110
165
  endpoint=endpoint,
111
- metadata=metadata,
112
- adapter_operational_config=adapter_operational_config,
166
+ metadata=router_metadata,
167
+ adapter_operational_config=router_operational_config,
113
168
  )
114
169
 
115
170
  # Attack strategies are lazy-loaded to improve startup time
@@ -122,16 +177,28 @@ class HackAgent:
122
177
  # Import here to avoid circular imports and improve startup time
123
178
  from hackagent.attacks.registry import (
124
179
  AdvPrefixOrchestrator,
180
+ AutoDANTurboOrchestrator,
125
181
  BaselineOrchestrator,
182
+ BoNOrchestrator,
183
+ CipherChatOrchestrator,
184
+ H4rm3lOrchestrator,
185
+ PAPOrchestrator,
126
186
  PAIROrchestrator,
127
187
  FlipAttackOrchestrator,
188
+ TAPOrchestrator,
128
189
  )
129
190
 
130
191
  self._attack_strategies = {
131
192
  "advprefix": AdvPrefixOrchestrator(hack_agent=self),
193
+ "autodan_turbo": AutoDANTurboOrchestrator(hack_agent=self),
132
194
  "baseline": BaselineOrchestrator(hack_agent=self),
195
+ "bon": BoNOrchestrator(hack_agent=self),
196
+ "cipherchat": CipherChatOrchestrator(hack_agent=self),
133
197
  "pair": PAIROrchestrator(hack_agent=self),
134
198
  "flipattack": FlipAttackOrchestrator(hack_agent=self),
199
+ "tap": TAPOrchestrator(hack_agent=self),
200
+ "h4rm3l": H4rm3lOrchestrator(hack_agent=self),
201
+ "pap": PAPOrchestrator(hack_agent=self),
135
202
  }
136
203
  return self._attack_strategies
137
204
 
@@ -33,13 +33,21 @@ The module integrates with the HackAgent backend for result tracking and reporti
33
33
  from .registry import (
34
34
  ATTACK_REGISTRY,
35
35
  AdvPrefixOrchestrator,
36
+ AutoDANTurboOrchestrator,
36
37
  BaselineOrchestrator,
38
+ CipherChatOrchestrator,
37
39
  PAIROrchestrator,
40
+ FlipAttackOrchestrator,
41
+ TAPOrchestrator,
38
42
  )
39
43
 
40
44
  __all__ = [
41
45
  "ATTACK_REGISTRY",
42
46
  "AdvPrefixOrchestrator",
47
+ "AutoDANTurboOrchestrator",
43
48
  "BaselineOrchestrator",
49
+ "CipherChatOrchestrator",
44
50
  "PAIROrchestrator",
51
+ "FlipAttackOrchestrator",
52
+ "TAPOrchestrator",
45
53
  ]
@@ -23,6 +23,7 @@ Usage:
23
23
  NuancedEvaluator,
24
24
  JailbreakBenchEvaluator,
25
25
  HarmBenchEvaluator,
26
+ HarmBenchVariantEvaluator,
26
27
  EVALUATOR_MAP,
27
28
  AssertionResult,
28
29
  # Pattern-based evaluators
@@ -33,6 +34,10 @@ Usage:
33
34
  calculate_success_rate,
34
35
  calculate_per_goal_metrics,
35
36
  generate_summary_report,
37
+ calculate_confidence_score,
38
+ calculate_majority_vote_asr,
39
+ calculate_fleiss_kappa,
40
+ calculate_per_judge_strictness,
36
41
  # Server sync
37
42
  sync_evaluation_to_server,
38
43
  update_single_result,
@@ -44,8 +49,10 @@ from hackagent.attacks.evaluator.evaluation_step import BaseEvaluationStep
44
49
  from hackagent.attacks.evaluator.judge_evaluators import (
45
50
  EVALUATOR_MAP,
46
51
  HarmBenchEvaluator,
52
+ HarmBenchVariantEvaluator,
47
53
  JailbreakBenchEvaluator,
48
54
  NuancedEvaluator,
55
+ OnTopicEvaluator,
49
56
  )
50
57
  from hackagent.attacks.evaluator.metrics import (
51
58
  calculate_confidence_score,
@@ -53,6 +60,9 @@ from hackagent.attacks.evaluator.metrics import (
53
60
  calculate_success_rate,
54
61
  generate_summary_report,
55
62
  group_by_goal,
63
+ calculate_majority_vote_asr,
64
+ calculate_fleiss_kappa,
65
+ calculate_per_judge_strictness,
56
66
  )
57
67
  from hackagent.attacks.evaluator.pattern_evaluators import (
58
68
  KeywordEvaluator,
@@ -73,6 +83,8 @@ __all__ = [
73
83
  "NuancedEvaluator",
74
84
  "JailbreakBenchEvaluator",
75
85
  "HarmBenchEvaluator",
86
+ "HarmBenchVariantEvaluator",
87
+ "OnTopicEvaluator",
76
88
  "EVALUATOR_MAP",
77
89
  # Pattern evaluators
78
90
  "PatternEvaluator",
@@ -84,6 +96,9 @@ __all__ = [
84
96
  "calculate_per_goal_metrics",
85
97
  "generate_summary_report",
86
98
  "group_by_goal",
99
+ "calculate_majority_vote_asr",
100
+ "calculate_fleiss_kappa",
101
+ "calculate_per_judge_strictness",
87
102
  # Sync
88
103
  "sync_evaluation_to_server",
89
104
  "update_single_result",