@pensar/apex 2.6.1-canary.4c944004 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/build/agent-6w7egcf1.js +13 -0
  2. package/build/agent-9zx75feh.js +13 -0
  3. package/build/{agent-b2z45j1b.js → agent-ayreaj6z.js} +5 -5
  4. package/build/{agent-runs-mztyf3qm.js → agent-runs-g37vkrjr.js} +16 -16
  5. package/build/{agent-kddx1vez.js → agent-yby11zaq.js} +6 -6
  6. package/build/{apps-h48ah1wf.js → apps-xn6km9yn.js} +13 -13
  7. package/build/{auth-v65mvfbf.js → auth-d105wc64.js} +13 -13
  8. package/build/{blackboxAgent-pzyz81z9.js → blackboxAgent-s56sgx9b.js} +6 -6
  9. package/build/{blackboxPentest-3pzzgzm5.js → blackboxPentest-ps78v3w7.js} +11 -11
  10. package/build/{cli-s82mq645.js → cli-1ve18npr.js} +1 -1
  11. package/build/{cli-d8x165mf.js → cli-3sp6nd8d.js} +2 -2
  12. package/build/{cli-gh5c6sf9.js → cli-65g6rcat.js} +3 -1
  13. package/build/{cli-wxkae592.js → cli-709rvekb.js} +29 -4
  14. package/build/{cli-jsvm7qaa.js → cli-7eea4e2y.js} +39 -7
  15. package/build/{cli-s4k4fxqm.js → cli-ae8jqxqr.js} +2 -2
  16. package/build/{cli-kw5wxxth.js → cli-az3xq70v.js} +1 -1
  17. package/build/{cli-5t6n4a8w.js → cli-c05y640n.js} +1 -1
  18. package/build/{cli-wqhbwkbc.js → cli-d37a42dc.js} +8 -8
  19. package/build/{cli-a9j339n2.js → cli-dpsw2fe6.js} +41 -5
  20. package/build/{cli-905nmz0b.js → cli-fy6vh2a7.js} +1 -1
  21. package/build/{cli-rvqwpdjg.js → cli-gx71jcke.js} +1 -1
  22. package/build/{cli-xaxr74bm.js → cli-k2nwxta0.js} +2 -2
  23. package/build/{cli-t368gv8p.js → cli-kb21qhvm.js} +2 -2
  24. package/build/{cli-da57pbjb.js → cli-n2en7j5b.js} +1 -1
  25. package/build/{cli-x0rrhg57.js → cli-ngq9dr8n.js} +3 -3
  26. package/build/{cli-v0d1n2j3.js → cli-qgz1q9g5.js} +12 -12
  27. package/build/{cli-021yxmh5.js → cli-xtc2t6me.js} +3 -3
  28. package/build/cli.js +42 -36
  29. package/build/{config-8e9k1hfk.js → config-zpqkd5cz.js} +1 -1
  30. package/build/{fastStrike-xs5ny137.js → fastStrike-mcjdvwez.js} +5 -5
  31. package/build/{fixes-a97nmysn.js → fixes-kytx5dmj.js} +13 -13
  32. package/build/{index-aztmdcaa.js → index-4vqdgb42.js} +19 -19
  33. package/build/{index-e1cct2cz.js → index-dr3tg1w3.js} +1 -1
  34. package/build/{index-8enyzj1n.js → index-fv64eb32.js} +2 -2
  35. package/build/{index-1k2prgt6.js → index-je6hcsqr.js} +1 -1
  36. package/build/{index-0gyjerk4.js → index-n65z6v7b.js} +6 -6
  37. package/build/{index-cwnp58dc.js → index-ns4m4s01.js} +4 -4
  38. package/build/{index-00n0zrdn.js → index-qv4cc65p.js} +28 -14
  39. package/build/{index-2w1n934x.js → index-r9yjkfrv.js} +4 -4
  40. package/build/{index-pde3w88a.js → index-wqetp6gq.js} +5 -5
  41. package/build/{issues-4q8k9rc5.js → issues-eb3q9d3a.js} +13 -13
  42. package/build/knowledge-fqsvtx0f.js +139 -0
  43. package/build/lib/{chunk-dmznt6r6.js → chunk-1azdancq.js} +1 -1
  44. package/build/lib/{chunk-kqgnc8g9.js → chunk-1fy8azee.js} +1 -1
  45. package/build/lib/{chunk-jmxdxsm8.js → chunk-1jvwqnem.js} +3 -3
  46. package/build/lib/{chunk-2p92hj2m.js → chunk-1yct6cra.js} +1 -1
  47. package/build/lib/{chunk-yy87a24g.js → chunk-2qsq76xq.js} +3 -3
  48. package/build/lib/{chunk-vrnhexdm.js → chunk-3c00n0cy.js} +3 -3
  49. package/build/lib/{chunk-gmw7vx6r.js → chunk-4hwzqthr.js} +1 -1
  50. package/build/lib/{chunk-c1zsb6zz.js → chunk-7pwa92rn.js} +1 -1
  51. package/build/lib/{chunk-vzc51c4z.js → chunk-9tt2021m.js} +9 -9
  52. package/build/lib/{chunk-nb0pppn2.js → chunk-9yksqgzr.js} +52 -13
  53. package/build/lib/{chunk-fxx0c7he.js → chunk-acgbyf5h.js} +1 -1
  54. package/build/lib/{chunk-7zkv27tc.js → chunk-ba41jh41.js} +46 -10
  55. package/build/lib/{chunk-wtht1nmq.js → chunk-bb0ekhkw.js} +8 -8
  56. package/build/lib/{chunk-4vsr549z.js → chunk-e8yy2k73.js} +1 -1
  57. package/build/lib/{chunk-ahtg1ytr.js → chunk-mg03jdmt.js} +1 -1
  58. package/build/lib/{chunk-mtbmjfys.js → chunk-nhfax4gb.js} +1 -1
  59. package/build/lib/{chunk-ss77exdk.js → chunk-r2dkp4tb.js} +1 -1
  60. package/build/lib/{chunk-f09y54py.js → chunk-r4j8ybn9.js} +3 -3
  61. package/build/lib/{chunk-11w6wa26.js → chunk-v3dk9j7k.js} +11 -11
  62. package/build/lib/{chunk-qt87ty01.js → chunk-w66ce82a.js} +29 -3
  63. package/build/lib/{chunk-ed0hqes9.js → chunk-xhdpgpkm.js} +2 -2
  64. package/build/lib/{chunk-3haymsms.js → chunk-yrnrbjes.js} +1 -1
  65. package/build/lib/{chunk-1090qz7m.js → chunk-z137x08b.js} +5 -5
  66. package/build/lib/{chunk-s0egavst.js → chunk-z96pbjhd.js} +1 -1
  67. package/build/lib/core/agents/offSecAgent/index.js +7 -7
  68. package/build/lib/core/agents/offSecAgent/subagentSpawner.js +5 -5
  69. package/build/lib/core/agents/offSecAgent/tools/index.js +4 -4
  70. package/build/lib/core/agents/specialized/attackSurface/blackboxAgent.js +9 -9
  71. package/build/lib/core/agents/specialized/attackSurface/schemas.js +9 -9
  72. package/build/lib/core/agents/specialized/authenticationAgent/index.js +10 -10
  73. package/build/lib/core/agents/specialized/codeAgent/agent.js +9 -9
  74. package/build/lib/core/agents/specialized/findingJudge/agent.js +8 -8
  75. package/build/lib/core/agents/specialized/findingJudge/index.js +3 -3
  76. package/build/lib/core/agents/specialized/patching/index.js +10 -10
  77. package/build/lib/core/agents/specialized/pentest/agent.js +9 -9
  78. package/build/lib/core/agents/specialized/whiteboxAttackSurface/index.js +9 -9
  79. package/build/lib/core/ai/ai.js +2 -2
  80. package/build/lib/core/ai/index.js +2 -2
  81. package/build/lib/core/ai/utils.js +2 -2
  82. package/build/lib/core/api/index.d.ts +2 -0
  83. package/build/lib/core/api/index.js +34 -20
  84. package/build/lib/core/api/issues.d.ts +1 -0
  85. package/build/lib/core/api/knowledge.d.ts +33 -0
  86. package/build/lib/core/api/targetedPentest.js +10 -10
  87. package/build/lib/core/config/customProviders.d.ts +16 -0
  88. package/build/lib/core/config/index.js +1 -1
  89. package/build/lib/core/findings/registry.js +3 -3
  90. package/build/lib/core/session/index.js +2 -2
  91. package/build/lib/core/session/persistence.js +3 -3
  92. package/build/lib/core/workflows/pentest.js +15 -15
  93. package/build/lib/core/workflows/seams.js +4 -4
  94. package/build/lib/core/workflows/whiteboxAttackSurface.js +11 -11
  95. package/build/lib/index.js +22 -22
  96. package/build/{logs-xs1kkpdv.js → logs-x62b7hk1.js} +13 -13
  97. package/build/{native-rollout-evidence-vraxk4w0.js → native-rollout-evidence-c9yhfqcs.js} +3 -3
  98. package/build/{offesecAgent-2jg3hfrb.js → offesecAgent-5whnpeta.js} +4 -4
  99. package/build/pentest-e61hc38s.js +22 -0
  100. package/build/{pentests-e0pdke9w.js → pentests-e0f32aqx.js} +21 -14
  101. package/build/recordedRunClient-dp032c32.js +11 -0
  102. package/build/{targetedPentest-jjt094tn.js → targetedPentest-rcbs4nvp.js} +6 -6
  103. package/build/{targets-2m91qa1w.js → targets-xj9g3q0z.js} +13 -13
  104. package/build/threatModel-jkxfa40s.js +21 -0
  105. package/build/{uninstall-bqswmvka.js → uninstall-7s784q4a.js} +1 -1
  106. package/build/{upload-cdxp2dhp.js → upload-4gvhwmvr.js} +4 -4
  107. package/build/{utils-rh9r0ka4.js → utils-cjrz64pc.js} +3 -3
  108. package/package.json +3 -1
  109. package/src/cli/knowledge.test.ts +140 -0
  110. package/src/cli/knowledge.ts +146 -0
  111. package/src/cli/pentests.test.ts +15 -0
  112. package/src/cli/pentests.ts +15 -1
  113. package/src/cli.ts +4 -0
  114. package/src/core/ai/providers/custom.test.ts +240 -0
  115. package/src/core/ai/providers/custom.ts +40 -0
  116. package/src/core/api/index.ts +15 -0
  117. package/src/core/api/issues.ts +1 -0
  118. package/src/core/api/knowledge.ts +70 -0
  119. package/src/core/config/customProviders.test.ts +26 -0
  120. package/src/core/config/customProviders.ts +30 -1
  121. package/build/agent-2ss75279.js +0 -13
  122. package/build/agent-s8v26rcw.js +0 -13
  123. package/build/pentest-mj0ejcdx.js +0 -22
  124. package/build/recordedRunClient-35dp6wng.js +0 -11
  125. package/build/threatModel-j3sdyrqd.js +0 -21
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  AuthenticationAgent2,
3
3
  runAuthenticationAgent3
