@pensar/apex 2.4.0 → 2.5.0-canary.0af37eb0

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 (94) hide show
  1. package/build/agent-2edb792c.js +12 -0
  2. package/build/agent-317v8mmz.js +12 -0
  3. package/build/agent-vzqc5vtn.js +14 -0
  4. package/build/{agent-5ejt5vpz.js → agent-y85zsera.js} +42 -42
  5. package/build/{apps-17wvz1d7.js → apps-qf8jww9t.js} +74 -43
  6. package/build/{auth-z3h9859n.js → auth-wf1r533f.js} +57 -61
  7. package/build/blackboxAgent-cb4na30e.js +12 -0
  8. package/build/blackboxPentest-bf7b9m36.js +58 -0
  9. package/build/{cli-9rhzhgx2.js → cli-079enner.js} +5 -5
  10. package/build/cli-4ptm7wgt.js +12188 -0
  11. package/build/{cli-tznv8pf1.js → cli-6hrf9z35.js} +4 -4
  12. package/build/{cli-mavved45.js → cli-80mx747a.js} +89 -96
  13. package/build/cli-8w8k4dph.js +15 -0
  14. package/build/{cli-2cbwdk78.js → cli-a4v5vwfw.js} +4 -4
  15. package/build/cli-ag6jtndp.js +32 -0
  16. package/build/cli-bb02pjt0.js +1485 -0
  17. package/build/{cli-k71t434r.js → cli-ec2hwkv3.js} +34 -76
  18. package/build/{cli-k8kc47pq.js → cli-f3sg3e9x.js} +118 -115
  19. package/build/{cli-bc05qbss.js → cli-h6y3bt60.js} +13 -21
  20. package/build/{cli-xshasbwe.js → cli-jzcsaygf.js} +31 -52
  21. package/build/{cli-vnynf0js.js → cli-k8hgxz61.js} +11 -5
  22. package/build/{cli-32z0017y.js → cli-kn55pk78.js} +36 -60
  23. package/build/{cli-tkc598ey.js → cli-q8pr0zqg.js} +10042 -7665
  24. package/build/{cli-j54qa6tm.js → cli-qktcyj48.js} +1 -1
  25. package/build/cli-retw3rw5.js +12 -0
  26. package/build/{cli-b1adytsy.js → cli-s2y86fd5.js} +67 -39
  27. package/build/{cli-vq52kp7j.js → cli-t6mngnwd.js} +150 -128
  28. package/build/cli-tjm77pmx.js +12075 -0
  29. package/build/{cli-dm0fc0bm.js → cli-v1sarr4y.js} +5 -9
  30. package/build/cli-wpmm960k.js +22 -0
  31. package/build/{cli-5k33webc.js → cli-x069hfr2.js} +355 -332
  32. package/build/{cli-ee3axgts.js → cli-xbhr5khz.js} +1 -1
  33. package/build/{cli-repbyhkk.js → cli-y212s0r8.js} +26315 -25555
  34. package/build/cli-z82n3qk1.js +6 -0
  35. package/build/{cli-gq40s5b3.js → cli-zky875st.js} +33 -46
  36. package/build/cli.js +696 -132
  37. package/build/{config-f1mj4nhd.js → config-g93k0986.js} +29 -29
  38. package/build/{doctor-ekneewa3.js → doctor-4fcx7g0h.js} +4 -9
  39. package/build/{fastStrike-8zka43xs.js → fastStrike-af31ggmt.js} +26 -28
  40. package/build/{fixes-b89s5haw.js → fixes-6kxes4g7.js} +22 -27
  41. package/build/getMachineId-bsd-zr67nd9p.js +36 -0
  42. package/build/getMachineId-darwin-fd1d562d.js +36 -0
  43. package/build/getMachineId-linux-kjmg243j.js +29 -0
  44. package/build/getMachineId-unsupported-n4r58vke.js +19 -0
  45. package/build/getMachineId-win-yzgpfsrb.js +38 -0
  46. package/build/{index-sf16jm0m.js → index-3dpcjj6e.js} +137 -162
  47. package/build/index-4b9nc9e8.js +36 -0
  48. package/build/index-9f0xagac.js +22 -0
  49. package/build/index-9y2bjhh2.js +100 -0
  50. package/build/index-a1bg29j1.js +1559 -0
  51. package/build/{index-cbwn03kz.js → index-a2xycbjs.js} +12 -31
  52. package/build/index-k1mb1edx.js +12 -0
  53. package/build/{index-psqjpw5m.js → index-nweqptgs.js} +7 -7
  54. package/build/{index-6d22pyxt.js → index-r8554acn.js} +3000 -2435
  55. package/build/index-rjmmakbh.js +17 -0
  56. package/build/index-yfcbhfc1.js +9 -0
  57. package/build/{issues-xx5bs4md.js → issues-vgfdw93j.js} +81 -35
  58. package/build/{logs-qtxe51w2.js → logs-czxxx0n0.js} +20 -25
  59. package/build/{multipart-parser-g2xxkezz.js → multipart-parser-vjjdbpd1.js} +10 -10
  60. package/build/{offesecAgent-b9e2xm6v.js → offesecAgent-jwnbnsqm.js} +6 -13
  61. package/build/{parse-rtccymzn.js → parse-cqecqrc5.js} +0 -4
  62. package/build/pentest-hbwbfw9w.js +21 -0
  63. package/build/{pentests-6ks3szc4.js → pentests-6pp1j1w5.js} +23 -28
  64. package/build/{targetedPentest-s1ptvq8e.js → targetedPentest-34zhke7a.js} +16 -20
  65. package/build/{targets-sxygyj87.js → targets-yvh0d0fr.js} +22 -27
  66. package/build/threatModel-r96hed1d.js +19 -0
  67. package/build/{token-3bbp59y6.js → token-n0tmq8n5.js} +2 -2
  68. package/build/{token-util-6xjme11b.js → token-util-bv80pj47.js} +1 -2
  69. package/build/{uninstall-tvsh81v8.js → uninstall-qdzsynrt.js} +7 -4
  70. package/build/{upload-7wdyyqmr.js → upload-twg8pvy7.js} +7 -13
  71. package/build/{utils-7fwdkqk6.js → utils-cnv9jj0h.js} +7 -29
  72. package/package.json +8 -2
  73. package/build/agent-mvpgvgks.js +0 -19
  74. package/build/agent-nhs1w5w0.js +0 -29
  75. package/build/authentication-3s97cpk4.js +0 -19
  76. package/build/blackboxAgent-gw0a1ca4.js +0 -19
  77. package/build/blackboxPentest-44333zss.js +0 -37
  78. package/build/cli-0n4r54hq.js +0 -414
  79. package/build/cli-72cvcqhg.js +0 -22
  80. package/build/cli-qqt4gj1w.js +0 -53
  81. package/build/cli-swpbx60z.js +0 -24441
  82. package/build/index-4ad3sdwk.js +0 -39
  83. package/build/index-ghwf5z3v.js +0 -12
  84. package/build/index-hqjdg6fg.js +0 -205
  85. package/build/index-mtq7kmxz.js +0 -12856
  86. package/build/index-rbzhk712.js +0 -33
  87. package/build/index-y5w6n3tb.js +0 -19
  88. package/build/main-mmjp338j.js +0 -324
  89. package/build/pentest-xtc1sjdw.js +0 -29
  90. package/build/threatModel-xsm6fwk5.js +0 -27
  91. /package/build/{cli-c8131c4q.js → cli-0wsh8j2t.js} +0 -0
  92. /package/build/{cli-e08r86zk.js → cli-b3dvxjgk.js} +0 -0
  93. /package/build/{cli-fw5r7pfj.js → cli-q126f6ef.js} +0 -0
  94. /package/build/{cli-9fsre5pt.js → cli-qba2x69h.js} +0 -0
