pentesting 0.7.22 → 0.7.24

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-VMJ42J34.js";
12
- import "./chunk-WFPZI5LK.js";
11
+ } from "./chunk-RUZUSJTF.js";
12
+ import "./chunk-OHONKFV6.js";
13
13
  import "./chunk-3RG5ZIWI.js";
14
14
  export {
15
15
  checkForUpdate,
@@ -185,8 +185,19 @@ var SENSITIVE_TOOLS = [
185
185
  ];
186
186
 
187
187
  // src/config/constants.ts
188
+ import { readFileSync } from "fs";
189
+ import { dirname, join } from "path";
190
+ import { fileURLToPath } from "url";
191
+ var pkgVersion = "0.7.23";
192
+ try {
193
+ const __dirname = dirname(fileURLToPath(import.meta.url));
194
+ const pkgPath = join(__dirname, "..", "..", "package.json");
195
+ const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
196
+ pkgVersion = pkg.version || pkgVersion;
197
+ } catch {
198
+ }
188
199
  var APP_NAME = "pentesting";
189
- var APP_VERSION = "0.5.1";
200
+ var APP_VERSION = pkgVersion;
190
201
  var APP_DESCRIPTION = "Autonomous Penetration Testing AI Agent";
191
202
  var LLM_API_KEY = process.env.PENTEST_API_KEY || process.env.ANTHROPIC_API_KEY || "";
192
203
  var LLM_BASE_URL = process.env.PENTEST_BASE_URL || void 0;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  APP_NAME,
3
3
  APP_VERSION
4
- } from "./chunk-WFPZI5LK.js";
4
+ } from "./chunk-OHONKFV6.js";
5
5
 
6
6
  // src/core/update/auto-update.ts
7
7
  import { execSync } from "child_process";
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  PHASE_STATUS,
16
16
  THOUGHT_TYPE,
17
17
  TOOL_NAME
18
- } from "./chunk-WFPZI5LK.js";
18
+ } from "./chunk-OHONKFV6.js";
19
19
  import {
20
20
  __require
21
21
  } from "./chunk-3RG5ZIWI.js";
@@ -6570,7 +6570,7 @@ var App = ({ autoApprove = false, target }) => {
6570
6570
  setCheckpointCount(contextManagerRef.current?.getCheckpoints().length || 0);
6571
6571
  }
6572
6572
  });
6573
- import("./auto-update-IOG624EA.js").then(({ checkForUpdateAsync, formatUpdateNotification }) => {
6573
+ import("./auto-update-TTDQ7RO5.js").then(({ checkForUpdateAsync, formatUpdateNotification }) => {
6574
6574
  checkForUpdateAsync().then((result) => {
6575
6575
  if (result.hasUpdate) {
6576
6576
  const notification = formatUpdateNotification(result);
@@ -6830,6 +6830,8 @@ var App = ({ autoApprove = false, target }) => {
6830
6830
  /revert <id> Revert to checkpoint
6831
6831
  /compact Compact context
6832
6832
  /sessions List saved sessions
6833
+ /session rm <id> Delete a session
6834
+ /session clear Delete ALL sessions
6833
6835
  /resume [id] Resume session
6834
6836
  /replay Show session recordings
6835
6837
 
@@ -7029,6 +7031,34 @@ ${list}`);
7029
7031
  addMessage(MESSAGE_TYPE.ERROR, "Failed to list sessions");
7030
7032
  }
7031
7033
  return;
7034
+ case "session":
7035
+ if (args[0] === "rm" && args[1]) {
7036
+ try {
7037
+ const deleted = await sessionManager2.deleteSession(args[1]);
7038
+ if (deleted) {
7039
+ addMessage(MESSAGE_TYPE.SYSTEM, `Session deleted: ${args[1]}`);
7040
+ } else {
7041
+ addMessage(MESSAGE_TYPE.ERROR, `Session not found: ${args[1]}`);
7042
+ }
7043
+ } catch {
7044
+ addMessage(MESSAGE_TYPE.ERROR, "Failed to delete session");
7045
+ }
7046
+ } else if (args[0] === "clear") {
7047
+ try {
7048
+ const sessions = await sessionManager2.listSessions();
7049
+ let count = 0;
7050
+ for (const s of sessions) {
7051
+ await sessionManager2.deleteSession(s.id);
7052
+ count++;
7053
+ }
7054
+ addMessage(MESSAGE_TYPE.SYSTEM, `Deleted ${count} sessions`);
7055
+ } catch {
7056
+ addMessage(MESSAGE_TYPE.ERROR, "Failed to clear sessions");
7057
+ }
7058
+ } else {
7059
+ addMessage(MESSAGE_TYPE.SYSTEM, "Usage: /session rm <id> | /session clear");
7060
+ }
7061
+ return;
7032
7062
  case "resume":
7033
7063
  try {
7034
7064
  const session = args[0] ? await sessionManager2.loadSession(args[0]) : await sessionManager2.getRecentSession();
@@ -7232,7 +7262,7 @@ ${list}`);
7232
7262
  return;
7233
7263
  case "update":
7234
7264
  try {
7235
- const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-XRH47RQS.js");
7265
+ const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-TUTV5WQF.js");
7236
7266
  const result = checkForUpdate(true);
7237
7267
  if (result.hasUpdate) {
7238
7268
  const notification = formatUpdateNotification(result);
@@ -8,8 +8,8 @@ import {
8
8
  readVersionCache,
9
9
  semverTuple,
10
10
  writeVersionCache
11
- } from "./chunk-VMJ42J34.js";
12
- import "./chunk-WFPZI5LK.js";
11
+ } from "./chunk-RUZUSJTF.js";
12
+ import "./chunk-OHONKFV6.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.7.22",
3
+ "version": "0.7.24",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",