@node9/proxy 1.19.3 → 1.19.4

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
@@ -3731,7 +3731,7 @@ async function waitForDaemonDecision(id, signal) {
3731
3731
  if (signal) signal.removeEventListener("abort", onAbort);
3732
3732
  }
3733
3733
  }
3734
- async function notifyDaemonViewer(toolName, args, meta, riskMetadata) {
3734
+ async function notifyDaemonViewer(toolName, args, meta, riskMetadata, activityId, socketActivitySent) {
3735
3735
  const base = `http://${DAEMON_HOST}:${DAEMON_PORT}`;
3736
3736
  const res = await fetch(`${base}/check`, {
3737
3737
  method: "POST",
@@ -3742,7 +3742,12 @@ async function notifyDaemonViewer(toolName, args, meta, riskMetadata) {
3742
3742
  slackDelegated: true,
3743
3743
  agent: meta?.agent,
3744
3744
  mcpServer: meta?.mcpServer,
3745
- ...riskMetadata && { riskMetadata }
3745
+ ...riskMetadata && { riskMetadata },
3746
+ // fromCLI=true tells the daemon the CLI already sent the activity
3747
+ // event via socket. Same contract as registerDaemonEntry — without
3748
+ // it the daemon double-emits 'activity' for cloud-enforced flows.
3749
+ fromCLI: socketActivitySent !== false,
3750
+ activityId
3746
3751
  }),
3747
3752
  signal: AbortSignal.timeout(3e3)
3748
3753
  });
@@ -4837,7 +4842,14 @@ async function _authorizeHeadlessCore(toolName, args, meta, options) {
4837
4842
  let daemonAllowCount = 1;
4838
4843
  if (approvers.terminal && isDaemonRunning() && !options?.calledFromDaemon) {
4839
4844
  if (cloudEnforced && cloudRequestId) {
4840
- const viewer = await notifyDaemonViewer(toolName, args, meta, riskMetadata).catch(() => null);
4845
+ const viewer = await notifyDaemonViewer(
4846
+ toolName,
4847
+ args,
4848
+ meta,
4849
+ riskMetadata,
4850
+ options?.activityId,
4851
+ options?.socketActivitySent
4852
+ ).catch(() => null);
4841
4853
  viewerId = viewer?.id ?? null;
4842
4854
  daemonEntryId = viewerId;
4843
4855
  if (viewer) daemonAllowCount = viewer.allowCount;
package/dist/index.mjs CHANGED
@@ -3701,7 +3701,7 @@ async function waitForDaemonDecision(id, signal) {
3701
3701
  if (signal) signal.removeEventListener("abort", onAbort);
3702
3702
  }
3703
3703
  }
3704
- async function notifyDaemonViewer(toolName, args, meta, riskMetadata) {
3704
+ async function notifyDaemonViewer(toolName, args, meta, riskMetadata, activityId, socketActivitySent) {
3705
3705
  const base = `http://${DAEMON_HOST}:${DAEMON_PORT}`;
3706
3706
  const res = await fetch(`${base}/check`, {
3707
3707
  method: "POST",
@@ -3712,7 +3712,12 @@ async function notifyDaemonViewer(toolName, args, meta, riskMetadata) {
3712
3712
  slackDelegated: true,
3713
3713
  agent: meta?.agent,
3714
3714
  mcpServer: meta?.mcpServer,
3715
- ...riskMetadata && { riskMetadata }
3715
+ ...riskMetadata && { riskMetadata },
3716
+ // fromCLI=true tells the daemon the CLI already sent the activity
3717
+ // event via socket. Same contract as registerDaemonEntry — without
3718
+ // it the daemon double-emits 'activity' for cloud-enforced flows.
3719
+ fromCLI: socketActivitySent !== false,
3720
+ activityId
3716
3721
  }),
3717
3722
  signal: AbortSignal.timeout(3e3)
3718
3723
  });
@@ -4807,7 +4812,14 @@ async function _authorizeHeadlessCore(toolName, args, meta, options) {
4807
4812
  let daemonAllowCount = 1;
4808
4813
  if (approvers.terminal && isDaemonRunning() && !options?.calledFromDaemon) {
4809
4814
  if (cloudEnforced && cloudRequestId) {
4810
- const viewer = await notifyDaemonViewer(toolName, args, meta, riskMetadata).catch(() => null);
4815
+ const viewer = await notifyDaemonViewer(
4816
+ toolName,
4817
+ args,
4818
+ meta,
4819
+ riskMetadata,
4820
+ options?.activityId,
4821
+ options?.socketActivitySent
4822
+ ).catch(() => null);
4811
4823
  viewerId = viewer?.id ?? null;
4812
4824
  daemonEntryId = viewerId;
4813
4825
  if (viewer) daemonAllowCount = viewer.allowCount;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node9/proxy",
3
- "version": "1.19.3",
3
+ "version": "1.19.4",
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",
@@ -77,8 +77,10 @@
77
77
  "chalk": "^4.1.2",
78
78
  "commander": "^14.0.3",
79
79
  "execa": "^9.6.1",
80
+ "ink": "^7.0.2",
80
81
  "mvdan-sh": "^0.10.1",
81
82
  "picomatch": "^4.0.3",
83
+ "react": "^19.2.6",
82
84
  "safe-regex2": "^5.1.0",
83
85
  "smol-toml": "^1.6.1",
84
86
  "zod": "^3.25.76"
@@ -96,6 +98,7 @@
96
98
  "@semantic-release/release-notes-generator": "^14.1.0",
97
99
  "@types/node": "^25.3.1",
98
100
  "@types/picomatch": "^4.0.2",
101
+ "@types/react": "^19.2.14",
99
102
  "@vitest/coverage-v8": "4.1.2",
100
103
  "cross-env": "^10.1.0",
101
104
  "prettier": "^3.4.2",