@pensar/apex 1.7.0 → 1.8.0-canary.0d99fc6b

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.
Files changed (62) hide show
  1. package/build/agent-4r4v67zn.js +21 -0
  2. package/build/agent-7e2fje70.js +23 -0
  3. package/build/agent-w6269xc8.js +202 -0
  4. package/build/apps-j0ttt7aq.js +455 -0
  5. package/build/{auth-wvh553ea.js → auth-1z15wb4n.js} +29 -8
  6. package/build/authentication-6jjg1t5a.js +21 -0
  7. package/build/blackboxAgent-s8w6f6q3.js +21 -0
  8. package/build/{blackboxPentest-rwyjy4kq.js → blackboxPentest-axb8q31y.js} +17 -16
  9. package/build/{cli-zr7sg2m2.js → cli-1t4bfz5p.js} +6 -2
  10. package/build/{cli-0ghkg3w6.js → cli-2sdqzmg5.js} +19345 -19056
  11. package/build/{cli-5m0347h3.js → cli-2sv6r1yn.js} +105 -34
  12. package/build/cli-319h88b8.js +20 -0
  13. package/build/{cli-x3k26g1t.js → cli-3e5y21yf.js} +100727 -105760
  14. package/build/{authentication-ec7trwb4.js → cli-5741e39a.js} +8 -17
  15. package/build/cli-5x18s214.js +19 -0
  16. package/build/cli-7pg2p4df.js +52 -0
  17. package/build/{cli-nqx9y9ds.js → cli-8vt56350.js} +241 -248
  18. package/build/cli-9fsre5pt.js +0 -0
  19. package/build/{cli-rc7hyq7e.js → cli-c1dq3bjq.js} +35459 -33517
  20. package/build/{cli-836bfgxg.js → cli-cjqzxgq1.js} +589 -33
  21. package/build/cli-ekxab87x.js +7235 -0
  22. package/build/{cli-06zt0g1a.js → cli-f5dydcws.js} +6 -4
  23. package/build/cli-gjyeds7x.js +196 -0
  24. package/build/{cli-tp1tqn3k.js → cli-mswm4k81.js} +1 -1
  25. package/build/{cli-xtqm11qt.js → cli-peywcat1.js} +206 -65
  26. package/build/cli-rayda5y4.js +499 -0
  27. package/build/{cli-40ef01tb.js → cli-xgnxtfvg.js} +24 -7
  28. package/build/cli.js +282 -268
  29. package/build/{doctor-8tva8j99.js → doctor-2bkpddws.js} +1 -1
  30. package/build/{fixes-1z283wdz.js → fixes-dzmqth18.js} +22 -4
  31. package/build/{index-5a173a2k.js → index-1t8g503m.js} +17 -105
  32. package/build/index-cnd29sn5.js +183 -0
  33. package/build/{index-j3hw6d4w.js → index-mqda3zkc.js} +23034 -16643
  34. package/build/{index-1p5bg26t.js → index-nhw65p67.js} +8 -11
  35. package/build/index-nkbryzv4.js +45 -0
  36. package/build/{index-py7gtxez.js → index-t6r2s52n.js} +4 -2
  37. package/build/{index-dw1xbhfn.js → index-yvafffn2.js} +161 -26
  38. package/build/{issues-trbzy8n0.js → issues-kxm9dnkf.js} +22 -4
  39. package/build/{logs-c88md0h3.js → logs-ytae940p.js} +22 -4
  40. package/build/{main-3d7dfdvs.js → main-3zneyg7p.js} +93 -17
  41. package/build/{offesecAgent-ahcz5hcx.js → offesecAgent-kthqbs1e.js} +12 -10
  42. package/build/pentest-27z433th.js +30 -0
  43. package/build/{pentests-re8dzxt9.js → pentests-h0ykqd4f.js} +22 -4
  44. package/build/{projects-dqp4m0ws.js → projects-b91c2yaq.js} +22 -4
  45. package/build/{targetedPentest-de8a67va.js → targetedPentest-c2ndcc0w.js} +13 -11
  46. package/build/threatModel-4svjbnwh.js +28 -0
  47. package/build/{uninstall-0bwz7jdn.js → uninstall-vbg4v6q0.js} +6 -4
  48. package/build/{utils-jf52rmrb.js → utils-h3p6pa7c.js} +11 -9
  49. package/package.json +81 -84
  50. package/build/agent-63cc9rpx.js +0 -19
  51. package/build/agent-beywhvf3.js +0 -278
  52. package/build/blackboxAgent-ng2t2p2x.js +0 -19
  53. package/build/cli-03z6pswp.js +0 -1423
  54. package/build/cli-09prdch1.js +0 -1207
  55. package/build/cli-0fy9j5dw.js +0 -61
  56. package/build/cli-gr3zncst.js +0 -645
  57. package/build/cli-q2dty8g4.js +0 -110
  58. package/build/cli-r879p2yz.js +0 -190
  59. package/build/cli-vvyq7ace.js +0 -103
  60. package/build/index-a4ydz3dd.js +0 -32
  61. package/build/pentest-4932ke3a.js +0 -29
  62. package/build/threatModel-waz866yk.js +0 -67
