@node9/proxy 2.7.1 → 2.7.3

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.
package/dist/cli.js CHANGED
@@ -15152,11 +15152,14 @@ function scanCodexHistory(startDate, onProgress, onLine) {
15152
15152
  }
15153
15153
  }
15154
15154
  }
15155
- result.totalCostUSD += codexSessionCost(model, {
15156
- input: lastTotalInput,
15157
- cached: lastTotalCached,
15158
- output: lastTotalOutput
15159
- });
15155
+ const withinWindow = !startDate || startTime !== "" && new Date(startTime) >= startDate;
15156
+ if (withinWindow) {
15157
+ result.totalCostUSD += codexSessionCost(model, {
15158
+ input: lastTotalInput,
15159
+ cached: lastTotalCached,
15160
+ output: lastTotalOutput
15161
+ });
15162
+ }
15160
15163
  result.loopFindings.push(...detectLoops(sessionCalls, projLabel, sessionId, "codex"));
15161
15164
  }
15162
15165
  return result;
package/dist/cli.mjs CHANGED
@@ -15156,11 +15156,14 @@ function scanCodexHistory(startDate, onProgress, onLine) {
15156
15156
  }
15157
15157
  }
15158
15158
  }
15159
- result.totalCostUSD += codexSessionCost(model, {
15160
- input: lastTotalInput,
15161
- cached: lastTotalCached,
15162
- output: lastTotalOutput
15163
- });
15159
+ const withinWindow = !startDate || startTime !== "" && new Date(startTime) >= startDate;
15160
+ if (withinWindow) {
15161
+ result.totalCostUSD += codexSessionCost(model, {
15162
+ input: lastTotalInput,
15163
+ cached: lastTotalCached,
15164
+ output: lastTotalOutput
15165
+ });
15166
+ }
15164
15167
  result.loopFindings.push(...detectLoops(sessionCalls, projLabel, sessionId, "codex"));
15165
15168
  }
15166
15169
  return result;
@@ -712,7 +712,7 @@ function assertBuiltinShieldRegexesAreSafe() {
712
712
  }
713
713
  }
714
714
  }
715
- var ASSIGNMENT_CONTEXT_RE, DLP_STOPWORDS, DLP_PATTERNS, DLP_PATTERNS_GLOBAL, SENSITIVE_PATH_PATTERNS, MAX_DEPTH, MAX_STRING_BYTES, MAX_JSON_PARSE_BYTES, MAX_REGEX_LENGTH, REGEX_CACHE_MAX, regexCache, FORBIDDEN_PATH_SEGMENTS, syntax, sharedParser, MESSAGE_FLAGS, SHELL_INTERPRETERS, DOWNLOAD_CMDS, NORMALIZE_CACHE_MAX, normalizeCache, AST_CACHE_MAX, astCache, PARSE_FAIL, FS_READ_TOOLS, FS_OP_PRESCREEN_RE, HOME_CACHE_ALLOWLIST, SENSITIVE_PATH_RULES, BASH_TOOL_NAMES, AST_FS_REGEX_RULES, FS_OP_CACHE_MAX, fsOpCache, REDIR_TRUNCATE_OPS, REDIR_HEREDOC_OPS, aws_default, bash_safe_default, docker_default, filesystem_default, github_default, k8s_default, mongodb_default, postgres_default, project_jail_default, redis_default, BUILTIN_SHIELDS, COST_PER_LOOP_ITER_USD, LONG_OUTPUT_THRESHOLD_BYTES;
715
+ var ASSIGNMENT_CONTEXT_RE, DLP_STOPWORDS, DLP_PATTERNS, DLP_PATTERNS_GLOBAL, SENSITIVE_PATH_PATTERNS, MAX_DEPTH, MAX_STRING_BYTES, MAX_JSON_PARSE_BYTES, MAX_REGEX_LENGTH, REGEX_CACHE_MAX, regexCache, FORBIDDEN_PATH_SEGMENTS, syntax, sharedParser, MESSAGE_FLAGS, SHELL_INTERPRETERS, DOWNLOAD_CMDS, NORMALIZE_CACHE_MAX, normalizeCache, AST_CACHE_MAX, astCache, PARSE_FAIL, FS_READ_TOOLS, FS_OP_PRESCREEN_RE, HOME_CACHE_ALLOWLIST, SENSITIVE_PATH_RULES, BASH_TOOL_NAMES, AST_FS_REGEX_RULES, FS_OP_CACHE_MAX, fsOpCache, REDIR_TRUNCATE_OPS, REDIR_HEREDOC_OPS, aws_default, bash_safe_default, docker_default, filesystem_default, github_default, k8s_default, mongodb_default, postgres_default, project_jail_default, redis_default, BUILTIN_SHIELDS, LONG_OUTPUT_THRESHOLD_BYTES;
716
716
  var init_dist = __esm({
717
717
  "packages/policy-engine/dist/index.mjs"() {
718
718
  "use strict";
@@ -2150,7 +2150,6 @@ var init_dist = __esm({
2150
2150
  [redis_default.name]: redis_default
2151
2151
  };
2152
2152
  assertBuiltinShieldRegexesAreSafe();
2153
- COST_PER_LOOP_ITER_USD = 6e-3;
2154
2153
  LONG_OUTPUT_THRESHOLD_BYTES = 100 * 1024;
2155
2154
  }
2156
2155
  });
@@ -5830,11 +5829,14 @@ function scanCodexHistory(startDate, onProgress, onLine) {
5830
5829
  }
5831
5830
  }
5832
5831
  }
5833
- result.totalCostUSD += codexSessionCost(model, {
5834
- input: lastTotalInput,
5835
- cached: lastTotalCached,
5836
- output: lastTotalOutput
5837
- });
5832
+ const withinWindow = !startDate || startTime !== "" && new Date(startTime) >= startDate;
5833
+ if (withinWindow) {
5834
+ result.totalCostUSD += codexSessionCost(model, {
5835
+ input: lastTotalInput,
5836
+ cached: lastTotalCached,
5837
+ output: lastTotalOutput
5838
+ });
5839
+ }
5838
5840
  result.loopFindings.push(...detectLoops(sessionCalls, projLabel, sessionId, "codex"));
5839
5841
  }
5840
5842
  return result;
@@ -7764,9 +7766,9 @@ function computeHeadline(scanCache, filtered, blast) {
7764
7766
  };
7765
7767
  }
7766
7768
  if (filtered.loops.length > 100) {
7767
- const wasted = filtered.loops.reduce((s, l) => s + (l.count ?? 0) * COST_PER_LOOP_ITER_USD, 0);
7769
+ const stuck = filtered.loops.filter((l) => l.kind !== "long-iteration").length;
7768
7770
  return {
7769
- text: `\u{1F4CC} ${filtered.loops.length} loops \xB7 ~${fmtCost(wasted)} wasted`,
7771
+ text: `\u{1F4CC} ${filtered.loops.length} repeated patterns \xB7 ${stuck} stuck`,
7770
7772
  color: "yellow"
7771
7773
  };
7772
7774
  }
@@ -7810,7 +7812,6 @@ var init_report = __esm({
7810
7812
  "use strict";
7811
7813
  init_panels();
7812
7814
  init_data();
7813
- init_dist();
7814
7815
  init_Protection();
7815
7816
  init_Cost();
7816
7817
  init_TopToolsProjects();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node9/proxy",
3
- "version": "2.7.1",
3
+ "version": "2.7.3",
4
4
  "description": "The Sudo Command for AI Agents. Execution Security for Claude Code, Codex, Gemini, Cursor, Opencode, Pi, and any MCP server.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",