@pensar/apex 2.3.0 → 2.4.0-canary.2d23c2f0

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 (70) hide show
  1. package/build/agent-4wd7a02r.js +29 -0
  2. package/build/agent-cgmq23jr.js +19 -0
  3. package/build/{agent-9xna7jhw.js → agent-gtmbvqh2.js} +11 -11
  4. package/build/{apps-43pqbz7r.js → apps-j2pxtjaq.js} +20 -20
  5. package/build/{auth-c1z670rx.js → auth-7afqr3wp.js} +38 -20
  6. package/build/authentication-hvsegb1p.js +19 -0
  7. package/build/blackboxAgent-47wf7hkx.js +19 -0
  8. package/build/{blackboxPentest-tgc2t3y6.js → blackboxPentest-t2sc2mcg.js} +17 -17
  9. package/build/{cli-eveg9djy.js → cli-21kv9cmn.js} +3 -2
  10. package/build/{cli-vckbhnyk.js → cli-2vmbzyqh.js} +2 -2
  11. package/build/{cli-8rxa073f.js → cli-bc05qbss.js} +8 -6
  12. package/build/{cli-zx8gk8xv.js → cli-bpycpvf6.js} +296 -54
  13. package/build/{cli-f7hanqbw.js → cli-bv9bjvpt.js} +2 -2
  14. package/build/{cli-zk1ch6qf.js → cli-d5n76mez.js} +34 -9
  15. package/build/{cli-q24twygk.js → cli-dm0fc0bm.js} +1 -1
  16. package/build/{cli-yz80qkzn.js → cli-ee3axgts.js} +7 -1
  17. package/build/{cli-baqhqbe5.js → cli-gvwg1z9q.js} +3 -3
  18. package/build/{cli-gpnb45ck.js → cli-j54qa6tm.js} +7 -7
  19. package/build/{cli-50906d27.js → cli-jgy1gn5z.js} +91 -29
  20. package/build/{cli-wszshs5e.js → cli-k71t434r.js} +4 -4
  21. package/build/{cli-72b18z0n.js → cli-kppxpy1r.js} +3 -3
  22. package/build/{cli-zm8tfpv7.js → cli-nrtyzpy4.js} +25 -9
  23. package/build/{cli-n2m2yy5b.js → cli-qdz55t3y.js} +1250 -614
  24. package/build/{cli-barsn8br.js → cli-s0ay7r6x.js} +2 -2
  25. package/build/{cli-3k1x5rn3.js → cli-swpbx60z.js} +1045 -1045
  26. package/build/{cli-j0n189ee.js → cli-tczmn0bc.js} +2 -2
  27. package/build/{cli-jyp2c6th.js → cli-vpxp10qe.js} +2 -2
  28. package/build/{cli-7tw4xfnw.js → cli-vz1abzfe.js} +1 -1
  29. package/build/{cli-f71s6kcw.js → cli-xnmdwvse.js} +81 -215
  30. package/build/{cli-bnkgdywr.js → cli-yrw6ck02.js} +1 -1
  31. package/build/{cli-bv2807tj.js → cli-zhtfn5gp.js} +3 -3
  32. package/build/cli.js +52 -46
  33. package/build/{config-jzqjz606.js → config-5v7ddr7b.js} +5 -5
  34. package/build/{doctor-q3qws68e.js → doctor-jvwt8yq5.js} +10 -9
  35. package/build/{fastStrike-ebz1ph9a.js → fastStrike-k28f6nf3.js} +36 -16
  36. package/build/{fixes-86yebsj0.js → fixes-mpm6r7cp.js} +19 -19
  37. package/build/{index-8db1d2q3.js → index-5phv2wfj.js} +18 -18
  38. package/build/{index-h2hj2hj9.js → index-cbwn03kz.js} +16 -16
  39. package/build/{index-e8c8zcrf.js → index-dq0hvce1.js} +31 -26
  40. package/build/{index-97vx1a24.js → index-gfw12srr.js} +1148 -1086
  41. package/build/{index-gq9h8j5j.js → index-mtq7kmxz.js} +132 -132
  42. package/build/{index-tke6896d.js → index-psqjpw5m.js} +10 -10
  43. package/build/{index-mr2cseg4.js → index-r7hpv8v8.js} +19 -19
  44. package/build/index-s2xwp702.js +12 -0
  45. package/build/{index-32hn8rrw.js → index-twcv8135.js} +3 -3
  46. package/build/{index-468j74f3.js → index-xk4ht3gn.js} +113 -97
  47. package/build/{issues-kh4wg8c5.js → issues-ce9j1an1.js} +19 -19
  48. package/build/{logs-bj28xmbf.js → logs-xv0vs83s.js} +19 -19
  49. package/build/{main-3d7dfdvs.js → main-mmjp338j.js} +9 -9
  50. package/build/{multipart-parser-6zd16497.js → multipart-parser-g2xxkezz.js} +2 -2
  51. package/build/{offesecAgent-8ky7gccp.js → offesecAgent-4bm0eavz.js} +11 -11
  52. package/build/{parse-7djk9jyf.js → parse-rtccymzn.js} +3 -3
  53. package/build/pentest-pgkg5bfc.js +29 -0
  54. package/build/{pentests-62d6zw6p.js → pentests-gtxzs2fz.js} +19 -19
  55. package/build/{targetedPentest-me4jnr3z.js → targetedPentest-vz0ecgm9.js} +14 -14
  56. package/build/{targets-e5k1mrky.js → targets-me1ajgee.js} +19 -19
  57. package/build/threatModel-d4afwhnh.js +27 -0
  58. package/build/{token-rdcbn380.js → token-3bbp59y6.js} +3 -3
  59. package/build/{token-util-sxb85ahn.js → token-util-6xjme11b.js} +2 -2
  60. package/build/{uninstall-jt1bca2p.js → uninstall-1gqdgxg3.js} +2 -2
  61. package/build/{upload-krd8bnex.js → upload-9qp56ncf.js} +11 -11
  62. package/build/{utils-skmqhyfg.js → utils-rf818gpr.js} +17 -13
  63. package/package.json +1 -1
  64. package/build/agent-71z4e7jg.js +0 -19
  65. package/build/agent-ga5fecfs.js +0 -27
  66. package/build/authentication-hgs7ym0m.js +0 -19
  67. package/build/blackboxAgent-gem3mxa9.js +0 -19
  68. package/build/index-ag14v3sg.js +0 -12
  69. package/build/pentest-rs0181nf.js +0 -29
  70. package/build/threatModel-k4f3zgqd.js +0 -27
