@pensar/apex 1.7.0 → 1.8.0-canary.1db2dac9
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-beywhvf3.js → agent-pzymaexc.js} +7 -7
- package/build/agent-rsvcxej9.js +19 -0
- package/build/{auth-wvh553ea.js → auth-z89eba1d.js} +4 -4
- package/build/{authentication-ec7trwb4.js → authentication-3tstyqna.js} +7 -7
- package/build/{blackboxAgent-ng2t2p2x.js → blackboxAgent-z5081b7k.js} +8 -8
- package/build/{blackboxPentest-rwyjy4kq.js → blackboxPentest-rkxe2mcn.js} +12 -12
- package/build/{cli-09prdch1.js → cli-0cgtn46q.js} +6 -6
- package/build/{cli-q2dty8g4.js → cli-1aswmqw0.js} +1 -1
- package/build/{cli-06zt0g1a.js → cli-3escpq81.js} +2 -2
- package/build/{cli-836bfgxg.js → cli-5d8gtwm9.js} +1 -1
- package/build/{cli-vvyq7ace.js → cli-6dzawz8t.js} +1 -1
- package/build/{cli-gr3zncst.js → cli-7zdq20ny.js} +1 -1
- package/build/{cli-x3k26g1t.js → cli-8e3jxvsa.js} +296 -181
- package/build/{cli-rc7hyq7e.js → cli-f55c0xh4.js} +92 -6
- package/build/{cli-5m0347h3.js → cli-h2geq3ft.js} +1 -1
- package/build/{cli-zr7sg2m2.js → cli-mnx6v52y.js} +2 -2
- package/build/{cli-r879p2yz.js → cli-mqp1725p.js} +1 -1
- package/build/{cli-xtqm11qt.js → cli-p8zdr5yc.js} +1 -1
- package/build/{cli-nqx9y9ds.js → cli-zhs8z3ay.js} +1 -1
- package/build/{cli-40ef01tb.js → cli-zvjf2zxh.js} +1 -1
- package/build/cli.js +50 -41
- package/build/{fixes-1z283wdz.js → fixes-073psn8y.js} +4 -4
- package/build/{index-j3hw6d4w.js → index-16m6v082.js} +133 -100
- package/build/{index-1p5bg26t.js → index-f6w6vdtj.js} +4 -4
- package/build/{index-py7gtxez.js → index-mn8a1ej3.js} +2 -2
- package/build/{index-a4ydz3dd.js → index-x7nnxbgg.js} +7 -7
- package/build/{index-5a173a2k.js → index-z2v0ck06.js} +6 -6
- package/build/{issues-trbzy8n0.js → issues-p52tvm5m.js} +4 -4
- package/build/{logs-c88md0h3.js → logs-v8sxy4aj.js} +4 -4
- package/build/{offesecAgent-ahcz5hcx.js → offesecAgent-a5vgdg3p.js} +7 -7
- package/build/{pentest-4932ke3a.js → pentest-277h4psc.js} +12 -12
- package/build/{pentests-re8dzxt9.js → pentests-wc7jv4w7.js} +4 -4
- package/build/{projects-dqp4m0ws.js → projects-wc1q31pd.js} +4 -4
- package/build/{targetedPentest-de8a67va.js → targetedPentest-x52as9qn.js} +8 -8
- package/build/{threatModel-waz866yk.js → threatModel-86tctt66.js} +8 -8
- package/build/{uninstall-0bwz7jdn.js → uninstall-7qq038qw.js} +1 -1
- package/package.json +1 -1
- package/build/agent-63cc9rpx.js +0 -19
|
@@ -71,12 +71,12 @@ import {
|
|
|
71
71
|
} from "./cli-0ghkg3w6.js";
|
|
72
72
|
import {
|
|
73
73
|
signGatewayRequest
|
|
74
|
-
} from "./cli-
|
|
74
|
+
} from "./cli-p8zdr5yc.js";
|
|
75
75
|
import {
|
|
76
76
|
config,
|
|
77
77
|
ensureValidToken,
|
|
78
78
|
getPensarGatewayUrl
|
|
79
|
-
} from "./cli-
|
|
79
|
+
} from "./cli-1aswmqw0.js";
|
|
80
80
|
import {
|
|
81
81
|
getModelInfo,
|
|
82
82
|
init_models
|
|
@@ -34884,15 +34884,86 @@ function checkIfRateLimitError(error) {
|
|
|
34884
34884
|
return errorMessage.includes("too many tokens") || errorMessage.includes("rate limit") || errorMessage.includes("request rate") || errorMessage.includes("throttl") || errorMessage.includes("overloaded") || errorMessage.includes("too many requests") || errorMessage.includes("please wait") || errorMessage.includes("service unavailable") || errorName.includes("throttl") || errorName.includes("toomanyrequests") || errorName.includes("serviceunavailable") || errorCode === "rate_limit_exceeded" || errorCode === "throttling" || errorCode === "429" || httpStatus === 429 || httpStatus === 529 || httpStatus === 503 || errorString.includes("throttl") || errorString.includes("too many") || errorString.includes("request rate");
|
|
34885
34885
|
}
|
|
34886
34886
|
var MAX_RATE_LIMIT_RETRIES = 20;
|
|
34887
|
-
|
|
34887
|
+
var MAX_IDLE_RESUME_RETRIES = 3;
|
|
34888
|
+
var STREAM_IDLE_TIMEOUT_MS = 5 * 60 * 1000;
|
|
34889
|
+
|
|
34890
|
+
class StreamIdleTimeoutError extends Error {
|
|
34891
|
+
constructor(idleMs) {
|
|
34892
|
+
super(`Stream idle for ${Math.round(idleMs / 1000)}s — no chunks received`);
|
|
34893
|
+
this.name = "StreamIdleTimeoutError";
|
|
34894
|
+
}
|
|
34895
|
+
}
|
|
34896
|
+
async function* withIdleTimeout(stream, idleMs, isIdleTimerActive) {
|
|
34897
|
+
const iterator = stream[Symbol.asyncIterator]();
|
|
34898
|
+
try {
|
|
34899
|
+
while (true) {
|
|
34900
|
+
const timerActive = isIdleTimerActive?.() ?? true;
|
|
34901
|
+
let result;
|
|
34902
|
+
if (timerActive) {
|
|
34903
|
+
let timer;
|
|
34904
|
+
result = await Promise.race([
|
|
34905
|
+
iterator.next(),
|
|
34906
|
+
new Promise((_, reject) => {
|
|
34907
|
+
timer = setTimeout(() => reject(new StreamIdleTimeoutError(idleMs)), idleMs);
|
|
34908
|
+
if (typeof timer === "object" && "unref" in timer)
|
|
34909
|
+
timer.unref();
|
|
34910
|
+
})
|
|
34911
|
+
]);
|
|
34912
|
+
clearTimeout(timer);
|
|
34913
|
+
} else {
|
|
34914
|
+
result = await iterator.next();
|
|
34915
|
+
}
|
|
34916
|
+
if (result.done)
|
|
34917
|
+
return;
|
|
34918
|
+
yield result.value;
|
|
34919
|
+
}
|
|
34920
|
+
} finally {
|
|
34921
|
+
iterator.return?.()?.catch?.(() => {});
|
|
34922
|
+
}
|
|
34923
|
+
}
|
|
34924
|
+
function isStreamIdleTimeoutError(error) {
|
|
34925
|
+
return error instanceof StreamIdleTimeoutError;
|
|
34926
|
+
}
|
|
34927
|
+
function createToolExecutionGate() {
|
|
34928
|
+
let inFlight = 0;
|
|
34929
|
+
const open = new Set;
|
|
34930
|
+
return {
|
|
34931
|
+
shouldEnforceIdleTimeout: () => inFlight === 0,
|
|
34932
|
+
observe: (chunk) => {
|
|
34933
|
+
if (chunk.type === "tool-call") {
|
|
34934
|
+
const id = chunk.toolCallId;
|
|
34935
|
+
if (id) {
|
|
34936
|
+
if (!open.has(id)) {
|
|
34937
|
+
open.add(id);
|
|
34938
|
+
inFlight++;
|
|
34939
|
+
}
|
|
34940
|
+
} else {
|
|
34941
|
+
inFlight++;
|
|
34942
|
+
}
|
|
34943
|
+
} else if (chunk.type === "tool-result") {
|
|
34944
|
+
const id = chunk.toolCallId;
|
|
34945
|
+
if (id) {
|
|
34946
|
+
if (open.delete(id)) {
|
|
34947
|
+
inFlight = Math.max(0, inFlight - 1);
|
|
34948
|
+
}
|
|
34949
|
+
} else {
|
|
34950
|
+
inFlight = Math.max(0, inFlight - 1);
|
|
34951
|
+
}
|
|
34952
|
+
}
|
|
34953
|
+
}
|
|
34954
|
+
};
|
|
34955
|
+
}
|
|
34956
|
+
function wrapStreamWithErrorHandler(originalStream, messagesContainer, opts, model, silent, rateLimitRetryCount = 0, idleResumeCount = 0) {
|
|
34888
34957
|
let wrappedStream = null;
|
|
34889
34958
|
const handler = {
|
|
34890
34959
|
get(target, prop) {
|
|
34891
34960
|
if (prop === "fullStream") {
|
|
34892
34961
|
if (!wrappedStream) {
|
|
34962
|
+
const toolGate = createToolExecutionGate();
|
|
34893
34963
|
wrappedStream = async function* () {
|
|
34894
34964
|
try {
|
|
34895
|
-
for await (const chunk of originalStream.fullStream) {
|
|
34965
|
+
for await (const chunk of withIdleTimeout(originalStream.fullStream, STREAM_IDLE_TIMEOUT_MS, toolGate.shouldEnforceIdleTimeout)) {
|
|
34966
|
+
toolGate.observe(chunk);
|
|
34896
34967
|
if (chunk.type === "error") {
|
|
34897
34968
|
throw chunk.error;
|
|
34898
34969
|
}
|
|
@@ -34901,6 +34972,21 @@ function wrapStreamWithErrorHandler(originalStream, messagesContainer, opts, mod
|
|
|
34901
34972
|
} catch (error) {
|
|
34902
34973
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
34903
34974
|
const isCtxError = checkIfContextLengthError(error);
|
|
34975
|
+
if (!isCtxError && isStreamIdleTimeoutError(error) && idleResumeCount < MAX_IDLE_RESUME_RETRIES && messagesContainer.current.length > 0) {
|
|
34976
|
+
const nextIdleCount = idleResumeCount + 1;
|
|
34977
|
+
if (!silent) {
|
|
34978
|
+
console.warn(`Stream stalled (attempt ${nextIdleCount}/${MAX_IDLE_RESUME_RETRIES}), resuming with ${messagesContainer.current.length} messages: ${errorMessage}`);
|
|
34979
|
+
}
|
|
34980
|
+
const retriedStream = streamResponse({
|
|
34981
|
+
...opts,
|
|
34982
|
+
messages: messagesContainer.current
|
|
34983
|
+
});
|
|
34984
|
+
const wrappedRetriedStream = wrapStreamWithErrorHandler(retriedStream, messagesContainer, opts, model, silent, rateLimitRetryCount, nextIdleCount);
|
|
34985
|
+
for await (const chunk of wrappedRetriedStream.fullStream) {
|
|
34986
|
+
yield chunk;
|
|
34987
|
+
}
|
|
34988
|
+
return;
|
|
34989
|
+
}
|
|
34904
34990
|
if (!isCtxError && checkIfRateLimitError(error) && rateLimitRetryCount < MAX_RATE_LIMIT_RETRIES) {
|
|
34905
34991
|
const nextRetryCount = rateLimitRetryCount + 1;
|
|
34906
34992
|
const delayMs = Math.min(1000 * nextRetryCount, 30000);
|
|
@@ -34912,7 +34998,7 @@ function wrapStreamWithErrorHandler(originalStream, messagesContainer, opts, mod
|
|
|
34912
34998
|
...opts,
|
|
34913
34999
|
messages: messagesContainer.current.length > 0 ? messagesContainer.current : undefined
|
|
34914
35000
|
});
|
|
34915
|
-
const wrappedRetriedStream = wrapStreamWithErrorHandler(retriedStream, messagesContainer, opts, model, silent, nextRetryCount);
|
|
35001
|
+
const wrappedRetriedStream = wrapStreamWithErrorHandler(retriedStream, messagesContainer, opts, model, silent, nextRetryCount, idleResumeCount);
|
|
34916
35002
|
for await (const chunk of wrappedRetriedStream.fullStream) {
|
|
34917
35003
|
yield chunk;
|
|
34918
35004
|
}
|
|
@@ -34940,7 +35026,7 @@ function wrapStreamWithErrorHandler(originalStream, messagesContainer, opts, mod
|
|
|
34940
35026
|
...opts,
|
|
34941
35027
|
messages: compacted
|
|
34942
35028
|
});
|
|
34943
|
-
const wrappedRetry = wrapStreamWithErrorHandler(retried, messagesContainer, opts, model, silent, rateLimitRetryCount);
|
|
35029
|
+
const wrappedRetry = wrapStreamWithErrorHandler(retried, messagesContainer, opts, model, silent, rateLimitRetryCount, idleResumeCount);
|
|
34944
35030
|
for await (const chunk of wrappedRetry.fullStream) {
|
|
34945
35031
|
yield chunk;
|
|
34946
35032
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-8e3jxvsa.js";
|
|
4
4
|
import {
|
|
5
5
|
stepCountIs
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-f55c0xh4.js";
|
|
7
7
|
|
|
8
8
|
// src/core/agents/specialized/codeAgent/prompts.ts
|
|
9
9
|
var CODE_AGENT_SYSTEM_PROMPT = `You are an expert coding agent with direct filesystem access. You will be given a specific objective — focus exclusively on completing it.
|
|
@@ -3,7 +3,7 @@ import { spawnSync } from "child_process";
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@pensar/apex",
|
|
6
|
-
version: "1.
|
|
6
|
+
version: "1.8.0-canary.1db2dac9",
|
|
7
7
|
description: "AI-powered penetration testing CLI tool with terminal UI",
|
|
8
8
|
module: "src/tui/index.tsx",
|
|
9
9
|
main: "build/cli.js",
|
package/build/cli.js
CHANGED
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
import"./cli-3y0dgy56.js";
|
|
7
7
|
import {
|
|
8
8
|
init_toolset
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-f55c0xh4.js";
|
|
10
10
|
import"./cli-0ghkg3w6.js";
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
import"./cli-p8zdr5yc.js";
|
|
12
|
+
import"./cli-1aswmqw0.js";
|
|
13
13
|
import"./cli-gpnb45ck.js";
|
|
14
|
-
import"./cli-
|
|
14
|
+
import"./cli-zvjf2zxh.js";
|
|
15
15
|
import {
|
|
16
16
|
package_default
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-mqp1725p.js";
|
|
18
18
|
import {
|
|
19
19
|
init_models
|
|
20
20
|
} from "./cli-03z6pswp.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
// package.json
|
|
26
26
|
var package_default2 = {
|
|
27
27
|
name: "@pensar/apex",
|
|
28
|
-
version: "1.
|
|
28
|
+
version: "1.8.0-canary.1db2dac9",
|
|
29
29
|
description: "AI-powered penetration testing CLI tool with terminal UI",
|
|
30
30
|
module: "src/tui/index.tsx",
|
|
31
31
|
main: "build/cli.js",
|
|
@@ -311,18 +311,23 @@ function resolvePentestMode(mode) {
|
|
|
311
311
|
|
|
312
312
|
// src/core/eventBus.ts
|
|
313
313
|
import { EventEmitter } from "events";
|
|
314
|
-
var
|
|
315
|
-
"text-delta",
|
|
316
|
-
"tool-call-start",
|
|
317
|
-
"tool-call-delta",
|
|
318
|
-
"tool-call-complete",
|
|
319
|
-
"tool-result",
|
|
320
|
-
"subagent-spawn",
|
|
321
|
-
"subagent-complete",
|
|
322
|
-
"
|
|
323
|
-
"
|
|
324
|
-
"
|
|
325
|
-
|
|
314
|
+
var CHILD_BUS_FORWARD_POLICY = {
|
|
315
|
+
"text-delta": "forward",
|
|
316
|
+
"tool-call-start": "forward",
|
|
317
|
+
"tool-call-delta": "forward",
|
|
318
|
+
"tool-call-complete": "forward",
|
|
319
|
+
"tool-result": "forward",
|
|
320
|
+
"subagent-spawn": "forward",
|
|
321
|
+
"subagent-complete": "forward",
|
|
322
|
+
"step-finish": "forward",
|
|
323
|
+
"command-output": "forward",
|
|
324
|
+
error: "forward",
|
|
325
|
+
"trace-record": "forward",
|
|
326
|
+
"workflow-phase-start": "parent-only",
|
|
327
|
+
"workflow-phase-complete": "parent-only",
|
|
328
|
+
"app-analysis-progress": "parent-only"
|
|
329
|
+
};
|
|
330
|
+
var CHILD_BUS_FORWARDED_EVENTS = Object.keys(CHILD_BUS_FORWARD_POLICY).filter((key) => CHILD_BUS_FORWARD_POLICY[key] === "forward");
|
|
326
331
|
|
|
327
332
|
class AgentEventBus {
|
|
328
333
|
emitter = new EventEmitter;
|
|
@@ -353,10 +358,10 @@ class AgentEventBus {
|
|
|
353
358
|
return this;
|
|
354
359
|
}
|
|
355
360
|
static attachChild(child, parent, subagentId) {
|
|
361
|
+
if (!parent)
|
|
362
|
+
return;
|
|
356
363
|
for (const key of CHILD_BUS_FORWARDED_EVENTS) {
|
|
357
364
|
child.on(key, (payload) => {
|
|
358
|
-
if (!parent)
|
|
359
|
-
return;
|
|
360
365
|
const p = payload;
|
|
361
366
|
if (!p.subagentId) {
|
|
362
367
|
parent.emit(key, { ...p, subagentId });
|
|
@@ -500,7 +505,7 @@ async function resolveCliModel() {
|
|
|
500
505
|
const explicit = getArg("--model");
|
|
501
506
|
if (explicit)
|
|
502
507
|
return explicit;
|
|
503
|
-
const { config: appConfig } = await import("./index-
|
|
508
|
+
const { config: appConfig } = await import("./index-mn8a1ej3.js");
|
|
504
509
|
const { getDefaultModelForConfig } = await import("./utils-jf52rmrb.js");
|
|
505
510
|
const pensarConfig = await appConfig.get();
|
|
506
511
|
const defaultModel = getDefaultModelForConfig(pensarConfig);
|
|
@@ -539,6 +544,7 @@ Usage:
|
|
|
539
544
|
|
|
540
545
|
operator options (-p):
|
|
541
546
|
-p, --prompt <text|@file> (required) Prompt for the operator agent
|
|
547
|
+
-s, --system <text|@file> Override the default system prompt
|
|
542
548
|
--target <url> Target URL / domain / IP
|
|
543
549
|
--model <model> AI model (default: auto-selected from configured provider)
|
|
544
550
|
|
|
@@ -572,9 +578,9 @@ Global options:
|
|
|
572
578
|
async function runPentest() {
|
|
573
579
|
const { config: config2 } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
|
|
574
580
|
config2();
|
|
575
|
-
const { runPentestAgent } = await import("./blackboxPentest-
|
|
576
|
-
const { sessions } = await import("./index-
|
|
577
|
-
const { config: appConfig } = await import("./index-
|
|
581
|
+
const { runPentestAgent } = await import("./blackboxPentest-rkxe2mcn.js");
|
|
582
|
+
const { sessions } = await import("./index-z2v0ck06.js");
|
|
583
|
+
const { config: appConfig } = await import("./index-mn8a1ej3.js");
|
|
578
584
|
const target = getArgRequired("--target");
|
|
579
585
|
const cwd = getArg("--cwd");
|
|
580
586
|
const mode = getArg("--mode");
|
|
@@ -638,9 +644,9 @@ Report: ${reportPath}` : ""}`);
|
|
|
638
644
|
async function runTargetedPentest() {
|
|
639
645
|
const { config: config2 } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
|
|
640
646
|
config2();
|
|
641
|
-
const { runTargetedPentestAgent } = await import("./targetedPentest-
|
|
642
|
-
const { sessions } = await import("./index-
|
|
643
|
-
const { config: appConfig } = await import("./index-
|
|
647
|
+
const { runTargetedPentestAgent } = await import("./targetedPentest-x52as9qn.js");
|
|
648
|
+
const { sessions } = await import("./index-z2v0ck06.js");
|
|
649
|
+
const { config: appConfig } = await import("./index-mn8a1ej3.js");
|
|
644
650
|
const target = getArgRequired("--target");
|
|
645
651
|
const objectives = getAllArgs("--objective");
|
|
646
652
|
const pensarConfig = await appConfig.get();
|
|
@@ -688,8 +694,8 @@ POCs: ${pocsPath}`);
|
|
|
688
694
|
async function runThreatModel() {
|
|
689
695
|
const { config: config2 } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
|
|
690
696
|
config2();
|
|
691
|
-
const { runThreatModelWorkflow } = await import("./threatModel-
|
|
692
|
-
const { config: appConfig } = await import("./index-
|
|
697
|
+
const { runThreatModelWorkflow } = await import("./threatModel-86tctt66.js");
|
|
698
|
+
const { config: appConfig } = await import("./index-mn8a1ej3.js");
|
|
693
699
|
const path = await import("path");
|
|
694
700
|
const pensarConfig = await appConfig.get();
|
|
695
701
|
const model = await resolveCliModel();
|
|
@@ -725,10 +731,10 @@ Threat model written to: ${resolvedPath}`);
|
|
|
725
731
|
async function runOperator() {
|
|
726
732
|
const { config: config2 } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
|
|
727
733
|
config2();
|
|
728
|
-
const { runOffensiveSecurityAgent } = await import("./offesecAgent-
|
|
729
|
-
const { sessions, normalizeMessages, getResumeMessages } = await import("./index-
|
|
730
|
-
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-
|
|
731
|
-
const { config: appConfig } = await import("./index-
|
|
734
|
+
const { runOffensiveSecurityAgent } = await import("./offesecAgent-a5vgdg3p.js");
|
|
735
|
+
const { sessions, normalizeMessages, getResumeMessages } = await import("./index-z2v0ck06.js");
|
|
736
|
+
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-x7nnxbgg.js");
|
|
737
|
+
const { config: appConfig } = await import("./index-mn8a1ej3.js");
|
|
732
738
|
const { createInterface } = await import("readline");
|
|
733
739
|
const { readFileSync: readFileSync2, existsSync } = await import("fs");
|
|
734
740
|
const path = await import("path");
|
|
@@ -739,6 +745,8 @@ async function runOperator() {
|
|
|
739
745
|
process.exit(1);
|
|
740
746
|
}
|
|
741
747
|
const prompt = resolveFlagValue(promptRaw);
|
|
748
|
+
const systemRaw = getArg("-s") ?? getArg("--system");
|
|
749
|
+
const systemPrompt = systemRaw ? resolveFlagValue(systemRaw) : undefined;
|
|
742
750
|
const target = getArg("--target");
|
|
743
751
|
const pensarConfig = await appConfig.get();
|
|
744
752
|
const model = await resolveCliModel();
|
|
@@ -783,6 +791,7 @@ ${sep}
|
|
|
783
791
|
for (;; ) {
|
|
784
792
|
await runOffensiveSecurityAgent({
|
|
785
793
|
prompt: currentPrompt,
|
|
794
|
+
...systemPrompt ? { system: systemPrompt } : {},
|
|
786
795
|
model,
|
|
787
796
|
target,
|
|
788
797
|
activeTools: [...ALL_TOOL_NAMES, ...SKILL_TOOL_NAMES],
|
|
@@ -837,25 +846,25 @@ if (hasFlag("-p") || command === "--prompt") {
|
|
|
837
846
|
await runTargetedPentest();
|
|
838
847
|
} else if (command === "login" || command === "auth") {
|
|
839
848
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
840
|
-
await import("./auth-
|
|
849
|
+
await import("./auth-z89eba1d.js");
|
|
841
850
|
} else if (command === "uninstall") {
|
|
842
851
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
843
|
-
await import("./uninstall-
|
|
852
|
+
await import("./uninstall-7qq038qw.js");
|
|
844
853
|
} else if (command === "projects") {
|
|
845
854
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
846
|
-
await import("./projects-
|
|
855
|
+
await import("./projects-wc1q31pd.js");
|
|
847
856
|
} else if (command === "pentests") {
|
|
848
857
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
849
|
-
await import("./pentests-
|
|
858
|
+
await import("./pentests-wc7jv4w7.js");
|
|
850
859
|
} else if (command === "issues") {
|
|
851
860
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
852
|
-
await import("./issues-
|
|
861
|
+
await import("./issues-p52tvm5m.js");
|
|
853
862
|
} else if (command === "fixes") {
|
|
854
863
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
855
|
-
await import("./fixes-
|
|
864
|
+
await import("./fixes-073psn8y.js");
|
|
856
865
|
} else if (command === "logs") {
|
|
857
866
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
858
|
-
await import("./logs-
|
|
867
|
+
await import("./logs-v8sxy4aj.js");
|
|
859
868
|
} else if (command === "threat-model") {
|
|
860
869
|
await runThreatModel();
|
|
861
870
|
} else if (command === "doctor") {
|
|
@@ -867,7 +876,7 @@ if (hasFlag("-p") || command === "--prompt") {
|
|
|
867
876
|
console.error("All other commands work with Node \u2014 run 'pensar --help'.");
|
|
868
877
|
process.exit(1);
|
|
869
878
|
}
|
|
870
|
-
await import("./index-
|
|
879
|
+
await import("./index-16m6v082.js");
|
|
871
880
|
} else {
|
|
872
881
|
console.error(`Error: Unknown command '${command}'`);
|
|
873
882
|
console.error();
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getFix,
|
|
4
4
|
listFixes
|
|
5
|
-
} from "./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
5
|
+
} from "./cli-6dzawz8t.js";
|
|
6
|
+
import"./cli-1aswmqw0.js";
|
|
7
|
+
import"./cli-zvjf2zxh.js";
|
|
8
|
+
import"./cli-mqp1725p.js";
|
|
9
9
|
import"./cli-8rxa073f.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/fixes.ts
|