@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.
- package/README.md +13 -0
- package/build/agent-2z29yw2f.js +14 -0
- package/build/agent-e5k7edth.js +14 -0
- package/build/{agent-fm79ysyz.js → agent-hb0n840w.js} +6 -5
- package/build/{agent-q7hcmhg5.js → agent-ka6b3e6q.js} +7 -6
- package/build/{agent-runs-6nyk8hjx.js → agent-runs-f2wfmfkt.js} +22 -19
- package/build/{apps-8athj8ek.js → apps-3sy3pdmy.js} +17 -14
- package/build/{auth-xeyjgbvt.js → auth-7aygc35y.js} +17 -14
- package/build/blackboxAgent-1p737dt1.js +14 -0
- package/build/{blackboxPentest-jds43wyq.js → blackboxPentest-g6e2mhka.js} +15 -14
- package/build/{cli-rx9g88ws.js → cli-006njjt1.js} +5 -5
- package/build/{cli-se8ae8z3.js → cli-0rhfexax.js} +3 -3
- package/build/{cli-hpbpzy5k.js → cli-2sx4qxgm.js} +9 -9
- package/build/{cli-ee1z711x.js → cli-3chhsshd.js} +4 -1
- package/build/cli-3gq41m8n.js +54 -0
- package/build/cli-4fkaes4s.js +1199 -0
- package/build/{cli-1dm8x61n.js → cli-60k7mepv.js} +2 -2
- package/build/{cli-gsaf4jk3.js → cli-7898kznf.js} +2 -2
- package/build/{cli-w14rjr2a.js → cli-a7hj3v06.js} +1 -1
- package/build/{cli-xcy2vxj2.js → cli-ak23knae.js} +1 -1
- package/build/{cli-w3mk93a4.js → cli-brtfdg49.js} +13 -49
- package/build/{cli-nm0nqnn7.js → cli-e887rt5y.js} +1 -1
- package/build/cli-ev28r4sw.js +1199 -0
- package/build/{cli-e4a4h158.js → cli-gq554agh.js} +1 -1
- package/build/{cli-d47vhcxp.js → cli-h22v29jf.js} +44 -62
- package/build/{cli-yht2f4ny.js → cli-j0497qpt.js} +4 -4
- package/build/{cli-3gt761d2.js → cli-j0wfj2kw.js} +6 -0
- package/build/{cli-hsk2jkfx.js → cli-jv6064md.js} +37465 -36500
- package/build/cli-n5dqdbwn.js +36 -0
- package/build/{cli-72p3tb5s.js → cli-rpbhg3cn.js} +4 -4
- package/build/{cli-j1nfpen0.js → cli-s7d915q8.js} +12 -6
- package/build/{cli-05arm5mj.js → cli-tbyd9myq.js} +44 -21
- package/build/{cli-m2wpnmhx.js → cli-wve4bh9n.js} +2 -2
- package/build/{cli-ae6crt8f.js → cli-xk684kez.js} +5212 -2362
- package/build/{cli-3cw5r290.js → cli-xvz8tcza.js} +5 -1
- package/build/{cli-sfpjmf8c.js → cli-y2mb60wy.js} +1 -1
- package/build/{cli-pwm29ks7.js → cli-ychebg4z.js} +16 -16
- package/build/cli.js +144 -52
- package/build/{config-efytsw1q.js → config-dk9dkh9s.js} +4 -4
- package/build/{doctor-z94afr10.js → doctor-srja68wr.js} +1 -0
- package/build/emscripten-module-kzkvkeqz.js +503 -0
- package/build/{export-trajectory-rt4tf07k.js → export-trajectory-ex317s0n.js} +1 -1
- package/build/{fastStrike-67ajjp5k.js → fastStrike-59as1tjn.js} +12 -7
- package/build/ffi-pf145jhd.js +78 -0
- package/build/{fixes-ky44pmnw.js → fixes-gv0tzmrx.js} +17 -14
- package/build/{index-88w63fck.js → index-3ervx25v.js} +1 -1
- package/build/{index-5p68zt2w.js → index-43s4cm15.js} +36 -10
- package/build/{index-tgxp9dc7.js → index-5ktpbb7s.js} +378 -338
- package/build/{index-3tw03tns.js → index-bgk8enmw.js} +1 -1
- package/build/{index-qnyevb6q.js → index-ffe5c30s.js} +13 -13
- package/build/{index-2f8jbjwh.js → index-gt2h25ha.js} +7 -6
- package/build/{index-pbftr2x4.js → index-p3aehtqt.js} +24 -16
- package/build/{index-0arjc1nx.js → index-vv5s14qm.js} +2 -2
- package/build/{index-mt1gtyb6.js → index-wt44jgfm.js} +5 -4
- package/build/{index-mncyhwse.js → index-y2y61vkm.js} +11 -7
- package/build/{issues-7cj54b0a.js → issues-tsg276ha.js} +52 -22
- package/build/{knowledge-4at10yy7.js → knowledge-25frej6d.js} +17 -14
- package/build/lance-mpx9k2v4.js +232 -0
- package/build/lib/{chunk-jzz08pg8.js → chunk-1q8wesh8.js} +2 -2
- package/build/lib/{chunk-4thgemts.js → chunk-3a3zsgva.js} +19 -30
- package/build/lib/{chunk-xk9wrskq.js → chunk-44kbg9m4.js} +5 -1
- package/build/lib/{chunk-f8gkbqxj.js → chunk-4xgq9vfr.js} +208 -368
- package/build/lib/{chunk-fjt5bj5c.js → chunk-5263t54a.js} +5 -5
- package/build/lib/{chunk-vwx9vhdz.js → chunk-6m2yh985.js} +1244 -356
- package/build/lib/{chunk-satv5p0s.js → chunk-77c3z63z.js} +46 -2
- package/build/lib/{chunk-z5ndygcp.js → chunk-9134mebx.js} +17 -7
- package/build/lib/{chunk-nf5e4gjf.js → chunk-93trdp46.js} +1785 -60
- package/build/lib/{chunk-c9kbxavp.js → chunk-e800v4r1.js} +1 -1
- package/build/lib/{chunk-pxp1r7yn.js → chunk-eekk13qk.js} +5 -1
- package/build/lib/{chunk-fq3m5ykd.js → chunk-enbbw98a.js} +1 -1
- package/build/lib/chunk-f194w4g6.js +112 -0
- package/build/lib/{chunk-s89qgbb7.js → chunk-fgvw6gt4.js} +91 -51
- package/build/lib/{chunk-p0a7ayrq.js → chunk-gy5cqvcn.js} +12 -11
- package/build/lib/{chunk-2njv7wz3.js → chunk-hbyxyxdc.js} +4 -0
- package/build/lib/{chunk-nw1j8jnc.js → chunk-hwaqg5wc.js} +1 -1
- package/build/lib/{chunk-661qwc3d.js → chunk-kq5a62av.js} +15 -11
- package/build/lib/{chunk-rr1j6nmf.js → chunk-mrh9pp6e.js} +1 -1
- package/build/lib/{chunk-bg0xbv05.js → chunk-pv8zyfen.js} +1 -1
- package/build/lib/{chunk-97gfejgq.js → chunk-qrnjk6v3.js} +589 -97
- package/build/lib/{chunk-7hed7dp5.js → chunk-qzkqsczt.js} +12 -3
- package/build/lib/{chunk-br01h7k0.js → chunk-rs86be3y.js} +24 -12
- package/build/lib/{chunk-twxwf5bn.js → chunk-sc8yc711.js} +1 -1
- package/build/lib/{chunk-4hzpxw9v.js → chunk-v91q65qy.js} +12 -48
- package/build/lib/{chunk-157sd6t0.js → chunk-x4jmgdxr.js} +1 -1
- package/build/lib/{chunk-c7xhgcx9.js → chunk-x8rfrceb.js} +5 -1
- package/build/lib/core/agents/agentRuntime.d.ts +4 -0
- package/build/lib/core/agents/lance.d.ts +153 -0
- package/build/lib/core/agents/lanceJudge.d.ts +3 -0
- package/build/lib/core/agents/offSecAgent/index.js +12 -11
- package/build/lib/core/agents/offSecAgent/offensiveSecurityAgent.d.ts +5 -0
- package/build/lib/core/agents/offSecAgent/runtimeContext.d.ts +1 -0
- package/build/lib/core/agents/offSecAgent/subagentSpawner.d.ts +5 -1
- package/build/lib/core/agents/offSecAgent/subagentSpawner.js +7 -6
- package/build/lib/core/agents/offSecAgent/tools/browserHeaderRouting.d.ts +2 -0
- package/build/lib/core/agents/offSecAgent/tools/getPage.d.ts +1 -2
- package/build/lib/core/agents/offSecAgent/tools/httpRequest.d.ts +1 -1
- package/build/lib/core/agents/offSecAgent/tools/index.js +11 -10
- package/build/lib/core/agents/offSecAgent/tools/scopeGuard.d.ts +7 -18
- package/build/lib/core/agents/offSecAgent/tools/types.d.ts +3 -1
- package/build/lib/core/agents/offSecAgent/tools/webSearch.d.ts +8 -0
- package/build/lib/core/agents/offSecAgent/types.d.ts +13 -2
- package/build/lib/core/agents/specialized/attackSurface/blackboxAgent.js +12 -11
- package/build/lib/core/agents/specialized/attackSurface/prompts.d.ts +1 -1
- package/build/lib/core/agents/specialized/attackSurface/schemas.js +12 -11
- package/build/lib/core/agents/specialized/authenticationAgent/index.js +13 -12
- package/build/lib/core/agents/specialized/codeAgent/agent.js +12 -11
- package/build/lib/core/agents/specialized/cvssScorer/index.d.ts +2 -1
- package/build/lib/core/agents/specialized/findingJudge/agent.js +11 -10
- package/build/lib/core/agents/specialized/findingJudge/index.d.ts +2 -1
- package/build/lib/core/agents/specialized/findingJudge/index.js +5 -4
- package/build/lib/core/agents/specialized/patching/index.js +13 -12
- package/build/lib/core/agents/specialized/pentest/agent.js +12 -11
- package/build/lib/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.d.ts +2 -1
- package/build/lib/core/agents/specialized/whiteboxAttackSurface/index.js +12 -11
- package/build/lib/core/ai/ai.d.ts +21 -77
- package/build/lib/core/ai/ai.js +6 -3
- package/build/lib/core/ai/index.d.ts +3 -0
- package/build/lib/core/ai/index.js +20 -5
- package/build/lib/core/ai/modelRuntime.d.ts +10 -0
- package/build/lib/core/ai/models/inference.d.ts +2 -0
- package/build/lib/core/ai/models/openrouter.d.ts +1 -0
- package/build/lib/core/ai/providers/concentrate.d.ts +2 -0
- package/build/lib/core/ai/reasoning.d.ts +44 -0
- package/build/lib/core/ai/utils.d.ts +2 -0
- package/build/lib/core/ai/utils.js +4 -3
- package/build/lib/core/api/index.d.ts +5 -2
- package/build/lib/core/api/index.js +34 -22
- package/build/lib/core/api/issues.d.ts +125 -16
- package/build/lib/core/api/lance.d.ts +6 -0
- package/build/lib/core/api/offesecAgent.d.ts +1 -0
- package/build/lib/core/api/reasoning.d.ts +12 -0
- package/build/lib/core/api/targetedPentest.js +13 -12
- package/build/lib/core/cli/reasoning.d.ts +4 -0
- package/build/lib/core/code-mode/capabilityInvoker.d.ts +53 -0
- package/build/lib/core/code-mode/index.d.ts +3 -0
- package/build/lib/core/code-mode/runtime.d.ts +42 -0
- package/build/lib/core/code-mode/tools.d.ts +16 -0
- package/build/lib/core/config/config.d.ts +9 -2
- package/build/lib/core/config/customProviders.d.ts +11 -0
- package/build/lib/core/config/index.js +1 -1
- package/build/lib/core/findings/registry.d.ts +3 -1
- package/build/lib/core/findings/registry.js +5 -4
- package/build/lib/core/http/researchFetchToken.d.ts +2 -0
- package/build/lib/core/http/targetHeaders.d.ts +2 -0
- package/build/lib/core/http/targetScope.d.ts +3 -0
- package/build/lib/core/observability/index.js +1 -1
- package/build/lib/core/observability/telemetry.d.ts +4 -0
- package/build/lib/core/providers/types.d.ts +1 -1
- package/build/lib/core/providers/utils.d.ts +1 -1
- package/build/lib/core/session/index.d.ts +35 -0
- package/build/lib/core/session/index.js +7 -4
- package/build/lib/core/session/persistence.js +5 -4
- package/build/lib/core/tools/backends/index.js +3 -1
- package/build/lib/core/tools/backends/types.d.ts +2 -0
- package/build/lib/core/workflows/pentest.d.ts +4 -1
- package/build/lib/core/workflows/pentest.js +18 -17
- package/build/lib/core/workflows/seams.js +6 -5
- package/build/lib/core/workflows/threatModel.d.ts +1 -0
- package/build/lib/core/workflows/whiteboxAttackSurface.d.ts +6 -4
- package/build/lib/core/workflows/whiteboxAttackSurface.js +14 -13
- package/build/lib/index.js +25 -24
- package/build/{logs-6nb7m4vw.js → logs-pb1c7tv4.js} +17 -14
- package/build/module-ES6BEMUI-6ewavg9p.js +12 -0
- package/build/{native-rollout-evidence-ydak98sd.js → native-rollout-evidence-mzmspvzz.js} +6 -6
- package/build/offesecAgent-1x8wcabx.js +32 -0
- package/build/pentest-fng54wkx.js +23 -0
- package/build/{pentests-kkz46fs0.js → pentests-1d5y9rnt.js} +17 -14
- package/build/recordedRunClient-mcj422af.js +11 -0
- package/build/subagentSpawner-qrrxtjsv.js +12 -0
- package/build/{targetedPentest-3cz4q1f8.js → targetedPentest-vgxbfacc.js} +35 -8
- package/build/{targets-ry3zsbxp.js → targets-ppa62x1f.js} +17 -14
- package/build/threatModel-0466jh7q.js +24 -0
- package/build/{uninstall-34wqhj3r.js → uninstall-v2n2wqyc.js} +1 -1
- package/build/{upload-da6k0r99.js → upload-4n27max1.js} +4 -4
- package/build/{utils-19f5wsay.js → utils-3any68fn.js} +10 -6
- package/package.json +4 -1
- package/src/cli/agent-runs.test.ts +1 -4
- package/src/cli/issues.test.ts +234 -12
- package/src/cli/issues.ts +49 -9
- package/src/cli/lance-verifier.test.ts +57 -0
- package/src/cli/lance-verifier.ts +73 -0
- package/src/cli/lance.test.ts +71 -0
- package/src/cli/lance.ts +48 -0
- package/src/cli.ts +63 -6
- package/src/core/agents/agentRuntime.test.ts +16 -0
- package/src/core/agents/agentRuntime.ts +8 -0
- package/src/core/agents/lance.test.ts +421 -0
- package/src/core/agents/lance.ts +701 -0
- package/src/core/agents/lanceJudge.test.ts +166 -0
- package/src/core/agents/lanceJudge.ts +115 -0
- package/src/core/agents/offSecAgent/lance.test.ts +188 -0
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.codeMode.test.ts +435 -0
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.runtimeContext.test.ts +1 -0
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.test.ts +6 -1
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.ts +258 -14
- package/src/core/agents/offSecAgent/prompt.ts +2 -2
- package/src/core/agents/offSecAgent/recordedTools.test.ts +6 -1
- package/src/core/agents/offSecAgent/runtimeContext.test.ts +19 -0
- package/src/core/agents/offSecAgent/runtimeContext.ts +9 -2
- package/src/core/agents/offSecAgent/selectiveConstruction.publicPath.test.ts +2 -0
- package/src/core/agents/offSecAgent/selectiveConstruction.test.ts +6 -1
- package/src/core/agents/offSecAgent/subagentSpawner.hooks.test.ts +3 -0
- package/src/core/agents/offSecAgent/subagentSpawner.reasoning.test.ts +167 -0
- package/src/core/agents/offSecAgent/subagentSpawner.ts +20 -27
- package/src/core/agents/offSecAgent/tools/browserHeaderRouting.redirect.test.ts +141 -0
- package/src/core/agents/offSecAgent/tools/browserHeaderRouting.test.ts +106 -8
- package/src/core/agents/offSecAgent/tools/browserHeaderRouting.ts +56 -16
- package/src/core/agents/offSecAgent/tools/delegateAuth.ts +7 -2
- package/src/core/agents/offSecAgent/tools/documentFinding.ts +4 -5
- package/src/core/agents/offSecAgent/tools/executeCommand.test.ts +2 -1
- package/src/core/agents/offSecAgent/tools/getPage.test.ts +120 -0
- package/src/core/agents/offSecAgent/tools/getPage.ts +24 -19
- package/src/core/agents/offSecAgent/tools/httpBackends.test.ts +18 -25
- package/src/core/agents/offSecAgent/tools/httpRequest.body.test.ts +214 -0
- package/src/core/agents/offSecAgent/tools/httpRequest.test.ts +54 -0
- package/src/core/agents/offSecAgent/tools/httpRequest.ts +20 -11
- package/src/core/agents/offSecAgent/tools/playwrightMcp.test.ts +5 -0
- package/src/core/agents/offSecAgent/tools/playwrightMcp.ts +5 -2
- package/src/core/agents/offSecAgent/tools/runAttackSurface.ts +5 -4
- package/src/core/agents/offSecAgent/tools/runPentestWorkflow.ts +2 -0
- package/src/core/agents/offSecAgent/tools/sandboxPlaywright.test.ts +47 -0
- package/src/core/agents/offSecAgent/tools/sandboxPlaywright.ts +65 -2
- package/src/core/agents/offSecAgent/tools/scopeGuard.test.ts +121 -52
- package/src/core/agents/offSecAgent/tools/scopeGuard.ts +50 -30
- package/src/core/agents/offSecAgent/tools/spawnCodingAgent.ts +3 -5
- package/src/core/agents/offSecAgent/tools/spawnPentestAgent.test.ts +11 -4
- package/src/core/agents/offSecAgent/tools/spawnPentestAgent.ts +4 -5
- package/src/core/agents/offSecAgent/tools/spawnPentestSwarm.ts +3 -0
- package/src/core/agents/offSecAgent/tools/threatModelGenerator.ts +3 -3
- package/src/core/agents/offSecAgent/tools/types.ts +4 -0
- package/src/core/agents/offSecAgent/tools/webSearch.test.ts +154 -0
- package/src/core/agents/offSecAgent/tools/webSearch.ts +119 -87
- package/src/core/agents/offSecAgent/types.ts +15 -1
- package/src/core/agents/specialized/attackSurface/blackboxAgent.ts +3 -3
- package/src/core/agents/specialized/attackSurface/prompts.ts +9 -45
- package/src/core/agents/specialized/cvssScorer/index.test.ts +2 -1
- package/src/core/agents/specialized/cvssScorer/index.ts +3 -0
- package/src/core/agents/specialized/findingJudge/index.ts +6 -0
- package/src/core/agents/specialized/pentest/agent.ts +1 -1
- package/src/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.ts +4 -0
- package/src/core/ai/ai.effective-tools.test.ts +27 -2
- package/src/core/ai/ai.lance.test.ts +581 -0
- package/src/core/ai/ai.operator-context.bench.test.ts +159 -177
- package/src/core/ai/ai.recorded-context.test.ts +15 -8
- package/src/core/ai/ai.test.ts +71 -75
- package/src/core/ai/ai.ts +130 -299
- package/src/core/ai/compactionTelemetry.test.ts +230 -16
- package/src/core/ai/index.ts +17 -0
- package/src/core/ai/inference.test.ts +292 -0
- package/src/core/ai/modelRuntime.test.ts +58 -0
- package/src/core/ai/modelRuntime.ts +63 -0
- package/src/core/ai/models/concentrate.ts +132 -0
- package/src/core/ai/models/index.ts +13 -8
- package/src/core/ai/models/inference.ts +11 -0
- package/src/core/ai/models/models.test.ts +53 -7
- package/src/core/ai/models/openai.ts +6 -0
- package/src/core/ai/models/openrouter-reasoning.json +285 -0
- package/src/core/ai/models/openrouter.ts +132 -3
- package/src/core/ai/providers/concentrate.ts +96 -0
- package/src/core/ai/providers/custom.test.ts +74 -0
- package/src/core/ai/providers/custom.ts +3 -1
- package/src/core/ai/providers/openai-models.test.ts +5 -0
- package/src/core/ai/providers/pensarFormatters.ts +8 -1
- package/src/core/ai/providers/pensarResponsesStream.test.ts +117 -0
- package/src/core/ai/providers/pensarResponsesStream.ts +20 -1
- package/src/core/ai/providers/qwen-models.test.ts +265 -0
- package/src/core/ai/reasoning.test.ts +317 -0
- package/src/core/ai/reasoning.ts +505 -0
- package/src/core/ai/utils.native-rollout-evidence.test.ts +20 -8
- package/src/core/ai/utils.ts +136 -41
- package/src/core/api/attackSurface.ts +1 -0
- package/src/core/api/index.ts +12 -0
- package/src/core/api/issues.test.ts +80 -6
- package/src/core/api/issues.ts +137 -16
- package/src/core/api/lance.ts +23 -0
- package/src/core/api/offesecAgent.test.ts +51 -0
- package/src/core/api/offesecAgent.ts +15 -1
- package/src/core/api/reasoning.test.ts +213 -0
- package/src/core/api/reasoning.ts +44 -0
- package/src/core/api/recordedRun.loop.test.ts +72 -1
- package/src/core/api/targetedPentest.test.ts +14 -2
- package/src/core/api/targetedPentest.ts +33 -0
- package/src/core/cli/reasoning.test.ts +149 -0
- package/src/core/cli/reasoning.ts +95 -0
- package/src/core/code-mode/capabilityInvoker.test.ts +424 -0
- package/src/core/code-mode/capabilityInvoker.ts +383 -0
- package/src/core/code-mode/index.ts +8 -0
- package/src/core/code-mode/runtime.setup.test.ts +157 -0
- package/src/core/code-mode/runtime.test.ts +664 -0
- package/src/core/code-mode/runtime.ts +700 -0
- package/src/core/code-mode/tools.test.ts +375 -0
- package/src/core/code-mode/tools.ts +281 -0
- package/src/core/config/config.test.ts +7 -0
- package/src/core/config/config.ts +9 -0
- package/src/core/config/customProviders.ts +21 -2
- package/src/core/doctor.ts +1 -0
- package/src/core/findings/registry.test.ts +9 -1
- package/src/core/findings/registry.ts +6 -0
- package/src/core/http/agentNetworkPolicyFixture.test.ts +39 -0
- package/src/core/http/headers.contract.test.ts +100 -2
- package/src/core/http/researchFetchToken.test.ts +50 -0
- package/src/core/http/researchFetchToken.ts +63 -0
- package/src/core/http/targetHeaders.ts +26 -8
- package/src/core/http/targetScope.ts +47 -11
- package/src/core/observability/telemetry.test.ts +129 -76
- package/src/core/observability/telemetry.ts +5 -0
- package/src/core/providers/types.ts +7 -0
- package/src/core/providers/utils.ts +6 -1
- package/src/core/providers/verify.test.ts +54 -0
- package/src/core/providers/verify.ts +28 -0
- package/src/core/runtime/runRecoveryPlan.test.ts +18 -0
- package/src/core/runtime/runRecoveryPlan.ts +5 -0
- package/src/core/runtime/runTools.test.ts +2 -0
- package/src/core/runtime/runTools.ts +4 -1
- package/src/core/runtime/sqliteControlStore.test.ts +21 -0
- package/src/core/runtime/sqliteControlStore.ts +6 -1
- package/src/core/runtime/sqliteRecoveryStore.test.ts +24 -5
- package/src/core/session/index.ts +33 -0
- package/src/core/tools/backends/local.test.ts +126 -0
- package/src/core/tools/backends/local.ts +256 -59
- package/src/core/tools/backends/policy.test.ts +36 -1
- package/src/core/tools/backends/policy.ts +9 -4
- package/src/core/tools/backends/types.ts +2 -0
- package/src/core/workflows/fastStrike.ts +3 -0
- package/src/core/workflows/pentest.ts +18 -0
- package/src/core/workflows/threatModel.ts +2 -0
- package/src/core/workflows/whiteboxAttackSurface.test.ts +40 -0
- package/src/core/workflows/whiteboxAttackSurface.ts +19 -4
- package/src/test-fixtures/agent-network-policy-v2.json +80 -0
- package/src/tui/command-registry.test.ts +12 -0
- package/src/tui/command-registry.ts +10 -0
- package/src/tui/components/chat/config-view.tsx +6 -10
- package/src/tui/components/chat/home-view.tsx +2 -2
- package/src/tui/components/chat/input-area.tsx +3 -2
- package/src/tui/components/commands/__tests__/advanced-settings-lifecycle.tsx +81 -93
- package/src/tui/components/commands/advanced-settings.test.ts +7 -1
- package/src/tui/components/commands/advanced-settings.tsx +143 -172
- package/src/tui/components/commands/api-key-input.tsx +2 -0
- package/src/tui/components/commands/models-display.tsx +7 -1
- package/src/tui/components/commands/operator-wizard.tsx +2 -0
- package/src/tui/components/commands/provider-manager.tsx +3 -0
- package/src/tui/components/model-picker/ModelPicker.tsx +66 -103
- package/src/tui/components/model-picker/ModelPickerDialog.tsx +8 -14
- package/src/tui/components/model-picker/__tests__/reasoning-control.tsx +189 -0
- package/src/tui/components/model-picker/model-search.test.ts +11 -0
- package/src/tui/components/model-picker/model-search.ts +1 -0
- package/src/tui/components/model-picker/reasoning-control.test.ts +21 -0
- package/src/tui/components/operator-dashboard/index.tsx +121 -42
- package/src/tui/components/operator-dashboard/logic.test.ts +39 -3
- package/src/tui/components/operator-dashboard/logic.ts +14 -3
- package/src/tui/context/agent.tsx +32 -79
- package/src/tui/context/route.tsx +1 -0
- package/src/tui/index.tsx +1 -0
- package/build/agent-dwb90wfs.js +0 -13
- package/build/agent-j2h5dgcj.js +0 -13
- package/build/blackboxAgent-g034embj.js +0 -13
- package/build/cli-g06s7edq.js +0 -11
- package/build/offesecAgent-zbmmy8g0.js +0 -22
- package/build/pentest-65jff81b.js +0 -22
- package/build/recordedRunClient-647rnnet.js +0 -11
- 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-
|
|
2
|
-
import"./cli-
|
|
3
|
-
import"./cli-
|
|
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-
|
|
8
|
+
} from "./cli-xvz8tcza.js";
|
|
8
9
|
import"./cli-qba2x69h.js";
|
|
9
10
|
import {
|
|
10
11
|
stepCountIs2,
|
|
11
12
|
init_dist
|
|
12
|
-
} from "./cli-
|
|
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-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-2sx4qxgm.js";
|
|
5
|
+
import"./cli-xvz8tcza.js";
|
|
6
6
|
import"./cli-qba2x69h.js";
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
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-
|
|
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-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-gq554agh.js";
|
|
5
|
+
import"./cli-a7hj3v06.js";
|
|
6
|
+
import"./cli-xk684kez.js";
|
|
6
7
|
import {
|
|
7
8
|
AgentEventBus
|
|
8
|
-
} from "./cli-
|
|
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-
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
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-
|
|
32
|
-
import"./cli-
|
|
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
|
-
|
|
37
|
-
} from "./cli-
|
|
39
|
+
init_ai2
|
|
40
|
+
} from "./cli-jv6064md.js";
|
|
38
41
|
import"./cli-c2k4xxaw.js";
|
|
39
42
|
|
|
40
43
|
// src/cli/agent-runs.ts
|
|
41
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-
|
|
29
|
-
import"./cli-
|
|
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-
|
|
35
|
+
import"./cli-3gq41m8n.js";
|
|
36
|
+
import"./cli-xvz8tcza.js";
|
|
34
37
|
import"./cli-qba2x69h.js";
|
|
35
|
-
import"./cli-
|
|
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-
|
|
2
|
+
import"./cli-xk684kez.js";
|
|
3
|
+
import"./cli-ev28r4sw.js";
|
|
3
4
|
import {
|
|
4
5
|
config2,
|
|
5
6
|
init_config
|
|
6
|
-
} from "./cli-
|
|
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-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-
|
|
29
|
-
import"./cli-
|
|
30
|
-
import"./cli-
|
|
31
|
-
import"./cli-
|
|
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-
|
|
37
|
+
import"./cli-3gq41m8n.js";
|
|
38
|
+
import"./cli-xvz8tcza.js";
|
|
36
39
|
import"./cli-qba2x69h.js";
|
|
37
|
-
import"./cli-
|
|
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-
|
|
2
|
-
import"./cli-
|
|
3
|
-
import"./cli-
|
|
4
|
-
import"./cli-
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
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-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
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-
|
|
19
|
+
import"./cli-xvz8tcza.js";
|
|
19
20
|
import"./cli-qba2x69h.js";
|
|
20
21
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} from "./cli-
|
|
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
|
-
|
|
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-
|
|
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
|
-
|
|
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
|
-
|
|
4
|
-
} from "./cli-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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
|
-
-
|
|
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.
|
|
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 };
|