@@ -3,7 +3,7 @@ import {
3
3
  init_lazyLogger,
4
4
  init_structured,
5
5
  scopedLogger
6
- } from "./cli-zx8gk8xv.js";
6
+ } from "./cli-bpycpvf6.js";
7
7
 
8
8
  // src/core/integrations/wandb/client.ts
9
9
  init_structured();
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  OffensiveSecurityAgent
3
- } from "./cli-n2m2yy5b.js";
3
+ } from "./cli-qdz55t3y.js";
4
4
  import {
5
5
  detectOSAndEnhancePrompt
6
- } from "./cli-7tw4xfnw.js";
6
+ } from "./cli-vz1abzfe.js";
7
7
  import {
8
8
  hasToolCall,
9
9
  init_dist,
10
10
  stepCountIs
11
- } from "./cli-zx8gk8xv.js";
11
+ } from "./cli-bpycpvf6.js";
12
12
 
13
13
  // src/core/agents/specialized/attackSurface/blackboxAgent.ts
14
14
  init_dist();
package/build/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- import"./cli-q24twygk.js";
3
+ import"./cli-dm0fc0bm.js";
4
4
  import {
5
5
  createThreatModelPrompt
6
6
  } from "./cli-fw5r7pfj.js";
@@ -14,20 +14,20 @@ import {
14
14
  init_toolset,
15
15
  init_utils,
16
16
  logger
17
- } from "./cli-zx8gk8xv.js";
18
- import"./cli-vckbhnyk.js";
19
- import"./cli-3k1x5rn3.js";
20
- import"./cli-gpnb45ck.js";
21
- import"./cli-f7hanqbw.js";
22
- import"./cli-eveg9djy.js";
17
+ } from "./cli-bpycpvf6.js";
18
+ import"./cli-2vmbzyqh.js";
19
+ import"./cli-swpbx60z.js";
20
+ import"./cli-j54qa6tm.js";
21
+ import"./cli-bv9bjvpt.js";
22
+ import"./cli-21kv9cmn.js";
23
23
  import {
24
24
  init_package,
25
25
  package_default
26
- } from "./cli-barsn8br.js";
26
+ } from "./cli-s0ay7r6x.js";
27
27
  import {
28
28
  __require,
29
29
  __toESM
30
- } from "./cli-8rxa073f.js";
30
+ } from "./cli-bc05qbss.js";
31
31
  // package.json
32
32
  var package_default2 = {
33
33
  author: "Pensar",
@@ -144,7 +144,7 @@ var package_default2 = {
144
144
  tsc: "tsc --noEmit"
145
145
  },
146
146
  type: "module",
147
- version: "2.3.0"
147
+ version: "2.4.0-canary.2d23c2f0"
148
148
  };
149
149
 
150
150
  // src/core/ai/index.ts
@@ -299,13 +299,18 @@ class AgentEventBus {
299
299
  });
300
300
  break;
301
301
  case "reasoning-start":
302
- this.emit("reasoning-start", { subagentId });
302
+ this.emit("reasoning-start", { subagentId, sessionId, messageId });
303
303
  break;
304
304
  case "reasoning-delta":
305
- this.emit("reasoning-delta", { text: chunk.text, subagentId });
305
+ this.emit("reasoning-delta", {
306
+ text: chunk.text,
307
+ subagentId,
308
+ sessionId,
309
+ messageId
310
+ });
306
311
  break;
