@pensar/apex 2.1.2 → 2.1.3-canary.0e6728fd
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-8xtrxjyz.js +27 -0
- package/build/agent-c9x70atb.js +19 -0
- package/build/{agent-737mxp3v.js → agent-jysnj2vg.js} +8 -8
- package/build/{apps-j0bwey0w.js → apps-bak1k8v0.js} +16 -16
- package/build/{auth-5stxpmga.js → auth-y8k6bahv.js} +16 -16
- package/build/authentication-yvcjxxer.js +19 -0
- package/build/blackboxAgent-fggn000t.js +19 -0
- package/build/{blackboxPentest-2edr9rj3.js → blackboxPentest-xkt0tw6t.js} +14 -14
- package/build/{cli-ks60cc3h.js → cli-08gv62zx.js} +30 -30
- package/build/{cli-f7d23ded.js → cli-29yqhrjq.js} +936 -1775
- package/build/{cli-whtdyc0e.js → cli-2r1wgr70.js} +4 -4
- package/build/{cli-gbkj2has.js → cli-4kk337yc.js} +3 -3
- package/build/{cli-tw3fe8bj.js → cli-7r4v9hdr.js} +2 -2
- package/build/{cli-hj3t87r2.js → cli-c25w7dwp.js} +1 -1
- package/build/{cli-35czfv00.js → cli-dqvnva4d.js} +70847 -79417
- package/build/{cli-yjbkaqvy.js → cli-gpbm6crd.js} +68 -22
- package/build/{cli-0gk2x2sc.js → cli-j89sg0bf.js} +16 -18
- package/build/{cli-6wwpk9d9.js → cli-j8gbfzaw.js} +1 -1
- package/build/{cli-dqkdnd3c.js → cli-s31p2dd0.js} +88 -49
- package/build/{cli-6vs0mtsb.js → cli-s5d8z6v2.js} +2 -2
- package/build/{cli-jd0c0b91.js → cli-tasyg3ks.js} +1 -1
- package/build/{cli-9vzc18m5.js → cli-tbtta1qx.js} +30 -17
- package/build/{cli-v1aqbv58.js → cli-twfafzdw.js} +23372 -25281
- package/build/{cli-9z6vwf30.js → cli-xbn0wpey.js} +1 -1
- package/build/{cli-xnnkeg5p.js → cli-zf4s30wk.js} +1 -1
- package/build/cli.js +110 -88
- package/build/{config-s5ryv5ez.js → config-11y9yj23.js} +3 -3
- package/build/{doctor-f08gegwc.js → doctor-fj9ekd87.js} +7 -7
- package/build/{fixes-qf4s92z2.js → fixes-1gaxek7g.js} +16 -16
- package/build/{index-x4xefngs.js → index-64xtwggx.js} +3 -3
- package/build/{index-sqjve2bm.js → index-aexn8f1n.js} +2 -2
- package/build/{index-c6qz0gve.js → index-bkvtrkvs.js} +7 -7
- package/build/{index-gakk2t5q.js → index-jv8bb79d.js} +20 -18
- package/build/{index-exvkbve0.js → index-mx23ftn2.js} +4 -4
- package/build/{index-mgng15va.js → index-n1yh9e86.js} +909 -456
- package/build/{index-5h1hjhzw.js → index-sdn8h33y.js} +10 -10
- package/build/{index-s8gw83d6.js → index-v14w25cq.js} +17 -11
- package/build/{issues-5anqrh2j.js → issues-4d6mh489.js} +16 -16
- package/build/{logs-q6ankt6m.js → logs-x5wm4a2n.js} +16 -16
- package/build/{main-3zneyg7p.js → main-3d7dfdvs.js} +17 -93
- package/build/{offesecAgent-hsej0pfc.js → offesecAgent-jv32qfp0.js} +9 -9
- package/build/pentest-9z7v3w8w.js +28 -0
- package/build/{pentests-hyx3c3qa.js → pentests-reen609m.js} +16 -16
- package/build/targetedPentest-2e9mdv9z.js +44 -0
- package/build/{targets-9cqrshet.js → targets-7y3e540x.js} +16 -16
- package/build/threatModel-6tvhhzz7.js +26 -0
- package/build/{uninstall-1j469qj7.js → uninstall-npc3w8z7.js} +1 -1
- package/build/{upload-ymvhkyq5.js → upload-yp2jqr7h.js} +7 -7
- package/build/{utils-d1ed6jzf.js → utils-pecyn9h9.js} +6 -6
- package/package.json +30 -30
- package/build/agent-8w9h3tnw.js +0 -19
- package/build/agent-vdrtakz4.js +0 -25
- package/build/authentication-qswvctj4.js +0 -19
- package/build/blackboxAgent-vwm9t3h4.js +0 -19
- package/build/pentest-1e30q7rs.js +0 -28
- package/build/targetedPentest-ws0a7frk.js +0 -36
- package/build/threatModel-z9b213x8.js +0 -26
package/build/cli.js
CHANGED
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
init_toolset,
|
|
15
15
|
init_utils,
|
|
16
16
|
logger
|
|
17
|
-
} from "./cli-
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
17
|
+
} from "./cli-twfafzdw.js";
|
|
18
|
+
import"./cli-c25w7dwp.js";
|
|
19
|
+
import"./cli-29yqhrjq.js";
|
|
20
20
|
import"./cli-gpnb45ck.js";
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
21
|
+
import"./cli-xbn0wpey.js";
|
|
22
|
+
import"./cli-zf4s30wk.js";
|
|
23
23
|
import {
|
|
24
24
|
init_package,
|
|
25
25
|
package_default
|
|
26
|
-
} from "./cli-
|
|
26
|
+
} from "./cli-08gv62zx.js";
|
|
27
27
|
import {
|
|
28
28
|
__require,
|
|
29
29
|
__toESM
|
|
@@ -35,50 +35,50 @@ var package_default2 = {
|
|
|
35
35
|
pensar: "./bin/pensar.js"
|
|
36
36
|
},
|
|
37
37
|
dependencies: {
|
|
38
|
-
"@ai-sdk/amazon-bedrock": "^4.0.
|
|
39
|
-
"@ai-sdk/anthropic": "^3.0.
|
|
40
|
-
"@ai-sdk/google": "^3.0.
|
|
38
|
+
"@ai-sdk/amazon-bedrock": "^4.0.119",
|
|
39
|
+
"@ai-sdk/anthropic": "^3.0.85",
|
|
40
|
+
"@ai-sdk/google": "^3.0.83",
|
|
41
41
|
"@ai-sdk/openai": "3.0.46",
|
|
42
|
-
"@ai-sdk/openai-compatible": "^2.0.
|
|
43
|
-
"@ai-sdk/provider": "^3.0.
|
|
44
|
-
"@daytonaio/sdk": "^0.112.
|
|
45
|
-
"@googleapis/gmail": "^16.1.
|
|
42
|
+
"@ai-sdk/openai-compatible": "^2.0.51",
|
|
43
|
+
"@ai-sdk/provider": "^3.0.10",
|
|
44
|
+
"@daytonaio/sdk": "^0.112.3",
|
|
45
|
+
"@googleapis/gmail": "^16.1.2",
|
|
46
46
|
"@microsoft/microsoft-graph-client": "^3.0.7",
|
|
47
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
48
|
-
"@openrouter/ai-sdk-provider": "^2.
|
|
49
|
-
"@opentelemetry/api": "^1.9.
|
|
47
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
48
|
+
"@openrouter/ai-sdk-provider": "^2.9.1",
|
|
49
|
+
"@opentelemetry/api": "^1.9.1",
|
|
50
50
|
"@opentui/core": "^0.1.107",
|
|
51
51
|
"@opentui/react": "^0.1.107",
|
|
52
52
|
"@pensar/surface": "0.2.2",
|
|
53
53
|
"@playwright/mcp": "^0.0.54",
|
|
54
|
-
ai: "^6.0.
|
|
54
|
+
ai: "^6.0.208",
|
|
55
55
|
"camoufox-js": "^0.11.1",
|
|
56
|
-
glob: "^13.0.
|
|
56
|
+
glob: "^13.0.6",
|
|
57
57
|
"highlight.js": "^11.11.1",
|
|
58
|
-
imapflow: "^1.2
|
|
59
|
-
mailparser: "^3.9.
|
|
60
|
-
marked: "^16.4.
|
|
58
|
+
imapflow: "^1.4.2",
|
|
59
|
+
mailparser: "^3.9.11",
|
|
60
|
+
marked: "^16.4.2",
|
|
61
61
|
"mime-types": "^3.0.2",
|
|
62
|
-
nodemailer: "^8.0.
|
|
63
|
-
"p-limit": "^7.
|
|
64
|
-
react: "^19.2.
|
|
65
|
-
sharp: "^0.34.
|
|
66
|
-
tldts: "^7.
|
|
67
|
-
yaml: "^2.
|
|
68
|
-
zod: "^4.
|
|
62
|
+
nodemailer: "^8.0.11",
|
|
63
|
+
"p-limit": "^7.3.0",
|
|
64
|
+
react: "^19.2.7",
|
|
65
|
+
sharp: "^0.34.5",
|
|
66
|
+
tldts: "^7.4.3",
|
|
67
|
+
yaml: "^2.9.0",
|
|
68
|
+
zod: "^4.4.3"
|
|
69
69
|
},
|
|
70
70
|
description: "AI-powered penetration testing CLI tool with terminal UI",
|
|
71
71
|
devDependencies: {
|
|
72
72
|
"@biomejs/biome": "2.4.14",
|
|
73
|
-
"@types/bun": "^1.3.
|
|
73
|
+
"@types/bun": "^1.3.14",
|
|
74
74
|
"@types/mailparser": "^3.4.6",
|
|
75
75
|
"@types/mime-types": "^3.0.1",
|
|
76
|
-
"@types/nodemailer": "^8.0.
|
|
77
|
-
"@types/react": "^19.2.
|
|
78
|
-
dotenv: "^17.2
|
|
79
|
-
knip: "^6.
|
|
80
|
-
prettier: "^3.8.
|
|
81
|
-
vitest: "^2.1.
|
|
76
|
+
"@types/nodemailer": "^8.0.1",
|
|
77
|
+
"@types/react": "^19.2.17",
|
|
78
|
+
dotenv: "^17.4.2",
|
|
79
|
+
knip: "^6.17.1",
|
|
80
|
+
prettier: "^3.8.4",
|
|
81
|
+
vitest: "^2.1.9"
|
|
82
82
|
},
|
|
83
83
|
engines: {
|
|
84
84
|
bun: ">=1.0.0",
|
|
@@ -144,7 +144,7 @@ var package_default2 = {
|
|
|
144
144
|
tsc: "tsc --noEmit"
|
|
145
145
|
},
|
|
146
146
|
type: "module",
|
|
147
|
-
version: "2.1.
|
|
147
|
+
version: "2.1.3-canary.0e6728fd"
|
|
148
148
|
};
|
|
149
149
|
|
|
150
150
|
// src/core/ai/index.ts
|
|
@@ -257,7 +257,7 @@ class AgentEventBus {
|
|
|
257
257
|
}
|
|
258
258
|
return this;
|
|
259
259
|
}
|
|
260
|
-
static attachChild(child, parent,
|
|
260
|
+
static attachChild(child, parent, childSessionId) {
|
|
261
261
|
if (!parent)
|
|
262
262
|
return;
|
|
263
263
|
for (const key of CHILD_BUS_FORWARDED_EVENTS) {
|
|
@@ -266,28 +266,37 @@ class AgentEventBus {
|
|
|
266
266
|
const p = payload;
|
|
267
267
|
const isLifecycle = forwardKey === "subagent-spawn" || forwardKey === "subagent-complete";
|
|
268
268
|
if (isLifecycle) {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
});
|
|
276
|
-
}
|
|
269
|
+
const next2 = { ...p };
|
|
270
|
+
if (!p.parentSubagentId)
|
|
271
|
+
next2.parentSubagentId = childSessionId;
|
|
272
|
+
if (!p.parentSessionId)
|
|
273
|
+
next2.parentSessionId = childSessionId;
|
|
274
|
+
parent.emit(forwardKey, next2);
|
|
277
275
|
return;
|
|
278
276
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
277
|
+
const next = { ...p };
|
|
278
|
+
if (!p.subagentId)
|
|
279
|
+
next.subagentId = childSessionId;
|
|
280
|
+
if (!p.sessionId)
|
|
281
|
+
next.sessionId = childSessionId;
|
|
282
|
+
parent.emit(forwardKey, next);
|
|
284
283
|
});
|
|
285
284
|
}
|
|
286
285
|
}
|
|
287
|
-
emitStreamPart(chunk,
|
|
286
|
+
emitStreamPart(chunk, ids) {
|
|
287
|
+
const ctx = typeof ids === "string" ? { subagentId: ids } : ids ?? {};
|
|
288
|
+
const subagentId = ctx.subagentId;
|
|
289
|
+
const sessionId = ctx.sessionId;
|
|
290
|
+
const messageId = ctx.messageId;
|
|
288
291
|
switch (chunk.type) {
|
|
289
292
|
case "text-delta":
|
|
290
|
-
this.emit("text-delta", {
|
|
293
|
+
this.emit("text-delta", {
|
|
294
|
+
text: chunk.text,
|
|
295
|
+
subagentId,
|
|
296
|
+
sessionId,
|
|
297
|
+
messageId,
|
|
298
|
+
partId: ctx.textPartId
|
|
299
|
+
});
|
|
291
300
|
break;
|
|
292
301
|
case "reasoning-start":
|
|
293
302
|
this.emit("reasoning-start", { subagentId });
|
|
@@ -302,14 +311,20 @@ class AgentEventBus {
|
|
|
302
311
|
this.emit("tool-call-start", {
|
|
303
312
|
toolCallId: chunk.id,
|
|
304
313
|
toolName: chunk.toolName,
|
|
305
|
-
subagentId
|
|
314
|
+
subagentId,
|
|
315
|
+
sessionId,
|
|
316
|
+
messageId,
|
|
317
|
+
partId: ctx.toolPartId?.(chunk.id)
|
|
306
318
|
});
|
|
307
319
|
break;
|
|
308
320
|
case "tool-input-delta":
|
|
309
321
|
this.emit("tool-call-delta", {
|
|
310
322
|
toolCallId: chunk.id,
|
|
311
323
|
argsTextDelta: chunk.delta,
|
|
312
|
-
subagentId
|
|
324
|
+
subagentId,
|
|
325
|
+
sessionId,
|
|
326
|
+
messageId,
|
|
327
|
+
partId: ctx.toolPartId?.(chunk.id)
|
|
313
328
|
});
|
|
314
329
|
break;
|
|
315
330
|
case "tool-call": {
|
|
@@ -318,7 +333,10 @@ class AgentEventBus {
|
|
|
318
333
|
toolCallId: tc.toolCallId,
|
|
319
334
|
toolName: tc.toolName,
|
|
320
335
|
args: tc.args ?? tc.input,
|
|
321
|
-
subagentId
|
|
336
|
+
subagentId,
|
|
337
|
+
sessionId,
|
|
338
|
+
messageId,
|
|
339
|
+
partId: ctx.toolPartId?.(tc.toolCallId)
|
|
322
340
|
});
|
|
323
341
|
break;
|
|
324
342
|
}
|
|
@@ -328,7 +346,10 @@ class AgentEventBus {
|
|
|
328
346
|
toolCallId: tr.toolCallId,
|
|
329
347
|
toolName: tr.toolName,
|
|
330
348
|
result: tr.result ?? tr.output,
|
|
331
|
-
subagentId
|
|
349
|
+
subagentId,
|
|
350
|
+
sessionId,
|
|
351
|
+
messageId,
|
|
352
|
+
partId: ctx.toolPartId?.(tr.toolCallId)
|
|
332
353
|
});
|
|
333
354
|
break;
|
|
334
355
|
}
|
|
@@ -477,6 +498,7 @@ You can upgrade manually by running:
|
|
|
477
498
|
// src/core/logger/index.ts
|
|
478
499
|
init_session();
|
|
479
500
|
init_structured();
|
|
501
|
+
init_structured();
|
|
480
502
|
import os from "node:os";
|
|
481
503
|
import path from "node:path";
|
|
482
504
|
var ERROR_LOG_PATH = path.join(os.homedir(), ".pensar", "error.log");
|
|
@@ -565,7 +587,7 @@ function attachCliAgentStreamListeners(bus) {
|
|
|
565
587
|
async function createInstrumentedBus(session) {
|
|
566
588
|
const bus = new AgentEventBus;
|
|
567
589
|
attachCliAgentStreamListeners(bus);
|
|
568
|
-
const { attachWandbToEventBus } = await import("./upload-
|
|
590
|
+
const { attachWandbToEventBus } = await import("./upload-yp2jqr7h.js");
|
|
569
591
|
const wandbCleanup = await attachWandbToEventBus(session, bus).catch((e) => {
|
|
570
592
|
console.warn("[wandb] Tracing disabled:", e.message);
|
|
571
593
|
return null;
|
|
@@ -582,7 +604,7 @@ async function resolveCliHeaders() {
|
|
|
582
604
|
const { parseHeaderLine: parseHeaderLine2, parseHeadersFromFile, formatParseError: formatParseError2 } = await import("./parse-7djk9jyf.js");
|
|
583
605
|
const merged = {};
|
|
584
606
|
if (!noGlobal) {
|
|
585
|
-
const { config: appConfig } = await import("./index-
|
|
607
|
+
const { config: appConfig } = await import("./index-aexn8f1n.js");
|
|
586
608
|
const cfg = await appConfig.get();
|
|
587
609
|
if (cfg.defaultHeaders) {
|
|
588
610
|
Object.assign(merged, cfg.defaultHeaders);
|
|
@@ -616,8 +638,8 @@ async function resolveCliModel() {
|
|
|
616
638
|
const explicit = getArg("--model");
|
|
617
639
|
if (explicit)
|
|
618
640
|
return explicit;
|
|
619
|
-
const { config: appConfig } = await import("./index-
|
|
620
|
-
const { getDefaultModelForConfig } = await import("./utils-
|
|
641
|
+
const { config: appConfig } = await import("./index-aexn8f1n.js");
|
|
642
|
+
const { getDefaultModelForConfig } = await import("./utils-pecyn9h9.js");
|
|
621
643
|
const pensarConfig = await appConfig.get();
|
|
622
644
|
const defaultModel = getDefaultModelForConfig(pensarConfig);
|
|
623
645
|
if (!defaultModel) {
|
|
@@ -701,11 +723,11 @@ Global options:
|
|
|
701
723
|
`);
|
|
702
724
|
}
|
|
703
725
|
async function runPentest() {
|
|
704
|
-
const { config } = await import("./main-
|
|
726
|
+
const { config } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
|
|
705
727
|
config();
|
|
706
|
-
const { runPentestAgent } = await import("./blackboxPentest-
|
|
707
|
-
const { sessions: sessions2 } = await import("./index-
|
|
708
|
-
const { config: appConfig } = await import("./index-
|
|
728
|
+
const { runPentestAgent } = await import("./blackboxPentest-xkt0tw6t.js");
|
|
729
|
+
const { sessions: sessions2 } = await import("./index-bkvtrkvs.js");
|
|
730
|
+
const { config: appConfig } = await import("./index-aexn8f1n.js");
|
|
709
731
|
const target = getArgRequired("--target");
|
|
710
732
|
const cwd = getArg("--cwd");
|
|
711
733
|
const mode = getArg("--mode");
|
|
@@ -773,11 +795,11 @@ Report: ${reportPath}` : ""}`);
|
|
|
773
795
|
process.exit(0);
|
|
774
796
|
}
|
|
775
797
|
async function runTargetedPentest() {
|
|
776
|
-
const { config } = await import("./main-
|
|
798
|
+
const { config } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
|
|
777
799
|
config();
|
|
778
|
-
const { runTargetedPentestAgent } = await import("./targetedPentest-
|
|
779
|
-
const { sessions: sessions2 } = await import("./index-
|
|
780
|
-
const { config: appConfig } = await import("./index-
|
|
800
|
+
const { runTargetedPentestAgent } = await import("./targetedPentest-2e9mdv9z.js");
|
|
801
|
+
const { sessions: sessions2 } = await import("./index-bkvtrkvs.js");
|
|
802
|
+
const { config: appConfig } = await import("./index-aexn8f1n.js");
|
|
781
803
|
const target = getArgRequired("--target");
|
|
782
804
|
const objectives = getAllArgs("--objective");
|
|
783
805
|
const pensarConfig = await appConfig.get();
|
|
@@ -827,10 +849,10 @@ POCs: ${pocsPath}`);
|
|
|
827
849
|
process.exit(0);
|
|
828
850
|
}
|
|
829
851
|
async function runThreatModel() {
|
|
830
|
-
const { config } = await import("./main-
|
|
852
|
+
const { config } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
|
|
831
853
|
config();
|
|
832
|
-
const { runThreatModelWorkflow } = await import("./threatModel-
|
|
833
|
-
const { config: appConfig } = await import("./index-
|
|
854
|
+
const { runThreatModelWorkflow } = await import("./threatModel-6tvhhzz7.js");
|
|
855
|
+
const { config: appConfig } = await import("./index-aexn8f1n.js");
|
|
834
856
|
const path2 = await import("path");
|
|
835
857
|
const pensarConfig = await appConfig.get();
|
|
836
858
|
const model = await resolveCliModel();
|
|
@@ -864,16 +886,16 @@ ${sep}
|
|
|
864
886
|
Threat model written to: ${resolvedPath}`);
|
|
865
887
|
}
|
|
866
888
|
async function runOperator() {
|
|
867
|
-
const { config } = await import("./main-
|
|
889
|
+
const { config } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
|
|
868
890
|
config();
|
|
869
|
-
const { runOffensiveSecurityAgent } = await import("./offesecAgent-
|
|
870
|
-
const { sessions: sessions2, normalizeMessages, getResumeMessages } = await import("./index-
|
|
871
|
-
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-
|
|
872
|
-
const { config: appConfig } = await import("./index-
|
|
891
|
+
const { runOffensiveSecurityAgent } = await import("./offesecAgent-jv32qfp0.js");
|
|
892
|
+
const { sessions: sessions2, normalizeMessages, getResumeMessages } = await import("./index-bkvtrkvs.js");
|
|
893
|
+
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-v14w25cq.js");
|
|
894
|
+
const { config: appConfig } = await import("./index-aexn8f1n.js");
|
|
873
895
|
const { createInterface } = await import("readline");
|
|
874
896
|
const { readFileSync: readFileSync2, existsSync } = await import("fs");
|
|
875
897
|
const path2 = await import("path");
|
|
876
|
-
const { stepCountIs } = await import("./index-
|
|
898
|
+
const { stepCountIs } = await import("./index-n1yh9e86.js");
|
|
877
899
|
const promptRaw = getArg("-p") ?? getArg("--prompt");
|
|
878
900
|
if (!promptRaw) {
|
|
879
901
|
console.error("Error: -p <prompt> is required");
|
|
@@ -983,35 +1005,35 @@ if (hasFlag("-p") || command === "--prompt") {
|
|
|
983
1005
|
await runTargetedPentest();
|
|
984
1006
|
} else if (command === "login" || command === "auth") {
|
|
985
1007
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
986
|
-
await import("./auth-
|
|
1008
|
+
await import("./auth-y8k6bahv.js");
|
|
987
1009
|
} else if (command === "uninstall") {
|
|
988
1010
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
989
|
-
await import("./uninstall-
|
|
1011
|
+
await import("./uninstall-npc3w8z7.js");
|
|
990
1012
|
} else if (command === "apps") {
|
|
991
1013
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
992
|
-
await import("./apps-
|
|
1014
|
+
await import("./apps-bak1k8v0.js");
|
|
993
1015
|
} else if (command === "pentests") {
|
|
994
1016
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
995
|
-
await import("./pentests-
|
|
1017
|
+
await import("./pentests-reen609m.js");
|
|
996
1018
|
} else if (command === "targets") {
|
|
997
1019
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
998
|
-
await import("./targets-
|
|
1020
|
+
await import("./targets-7y3e540x.js");
|
|
999
1021
|
} else if (command === "issues") {
|
|
1000
1022
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1001
|
-
await import("./issues-
|
|
1023
|
+
await import("./issues-4d6mh489.js");
|
|
1002
1024
|
} else if (command === "fixes") {
|
|
1003
1025
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1004
|
-
await import("./fixes-
|
|
1026
|
+
await import("./fixes-1gaxek7g.js");
|
|
1005
1027
|
} else if (command === "logs") {
|
|
1006
1028
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1007
|
-
await import("./logs-
|
|
1029
|
+
await import("./logs-x5wm4a2n.js");
|
|
1008
1030
|
} else if (command === "config") {
|
|
1009
1031
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1010
|
-
await import("./config-
|
|
1032
|
+
await import("./config-11y9yj23.js");
|
|
1011
1033
|
} else if (command === "threat-model") {
|
|
1012
1034
|
await runThreatModel();
|
|
1013
1035
|
} else if (command === "doctor") {
|
|
1014
|
-
const { runDoctor } = await import("./doctor-
|
|
1036
|
+
const { runDoctor } = await import("./doctor-fj9ekd87.js");
|
|
1015
1037
|
await runDoctor();
|
|
1016
1038
|
} else if (args.length === 0) {
|
|
1017
1039
|
if (process.env.PENSAR_NO_TUI === "1") {
|
|
@@ -1019,7 +1041,7 @@ if (hasFlag("-p") || command === "--prompt") {
|
|
|
1019
1041
|
console.error("All other commands work with Node \u2014 run 'pensar --help'.");
|
|
1020
1042
|
process.exit(1);
|
|
1021
1043
|
}
|
|
1022
|
-
await import("./index-
|
|
1044
|
+
await import("./index-jv8bb79d.js");
|
|
1023
1045
|
} else {
|
|
1024
1046
|
console.error(`Error: Unknown command '${command}'`);
|
|
1025
1047
|
console.error();
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
config,
|
|
13
13
|
init_config
|
|
14
|
-
} from "./cli-
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
14
|
+
} from "./cli-xbn0wpey.js";
|
|
15
|
+
import"./cli-zf4s30wk.js";
|
|
16
|
+
import"./cli-08gv62zx.js";
|
|
17
17
|
import"./cli-8rxa073f.js";
|
|
18
18
|
|
|
19
19
|
// src/cli/config.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toolExists
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
3
|
+
} from "./cli-j8gbfzaw.js";
|
|
4
|
+
import"./cli-twfafzdw.js";
|
|
5
|
+
import"./cli-c25w7dwp.js";
|
|
6
|
+
import"./cli-29yqhrjq.js";
|
|
7
7
|
import"./cli-gpnb45ck.js";
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
8
|
+
import"./cli-xbn0wpey.js";
|
|
9
|
+
import"./cli-zf4s30wk.js";
|
|
10
|
+
import"./cli-08gv62zx.js";
|
|
11
11
|
import"./cli-8rxa073f.js";
|
|
12
12
|
|
|
13
13
|
// src/core/doctor.ts
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getFix,
|
|
4
4
|
listFixes
|
|
5
|
-
} from "./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
5
|
+
} from "./cli-s31p2dd0.js";
|
|
6
|
+
import"./cli-tbtta1qx.js";
|
|
7
|
+
import"./cli-2r1wgr70.js";
|
|
8
|
+
import"./cli-gpbm6crd.js";
|
|
9
|
+
import"./cli-j89sg0bf.js";
|
|
10
|
+
import"./cli-s5d8z6v2.js";
|
|
11
|
+
import"./cli-4kk337yc.js";
|
|
12
12
|
import"./cli-9fsre5pt.js";
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
13
|
+
import"./cli-7r4v9hdr.js";
|
|
14
|
+
import"./cli-dqvnva4d.js";
|
|
15
|
+
import"./cli-j8gbfzaw.js";
|
|
16
16
|
import"./cli-fw5r7pfj.js";
|
|
17
17
|
import"./cli-c8131c4q.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
18
|
+
import"./cli-twfafzdw.js";
|
|
19
|
+
import"./cli-c25w7dwp.js";
|
|
20
|
+
import"./cli-29yqhrjq.js";
|
|
21
21
|
import"./cli-gpnb45ck.js";
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
22
|
+
import"./cli-xbn0wpey.js";
|
|
23
|
+
import"./cli-zf4s30wk.js";
|
|
24
|
+
import"./cli-08gv62zx.js";
|
|
25
25
|
import"./cli-8rxa073f.js";
|
|
26
26
|
|
|
27
27
|
// src/cli/fixes.ts
|
|
@@ -17,19 +17,19 @@ import {
|
|
|
17
17
|
update,
|
|
18
18
|
write,
|
|
19
19
|
writeRaw
|
|
20
|
-
} from "./cli-
|
|
21
|
-
import"./cli-
|
|
20
|
+
} from "./cli-twfafzdw.js";
|
|
21
|
+
import"./cli-c25w7dwp.js";
|
|
22
22
|
import {
|
|
23
23
|
init_zod,
|
|
24
24
|
zod_default
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-29yqhrjq.js";
|
|
26
26
|
import"./cli-gpnb45ck.js";
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-
|
|
27
|
+
import"./cli-xbn0wpey.js";
|
|
28
|
+
import"./cli-zf4s30wk.js";
|
|
29
29
|
import {
|
|
30
30
|
getCurrentVersion,
|
|
31
31
|
init_installation
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-08gv62zx.js";
|
|
33
33
|
import {
|
|
34
34
|
__require
|
|
35
35
|
} from "./cli-8rxa073f.js";
|
|
@@ -303,7 +303,7 @@ async function create(input) {
|
|
|
303
303
|
if (normalizedConfig?.headers !== undefined) {
|
|
304
304
|
snapshotHeaders = { ...normalizedConfig.headers };
|
|
305
305
|
} else {
|
|
306
|
-
const { config: appConfig } = await import("./index-
|
|
306
|
+
const { config: appConfig } = await import("./index-64xtwggx.js");
|
|
307
307
|
const cfg = await appConfig.get();
|
|
308
308
|
snapshotHeaders = cfg.defaultHeaders ? { ...cfg.defaultHeaders } : { ...DEFAULT_HEADER_RECORD };
|
|
309
309
|
}
|
|
@@ -7,21 +7,21 @@ import {
|
|
|
7
7
|
buildThreatModelPrompt,
|
|
8
8
|
createSkillsRegistry,
|
|
9
9
|
runOffensiveSecurityAgent
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-s31p2dd0.js";
|
|
11
11
|
import {
|
|
12
12
|
REPORT_FILENAME_MD,
|
|
13
13
|
convertModelMessagesToUI,
|
|
14
14
|
loadSubagents,
|
|
15
15
|
readExecutionMetrics,
|
|
16
16
|
writeExecutionMetrics
|
|
17
|
-
} from "./cli-
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
17
|
+
} from "./cli-tbtta1qx.js";
|
|
18
|
+
import"./cli-2r1wgr70.js";
|
|
19
|
+
import"./cli-gpbm6crd.js";
|
|
20
|
+
import"./cli-j89sg0bf.js";
|
|
21
|
+
import"./cli-s5d8z6v2.js";
|
|
22
|
+
import"./cli-4kk337yc.js";
|
|
23
23
|
import"./cli-9fsre5pt.js";
|
|
24
|
-
import"./cli-
|
|
24
|
+
import"./cli-7r4v9hdr.js";
|
|
25
25
|
import {
|
|
26
26
|
ALL_TOOL_NAMES,
|
|
27
27
|
ASK_USER_QUESTIONS_TOOL_NAME,
|
|
@@ -37,10 +37,10 @@ import {
|
|
|
37
37
|
hasPlan,
|
|
38
38
|
planFilePath,
|
|
39
39
|
readPlan
|
|
40
|
-
} from "./cli-
|
|
40
|
+
} from "./cli-dqvnva4d.js";
|
|
41
41
|
import {
|
|
42
42
|
detectOSAndEnhancePrompt
|
|
43
|
-
} from "./cli-
|
|
43
|
+
} from "./cli-j8gbfzaw.js";
|
|
44
44
|
import {
|
|
45
45
|
formatParseError,
|
|
46
46
|
parseHeaderLine
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
import {
|
|
57
57
|
createWeaveTracer,
|
|
58
58
|
resolveConfig
|
|
59
|
-
} from "./cli-
|
|
59
|
+
} from "./cli-tasyg3ks.js";
|
|
60
60
|
import {
|
|
61
61
|
AVAILABLE_PROVIDERS,
|
|
62
62
|
init_types
|
|
@@ -78,11 +78,12 @@ import {
|
|
|
78
78
|
modelSupportsThinking,
|
|
79
79
|
normalizeMessages,
|
|
80
80
|
read,
|
|
81
|
+
routeLogsToErrorFile,
|
|
81
82
|
sessions,
|
|
82
83
|
stepCountIs,
|
|
83
84
|
write,
|
|
84
85
|
writeErrorLog
|
|
85
|
-
} from "./cli-
|
|
86
|
+
} from "./cli-twfafzdw.js";
|
|
86
87
|
import {
|
|
87
88
|
disconnect,
|
|
88
89
|
fetchWorkspaces,
|
|
@@ -96,21 +97,21 @@ import {
|
|
|
96
97
|
selectWorkspace,
|
|
97
98
|
startDeviceFlow,
|
|
98
99
|
validateGateway
|
|
99
|
-
} from "./cli-
|
|
100
|
-
import"./cli-
|
|
100
|
+
} from "./cli-c25w7dwp.js";
|
|
101
|
+
import"./cli-29yqhrjq.js";
|
|
101
102
|
import"./cli-gpnb45ck.js";
|
|
102
103
|
import {
|
|
103
104
|
config,
|
|
104
105
|
init_config as init_config2
|
|
105
|
-
} from "./cli-
|
|
106
|
+
} from "./cli-xbn0wpey.js";
|
|
106
107
|
import {
|
|
107
108
|
init_config,
|
|
108
109
|
update
|
|
109
|
-
} from "./cli-
|
|
110
|
+
} from "./cli-zf4s30wk.js";
|
|
110
111
|
import {
|
|
111
112
|
checkForUpdate,
|
|
112
113
|
init_installation
|
|
113
|
-
} from "./cli-
|
|
114
|
+
} from "./cli-08gv62zx.js";
|
|
114
115
|
import {
|
|
115
116
|
__commonJS,
|
|
116
117
|
__esm,
|
|
@@ -69722,7 +69723,7 @@ function AppContent({
|
|
|
69722
69723
|
toast(`Update available: v${currentVersion} → v${latestVersion}. Run: pensar upgrade`, "warn", 8000);
|
|
69723
69724
|
});
|
|
69724
69725
|
const checkAuthToken = async () => {
|
|
69725
|
-
const { isTokenExpired, isConnected: isConnected2 } = await import("./index-
|
|
69726
|
+
const { isTokenExpired, isConnected: isConnected2 } = await import("./index-mx23ftn2.js");
|
|
69726
69727
|
if (isConnected2(config2.data) && config2.data.accessToken && isTokenExpired(config2.data.accessToken, 60) && !config2.data.refreshToken && !config2.data.pensarAPIKey) {
|
|
69727
69728
|
toast("Your Pensar Console session has expired. Run /login to refresh.", "warn", 8000);
|
|
69728
69729
|
}
|
|
@@ -70035,6 +70036,7 @@ function CommandDisplay({
|
|
|
70035
70036
|
return null;
|
|
70036
70037
|
}
|
|
70037
70038
|
async function main() {
|
|
70039
|
+
routeLogsToErrorFile();
|
|
70038
70040
|
const appConfig = await config.get();
|
|
70039
70041
|
registerBuiltinThemes();
|
|
70040
70042
|
const themeName = appConfig.theme ?? "apex";
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
signGatewayRequest,
|
|
13
13
|
startDeviceFlow,
|
|
14
14
|
validateGateway
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-
|
|
17
|
-
import"./cli-
|
|
18
|
-
import"./cli-
|
|
15
|
+
} from "./cli-c25w7dwp.js";
|
|
16
|
+
import"./cli-xbn0wpey.js";
|
|
17
|
+
import"./cli-zf4s30wk.js";
|
|
18
|
+
import"./cli-08gv62zx.js";
|
|
19
19
|
import"./cli-8rxa073f.js";
|
|
20
20
|
init_auth();
|
|
21
21
|
|