pentesting 0.8.37 → 0.8.40

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/index.js +24 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7122,6 +7122,7 @@ var App = ({ autoApprove = false, target }) => {
7122
7122
  const wireLoggerRef = useRef(null);
7123
7123
  const keyboardListenerRef = useRef(getKeyboardListener());
7124
7124
  const isProcessingRef = useRef(false);
7125
+ const handleSubmitRef = useRef(null);
7125
7126
  useEffect(() => {
7126
7127
  isProcessingRef.current = isProcessing;
7127
7128
  }, [isProcessing]);
@@ -7360,15 +7361,10 @@ var App = ({ autoApprove = false, target }) => {
7360
7361
  const next = inputQueue.dequeue();
7361
7362
  if (next) {
7362
7363
  setQueuedCount(inputQueue.length);
7363
- addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E4} Processing queued: ${next.content.slice(0, 50)}...`);
7364
- addMessage(MESSAGE_TYPE.USER, next.content);
7365
- setIsProcessing(true);
7366
- setTimeout(async () => {
7367
- try {
7368
- await agent.chat(next.content);
7369
- } catch (err) {
7370
- addMessage(MESSAGE_TYPE.ERROR, err instanceof Error ? err.message : String(err));
7371
- setIsProcessing(false);
7364
+ addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E4} Processing queued: ${next.content.slice(0, 50)}${next.content.length > 50 ? "..." : ""}`);
7365
+ setTimeout(() => {
7366
+ if (handleSubmitRef.current) {
7367
+ handleSubmitRef.current(next.content);
7372
7368
  }
7373
7369
  }, 100);
7374
7370
  }
@@ -7378,6 +7374,19 @@ var App = ({ autoApprove = false, target }) => {
7378
7374
  stopTimer();
7379
7375
  addMessage(MESSAGE_TYPE.ERROR, error.message);
7380
7376
  setIsProcessing(false);
7377
+ const inputQueue = getInputQueue();
7378
+ if (inputQueue.hasPending()) {
7379
+ const next = inputQueue.dequeue();
7380
+ if (next) {
7381
+ setQueuedCount(inputQueue.length);
7382
+ addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E4} Processing queued: ${next.content.slice(0, 50)}${next.content.length > 50 ? "..." : ""}`);
7383
+ setTimeout(() => {
7384
+ if (handleSubmitRef.current) {
7385
+ handleSubmitRef.current(next.content);
7386
+ }
7387
+ }, 100);
7388
+ }
7389
+ }
7381
7390
  });
7382
7391
  approvalManager2.on(APPROVAL_EVENT.REQUEST, (req) => {
7383
7392
  setPendingApproval({
@@ -7428,12 +7437,13 @@ var App = ({ autoApprove = false, target }) => {
7428
7437
  exit();
7429
7438
  return;
7430
7439
  }
7431
- if (isProcessing && !trimmed.startsWith("/")) {
7440
+ if (isProcessing) {
7432
7441
  const inputQueue = getInputQueue();
7433
7442
  inputQueue.enqueue(trimmed);
7434
7443
  setQueuedCount(inputQueue.length);
7435
7444
  setInput("");
7436
- addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E5} Queued (${inputQueue.length} pending): ${trimmed.slice(0, 50)}...`);
7445
+ addMessage(MESSAGE_TYPE.USER, trimmed);
7446
+ addMessage(MESSAGE_TYPE.SYSTEM, ` \u{1F4E5} Queued (${inputQueue.length} pending)`);
7437
7447
  return;
7438
7448
  }
7439
7449
  setInput("");
@@ -7973,6 +7983,9 @@ ${list}`);
7973
7983
  setIsProcessing(false);
7974
7984
  setCurrentStatus("");
7975
7985
  }, [agent, isProcessing, pendingApproval, addMessage, exit, startTimer, stopTimer, sessionManager2, approvalManager2, mode]);
7986
+ useEffect(() => {
7987
+ handleSubmitRef.current = handleSubmit;
7988
+ }, [handleSubmit]);
7976
7989
  const approvalOptions = [
7977
7990
  { label: "\u2713 Approve once", decision: "approve" },
7978
7991
  { label: "\u2713 Approve always (this session)", decision: "approve_always" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.8.37",
3
+ "version": "0.8.40",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",