pentesting 0.40.4 → 0.40.6

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 +10 -6
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -306,7 +306,7 @@ var ORPHAN_PROCESS_NAMES = [
306
306
 
307
307
  // src/shared/constants/agent.ts
308
308
  var APP_NAME = "Pentest AI";
309
- var APP_VERSION = "0.40.4";
309
+ var APP_VERSION = "0.40.6";
310
310
  var APP_DESCRIPTION = "Autonomous Penetration Testing AI Agent";
311
311
  var LLM_ROLES = {
312
312
  SYSTEM: "system",
@@ -11475,7 +11475,7 @@ import { useState as useState3, useEffect as useEffect3 } from "react";
11475
11475
  import { Text as Text3 } from "ink";
11476
11476
  import { jsx as jsx3 } from "react/jsx-runtime";
11477
11477
  var FRAMES = ["\u2669", "\u266A", "\u266B", "\u266C", "\u266B", "\u266A"];
11478
- var INTERVAL = 150;
11478
+ var INTERVAL = 400;
11479
11479
  var MusicSpinner = ({ color }) => {
11480
11480
  const [index, setIndex] = useState3(0);
11481
11481
  useEffect3(() => {
@@ -11657,6 +11657,10 @@ var App = ({ autoApprove = false, target }) => {
11657
11657
  cancelInputRequest,
11658
11658
  addMessage
11659
11659
  } = useAgent(autoApproveMode, target);
11660
+ const isProcessingRef = useRef3(isProcessing);
11661
+ isProcessingRef.current = isProcessing;
11662
+ const autoApproveModeRef = useRef3(autoApproveMode);
11663
+ autoApproveModeRef.current = autoApproveMode;
11660
11664
  const inputRequestRef = useRef3(inputRequest);
11661
11665
  inputRequestRef.current = inputRequest;
11662
11666
  const handleExit = useCallback3(() => {
@@ -11693,7 +11697,7 @@ var App = ({ autoApprove = false, target }) => {
11693
11697
  addMessage("error", "Set target first: /target <ip>");
11694
11698
  break;
11695
11699
  }
11696
- if (!autoApproveMode) {
11700
+ if (!autoApproveModeRef.current) {
11697
11701
  setAutoApproveMode(true);
11698
11702
  agent.setAutoApprove(true);
11699
11703
  addMessage("system", "\u{1F680} Autonomous mode enabled (auto-approve ON)");
@@ -11752,7 +11756,7 @@ ${procData.stdout || "(no output)"}
11752
11756
  default:
11753
11757
  addMessage("error", `Unknown command: /${cmd}`);
11754
11758
  }
11755
- }, [agent, addMessage, executeTask, setMessages, handleExit, autoApproveMode]);
11759
+ }, [agent, addMessage, executeTask, setMessages, handleExit]);
11756
11760
  const handleSubmit = useCallback3(async (value) => {
11757
11761
  const trimmed = value.trim();
11758
11762
  if (!trimmed) return;
@@ -11778,10 +11782,10 @@ ${procData.stdout || "(no output)"}
11778
11782
  useInput(useCallback3((ch, key) => {
11779
11783
  if (key.escape) {
11780
11784
  if (inputRequestRef.current.isActive) cancelInputRequest();
11781
- else if (isProcessing) abort();
11785
+ else if (isProcessingRef.current) abort();
11782
11786
  }
11783
11787
  if (key.ctrl && ch === "c") handleExit();
11784
- }, [cancelInputRequest, isProcessing, abort, handleExit]));
11788
+ }, [cancelInputRequest, abort, handleExit]));
11785
11789
  useEffect4(() => {
11786
11790
  const onSignal = () => handleExit();
11787
11791
  process.on("SIGINT", onSignal);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.40.4",
3
+ "version": "0.40.6",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",