@@ -0,0 +1,455 @@
1
+ #!/usr/bin/env bun
2
+ import {
3
+ createApp,
4
+ createEndpoint,
5
+ deleteApp,
6
+ deleteEndpoint,
7
+ getApp,
8
+ getEndpoint,
9
+ listApps,
10
+ listEndpoints,
11
+ searchApps,
12
+ searchEndpoints,
13
+ updateApp,
14
+ updateEndpoint
15
+ } from "./cli-cjqzxgq1.js";
16
+ import"./cli-ekxab87x.js";
17
+ import"./cli-2sv6r1yn.js";
18
+ import"./cli-1t4bfz5p.js";
19
+ import"./cli-rayda5y4.js";
20
+ import"./cli-f5dydcws.js";
21
+ import"./cli-fw5r7pfj.js";
22
+ import"./cli-5741e39a.js";
23
+ import"./cli-9fsre5pt.js";
24
+ import"./cli-7pg2p4df.js";
25
+ import"./cli-3e5y21yf.js";
26
+ import"./cli-mswm4k81.js";
27
+ import"./cli-8vt56350.js";
28
+ import"./cli-3y0dgy56.js";
29
+ import"./cli-319h88b8.js";
30
+ import"./cli-5x18s214.js";
31
+ import"./cli-c1dq3bjq.js";
32
+ import"./cli-peywcat1.js";
33
+ import"./cli-2sdqzmg5.js";
34
+ import"./cli-gpnb45ck.js";
35
+ import"./cli-xgnxtfvg.js";
36
+ import"./cli-gjyeds7x.js";
37
+ import"./cli-8rxa073f.js";
38
+
39
+ // src/cli/apps.ts
40
+ var APPLICATION_TYPES = [
41
+ "ui",
42
+ "api-service",
43
+ "web-application",
44
+ "full-stack",
45
+ "domain",
46
+ "subdomain",
47
+ "database",
48
+ "cloud-resource",
49
+ "storage"
50
+ ];
51
+ var ENDPOINT_TYPES = [
52
+ "api-endpoint",
53
+ "web-endpoint",
54
+ "auth-endpoint",
55
+ "database",
56
+ "file-storage",
57
+ "asset"
58
+ ];
59
+ function getFlag(flag, argv) {
60
+ const idx = argv.indexOf(flag);
61
+ return idx !== -1 && idx + 1 < argv.length ? argv[idx + 1] : undefined;
62
+ }
63
+ function getAllFlags(flag, argv) {
64
+ const values = [];
65
+ for (let i = 0;i < argv.length; i++) {
66
+ const next = argv[i + 1];
67
+ if (argv[i] === flag && next !== undefined) {
68
+ values.push(next);
69
+ }
70
+ }
71
+ return values;
72
+ }
73
+ function hasFlag(flag, argv) {
74
+ return argv.includes(flag);
75
+ }
76
+ function parseAppType(value) {
77
+ if (value === undefined)
78
+ return;
79
+ if (!APPLICATION_TYPES.includes(value)) {
80
+ throw new Error(`Invalid --type "${value}". Must be one of: ${APPLICATION_TYPES.join(", ")}`);
81
+ }
82
+ return value;
83
+ }
84
+ function parseEndpointType(value) {
85
+ if (value === undefined)
86
+ return;
87
+ if (!ENDPOINT_TYPES.includes(value)) {
88
+ throw new Error(`Invalid --type "${value}". Must be one of: ${ENDPOINT_TYPES.join(", ")}`);
89
+ }
90
+ return value;
91
+ }
92
+ function parseInteger(flag, value) {
93
+ if (value === undefined)
94
+ return;
95
+ const n = Number(value);
96
+ if (!Number.isFinite(n) || !Number.isInteger(n)) {
97
+ throw new Error(`${flag} must be an integer (got "${value}")`);
98
+ }
99
+ return n;
100
+ }
101
+ function parseNumber(flag, value) {
102
+ if (value === undefined)
103
+ return;
104
+ const n = Number(value);
105
+ if (!Number.isFinite(n)) {
106
+ throw new Error(`${flag} must be a number (got "${value}")`);
107
+ }
108
+ return n;
109
+ }
110
+ function showHelp() {
111
+ console.log(`pensar apps — Manage the project attack surface (apps & endpoints)
112
+
113
+ Usage:
114
+ pensar apps <projectId> List apps for a project
115
+ pensar apps get <appId> Show app details
116
+ pensar apps create <projectId> [options] Create an app
117
+ pensar apps update <appId> [options] Update an app
118
+ pensar apps delete <appId> Delete an app
119
+ pensar apps endpoints <appId> [filters] List endpoints
120
+ pensar apps endpoint <endpointId> Show endpoint details
121
+ pensar apps endpoint-create <appId> [options] Create an endpoint
122
+ pensar apps endpoint-update <endpointId> [options] Update an endpoint
123
+ pensar apps endpoint-delete <endpointId> Delete an endpoint
124
+ pensar apps search <query> [options] Substring-search apps
125
+ pensar apps search-endpoints <query> [options] Substring-search endpoints
126
+
127
+ App fields (create requires --name and --description):
128
+ --name <text> Application name
129
+ --description <text> Application description
130
+ --type <type> One of: ${APPLICATION_TYPES.join(", ")}
131
+ --framework <text> Framework / runtime hint
132
+ --domain <id> Linked domain UUID
133
+ --disallowed-actions <text> Free-form disallowed actions notes
134
+
135
+ List pagination (for "<projectId>" and "endpoints <appId>"):
136
+ --limit <n> Page size (default 100, max 200)
137
+ --offset <n> Page offset (default 0)
138
+ Responses include { ..., hasMore, limit, offset }; iterate by
139
+ incrementing --offset by --limit until hasMore is false.
140
+
141
+ Endpoint filters (for "endpoints"):
142
+ --type <type> One of: ${ENDPOINT_TYPES.join(", ")}
143
+ --min-risk <score> Minimum risk score (0–10)
144
+
145
+ Search options:
146
+ --project <id> Scope search to a project (search-endpoints also
147
+ supports --app <id> to scope to a single app)
148
+ --type <type> Filter by application or endpoint type
149
+ --min-risk <score> Endpoint search only: minimum risk score
150
+ --auth-required Endpoint search only: only auth-required endpoints
151
+ --no-auth-required Endpoint search only: only public endpoints
152
+ --limit <n> Page size (default 50, max 200)
153
+ --offset <n> Page offset
154
+
155
+ Endpoint fields (create requires --endpoint and --description):
156
+ --endpoint <text> Endpoint path / URL / route
157
+ --description <text> Endpoint description
158
+ --type <type> One of: ${ENDPOINT_TYPES.join(", ")}
159
+ --location <text> Source file (whitebox)
160
+ --start-line <n> Start line number
161
+ --end-line <n> End line number
162
+ --objective <text> Repeatable: testing objective for the endpoint
163
+ --auth-required Mark endpoint as authentication-required
164
+ --no-auth-required Mark endpoint as not requiring auth
165
+ --auth-details <text> Free-form auth details
166
+ --business-logic <text> Business-logic notes
167
+ --threat-model <text> Per-endpoint threat model notes
168
+
169
+ Options:
170
+ -h, --help Show this help message`);
171
+ }
172
+ function parseAppCreateOptions(argv) {
173
+ const name = getFlag("--name", argv);
174
+ const description = getFlag("--description", argv);
175
+ if (!name)
176
+ throw new Error("--name is required");
177
+ if (description === undefined)
178
+ throw new Error("--description is required");
179
+ const type = parseAppType(getFlag("--type", argv));
180
+ const framework = getFlag("--framework", argv);
181
+ const domainId = getFlag("--domain", argv);
182
+ const disallowedActions = getFlag("--disallowed-actions", argv);
183
+ return {
184
+ name,
185
+ description,
186
+ ...type !== undefined ? { type } : {},
187
+ ...framework !== undefined ? { framework } : {},
188
+ ...domainId !== undefined ? { domainId } : {},
189
+ ...disallowedActions !== undefined ? { disallowedActions } : {}
190
+ };
191
+ }
192
+ function parseAppUpdateOptions(argv) {
193
+ const update = {};
194
+ const name = getFlag("--name", argv);
195
+ if (name !== undefined)
196
+ update.name = name;
197
+ const description = getFlag("--description", argv);
198
+ if (description !== undefined)
199
+ update.description = description;
200
+ const type = parseAppType(getFlag("--type", argv));
201
+ if (type !== undefined)
202
+ update.type = type;
203
+ const framework = getFlag("--framework", argv);
204
+ if (framework !== undefined)
205
+ update.framework = framework;
206
+ const domain = getFlag("--domain", argv);
207
+ if (domain !== undefined)
208
+ update.domainId = domain;
209
+ const disallowed = getFlag("--disallowed-actions", argv);
210
+ if (disallowed !== undefined)
211
+ update.disallowedActions = disallowed;
212
+ return update;
213
+ }
214
+ function parseAuthenticationRequiredFlag(argv) {
215
+ const yes = hasFlag("--auth-required", argv);
216
+ const no = hasFlag("--no-auth-required", argv);
217
+ const details = getFlag("--auth-details", argv);
218
+ if (!yes && !no && details === undefined)
219
+ return;
220
+ if (yes && no) {
221
+ throw new Error("--auth-required and --no-auth-required are mutually exclusive");
222
+ }
223
+ return {
224
+ required: yes,
225
+ ...details !== undefined ? { details } : {}
226
+ };
227
+ }
228
+ function parseEndpointCreateOptions(argv) {
229
+ const endpoint = getFlag("--endpoint", argv);
230
+ const description = getFlag("--description", argv);
231
+ if (!endpoint)
232
+ throw new Error("--endpoint is required");
233
+ if (description === undefined)
234
+ throw new Error("--description is required");
235
+ const type = parseEndpointType(getFlag("--type", argv));
236
+ const location = getFlag("--location", argv);
237
+ const startLineNumber = parseInteger("--start-line", getFlag("--start-line", argv));
238
+ const endLineNumber = parseInteger("--end-line", getFlag("--end-line", argv));
239
+ const objectives = getAllFlags("--objective", argv);
240
+ const authenticationRequired = parseAuthenticationRequiredFlag(argv);
241
+ const businessLogic = getFlag("--business-logic", argv);
242
+ const threatModel = getFlag("--threat-model", argv);
243
+ return {
244
+ endpoint,
245
+ description,
246
+ ...type !== undefined ? { type } : {},
247
+ ...location !== undefined ? { location } : {},
248
+ ...startLineNumber !== undefined ? { startLineNumber } : {},
249
+ ...endLineNumber !== undefined ? { endLineNumber } : {},
250
+ ...objectives.length > 0 ? { objectives } : {},
251
+ ...authenticationRequired !== undefined ? { authenticationRequired } : {},
252
+ ...businessLogic !== undefined ? { businessLogic } : {},
253
+ ...threatModel !== undefined ? { threatModel } : {}
254
+ };
255
+ }
256
+ function parseEndpointUpdateOptions(argv) {
257
+ const update = {};
258
+ const endpoint = getFlag("--endpoint", argv);
259
+ if (endpoint !== undefined)
260
+ update.endpoint = endpoint;
261
+ const description = getFlag("--description", argv);
262
+ if (description !== undefined)
263
+ update.description = description;
264
+ const type = parseEndpointType(getFlag("--type", argv));
265
+ if (type !== undefined)
266
+ update.type = type;
267
+ const location = getFlag("--location", argv);
268
+ if (location !== undefined)
269
+ update.location = location;
270
+ const startLine = parseInteger("--start-line", getFlag("--start-line", argv));
271
+ if (startLine !== undefined)
272
+ update.startLineNumber = startLine;
273
+ const endLine = parseInteger("--end-line", getFlag("--end-line", argv));
274
+ if (endLine !== undefined)
275
+ update.endLineNumber = endLine;
276
+ const objectives = getAllFlags("--objective", argv);
277
+ if (objectives.length > 0)
278
+ update.objectives = objectives;
279
+ const auth = parseAuthenticationRequiredFlag(argv);
280
+ if (auth !== undefined)
281
+ update.authenticationRequired = auth;
282
+ const businessLogic = getFlag("--business-logic", argv);
283
+ if (businessLogic !== undefined)
284
+ update.businessLogic = businessLogic;
285
+ const threatModel = getFlag("--threat-model", argv);
286
+ if (threatModel !== undefined)
287
+ update.threatModel = threatModel;
288
+ return update;
289
+ }
290
+ async function main() {
291
+ const args = process.argv.slice(2);
292
+ const sub = args[0];
293
+ if (!sub || sub === "--help" || sub === "-h" || sub === "help") {
294
+ showHelp();
295
+ return;
296
+ }
297
+ try {
298
+ if (sub === "get") {
299
+ const appId = args[1];
300
+ if (!appId) {
301
+ console.error("Error: app ID is required");
302
+ console.error("Usage: pensar apps get <appId>");
303
+ process.exit(1);
304
+ }
305
+ const app = await getApp(appId);
306
+ console.log(JSON.stringify(app, null, 2));
307
+ } else if (sub === "create") {
308
+ const projectId = args[1];
309
+ if (!projectId) {
310
+ console.error("Error: project ID is required");
311
+ console.error("Usage: pensar apps create <projectId> --name N --description D");
312
+ process.exit(1);
313
+ }
314
+ const opts = parseAppCreateOptions(args);
315
+ const result = await createApp(projectId, opts);
316
+ console.log(JSON.stringify(result, null, 2));
317
+ } else if (sub === "update") {
318
+ const appId = args[1];
319
+ if (!appId) {
320
+ console.error("Error: app ID is required");
321
+ console.error("Usage: pensar apps update <appId> [options]");
322
+ process.exit(1);
323
+ }
324
+ const opts = parseAppUpdateOptions(args);
325
+ const result = await updateApp(appId, opts);
326
+ console.log(JSON.stringify(result, null, 2));
327
+ } else if (sub === "delete") {
328
+ const appId = args[1];
329
+ if (!appId) {
330
+ console.error("Error: app ID is required");
331
+ console.error("Usage: pensar apps delete <appId>");
332
+ process.exit(1);
333
+ }
334
+ const result = await deleteApp(appId);
335
+ console.log(JSON.stringify(result, null, 2));
336
+ } else if (sub === "endpoints") {
337
+ const appId = args[1];
338
+ if (!appId) {
339
+ console.error("Error: app ID is required");
340
+ console.error("Usage: pensar apps endpoints <appId> [filters]");
341
+ process.exit(1);
342
+ }
343
+ const type = parseEndpointType(getFlag("--type", args));
344
+ const minRiskScore = parseNumber("--min-risk", getFlag("--min-risk", args));
345
+ const limit = parseInteger("--limit", getFlag("--limit", args));
346
+ const offset = parseInteger("--offset", getFlag("--offset", args));
347
+ const filters = {
348
+ ...type !== undefined ? { type } : {},
349
+ ...minRiskScore !== undefined ? { minRiskScore } : {},
350
+ ...limit !== undefined ? { limit } : {},
351
+ ...offset !== undefined ? { offset } : {}
352
+ };
353
+ const result = await listEndpoints(appId, filters);
354
+ console.log(JSON.stringify(result, null, 2));
355
+ } else if (sub === "endpoint") {
356
+ const endpointId = args[1];
357
+ if (!endpointId) {
358
+ console.error("Error: endpoint ID is required");
359
+ console.error("Usage: pensar apps endpoint <endpointId>");
360
+ process.exit(1);
361
+ }
362
+ const result = await getEndpoint(endpointId);
363
+ console.log(JSON.stringify(result, null, 2));
364
+ } else if (sub === "endpoint-create") {
365
+ const appId = args[1];
366
+ if (!appId) {
367
+ console.error("Error: app ID is required");
368
+ console.error("Usage: pensar apps endpoint-create <appId> --endpoint E --description D");
369
+ process.exit(1);
370
+ }
371
+ const opts = parseEndpointCreateOptions(args);
372
+ const result = await createEndpoint(appId, opts);
373
+ console.log(JSON.stringify(result, null, 2));
374
+ } else if (sub === "endpoint-update") {
375
+ const endpointId = args[1];
376
+ if (!endpointId) {
377
+ console.error("Error: endpoint ID is required");
378
+ console.error("Usage: pensar apps endpoint-update <endpointId> [options]");
379
+ process.exit(1);
380
+ }
381
+ const opts = parseEndpointUpdateOptions(args);
382
+ const result = await updateEndpoint(endpointId, opts);
383
+ console.log(JSON.stringify(result, null, 2));
384
+ } else if (sub === "endpoint-delete") {
385
+ const endpointId = args[1];
386
+ if (!endpointId) {
387
+ console.error("Error: endpoint ID is required");
388
+ console.error("Usage: pensar apps endpoint-delete <endpointId>");
389
+ process.exit(1);
390
+ }
391
+ const result = await deleteEndpoint(endpointId);
392
+ console.log(JSON.stringify(result, null, 2));
393
+ } else if (sub === "search") {
394
+ const query = args[1];
395
+ if (!query || query.startsWith("--")) {
396
+ console.error("Error: search query is required");
397
+ console.error("Usage: pensar apps search <query> [options]");
398
+ process.exit(1);
399
+ }
400
+ const projectId = getFlag("--project", args);
401
+ const type = parseAppType(getFlag("--type", args));
402
+ const limit = parseInteger("--limit", getFlag("--limit", args));
403
+ const offset = parseInteger("--offset", getFlag("--offset", args));
404
+ const result = await searchApps(query, {
405
+ ...projectId !== undefined ? { projectId } : {},
406
+ ...type !== undefined ? { type } : {},
407
+ ...limit !== undefined ? { limit } : {},
408
+ ...offset !== undefined ? { offset } : {}
409
+ });
410
+ console.log(JSON.stringify(result, null, 2));
411
+ } else if (sub === "search-endpoints") {
412
+ const query = args[1];
413
+ if (!query || query.startsWith("--")) {
414
+ console.error("Error: search query is required");
415
+ console.error("Usage: pensar apps search-endpoints <query> [options]");
416
+ process.exit(1);
417
+ }
418
+ const applicationId = getFlag("--app", args);
419
+ const projectId = getFlag("--project", args);
420
+ const type = parseEndpointType(getFlag("--type", args));
421
+ const minRiskScore = parseNumber("--min-risk", getFlag("--min-risk", args));
422
+ const authRequired = hasFlag("--auth-required", args) ? true : hasFlag("--no-auth-required", args) ? false : undefined;
423
+ const limit = parseInteger("--limit", getFlag("--limit", args));
424
+ const offset = parseInteger("--offset", getFlag("--offset", args));
425
+ const result = await searchEndpoints(query, {
426
+ ...applicationId !== undefined ? { applicationId } : {},
427
+ ...projectId !== undefined ? { projectId } : {},
428
+ ...type !== undefined ? { type } : {},
429
+ ...minRiskScore !== undefined ? { minRiskScore } : {},
430
+ ...authRequired !== undefined ? { authRequired } : {},
431
+ ...limit !== undefined ? { limit } : {},
432
+ ...offset !== undefined ? { offset } : {}
433
+ });
434
+ console.log(JSON.stringify(result, null, 2));
435
+ } else if (!sub.startsWith("-")) {
436
+ const projectId = sub;
437
+ const limit = parseInteger("--limit", getFlag("--limit", args));
438
+ const offset = parseInteger("--offset", getFlag("--offset", args));
439
+ const result = await listApps(projectId, {
440
+ ...limit !== undefined ? { limit } : {},
441
+ ...offset !== undefined ? { offset } : {}
442
+ });
443
+ console.log(JSON.stringify(result, null, 2));
444
+ } else {
445
+ console.error(`Error: Unknown subcommand "${sub}"`);
446
+ showHelp();
447
+ process.exit(1);
448
+ }
449
+ } catch (err) {
450
+ console.error(`
451
+ Error: ${err instanceof Error ? err.message : String(err)}`);
452
+ process.exit(1);
453
+ }
454
+ }
455
+ main();
@@ -1,27 +1,48 @@
1
1
  #!/usr/bin/env bun
