pentesting 0.46.12 → 0.47.0

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 +20 -22
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -311,7 +311,7 @@ var ORPHAN_PROCESS_NAMES = [
311
311
 
312
312
  // src/shared/constants/agent.ts
313
313
  var APP_NAME = "Pentest AI";
314
- var APP_VERSION = "0.46.12";
314
+ var APP_VERSION = "0.47.0";
315
315
  var APP_DESCRIPTION = "Autonomous Penetration Testing AI Agent";
316
316
  var LLM_ROLES = {
317
317
  SYSTEM: "system",
@@ -7093,7 +7093,7 @@ You should either: (1) try a different approach that doesn't need this input, or
7093
7093
  if (isSensitive) {
7094
7094
  return {
7095
7095
  success: true,
7096
- output: `\u2713 Received ${request.type} input from user.
7096
+ output: `Received ${request.type} input from user.
7097
7097
 
7098
7098
  The value has been stored. You can now use it in your next command.
7099
7099
  For sudo: include 'echo "<the_value>" | sudo -S <command>'
@@ -7103,7 +7103,7 @@ For SSH: use sshpass or expect with the provided password.`,
7103
7103
  }
7104
7104
  return {
7105
7105
  success: true,
7106
- output: `\u2713 User provided: ${result2.value}
7106
+ output: `User provided: ${result2.value}
7107
7107
 
7108
7108
  Use this value in your next action.`,
7109
7109
  value: result2.value
@@ -11973,14 +11973,14 @@ var useAgentEvents = (agent, eventsRef, state) => {
11973
11973
  };
11974
11974
  const onReasoningStart = () => {
11975
11975
  reasoningBufferRef.current = "";
11976
- setCurrentStatus("Thinking\u2026");
11976
+ setCurrentStatus("Reasoning\u2026");
11977
11977
  };
11978
11978
  const onReasoningDelta = (e) => {
11979
11979
  reasoningBufferRef.current += e.data.content;
11980
11980
  const chars = reasoningBufferRef.current.length;
11981
- const firstLine = reasoningBufferRef.current.split("\n")[0]?.slice(0, TUI_DISPLAY_LIMITS.reasoningPreviewChars) || "";
11982
- setCurrentStatus(`Thinking\u2026 ${chars} chars
11983
- ${firstLine}`);
11981
+ const estTokens = Math.round(chars / 4);
11982
+ setCurrentStatus(`Reasoning (~${estTokens} tokens)
11983
+ ${reasoningBufferRef.current}`);
11984
11984
  };
11985
11985
  const onReasoningEnd = () => {
11986
11986
  const text = reasoningBufferRef.current.trim();
@@ -12439,22 +12439,16 @@ var MessageList = memo(({ messages }) => {
12439
12439
  if (msg.type === "thinking") {
12440
12440
  const lines = msg.content.split("\n");
12441
12441
  const charCount = msg.content.length;
12442
- const firstLine = lines[0]?.slice(0, TUI_DISPLAY_LIMITS.thinkingSummaryChars) || "";
12443
- const isMultiLine = lines.length > 1 || charCount > TUI_DISPLAY_LIMITS.thinkingSummaryChars;
12442
+ const estTokens = Math.round(charCount / 4);
12444
12443
  return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", marginTop: 0, marginBottom: 1, children: [
12445
12444
  /* @__PURE__ */ jsxs2(Box2, { children: [
12446
- /* @__PURE__ */ jsx2(Text2, { color: THEME.cyan, children: "\u25D0 " }),
12447
- /* @__PURE__ */ jsx2(Text2, { color: THEME.cyan, bold: true, children: "Thinking" }),
12448
- /* @__PURE__ */ jsx2(Text2, { color: THEME.gray, children: ` (${lines.length} line${lines.length !== 1 ? "s" : ""}, ${charCount} chars)` })
12445
+ /* @__PURE__ */ jsx2(Text2, { color: THEME.cyan, bold: true, children: "Reasoning" }),
12446
+ /* @__PURE__ */ jsx2(Text2, { color: THEME.gray, children: ` (~${estTokens} tokens)` })
12449
12447
  ] }),
12450
12448
  lines.map((line, i) => /* @__PURE__ */ jsxs2(Box2, { children: [
12451
12449
  /* @__PURE__ */ jsx2(Text2, { color: THEME.cyan, children: "\u2502 " }),
12452
12450
  /* @__PURE__ */ jsx2(Text2, { color: THEME.gray, children: line })
12453
- ] }, i)),
12454
- /* @__PURE__ */ jsxs2(Box2, { children: [
12455
- /* @__PURE__ */ jsx2(Text2, { color: THEME.cyan, children: "\u2570\u2500" }),
12456
- isMultiLine && /* @__PURE__ */ jsx2(Text2, { color: THEME.gray, children: ` ${firstLine}\u2026` })
12457
- ] })
12451
+ ] }, i))
12458
12452
  ] }, msg.id);
12459
12453
  }
