@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
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import"../../../../chunk-
|
|
2
|
-
import"../../../../chunk-
|
|
1
|
+
import"../../../../chunk-vwr9w3ab.js";
|
|
2
|
+
import"../../../../chunk-e3agqspc.js";
|
|
3
3
|
import"../../../../chunk-jdjagvgr.js";
|
|
4
|
-
import"../../../../chunk-
|
|
5
|
-
import"../../../../chunk-
|
|
4
|
+
import"../../../../chunk-hbyxyxdc.js";
|
|
5
|
+
import"../../../../chunk-eh5yw385.js";
|
|
6
6
|
import"../../../../chunk-8vhr65w3.js";
|
|
7
|
-
import"../../../../chunk-
|
|
8
|
-
import"../../../../chunk-
|
|
7
|
+
import"../../../../chunk-9wwts6r6.js";
|
|
8
|
+
import"../../../../chunk-5avnedwm.js";
|
|
9
9
|
import"../../../../chunk-mv74mq5n.js";
|
|
10
|
-
import"../../../../chunk-
|
|
10
|
+
import"../../../../chunk-85kpxwzs.js";
|
|
11
11
|
import"../../../../chunk-b8eq85d2.js";
|
|
12
|
-
import"../../../../chunk-
|
|
13
|
-
import"../../../../chunk-
|
|
12
|
+
import"../../../../chunk-ewc9r84m.js";
|
|
13
|
+
import"../../../../chunk-r0v3vvgm.js";
|
|
14
14
|
import"../../../../chunk-t5bt5vn1.js";
|
|
15
|
-
import"../../../../chunk-
|
|
15
|
+
import"../../../../chunk-vcd90qrn.js";
|
|
16
16
|
import"../../../../chunk-eb4h4k1f.js";
|
|
17
17
|
import"../../../../chunk-vx228eeq.js";
|
|
18
18
|
import"../../../../chunk-bx94rwt5.js";
|
|
@@ -23,7 +23,7 @@ import"../../../../chunk-q5e23acz.js";
|
|
|
23
23
|
import {
|
|
24
24
|
AgentRuntime,
|
|
25
25
|
defineAgent
|
|
26
|
-
} from "../../../../chunk-
|
|
26
|
+
} from "../../../../chunk-qxad7qjd.js";
|
|
27
27
|
|
|
28
28
|
// src/core/agents/specialized/findingJudge/agent.ts
|
|
29
29
|
import { stepCountIs } from "ai";
|
|
@@ -9,7 +9,7 @@ import type { AIModel } from "../../../ai";
|
|
|
9
9
|
import type { ToolContext } from "../../offSecAgent/tools";
|
|
10
10
|
import type { FindingJudgeInput, FindingJudgeResult } from "./types";
|
|
11
11
|
export type { FindingJudgeAgentOutput, FindingJudgeInput, FindingJudgeResult, FindingType, } from "./types";
|
|
12
|
-
export type FindingJudgeRuntimeContext = Pick<ToolContext, "session" | "authConfig" | "abortSignal" | "eventBus" | "sandbox" | "backends" | "target" | "enableThinking" | "thinkingEffort" | "openAIReasoningEffort" | "languageModelMiddleware" | "usageRecorder" | "streamIdFactory"> & {
|
|
12
|
+
export type FindingJudgeRuntimeContext = Pick<ToolContext, "session" | "authConfig" | "abortSignal" | "eventBus" | "sandbox" | "backends" | "target" | "enableThinking" | "thinkingEffort" | "openAIReasoningEffort" | "reasoning" | "languageModelMiddleware" | "usageRecorder" | "streamIdFactory" | "toolExecutionContext"> & {
|
|
13
13
|
model: AIModel;
|
|
14
14
|
/**
|
|
15
15
|
* Subagent id used to tag the judge's own stream events. Callers that
|
|
@@ -20,6 +20,7 @@ export type FindingJudgeRuntimeContext = Pick<ToolContext, "session" | "authConf
|
|
|
20
20
|
subagentId?: string;
|
|
21
21
|
/** Human-readable label for readable OTel span names. Defaults to "Finding Judge". */
|
|
22
22
|
subagentName?: string;
|
|
23
|
+
waitForDrain?: boolean;
|
|
23
24
|
};
|
|
24
25
|
/**
|
|
25
26
|
* Validate a vulnerability finding by running a bounded verifier agent.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
judgeFinding2,
|
|
3
3
|
createJudgeFailureResult2
|
|
4
|
-
} from "../../../../chunk-
|
|
5
|
-
import"../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-bxznzxdy.js";
|
|
5
|
+
import"../../../../chunk-eh5yw385.js";
|
|
6
6
|
import"../../../../chunk-8vhr65w3.js";
|
|
7
|
-
import"../../../../chunk-
|
|
7
|
+
import"../../../../chunk-hbyxyxdc.js";
|
|
8
8
|
import"../../../../chunk-jdjagvgr.js";
|
|
9
|
-
import"../../../../chunk-
|
|
9
|
+
import"../../../../chunk-e3agqspc.js";
|
|
10
10
|
export {
|
|
11
11
|
createJudgeFailureResult2 as createJudgeFailureResult,
|
|
12
12
|
judgeFinding2 as judgeFinding
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../../../chunk-
|
|
1
|
+
import"../../../../chunk-9jkzk9nc.js";
|
|
2
2
|
import {
|
|
3
3
|
buildSystemPrompt2,
|
|
4
4
|
PATCHING_SYSTEM_PROMPT2,
|
|
@@ -8,26 +8,26 @@ import {
|
|
|
8
8
|
PATCHING_ACTIVE_TOOLS2,
|
|
9
9
|
readAgentsMd2,
|
|
10
10
|
PatchingAgent2
|
|
11
|
-
} from "../../../../chunk-
|
|
12
|
-
import"../../../../chunk-
|
|
13
|
-
import"../../../../chunk-
|
|
14
|
-
import"../../../../chunk-
|
|
15
|
-
import"../../../../chunk-yrnrbjes.js";
|
|
16
|
-
import"../../../../chunk-7gjdygcx.js";
|
|
17
|
-
import"../../../../chunk-b8eq85d2.js";
|
|
18
|
-
import"../../../../chunk-2qsq76xq.js";
|
|
11
|
+
} from "../../../../chunk-rt13120a.js";
|
|
12
|
+
import"../../../../chunk-qxad7qjd.js";
|
|
13
|
+
import"../../../../chunk-9wwts6r6.js";
|
|
14
|
+
import"../../../../chunk-vcd90qrn.js";
|
|
19
15
|
import"../../../../chunk-ja7j565c.js";
|
|
20
16
|
import"../../../../chunk-3q89v4xv.js";
|
|
21
|
-
import"../../../../chunk-
|
|
22
|
-
import"../../../../chunk-
|
|
17
|
+
import"../../../../chunk-r0v3vvgm.js";
|
|
18
|
+
import"../../../../chunk-5avnedwm.js";
|
|
19
|
+
import"../../../../chunk-85kpxwzs.js";
|
|
20
|
+
import"../../../../chunk-ewc9r84m.js";
|
|
21
|
+
import"../../../../chunk-vwr9w3ab.js";
|
|
23
22
|
import"../../../../chunk-t5bt5vn1.js";
|
|
24
23
|
import"../../../../chunk-eb4h4k1f.js";
|
|
24
|
+
import"../../../../chunk-b8eq85d2.js";
|
|
25
25
|
import"../../../../chunk-vx228eeq.js";
|
|
26
|
-
import"../../../../chunk-
|
|
26
|
+
import"../../../../chunk-eh5yw385.js";
|
|
27
27
|
import"../../../../chunk-8vhr65w3.js";
|
|
28
|
-
import"../../../../chunk-
|
|
28
|
+
import"../../../../chunk-hbyxyxdc.js";
|
|
29
29
|
import"../../../../chunk-jdjagvgr.js";
|
|
30
|
-
import"../../../../chunk-
|
|
30
|
+
import"../../../../chunk-e3agqspc.js";
|
|
31
31
|
import"../../../../chunk-zrbqn62x.js";
|
|
32
32
|
import"../../../../chunk-mv74mq5n.js";
|
|
33
33
|
import"../../../../chunk-q5e23acz.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { FindingsRegistry } from "../../../findings/registry";
|
|
3
3
|
import { AgentRuntime } from "../../agentRuntime";
|
|
4
|
-
import { type AgentMode, type Finding, type ReportedError, type SpecializedAgentInput, type SystemPentestScope } from "../../offSecAgent";
|
|
4
|
+
import { type AgentMode, type Finding, type FindingPolicy, type ReportedError, type SpecializedAgentInput, type SystemPentestScope } from "../../offSecAgent";
|
|
5
5
|
import type { GrpcPentestContext } from "../attackSurface/grpcSchema";
|
|
6
6
|
/**
|
|
7
7
|
* Operating role for a {@link TargetedPentestAgent} instance.
|
|
@@ -73,6 +73,8 @@ export interface PentestAgentInput extends SpecializedAgentInput {
|
|
|
73
73
|
export interface PentestResult {
|
|
74
74
|
/** All findings discovered during the run */
|
|
75
75
|
findings: Finding[];
|
|
76
|
+
/** Concise findings handed to an external evaluator, without native judging. */
|
|
77
|
+
reportedFindings?: string[];
|
|
76
78
|
/** Absolute path to the session's findings directory */
|
|
77
79
|
findingsPath: string;
|
|
78
80
|
/** Absolute path to the session's POC scripts directory */
|
|
@@ -100,6 +102,18 @@ export declare const PentestResponseSchema: z.ZodObject<{
|
|
|
100
102
|
newObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
101
103
|
noFindingsReason: z.ZodOptional<z.ZodString>;
|
|
102
104
|
}, z.core.$strip>;
|
|
105
|
+
export declare const PentestExternalResponseSchema: z.ZodObject<{
|
|
106
|
+
summary: z.ZodString;
|
|
107
|
+
objectivesCovered: z.ZodArray<z.ZodString>;
|
|
108
|
+
newObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
|
+
objectiveResults: z.ZodArray<z.ZodObject<{
|
|
110
|
+
objective: z.ZodString;
|
|
111
|
+
completed: z.ZodBoolean;
|
|
112
|
+
result: z.ZodOptional<z.ZodString>;
|
|
113
|
+
}, z.core.$strip>>;
|
|
114
|
+
reportedFindings: z.ZodArray<z.ZodString>;
|
|
115
|
+
noFindingsReason: z.ZodOptional<z.ZodString>;
|
|
116
|
+
}, z.core.$strip>;
|
|
103
117
|
/** Per-construction scratch state: the resolved role/mode (defaulted once)
|
|
104
118
|
* and the terminal blocking-error escape hatch shared between `extraTools`'
|
|
105
119
|
* `report_error` callback and `resolveResult`. */
|
|
@@ -155,7 +169,7 @@ export declare function buildPentestSystemPrompt(session: {
|
|
|
155
169
|
allowRateLimitTesting?: boolean;
|
|
156
170
|
codebasePath?: string;
|
|
157
171
|
};
|
|
158
|
-
}, role?: PentestAgentRole, mode?: TargetedPentestMode, systemScope?: SystemPentestScope, helperWorkspaceRoot?: string): string;
|
|
172
|
+
}, role?: PentestAgentRole, mode?: TargetedPentestMode, systemScope?: SystemPentestScope, helperWorkspaceRoot?: string, findingPolicy?: FindingPolicy): string;
|
|
159
173
|
export declare function buildPentestPrompt(target: string, objectives: string[], session: {
|
|
160
174
|
rootPath: string;
|
|
161
175
|
config?: {
|
|
@@ -163,10 +177,10 @@ export declare function buildPentestPrompt(target: string, objectives: string[],
|
|
|
163
177
|
outcomeGuidance?: string;
|
|
164
178
|
taskDriven?: boolean;
|
|
165
179
|
};
|
|
166
|
-
}, findingsRegistry?: FindingsRegistry, context?: string, envVarNames?: string[], subagentId?: string, role?: PentestAgentRole, credentialContext?: string, grpc?: GrpcPentestContext, mode?: TargetedPentestMode): string;
|
|
180
|
+
}, findingsRegistry?: FindingsRegistry, context?: string, envVarNames?: string[], subagentId?: string, role?: PentestAgentRole, credentialContext?: string, grpc?: GrpcPentestContext, mode?: TargetedPentestMode, findingPolicy?: FindingPolicy): string;
|
|
167
181
|
export declare function buildPentestActiveTools(role: PentestAgentRole, session: {
|
|
168
182
|
config?: {
|
|
169
183
|
taskDriven?: boolean;
|
|
170
184
|
promptInjectionLibrarySource?: string;
|
|
171
185
|
};
|
|
172
|
-
}): string[];
|
|
186
|
+
}, findingPolicy?: FindingPolicy): string[];
|
|
@@ -1,37 +1,39 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolvePentestAgentRole2,
|
|
3
3
|
PentestResponseSchema2,
|
|
4
|
+
PentestExternalResponseSchema2,
|
|
4
5
|
resolvePentestBrowserEngine2,
|
|
5
6
|
targetedPentestWorker2,
|
|
6
7
|
TargetedPentestAgent2,
|
|
7
8
|
buildPentestSystemPrompt2,
|
|
8
9
|
buildPentestPrompt2,
|
|
9
10
|
buildPentestActiveTools2
|
|
10
|
-
} from "../../../../chunk-
|
|
11
|
-
import"../../../../chunk-
|
|
12
|
-
import"../../../../chunk-
|
|
13
|
-
import"../../../../chunk-
|
|
14
|
-
import"../../../../chunk-yrnrbjes.js";
|
|
15
|
-
import"../../../../chunk-7gjdygcx.js";
|
|
16
|
-
import"../../../../chunk-b8eq85d2.js";
|
|
17
|
-
import"../../../../chunk-2qsq76xq.js";
|
|
11
|
+
} from "../../../../chunk-kbxbd1kn.js";
|
|
12
|
+
import"../../../../chunk-qxad7qjd.js";
|
|
13
|
+
import"../../../../chunk-9wwts6r6.js";
|
|
14
|
+
import"../../../../chunk-vcd90qrn.js";
|
|
18
15
|
import"../../../../chunk-ja7j565c.js";
|
|
19
16
|
import"../../../../chunk-3q89v4xv.js";
|
|
20
|
-
import"../../../../chunk-
|
|
21
|
-
import"../../../../chunk-
|
|
17
|
+
import"../../../../chunk-r0v3vvgm.js";
|
|
18
|
+
import"../../../../chunk-5avnedwm.js";
|
|
19
|
+
import"../../../../chunk-85kpxwzs.js";
|
|
20
|
+
import"../../../../chunk-ewc9r84m.js";
|
|
21
|
+
import"../../../../chunk-vwr9w3ab.js";
|
|
22
22
|
import"../../../../chunk-t5bt5vn1.js";
|
|
23
23
|
import"../../../../chunk-eb4h4k1f.js";
|
|
24
|
+
import"../../../../chunk-b8eq85d2.js";
|
|
24
25
|
import"../../../../chunk-vx228eeq.js";
|
|
25
|
-
import"../../../../chunk-
|
|
26
|
+
import"../../../../chunk-eh5yw385.js";
|
|
26
27
|
import"../../../../chunk-8vhr65w3.js";
|
|
27
|
-
import"../../../../chunk-
|
|
28
|
+
import"../../../../chunk-hbyxyxdc.js";
|
|
28
29
|
import"../../../../chunk-jdjagvgr.js";
|
|
29
|
-
import"../../../../chunk-
|
|
30
|
+
import"../../../../chunk-e3agqspc.js";
|
|
30
31
|
import"../../../../chunk-zrbqn62x.js";
|
|
31
32
|
import"../../../../chunk-mv74mq5n.js";
|
|
32
33
|
import"../../../../chunk-q5e23acz.js";
|
|
33
34
|
import"../../../../chunk-bx94rwt5.js";
|
|
34
35
|
export {
|
|
36
|
+
PentestExternalResponseSchema2 as PentestExternalResponseSchema,
|
|
35
37
|
PentestResponseSchema2 as PentestResponseSchema,
|
|
36
38
|
TargetedPentestAgent2 as TargetedPentestAgent,
|
|
37
39
|
buildPentestActiveTools2 as buildPentestActiveTools,
|
package/build/lib/core/agents/specialized/whiteboxAttackSurface/endpointDocumentationAgent.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StreamTextOnStepFinishCallback, ToolSet } from "ai";
|
|
2
|
-
import type { AIModel, CacheMetrics, OpenAIReasoningEffort, ThinkingEffort } from "../../../ai";
|
|
2
|
+
import type { AIModel, CacheMetrics, OpenAIReasoningEffort, ReasoningSetting, ThinkingEffort } from "../../../ai";
|
|
3
3
|
import type { AIAuthConfig } from "../../../ai/utils";
|
|
4
4
|
import type { AgentEventBus } from "../../../eventBus";
|
|
5
5
|
import type { AttackSurfaceRegistry } from "../../../findings/attackSurfaceRegistry";
|
|
@@ -26,6 +26,7 @@ interface SharedAgentOptions {
|
|
|
26
26
|
onStepFinish?: StreamTextOnStepFinishCallback<ToolSet>;
|
|
27
27
|
onCacheMetrics?: (metrics: CacheMetrics) => void;
|
|
28
28
|
openAIReasoningEffort?: OpenAIReasoningEffort | null;
|
|
29
|
+
reasoning?: ReasoningSetting;
|
|
29
30
|
enableThinking?: boolean;
|
|
30
31
|
thinkingEffort?: ThinkingEffort | null;
|
|
31
32
|
projectThreatModel?: string;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
WHITEBOX_APPS_DISCOVERY_SYSTEM_PROMPT2,
|
|
3
3
|
WHITEBOX_DISCOVERY_SYSTEM_PROMPT2,
|
|
4
4
|
WhiteboxAttackSurfaceAgent2
|
|
5
|
-
} from "../../../../chunk-
|
|
5
|
+
} from "../../../../chunk-cqxm95md.js";
|
|
6
6
|
import {
|
|
7
7
|
RiskScoreBreakdownSchema2,
|
|
8
8
|
RiskScoreSchema2,
|
|
@@ -11,25 +11,25 @@ import {
|
|
|
11
11
|
AppsDiscoveryResultSchema2,
|
|
12
12
|
DiscoverySummarySchema2
|
|
13
13
|
} from "../../../../chunk-xpfg2fbk.js";
|
|
14
|
-
import"../../../../chunk-
|
|
15
|
-
import"../../../../chunk-
|
|
16
|
-
import"../../../../chunk-
|
|
17
|
-
import"../../../../chunk-yrnrbjes.js";
|
|
18
|
-
import"../../../../chunk-7gjdygcx.js";
|
|
19
|
-
import"../../../../chunk-b8eq85d2.js";
|
|
20
|
-
import"../../../../chunk-2qsq76xq.js";
|
|
14
|
+
import"../../../../chunk-qxad7qjd.js";
|
|
15
|
+
import"../../../../chunk-9wwts6r6.js";
|
|
16
|
+
import"../../../../chunk-vcd90qrn.js";
|
|
21
17
|
import"../../../../chunk-ja7j565c.js";
|
|
22
18
|
import"../../../../chunk-3q89v4xv.js";
|
|
23
|
-
import"../../../../chunk-
|
|
24
|
-
import"../../../../chunk-
|
|
19
|
+
import"../../../../chunk-r0v3vvgm.js";
|
|
20
|
+
import"../../../../chunk-5avnedwm.js";
|
|
21
|
+
import"../../../../chunk-85kpxwzs.js";
|
|
22
|
+
import"../../../../chunk-ewc9r84m.js";
|
|
23
|
+
import"../../../../chunk-vwr9w3ab.js";
|
|
25
24
|
import"../../../../chunk-t5bt5vn1.js";
|
|
26
25
|
import"../../../../chunk-eb4h4k1f.js";
|
|
26
|
+
import"../../../../chunk-b8eq85d2.js";
|
|
27
27
|
import"../../../../chunk-vx228eeq.js";
|
|
28
|
-
import"../../../../chunk-
|
|
28
|
+
import"../../../../chunk-eh5yw385.js";
|
|
29
29
|
import"../../../../chunk-8vhr65w3.js";
|
|
30
|
-
import"../../../../chunk-
|
|
30
|
+
import"../../../../chunk-hbyxyxdc.js";
|
|
31
31
|
import"../../../../chunk-jdjagvgr.js";
|
|
32
|
-
import"../../../../chunk-
|
|
32
|
+
import"../../../../chunk-e3agqspc.js";
|
|
33
33
|
import"../../../../chunk-zrbqn62x.js";
|
|
34
34
|
import"../../../../chunk-mv74mq5n.js";
|
|
35
35
|
import"../../../../chunk-q5e23acz.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AnthropicMessagesModelId } from "@ai-sdk/anthropic/internal";
|
|
2
|
-
import type { OpenAIResponsesProviderOptions } from "@ai-sdk/openai";
|
|
3
2
|
import type { OpenAIChatModelId } from "@ai-sdk/openai/internal";
|
|
4
3
|
import { type LanguageModelMiddleware, type ModelMessage, type StopCondition, type StreamTextOnFinishCallback, type StreamTextOnStepFinishCallback, type StreamTextResult, type ToolChoice, type ToolSet } from "ai";
|
|
5
4
|
import type { z } from "zod";
|
|
@@ -9,6 +8,8 @@ import { type AiTelemetryOperation } from "../observability";
|
|
|
9
8
|
import type { RunContextRecorder } from "../runtime/runContext";
|
|
10
9
|
import { type CompactionLink, type CompactionTrigger } from "./compactionTelemetry";
|
|
11
10
|
import { type InferenceRecorder } from "./inference-attempt";
|
|
11
|
+
import { type ClaudeThinkingEffort } from "./models";
|
|
12
|
+
import { type ReasoningProviderOptions, type ReasoningSetting } from "./reasoning";
|
|
12
13
|
import { type AIAuthConfig } from "./utils";
|
|
13
14
|
/**
|
|
14
15
|
* Whether tool-call repair must fail closed (no argument synthesis) for a tool.
|
|
@@ -16,15 +17,15 @@ import { type AIAuthConfig } from "./utils";
|
|
|
16
17
|
*/
|
|
17
18
|
export declare function isRepairFailClosedTool(toolName: string): boolean;
|
|
18
19
|
export type AIModel = AnthropicMessagesModelId | OpenAIChatModelId | string;
|
|
19
|
-
export type OpenAIReasoningEffort = "none" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
|
|
20
|
+
export type OpenAIReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
|
|
20
21
|
export declare const DEFAULT_OPENAI_REASONING_EFFORT: OpenAIReasoningEffort;
|
|
21
22
|
/**
|
|
22
23
|
* Anthropic adaptive-thinking effort hint. Soft guidance for how much the model
|
|
23
|
-
* reasons (see AWS "adaptive thinking"): `low` minimizes thinking
|
|
24
|
-
*
|
|
25
|
-
* support adaptive thinking
|
|
24
|
+
* reasons (see AWS "adaptive thinking"): `low` minimizes thinking while
|
|
25
|
+
* `xhigh` and `max` allow progressively deeper work. Only meaningful for
|
|
26
|
+
* models that support adaptive thinking; ignored elsewhere.
|
|
26
27
|
*/
|
|
27
|
-
export type ThinkingEffort =
|
|
28
|
+
export type ThinkingEffort = ClaudeThinkingEffort;
|
|
28
29
|
/** Per-step billing context attached to a usage report, attributing cost to a specific `(sessionId, stepSeq)`. */
|
|
29
30
|
export interface UsageStepContext {
|
|
30
31
|
sessionId?: string;
|
|
@@ -126,6 +127,7 @@ declare function createToolExecutionGate(): {
|
|
|
126
127
|
type: string;
|
|
127
128
|
toolCallId?: string;
|
|
128
129
|
toolName?: string;
|
|
130
|
+
preliminary?: boolean;
|
|
129
131
|
}) => void;
|
|
130
132
|
};
|
|
131
133
|
export interface ModelInfo {
|
|
@@ -135,61 +137,14 @@ export interface ModelInfo {
|
|
|
135
137
|
contextLength?: number;
|
|
136
138
|
}
|
|
137
139
|
export declare function modelRequiresThinking(modelId: string): boolean;
|
|
138
|
-
/**
|
|
139
|
-
* Check whether a model supports extended thinking based on its ID.
|
|
140
|
-
*
|
|
141
|
-
* Thinking is available on Claude 3.7 Sonnet and all Claude 4.x+ models
|
|
142
|
-
* (Sonnet, Opus, Haiku 4.5). Works for Anthropic direct, Bedrock, and
|
|
143
|
-
* Pensar provider IDs.
|
|
144
|
-
*/
|
|
145
140
|
export declare function modelSupportsThinking(modelId: string): boolean;
|
|
146
|
-
/**
|
|
147
|
-
* Whether a model accepts the `adaptive` thinking type — Claude Opus 4.6+ and
|
|
148
|
-
* Sonnet 4.6+. Pre-4.6 models (Opus 4.0–4.5, Sonnet 4.5, Haiku 4.5) support
|
|
149
|
-
* extended thinking but reject `adaptive`, so we don't request thinking for
|
|
150
|
-
* them at all.
|
|
151
|
-
*/
|
|
152
141
|
export declare function modelSupportsAdaptiveThinking(modelId: string): boolean;
|
|
153
142
|
export declare function modelSupportsOpenAIReasoning(modelId: string): boolean;
|
|
154
143
|
export declare function modelRequiresReasoning(modelId: string): boolean;
|
|
155
144
|
export declare function getOpenAIReasoningEfforts(modelId: string): OpenAIReasoningEffort[];
|
|
156
145
|
export declare function normalizeOpenAIReasoningEffort(modelId: string, effort?: OpenAIReasoningEffort | null): OpenAIReasoningEffort | undefined;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
* extended thinking. Each provider reads only its own namespace:
|
|
160
|
-
* - `anthropic.thinking` — direct Anthropic provider AND the Pensar gateway
|
|
161
|
-
* (the gateway formatter maps it to the Bedrock `thinking` field).
|
|
162
|
-
* - `bedrock.reasoningConfig` — the AWS Bedrock provider; it ignores the
|
|
163
|
-
* `anthropic` namespace entirely, so Anthropic-on-Bedrock thinking is only
|
|
164
|
-
* requested when this key is present. `display: 'summarized'` makes the
|
|
165
|
-
* model actually return reasoning text (adaptive can otherwise omit it).
|
|
166
|
-
* - `openai.reasoningEffort` — OpenAI/o-series reasoning models.
|
|
167
|
-
*/
|
|
168
|
-
export type ReasoningProviderOptions = {
|
|
169
|
-
openrouter?: {
|
|
170
|
-
reasoning: {
|
|
171
|
-
effort: OpenAIReasoningEffort;
|
|
172
|
-
enabled?: boolean;
|
|
173
|
-
};
|
|
174
|
-
};
|
|
175
|
-
anthropic?: {
|
|
176
|
-
thinking: {
|
|
177
|
-
type: "adaptive";
|
|
178
|
-
display?: "summarized";
|
|
179
|
-
} | {
|
|
180
|
-
type: "disabled";
|
|
181
|
-
};
|
|
182
|
-
effort?: ThinkingEffort;
|
|
183
|
-
};
|
|
184
|
-
bedrock?: {
|
|
185
|
-
reasoningConfig: {
|
|
186
|
-
type: "adaptive";
|
|
187
|
-
display: "summarized";
|
|
188
|
-
maxReasoningEffort?: ThinkingEffort;
|
|
189
|
-
};
|
|
190
|
-
};
|
|
191
|
-
openai?: OpenAIResponsesProviderOptions;
|
|
192
|
-
};
|
|
146
|
+
export type { ReasoningProviderOptions } from "./reasoning";
|
|
147
|
+
export declare function mergeProviderOptions(...options: Array<ReasoningProviderOptions | undefined>): ReasoningProviderOptions | undefined;
|
|
193
148
|
export type OpenRouterProviderOptions = {
|
|
194
149
|
openrouter?: {
|
|
195
150
|
provider: {
|
|
@@ -210,25 +165,13 @@ export declare function buildOpenRouterProviderOptions(model: AIModel): OpenRout
|
|
|
210
165
|
* endpoint that enforces it rather than silently returning unparseable output.
|
|
211
166
|
*/
|
|
212
167
|
export declare function buildOpenRouterStructuredProviderOptions(model: AIModel): OpenRouterProviderOptions | undefined;
|
|
213
|
-
/**
|
|
214
|
-
* Build the `providerOptions` for a request based on the model and reasoning
|
|
215
|
-
* settings. Returns `undefined` when no reasoning/thinking is requested.
|
|
216
|
-
*
|
|
217
|
-
* When thinking is enabled for an Anthropic-family model we set BOTH the
|
|
218
|
-
* `anthropic` and `bedrock` keys: the resolved provider (direct Anthropic,
|
|
219
|
-
* Pensar gateway, or Bedrock) reads only its own namespace and ignores the
|
|
220
|
-
* other, so this is safe across all three and avoids brittle provider
|
|
221
|
-
* branching here.
|
|
222
|
-
*/
|
|
223
168
|
export declare function buildReasoningProviderOptions(model: AIModel, opts: {
|
|
169
|
+
reasoning?: ReasoningSetting;
|
|
224
170
|
enableThinking?: boolean;
|
|
225
|
-
/**
|
|
226
|
-
* Adaptive-thinking effort hint for Anthropic models that support it
|
|
227
|
-
* (Opus/Sonnet 4.6+). Ignored on models without adaptive support. When
|
|
228
|
-
* omitted the model uses its own default (`high`).
|
|
229
|
-
*/
|
|
230
171
|
thinkingEffort?: ThinkingEffort | null;
|
|
231
172
|
openAIReasoningEffort?: OpenAIReasoningEffort | null;
|
|
173
|
+
customProviders?: import("../config/customProviders").CustomProviders;
|
|
174
|
+
maxOutputTokens?: number;
|
|
232
175
|
}): ReasoningProviderOptions | undefined;
|
|
233
176
|
/** Cache token metrics extracted from Anthropic providerMetadata */
|
|
234
177
|
export interface CacheMetrics {
|
|
@@ -236,6 +179,12 @@ export interface CacheMetrics {
|
|
|
236
179
|
cacheCreationInputTokens: number;
|
|
237
180
|
}
|
|
238
181
|
export interface StreamResponseOpts {
|
|
182
|
+
/** Disables model repair and general recovery; compaction requires explicit admission. */
|
|
183
|
+
primaryModelOnly?: boolean;
|
|
184
|
+
runContextCompaction?: <T>(work: () => Promise<T>) => Promise<T>;
|
|
185
|
+
/** Session-local working state restored after compaction. */
|
|
186
|
+
getContinuationContext?: () => string;
|
|
187
|
+
onInvalidToolCall?: (name: string) => void;
|
|
239
188
|
prompt: string;
|
|
240
189
|
system?: string;
|
|
241
190
|
model: AIModel;
|
|
@@ -262,6 +211,11 @@ export interface StreamResponseOpts {
|
|
|
262
211
|
* new messages (not the full pre-summarization history).
|
|
263
212
|
*/
|
|
264
213
|
onSummarized?: (summary: string) => void;
|
|
214
|
+
/** The fitted context and prior generated-message count for transcript writers. */
|
|
215
|
+
onContextPrepared?: (context: {
|
|
216
|
+
messages: ModelMessage[];
|
|
217
|
+
responseMessageOffset: number;
|
|
218
|
+
}) => void;
|
|
265
219
|
/**
|
|
266
220
|
* Deprecated host shim: fires only when a cache counter is `> 0`.
|
|
267
221
|
* Apex internals read cache from {@link normalizeStepUsage} on the step.
|
|
@@ -276,6 +230,7 @@ export interface StreamResponseOpts {
|
|
|
276
230
|
thinkingEffort?: ThinkingEffort | null;
|
|
277
231
|
/** OpenAI reasoning effort for GPT/o-series reasoning models. */
|
|
278
232
|
openAIReasoningEffort?: OpenAIReasoningEffort | null;
|
|
233
|
+
reasoning?: ReasoningSetting;
|
|
279
234
|
/** Session root path — used by context management layers to persist truncated tool results */
|
|
280
235
|
sessionPath?: string;
|
|
281
236
|
/** Session id (`ses_…`) of the agent making this call; stamped onto AI-span telemetry so traces are filterable by session. */
|
|
@@ -296,6 +251,9 @@ export interface StreamResponseOpts {
|
|
|
296
251
|
last?: CompactionLink;
|
|
297
252
|
};
|
|
298
253
|
_compactionTrigger?: CompactionTrigger;
|
|
254
|
+
_proactiveSummaryMayFit?: boolean;
|
|
255
|
+
_proactiveSummaryFailures?: number;
|
|
256
|
+
_initialPrompt?: string;
|
|
299
257
|
}
|
|
300
258
|
export declare function streamResponse(opts: StreamResponseOpts): StreamTextResult<ToolSet, never>;
|
|
301
259
|
export interface GenerateObjectOpts<T extends z.ZodType> {
|
|
@@ -306,6 +264,7 @@ export interface GenerateObjectOpts<T extends z.ZodType> {
|
|
|
306
264
|
maxTokens?: number;
|
|
307
265
|
temperature?: number;
|
|
308
266
|
openAIReasoningEffort?: OpenAIReasoningEffort | null;
|
|
267
|
+
reasoning?: ReasoningSetting;
|
|
309
268
|
authConfig?: AIAuthConfig;
|
|
310
269
|
abortSignal?: AbortSignal;
|
|
311
270
|
onTokenUsage?: (inputTokens: number, outputTokens: number) => void;
|
package/build/lib/core/ai/ai.js
CHANGED
|
@@ -23,17 +23,18 @@ import {
|
|
|
23
23
|
modelRequiresReasoning2,
|
|
24
24
|
getOpenAIReasoningEfforts2,
|
|
25
25
|
normalizeOpenAIReasoningEffort2,
|
|
26
|
+
mergeProviderOptions2,
|
|
26
27
|
buildOpenRouterProviderOptions2,
|
|
27
28
|
buildOpenRouterStructuredProviderOptions2,
|
|
28
29
|
buildReasoningProviderOptions2,
|
|
29
30
|
streamResponse2,
|
|
30
31
|
generateObjectResponse2,
|
|
31
32
|
ContextLengthExhaustedError2
|
|
32
|
-
} from "../../chunk-
|
|
33
|
+
} from "../../chunk-eh5yw385.js";
|
|
33
34
|
import"../../chunk-8vhr65w3.js";
|
|
34
|
-
import"../../chunk-
|
|
35
|
+
import"../../chunk-hbyxyxdc.js";
|
|
35
36
|
import"../../chunk-jdjagvgr.js";
|
|
36
|
-
import"../../chunk-
|
|
37
|
+
import"../../chunk-e3agqspc.js";
|
|
37
38
|
export {
|
|
38
39
|
ContextLengthExhaustedError2 as ContextLengthExhaustedError,
|
|
39
40
|
DEFAULT_OPENAI_REASONING_EFFORT2 as DEFAULT_OPENAI_REASONING_EFFORT,
|
|
@@ -49,6 +50,7 @@ export {
|
|
|
49
50
|
getOpenAIReasoningEfforts2 as getOpenAIReasoningEfforts,
|
|
50
51
|
getStreamIdleTimeoutMs2 as getStreamIdleTimeoutMs,
|
|
51
52
|
isRepairFailClosedTool2 as isRepairFailClosedTool,
|
|
53
|
+
mergeProviderOptions2 as mergeProviderOptions,
|
|
52
54
|
modelRequiresReasoning2 as modelRequiresReasoning,
|
|
53
55
|
modelRequiresThinking2 as modelRequiresThinking,
|
|
54
56
|
modelSupportsAdaptiveThinking2 as modelSupportsAdaptiveThinking,
|
|
@@ -6,5 +6,6 @@ export { addRecentModelId, getRecentModels, MAX_RECENT_MODELS, } from "./model-h
|
|
|
6
6
|
export { AVAILABLE_MODELS, getClaudeCapabilities, getModelInfo, } from "./models";
|
|
7
7
|
export type { CreateNativeRolloutEvidenceCaptureInput, NativeRolloutCaptureLimits, NativeRolloutCaptureReportV1, NativeRolloutEvidenceCapture, NativeRolloutEvidenceEnvelopeV1, NativeRolloutEvidenceSink, NativeRolloutModelContext, } from "./native-rollout-evidence";
|
|
8
8
|
export { createNativeRolloutEvidenceCapture, DEFAULT_NATIVE_ROLLOUT_CAPTURE_LIMITS, runWithNativeRolloutSession, serializeNativeRolloutEvidence, stringifyCanonicalJson, toJsonValue, } from "./native-rollout-evidence";
|
|
9
|
+
export { getModelSettings, getReasoningCapabilities, getReasoningChoices, REASONING_SETTINGS, type ReasoningCapabilities, type ReasoningEffort, type ReasoningSetting, resolveReasoningSetting, validateReasoningSetting, } from "./reasoning";
|
|
9
10
|
export type { AIAuthConfig } from "./utils";
|
|
10
11
|
export { buildAuthConfig } from "./utils";
|
|
@@ -12,6 +12,12 @@ import {
|
|
|
12
12
|
DEFAULT_NATIVE_ROLLOUT_CAPTURE_LIMITS2,
|
|
13
13
|
createNativeRolloutEvidenceCapture2,
|
|
14
14
|
runWithNativeRolloutSession2,
|
|
15
|
+
REASONING_SETTINGS2,
|
|
16
|
+
resolveReasoningSetting2,
|
|
17
|
+
getModelSettings2,
|
|
18
|
+
getReasoningCapabilities2,
|
|
19
|
+
getReasoningChoices2,
|
|
20
|
+
validateReasoningSetting2,
|
|
15
21
|
buildAuthConfig2,
|
|
16
22
|
DEFAULT_OPENAI_REASONING_EFFORT2,
|
|
17
23
|
onUsage2,
|
|
@@ -31,17 +37,18 @@ import {
|
|
|
31
37
|
MAX_RECENT_MODELS2,
|
|
32
38
|
addRecentModelId2,
|
|
33
39
|
getRecentModels2
|
|
34
|
-
} from "../../chunk-
|
|
40
|
+
} from "../../chunk-eh5yw385.js";
|
|
35
41
|
import"../../chunk-8vhr65w3.js";
|
|
36
|
-
import"../../chunk-
|
|
42
|
+
import"../../chunk-hbyxyxdc.js";
|
|
37
43
|
import"../../chunk-jdjagvgr.js";
|
|
38
|
-
import"../../chunk-
|
|
44
|
+
import"../../chunk-e3agqspc.js";
|
|
39
45
|
export {
|
|
40
46
|
AVAILABLE_MODELS2 as AVAILABLE_MODELS,
|
|
41
47
|
DEFAULT_NATIVE_ROLLOUT_CAPTURE_LIMITS2 as DEFAULT_NATIVE_ROLLOUT_CAPTURE_LIMITS,
|
|
42
48
|
DEFAULT_OPENAI_REASONING_EFFORT2 as DEFAULT_OPENAI_REASONING_EFFORT,
|
|
43
49
|
InferenceAttemptSchema2 as InferenceAttemptSchema,
|
|
44
50
|
MAX_RECENT_MODELS2 as MAX_RECENT_MODELS,
|
|
51
|
+
REASONING_SETTINGS2 as REASONING_SETTINGS,
|
|
45
52
|
addRecentModelId2 as addRecentModelId,
|
|
46
53
|
buildAuthConfig2 as buildAuthConfig,
|
|
47
54
|
buildReasoningProviderOptions2 as buildReasoningProviderOptions,
|
|
@@ -51,7 +58,10 @@ export {
|
|
|
51
58
|
getContextWindow2 as getContextWindow,
|
|
52
59
|
getInferenceRecorder2 as getInferenceRecorder,
|
|
53
60
|
getModelInfo2 as getModelInfo,
|
|
61
|
+
getModelSettings2 as getModelSettings,
|
|
54
62
|
getOpenAIReasoningEfforts2 as getOpenAIReasoningEfforts,
|
|
63
|
+
getReasoningCapabilities2 as getReasoningCapabilities,
|
|
64
|
+
getReasoningChoices2 as getReasoningChoices,
|
|
55
65
|
getRecentModels2 as getRecentModels,
|
|
56
66
|
modelRequiresReasoning2 as modelRequiresReasoning,
|
|
57
67
|
modelRequiresThinking2 as modelRequiresThinking,
|
|
@@ -62,11 +72,13 @@ export {
|
|
|
62
72
|
normalizeStepUsage2 as normalizeStepUsage,
|
|
63
73
|
onUsage2 as onUsage,
|
|
64
74
|
parseInferenceAttempt2 as parseInferenceAttempt,
|
|
75
|
+
resolveReasoningSetting2 as resolveReasoningSetting,
|
|
65
76
|
runWithInferenceRecorder2 as runWithInferenceRecorder,
|
|
66
77
|
runWithNativeRolloutSession2 as runWithNativeRolloutSession,
|
|
67
78
|
runWithStepContext2 as runWithStepContext,
|
|
68
79
|
serializeNativeRolloutEvidence2 as serializeNativeRolloutEvidence,
|
|
69
80
|
streamResponse2 as streamResponse,
|
|
70
81
|
stringifyCanonicalJson2 as stringifyCanonicalJson,
|
|
71
|
-
toJsonValue2 as toJsonValue
|
|
82
|
+
toJsonValue2 as toJsonValue,
|
|
83
|
+
validateReasoningSetting2 as validateReasoningSetting
|
|
72
84
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
type
|
|
1
|
+
export type ClaudeThinkingEffort = "low" | "medium" | "high" | "xhigh" | "max";
|
|
2
|
+
export type ClaudeCapabilities = {
|
|
2
3
|
alwaysOnThinking: boolean;
|
|
3
4
|
bindsThinking?: boolean;
|
|
5
|
+
defaultEffort: ClaudeThinkingEffort;
|
|
4
6
|
};
|
|
5
7
|
export declare function getClaudeCapabilities(modelId: string): ClaudeCapabilities | undefined;
|
|
6
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CustomProviders } from "../../config/customProviders";
|
|
2
2
|
import { type HoonifyModel } from "../../hoonify";
|
|
3
3
|
import type { AIModel, ModelInfo } from "../ai";
|
|
4
|
-
export { getClaudeCapabilities } from "./claude-capabilities";
|
|
4
|
+
export { type ClaudeThinkingEffort, getClaudeCapabilities, } from "./claude-capabilities";
|
|
5
5
|
export declare const AVAILABLE_MODELS: ModelInfo[];
|
|
6
6
|
export declare function getModelInfo(model: AIModel): ModelInfo;
|
|
7
7
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type LanguageModelV3 } from "@ai-sdk/provider";
|
|
2
2
|
export declare const CONCENTRATE_BASE_URL = "https://api.concentrate.ai/v1";
|
|
3
3
|
export declare const CONCENTRATE_GLM_5_3_MODEL_ID = "concentrate:glm-5.3";
|
|
4
|
+
export declare const CONCENTRATE_REASONING_MODEL_IDS: ReadonlySet<string>;
|
|
4
5
|
export type ConcentrateFetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
5
6
|
export declare function createConcentrateFetch(fetchFn?: ConcentrateFetch): ConcentrateFetch;
|
|
6
7
|
export declare function createConcentrateModel(modelId: string, options: {
|