2
+ import"./cli-cjqzxgq1.js";
3
+ import"./cli-ekxab87x.js";
4
+ import"./cli-2sv6r1yn.js";
5
+ import"./cli-1t4bfz5p.js";
6
+ import"./cli-rayda5y4.js";
7
+ import"./cli-f5dydcws.js";
8
+ import"./cli-fw5r7pfj.js";
9
+ import"./cli-5741e39a.js";
10
+ import"./cli-9fsre5pt.js";
11
+ import"./cli-7pg2p4df.js";
12
+ import"./cli-3e5y21yf.js";
13
+ import"./cli-mswm4k81.js";
14
+ import"./cli-8vt56350.js";
15
+ import"./cli-3y0dgy56.js";
16
+ import"./cli-319h88b8.js";
17
+ import"./cli-5x18s214.js";
18
+ import"./cli-c1dq3bjq.js";
2
19
  import {
20
+ config,
3
21
  disconnect,
4
22
  fetchWorkspaces,
23
+ getPensarApiUrl,
24
+ getPensarConsoleUrl,
25
+ init_auth,
26
+ init_config,
5
27
  isConnected,
6
28
  pollForWorkspaceCreation,
7
29
  pollLegacyToken,
8
30
  pollWorkOSToken,
9
31
  selectWorkspace,
10
32
  startDeviceFlow
11
- } from "./cli-xtqm11qt.js";
12
- import {
13
- config,
14
- getPensarApiUrl,
15
- getPensarConsoleUrl
16
- } from "./cli-q2dty8g4.js";
17
- import"./cli-40ef01tb.js";
18
- import"./cli-r879p2yz.js";
33
+ } from "./cli-peywcat1.js";
34
+ import"./cli-2sdqzmg5.js";
35
+ import"./cli-gpnb45ck.js";
36
+ import"./cli-xgnxtfvg.js";
37
+ import"./cli-gjyeds7x.js";
19
38
  import {
20
39
  __require
21
40
  } from "./cli-8rxa073f.js";
