@pensar/apex 2.4.0 → 2.5.0-canary.22f2eb52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/build/agent-7qtpem5z.js +12 -0
  2. package/build/agent-9khcyh5t.js +14 -0
  3. package/build/agent-bsyhck0a.js +12 -0
  4. package/build/{agent-5ejt5vpz.js → agent-ywewzc2h.js} +42 -42
  5. package/build/{apps-17wvz1d7.js → apps-11akynyv.js} +74 -43
  6. package/build/{auth-z3h9859n.js → auth-dd6r9mk4.js} +57 -61
  7. package/build/blackboxAgent-hbra4k00.js +12 -0
  8. package/build/blackboxPentest-bn5evs2z.js +61 -0
  9. package/build/{cli-xshasbwe.js → cli-3v9zs5wm.js} +31 -52
  10. package/build/{cli-mavved45.js → cli-4z46kyrk.js} +86 -93
  11. package/build/cli-7vby0hk6.js +12136 -0
  12. package/build/{cli-gq40s5b3.js → cli-8kkaeb70.js} +33 -46
  13. package/build/cli-8w8k4dph.js +15 -0
  14. package/build/cli-ag6jtndp.js +32 -0
  15. package/build/{cli-2cbwdk78.js → cli-ak78mweh.js} +4 -4
  16. package/build/cli-bb02pjt0.js +1485 -0
  17. package/build/{cli-k71t434r.js → cli-ec2hwkv3.js} +34 -76
  18. package/build/{cli-vnynf0js.js → cli-f5rw841m.js} +11 -5
  19. package/build/{cli-k8kc47pq.js → cli-gamfs2yq.js} +118 -115
  20. package/build/{cli-32z0017y.js → cli-gq5sk2j3.js} +36 -60
  21. package/build/{cli-bc05qbss.js → cli-h6y3bt60.js} +13 -21
  22. package/build/{cli-tkc598ey.js → cli-j1916nvj.js} +10035 -7661
  23. package/build/{cli-5k33webc.js → cli-jw1xftqm.js} +355 -332
  24. package/build/{cli-tznv8pf1.js → cli-n4h7ygp5.js} +4 -4
  25. package/build/{cli-b1adytsy.js → cli-q45hcq3f.js} +67 -39
  26. package/build/{cli-repbyhkk.js → cli-qkb3v2nw.js} +26063 -25373
  27. package/build/{cli-j54qa6tm.js → cli-qktcyj48.js} +1 -1
  28. package/build/cli-retw3rw5.js +12 -0
  29. package/build/cli-tjm77pmx.js +12075 -0
  30. package/build/{cli-dm0fc0bm.js → cli-v1sarr4y.js} +5 -9
  31. package/build/{cli-9rhzhgx2.js → cli-v8ph8hy2.js} +5 -5
  32. package/build/{cli-vq52kp7j.js → cli-vkxx4jzv.js} +147 -128
  33. package/build/cli-wfb4gde1.js +22 -0
  34. package/build/{cli-ee3axgts.js → cli-xbhr5khz.js} +1 -1
  35. package/build/cli-z82n3qk1.js +6 -0
  36. package/build/cli.js +689 -132
  37. package/build/{config-f1mj4nhd.js → config-kv5v9ctn.js} +29 -29
  38. package/build/{doctor-ekneewa3.js → doctor-xs4s5km8.js} +4 -9
  39. package/build/{fastStrike-8zka43xs.js → fastStrike-b8t8f916.js} +26 -28
  40. package/build/{fixes-b89s5haw.js → fixes-kcckqx3s.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-3mzr07h0.js +9 -0
  47. package/build/index-63zf8jxx.js +12 -0
  48. package/build/index-a1bg29j1.js +1559 -0
  49. package/build/{index-cbwn03kz.js → index-a2xycbjs.js} +12 -31
  50. package/build/{index-6d22pyxt.js → index-ae81pvwg.js} +2995 -2432
  51. package/build/index-cbajq2xy.js +17 -0
  52. package/build/index-cn4p95gh.js +100 -0
  53. package/build/index-kas88svr.js +36 -0
  54. package/build/index-mr20g8k4.js +22 -0
  55. package/build/{index-psqjpw5m.js → index-nweqptgs.js} +7 -7
  56. package/build/{index-sf16jm0m.js → index-rx5jn1nz.js} +137 -162
  57. package/build/{issues-xx5bs4md.js → issues-jm28k288.js} +81 -35
  58. package/build/{logs-qtxe51w2.js → logs-r02tbz89.js} +20 -25
  59. package/build/{multipart-parser-g2xxkezz.js → multipart-parser-vjjdbpd1.js} +10 -10
  60. package/build/{offesecAgent-b9e2xm6v.js → offesecAgent-mmfejh1j.js} +6 -13
  61. package/build/{parse-rtccymzn.js → parse-cqecqrc5.js} +0 -4
  62. package/build/pentest-13jcm4cy.js +21 -0
  63. package/build/{pentests-6ks3szc4.js → pentests-jyn4zs7n.js} +23 -28
  64. package/build/{targetedPentest-s1ptvq8e.js → targetedPentest-m3qkbpv6.js} +16 -20
  65. package/build/{targets-sxygyj87.js → targets-rqv57as0.js} +22 -27
  66. package/build/threatModel-scmz36xr.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-bme62bdg.js} +7 -4
  70. package/build/{upload-7wdyyqmr.js → upload-hwpgx1ha.js} +7 -13
  71. package/build/{utils-7fwdkqk6.js → utils-abtz5mmk.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,29 @@
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
+ sessions2,
7
+ init_session
8
+ } from "./cli-j1916nvj.js";
15
9
  import {
16
- init_constants
17
- } from "./cli-0n4r54hq.js";
10
+ buildBaseSystemPrompt,
11
+ ASK_USER_QUESTIONS_TOOL_NAME,
12
+ apiRequest,
13
+ ALL_TOOL_NAMES2,
14
+ SKILL_TOOL_NAMES2,
15
+ OffensiveSecurityAgent
16
+ } from "./cli-qkb3v2nw.js";
18
17
  import {
19
- exports_external,
20
- init_zod
21
- } from "./cli-swpbx60z.js";
18
+ string,
19
+ array,
20
+ object,
21
+ _enum
22
+ } from "./cli-tjm77pmx.js";
22
23
  import {
23
24
  __commonJS,
24
25
  __require
25
- } from "./cli-bc05qbss.js";
26
+ } from "./cli-h6y3bt60.js";
26
27
 
