@pensar/apex 2.2.0 → 2.3.0-canary.f43660dd
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-q5hwjdtb.js → agent-54zbjp5g.js} +9 -9
- package/build/agent-dmfqxetq.js +19 -0
- package/build/{agent-yayy5x2a.js → agent-nr5eq27w.js} +7 -7
- package/build/{apps-0es69e2s.js → apps-yhq3vem2.js} +16 -16
- package/build/{auth-q73k9bh9.js → auth-kag9cbnd.js} +32 -39
- package/build/authentication-hx4920t3.js +19 -0
- package/build/blackboxAgent-ga9cc2sv.js +19 -0
- package/build/{blackboxPentest-h28nykk5.js → blackboxPentest-hac0kjq7.js} +14 -14
- package/build/{cli-7n43wz82.js → cli-0cw9k1tw.js} +4 -2
- package/build/{cli-2jn8104w.js → cli-3m2x8w2t.js} +2 -2
- package/build/{cli-s43t5ay0.js → cli-5b7x19aa.js} +1 -1
- package/build/{cli-vgg6h2ax.js → cli-5dj8fc52.js} +1 -1
- package/build/{cli-tz9yg4ew.js → cli-5vskcg6x.js} +8 -8
- package/build/{cli-1cf5vy5m.js → cli-8nmjfxpb.js} +58 -26
- package/build/{cli-51dkmt5p.js → cli-bpd40kwt.js} +1 -1
- package/build/{cli-7e5ad5js.js → cli-c5e9y4f7.js} +2 -2
- package/build/{cli-knqx15w6.js → cli-crbamax1.js} +2 -2
- package/build/{cli-ptzy9ak5.js → cli-ez994rr8.js} +1 -1
- package/build/{cli-n114n8mk.js → cli-jz6ak250.js} +2 -2
- package/build/{cli-1re2kv5v.js → cli-kkkxevak.js} +3 -3
- package/build/{cli-6kx46ck0.js → cli-kpabqavj.js} +19 -6
- package/build/{cli-4tc6888c.js → cli-mg5hqzfk.js} +51 -2
- package/build/{cli-1f636vzd.js → cli-nw87xhd7.js} +1 -1
- package/build/{cli-xbdn034b.js → cli-tzaxpbx8.js} +3983 -55
- package/build/{cli-xpn9tsw0.js → cli-y177s333.js} +3 -3
- package/build/cli.js +33 -33
- package/build/{config-xcf7rc6x.js → config-ejqssj7v.js} +3 -3
- package/build/{doctor-98zperf9.js → doctor-nq5j5b3n.js} +6 -6
- package/build/{fastStrike-9tm6bedh.js → fastStrike-r2nnp14k.js} +9 -9
- package/build/{fixes-1dry8j61.js → fixes-1k92rcye.js} +16 -16
- package/build/{index-6dbym5jy.js → index-dgskmca6.js} +21 -8
- package/build/{index-4hqbyzf5.js → index-emkkrdxh.js} +8 -8
- package/build/{index-pxwwcefn.js → index-fxdwg3rg.js} +9 -9
- package/build/{index-34h2nb6x.js → index-mdnk1yy1.js} +3 -3
- package/build/{index-31rwrakh.js → index-q0e883cx.js} +2 -2
- package/build/{index-f6ttv7np.js → index-qcvh5me4.js} +9 -5
- package/build/{index-0j880wqc.js → index-qgw3yp85.js} +1080 -898
- package/build/{issues-wjakj8yy.js → issues-vnk8x7da.js} +44 -16
- package/build/{logs-ewyzcspy.js → logs-rr9fwq7m.js} +16 -16
- package/build/{offesecAgent-7m9smy0t.js → offesecAgent-1sw6kh7y.js} +8 -8
- package/build/pentest-rks9g0xv.js +29 -0
- package/build/{pentests-1hcqjyk2.js → pentests-6kpja9cc.js} +16 -16
- package/build/{targetedPentest-3x13kqvc.js → targetedPentest-v3vyanfw.js} +9 -9
- package/build/{targets-nqz8w37e.js → targets-6h670bhe.js} +16 -16
- package/build/threatModel-gqpa574g.js +27 -0
- package/build/{uninstall-p1q5pkx2.js → uninstall-1vyfsbab.js} +1 -1
- package/build/{upload-x7etpfp4.js → upload-kaqk0rnk.js} +6 -6
- package/build/{utils-kw6yh5yn.js → utils-6gqkfbv5.js} +5 -5
- package/package.json +1 -1
- package/build/agent-3cdfwxcd.js +0 -19
- package/build/authentication-tqx2brcv.js +0 -19
- package/build/blackboxAgent-d0smgqt7.js +0 -19
- package/build/pentest-1cb5t0dt.js +0 -29
- package/build/threatModel-7f02av7y.js +0 -27
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-tzaxpbx8.js";
|
|
4
4
|
import {
|
|
5
5
|
init_dist,
|
|
6
6
|
stepCountIs
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-kpabqavj.js";
|
|
8
8
|
|
|
9
9
|
// src/core/agents/specialized/codeAgent/agent.ts
|
|
10
10
|
init_dist();
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
createReportErrorTool,
|
|
6
6
|
isMemoryEnabled,
|
|
7
7
|
readPlan
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-tzaxpbx8.js";
|
|
9
9
|
import {
|
|
10
10
|
createLogger,
|
|
11
11
|
hasToolCall,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
init_lazyLogger,
|
|
14
14
|
init_structured,
|
|
15
15
|
scopedLogger
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-kpabqavj.js";
|
|
17
17
|
import {
|
|
18
18
|
exports_external,
|
|
19
19
|
init_zod
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-tzaxpbx8.js";
|
|
4
4
|
import {
|
|
5
5
|
detectOSAndEnhancePrompt
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-5b7x19aa.js";
|
|
7
7
|
import {
|
|
8
8
|
hasToolCall,
|
|
9
9
|
init_dist,
|
|
10
10
|
stepCountIs
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-kpabqavj.js";
|
|
12
12
|
|
|
13
13
|
// src/core/agents/specialized/attackSurface/blackboxAgent.ts
|
|
14
14
|
init_dist();
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
init_auth,
|
|
5
5
|
init_constants,
|
|
6
6
|
signGatewayRequest
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-mg5hqzfk.js";
|
|
8
8
|
import {
|
|
9
9
|
AISDKError,
|
|
10
10
|
APICallError,
|
|
@@ -87,11 +87,11 @@ import {
|
|
|
87
87
|
import {
|
|
88
88
|
config,
|
|
89
89
|
init_config
|
|
90
|
-
} from "./cli-
|
|
90
|
+
} from "./cli-bpd40kwt.js";
|
|
91
91
|
import {
|
|
92
92
|
getCurrentVersion,
|
|
93
93
|
init_installation
|
|
94
|
-
} from "./cli-
|
|
94
|
+
} from "./cli-nw87xhd7.js";
|
|
95
95
|
import {
|
|
96
96
|
__callDispose,
|
|
97
97
|
__commonJS,
|
|
@@ -47127,7 +47127,7 @@ async function create2(input) {
|
|
|
47127
47127
|
if (normalizedConfig?.headers !== undefined) {
|
|
47128
47128
|
snapshotHeaders = { ...normalizedConfig.headers };
|
|
47129
47129
|
} else {
|
|
47130
|
-
const { config: appConfig } = await import("./index-
|
|
47130
|
+
const { config: appConfig } = await import("./index-mdnk1yy1.js");
|
|
47131
47131
|
const cfg = await appConfig.get();
|
|
47132
47132
|
snapshotHeaders = cfg.defaultHeaders ? { ...cfg.defaultHeaders } : { ...DEFAULT_HEADER_RECORD };
|
|
47133
47133
|
}
|
|
@@ -47303,7 +47303,8 @@ async function updateOperatorSettings(sessionId, settings) {
|
|
|
47303
47303
|
session.config.operatorSettings = {
|
|
47304
47304
|
initialMode: "manual",
|
|
47305
47305
|
requireApproval: true,
|
|
47306
|
-
enableSuggestions: true
|
|
47306
|
+
enableSuggestions: true,
|
|
47307
|
+
strikeMode: false
|
|
47307
47308
|
};
|
|
47308
47309
|
}
|
|
47309
47310
|
if (settings.initialMode !== undefined) {
|
|
@@ -47315,6 +47316,9 @@ async function updateOperatorSettings(sessionId, settings) {
|
|
|
47315
47316
|
if (settings.enableSuggestions !== undefined) {
|
|
47316
47317
|
session.config.operatorSettings.enableSuggestions = settings.enableSuggestions;
|
|
47317
47318
|
}
|
|
47319
|
+
if (settings.strikeMode !== undefined) {
|
|
47320
|
+
session.config.operatorSettings.strikeMode = settings.strikeMode;
|
|
47321
|
+
}
|
|
47318
47322
|
});
|
|
47319
47323
|
}
|
|
47320
47324
|
async function updateSessionHeaders(sessionId, headers) {
|
|
@@ -47387,7 +47391,8 @@ var init_session = __esm(() => {
|
|
|
47387
47391
|
OperatorSettingsObject = zod_default.object({
|
|
47388
47392
|
initialMode: zod_default.enum(["plan", "manual", "auto"]).default("manual"),
|
|
47389
47393
|
requireApproval: zod_default.boolean().default(true),
|
|
47390
|
-
enableSuggestions: zod_default.boolean().default(true)
|
|
47394
|
+
enableSuggestions: zod_default.boolean().default(true),
|
|
47395
|
+
strikeMode: zod_default.boolean().optional()
|
|
47391
47396
|
});
|
|
47392
47397
|
EmailInboxConfigObject = zod_default.discriminatedUnion("provider", [
|
|
47393
47398
|
zod_default.object({
|
|
@@ -47422,6 +47427,14 @@ var init_session = __esm(() => {
|
|
|
47422
47427
|
username: zod_default.string(),
|
|
47423
47428
|
password: zod_default.string(),
|
|
47424
47429
|
tls: zod_default.boolean()
|
|
47430
|
+
}),
|
|
47431
|
+
zod_default.object({
|
|
47432
|
+
provider: zod_default.literal("http"),
|
|
47433
|
+
id: zod_default.string(),
|
|
47434
|
+
name: zod_default.string(),
|
|
47435
|
+
emailAddress: zod_default.string(),
|
|
47436
|
+
endpoint: zod_default.string(),
|
|
47437
|
+
token: zod_default.string()
|
|
47425
47438
|
})
|
|
47426
47439
|
]);
|
|
47427
47440
|
EmailIntegrationConfigObject = zod_default.object({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
config,
|
|
3
3
|
init_config
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-bpd40kwt.js";
|
|
5
5
|
import {
|
|
6
6
|
__esm
|
|
7
7
|
} from "./cli-8rxa073f.js";
|
|
@@ -350,6 +350,55 @@ async function selectWorkspace(apiUrl, accessToken, workspaceId) {
|
|
|
350
350
|
}
|
|
351
351
|
return await response.json();
|
|
352
352
|
}
|
|
353
|
+
async function createWorkspaceSelection(apiUrl, accessToken) {
|
|
354
|
+
const response = await fetch(`${apiUrl}/api/cli/workspace-selection`, {
|
|
355
|
+
method: "POST",
|
|
356
|
+
headers: {
|
|
357
|
+
"Content-Type": "application/json",
|
|
358
|
+
Authorization: `Bearer ${accessToken}`
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
if (!response.ok) {
|
|
362
|
+
throw new Error("Failed to start workspace selection");
|
|
363
|
+
}
|
|
364
|
+
return await response.json();
|
|
365
|
+
}
|
|
366
|
+
async function pollWorkspaceSelection(apiUrl, accessToken, selectionId, signal) {
|
|
367
|
+
const POLL_INTERVAL = 3000;
|
|
368
|
+
const TIMEOUT = 10 * 60 * 1000;
|
|
369
|
+
const deadline = Date.now() + TIMEOUT;
|
|
370
|
+
while (Date.now() < deadline) {
|
|
371
|
+
if (signal?.aborted)
|
|
372
|
+
throw new Error("Cancelled");
|
|
373
|
+
await sleep2(POLL_INTERVAL);
|
|
374
|
+
if (signal?.aborted)
|
|
375
|
+
throw new Error("Cancelled");
|
|
376
|
+
try {
|
|
377
|
+
const response = await fetch(`${apiUrl}/api/cli/workspace-selection?id=${encodeURIComponent(selectionId)}`, {
|
|
378
|
+
headers: { Authorization: `Bearer ${accessToken}` }
|
|
379
|
+
});
|
|
380
|
+
if (!response.ok)
|
|
381
|
+
continue;
|
|
382
|
+
const data = await response.json();
|
|
383
|
+
if (data.status === "complete" && data.workspaceId) {
|
|
384
|
+
return data.workspaceId;
|
|
385
|
+
}
|
|
386
|
+
if (data.status === "expired") {
|
|
387
|
+
throw new Error("Workspace selection expired. Please run `pensar login` again.");
|
|
388
|
+
}
|
|
389
|
+
} catch (err) {
|
|
390
|
+
if (signal?.aborted)
|
|
391
|
+
throw new Error("Cancelled");
|
|
392
|
+
if (err instanceof Error && err.message.includes("Please try again")) {
|
|
393
|
+
throw err;
|
|
394
|
+
}
|
|
395
|
+
if (err instanceof Error && err.message.includes("expired")) {
|
|
396
|
+
throw err;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
throw new Error("Workspace selection timed out. Please try again.");
|
|
401
|
+
}
|
|
353
402
|
var init_workspaces = () => {};
|
|
354
403
|
|
|
355
404
|
// src/core/auth/index.ts
|
|
@@ -362,4 +411,4 @@ var init_auth = __esm(() => {
|
|
|
362
411
|
init_workspaces();
|
|
363
412
|
});
|
|
364
413
|
|
|
365
|
-
export { getPensarApiUrl, getPensarGatewayUrl, getPensarConsoleUrl, init_constants, isConnected, disconnect, startDeviceFlow, pollWorkOSToken, pollLegacyToken, isTokenExpired, ensureValidToken, validateGateway, signGatewayRequest, fetchWorkspaces, pollForWorkspaceCreation, selectWorkspace, init_auth };
|
|
414
|
+
export { getPensarApiUrl, getPensarGatewayUrl, getPensarConsoleUrl, init_constants, isConnected, disconnect, startDeviceFlow, pollWorkOSToken, pollLegacyToken, isTokenExpired, ensureValidToken, validateGateway, signGatewayRequest, fetchWorkspaces, pollForWorkspaceCreation, selectWorkspace, createWorkspaceSelection, pollWorkspaceSelection, init_auth };
|