@pensar/apex 2.7.0-canary.91cc2d52 → 2.7.0-canary.96a80cdd

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 (361) hide show
  1. package/README.md +13 -0
  2. package/build/agent-2z29yw2f.js +14 -0
  3. package/build/agent-e5k7edth.js +14 -0
  4. package/build/{agent-fm79ysyz.js → agent-hb0n840w.js} +6 -5
  5. package/build/{agent-q7hcmhg5.js → agent-ka6b3e6q.js} +7 -6
  6. package/build/{agent-runs-6nyk8hjx.js → agent-runs-f2wfmfkt.js} +22 -19
  7. package/build/{apps-8athj8ek.js → apps-3sy3pdmy.js} +17 -14
  8. package/build/{auth-xeyjgbvt.js → auth-7aygc35y.js} +17 -14
  9. package/build/blackboxAgent-1p737dt1.js +14 -0
  10. package/build/{blackboxPentest-jds43wyq.js → blackboxPentest-g6e2mhka.js} +15 -14
  11. package/build/{cli-rx9g88ws.js → cli-006njjt1.js} +5 -5
  12. package/build/{cli-se8ae8z3.js → cli-0rhfexax.js} +3 -3
  13. package/build/{cli-hpbpzy5k.js → cli-2sx4qxgm.js} +9 -9
  14. package/build/{cli-ee1z711x.js → cli-3chhsshd.js} +4 -1
  15. package/build/cli-3gq41m8n.js +54 -0
  16. package/build/cli-4fkaes4s.js +1199 -0
  17. package/build/{cli-1dm8x61n.js → cli-60k7mepv.js} +2 -2
  18. package/build/{cli-gsaf4jk3.js → cli-7898kznf.js} +2 -2
  19. package/build/{cli-w14rjr2a.js → cli-a7hj3v06.js} +1 -1
  20. package/build/{cli-xcy2vxj2.js → cli-ak23knae.js} +1 -1
  21. package/build/{cli-w3mk93a4.js → cli-brtfdg49.js} +13 -49
  22. package/build/{cli-nm0nqnn7.js → cli-e887rt5y.js} +1 -1
  23. package/build/cli-ev28r4sw.js +1199 -0
  24. package/build/{cli-e4a4h158.js → cli-gq554agh.js} +1 -1
  25. package/build/{cli-d47vhcxp.js → cli-h22v29jf.js} +44 -62
  26. package/build/{cli-yht2f4ny.js → cli-j0497qpt.js} +4 -4
  27. package/build/{cli-3gt761d2.js → cli-j0wfj2kw.js} +6 -0
  28. package/build/{cli-hsk2jkfx.js → cli-jv6064md.js} +37465 -36500
  29. package/build/cli-n5dqdbwn.js +36 -0
  30. package/build/{cli-72p3tb5s.js → cli-rpbhg3cn.js} +4 -4
  31. package/build/{cli-j1nfpen0.js → cli-s7d915q8.js} +12 -6
  32. package/build/{cli-05arm5mj.js → cli-tbyd9myq.js} +44 -21
  33. package/build/{cli-m2wpnmhx.js → cli-wve4bh9n.js} +2 -2
  34. package/build/{cli-ae6crt8f.js → cli-xk684kez.js} +5212 -2362
  35. package/build/{cli-3cw5r290.js → cli-xvz8tcza.js} +5 -1
  36. package/build/{cli-sfpjmf8c.js → cli-y2mb60wy.js} +1 -1
  37. package/build/{cli-pwm29ks7.js → cli-ychebg4z.js} +16 -16
  38. package/build/cli.js +144 -52
  39. package/build/{config-efytsw1q.js → config-dk9dkh9s.js} +4 -4
  40. package/build/{doctor-z94afr10.js → doctor-srja68wr.js} +1 -0
  41. package/build/emscripten-module-kzkvkeqz.js +503 -0
  42. package/build/{export-trajectory-rt4tf07k.js → export-trajectory-ex317s0n.js} +1 -1
  43. package/build/{fastStrike-67ajjp5k.js → fastStrike-59as1tjn.js} +12 -7
  44. package/build/ffi-pf145jhd.js +78 -0
  45. package/build/{fixes-ky44pmnw.js → fixes-gv0tzmrx.js} +17 -14
  46. package/build/{index-88w63fck.js → index-3ervx25v.js} +1 -1
  47. package/build/{index-5p68zt2w.js → index-43s4cm15.js} +36 -10
  48. package/build/{index-tgxp9dc7.js → index-5ktpbb7s.js} +378 -338
  49. package/build/{index-3tw03tns.js → index-bgk8enmw.js} +1 -1
  50. package/build/{index-qnyevb6q.js → index-ffe5c30s.js} +13 -13
  51. package/build/{index-2f8jbjwh.js → index-gt2h25ha.js} +7 -6
  52. package/build/{index-pbftr2x4.js → index-p3aehtqt.js} +24 -16
  53. package/build/{index-0arjc1nx.js → index-vv5s14qm.js} +2 -2
  54. package/build/{index-mt1gtyb6.js → index-wt44jgfm.js} +5 -4
  55. package/build/{index-mncyhwse.js → index-y2y61vkm.js} +11 -7
  56. package/build/{issues-7cj54b0a.js → issues-tsg276ha.js} +52 -22
  57. package/build/{knowledge-4at10yy7.js → knowledge-25frej6d.js} +17 -14
  58. package/build/lance-mpx9k2v4.js +232 -0
  59. package/build/lib/{chunk-jzz08pg8.js → chunk-1q8wesh8.js} +2 -2
  60. package/build/lib/{chunk-4thgemts.js → chunk-3a3zsgva.js} +19 -30
  61. package/build/lib/{chunk-xk9wrskq.js → chunk-44kbg9m4.js} +5 -1
  62. package/build/lib/{chunk-f8gkbqxj.js → chunk-4xgq9vfr.js} +208 -368
  63. package/build/lib/{chunk-fjt5bj5c.js → chunk-5263t54a.js} +5 -5
  64. package/build/lib/{chunk-vwx9vhdz.js → chunk-6m2yh985.js} +1244 -356
  65. package/build/lib/{chunk-satv5p0s.js → chunk-77c3z63z.js} +46 -2
  66. package/build/lib/{chunk-z5ndygcp.js → chunk-9134mebx.js} +17 -7
  67. package/build/lib/{chunk-nf5e4gjf.js → chunk-93trdp46.js} +1785 -60
  68. package/build/lib/{chunk-c9kbxavp.js → chunk-e800v4r1.js} +1 -1
  69. package/build/lib/{chunk-pxp1r7yn.js → chunk-eekk13qk.js} +5 -1
  70. package/build/lib/{chunk-fq3m5ykd.js → chunk-enbbw98a.js} +1 -1
  71. package/build/lib/chunk-f194w4g6.js +112 -0
  72. package/build/lib/{chunk-s89qgbb7.js → chunk-fgvw6gt4.js} +91 -51
  73. package/build/lib/{chunk-p0a7ayrq.js → chunk-gy5cqvcn.js} +12 -11
  74. package/build/lib/{chunk-2njv7wz3.js → chunk-hbyxyxdc.js} +4 -0
  75. package/build/lib/{chunk-nw1j8jnc.js → chunk-hwaqg5wc.js} +1 -1
  76. package/build/lib/{chunk-661qwc3d.js → chunk-kq5a62av.js} +15 -11
  77. package/build/lib/{chunk-rr1j6nmf.js → chunk-mrh9pp6e.js} +1 -1
  78. package/build/lib/{chunk-bg0xbv05.js → chunk-pv8zyfen.js} +1 -1
  79. package/build/lib/{chunk-97gfejgq.js → chunk-qrnjk6v3.js} +589 -97
  80. package/build/lib/{chunk-7hed7dp5.js → chunk-qzkqsczt.js} +12 -3
  81. package/build/lib/{chunk-br01h7k0.js → chunk-rs86be3y.js} +24 -12
  82. package/build/lib/{chunk-twxwf5bn.js → chunk-sc8yc711.js} +1 -1
  83. package/build/lib/{chunk-4hzpxw9v.js → chunk-v91q65qy.js} +12 -48
  84. package/build/lib/{chunk-157sd6t0.js → chunk-x4jmgdxr.js} +1 -1
  85. package/build/lib/{chunk-c7xhgcx9.js → chunk-x8rfrceb.js} +5 -1
  86. package/build/lib/core/agents/agentRuntime.d.ts +4 -0
  87. package/build/lib/core/agents/lance.d.ts +153 -0
  88. package/build/lib/core/agents/lanceJudge.d.ts +3 -0
  89. package/build/lib/core/agents/offSecAgent/index.js +12 -11
  90. package/build/lib/core/agents/offSecAgent/offensiveSecurityAgent.d.ts +5 -0
  91. package/build/lib/core/agents/offSecAgent/runtimeContext.d.ts +1 -0
  92. package/build/lib/core/agents/offSecAgent/subagentSpawner.d.ts +5 -1
  93. package/build/lib/core/agents/offSecAgent/subagentSpawner.js +7 -6
  94. package/build/lib/core/agents/offSecAgent/tools/browserHeaderRouting.d.ts +2 -0
  95. package/build/lib/core/agents/offSecAgent/tools/getPage.d.ts +1 -2
  96. package/build/lib/core/agents/offSecAgent/tools/httpRequest.d.ts +1 -1
  97. package/build/lib/core/agents/offSecAgent/tools/index.js +11 -10
  98. package/build/lib/core/agents/offSecAgent/tools/scopeGuard.d.ts +7 -18
  99. package/build/lib/core/agents/offSecAgent/tools/types.d.ts +3 -1
  100. package/build/lib/core/agents/offSecAgent/tools/webSearch.d.ts +8 -0
  101. package/build/lib/core/agents/offSecAgent/types.d.ts +13 -2
  102. package/build/lib/core/agents/specialized/attackSurface/blackboxAgent.js +12 -11
  103. package/build/lib/core/agents/specialized/attackSurface/prompts.d.ts +1 -1
  104. package/build/lib/core/agents/specialized/attackSurface/schemas.js +12 -11
  105. package/build/lib/core/agents/specialized/authenticationAgent/index.js +13 -12
  106. package/build/lib/core/agents/specialized/codeAgent/agent.js +12 -11
  107. package/build/lib/core/agents/specialized/cvssScorer/index.d.ts +2 -1
  108. package/build/lib/core/agents/specialized/findingJudge/agent.js +11 -10
  109. package/build/lib/core/agents/specialized/findingJudge/index.d.ts +2 -1
  110. package/build/lib/core/agents/specialized/findingJudge/index.js +5 -4
  111. package/build/lib/core/agents/specialized/patching/index.js +13 -12
  112. package/build/lib/core/agents/specialized/pentest/agent.js +12 -11
  113. package/build/lib/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.d.ts +2 -1
  114. package/build/lib/core/agents/specialized/whiteboxAttackSurface/index.js +12 -11
  115. package/build/lib/core/ai/ai.d.ts +21 -77
  116. package/build/lib/core/ai/ai.js +6 -3
  117. package/build/lib/core/ai/index.d.ts +3 -0
  118. package/build/lib/core/ai/index.js +20 -5
  119. package/build/lib/core/ai/modelRuntime.d.ts +10 -0
  120. package/build/lib/core/ai/models/inference.d.ts +2 -0
  121. package/build/lib/core/ai/models/openrouter.d.ts +1 -0
  122. package/build/lib/core/ai/providers/concentrate.d.ts +2 -0
  123. package/build/lib/core/ai/reasoning.d.ts +44 -0
  124. package/build/lib/core/ai/utils.d.ts +2 -0
  125. package/build/lib/core/ai/utils.js +4 -3
  126. package/build/lib/core/api/index.d.ts +5 -2
  127. package/build/lib/core/api/index.js +34 -22
  128. package/build/lib/core/api/issues.d.ts +125 -16
  129. package/build/lib/core/api/lance.d.ts +6 -0
  130. package/build/lib/core/api/offesecAgent.d.ts +1 -0
  131. package/build/lib/core/api/reasoning.d.ts +12 -0
  132. package/build/lib/core/api/targetedPentest.js +13 -12
  133. package/build/lib/core/cli/reasoning.d.ts +4 -0
  134. package/build/lib/core/code-mode/capabilityInvoker.d.ts +53 -0
  135. package/build/lib/core/code-mode/index.d.ts +3 -0
  136. package/build/lib/core/code-mode/runtime.d.ts +42 -0
  137. package/build/lib/core/code-mode/tools.d.ts +16 -0
  138. package/build/lib/core/config/config.d.ts +9 -2
  139. package/build/lib/core/config/customProviders.d.ts +11 -0
  140. package/build/lib/core/config/index.js +1 -1
  141. package/build/lib/core/findings/registry.d.ts +3 -1
  142. package/build/lib/core/findings/registry.js +5 -4
  143. package/build/lib/core/http/researchFetchToken.d.ts +2 -0
  144. package/build/lib/core/http/targetHeaders.d.ts +2 -0
  145. package/build/lib/core/http/targetScope.d.ts +3 -0
  146. package/build/lib/core/observability/index.js +1 -1
  147. package/build/lib/core/observability/telemetry.d.ts +4 -0
  148. package/build/lib/core/providers/types.d.ts +1 -1
  149. package/build/lib/core/providers/utils.d.ts +1 -1
  150. package/build/lib/core/session/index.d.ts +35 -0
  151. package/build/lib/core/session/index.js +7 -4
  152. package/build/lib/core/session/persistence.js +5 -4
  153. package/build/lib/core/tools/backends/index.js +3 -1
  154. package/build/lib/core/tools/backends/types.d.ts +2 -0
  155. package/build/lib/core/workflows/pentest.d.ts +4 -1
  156. package/build/lib/core/workflows/pentest.js +18 -17
  157. package/build/lib/core/workflows/seams.js +6 -5
  158. package/build/lib/core/workflows/threatModel.d.ts +1 -0
  159. package/build/lib/core/workflows/whiteboxAttackSurface.d.ts +6 -4
  160. package/build/lib/core/workflows/whiteboxAttackSurface.js +14 -13
  161. package/build/lib/index.js +25 -24
  162. package/build/{logs-6nb7m4vw.js → logs-pb1c7tv4.js} +17 -14
  163. package/build/module-ES6BEMUI-6ewavg9p.js +12 -0
  164. package/build/{native-rollout-evidence-ydak98sd.js → native-rollout-evidence-mzmspvzz.js} +6 -6
  165. package/build/offesecAgent-1x8wcabx.js +32 -0
  166. package/build/pentest-fng54wkx.js +23 -0
  167. package/build/{pentests-kkz46fs0.js → pentests-1d5y9rnt.js} +17 -14
  168. package/build/recordedRunClient-mcj422af.js +11 -0
  169. package/build/subagentSpawner-qrrxtjsv.js +12 -0
  170. package/build/{targetedPentest-3cz4q1f8.js → targetedPentest-vgxbfacc.js} +35 -8
  171. package/build/{targets-ry3zsbxp.js → targets-ppa62x1f.js} +17 -14
  172. package/build/threatModel-0466jh7q.js +24 -0
  173. package/build/{uninstall-34wqhj3r.js → uninstall-v2n2wqyc.js} +1 -1
  174. package/build/{upload-da6k0r99.js → upload-4n27max1.js} +4 -4
  175. package/build/{utils-19f5wsay.js → utils-3any68fn.js} +10 -6
  176. package/package.json +4 -1
  177. package/src/cli/agent-runs.test.ts +1 -4
  178. package/src/cli/issues.test.ts +234 -12
  179. package/src/cli/issues.ts +49 -9
  180. package/src/cli/lance-verifier.test.ts +57 -0
  181. package/src/cli/lance-verifier.ts +73 -0
  182. package/src/cli/lance.test.ts +71 -0
  183. package/src/cli/lance.ts +48 -0
  184. package/src/cli.ts +63 -6
  185. package/src/core/agents/agentRuntime.test.ts +16 -0
  186. package/src/core/agents/agentRuntime.ts +8 -0
  187. package/src/core/agents/lance.test.ts +421 -0
  188. package/src/core/agents/lance.ts +701 -0
  189. package/src/core/agents/lanceJudge.test.ts +166 -0
  190. package/src/core/agents/lanceJudge.ts +115 -0
  191. package/src/core/agents/offSecAgent/lance.test.ts +188 -0
  192. package/src/core/agents/offSecAgent/offensiveSecurityAgent.codeMode.test.ts +435 -0
  193. package/src/core/agents/offSecAgent/offensiveSecurityAgent.runtimeContext.test.ts +1 -0
  194. package/src/core/agents/offSecAgent/offensiveSecurityAgent.test.ts +6 -1
  195. package/src/core/agents/offSecAgent/offensiveSecurityAgent.ts +258 -14
  196. package/src/core/agents/offSecAgent/prompt.ts +2 -2
  197. package/src/core/agents/offSecAgent/recordedTools.test.ts +6 -1
  198. package/src/core/agents/offSecAgent/runtimeContext.test.ts +19 -0
  199. package/src/core/agents/offSecAgent/runtimeContext.ts +9 -2
  200. package/src/core/agents/offSecAgent/selectiveConstruction.publicPath.test.ts +2 -0
  201. package/src/core/agents/offSecAgent/selectiveConstruction.test.ts +6 -1
  202. package/src/core/agents/offSecAgent/subagentSpawner.hooks.test.ts +3 -0
  203. package/src/core/agents/offSecAgent/subagentSpawner.reasoning.test.ts +167 -0
  204. package/src/core/agents/offSecAgent/subagentSpawner.ts +20 -27
  205. package/src/core/agents/offSecAgent/tools/browserHeaderRouting.redirect.test.ts +141 -0
  206. package/src/core/agents/offSecAgent/tools/browserHeaderRouting.test.ts +106 -8
  207. package/src/core/agents/offSecAgent/tools/browserHeaderRouting.ts +56 -16
  208. package/src/core/agents/offSecAgent/tools/delegateAuth.ts +7 -2
  209. package/src/core/agents/offSecAgent/tools/documentFinding.ts +4 -5
  210. package/src/core/agents/offSecAgent/tools/executeCommand.test.ts +2 -1
  211. package/src/core/agents/offSecAgent/tools/getPage.test.ts +120 -0
  212. package/src/core/agents/offSecAgent/tools/getPage.ts +24 -19
  213. package/src/core/agents/offSecAgent/tools/httpBackends.test.ts +18 -25
  214. package/src/core/agents/offSecAgent/tools/httpRequest.body.test.ts +214 -0
  215. package/src/core/agents/offSecAgent/tools/httpRequest.test.ts +54 -0
  216. package/src/core/agents/offSecAgent/tools/httpRequest.ts +20 -11
  217. package/src/core/agents/offSecAgent/tools/playwrightMcp.test.ts +5 -0
  218. package/src/core/agents/offSecAgent/tools/playwrightMcp.ts +5 -2
  219. package/src/core/agents/offSecAgent/tools/runAttackSurface.ts +5 -4
  220. package/src/core/agents/offSecAgent/tools/runPentestWorkflow.ts +2 -0
  221. package/src/core/agents/offSecAgent/tools/sandboxPlaywright.test.ts +47 -0
  222. package/src/core/agents/offSecAgent/tools/sandboxPlaywright.ts +65 -2
  223. package/src/core/agents/offSecAgent/tools/scopeGuard.test.ts +121 -52
  224. package/src/core/agents/offSecAgent/tools/scopeGuard.ts +50 -30
  225. package/src/core/agents/offSecAgent/tools/spawnCodingAgent.ts +3 -5
  226. package/src/core/agents/offSecAgent/tools/spawnPentestAgent.test.ts +11 -4
  227. package/src/core/agents/offSecAgent/tools/spawnPentestAgent.ts +4 -5
  228. package/src/core/agents/offSecAgent/tools/spawnPentestSwarm.ts +3 -0
  229. package/src/core/agents/offSecAgent/tools/threatModelGenerator.ts +3 -3
  230. package/src/core/agents/offSecAgent/tools/types.ts +4 -0
  231. package/src/core/agents/offSecAgent/tools/webSearch.test.ts +154 -0
  232. package/src/core/agents/offSecAgent/tools/webSearch.ts +119 -87
  233. package/src/core/agents/offSecAgent/types.ts +15 -1
  234. package/src/core/agents/specialized/attackSurface/blackboxAgent.ts +3 -3
  235. package/src/core/agents/specialized/attackSurface/prompts.ts +9 -45
  236. package/src/core/agents/specialized/cvssScorer/index.test.ts +2 -1
  237. package/src/core/agents/specialized/cvssScorer/index.ts +3 -0
  238. package/src/core/agents/specialized/findingJudge/index.ts +6 -0
  239. package/src/core/agents/specialized/pentest/agent.ts +1 -1
  240. package/src/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.ts +4 -0
  241. package/src/core/ai/ai.effective-tools.test.ts +27 -2
  242. package/src/core/ai/ai.lance.test.ts +581 -0
  243. package/src/core/ai/ai.operator-context.bench.test.ts +159 -177
  244. package/src/core/ai/ai.recorded-context.test.ts +15 -8
  245. package/src/core/ai/ai.test.ts +71 -75
  246. package/src/core/ai/ai.ts +130 -299
  247. package/src/core/ai/compactionTelemetry.test.ts +230 -16
  248. package/src/core/ai/index.ts +17 -0
  249. package/src/core/ai/inference.test.ts +292 -0
  250. package/src/core/ai/modelRuntime.test.ts +58 -0
  251. package/src/core/ai/modelRuntime.ts +63 -0
  252. package/src/core/ai/models/concentrate.ts +132 -0
  253. package/src/core/ai/models/index.ts +13 -8
  254. package/src/core/ai/models/inference.ts +11 -0
  255. package/src/core/ai/models/models.test.ts +53 -7
  256. package/src/core/ai/models/openai.ts +6 -0
  257. package/src/core/ai/models/openrouter-reasoning.json +285 -0
  258. package/src/core/ai/models/openrouter.ts +132 -3
  259. package/src/core/ai/providers/concentrate.ts +96 -0
  260. package/src/core/ai/providers/custom.test.ts +74 -0
  261. package/src/core/ai/providers/custom.ts +3 -1
  262. package/src/core/ai/providers/openai-models.test.ts +5 -0
  263. package/src/core/ai/providers/pensarFormatters.ts +8 -1
  264. package/src/core/ai/providers/pensarResponsesStream.test.ts +117 -0
  265. package/src/core/ai/providers/pensarResponsesStream.ts +20 -1
  266. package/src/core/ai/providers/qwen-models.test.ts +265 -0
  267. package/src/core/ai/reasoning.test.ts +317 -0
  268. package/src/core/ai/reasoning.ts +505 -0
  269. package/src/core/ai/utils.native-rollout-evidence.test.ts +20 -8
  270. package/src/core/ai/utils.ts +136 -41
  271. package/src/core/api/attackSurface.ts +1 -0
  272. package/src/core/api/index.ts +12 -0
  273. package/src/core/api/issues.test.ts +80 -6
  274. package/src/core/api/issues.ts +137 -16
  275. package/src/core/api/lance.ts +23 -0
  276. package/src/core/api/offesecAgent.test.ts +51 -0
  277. package/src/core/api/offesecAgent.ts +15 -1
  278. package/src/core/api/reasoning.test.ts +213 -0
  279. package/src/core/api/reasoning.ts +44 -0
  280. package/src/core/api/recordedRun.loop.test.ts +72 -1
  281. package/src/core/api/targetedPentest.test.ts +14 -2
  282. package/src/core/api/targetedPentest.ts +33 -0
  283. package/src/core/cli/reasoning.test.ts +149 -0
  284. package/src/core/cli/reasoning.ts +95 -0
  285. package/src/core/code-mode/capabilityInvoker.test.ts +424 -0
  286. package/src/core/code-mode/capabilityInvoker.ts +383 -0
  287. package/src/core/code-mode/index.ts +8 -0
  288. package/src/core/code-mode/runtime.setup.test.ts +157 -0
  289. package/src/core/code-mode/runtime.test.ts +664 -0
  290. package/src/core/code-mode/runtime.ts +700 -0
  291. package/src/core/code-mode/tools.test.ts +375 -0
  292. package/src/core/code-mode/tools.ts +281 -0
  293. package/src/core/config/config.test.ts +7 -0
  294. package/src/core/config/config.ts +9 -0
  295. package/src/core/config/customProviders.ts +21 -2
  296. package/src/core/doctor.ts +1 -0
  297. package/src/core/findings/registry.test.ts +9 -1
  298. package/src/core/findings/registry.ts +6 -0
  299. package/src/core/http/agentNetworkPolicyFixture.test.ts +39 -0
  300. package/src/core/http/headers.contract.test.ts +100 -2
  301. package/src/core/http/researchFetchToken.test.ts +50 -0
  302. package/src/core/http/researchFetchToken.ts +63 -0
  303. package/src/core/http/targetHeaders.ts +26 -8
  304. package/src/core/http/targetScope.ts +47 -11
  305. package/src/core/observability/telemetry.test.ts +129 -76
  306. package/src/core/observability/telemetry.ts +5 -0
  307. package/src/core/providers/types.ts +7 -0
  308. package/src/core/providers/utils.ts +6 -1
  309. package/src/core/providers/verify.test.ts +54 -0
  310. package/src/core/providers/verify.ts +28 -0
  311. package/src/core/runtime/runRecoveryPlan.test.ts +18 -0
  312. package/src/core/runtime/runRecoveryPlan.ts +5 -0
  313. package/src/core/runtime/runTools.test.ts +2 -0
  314. package/src/core/runtime/runTools.ts +4 -1
  315. package/src/core/runtime/sqliteControlStore.test.ts +21 -0
  316. package/src/core/runtime/sqliteControlStore.ts +6 -1
  317. package/src/core/runtime/sqliteRecoveryStore.test.ts +24 -5
  318. package/src/core/session/index.ts +33 -0
  319. package/src/core/tools/backends/local.test.ts +126 -0
  320. package/src/core/tools/backends/local.ts +256 -59
  321. package/src/core/tools/backends/policy.test.ts +36 -1
  322. package/src/core/tools/backends/policy.ts +9 -4
  323. package/src/core/tools/backends/types.ts +2 -0
  324. package/src/core/workflows/fastStrike.ts +3 -0
  325. package/src/core/workflows/pentest.ts +18 -0
  326. package/src/core/workflows/threatModel.ts +2 -0
  327. package/src/core/workflows/whiteboxAttackSurface.test.ts +40 -0
  328. package/src/core/workflows/whiteboxAttackSurface.ts +19 -4
  329. package/src/test-fixtures/agent-network-policy-v2.json +80 -0
  330. package/src/tui/command-registry.test.ts +12 -0
  331. package/src/tui/command-registry.ts +10 -0
  332. package/src/tui/components/chat/config-view.tsx +6 -10
  333. package/src/tui/components/chat/home-view.tsx +2 -2
  334. package/src/tui/components/chat/input-area.tsx +3 -2
  335. package/src/tui/components/commands/__tests__/advanced-settings-lifecycle.tsx +81 -93
  336. package/src/tui/components/commands/advanced-settings.test.ts +7 -1
  337. package/src/tui/components/commands/advanced-settings.tsx +143 -172
  338. package/src/tui/components/commands/api-key-input.tsx +2 -0
  339. package/src/tui/components/commands/models-display.tsx +7 -1
  340. package/src/tui/components/commands/operator-wizard.tsx +2 -0
  341. package/src/tui/components/commands/provider-manager.tsx +3 -0
  342. package/src/tui/components/model-picker/ModelPicker.tsx +66 -103
  343. package/src/tui/components/model-picker/ModelPickerDialog.tsx +8 -14
  344. package/src/tui/components/model-picker/__tests__/reasoning-control.tsx +189 -0
  345. package/src/tui/components/model-picker/model-search.test.ts +11 -0
  346. package/src/tui/components/model-picker/model-search.ts +1 -0
  347. package/src/tui/components/model-picker/reasoning-control.test.ts +21 -0
  348. package/src/tui/components/operator-dashboard/index.tsx +121 -42
  349. package/src/tui/components/operator-dashboard/logic.test.ts +39 -3
  350. package/src/tui/components/operator-dashboard/logic.ts +14 -3
  351. package/src/tui/context/agent.tsx +32 -79
  352. package/src/tui/context/route.tsx +1 -0
  353. package/src/tui/index.tsx +1 -0
  354. package/build/agent-dwb90wfs.js +0 -13
  355. package/build/agent-j2h5dgcj.js +0 -13
  356. package/build/blackboxAgent-g034embj.js +0 -13
  357. package/build/cli-g06s7edq.js +0 -11
  358. package/build/offesecAgent-zbmmy8g0.js +0 -22
  359. package/build/pentest-65jff81b.js +0 -22
  360. package/build/recordedRunClient-647rnnet.js +0 -11
  361. package/build/threatModel-y60sp2kr.js +0 -21