4
- } from "./chunk-ed0hqes9.js";
5
- import"./chunk-fxx0c7he.js";
6
- import"./chunk-f09y54py.js";
7
- import"./chunk-vrnhexdm.js";
8
- import"./chunk-3haymsms.js";
4
+ } from "./chunk-xhdpgpkm.js";
5
+ import"./chunk-acgbyf5h.js";
6
+ import"./chunk-r4j8ybn9.js";
7
+ import"./chunk-3c00n0cy.js";
8
+ import"./chunk-yrnrbjes.js";
9
9
  import"./chunk-7gjdygcx.js";
10
10
  import"./chunk-b8eq85d2.js";
11
- import"./chunk-yy87a24g.js";
11
+ import"./chunk-2qsq76xq.js";
12
12
  import"./chunk-ja7j565c.js";
13
13
  import"./chunk-3q89v4xv.js";
14
14
  import"./chunk-fy3bbbqy.js";
15
- import"./chunk-dmznt6r6.js";
15
+ import"./chunk-1azdancq.js";
16
16
  import"./chunk-t5bt5vn1.js";
17
17
  import"./chunk-eb4h4k1f.js";
18
18
  import"./chunk-vx228eeq.js";
19
- import"./chunk-7zkv27tc.js";
19
+ import"./chunk-ba41jh41.js";
20
20
  import"./chunk-8vhr65w3.js";
