pentesting 0.55.1 → 0.55.2

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 +7 -3
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -342,7 +342,7 @@ var ORPHAN_PROCESS_NAMES = [
342
342
 
343
343
  // src/shared/constants/agent.ts
344
344
  var APP_NAME = "Pentest AI";
345
- var APP_VERSION = "0.55.1";
345
+ var APP_VERSION = "0.55.2";
346
346
  var APP_DESCRIPTION = "Autonomous Penetration Testing AI Agent";
347
347
  var LLM_ROLES = {
348
348
  SYSTEM: "system",
@@ -9761,7 +9761,9 @@ var LLM_LIMITS = {
9761
9761
  * can produce full analysis, tool calls, and reasoning without cutoff. */
9762
9762
  streamMaxTokens: 128e3,
9763
9763
  /** WHY: ~3.5 chars/token is a reasonable average for mixed English/CJK content */
9764
- charsPerTokenEstimate: 3.5
9764
+ charsPerTokenEstimate: 3.5,
9765
+ /** WHY: 5 minutes max timeout for streaming and non-streaming responses */
9766
+ fetchTimeoutMs: 3e5
9765
9767
  };
9766
9768
  var LLM_ERROR_TYPES = {
9767
9769
  RATE_LIMIT: "rate_limit",
@@ -9900,6 +9902,8 @@ var LLMClient = class {
9900
9902
  }
9901
9903
  async makeRequest(body, signal) {
9902
9904
  const url = `${this.baseUrl}${LLM_API.MESSAGES_PATH}`;
9905
+ const timeoutSignal = AbortSignal.timeout(LLM_LIMITS.fetchTimeoutMs);
9906
+ const combinedSignal = signal ? AbortSignal.any([signal, timeoutSignal]) : timeoutSignal;
9903
9907
  const response = await fetch(url, {
9904
9908
  method: LLM_HTTP_METHOD.POST,
9905
9909
  headers: {
@@ -9910,7 +9914,7 @@ var LLMClient = class {
9910
9914
  [LLM_HEADER.ANTHROPIC_VERSION]: LLM_API.VERSION
9911
9915
  },
9912
9916
  body: JSON.stringify(body),
9913
- signal
9917
+ signal: combinedSignal
9914
9918
  });
9915
9919
  if (!response.ok) {
9916
9920
  let errorBody = `HTTP ${response.status}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.55.1",
3
+ "version": "0.55.2",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",