pentesting 0.70.6 → 0.70.8

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 (2) hide show
  1. package/dist/main.js +92 -95
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -82,12 +82,9 @@ var THEME = {
82
82
  spinner: COLORS.primary
83
83
  };
84
84
  var ASCII_BANNER = `
85
- \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557
86
- \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D
87
- \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2588\u2557
88
- \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551
89
- \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
90
- \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D
85
+ \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510
86
+ \u2502 P E N T E S T I N G A G E N T \u2502
87
+ \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
91
88
  `;
92
89
  var ICONS = {
93
90
  // Status
@@ -762,7 +759,7 @@ var INPUT_PROMPT_PATTERNS = [
762
759
 
763
760
  // src/shared/constants/agent.ts
764
761
  var APP_NAME = "Pentest AI";
765
- var APP_VERSION = "0.70.6";
762
+ var APP_VERSION = "0.70.8";
766
763
  var APP_DESCRIPTION = "Autonomous Penetration Testing AI Agent";
767
764
  var LLM_ROLES = {
768
765
  SYSTEM: "system",
@@ -16769,7 +16766,7 @@ var MessageRow = memo4(({ msg }) => {
16769
16766
  ] }, msg.id);
16770
16767
  });
16771
16768
 
16772
- // src/platform/tui/components/messages/EmptyState.tsx
16769
+ // src/platform/tui/components/messages/BrandingHeader.tsx
16773
16770
  import { memo as memo6 } from "react";
16774
16771
  import { Box as Box7, Text as Text7 } from "ink";
16775
16772
 
@@ -16782,16 +16779,14 @@ var ShimmerBanner = memo5(({ banner }) => {
16782
16779
  return /* @__PURE__ */ jsx7(Box6, { flexDirection: "column", children: lines.map((line, row) => /* @__PURE__ */ jsx7(Text6, { color: HEX.primary, children: line }, row)) });
16783
16780
  });
16784
16781
 