21
21
  import"./chunk-2njv7wz3.js";
22
22
  import"./chunk-jdjagvgr.js";
23
- import"./chunk-qt87ty01.js";
23
+ import"./chunk-w66ce82a.js";
24
24
  import"./chunk-zrbqn62x.js";
25
25
  import"./chunk-mv74mq5n.js";
26
26
  import"./chunk-q5e23acz.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getCurrentVersion,
3
3
  config2
4
- } from "./chunk-qt87ty01.js";
4
+ } from "./chunk-w66ce82a.js";
5
5
  import {
6
6
  newSessionId2,
7
7
  isSessionId2
@@ -34,12 +34,12 @@ import {
34
34
  getPensarConsoleUrl2,
35
35
  buildAuthConfig2,
36
36
  normalizeStepUsage2
37
- } from "./chunk-7zkv27tc.js";
37
+ } from "./chunk-ba41jh41.js";
38
38
  import {
39
39
  buildSessionWorkspaceSection2,
40
40
  buildBaseSystemPrompt2,
41
41
  OffensiveSecurityAgent2
42
- } from "./chunk-f09y54py.js";
42
+ } from "./chunk-r4j8ybn9.js";
43
43
  import {
44
44
  ASK_USER_QUESTIONS_TOOL_NAME2,
45
45
  apiRequest,
@@ -62,32 +62,32 @@ import {
62
62
  createDomain2,
63
63
  ALL_TOOL_NAMES2,
64
64
  SKILL_TOOL_NAMES2
65
- } from "./chunk-yy87a24g.js";
65
+ } from "./chunk-2qsq76xq.js";
66
66
  import {
67
67
  BlackboxAttackSurfaceAgent2
68
- } from "./chunk-kqgnc8g9.js";
68
+ } from "./chunk-1fy8azee.js";
69
69
  import {
70
70
  runWhiteboxAttackSurfaceWorkflow2
71
- } from "./chunk-1090qz7m.js";
71
+ } from "./chunk-z137x08b.js";
72
72
  import {
73
73
  runAuthenticationAgent3
74
- } from "./chunk-ed0hqes9.js";
74
+ } from "./chunk-xhdpgpkm.js";
75
75
  import {
76
76
  readExecutionMetrics,
77
77
  writeExecutionMetrics,
78
78
  runPentestWorkflow2
79
- } from "./chunk-11w6wa26.js";
79
+ } from "./chunk-v3dk9j7k.js";
80
80
  import {
81
81
  PatchingAgent2
82
- } from "./chunk-2p92hj2m.js";
82
+ } from "./chunk-1yct6cra.js";
83
83
  import {
84
84
  startAgentExecution,
85
85
  runTargetedPentestAgent2
86
- } from "./chunk-s0egavst.js";
86
+ } from "./chunk-z96pbjhd.js";
87
87
  import {
88
88
  AgentRuntime,
89
89
  defineAgent
90
- } from "./chunk-fxx0c7he.js";
90
+ } from "./chunk-acgbyf5h.js";
91
91
  import {
92
92
  __export
93
93
  } from "./chunk-n0ba7khr.js";
