pentesting 0.8.33 → 0.8.34

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.
@@ -8,8 +8,8 @@ import {
8
8
  readVersionCache,
9
9
  semverTuple,
10
10
  writeVersionCache
11
- } from "./chunk-N27ISRFF.js";
12
- import "./chunk-IYELGZKK.js";
11
+ } from "./chunk-TTQCHK5V.js";
12
+ import "./chunk-UCB4BWTB.js";
13
13
  import "./chunk-3RG5ZIWI.js";
14
14
  export {
15
15
  checkForUpdate,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  APP_NAME,
3
3
  APP_VERSION
4
- } from "./chunk-IYELGZKK.js";
4
+ } from "./chunk-UCB4BWTB.js";
5
5
 
6
6
  // src/core/update/auto-update.ts
7
7
  import { execSync } from "child_process";
@@ -27,14 +27,26 @@ var PHASE_STATUS = {
27
27
  SKIPPED: "skipped"
28
28
  };
29
29
  var THOUGHT_TYPE = {
30
+ THINKING: "thinking",
31
+ // LLM text streaming
32
+ REASONING: "reasoning",
33
+ // LLM extended thinking
34
+ PLANNING: "planning",
35
+ // Strategic planning
30
36
  OBSERVATION: "observation",
37
+ // Observing results
31
38
  HYPOTHESIS: "hypothesis",
32
- PLAN: "plan",
39
+ // Forming hypothesis
40
+ REFLECTION: "reflection",
41
+ // Self-reflection
33
42
  ACTION: "action",
43
+ // Taking action
34
44
  RESULT: "result",
35
- REFLECTION: "reflection",
45
+ // Action result
36
46
  STUCK: "stuck",
47
+ // Detected stuck state
37
48
  BREAKTHROUGH: "breakthrough"
49
+ // Found breakthrough
38
50
  };
39
51
  var AGENT_EVENT = {
40
52
  // Lifecycle
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  PHASE_STATUS,
17
17
  THOUGHT_TYPE,
18
18
  TOOL_NAME
19
- } from "./chunk-IYELGZKK.js";
19
+ } from "./chunk-UCB4BWTB.js";
20
20
  import {
21
21
  __require
22
22
  } from "./chunk-3RG5ZIWI.js";
@@ -4581,7 +4581,7 @@ var AutonomousHackingAgent = class extends EventEmitter4 {
4581
4581
  target: this.state.target.primary
4582
4582
  };
4583
4583
  const result = await executeCommand(cmdName, args, context);
4584
- this.think(THOUGHT_TYPE.PLAN, `Executed command: /${cmdName}`);
4584
+ this.think(THOUGHT_TYPE.PLANNING, `Executed command: /${cmdName}`);
4585
4585
  this.emit(AGENT_EVENT.COMMAND_EXECUTE, { command: cmdName, args });
4586
4586
  return result.output;
4587
4587
  }
@@ -4592,7 +4592,7 @@ var AutonomousHackingAgent = class extends EventEmitter4 {
4592
4592
  );
4593
4593
  if (agent) {
4594
4594
  this.currentAgent = agent;
4595
- this.think(THOUGHT_TYPE.PLAN, `Switching to specialized agent: ${agent.name}`);
4595
+ this.think(THOUGHT_TYPE.PLANNING, `Switching to specialized agent: ${agent.name}`);
4596
4596
  this.emit(AGENT_EVENT.AGENT_SWITCH, { name: agent.name, description: agent.description });
4597
4597
  return true;
4598
4598
  }
@@ -4787,7 +4787,7 @@ ${prompt}`
4787
4787
  this.setPhaseStatus(this.state.currentPhase, PHASE_STATUS.COMPLETED);
4788
4788
  this.state.currentPhase = nextPhase.id;
4789
4789
  this.setPhaseStatus(nextPhase.id, PHASE_STATUS.IN_PROGRESS);
4790
- this.think(THOUGHT_TYPE.PLAN, `Advancing to next phase: ${nextPhase.shortName}`);
4790
+ this.think(THOUGHT_TYPE.PLANNING, `Advancing to next phase: ${nextPhase.shortName}`);
4791
4791
  this.autoSwitchAgentForPhase(nextPhase.id);
4792
4792
  this.resetStuckCounter();
4793
4793
  return true;
@@ -4980,7 +4980,7 @@ What went wrong and what different approach should be tried?
4980
4980
  Target ${this.state.target.primary} - performing full penetration test.
4981
4981
  Goal: Deep penetration to obtain root/system privileges, extract internal data, map entire network.
4982
4982
  `;
