@pensar/apex 1.8.0 → 1.8.2-canary.fb75c486
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 +11 -0
- package/build/agent-6dj1qm50.js +221 -0
- package/build/agent-6xr8vpgm.js +28 -0
- package/build/agent-x1htbpe3.js +22 -0
- package/build/apps-t0gmwc7z.js +446 -0
- package/build/{auth-dxjgy41e.js → auth-p4r1m7xq.js} +50 -13
- package/build/authentication-je2b0c3w.js +22 -0
- package/build/blackboxAgent-a4jnt0y5.js +22 -0
- package/build/{blackboxPentest-8ps4yvbk.js → blackboxPentest-b5741n3h.js} +19 -17
- package/build/{cli-y61d9433.js → cli-0tnv1vkp.js} +138 -38
- package/build/{cli-jg7r7y5n.js → cli-4xb21y6g.js} +30 -2
- package/build/{cli-k0tckznm.js → cli-6p7d2k55.js} +39701 -31695
- package/build/cli-87zakjb2.js +17 -0
- package/build/{authentication-e30mfzbe.js → cli-8frjr68r.js} +11 -18
- package/build/cli-8xknm7d9.js +204 -0
- package/build/cli-9egg9azd.js +22 -0
- package/build/cli-9fsre5pt.js +0 -0
- package/build/cli-abbka8n3.js +501 -0
- package/build/{cli-3y0dgy56.js → cli-c8131c4q.js} +2 -2
- package/build/cli-e08r86zk.js +24 -0
- package/build/{cli-0ghkg3w6.js → cli-e6rgwtpb.js} +19950 -18556
- package/build/cli-g5h24ny8.js +197 -0
- package/build/{cli-nr1cjfr9.js → cli-gtcd5c3f.js} +26 -7
- package/build/cli-k0730f59.js +52 -0
- package/build/{cli-tp1tqn3k.js → cli-mswm4k81.js} +1 -1
- package/build/{cli-m788e4f3.js → cli-q8dfq25x.js} +584 -33
- package/build/cli-rhry8mat.js +7213 -0
- package/build/{cli-g8t710ew.js → cli-ryy39d77.js} +253 -250
- package/build/cli-s1nckt4k.js +20 -0
- package/build/{cli-k4hrygff.js → cli-v9ds4jb8.js} +9 -5
- package/build/{cli-dqt80sw3.js → cli-w5990vr6.js} +199 -68
- package/build/{cli-3w2syxpv.js → cli-wfmdch3r.js} +102695 -104816
- package/build/cli.js +351 -280
- package/build/config-3bvtf3j8.js +188 -0
- package/build/{doctor-8tva8j99.js → doctor-2bkpddws.js} +1 -1
- package/build/{fixes-q5bhgxhc.js → fixes-60k3ts71.js} +23 -4
- package/build/{index-pfee23kv.js → index-0gp3x2r8.js} +19306 -18954
- package/build/index-861hkebg.js +12 -0
- package/build/{index-y5xpp21a.js → index-acc00eq4.js} +77 -108
- package/build/index-acdgrqa0.js +36 -0
- package/build/{index-e898mdyh.js → index-cfberehw.js} +4 -2
- package/build/{index-wfeb2gcc.js → index-hxn4rk8f.js} +9 -11
- package/build/{index-dw1xbhfn.js → index-vc29b21w.js} +161 -26
- package/build/index-vwt27stc.js +184 -0
- package/build/{issues-qbmdneej.js → issues-1bynat5q.js} +33 -9
- package/build/{logs-xm5vbymy.js → logs-e78vx2dy.js} +23 -4
- package/build/{main-3d7dfdvs.js → main-3zneyg7p.js} +93 -17
- package/build/{offesecAgent-re6kt2ff.js → offesecAgent-w9m0svwk.js} +14 -11
- package/build/parse-15kqmy2v.js +207 -0
- package/build/pentest-gpvqpvmd.js +31 -0
- package/build/{pentests-e3rj5845.js → pentests-nq7wa8yb.js} +36 -17
- package/build/{targetedPentest-fs0v570s.js → targetedPentest-fjxqn089.js} +15 -12
- package/build/threatModel-9yqx7d7x.js +29 -0
- package/build/{uninstall-qb2xbh2t.js → uninstall-9zbf4cwc.js} +6 -4
- package/build/{utils-jf52rmrb.js → utils-dh1t2r1e.js} +13 -10
- package/package.json +86 -88
- package/build/agent-4d8j2jsw.js +0 -278
- package/build/agent-z2s6h7n2.js +0 -19
- package/build/blackboxAgent-j9pczwym.js +0 -19
- package/build/cli-03z6pswp.js +0 -1423
- package/build/cli-0fy9j5dw.js +0 -61
- package/build/cli-asyas1xb.js +0 -110
- package/build/cli-dj1dgw2n.js +0 -190
- package/build/cli-q7r2sth7.js +0 -103
- package/build/cli-vkwch0bc.js +0 -1207
- package/build/cli-wr7g9qcr.js +0 -645
- package/build/index-bz6f8jry.js +0 -32
- package/build/pentest-mfm4hake.js +0 -29
- package/build/projects-qk22qcbt.js +0 -35
- package/build/threatModel-xfvc6cch.js +0 -67
|
@@ -31,6 +31,10 @@ import {
|
|
|
31
31
|
getErrorMessage,
|
|
32
32
|
getErrorMessage1 as getErrorMessage2,
|
|
33
33
|
getRuntimeEnvironmentUserAgent,
|
|
34
|
+
init_dist,
|
|
35
|
+
init_dist1 as init_dist2,
|
|
36
|
+
init_dist2 as init_dist3,
|
|
37
|
+
init_v4,
|
|
34
38
|
isAbortError,
|
|
35
39
|
isJSONArray,
|
|
36
40
|
isJSONObject,
|
|
@@ -50,13 +54,98 @@ import {
|
|
|
50
54
|
validateTypes,
|
|
51
55
|
withUserAgentSuffix,
|
|
52
56
|
zodSchema
|
|
53
|
-
} from "./cli-
|
|
57
|
+
} from "./cli-e6rgwtpb.js";
|
|
54
58
|
import"./cli-gpnb45ck.js";
|
|
55
59
|
import {
|
|
56
60
|
__toESM
|
|
57
61
|
} from "./cli-8rxa073f.js";
|
|
58
62
|
|
|
59
63
|
// node_modules/ai/dist/index.mjs
|
|
64
|
+
init_dist2();
|
|
65
|
+
init_dist3();
|
|
66
|
+
init_dist3();
|
|
67
|
+
init_dist3();
|
|
68
|
+
init_dist();
|
|
69
|
+
init_dist();
|
|
70
|
+
init_dist();
|
|
71
|
+
init_dist();
|
|
72
|
+
init_dist();
|
|
73
|
+
init_dist();
|
|
74
|
+
init_dist();
|
|
75
|
+
init_dist();
|
|
76
|
+
init_dist();
|
|
77
|
+
init_dist();
|
|
78
|
+
init_dist();
|
|
79
|
+
init_dist();
|
|
80
|
+
init_dist();
|
|
81
|
+
init_dist();
|
|
82
|
+
init_dist();
|
|
83
|
+
init_dist();
|
|
84
|
+
init_dist();
|
|
85
|
+
init_dist();
|
|
86
|
+
init_dist();
|
|
87
|
+
init_dist();
|
|
88
|
+
init_dist3();
|
|
89
|
+
init_dist();
|
|
90
|
+
init_dist2();
|
|
91
|
+
init_dist3();
|
|
92
|
+
init_dist3();
|
|
93
|
+
init_dist3();
|
|
94
|
+
init_dist();
|
|
95
|
+
init_dist3();
|
|
96
|
+
init_v4();
|
|
97
|
+
init_dist();
|
|
98
|
+
init_dist3();
|
|
99
|
+
init_dist();
|
|
100
|
+
init_dist3();
|
|
101
|
+
init_v4();
|
|
102
|
+
init_v4();
|
|
103
|
+
init_v4();
|
|
104
|
+
init_v4();
|
|
105
|
+
init_v4();
|
|
106
|
+
init_dist2();
|
|
107
|
+
init_dist();
|
|
108
|
+
init_dist();
|
|
109
|
+
init_dist3();
|
|
110
|
+
init_dist3();
|
|
111
|
+
init_dist3();
|
|
112
|
+
init_dist();
|
|
113
|
+
init_dist3();
|
|
114
|
+
init_dist3();
|
|
115
|
+
init_dist3();
|
|
116
|
+
init_dist();
|
|
117
|
+
init_dist3();
|
|
118
|
+
init_dist3();
|
|
119
|
+
init_v4();
|
|
120
|
+
init_dist3();
|
|
121
|
+
init_dist3();
|
|
122
|
+
init_dist3();
|
|
123
|
+
init_dist3();
|
|
124
|
+
init_dist();
|
|
125
|
+
init_dist3();
|
|
126
|
+
init_v4();
|
|
127
|
+
init_dist3();
|
|
128
|
+
init_dist3();
|
|
129
|
+
init_dist3();
|
|
130
|
+
init_dist3();
|
|
131
|
+
init_dist();
|
|
132
|
+
init_dist3();
|
|
133
|
+
init_dist();
|
|
134
|
+
init_dist3();
|
|
135
|
+
init_dist3();
|
|
136
|
+
init_dist3();
|
|
137
|
+
init_dist3();
|
|
138
|
+
init_dist3();
|
|
139
|
+
init_dist();
|
|
140
|
+
init_dist3();
|
|
141
|
+
init_dist();
|
|
142
|
+
init_dist();
|
|
143
|
+
init_dist();
|
|
144
|
+
init_dist3();
|
|
145
|
+
init_dist3();
|
|
146
|
+
init_dist3();
|
|
147
|
+
init_dist3();
|
|
148
|
+
init_dist3();
|
|
60
149
|
var import_api = __toESM(require_src(), 1);
|
|
61
150
|
var import_api2 = __toESM(require_src(), 1);
|
|
62
151
|
var __defProp = Object.defineProperty;
|
|
@@ -1015,7 +1104,7 @@ function detectMediaType({
|
|
|
1015
1104
|
}
|
|
1016
1105
|
return;
|
|
1017
1106
|
}
|
|
1018
|
-
var VERSION = "6.0.
|
|
1107
|
+
var VERSION = "6.0.175";
|
|
1019
1108
|
var download = async ({
|
|
1020
1109
|
url,
|
|
1021
1110
|
maxBytes,
|
|
@@ -1789,33 +1878,35 @@ var modelMessageSchema = exports_external.union([
|
|
|
1789
1878
|
assistantModelMessageSchema,
|
|
1790
1879
|
toolModelMessageSchema
|
|
1791
1880
|
]);
|
|
1792
|
-
async function standardizePrompt(
|
|
1793
|
-
|
|
1881
|
+
async function standardizePrompt({
|
|
1882
|
+
allowSystemInMessages,
|
|
1883
|
+
system,
|
|
1884
|
+
prompt,
|
|
1885
|
+
messages
|
|
1886
|
+
}) {
|
|
1887
|
+
if (prompt == null && messages == null) {
|
|
1794
1888
|
throw new InvalidPromptError({
|
|
1795
1889
|
prompt,
|
|
1796
1890
|
message: "prompt or messages must be defined"
|
|
1797
1891
|
});
|
|
1798
1892
|
}
|
|
1799
|
-
if (prompt
|
|
1893
|
+
if (prompt != null && messages != null) {
|
|
1800
1894
|
throw new InvalidPromptError({
|
|
1801
1895
|
prompt,
|
|
1802
1896
|
message: "prompt and messages cannot be defined at the same time"
|
|
1803
1897
|
});
|
|
1804
1898
|
}
|
|
1805
|
-
if (
|
|
1899
|
+
if (typeof system !== "string" && !asArray(system).every((message) => message.role === "system")) {
|
|
1806
1900
|
throw new InvalidPromptError({
|
|
1807
1901
|
prompt,
|
|
1808
1902
|
message: "system must be a string, SystemModelMessage, or array of SystemModelMessage"
|
|
1809
1903
|
});
|
|
1810
1904
|
}
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
} else if (prompt.messages != null) {
|
|
1817
|
-
messages = prompt.messages;
|
|
1818
|
-
} else {
|
|
1905
|
+
if (prompt != null && typeof prompt === "string") {
|
|
1906
|
+
messages = [{ role: "user", content: prompt }];
|
|
1907
|
+
} else if (prompt != null && Array.isArray(prompt)) {
|
|
1908
|
+
messages = prompt;
|
|
1909
|
+
} else if (messages == null) {
|
|
1819
1910
|
throw new InvalidPromptError({
|
|
1820
1911
|
prompt,
|
|
1821
1912
|
message: "prompt or messages must be defined"
|
|
@@ -1827,6 +1918,17 @@ async function standardizePrompt(prompt) {
|
|
|
1827
1918
|
message: "messages must not be empty"
|
|
1828
1919
|
});
|
|
1829
1920
|
}
|
|
1921
|
+
if (messages.some((message) => message.role === "system")) {
|
|
1922
|
+
if (allowSystemInMessages === false) {
|
|
1923
|
+
throw new InvalidPromptError({
|
|
1924
|
+
prompt,
|
|
1925
|
+
message: "System messages are not allowed in the prompt or messages fields. Use the system option instead."
|
|
1926
|
+
});
|
|
1927
|
+
}
|
|
1928
|
+
if (allowSystemInMessages === undefined) {
|
|
1929
|
+
console.warn("AI SDK Warning: System messages in the prompt or messages fields can be a security risk because they may enable prompt injection attacks. Use the system option instead when possible. Set allowSystemInMessages to true to suppress this warning, or false to throw an error.");
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1830
1932
|
const validationResult = await safeValidateTypes({
|
|
1831
1933
|
value: messages,
|
|
1832
1934
|
schema: exports_external.array(modelMessageSchema)
|
|
@@ -1838,10 +1940,7 @@ async function standardizePrompt(prompt) {
|
|
|
1838
1940
|
cause: validationResult.error
|
|
1839
1941
|
});
|
|
1840
1942
|
}
|
|
1841
|
-
return {
|
|
1842
|
-
messages,
|
|
1843
|
-
system: prompt.system
|
|
1844
|
-
};
|
|
1943
|
+
return { messages, system };
|
|
1845
1944
|
}
|
|
1846
1945
|
function wrapGatewayError(error) {
|
|
1847
1946
|
if (!GatewayAuthenticationError.isInstance(error))
|
|
@@ -2184,6 +2283,9 @@ function mergeObjects(base, overrides) {
|
|
|
2184
2283
|
}
|
|
2185
2284
|
const result = { ...base };
|
|
2186
2285
|
for (const key in overrides) {
|
|
2286
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
2287
|
+
continue;
|
|
2288
|
+
}
|
|
2187
2289
|
if (Object.prototype.hasOwnProperty.call(overrides, key)) {
|
|
2188
2290
|
const overridesValue = overrides[key];
|
|
2189
2291
|
if (overridesValue === undefined)
|
|
@@ -3220,6 +3322,15 @@ var json = ({
|
|
|
3220
3322
|
}
|
|
3221
3323
|
};
|
|
3222
3324
|
};
|
|
3325
|
+
function mergeToolProviderMetadata(toolMetadata, callMetadata) {
|
|
3326
|
+
if (toolMetadata == null) {
|
|
3327
|
+
return callMetadata;
|
|
3328
|
+
}
|
|
3329
|
+
if (callMetadata == null) {
|
|
3330
|
+
return toolMetadata;
|
|
3331
|
+
}
|
|
3332
|
+
return { ...toolMetadata, ...callMetadata };
|
|
3333
|
+
}
|
|
3223
3334
|
async function parseToolCall({
|
|
3224
3335
|
toolCall,
|
|
3225
3336
|
tools,
|
|
@@ -3227,7 +3338,7 @@ async function parseToolCall({
|
|
|
3227
3338
|
system,
|
|
3228
3339
|
messages
|
|
3229
3340
|
}) {
|
|
3230
|
-
var _a21;
|
|
3341
|
+
var _a21, _b;
|
|
3231
3342
|
try {
|
|
3232
3343
|
if (tools == null) {
|
|
3233
3344
|
if (toolCall.providerExecuted && toolCall.dynamic) {
|
|
@@ -3278,7 +3389,7 @@ async function parseToolCall({
|
|
|
3278
3389
|
error,
|
|
3279
3390
|
title: (_a21 = tools == null ? undefined : tools[toolCall.toolName]) == null ? undefined : _a21.title,
|
|
3280
3391
|
providerExecuted: toolCall.providerExecuted,
|
|
3281
|
-
providerMetadata: toolCall.providerMetadata
|
|
3392
|
+
providerMetadata: mergeToolProviderMetadata((_b = tools == null ? undefined : tools[toolCall.toolName]) == null ? undefined : _b.providerMetadata, toolCall.providerMetadata)
|
|
3282
3393
|
};
|
|
3283
3394
|
}
|
|
3284
3395
|
}
|
|
@@ -3325,13 +3436,14 @@ async function doParseToolCall({
|
|
|
3325
3436
|
cause: parseResult.error
|
|
3326
3437
|
});
|
|
3327
3438
|
}
|
|
3439
|
+
const mergedProviderMetadata = mergeToolProviderMetadata(tool2.providerMetadata, toolCall.providerMetadata);
|
|
3328
3440
|
return tool2.type === "dynamic" ? {
|
|
3329
3441
|
type: "tool-call",
|
|
3330
3442
|
toolCallId: toolCall.toolCallId,
|
|
3331
3443
|
toolName: toolCall.toolName,
|
|
3332
3444
|
input: parseResult.value,
|
|
3333
3445
|
providerExecuted: toolCall.providerExecuted,
|
|
3334
|
-
providerMetadata:
|
|
3446
|
+
providerMetadata: mergedProviderMetadata,
|
|
3335
3447
|
dynamic: true,
|
|
3336
3448
|
title: tool2.title
|
|
3337
3449
|
} : {
|
|
@@ -3340,7 +3452,7 @@ async function doParseToolCall({
|
|
|
3340
3452
|
toolName,
|
|
3341
3453
|
input: parseResult.value,
|
|
3342
3454
|
providerExecuted: toolCall.providerExecuted,
|
|
3343
|
-
providerMetadata:
|
|
3455
|
+
providerMetadata: mergedProviderMetadata,
|
|
3344
3456
|
title: tool2.title
|
|
3345
3457
|
};
|
|
3346
3458
|
}
|
|
@@ -3583,6 +3695,7 @@ async function generateText({
|
|
|
3583
3695
|
system,
|
|
3584
3696
|
prompt,
|
|
3585
3697
|
messages,
|
|
3698
|
+
allowSystemInMessages,
|
|
3586
3699
|
maxRetries: maxRetriesArg,
|
|
3587
3700
|
abortSignal,
|
|
3588
3701
|
timeout,
|
|
@@ -3632,7 +3745,8 @@ async function generateText({
|
|
|
3632
3745
|
const initialPrompt = await standardizePrompt({
|
|
3633
3746
|
system,
|
|
3634
3747
|
prompt,
|
|
3635
|
-
messages
|
|
3748
|
+
messages,
|
|
3749
|
+
allowSystemInMessages
|
|
3636
3750
|
});
|
|
3637
3751
|
const globalTelemetry = createGlobalTelemetry(telemetry == null ? undefined : telemetry.integrations);
|
|
3638
3752
|
await notify({
|
|
@@ -5730,6 +5844,7 @@ function streamText({
|
|
|
5730
5844
|
system,
|
|
5731
5845
|
prompt,
|
|
5732
5846
|
messages,
|
|
5847
|
+
allowSystemInMessages,
|
|
5733
5848
|
maxRetries,
|
|
5734
5849
|
abortSignal,
|
|
5735
5850
|
timeout,
|
|
@@ -5781,6 +5896,7 @@ function streamText({
|
|
|
5781
5896
|
system,
|
|
5782
5897
|
prompt,
|
|
5783
5898
|
messages,
|
|
5899
|
+
allowSystemInMessages,
|
|
5784
5900
|
tools,
|
|
5785
5901
|
toolChoice,
|
|
5786
5902
|
transforms: asArray(transform),
|
|
@@ -5887,6 +6003,7 @@ var DefaultStreamTextResult = class {
|
|
|
5887
6003
|
system,
|
|
5888
6004
|
prompt,
|
|
5889
6005
|
messages,
|
|
6006
|
+
allowSystemInMessages,
|
|
5890
6007
|
tools,
|
|
5891
6008
|
toolChoice,
|
|
5892
6009
|
transforms,
|
|
@@ -6268,7 +6385,8 @@ var DefaultStreamTextResult = class {
|
|
|
6268
6385
|
const initialPrompt = await standardizePrompt({
|
|
6269
6386
|
system,
|
|
6270
6387
|
prompt,
|
|
6271
|
-
messages
|
|
6388
|
+
messages,
|
|
6389
|
+
allowSystemInMessages
|
|
6272
6390
|
});
|
|
6273
6391
|
await notify({
|
|
6274
6392
|
event: {
|
|
@@ -7347,6 +7465,14 @@ var ToolLoopAgent = class {
|
|
|
7347
7465
|
}
|
|
7348
7466
|
async prepareCall(options) {
|
|
7349
7467
|
var _a21, _b, _c, _d;
|
|
7468
|
+
if (this.settings.callOptionsSchema != null && options.options !== undefined) {
|
|
7469
|
+
const validatedOptions = await validateTypes({
|
|
7470
|
+
value: options.options,
|
|
7471
|
+
schema: this.settings.callOptionsSchema,
|
|
7472
|
+
context: { field: "options" }
|
|
7473
|
+
});
|
|
7474
|
+
options = { ...options, options: validatedOptions };
|
|
7475
|
+
}
|
|
7350
7476
|
const { onStepFinish: _settingsOnStepFinish, ...settingsWithoutCallback } = this.settings;
|
|
7351
7477
|
const baseCallArgs = {
|
|
7352
7478
|
...settingsWithoutCallback,
|
|
@@ -8069,6 +8195,9 @@ async function safeValidateUIMessages({
|
|
|
8069
8195
|
const toolPart = part;
|
|
8070
8196
|
const toolName = toolPart.type.slice(5);
|
|
8071
8197
|
const tool2 = tools[toolName];
|
|
8198
|
+
if (!tool2 && (toolPart.state === "output-available" || toolPart.state === "output-error" || toolPart.state === "output-denied")) {
|
|
8199
|
+
continue;
|
|
8200
|
+
}
|
|
8072
8201
|
if (!tool2) {
|
|
8073
8202
|
return {
|
|
8074
8203
|
success: false,
|
|
@@ -9117,6 +9246,7 @@ async function generateObject(options) {
|
|
|
9117
9246
|
system,
|
|
9118
9247
|
prompt,
|
|
9119
9248
|
messages,
|
|
9249
|
+
allowSystemInMessages,
|
|
9120
9250
|
maxRetries: maxRetriesArg,
|
|
9121
9251
|
abortSignal,
|
|
9122
9252
|
headers,
|
|
@@ -9197,7 +9327,8 @@ async function generateObject(options) {
|
|
|
9197
9327
|
const standardizedPrompt = await standardizePrompt({
|
|
9198
9328
|
system,
|
|
9199
9329
|
prompt,
|
|
9200
|
-
messages
|
|
9330
|
+
messages,
|
|
9331
|
+
allowSystemInMessages
|
|
9201
9332
|
});
|
|
9202
9333
|
const promptMessages = await convertToLanguageModelPrompt({
|
|
9203
9334
|
prompt: standardizedPrompt,
|
|
@@ -9485,6 +9616,7 @@ function streamObject(options) {
|
|
|
9485
9616
|
system,
|
|
9486
9617
|
prompt,
|
|
9487
9618
|
messages,
|
|
9619
|
+
allowSystemInMessages,
|
|
9488
9620
|
maxRetries,
|
|
9489
9621
|
abortSignal,
|
|
9490
9622
|
headers,
|
|
@@ -9532,6 +9664,7 @@ function streamObject(options) {
|
|
|
9532
9664
|
system,
|
|
9533
9665
|
prompt,
|
|
9534
9666
|
messages,
|
|
9667
|
+
allowSystemInMessages,
|
|
9535
9668
|
schemaName,
|
|
9536
9669
|
schemaDescription,
|
|
9537
9670
|
providerOptions,
|
|
@@ -9556,6 +9689,7 @@ var DefaultStreamObjectResult = class {
|
|
|
9556
9689
|
system,
|
|
9557
9690
|
prompt,
|
|
9558
9691
|
messages,
|
|
9692
|
+
allowSystemInMessages,
|
|
9559
9693
|
schemaName,
|
|
9560
9694
|
schemaDescription,
|
|
9561
9695
|
providerOptions,
|
|
@@ -9625,7 +9759,8 @@ var DefaultStreamObjectResult = class {
|
|
|
9625
9759
|
const standardizedPrompt = await standardizePrompt({
|
|
9626
9760
|
system,
|
|
9627
9761
|
prompt,
|
|
9628
|
-
messages
|
|
9762
|
+
messages,
|
|
9763
|
+
allowSystemInMessages
|
|
9629
9764
|
});
|
|
9630
9765
|
const callOptions = {
|
|
9631
9766
|
responseFormat: {
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ApexFindingObject
|
|
3
|
+
} from "./cli-k0730f59.js";
|
|
4
|
+
import {
|
|
5
|
+
ALL_TOOL_NAMES,
|
|
6
|
+
ASK_USER_QUESTIONS_TOOL_NAME,
|
|
7
|
+
AgentEventBus,
|
|
8
|
+
AskUserQuestionSchema,
|
|
9
|
+
BASE_SYSTEM_PROMPT,
|
|
10
|
+
BROWSER_TOOL_NAMES,
|
|
11
|
+
EMAIL_TOOL_NAMES,
|
|
12
|
+
OffensiveSecurityAgent,
|
|
13
|
+
PLAN_MODE_TOOL_NAMES,
|
|
14
|
+
PersistentShell,
|
|
15
|
+
PlaywrightMcpSession,
|
|
16
|
+
RESPONSE_TOOL_NAME,
|
|
17
|
+
SEND_EMAIL_TOOL_NAME,
|
|
18
|
+
SKILL_TOOL_NAMES,
|
|
19
|
+
ScopeViolationError,
|
|
20
|
+
StepTraceWriter,
|
|
21
|
+
addMemory,
|
|
22
|
+
assertCommandInScope,
|
|
23
|
+
assertUrlInScope,
|
|
24
|
+
authenticateSession,
|
|
25
|
+
buildBaseSystemPrompt,
|
|
26
|
+
buildProvidedFilesSection,
|
|
27
|
+
buildSessionWorkspaceSection,
|
|
28
|
+
checkSandboxPlaywright,
|
|
29
|
+
checkpointState,
|
|
30
|
+
completeAuthentication,
|
|
31
|
+
crawlAuthenticated,
|
|
32
|
+
createAllTools,
|
|
33
|
+
createAttackSurfaceReport,
|
|
34
|
+
createBrowserTools,
|
|
35
|
+
createBrowserToolset,
|
|
36
|
+
createEmailToolset,
|
|
37
|
+
createFile,
|
|
38
|
+
createResponseTool,
|
|
39
|
+
createSandboxBrowserTools,
|
|
40
|
+
createTask,
|
|
41
|
+
delegateAuth,
|
|
42
|
+
detectAuthScheme,
|
|
43
|
+
documentApp,
|
|
44
|
+
documentEndpoint,
|
|
45
|
+
documentVulnerability,
|
|
46
|
+
ensureSandboxBrowser,
|
|
47
|
+
ensureSandboxPlaywright,
|
|
48
|
+
executeCommand,
|
|
49
|
+
extractFallbackStdout,
|
|
50
|
+
extractHostname,
|
|
51
|
+
extractHostsFromCommand,
|
|
52
|
+
extractJsEndpoints,
|
|
53
|
+
getAllowedHosts,
|
|
54
|
+
getApexTmpRoot,
|
|
55
|
+
getMemory,
|
|
56
|
+
getPage,
|
|
57
|
+
grep,
|
|
58
|
+
httpRequest,
|
|
59
|
+
installSandboxPlaywright,
|
|
60
|
+
isHostAllowed,
|
|
61
|
+
listFiles,
|
|
62
|
+
listMemories,
|
|
63
|
+
listTasksTool,
|
|
64
|
+
parseStorageStateResult,
|
|
65
|
+
probeAuthEndpoints,
|
|
66
|
+
provideComparisonResults,
|
|
67
|
+
readFile,
|
|
68
|
+
readSkill,
|
|
69
|
+
readTempfileCapped,
|
|
70
|
+
runAttackSurface,
|
|
71
|
+
runPentestWorkflow,
|
|
72
|
+
setHeadlessMode,
|
|
73
|
+
setUserAgent,
|
|
74
|
+
setViewportSize,
|
|
75
|
+
spawnCodingAgent,
|
|
76
|
+
spawnPentestAgent,
|
|
77
|
+
spawnPentestSwarm,
|
|
78
|
+
submitPlan,
|
|
79
|
+
testEndpointVariations,
|
|
80
|
+
transformScriptToFunction,
|
|
81
|
+
updateFile,
|
|
82
|
+
updateTask,
|
|
83
|
+
validateDiscovery,
|
|
84
|
+
webSearch,
|
|
85
|
+
writePlan
|
|
86
|
+
} from "./cli-wfmdch3r.js";
|
|
87
|
+
import"./cli-mswm4k81.js";
|
|
88
|
+
import"./cli-ryy39d77.js";
|
|
89
|
+
import"./cli-c8131c4q.js";
|
|
90
|
+
import"./cli-s1nckt4k.js";
|
|
91
|
+
import"./cli-87zakjb2.js";
|
|
92
|
+
import"./cli-6p7d2k55.js";
|
|
93
|
+
import"./cli-w5990vr6.js";
|
|
94
|
+
import"./cli-e6rgwtpb.js";
|
|
95
|
+
import"./cli-9egg9azd.js";
|
|
96
|
+
import"./cli-gpnb45ck.js";
|
|
97
|
+
import"./cli-gtcd5c3f.js";
|
|
98
|
+
import"./cli-g5h24ny8.js";
|
|
99
|
+
import"./cli-8rxa073f.js";
|
|
100
|
+
export {
|
|
101
|
+
writePlan,
|
|
102
|
+
webSearch,
|
|
103
|
+
validateDiscovery,
|
|
104
|
+
updateTask,
|
|
105
|
+
updateFile,
|
|
106
|
+
transformScriptToFunction,
|
|
107
|
+
testEndpointVariations,
|
|
108
|
+
submitPlan,
|
|
109
|
+
spawnPentestSwarm,
|
|
110
|
+
spawnPentestAgent,
|
|
111
|
+
spawnCodingAgent,
|
|
112
|
+
setViewportSize,
|
|
113
|
+
setUserAgent,
|
|
114
|
+
setHeadlessMode,
|
|
115
|
+
runPentestWorkflow,
|
|
116
|
+
runAttackSurface,
|
|
117
|
+
readTempfileCapped,
|
|
118
|
+
readSkill,
|
|
119
|
+
readFile,
|
|
120
|
+
provideComparisonResults,
|
|
121
|
+
probeAuthEndpoints,
|
|
122
|
+
parseStorageStateResult,
|
|
123
|
+
listTasksTool,
|
|
124
|
+
listMemories,
|
|
125
|
+
listFiles,
|
|
126
|
+
isHostAllowed,
|
|
127
|
+
installSandboxPlaywright,
|
|
128
|
+
httpRequest,
|
|
129
|
+
grep,
|
|
130
|
+
getPage,
|
|
131
|
+
getMemory,
|
|
132
|
+
getApexTmpRoot,
|
|
133
|
+
getAllowedHosts,
|
|
134
|
+
extractJsEndpoints,
|
|
135
|
+
extractHostsFromCommand,
|
|
136
|
+
extractHostname,
|
|
137
|
+
extractFallbackStdout,
|
|
138
|
+
executeCommand,
|
|
139
|
+
ensureSandboxPlaywright,
|
|
140
|
+
ensureSandboxBrowser,
|
|
141
|
+
documentVulnerability,
|
|
142
|
+
documentEndpoint,
|
|
143
|
+
documentApp,
|
|
144
|
+
detectAuthScheme,
|
|
145
|
+
delegateAuth,
|
|
146
|
+
createTask,
|
|
147
|
+
createSandboxBrowserTools,
|
|
148
|
+
createResponseTool,
|
|
149
|
+
createFile,
|
|
150
|
+
createEmailToolset,
|
|
151
|
+
createBrowserToolset,
|
|
152
|
+
createBrowserTools,
|
|
153
|
+
createAttackSurfaceReport,
|
|
154
|
+
createAllTools,
|
|
155
|
+
crawlAuthenticated,
|
|
156
|
+
completeAuthentication,
|
|
157
|
+
checkpointState,
|
|
158
|
+
checkSandboxPlaywright,
|
|
159
|
+
buildSessionWorkspaceSection,
|
|
160
|
+
buildProvidedFilesSection,
|
|
161
|
+
buildBaseSystemPrompt,
|
|
162
|
+
authenticateSession,
|
|
163
|
+
assertUrlInScope,
|
|
164
|
+
assertCommandInScope,
|
|
165
|
+
addMemory,
|
|
166
|
+
StepTraceWriter,
|
|
167
|
+
ScopeViolationError,
|
|
168
|
+
SKILL_TOOL_NAMES,
|
|
169
|
+
SEND_EMAIL_TOOL_NAME,
|
|
170
|
+
RESPONSE_TOOL_NAME,
|
|
171
|
+
PlaywrightMcpSession,
|
|
172
|
+
PersistentShell,
|
|
173
|
+
PLAN_MODE_TOOL_NAMES,
|
|
174
|
+
OffensiveSecurityAgent,
|
|
175
|
+
EMAIL_TOOL_NAMES as EMAIL_TOOL_NAMES_ACTIVE,
|
|
176
|
+
EMAIL_TOOL_NAMES,
|
|
177
|
+
BROWSER_TOOL_NAMES,
|
|
178
|
+
BASE_SYSTEM_PROMPT,
|
|
179
|
+
AskUserQuestionSchema,
|
|
180
|
+
ApexFindingObject,
|
|
181
|
+
AgentEventBus,
|
|
182
|
+
ASK_USER_QUESTIONS_TOOL_NAME,
|
|
183
|
+
ALL_TOOL_NAMES
|
|
184
|
+
};
|
|
@@ -3,10 +3,29 @@ import {
|
|
|
3
3
|
getIssue,
|
|
4
4
|
listIssues,
|
|
5
5
|
updateIssue
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
6
|
+
} from "./cli-q8dfq25x.js";
|
|
7
|
+
import"./cli-rhry8mat.js";
|
|
8
|
+
import"./cli-v9ds4jb8.js";
|
|
9
|
+
import"./cli-0tnv1vkp.js";
|
|
10
|
+
import"./cli-8frjr68r.js";
|
|
11
|
+
import"./cli-4xb21y6g.js";
|
|
12
|
+
import"./cli-abbka8n3.js";
|
|
13
|
+
import"./cli-9fsre5pt.js";
|
|
14
|
+
import"./cli-k0730f59.js";
|
|
15
|
+
import"./cli-wfmdch3r.js";
|
|
16
|
+
import"./cli-mswm4k81.js";
|
|
17
|
+
import"./cli-ryy39d77.js";
|
|
18
|
+
import"./cli-fw5r7pfj.js";
|
|
19
|
+
import"./cli-c8131c4q.js";
|
|
20
|
+
import"./cli-s1nckt4k.js";
|
|
21
|
+
import"./cli-87zakjb2.js";
|
|
22
|
+
import"./cli-6p7d2k55.js";
|
|
23
|
+
import"./cli-w5990vr6.js";
|
|
24
|
+
import"./cli-e6rgwtpb.js";
|
|
25
|
+
import"./cli-9egg9azd.js";
|
|
26
|
+
import"./cli-gpnb45ck.js";
|
|
27
|
+
import"./cli-gtcd5c3f.js";
|
|
28
|
+
import"./cli-g5h24ny8.js";
|
|
10
29
|
import"./cli-8rxa073f.js";
|
|
11
30
|
|
|
12
31
|
// src/cli/issues.ts
|
|
@@ -17,8 +36,10 @@ function getFlag(flag, argv) {
|
|
|
17
36
|
function showHelp() {
|
|
18
37
|
console.log(`pensar issues — Manage security issues via the Pensar API
|
|
19
38
|
|
|
39
|
+
All commands operate on the selected workspace (set via \`pensar login\`).
|
|
40
|
+
|
|
20
41
|
Usage:
|
|
21
|
-
pensar issues
|
|
42
|
+
pensar issues [filters] List issues in the workspace
|
|
22
43
|
pensar issues get <issueId> Get issue details
|
|
23
44
|
pensar issues update <issueId> [options] Update an issue
|
|
24
45
|
|
|
@@ -41,7 +62,7 @@ Options:
|
|
|
41
62
|
async function main() {
|
|
42
63
|
const args = process.argv.slice(2);
|
|
43
64
|
const sub = args[0];
|
|
44
|
-
if (
|
|
65
|
+
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
45
66
|
showHelp();
|
|
46
67
|
return;
|
|
47
68
|
}
|
|
@@ -75,15 +96,18 @@ async function main() {
|
|
|
75
96
|
userFlaggedFalsePositiveReason
|
|
76
97
|
});
|
|
77
98
|
console.log(JSON.stringify(result, null, 2));
|
|
78
|
-
} else {
|
|
79
|
-
const
|
|
80
|
-
const issues = await listIssues(projectId, {
|
|
99
|
+
} else if (!sub || sub === "list" || sub.startsWith("--")) {
|
|
100
|
+
const issues = await listIssues({
|
|
81
101
|
scanId: getFlag("--scan", args),
|
|
82
102
|
status: getFlag("--status", args),
|
|
83
103
|
severity: getFlag("--severity", args),
|
|
84
104
|
branch: getFlag("--branch", args)
|
|
85
105
|
});
|
|
86
106
|
console.log(JSON.stringify(issues, null, 2));
|
|
107
|
+
} else {
|
|
108
|
+
console.error(`Error: Unknown subcommand "${sub}"`);
|
|
109
|
+
showHelp();
|
|
110
|
+
process.exit(1);
|
|
87
111
|
}
|
|
88
112
|
} catch (err) {
|
|
89
113
|
console.error(`
|
|
@@ -2,10 +2,29 @@
|
|
|
2
2
|
import {
|
|
3
3
|
listAgentLogs,
|
|
4
4
|
searchAgentLogs
|
|
5
|
-
} from "./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
5
|
+
} from "./cli-q8dfq25x.js";
|
|
6
|
+
import"./cli-rhry8mat.js";
|
|
7
|
+
import"./cli-v9ds4jb8.js";
|
|
8
|
+
import"./cli-0tnv1vkp.js";
|
|
9
|
+
import"./cli-8frjr68r.js";
|
|
10
|
+
import"./cli-4xb21y6g.js";
|
|
11
|
+
import"./cli-abbka8n3.js";
|
|
12
|
+
import"./cli-9fsre5pt.js";
|
|
13
|
+
import"./cli-k0730f59.js";
|
|
14
|
+
import"./cli-wfmdch3r.js";
|
|
15
|
+
import"./cli-mswm4k81.js";
|
|
16
|
+
import"./cli-ryy39d77.js";
|
|
17
|
+
import"./cli-fw5r7pfj.js";
|
|
18
|
+
import"./cli-c8131c4q.js";
|
|
19
|
+
import"./cli-s1nckt4k.js";
|
|
20
|
+
import"./cli-87zakjb2.js";
|
|
21
|
+
import"./cli-6p7d2k55.js";
|
|
22
|
+
import"./cli-w5990vr6.js";
|
|
23
|
+
import"./cli-e6rgwtpb.js";
|
|
24
|
+
import"./cli-9egg9azd.js";
|
|
25
|
+
import"./cli-gpnb45ck.js";
|
|
26
|
+
import"./cli-gtcd5c3f.js";
|
|
27
|
+
import"./cli-g5h24ny8.js";
|
|
9
28
|
import"./cli-8rxa073f.js";
|
|
10
29
|
|
|
11
30
|
// src/cli/logs.ts
|