hunterxsec 7.0.0__py3-none-any.whl

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 (841) hide show
  1. hunterx/__init__.py +45 -0
  2. hunterx/agents/__init__.py +30 -0
  3. hunterx/agents/base.py +71 -0
  4. hunterx/agents/capabilities.py +27 -0
  5. hunterx/agents/context.py +27 -0
  6. hunterx/agents/coordinator.py +55 -0
  7. hunterx/agents/events.py +28 -0
  8. hunterx/agents/memory.py +51 -0
  9. hunterx/agents/messaging.py +32 -0
  10. hunterx/agents/orchestrator.py +59 -0
  11. hunterx/agents/registry.py +44 -0
  12. hunterx/agents/scheduler.py +95 -0
  13. hunterx/agents/state.py +17 -0
  14. hunterx/api/__init__.py +16 -0
  15. hunterx/api/adaptive_mission_planning.py +123 -0
  16. hunterx/api/app.py +123 -0
  17. hunterx/api/auth.py +90 -0
  18. hunterx/api/deps.py +55 -0
  19. hunterx/api/finding.py +146 -0
  20. hunterx/api/middleware.py +59 -0
  21. hunterx/api/mission_dashboard.py +51 -0
  22. hunterx/api/mission_orchestration.py +201 -0
  23. hunterx/api/reporting.py +129 -0
  24. hunterx/api/router.py +90 -0
  25. hunterx/api/schemas.py +29 -0
  26. hunterx/api/target_memory.py +127 -0
  27. hunterx/api/tools.py +222 -0
  28. hunterx/application/__init__.py +35 -0
  29. hunterx/application/adaptive_mission_planning.py +850 -0
  30. hunterx/application/auth.py +1837 -0
  31. hunterx/application/authorization.py +2005 -0
  32. hunterx/application/cloud.py +2294 -0
  33. hunterx/application/crawl.py +1099 -0
  34. hunterx/application/dns.py +617 -0
  35. hunterx/application/dto.py +48 -0
  36. hunterx/application/findings.py +55 -0
  37. hunterx/application/javascript.py +1255 -0
  38. hunterx/application/livehost.py +602 -0
  39. hunterx/application/mission_dashboard.py +255 -0
  40. hunterx/application/mission_orchestration.py +911 -0
  41. hunterx/application/mission_planning.py +114 -0
  42. hunterx/application/missions.py +102 -0
  43. hunterx/application/observability.py +184 -0
  44. hunterx/application/orchestration.py +87 -0
  45. hunterx/application/professional_reporting.py +1666 -0
  46. hunterx/application/recon.py +475 -0
  47. hunterx/application/reports.py +46 -0
  48. hunterx/application/target_intelligence.py +1026 -0
  49. hunterx/application/target_memory.py +1594 -0
  50. hunterx/application/technology.py +1068 -0
  51. hunterx/application/tool_factory.py +102 -0
  52. hunterx/application/toolchain.py +1012 -0
  53. hunterx/application/topology.py +767 -0
  54. hunterx/application/vulnerability.py +1187 -0
  55. hunterx/application/vulnerability_finding.py +1987 -0
  56. hunterx/application/vulnerability_proof.py +2424 -0
  57. hunterx/application/vulnerability_proof_strategy.py +854 -0
  58. hunterx/application/vulnerability_validation.py +1906 -0
  59. hunterx/architecture/__init__.py +35 -0
  60. hunterx/architecture/__main__.py +13 -0
  61. hunterx/architecture/cli.py +266 -0
  62. hunterx/architecture/cycles.py +151 -0
  63. hunterx/architecture/docs.py +125 -0
  64. hunterx/architecture/imports.py +225 -0
  65. hunterx/architecture/layers.py +236 -0
  66. hunterx/architecture/lint.py +439 -0
  67. hunterx/architecture/policy.py +535 -0
  68. hunterx/architecture/report.py +218 -0
  69. hunterx/architecture/stability.py +234 -0
  70. hunterx/architecture/violations.py +151 -0
  71. hunterx/cache.py +12 -0
  72. hunterx/cli/__init__.py +17 -0
  73. hunterx/cli/app.py +66 -0
  74. hunterx/cli/commands.py +836 -0
  75. hunterx/cli/registry.py +61 -0
  76. hunterx/cli/render.py +76 -0
  77. hunterx/config/__init__.py +30 -0
  78. hunterx/config/hunterx.yaml +34 -0
  79. hunterx/config/loader.py +150 -0
  80. hunterx/config/settings.py +108 -0
  81. hunterx/domain/__init__.py +15 -0
  82. hunterx/domain/adaptive_mission_planning/__init__.py +182 -0
  83. hunterx/domain/adaptive_mission_planning/attack_path.py +317 -0
  84. hunterx/domain/adaptive_mission_planning/catalog.py +179 -0
  85. hunterx/domain/adaptive_mission_planning/checkpoint.py +65 -0
  86. hunterx/domain/adaptive_mission_planning/decision.py +380 -0
  87. hunterx/domain/adaptive_mission_planning/enums.py +345 -0
  88. hunterx/domain/adaptive_mission_planning/graph.py +335 -0
  89. hunterx/domain/adaptive_mission_planning/mission.py +222 -0
  90. hunterx/domain/adaptive_mission_planning/models.py +836 -0
  91. hunterx/domain/adaptive_mission_planning/objective.py +377 -0
  92. hunterx/domain/adaptive_mission_planning/policy.py +299 -0
  93. hunterx/domain/adaptive_mission_planning/replan.py +340 -0
  94. hunterx/domain/adaptive_mission_planning/resource.py +101 -0
  95. hunterx/domain/adaptive_mission_planning/scoring.py +176 -0
  96. hunterx/domain/adaptive_mission_planning/state.py +173 -0
  97. hunterx/domain/adaptive_mission_planning/toolchain.py +299 -0
  98. hunterx/domain/api/__init__.py +89 -0
  99. hunterx/domain/api/classification.py +174 -0
  100. hunterx/domain/api/confidence.py +141 -0
  101. hunterx/domain/api/conflicts.py +107 -0
  102. hunterx/domain/api/correlator.py +214 -0
  103. hunterx/domain/api/history.py +278 -0
  104. hunterx/domain/api/models.py +1305 -0
  105. hunterx/domain/api/parsers/__init__.py +34 -0
  106. hunterx/domain/api/parsers/graphql.py +173 -0
  107. hunterx/domain/api/parsers/hints.py +462 -0
  108. hunterx/domain/api/parsers/openapi.py +445 -0
  109. hunterx/domain/api/parsers/postman.py +236 -0
  110. hunterx/domain/api/parsers/soap.py +215 -0
  111. hunterx/domain/api/parsers/websocket.py +106 -0
  112. hunterx/domain/api/scope.py +222 -0
  113. hunterx/domain/api/strategy.py +138 -0
  114. hunterx/domain/api/validator.py +77 -0
  115. hunterx/domain/auth/__init__.py +138 -0
  116. hunterx/domain/auth/analyzer.py +2476 -0
  117. hunterx/domain/auth/classification.py +109 -0
  118. hunterx/domain/auth/confidence.py +151 -0
  119. hunterx/domain/auth/correlator.py +228 -0
  120. hunterx/domain/auth/history.py +205 -0
  121. hunterx/domain/auth/models.py +1658 -0
  122. hunterx/domain/auth/scope.py +228 -0
  123. hunterx/domain/auth/strategy.py +144 -0
  124. hunterx/domain/auth/validator.py +93 -0
  125. hunterx/domain/authorization/__init__.py +185 -0
  126. hunterx/domain/authorization/analyzer.py +2829 -0
  127. hunterx/domain/authorization/classification.py +147 -0
  128. hunterx/domain/authorization/confidence.py +152 -0
  129. hunterx/domain/authorization/correlator.py +261 -0
  130. hunterx/domain/authorization/history.py +223 -0
  131. hunterx/domain/authorization/models.py +1831 -0
  132. hunterx/domain/authorization/scope.py +228 -0
  133. hunterx/domain/authorization/strategy.py +147 -0
  134. hunterx/domain/authorization/validator.py +93 -0
  135. hunterx/domain/cloud/__init__.py +157 -0
  136. hunterx/domain/cloud/analyzer.py +1540 -0
  137. hunterx/domain/cloud/classification.py +321 -0
  138. hunterx/domain/cloud/confidence.py +145 -0
  139. hunterx/domain/cloud/conflicts.py +119 -0
  140. hunterx/domain/cloud/correlator.py +211 -0
  141. hunterx/domain/cloud/history.py +215 -0
  142. hunterx/domain/cloud/models.py +1782 -0
  143. hunterx/domain/cloud/providers.py +2956 -0
  144. hunterx/domain/cloud/redaction.py +123 -0
  145. hunterx/domain/cloud/scope.py +199 -0
  146. hunterx/domain/cloud/strategy.py +85 -0
  147. hunterx/domain/cloud/validator.py +104 -0
  148. hunterx/domain/dns/__init__.py +81 -0
  149. hunterx/domain/dns/confidence.py +148 -0
  150. hunterx/domain/dns/conflicts.py +101 -0
  151. hunterx/domain/dns/correlator.py +194 -0
  152. hunterx/domain/dns/dnssec.py +167 -0
  153. hunterx/domain/dns/history.py +150 -0
  154. hunterx/domain/dns/mail.py +200 -0
  155. hunterx/domain/dns/models.py +679 -0
  156. hunterx/domain/dns/normalizer.py +192 -0
  157. hunterx/domain/dns/scope.py +181 -0
  158. hunterx/domain/dns/strategy.py +158 -0
  159. hunterx/domain/dns/validator.py +142 -0
  160. hunterx/domain/dns/wildcard.py +182 -0
  161. hunterx/domain/entities/__init__.py +43 -0
  162. hunterx/domain/entities/_tidb_fields.py +111 -0
  163. hunterx/domain/entities/asset.py +46 -0
  164. hunterx/domain/entities/dashboard.py +129 -0
  165. hunterx/domain/entities/evidence.py +66 -0
  166. hunterx/domain/entities/finding.py +129 -0
  167. hunterx/domain/entities/mission.py +130 -0
  168. hunterx/domain/entities/report.py +71 -0
  169. hunterx/domain/entities/scan.py +60 -0
  170. hunterx/domain/entities/target.py +74 -0
  171. hunterx/domain/entities/tidb/__init__.py +897 -0
  172. hunterx/domain/entities/tidb/_base.py +90 -0
  173. hunterx/domain/entities/tidb/adaptive_mission_planning.py +260 -0
  174. hunterx/domain/entities/tidb/api.py +152 -0
  175. hunterx/domain/entities/tidb/api_intelligence.py +506 -0
  176. hunterx/domain/entities/tidb/audit.py +146 -0
  177. hunterx/domain/entities/tidb/auth_intelligence.py +715 -0
  178. hunterx/domain/entities/tidb/authorization_intelligence.py +555 -0
  179. hunterx/domain/entities/tidb/cloud_intelligence.py +878 -0
  180. hunterx/domain/entities/tidb/core.py +135 -0
  181. hunterx/domain/entities/tidb/execution.py +197 -0
  182. hunterx/domain/entities/tidb/finding_orchestration.py +469 -0
  183. hunterx/domain/entities/tidb/findings.py +207 -0
  184. hunterx/domain/entities/tidb/javascript_intelligence.py +506 -0
  185. hunterx/domain/entities/tidb/knowledge.py +201 -0
  186. hunterx/domain/entities/tidb/memory.py +403 -0
  187. hunterx/domain/entities/tidb/mission_orchestration.py +311 -0
  188. hunterx/domain/entities/tidb/network.py +841 -0
  189. hunterx/domain/entities/tidb/orchestration.py +383 -0
  190. hunterx/domain/entities/tidb/proof.py +299 -0
  191. hunterx/domain/entities/tidb/proof_strategy.py +170 -0
  192. hunterx/domain/entities/tidb/reporting.py +107 -0
  193. hunterx/domain/entities/tidb/reporting_intelligence.py +278 -0
  194. hunterx/domain/entities/tidb/security.py +165 -0
  195. hunterx/domain/entities/tidb/target_intelligence.py +510 -0
  196. hunterx/domain/entities/tidb/technology.py +273 -0
  197. hunterx/domain/entities/tidb/topology.py +176 -0
  198. hunterx/domain/entities/tidb/users.py +116 -0
  199. hunterx/domain/entities/tidb/validation.py +265 -0
  200. hunterx/domain/entities/tidb/vulnerability.py +650 -0
  201. hunterx/domain/entities/tidb/web.py +413 -0
  202. hunterx/domain/entities/tidb/web_crawl.py +279 -0
  203. hunterx/domain/events/__init__.py +89 -0
  204. hunterx/domain/events/audit.py +142 -0
  205. hunterx/domain/events/catalog.py +876 -0
  206. hunterx/domain/events/enums.py +81 -0
  207. hunterx/domain/events/spec.py +114 -0
  208. hunterx/domain/events/types.py +8839 -0
  209. hunterx/domain/exceptions/__init__.py +192 -0
  210. hunterx/domain/exceptions/adaptive_mission_planning.py +62 -0
  211. hunterx/domain/exceptions/base.py +56 -0
  212. hunterx/domain/exceptions/config.py +30 -0
  213. hunterx/domain/exceptions/domain.py +45 -0
  214. hunterx/domain/exceptions/factory.py +106 -0
  215. hunterx/domain/exceptions/infrastructure.py +75 -0
  216. hunterx/domain/exceptions/operation.py +229 -0
  217. hunterx/domain/exceptions/orchestration.py +71 -0
  218. hunterx/domain/exceptions/planning.py +86 -0
  219. hunterx/domain/execution.py +395 -0
  220. hunterx/domain/javascript/__init__.py +199 -0
  221. hunterx/domain/javascript/analyzers.py +1041 -0
  222. hunterx/domain/javascript/confidence.py +88 -0
  223. hunterx/domain/javascript/conflicts.py +113 -0
  224. hunterx/domain/javascript/correlator.py +238 -0
  225. hunterx/domain/javascript/history.py +136 -0
  226. hunterx/domain/javascript/models.py +2182 -0
  227. hunterx/domain/javascript/normalizer.py +130 -0
  228. hunterx/domain/javascript/rules.py +729 -0
  229. hunterx/domain/javascript/scope.py +150 -0
  230. hunterx/domain/javascript/secrets.py +269 -0
  231. hunterx/domain/javascript/strategy.py +124 -0
  232. hunterx/domain/javascript/technology.py +362 -0
  233. hunterx/domain/javascript/tokenizer.py +417 -0
  234. hunterx/domain/livehost/__init__.py +87 -0
  235. hunterx/domain/livehost/confidence.py +192 -0
  236. hunterx/domain/livehost/conflicts.py +80 -0
  237. hunterx/domain/livehost/correlator.py +399 -0
  238. hunterx/domain/livehost/history.py +180 -0
  239. hunterx/domain/livehost/models.py +1201 -0
  240. hunterx/domain/livehost/normalizer.py +161 -0
  241. hunterx/domain/livehost/scope.py +248 -0
  242. hunterx/domain/livehost/strategy.py +123 -0
  243. hunterx/domain/livehost/validator.py +180 -0
  244. hunterx/domain/mission_orchestration/__init__.py +155 -0
  245. hunterx/domain/mission_orchestration/baseline.py +257 -0
  246. hunterx/domain/mission_orchestration/branch.py +87 -0
  247. hunterx/domain/mission_orchestration/cascade.py +198 -0
  248. hunterx/domain/mission_orchestration/confidence.py +161 -0
  249. hunterx/domain/mission_orchestration/coverage.py +100 -0
  250. hunterx/domain/mission_orchestration/decision.py +266 -0
  251. hunterx/domain/mission_orchestration/enums.py +269 -0
  252. hunterx/domain/mission_orchestration/gap.py +169 -0
  253. hunterx/domain/mission_orchestration/hypothesis.py +241 -0
  254. hunterx/domain/mission_orchestration/impact.py +125 -0
  255. hunterx/domain/mission_orchestration/mission.py +326 -0
  256. hunterx/domain/mission_orchestration/models.py +860 -0
  257. hunterx/domain/mission_orchestration/negative.py +133 -0
  258. hunterx/domain/mission_orchestration/objective.py +55 -0
  259. hunterx/domain/mission_orchestration/orchestrator.py +1178 -0
  260. hunterx/domain/mission_orchestration/policy.py +152 -0
  261. hunterx/domain/mission_orchestration/telemetry.py +119 -0
  262. hunterx/domain/mission_orchestration/trace.py +85 -0
  263. hunterx/domain/mission_planning.py +775 -0
  264. hunterx/domain/orchestration/__init__.py +89 -0
  265. hunterx/domain/orchestration/enums.py +207 -0
  266. hunterx/domain/orchestration/models.py +549 -0
  267. hunterx/domain/orchestration/selection.py +131 -0
  268. hunterx/domain/plugins.py +41 -0
  269. hunterx/domain/ports/__init__.py +80 -0
  270. hunterx/domain/ports/messaging.py +70 -0
  271. hunterx/domain/ports/mission_planning.py +127 -0
  272. hunterx/domain/ports/observability.py +205 -0
  273. hunterx/domain/ports/orchestration.py +81 -0
  274. hunterx/domain/ports/reporting.py +29 -0
  275. hunterx/domain/ports/repositories.py +158 -0
  276. hunterx/domain/ports/services.py +104 -0
  277. hunterx/domain/ports/stores.py +84 -0
  278. hunterx/domain/ports/tidb_repositories.py +89 -0
  279. hunterx/domain/ports/tool_factory.py +56 -0
  280. hunterx/domain/ports/tool_intelligence.py +104 -0
  281. hunterx/domain/ports/tool_mastery.py +149 -0
  282. hunterx/domain/recon/__init__.py +35 -0
  283. hunterx/domain/recon/confidence.py +142 -0
  284. hunterx/domain/recon/correlator.py +137 -0
  285. hunterx/domain/recon/models.py +275 -0
  286. hunterx/domain/reporting/__init__.py +36 -0
  287. hunterx/domain/reporting/claims.py +211 -0
  288. hunterx/domain/reporting/classification.py +253 -0
  289. hunterx/domain/reporting/correlation.py +88 -0
  290. hunterx/domain/reporting/enums.py +289 -0
  291. hunterx/domain/reporting/evidence.py +161 -0
  292. hunterx/domain/reporting/executive.py +92 -0
  293. hunterx/domain/reporting/lifecycle.py +259 -0
  294. hunterx/domain/reporting/models.py +2323 -0
  295. hunterx/domain/reporting/prioritization.py +179 -0
  296. hunterx/domain/reporting/qa.py +301 -0
  297. hunterx/domain/reporting/quality.py +247 -0
  298. hunterx/domain/reporting/redaction.py +124 -0
  299. hunterx/domain/reporting/remediation.py +199 -0
  300. hunterx/domain/reporting/reportability.py +137 -0
  301. hunterx/domain/reporting/retest.py +83 -0
  302. hunterx/domain/reporting/severity.py +232 -0
  303. hunterx/domain/reporting/source.py +78 -0
  304. hunterx/domain/reporting/templates.py +205 -0
  305. hunterx/domain/reporting/timeline.py +74 -0
  306. hunterx/domain/services/__init__.py +27 -0
  307. hunterx/domain/services/correlator.py +40 -0
  308. hunterx/domain/services/deduplicator.py +18 -0
  309. hunterx/domain/services/planner.py +56 -0
  310. hunterx/domain/services/risk.py +19 -0
  311. hunterx/domain/services/validation.py +149 -0
  312. hunterx/domain/target_intelligence/__init__.py +170 -0
  313. hunterx/domain/target_intelligence/actions.py +580 -0
  314. hunterx/domain/target_intelligence/conflicts.py +160 -0
  315. hunterx/domain/target_intelligence/correlation.py +165 -0
  316. hunterx/domain/target_intelligence/coverage.py +400 -0
  317. hunterx/domain/target_intelligence/enums.py +478 -0
  318. hunterx/domain/target_intelligence/graph.py +231 -0
  319. hunterx/domain/target_intelligence/history.py +289 -0
  320. hunterx/domain/target_intelligence/hypotheses.py +453 -0
  321. hunterx/domain/target_intelligence/models.py +1304 -0
  322. hunterx/domain/target_intelligence/replay.py +206 -0
  323. hunterx/domain/target_intelligence/scope.py +129 -0
  324. hunterx/domain/target_intelligence/state.py +171 -0
  325. hunterx/domain/target_intelligence/stores.py +271 -0
  326. hunterx/domain/target_intelligence/unknowns.py +312 -0
  327. hunterx/domain/target_memory/__init__.py +135 -0
  328. hunterx/domain/target_memory/engines.py +1018 -0
  329. hunterx/domain/target_memory/enums.py +231 -0
  330. hunterx/domain/target_memory/models.py +1061 -0
  331. hunterx/domain/technology/__init__.py +130 -0
  332. hunterx/domain/technology/confidence.py +195 -0
  333. hunterx/domain/technology/conflicts.py +130 -0
  334. hunterx/domain/technology/correlator.py +223 -0
  335. hunterx/domain/technology/detector.py +341 -0
  336. hunterx/domain/technology/history.py +149 -0
  337. hunterx/domain/technology/models.py +730 -0
  338. hunterx/domain/technology/normalizer.py +79 -0
  339. hunterx/domain/technology/resolver.py +187 -0
  340. hunterx/domain/technology/scope.py +224 -0
  341. hunterx/domain/technology/signatures.py +293 -0
  342. hunterx/domain/technology/strategy.py +140 -0
  343. hunterx/domain/technology/taxonomy.py +771 -0
  344. hunterx/domain/technology/validator.py +122 -0
  345. hunterx/domain/technology/version.py +145 -0
  346. hunterx/domain/tool_contract.py +148 -0
  347. hunterx/domain/tool_factory.py +688 -0
  348. hunterx/domain/tool_intelligence.py +1784 -0
  349. hunterx/domain/tool_mastery.py +419 -0
  350. hunterx/domain/tools.py +42 -0
  351. hunterx/domain/topology/__init__.py +93 -0
  352. hunterx/domain/topology/analysis.py +302 -0
  353. hunterx/domain/topology/confidence.py +98 -0
  354. hunterx/domain/topology/conflicts.py +109 -0
  355. hunterx/domain/topology/correlator.py +94 -0
  356. hunterx/domain/topology/deriver.py +459 -0
  357. hunterx/domain/topology/enums.py +178 -0
  358. hunterx/domain/topology/graph.py +215 -0
  359. hunterx/domain/topology/history.py +126 -0
  360. hunterx/domain/topology/keys.py +93 -0
  361. hunterx/domain/topology/models.py +626 -0
  362. hunterx/domain/topology/normalizer.py +56 -0
  363. hunterx/domain/topology/paths.py +90 -0
  364. hunterx/domain/topology/resolver.py +72 -0
  365. hunterx/domain/topology/scope.py +148 -0
  366. hunterx/domain/topology/strategy.py +105 -0
  367. hunterx/domain/topology/validator.py +85 -0
  368. hunterx/domain/topology/views.py +212 -0
  369. hunterx/domain/value_objects/__init__.py +37 -0
  370. hunterx/domain/value_objects/scope.py +154 -0
  371. hunterx/domain/value_objects/severity.py +58 -0
  372. hunterx/domain/vulnerability/__init__.py +153 -0
  373. hunterx/domain/vulnerability/confidence.py +71 -0
  374. hunterx/domain/vulnerability/conflicts.py +213 -0
  375. hunterx/domain/vulnerability/cpe.py +330 -0
  376. hunterx/domain/vulnerability/cvss.py +219 -0
  377. hunterx/domain/vulnerability/enums.py +170 -0
  378. hunterx/domain/vulnerability/history.py +231 -0
  379. hunterx/domain/vulnerability/knowledge.py +177 -0
  380. hunterx/domain/vulnerability/matching.py +232 -0
  381. hunterx/domain/vulnerability/models.py +1329 -0
  382. hunterx/domain/vulnerability/normalizer.py +510 -0
  383. hunterx/domain/vulnerability/purl.py +207 -0
  384. hunterx/domain/vulnerability/risk.py +209 -0
  385. hunterx/domain/vulnerability/versions.py +295 -0
  386. hunterx/domain/vulnerability_finding/__init__.py +187 -0
  387. hunterx/domain/vulnerability_finding/confidence.py +349 -0
  388. hunterx/domain/vulnerability_finding/deduplication.py +194 -0
  389. hunterx/domain/vulnerability_finding/enums.py +473 -0
  390. hunterx/domain/vulnerability_finding/evidence.py +474 -0
  391. hunterx/domain/vulnerability_finding/execution.py +243 -0
  392. hunterx/domain/vulnerability_finding/impact.py +142 -0
  393. hunterx/domain/vulnerability_finding/lifecycle.py +311 -0
  394. hunterx/domain/vulnerability_finding/models.py +1349 -0
  395. hunterx/domain/vulnerability_finding/poc.py +287 -0
  396. hunterx/domain/vulnerability_finding/redaction.py +139 -0
  397. hunterx/domain/vulnerability_finding/reporting.py +200 -0
  398. hunterx/domain/vulnerability_finding/reproduction.py +107 -0
  399. hunterx/domain/vulnerability_finding/strategy.py +627 -0
  400. hunterx/domain/vulnerability_finding/unknown.py +188 -0
  401. hunterx/domain/vulnerability_proof/__init__.py +265 -0
  402. hunterx/domain/vulnerability_proof/confidence.py +249 -0
  403. hunterx/domain/vulnerability_proof/contracts.py +420 -0
  404. hunterx/domain/vulnerability_proof/enums.py +263 -0
  405. hunterx/domain/vulnerability_proof/evidence.py +98 -0
  406. hunterx/domain/vulnerability_proof/generation.py +292 -0
  407. hunterx/domain/vulnerability_proof/impact.py +195 -0
  408. hunterx/domain/vulnerability_proof/library.py +910 -0
  409. hunterx/domain/vulnerability_proof/matrix.py +222 -0
  410. hunterx/domain/vulnerability_proof/models.py +1047 -0
  411. hunterx/domain/vulnerability_proof/planning.py +153 -0
  412. hunterx/domain/vulnerability_proof/policy.py +169 -0
  413. hunterx/domain/vulnerability_proof/quality.py +209 -0
  414. hunterx/domain/vulnerability_proof/reasoning.py +184 -0
  415. hunterx/domain/vulnerability_proof/registry.py +282 -0
  416. hunterx/domain/vulnerability_proof/replay.py +129 -0
  417. hunterx/domain/vulnerability_proof/selector.py +398 -0
  418. hunterx/domain/vulnerability_proof/state.py +170 -0
  419. hunterx/domain/vulnerability_proof/strategy.py +772 -0
  420. hunterx/domain/vulnerability_proof/temporal.py +151 -0
  421. hunterx/domain/vulnerability_proof/validator.py +670 -0
  422. hunterx/domain/vulnerability_validation/__init__.py +150 -0
  423. hunterx/domain/vulnerability_validation/enums.py +260 -0
  424. hunterx/domain/vulnerability_validation/evidence.py +140 -0
  425. hunterx/domain/vulnerability_validation/history.py +231 -0
  426. hunterx/domain/vulnerability_validation/models.py +792 -0
  427. hunterx/domain/vulnerability_validation/normalization.py +107 -0
  428. hunterx/domain/vulnerability_validation/planning.py +165 -0
  429. hunterx/domain/vulnerability_validation/rules.py +539 -0
  430. hunterx/domain/vulnerability_validation/safety.py +200 -0
  431. hunterx/domain/vulnerability_validation/scope.py +174 -0
  432. hunterx/domain/vulnerability_validation/state.py +161 -0
  433. hunterx/domain/vulnerability_validation/tool_selection.py +230 -0
  434. hunterx/domain/vulnerability_validation/verdict.py +291 -0
  435. hunterx/domain/web/__init__.py +85 -0
  436. hunterx/domain/web/confidence.py +107 -0
  437. hunterx/domain/web/correlator.py +140 -0
  438. hunterx/domain/web/history.py +173 -0
  439. hunterx/domain/web/models.py +744 -0
  440. hunterx/domain/web/parsers.py +389 -0
  441. hunterx/domain/web/policy.py +109 -0
  442. hunterx/domain/web/scope.py +230 -0
  443. hunterx/domain/web/strategy.py +143 -0
  444. hunterx/domain/web/urls.py +164 -0
  445. hunterx/engines/__init__.py +53 -0
  446. hunterx/engines/adaptive_mission_planning/engine.py +575 -0
  447. hunterx/engines/core.py +79 -0
  448. hunterx/engines/correlation.py +43 -0
  449. hunterx/engines/deduplicator.py +26 -0
  450. hunterx/engines/mission.py +96 -0
  451. hunterx/engines/mission_orchestration/__init__.py +10 -0
  452. hunterx/engines/mission_orchestration/engine.py +202 -0
  453. hunterx/engines/mission_planning/__init__.py +12 -0
  454. hunterx/engines/mission_planning/api.py +239 -0
  455. hunterx/engines/mission_planning/checkpoints.py +311 -0
  456. hunterx/engines/mission_planning/config.py +136 -0
  457. hunterx/engines/mission_planning/engine.py +374 -0
  458. hunterx/engines/mission_planning/graph.py +133 -0
  459. hunterx/engines/mission_planning/planner.py +262 -0
  460. hunterx/engines/mission_planning/profiles.py +211 -0
  461. hunterx/engines/mission_planning/state.py +272 -0
  462. hunterx/engines/mission_planning/timeline.py +165 -0
  463. hunterx/engines/orchestration/__init__.py +136 -0
  464. hunterx/engines/orchestration/api.py +113 -0
  465. hunterx/engines/orchestration/checkpoints.py +156 -0
  466. hunterx/engines/orchestration/coverage.py +245 -0
  467. hunterx/engines/orchestration/dedup.py +136 -0
  468. hunterx/engines/orchestration/engine.py +692 -0
  469. hunterx/engines/orchestration/events.py +154 -0
  470. hunterx/engines/orchestration/executor.py +632 -0
  471. hunterx/engines/orchestration/fallback.py +105 -0
  472. hunterx/engines/orchestration/graph.py +190 -0
  473. hunterx/engines/orchestration/lifecycle.py +172 -0
  474. hunterx/engines/orchestration/memory.py +172 -0
  475. hunterx/engines/orchestration/planner.py +327 -0
  476. hunterx/engines/orchestration/quality.py +238 -0
  477. hunterx/engines/orchestration/ratelimit.py +158 -0
  478. hunterx/engines/orchestration/replan.py +140 -0
  479. hunterx/engines/orchestration/retry.py +181 -0
  480. hunterx/engines/orchestration/safety.py +130 -0
  481. hunterx/engines/orchestration/scope.py +237 -0
  482. hunterx/engines/orchestration/selector.py +188 -0
  483. hunterx/engines/planner.py +55 -0
  484. hunterx/engines/reasoning.py +51 -0
  485. hunterx/engines/report.py +60 -0
  486. hunterx/engines/risk.py +40 -0
  487. hunterx/engines/target_intelligence/__init__.py +38 -0
  488. hunterx/engines/target_intelligence/engine.py +508 -0
  489. hunterx/engines/workflow.py +132 -0
  490. hunterx/events.py +30 -0
  491. hunterx/exceptions.py +11 -0
  492. hunterx/infrastructure/__init__.py +14 -0
  493. hunterx/infrastructure/ai/__init__.py +39 -0
  494. hunterx/infrastructure/cache/__init__.py +72 -0
  495. hunterx/infrastructure/db/__init__.py +8 -0
  496. hunterx/infrastructure/db/graph/__init__.py +95 -0
  497. hunterx/infrastructure/db/object_store/__init__.py +101 -0
  498. hunterx/infrastructure/db/search/__init__.py +61 -0
  499. hunterx/infrastructure/db/sql/__init__.py +38 -0
  500. hunterx/infrastructure/db/sql/crud.py +196 -0
  501. hunterx/infrastructure/db/sql/factory.py +130 -0
  502. hunterx/infrastructure/db/sql/mapping.py +92 -0
  503. hunterx/infrastructure/db/sql/memory.py +124 -0
  504. hunterx/infrastructure/db/sql/models.py +197 -0
  505. hunterx/infrastructure/db/sql/registry.py +60 -0
  506. hunterx/infrastructure/db/sql/repositories.py +394 -0
  507. hunterx/infrastructure/db/sql/tidb_models/__init__.py +880 -0
  508. hunterx/infrastructure/db/sql/tidb_models/_base.py +50 -0
  509. hunterx/infrastructure/db/sql/tidb_models/adaptive_mission_planning_models.py +258 -0
  510. hunterx/infrastructure/db/sql/tidb_models/api_intelligence_models.py +326 -0
  511. hunterx/infrastructure/db/sql/tidb_models/api_models.py +110 -0
  512. hunterx/infrastructure/db/sql/tidb_models/audit_models.py +103 -0
  513. hunterx/infrastructure/db/sql/tidb_models/auth_intelligence_models.py +496 -0
  514. hunterx/infrastructure/db/sql/tidb_models/authorization_intelligence_models.py +561 -0
  515. hunterx/infrastructure/db/sql/tidb_models/cloud_intelligence_models.py +668 -0
  516. hunterx/infrastructure/db/sql/tidb_models/core_models.py +79 -0
  517. hunterx/infrastructure/db/sql/tidb_models/execution_models.py +129 -0
  518. hunterx/infrastructure/db/sql/tidb_models/finding_models.py +129 -0
  519. hunterx/infrastructure/db/sql/tidb_models/finding_orchestration_models.py +296 -0
  520. hunterx/infrastructure/db/sql/tidb_models/javascript_intelligence_models.py +368 -0
  521. hunterx/infrastructure/db/sql/tidb_models/knowledge_models.py +124 -0
  522. hunterx/infrastructure/db/sql/tidb_models/memory_models.py +377 -0
  523. hunterx/infrastructure/db/sql/tidb_models/mission_orchestration_models.py +316 -0
  524. hunterx/infrastructure/db/sql/tidb_models/network_models.py +549 -0
  525. hunterx/infrastructure/db/sql/tidb_models/orchestration_models.py +251 -0
  526. hunterx/infrastructure/db/sql/tidb_models/proof_models.py +325 -0
  527. hunterx/infrastructure/db/sql/tidb_models/proof_strategy_models.py +179 -0
  528. hunterx/infrastructure/db/sql/tidb_models/reporting_intelligence_models.py +185 -0
  529. hunterx/infrastructure/db/sql/tidb_models/reporting_models.py +69 -0
  530. hunterx/infrastructure/db/sql/tidb_models/security_models.py +108 -0
  531. hunterx/infrastructure/db/sql/tidb_models/target_intelligence_models.py +308 -0
  532. hunterx/infrastructure/db/sql/tidb_models/technology_models.py +170 -0
  533. hunterx/infrastructure/db/sql/tidb_models/topology_models.py +107 -0
  534. hunterx/infrastructure/db/sql/tidb_models/user_models.py +71 -0
  535. hunterx/infrastructure/db/sql/tidb_models/validation_models.py +266 -0
  536. hunterx/infrastructure/db/sql/tidb_models/vulnerability_models.py +395 -0
  537. hunterx/infrastructure/db/sql/tidb_models/web_crawl_models.py +182 -0
  538. hunterx/infrastructure/db/sql/tidb_models/web_models.py +297 -0
  539. hunterx/infrastructure/db/sql/versioning.py +299 -0
  540. hunterx/infrastructure/event_bus/__init__.py +170 -0
  541. hunterx/infrastructure/event_bus/store.py +131 -0
  542. hunterx/infrastructure/health/__init__.py +91 -0
  543. hunterx/infrastructure/logging/__init__.py +195 -0
  544. hunterx/infrastructure/memory/__init__.py +59 -0
  545. hunterx/infrastructure/memory/factory.py +77 -0
  546. hunterx/infrastructure/memory/orchestration.py +109 -0
  547. hunterx/infrastructure/memory/planning.py +176 -0
  548. hunterx/infrastructure/memory/repositories.py +216 -0
  549. hunterx/infrastructure/metrics/__init__.py +117 -0
  550. hunterx/infrastructure/queue/__init__.py +73 -0
  551. hunterx/infrastructure/sandbox/__init__.py +60 -0
  552. hunterx/infrastructure/secrets/__init__.py +62 -0
  553. hunterx/infrastructure/telemetry/__init__.py +54 -0
  554. hunterx/infrastructure/telemetry/providers.py +122 -0
  555. hunterx/infrastructure/tracing/__init__.py +145 -0
  556. hunterx/knowledge/__init__.py +17 -0
  557. hunterx/knowledge/engine.py +56 -0
  558. hunterx/knowledge/graph.py +53 -0
  559. hunterx/knowledge/loader.py +59 -0
  560. hunterx/knowledge/registry.py +78 -0
  561. hunterx/logging.py +10 -0
  562. hunterx/managers.py +113 -0
  563. hunterx/models.py +48 -0
  564. hunterx/observability.py +80 -0
  565. hunterx/platform/__init__.py +20 -0
  566. hunterx/platform/assembler.py +1023 -0
  567. hunterx/platform/platform.py +233 -0
  568. hunterx/plugins/__init__.py +26 -0
  569. hunterx/plugins/dependencies.py +42 -0
  570. hunterx/plugins/lifecycle.py +30 -0
  571. hunterx/plugins/loader.py +49 -0
  572. hunterx/plugins/manager.py +129 -0
  573. hunterx/plugins/manifest.py +63 -0
  574. hunterx/plugins/permissions.py +32 -0
  575. hunterx/plugins/registry.py +42 -0
  576. hunterx/plugins/sandbox.py +35 -0
  577. hunterx/plugins/sdk/__init__.py +25 -0
  578. hunterx/plugins/sdk/context.py +122 -0
  579. hunterx/plugins/sdk/events.py +19 -0
  580. hunterx/plugins/sdk/results.py +64 -0
  581. hunterx/plugins/versioning.py +49 -0
  582. hunterx/py.typed +0 -0
  583. hunterx/queue.py +12 -0
  584. hunterx/reporting/__init__.py +38 -0
  585. hunterx/reporting/evidence.py +23 -0
  586. hunterx/reporting/exporter.py +29 -0
  587. hunterx/reporting/proof.py +284 -0
  588. hunterx/reporting/renderers.py +101 -0
  589. hunterx/reporting/report_renderers.py +425 -0
  590. hunterx/reporting/strategy.py +137 -0
  591. hunterx/reporting/templates/report.md.j2 +24 -0
  592. hunterx/reporting/validation.py +439 -0
  593. hunterx/reporting/views.py +96 -0
  594. hunterx/scheduler/__init__.py +11 -0
  595. hunterx/scheduler/jobs.py +62 -0
  596. hunterx/scheduler/service.py +108 -0
  597. hunterx/security/__init__.py +21 -0
  598. hunterx/security/manager.py +88 -0
  599. hunterx/security/policies.py +46 -0
  600. hunterx/shared/__init__.py +34 -0
  601. hunterx/shared/di.py +89 -0
  602. hunterx/shared/ids.py +73 -0
  603. hunterx/shared/masking.py +65 -0
  604. hunterx/shared/result.py +55 -0
  605. hunterx/shared/time.py +57 -0
  606. hunterx/telemetry.py +11 -0
  607. hunterx/tools/__init__.py +107 -0
  608. hunterx/tools/adapter.py +104 -0
  609. hunterx/tools/api/__init__.py +42 -0
  610. hunterx/tools/api/adapters.py +713 -0
  611. hunterx/tools/api/base.py +143 -0
  612. hunterx/tools/api/graphql_binaries.py +218 -0
  613. hunterx/tools/api/registry.py +75 -0
  614. hunterx/tools/auth/__init__.py +29 -0
  615. hunterx/tools/auth/analyzer.py +58 -0
  616. hunterx/tools/auth/base.py +191 -0
  617. hunterx/tools/auth/registry.py +53 -0
  618. hunterx/tools/auth/tip.py +207 -0
  619. hunterx/tools/authorization/__init__.py +32 -0
  620. hunterx/tools/authorization/analyzer.py +65 -0
  621. hunterx/tools/authorization/base.py +191 -0
  622. hunterx/tools/authorization/registry.py +53 -0
  623. hunterx/tools/authorization/tip.py +232 -0
  624. hunterx/tools/categories.py +35 -0
  625. hunterx/tools/cloud/__init__.py +28 -0
  626. hunterx/tools/cloud/analyzer.py +62 -0
  627. hunterx/tools/cloud/base.py +177 -0
  628. hunterx/tools/cloud/registry.py +52 -0
  629. hunterx/tools/cloud/tip.py +227 -0
  630. hunterx/tools/content/__init__.py +36 -0
  631. hunterx/tools/content/base.py +130 -0
  632. hunterx/tools/content/bruteforcers.py +272 -0
  633. hunterx/tools/content/ffuf.py +216 -0
  634. hunterx/tools/content/registry.py +59 -0
  635. hunterx/tools/content/tip.py +266 -0
  636. hunterx/tools/discovery.py +48 -0
  637. hunterx/tools/dns/__init__.py +39 -0
  638. hunterx/tools/dns/base.py +127 -0
  639. hunterx/tools/dns/dnspython.py +136 -0
  640. hunterx/tools/dns/dnsx.py +209 -0
  641. hunterx/tools/dns/massdns.py +224 -0
  642. hunterx/tools/dns/registry.py +62 -0
  643. hunterx/tools/dns/resolver.py +198 -0
  644. hunterx/tools/dns/shuffledns.py +168 -0
  645. hunterx/tools/dns/tip.py +263 -0
  646. hunterx/tools/executor.py +82 -0
  647. hunterx/tools/exploit/__init__.py +28 -0
  648. hunterx/tools/exploit/adapters.py +263 -0
  649. hunterx/tools/exploit/registry.py +55 -0
  650. hunterx/tools/factory/__init__.py +55 -0
  651. hunterx/tools/factory/api.py +176 -0
  652. hunterx/tools/factory/compatibility.py +82 -0
  653. hunterx/tools/factory/engine.py +194 -0
  654. hunterx/tools/factory/generators/__init__.py +93 -0
  655. hunterx/tools/factory/generators/base.py +60 -0
  656. hunterx/tools/factory/generators/code.py +63 -0
  657. hunterx/tools/factory/generators/core.py +245 -0
  658. hunterx/tools/factory/generators/io.py +166 -0
  659. hunterx/tools/factory/generators/quality.py +287 -0
  660. hunterx/tools/factory/generators/rules.py +91 -0
  661. hunterx/tools/factory/layout.py +103 -0
  662. hunterx/tools/factory/render.py +87 -0
  663. hunterx/tools/factory/templates.py +489 -0
  664. hunterx/tools/factory/validator.py +177 -0
  665. hunterx/tools/factory/versioning.py +64 -0
  666. hunterx/tools/intelligence/__init__.py +113 -0
  667. hunterx/tools/intelligence/adapters.py +155 -0
  668. hunterx/tools/intelligence/ai.py +216 -0
  669. hunterx/tools/intelligence/api.py +465 -0
  670. hunterx/tools/intelligence/capability.py +145 -0
  671. hunterx/tools/intelligence/chaining.py +583 -0
  672. hunterx/tools/intelligence/compatibility.py +121 -0
  673. hunterx/tools/intelligence/correlation.py +173 -0
  674. hunterx/tools/intelligence/dependency.py +141 -0
  675. hunterx/tools/intelligence/docs.py +132 -0
  676. hunterx/tools/intelligence/enforcement.py +396 -0
  677. hunterx/tools/intelligence/escalation.py +161 -0
  678. hunterx/tools/intelligence/health.py +95 -0
  679. hunterx/tools/intelligence/layer.py +280 -0
  680. hunterx/tools/intelligence/lifecycle.py +192 -0
  681. hunterx/tools/intelligence/normalizers.py +143 -0
  682. hunterx/tools/intelligence/parsers.py +189 -0
  683. hunterx/tools/intelligence/performance.py +82 -0
  684. hunterx/tools/intelligence/planner.py +164 -0
  685. hunterx/tools/intelligence/recommendation.py +163 -0
  686. hunterx/tools/intelligence/registry.py +337 -0
  687. hunterx/tools/intelligence/reliability.py +149 -0
  688. hunterx/tools/intelligence/schema.py +694 -0
  689. hunterx/tools/intelligence/selection.py +173 -0
  690. hunterx/tools/intelligence/selector.py +210 -0
  691. hunterx/tools/intelligence/state.py +85 -0
  692. hunterx/tools/intelligence/target.py +146 -0
  693. hunterx/tools/intelligence/taxonomy.py +178 -0
  694. hunterx/tools/intelligence/validation.py +244 -0
  695. hunterx/tools/intelligence/vocabulary.py +202 -0
  696. hunterx/tools/javascript/__init__.py +47 -0
  697. hunterx/tools/javascript/analyzer.py +122 -0
  698. hunterx/tools/javascript/base.py +226 -0
  699. hunterx/tools/javascript/external.py +289 -0
  700. hunterx/tools/javascript/registry.py +64 -0
  701. hunterx/tools/javascript/tip.py +275 -0
  702. hunterx/tools/knowledge/__init__.py +28 -0
  703. hunterx/tools/knowledge/adapters.py +164 -0
  704. hunterx/tools/knowledge/registry.py +51 -0
  705. hunterx/tools/livehost/__init__.py +41 -0
  706. hunterx/tools/livehost/base.py +147 -0
  707. hunterx/tools/livehost/masscan.py +192 -0
  708. hunterx/tools/livehost/naabu.py +144 -0
  709. hunterx/tools/livehost/nmap.py +446 -0
  710. hunterx/tools/livehost/registry.py +66 -0
  711. hunterx/tools/livehost/rustscan.py +137 -0
  712. hunterx/tools/livehost/tcp_connect.py +172 -0
  713. hunterx/tools/livehost/tip.py +326 -0
  714. hunterx/tools/mastery/__init__.py +58 -0
  715. hunterx/tools/mastery/api.py +411 -0
  716. hunterx/tools/mastery/arsenal.py +158 -0
  717. hunterx/tools/mastery/arsenal_analysis.py +597 -0
  718. hunterx/tools/mastery/arsenal_enterprise.py +365 -0
  719. hunterx/tools/mastery/arsenal_exploit.py +271 -0
  720. hunterx/tools/mastery/arsenal_recon.py +573 -0
  721. hunterx/tools/mastery/arsenal_web.py +839 -0
  722. hunterx/tools/mastery/contract.py +281 -0
  723. hunterx/tools/mastery/coverage.py +85 -0
  724. hunterx/tools/mastery/dataset_data.py +195 -0
  725. hunterx/tools/mastery/datasets.py +84 -0
  726. hunterx/tools/mastery/history.py +130 -0
  727. hunterx/tools/mastery/knowledge_fixtures.py +440 -0
  728. hunterx/tools/mastery/playbook_data.py +577 -0
  729. hunterx/tools/mastery/playbooks.py +168 -0
  730. hunterx/tools/mastery/registry.py +143 -0
  731. hunterx/tools/mastery/regression.py +207 -0
  732. hunterx/tools/mastery/relationship_data.py +119 -0
  733. hunterx/tools/mastery/relationships.py +182 -0
  734. hunterx/tools/mastery/replay.py +200 -0
  735. hunterx/tools/mastery/selection.py +164 -0
  736. hunterx/tools/mastery/specs.py +254 -0
  737. hunterx/tools/mastery/toolchain_manifest.py +217 -0
  738. hunterx/tools/mastery/versioning.py +163 -0
  739. hunterx/tools/normalizer.py +95 -0
  740. hunterx/tools/parameter/__init__.py +26 -0
  741. hunterx/tools/parameter/adapters.py +253 -0
  742. hunterx/tools/parameter/base.py +115 -0
  743. hunterx/tools/parameter/registry.py +51 -0
  744. hunterx/tools/parameter/tip.py +219 -0
  745. hunterx/tools/parser.py +66 -0
  746. hunterx/tools/proof_replay/__init__.py +31 -0
  747. hunterx/tools/proof_replay/adapters.py +145 -0
  748. hunterx/tools/proof_replay/registry.py +39 -0
  749. hunterx/tools/proxy/__init__.py +22 -0
  750. hunterx/tools/proxy/adapters.py +216 -0
  751. hunterx/tools/proxy/registry.py +49 -0
  752. hunterx/tools/recon/__init__.py +30 -0
  753. hunterx/tools/recon/amass.py +144 -0
  754. hunterx/tools/recon/assetfinder.py +63 -0
  755. hunterx/tools/recon/base.py +148 -0
  756. hunterx/tools/recon/bbot.py +152 -0
  757. hunterx/tools/recon/findomain.py +107 -0
  758. hunterx/tools/recon/registry.py +69 -0
  759. hunterx/tools/recon/runner.py +302 -0
  760. hunterx/tools/recon/subfinder.py +144 -0
  761. hunterx/tools/recon/theharvester.py +132 -0
  762. hunterx/tools/recon/tip.py +315 -0
  763. hunterx/tools/registry.py +42 -0
  764. hunterx/tools/safe_validation/__init__.py +37 -0
  765. hunterx/tools/safe_validation/adapters.py +199 -0
  766. hunterx/tools/safe_validation/base.py +111 -0
  767. hunterx/tools/safe_validation/registry.py +57 -0
  768. hunterx/tools/sandbox.py +34 -0
  769. hunterx/tools/sast/__init__.py +22 -0
  770. hunterx/tools/sast/registry.py +47 -0
  771. hunterx/tools/sast/semgrep.py +122 -0
  772. hunterx/tools/sdk/__init__.py +71 -0
  773. hunterx/tools/sdk/adapter.py +176 -0
  774. hunterx/tools/sdk/cache.py +102 -0
  775. hunterx/tools/sdk/capabilities.py +57 -0
  776. hunterx/tools/sdk/context.py +169 -0
  777. hunterx/tools/sdk/dependencies.py +70 -0
  778. hunterx/tools/sdk/engine.py +199 -0
  779. hunterx/tools/sdk/events.py +145 -0
  780. hunterx/tools/sdk/health.py +96 -0
  781. hunterx/tools/sdk/installer.py +105 -0
  782. hunterx/tools/sdk/locks.py +90 -0
  783. hunterx/tools/sdk/monitor.py +101 -0
  784. hunterx/tools/sdk/output.py +139 -0
  785. hunterx/tools/sdk/parallel.py +57 -0
  786. hunterx/tools/sdk/pipeline.py +268 -0
  787. hunterx/tools/sdk/plugin.py +98 -0
  788. hunterx/tools/sdk/queue.py +102 -0
  789. hunterx/tools/sdk/resources.py +184 -0
  790. hunterx/tools/sdk/result.py +141 -0
  791. hunterx/tools/sdk/retry.py +51 -0
  792. hunterx/tools/sdk/sandbox.py +218 -0
  793. hunterx/tools/sdk/scheduler.py +75 -0
  794. hunterx/tools/sdk/session.py +117 -0
  795. hunterx/tools/sdk/timeout.py +69 -0
  796. hunterx/tools/sdk/version.py +86 -0
  797. hunterx/tools/secrets/__init__.py +32 -0
  798. hunterx/tools/secrets/base.py +141 -0
  799. hunterx/tools/secrets/gitleaks.py +201 -0
  800. hunterx/tools/secrets/registry.py +51 -0
  801. hunterx/tools/secrets/tip.py +242 -0
  802. hunterx/tools/secrets/trufflehog.py +133 -0
  803. hunterx/tools/tech/__init__.py +40 -0
  804. hunterx/tools/tech/base.py +193 -0
  805. hunterx/tools/tech/httpclient.py +168 -0
  806. hunterx/tools/tech/httpx.py +218 -0
  807. hunterx/tools/tech/registry.py +65 -0
  808. hunterx/tools/tech/signature.py +179 -0
  809. hunterx/tools/tech/tip.py +270 -0
  810. hunterx/tools/tech/whatweb.py +186 -0
  811. hunterx/tools/topology/__init__.py +36 -0
  812. hunterx/tools/topology/base.py +109 -0
  813. hunterx/tools/topology/models.py +139 -0
  814. hunterx/tools/topology/registry.py +48 -0
  815. hunterx/tools/topology/tip.py +191 -0
  816. hunterx/tools/topology/traceroute.py +119 -0
  817. hunterx/tools/validation.py +42 -0
  818. hunterx/tools/vuln/__init__.py +86 -0
  819. hunterx/tools/vuln/base.py +110 -0
  820. hunterx/tools/vuln/injection.py +515 -0
  821. hunterx/tools/vuln/nuclei.py +237 -0
  822. hunterx/tools/vuln/providers.py +346 -0
  823. hunterx/tools/vuln/registry.py +153 -0
  824. hunterx/tools/vuln/scanbase.py +143 -0
  825. hunterx/tools/vuln/tip.py +518 -0
  826. hunterx/tools/web/__init__.py +42 -0
  827. hunterx/tools/web/base.py +129 -0
  828. hunterx/tools/web/crawler.py +444 -0
  829. hunterx/tools/web/httpclient.py +149 -0
  830. hunterx/tools/web/katana.py +201 -0
  831. hunterx/tools/web/registry.py +84 -0
  832. hunterx/tools/web/tip.py +379 -0
  833. hunterx/tools/web/url_discovery.py +257 -0
  834. hunterx/tools/web/urlbase.py +158 -0
  835. hunterx/utils.py +28 -0
  836. hunterxsec-7.0.0.dist-info/METADATA +1088 -0
  837. hunterxsec-7.0.0.dist-info/RECORD +841 -0
  838. hunterxsec-7.0.0.dist-info/WHEEL +5 -0
  839. hunterxsec-7.0.0.dist-info/entry_points.txt +3 -0
  840. hunterxsec-7.0.0.dist-info/licenses/LICENSE +202 -0
  841. hunterxsec-7.0.0.dist-info/top_level.txt +1 -0
