@pensar/apex 2.4.0 → 2.5.0-canary.22f2eb52
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-7qtpem5z.js +12 -0
- package/build/agent-9khcyh5t.js +14 -0
- package/build/agent-bsyhck0a.js +12 -0
- package/build/{agent-5ejt5vpz.js → agent-ywewzc2h.js} +42 -42
- package/build/{apps-17wvz1d7.js → apps-11akynyv.js} +74 -43
- package/build/{auth-z3h9859n.js → auth-dd6r9mk4.js} +57 -61
- package/build/blackboxAgent-hbra4k00.js +12 -0
- package/build/blackboxPentest-bn5evs2z.js +61 -0
- package/build/{cli-xshasbwe.js → cli-3v9zs5wm.js} +31 -52
- package/build/{cli-mavved45.js → cli-4z46kyrk.js} +86 -93
- package/build/cli-7vby0hk6.js +12136 -0
- package/build/{cli-gq40s5b3.js → cli-8kkaeb70.js} +33 -46
- package/build/cli-8w8k4dph.js +15 -0
- package/build/cli-ag6jtndp.js +32 -0
- package/build/{cli-2cbwdk78.js → cli-ak78mweh.js} +4 -4
- package/build/cli-bb02pjt0.js +1485 -0
- package/build/{cli-k71t434r.js → cli-ec2hwkv3.js} +34 -76
- package/build/{cli-vnynf0js.js → cli-f5rw841m.js} +11 -5
- package/build/{cli-k8kc47pq.js → cli-gamfs2yq.js} +118 -115
- package/build/{cli-32z0017y.js → cli-gq5sk2j3.js} +36 -60
- package/build/{cli-bc05qbss.js → cli-h6y3bt60.js} +13 -21
- package/build/{cli-tkc598ey.js → cli-j1916nvj.js} +10035 -7661
- package/build/{cli-5k33webc.js → cli-jw1xftqm.js} +355 -332
- package/build/{cli-tznv8pf1.js → cli-n4h7ygp5.js} +4 -4
- package/build/{cli-b1adytsy.js → cli-q45hcq3f.js} +67 -39
- package/build/{cli-repbyhkk.js → cli-qkb3v2nw.js} +26063 -25373
- package/build/{cli-j54qa6tm.js → cli-qktcyj48.js} +1 -1
- package/build/cli-retw3rw5.js +12 -0
- package/build/cli-tjm77pmx.js +12075 -0
- package/build/{cli-dm0fc0bm.js → cli-v1sarr4y.js} +5 -9
- package/build/{cli-9rhzhgx2.js → cli-v8ph8hy2.js} +5 -5
- package/build/{cli-vq52kp7j.js → cli-vkxx4jzv.js} +147 -128
- package/build/cli-wfb4gde1.js +22 -0
- package/build/{cli-ee3axgts.js → cli-xbhr5khz.js} +1 -1
- package/build/cli-z82n3qk1.js +6 -0
- package/build/cli.js +689 -132
- package/build/{config-f1mj4nhd.js → config-kv5v9ctn.js} +29 -29
- package/build/{doctor-ekneewa3.js → doctor-xs4s5km8.js} +4 -9
- package/build/{fastStrike-8zka43xs.js → fastStrike-b8t8f916.js} +26 -28
- package/build/{fixes-b89s5haw.js → fixes-kcckqx3s.js} +22 -27
- package/build/getMachineId-bsd-zr67nd9p.js +36 -0
- package/build/getMachineId-darwin-fd1d562d.js +36 -0
- package/build/getMachineId-linux-kjmg243j.js +29 -0
- package/build/getMachineId-unsupported-n4r58vke.js +19 -0
- package/build/getMachineId-win-yzgpfsrb.js +38 -0
- package/build/index-3mzr07h0.js +9 -0
- package/build/index-63zf8jxx.js +12 -0
- package/build/index-a1bg29j1.js +1559 -0
- package/build/{index-cbwn03kz.js → index-a2xycbjs.js} +12 -31
- package/build/{index-6d22pyxt.js → index-ae81pvwg.js} +2995 -2432
- package/build/index-cbajq2xy.js +17 -0
- package/build/index-cn4p95gh.js +100 -0
- package/build/index-kas88svr.js +36 -0
- package/build/index-mr20g8k4.js +22 -0
- package/build/{index-psqjpw5m.js → index-nweqptgs.js} +7 -7
- package/build/{index-sf16jm0m.js → index-rx5jn1nz.js} +137 -162
- package/build/{issues-xx5bs4md.js → issues-jm28k288.js} +81 -35
- package/build/{logs-qtxe51w2.js → logs-r02tbz89.js} +20 -25
- package/build/{multipart-parser-g2xxkezz.js → multipart-parser-vjjdbpd1.js} +10 -10
- package/build/{offesecAgent-b9e2xm6v.js → offesecAgent-mmfejh1j.js} +6 -13
- package/build/{parse-rtccymzn.js → parse-cqecqrc5.js} +0 -4
- package/build/pentest-13jcm4cy.js +21 -0
- package/build/{pentests-6ks3szc4.js → pentests-jyn4zs7n.js} +23 -28
- package/build/{targetedPentest-s1ptvq8e.js → targetedPentest-m3qkbpv6.js} +16 -20
- package/build/{targets-sxygyj87.js → targets-rqv57as0.js} +22 -27
- package/build/threatModel-scmz36xr.js +19 -0
- package/build/{token-3bbp59y6.js → token-n0tmq8n5.js} +2 -2
- package/build/{token-util-6xjme11b.js → token-util-bv80pj47.js} +1 -2
- package/build/{uninstall-tvsh81v8.js → uninstall-bme62bdg.js} +7 -4
- package/build/{upload-7wdyyqmr.js → upload-hwpgx1ha.js} +7 -13
- package/build/{utils-7fwdkqk6.js → utils-abtz5mmk.js} +7 -29
- package/package.json +8 -2
- package/build/agent-mvpgvgks.js +0 -19
- package/build/agent-nhs1w5w0.js +0 -29
- package/build/authentication-3s97cpk4.js +0 -19
- package/build/blackboxAgent-gw0a1ca4.js +0 -19
- package/build/blackboxPentest-44333zss.js +0 -37
- package/build/cli-0n4r54hq.js +0 -414
- package/build/cli-72cvcqhg.js +0 -22
- package/build/cli-qqt4gj1w.js +0 -53
- package/build/cli-swpbx60z.js +0 -24441
- package/build/index-4ad3sdwk.js +0 -39
- package/build/index-ghwf5z3v.js +0 -12
- package/build/index-hqjdg6fg.js +0 -205
- package/build/index-mtq7kmxz.js +0 -12856
- package/build/index-rbzhk712.js +0 -33
- package/build/index-y5w6n3tb.js +0 -19
- package/build/main-mmjp338j.js +0 -324
- package/build/pentest-xtc1sjdw.js +0 -29
- package/build/threatModel-xsm6fwk5.js +0 -27
- /package/build/{cli-c8131c4q.js → cli-0wsh8j2t.js} +0 -0
- /package/build/{cli-e08r86zk.js → cli-b3dvxjgk.js} +0 -0
- /package/build/{cli-fw5r7pfj.js → cli-q126f6ef.js} +0 -0
- /package/build/{cli-9fsre5pt.js → cli-qba2x69h.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-qkb3v2nw.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "./cli-
|
|
5
|
+
stepCountIs2,
|
|
6
|
+
init_dist
|
|
7
|
+
} from "./cli-j1916nvj.js";
|
|
8
8
|
|
|
9
9
|
// src/core/agents/specialized/codeAgent/agent.ts
|
|
10
10
|
init_dist();
|
|
@@ -60,51 +60,40 @@ Prefer catalog + code_query for sink-first work; use candidates to separate unve
|
|
|
60
60
|
`;
|
|
61
61
|
|
|
62
62
|
// src/core/agents/specialized/codeAgent/agent.ts
|
|
63
|
-
|
|
63
|
+
var CODE_AGENT_TOOLS = [
|
|
64
|
+
"read_file",
|
|
65
|
+
"list_files",
|
|
66
|
+
"grep",
|
|
67
|
+
"execute_command",
|
|
68
|
+
"profile_codebase",
|
|
69
|
+
"query_whitebox_catalog",
|
|
70
|
+
"run_code_query",
|
|
71
|
+
"run_whitebox_scan",
|
|
72
|
+
"create_whitebox_candidate",
|
|
73
|
+
"update_whitebox_candidate",
|
|
74
|
+
"list_whitebox_candidates",
|
|
75
|
+
"start_whitebox_job",
|
|
76
|
+
"poll_whitebox_job",
|
|
77
|
+
"stop_whitebox_job",
|
|
78
|
+
"read_whitebox_artifact",
|
|
79
|
+
"http_request",
|
|
80
|
+
"document_app",
|
|
81
|
+
"document_endpoint",
|
|
82
|
+
"web_search",
|
|
83
|
+
"get_page"
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
class CodeAgent2 extends OffensiveSecurityAgent {
|
|
64
87
|
constructor(opts) {
|
|
65
88
|
const {
|
|
66
|
-
model,
|
|
67
89
|
codebasePath,
|
|
68
90
|
objective,
|
|
69
|
-
session,
|
|
70
|
-
authConfig,
|
|
71
|
-
onStepFinish,
|
|
72
|
-
onCacheMetrics,
|
|
73
|
-
abortSignal,
|
|
74
|
-
eventBus,
|
|
75
|
-
subagentId,
|
|
76
|
-
stopWhen,
|
|
77
|
-
responseSchema,
|
|
78
91
|
system,
|
|
79
|
-
|
|
92
|
+
responseSchema,
|
|
80
93
|
excludeTools,
|
|
81
|
-
|
|
82
|
-
thinkingEffort,
|
|
83
|
-
openAIReasoningEffort,
|
|
84
|
-
projectThreatModel
|
|
94
|
+
...base
|
|
85
95
|
} = opts;
|
|
86
|
-
let activeTools = [
|
|
87
|
-
"read_file",
|
|
88
|
-
"list_files",
|
|
89
|
-
"grep",
|
|
90
|
-
"execute_command",
|
|
91
|
-
"profile_codebase",
|
|
92
|
-
"query_whitebox_catalog",
|
|
93
|
-
"run_code_query",
|
|
94
|
-
"run_whitebox_scan",
|
|
95
|
-
"create_whitebox_candidate",
|
|
96
|
-
"update_whitebox_candidate",
|
|
97
|
-
"list_whitebox_candidates",
|
|
98
|
-
"start_whitebox_job",
|
|
99
|
-
"poll_whitebox_job",
|
|
100
|
-
"stop_whitebox_job",
|
|
101
|
-
"read_whitebox_artifact",
|
|
102
|
-
"http_request",
|
|
103
|
-
"document_app",
|
|
104
|
-
"document_endpoint",
|
|
105
|
-
"web_search",
|
|
106
|
-
"get_page"
|
|
107
|
-
];
|
|
96
|
+
let activeTools = [...CODE_AGENT_TOOLS];
|
|
108
97
|
if (excludeTools?.length) {
|
|
109
98
|
const excluded = new Set(excludeTools);
|
|
110
99
|
activeTools = activeTools.filter((t) => !excluded.has(t));
|
|
@@ -113,25 +102,12 @@ class CodeAgent extends OffensiveSecurityAgent {
|
|
|
113
102
|
activeTools.push("response");
|
|
114
103
|
}
|
|
115
104
|
super({
|
|
116
|
-
|
|
105
|
+
...base,
|
|
117
106
|
prompt: buildPrompt(codebasePath, objective),
|
|
118
|
-
|
|
119
|
-
session,
|
|
120
|
-
authConfig,
|
|
121
|
-
onStepFinish,
|
|
122
|
-
onCacheMetrics,
|
|
123
|
-
abortSignal,
|
|
124
|
-
eventBus,
|
|
125
|
-
subagentId,
|
|
126
|
-
subagentName: opts.subagentName,
|
|
127
|
-
attackSurfaceRegistry,
|
|
128
|
-
enableThinking,
|
|
129
|
-
thinkingEffort,
|
|
130
|
-
openAIReasoningEffort,
|
|
131
|
-
projectThreatModel,
|
|
132
|
-
stopWhen: stopWhen ?? stepCountIs(1e4),
|
|
107
|
+
system: system ?? CODE_AGENT_SYSTEM_PROMPT,
|
|
133
108
|
activeTools,
|
|
134
|
-
responseSchema
|
|
109
|
+
responseSchema,
|
|
110
|
+
stopWhen: base.stopWhen ?? stepCountIs2(1e4)
|
|
135
111
|
});
|
|
136
112
|
}
|
|
137
113
|
}
|
|
@@ -146,4 +122,4 @@ ${objective}
|
|
|
146
122
|
Begin now. Orient yourself in the codebase, then accomplish the objective.`;
|
|
147
123
|
}
|
|
148
124
|
|
|
149
|
-
export {
|
|
125
|
+
export { CodeAgent2 };
|
|
@@ -3,7 +3,6 @@ var __create = Object.create;
|
|
|
3
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
7
|
function __accessProp(key) {
|
|
9
8
|
return this[key];
|
|
@@ -19,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
19
18
|
return cached;
|
|
20
19
|
}
|
|
21
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
22
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
23
22
|
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
24
23
|
for (let key of __getOwnPropNames(mod))
|
|
25
24
|
if (!__hasOwnProp.call(to, key))
|
|
@@ -32,23 +31,6 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
32
31
|
cache.set(mod, to);
|
|
33
32
|
return to;
|
|
34
33
|
};
|
|
35
|
-
var __toCommonJS = (from) => {
|
|
36
|
-
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
37
|
-
if (entry)
|
|
38
|
-
return entry;
|
|
39
|
-
entry = __defProp({}, "__esModule", { value: true });
|
|
40
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
-
for (var key of __getOwnPropNames(from))
|
|
42
|
-
if (!__hasOwnProp.call(entry, key))
|
|
43
|
-
__defProp(entry, key, {
|
|
44
|
-
get: __accessProp.bind(from, key),
|
|
45
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
__moduleCache.set(from, entry);
|
|
49
|
-
return entry;
|
|
50
|
-
};
|
|
51
|
-
var __moduleCache;
|
|
52
34
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
53
35
|
var __returnValue = (v) => v;
|
|
54
36
|
function __exportSetter(name, newValue) {
|
|
@@ -63,7 +45,17 @@ var __export = (target, all) => {
|
|
|
63
45
|
set: __exportSetter.bind(all, name)
|
|
64
46
|
});
|
|
65
47
|
};
|
|
66
|
-
var __esm = (fn, res) => () =>
|
|
48
|
+
var __esm = (fn, res, err) => () => {
|
|
49
|
+
if (fn)
|
|
50
|
+
try {
|
|
51
|
+
res = fn(fn = 0);
|
|
52
|
+
} catch (e) {
|
|
53
|
+
err = [e];
|
|
54
|
+
}
|
|
55
|
+
if (err)
|
|
56
|
+
throw err[0];
|
|
57
|
+
return res;
|
|
58
|
+
};
|
|
67
59
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
68
60
|
var __dispose = Symbol.dispose || /* @__PURE__ */ Symbol.for("Symbol.dispose");
|
|
69
61
|
var __asyncDispose = Symbol.asyncDispose || /* @__PURE__ */ Symbol.for("Symbol.asyncDispose");
|
|
@@ -103,4 +95,4 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
103
95
|
return next();
|
|
104
96
|
};
|
|
105
97
|
|
|
106
|
-
export { __toESM,
|
|
98
|
+
export { __toESM, __commonJS, __export, __esm, __require, __using, __callDispose };
|