307
312
  case "reasoning-end":
308
- this.emit("reasoning-end", { subagentId });
313
+ this.emit("reasoning-end", { subagentId, sessionId, messageId });
309
314
  break;
310
315
  case "tool-input-start":
311
316
  this.emit("tool-call-start", {
@@ -587,7 +592,7 @@ function attachCliAgentStreamListeners(bus) {
587
592
  async function createInstrumentedBus(session) {
588
593
  const bus = new AgentEventBus;
589
594
  attachCliAgentStreamListeners(bus);
590
- const { attachWandbToEventBus } = await import("./upload-krd8bnex.js");
595
+ const { attachWandbToEventBus } = await import("./upload-9qp56ncf.js");
591
596
  const wandbCleanup = await attachWandbToEventBus(session, bus).catch((e) => {
592
597
  console.warn("[wandb] Tracing disabled:", e.message);
593
598
  return null;
@@ -601,10 +606,10 @@ async function resolveCliHeaders() {
601
606
  if (headerArgs.length === 0 && !headersFromArg && !noGlobal) {
602
607
  return;
603
608
  }
604
- const { parseHeaderLine: parseHeaderLine2, parseHeadersFromFile, formatParseError: formatParseError2 } = await import("./parse-7djk9jyf.js");
609
+ const { parseHeaderLine: parseHeaderLine2, parseHeadersFromFile, formatParseError: formatParseError2 } = await import("./parse-rtccymzn.js");
605
610
  const merged = {};
606
611
  if (!noGlobal) {
607
- const { config: appConfig } = await import("./index-32hn8rrw.js");
612
+ const { config: appConfig } = await import("./index-twcv8135.js");
608
613
  const cfg = await appConfig.get();
609
614
  if (cfg.defaultHeaders) {
610
615
  Object.assign(merged, cfg.defaultHeaders);
@@ -638,8 +643,8 @@ async function resolveCliModel() {
638
643
  const explicit = getArg("--model");
639
644
  if (explicit)
640
645
  return explicit;
641
- const { config: appConfig } = await import("./index-32hn8rrw.js");
642
- const { getDefaultModelForConfig } = await import("./utils-skmqhyfg.js");
646
+ const { config: appConfig } = await import("./index-twcv8135.js");
647
+ const { getDefaultModelForConfig } = await import("./utils-rf818gpr.js");
643
648
  const pensarConfig = await appConfig.get();
644
649
  const defaultModel = getDefaultModelForConfig(pensarConfig);
645
650
  if (!defaultModel) {
@@ -648,6 +653,7 @@ async function resolveCliModel() {
648
653
  ` + ` ANTHROPIC_API_KEY \u2014 Anthropic direct
649
654
  ` + ` OPENAI_API_KEY \u2014 OpenAI
650
655
  ` + ` OPENROUTER_API_KEY \u2014 OpenRouter
656
+ ` + ` CONCENTRATE_API_KEY \u2014 Concentrate
651
657
  ` + `
652
658
  Or run 'pensar login' to connect to Pensar Console.`);
653
659
  process.exit(1);
@@ -725,11 +731,11 @@ Global options:
725
731
  `);
726
732
  }
727
733
  async function runPentest() {
728
- const { config } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
734
+ const { config } = await import("./main-mmjp338j.js").then((m)=>__toESM(m.default,1));
729
735
  config();
730
- const { runPentestAgent } = await import("./blackboxPentest-tgc2t3y6.js");
731
- const { sessions: sessions2 } = await import("./index-e8c8zcrf.js");
732
- const { config: appConfig } = await import("./index-32hn8rrw.js");
736
+ const { runPentestAgent } = await import("./blackboxPentest-t2sc2mcg.js");
737
+ const { sessions: sessions2 } = await import("./index-dq0hvce1.js");
738
+ const { config: appConfig } = await import("./index-twcv8135.js");
733
739
  const target = getArgRequired("--target");
734
740
  const cwd = getArg("--cwd");
735
741
  const mode = getArg("--mode");
@@ -803,11 +809,11 @@ Report: ${reportPath}` : ""}`);
803
809
  process.exit(0);
804
810
  }
805
811
  async function runTargetedPentest() {
806
- const { config } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
812
+ const { config } = await import("./main-mmjp338j.js").then((m)=>__toESM(m.default,1));
807
813
  config();
808
- const { runTargetedPentestAgent } = await import("./targetedPentest-me4jnr3z.js");
809
- const { sessions: sessions2 } = await import("./index-e8c8zcrf.js");
810
- const { config: appConfig } = await import("./index-32hn8rrw.js");
814
+ const { runTargetedPentestAgent } = await import("./targetedPentest-vz0ecgm9.js");
815
+ const { sessions: sessions2 } = await import("./index-dq0hvce1.js");
816
+ const { config: appConfig } = await import("./index-twcv8135.js");
811
817
  const target = getArgRequired("--target");
812
818
  const objectives = getAllArgs("--objective");
813
819
  const pensarConfig = await appConfig.get();
@@ -857,10 +863,10 @@ POCs: ${pocsPath}`);
857
863
  process.exit(0);
858
864
  }
859
865
  async function runThreatModel() {
860
- const { config } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
866
+ const { config } = await import("./main-mmjp338j.js").then((m)=>__toESM(m.default,1));
861
867
  config();
862
- const { runThreatModelWorkflow } = await import("./threatModel-k4f3zgqd.js");
863
- const { config: appConfig } = await import("./index-32hn8rrw.js");
868
+ const { runThreatModelWorkflow } = await import("./threatModel-d4afwhnh.js");
869
+ const { config: appConfig } = await import("./index-twcv8135.js");
864
870
  const path2 = await import("path");
865
871
  const pensarConfig = await appConfig.get();
866
872
  const model = await resolveCliModel();
@@ -894,16 +900,16 @@ ${sep}
894
900
  Threat model written to: ${resolvedPath}`);
895
901
  }
896
902
  async function runOperator() {
897
- const { config } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
903
+ const { config } = await import("./main-mmjp338j.js").then((m)=>__toESM(m.default,1));
898
904
  config();
899
- const { runOffensiveSecurityAgent } = await import("./offesecAgent-8ky7gccp.js");
900
- const { sessions: sessions2, normalizeMessages, getResumeMessages } = await import("./index-e8c8zcrf.js");
901
- const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-468j74f3.js");
902
- const { config: appConfig } = await import("./index-32hn8rrw.js");
905
+ const { runOffensiveSecurityAgent } = await import("./offesecAgent-4bm0eavz.js");
906
+ const { sessions: sessions2, normalizeMessages, getResumeMessages } = await import("./index-dq0hvce1.js");
907
+ const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-xk4ht3gn.js");
908
+ const { config: appConfig } = await import("./index-twcv8135.js");
903
909
  const { createInterface } = await import("readline");
904
910
  const { readFileSync: readFileSync2, existsSync } = await import("fs");
905
911
  const path2 = await import("path");
906
- const { stepCountIs } = await import("./index-gq9h8j5j.js");
912
+ const { stepCountIs } = await import("./index-mtq7kmxz.js");
907
913
  const promptRaw = getArg("-p") ?? getArg("--prompt");
908
914
  if (!promptRaw) {
909
915
  console.error("Error: -p <prompt> is required");
@@ -1013,35 +1019,35 @@ if (hasFlag("-p") || command === "--prompt") {
1013
1019
  await runTargetedPentest();
1014
1020
  } else if (command === "login" || command === "auth") {
1015
1021
  process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
1016
- await import("./auth-c1z670rx.js");
1022
+ await import("./auth-7afqr3wp.js");
1017
1023
  } else if (command === "uninstall") {
1018
1024
  process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
1019
- await import("./uninstall-jt1bca2p.js");
1025
+ await import("./uninstall-1gqdgxg3.js");
1020
1026
  } else if (command === "apps") {
1021
1027
  process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
1022
- await import("./apps-43pqbz7r.js");
1028
+ await import("./apps-j2pxtjaq.js");
1023
1029
  } else if (command === "pentests") {
1024
1030
  process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
1025
- await import("./pentests-62d6zw6p.js");
1031
+ await import("./pentests-gtxzs2fz.js");
1026
1032
  } else if (command === "targets") {
1027
1033
  process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
1028
- await import("./targets-e5k1mrky.js");
1034
+ await import("./targets-me1ajgee.js");
1029
1035
  } else if (command === "issues") {
1030
1036
  process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
1031
- await import("./issues-kh4wg8c5.js");
1037
+ await import("./issues-ce9j1an1.js");
1032
1038
  } else if (command === "fixes") {
1033
1039
  process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
1034
- await import("./fixes-86yebsj0.js");
1040
+ await import("./fixes-mpm6r7cp.js");
1035
1041
  } else if (command === "logs") {
1036
1042
  process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
1037
- await import("./logs-bj28xmbf.js");
1043
+ await import("./logs-xv0vs83s.js");
1038
1044
  } else if (command === "config") {
1039
1045
  process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
1040
- await import("./config-jzqjz606.js");
1046
+ await import("./config-5v7ddr7b.js");
1041
1047
  } else if (command === "threat-model") {
1042
1048
  await runThreatModel();
1043
1049
  } else if (command === "doctor") {
1044
- const { runDoctor } = await import("./doctor-q3qws68e.js");
1050
+ const { runDoctor } = await import("./doctor-jvwt8yq5.js");
1045
1051
  await runDoctor();
1046
1052
  } else if (args.length === 0) {
1047
1053
  if (process.env.PENSAR_NO_TUI === "1") {
@@ -1049,7 +1055,7 @@ if (hasFlag("-p") || command === "--prompt") {
1049
1055
  console.error("All other commands work with Node \u2014 run 'pensar --help'.");
1050
1056
  process.exit(1);
1051
1057
  }
1052
- await import("./index-97vx1a24.js");
1058
+ await import("./index-gfw12srr.js");
1053
1059
  } else {
1054
1060
  console.error(`Error: Unknown command '${command}'`);
1055
1061
  console.error();
@@ -7,14 +7,14 @@ import {
7
7
  formatParseError,
8
8
  parseHeaderLine,
9
9
  parseHeadersFromFile
10
- } from "./cli-q24twygk.js";
10
+ } from "./cli-dm0fc0bm.js";
11
11
  import {
12
12
  config,
13
13
  init_config
14
- } from "./cli-f7hanqbw.js";
15
- import"./cli-eveg9djy.js";
16
- import"./cli-barsn8br.js";
17
- import"./cli-8rxa073f.js";
14
+ } from "./cli-bv9bjvpt.js";
15
+ import"./cli-21kv9cmn.js";
16
+ import"./cli-s0ay7r6x.js";
17
+ import"./cli-bc05qbss.js";
18
18
 
19
19
  // src/cli/config.ts
20
20
  init_config();
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  toolExists
3
- } from "./cli-7tw4xfnw.js";
4
- import"./cli-zx8gk8xv.js";
5
- import"./cli-vckbhnyk.js";
6
- import"./cli-3k1x5rn3.js";
7
- import"./cli-gpnb45ck.js";
8
- import"./cli-f7hanqbw.js";
9
- import"./cli-eveg9djy.js";
10
- import"./cli-barsn8br.js";
11
- import"./cli-8rxa073f.js";
3
+ } from "./cli-vz1abzfe.js";
4
+ import"./cli-bpycpvf6.js";
5
+ import"./cli-2vmbzyqh.js";
6
+ import"./cli-swpbx60z.js";
7
+ import"./cli-j54qa6tm.js";
8
+ import"./cli-bv9bjvpt.js";
9
+ import"./cli-21kv9cmn.js";
10
+ import"./cli-s0ay7r6x.js";
11
+ import"./cli-bc05qbss.js";
12
12
 
13
13
  // src/core/doctor.ts
14
14
  import { execSync, spawnSync } from "node:child_process";
@@ -50,6 +50,7 @@ function checkApiKeys() {
50
50
  { provider: "OpenAI", env: "OPENAI_API_KEY" },
51
51
  { provider: "Google", env: "GOOGLE_GENERATIVE_AI_API_KEY" },
52
52
  { provider: "OpenRouter", env: "OPENROUTER_API_KEY" },
53
+ { provider: "Concentrate", env: "CONCENTRATE_API_KEY" },
53
54
  { provider: "AWS Bedrock", env: "BEDROCK_API_KEY" },
54
55
  { provider: "AWS IAM", env: "AWS_ACCESS_KEY_ID" },
55
56
  { provider: "vLLM (local)", env: "LOCAL_MODEL_URL" }
@@ -4,29 +4,29 @@ import {
4
4
  buildPentestReport,
5
5
  renderJson,
6
6
  renderMarkdown
7
- } from "./cli-72b18z0n.js";
7
+ } from "./cli-kppxpy1r.js";
8
8
  import"./cli-9fsre5pt.js";
9
- import"./cli-jyp2c6th.js";
9
+ import"./cli-vpxp10qe.js";
10
10
  import {
11
11
  FindingsRegistry,
12
12
  OffensiveSecurityAgent
13
- } from "./cli-n2m2yy5b.js";
14
- import"./cli-7tw4xfnw.js";
13
+ } from "./cli-qdz55t3y.js";
14
+ import"./cli-vz1abzfe.js";
15
15
  import {
16
16
  createThreatModelPrompt
17
17
  } from "./cli-fw5r7pfj.js";
18
18
  import"./cli-c8131c4q.js";
19
- import"./cli-zx8gk8xv.js";
20
- import"./cli-vckbhnyk.js";
19
+ import"./cli-bpycpvf6.js";
20
+ import"./cli-2vmbzyqh.js";
21
21
  import {
22
22
  exports_external,
23
23
  init_zod
24
- } from "./cli-3k1x5rn3.js";
25
- import"./cli-gpnb45ck.js";
26
- import"./cli-f7hanqbw.js";
27
- import"./cli-eveg9djy.js";
28
- import"./cli-barsn8br.js";
29
- import"./cli-8rxa073f.js";
24
+ } from "./cli-swpbx60z.js";
25
+ import"./cli-j54qa6tm.js";
26
+ import"./cli-bv9bjvpt.js";
27
+ import"./cli-21kv9cmn.js";
28
+ import"./cli-s0ay7r6x.js";
29
+ import"./cli-bc05qbss.js";
30
30
 
31
31
  // src/core/workflows/fastStrike.ts
32
32
  init_zod();
@@ -42,14 +42,15 @@ Run this loop, tightly:
42
42
 
43
43
  1. OBSERVE — Read every response for signal before you act. Note the stack, headers, cookies, tokens, form fields, error messages, redirects, disabled controls, ID patterns. State what you just learned in one line before the next move.
44
44
  2. HYPOTHESIZE — From that signal and your deep knowledge of web/app vulnerability classes, name the single most likely vulnerability and why the evidence points to it. Rank leads by signal strength and go for the strongest first. A disabled form field, an ID in a URL or JWT, advertised demo creds, an exposed schema — these are tells; read them.
45
- 3. ACT — Test that one hypothesis with the minimum number of commands. Every tool call should exist to confirm or kill a specific hypothesis.
45
+ 3. ACT — Test that one hypothesis with the strongest available technique. Use direct tools for quick probes, but treat the shell as a working environment rather than merely a way to issue one-off commands. When the work becomes stateful, repetitive, concurrent, protocol-heavy, or multi-stage, externalize it into an editable script in the session scratchpad directory identified in the workspace instructions. Never create a scratchpad/ directory inside the target repository. Run the script, inspect the results, modify it, and rerun it as the attack develops.
46
46
  4. PRUNE — If the evidence disproves a lead, drop it and move to the next-strongest. Do NOT re-run a disproven approach or grind a dead end. Do NOT enumerate, brute-force, or run wordlists unless a specific signal demands it — choose techniques from evidence, not from a checklist.
47
- 5. EXPLOIT — When a vulnerability is confirmed, exploit it: capture the flag, extract the sensitive data, and pivot through it if the objective requires more. Multi-step objectives are yours to finish end to end — foothold, then privesc, then the goal.
48
- 6. DOCUMENT & FINISH — Record each confirmed vulnerability with the document_vulnerability tool as you go. When the objective is met (or every credible lead is exhausted), call the response tool with your result.
47
+ 5. EXPLOIT — When a vulnerability is confirmed, exploit it: capture the flag, extract the sensitive data, and pivot through it if the objective requires more. Preserve viable primitives and build on them. Prefer extending a working script into an end-to-end exploit over rebuilding the chain with repeated one-off tool calls or stopping at the next network or protocol boundary.
48
+ 6. DOCUMENT & FINISH — Record each confirmed vulnerability with the document_vulnerability tool as you go. Before concluding that every credible lead is exhausted, account for each viable primitive and pursue any concrete path that could still close the objective. After this check, whether the objective was met or every credible lead was genuinely exhausted, call the response tool with the correct solved value and a concise summary.
49
49
 
50
50
  Rules:
51
51
  - You are one operator. Plan in your head and in short text notes — never via planning tools, task lists, or sub-agents.
52
52
  - Recon and exploitation are the same loop. Do just enough recon to form the first hypothesis, then start testing. Do not map the entire surface before acting.
53
+ - Spend your reasoning on choosing techniques and interpreting evidence; use scripts for deterministic mechanics, iteration, and chain execution.
53
54
  - Bias toward the shortest path that proves impact. Speed comes from picking the right lead, not from skipping verification — always confirm a finding before you claim it.
54
55
  - Stay in scope. Only touch the target you were given and hosts it legitimately depends on.`;
55
56
  async function runFastStrike(input) {
@@ -121,7 +122,25 @@ ${combined}` : combined;
121
122
  enableThinking,
122
123
  openAIReasoningEffort
123
124
  });
124
- const strikeResult = await agent.consume();
125
+ eventBus?.emit("subagent-spawn", {
126
+ subagentId: "fast-strike",
127
+ name: "Fast Strike",
128
+ input: { target }
129
+ });
130
+ let strikeResult;
131
+ try {
132
+ strikeResult = await agent.consume();
133
+ eventBus?.emit("subagent-complete", {
134
+ subagentId: "fast-strike",
135
+ status: "completed"
136
+ });
137
+ } catch (e) {
138
+ eventBus?.emit("subagent-complete", {
139
+ subagentId: "fast-strike",
140
+ status: "failed"
141
+ });
142
+ throw e;
143
+ }
125
144
  if (abortSignal?.aborted) {
126
145
  throw new DOMException("Pentest aborted by user", "AbortError");
127
146
  }
@@ -152,5 +171,6 @@ ${combined}` : combined;
152
171
  };
153
172
  }
154
173
  export {
174
+ FAST_STRIKE_SYSTEM_PROMPT,
155
175
  runFastStrike
156
176
  };
@@ -2,28 +2,28 @@
2
2
  import {
3
3
  getFix,
4
4
  listFixes
5
- } from "./cli-f71s6kcw.js";
6
- import"./cli-zm8tfpv7.js";
7
- import"./cli-bv2807tj.js";
8
- import"./cli-72b18z0n.js";
9
- import"./cli-50906d27.js";
10
- import"./cli-zk1ch6qf.js";
11
- import"./cli-j0n189ee.js";
12
- import"./cli-baqhqbe5.js";
5
+ } from "./cli-xnmdwvse.js";
6
+ import"./cli-nrtyzpy4.js";
7
+ import"./cli-zhtfn5gp.js";
8
+ import"./cli-kppxpy1r.js";
9
+ import"./cli-jgy1gn5z.js";
10
+ import"./cli-d5n76mez.js";
11
+ import"./cli-tczmn0bc.js";
12
+ import"./cli-gvwg1z9q.js";
13
13
  import"./cli-9fsre5pt.js";
14
- import"./cli-jyp2c6th.js";
15
- import"./cli-n2m2yy5b.js";
16
- import"./cli-7tw4xfnw.js";
14
+ import"./cli-vpxp10qe.js";
15
+ import"./cli-qdz55t3y.js";
16
+ import"./cli-vz1abzfe.js";
17
17
  import"./cli-fw5r7pfj.js";
18
18
  import"./cli-c8131c4q.js";
19
- import"./cli-zx8gk8xv.js";
20
- import"./cli-vckbhnyk.js";
21
- import"./cli-3k1x5rn3.js";
22
- import"./cli-gpnb45ck.js";
23
- import"./cli-f7hanqbw.js";
24
- import"./cli-eveg9djy.js";
25
- import"./cli-barsn8br.js";
26
- import"./cli-8rxa073f.js";
19
+ import"./cli-bpycpvf6.js";
20
+ import"./cli-2vmbzyqh.js";
21
+ import"./cli-swpbx60z.js";
22
+ import"./cli-j54qa6tm.js";
23
+ import"./cli-bv9bjvpt.js";
24
+ import"./cli-21kv9cmn.js";
25
+ import"./cli-s0ay7r6x.js";
26
+ import"./cli-bc05qbss.js";
27
27
 
28
28
  // src/cli/fixes.ts
29
29
  function showHelp() {
@@ -14,26 +14,26 @@ import {
14
14
  signGatewayRequest,
15
15
  startDeviceFlow,
16
16
  validateGateway
17
- } from "./cli-vckbhnyk.js";
18
- import"./cli-f7hanqbw.js";
19
- import"./cli-eveg9djy.js";
20
- import"./cli-barsn8br.js";
21
- import"./cli-8rxa073f.js";
17
+ } from "./cli-2vmbzyqh.js";
18
+ import"./cli-bv9bjvpt.js";
19
+ import"./cli-21kv9cmn.js";
20
+ import"./cli-s0ay7r6x.js";
21
+ import"./cli-bc05qbss.js";
22
22
  init_auth();
23
23
 
24
24
  export {
25
- validateGateway,
26
- startDeviceFlow,
27
- signGatewayRequest,
28
- selectWorkspace,
29
- pollWorkspaceSelection,
30
- pollWorkOSToken,
31
- pollLegacyToken,
32
- pollForWorkspaceCreation,
33
- isTokenExpired,
34
- isConnected,
35
- fetchWorkspaces,
36
- ensureValidToken,
25
+ createWorkspaceSelection,
37
26
  disconnect,
38
- createWorkspaceSelection
27
+ ensureValidToken,
28
+ fetchWorkspaces,
29
+ isConnected,
30
+ isTokenExpired,
31
+ pollForWorkspaceCreation,
32
+ pollLegacyToken,
33
+ pollWorkOSToken,
34
+ pollWorkspaceSelection,
35
+ selectWorkspace,
36
+ signGatewayRequest,
37
+ startDeviceFlow,
38
+ validateGateway
39
39
  };
@@ -10,11 +10,11 @@ import {
10
10
  init_esm_min,
11
11
  init_fetch_blob,
12
12
  init_from
13
- } from "./cli-wszshs5e.js";
13
+ } from "./cli-k71t434r.js";
14
14
  import {
15
15
  __esm,
16
16
  __require
17
- } from "./cli-8rxa073f.js";
17
+ } from "./cli-bc05qbss.js";
18
18
 
19
19
  // node_modules/data-uri-to-buffer/dist/index.js
20
20
  function dataUriToBuffer(uri) {
@@ -176,7 +176,7 @@ class Body {
176
176
  }
177
177
  return formData;
178
178
  }
179
- const { toFormData } = await import("./multipart-parser-6zd16497.js");
179
+ const { toFormData } = await import("./multipart-parser-g2xxkezz.js");
180
180
  return toFormData(this.body, ct);
181
181
  }
182
182
  async blob() {
@@ -1240,18 +1240,18 @@ var init_src = __esm(() => {
1240
1240
  init_src();
1241
1241
 
1242
1242
  export {
1243
- isRedirect,
1244
- fileFromSync,
1245
- fileFrom,
1246
- fetch as default,
1247
- blobFromSync,
1248
- blobFrom,
1249
- Response,
1250
- Request,
1251
- Headers,
1252
- FormData,
1253
- file_default as File,
1254
- FetchError,
1243
+ AbortError,
1255
1244
  fetch_blob_default as Blob,
1256
- AbortError
1245
+ FetchError,
1246
+ file_default as File,
1247
+ FormData,
1248
+ Headers,
1249
+ Request,
1250
+ Response,
1251
+ blobFrom,
1252
+ blobFromSync,
1253
+ fetch as default,
1254
+ fileFrom,
1255
+ fileFromSync,
1256
+ isRedirect
1257
1257
  };
@@ -17,22 +17,22 @@ import {
17
17
  update,
18
18
  write,
19
19
  writeRaw
20
- } from "./cli-zx8gk8xv.js";
21
- import"./cli-vckbhnyk.js";
20
+ } from "./cli-bpycpvf6.js";
21
+ import"./cli-2vmbzyqh.js";
22
22
  import {
23
23
  init_zod,
24
24
  zod_default
25
- } from "./cli-3k1x5rn3.js";
26
- import"./cli-gpnb45ck.js";
27
- import"./cli-f7hanqbw.js";
28
- import"./cli-eveg9djy.js";
25
+ } from "./cli-swpbx60z.js";
26
+ import"./cli-j54qa6tm.js";
27
+ import"./cli-bv9bjvpt.js";
28
+ import"./cli-21kv9cmn.js";
29
29
  import {
30
30
  getCurrentVersion,
31
31
  init_installation
32
- } from "./cli-barsn8br.js";
32
+ } from "./cli-s0ay7r6x.js";
33
33
  import {
34
34
  __require
35
- } from "./cli-8rxa073f.js";
35
+ } from "./cli-bc05qbss.js";
36
36
 
37
37
  // src/core/session/index.ts
38
38
  init_zod();
@@ -178,6 +178,7 @@ var SessionConfigObject = zod_default.object({
178
178
  authenticationInstructions: zod_default.string().optional(),
179
179
  requestsPerSecond: zod_default.number().optional(),
180
180
  allowDestructiveActions: zod_default.boolean().optional(),
181
+ allowRateLimitTesting: zod_default.boolean().optional(),
181
182
  operatorSettings: OperatorSettingsObject.optional(),
182
183
  toolsetState: ToolsetStateSchema.optional(),
183
184
  enumerateSubdomains: zod_default.boolean().optional(),
@@ -313,7 +314,7 @@ async function create(input) {
313
314
  if (normalizedConfig?.headers !== undefined) {
314
315
  snapshotHeaders = { ...normalizedConfig.headers };
315
316
  } else {
316
- const { config: appConfig } = await import("./index-ag14v3sg.js");
317
+ const { config: appConfig } = await import("./index-s2xwp702.js");
317
318
  const cfg = await appConfig.get();
318
319
  snapshotHeaders = cfg.defaultHeaders ? { ...cfg.defaultHeaders } : { ...DEFAULT_HEADER_RECORD };
319
320
  }
@@ -452,18 +453,22 @@ function hasOperatorState(session) {
452
453
  const statePath = path.join(session.rootPath, "messages.json");
453
454
  return existsSync(statePath);
454
455
  }
455
- var MAX_RESUME_MESSAGES = 200;
456
- function getResumeMessages(messages, limit = MAX_RESUME_MESSAGES) {
456
+ var RESUME_MESSAGE_WINDOW = 200;
457
+ function getResumeMessages(messages, limit = RESUME_MESSAGE_WINDOW) {
457
458
  if (messages.length <= limit)
458
459
  return messages;
459
- let cutIndex = messages.length - limit;
460
+ const roughCutIndex = messages.length - limit;
461
+ let cutIndex = roughCutIndex;
460
462
  while (cutIndex < messages.length) {
461
463
  if (messages[cutIndex].role === "user")
462
464
  break;
463
465
  cutIndex++;
464
466
  }
465
467
  if (cutIndex >= messages.length) {
466
- cutIndex = messages.length - limit;
468
+ cutIndex = roughCutIndex;
469
+ while (cutIndex > 0 && messages[cutIndex].role !== "user") {
470
+ cutIndex--;
471
+ }
467
472
  }
468
473
  return messages.slice(cutIndex);
469
474
  }
@@ -557,18 +562,18 @@ var sessions = {
557
562
  updateSessionHeaders
558
563
  };
559
564
  export {
560
- updateSessionHeaders,
561
- updateOperatorSettings,
562
- sessions,
563
- normalizeMessages,
564
- migrateLegacySessionData,
565
- loadOperatorState,
566
- list,
567
- hasOperatorState,
568
- getSessionRoot,
569
- getResumeMessages,
570
- get,
571
- create,
565
+ EXFIL_OUTCOME_GUIDANCE,
572
566
  SessionInfoObject,
573
- EXFIL_OUTCOME_GUIDANCE
567
+ create,
568
+ get,
569
+ getResumeMessages,
570
+ getSessionRoot,
571
+ hasOperatorState,
572
+ list,
573
+ loadOperatorState,
574
+ migrateLegacySessionData,
575
+ normalizeMessages,
576
+ sessions,
577
+ updateOperatorSettings,
578
+ updateSessionHeaders
574
579
  };