package/README.md CHANGED
@@ -114,6 +114,19 @@ discovered model in `/models`. Headless commands accept
114
114
  `--model-provider hoonify --model <catalog-model-id>`. See
115
115
  [Hoonify setup](docs/hoonify.md) for model discovery, token budgets, and live checks.
116
116
 
117
+ ### Inference.net
118
+
119
+ Connect **Inference.net** in `/providers` or set `INFERENCE_API_KEY`, then select
120
+ **DeepSeek V4.1 Flash 1017 Cyber** in `/models`. This is the only Inference.net model
121
+ currently available in Apex. Headless commands accept
122
+ `--model inference:deepseek-v4.1-flash-1017-cyber`.
123
+
124
+ Your team needs [approved model access](https://inference.net/model-access/deepseek-v4.1-flash-1017-cyber)
125
+ before inference will succeed; saving a valid API key does not grant model access.
126
+ Apex uses the provider's default reasoning behavior and the
127
+ [catalog](https://api.inference.net/v1/models) limits of 1,040,000 context tokens
128
+ and 393,216 output tokens.
129
+
117
130
  ### Custom inference endpoints
118
131
 
119
132
  Bring an OpenAI-compatible endpoint and bearer token through `customProviders`
@@ -0,0 +1,14 @@
1
+ import {
2
+ runAuthenticationAgent2
3
+ } from "./cli-006njjt1.js";
4
+ import"./cli-xvz8tcza.js";
5
+ import"./cli-qba2x69h.js";
6
+ import"./cli-xk684kez.js";
7
+ import"./cli-ev28r4sw.js";
8
+ import"./cli-jv6064md.js";
9
+ import"./cli-a7hj3v06.js";
10
+ import"./cli-c2k4xxaw.js";
11
+ import"./cli-gq554agh.js";
12
+ export {
13
+ runAuthenticationAgent2 as runAuthenticationAgent
14
+ };
@@ -0,0 +1,14 @@
1
+ import {
2
+ CodeAgent2
3
+ } from "./cli-wve4bh9n.js";
4
+ import"./cli-xvz8tcza.js";
5
+ import"./cli-qba2x69h.js";
6
+ import"./cli-xk684kez.js";
7
+ import"./cli-ev28r4sw.js";
8
+ import"./cli-jv6064md.js";
9
+ import"./cli-a7hj3v06.js";
10
+ import"./cli-c2k4xxaw.js";
11
+ import"./cli-gq554agh.js";
12
+ export {
13
+ CodeAgent2 as CodeAgent
14
+ };
@@ -1,15 +1,16 @@
1
- import"./cli-ae6crt8f.js";
2
- import"./cli-e4a4h158.js";
3
- import"./cli-w14rjr2a.js";
1
+ import"./cli-ev28r4sw.js";
2
+ import"./cli-gq554agh.js";
3
+ import"./cli-a7hj3v06.js";
4
+ import"./cli-xk684kez.js";
4
5
  import {
5
6
  AgentRuntime,
6
7
  defineAgent
7
- } from "./cli-3cw5r290.js";
8
+ } from "./cli-xvz8tcza.js";
8
9
  import"./cli-qba2x69h.js";
9
10
  import {
10
11
  stepCountIs2,
11
12
  init_dist
12
- } from "./cli-hsk2jkfx.js";
13
+ } from "./cli-jv6064md.js";
13
14
  import"./cli-c2k4xxaw.js";