12460
12454
  if (msg.type === "tool") {
@@ -12530,6 +12524,7 @@ var MusicSpinner = memo2(({ color }) => {
12530
12524
 
12531
12525
  // src/platform/tui/components/StatusDisplay.tsx
12532
12526
  import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
12527
+ var MAX_THINKING_LINES = 15;
12533
12528
  var StatusDisplay = memo3(({
12534
12529
  retryState,
12535
12530
  isProcessing,
@@ -12541,10 +12536,9 @@ var StatusDisplay = memo3(({
12541
12536
  return err.length > DISPLAY_LIMITS.RETRY_ERROR_PREVIEW ? err.substring(0, DISPLAY_LIMITS.RETRY_ERROR_TRUNCATED) + "..." : err;
12542
12537
  };
12543
12538
  const meta = formatMeta(elapsedTime * 1e3, currentTokens);
12539
+ const isThinkingStatus = currentStatus.startsWith("Reasoning");
12544
12540
  const statusLines = currentStatus ? currentStatus.split("\n").filter(Boolean) : [];
12545
12541
  const statusMain = statusLines[0] || "Processing...";
12546
- const statusSub = statusLines.slice(1).join(" ");
12547
- const isThinkingStatus = statusMain.startsWith("Thinking");
12548
12542
  return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", marginTop: 0, children: [
12549
12543
  retryState.status === "retrying" && /* @__PURE__ */ jsxs3(Box3, { marginBottom: 1, children: [
12550
12544
  /* @__PURE__ */ jsx4(Text4, { color: THEME.yellow, children: /* @__PURE__ */ jsx4(MusicSpinner, { color: THEME.yellow }) }),
@@ -12573,10 +12567,14 @@ var StatusDisplay = memo3(({
12573
12567
  meta
12574
12568
  ] })
12575
12569
  ] }),
12576
- statusSub ? /* @__PURE__ */ jsx4(Box3, { paddingLeft: 2, children: /* @__PURE__ */ jsxs3(Text4, { color: isThinkingStatus ? THEME.cyan : THEME.gray, children: [
12570
+ isThinkingStatus && statusLines.length > 1 && statusLines.slice(1).slice(-MAX_THINKING_LINES).map((line, i) => /* @__PURE__ */ jsxs3(Box3, { children: [
12571
+ /* @__PURE__ */ jsx4(Text4, { color: THEME.cyan, children: "\u2502 " }),
12572
+ /* @__PURE__ */ jsx4(Text4, { color: THEME.gray, children: line })
12573
+ ] }, i)),
12574
+ !isThinkingStatus && statusLines.length > 1 && /* @__PURE__ */ jsx4(Box3, { paddingLeft: 2, children: /* @__PURE__ */ jsxs3(Text4, { color: THEME.gray, children: [
12577
12575
  "\u2502 ",
12578
- statusSub
12579
- ] }) }) : null
12576
+ statusLines.slice(1).join(" ")
12577
+ ] }) })
12580
12578
  ] })
12581
12579
  ] });
12582
12580
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.46.12",
3
+ "version": "0.47.0",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",