16785
- // src/platform/tui/components/messages/EmptyState.tsx
16786
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
16787
- var EmptyState = memo6(({ modelName, autoApproveMode, version }) => {
16782
+ // src/platform/tui/components/messages/BrandingHeader.tsx
16783
+ import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
16784
+ var BrandingHeader = memo6(({ modelName, autoApproveMode, version, showGuide = false }) => {
16788
16785
  const autoLabel = autoApproveMode ? "ON" : "OFF";
16789
16786
  const autoColor = autoApproveMode ? THEME.primary : THEME.gray;
16790
- return /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", paddingX: 1, paddingY: 1, children: [
16787
+ return /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
16791
16788
  /* @__PURE__ */ jsx8(ShimmerBanner, { banner: ASCII_BANNER }),
16792
- /* @__PURE__ */ jsx8(Text7, { children: " " }),
16793
- /* @__PURE__ */ jsxs6(Box7, { gap: 2, children: [
16794
- /* @__PURE__ */ jsx8(Text7, { color: THEME.primary, bold: true, children: "\u25C8 Pentesting" }),
16789
+ /* @__PURE__ */ jsxs6(Box7, { paddingLeft: 2, gap: 2, children: [
16795
16790
  version && /* @__PURE__ */ jsx8(Text7, { color: THEME.dimGray, children: `v${version}` }),
16796
16791
  modelName && /* @__PURE__ */ jsxs6(Text7, { color: THEME.dimGray, children: [
16797
16792
  "\xB7",
@@ -16804,48 +16799,50 @@ var EmptyState = memo6(({ modelName, autoApproveMode, version }) => {
16804
16799
  /* @__PURE__ */ jsx8(Text7, { color: autoColor, children: autoLabel })
16805
16800
  ] })
16806
16801
  ] }),
16807
- /* @__PURE__ */ jsx8(Text7, { children: " " }),
16808
- /* @__PURE__ */ jsx8(Text7, { color: THEME.gray, children: " Get started:" }),
16809
- /* @__PURE__ */ jsxs6(Text7, { color: THEME.gray, children: [
16810
- " ",
16811
- " ",
16812
- /* @__PURE__ */ jsxs6(Text7, { color: THEME.white, children: [
16813
- "/target ",
16814
- "<ip>"
16815
- ] }),
16816
- " \u2014 Set target IP or domain"
16817
- ] }),
16818
- /* @__PURE__ */ jsxs6(Text7, { color: THEME.gray, children: [
16819
- " ",
16820
- " ",
16821
- /* @__PURE__ */ jsx8(Text7, { color: THEME.white, children: "/start" }),
16822
- " \u2014 Begin autonomous pentest"
16823
- ] }),
16824
- /* @__PURE__ */ jsxs6(Text7, { color: THEME.gray, children: [
16825
- " ",
16826
- " ",
16827
- /* @__PURE__ */ jsx8(Text7, { color: THEME.white, children: "/help" }),
16828
- " \u2014 Show all commands"
16829
- ] }),
16830
- /* @__PURE__ */ jsx8(Text7, { children: " " }),
16831
- /* @__PURE__ */ jsx8(Text7, { color: THEME.dimGray, children: " Or just type a task and press Enter." })
16802
+ showGuide && /* @__PURE__ */ jsxs6(Fragment4, { children: [
16803
+ /* @__PURE__ */ jsx8(Text7, { children: " " }),
16804
+ /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", paddingLeft: 2, children: [
16805
+ /* @__PURE__ */ jsx8(Text7, { color: THEME.gray, children: "Get started:" }),
16806
+ /* @__PURE__ */ jsxs6(Text7, { color: THEME.gray, children: [
16807
+ " ",
16808
+ /* @__PURE__ */ jsxs6(Text7, { color: THEME.white, children: [
16809
+ "/target ",
16810
+ "<ip>"
16811
+ ] }),
16812
+ " \u2014 Set target IP or domain"
16813
+ ] }),
16814
+ /* @__PURE__ */ jsxs6(Text7, { color: THEME.gray, children: [
16815
+ " ",
16816
+ /* @__PURE__ */ jsx8(Text7, { color: THEME.white, children: "/start" }),
16817
+ " \u2014 Begin autonomous pentest"
16818
+ ] }),
16819
+ /* @__PURE__ */ jsxs6(Text7, { color: THEME.gray, children: [
16820
+ " ",
16821
+ /* @__PURE__ */ jsx8(Text7, { color: THEME.white, children: "/help" }),
16822
+ " \u2014 Show all commands"
16823
+ ] }),
16824
+ /* @__PURE__ */ jsx8(Text7, { children: " " }),
16825
+ /* @__PURE__ */ jsx8(Text7, { color: THEME.dimGray, children: "Or just type a task and press Enter." })
16826
+ ] })
16827
+ ] })
16832
16828
  ] });
16833
16829
  });
16834
16830
 
16835
16831
  // src/platform/tui/components/MessageList.tsx
16836
- import { jsx as jsx9 } from "react/jsx-runtime";
16832
+ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
16837
16833
  var MessageList = memo7(({ messages, modelName, autoApproveMode, version }) => {
16838
- if (messages.length === 0) {
16839
- return /* @__PURE__ */ jsx9(
16840
- EmptyState,
16834
+ return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", children: [
16835
+ /* @__PURE__ */ jsx9(
16836
+ BrandingHeader,
16841
16837
  {
16842
16838
  modelName,
16843
16839
  autoApproveMode,
16844
- version
16840
+ version,
16841
+ showGuide: messages.length === 0
16845
16842
  }
16846
- );
16847
- }
16848
- return /* @__PURE__ */ jsx9(Box8, { flexDirection: "column", children: /* @__PURE__ */ jsx9(Static, { items: messages, children: (msg) => /* @__PURE__ */ jsx9(MessageRow, { msg }, msg.id) }) });
16843
+ ),
16844
+ messages.length > 0 && /* @__PURE__ */ jsx9(Static, { items: messages, children: (msg) => /* @__PURE__ */ jsx9(MessageRow, { msg }, msg.id) })
16845
+ ] });
16849
16846
  });