@@ -1,28 +1,30 @@
1
1
  import {
2
- ALL_TOOL_NAMES,
3
- ASK_USER_QUESTIONS_TOOL_NAME,
4
- OffensiveSecurityAgent,
5
- SKILL_TOOL_NAMES,
6
- apiRequest,
7
- buildBaseSystemPrompt
8
- } from "./cli-repbyhkk.js";
9
- import {
2
+ init_zod,
3
+ stepCountIs2,
10
4
  init_dist,
11
- init_session,
12
- sessions,
13
- stepCountIs
14
- } from "./cli-tkc598ey.js";
5
+ init_constants,
6
+ init_ai,
7
+ sessions2,
8
+ init_session
9
+ } from "./cli-q8pr0zqg.js";
15
10
  import {
16
- init_constants
17
- } from "./cli-0n4r54hq.js";
11
+ buildBaseSystemPrompt,
12
+ ASK_USER_QUESTIONS_TOOL_NAME,
13
+ apiRequest,
14
+ ALL_TOOL_NAMES2,
15
+ SKILL_TOOL_NAMES2,
16
+ OffensiveSecurityAgent
17
+ } from "./cli-y212s0r8.js";
18
18
  import {
19
- exports_external,
20
- init_zod
21
- } from "./cli-swpbx60z.js";
19
+ string,
20
+ array,
21
+ object,
22
+ _enum
23
+ } from "./cli-tjm77pmx.js";
22
24
  import {
23
25
  __commonJS,
24
26
  __require
25
- } from "./cli-bc05qbss.js";
27
+ } from "./cli-h6y3bt60.js";
26
28
 
27
29
  // node_modules/yaml/dist/nodes/identity.js