14
15
  import {
15
16
  init_zod
@@ -1,14 +1,15 @@
1
1
  import {
2
2
  TargetedPentestAgent2,
3
3
  buildPentestSystemPrompt2
4
- } from "./cli-hpbpzy5k.js";
5
- import"./cli-3cw5r290.js";
4
+ } from "./cli-2sx4qxgm.js";
5
+ import"./cli-xvz8tcza.js";
6
6
  import"./cli-qba2x69h.js";
7
- import"./cli-ae6crt8f.js";
8
- import"./cli-hsk2jkfx.js";
9
- import"./cli-w14rjr2a.js";
7
+ import"./cli-xk684kez.js";
8
+ import"./cli-ev28r4sw.js";
9
+ import"./cli-jv6064md.js";
10
+ import"./cli-a7hj3v06.js";
10
11
  import"./cli-c2k4xxaw.js";
11
- import"./cli-e4a4h158.js";
12
+ import"./cli-gq554agh.js";
12
13
  export {
13
14
  TargetedPentestAgent2 as TargetedPentestAgent,
14
15
  buildPentestSystemPrompt2 as buildPentestSystemPrompt
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  config2,
3
3
  init_config
4
- } from "./cli-e4a4h158.js";
5
- import"./cli-w14rjr2a.js";
4
+ } from "./cli-gq554agh.js";
5
+ import"./cli-a7hj3v06.js";
6
+ import"./cli-xk684kez.js";
6
7
  import {
7
8
  AgentEventBus
8
- } from "./cli-ae6crt8f.js";
9
+ } from "./cli-ev28r4sw.js";
9
10
  import {
10
11
  inspectSessionEvidence2,
11
12
  RecordedRunSpecSchema,
@@ -16,29 +17,31 @@ import {
16
17
  runRecordedAgent2,
17
18
  RunRecoveryBlockedError2,
18
19
  resumeRecordedAgent2
19
- } from "./cli-d47vhcxp.js";
20
- import"./cli-w3mk93a4.js";
21
- import"./cli-m2wpnmhx.js";
22
- import"./cli-72p3tb5s.js";
23
- import"./cli-05arm5mj.js";
24
- import"./cli-rx9g88ws.js";
25
- import"./cli-hpbpzy5k.js";
26
- import"./cli-nm0nqnn7.js";
27
- import"./cli-xcy2vxj2.js";
20
+ } from "./cli-h22v29jf.js";
21
+ import"./cli-brtfdg49.js";
22
+ import"./cli-wve4bh9n.js";
23
+ import"./cli-rpbhg3cn.js";
24
+ import"./cli-tbyd9myq.js";
25
+ import"./cli-006njjt1.js";
26
+ import"./cli-2sx4qxgm.js";
27
+ import"./cli-e887rt5y.js";
28
+ import"./cli-n5dqdbwn.js";
29
+ import"./cli-ak23knae.js";
28
30
  import {
29
31
  resolveWorkerExecutable,
30
32
  launchLocalWorker
31
- } from "./cli-sfpjmf8c.js";
32
- import"./cli-3cw5r290.js";
33
+ } from "./cli-y2mb60wy.js";
34
+ import"./cli-3gq41m8n.js";
35
+ import"./cli-xvz8tcza.js";
33
36
  import"./cli-qba2x69h.js";
