@node9/proxy 2.18.0 → 2.19.1
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 +20 -6
- package/dist/cli.mjs +20 -6
- package/dist/index.js +4 -1
- package/dist/index.mjs +4 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9776,6 +9776,9 @@ async function authorizeHeadless(toolName, args, meta, options) {
|
|
|
9776
9776
|
}
|
|
9777
9777
|
return _authorizeHeadlessCore(toolName, args, meta, options);
|
|
9778
9778
|
}
|
|
9779
|
+
function approvalTimeoutReason(approvalTimeoutMs) {
|
|
9780
|
+
return `No human response within ${approvalTimeoutMs / 1e3}s \u2014 auto-denied by timeout policy. Approve from your phone next time: run \`node9 login\`.`;
|
|
9781
|
+
}
|
|
9779
9782
|
async function _authorizeHeadlessCore(toolName, args, metaArg, options) {
|
|
9780
9783
|
const meta = options?.cwd && !metaArg?.workingDir ? { ...metaArg, workingDir: options.cwd } : metaArg;
|
|
9781
9784
|
if (process.env.NODE9_PAUSED === "1") return { approved: true, checkedBy: "paused" };
|
|
@@ -10365,7 +10368,7 @@ ${appPermReview}`
|
|
|
10365
10368
|
const timer = setTimeout(() => {
|
|
10366
10369
|
resolve2({
|
|
10367
10370
|
approved: false,
|
|
10368
|
-
reason:
|
|
10371
|
+
reason: approvalTimeoutReason(approvalTimeoutMs),
|
|
10369
10372
|
blockedBy: "timeout",
|
|
10370
10373
|
blockedByLabel: "Approval Timeout"
|
|
10371
10374
|
});
|
|
@@ -11282,11 +11285,15 @@ function printInlineAskNotice() {
|
|
|
11282
11285
|
)
|
|
11283
11286
|
);
|
|
11284
11287
|
}
|
|
11285
|
-
function fullPathCommand(subcommand) {
|
|
11288
|
+
function fullPathCommand(subcommand, platform = process.platform) {
|
|
11286
11289
|
if (process.env.NODE9_TESTING === "1") return `node9 ${subcommand}`;
|
|
11287
11290
|
const nodeExec = toForwardSlashes(process.execPath);
|
|
11288
11291
|
const cliScript = toForwardSlashes(process.argv[1]);
|
|
11289
|
-
|
|
11292
|
+
const isWindows = platform === "win32";
|
|
11293
|
+
if (!cliScript.endsWith(".js")) {
|
|
11294
|
+
return isWindows ? `node9 ${subcommand}` : `"${cliScript}" ${subcommand}`;
|
|
11295
|
+
}
|
|
11296
|
+
if (isWindows) return `node "${cliScript}" ${subcommand}`;
|
|
11290
11297
|
return `"${nodeExec}" "${cliScript}" ${subcommand}`;
|
|
11291
11298
|
}
|
|
11292
11299
|
function toForwardSlashes(p) {
|
|
@@ -11313,8 +11320,13 @@ function isLegacyHookFormat(command) {
|
|
|
11313
11320
|
if (!command) return false;
|
|
11314
11321
|
return command.includes("\\");
|
|
11315
11322
|
}
|
|
11316
|
-
function
|
|
11317
|
-
|
|
11323
|
+
function isWindowsQuoteBrokenHook(command, platform = process.platform) {
|
|
11324
|
+
if (!command) return false;
|
|
11325
|
+
if (platform !== "win32") return false;
|
|
11326
|
+
return command.trimStart().startsWith('"');
|
|
11327
|
+
}
|
|
11328
|
+
function needsRewrite(command, platform = process.platform) {
|
|
11329
|
+
return isStaleHookCommand(command) || isLegacyHookFormat(command) || isWindowsQuoteBrokenHook(command, platform);
|
|
11318
11330
|
}
|
|
11319
11331
|
function readJson(filePath) {
|
|
11320
11332
|
try {
|
|
@@ -56129,6 +56141,7 @@ var import_os52 = __toESM(require("os"));
|
|
|
56129
56141
|
var import_https6 = __toESM(require("https"));
|
|
56130
56142
|
init_core();
|
|
56131
56143
|
init_setup();
|
|
56144
|
+
init_machine_id();
|
|
56132
56145
|
init_shields();
|
|
56133
56146
|
init_service();
|
|
56134
56147
|
init_core();
|
|
@@ -56140,7 +56153,8 @@ function buildTelemetryPayload(agents, firstInstall) {
|
|
|
56140
56153
|
agents_detected: agents,
|
|
56141
56154
|
os: process.platform,
|
|
56142
56155
|
node9_version: node9Version(),
|
|
56143
|
-
first_install: firstInstall
|
|
56156
|
+
first_install: firstInstall,
|
|
56157
|
+
machine_id: getMachineId()
|
|
56144
56158
|
};
|
|
56145
56159
|
}
|
|
56146
56160
|
function fireTelemetryPing(agents, firstInstall) {
|
package/dist/cli.mjs
CHANGED
|
@@ -9777,6 +9777,9 @@ async function authorizeHeadless(toolName, args, meta, options) {
|
|
|
9777
9777
|
}
|
|
9778
9778
|
return _authorizeHeadlessCore(toolName, args, meta, options);
|
|
9779
9779
|
}
|
|
9780
|
+
function approvalTimeoutReason(approvalTimeoutMs) {
|
|
9781
|
+
return `No human response within ${approvalTimeoutMs / 1e3}s \u2014 auto-denied by timeout policy. Approve from your phone next time: run \`node9 login\`.`;
|
|
9782
|
+
}
|
|
9780
9783
|
async function _authorizeHeadlessCore(toolName, args, metaArg, options) {
|
|
9781
9784
|
const meta = options?.cwd && !metaArg?.workingDir ? { ...metaArg, workingDir: options.cwd } : metaArg;
|
|
9782
9785
|
if (process.env.NODE9_PAUSED === "1") return { approved: true, checkedBy: "paused" };
|
|
@@ -10366,7 +10369,7 @@ ${appPermReview}`
|
|
|
10366
10369
|
const timer = setTimeout(() => {
|
|
10367
10370
|
resolve2({
|
|
10368
10371
|
approved: false,
|
|
10369
|
-
reason:
|
|
10372
|
+
reason: approvalTimeoutReason(approvalTimeoutMs),
|
|
10370
10373
|
blockedBy: "timeout",
|
|
10371
10374
|
blockedByLabel: "Approval Timeout"
|
|
10372
10375
|
});
|
|
@@ -11288,11 +11291,15 @@ function printInlineAskNotice() {
|
|
|
11288
11291
|
)
|
|
11289
11292
|
);
|
|
11290
11293
|
}
|
|
11291
|
-
function fullPathCommand(subcommand) {
|
|
11294
|
+
function fullPathCommand(subcommand, platform = process.platform) {
|
|
11292
11295
|
if (process.env.NODE9_TESTING === "1") return `node9 ${subcommand}`;
|
|
11293
11296
|
const nodeExec = toForwardSlashes(process.execPath);
|
|
11294
11297
|
const cliScript = toForwardSlashes(process.argv[1]);
|
|
11295
|
-
|
|
11298
|
+
const isWindows = platform === "win32";
|
|
11299
|
+
if (!cliScript.endsWith(".js")) {
|
|
11300
|
+
return isWindows ? `node9 ${subcommand}` : `"${cliScript}" ${subcommand}`;
|
|
11301
|
+
}
|
|
11302
|
+
if (isWindows) return `node "${cliScript}" ${subcommand}`;
|
|
11296
11303
|
return `"${nodeExec}" "${cliScript}" ${subcommand}`;
|
|
11297
11304
|
}
|
|
11298
11305
|
function toForwardSlashes(p) {
|
|
@@ -11319,8 +11326,13 @@ function isLegacyHookFormat(command) {
|
|
|
11319
11326
|
if (!command) return false;
|
|
11320
11327
|
return command.includes("\\");
|
|
11321
11328
|
}
|
|
11322
|
-
function
|
|
11323
|
-
|
|
11329
|
+
function isWindowsQuoteBrokenHook(command, platform = process.platform) {
|
|
11330
|
+
if (!command) return false;
|
|
11331
|
+
if (platform !== "win32") return false;
|
|
11332
|
+
return command.trimStart().startsWith('"');
|
|
11333
|
+
}
|
|
11334
|
+
function needsRewrite(command, platform = process.platform) {
|
|
11335
|
+
return isStaleHookCommand(command) || isLegacyHookFormat(command) || isWindowsQuoteBrokenHook(command, platform);
|
|
11324
11336
|
}
|
|
11325
11337
|
function readJson(filePath) {
|
|
11326
11338
|
try {
|
|
@@ -56114,6 +56126,7 @@ function registerStatusCommand(program2) {
|
|
|
56114
56126
|
// src/cli/commands/init.ts
|
|
56115
56127
|
init_core();
|
|
56116
56128
|
init_setup();
|
|
56129
|
+
init_machine_id();
|
|
56117
56130
|
init_shields();
|
|
56118
56131
|
init_service();
|
|
56119
56132
|
init_core();
|
|
@@ -56130,7 +56143,8 @@ function buildTelemetryPayload(agents, firstInstall) {
|
|
|
56130
56143
|
agents_detected: agents,
|
|
56131
56144
|
os: process.platform,
|
|
56132
56145
|
node9_version: node9Version(),
|
|
56133
|
-
first_install: firstInstall
|
|
56146
|
+
first_install: firstInstall,
|
|
56147
|
+
machine_id: getMachineId()
|
|
56134
56148
|
};
|
|
56135
56149
|
}
|
|
56136
56150
|
function fireTelemetryPing(agents, firstInstall) {
|
package/dist/index.js
CHANGED
|
@@ -8160,6 +8160,9 @@ async function authorizeHeadless(toolName, args, meta, options) {
|
|
|
8160
8160
|
}
|
|
8161
8161
|
return _authorizeHeadlessCore(toolName, args, meta, options);
|
|
8162
8162
|
}
|
|
8163
|
+
function approvalTimeoutReason(approvalTimeoutMs) {
|
|
8164
|
+
return `No human response within ${approvalTimeoutMs / 1e3}s \u2014 auto-denied by timeout policy. Approve from your phone next time: run \`node9 login\`.`;
|
|
8165
|
+
}
|
|
8163
8166
|
async function _authorizeHeadlessCore(toolName, args, metaArg, options) {
|
|
8164
8167
|
const meta = options?.cwd && !metaArg?.workingDir ? { ...metaArg, workingDir: options.cwd } : metaArg;
|
|
8165
8168
|
if (process.env.NODE9_PAUSED === "1") return { approved: true, checkedBy: "paused" };
|
|
@@ -8749,7 +8752,7 @@ ${appPermReview}`
|
|
|
8749
8752
|
const timer = setTimeout(() => {
|
|
8750
8753
|
resolve({
|
|
8751
8754
|
approved: false,
|
|
8752
|
-
reason:
|
|
8755
|
+
reason: approvalTimeoutReason(approvalTimeoutMs),
|
|
8753
8756
|
blockedBy: "timeout",
|
|
8754
8757
|
blockedByLabel: "Approval Timeout"
|
|
8755
8758
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -8130,6 +8130,9 @@ async function authorizeHeadless(toolName, args, meta, options) {
|
|
|
8130
8130
|
}
|
|
8131
8131
|
return _authorizeHeadlessCore(toolName, args, meta, options);
|
|
8132
8132
|
}
|
|
8133
|
+
function approvalTimeoutReason(approvalTimeoutMs) {
|
|
8134
|
+
return `No human response within ${approvalTimeoutMs / 1e3}s \u2014 auto-denied by timeout policy. Approve from your phone next time: run \`node9 login\`.`;
|
|
8135
|
+
}
|
|
8133
8136
|
async function _authorizeHeadlessCore(toolName, args, metaArg, options) {
|
|
8134
8137
|
const meta = options?.cwd && !metaArg?.workingDir ? { ...metaArg, workingDir: options.cwd } : metaArg;
|
|
8135
8138
|
if (process.env.NODE9_PAUSED === "1") return { approved: true, checkedBy: "paused" };
|
|
@@ -8719,7 +8722,7 @@ ${appPermReview}`
|
|
|
8719
8722
|
const timer = setTimeout(() => {
|
|
8720
8723
|
resolve({
|
|
8721
8724
|
approved: false,
|
|
8722
|
-
reason:
|
|
8725
|
+
reason: approvalTimeoutReason(approvalTimeoutMs),
|
|
8723
8726
|
blockedBy: "timeout",
|
|
8724
8727
|
blockedByLabel: "Approval Timeout"
|
|
8725
8728
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node9/proxy",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.1",
|
|
4
4
|
"description": "IAM for your 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",
|