28
30
  var require_identity = __commonJS(function(exports) {
@@ -505,8 +507,8 @@ var require_toJS = __commonJS(function(exports) {
505
507
  return value.toJSON(arg, ctx);
506
508
  const data = { aliasCount: 0, count: 1, res: undefined };
507
509
  ctx.anchors.set(value, data);
508
- ctx.onCreate = (res2) => {
509
- data.res = res2;
510
+ ctx.onCreate = (res) => {
511
+ data.res = res;
510
512
  delete ctx.onCreate;
511
513
  };
512
514
  const res = value.toJSON(arg, ctx);
@@ -550,8 +552,8 @@ var require_Node = __commonJS(function(exports) {
550
552
  };
551
553
  const res = toJS.toJS(this, "", ctx);
552
554
  if (typeof onAnchor === "function")
553
- for (const { count, res: res2 } of ctx.anchors.values())
554
- onAnchor(res2, count);
555
+ for (const { count, res } of ctx.anchors.values())
556
+ onAnchor(res, count);
555
557
  return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res;
556
558
  }
557
559
  }
@@ -605,16 +607,16 @@ var require_Alias = __commonJS(function(exports) {
605
607
  toJSON(_arg, ctx) {
606
608
  if (!ctx)
607
609
  return { source: this.source };
608
- const { anchors: anchors2, doc, maxAliasCount } = ctx;
610
+ const { anchors, doc, maxAliasCount } = ctx;
609
611
  const source = this.resolve(doc, ctx);
610
612
  if (!source) {
611
613
  const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
612
614
  throw new ReferenceError(msg);
613
615
  }
614
- let data = anchors2.get(source);
616
+ let data = anchors.get(source);
615
617
  if (!data) {
616
618
  toJS.toJS(source, null, ctx);
617
- data = anchors2.get(source);
619
+ data = anchors.get(source);
618
620
  }
619
621
  if (data?.res === undefined) {
620
622
  const msg = "This should not happen: Alias anchor was not resolved?";
@@ -623,7 +625,7 @@ var require_Alias = __commonJS(function(exports) {
623
625
  if (maxAliasCount >= 0) {
624
626
  data.count += 1;
625
627
  if (data.aliasCount === 0)
626
- data.aliasCount = getAliasCount(doc, source, anchors2);
628
+ data.aliasCount = getAliasCount(doc, source, anchors);
627
629
  if (data.count * data.aliasCount > maxAliasCount) {
628
630
  const msg = "Excessive alias count indicates a resource exhaustion attack";
629
631
  throw new ReferenceError(msg);
@@ -645,22 +647,22 @@ var require_Alias = __commonJS(function(exports) {
645
647
  return src;
646
648
  }
647
649
  }
648
- function getAliasCount(doc, node, anchors2) {
650
+ function getAliasCount(doc, node, anchors) {
649
651
  if (identity.isAlias(node)) {
650
652
  const source = node.resolve(doc);
651
- const anchor = anchors2 && source && anchors2.get(source);
653
+ const anchor = anchors && source && anchors.get(source);
652
654
  return anchor ? anchor.count * anchor.aliasCount : 0;
653
655
  } else if (identity.isCollection(node)) {
654
656
  let count = 0;
655
657
  for (const item of node.items) {
656
- const c = getAliasCount(doc, item, anchors2);
658
+ const c = getAliasCount(doc, item, anchors);
657
659
  if (c > count)
658
660
  count = c;
659
661
  }
660
662
  return count;
661
663
  } else if (identity.isPair(node)) {
662
- const kc = getAliasCount(doc, node.key, anchors2);
663
- const vc = getAliasCount(doc, node.value, anchors2);
664
+ const kc = getAliasCount(doc, node.key, anchors);
665
+ const vc = getAliasCount(doc, node.value, anchors);
664
666
  return Math.max(kc, vc);
665
667
  }
666
668
  return 1;
@@ -745,10 +747,10 @@ var require_createNode = __commonJS(function(exports) {
745
747
  value = value.toJSON();
746
748
  }
747
749
  if (!value || typeof value !== "object") {
748
- const node2 = new Scalar.Scalar(value);
750
+ const node = new Scalar.Scalar(value);
749
751
  if (ref)
750
- ref.node = node2;
751
- return node2;
752
+ ref.node = node;
753
+ return node;
752
754
  }
753
755
  tagObj = value instanceof Map ? schema[identity.MAP] : (Symbol.iterator in Object(value)) ? schema[identity.SEQ] : schema[identity.MAP];
754
756
  }
@@ -997,17 +999,17 @@ var require_foldFlowLines = __commonJS(function(exports) {
997
999
  if (onFold)
998
1000
  onFold();
999
1001
  let res = text.slice(0, folds[0]);
1000
- for (let i2 = 0;i2 < folds.length; ++i2) {
1001
- const fold = folds[i2];
1002
- const end2 = folds[i2 + 1] || text.length;
1002
+ for (let i = 0;i < folds.length; ++i) {
1003
+ const fold = folds[i];
1004
+ const end = folds[i + 1] || text.length;
1003
1005
  if (fold === 0)
1004
1006
  res = `
1005
- ${indent}${text.slice(0, end2)}`;
1007
+ ${indent}${text.slice(0, end)}`;
1006
1008
  else {
1007
1009
  if (mode === FOLD_QUOTED && escapedFolds[fold])
1008
1010
  res += `${text[fold]}\\`;
1009
1011
  res += `
1010
- ${indent}${text.slice(fold + 1, end2)}`;
1012
+ ${indent}${text.slice(fold + 1, end)}`;
1011
1013
  }
1012
1014
  }
1013
1015
  return res;
@@ -1643,15 +1645,15 @@ var require_merge = __commonJS(function(exports) {
1643
1645
  if (!identity.isMap(source))
1644
1646
  throw new Error("Merge sources must be maps or map aliases");
1645
1647
  const srcMap = source.toJSON(null, ctx, Map);
1646
- for (const [key, value2] of srcMap) {
1648
+ for (const [key, value] of srcMap) {
1647
1649
  if (map instanceof Map) {
1648
1650
  if (!map.has(key))
1649
- map.set(key, value2);
1651
+ map.set(key, value);
1650
1652
  } else if (map instanceof Set) {
1651
1653
  map.add(key);
1652
1654
  } else if (!Object.prototype.hasOwnProperty.call(map, key)) {
1653
1655
  Object.defineProperty(map, key, {
1654
- value: value2,
1656
+ value,
1655
1657
  writable: true,
1656
1658
  enumerable: true,
1657
1659
  configurable: true
@@ -1774,8 +1776,8 @@ var require_stringifyCollection = __commonJS(function(exports) {
1774
1776
  var stringifyComment = require_stringifyComment();
1775
1777
  function stringifyCollection(collection, ctx, options) {
1776
1778
  const flow = ctx.inFlow ?? collection.flow;
1777
- const stringify2 = flow ? stringifyFlowCollection : stringifyBlockCollection;
1778
- return stringify2(collection, ctx, options);
1779
+ const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;
1780
+ return stringify(collection, ctx, options);
1779
1781
  }
1780
1782
  function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
1781
1783
  const { indent, options: { commentString } } = ctx;
@@ -1784,13 +1786,13 @@ var require_stringifyCollection = __commonJS(function(exports) {
1784
1786
  const lines = [];
1785
1787
  for (let i = 0;i < items.length; ++i) {
1786
1788
  const item = items[i];
1787
- let comment2 = null;
1789
+ let comment = null;
1788
1790
  if (identity.isNode(item)) {
1789
1791
  if (!chompKeep && item.spaceBefore)
1790
1792
  lines.push("");
1791
1793
  addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
1792
1794
  if (item.comment)
1793
- comment2 = item.comment;
1795
+ comment = item.comment;
1794
1796
  } else if (identity.isPair(item)) {
1795
1797
  const ik = identity.isNode(item.key) ? item.key : null;
1796
1798
  if (ik) {
@@ -1800,12 +1802,12 @@ var require_stringifyCollection = __commonJS(function(exports) {
1800
1802
  }
1801
1803
  }
1802
1804
  chompKeep = false;
1803
- let str2 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
1804
- if (comment2)
1805
- str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2));
1806
- if (chompKeep && comment2)
1805
+ let str = stringify.stringify(item, itemCtx, () => comment = null, () => chompKeep = true);
1806
+ if (comment)
1807
+ str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
1808
+ if (chompKeep && comment)
1807
1809
  chompKeep = false;
1808
- lines.push(blockItemPrefix + str2);
1810
+ lines.push(blockItemPrefix + str);
1809
1811
  }
1810
1812
  let str;
1811
1813
  if (lines.length === 0) {
@@ -2055,10 +2057,10 @@ var require_map = __commonJS(function(exports) {
2055
2057
  default: true,
2056
2058
  nodeClass: YAMLMap.YAMLMap,
2057
2059
  tag: "tag:yaml.org,2002:map",
2058
- resolve(map2, onError) {
2059
- if (!identity.isMap(map2))
2060
+ resolve(map, onError) {
2061
+ if (!identity.isMap(map))
2060
2062
  onError("Expected a mapping for this tag");
2061
- return map2;
2063
+ return map;
2062
2064
  },
2063
2065
  createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)
2064
2066
  };
@@ -2167,10 +2169,10 @@ var require_seq = __commonJS(function(exports) {
2167
2169
  default: true,
2168
2170
  nodeClass: YAMLSeq.YAMLSeq,
2169
2171
  tag: "tag:yaml.org,2002:seq",
2170
- resolve(seq2, onError) {
2171
- if (!identity.isSeq(seq2))
2172
+ resolve(seq, onError) {
2173
+ if (!identity.isSeq(seq))
2172
2174
  onError("Expected a sequence for this tag");
2173
- return seq2;
2175
+ return seq;
2174
2176
  },
2175
2177
  createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx)
2176
2178
  };
@@ -2516,8 +2518,8 @@ ${cn.comment}` : item.comment;
2516
2518
  }
2517
2519
  function createPairs(schema, iterable, ctx) {
2518
2520
  const { replacer } = ctx;
2519
- const pairs2 = new YAMLSeq.YAMLSeq(schema);
2520
- pairs2.tag = "tag:yaml.org,2002:pairs";
2521
+ const pairs = new YAMLSeq.YAMLSeq(schema);
2522
+ pairs.tag = "tag:yaml.org,2002:pairs";
2521
2523
  let i = 0;
2522
2524
  if (iterable && Symbol.iterator in Object(iterable))
2523
2525
  for (let it of iterable) {
@@ -2541,9 +2543,9 @@ ${cn.comment}` : item.comment;
2541
2543
  } else {
2542
2544
  key = it;
2543
2545
  }
2544
- pairs2.items.push(Pair.createPair(key, value, ctx));
2546
+ pairs.items.push(Pair.createPair(key, value, ctx));
2545
2547
  }
2546
- return pairs2;
2548
+ return pairs;
2547
2549
  }
2548
2550
  var pairs = {
2549
2551
  collection: "seq",
@@ -2597,9 +2599,9 @@ var require_omap = __commonJS(function(exports) {
2597
2599
  }
2598
2600
  static from(schema, iterable, ctx) {
2599
2601
  const pairs$1 = pairs.createPairs(schema, iterable, ctx);
2600
- const omap2 = new this;
2601
- omap2.items = pairs$1.items;
2602
- return omap2;
2602
+ const omap = new this;
2603
+ omap.items = pairs$1.items;
2604
+ return omap;
2603
2605
  }
2604
2606
  }
2605
2607
  YAMLOMap.tag = "tag:yaml.org,2002:omap";
@@ -2725,8 +2727,8 @@ var require_int2 = __commonJS(function(exports) {
2725
2727
  str = `0x${str}`;
2726
2728
  break;
2727
2729
  }
2728
- const n2 = BigInt(str);
2729
- return sign === "-" ? BigInt(-1) * n2 : n2;
2730
+ const n = BigInt(str);
2731
+ return sign === "-" ? BigInt(-1) * n : n;
2730
2732
  }
2731
2733
  const n = parseInt(str, radix);
2732
2734
  return sign === "-" ? -1 * n : n;
@@ -2830,14 +2832,14 @@ var require_set = __commonJS(function(exports) {
2830
2832
  }
2831
2833
  static from(schema, iterable, ctx) {
2832
2834
  const { replacer } = ctx;
2833
- const set2 = new this(schema);
2835
+ const set = new this(schema);
2834
2836
  if (iterable && Symbol.iterator in Object(iterable))
2835
2837
  for (let value of iterable) {
2836
2838
  if (typeof replacer === "function")
2837
2839
  value = replacer.call(iterable, value, value);
2838
- set2.items.push(Pair.createPair(value, null, ctx));
2840
+ set.items.push(Pair.createPair(value, null, ctx));
2839
2841
  }
2840
- return set2;
2842
+ return set;
2841
2843
  }
2842
2844
  }
2843
2845
  YAMLSet.tag = "tag:yaml.org,2002:set";
@@ -2870,7 +2872,7 @@ var require_timestamp = __commonJS(function(exports) {
2870
2872
  const sign = str[0];
2871
2873
  const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
2872
2874
  const num = (n) => asBigInt ? BigInt(n) : Number(n);
2873
- const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
2875
+ const res = parts.replace(/_/g, "").split(":").reduce((res, p) => res * num(60) + num(p), num(0));
2874
2876
  return sign === "-" ? num(-1) * res : res;
2875
2877
  }
2876
2878
  function stringifySexagesimal(node) {
@@ -3061,16 +3063,16 @@ var require_tags = __commonJS(function(exports) {
3061
3063
  }
3062
3064
  if (addMergeTag)
3063
3065
  tags = tags.concat(merge.merge);
3064
- return tags.reduce((tags2, tag) => {
3066
+ return tags.reduce((tags, tag) => {
3065
3067
  const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
3066
3068
  if (!tagObj) {
3067
3069
  const tagName = JSON.stringify(tag);
3068
3070
  const keys = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(", ");
3069
3071
  throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
3070
3072
  }
3071
- if (!tags2.includes(tagObj))
3072
- tags2.push(tagObj);
3073
- return tags2;
3073
+ if (!tags.includes(tagObj))
3074
+ tags.push(tagObj);
3075
+ return tags;
3074
3076
  }, []);
3075
3077
  }
3076
3078
  exports.coreKnownTags = coreKnownTags;
@@ -3397,8 +3399,8 @@ var require_Document = __commonJS(function(exports) {
3397
3399
  };
3398
3400
  const res = toJS.toJS(this.contents, jsonArg ?? "", ctx);
3399
3401
  if (typeof onAnchor === "function")
3400
- for (const { count, res: res2 } of ctx.anchors.values())
3401
- onAnchor(res2, count);
3402
+ for (const { count, res } of ctx.anchors.values())
3403
+ onAnchor(res, count);
3402
3404
  return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res;
3403
3405
  }
3404
3406
  toJSON(jsonArg, onAnchor) {
@@ -4152,12 +4154,12 @@ var require_resolve_block_scalar = __commonJS(function(exports) {
4152
4154
  break;
4153
4155
  }
4154
4156
  if (chompStart === 0) {
4155
- const value2 = header.chomp === "+" && lines.length > 0 ? `
4157
+ const value = header.chomp === "+" && lines.length > 0 ? `
4156
4158
  `.repeat(Math.max(1, lines.length - 1)) : "";
4157
- let end2 = start + header.length;
4159
+ let end = start + header.length;
4158
4160
  if (scalar.source)
4159
- end2 += scalar.source.length;
4160
- return { value: value2, type, comment: header.comment, range: [start, end2, end2] };
4161
+ end += scalar.source.length;
4162
+ return { value, type, comment: header.comment, range: [start, end, end] };
4161
4163
  }
4162
4164
  let trimIndent = scalar.indent + header.indent;
4163
4165
  let offset = scalar.offset + header.length;
@@ -4606,9 +4608,9 @@ var require_compose_scalar = __commonJS(function(exports) {
4606
4608
  return schema[identity.SCALAR];
4607
4609
  }
4608
4610
  function findScalarTagByTest({ atKey, directives, schema }, value, token, onError) {
4609
- const tag = schema.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test(value)) || schema[identity.SCALAR];
4611
+ const tag = schema.tags.find((tag) => (tag.default === true || atKey && tag.default === "key") && tag.test?.test(value)) || schema[identity.SCALAR];
4610
4612
  if (schema.compat) {
4611
- const compat = schema.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema[identity.SCALAR];
4613
+ const compat = schema.compat.find((tag) => tag.default && tag.test?.test(value)) ?? schema[identity.SCALAR];
4612
4614
  if (tag.tag !== compat.tag) {
4613
4615
  const ts = directives.tagString(tag.tag);
4614
4616
  const cs = directives.tagString(compat.tag);
@@ -5764,18 +5766,18 @@ var require_lexer = __commonJS(function(exports) {
5764
5766
  let indent = 0;
5765
5767
  let ch;
5766
5768
  loop:
5767
- for (let i2 = this.pos;ch = this.buffer[i2]; ++i2) {
5769
+ for (let i = this.pos;ch = this.buffer[i]; ++i) {
5768
5770
  switch (ch) {
5769
5771
  case " ":
5770
5772
  indent += 1;
5771
5773
  break;
5772
5774
  case `
5773
5775
  `:
5774
- nl = i2;
5776
+ nl = i;
5775
5777
  indent = 0;
5776
5778
  break;
5777
5779
  case "\r": {
5778
- const next = this.buffer[i2 + 1];
5780
+ const next = this.buffer[i + 1];
5779
5781
  if (!next && !this.atEnd)
5780
5782
  return this.setNext("block-scalar");
5781
5783
  if (next === `
@@ -5818,16 +5820,16 @@ var require_lexer = __commonJS(function(exports) {
5818
5820
  nl = i - 1;
5819
5821
  } else if (!this.blockScalarKeep) {
5820
5822
  do {
5821
- let i2 = nl - 1;
5822
- let ch2 = this.buffer[i2];
5823
- if (ch2 === "\r")
5824
- ch2 = this.buffer[--i2];
5825
- const lastChar = i2;
5826
- while (ch2 === " ")
5827
- ch2 = this.buffer[--i2];
5828
- if (ch2 === `
5829
- ` && i2 >= this.pos && i2 + 1 + indent > lastChar)
5830
- nl = i2;
5823
+ let i = nl - 1;
5824
+ let ch = this.buffer[i];
5825
+ if (ch === "\r")
5826
+ ch = this.buffer[--i];
5827
+ const lastChar = i;
5828
+ while (ch === " ")
5829
+ ch = this.buffer[--i];
5830
+ if (ch === `
5831
+ ` && i >= this.pos && i + 1 + indent > lastChar)
5832
+ nl = i;
5831
5833
  else
5832
5834
  break;
5833
5835
  } while (true);
@@ -6514,12 +6516,12 @@ var require_parser = __commonJS(function(exports) {
6514
6516
  if (includesToken(it.start, "newline")) {
6515
6517
  Object.assign(it, { key: null, sep: [this.sourceToken] });
6516
6518
  } else {
6517
- const start2 = getFirstKeyStartProps(it.start);
6519
+ const start = getFirstKeyStartProps(it.start);
6518
6520
  this.stack.push({
6519
6521
  type: "block-map",
6520
6522
  offset: this.offset,
6521
6523
  indent: this.indent,
6522
- items: [{ start: start2, key: null, sep: [this.sourceToken] }]
6524
+ items: [{ start, key: null, sep: [this.sourceToken] }]
6523
6525
  });
6524
6526
  }
6525
6527
  } else if (it.value) {
@@ -6532,7 +6534,7 @@ var require_parser = __commonJS(function(exports) {
6532
6534
  items: [{ start, key: null, sep: [this.sourceToken] }]
6533
6535
  });
6534
6536
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
6535
- const start2 = getFirstKeyStartProps(it.start);
6537
+ const start = getFirstKeyStartProps(it.start);
6536
6538
  const key = it.key;
6537
6539
  const sep = it.sep;
6538
6540
  sep.push(this.sourceToken);
@@ -6542,7 +6544,7 @@ var require_parser = __commonJS(function(exports) {
6542
6544
  type: "block-map",
6543
6545
  offset: this.offset,
6544
6546
  indent: this.indent,
6545
- items: [{ start: start2, key, sep }]
6547
+ items: [{ start, key, sep }]
6546
6548
  });
6547
6549
  } else if (start.length > 0) {
6548
6550
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -6886,22 +6888,22 @@ var require_public_api = __commonJS(function(exports) {
6886
6888
  return { lineCounter: lineCounter$1, prettyErrors };
6887
6889
  }
6888
6890
  function parseAllDocuments(source, options = {}) {
6889
- const { lineCounter: lineCounter2, prettyErrors } = parseOptions(options);
6890
- const parser$1 = new parser.Parser(lineCounter2?.addNewLine);
6891
+ const { lineCounter, prettyErrors } = parseOptions(options);
6892
+ const parser$1 = new parser.Parser(lineCounter?.addNewLine);
6891
6893
  const composer$1 = new composer.Composer(options);
6892
6894
  const docs = Array.from(composer$1.compose(parser$1.parse(source)));
6893
- if (prettyErrors && lineCounter2)
6895
+ if (prettyErrors && lineCounter)
6894
6896
  for (const doc of docs) {
6895
- doc.errors.forEach(errors.prettifyError(source, lineCounter2));
6896
- doc.warnings.forEach(errors.prettifyError(source, lineCounter2));
6897
+ doc.errors.forEach(errors.prettifyError(source, lineCounter));
6898
+ doc.warnings.forEach(errors.prettifyError(source, lineCounter));
6897
6899
  }
6898
6900
  if (docs.length > 0)
6899
6901
  return docs;
6900
6902
  return Object.assign([], { empty: true }, composer$1.streamInfo());
6901
6903
  }
6902
6904
  function parseDocument(source, options = {}) {
6903
- const { lineCounter: lineCounter2, prettyErrors } = parseOptions(options);
6904
- const parser$1 = new parser.Parser(lineCounter2?.addNewLine);
6905
+ const { lineCounter, prettyErrors } = parseOptions(options);
6906
+ const parser$1 = new parser.Parser(lineCounter?.addNewLine);
6905
6907
  const composer$1 = new composer.Composer(options);
6906
6908
  let doc = null;
6907
6909
  for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) {
@@ -6912,9 +6914,9 @@ var require_public_api = __commonJS(function(exports) {
6912
6914
  break;
6913
6915
  }
6914
6916
  }
6915
- if (prettyErrors && lineCounter2) {
6916
- doc.errors.forEach(errors.prettifyError(source, lineCounter2));
6917
- doc.warnings.forEach(errors.prettifyError(source, lineCounter2));
6917
+ if (prettyErrors && lineCounter) {
6918
+ doc.errors.forEach(errors.prettifyError(source, lineCounter));
6919
+ doc.warnings.forEach(errors.prettifyError(source, lineCounter));
6918
6920
  }
6919
6921
  return doc;
6920
6922
  }
@@ -6966,6 +6968,12 @@ var require_public_api = __commonJS(function(exports) {
6966
6968
  });
6967
6969
 
6968
6970
  // src/core/api/issues.ts
6971
+ var CLOSED_DISPOSITIONS = [
6972
+ "resolved",
6973
+ "wont-fix",
6974
+ "out-of-scope",
6975
+ "risk-accepted"
6976
+ ];
6969
6977
  async function listScans() {
6970
6978
  return apiRequest("GET", "/pentests");
6971
6979
  }
@@ -6998,6 +7006,18 @@ async function getIssue(issueId) {
6998
7006
  async function updateIssue(issueId, data) {
6999
7007
  return apiRequest("PATCH", `/issues/${issueId}`, data);
7000
7008
  }
7009
+ async function listIssueComments(issueId, options) {
7010
+ const params = new URLSearchParams;
7011
+ if (options?.page)
7012
+ params.set("page", String(options.page));
7013
+ if (options?.pageSize)
7014
+ params.set("pageSize", String(options.pageSize));
7015
+ const qs = params.toString();
7016
+ return apiRequest("GET", `/issues/${issueId}/comments${qs ? `?${qs}` : ""}`);
7017
+ }
7018
+ async function createIssueComment(issueId, body) {
7019
+ return apiRequest("POST", `/issues/${issueId}/comments`, { body });
7020
+ }
7001
7021
  async function retestIssue(issueId) {
7002
7022
  return apiRequest("POST", `/issues/${issueId}/retest`);
7003
7023
  }
@@ -7043,6 +7063,8 @@ async function listTargetLogs(targetId, opts) {
7043
7063
  async function searchTargetLogs(targetId, query, opts) {
7044
7064
  return apiRequest("POST", `/targets/${targetId}/logs/search`, { query, ...opts });
7045
7065
  }
7066
+ // src/core/api/blackboxPentest.ts
7067
+ init_ai();
7046
7068
 
7047
7069
  // src/core/api/index.ts
7048
7070
  init_constants();
@@ -7180,14 +7202,14 @@ var ENVIRONMENT_SYSTEM_PROMPT = buildEnvironmentSystemPrompt();
7180
7202
 
7181
7203
  // src/core/agents/specialized/environment/types.ts
7182
7204
  init_zod();
7183
- var EnvironmentResultSchema = exports_external.object({
7184
- url: exports_external.string().describe("The URL where the application is accessible"),
7185
- status: exports_external.enum(["ready", "failed"]).describe("The status of the development environment"),
7186
- stepsTaken: exports_external.string().describe("The steps taken to start the development environment"),
7187
- authenticationDetails: exports_external.string().describe("Details on how to register a user and authenticate within the development environment")
7205
+ var EnvironmentResultSchema = object({
7206
+ url: string().describe("The URL where the application is accessible"),
7207
+ status: _enum(["ready", "failed"]).describe("The status of the development environment"),
7208
+ stepsTaken: string().describe("The steps taken to start the development environment"),
7209
+ authenticationDetails: string().describe("Details on how to register a user and authenticate within the development environment")
7188
7210
  });
7189
7211
  // src/core/api/offesecAgent.ts
7190
- async function runOffensiveSecurityAgent(input) {
7212
+ async function runOffensiveSecurityAgent2(input) {
7191
7213
  const agent = input.session ? new OffensiveSecurityAgent(input) : await OffensiveSecurityAgent.create(input);
7192
7214
  input.onSessionReady?.(agent.session);
7193
7215
  await agent.consume();
@@ -7390,13 +7412,13 @@ var PATCHING_SYSTEM_PROMPT = buildSystemPrompt();
7390
7412
 
7391
7413
  // src/core/agents/specialized/patching/types.ts
7392
7414
  init_zod();
7393
- var PatchResultSchema = exports_external.object({
7394
- filesChanged: exports_external.array(exports_external.object({
7395
- filePath: exports_external.string().describe("Path to the file that was changed"),
7396
- changesDescription: exports_external.string().describe("Detailed description of the changes made to the file")
7415
+ var PatchResultSchema = object({
7416
+ filesChanged: array(object({
7417
+ filePath: string().describe("Path to the file that was changed"),
7418
+ changesDescription: string().describe("Detailed description of the changes made to the file")
7397
7419
  })),
7398
- prTitle: exports_external.string().describe("Title for the pull request"),
7399
- prDescription: exports_external.string().describe("Description for the pull request")
7420
+ prTitle: string().describe("Title for the pull request"),
7421
+ prDescription: string().describe("Description for the pull request")
7400
7422
  });
7401
7423
  // src/core/workflows/threatModel.ts
7402
7424
  init_dist();
@@ -8169,8 +8191,8 @@ function createSkillsRegistry() {
8169
8191
  }
8170
8192
 
8171
8193
  // src/core/workflows/threatModel.ts
8172
- var HEADLESS_TOOL_NAMES = ALL_TOOL_NAMES.filter((name) => name !== ASK_USER_QUESTIONS_TOOL_NAME);
8173
- async function runThreatModelWorkflow(input) {
8194
+ var HEADLESS_TOOL_NAMES = ALL_TOOL_NAMES2.filter((name) => name !== ASK_USER_QUESTIONS_TOOL_NAME);
8195
+ async function runThreatModelWorkflow2(input) {
8174
8196
  const model = input.model ?? "claude-sonnet-4-5";
8175
8197
  const registry = createSkillsRegistry();
8176
8198
  await registry.load({ projectRoot: input.codebasePath });
@@ -8180,7 +8202,7 @@ async function runThreatModelWorkflow(input) {
8180
8202
  codebasePath: input.codebasePath,
8181
8203
  skillContent: content
8182
8204
  });
8183
- const session = input.session ?? await sessions.create({
8205
+ const session = input.session ?? await sessions2.create({
8184
8206
  name: "Threat Model",
8185
8207
  targets: [input.codebasePath],
8186
8208
  config: { mode: "operator", agentCwd: input.codebasePath }
@@ -8191,18 +8213,18 @@ async function runThreatModelWorkflow(input) {
8191
8213
 
8192
8214
  You are generating an application-centric threat model from source code analysis.
8193
8215
  Working directory: ${input.codebasePath}`;
8194
- await runOffensiveSecurityAgent({
8216
+ await runOffensiveSecurityAgent2({
8195
8217
  system,
8196
8218
  prompt,
8197
8219
  model,
8198
8220
  session,
8199
- activeTools: [...HEADLESS_TOOL_NAMES, ...SKILL_TOOL_NAMES],
8221
+ activeTools: [...HEADLESS_TOOL_NAMES, ...SKILL_TOOL_NAMES2],
8200
8222
  authConfig: input.authConfig,
8201
8223
  abortSignal: input.abortSignal,
8202
8224
  skillsRegistry: registry,
8203
8225
  eventBus: input.eventBus,
8204
- stopWhen: stepCountIs(1e4)
8226
+ stopWhen: stepCountIs2(1e4)
8205
8227
  });
8206
8228
  return { session, outputPath: input.outputPath };
8207
8229
  }
8208
- export { listScans, getScan, listPentestTargets, dispatchPentest, listIssues, getIssue, updateIssue, retestIssue, linkPullRequest, listIssuePullRequests, listFixes, getFix, listAgentLogs, searchAgentLogs, listTargetLogs, searchTargetLogs, runOffensiveSecurityAgent, buildPentestPrompt, buildThreatModelPrompt, createSkillsRegistry, runThreatModelWorkflow };
8230
+ export { CLOSED_DISPOSITIONS, listScans, getScan, listPentestTargets, dispatchPentest, listIssues, getIssue, updateIssue, listIssueComments, createIssueComment, retestIssue, linkPullRequest, listIssuePullRequests, listFixes, getFix, listAgentLogs, searchAgentLogs, listTargetLogs, searchTargetLogs, runOffensiveSecurityAgent2, buildPentestPrompt, buildThreatModelPrompt, createSkillsRegistry, runThreatModelWorkflow2 };