@pensar/apex 2.6.1 → 2.7.0-canary.1572d9a4
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/build/{agent-ayreaj6z.js → agent-3g1b578v.js} +6 -5
- package/build/{agent-yby11zaq.js → agent-p8cezgbb.js} +7 -6
- package/build/{agent-runs-g37vkrjr.js → agent-runs-f86emmgg.js} +23 -20
- package/build/agent-vaq31je6.js +14 -0
- package/build/agent-vvdqga09.js +14 -0
- package/build/{apps-xn6km9yn.js → apps-3stwnmen.js} +16 -13
- package/build/{auth-d105wc64.js → auth-7md9kwda.js} +16 -13
- package/build/blackboxAgent-ct8bejef.js +14 -0
- package/build/{blackboxPentest-ps78v3w7.js → blackboxPentest-w2nr4md3.js} +21 -15
- package/build/{cli-c05y640n.js → cli-1j28cbhy.js} +1 -1
- package/build/{cli-d37a42dc.js → cli-2jz2jz06.js} +206 -90
- package/build/{cli-az3xq70v.js → cli-4a8dsz2k.js} +4 -4
- package/build/{cli-qgz1q9g5.js → cli-58781vcf.js} +1192 -1473
- package/build/{cli-gx71jcke.js → cli-7067zzeb.js} +1 -1
- package/build/{cli-3sp6nd8d.js → cli-81smmd5w.js} +5 -5
- package/build/{cli-k2nwxta0.js → cli-8b25dhky.js} +2 -2
- package/build/{cli-fy6vh2a7.js → cli-8sw5zpqz.js} +1 -1
- package/build/{cli-709rvekb.js → cli-cg3ypx5n.js} +14 -7
- package/build/{cli-dpsw2fe6.js → cli-e9v6zg6h.js} +40941 -40172
- package/build/cli-fjxmphg1.js +36 -0
- package/build/{cli-7eea4e2y.js → cli-gzb6qrzh.js} +31 -60
- package/build/{cli-65g6rcat.js → cli-khnf5xrf.js} +2 -1
- package/build/{cli-1ve18npr.js → cli-mdzt2e8j.js} +4 -2
- package/build/{cli-n2en7j5b.js → cli-n8mmw4c4.js} +1 -1
- package/build/cli-pndb7mh9.js +1193 -0
- package/build/cli-px6ehzqx.js +54 -0
- package/build/{cli-xtc2t6me.js → cli-qs4msn6x.js} +111 -47
- package/build/{cli-kb21qhvm.js → cli-rvybdhgn.js} +4 -3
- package/build/{cli-ae8jqxqr.js → cli-v739h7hb.js} +2 -2
- package/build/{cli-ngq9dr8n.js → cli-wm8ech0x.js} +3 -3
- package/build/cli.js +170 -51
- package/build/{config-zpqkd5cz.js → config-e5v1bkh1.js} +1 -1
- package/build/{fastStrike-mcjdvwez.js → fastStrike-efp0rjs3.js} +74 -17
- package/build/{fixes-kytx5dmj.js → fixes-926cw1ej.js} +16 -13
- package/build/{index-n65z6v7b.js → index-3t41p258.js} +7 -6
- package/build/{index-qv4cc65p.js → index-bv09af6g.js} +19 -15
- package/build/{index-je6hcsqr.js → index-bv6dtwse.js} +1 -1
- package/build/{index-4vqdgb42.js → index-jt52ffgn.js} +1657 -1400
- package/build/{index-ns4m4s01.js → index-np405b9e.js} +11 -7
- package/build/{index-r9yjkfrv.js → index-qys178kp.js} +5 -4
- package/build/{index-wqetp6gq.js → index-tpyzq2wq.js} +42 -11
- package/build/{index-fv64eb32.js → index-vrcdyebh.js} +2 -2
- package/build/{index-dr3tg1w3.js → index-z1g8vbtm.js} +1 -1
- package/build/{issues-eb3q9d3a.js → issues-sncyqh14.js} +16 -13
- package/build/{knowledge-fqsvtx0f.js → knowledge-esgvy5ws.js} +16 -13
- package/build/lance-sacfgs1z.js +232 -0
- package/build/lib/{chunk-9yksqgzr.js → chunk-4aevegnc.js} +77 -45
- package/build/lib/{chunk-9tt2021m.js → chunk-4kf4a15q.js} +13 -13
- package/build/lib/{chunk-fy3bbbqy.js → chunk-5avnedwm.js} +7 -1
- package/build/lib/{chunk-bb0ekhkw.js → chunk-5nz5tk3p.js} +76 -22
- package/build/lib/{chunk-4hwzqthr.js → chunk-7s8e5wrd.js} +3 -2
- package/build/lib/{chunk-yrnrbjes.js → chunk-85kpxwzs.js} +4 -2
- package/build/lib/{chunk-mg03jdmt.js → chunk-9jkzk9nc.js} +1 -1
- package/build/lib/{chunk-r4j8ybn9.js → chunk-9wwts6r6.js} +824 -77
- package/build/lib/{chunk-nhfax4gb.js → chunk-bxznzxdy.js} +5 -1
- package/build/lib/{chunk-r2dkp4tb.js → chunk-cqxm95md.js} +1 -1
- package/build/lib/{chunk-w66ce82a.js → chunk-e3agqspc.js} +12 -4
- package/build/lib/{chunk-ba41jh41.js → chunk-eh5yw385.js} +1137 -333
- package/build/lib/{chunk-1azdancq.js → chunk-ewc9r84m.js} +5 -1
- package/build/lib/{chunk-2njv7wz3.js → chunk-hbyxyxdc.js} +4 -0
- package/build/lib/{chunk-e8yy2k73.js → chunk-jhhwts6w.js} +28 -2
- package/build/lib/{chunk-1jvwqnem.js → chunk-kbxbd1kn.js} +108 -44
- package/build/lib/{chunk-7pwa92rn.js → chunk-mph5fvk7.js} +1 -1
- package/build/lib/chunk-psc23epq.js +107 -0
- package/build/lib/{chunk-acgbyf5h.js → chunk-qxad7qjd.js} +4 -2
- package/build/lib/{chunk-3c00n0cy.js → chunk-r0v3vvgm.js} +54 -33
- package/build/lib/{chunk-1yct6cra.js → chunk-rt13120a.js} +1 -1
- package/build/lib/{chunk-v3dk9j7k.js → chunk-sgya016v.js} +93 -22
- package/build/lib/{chunk-1fy8azee.js → chunk-txef92hq.js} +1 -1
- package/build/lib/{chunk-2qsq76xq.js → chunk-vcd90qrn.js} +189 -90
- package/build/lib/{chunk-7gjdygcx.js → chunk-vwr9w3ab.js} +2 -0
- package/build/lib/{chunk-z137x08b.js → chunk-wf6ak0m3.js} +92 -70
- package/build/lib/{chunk-xhdpgpkm.js → chunk-xft0ms9j.js} +2 -2
- package/build/lib/core/agents/agentRuntime.d.ts +3 -1
- package/build/lib/core/agents/defineAgent.d.ts +3 -2
- 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.d.ts +3 -1
- package/build/lib/core/agents/offSecAgent/index.js +16 -14
- package/build/lib/core/agents/offSecAgent/offensiveSecurityAgent.d.ts +4 -0
- package/build/lib/core/agents/offSecAgent/prompt.d.ts +3 -1
- package/build/lib/core/agents/offSecAgent/subagentSpawner.d.ts +18 -2
- package/build/lib/core/agents/offSecAgent/subagentSpawner.js +10 -8
- package/build/lib/core/agents/offSecAgent/toolExecutionContext.d.ts +3 -0
- package/build/lib/core/agents/offSecAgent/toolLifecycle.d.ts +1 -0
- package/build/lib/core/agents/offSecAgent/tools/index.js +10 -6
- package/build/lib/core/agents/offSecAgent/tools/listMemories.d.ts +11 -1
- package/build/lib/core/agents/offSecAgent/tools/reportError.d.ts +2 -1
- package/build/lib/core/agents/offSecAgent/tools/runPentestWorkflow.d.ts +20 -1
- package/build/lib/core/agents/offSecAgent/tools/spawnPentestAgent.d.ts +4 -7
- package/build/lib/core/agents/offSecAgent/tools/spawnPentestSwarm.d.ts +7 -1
- package/build/lib/core/agents/offSecAgent/tools/types.d.ts +6 -3
- package/build/lib/core/agents/offSecAgent/tools/whiteboxCandidates.d.ts +2 -2
- package/build/lib/core/agents/offSecAgent/types.d.ts +19 -3
- package/build/lib/core/agents/specialized/attackSurface/blackboxAgent.js +13 -13
- package/build/lib/core/agents/specialized/attackSurface/schemas.js +12 -12
- package/build/lib/core/agents/specialized/authenticationAgent/index.js +14 -14
- package/build/lib/core/agents/specialized/codeAgent/agent.js +13 -13
- package/build/lib/core/agents/specialized/codeAgent/prompts.d.ts +1 -0
- package/build/lib/core/agents/specialized/cvssScorer/index.d.ts +2 -1
- package/build/lib/core/agents/specialized/findingJudge/agent.js +11 -11
- package/build/lib/core/agents/specialized/findingJudge/index.d.ts +2 -1
- package/build/lib/core/agents/specialized/findingJudge/index.js +4 -4
- package/build/lib/core/agents/specialized/patching/index.js +14 -14
- package/build/lib/core/agents/specialized/pentest/agent.d.ts +18 -4
- package/build/lib/core/agents/specialized/pentest/agent.js +15 -13
- package/build/lib/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.d.ts +2 -1
- package/build/lib/core/agents/specialized/whiteboxAttackSurface/index.js +13 -13
- package/build/lib/core/ai/ai.d.ts +29 -70
- package/build/lib/core/ai/ai.js +5 -3
- package/build/lib/core/ai/index.d.ts +1 -0
- package/build/lib/core/ai/index.js +16 -4
- package/build/lib/core/ai/models/claude-capabilities.d.ts +3 -2
- package/build/lib/core/ai/models/concentrate.d.ts +1 -0
- package/build/lib/core/ai/models/index.d.ts +1 -1
- package/build/lib/core/ai/providers/concentrate.d.ts +1 -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 +5 -3
- package/build/lib/core/api/index.d.ts +6 -0
- package/build/lib/core/api/index.js +32 -23
- 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.d.ts +1 -0
- package/build/lib/core/api/targetedPentest.js +14 -14
- package/build/lib/core/cli/reasoning.d.ts +4 -0
- package/build/lib/core/config/config.d.ts +10 -2
- package/build/lib/core/config/customProviders.d.ts +11 -0
- package/build/lib/core/config/index.js +1 -1
- package/build/lib/core/eventBus.js +1 -1
- package/build/lib/core/findings/registry.d.ts +3 -1
- package/build/lib/core/findings/registry.js +4 -4
- package/build/lib/core/observability/index.js +1 -1
- package/build/lib/core/observability/telemetry.d.ts +4 -0
- package/build/lib/core/session/index.d.ts +47 -0
- package/build/lib/core/session/index.js +6 -4
- package/build/lib/core/session/persistence.d.ts +7 -0
- package/build/lib/core/session/persistence.js +8 -4
- package/build/lib/core/tools/backends/index.js +1 -1
- package/build/lib/core/tools/backends/resolve.d.ts +1 -0
- package/build/lib/core/workflows/fastStrike.d.ts +3 -1
- package/build/lib/core/workflows/pentest.d.ts +12 -2
- package/build/lib/core/workflows/pentest.js +19 -19
- package/build/lib/core/workflows/seams.js +5 -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 +15 -15
- package/build/lib/index.js +25 -25
- package/build/{logs-x62b7hk1.js → logs-bcbjpjp6.js} +16 -13
- package/build/{native-rollout-evidence-c9yhfqcs.js → native-rollout-evidence-rph1774m.js} +5 -5
- package/build/offesecAgent-81h1p6ee.js +32 -0
- package/build/pentest-2q20q6n1.js +23 -0
- package/build/{pentests-e0f32aqx.js → pentests-jgw031mc.js} +16 -13
- package/build/recordedRunClient-6axj6fba.js +11 -0
- package/build/subagentSpawner-a861gvt0.js +12 -0
- package/build/targetedPentest-6yxznt7s.js +91 -0
- package/build/{targets-xj9g3q0z.js → targets-bjah19dp.js} +16 -13
- package/build/threatModel-739kpexm.js +24 -0
- package/build/{uninstall-7s784q4a.js → uninstall-yxrn9edt.js} +1 -1
- package/build/{upload-4gvhwmvr.js → upload-34ewrjp5.js} +4 -4
- package/build/{utils-cjrz64pc.js → utils-fzm66efw.js} +5 -5
- package/package.json +2 -1
- package/src/cli/issues.test.ts +17 -1
- 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 +109 -19
- package/src/core/agents/agentRuntime.test.ts +42 -0
- package/src/core/agents/agentRuntime.ts +7 -2
- package/src/core/agents/defineAgent.ts +3 -1
- 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/index.ts +3 -0
- package/src/core/agents/offSecAgent/interruptedStepFinalization.test.ts +51 -0
- package/src/core/agents/offSecAgent/lance.test.ts +188 -0
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.test.ts +92 -5
- package/src/core/agents/offSecAgent/offensiveSecurityAgent.ts +244 -41
- package/src/core/agents/offSecAgent/prompt.test.ts +46 -0
- package/src/core/agents/offSecAgent/prompt.ts +52 -8
- package/src/core/agents/offSecAgent/selectiveConstruction.publicPath.test.ts +38 -0
- package/src/core/agents/offSecAgent/selectiveConstruction.test.ts +64 -0
- package/src/core/agents/offSecAgent/subagentSpawner.hooks.test.ts +11 -3
- package/src/core/agents/offSecAgent/subagentSpawner.reasoning.test.ts +167 -0
- package/src/core/agents/offSecAgent/subagentSpawner.ts +82 -28
- package/src/core/agents/offSecAgent/toolExecutionContext.test.ts +230 -0
- package/src/core/agents/offSecAgent/toolExecutionContext.ts +56 -0
- package/src/core/agents/offSecAgent/toolLifecycle.ts +2 -0
- package/src/core/agents/offSecAgent/tools/delegateAuth.ts +4 -2
- package/src/core/agents/offSecAgent/tools/documentFinding.test.ts +9 -4
- package/src/core/agents/offSecAgent/tools/documentFinding.ts +10 -9
- package/src/core/agents/offSecAgent/tools/listMemories.test.ts +230 -0
- package/src/core/agents/offSecAgent/tools/listMemories.ts +73 -6
- package/src/core/agents/offSecAgent/tools/reportError.test.ts +6 -0
- package/src/core/agents/offSecAgent/tools/reportError.ts +10 -2
- package/src/core/agents/offSecAgent/tools/runAttackSurface.ts +7 -4
- package/src/core/agents/offSecAgent/tools/runPentestWorkflow.test.ts +57 -0
- package/src/core/agents/offSecAgent/tools/runPentestWorkflow.ts +21 -1
- package/src/core/agents/offSecAgent/tools/runWhiteboxScan.ts +5 -2
- package/src/core/agents/offSecAgent/tools/spawnCodingAgent.ts +50 -67
- package/src/core/agents/offSecAgent/tools/spawnPentestAgent.test.ts +79 -3
- package/src/core/agents/offSecAgent/tools/spawnPentestAgent.ts +36 -16
- package/src/core/agents/offSecAgent/tools/spawnPentestSwarm.ts +28 -5
- package/src/core/agents/offSecAgent/tools/threatModelGenerator.ts +4 -3
- package/src/core/agents/offSecAgent/tools/types.ts +12 -2
- package/src/core/agents/offSecAgent/tools/updateTask.ts +5 -1
- package/src/core/agents/offSecAgent/tools/whiteboxCandidates.ts +11 -4
- package/src/core/agents/offSecAgent/types.ts +22 -1
- package/src/core/agents/specialized/codeAgent/agent.test.ts +7 -0
- package/src/core/agents/specialized/codeAgent/agent.ts +9 -2
- package/src/core/agents/specialized/codeAgent/prompts.ts +6 -0
- 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.test.ts +155 -0
- package/src/core/agents/specialized/pentest/agent.ts +181 -52
- package/src/core/agents/specialized/pentest/results.test.ts +59 -4
- package/src/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.concurrency.test.ts +59 -2
- package/src/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.hooks.test.ts +127 -0
- package/src/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.ts +74 -68
- package/src/core/ai/ai.durability-hooks.test.ts +25 -7
- package/src/core/ai/ai.lance.test.ts +581 -0
- package/src/core/ai/ai.operator-context.bench.test.ts +1390 -0
- package/src/core/ai/ai.recorded-context.test.ts +89 -8
- package/src/core/ai/ai.test.ts +81 -59
- package/src/core/ai/ai.ts +453 -327
- package/src/core/ai/compactionTelemetry.test.ts +69 -17
- package/src/core/ai/index.ts +11 -0
- package/src/core/ai/models/anthropic.ts +6 -0
- package/src/core/ai/models/bedrock.ts +18 -0
- package/src/core/ai/models/claude-capabilities.ts +29 -8
- package/src/core/ai/models/concentrate.ts +52 -0
- package/src/core/ai/models/index.ts +25 -4
- package/src/core/ai/models/models.test.ts +179 -7
- package/src/core/ai/models/openrouter-reasoning.json +219 -0
- package/src/core/ai/models/openrouter.ts +43 -1
- package/src/core/ai/providers/anthropic-models.test.ts +60 -1
- package/src/core/ai/providers/bedrock-models.test.ts +81 -0
- package/src/core/ai/providers/concentrate.test.ts +31 -0
- package/src/core/ai/providers/concentrate.ts +11 -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/gateway-models.test.ts +16 -6
- package/src/core/ai/providers/pensarFormatters.ts +8 -1
- package/src/core/ai/reasoning.test.ts +313 -0
- package/src/core/ai/reasoning.ts +500 -0
- package/src/core/ai/streamIdleTimeout.test.ts +21 -0
- package/src/core/ai/utils.native-rollout-evidence.test.ts +21 -8
- package/src/core/ai/utils.ts +269 -163
- package/src/core/api/attackSurface.ts +1 -0
- package/src/core/api/blackboxPentest.ts +9 -1
- package/src/core/api/index.ts +17 -0
- 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 +5 -1
- package/src/core/api/targetedPentest.test.ts +14 -2
- package/src/core/api/targetedPentest.ts +52 -5
- package/src/core/cli/reasoning.test.ts +149 -0
- package/src/core/cli/reasoning.ts +95 -0
- package/src/core/config/config.test.ts +35 -0
- package/src/core/config/config.ts +11 -0
- package/src/core/config/customProviders.ts +21 -2
- package/src/core/eventBus.ts +1 -0
- package/src/core/findings/registry.test.ts +9 -1
- package/src/core/findings/registry.ts +6 -0
- package/src/core/observability/telemetry.test.ts +131 -79
- package/src/core/observability/telemetry.ts +5 -0
- package/src/core/runtime/sqliteRunObservation.test.ts +1 -1
- package/src/core/session/index.ts +38 -0
- package/src/core/session/persistence.test.ts +62 -0
- package/src/core/session/persistence.ts +56 -0
- package/src/core/tools/backends/resolve.ts +7 -0
- package/src/core/tools/backends/whiteboxJobs.test.ts +9 -8
- package/src/core/workflows/fastStrike.seams.test.ts +149 -0
- package/src/core/workflows/fastStrike.test.ts +18 -1
- package/src/core/workflows/fastStrike.ts +106 -11
- package/src/core/workflows/pentest.test.ts +104 -0
- package/src/core/workflows/pentest.ts +128 -7
- package/src/core/workflows/seams.test.ts +13 -0
- package/src/core/workflows/seams.ts +5 -1
- package/src/core/workflows/threatModel.ts +2 -0
- package/src/core/workflows/whiteboxAttackSurface.test.ts +74 -2
- package/src/core/workflows/whiteboxAttackSurface.ts +102 -73
- 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 +2 -2
- package/src/tui/components/chat/loading-indicator.tsx +20 -4
- package/src/tui/components/chat/message-list.tsx +1 -0
- package/src/tui/components/commands/__tests__/advanced-settings-lifecycle.tsx +164 -0
- package/src/tui/components/commands/advanced-settings.test.ts +34 -0
- package/src/tui/components/commands/advanced-settings.tsx +220 -31
- package/src/tui/components/commands/models-display.tsx +7 -1
- package/src/tui/components/model-picker/ModelPicker.tsx +65 -103
- package/src/tui/components/model-picker/ModelPickerDialog.tsx +8 -14
- package/src/tui/components/model-picker/__tests__/reasoning-control.tsx +162 -0
- package/src/tui/components/model-picker/reasoning-control.test.ts +15 -0
- package/src/tui/components/operator-dashboard/index.tsx +166 -50
- package/src/tui/components/operator-dashboard/logic.test.ts +144 -2
- package/src/tui/components/operator-dashboard/logic.ts +54 -3
- package/src/tui/components/operator-dashboard/run-events.test.ts +3 -1
- package/src/tui/components/shared/__tests__/tool-renderer-lifecycle.tsx +18 -0
- package/src/tui/components/shared/action-label.test.ts +9 -0
- package/src/tui/components/shared/compacting-icon.tsx +18 -0
- package/src/tui/components/shared/index.ts +1 -0
- package/src/tui/components/shared/tool-registry.ts +1 -0
- package/src/tui/components/shared/tool-renderer.tsx +21 -7
- package/src/tui/context/agent.tsx +32 -79
- package/src/tui/context/route.tsx +2 -0
- package/src/tui/index.tsx +1 -0
- package/src/tui/keybindings/registry.ts +2 -0
- package/build/agent-6w7egcf1.js +0 -13
- package/build/agent-9zx75feh.js +0 -13
- package/build/blackboxAgent-s56sgx9b.js +0 -13
- package/build/cli-g06s7edq.js +0 -11
- package/build/lib/chunk-z96pbjhd.js +0 -56
- package/build/offesecAgent-5whnpeta.js +0 -22
- package/build/pentest-e61hc38s.js +0 -22
- package/build/recordedRunClient-dp032c32.js +0 -11
- package/build/targetedPentest-rcbs4nvp.js +0 -57
- package/build/threatModel-jkxfa40s.js +0 -21
package/build/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
import"./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
import"./cli-8sw5zpqz.js";
|
|
4
|
+
import"./cli-1j28cbhy.js";
|
|
5
5
|
import {
|
|
6
6
|
require_src,
|
|
7
7
|
require_src2,
|
|
@@ -18,16 +18,22 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
endAllActiveRootSpans,
|
|
20
20
|
init_active_root_spans,
|
|
21
|
-
init_model_history,
|
|
22
|
-
init_models,
|
|
23
|
-
buildAuthConfig,
|
|
24
|
-
init_utils,
|
|
25
21
|
init_session,
|
|
26
22
|
createLogger,
|
|
27
23
|
logger,
|
|
28
24
|
init_structured,
|
|
25
|
+
init_models,
|
|
26
|
+
resolveReasoningSetting,
|
|
27
|
+
getReasoningCapabilities,
|
|
28
|
+
getReasoningChoices,
|
|
29
|
+
validateReasoningSetting,
|
|
30
|
+
init_reasoning,
|
|
31
|
+
buildAuthConfig,
|
|
32
|
+
init_utils,
|
|
33
|
+
init_ai,
|
|
34
|
+
init_model_history,
|
|
29
35
|
init_ai2
|
|
30
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-e9v6zg6h.js";
|
|
31
37
|
import {
|
|
32
38
|
init_inference_attempt,
|
|
33
39
|
init_native_rollout_evidence
|
|
@@ -40,13 +46,13 @@ import {
|
|
|
40
46
|
init_customProviders,
|
|
41
47
|
resolveHoonifyModel,
|
|
42
48
|
init_hoonify
|
|
43
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-cg3ypx5n.js";
|
|
44
50
|
import {
|
|
45
51
|
init_package,
|
|
46
52
|
version,
|
|
47
53
|
package_default,
|
|
48
54
|
init_installation
|
|
49
|
-
} from "./cli-
|
|
55
|
+
} from "./cli-khnf5xrf.js";
|
|
50
56
|
import {
|
|
51
57
|
require_src6
|
|
52
58
|
} from "./cli-bb02pjt0.js";
|
|
@@ -375,6 +381,45 @@ var require_main = __commonJS(function(exports, module) {
|
|
|
375
381
|
module.exports = DotenvModule;
|
|
376
382
|
});
|
|
377
383
|
|
|
384
|
+
// src/core/cli/reasoning.ts
|
|
385
|
+
init_ai2();
|
|
386
|
+
function getSavedReasoning(model, config) {
|
|
387
|
+
const cap = getReasoningCapabilities(model, config.customProviders);
|
|
388
|
+
const saved = config.modelReasoning?.[model];
|
|
389
|
+
if (saved !== undefined)
|
|
390
|
+
return getReasoningChoices(cap).includes(saved) ? saved : "default";
|
|
391
|
+
if (cap.control === "none")
|
|
392
|
+
return;
|
|
393
|
+
return resolveReasoningSetting(model, {
|
|
394
|
+
enableThinking: config.reasoningEnabled,
|
|
395
|
+
openAIReasoningEffort: config.openAIReasoningEffort,
|
|
396
|
+
customProviders: config.customProviders
|
|
397
|
+
}, "model") ?? "default";
|
|
398
|
+
}
|
|
399
|
+
function resolveCliReasoning(args, model, config) {
|
|
400
|
+
const index = args.findIndex((arg) => arg === "--effort" || arg.startsWith("--effort="));
|
|
401
|
+
const enable = args.includes("--extended-thinking");
|
|
402
|
+
const disable = args.includes("--no-extended-thinking");
|
|
403
|
+
if (Number(index >= 0) + Number(enable) + Number(disable) > 1)
|
|
404
|
+
throw new Error("Use only one of --effort, --extended-thinking, or --no-extended-thinking.");
|
|
405
|
+
if (index >= 0) {
|
|
406
|
+
const value = args[index].startsWith("--effort=") ? args[index].slice("--effort=".length) : args[index + 1];
|
|
407
|
+
if (!value || value.startsWith("--"))
|
|
408
|
+
throw new Error("--effort requires a level or default.");
|
|
409
|
+
const cap = getReasoningCapabilities(model, config.customProviders);
|
|
410
|
+
if (value !== "default" && (cap.control !== "effort" || !cap.efforts.includes(value)))
|
|
411
|
+
throw new Error(`--effort is not supported at "${value}" for ${model}. Available levels: ${["default", ...cap.efforts].join(", ")}.`);
|
|
412
|
+
return validateReasoningSetting(model, value, config.customProviders);
|
|
413
|
+
}
|
|
414
|
+
if (enable || disable) {
|
|
415
|
+
const cap = getReasoningCapabilities(model, config.customProviders);
|
|
416
|
+
if (cap.control === "none")
|
|
417
|
+
throw new Error(`Thinking controls are not known for ${model}; use the model default.`);
|
|
418
|
+
return validateReasoningSetting(model, enable ? cap.control === "effort" ? cap.defaultEffort ?? "default" : "enabled" : cap.efforts.includes("none") ? "none" : "disabled", config.customProviders);
|
|
419
|
+
}
|
|
420
|
+
return getSavedReasoning(model, config);
|
|
421
|
+
}
|
|
422
|
+
|
|
378
423
|
// src/cli.ts
|
|
379
424
|
var import_dotenv = __toESM(require_main(), 1);
|
|
380
425
|
import { resolve as resolve2 } from "path";
|
|
@@ -710,6 +755,7 @@ var package_default2 = {
|
|
|
710
755
|
"format:check": 'biome check && prettier --check "**/*.{md,yml,yaml}"',
|
|
711
756
|
"generate:ascii": "bun run scripts/generate-ascii-art.ts",
|
|
712
757
|
"generate:models": "bun run scripts/generate-models.ts",
|
|
758
|
+
"generate:reasoning": "bun run scripts/sync-reasoning-capabilities.ts",
|
|
713
759
|
knip: "knip",
|
|
714
760
|
lint: "biome lint src/",
|
|
715
761
|
"lint:fix": "biome lint --write src/",
|
|
@@ -725,15 +771,16 @@ var package_default2 = {
|
|
|
725
771
|
tsc: "tsc --noEmit"
|
|
726
772
|
},
|
|
727
773
|
type: "module",
|
|
728
|
-
version: "2.
|
|
774
|
+
version: "2.7.0-canary.1572d9a4"
|
|
729
775
|
};
|
|
730
776
|
|
|
731
777
|
// src/core/ai/index.ts
|
|
732
|
-
|
|
778
|
+
init_ai();
|
|
733
779
|
init_inference_attempt();
|
|
734
780
|
init_model_history();
|
|
735
781
|
init_models();
|
|
736
782
|
init_native_rollout_evidence();
|
|
783
|
+
init_reasoning();
|
|
737
784
|
init_utils();
|
|
738
785
|
|
|
739
786
|
// src/core/api/clientIdentity.ts
|
|
@@ -986,6 +1033,8 @@ class AgentEventBus {
|
|
|
986
1033
|
break;
|
|
987
1034
|
}
|
|
988
1035
|
case "tool-result": {
|
|
1036
|
+
if (chunk.preliminary)
|
|
1037
|
+
break;
|
|
989
1038
|
const tr = chunk;
|
|
990
1039
|
this.emit("tool-result", {
|
|
991
1040
|
toolCallId: tr.toolCallId,
|
|
@@ -1584,7 +1633,7 @@ async function createInstrumentedBus(session, model) {
|
|
|
1584
1633
|
reportHerdrState("working");
|
|
1585
1634
|
const bus = new AgentEventBus;
|
|
1586
1635
|
attachCliAgentStreamListeners(bus);
|
|
1587
|
-
const { attachWandbToEventBus } = await import("./upload-
|
|
1636
|
+
const { attachWandbToEventBus } = await import("./upload-34ewrjp5.js");
|
|
1588
1637
|
const wandbCleanup = await attachWandbToEventBus(session, bus).catch((e) => {
|
|
1589
1638
|
console.warn("[wandb] Tracing disabled:", e.message);
|
|
1590
1639
|
return null;
|
|
@@ -1604,7 +1653,7 @@ async function resolveCliHeaders() {
|
|
|
1604
1653
|
const { parseHeaderLine, parseHeadersFromFile, formatParseError } = await import("./parse-cqecqrc5.js");
|
|
1605
1654
|
const merged = {};
|
|
1606
1655
|
if (!noGlobal) {
|
|
1607
|
-
const { config: appConfig } = await import("./index-
|
|
1656
|
+
const { config: appConfig } = await import("./index-bv6dtwse.js");
|
|
1608
1657
|
const cfg = await appConfig.get();
|
|
1609
1658
|
if (cfg.defaultHeaders) {
|
|
1610
1659
|
Object.assign(merged, cfg.defaultHeaders);
|
|
@@ -1635,8 +1684,8 @@ ${formatParseError(parsed.error)}`);
|
|
|
1635
1684
|
return merged;
|
|
1636
1685
|
}
|
|
1637
1686
|
async function resolveCliModel() {
|
|
1638
|
-
const { config: appConfig } = await import("./index-
|
|
1639
|
-
const { getDefaultModelForConfig } = await import("./utils-
|
|
1687
|
+
const { config: appConfig } = await import("./index-bv6dtwse.js");
|
|
1688
|
+
const { getDefaultModelForConfig } = await import("./utils-fzm66efw.js");
|
|
1640
1689
|
const pensarConfig = await appConfig.get();
|
|
1641
1690
|
const explicit = resolveExplicitCliModel({
|
|
1642
1691
|
model: getArg("--model"),
|
|
@@ -1717,10 +1766,13 @@ pentest options:
|
|
|
1717
1766
|
--cwd <path> Source code path \u2014 enables whitebox attack surface
|
|
1718
1767
|
--mode <mode> Pentest mode: exfil (pivoting & flag extraction)
|
|
1719
1768
|
--model <model> AI model (default: auto-selected from configured provider)
|
|
1720
|
-
--extended-thinking Enable extended thinking for supported models
|
|
1721
1769
|
--task-driven Enable task-driven architecture (experimental)
|
|
1770
|
+
--lance Minimal offensive-capability mode (requires --prompt)
|
|
1771
|
+
--timeout-ms <ms> Lance budget (default: 900000)
|
|
1772
|
+
--deadline-at <epoch-ms> Lance absolute harness deadline
|
|
1722
1773
|
--fast-strike Single-operator fast strike: skip attack-surface/swarm
|
|
1723
1774
|
phases, one tight recon\u2192exploit loop against the target
|
|
1775
|
+
--external-findings Return findings without Apex's in-run finding judge
|
|
1724
1776
|
--prompt <text|@file> Guidance for the pentest agent (inline text or @filepath)
|
|
1725
1777
|
--threat-model <text|@file> Threat model to guide the pentest (inline or @filepath)
|
|
1726
1778
|
--header "Name: Value" Custom HTTP header (repeatable)
|
|
@@ -1748,6 +1800,9 @@ export-trajectory options:
|
|
|
1748
1800
|
--output <path> Fresh output directory; existing paths are never overwritten
|
|
1749
1801
|
|
|
1750
1802
|
Global options:
|
|
1803
|
+
--effort <level> Reasoning effort or default (headless commands)
|
|
1804
|
+
--extended-thinking Enable thinking (headless commands)
|
|
1805
|
+
--no-extended-thinking Disable thinking where supported (headless commands)
|
|
1751
1806
|
--model-provider <id> Hoonify or custom provider for --model (headless commands)
|
|
1752
1807
|
-h, --help Show this help message
|
|
1753
1808
|
-v, --version Show version number
|
|
@@ -1769,9 +1824,8 @@ Custom inference:
|
|
|
1769
1824
|
`);
|
|
1770
1825
|
}
|
|
1771
1826
|
async function runPentest() {
|
|
1772
|
-
const {
|
|
1773
|
-
const {
|
|
1774
|
-
const { config: appConfig } = await import("./index-je6hcsqr.js");
|
|
1827
|
+
const { sessions } = await import("./index-tpyzq2wq.js");
|
|
1828
|
+
const { config: appConfig } = await import("./index-bv6dtwse.js");
|
|
1775
1829
|
const target = getArgRequired("--target");
|
|
1776
1830
|
const cwd = getArg("--cwd");
|
|
1777
1831
|
const mode = getArg("--mode");
|
|
@@ -1780,12 +1834,20 @@ async function runPentest() {
|
|
|
1780
1834
|
const enableThinking = hasFlag("--extended-thinking");
|
|
1781
1835
|
const taskDriven = hasFlag("--task-driven");
|
|
1782
1836
|
const fastStrike = hasFlag("--fast-strike");
|
|
1837
|
+
const lance = hasFlag("--lance");
|
|
1838
|
+
if (lance && (fastStrike || taskDriven || threatModelRaw)) {
|
|
1839
|
+
throw new Error("Lance cannot be combined with Strike, task-driven, or threat-model workflows");
|
|
1840
|
+
}
|
|
1841
|
+
if (lance && !promptRaw)
|
|
1842
|
+
throw new Error("Lance requires a specific objective via --prompt");
|
|
1843
|
+
const externalFindings = hasFlag("--external-findings");
|
|
1783
1844
|
const evidenceOutput = nativeRolloutEvidenceOutput();
|
|
1784
1845
|
const resolvedTm = threatModelRaw ? resolveThreatModelPrompt(threatModelRaw) : undefined;
|
|
1785
1846
|
const resolvedPrompt = promptRaw ? resolveFlagValue(promptRaw) : undefined;
|
|
1786
1847
|
const prompt = combinePromptParts(resolvedTm, resolvedPrompt);
|
|
1787
1848
|
const pensarConfig = await appConfig.get();
|
|
1788
1849
|
const model = await resolveCliModel();
|
|
1850
|
+
const reasoning = resolveCliReasoning(args, model, pensarConfig);
|
|
1789
1851
|
const headers = await resolveCliHeaders();
|
|
1790
1852
|
const { exfilMode, warning: modeWarning } = resolvePentestMode(mode);
|
|
1791
1853
|
if (modeWarning) {
|
|
@@ -1796,21 +1858,23 @@ async function runPentest() {
|
|
|
1796
1858
|
}
|
|
1797
1859
|
const sep = "=".repeat(60);
|
|
1798
1860
|
console.log(`${sep}
|
|
1799
|
-
PENTEST ORCHESTRATION
|
|
1861
|
+
${lance ? "LANCE" : "PENTEST ORCHESTRATION"}
|
|
1800
1862
|
${sep}
|
|
1801
1863
|
Target: ${target}${cwd ? `
|
|
1802
1864
|
Cwd: ${cwd} (whitebox)` : ""}${exfilMode ? `
|
|
1803
1865
|
Mode: exfil` : ""}
|
|
1804
|
-
Model: ${model}${
|
|
1805
|
-
|
|
1866
|
+
Model: ${model}${reasoning ? `
|
|
1867
|
+
Reasoning: ${reasoning}` : ""}${taskDriven ? `
|
|
1806
1868
|
Task-driven: enabled` : ""}${fastStrike ? `
|
|
1807
|
-
Fast strike: enabled` : ""}${
|
|
1869
|
+
Fast strike: enabled` : ""}${externalFindings ? `
|
|
1870
|
+
Findings: external evaluation` : ""}${headers ? `
|
|
1808
1871
|
Headers: ${Object.keys(headers).length} configured` : ""}
|
|
1809
1872
|
`);
|
|
1810
1873
|
const session = await sessions.create({
|
|
1811
|
-
name: cwd ? "Whitebox Pentest" : "Blackbox Pentest",
|
|
1874
|
+
name: lance ? "Lance" : cwd ? "Whitebox Pentest" : "Blackbox Pentest",
|
|
1812
1875
|
targets: [target],
|
|
1813
1876
|
config: {
|
|
1877
|
+
...reasoning !== undefined ? { modelReasoning: { model, setting: reasoning } } : {},
|
|
1814
1878
|
...cwd ? { codebasePath: cwd } : {},
|
|
1815
1879
|
...exfilMode ? { exfilMode: true } : {},
|
|
1816
1880
|
...prompt ? { prompt } : {},
|
|
@@ -1820,25 +1884,71 @@ Headers: ${Object.keys(headers).length} configured` : ""}
|
|
|
1820
1884
|
}
|
|
1821
1885
|
});
|
|
1822
1886
|
console.log(`PENSAR_SESSION_PATH:${session.rootPath}`);
|
|
1823
|
-
|
|
1887
|
+
if (lance) {
|
|
1888
|
+
const { runCliLance } = await import("./lance-sacfgs1z.js");
|
|
1889
|
+
await runCliLance({
|
|
1890
|
+
prompt: resolvedPrompt,
|
|
1891
|
+
model,
|
|
1892
|
+
reasoning,
|
|
1893
|
+
target,
|
|
1894
|
+
session,
|
|
1895
|
+
enableThinking,
|
|
1896
|
+
authConfig: buildAuthConfig(pensarConfig),
|
|
1897
|
+
findingPolicy: externalFindings ? "external" : pensarConfig.findingPolicy,
|
|
1898
|
+
lance: {
|
|
1899
|
+
...getArg("--timeout-ms") ? { timeoutMs: Number(getArg("--timeout-ms")) } : {},
|
|
1900
|
+
...getArg("--deadline-at") ? { deadlineAt: Number(getArg("--deadline-at")) } : {}
|
|
1901
|
+
}
|
|
1902
|
+
});
|
|
1903
|
+
return;
|
|
1904
|
+
}
|
|
1905
|
+
const { runPentestAgent } = await import("./blackboxPentest-w2nr4md3.js");
|
|
1906
|
+
const { runWithCliNativeRolloutEvidence } = await import("./native-rollout-evidence-rph1774m.js");
|
|
1824
1907
|
const evidence = await runWithCliNativeRolloutEvidence({
|
|
1825
1908
|
session,
|
|
1826
1909
|
outputDirectory: evidenceOutput,
|
|
1827
1910
|
run: async () => {
|
|
1828
1911
|
const { bus: pentestBus, cleanup: wandbCleanup } = await createInstrumentedBus(session, model);
|
|
1829
1912
|
try {
|
|
1830
|
-
const {
|
|
1913
|
+
const {
|
|
1914
|
+
findings,
|
|
1915
|
+
findingsPath,
|
|
1916
|
+
pocsPath,
|
|
1917
|
+
reportPath,
|
|
1918
|
+
reportedFindings,
|
|
1919
|
+
objectiveResults,
|
|
1920
|
+
submissionJson,
|
|
1921
|
+
solved,
|
|
1922
|
+
summary
|
|
1923
|
+
} = await runPentestAgent({
|
|
1831
1924
|
target,
|
|
1832
1925
|
...cwd ? { cwd } : {},
|
|
1833
1926
|
session,
|
|
1834
1927
|
model,
|
|
1928
|
+
reasoning,
|
|
1835
1929
|
enableThinking,
|
|
1930
|
+
...externalFindings ? { findingPolicy: "external" } : {},
|
|
1836
1931
|
...fastStrike ? { fastStrike: true } : {},
|
|
1837
1932
|
surfaceIntegrationEnabled: pensarConfig.surfaceIntegrationEnabled,
|
|
1838
1933
|
authConfig: buildAuthConfig(pensarConfig),
|
|
1839
1934
|
eventBus: pentestBus
|
|
1840
1935
|
});
|
|
1841
|
-
|
|
1936
|
+
if (externalFindings) {
|
|
1937
|
+
console.log(`
|
|
1938
|
+
${sep}
|
|
1939
|
+
RESULTS
|
|
1940
|
+
${sep}
|
|
1941
|
+
Findings: ${reportedFindings?.length ?? 0}
|
|
1942
|
+
Evaluation: external`);
|
|
1943
|
+
console.log(JSON.stringify({
|
|
1944
|
+
reportedFindings: reportedFindings ?? [],
|
|
1945
|
+
...objectiveResults ? { objectiveResults } : {},
|
|
1946
|
+
...submissionJson ? { submissionJson } : {},
|
|
1947
|
+
...solved === undefined ? {} : { solved },
|
|
1948
|
+
...summary === undefined ? {} : { summary }
|
|
1949
|
+
}, null, 2));
|
|
1950
|
+
} else {
|
|
1951
|
+
console.log(`
|
|
1842
1952
|
${sep}
|
|
1843
1953
|
RESULTS
|
|
1844
1954
|
${sep}
|
|
@@ -1846,6 +1956,7 @@ Findings: ${findings.length}
|
|
|
1846
1956
|
Path: ${findingsPath}
|
|
1847
1957
|
POCs: ${pocsPath}${reportPath ? `
|
|
1848
1958
|
Report: ${reportPath}` : ""}`);
|
|
1959
|
+
}
|
|
1849
1960
|
} finally {
|
|
1850
1961
|
await wandbCleanup();
|
|
1851
1962
|
}
|
|
@@ -1856,14 +1967,15 @@ Report: ${reportPath}` : ""}`);
|
|
|
1856
1967
|
}
|
|
1857
1968
|
}
|
|
1858
1969
|
async function runTargetedPentest() {
|
|
1859
|
-
const { runTargetedPentestAgent } = await import("./targetedPentest-
|
|
1860
|
-
const { sessions } = await import("./index-
|
|
1861
|
-
const { config: appConfig } = await import("./index-
|
|
1970
|
+
const { runTargetedPentestAgent } = await import("./targetedPentest-6yxznt7s.js");
|
|
1971
|
+
const { sessions } = await import("./index-tpyzq2wq.js");
|
|
1972
|
+
const { config: appConfig } = await import("./index-bv6dtwse.js");
|
|
1862
1973
|
const target = getArgRequired("--target");
|
|
1863
1974
|
const objectives = getAllArgs("--objective");
|
|
1864
1975
|
const evidenceOutput = nativeRolloutEvidenceOutput();
|
|
1865
1976
|
const pensarConfig = await appConfig.get();
|
|
1866
1977
|
const model = await resolveCliModel();
|
|
1978
|
+
const reasoning = resolveCliReasoning(args, model, pensarConfig);
|
|
1867
1979
|
if (objectives.length === 0) {
|
|
1868
1980
|
console.error("Error: at least one --objective is required");
|
|
1869
1981
|
process.exit(1);
|
|
@@ -1883,15 +1995,16 @@ ${objectivesList}
|
|
|
1883
1995
|
const session = await sessions.create({
|
|
1884
1996
|
name: "Targeted Pentest",
|
|
1885
1997
|
targets: [target],
|
|
1886
|
-
...headers !== undefined || evidenceOutput ? {
|
|
1998
|
+
...headers !== undefined || evidenceOutput || reasoning !== undefined ? {
|
|
1887
1999
|
config: {
|
|
2000
|
+
...reasoning !== undefined ? { modelReasoning: { model, setting: reasoning } } : {},
|
|
1888
2001
|
...headers !== undefined ? { headers } : {},
|
|
1889
2002
|
...evidenceOutput ? { nativeRolloutEvidence: { outputDirectory: evidenceOutput } } : {}
|
|
1890
2003
|
}
|
|
1891
2004
|
} : {}
|
|
1892
2005
|
});
|
|
1893
2006
|
console.log(`PENSAR_SESSION_PATH:${session.rootPath}`);
|
|
1894
|
-
const { runWithCliNativeRolloutEvidence } = await import("./native-rollout-evidence-
|
|
2007
|
+
const { runWithCliNativeRolloutEvidence } = await import("./native-rollout-evidence-rph1774m.js");
|
|
1895
2008
|
const evidence = await runWithCliNativeRolloutEvidence({
|
|
1896
2009
|
session,
|
|
1897
2010
|
outputDirectory: evidenceOutput,
|
|
@@ -1903,6 +2016,7 @@ ${objectivesList}
|
|
|
1903
2016
|
objectives,
|
|
1904
2017
|
session,
|
|
1905
2018
|
model,
|
|
2019
|
+
reasoning,
|
|
1906
2020
|
authConfig: buildAuthConfig(pensarConfig),
|
|
1907
2021
|
eventBus: targetedBus
|
|
1908
2022
|
});
|
|
@@ -1923,11 +2037,12 @@ POCs: ${pocsPath}`);
|
|
|
1923
2037
|
}
|
|
1924
2038
|
}
|
|
1925
2039
|
async function runThreatModel() {
|
|
1926
|
-
const { runThreatModelWorkflow } = await import("./threatModel-
|
|
1927
|
-
const { config: appConfig } = await import("./index-
|
|
2040
|
+
const { runThreatModelWorkflow } = await import("./threatModel-739kpexm.js");
|
|
2041
|
+
const { config: appConfig } = await import("./index-bv6dtwse.js");
|
|
1928
2042
|
const path = await import("path");
|
|
1929
2043
|
const pensarConfig = await appConfig.get();
|
|
1930
2044
|
const model = await resolveCliModel();
|
|
2045
|
+
const reasoning = resolveCliReasoning(args, model, pensarConfig);
|
|
1931
2046
|
const outputArg = getArg("--output") ?? getArg("-o") ?? "threat-model.md";
|
|
1932
2047
|
const resolvedPath = path.isAbsolute(outputArg) ? outputArg : path.resolve(process.cwd(), outputArg);
|
|
1933
2048
|
const sep = "=".repeat(60);
|
|
@@ -1949,6 +2064,7 @@ Model: ${model}
|
|
|
1949
2064
|
codebasePath: process.cwd(),
|
|
1950
2065
|
outputPath: resolvedPath,
|
|
1951
2066
|
model,
|
|
2067
|
+
reasoning,
|
|
1952
2068
|
authConfig: buildAuthConfig(pensarConfig),
|
|
1953
2069
|
eventBus: threatBus
|
|
1954
2070
|
});
|
|
@@ -1959,10 +2075,10 @@ ${sep}
|
|
|
1959
2075
|
Threat model written to: ${resolvedPath}`);
|
|
1960
2076
|
}
|
|
1961
2077
|
async function runOperator() {
|
|
1962
|
-
const { runOffensiveSecurityAgent } = await import("./offesecAgent-
|
|
1963
|
-
const { sessions, normalizeMessages, getResumeMessages } = await import("./index-
|
|
1964
|
-
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-
|
|
1965
|
-
const { config: appConfig } = await import("./index-
|
|
2078
|
+
const { runOffensiveSecurityAgent } = await import("./offesecAgent-81h1p6ee.js");
|
|
2079
|
+
const { sessions, normalizeMessages, getResumeMessages } = await import("./index-tpyzq2wq.js");
|
|
2080
|
+
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-qys178kp.js");
|
|
2081
|
+
const { config: appConfig } = await import("./index-bv6dtwse.js");
|
|
1966
2082
|
const { createInterface } = await import("readline");
|
|
1967
2083
|
const { readFileSync, existsSync } = await import("fs");
|
|
1968
2084
|
const path = await import("path");
|
|
@@ -1979,6 +2095,7 @@ async function runOperator() {
|
|
|
1979
2095
|
const evidenceOutput = nativeRolloutEvidenceOutput();
|
|
1980
2096
|
const pensarConfig = await appConfig.get();
|
|
1981
2097
|
const model = await resolveCliModel();
|
|
2098
|
+
const reasoning = resolveCliReasoning(args, model, pensarConfig);
|
|
1982
2099
|
const sep = "\u2500".repeat(60);
|
|
1983
2100
|
console.log(`${sep}
|
|
1984
2101
|
OPERATOR SESSION
|
|
@@ -1992,6 +2109,7 @@ ${sep}
|
|
|
1992
2109
|
name: "Operator Session",
|
|
1993
2110
|
targets: target ? [target] : [],
|
|
1994
2111
|
config: {
|
|
2112
|
+
...reasoning !== undefined ? { modelReasoning: { model, setting: reasoning } } : {},
|
|
1995
2113
|
mode: "operator",
|
|
1996
2114
|
agentCwd: process.cwd(),
|
|
1997
2115
|
operatorSettings: {
|
|
@@ -2003,7 +2121,7 @@ ${sep}
|
|
|
2003
2121
|
...evidenceOutput ? { nativeRolloutEvidence: { outputDirectory: evidenceOutput } } : {}
|
|
2004
2122
|
}
|
|
2005
2123
|
});
|
|
2006
|
-
const { runWithCliNativeRolloutEvidence } = await import("./native-rollout-evidence-
|
|
2124
|
+
const { runWithCliNativeRolloutEvidence } = await import("./native-rollout-evidence-rph1774m.js");
|
|
2007
2125
|
const evidence = await runWithCliNativeRolloutEvidence({
|
|
2008
2126
|
session,
|
|
2009
2127
|
outputDirectory: evidenceOutput,
|
|
@@ -2032,6 +2150,7 @@ ${sep}
|
|
|
2032
2150
|
prompt: currentPrompt,
|
|
2033
2151
|
...systemPrompt ? { system: systemPrompt } : {},
|
|
2034
2152
|
model,
|
|
2153
|
+
reasoning,
|
|
2035
2154
|
target,
|
|
2036
2155
|
activeTools: [...ALL_TOOL_NAMES, ...SKILL_TOOL_NAMES],
|
|
2037
2156
|
stopWhen: stepCountIs(1e4),
|
|
@@ -2105,7 +2224,7 @@ try {
|
|
|
2105
2224
|
await standaloneRuntime?.shutdown();
|
|
2106
2225
|
process.exitCode = 1;
|
|
2107
2226
|
} else {
|
|
2108
|
-
const { startTui } = await import("./index-
|
|
2227
|
+
const { startTui } = await import("./index-jt52ffgn.js");
|
|
2109
2228
|
await startTui(options);
|
|
2110
2229
|
}
|
|
2111
2230
|
} else if (hasFlag("-p") || command === "--prompt") {
|
|
@@ -2125,37 +2244,37 @@ try {
|
|
|
2125
2244
|
await runTargetedPentest();
|
|
2126
2245
|
} else if (command === "login" || command === "auth") {
|
|
2127
2246
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2128
|
-
await import("./auth-
|
|
2247
|
+
await import("./auth-7md9kwda.js");
|
|
2129
2248
|
} else if (command === "uninstall") {
|
|
2130
2249
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2131
|
-
await import("./uninstall-
|
|
2250
|
+
await import("./uninstall-yxrn9edt.js");
|
|
2132
2251
|
} else if (command === "apps") {
|
|
2133
2252
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2134
|
-
await import("./apps-
|
|
2253
|
+
await import("./apps-3stwnmen.js");
|
|
2135
2254
|
} else if (command === "pentests") {
|
|
2136
2255
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2137
|
-
await import("./pentests-
|
|
2256
|
+
await import("./pentests-jgw031mc.js");
|
|
2138
2257
|
} else if (command === "agent-runs") {
|
|
2139
|
-
const { runAgentRunsCommand } = await import("./agent-runs-
|
|
2258
|
+
const { runAgentRunsCommand } = await import("./agent-runs-f86emmgg.js");
|
|
2140
2259
|
await runAgentRunsCommand(args.slice(1));
|
|
2141
2260
|
} else if (command === "targets") {
|
|
2142
2261
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2143
|
-
await import("./targets-
|
|
2262
|
+
await import("./targets-bjah19dp.js");
|
|
2144
2263
|
} else if (command === "issues") {
|
|
2145
2264
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2146
|
-
await import("./issues-
|
|
2265
|
+
await import("./issues-sncyqh14.js");
|
|
2147
2266
|
} else if (command === "knowledge") {
|
|
2148
2267
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2149
|
-
await import("./knowledge-
|
|
2268
|
+
await import("./knowledge-esgvy5ws.js");
|
|
2150
2269
|
} else if (command === "fixes") {
|
|
2151
2270
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2152
|
-
await import("./fixes-
|
|
2271
|
+
await import("./fixes-926cw1ej.js");
|
|
2153
2272
|
} else if (command === "logs") {
|
|
2154
2273
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2155
|
-
await import("./logs-
|
|
2274
|
+
await import("./logs-bcbjpjp6.js");
|
|
2156
2275
|
} else if (command === "config") {
|
|
2157
2276
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
2158
|
-
await import("./config-
|
|
2277
|
+
await import("./config-e5v1bkh1.js");
|
|
2159
2278
|
} else if (command === "threat-model") {
|
|
2160
2279
|
await runThreatModel();
|
|
2161
2280
|
} else if (command === "doctor") {
|