@pensar/apex 2.0.0-canary.241920ad → 2.0.0
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/README.md +0 -20
- package/build/agent-84enr6xn.js +22 -0
- package/build/{agent-7866ka7b.js → agent-x1tnsg7n.js} +10 -7
- package/build/{agent-aj7jpehp.js → agent-z8043nrm.js} +12 -9
- package/build/{apps-hse35c2d.js → apps-gdze0s68.js} +18 -15
- package/build/{auth-15rkvgam.js → auth-24ca1qwx.js} +19 -16
- package/build/authentication-0k43jay4.js +22 -0
- package/build/blackboxAgent-76tnwwg7.js +22 -0
- package/build/{blackboxPentest-vmtnnp5d.js → blackboxPentest-xwc031xm.js} +16 -13
- package/build/{cli-23xtyah8.js → cli-0v9x0eby.js} +1 -1
- package/build/cli-1yavz2pb.js +17 -0
- package/build/{cli-6gge86w5.js → cli-31cara07.js} +6 -8
- package/build/cli-3knnkdps.js +666 -0
- package/build/{cli-cbw2rmv7.js → cli-5fr9k6m4.js} +35 -58
- package/build/{cli-78s9w64j.js → cli-948dk60p.js} +1 -1
- package/build/{cli-k1vsv3qh.js → cli-a20jcpmp.js} +1 -1
- package/build/{cli-0svsmc2c.js → cli-cb5va0cs.js} +1 -10
- package/build/{cli-rtbry75t.js → cli-h6nw89zf.js} +1 -1
- package/build/{cli-5h1kv0v4.js → cli-h825qzmd.js} +53 -1492
- package/build/{cli-gtepvg8s.js → cli-k8mvghe1.js} +921 -444
- package/build/{cli-4dpc999m.js → cli-mswm4k81.js} +1 -11
- package/build/{cli-zyk3xsth.js → cli-ntd42071.js} +1 -1
- package/build/{cli-mb837pv4.js → cli-pkdjamer.js} +5 -15
- package/build/cli-s1nckt4k.js +20 -0
- package/build/{cli-4ez6yssj.js → cli-sw5swz40.js} +3 -3
- package/build/{cli-ft17f9nh.js → cli-wdmqkshz.js} +2 -2
- package/build/{cli-demg7sj2.js → cli-zpvmaxem.js} +2 -2
- package/build/{cli-r0s5br0a.js → cli-zvq4gy61.js} +6 -13
- package/build/cli.js +45 -105
- package/build/{config-bb6q79q0.js → config-cmq1cxz3.js} +3 -3
- package/build/{doctor-tkz0a0g4.js → doctor-2bkpddws.js} +1 -8
- package/build/{fixes-krvbkbey.js → fixes-a4qscvkx.js} +18 -15
- package/build/{index-pamhzcx3.js → index-0fnbx38r.js} +14 -20
- package/build/{index-ah3cm7hf.js → index-2a1x5nnv.js} +3 -3
- package/build/{index-v4sz6cee.js → index-48pjf9d2.js} +124 -76
- package/build/{index-tknvj68q.js → index-54ep0ery.js} +12 -9
- package/build/{index-wsp4kqtm.js → index-aymt8k9w.js} +2 -2
- package/build/{index-a9ea9c1q.js → index-hfhkjj2g.js} +11 -8
- package/build/{index-4gk224ac.js → index-s17r2akv.js} +4 -4
- package/build/{issues-m2me70rs.js → issues-5pnrspt7.js} +18 -15
- package/build/{logs-rxf1a0be.js → logs-1mfm901x.js} +18 -15
- package/build/{offesecAgent-hmxcpch7.js → offesecAgent-mrbyc93d.js} +11 -8
- package/build/pentest-wy4eeagc.js +31 -0
- package/build/{pentests-201vfsn6.js → pentests-htmtq66d.js} +18 -15
- package/build/{targetedPentest-85b1dndy.js → targetedPentest-cpbd87rc.js} +12 -9
- package/build/threatModel-9n56z6a6.js +29 -0
- package/build/{uninstall-qa8jvrj1.js → uninstall-6y9dkgyt.js} +1 -1
- package/build/{upload-p58nxxvf.js → upload-7wtbr768.js} +1 -8
- package/build/{utils-hsde107p.js → utils-trqnyj77.js} +8 -6
- package/package.json +1 -1
- package/build/agent-mjyx1amj.js +0 -19
- package/build/authentication-b8p1afqq.js +0 -19
- package/build/blackboxAgent-z1h2cgyg.js +0 -19
- package/build/pentest-r6hfzf8n.js +0 -28
- package/build/threatModel-hbpz15y7.js +0 -26
|
@@ -7,21 +7,21 @@ import {
|
|
|
7
7
|
buildThreatModelPrompt,
|
|
8
8
|
createSkillsRegistry,
|
|
9
9
|
runOffensiveSecurityAgent
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-31cara07.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-5fr9k6m4.js";
|
|
18
|
+
import"./cli-sw5swz40.js";
|
|
19
|
+
import"./cli-cb5va0cs.js";
|
|
20
|
+
import"./cli-zvq4gy61.js";
|
|
21
|
+
import"./cli-zpvmaxem.js";
|
|
22
|
+
import"./cli-wdmqkshz.js";
|
|
23
23
|
import"./cli-9fsre5pt.js";
|
|
24
|
-
import"./cli-
|
|
24
|
+
import"./cli-ntd42071.js";
|
|
25
25
|
import {
|
|
26
26
|
ALL_TOOL_NAMES,
|
|
27
27
|
ASK_USER_QUESTIONS_TOOL_NAME,
|
|
@@ -35,12 +35,19 @@ import {
|
|
|
35
35
|
buildBaseSystemPrompt,
|
|
36
36
|
createInitialOperatorState,
|
|
37
37
|
hasPlan,
|
|
38
|
+
list,
|
|
39
|
+
normalizeMessages,
|
|
38
40
|
planFilePath,
|
|
39
|
-
readPlan
|
|
40
|
-
|
|
41
|
+
readPlan,
|
|
42
|
+
sessions
|
|
43
|
+
} from "./cli-k8mvghe1.js";
|
|
41
44
|
import {
|
|
42
45
|
detectOSAndEnhancePrompt
|
|
43
|
-
} from "./cli-
|
|
46
|
+
} from "./cli-mswm4k81.js";
|
|
47
|
+
import {
|
|
48
|
+
read,
|
|
49
|
+
write
|
|
50
|
+
} from "./cli-3knnkdps.js";
|
|
44
51
|
import {
|
|
45
52
|
formatParseError,
|
|
46
53
|
parseHeaderLine
|
|
@@ -53,36 +60,31 @@ import {
|
|
|
53
60
|
getAutoPopulatedPorts,
|
|
54
61
|
parseTargetUrl
|
|
55
62
|
} from "./cli-c8131c4q.js";
|
|
63
|
+
import {
|
|
64
|
+
init_toolset
|
|
65
|
+
} from "./cli-s1nckt4k.js";
|
|
56
66
|
import {
|
|
57
67
|
createWeaveTracer,
|
|
58
68
|
resolveConfig
|
|
59
|
-
} from "./cli-
|
|
69
|
+
} from "./cli-pkdjamer.js";
|
|
60
70
|
import {
|
|
61
71
|
AVAILABLE_PROVIDERS,
|
|
62
72
|
init_types
|
|
63
73
|
} from "./cli-yz80qkzn.js";
|
|
74
|
+
import {
|
|
75
|
+
init_ai
|
|
76
|
+
} from "./cli-1yavz2pb.js";
|
|
64
77
|
import {
|
|
65
78
|
AVAILABLE_MODELS,
|
|
66
79
|
DEFAULT_OPENAI_REASONING_EFFORT,
|
|
67
80
|
buildAuthConfig,
|
|
68
81
|
getOpenAIReasoningEfforts,
|
|
69
82
|
hasToolCall,
|
|
70
|
-
init_ai,
|
|
71
83
|
init_dist,
|
|
72
|
-
init_logger,
|
|
73
|
-
init_session,
|
|
74
|
-
init_storage,
|
|
75
|
-
init_toolset,
|
|
76
|
-
list1 as list,
|
|
77
84
|
modelSupportsOpenAIReasoning,
|
|
78
85
|
modelSupportsThinking,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
sessions,
|
|
82
|
-
stepCountIs,
|
|
83
|
-
write,
|
|
84
|
-
writeErrorLog
|
|
85
|
-
} from "./cli-5h1kv0v4.js";
|
|
86
|
+
stepCountIs
|
|
87
|
+
} from "./cli-h825qzmd.js";
|
|
86
88
|
import {
|
|
87
89
|
disconnect,
|
|
88
90
|
fetchWorkspaces,
|
|
@@ -96,21 +98,21 @@ import {
|
|
|
96
98
|
selectWorkspace,
|
|
97
99
|
startDeviceFlow,
|
|
98
100
|
validateGateway
|
|
99
|
-
} from "./cli-
|
|
101
|
+
} from "./cli-948dk60p.js";
|
|
100
102
|
import"./cli-e6rgwtpb.js";
|
|
101
|
-
import"./cli-gpnb45ck.js";
|
|
102
103
|
import {
|
|
103
104
|
config,
|
|
104
105
|
init_config as init_config2
|
|
105
|
-
} from "./cli-
|
|
106
|
+
} from "./cli-h6nw89zf.js";
|
|
107
|
+
import"./cli-gpnb45ck.js";
|
|
106
108
|
import {
|
|
107
109
|
init_config,
|
|
108
110
|
update
|
|
109
|
-
} from "./cli-
|
|
111
|
+
} from "./cli-0v9x0eby.js";
|
|
110
112
|
import {
|
|
111
113
|
checkForUpdate,
|
|
112
114
|
init_installation
|
|
113
|
-
} from "./cli-
|
|
115
|
+
} from "./cli-a20jcpmp.js";
|
|
114
116
|
import {
|
|
115
117
|
__commonJS,
|
|
116
118
|
__esm,
|
|
@@ -49364,11 +49366,67 @@ var require_lib = __commonJS((exports, module) => {
|
|
|
49364
49366
|
// src/tui/index.tsx
|
|
49365
49367
|
init_config2();
|
|
49366
49368
|
init_installation();
|
|
49367
|
-
init_logger();
|
|
49368
49369
|
import { createCliRenderer, FrameBufferRenderable, RGBA as RGBA25 } from "@opentui/core";
|
|
49369
49370
|
import { createRoot, extend } from "@opentui/react";
|
|
49370
49371
|
import { useEffect as useEffect27, useState as useState39 } from "react";
|
|
49371
49372
|
|
|
49373
|
+
// src/core/logger/index.ts
|
|
49374
|
+
import {
|
|
49375
|
+
appendFileSync,
|
|
49376
|
+
existsSync,
|
|
49377
|
+
mkdirSync,
|
|
49378
|
+
readFileSync,
|
|
49379
|
+
writeFileSync
|
|
49380
|
+
} from "fs";
|
|
49381
|
+
import os from "os";
|
|
49382
|
+
import path from "path";
|
|
49383
|
+
var ERROR_LOG_PATH = path.join(os.homedir(), ".pensar", "error.log");
|
|
49384
|
+
var RETENTION_DAYS = 7;
|
|
49385
|
+
var TIMESTAMP_RE = /^(\d{4}-\d{2}-\d{2}T[\d:.]+Z) - /;
|
|
49386
|
+
var hasPruned = false;
|
|
49387
|
+
function pruneErrorLog() {
|
|
49388
|
+
if (hasPruned)
|
|
49389
|
+
return;
|
|
49390
|
+
hasPruned = true;
|
|
49391
|
+
try {
|
|
49392
|
+
if (!existsSync(ERROR_LOG_PATH))
|
|
49393
|
+
return;
|
|
49394
|
+
const cutoff = Date.now() - RETENTION_DAYS * 86400000;
|
|
49395
|
+
const raw = readFileSync(ERROR_LOG_PATH, "utf8");
|
|
49396
|
+
const lines = raw.split(`
|
|
49397
|
+
`);
|
|
49398
|
+
const kept = [];
|
|
49399
|
+
let keeping = true;
|
|
49400
|
+
for (const line of lines) {
|
|
49401
|
+
const match = TIMESTAMP_RE.exec(line);
|
|
49402
|
+
if (match) {
|
|
49403
|
+
keeping = new Date(match[1]).getTime() >= cutoff;
|
|
49404
|
+
}
|
|
49405
|
+
if (keeping) {
|
|
49406
|
+
kept.push(line);
|
|
49407
|
+
}
|
|
49408
|
+
}
|
|
49409
|
+
writeFileSync(ERROR_LOG_PATH, kept.join(`
|
|
49410
|
+
`), "utf8");
|
|
49411
|
+
} catch {}
|
|
49412
|
+
}
|
|
49413
|
+
function writeErrorLog(error, source) {
|
|
49414
|
+
try {
|
|
49415
|
+
pruneErrorLog();
|
|
49416
|
+
const dir = path.dirname(ERROR_LOG_PATH);
|
|
49417
|
+
if (!existsSync(dir)) {
|
|
49418
|
+
mkdirSync(dir, { recursive: true });
|
|
49419
|
+
}
|
|
49420
|
+
const timestamp = new Date().toISOString();
|
|
49421
|
+
const tag = source ? `[${source}] ` : "";
|
|
49422
|
+
const message = error instanceof Error ? `${error.message}
|
|
49423
|
+
${error.stack ?? ""}` : String(error);
|
|
49424
|
+
const entry = `${timestamp} - [ERROR] ${tag}${message}
|
|
49425
|
+
`;
|
|
49426
|
+
appendFileSync(ERROR_LOG_PATH, entry, "utf8");
|
|
49427
|
+
} catch {}
|
|
49428
|
+
}
|
|
49429
|
+
|
|
49372
49430
|
// src/core/providers/index.ts
|
|
49373
49431
|
init_types();
|
|
49374
49432
|
init_utils();
|
|
@@ -52782,14 +52840,11 @@ function createClipboardManager(renderer) {
|
|
|
52782
52840
|
}
|
|
52783
52841
|
|
|
52784
52842
|
// src/tui/components/chat/index.tsx
|
|
52785
|
-
init_session();
|
|
52786
52843
|
import { useCallback as useCallback12, useEffect as useEffect12, useState as useState19 } from "react";
|
|
52787
52844
|
|
|
52788
52845
|
// src/tui/context/agent.tsx
|
|
52789
52846
|
init_ai();
|
|
52790
52847
|
init_config();
|
|
52791
|
-
init_logger();
|
|
52792
|
-
init_utils();
|
|
52793
52848
|
import {
|
|
52794
52849
|
createContext as createContext3,
|
|
52795
52850
|
useCallback as useCallback2,
|
|
@@ -52799,6 +52854,7 @@ import {
|
|
|
52799
52854
|
useRef,
|
|
52800
52855
|
useState as useState3
|
|
52801
52856
|
} from "react";
|
|
52857
|
+
init_utils();
|
|
52802
52858
|
|
|
52803
52859
|
// src/tui/context/config.tsx
|
|
52804
52860
|
init_config2();
|
|
@@ -53900,7 +53956,6 @@ function isValidUrl(url) {
|
|
|
53900
53956
|
import { useCallback as useCallback11, useEffect as useEffect11, useState as useState18 } from "react";
|
|
53901
53957
|
|
|
53902
53958
|
// src/core/history.ts
|
|
53903
|
-
init_storage();
|
|
53904
53959
|
var STORAGE_KEY = ["command-history"];
|
|
53905
53960
|
var MAX_ENTRIES = 500;
|
|
53906
53961
|
var entries = null;
|
|
@@ -54352,7 +54407,7 @@ function deobfuscate(input) {
|
|
|
54352
54407
|
init_config2();
|
|
54353
54408
|
|
|
54354
54409
|
// src/tui/utils/command-flags.ts
|
|
54355
|
-
import { readFileSync } from "fs";
|
|
54410
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
54356
54411
|
import { isAbsolute, resolve } from "path";
|
|
54357
54412
|
init_toolset();
|
|
54358
54413
|
function combinePromptParts(threatModel, prompt) {
|
|
@@ -54369,7 +54424,7 @@ function resolveFlagValue(value) {
|
|
|
54369
54424
|
if (value.startsWith("@")) {
|
|
54370
54425
|
const filePath = value.slice(1);
|
|
54371
54426
|
const resolved = isAbsolute(filePath) ? filePath : resolve(process.cwd(), filePath);
|
|
54372
|
-
return
|
|
54427
|
+
return readFileSync2(resolved, "utf-8");
|
|
54373
54428
|
}
|
|
54374
54429
|
return value;
|
|
54375
54430
|
}
|
|
@@ -62799,16 +62854,14 @@ function OnboardingChoice({
|
|
|
62799
62854
|
// src/tui/components/commands/sessions-display.tsx
|
|
62800
62855
|
import { useKeyboard as useKeyboard15 } from "@opentui/react";
|
|
62801
62856
|
import { useCallback as useCallback16, useEffect as useEffect18, useRef as useRef14, useState as useState28 } from "react";
|
|
62802
|
-
init_session();
|
|
62803
62857
|
|
|
62804
62858
|
// src/tui/hooks/use-sessions-list.ts
|
|
62805
|
-
import { existsSync, readdirSync } from "fs";
|
|
62859
|
+
import { existsSync as existsSync2, readdirSync } from "fs";
|
|
62806
62860
|
import { join } from "path";
|
|
62807
62861
|
import { useCallback as useCallback15, useEffect as useEffect17, useState as useState27 } from "react";
|
|
62808
|
-
init_session();
|
|
62809
62862
|
function countFindings(findingsPath) {
|
|
62810
62863
|
try {
|
|
62811
|
-
if (!
|
|
62864
|
+
if (!existsSync2(findingsPath))
|
|
62812
62865
|
return 0;
|
|
62813
62866
|
return readdirSync(findingsPath).filter((f) => f.endsWith(".json")).length;
|
|
62814
62867
|
} catch {
|
|
@@ -62816,7 +62869,7 @@ function countFindings(findingsPath) {
|
|
|
62816
62869
|
}
|
|
62817
62870
|
}
|
|
62818
62871
|
function checkHasReport(rootPath) {
|
|
62819
|
-
return
|
|
62872
|
+
return existsSync2(join(rootPath, REPORT_FILENAME_MD));
|
|
62820
62873
|
}
|
|
62821
62874
|
function useSessionsList() {
|
|
62822
62875
|
const [allSessions, setAllSessions] = useState27([]);
|
|
@@ -62826,7 +62879,7 @@ function useSessionsList() {
|
|
|
62826
62879
|
try {
|
|
62827
62880
|
const enriched = [];
|
|
62828
62881
|
for await (const session of list()) {
|
|
62829
|
-
const hasOperatorState =
|
|
62882
|
+
const hasOperatorState = existsSync2(join(session.rootPath, "messages.json"));
|
|
62830
62883
|
const findingsCount = countFindings(session.findingsPath);
|
|
62831
62884
|
const hasReport = checkHasReport(session.rootPath);
|
|
62832
62885
|
enriched.push({
|
|
@@ -62904,7 +62957,7 @@ function useSessionsList() {
|
|
|
62904
62957
|
}
|
|
62905
62958
|
|
|
62906
62959
|
// src/tui/utils/open-report.ts
|
|
62907
|
-
import { existsSync as
|
|
62960
|
+
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "node:fs";
|
|
62908
62961
|
import { join as join2 } from "node:path";
|
|
62909
62962
|
|
|
62910
62963
|
// src/tui/utils/open-file.ts
|
|
@@ -62942,17 +62995,17 @@ async function openFileInDefaultApp(filePath) {
|
|
|
62942
62995
|
// src/tui/utils/open-report.ts
|
|
62943
62996
|
async function openSessionReport(sessionRootPath) {
|
|
62944
62997
|
const reportPath = join2(sessionRootPath, REPORT_FILENAME_MD);
|
|
62945
|
-
if (!
|
|
62998
|
+
if (!existsSync3(reportPath)) {
|
|
62946
62999
|
return "Report not found";
|
|
62947
63000
|
}
|
|
62948
63001
|
return openFileInDefaultApp(reportPath);
|
|
62949
63002
|
}
|
|
62950
63003
|
function readSessionReport(sessionRootPath) {
|
|
62951
63004
|
const reportPath = join2(sessionRootPath, REPORT_FILENAME_MD);
|
|
62952
|
-
if (!
|
|
63005
|
+
if (!existsSync3(reportPath))
|
|
62953
63006
|
return null;
|
|
62954
63007
|
try {
|
|
62955
|
-
return
|
|
63008
|
+
return readFileSync3(reportPath, "utf-8");
|
|
62956
63009
|
} catch {
|
|
62957
63010
|
return null;
|
|
62958
63011
|
}
|
|
@@ -64642,7 +64695,6 @@ function WebWizard({
|
|
|
64642
64695
|
}
|
|
64643
64696
|
|
|
64644
64697
|
// src/tui/components/error-boundary.tsx
|
|
64645
|
-
init_logger();
|
|
64646
64698
|
import React, { useCallback as useCallback18 } from "react";
|
|
64647
64699
|
var MAX_ERRORS = 3;
|
|
64648
64700
|
var ERROR_WINDOW_MS = 5000;
|
|
@@ -64685,10 +64737,9 @@ function ErrorBoundary({ children }) {
|
|
|
64685
64737
|
}
|
|
64686
64738
|
|
|
64687
64739
|
// src/tui/components/footer.tsx
|
|
64688
|
-
import
|
|
64740
|
+
import os2 from "os";
|
|
64689
64741
|
|
|
64690
64742
|
// src/tui/context/session.tsx
|
|
64691
|
-
init_session();
|
|
64692
64743
|
import {
|
|
64693
64744
|
createContext as createContext12,
|
|
64694
64745
|
useContext as useContext12,
|
|
@@ -64754,7 +64805,7 @@ function Footer({
|
|
|
64754
64805
|
const { width: termWidth } = useDimensions();
|
|
64755
64806
|
const { enabled: obfuscateEnabled } = useObfuscation();
|
|
64756
64807
|
const effectiveCwd = sessionCwd || cwd;
|
|
64757
|
-
const relativeCwd = effectiveCwd.split(
|
|
64808
|
+
const relativeCwd = effectiveCwd.split(os2.homedir()).pop() || "";
|
|
64758
64809
|
const segments = relativeCwd.split("/").filter(Boolean);
|
|
64759
64810
|
const rawDisplayCwd = segments.length <= 2 ? "~/" + segments.join("/") : "…/" + segments.slice(-2).join("/");
|
|
64760
64811
|
const displayCwd = obfuscateEnabled ? "~/[workdir]" : rawDisplayCwd;
|
|
@@ -64903,7 +64954,7 @@ function ContextProgress({
|
|
|
64903
64954
|
// src/tui/components/operator-dashboard/index.tsx
|
|
64904
64955
|
init_dist();
|
|
64905
64956
|
import { useKeyboard as useKeyboard25 } from "@opentui/react";
|
|
64906
|
-
import { existsSync as
|
|
64957
|
+
import { existsSync as existsSync4, readFileSync as readFileSync4, writeFileSync as writeFileSync2 } from "fs";
|
|
64907
64958
|
import { isAbsolute as isAbsolute2, join as join3, resolve as resolve2 } from "path";
|
|
64908
64959
|
import {
|
|
64909
64960
|
useCallback as useCallback19,
|
|
@@ -64942,9 +64993,6 @@ async function attachWandbToEventBus(session, eventBus, opts) {
|
|
|
64942
64993
|
};
|
|
64943
64994
|
}
|
|
64944
64995
|
|
|
64945
|
-
// src/tui/components/operator-dashboard/index.tsx
|
|
64946
|
-
init_session();
|
|
64947
|
-
|
|
64948
64996
|
// src/tui/components/chat/approval-inline.tsx
|
|
64949
64997
|
import { jsxDEV as jsxDEV46 } from "@opentui/react/jsx-dev-runtime";
|
|
64950
64998
|
function InlineApprovalPrompt({ approval }) {
|
|
@@ -66050,8 +66098,8 @@ function nextImageId() {
|
|
|
66050
66098
|
return nextId2++;
|
|
66051
66099
|
}
|
|
66052
66100
|
function transmitImageFromFile(opts) {
|
|
66053
|
-
const { path, columns, rows, imageId, zIndex = 10 } = opts;
|
|
66054
|
-
const payload = Buffer.from(
|
|
66101
|
+
const { path: path2, columns, rows, imageId, zIndex = 10 } = opts;
|
|
66102
|
+
const payload = Buffer.from(path2).toString("base64");
|
|
66055
66103
|
const ctrl = `f=100,t=f,a=T,c=${columns},r=${rows},z=${zIndex},q=2,i=${imageId}`;
|
|
66056
66104
|
process.stdout.write(`${APC}${ctrl};${payload}${ST}`);
|
|
66057
66105
|
}
|
|
@@ -66066,8 +66114,8 @@ function moveCursor(row, col) {
|
|
|
66066
66114
|
import { jsxDEV as jsxDEV50 } from "@opentui/react/jsx-dev-runtime";
|
|
66067
66115
|
var HEADER_ROWS = 4;
|
|
66068
66116
|
var FOOTER_ROWS = 6;
|
|
66069
|
-
async function readPngDimensions(
|
|
66070
|
-
const fh = await open(
|
|
66117
|
+
async function readPngDimensions(path2) {
|
|
66118
|
+
const fh = await open(path2, "r");
|
|
66071
66119
|
try {
|
|
66072
66120
|
const buf = Buffer.alloc(24);
|
|
66073
66121
|
await fh.read(buf, 0, 24, 0);
|
|
@@ -66106,7 +66154,7 @@ function ScreenshotModal({ screenshots, initialIndex, onClose }) {
|
|
|
66106
66154
|
const supported = kittyGraphicsSupported();
|
|
66107
66155
|
const safeInitial = Math.min(Math.max(0, initialIndex ?? screenshots.length - 1), Math.max(0, screenshots.length - 1));
|
|
66108
66156
|
const [index, setIndex] = useState35(safeInitial);
|
|
66109
|
-
const
|
|
66157
|
+
const path2 = screenshots[index];
|
|
66110
66158
|
const total = screenshots.length;
|
|
66111
66159
|
useKeyboard21((key) => {
|
|
66112
66160
|
if (key.name === "left") {
|
|
@@ -66122,13 +66170,13 @@ function ScreenshotModal({ screenshots, initialIndex, onClose }) {
|
|
|
66122
66170
|
onClose();
|
|
66123
66171
|
});
|
|
66124
66172
|
useEffect22(() => {
|
|
66125
|
-
if (!supported || !
|
|
66173
|
+
if (!supported || !path2)
|
|
66126
66174
|
return;
|
|
66127
66175
|
let cancelled = false;
|
|
66128
66176
|
const id = nextImageId();
|
|
66129
66177
|
(async () => {
|
|
66130
66178
|
try {
|
|
66131
|
-
const { width: w2, height: h } = await readPngDimensions(
|
|
66179
|
+
const { width: w2, height: h } = await readPngDimensions(path2);
|
|
66132
66180
|
const availCols = Math.max(4, termW - 4);
|
|
66133
66181
|
const availRows = Math.max(4, termH - HEADER_ROWS - FOOTER_ROWS);
|
|
66134
66182
|
const imgCellAspect = h / w2 / 2;
|
|
@@ -66147,14 +66195,14 @@ function ScreenshotModal({ screenshots, initialIndex, onClose }) {
|
|
|
66147
66195
|
const xCell = Math.max(1, Math.floor((termW - cols) / 2) + 1);
|
|
66148
66196
|
const yCell = Math.max(HEADER_ROWS + 1, HEADER_ROWS + Math.floor((availRows - rows) / 2) + 1);
|
|
66149
66197
|
moveCursor(yCell, xCell);
|
|
66150
|
-
transmitImageFromFile({ path, columns: cols, rows, imageId: id });
|
|
66198
|
+
transmitImageFromFile({ path: path2, columns: cols, rows, imageId: id });
|
|
66151
66199
|
} catch {}
|
|
66152
66200
|
})();
|
|
66153
66201
|
return () => {
|
|
66154
66202
|
cancelled = true;
|
|
66155
66203
|
deleteImage(id);
|
|
66156
66204
|
};
|
|
66157
|
-
}, [
|
|
66205
|
+
}, [path2, termW, termH, supported]);
|
|
66158
66206
|
const counter = `${index + 1} / ${total}`;
|
|
66159
66207
|
const controls = total > 1 ? `← → navigate · esc close · ${counter}` : `esc close · ${counter}`;
|
|
66160
66208
|
const indicatorRow = Math.max(0, termH - FOOTER_ROWS);
|
|
@@ -66170,7 +66218,7 @@ function ScreenshotModal({ screenshots, initialIndex, onClose }) {
|
|
|
66170
66218
|
onClose();
|
|
66171
66219
|
},
|
|
66172
66220
|
children: [
|
|
66173
|
-
!supported &&
|
|
66221
|
+
!supported && path2 && /* @__PURE__ */ jsxDEV50("box", {
|
|
66174
66222
|
position: "absolute",
|
|
66175
66223
|
top: HEADER_ROWS,
|
|
66176
66224
|
left: 0,
|
|
@@ -66186,7 +66234,7 @@ function ScreenshotModal({ screenshots, initialIndex, onClose }) {
|
|
|
66186
66234
|
}, undefined, false, undefined, this),
|
|
66187
66235
|
/* @__PURE__ */ jsxDEV50("text", {
|
|
66188
66236
|
fg: colors2.textMuted,
|
|
66189
|
-
children:
|
|
66237
|
+
children: path2
|
|
66190
66238
|
}, undefined, false, undefined, this),
|
|
66191
66239
|
/* @__PURE__ */ jsxDEV50("text", {
|
|
66192
66240
|
fg: colors2.textMuted,
|
|
@@ -67687,7 +67735,7 @@ function OperatorDashboard({
|
|
|
67687
67735
|
if (sessionRef.current) {
|
|
67688
67736
|
try {
|
|
67689
67737
|
const mp = join3(sessionRef.current.rootPath, "messages.json");
|
|
67690
|
-
|
|
67738
|
+
writeFileSync2(mp, JSON.stringify(nextMessages, null, 2));
|
|
67691
67739
|
} catch {}
|
|
67692
67740
|
}
|
|
67693
67741
|
} else {
|
|
@@ -68071,8 +68119,8 @@ Error: ${errMsg}
|
|
|
68071
68119
|
try {
|
|
68072
68120
|
const rootPath = agentResult.session.rootPath;
|
|
68073
68121
|
const mp = join3(rootPath, "messages.json");
|
|
68074
|
-
if (
|
|
68075
|
-
const raw = JSON.parse(
|
|
68122
|
+
if (existsSync4(mp)) {
|
|
68123
|
+
const raw = JSON.parse(readFileSync4(mp, "utf-8"));
|
|
68076
68124
|
if (Array.isArray(raw) && raw.length > 0) {
|
|
68077
68125
|
conversationRef.current = normalizeMessages(sessions.getResumeMessages(raw));
|
|
68078
68126
|
}
|
|
@@ -68099,7 +68147,7 @@ Error: ${errMsg}
|
|
|
68099
68147
|
if (sessionRef.current) {
|
|
68100
68148
|
try {
|
|
68101
68149
|
const mp = join3(sessionRef.current.rootPath, "messages.json");
|
|
68102
|
-
|
|
68150
|
+
writeFileSync2(mp, JSON.stringify(prevMessages, null, 2));
|
|
68103
68151
|
} catch {}
|
|
68104
68152
|
}
|
|
68105
68153
|
const errorMsg = e instanceof Error ? e.message : "Agent failed";
|
|
@@ -68497,8 +68545,8 @@ ${planContent}` : "No plan exists yet. Switch to plan mode (Shift+Tab) to create
|
|
|
68497
68545
|
if (activeSession) {
|
|
68498
68546
|
try {
|
|
68499
68547
|
const messagesPath = join3(activeSession.rootPath, "messages.json");
|
|
68500
|
-
if (
|
|
68501
|
-
const raw = JSON.parse(
|
|
68548
|
+
if (existsSync4(messagesPath)) {
|
|
68549
|
+
const raw = JSON.parse(readFileSync4(messagesPath, "utf-8"));
|
|
68502
68550
|
if (Array.isArray(raw) && raw.length > 0) {
|
|
68503
68551
|
conversationRef.current = normalizeMessages(sessions.getResumeMessages(raw));
|
|
68504
68552
|
}
|
|
@@ -68545,7 +68593,7 @@ ${planContent}` : "No plan exists yet. Switch to plan mode (Shift+Tab) to create
|
|
|
68545
68593
|
}
|
|
68546
68594
|
];
|
|
68547
68595
|
}
|
|
68548
|
-
|
|
68596
|
+
writeFileSync2(join3(activeSession.rootPath, "messages.json"), JSON.stringify(conversationRef.current, null, 2));
|
|
68549
68597
|
}
|
|
68550
68598
|
} catch {}
|
|
68551
68599
|
}
|
|
@@ -68591,7 +68639,7 @@ ${planContent}` : "No plan exists yet. Switch to plan mode (Shift+Tab) to create
|
|
|
68591
68639
|
const activeSession = sessionRef.current;
|
|
68592
68640
|
if (activeSession) {
|
|
68593
68641
|
try {
|
|
68594
|
-
|
|
68642
|
+
writeFileSync2(join3(activeSession.rootPath, "messages.json"), JSON.stringify(updated, null, 2));
|
|
68595
68643
|
} catch {}
|
|
68596
68644
|
}
|
|
68597
68645
|
pendingToolCallIdRef.current = null;
|
|
@@ -68736,7 +68784,7 @@ ${planContent}` : "No plan exists yet. Switch to plan mode (Shift+Tab) to create
|
|
|
68736
68784
|
const activeSession = sessionRef.current;
|
|
68737
68785
|
if (activeSession) {
|
|
68738
68786
|
try {
|
|
68739
|
-
|
|
68787
|
+
writeFileSync2(join3(activeSession.rootPath, "messages.json"), JSON.stringify(conversationRef.current, null, 2));
|
|
68740
68788
|
} catch {}
|
|
68741
68789
|
}
|
|
68742
68790
|
}
|
|
@@ -69660,7 +69708,7 @@ function AppContent({
|
|
|
69660
69708
|
toast(`Update available: v${currentVersion} → v${latestVersion}. Run: pensar upgrade`, "warn", 8000);
|
|
69661
69709
|
});
|
|
69662
69710
|
const checkAuthToken = async () => {
|
|
69663
|
-
const { isTokenExpired, isConnected: isConnected2 } = await import("./index-
|
|
69711
|
+
const { isTokenExpired, isConnected: isConnected2 } = await import("./index-s17r2akv.js");
|
|
69664
69712
|
if (isConnected2(config2.data) && config2.data.accessToken && isTokenExpired(config2.data.accessToken, 60) && !config2.data.refreshToken && !config2.data.pensarAPIKey) {
|
|
69665
69713
|
toast("Your Pensar Console session has expired. Run /login to refresh.", "warn", 8000);
|
|
69666
69714
|
}
|
|
@@ -7,19 +7,22 @@ import {
|
|
|
7
7
|
WHITEBOX_APPS_DISCOVERY_SYSTEM_PROMPT,
|
|
8
8
|
WHITEBOX_DISCOVERY_SYSTEM_PROMPT,
|
|
9
9
|
WhiteboxAttackSurfaceAgent
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-wdmqkshz.js";
|
|
11
11
|
import"./cli-9fsre5pt.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
12
|
+
import"./cli-ntd42071.js";
|
|
13
|
+
import"./cli-k8mvghe1.js";
|
|
14
|
+
import"./cli-mswm4k81.js";
|
|
15
|
+
import"./cli-3knnkdps.js";
|
|
15
16
|
import"./cli-c8131c4q.js";
|
|
16
|
-
import"./cli-
|
|
17
|
-
import"./cli-
|
|
17
|
+
import"./cli-s1nckt4k.js";
|
|
18
|
+
import"./cli-1yavz2pb.js";
|
|
19
|
+
import"./cli-h825qzmd.js";
|
|
20
|
+
import"./cli-948dk60p.js";
|
|
18
21
|
import"./cli-e6rgwtpb.js";
|
|
22
|
+
import"./cli-h6nw89zf.js";
|
|
19
23
|
import"./cli-gpnb45ck.js";
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-k1vsv3qh.js";
|
|
24
|
+
import"./cli-0v9x0eby.js";
|
|
25
|
+
import"./cli-a20jcpmp.js";
|
|
23
26
|
import"./cli-8rxa073f.js";
|
|
24
27
|
export {
|
|
25
28
|
WhiteboxAttackSurfaceAgent,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ApexFindingObject
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-ntd42071.js";
|
|
4
4
|
import {
|
|
5
5
|
ALL_TOOL_NAMES,
|
|
6
6
|
ASK_USER_QUESTIONS_TOOL_NAME,
|
|
@@ -83,16 +83,19 @@ import {
|
|
|
83
83
|
validateDiscovery,
|
|
84
84
|
webSearch,
|
|
85
85
|
writePlan
|
|
86
|
-
} from "./cli-
|
|
87
|
-
import"./cli-
|
|
86
|
+
} from "./cli-k8mvghe1.js";
|
|
87
|
+
import"./cli-mswm4k81.js";
|
|
88
|
+
import"./cli-3knnkdps.js";
|
|
88
89
|
import"./cli-c8131c4q.js";
|
|
89
|
-
import"./cli-
|
|
90
|
-
import"./cli-
|
|
90
|
+
import"./cli-s1nckt4k.js";
|
|
91
|
+
import"./cli-1yavz2pb.js";
|
|
92
|
+
import"./cli-h825qzmd.js";
|
|
93
|
+
import"./cli-948dk60p.js";
|
|
91
94
|
import"./cli-e6rgwtpb.js";
|
|
95
|
+
import"./cli-h6nw89zf.js";
|
|
92
96
|
import"./cli-gpnb45ck.js";
|
|
93
|
-
import"./cli-
|
|
94
|
-
import"./cli-
|
|
95
|
-
import"./cli-k1vsv3qh.js";
|
|
97
|
+
import"./cli-0v9x0eby.js";
|
|
98
|
+
import"./cli-a20jcpmp.js";
|
|
96
99
|
import"./cli-8rxa073f.js";
|
|
97
100
|
export {
|
|
98
101
|
writePlan,
|
|
@@ -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-948dk60p.js";
|
|
16
|
+
import"./cli-h6nw89zf.js";
|
|
17
|
+
import"./cli-0v9x0eby.js";
|
|
18
|
+
import"./cli-a20jcpmp.js";
|
|
19
19
|
import"./cli-8rxa073f.js";
|
|
20
20
|
init_auth();
|
|
21
21
|
|
|
@@ -3,26 +3,29 @@ import {
|
|
|
3
3
|
getIssue,
|
|
4
4
|
listIssues,
|
|
5
5
|
updateIssue
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
6
|
+
} from "./cli-31cara07.js";
|
|
7
|
+
import"./cli-5fr9k6m4.js";
|
|
8
|
+
import"./cli-sw5swz40.js";
|
|
9
|
+
import"./cli-cb5va0cs.js";
|
|
10
|
+
import"./cli-zvq4gy61.js";
|
|
11
|
+
import"./cli-zpvmaxem.js";
|
|
12
|
+
import"./cli-wdmqkshz.js";
|
|
13
13
|
import"./cli-9fsre5pt.js";
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
14
|
+
import"./cli-ntd42071.js";
|
|
15
|
+
import"./cli-k8mvghe1.js";
|
|
16
|
+
import"./cli-mswm4k81.js";
|
|
17
|
+
import"./cli-3knnkdps.js";
|
|
17
18
|
import"./cli-fw5r7pfj.js";
|
|
18
19
|
import"./cli-c8131c4q.js";
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
20
|
+
import"./cli-s1nckt4k.js";
|
|
21
|
+
import"./cli-1yavz2pb.js";
|
|
22
|
+
import"./cli-h825qzmd.js";
|
|
23
|
+
import"./cli-948dk60p.js";
|
|
21
24
|
import"./cli-e6rgwtpb.js";
|
|
25
|
+
import"./cli-h6nw89zf.js";
|
|
22
26
|
import"./cli-gpnb45ck.js";
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-k1vsv3qh.js";
|
|
27
|
+
import"./cli-0v9x0eby.js";
|
|
28
|
+
import"./cli-a20jcpmp.js";
|
|
26
29
|
import"./cli-8rxa073f.js";
|
|
27
30
|
|
|
28
31
|
// src/cli/issues.ts
|