@node9/proxy 1.19.1 → 1.19.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/index.js CHANGED
@@ -3601,7 +3601,6 @@ var import_fs8 = __toESM(require("fs"));
3601
3601
  var import_net = __toESM(require("net"));
3602
3602
  var import_path8 = __toESM(require("path"));
3603
3603
  var import_os7 = __toESM(require("os"));
3604
- var import_child_process = require("child_process");
3605
3604
  var ACTIVITY_SOCKET_PATH = process.platform === "win32" ? "\\\\.\\pipe\\node9-activity" : import_path8.default.join(import_os7.default.tmpdir(), "node9-activity.sock");
3606
3605
  function notifyActivitySocket(data) {
3607
3606
  return new Promise((resolve) => {
@@ -3674,22 +3673,9 @@ function isDaemonRunning() {
3674
3673
  }
3675
3674
  return false;
3676
3675
  }
3677
- const r = (0, import_child_process.spawnSync)("ss", ["-Htnp", `sport = :${DAEMON_PORT}`], {
3678
- encoding: "utf8",
3679
- timeout: 300
3680
- });
3681
- if (r.status === 0 && (r.stdout ?? "").includes(`:${DAEMON_PORT}`)) return true;
3682
- return false;
3683
- }
3684
- try {
3685
- const r = (0, import_child_process.spawnSync)("ss", ["-Htnp", `sport = :${DAEMON_PORT}`], {
3686
- encoding: "utf8",
3687
- timeout: 300
3688
- });
3689
- return r.status === 0 && (r.stdout ?? "").includes(`:${DAEMON_PORT}`);
3690
- } catch {
3691
- return false;
3676
+ return true;
3692
3677
  }
3678
+ return false;
3693
3679
  }
3694
3680
  async function registerDaemonEntry(toolName, args, meta, riskMetadata, activityId, cwd, recoveryCommand, skipBackgroundAuth, viewOnly, localSmartRuleMatched, socketActivitySent) {
3695
3681
  const base = `http://${DAEMON_HOST}:${DAEMON_PORT}`;
@@ -3817,7 +3803,7 @@ async function resolveViaDaemon(id, decision, internalToken, source) {
3817
3803
  var import_crypto3 = require("crypto");
3818
3804
 
3819
3805
  // src/ui/native.ts
3820
- var import_child_process2 = require("child_process");
3806
+ var import_child_process = require("child_process");
3821
3807
  var import_path10 = __toESM(require("path"));
3822
3808
 
3823
3809
  // src/context-sniper.ts
@@ -4091,7 +4077,7 @@ activate
4091
4077
  display dialog (item 1 of argv) with title (item 2 of argv) ${buttons}
4092
4078
  end tell
4093
4079
  end run`;
4094
- childProcess = (0, import_child_process2.spawn)("osascript", ["-e", script, "--", message, title]);
4080
+ childProcess = (0, import_child_process.spawn)("osascript", ["-e", script, "--", message, title]);
4095
4081
  } else if (process.platform === "linux") {
4096
4082
  const pangoMessage = buildPangoMessage(
4097
4083
  toolName,
@@ -4117,12 +4103,12 @@ end run`;
4117
4103
  argsList.push("--cancel-label", "Block \u238B");
4118
4104
  argsList.push("--extra-button", "Always Allow");
4119
4105
  }
4120
- childProcess = (0, import_child_process2.spawn)("zenity", argsList);
4106
+ childProcess = (0, import_child_process.spawn)("zenity", argsList);
4121
4107
  } else if (process.platform === "win32") {
4122
4108
  const b64Msg = Buffer.from(message).toString("base64");
4123
4109
  const b64Title = Buffer.from(title).toString("base64");
4124
4110
  const ps = `Add-Type -AssemblyName PresentationFramework; $msg = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String("${b64Msg}")); $title = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String("${b64Title}")); $res = [System.Windows.MessageBox]::Show($msg, $title, "${locked ? "OK" : "YesNo"}", "Warning", "Button2", "DefaultDesktopOnly"); if ($res -eq "Yes") { exit 0 } else { exit 1 }`;
4125
- childProcess = (0, import_child_process2.spawn)("powershell", ["-Command", ps]);
4111
+ childProcess = (0, import_child_process.spawn)("powershell", ["-Command", ps]);
4126
4112
  }
4127
4113
  let output = "";
4128
4114
  childProcess?.stdout?.on("data", (d) => output += d.toString());
package/dist/index.mjs CHANGED
@@ -3571,7 +3571,6 @@ import fs8 from "fs";
3571
3571
  import net from "net";
3572
3572
  import path8 from "path";
3573
3573
  import os7 from "os";
3574
- import { spawnSync } from "child_process";
3575
3574
  var ACTIVITY_SOCKET_PATH = process.platform === "win32" ? "\\\\.\\pipe\\node9-activity" : path8.join(os7.tmpdir(), "node9-activity.sock");
3576
3575
  function notifyActivitySocket(data) {
3577
3576
  return new Promise((resolve) => {
@@ -3644,22 +3643,9 @@ function isDaemonRunning() {
3644
3643
  }
3645
3644
  return false;
3646
3645
  }
3647
- const r = spawnSync("ss", ["-Htnp", `sport = :${DAEMON_PORT}`], {
3648
- encoding: "utf8",
3649
- timeout: 300
3650
- });
3651
- if (r.status === 0 && (r.stdout ?? "").includes(`:${DAEMON_PORT}`)) return true;
3652
- return false;
3653
- }
3654
- try {
3655
- const r = spawnSync("ss", ["-Htnp", `sport = :${DAEMON_PORT}`], {
3656
- encoding: "utf8",
3657
- timeout: 300
3658
- });
3659
- return r.status === 0 && (r.stdout ?? "").includes(`:${DAEMON_PORT}`);
3660
- } catch {
3661
- return false;
3646
+ return true;
3662
3647
  }
3648
+ return false;
3663
3649
  }
3664
3650
  async function registerDaemonEntry(toolName, args, meta, riskMetadata, activityId, cwd, recoveryCommand, skipBackgroundAuth, viewOnly, localSmartRuleMatched, socketActivitySent) {
3665
3651
  const base = `http://${DAEMON_HOST}:${DAEMON_PORT}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node9/proxy",
3
- "version": "1.19.1",
3
+ "version": "1.19.3",
4
4
  "description": "The Sudo Command for AI Agents. Execution Security for Claude Code & MCP.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",