16850
16847
 
16851
16848
  // src/platform/tui/components/StatusDisplay.tsx
@@ -16907,27 +16904,27 @@ var StarSpinner = memo8(({ color }) => {
16907
16904
  });
16908
16905
 
16909
16906
  // src/platform/tui/components/status/RetryView.tsx
16910
- import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
16907
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
16911
16908
  var RetryView = ({ retryState }) => {
16912
16909
  const truncateError = (err) => {
16913
16910
  return err.length > DISPLAY_LIMITS.RETRY_ERROR_PREVIEW ? err.substring(0, DISPLAY_LIMITS.RETRY_ERROR_TRUNCATED) + "..." : err;
16914
16911
  };
16915
- return /* @__PURE__ */ jsxs7(Box9, { flexDirection: "column", height: 2, children: [
16916
- /* @__PURE__ */ jsxs7(Box9, { children: [
16912
+ return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", height: 2, children: [
16913
+ /* @__PURE__ */ jsxs8(Box9, { children: [
16917
16914
  /* @__PURE__ */ jsx11(Text9, { color: THEME.yellow, wrap: "truncate", children: /* @__PURE__ */ jsx11(StarSpinner, { color: THEME.yellow }) }),
16918
- /* @__PURE__ */ jsxs7(Text9, { color: THEME.yellow, bold: true, wrap: "truncate", children: [
16915
+ /* @__PURE__ */ jsxs8(Text9, { color: THEME.yellow, bold: true, wrap: "truncate", children: [
16919
16916
  " \u29F3 Retry #",
16920
16917
  retryState.attempt,
16921
16918
  "/",
16922
16919
  retryState.maxRetries
16923
16920
  ] }),
16924
- /* @__PURE__ */ jsxs7(Text9, { color: THEME.gray, wrap: "truncate", children: [
16921
+ /* @__PURE__ */ jsxs8(Text9, { color: THEME.gray, wrap: "truncate", children: [
16925
16922
  " \u2014 ",
16926
16923
  retryState.countdown,
16927
16924
  "s"
16928
16925
  ] })
16929
16926
  ] }),
16930
- /* @__PURE__ */ jsx11(Box9, { children: /* @__PURE__ */ jsxs7(Text9, { color: THEME.gray, wrap: "truncate", children: [
16927
+ /* @__PURE__ */ jsx11(Box9, { children: /* @__PURE__ */ jsxs8(Text9, { color: THEME.gray, wrap: "truncate", children: [
16931
16928
  " ",
16932
16929
  truncateError(retryState.error)
16933
16930
  ] }) })
@@ -16961,7 +16958,7 @@ var ShimmerText = memo9(({ children, bold, phase = 0 }) => {
16961
16958
  });
16962
16959
 
16963
16960
  // src/platform/tui/components/status/ProcessingView.tsx
16964
- import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
16961
+ import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
16965
16962
  var ProcessingView = ({
16966
16963
  statusMain,
16967
16964
  detailText,
@@ -16980,18 +16977,18 @@ var ProcessingView = ({
16980
16977
  const parenIdx = statusMain.indexOf("(");
16981
16978
  const shimmerPart = parenIdx > -1 ? statusMain.slice(0, parenIdx).trimEnd() : statusMain;
16982
16979
  const staticSuffix = parenIdx > -1 ? " " + statusMain.slice(parenIdx) : "";
16983
- return /* @__PURE__ */ jsxs8(Box10, { flexDirection: "column", height: 2, children: [
16984
- /* @__PURE__ */ jsxs8(Box10, { children: [
16980
+ return /* @__PURE__ */ jsxs9(Box10, { flexDirection: "column", height: 2, children: [
16981
+ /* @__PURE__ */ jsxs9(Box10, { children: [
16985
16982
  /* @__PURE__ */ jsx13(Text11, { color, wrap: "truncate", children: /* @__PURE__ */ jsx13(StarSpinner, { color }) }),
16986
16983
  /* @__PURE__ */ jsx13(Text11, { children: " " }),
16987
16984
  /* @__PURE__ */ jsx13(ShimmerText, { bold: true, phase: 0, children: shimmerPart }),
16988
16985
  staticSuffix ? /* @__PURE__ */ jsx13(Text11, { color: THEME.dimGray, wrap: "truncate", children: staticSuffix }) : null,
16989
- /* @__PURE__ */ jsxs8(Text11, { color: THEME.dimGray, wrap: "truncate", children: [
16986
+ /* @__PURE__ */ jsxs9(Text11, { color: THEME.dimGray, wrap: "truncate", children: [
16990
16987
  " ",
16991
16988
  meta
16992
16989
  ] })
16993
16990
  ] }),
16994
- /* @__PURE__ */ jsx13(Box10, { children: detailText ? /* @__PURE__ */ jsxs8(Text11, { color: THEME.dimGray, wrap: "truncate", children: [
16991
+ /* @__PURE__ */ jsx13(Box10, { children: detailText ? /* @__PURE__ */ jsxs9(Text11, { color: THEME.dimGray, wrap: "truncate", children: [
16995
16992
  " ",
16996
16993
  detailText
16997
16994
  ] }) : /* @__PURE__ */ jsx13(Text11, { children: " " }) })
@@ -16999,7 +16996,7 @@ var ProcessingView = ({
16999
16996
  };
17000
16997
 
17001
16998
  // src/platform/tui/components/StatusDisplay.tsx
17002
- import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
16999
+ import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
17003
17000
  var StatusDisplay = memo10(({
17004
17001
  retryState,
17005
17002
  isProcessing,
@@ -17013,7 +17010,7 @@ var StatusDisplay = memo10(({
17013
17010
  return /* @__PURE__ */ jsx14(RetryView, { retryState });
17014
17011
  }
17015
17012
  if (isProcessing && isWaitingForInput) {
17016
- return /* @__PURE__ */ jsxs9(Box11, { flexDirection: "column", height: 2, children: [
17013
+ return /* @__PURE__ */ jsxs10(Box11, { flexDirection: "column", height: 2, children: [
17017
17014
  /* @__PURE__ */ jsx14(Text12, { children: " " }),
17018
17015
  /* @__PURE__ */ jsx14(Text12, { children: " " })
17019
17016
  ] });
@@ -17034,7 +17031,7 @@ var StatusDisplay = memo10(({
17034
17031
  }
17035
17032
  );
17036
17033
  }
17037
- return /* @__PURE__ */ jsxs9(Box11, { flexDirection: "column", height: 2, children: [
17034
+ return /* @__PURE__ */ jsxs10(Box11, { flexDirection: "column", height: 2, children: [
17038
17035
  /* @__PURE__ */ jsx14(Text12, { children: " " }),
17039
17036
  /* @__PURE__ */ jsx14(Text12, { children: " " })
17040
17037
  ] });
@@ -17046,7 +17043,7 @@ import { Box as Box15, Text as Text16, useInput as useInput2 } from "ink";
17046
17043
 
17047
17044
  // src/platform/tui/components/input/AutocompletePreview.tsx
17048
17045
  import { Box as Box12, Text as Text13 } from "ink";
17049
- import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
17046
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
17050
17047
  var AutocompletePreview = ({
17051
17048
  suggestions,
17052
17049
  clampedIdx
@@ -17054,14 +17051,14 @@ var AutocompletePreview = ({
17054
17051
  return /* @__PURE__ */ jsx15(Box12, { flexDirection: "column", paddingX: 1, children: suggestions.map((cmd, i) => {
17055
17052
  const isSelected = i === clampedIdx;
17056
17053
  const argsText = cmd.args ? ` ${cmd.args}` : "";
17057
- return /* @__PURE__ */ jsxs10(Box12, { children: [
17054
+ return /* @__PURE__ */ jsxs11(Box12, { children: [
17058
17055
  /* @__PURE__ */ jsx15(Text13, { color: isSelected ? THEME.primary : THEME.dimGray, children: isSelected ? " \u276F " : " " }),
17059
- /* @__PURE__ */ jsxs10(Text13, { color: isSelected ? THEME.white : THEME.gray, bold: isSelected, children: [
17056
+ /* @__PURE__ */ jsxs11(Text13, { color: isSelected ? THEME.white : THEME.gray, bold: isSelected, children: [
17060
17057
  "/",
17061
17058
  cmd.name
17062
17059
  ] }),
17063
17060
  /* @__PURE__ */ jsx15(Text13, { dimColor: true, color: THEME.gray, children: argsText }),
17064
- /* @__PURE__ */ jsxs10(Text13, { dimColor: true, color: THEME.dimGray, children: [
17061
+ /* @__PURE__ */ jsxs11(Text13, { dimColor: true, color: THEME.dimGray, children: [
17065
17062
  " \u2014 ",
17066
17063
  cmd.description
17067
17064
  ] }),
@@ -17073,7 +17070,7 @@ var AutocompletePreview = ({
17073
17070
  // src/platform/tui/components/input/SecretInputArea.tsx
17074
17071
  import { Box as Box13, Text as Text14, useStdout } from "ink";
17075
17072
  import TextInput from "ink-text-input";
17076
- import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
17073
+ import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
17077
17074
  var OUTER_PADDING = 2;
17078
17075
  var SecretInputArea = ({
17079
17076
  inputRequest,
@@ -17084,9 +17081,9 @@ var SecretInputArea = ({
17084
17081
  const { stdout } = useStdout();
17085
17082
  const borderWidth = Math.max(10, (stdout?.columns ?? 80) - OUTER_PADDING);
17086
17083
  const borderLine = "\u2501".repeat(borderWidth);
17087
- return /* @__PURE__ */ jsxs11(Box13, { flexDirection: "column", children: [
17084
+ return /* @__PURE__ */ jsxs12(Box13, { flexDirection: "column", children: [
17088
17085
  /* @__PURE__ */ jsx16(Box13, { children: /* @__PURE__ */ jsx16(Text14, { color: THEME.yellow, children: borderLine }) }),
17089
- /* @__PURE__ */ jsxs11(Box13, { paddingX: 1, children: [
17086
+ /* @__PURE__ */ jsxs12(Box13, { paddingX: 1, children: [
17090
17087
  /* @__PURE__ */ jsx16(Text14, { color: THEME.yellow, bold: true, children: "\u25B8 " }),
17091
17088
  /* @__PURE__ */ jsx16(
17092
17089
  TextInput,
@@ -17106,7 +17103,7 @@ var SecretInputArea = ({
17106
17103
  // src/platform/tui/components/input/NormalInputArea.tsx
17107
17104
  import { Box as Box14, Text as Text15, useStdout as useStdout2 } from "ink";
17108
17105
  import TextInput2 from "ink-text-input";
17109
- import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
17106
+ import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
17110
17107
  var OUTER_PADDING2 = 2;
17111
17108
  var NormalInputArea = ({
17112
17109
  inputKey,
@@ -17118,9 +17115,9 @@ var NormalInputArea = ({
17118
17115
  const { stdout } = useStdout2();
17119
17116
  const borderWidth = Math.max(10, (stdout?.columns ?? 80) - OUTER_PADDING2);
17120
17117
  const borderLine = "\u2500".repeat(borderWidth);
17121
- return /* @__PURE__ */ jsxs12(Box14, { flexDirection: "column", children: [
17118
+ return /* @__PURE__ */ jsxs13(Box14, { flexDirection: "column", children: [
17122
17119
  /* @__PURE__ */ jsx17(Box14, { children: /* @__PURE__ */ jsx17(Text15, { dimColor: true, color: THEME.dimGray, children: borderLine }) }),
17123
- /* @__PURE__ */ jsxs12(Box14, { paddingX: 1, children: [
17120
+ /* @__PURE__ */ jsxs13(Box14, { paddingX: 1, children: [
17124
17121
  /* @__PURE__ */ jsx17(Text15, { color: THEME.primary, children: "\u276F " }),
17125
17122
  /* @__PURE__ */ jsx17(
17126
17123
  TextInput2,
@@ -17138,7 +17135,7 @@ var NormalInputArea = ({
17138
17135
  };
17139
17136
 
17140
17137
  // src/platform/tui/components/ChatInput.tsx
17141
- import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
17138
+ import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
17142
17139
  var MAX_SUGGESTIONS = 6;
17143
17140
  var ChatInput = memo11(({
17144
17141
  value,
@@ -17237,7 +17234,7 @@ var ChatInput = memo11(({
17237
17234
  completeCommand(selectedIdxRef.current);
17238
17235
  }
17239
17236
  }, [completeCommand]));
17240
- return /* @__PURE__ */ jsxs13(Box15, { flexDirection: "column", children: [
17237
+ return /* @__PURE__ */ jsxs14(Box15, { flexDirection: "column", children: [
17241
17238
  showPreview && /* @__PURE__ */ jsx18(
17242
17239
  AutocompletePreview,
17243
17240
  {
@@ -17276,7 +17273,7 @@ var ChatInput = memo11(({
17276
17273
  // src/platform/tui/components/footer.tsx
17277
17274
  import { memo as memo12 } from "react";
17278
17275
  import { Box as Box16, Text as Text17 } from "ink";
17279
- import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
17276
+ import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
17280
17277
  var CTX_WARN_THRESHOLD = 0.8;
17281
17278
  var MAX_CONTEXT_TOKENS = LLM_LIMITS.streamMaxTokens;
17282
17279
  var formatElapsed = (totalSeconds) => {
@@ -17292,7 +17289,7 @@ var formatElapsed = (totalSeconds) => {
17292
17289
  var Footer = memo12(({ phase, targets, findings, todo, elapsedTime, isProcessing, totalTokens, turnCount }) => {
17293
17290
  const ctxPct = totalTokens > 0 ? Math.round(totalTokens / MAX_CONTEXT_TOKENS * 100) : 0;
17294
17291
  const ctxColor = ctxPct >= CTX_WARN_THRESHOLD * 100 ? THEME.yellow : THEME.dimGray;
17295
- return /* @__PURE__ */ jsxs14(
17292
+ return /* @__PURE__ */ jsxs15(
17296
17293
  Box16,
17297
17294
  {
17298
17295
  width: "100%",
@@ -17300,39 +17297,39 @@ var Footer = memo12(({ phase, targets, findings, todo, elapsedTime, isProcessing
17300
17297
  justifyContent: "space-between",
17301
17298
  overflow: "hidden",
17302
17299
  children: [
17303
- /* @__PURE__ */ jsxs14(Box16, { gap: 2, children: [
17304
- /* @__PURE__ */ jsxs14(Text17, { color: THEME.gray, children: [
17300
+ /* @__PURE__ */ jsxs15(Box16, { gap: 2, children: [
17301
+ /* @__PURE__ */ jsxs15(Text17, { color: THEME.gray, children: [
17305
17302
  "Phase: ",
17306
17303
  /* @__PURE__ */ jsx19(Text17, { color: THEME.white, children: phase })
17307
17304
  ] }),
17308
- /* @__PURE__ */ jsxs14(Text17, { color: THEME.gray, children: [
17305
+ /* @__PURE__ */ jsxs15(Text17, { color: THEME.gray, children: [
17309
17306
  "Targets: ",
17310
17307
  /* @__PURE__ */ jsx19(Text17, { color: THEME.white, children: targets })
17311
17308
  ] }),
17312
- /* @__PURE__ */ jsxs14(Text17, { color: THEME.gray, children: [
17309
+ /* @__PURE__ */ jsxs15(Text17, { color: THEME.gray, children: [
17313
17310
  "Findings: ",
17314
17311
  /* @__PURE__ */ jsx19(Text17, { color: THEME.white, children: findings })
17315
17312
  ] }),
17316
- /* @__PURE__ */ jsxs14(Text17, { color: THEME.gray, children: [
17313
+ /* @__PURE__ */ jsxs15(Text17, { color: THEME.gray, children: [
17317
17314
  "Tasks: ",
17318
17315
  /* @__PURE__ */ jsx19(Text17, { color: THEME.white, children: todo })
17319
17316
  ] })
17320
17317
  ] }),
17321
- /* @__PURE__ */ jsxs14(Box16, { gap: 2, children: [
17322
- isProcessing ? /* @__PURE__ */ jsxs14(Box16, { gap: 1, children: [
17318
+ /* @__PURE__ */ jsxs15(Box16, { gap: 2, children: [
17319
+ isProcessing ? /* @__PURE__ */ jsxs15(Box16, { gap: 1, children: [
17323
17320
  /* @__PURE__ */ jsx19(Text17, { dimColor: true, color: THEME.dimGray, children: "[ESC] abort" }),
17324
17321
  /* @__PURE__ */ jsx19(Text17, { dimColor: true, color: THEME.dimGray, children: "[^C\xD72] exit" })
17325
17322
  ] }) : /* @__PURE__ */ jsx19(Text17, { dimColor: true, color: THEME.dimGray, children: "[/help] commands" }),
17326
- turnCount > 0 && /* @__PURE__ */ jsxs14(Text17, { dimColor: true, color: THEME.dimGray, children: [
17323
+ turnCount > 0 && /* @__PURE__ */ jsxs15(Text17, { dimColor: true, color: THEME.dimGray, children: [
17327
17324
  "turn:",
17328
17325
  turnCount
17329
17326
  ] }),
17330
- totalTokens > 0 && /* @__PURE__ */ jsxs14(Text17, { dimColor: true, color: ctxColor, children: [
17327
+ totalTokens > 0 && /* @__PURE__ */ jsxs15(Text17, { dimColor: true, color: ctxColor, children: [
17331
17328
  "ctx:",
17332
17329
  ctxPct,
17333
17330
  "%"
17334
17331
  ] }),
17335
- totalTokens > 0 && /* @__PURE__ */ jsxs14(Text17, { dimColor: true, color: THEME.dimGray, children: [
17332
+ totalTokens > 0 && /* @__PURE__ */ jsxs15(Text17, { dimColor: true, color: THEME.dimGray, children: [
17336
17333
  "\u2191",
17337
17334
  formatTokens(totalTokens)
17338
17335
  ] }),
@@ -17348,7 +17345,7 @@ var footer_default = Footer;
17348
17345
  // src/platform/tui/components/Modal.tsx
17349
17346
  import { useMemo as useMemo2, memo as memo13, useCallback as useCallback8, useRef as useRef7 } from "react";
17350
17347
  import { Box as Box17, Text as Text18, useStdout as useStdout3, useInput as useInput3 } from "ink";
17351
- import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
17348
+ import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
17352
17349
  var MODAL_TITLES = {
17353
17350
  findings: "\u25C8 FINDINGS \u25C8",
17354
17351
  graph: "\u25C8 ATTACK GRAPH \u25C8",
@@ -17392,7 +17389,7 @@ var Modal = memo13(({
17392
17389
  const endLine = Math.min(scrollOffset + maxHeight, totalLines);
17393
17390
  const scrollbarHeight = Math.max(1, Math.floor(maxHeight * (maxHeight / Math.max(totalLines, 1))));
17394
17391
  const scrollbarPosition = totalLines > maxHeight ? Math.floor(scrollOffset / (totalLines - maxHeight) * (maxHeight - scrollbarHeight)) : 0;
17395
- return /* @__PURE__ */ jsxs15(
17392
+ return /* @__PURE__ */ jsxs16(
17396
17393
  Box17,
17397
17394
  {
17398
17395
  flexDirection: "column",
@@ -17414,7 +17411,7 @@ var Modal = memo13(({
17414
17411
  flexGrow: 1,
17415
17412
  children: visibleLines.map((line, i) => {
17416
17413
  const showScrollbar = totalLines > maxHeight && i >= scrollbarPosition && i < scrollbarPosition + scrollbarHeight;
17417
- return /* @__PURE__ */ jsxs15(Box17, { children: [
17414
+ return /* @__PURE__ */ jsxs16(Box17, { children: [
17418
17415
  /* @__PURE__ */ jsx20(Text18, { color: THEME.white, wrap: "truncate", children: line }),
17419
17416
  /* @__PURE__ */ jsx20(Box17, { flexGrow: 1 }),
17420
17417
  totalLines > maxHeight && /* @__PURE__ */ jsx20(Text18, { color: showScrollbar ? THEME.cyan : THEME.dimGray, children: showScrollbar ? "\u2588" : "\u2502" })
@@ -17422,9 +17419,9 @@ var Modal = memo13(({
17422
17419
  })
17423
17420
  }
17424
17421
  ),
17425
- /* @__PURE__ */ jsxs15(Box17, { justifyContent: "space-between", paddingX: 1, children: [
17422
+ /* @__PURE__ */ jsxs16(Box17, { justifyContent: "space-between", paddingX: 1, children: [
17426
17423
  /* @__PURE__ */ jsx20(Text18, { dimColor: true, color: THEME.gray, children: "\u2191\u2193/jk: scroll | g/G: top/bottom | ESC/q: close" }),
17427
- /* @__PURE__ */ jsxs15(Text18, { dimColor: true, color: THEME.cyan, children: [
17424
+ /* @__PURE__ */ jsxs16(Text18, { dimColor: true, color: THEME.cyan, children: [
17428
17425
  startLine,
17429
17426
  "-",
17430
17427
  endLine,
@@ -17439,7 +17436,7 @@ var Modal = memo13(({
17439
17436
 
17440
17437
  // src/platform/tui/components/app/bottom-region.tsx
17441
17438
  import { Box as Box18 } from "ink";
17442
- import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
17439
+ import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
17443
17440
  var BottomRegion = ({
17444
17441
  input,
17445
17442
  setInput,
@@ -17463,7 +17460,7 @@ var BottomRegion = ({
17463
17460
  const suggestionCount = isSlashMode && !hasArgs && inputRequest.status !== "active" ? Math.min(getMatchingCommands(partialCmd).length, MAX_SUGGESTIONS) : 0;
17464
17461
  const previewHeight = suggestionCount;
17465
17462
  const bottomMinHeight = 7;
17466
- return /* @__PURE__ */ jsxs16(Box18, { flexDirection: "column", minHeight: bottomMinHeight, children: [
17463
+ return /* @__PURE__ */ jsxs17(Box18, { flexDirection: "column", minHeight: bottomMinHeight, children: [
17467
17464
  /* @__PURE__ */ jsx21(
17468
17465
  StatusDisplay,
17469
17466
  {
@@ -17504,7 +17501,7 @@ var BottomRegion = ({
17504
17501
  };
17505
17502
 
17506
17503
  // src/platform/tui/app.tsx
17507
- import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
17504
+ import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
17508
17505
  var MODEL_NAME = getModel() || DEFAULT_MODEL;
17509
17506
  var App = ({ autoApprove = false, target }) => {
17510
17507
  const { exit } = useApp();
@@ -17631,7 +17628,7 @@ var App = ({ autoApprove = false, target }) => {
17631
17628
  }
17632
17629
  ) });
17633
17630
  }
17634
- return /* @__PURE__ */ jsxs17(Box19, { flexDirection: "column", paddingX: 1, width: terminalWidth, children: [
17631
+ return /* @__PURE__ */ jsxs18(Box19, { flexDirection: "column", paddingX: 1, width: terminalWidth, children: [
17635
17632
  /* @__PURE__ */ jsx22(Box19, { flexDirection: "column", children: /* @__PURE__ */ jsx22(
17636
17633
  MessageList,
17637
17634
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.70.6",
3
+ "version": "0.70.8",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",