hunterx/__init__.py ADDED
@@ -0,0 +1,45 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ #
4
+ # HunterX v7 — AI-Powered Security Orchestration & Intelligence Platform
5
+
6
+ """HunterX v7 core package.
7
+
8
+ This package is the Clean Architecture backbone of the HunterX platform. It
9
+ contains only foundation code: domain model, application services, engines,
10
+ infrastructure adapters, and the public SDKs. No scanners, no tool
11
+ implementations, no AI models, and no business logic live here.
12
+
13
+ Package layout follows the ratified Development Bible
14
+ (``docs/bible/03 - Folder Structure.md``):
15
+
16
+ - :mod:`hunterx.domain` — pure domain layer (entities, ports, services)
17
+ - :mod:`hunterx.application` — use-case layer
18
+ - :mod:`hunterx.infrastructure` — adapters (db, cache, queue, ai, sandbox, ...)
19
+ - :mod:`hunterx.engines` — engine facades (mission, workflow, planner, ...)
20
+ - :mod:`hunterx.agents` — multi-agent platform
21
+ - :mod:`hunterx.plugins` — plugin system + public plugin SDK
22
+ - :mod:`hunterx.tools` — tool adapter SDK + parser/normalizer framework
23
+ - :mod:`hunterx.knowledge` — knowledge engine + knowledge graph
24
+ - :mod:`hunterx.scheduler` — scheduler + jobs
25
+ - :mod:`hunterx.reporting` — reporting infrastructure
26
+ - :mod:`hunterx.config` — configuration manager
27
+ - :mod:`hunterx.shared` — cross-cutting helpers (ids, masking, di, result)
28
+ - :mod:`hunterx.api` — REST API framework (routing structure)
29
+ - :mod:`hunterx.cli` — CLI framework (command structure)
30
+ """
31
+
32
+ from __future__ import annotations
33
+
34
+ __version__ = "7.0.0"
35
+ __author__ = "Ahmed Awad (NullC0d3)"
36
+ __license__ = "Apache-2.0"
37
+
38
+ # NOTE: deliberately NOT importing any submodules here to keep the package
39
+ # import cheap and side-effect free. Subsystems are imported on demand.
40
+
41
+ __all__ = [
42
+ "__version__",
43
+ "__author__",
44
+ "__license__",
45
+ ]
@@ -0,0 +1,30 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Multi-agent platform.
5
+
6
+ Provides the abstract :class:`~hunterx.agents.base.SecurityAgent` contract,
7
+ the agent registry, orchestrator and shared agent infrastructure. Concrete
8
+ agents (recon, scanner, analyst, reporter) are provided by plugins.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ from hunterx.agents.base import AgentCapability, SecurityAgent
14
+ from hunterx.agents.context import AgentContext
15
+ from hunterx.agents.memory import AgentMemory
16
+ from hunterx.agents.messaging import AgentMessage
17
+ from hunterx.agents.orchestrator import AgentOrchestrator
18
+ from hunterx.agents.registry import AgentRegistry
19
+ from hunterx.agents.state import AgentState
20
+
21
+ __all__ = [
22
+ "SecurityAgent",
23
+ "AgentCapability",
24
+ "AgentRegistry",
25
+ "AgentOrchestrator",
26
+ "AgentContext",
27
+ "AgentMemory",
28
+ "AgentMessage",
29
+ "AgentState",
30
+ ]
hunterx/agents/base.py ADDED
@@ -0,0 +1,71 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Agent abstraction.
5
+
6
+ An agent is a specialized worker that performs a bounded set of security
7
+ operations. Agents declare their capabilities, run within an orchestrated
8
+ lifecycle, and communicate exclusively through :class:`AgentMessage`.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ import abc
14
+ from enum import Enum
15
+
16
+ from hunterx.agents.context import AgentContext
17
+ from hunterx.agents.memory import AgentMemory
18
+ from hunterx.agents.messaging import AgentMessage
19
+ from hunterx.agents.state import AgentState
20
+
21
+
22
+ class AgentCapability(Enum):
23
+ """Capabilities an agent can declare."""
24
+
25
+ RECON = "recon"
26
+ SCAN = "scan"
27
+ DETECT = "detect"
28
+ ANALYZE = "analyze"
29
+ CORRELATE = "correlate"
30
+ REPORT = "report"
31
+ ENRICH = "enrich"
32
+
33
+
34
+ class SecurityAgent(abc.ABC):
35
+ """Base class for all agents.
36
+
37
+ Subclasses implement :meth:`run`, which receives the agent context and
38
+ returns a list of messages to hand off to the orchestrator.
39
+ """
40
+
41
+ #: Unique agent name (e.g. ``"recon.agent"``).
42
+ name: str = ""
43
+ #: Human-readable description.
44
+ description: str = ""
45
+ #: Capabilities this agent provides.
46
+ capabilities: tuple[AgentCapability, ...] = ()
47
+
48
+ def __init__(self, memory: AgentMemory | None = None) -> None:
49
+ self._memory = memory or AgentMemory()
50
+ self._state = AgentState.IDLE
51
+
52
+ @property
53
+ def memory(self) -> AgentMemory:
54
+ """Return this agent's working memory."""
55
+ return self._memory
56
+
57
+ @abc.abstractmethod
58
+ def run(self, context: AgentContext) -> list[AgentMessage]:
59
+ """Execute the agent's work and return hand-off messages."""
60
+
61
+ def can(self, capability: AgentCapability) -> bool:
62
+ """Return ``True`` if the agent declares ``capability``."""
63
+ return capability in self.capabilities
64
+
65
+ @property
66
+ def state(self) -> AgentState:
67
+ """Return the agent's current lifecycle state."""
68
+ return self._state
69
+
70
+ def _transition(self, state: AgentState) -> None:
71
+ self._state = state
@@ -0,0 +1,27 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Agent capability helpers."""
5
+
6
+ from __future__ import annotations
7
+
8
+ from collections.abc import Iterable
9
+
10
+ from hunterx.agents.base import AgentCapability
11
+
12
+
13
+ class CapabilitySet(frozenset):
14
+ """A frozenset of :class:`AgentCapability` values with query helpers."""
15
+
16
+ def __new__(cls, capabilities: Iterable[AgentCapability] = ()) -> CapabilitySet:
17
+ """Construct a frozen set from an iterable of capabilities."""
18
+ return super().__new__(cls, capabilities) # type: ignore[arg-type]
19
+
20
+ def requires(self, capability: AgentCapability) -> bool:
21
+ """Return ``True`` when the set includes ``capability``."""
22
+ return capability in self
23
+
24
+ @classmethod
25
+ def from_names(cls, names: Iterable[str]) -> CapabilitySet:
26
+ """Build a set from capability names (case-insensitive)."""
27
+ return cls(AgentCapability(name) for name in names)
@@ -0,0 +1,27 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Agent context."""
5
+
6
+ from __future__ import annotations
7
+
8
+ from dataclasses import dataclass, field
9
+ from typing import Any
10
+
11
+
12
+ @dataclass(slots=True)
13
+ class AgentContext:
14
+ """The execution context handed to an agent for a single run.
15
+
16
+ Attributes:
17
+ mission_id: owning mission.
18
+ target: target identifier the agent should operate on.
19
+ parameters: agent-specific run parameters.
20
+ workspace: scratch data shared across agents in a run.
21
+
22
+ """
23
+
24
+ mission_id: str
25
+ target: str = ""
26
+ parameters: dict[str, Any] = field(default_factory=dict)
27
+ workspace: dict[str, Any] = field(default_factory=dict)
@@ -0,0 +1,55 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Agent coordinator.
5
+
6
+ Runs a multi-phase agent pipeline (recon → scan → analyze) for a mission by
7
+ dispatching to agents at each phase and merging their results. This is the
8
+ mission-level counterpart to the lower-level :class:`AgentOrchestrator`.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ from collections.abc import Iterable
14
+
15
+ from hunterx.agents.context import AgentContext
16
+ from hunterx.agents.messaging import AgentMessage
17
+ from hunterx.agents.orchestrator import AgentOrchestrator
18
+ from hunterx.shared.result import Failure, Result, Success
19
+
20
+ #: Default phase pipeline: ordered capability groups.
21
+ _PIPELINE: tuple[tuple[str, ...], ...] = (
22
+ ("recon.enumerate", "recon.fingerprint"),
23
+ ("scan.vulnerabilities",),
24
+ ("analyze.correlate", "analyze.prioritize"),
25
+ )
26
+
27
+
28
+ class AgentCoordinator:
29
+ """Coordinate a phased agent run over a mission.
30
+
31
+ Each phase dispatches work to the named agents; if a phase has no agent
32
+ registered, it is skipped without failing the mission.
33
+ """
34
+
35
+ def __init__(self, orchestrator: AgentOrchestrator, *, pipeline: tuple[tuple[str, ...], ...] = _PIPELINE) -> None:
36
+ self._orchestrator = orchestrator
37
+ self._pipeline = pipeline
38
+
39
+ def run_mission(self, mission_id: str, *, targets: Iterable[str]) -> Result[list[AgentMessage], Exception]:
40
+ """Execute the pipeline across every target and merge the results."""
41
+ all_messages: list[AgentMessage] = []
42
+ for phase in self._pipeline:
43
+ for target in targets:
44
+ for agent_name in phase:
45
+ context = AgentContext(mission_id=mission_id, target=target)
46
+ outcome = self._orchestrator.dispatch(agent_name=agent_name, context=context)
47
+ if isinstance(outcome, Failure):
48
+ return outcome
49
+ all_messages.extend(outcome.value)
50
+ return Success(all_messages)
51
+
52
+ @staticmethod
53
+ def collect_findings(messages: Iterable[AgentMessage]) -> list[dict[str, object]]:
54
+ """Extract ``finding``-kind payloads from merged agent messages."""
55
+ return [message.payload for message in messages if message.kind == "finding"]
@@ -0,0 +1,28 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Agent event adapters.
5
+
6
+ Converts agent messages into canonical domain events so the rest of the
7
+ platform (event bus, telemetry, plugins) can observe agent activity uniformly.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ from hunterx.agents.messaging import AgentMessage
13
+ from hunterx.domain.events import DomainEvent
14
+
15
+
16
+ def message_to_event(message: AgentMessage) -> DomainEvent:
17
+ """Wrap an agent message as a domain event."""
18
+ return DomainEvent(
19
+ event_type=f"agent.{message.kind}",
20
+ payload={
21
+ "message_id": message.message_id,
22
+ "sender": message.sender,
23
+ "recipient": message.recipient,
24
+ "data": message.payload,
25
+ },
26
+ source=message.sender,
27
+ occurred_at=message.created_at,
28
+ )
@@ -0,0 +1,51 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Agent memory."""
5
+
6
+ from __future__ import annotations
7
+
8
+ import threading
9
+ from typing import Any
10
+
11
+
12
+ class AgentMemory:
13
+ """A bounded, thread-safe working memory for a single agent.
14
+
15
+ Stores observations and results as key/value entries. Used for the
16
+ lifetime of a mission run; long-term knowledge belongs in the knowledge
17
+ engine instead.
18
+ """
19
+
20
+ def __init__(self, *, max_entries: int = 1000) -> None:
21
+ self._max_entries = max_entries
22
+ self._entries: dict[str, Any] = {}
23
+ self._lock = threading.RLock()
24
+
25
+ def store(self, key: str, value: Any) -> None:
26
+ """Store or overwrite an entry."""
27
+ with self._lock:
28
+ if key not in self._entries and len(self._entries) >= self._max_entries:
29
+ # Evict the oldest entry to keep the memory bounded.
30
+ self._entries.pop(next(iter(self._entries)))
31
+ self._entries[key] = value
32
+
33
+ def retrieve(self, key: str) -> Any | None:
34
+ """Return an entry by key or ``None``."""
35
+ with self._lock:
36
+ return self._entries.get(key)
37
+
38
+ def forget(self, key: str) -> None:
39
+ """Remove an entry by key."""
40
+ with self._lock:
41
+ self._entries.pop(key, None)
42
+
43
+ def snapshot(self) -> dict[str, Any]:
44
+ """Return a shallow copy of all entries."""
45
+ with self._lock:
46
+ return dict(self._entries)
47
+
48
+ def clear(self) -> None:
49
+ """Remove all entries."""
50
+ with self._lock:
51
+ self._entries.clear()
@@ -0,0 +1,32 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Agent messaging."""
5
+
6
+ from __future__ import annotations
7
+
8
+ from dataclasses import dataclass, field
9
+ from typing import Any
10
+
11
+ from hunterx.shared.ids import generate_id
12
+ from hunterx.shared.time import utcnow_iso
13
+
14
+
15
+ @dataclass(frozen=True, slots=True)
16
+ class AgentMessage:
17
+ """A message exchanged between agents or between an agent and a caller.
18
+
19
+ Attributes:
20
+ sender: agent name that produced the message.
21
+ recipient: target agent name (``"*"`` for broadcast).
22
+ kind: message kind (``finding``, ``request``, ``result``, ``event``).
23
+ payload: JSON-serializable content.
24
+
25
+ """
26
+
27
+ sender: str
28
+ recipient: str = "*"
29
+ kind: str = "event"
30
+ payload: dict[str, Any] = field(default_factory=dict)
31
+ message_id: str = field(default_factory=generate_id)
32
+ created_at: str = field(default_factory=utcnow_iso)
@@ -0,0 +1,59 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Agent orchestrator.
5
+
6
+ Routes messages to the right agents and sequences multi-agent runs. The
7
+ orchestrator is dependency-injection friendly: agents are supplied by a
8
+ registry, and routing policy is pluggable.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ from hunterx.agents.base import AgentCapability, SecurityAgent
14
+ from hunterx.agents.context import AgentContext
15
+ from hunterx.agents.messaging import AgentMessage
16
+ from hunterx.agents.registry import AgentRegistry
17
+ from hunterx.domain.exceptions import OperationError, PluginNotFoundError
18
+ from hunterx.shared.result import Failure, Result, Success
19
+
20
+
21
+ class AgentOrchestrator:
22
+ """Dispatch work to capable agents and fan their results back."""
23
+
24
+ def __init__(self, registry: AgentRegistry) -> None:
25
+ self._registry = registry
26
+
27
+ def dispatch(
28
+ self,
29
+ *,
30
+ capability: AgentCapability | None = None,
31
+ agent_name: str | None = None,
32
+ context: AgentContext,
33
+ ) -> Result[list[AgentMessage], Exception]:
34
+ """Run the agent(s) matching ``capability`` or ``agent_name``.
35
+
36
+ Only one of ``capability`` / ``agent_name`` may be given. Returns the
37
+ collected messages produced by the executed agents.
38
+ """
39
+ if agent_name is not None and capability is not None:
40
+ return Failure(OperationError("Specify either agent_name or capability, not both."))
41
+
42
+ agents: list[SecurityAgent]
43
+ if agent_name is not None:
44
+ try:
45
+ agents = [self._registry.get(agent_name)]
46
+ except PluginNotFoundError as exc:
47
+ return Failure(exc)
48
+ elif capability is not None:
49
+ agents = [agent for agent in self._registry.list() if agent.can(capability)]
50
+ else:
51
+ return Failure(OperationError("Specify agent_name or capability to dispatch."))
52
+
53
+ messages: list[AgentMessage] = []
54
+ for agent in agents:
55
+ try:
56
+ messages.extend(agent.run(context))
57
+ except Exception as exc:
58
+ return Failure(exc)
59
+ return Success(messages)
@@ -0,0 +1,44 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Agent registry."""
5
+
6
+ from __future__ import annotations
7
+
8
+ from threading import RLock
9
+
10
+ from hunterx.agents.base import SecurityAgent
11
+ from hunterx.domain.exceptions import DuplicateRegistrationError, PluginNotFoundError
12
+
13
+
14
+ class AgentRegistry:
15
+ """Thread-safe registry of available agents."""
16
+
17
+ def __init__(self) -> None:
18
+ self._agents: dict[str, SecurityAgent] = {}
19
+ self._lock = RLock()
20
+
21
+ def register(self, agent: SecurityAgent) -> None:
22
+ """Register an agent instance by its name."""
23
+ with self._lock:
24
+ if agent.name in self._agents:
25
+ raise DuplicateRegistrationError(agent.name)
26
+ self._agents[agent.name] = agent
27
+
28
+ def unregister(self, name: str) -> None:
29
+ """Remove an agent by name."""
30
+ with self._lock:
31
+ self._agents.pop(name, None)
32
+
33
+ def get(self, name: str) -> SecurityAgent:
34
+ """Return an agent by name or raise :class:`PluginNotFoundError`."""
35
+ with self._lock:
36
+ agent = self._agents.get(name)
37
+ if agent is None:
38
+ raise PluginNotFoundError(name)
39
+ return agent
40
+
41
+ def list(self) -> list[SecurityAgent]:
42
+ """Return all registered agents."""
43
+ with self._lock:
44
+ return list(self._agents.values())
@@ -0,0 +1,95 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Agent scheduler.
5
+
6
+ Dispatches agent runs on a recurring schedule. This is the agent-level
7
+ scheduler; mission-level schedules belong to :mod:`hunterx.scheduler`.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ import threading
13
+ import time
14
+ from dataclasses import dataclass, field
15
+
16
+ from hunterx.agents.context import AgentContext
17
+ from hunterx.agents.orchestrator import AgentOrchestrator
18
+ from hunterx.shared.result import Failure
19
+
20
+
21
+ @dataclass(frozen=True, slots=True)
22
+ class AgentSchedule:
23
+ """A recurring agent dispatch.
24
+
25
+ Attributes:
26
+ name: unique schedule name.
27
+ agent_name: agent to dispatch.
28
+ interval_seconds: seconds between dispatches.
29
+ mission_id: mission to attach to the context.
30
+ target: target identifier for the context.
31
+ parameters: extra run parameters.
32
+
33
+ """
34
+
35
+ name: str
36
+ agent_name: str
37
+ interval_seconds: float
38
+ mission_id: str = ""
39
+ target: str = ""
40
+ parameters: dict[str, object] = field(default_factory=dict)
41
+
42
+
43
+ class AgentScheduler:
44
+ """Schedule agent dispatches in a background thread.
45
+
46
+ Each schedule runs independently; a failed dispatch is recorded and does
47
+ not stop future dispatches of that schedule.
48
+ """
49
+
50
+ def __init__(self, orchestrator: AgentOrchestrator) -> None:
51
+ self._orchestrator = orchestrator
52
+ self._schedules: dict[str, AgentSchedule] = {}
53
+ self._last_run: dict[str, float] = {}
54
+ self._stop = threading.Event()
55
+ self._thread: threading.Thread | None = None
56
+
57
+ def register(self, schedule: AgentSchedule) -> None:
58
+ """Register a recurring schedule."""
59
+ self._schedules[schedule.name] = schedule
60
+ self._last_run[schedule.name] = 0.0
61
+
62
+ def start(self) -> None:
63
+ """Start the background dispatch loop."""
64
+ if self._thread is not None and self._thread.is_alive():
65
+ return
66
+ self._stop.clear()
67
+ self._thread = threading.Thread(target=self._loop, name="hunterx-agent-scheduler", daemon=True)
68
+ self._thread.start()
69
+
70
+ def stop(self) -> None:
71
+ """Stop the background dispatch loop."""
72
+ self._stop.set()
73
+ if self._thread is not None:
74
+ self._thread.join(timeout=2.0)
75
+ self._thread = None
76
+
77
+ def _loop(self) -> None:
78
+ while not self._stop.is_set():
79
+ now = time.monotonic()
80
+ for schedule in list(self._schedules.values()):
81
+ if now - self._last_run[schedule.name] >= schedule.interval_seconds:
82
+ self._last_run[schedule.name] = now
83
+ self._dispatch(schedule)
84
+ self._stop.wait(1.0)
85
+
86
+ def _dispatch(self, schedule: AgentSchedule) -> None:
87
+ context = AgentContext(
88
+ mission_id=schedule.mission_id,
89
+ target=schedule.target,
90
+ parameters=dict(schedule.parameters),
91
+ )
92
+ outcome = self._orchestrator.dispatch(agent_name=schedule.agent_name, context=context)
93
+ if isinstance(outcome, Failure):
94
+ # Recorded only; the loop keeps scheduling.
95
+ return
@@ -0,0 +1,17 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Agent state."""
5
+
6
+ from __future__ import annotations
7
+
8
+ from enum import Enum
9
+
10
+
11
+ class AgentState(Enum):
12
+ """Lifecycle states of an agent."""
13
+
14
+ IDLE = "idle"
15
+ ACTIVE = "active"
16
+ BLOCKED = "blocked"
17
+ STOPPED = "stopped"
@@ -0,0 +1,16 @@
1
+ # Copyright (c) 2026 Ahmed Awad (NullC0d3)
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """REST API framework.
5
+
6
+ Provides a FastAPI application factory, a router registry for endpoint
7
+ definition, base schemas and dependency helpers. Importing ``hunterx.api``
8
+ never requires FastAPI; it is only needed to build the app.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ from hunterx.api.router import ApiRouter, RouteSpec
14
+ from hunterx.api.schemas import ErrorResponse
15
+
16
+ __all__ = ["ApiRouter", "RouteSpec", "ErrorResponse"]