@node9/proxy 2.28.1 → 2.30.0

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.
@@ -5380,6 +5380,14 @@ var init_blast = __esm({
5380
5380
  import fs4 from "fs";
5381
5381
  import path5 from "path";
5382
5382
  import os5 from "os";
5383
+ function resolveDaemonPort(env = process.env) {
5384
+ if (env.NODE9_TESTING !== "1") return DEFAULT_DAEMON_PORT;
5385
+ const raw = env.NODE9_DAEMON_PORT;
5386
+ if (raw === void 0 || raw === "") return DEFAULT_DAEMON_PORT;
5387
+ const port = Number(raw);
5388
+ if (!Number.isInteger(port) || port < 1024 || port > 65535) return DEFAULT_DAEMON_PORT;
5389
+ return port;
5390
+ }
5383
5391
  function getInternalToken() {
5384
5392
  try {
5385
5393
  const pidFile = path5.join(os5.homedir(), ".node9", "daemon.pid");
@@ -5391,12 +5399,13 @@ function getInternalToken() {
5391
5399
  return null;
5392
5400
  }
5393
5401
  }
5394
- var ACTIVITY_SOCKET_PATH, DAEMON_PORT, DAEMON_HOST;
5402
+ var ACTIVITY_SOCKET_PATH, DEFAULT_DAEMON_PORT, DAEMON_PORT, DAEMON_HOST;
5395
5403
  var init_daemon = __esm({
5396
5404
  "src/auth/daemon.ts"() {
5397
5405
  "use strict";
5398
5406
  ACTIVITY_SOCKET_PATH = process.platform === "win32" ? "\\\\.\\pipe\\node9-activity" : path5.join(os5.tmpdir(), "node9-activity.sock");
5399
- DAEMON_PORT = 7391;
5407
+ DEFAULT_DAEMON_PORT = 7391;
5408
+ DAEMON_PORT = resolveDaemonPort();
5400
5409
  DAEMON_HOST = "127.0.0.1";
5401
5410
  }
5402
5411
  });
package/dist/index.js CHANGED
@@ -9625,7 +9625,16 @@ async function checkStatePredicates(predicates) {
9625
9625
  return null;
9626
9626
  }
9627
9627
  }
9628
- var DAEMON_PORT = 7391;
9628
+ var DEFAULT_DAEMON_PORT = 7391;
9629
+ function resolveDaemonPort(env = process.env) {
9630
+ if (env.NODE9_TESTING !== "1") return DEFAULT_DAEMON_PORT;
9631
+ const raw = env.NODE9_DAEMON_PORT;
9632
+ if (raw === void 0 || raw === "") return DEFAULT_DAEMON_PORT;
9633
+ const port = Number(raw);
9634
+ if (!Number.isInteger(port) || port < 1024 || port > 65535) return DEFAULT_DAEMON_PORT;
9635
+ return port;
9636
+ }
9637
+ var DAEMON_PORT = resolveDaemonPort();
9629
9638
  var DAEMON_HOST = "127.0.0.1";
9630
9639
  function getInternalToken() {
9631
9640
  try {
package/dist/index.mjs CHANGED
@@ -9595,7 +9595,16 @@ async function checkStatePredicates(predicates) {
9595
9595
  return null;
9596
9596
  }
9597
9597
  }
9598
- var DAEMON_PORT = 7391;
9598
+ var DEFAULT_DAEMON_PORT = 7391;
9599
+ function resolveDaemonPort(env = process.env) {
9600
+ if (env.NODE9_TESTING !== "1") return DEFAULT_DAEMON_PORT;
9601
+ const raw = env.NODE9_DAEMON_PORT;
9602
+ if (raw === void 0 || raw === "") return DEFAULT_DAEMON_PORT;
9603
+ const port = Number(raw);
9604
+ if (!Number.isInteger(port) || port < 1024 || port > 65535) return DEFAULT_DAEMON_PORT;
9605
+ return port;
9606
+ }
9607
+ var DAEMON_PORT = resolveDaemonPort();
9599
9608
  var DAEMON_HOST = "127.0.0.1";
9600
9609
  function getInternalToken() {
9601
9610
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node9/proxy",
3
- "version": "2.28.1",
3
+ "version": "2.30.0",
4
4
  "description": "Access control for AI agents. Set what Claude Code, Codex, Gemini, Cursor and any MCP server are allowed to do, review risky actions before they run, and keep every action on the record.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",