34
37
  import {
35
38
  buildAuthConfig,
36
- init_ai
37
- } from "./cli-hsk2jkfx.js";
39
+ init_ai2
40
+ } from "./cli-jv6064md.js";
38
41
  import"./cli-c2k4xxaw.js";
39
42
 
40
43
  // src/cli/agent-runs.ts
41
- init_ai();
44
+ init_ai2();
42
45
  import { once } from "node:events";
43
46
  import { readFile } from "node:fs/promises";
44
47
  import { isAbsolute, resolve } from "node:path";
@@ -115,7 +118,7 @@ async function runAgentRunsCommand(args) {
115
118
  if (!isAbsolute(values.store)) {
116
119
  throw new Error("agent-runs worker requires --store <absolute database>");
117
120
  }
118
- const { serveLocalRunWorker } = await import("./index-pbftr2x4.js");
121
+ const { serveLocalRunWorker } = await import("./index-p3aehtqt.js");
119
122
  await serveLocalRunWorker({
120
123
  runId: values.run,
121
124
  databasePath: resolve(values.store)
@@ -129,7 +132,7 @@ async function runAgentRunsCommand(args) {
129
132
  ${HELP}`);
130
133
  }
131
134
  if (command === "attach") {
132
- const { openRecordedRunClient } = await import("./recordedRunClient-647rnnet.js");
135
+ const { openRecordedRunClient } = await import("./recordedRunClient-mcj422af.js");
133
136
  const client = await openRecordedRunClient(values.store);
134
137
  const controller = new AbortController;
135
138
  const detach = () => controller.abort();
@@ -15,24 +15,27 @@ import {
15
15
  searchEndpoints2,
16
16
  listDomains2,
17
17
  createDomain2
18
- } from "./cli-ae6crt8f.js";
19
- import"./cli-e4a4h158.js";
20
- import"./cli-w14rjr2a.js";
21
- import"./cli-d47vhcxp.js";
22
- import"./cli-w3mk93a4.js";
23
- import"./cli-m2wpnmhx.js";
24
- import"./cli-72p3tb5s.js";
25
- import"./cli-05arm5mj.js";
26
- import"./cli-rx9g88ws.js";
27
- import"./cli-hpbpzy5k.js";
28
- import"./cli-nm0nqnn7.js";
29
- import"./cli-xcy2vxj2.js";
18
+ } from "./cli-xk684kez.js";
19
+ import"./cli-ev28r4sw.js";
20
+ import"./cli-gq554agh.js";
21
+ import"./cli-a7hj3v06.js";
22
+ import"./cli-h22v29jf.js";
23
+ import"./cli-brtfdg49.js";
24
+ import"./cli-wve4bh9n.js";
25
+ import"./cli-rpbhg3cn.js";
26
+ import"./cli-tbyd9myq.js";
27
+ import"./cli-006njjt1.js";
28
+ import"./cli-2sx4qxgm.js";
29
+ import"./cli-e887rt5y.js";
30
+ import"./cli-n5dqdbwn.js";
31
+ import"./cli-ak23knae.js";
30
32
  import {
31
33
  markCommandFailed
32
34
  } from "./cli-z82n3qk1.js";
33
- import"./cli-3cw5r290.js";
35
+ import"./cli-3gq41m8n.js";
36
+ import"./cli-xvz8tcza.js";
34
37
  import"./cli-qba2x69h.js";
35
- import"./cli-hsk2jkfx.js";
38
+ import"./cli-jv6064md.js";
36
39
  import"./cli-c2k4xxaw.js";
37
40
 
38
41
  // src/cli/apps.ts
@@ -1,9 +1,10 @@
1
1
  #!/usr/bin/env bun
2
- import"./cli-ae6crt8f.js";
2
+ import"./cli-xk684kez.js";
3
+ import"./cli-ev28r4sw.js";
3
4
  import {
4
5
  config2,
5
6
  init_config
6
- } from "./cli-e4a4h158.js";
7
+ } from "./cli-gq554agh.js";
7
8
  import {
8
9
  getPensarApiUrl2,
9
10
  getPensarConsoleUrl2,
@@ -19,22 +20,24 @@ import {
19
20
  createWorkspaceSelection2,
20
21
  pollWorkspaceSelection2,
21
22
  init_auth
22
- } from "./cli-w14rjr2a.js";
23
- import"./cli-d47vhcxp.js";
24
- import"./cli-w3mk93a4.js";
25
- import"./cli-m2wpnmhx.js";
26
- import"./cli-72p3tb5s.js";
27
- import"./cli-05arm5mj.js";
28
- import"./cli-rx9g88ws.js";
29
- import"./cli-hpbpzy5k.js";
30
- import"./cli-nm0nqnn7.js";
31
- import"./cli-xcy2vxj2.js";
23
+ } from "./cli-a7hj3v06.js";
24
+ import"./cli-h22v29jf.js";
25
+ import"./cli-brtfdg49.js";
26
+ import"./cli-wve4bh9n.js";
27
+ import"./cli-rpbhg3cn.js";
28
+ import"./cli-tbyd9myq.js";
29
+ import"./cli-006njjt1.js";
30
+ import"./cli-2sx4qxgm.js";
31
+ import"./cli-e887rt5y.js";
32
+ import"./cli-n5dqdbwn.js";
33
+ import"./cli-ak23knae.js";
32
34
  import {
33
35
  markCommandFailed
34
36
  } from "./cli-z82n3qk1.js";
35
- import"./cli-3cw5r290.js";
37
+ import"./cli-3gq41m8n.js";
38
+ import"./cli-xvz8tcza.js";
36
39
  import"./cli-qba2x69h.js";
37
- import"./cli-hsk2jkfx.js";
40
+ import"./cli-jv6064md.js";
38
41
  import"./cli-c2k4xxaw.js";
39
42
  import {
40
43
  __require
@@ -0,0 +1,14 @@
1
+ import {
2
+ BlackboxAttackSurfaceAgent2
3
+ } from "./cli-brtfdg49.js";
4
+ import"./cli-xvz8tcza.js";
5
+ import"./cli-qba2x69h.js";
6
+ import"./cli-xk684kez.js";
7
+ import"./cli-ev28r4sw.js";
8
+ import"./cli-jv6064md.js";
9
+ import"./cli-a7hj3v06.js";
10
+ import"./cli-c2k4xxaw.js";
11
+ import"./cli-gq554agh.js";
12
+ export {
13
+ BlackboxAttackSurfaceAgent2 as BlackboxAttackSurfaceAgent
14
+ };
@@ -1,30 +1,31 @@
1
- import"./cli-e4a4h158.js";
2
- import"./cli-w14rjr2a.js";
3
- import"./cli-ae6crt8f.js";
4
- import"./cli-w3mk93a4.js";
5
- import"./cli-hpbpzy5k.js";
6
- import"./cli-nm0nqnn7.js";
1
+ import"./cli-gq554agh.js";
2
+ import"./cli-a7hj3v06.js";
3
+ import"./cli-ev28r4sw.js";
4
+ import"./cli-xk684kez.js";
5
+ import"./cli-brtfdg49.js";
6
+ import"./cli-2sx4qxgm.js";
7
+ import"./cli-e887rt5y.js";
7
8
  import {
8
9
  readExecutionMetrics,
9
10
  writeExecutionMetrics,
10
11
  runPentestWorkflow2
11
- } from "./cli-05arm5mj.js";
12
- import"./cli-m2wpnmhx.js";
13
- import"./cli-72p3tb5s.js";
12
+ } from "./cli-tbyd9myq.js";
13
+ import"./cli-wve4bh9n.js";
14
+ import"./cli-rpbhg3cn.js";
14
15
  import {
15
16
  EMPTY_SESSION_TOKEN_USAGE,
16
17
  accumulateSessionTokens
17
18
  } from "./cli-ag6jtndp.js";
18
- import"./cli-3cw5r290.js";
19
+ import"./cli-xvz8tcza.js";
19
20
  import"./cli-qba2x69h.js";
20
21
  import {
21
- init_ai,
22
- normalizeStepUsage
23
- } from "./cli-hsk2jkfx.js";
22
+ normalizeStepUsage,
23
+ init_ai2
24
+ } from "./cli-jv6064md.js";
24
25
  import"./cli-c2k4xxaw.js";
25
26
 
26
27
  // src/core/api/blackboxPentest.ts
27
- init_ai();
28
+ init_ai2();
28
29
  async function runPentestAgent(input) {
29
30
  const persisted = readExecutionMetrics(input.session.rootPath)?.tokenUsage;
30
31
  let tokenUsage = persisted ?? EMPTY_SESSION_TOKEN_USAGE;
@@ -8,15 +8,15 @@ import {
8
8
  import {
9
9
  AgentRuntime,
10
10
  defineAgent
11
- } from "./cli-3cw5r290.js";
11
+ } from "./cli-xvz8tcza.js";
12
12
  import {
13
13
  hasToolCall,
14
14
  init_dist,
15
- scopedLogger,
16
- init_lazyLogger,
17
15
  createLogger,
18
- init_structured
19
- } from "./cli-hsk2jkfx.js";
16
+ init_structured,
17
+ scopedLogger,
18
+ init_lazyLogger
19
+ } from "./cli-jv6064md.js";
20
20
 
21
21
  // src/core/agents/specialized/authenticationAgent/agent.ts
22
22
  init_dist();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  APICallError,
3
- init_dist3
4
- } from "./cli-gsaf4jk3.js";
3
+ init_dist4
4
+ } from "./cli-7898kznf.js";
5
5
  import {
6
6
  init_zod
7
7
  } from "./cli-3qznjsnr.js";
@@ -2215,7 +2215,7 @@ function withNativeRolloutEvidenceModel(model, defaultContext) {
2215
2215
  }
2216
2216
  var DEFAULT_NATIVE_ROLLOUT_CAPTURE_LIMITS, captureStore, operationStore, sessionStore, RECORDER_ONLY_INPUT;
2217
2217
  var init_capture = __esm(() => {
2218
- init_dist3();
2218
+ init_dist4();
2219
2219
  init_inference_attempt();
2220
2220
  init_content();
2221
2221
  init_provider_metadata();
@@ -1,13 +1,13 @@
1
1
  import {
2
+ isMemoryEnabled,
3
+ readPlan,
2
4
  collectCommand,
3
5
  windowsProgramInvocation,
4
6
  sandboxArtifactsRoot,
5
- isMemoryEnabled,
6
- readPlan,
7
7
  REPORT_ERROR_TOOL_NAME,
8
8
  createReportErrorTool,
9
9
  PentestReportedError
10
- } from "./cli-ae6crt8f.js";
10
+ } from "./cli-xk684kez.js";
11
11
  import {
12
12
  GOOGLE_SIGNIN_PROMPT_GUIDANCE,
13
13
  browserEngineForGoogleSignIn
@@ -18,15 +18,15 @@ import {
18
18
  import {
19
19
  AgentRuntime,
20
20
  defineAgent
21
- } from "./cli-3cw5r290.js";
21
+ } from "./cli-xvz8tcza.js";
22
22
  import {
23
23
  hasToolCall,
24
24
  init_dist,
25
- scopedLogger,
26
- init_lazyLogger,
27
25
  createLogger,
28
- init_structured
29
- } from "./cli-hsk2jkfx.js";
26
+ init_structured,
27
+ scopedLogger,
28
+ init_lazyLogger
29
+ } from "./cli-jv6064md.js";
30
30
  import {
31
31
  init_zod
32
32
  } from "./cli-3qznjsnr.js";
@@ -226,7 +226,7 @@ var SECTION_HELPER_FILE_WORKSPACE = (helperWorkspaceRoot, hasSourceAccess = fals
226
226
  const sourceRule = hasSourceAccess ? "Source access remains read-only. Helper-file tools do not authorize edits to the target repository, including through shell commands." : "The black-box rule still applies: helper scripts are your own code — never use any tool to read the target's source code.";
227
227
  return `Helper Script File Workspace:
228
228
  - Your native file tools (read_file, list_files, glob, grep, create_file, update_file, apply_patch) operate ONLY inside your file workspace: ${root}. Relative paths resolve against it. Ordinary paths outside it — target source code, session logs, retained http_request output — are NOT reachable through these tools. The read_file and grep tools also accept tool-output: references returned by execute_command or grep, solely to inspect your own captured tool results.
229
- - For stateful, repetitive, concurrent, or multi-stage work, build an editable helper script there and iterate: create_file / update_file / apply_patch to write and refine it, read_file to inspect it, and execute_command to run it (reference the script by its absolute path — your shell does not start inside the file workspace).
229
+ - When exec is available, implement payload generation, loops, tool composition, and response processing directly in its JavaScript cells. Use the file workspace for durable artifacts and for helper programs that require OS tools or dependencies unavailable in exec. When exec is unavailable, use helper scripts for repetitive or multi-stage work. Write and refine helpers with create_file / update_file / apply_patch, inspect them with read_file, and run them with execute_command using absolute paths — your shell does not start inside the file workspace.
230
230
  - Syntax-check or compile new or changed helpers with the runtime's available tools before execution. Inspect the exit status and output, repair failures, and rerun; a successful file write alone does not establish that the helper works or proves a finding.
231
231
  - Keep credentials in runtime environment references rather than embedding literal secrets in generated source.
232
232
  - For captured command output, use the returned tool-output: reference with read_file or grep. To inspect other saved output with native tools, save it under the file workspace first (e.g. redirect command output to a file there).
@@ -3,7 +3,7 @@ import {
3
3
  } from "./cli-h6y3bt60.js";
4
4
 
5
5
  // package.json
6
- var version = "2.7.0-canary.91cc2d52", package_default;
6
+ var version = "2.7.0-canary.96a80cdd", package_default;
7
7
  var init_package = __esm(() => {
8
8
  package_default = {
9
9
  author: "Pensar",
@@ -21,6 +21,7 @@ var init_package = __esm(() => {
21
21
  "@aws-sdk/lib-storage": "3.1146.0",
22
22
  "@daytona/sdk": "0.222.0",
23
23
  "@googleapis/gmail": "^16.1.2",
24
+ "@jitl/quickjs-singlefile-cjs-release-sync": "0.32.0",
24
25
  "@microsoft/microsoft-graph-client": "^3.0.7",
25
26
  "@modelcontextprotocol/sdk": "^1.29.0",
26
27
  "@openrouter/ai-sdk-provider": "^2.9.1",
@@ -43,6 +44,7 @@ var init_package = __esm(() => {
43
44
  "mime-types": "^3.0.2",
44
45
  nodemailer: "^8.0.11",
45
46
  "p-limit": "^7.3.0",
47
+ "quickjs-emscripten": "^0.32.0",
46
48
  react: "^19.2.7",
47
49
  sharp: "^0.34.5",
48
50
  tldts: "^7.4.3",
@@ -336,6 +338,7 @@ var init_package = __esm(() => {
336
338
  "format:check": 'biome check && prettier --check "**/*.{md,yml,yaml}"',
337
339
  "generate:ascii": "bun run scripts/generate-ascii-art.ts",
338
340
  "generate:models": "bun run scripts/generate-models.ts",
341
+ "generate:reasoning": "bun run scripts/sync-reasoning-capabilities.ts",
339
342
  knip: "knip",
340
343
  lint: "biome lint src/",
341
344
  "lint:fix": "biome lint --write src/",
@@ -0,0 +1,54 @@
1
+ import {
2
+ OffensiveSecurityAgent
3
+ } from "./cli-xk684kez.js";
4
+ import {
5
+ startAgentExecution,
6
+ resolveRootReasoning,
7
+ persistRootReasoningOverride
8
+ } from "./cli-n5dqdbwn.js";
9
+
10
+ // src/core/api/offesecAgent.ts
11
+ async function runOffensiveSecurityAgent2(input) {
12
+ const resolved = resolveRootReasoning(input);
13
+ const persisted = persistRootReasoningOverride(input);
14
+ input = persisted ? { ...resolved, session: await persisted } : resolved;
15
+ const agent = input.session ? new OffensiveSecurityAgent(input) : await OffensiveSecurityAgent.create(input);
16
+ input.onSessionReady?.(agent.session);
17
+ await startAgentExecution(agent).result;
18
+ return {
19
+ streamResult: agent.streamResult,
20
+ session: agent.session,
21
+ ...agent.lanceRuntime ? { lance: agent.lanceRuntime.metrics(input.model) } : {}
22
+ };
23
+ }
24
+ function createOffensiveSecurityAgentClient2() {
25
+ const controller = new AbortController;
26
+ let started = false;
27
+ return {
28
+ run(input) {
29
+ if (started) {
30
+ throw new Error("Offensive security agent client already started a run — create a new client per run");
31
+ }
32
+ started = true;
33
+ return runOffensiveSecurityAgent2({
34
+ ...input,
35
+ abortSignal: controller.signal
36
+ });
37
+ },
38
+ abort() {
39
+ controller.abort();
40
+ }
41
+ };
42
+ }
43
+
44
+ // src/core/api/lance.ts
45
+ async function runLance(input) {
46
+ const result = await runOffensiveSecurityAgent2({
47
+ ...input,
48
+ mode: "lance",
49
+ activeTools: []
50
+ });
51
+ return { session: result.session, result: result.lance };
52
+ }
53
+
54
+ export { runOffensiveSecurityAgent2, createOffensiveSecurityAgentClient2, runLance };