4983
- this.think(THOUGHT_TYPE.PLAN, `Autonomous hacking started: ${mainObjective}`);
4983
+ this.think(THOUGHT_TYPE.PLANNING, `Autonomous hacking started: ${mainObjective}`);
4984
4984
  this.state.history.push({
4985
4985
  role: "user",
4986
4986
  content: mainObjective
@@ -5044,13 +5044,13 @@ Goal: Deep penetration to obtain root/system privileges, extract internal data,
5044
5044
  // ===== Step Execution =====
5045
5045
  async executeStep() {
5046
5046
  const contextPrompt = this.buildContextPrompt();
5047
- this.think(THOUGHT_TYPE.PLAN, "Deciding next action...");
5047
+ this.think(THOUGHT_TYPE.PLANNING, "Deciding next action...");
5048
5048
  const contextStatus = this.contextManager.checkStatus(this.state.history);
5049
5049
  if (contextStatus.warning) {
5050
5050
  this.think(THOUGHT_TYPE.OBSERVATION, `Context at ${(contextStatus.percentage * 100).toFixed(1)}% capacity`);
5051
5051
  }
5052
5052
  if (contextStatus.needsCompaction) {
5053
- this.think(THOUGHT_TYPE.PLAN, "Compacting context...");
5053
+ this.think(THOUGHT_TYPE.PLANNING, "Compacting context...");
5054
5054
  const compactResult = await this.contextManager.compactIfNeeded(this.state.history);
5055
5055
  if (compactResult.wasCompacted && compactResult.result) {
5056
5056
  this.state.history = compactResult.messages;
@@ -5096,12 +5096,12 @@ ${this.currentSpec.systemPrompt}`;
5096
5096
  if (block.type === "thinking" && block.thinking) {
5097
5097
  thinkingBuffer += block.thinking;
5098
5098
  this.emit(AGENT_EVENT.THOUGHT, {
5099
- type: "reasoning",
5099
+ type: THOUGHT_TYPE.REASONING,
5100
5100
  content: block.thinking
5101
5101
  });
5102
5102
  } else if (block.type === "tool_use") {
5103
5103
  this.emit(AGENT_EVENT.THOUGHT, {
5104
- type: "action",
5104
+ type: THOUGHT_TYPE.ACTION,
5105
5105
  content: `Calling: ${block.name}`
5106
5106
  });
5107
5107
  }
@@ -5376,9 +5376,9 @@ Use report_finding tool for important discoveries.
5376
5376
  async attemptRecovery(error) {
5377
5377
  this.think(THOUGHT_TYPE.REFLECTION, `Attempting recovery: ${error.message}`);
5378
5378
  if (error.message.includes("timeout")) {
5379
- this.think(THOUGHT_TYPE.PLAN, "Timeout - retrying with shorter command");
5379
+ this.think(THOUGHT_TYPE.PLANNING, "Timeout - retrying with shorter command");
5380
5380
  } else if (error.message.includes("permission")) {
5381
- this.think(THOUGHT_TYPE.PLAN, "Permission error - trying different approach");
5381
+ this.think(THOUGHT_TYPE.PLANNING, "Permission error - trying different approach");
5382
5382
  }
5383
5383
  }
5384
5384
  // ===== Final Report Generation =====
@@ -5456,7 +5456,7 @@ ${this.state.findings.filter((f) => f.severity !== "info").map((f) => `- Address
5456
5456
  * This is the main method for interactive TUI conversations
5457
5457
  */
5458
5458
  async chat(userMessage) {
5459
- this.think(THOUGHT_TYPE.PLAN, `Processing: ${userMessage}`);
5459
+ this.think(THOUGHT_TYPE.PLANNING, `Processing: ${userMessage}`);
5460
5460
  this.state.history.push({
5461
5461
  role: "user",
5462
5462
  content: userMessage
@@ -6658,16 +6658,16 @@ var ASCII_BANNER = `
6658
6658
  \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
6659
6659
  `;
6660
6660
  var THOUGHT_LABELS = {
6661
- thinking: "[think]",
6662
- reasoning: "[reason]",
6663
- planning: "[plan]",
6664
- observation: "[observe]",
6665
- hypothesis: "[hypothesis]",
6666
- reflection: "[reflect]",
6667
- action: "[action]",
6668
- result: "[result]",
6669
- stuck: "[stuck]",
6670
- breakthrough: "[!]"
6661
+ [THOUGHT_TYPE.THINKING]: "[think]",
6662
+ [THOUGHT_TYPE.REASONING]: "[reason]",
6663
+ [THOUGHT_TYPE.PLANNING]: "[plan]",
6664
+ [THOUGHT_TYPE.OBSERVATION]: "[observe]",
6665
+ [THOUGHT_TYPE.HYPOTHESIS]: "[hypothesis]",
6666
+ [THOUGHT_TYPE.REFLECTION]: "[reflect]",
6667
+ [THOUGHT_TYPE.ACTION]: "[action]",
6668
+ [THOUGHT_TYPE.RESULT]: "[result]",
6669
+ [THOUGHT_TYPE.STUCK]: "[stuck]",
6670
+ [THOUGHT_TYPE.BREAKTHROUGH]: "[!]"
6671
6671
  };
6672
6672
 
6673
6673
  // src/cli/components/rich-display.tsx
@@ -6999,7 +6999,7 @@ var App = ({ autoApprove = false, target }) => {
6999
6999
  setCheckpointCount(contextManagerRef.current?.getCheckpoints().length || 0);
7000
7000
  }
7001
7001
  });
7002
- import("./auto-update-NUVK35LG.js").then(({ checkForUpdateAsync, formatUpdateNotification }) => {
7002
+ import("./auto-update-RJK3Y5UW.js").then(({ checkForUpdateAsync, formatUpdateNotification }) => {
7003
7003
  checkForUpdateAsync().then((result) => {
7004
7004
  if (result.hasUpdate) {
7005
7005
  const notification = formatUpdateNotification(result);
@@ -7126,14 +7126,14 @@ var App = ({ autoApprove = false, target }) => {
7126
7126
  agent.on(AGENT_EVENT.THOUGHT, (thought) => {
7127
7127
  setCurrentStatus(thought.content.slice(0, 60));
7128
7128
  const label = THOUGHT_LABELS[thought.type] || "[?]";
7129
- if (thought.type === "reasoning") {
7129
+ if (thought.type === THOUGHT_TYPE.REASONING) {
7130
7130
  addMessage(MESSAGE_TYPE.SYSTEM, ` \u2503 \u{1F4AD} ${thought.content.slice(0, 300)}`);
7131
- } else if (thought.type === "thinking") {
7131
+ } else if (thought.type === THOUGHT_TYPE.THINKING) {
7132
7132
  addMessage(MESSAGE_TYPE.SYSTEM, ` \u2503 ${thought.content.slice(0, 150)}`);
7133
7133
  } else {
7134
7134
  addMessage(MESSAGE_TYPE.SYSTEM, `${label} ${thought.content.slice(0, 200)}`);
7135
7135
  }
7136
- wireLoggerRef.current?.contentPart(thought.content, thought.type === "thinking" || thought.type === "reasoning");
7136
+ wireLoggerRef.current?.contentPart(thought.content, thought.type === THOUGHT_TYPE.THINKING || thought.type === THOUGHT_TYPE.REASONING);
7137
7137
  });
7138
7138
  agent.on(AGENT_EVENT.TOOL_CALL, (data) => {
7139
7139
  const args = Object.entries(data.input).slice(0, 2).map(([k, v]) => `${k}=${typeof v === "string" ? v.slice(0, 30) : "..."}`).join(" ");
@@ -7734,7 +7734,7 @@ ${list}`);
7734
7734
  return;
7735
7735
  case "update":
7736
7736
  try {
7737
- const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-VGGUNUWQ.js");
7737
+ const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-LQDOCICM.js");
7738
7738
  const result = checkForUpdate(true);
7739
7739
  if (result.hasUpdate) {
7740
7740
  const notification = formatUpdateNotification(result);
@@ -8,8 +8,8 @@ import {
8
8
  readVersionCache,
9
9
  semverTuple,
10
10
  writeVersionCache
11
- } from "./chunk-N27ISRFF.js";
12
- import "./chunk-IYELGZKK.js";
11
+ } from "./chunk-TTQCHK5V.js";
12
+ import "./chunk-UCB4BWTB.js";
13
13
  import "./chunk-3RG5ZIWI.js";
14
14
  export {
15
15
  checkForUpdate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.8.33",
3
+ "version": "0.8.34",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",