27
28
  // node_modules/yaml/dist/nodes/identity.js
28
29
  var require_identity = __commonJS(function(exports) {
@@ -505,8 +506,8 @@ var require_toJS = __commonJS(function(exports) {
505
506
  return value.toJSON(arg, ctx);
506
507
  const data = { aliasCount: 0, count: 1, res: undefined };
507
508
  ctx.anchors.set(value, data);
508
- ctx.onCreate = (res2) => {
509
- data.res = res2;
509
+ ctx.onCreate = (res) => {
510
+ data.res = res;
510
511
  delete ctx.onCreate;
511
512
  };
512
513
  const res = value.toJSON(arg, ctx);
@@ -550,8 +551,8 @@ var require_Node = __commonJS(function(exports) {
550
551
  };
551
552
  const res = toJS.toJS(this, "", ctx);
552
553
  if (typeof onAnchor === "function")
553
- for (const { count, res: res2 } of ctx.anchors.values())
554
- onAnchor(res2, count);
554
+ for (const { count, res } of ctx.anchors.values())
555
+ onAnchor(res, count);
555
556
  return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res;
556
557
  }
557
558
  }
@@ -605,16 +606,16 @@ var require_Alias = __commonJS(function(exports) {
605
606
  toJSON(_arg, ctx) {
606
607
  if (!ctx)
607
608
  return { source: this.source };
608
- const { anchors: anchors2, doc, maxAliasCount } = ctx;
609
+ const { anchors, doc, maxAliasCount } = ctx;
609
610
  const source = this.resolve(doc, ctx);
610
611
  if (!source) {
611
612
  const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
612
613
  throw new ReferenceError(msg);
613
614
  }
614
- let data = anchors2.get(source);
615
+ let data = anchors.get(source);
615
616
  if (!data) {
616
617
  toJS.toJS(source, null, ctx);
617
- data = anchors2.get(source);
618
+ data = anchors.get(source);
618
619
  }
619
620
  if (data?.res === undefined) {
620
621
  const msg = "This should not happen: Alias anchor was not resolved?";
@@ -623,7 +624,7 @@ var require_Alias = __commonJS(function(exports) {
623
624
  if (maxAliasCount >= 0) {
624
625
  data.count += 1;
625
626
  if (data.aliasCount === 0)
626
- data.aliasCount = getAliasCount(doc, source, anchors2);
627
+ data.aliasCount = getAliasCount(doc, source, anchors);
627
628
  if (data.count * data.aliasCount > maxAliasCount) {
628
629
  const msg = "Excessive alias count indicates a resource exhaustion attack";
629
630
  throw new ReferenceError(msg);
@@ -645,22 +646,22 @@ var require_Alias = __commonJS(function(exports) {
645
646
  return src;
646
647
  }
647
648
  }
648
- function getAliasCount(doc, node, anchors2) {
649
+ function getAliasCount(doc, node, anchors) {
649
650
  if (identity.isAlias(node)) {
650
651
  const source = node.resolve(doc);
651
- const anchor = anchors2 && source && anchors2.get(source);
652
+ const anchor = anchors && source && anchors.get(source);
652
653
  return anchor ? anchor.count * anchor.aliasCount : 0;
653
654
  } else if (identity.isCollection(node)) {
654
655
  let count = 0;
655
656
  for (const item of node.items) {
656
- const c = getAliasCount(doc, item, anchors2);
657
+ const c = getAliasCount(doc, item, anchors);
657
658
  if (c > count)
658
659
  count = c;
659
660
  }
660
661
  return count;
661
662
  } else if (identity.isPair(node)) {
662
- const kc = getAliasCount(doc, node.key, anchors2);
663
- const vc = getAliasCount(doc, node.value, anchors2);
663
+ const kc = getAliasCount(doc, node.key, anchors);
664
+ const vc = getAliasCount(doc, node.value, anchors);
664
665
  return Math.max(kc, vc);
665
666
  }
666
667
  return 1;
@@ -745,10 +746,10 @@ var require_createNode = __commonJS(function(exports) {
745
746
  value = value.toJSON();
746
747
  }
747
748
  if (!value || typeof value !== "object") {
748
- const node2 = new Scalar.Scalar(value);
749
+ const node = new Scalar.Scalar(value);
749
750
  if (ref)
750
- ref.node = node2;
751
- return node2;
751
+ ref.node = node;
752
+ return node;
752
753
  }
753
754
  tagObj = value instanceof Map ? schema[identity.MAP] : (Symbol.iterator in Object(value)) ? schema[identity.SEQ] : schema[identity.MAP];
754
755
  }
@@ -997,17 +998,17 @@ var require_foldFlowLines = __commonJS(function(exports) {
997
998
  if (onFold)
998
999
  onFold();
999
1000
  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;
1001
+ for (let i = 0;i < folds.length; ++i) {
1002
+ const fold = folds[i];
1003
+ const end = folds[i + 1] || text.length;
1003
1004
  if (fold === 0)
1004
1005
  res = `
1005
- ${indent}${text.slice(0, end2)}`;
1006
+ ${indent}${text.slice(0, end)}`;
1006
1007
  else {
1007
1008
  if (mode === FOLD_QUOTED && escapedFolds[fold])
1008
1009
  res += `${text[fold]}\\`;
1009
1010
  res += `
1010
- ${indent}${text.slice(fold + 1, end2)}`;
1011
+ ${indent}${text.slice(fold + 1, end)}`;
1011
1012
  }
1012
1013
  }
1013
1014
  return res;
@@ -1643,15 +1644,15 @@ var require_merge = __commonJS(function(exports) {
1643
1644
  if (!identity.isMap(source))
1644
1645
  throw new Error("Merge sources must be maps or map aliases");
1645
1646
  const srcMap = source.toJSON(null, ctx, Map);
1646
- for (const [key, value2] of srcMap) {
1647
+ for (const [key, value] of srcMap) {
1647
1648
  if (map instanceof Map) {
1648
1649
  if (!map.has(key))
1649
- map.set(key, value2);
1650
+ map.set(key, value);
1650
1651
  } else if (map instanceof Set) {
1651
1652
  map.add(key);
1652
1653
  } else if (!Object.prototype.hasOwnProperty.call(map, key)) {
1653
1654
  Object.defineProperty(map, key, {
1654
- value: value2,
1655
+ value,
1655
1656
  writable: true,
1656
1657
  enumerable: true,
1657
1658
  configurable: true
@@ -1774,8 +1775,8 @@ var require_stringifyCollection = __commonJS(function(exports) {
1774
1775
  var stringifyComment = require_stringifyComment();
1775
1776
  function stringifyCollection(collection, ctx, options) {
1776
1777
  const flow = ctx.inFlow ?? collection.flow;
1777
- const stringify2 = flow ? stringifyFlowCollection : stringifyBlockCollection;
1778
- return stringify2(collection, ctx, options);
1778
+ const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;
1779
+ return stringify(collection, ctx, options);
1779
1780
  }
1780
1781
  function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
1781
1782
  const { indent, options: { commentString } } = ctx;
@@ -1784,13 +1785,13 @@ var require_stringifyCollection = __commonJS(function(exports) {
1784
1785
  const lines = [];
1785
1786
  for (let i = 0;i < items.length; ++i) {
1786
1787
  const item = items[i];
1787
- let comment2 = null;
1788
+ let comment = null;
1788
1789
  if (identity.isNode(item)) {
1789
1790
  if (!chompKeep && item.spaceBefore)
1790
1791
  lines.push("");
1791
1792
  addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
1792
1793
  if (item.comment)
1793
- comment2 = item.comment;
1794
+ comment = item.comment;
1794
1795
  } else if (identity.isPair(item)) {
1795
1796
  const ik = identity.isNode(item.key) ? item.key : null;
1796
1797
  if (ik) {
@@ -1800,12 +1801,12 @@ var require_stringifyCollection = __commonJS(function(exports) {
1800
1801
  }
1801
1802
  }
1802
1803
  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)
1804
+ let str = stringify.stringify(item, itemCtx, () => comment = null, () => chompKeep = true);
1805
+ if (comment)
1806
+ str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
1807
+ if (chompKeep && comment)
1807
1808
  chompKeep = false;
1808
- lines.push(blockItemPrefix + str2);
1809
+ lines.push(blockItemPrefix + str);
1809
1810
  }
1810
1811
  let str;
1811
1812
  if (lines.length === 0) {
@@ -2055,10 +2056,10 @@ var require_map = __commonJS(function(exports) {
2055
2056
  default: true,
2056
2057
  nodeClass: YAMLMap.YAMLMap,
2057
2058
  tag: "tag:yaml.org,2002:map",
2058
- resolve(map2, onError) {
2059
- if (!identity.isMap(map2))
2059
+ resolve(map, onError) {
2060
+ if (!identity.isMap(map))
2060
2061
  onError("Expected a mapping for this tag");
2061
- return map2;
2062
+ return map;
2062
2063
  },
2063
2064
  createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)
2064
2065
  };
@@ -2167,10 +2168,10 @@ var require_seq = __commonJS(function(exports) {
2167
2168
  default: true,
2168
2169
  nodeClass: YAMLSeq.YAMLSeq,
2169
2170
  tag: "tag:yaml.org,2002:seq",
2170
- resolve(seq2, onError) {
2171
- if (!identity.isSeq(seq2))
2171
+ resolve(seq, onError) {
2172
+ if (!identity.isSeq(seq))
2172
2173
  onError("Expected a sequence for this tag");
2173
- return seq2;
2174
+ return seq;
2174
2175
  },
2175
2176
  createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx)
2176
2177
  };
@@ -2516,8 +2517,8 @@ ${cn.comment}` : item.comment;
2516
2517
  }
2517
2518
  function createPairs(schema, iterable, ctx) {
2518
2519
  const { replacer } = ctx;
2519
- const pairs2 = new YAMLSeq.YAMLSeq(schema);
2520
- pairs2.tag = "tag:yaml.org,2002:pairs";
2520
+ const pairs = new YAMLSeq.YAMLSeq(schema);
2521
+ pairs.tag = "tag:yaml.org,2002:pairs";
2521
2522
  let i = 0;
2522
2523
  if (iterable && Symbol.iterator in Object(iterable))
2523
2524
  for (let it of iterable) {
@@ -2541,9 +2542,9 @@ ${cn.comment}` : item.comment;
2541
2542
  } else {
2542
2543
  key = it;
2543
2544
  }
2544
- pairs2.items.push(Pair.createPair(key, value, ctx));
2545
+ pairs.items.push(Pair.createPair(key, value, ctx));
2545
2546
  }
2546
- return pairs2;
2547
+ return pairs;
2547
2548
  }
2548
2549
  var pairs = {
2549
2550
  collection: "seq",
@@ -2597,9 +2598,9 @@ var require_omap = __commonJS(function(exports) {
2597
2598
  }
2598
2599
  static from(schema, iterable, ctx) {
2599
2600
  const pairs$1 = pairs.createPairs(schema, iterable, ctx);
2600
- const omap2 = new this;
2601
- omap2.items = pairs$1.items;
2602
- return omap2;
2601
+ const omap = new this;
2602
+ omap.items = pairs$1.items;
2603
+ return omap;
2603
2604
  }
2604
2605
  }
2605
2606
  YAMLOMap.tag = "tag:yaml.org,2002:omap";
@@ -2725,8 +2726,8 @@ var require_int2 = __commonJS(function(exports) {
2725
2726
  str = `0x${str}`;
2726
2727
  break;
2727
2728
  }
2728
- const n2 = BigInt(str);
2729
- return sign === "-" ? BigInt(-1) * n2 : n2;
2729
+ const n = BigInt(str);
2730
+ return sign === "-" ? BigInt(-1) * n : n;
2730
2731
  }
2731
2732
  const n = parseInt(str, radix);
2732
2733
  return sign === "-" ? -1 * n : n;
@@ -2830,14 +2831,14 @@ var require_set = __commonJS(function(exports) {
2830
2831
  }
2831
2832
  static from(schema, iterable, ctx) {
2832
2833
  const { replacer } = ctx;
2833
- const set2 = new this(schema);
2834
+ const set = new this(schema);
2834
2835
  if (iterable && Symbol.iterator in Object(iterable))
2835
2836
  for (let value of iterable) {
2836
2837
  if (typeof replacer === "function")
2837
2838
  value = replacer.call(iterable, value, value);
2838
- set2.items.push(Pair.createPair(value, null, ctx));
2839
+ set.items.push(Pair.createPair(value, null, ctx));
2839
2840
  }
2840
- return set2;
2841
+ return set;
2841
2842
  }
2842
2843
  }
2843
2844
  YAMLSet.tag = "tag:yaml.org,2002:set";
@@ -2870,7 +2871,7 @@ var require_timestamp = __commonJS(function(exports) {
2870
2871
  const sign = str[0];
2871
2872
  const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
2872
2873
  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));
2874
+ const res = parts.replace(/_/g, "").split(":").reduce((res, p) => res * num(60) + num(p), num(0));
2874
2875
  return sign === "-" ? num(-1) * res : res;
2875
2876
  }
2876
2877
  function stringifySexagesimal(node) {
@@ -3061,16 +3062,16 @@ var require_tags = __commonJS(function(exports) {
3061
3062
  }
3062
3063
  if (addMergeTag)
3063
3064
  tags = tags.concat(merge.merge);
3064
- return tags.reduce((tags2, tag) => {
3065
+ return tags.reduce((tags, tag) => {
3065
3066
  const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
3066
3067
  if (!tagObj) {
3067
3068
  const tagName = JSON.stringify(tag);
3068
3069
  const keys = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(", ");
3069
3070
  throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
3070
3071
  }
3071
- if (!tags2.includes(tagObj))
3072
- tags2.push(tagObj);
3073
- return tags2;
3072
+ if (!tags.includes(tagObj))
3073
+ tags.push(tagObj);
3074
+ return tags;
3074
3075
  }, []);
3075
3076
  }
3076
3077
  exports.coreKnownTags = coreKnownTags;
@@ -3397,8 +3398,8 @@ var require_Document = __commonJS(function(exports) {
3397
3398
  };
3398
3399
  const res = toJS.toJS(this.contents, jsonArg ?? "", ctx);
3399
3400
  if (typeof onAnchor === "function")
3400
- for (const { count, res: res2 } of ctx.anchors.values())
3401
- onAnchor(res2, count);
3401
+ for (const { count, res } of ctx.anchors.values())
3402
+ onAnchor(res, count);
3402
3403
  return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res;
3403
3404
  }
3404
3405
  toJSON(jsonArg, onAnchor) {
@@ -4152,12 +4153,12 @@ var require_resolve_block_scalar = __commonJS(function(exports) {
4152
4153
  break;
4153
4154
  }
4154
4155
  if (chompStart === 0) {
4155
- const value2 = header.chomp === "+" && lines.length > 0 ? `
4156
+ const value = header.chomp === "+" && lines.length > 0 ? `
4156
4157
  `.repeat(Math.max(1, lines.length - 1)) : "";
4157
- let end2 = start + header.length;
4158
+ let end = start + header.length;
4158
4159
  if (scalar.source)
4159
- end2 += scalar.source.length;
4160
- return { value: value2, type, comment: header.comment, range: [start, end2, end2] };
4160
+ end += scalar.source.length;
4161
+ return { value, type, comment: header.comment, range: [start, end, end] };
4161
4162
  }
4162
4163
  let trimIndent = scalar.indent + header.indent;
4163
4164
  let offset = scalar.offset + header.length;
@@ -4606,9 +4607,9 @@ var require_compose_scalar = __commonJS(function(exports) {
4606
4607
  return schema[identity.SCALAR];
4607
4608
  }
4608
4609
  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];
4610
+ const tag = schema.tags.find((tag) => (tag.default === true || atKey && tag.default === "key") && tag.test?.test(value)) || schema[identity.SCALAR];
4610
4611
  if (schema.compat) {
4611
- const compat = schema.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema[identity.SCALAR];
4612
+ const compat = schema.compat.find((tag) => tag.default && tag.test?.test(value)) ?? schema[identity.SCALAR];
4612
4613
  if (tag.tag !== compat.tag) {
4613
4614
  const ts = directives.tagString(tag.tag);
4614
4615
  const cs = directives.tagString(compat.tag);
@@ -5764,18 +5765,18 @@ var require_lexer = __commonJS(function(exports) {
5764
5765
  let indent = 0;
5765
5766
  let ch;
5766
5767
  loop:
5767
- for (let i2 = this.pos;ch = this.buffer[i2]; ++i2) {
5768
+ for (let i = this.pos;ch = this.buffer[i]; ++i) {
5768
5769
  switch (ch) {
5769
5770
  case " ":
5770
5771
  indent += 1;
5771
5772
  break;
5772
5773
  case `
5773
5774
  `:
5774
- nl = i2;
5775
+ nl = i;
5775
5776
  indent = 0;
5776
5777
  break;
5777
5778
  case "\r": {
5778
- const next = this.buffer[i2 + 1];
5779
+ const next = this.buffer[i + 1];
5779
5780
  if (!next && !this.atEnd)
5780
5781
  return this.setNext("block-scalar");
5781
5782
  if (next === `
@@ -5818,16 +5819,16 @@ var require_lexer = __commonJS(function(exports) {
5818
5819
  nl = i - 1;
5819
5820
  } else if (!this.blockScalarKeep) {
5820
5821
  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;
5822
+ let i = nl - 1;
5823
+ let ch = this.buffer[i];
5824
+ if (ch === "\r")
5825
+ ch = this.buffer[--i];
5826
+ const lastChar = i;
5827
+ while (ch === " ")
5828
+ ch = this.buffer[--i];
5829
+ if (ch === `
5830
+ ` && i >= this.pos && i + 1 + indent > lastChar)
5831
+ nl = i;
5831
5832
  else
5832
5833
  break;
5833
5834
  } while (true);
@@ -6514,12 +6515,12 @@ var require_parser = __commonJS(function(exports) {
6514
6515
  if (includesToken(it.start, "newline")) {
6515
6516
  Object.assign(it, { key: null, sep: [this.sourceToken] });
6516
6517
  } else {
6517
- const start2 = getFirstKeyStartProps(it.start);
6518
+ const start = getFirstKeyStartProps(it.start);
6518
6519
  this.stack.push({
6519
6520
  type: "block-map",
6520
6521
  offset: this.offset,
6521
6522
  indent: this.indent,
6522
- items: [{ start: start2, key: null, sep: [this.sourceToken] }]
6523
+ items: [{ start, key: null, sep: [this.sourceToken] }]
6523
6524
  });
6524
6525
  }
6525
6526
  } else if (it.value) {
@@ -6532,7 +6533,7 @@ var require_parser = __commonJS(function(exports) {
6532
6533
  items: [{ start, key: null, sep: [this.sourceToken] }]
6533
6534
  });
6534
6535
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
6535
- const start2 = getFirstKeyStartProps(it.start);
6536
+ const start = getFirstKeyStartProps(it.start);
6536
6537
  const key = it.key;
6537
6538
  const sep = it.sep;
6538
6539
  sep.push(this.sourceToken);
@@ -6542,7 +6543,7 @@ var require_parser = __commonJS(function(exports) {
6542
6543
  type: "block-map",
6543
6544
  offset: this.offset,
6544
6545
  indent: this.indent,
6545
- items: [{ start: start2, key, sep }]
6546
+ items: [{ start, key, sep }]
6546
6547
  });
6547
6548
  } else if (start.length > 0) {
6548
6549
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -6886,22 +6887,22 @@ var require_public_api = __commonJS(function(exports) {
6886
6887
  return { lineCounter: lineCounter$1, prettyErrors };
6887
6888
  }
6888
6889
  function parseAllDocuments(source, options = {}) {
6889
- const { lineCounter: lineCounter2, prettyErrors } = parseOptions(options);
6890
- const parser$1 = new parser.Parser(lineCounter2?.addNewLine);
6890
+ const { lineCounter, prettyErrors } = parseOptions(options);
6891
+ const parser$1 = new parser.Parser(lineCounter?.addNewLine);
6891
6892
  const composer$1 = new composer.Composer(options);
6892
6893
  const docs = Array.from(composer$1.compose(parser$1.parse(source)));
6893
- if (prettyErrors && lineCounter2)
6894
+ if (prettyErrors && lineCounter)
6894
6895
  for (const doc of docs) {
6895
- doc.errors.forEach(errors.prettifyError(source, lineCounter2));
6896
- doc.warnings.forEach(errors.prettifyError(source, lineCounter2));
6896
+ doc.errors.forEach(errors.prettifyError(source, lineCounter));
6897
+ doc.warnings.forEach(errors.prettifyError(source, lineCounter));
6897
6898
  }
6898
6899
  if (docs.length > 0)
6899
6900
  return docs;
6900
6901
  return Object.assign([], { empty: true }, composer$1.streamInfo());
6901
6902
  }
6902
6903
  function parseDocument(source, options = {}) {
6903
- const { lineCounter: lineCounter2, prettyErrors } = parseOptions(options);
6904
- const parser$1 = new parser.Parser(lineCounter2?.addNewLine);
6904
+ const { lineCounter, prettyErrors } = parseOptions(options);
6905
+ const parser$1 = new parser.Parser(lineCounter?.addNewLine);
6905
6906
  const composer$1 = new composer.Composer(options);
6906
6907
  let doc = null;
6907
6908
  for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) {
@@ -6912,9 +6913,9 @@ var require_public_api = __commonJS(function(exports) {
6912
6913
  break;
6913
6914
  }
6914
6915
  }
6915
- if (prettyErrors && lineCounter2) {
6916
- doc.errors.forEach(errors.prettifyError(source, lineCounter2));
6917
- doc.warnings.forEach(errors.prettifyError(source, lineCounter2));
6916
+ if (prettyErrors && lineCounter) {
6917
+ doc.errors.forEach(errors.prettifyError(source, lineCounter));
6918
+ doc.warnings.forEach(errors.prettifyError(source, lineCounter));
6918
6919
  }
6919
6920
  return doc;
6920
6921
  }
@@ -6966,6 +6967,12 @@ var require_public_api = __commonJS(function(exports) {
6966
6967
  });
6967
6968
 
6968
6969
  // src/core/api/issues.ts
6970
+ var CLOSED_DISPOSITIONS = [
6971
+ "resolved",
6972
+ "wont-fix",
6973
+ "out-of-scope",
6974
+ "risk-accepted"
6975
+ ];
6969
6976
  async function listScans() {
6970
6977
  return apiRequest("GET", "/pentests");
6971
6978
  }
@@ -6998,6 +7005,18 @@ async function getIssue(issueId) {
6998
7005
  async function updateIssue(issueId, data) {
6999
7006
  return apiRequest("PATCH", `/issues/${issueId}`, data);
7000
7007
  }
7008
+ async function listIssueComments(issueId, options) {
7009
+ const params = new URLSearchParams;
7010
+ if (options?.page)
7011
+ params.set("page", String(options.page));
7012
+ if (options?.pageSize)
7013
+ params.set("pageSize", String(options.pageSize));
7014
+ const qs = params.toString();
7015
+ return apiRequest("GET", `/issues/${issueId}/comments${qs ? `?${qs}` : ""}`);
7016
+ }
7017
+ async function createIssueComment(issueId, body) {
7018
+ return apiRequest("POST", `/issues/${issueId}/comments`, { body });
7019
+ }
7001
7020
  async function retestIssue(issueId) {
7002
7021
  return apiRequest("POST", `/issues/${issueId}/retest`);
7003
7022
  }
@@ -7180,14 +7199,14 @@ var ENVIRONMENT_SYSTEM_PROMPT = buildEnvironmentSystemPrompt();
7180
7199
 
7181
7200
  // src/core/agents/specialized/environment/types.ts
7182
7201
  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")
7202
+ var EnvironmentResultSchema = object({
7203
+ url: string().describe("The URL where the application is accessible"),
7204
+ status: _enum(["ready", "failed"]).describe("The status of the development environment"),
7205
+ stepsTaken: string().describe("The steps taken to start the development environment"),
7206
+ authenticationDetails: string().describe("Details on how to register a user and authenticate within the development environment")
7188
7207
  });
7189
7208
  // src/core/api/offesecAgent.ts
7190
- async function runOffensiveSecurityAgent(input) {
7209
+ async function runOffensiveSecurityAgent2(input) {
7191
7210
  const agent = input.session ? new OffensiveSecurityAgent(input) : await OffensiveSecurityAgent.create(input);
7192
7211
  input.onSessionReady?.(agent.session);
7193
7212
  await agent.consume();
@@ -7390,13 +7409,13 @@ var PATCHING_SYSTEM_PROMPT = buildSystemPrompt();
7390
7409
 
7391
7410
  // src/core/agents/specialized/patching/types.ts
7392
7411
  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")
7412
+ var PatchResultSchema = object({
7413
+ filesChanged: array(object({
7414
+ filePath: string().describe("Path to the file that was changed"),
7415
+ changesDescription: string().describe("Detailed description of the changes made to the file")
7397
7416
  })),
7398
- prTitle: exports_external.string().describe("Title for the pull request"),
7399
- prDescription: exports_external.string().describe("Description for the pull request")
7417
+ prTitle: string().describe("Title for the pull request"),
7418
+ prDescription: string().describe("Description for the pull request")
7400
7419
  });
7401
7420
  // src/core/workflows/threatModel.ts
7402
7421
  init_dist();
@@ -8169,8 +8188,8 @@ function createSkillsRegistry() {
8169
8188
  }
8170
8189
 
8171
8190
  // 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) {
8191
+ var HEADLESS_TOOL_NAMES = ALL_TOOL_NAMES2.filter((name) => name !== ASK_USER_QUESTIONS_TOOL_NAME);
8192
+ async function runThreatModelWorkflow2(input) {
8174
8193
  const model = input.model ?? "claude-sonnet-4-5";
8175
8194
  const registry = createSkillsRegistry();
8176
8195
  await registry.load({ projectRoot: input.codebasePath });
@@ -8180,7 +8199,7 @@ async function runThreatModelWorkflow(input) {
8180
8199
  codebasePath: input.codebasePath,
8181
8200
  skillContent: content
8182
8201
  });
8183
- const session = input.session ?? await sessions.create({
8202
+ const session = input.session ?? await sessions2.create({
8184
8203
  name: "Threat Model",
8185
8204
  targets: [input.codebasePath],
8186
8205
  config: { mode: "operator", agentCwd: input.codebasePath }
@@ -8191,18 +8210,18 @@ async function runThreatModelWorkflow(input) {
8191
8210
 
8192
8211
  You are generating an application-centric threat model from source code analysis.
8193
8212
  Working directory: ${input.codebasePath}`;
8194
- await runOffensiveSecurityAgent({
8213
+ await runOffensiveSecurityAgent2({
8195
8214
  system,
8196
8215
  prompt,
8197
8216
  model,
8198
8217
  session,
8199
- activeTools: [...HEADLESS_TOOL_NAMES, ...SKILL_TOOL_NAMES],
8218
+ activeTools: [...HEADLESS_TOOL_NAMES, ...SKILL_TOOL_NAMES2],
8200
8219
  authConfig: input.authConfig,
8201
8220
  abortSignal: input.abortSignal,
8202
8221
  skillsRegistry: registry,
8203
8222
  eventBus: input.eventBus,
8204
- stopWhen: stepCountIs(1e4)
8223
+ stopWhen: stepCountIs2(1e4)
8205
8224
  });
8206
8225
  return { session, outputPath: input.outputPath };
8207
8226
  }
8208
- export { listScans, getScan, listPentestTargets, dispatchPentest, listIssues, getIssue, updateIssue, retestIssue, linkPullRequest, listIssuePullRequests, listFixes, getFix, listAgentLogs, searchAgentLogs, listTargetLogs, searchTargetLogs, runOffensiveSecurityAgent, buildPentestPrompt, buildThreatModelPrompt, createSkillsRegistry, runThreatModelWorkflow };
8227
+ 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 };
@@ -0,0 +1,22 @@
1
+ import {
2
+ init,
3
+ get,
4
+ update2,
5
+ init_config2
6
+ } from "./cli-v8ph8hy2.js";
7
+ import {
8
+ __esm
9
+ } from "./cli-h6y3bt60.js";
10
+
11
+ // src/core/config/index.ts
12
+ var config2;
13
+ var init_config = __esm(() => {
14
+ init_config2();
15
+ config2 = {
16
+ get,
17
+ init,
18
+ update: update2
19
+ };
20
+ });
21
+
22
+ export { config2, init_config };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __esm
3
- } from "./cli-bc05qbss.js";
3
+ } from "./cli-h6y3bt60.js";
4
4
 
5
5
  // src/core/providers/types.ts
6
6
  var AVAILABLE_PROVIDERS;
@@ -0,0 +1,6 @@
1
+ // src/cli/command-exit.ts
2
+ function markCommandFailed() {
3
+ process.exitCode = 1;
4
+ }
5
+
6
+ export { markCommandFailed };