@@ -98,6 +98,8 @@ __export(exports_api, {
98
98
  CLOSED_DISPOSITIONS: () => CLOSED_DISPOSITIONS2,
99
99
  DEFAULT_NATIVE_ROLLOUT_CAPTURE_LIMITS: () => DEFAULT_NATIVE_ROLLOUT_CAPTURE_LIMITS2,
100
100
  ENDPOINT_TRANSPORTS: () => ENDPOINT_TRANSPORTS2,
101
+ KNOWLEDGE_CATEGORIES: () => KNOWLEDGE_CATEGORIES2,
102
+ KNOWLEDGE_STATUSES: () => KNOWLEDGE_STATUSES2,
101
103
  PENSAR_API_BASE_URL: () => PENSAR_API_BASE_URL2,
102
104
  PENSAR_CONSOLE_BASE_URL: () => PENSAR_CONSOLE_BASE_URL2,
103
105
  RunRecoveryBlockedError: () => RunRecoveryBlockedError2,
@@ -105,10 +107,12 @@ __export(exports_api, {
105
107
  VulnerabilityReproductionResultSchema: () => VulnerabilityReproductionResultSchema2,
106
108
  VulnerabilityReproductionStepSchema: () => VulnerabilityReproductionStepSchema2,
107
109
  VulnerabilityReproductionVerdictSchema: () => VulnerabilityReproductionVerdictSchema2,
110
+ archiveKnowledge: () => archiveKnowledge2,
108
111
  createApp: () => createApp2,
109
112
  createDomain: () => createDomain2,
110
113
  createEndpoint: () => createEndpoint2,
111
114
  createIssueComment: () => createIssueComment2,
115
+ createKnowledge: () => createKnowledge2,
112
116
  createNativeRolloutEvidenceCapture: () => createNativeRolloutEvidenceCapture2,
113
117
  createOffensiveSecurityAgentClient: () => createOffensiveSecurityAgentClient2,
114
118
  deleteApp: () => deleteApp2,
@@ -119,6 +123,7 @@ __export(exports_api, {
119
123
  getEndpoint: () => getEndpoint2,
120
124
  getFix: () => getFix2,
121
125
  getIssue: () => getIssue2,
126
+ getKnowledge: () => getKnowledge2,
122
127
  getPensarApiUrl: () => getPensarApiUrl2,
123
128
  getPensarConsoleUrl: () => getPensarConsoleUrl2,
124
129
  getPensarGatewayUrl: () => getPensarGatewayUrl2,
@@ -135,6 +140,7 @@ __export(exports_api, {
135
140
  listIssueComments: () => listIssueComments2,
136
141
  listIssuePullRequests: () => listIssuePullRequests2,
137
142
  listIssues: () => listIssues2,
143
+ listKnowledge: () => listKnowledge2,
138
144
  listPentestTargets: () => listPentestTargets2,
139
145
  listScans: () => listScans2,
140
146
  listTargetLogs: () => listTargetLogs2,
@@ -160,7 +166,8 @@ __export(exports_api, {
160
166
  startVulnerabilityReproductionAgent: () => startVulnerabilityReproductionAgent2,
161
167
  updateApp: () => updateApp2,
162
168
  updateEndpoint: () => updateEndpoint2,
163
- updateIssue: () => updateIssue2
169
+ updateIssue: () => updateIssue2,
170
+ updateKnowledge: () => updateKnowledge2
164
171
  });
165
172
  // src/core/runtime/runEvidence.ts
166
173
  import { createHash } from "node:crypto";
@@ -2552,6 +2559,38 @@ async function listTargetLogs2(targetId, opts) {
2552
2559
  async function searchTargetLogs2(targetId, query, opts) {
2553
2560
  return apiRequest("POST", `/targets/${targetId}/logs/search`, { query, ...opts });
2554
2561
  }
2562
+ // src/core/api/knowledge.ts
2563
+ var KNOWLEDGE_CATEGORIES2 = [
2564
+ "false_positive_pattern",
2565
+ "technology_context",
2566
+ "testing_history",
2567
+ "user_note",
2568
+ "agent_learning"
2569
+ ];
2570
+ var KNOWLEDGE_STATUSES2 = ["active", "stale", "archived"];
2571
+ async function listKnowledge2(filters) {
2572
+ const params = new URLSearchParams;
2573
+ if (filters?.category)
2574
+ params.set("category", filters.category);
2575
+ if (filters?.status)
2576
+ params.set("status", filters.status);
2577
+ if (filters?.tags?.length)
2578
+ params.set("tags", filters.tags.join(","));
2579
+ const qs = params.toString();
2580
+ return apiRequest("GET", `/knowledge${qs ? `?${qs}` : ""}`);
2581
+ }
2582
+ async function getKnowledge2(id) {
2583
+ return apiRequest("GET", `/knowledge/${id}`);
2584
+ }
2585
+ async function createKnowledge2(input) {
2586
+ return apiRequest("POST", "/knowledge", input);
2587
+ }
2588
+ async function updateKnowledge2(id, input) {
2589
+ return apiRequest("PATCH", `/knowledge/${id}`, input);
2590
+ }
2591
+ async function archiveKnowledge2(id) {
2592
+ return apiRequest("DELETE", `/knowledge/${id}`);
2593
+ }
2555
2594
  // src/core/runtime/localRunWorker.ts
2556
2595
  import { randomUUID as randomUUID5 } from "node:crypto";
2557
2596
  import { unlink as unlink2 } from "node:fs/promises";
@@ -7108,4 +7147,4 @@ function startVulnerabilityReproductionAgent2(input) {
7108
7147
  async function runVulnerabilityReproductionAgent2(input) {
7109
7148
  return startVulnerabilityReproductionAgent2(input).result;
7110
7149
  }
7111
- export { inspectSessionEvidence2, openSqliteRunStore2, runAttackSurfaceAgent2, runAuthenticationAgent2, runBenchmarkComparisonAgent2, runPentestAgent2, runEnvironmentAgent2, CLOSED_DISPOSITIONS2, listScans2, getScan2, listPentestTargets2, dispatchPentest2, listIssues2, getIssue2, updateIssue2, listIssueComments2, createIssueComment2, retestIssue2, linkPullRequest2, listIssuePullRequests2, listFixes2, getFix2, listAgentLogs2, searchAgentLogs2, listTargetLogs2, searchTargetLogs2, runOffensiveSecurityAgent2, createOffensiveSecurityAgentClient2, runRecordedAgent2, RunRecoveryBlockedError2, resumeRecordedAgent2, serveLocalRunWorker2, runPatchingAgent2, runThreatModelWorkflow2, TrajectoryExportError2, exportTrajectoryBundle2, VulnerabilityReproductionVerdictSchema2, VulnerabilityReproductionStepSchema2, VulnerabilityReproductionResultSchema2, startVulnerabilityReproductionAgent2, runVulnerabilityReproductionAgent2, exports_api };
7150
+ export { inspectSessionEvidence2, openSqliteRunStore2, runAttackSurfaceAgent2, runAuthenticationAgent2, runBenchmarkComparisonAgent2, runPentestAgent2, runEnvironmentAgent2, CLOSED_DISPOSITIONS2, listScans2, getScan2, listPentestTargets2, dispatchPentest2, listIssues2, getIssue2, updateIssue2, listIssueComments2, createIssueComment2, retestIssue2, linkPullRequest2, listIssuePullRequests2, listFixes2, getFix2, listAgentLogs2, searchAgentLogs2, listTargetLogs2, searchTargetLogs2, KNOWLEDGE_CATEGORIES2, KNOWLEDGE_STATUSES2, listKnowledge2, getKnowledge2, createKnowledge2, updateKnowledge2, archiveKnowledge2, runOffensiveSecurityAgent2, createOffensiveSecurityAgentClient2, runRecordedAgent2, RunRecoveryBlockedError2, resumeRecordedAgent2, serveLocalRunWorker2, runPatchingAgent2, runThreatModelWorkflow2, TrajectoryExportError2, exportTrajectoryBundle2, VulnerabilityReproductionVerdictSchema2, VulnerabilityReproductionStepSchema2, VulnerabilityReproductionResultSchema2, startVulnerabilityReproductionAgent2, runVulnerabilityReproductionAgent2, exports_api };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  OffensiveSecurityAgent2
3
- } from "./chunk-f09y54py.js";
3
+ } from "./chunk-r4j8ybn9.js";
4
4
 
5
5
  // src/core/agents/agentRuntime.ts
6
6
  function assembleAgentHooks(opts) {
@@ -6,7 +6,7 @@ import {
6
6
  resolveHoonifyModel,
7
7
  getCurrentVersion,
8
8
  config2
9
- } from "./chunk-qt87ty01.js";
9
+ } from "./chunk-w66ce82a.js";
10
10
  import {
11
11
  schema2,
12
12
  descending2,
@@ -118,7 +118,7 @@ import {
118
118
  generateText as generateText2,
119
119
  Output,
120
120
  streamText,
121
- wrapLanguageModel as wrapLanguageModel3
121
+ wrapLanguageModel as wrapLanguageModel4
122
122
  } from "ai";
123
123
 
124
124
  // src/core/logger/index.ts
@@ -5399,14 +5399,14 @@ import { createAmazonBedrock } from "@ai-sdk/amazon-bedrock";
5399
5399
  import { createBedrockMantle } from "@ai-sdk/amazon-bedrock/mantle";
5400
5400
  import { createAnthropic as createAnthropic2 } from "@ai-sdk/anthropic";
5401
5401
  import { createGoogleGenerativeAI } from "@ai-sdk/google";
5402
- import { createOpenAI as createOpenAI2 } from "@ai-sdk/openai";
5402
+ import { createOpenAI as createOpenAI3 } from "@ai-sdk/openai";
5403
5403
  import { createOpenAICompatible as createOpenAICompatible3 } from "@ai-sdk/openai-compatible";
5404
5404
  import { createOpenRouter } from "@openrouter/ai-sdk-provider";
5405
5405
  import {
5406
5406
  defaultSettingsMiddleware,
5407
5407
  generateText,
5408
5408
  simulateStreamingMiddleware,
5409
- wrapLanguageModel as wrapLanguageModel2
5409
+ wrapLanguageModel as wrapLanguageModel3
5410
5410
  } from "ai";
5411
5411
 
5412
5412
  // src/core/api/constants.ts
@@ -5573,9 +5573,45 @@ function createAnthropicModel(modelId, apiKey) {
5573
5573
  }
5574
5574
 
5575
5575
  // src/core/ai/providers/custom.ts
5576
+ import { createOpenAI as createOpenAI2 } from "@ai-sdk/openai";
5576
5577
  import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
5578
+ import { wrapLanguageModel as wrapLanguageModel2 } from "ai";
5577
5579
  function createCustomModel(id, providers) {
5578
5580
  const { providerId, provider, model } = resolveCustomModel(id, providers);
5581
+ if (provider.apiType === "responses") {
5582
+ if (!provider.apiKeyEnv)
5583
+ throw new Error("Responses custom providers require apiKeyEnv.");
5584
+ if (provider.requestBody)
5585
+ throw new Error("requestBody is only supported for Chat Completions.");
5586
+ const responsesModel = createOpenAI2({
5587
+ name: `custom-${providerId}`,
5588
+ baseURL: provider.baseUrl,
5589
+ apiKey: resolveCustomApiKey(provider),
5590
+ headers: provider.headers
5591
+ }).responses(model.id);
5592
+ return wrapLanguageModel2({
5593
+ model: responsesModel,
5594
+ middleware: {
5595
+ specificationVersion: "v3",
5596
+ transformParams: async ({ params }) => ({
5597
+ ...params,
5598
+ maxOutputTokens: Math.min(params.maxOutputTokens ?? model.maxOutputTokens, model.maxOutputTokens),
5599
+ ...model.reasoningEffort && {
5600
+ providerOptions: {
5601
+ ...params.providerOptions,
5602
+ openai: {
5603
+ ...params.providerOptions?.openai,
5604
+ forceReasoning: true,
5605
+ reasoningEffort: model.reasoningEffort
5606
+ }
5607
+ }
5608
+ }
5609
+ })
5610
+ }
5611
+ });
5612
+ }
5613
+ if (model.reasoningEffort)
5614
+ throw new Error("reasoningEffort requires the Responses API.");
5579
5615
  return createOpenAICompatible({
5580
5616
  name: `custom-${providerId}`,
5581
5617
  baseURL: provider.baseUrl,
@@ -6719,13 +6755,13 @@ function getProviderModel2(model, authConfig) {
6719
6755
  models: authConfig?.hoonifyModels
6720
6756
  });
6721
6757
  case "openai": {
6722
- const openai = createOpenAI2({
6758
+ const openai = createOpenAI3({
6723
6759
  apiKey: openAiAPIKey,
6724
6760
  fetch: /^gpt-5\.5-pro(?:-|$)/.test(model) ? fetchOpenAIPro : undefined
6725
6761
  });
6726
6762
  providerModel = openai.responses(model);
6727
6763
  if (/^gpt-6[.-]/.test(model)) {
6728
- providerModel = wrapLanguageModel2({
6764
+ providerModel = wrapLanguageModel3({
6729
6765
  model: providerModel,
6730
6766
  middleware: defaultSettingsMiddleware({
6731
6767
  settings: {
@@ -6737,7 +6773,7 @@ function getProviderModel2(model, authConfig) {
6737
6773
  });
6738
6774
  }
6739
6775
  if (/^gpt-5\.5-pro(?:-|$)/.test(model)) {
6740
- providerModel = wrapLanguageModel2({
6776
+ providerModel = wrapLanguageModel3({
6741
6777
  model: providerModel,
6742
6778
  middleware: simulateStreamingMiddleware()
6743
6779
  });
@@ -6846,7 +6882,7 @@ function getProviderModel2(model, authConfig) {
6846
6882
  break;
6847
6883
  }
6848
6884
  case "local":
6849
- providerModel = createOpenAI2({
6885
+ providerModel = createOpenAI3({
6850
6886
  baseURL: localBaseURL,
6851
6887
  apiKey: ""
6852
6888
  }).chat(model);
@@ -7818,7 +7854,7 @@ function streamResponseWithinOperation(opts, nativeRecovery) {
7818
7854
  operationKind: "agent.stream",
7819
7855
  sessionId
7820
7856
  });
7821
- return languageModelMiddleware ? wrapLanguageModel3({
7857
+ return languageModelMiddleware ? wrapLanguageModel4({
7822
7858
  model: baseProviderModel,
7823
7859
  middleware: languageModelMiddleware
7824
7860
  }) : baseProviderModel;
@@ -8109,7 +8145,7 @@ async function generateObjectResponseWithinRecorder(opts) {
8109
8145
  operationKind: nativeRolloutOperation(opts.operation),
8110
8146
  sessionId
8111
8147
  });
8112
- const providerModel = languageModelMiddleware ? wrapLanguageModel3({
8148
+ const providerModel = languageModelMiddleware ? wrapLanguageModel4({
8113
8149
  model: baseProviderModel,
8114
8150
  middleware: languageModelMiddleware
8115
8151
  }) : baseProviderModel;
@@ -1,12 +1,12 @@
1
1
  import"./chunk-7gjdygcx.js";
2
- import"./chunk-qt87ty01.js";
2
+ import"./chunk-w66ce82a.js";
3
3
  import"./chunk-jdjagvgr.js";
4
4
  import"./chunk-2njv7wz3.js";
5
- import"./chunk-7zkv27tc.js";
5
+ import"./chunk-ba41jh41.js";
6
6
  import"./chunk-8vhr65w3.js";
7
7
  import {
8
8
  OffensiveSecurityAgent2
9
- } from "./chunk-f09y54py.js";
9
+ } from "./chunk-r4j8ybn9.js";
10
10
  import"./chunk-fy3bbbqy.js";
11
11
  import"./chunk-mv74mq5n.js";
12
12
  import {
@@ -14,14 +14,14 @@ import {
14
14
  withFindingPersistedHook2,
15
15
  assertDepth2,
16
16
  inProcessSeams2
17
- } from "./chunk-3haymsms.js";
17
+ } from "./chunk-yrnrbjes.js";
18
18
  import"./chunk-b8eq85d2.js";
19
19
  import {
20
20
  FindingsRegistry2
21
- } from "./chunk-dmznt6r6.js";
22
- import"./chunk-vrnhexdm.js";
21
+ } from "./chunk-1azdancq.js";
22
+ import"./chunk-3c00n0cy.js";
23
23
  import"./chunk-t5bt5vn1.js";
24
- import"./chunk-yy87a24g.js";
24
+ import"./chunk-2qsq76xq.js";
25
25
  import"./chunk-eb4h4k1f.js";
26
26
  import"./chunk-vx228eeq.js";
27
27
  import"./chunk-bx94rwt5.js";
@@ -36,7 +36,7 @@ import {
36
36
  REPORT_FILENAME_MD,
37
37
  REPORT_FILENAME_JSON,
38
38
  createThreatModelPrompt
39
- } from "./chunk-11w6wa26.js";
39
+ } from "./chunk-v3dk9j7k.js";
40
40
 
41
41
  // src/core/workflows/fastStrike.ts
42
42
  import { writeFileSync } from "node:fs";
@@ -6,7 +6,7 @@ import {
6
6
  normalizeMessages2,
7
7
  createLogger,
8
8
  scopedLogger
9
- } from "./chunk-7zkv27tc.js";
9
+ } from "./chunk-ba41jh41.js";
10
10
  import {
11
11
  __export
12
12
  } from "./chunk-n0ba7khr.js";
@@ -7,7 +7,7 @@ import {
7
7
  PATCHING_ACTIVE_TOOLS2,
8
8
  readAgentsMd2,
9
9
  PatchingAgent2
10
- } from "./chunk-2p92hj2m.js";
10
+ } from "./chunk-1yct6cra.js";
11
11
  import {
12
12
  __export
13
13
  } from "./chunk-n0ba7khr.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createLogger,
3
3
  scopedLogger
4
- } from "./chunk-7zkv27tc.js";
4
+ } from "./chunk-ba41jh41.js";
5
5
  import {
6
6
  __export
7
7
  } from "./chunk-n0ba7khr.js";
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  AgentRuntime,
12
12
  defineAgent
13
- } from "./chunk-fxx0c7he.js";
13
+ } from "./chunk-acgbyf5h.js";
14
14
  import {
15
15
  __export
16
16
  } from "./chunk-n0ba7khr.js";
@@ -19,7 +19,7 @@ import {
19
19
  scopedLogger,
20
20
  normalizeStepUsage2,
21
21
  streamResponse2
22
- } from "./chunk-7zkv27tc.js";
22
+ } from "./chunk-ba41jh41.js";
23
23
  import {
24
24
  PerCommandShell2,
25
25
  resolveBrowserHeaderPolicy2,
@@ -47,7 +47,7 @@ import {
47
47
  } from "./chunk-fy3bbbqy.js";
48
48
  import {
49
49
  inProcessSubagentSpawner2
50
- } from "./chunk-vrnhexdm.js";
50
+ } from "./chunk-3c00n0cy.js";
51
51
  import {
52
52
  addMemory2,
53
53
  ASK_USER_QUESTIONS_TOOL_NAME2,
@@ -120,7 +120,7 @@ import {
120
120
  FAST_STRIKE_EXCLUDED_TOOL_NAMES2,
121
121
  PLAN_MODE_TOOL_NAMES2,
122
122
  SKILL_TOOL_NAMES2
123
- } from "./chunk-yy87a24g.js";
123
+ } from "./chunk-2qsq76xq.js";
124
124
  import {
125
125
  ApexFindingObject2
126
126
  } from "./chunk-q5e23acz.js";
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  createLogger,
3
3
  scopedLogger
4
- } from "./chunk-7zkv27tc.js";
4
+ } from "./chunk-ba41jh41.js";
5
5
  import {
6
6
  OffensiveSecurityAgent2
7
- } from "./chunk-f09y54py.js";
7
+ } from "./chunk-r4j8ybn9.js";
8
8
  import {
9
9
  inMemoryRegistryProvider2,
10
10
  withFindingPersistedHook2,
11
11
  assertDepth2,
12
12
  inProcessSeams2,
13
13
  resolveItemHooks2
14
- } from "./chunk-3haymsms.js";
14
+ } from "./chunk-yrnrbjes.js";
15
15
  import {
16
16
  FindingsRegistry2
17
- } from "./chunk-dmznt6r6.js";
17
+ } from "./chunk-1azdancq.js";
18
18
  import {
19
19
  inProcessSubagentSpawner2
20
- } from "./chunk-vrnhexdm.js";
20
+ } from "./chunk-3c00n0cy.js";
21
21
  import {
22
22
  PLAN_MODE_TOOL_NAMES2
23
- } from "./chunk-yy87a24g.js";
23
+ } from "./chunk-2qsq76xq.js";
24
24
  import {
25
25
  toGrpcPentestContext,
26
26
  grpcAuthorityTarget
@@ -36,11 +36,11 @@ import {
36
36
  } from "./chunk-q5e23acz.js";
37
37
  import {
38
38
  BlackboxAttackSurfaceAgent2
39
- } from "./chunk-kqgnc8g9.js";
39
+ } from "./chunk-1fy8azee.js";
40
40
  import {
41
41
  TargetedPentestAgent2,
42
42
  buildPentestSystemPrompt2
43
- } from "./chunk-jmxdxsm8.js";
43
+ } from "./chunk-1jvwqnem.js";
44
44
  import {
45
45
  loadSubagentMessages2,
46
46
  saveSubagentData2,
@@ -51,10 +51,10 @@ import {
51
51
  finalizeManifest2,
52
52
  updateManifestEntryStatus2,
53
53
  getCompletedAgentIds2
54
- } from "./chunk-4vsr549z.js";
54
+ } from "./chunk-e8yy2k73.js";
55
55
  import {
56
56
  runWhiteboxAttackSurfaceWorkflow2
57
- } from "./chunk-1090qz7m.js";
57
+ } from "./chunk-z137x08b.js";
58
58
 
59
59
  // src/core/session/execution-metrics.ts
60
60
  import { existsSync, readFileSync, writeFileSync } from "node:fs";
@@ -672,7 +672,7 @@ async function runPentestSwarm2(input) {
672
672
  }
673
673
  async function runPentestWorkflow2(input) {
674
674
  if (input.fastStrike) {
675
- const { runFastStrike } = await import("./chunk-wtht1nmq.js");
675
+ const { runFastStrike } = await import("./chunk-bb0ekhkw.js");
676
676
  return runFastStrike(input);
677
677
  }
678
678
  const {
@@ -16,12 +16,14 @@ var customModelSchema = z.strictObject({
16
16
  id: z.string().trim().min(1),
17
17
  name: z.string().trim().min(1).optional(),
18
18
  contextLength: z.number().int().positive(),
19
- maxOutputTokens: z.number().int().positive()
19
+ maxOutputTokens: z.number().int().positive(),
20
+ reasoningEffort: z.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional()
20
21
  }).refine((model) => model.maxOutputTokens < model.contextLength, {
21
22
  message: "maxOutputTokens must be smaller than contextLength"
22
23
  });
23
- var customProviderSchema = z.strictObject({
24
+ var customProviderBaseSchema = z.strictObject({
24
25
  name: z.string().trim().min(1).optional(),
26
+ apiType: z.enum(["chat-completions", "responses"]).optional(),
25
27
  baseUrl: z.string().transform((value, ctx) => {
26
28
  try {
27
29
  const url = new URL(value);
@@ -44,6 +46,28 @@ var customProviderSchema = z.strictObject({
44
46
  }).optional(),
45
47
  models: z.array(customModelSchema).min(1).refine((models) => new Set(models.map((model) => model.id)).size === models.length, { message: "Model IDs must be unique within a provider" })
46
48
  });
49
+ var customProviderSchema = customProviderBaseSchema.superRefine((provider, ctx) => {
50
+ if (provider.apiType === "responses") {
51
+ if (!provider.apiKeyEnv)
52
+ ctx.addIssue({
53
+ code: "custom",
54
+ path: ["apiKeyEnv"],
55
+ message: "Responses requires apiKeyEnv"
56
+ });
57
+ if (provider.requestBody)
58
+ ctx.addIssue({
59
+ code: "custom",
60
+ path: ["requestBody"],
61
+ message: "requestBody is only supported for Chat Completions"
62
+ });
63
+ } else if (provider.models.some((model) => model.reasoningEffort)) {
64
+ ctx.addIssue({
65
+ code: "custom",
66
+ path: ["models"],
67
+ message: "reasoningEffort requires the Responses API"
68
+ });
69
+ }
70
+ });
47
71
  var customProvidersSchema = z.record(providerIdSchema, customProviderSchema);
48
72
  function parseCustomProviders(value) {
49
73
  const parsed = customProvidersSchema.safeParse(value);
@@ -217,6 +241,8 @@ var package_default = {
217
241
  "@ai-sdk/openai": "3.0.46",
218
242
  "@ai-sdk/openai-compatible": "^2.0.51",
219
243
  "@ai-sdk/provider": "^3.0.10",
244
+ "@aws-sdk/client-s3": "3.1146.0",
245
+ "@aws-sdk/lib-storage": "3.1146.0",
220
246
  "@daytona/sdk": "0.222.0",
221
247
  "@googleapis/gmail": "^16.1.2",
222
248
  "@microsoft/microsoft-graph-client": "^3.0.7",
@@ -549,7 +575,7 @@ var package_default = {
549
575
  tsc: "tsc --noEmit"
550
576
  },
551
577
  type: "module",
552
- version: "2.6.1-canary.4c944004"
578
+ version: "2.6.1"
553
579
  };
554
580
 
555
581
  // src/core/installation/index.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createLogger,
3
3
  scopedLogger
4
- } from "./chunk-7zkv27tc.js";
4
+ } from "./chunk-ba41jh41.js";
5
5
  import {
6
6
  GOOGLE_SIGNIN_PROMPT_GUIDANCE,
7
7
  browserEngineForGoogleSignIn
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  AgentRuntime,
14
14
  defineAgent
15
- } from "./chunk-fxx0c7he.js";
15
+ } from "./chunk-acgbyf5h.js";
16
16
 
17
17
  // src/core/agents/specialized/authenticationAgent/agent.ts
18
18
  import { existsSync, readFileSync } from "node:fs";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-jdjagvgr.js";
7
7
  import {
8
8
  FindingsRegistry2
9
- } from "./chunk-dmznt6r6.js";
9
+ } from "./chunk-1azdancq.js";
10
10
 
11
11
  // src/core/utils/concurrency.ts
12
12
  import { context } from "@opentelemetry/api";
@@ -4,26 +4,26 @@ import {
4
4
  import {
5
5
  createLogger,
6
6
  scopedLogger
7
- } from "./chunk-7zkv27tc.js";
7
+ } from "./chunk-ba41jh41.js";
8
8
  import {
9
9
  assertDepth2,
10
10
  inProcessSeams2,
11
11
  resolveItemHooks2
12
- } from "./chunk-3haymsms.js";
12
+ } from "./chunk-yrnrbjes.js";
13
13
  import {
14
14
  inProcessSubagentSpawner2
15
- } from "./chunk-vrnhexdm.js";
15
+ } from "./chunk-3c00n0cy.js";
16
16
  import {
17
17
  collectCommand
18
18
  } from "./chunk-fy3bbbqy.js";
19
19
  import {
20
20
  CodeAgent2
21
- } from "./chunk-gmw7vx6r.js";
21
+ } from "./chunk-4hwzqthr.js";
22
22
  import {
23
23
  WHITEBOX_APPS_DISCOVERY_SYSTEM_PROMPT2,
24
24
  WHITEBOX_ENDPOINT_DOCUMENTATION_SYSTEM_PROMPT,
25
25
  WHITEBOX_DISCOVERY_SYSTEM_PROMPT2
26
- } from "./chunk-ss77exdk.js";
26
+ } from "./chunk-r2dkp4tb.js";
27
27
  import {
28
28
  EndpointSchema2,
29
29
  AppInfoSchema2,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TargetedPentestAgent2
3
- } from "./chunk-jmxdxsm8.js";
3
+ } from "./chunk-1jvwqnem.js";
4
4
 
5
5
  // src/core/runtime/agentExecution.ts
6
6
  function startAgentExecution(agent) {