22
41
 
23
42
  // src/cli/auth.ts
24
43
  import * as readline from "readline";
44
+ init_auth();
45
+ init_config();
25
46
  function openUrl(url) {
26
47
  try {
27
48
  const { spawn } = __require("child_process");
@@ -0,0 +1,21 @@
1
+ import {
2
+ runAuthenticationAgent
3
+ } from "./cli-5741e39a.js";
4
+ import"./cli-9fsre5pt.js";
5
+ import"./cli-7pg2p4df.js";
6
+ import"./cli-3e5y21yf.js";
7
+ import"./cli-mswm4k81.js";
8
+ import"./cli-8vt56350.js";
9
+ import"./cli-3y0dgy56.js";
10
+ import"./cli-319h88b8.js";
11
+ import"./cli-5x18s214.js";
12
+ import"./cli-c1dq3bjq.js";
13
+ import"./cli-peywcat1.js";
14
+ import"./cli-2sdqzmg5.js";
15
+ import"./cli-gpnb45ck.js";
16
+ import"./cli-xgnxtfvg.js";
17
+ import"./cli-gjyeds7x.js";
18
+ import"./cli-8rxa073f.js";
19
+ export {
20
+ runAuthenticationAgent
21
+ };
@@ -0,0 +1,21 @@
1
+ import {
2
+ BlackboxAttackSurfaceAgent
3
+ } from "./cli-f5dydcws.js";
4
+ import"./cli-9fsre5pt.js";
5
+ import"./cli-7pg2p4df.js";
6
+ import"./cli-3e5y21yf.js";
7
+ import"./cli-mswm4k81.js";
8
+ import"./cli-8vt56350.js";
9
+ import"./cli-3y0dgy56.js";
10
+ import"./cli-319h88b8.js";
11
+ import"./cli-5x18s214.js";
12
+ import"./cli-c1dq3bjq.js";
13
+ import"./cli-peywcat1.js";
14
+ import"./cli-2sdqzmg5.js";
15
+ import"./cli-gpnb45ck.js";
16
+ import"./cli-xgnxtfvg.js";
17
+ import"./cli-gjyeds7x.js";
18
+ import"./cli-8rxa073f.js";
19
+ export {
20
+ BlackboxAttackSurfaceAgent
21
+ };
@@ -1,24 +1,25 @@
1
1
  import {
2
2
  runPentestWorkflow
3
- } from "./cli-09prdch1.js";
4
- import"./cli-gr3zncst.js";
5
- import"./cli-5m0347h3.js";
6
- import"./cli-0fy9j5dw.js";
7
- import"./cli-06zt0g1a.js";
3
+ } from "./cli-ekxab87x.js";
4
+ import"./cli-2sv6r1yn.js";
5
+ import"./cli-1t4bfz5p.js";
6
+ import"./cli-rayda5y4.js";
7
+ import"./cli-f5dydcws.js";
8
8
  import"./cli-fw5r7pfj.js";
9
- import"./cli-zr7sg2m2.js";
10
- import"./cli-x3k26g1t.js";
11
- import"./cli-tp1tqn3k.js";
12
- import"./cli-nqx9y9ds.js";
9
+ import"./cli-9fsre5pt.js";
10
+ import"./cli-7pg2p4df.js";
11
+ import"./cli-3e5y21yf.js";
12
+ import"./cli-mswm4k81.js";
13
+ import"./cli-8vt56350.js";
13
14
  import"./cli-3y0dgy56.js";
14
- import"./cli-rc7hyq7e.js";
15
- import"./cli-0ghkg3w6.js";
16
- import"./cli-xtqm11qt.js";
17
- import"./cli-q2dty8g4.js";
15
+ import"./cli-319h88b8.js";
16
+ import"./cli-5x18s214.js";
17
+ import"./cli-c1dq3bjq.js";
18
+ import"./cli-peywcat1.js";
19
+ import"./cli-2sdqzmg5.js";
18
20
  import"./cli-gpnb45ck.js";
19
- import"./cli-40ef01tb.js";
20
- import"./cli-r879p2yz.js";
21
- import"./cli-03z6pswp.js";
21
+ import"./cli-xgnxtfvg.js";
22
+ import"./cli-gjyeds7x.js";
22
23
  import"./cli-8rxa073f.js";
23
24
 
24
25
  // src/core/api/blackboxPentest.ts
@@ -1,9 +1,13 @@
1
1
  import {
2
2
  OffensiveSecurityAgent
3
- } from "./cli-x3k26g1t.js";
3
+ } from "./cli-3e5y21yf.js";
4
4
  import {
5
+ init_dist,
5
6
  stepCountIs
6
- } from "./cli-rc7hyq7e.js";
7
+ } from "./cli-c1dq3bjq.js";
8
+
9
+ // src/core/agents/specialized/codeAgent/agent.ts
10
+ init_dist();
7
11
 
8
12
  // src/core/agents/specialized/codeAgent/prompts.ts
9
13
  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.