@node9/proxy 2.2.2 → 2.3.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 +72 -16
- package/dist/cli.mjs +72 -16
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9810,7 +9810,7 @@ function claudeDesktopConfigPath(homeDir2 = import_os14.default.homedir()) {
|
|
|
9810
9810
|
return import_path17.default.join(homeDir2, ".config", "Claude", "claude_desktop_config.json");
|
|
9811
9811
|
}
|
|
9812
9812
|
if (process.platform === "win32") {
|
|
9813
|
-
const appData = process.env.APPDATA
|
|
9813
|
+
const appData = process.env.APPDATA || import_path17.default.join(homeDir2, "AppData", "Roaming");
|
|
9814
9814
|
return import_path17.default.join(appData, "Claude", "claude_desktop_config.json");
|
|
9815
9815
|
}
|
|
9816
9816
|
return null;
|
|
@@ -21561,6 +21561,37 @@ function uninstallSystemd() {
|
|
|
21561
21561
|
function isSystemdInstalled() {
|
|
21562
21562
|
return import_fs43.default.existsSync(SYSTEMD_UNIT);
|
|
21563
21563
|
}
|
|
21564
|
+
function windowsStartupDir(homeDir2 = import_os39.default.homedir()) {
|
|
21565
|
+
const appData = process.env.APPDATA || import_path42.default.join(homeDir2, "AppData", "Roaming");
|
|
21566
|
+
return import_path42.default.join(appData, "Microsoft", "Windows", "Start Menu", "Programs", "Startup");
|
|
21567
|
+
}
|
|
21568
|
+
function windowsLauncherVbs(nodePath, scriptPath) {
|
|
21569
|
+
for (const p of [nodePath, scriptPath]) {
|
|
21570
|
+
if (p.includes('"')) throw new Error(`Illegal quote in path: ${p}`);
|
|
21571
|
+
}
|
|
21572
|
+
return [
|
|
21573
|
+
"' Auto-generated by node9 - starts the approval daemon with no console window.",
|
|
21574
|
+
"' Recreated by `node9 daemon install`; removed by `node9 daemon uninstall`.",
|
|
21575
|
+
'Set sh = CreateObject("Wscript.Shell")',
|
|
21576
|
+
'sh.Environment("PROCESS")("NODE9_AUTO_STARTED") = "1"',
|
|
21577
|
+
`sh.Run """${nodePath}"" ""${scriptPath}"" daemon", 0, False`,
|
|
21578
|
+
""
|
|
21579
|
+
].join("\r\n");
|
|
21580
|
+
}
|
|
21581
|
+
function installWindowsStartup(binaryPath) {
|
|
21582
|
+
const target = WIN_LAUNCHER();
|
|
21583
|
+
const dir = import_path42.default.dirname(target);
|
|
21584
|
+
if (!import_fs43.default.existsSync(dir)) import_fs43.default.mkdirSync(dir, { recursive: true });
|
|
21585
|
+
import_fs43.default.writeFileSync(target, windowsLauncherVbs(process.execPath, binaryPath), "utf-8");
|
|
21586
|
+
(0, import_child_process3.spawnSync)("wscript.exe", ["//B", target], { encoding: "utf8", timeout: 1e4 });
|
|
21587
|
+
}
|
|
21588
|
+
function uninstallWindowsStartup() {
|
|
21589
|
+
const target = WIN_LAUNCHER();
|
|
21590
|
+
if (import_fs43.default.existsSync(target)) import_fs43.default.unlinkSync(target);
|
|
21591
|
+
}
|
|
21592
|
+
function isWindowsStartupInstalled() {
|
|
21593
|
+
return import_fs43.default.existsSync(WIN_LAUNCHER());
|
|
21594
|
+
}
|
|
21564
21595
|
function stopRunningDaemon() {
|
|
21565
21596
|
const pidFile = import_path42.default.join(import_os39.default.homedir(), ".node9", "daemon.pid");
|
|
21566
21597
|
if (!import_fs43.default.existsSync(pidFile)) return;
|
|
@@ -21572,15 +21603,15 @@ function stopRunningDaemon() {
|
|
|
21572
21603
|
try {
|
|
21573
21604
|
process.kill(pid, "SIGTERM");
|
|
21574
21605
|
const deadline = Date.now() + 3e3;
|
|
21575
|
-
const
|
|
21576
|
-
|
|
21577
|
-
|
|
21578
|
-
|
|
21579
|
-
|
|
21606
|
+
const sleeper = new Int32Array(new SharedArrayBuffer(4));
|
|
21607
|
+
while (Date.now() < deadline) {
|
|
21608
|
+
try {
|
|
21609
|
+
process.kill(pid, 0);
|
|
21610
|
+
} catch {
|
|
21611
|
+
break;
|
|
21580
21612
|
}
|
|
21581
|
-
|
|
21582
|
-
|
|
21583
|
-
void deadline;
|
|
21613
|
+
Atomics.wait(sleeper, 0, 0, 100);
|
|
21614
|
+
}
|
|
21584
21615
|
} catch {
|
|
21585
21616
|
}
|
|
21586
21617
|
}
|
|
@@ -21618,6 +21649,11 @@ function installDaemonService() {
|
|
|
21618
21649
|
installSystemd(binary);
|
|
21619
21650
|
return { ok: true, platform: "systemd", alreadyInstalled };
|
|
21620
21651
|
}
|
|
21652
|
+
if (process.platform === "win32") {
|
|
21653
|
+
const alreadyInstalled = isWindowsStartupInstalled();
|
|
21654
|
+
installWindowsStartup(binary);
|
|
21655
|
+
return { ok: true, platform: "startup-folder", alreadyInstalled };
|
|
21656
|
+
}
|
|
21621
21657
|
return {
|
|
21622
21658
|
ok: false,
|
|
21623
21659
|
reason: `Automatic service install is not supported on ${process.platform}. Start the daemon manually with: node9 daemon start`
|
|
@@ -21639,6 +21675,10 @@ function uninstallDaemonService() {
|
|
|
21639
21675
|
uninstallSystemd();
|
|
21640
21676
|
return { ok: true, platform: "systemd", alreadyInstalled: false };
|
|
21641
21677
|
}
|
|
21678
|
+
if (process.platform === "win32") {
|
|
21679
|
+
uninstallWindowsStartup();
|
|
21680
|
+
return { ok: true, platform: "startup-folder", alreadyInstalled: false };
|
|
21681
|
+
}
|
|
21642
21682
|
return {
|
|
21643
21683
|
ok: false,
|
|
21644
21684
|
reason: `Service management not supported on ${process.platform}.`
|
|
@@ -21653,11 +21693,14 @@ function uninstallDaemonService() {
|
|
|
21653
21693
|
function isDaemonServiceInstalled() {
|
|
21654
21694
|
if (process.platform === "darwin") return isLaunchdInstalled();
|
|
21655
21695
|
if (process.platform === "linux") return isSystemdInstalled();
|
|
21696
|
+
if (process.platform === "win32") return isWindowsStartupInstalled();
|
|
21656
21697
|
return false;
|
|
21657
21698
|
}
|
|
21658
21699
|
function autostartRepairDecision(opts) {
|
|
21659
21700
|
if (!opts.autoStartDaemon) return "skip";
|
|
21660
|
-
if (process.platform !== "linux" && process.platform !== "darwin"
|
|
21701
|
+
if (process.platform !== "linux" && process.platform !== "darwin" && process.platform !== "win32") {
|
|
21702
|
+
return "unsupported";
|
|
21703
|
+
}
|
|
21661
21704
|
if (!opts.installed) return "skip";
|
|
21662
21705
|
return opts.enabled ? "ok" : "repair";
|
|
21663
21706
|
}
|
|
@@ -21670,6 +21713,9 @@ function enableDaemonServiceQuiet() {
|
|
|
21670
21713
|
});
|
|
21671
21714
|
return r.status === 0;
|
|
21672
21715
|
}
|
|
21716
|
+
if (process.platform === "win32") {
|
|
21717
|
+
return isWindowsStartupInstalled();
|
|
21718
|
+
}
|
|
21673
21719
|
return process.platform === "darwin";
|
|
21674
21720
|
} catch {
|
|
21675
21721
|
return false;
|
|
@@ -21684,10 +21730,13 @@ function ensureAutostartHealthy(autoStartDaemon) {
|
|
|
21684
21730
|
if (decision === "repair") return enableDaemonServiceQuiet() ? "repaired" : "skipped";
|
|
21685
21731
|
return decision === "ok" ? "ok" : decision === "unsupported" ? "unsupported" : "skipped";
|
|
21686
21732
|
}
|
|
21733
|
+
function autostartInstallHint() {
|
|
21734
|
+
return process.platform === "linux" ? "Run: systemctl --user enable --now node9-daemon (or: node9 daemon install)" : "Run: node9 daemon install";
|
|
21735
|
+
}
|
|
21687
21736
|
function autostartAdvice(opts) {
|
|
21688
|
-
const installable = process.platform === "linux" || process.platform === "darwin";
|
|
21737
|
+
const installable = process.platform === "linux" || process.platform === "darwin" || process.platform === "win32";
|
|
21689
21738
|
if (!opts.cloudEnabled || !installable) return null;
|
|
21690
|
-
const installHint =
|
|
21739
|
+
const installHint = autostartInstallHint();
|
|
21691
21740
|
if (opts.installed && !opts.enabled) {
|
|
21692
21741
|
return {
|
|
21693
21742
|
level: "warn",
|
|
@@ -21720,11 +21769,14 @@ function isDaemonServiceEnabled() {
|
|
|
21720
21769
|
});
|
|
21721
21770
|
return r.status === 0;
|
|
21722
21771
|
}
|
|
21772
|
+
if (process.platform === "win32") {
|
|
21773
|
+
return isWindowsStartupInstalled();
|
|
21774
|
+
}
|
|
21723
21775
|
} catch {
|
|
21724
21776
|
}
|
|
21725
21777
|
return false;
|
|
21726
21778
|
}
|
|
21727
|
-
var import_fs43, import_path42, import_os39, import_child_process3, LAUNCHD_LABEL, LAUNCHD_PLIST, SYSTEMD_UNIT_DIR, SYSTEMD_UNIT;
|
|
21779
|
+
var import_fs43, import_path42, import_os39, import_child_process3, LAUNCHD_LABEL, LAUNCHD_PLIST, SYSTEMD_UNIT_DIR, SYSTEMD_UNIT, STARTUP_FILE, WIN_LAUNCHER;
|
|
21728
21780
|
var init_service = __esm({
|
|
21729
21781
|
"src/daemon/service.ts"() {
|
|
21730
21782
|
"use strict";
|
|
@@ -21736,6 +21788,8 @@ var init_service = __esm({
|
|
|
21736
21788
|
LAUNCHD_PLIST = import_path42.default.join(import_os39.default.homedir(), "Library", "LaunchAgents", `${LAUNCHD_LABEL}.plist`);
|
|
21737
21789
|
SYSTEMD_UNIT_DIR = import_path42.default.join(import_os39.default.homedir(), ".config", "systemd", "user");
|
|
21738
21790
|
SYSTEMD_UNIT = import_path42.default.join(SYSTEMD_UNIT_DIR, "node9-daemon.service");
|
|
21791
|
+
STARTUP_FILE = "node9-daemon.vbs";
|
|
21792
|
+
WIN_LAUNCHER = () => import_path42.default.join(windowsStartupDir(), STARTUP_FILE);
|
|
21739
21793
|
}
|
|
21740
21794
|
});
|
|
21741
21795
|
|
|
@@ -48283,7 +48337,7 @@ async function onboardMachine(apiKey, opts = {}) {
|
|
|
48283
48337
|
push.ok ? { name: "register", ok: true, detail: "machine visible in the dashboard" } : { name: "register", ok: false, detail: push.reason }
|
|
48284
48338
|
);
|
|
48285
48339
|
const healed = ensureAutostartHealthy(!!getConfig().settings.autoStartDaemon);
|
|
48286
|
-
const detail = healed === "repaired" ? "autostart re-enabled (survives reboot)" : isDaemonRunning() ? "running" : healed === "unsupported" ? "no background service on this platform: starts on agent activity" : "starts on agent activity";
|
|
48340
|
+
const detail = healed === "repaired" ? "autostart re-enabled (survives reboot)" : isDaemonRunning() ? "running" : healed === "unsupported" ? "no background service on this platform: starts on agent activity" : "starts on agent activity (make it survive reboots: node9 daemon install)";
|
|
48287
48341
|
steps.push({ name: "daemon", ok: true, detail });
|
|
48288
48342
|
}
|
|
48289
48343
|
const required = ["credentials", "policy-sync", "register"];
|
|
@@ -50389,7 +50443,9 @@ function registerDoctorCommand(program2, version2) {
|
|
|
50389
50443
|
const fails = health.consecutiveFailures > 0 ? ` (${health.consecutiveFailures} consecutive failure${health.consecutiveFailures === 1 ? "" : "s"}${health.lastError ? `: ${health.lastError}` : ""})` : "";
|
|
50390
50444
|
warn(
|
|
50391
50445
|
`Cloud policy is STALE \u2014 ${when}${fails}. The cached policy is still enforced, but changes from the dashboard are not reaching this machine.`,
|
|
50392
|
-
|
|
50446
|
+
// Platform-aware: this hint hardcoded systemctl and told a Windows
|
|
50447
|
+
// founder to run a Linux command (QA 2026-08-28).
|
|
50448
|
+
`Run: node9 policy sync (then keep it fresh across reboots \u2014 ${autostartInstallHint()})`
|
|
50393
50449
|
);
|
|
50394
50450
|
} else if (health.lastCheckedAt) {
|
|
50395
50451
|
pass(`Cloud policy fresh \u2014 last synced ${agoLabel(health.lastCheckedAt)}`);
|
|
@@ -52131,7 +52187,7 @@ function registerInitCommand(program2) {
|
|
|
52131
52187
|
await setupAgent(agent);
|
|
52132
52188
|
console.log("");
|
|
52133
52189
|
}
|
|
52134
|
-
if ((process.platform === "darwin" || process.platform === "linux") && process.stdout.isTTY) {
|
|
52190
|
+
if ((process.platform === "darwin" || process.platform === "linux" || process.platform === "win32") && process.stdout.isTTY) {
|
|
52135
52191
|
const alreadyInstalled = isDaemonServiceInstalled();
|
|
52136
52192
|
if (!alreadyInstalled) {
|
|
52137
52193
|
const { confirm: confirm4 } = await import("@inquirer/prompts");
|
package/dist/cli.mjs
CHANGED
|
@@ -9818,7 +9818,7 @@ function claudeDesktopConfigPath(homeDir2 = os14.homedir()) {
|
|
|
9818
9818
|
return path17.join(homeDir2, ".config", "Claude", "claude_desktop_config.json");
|
|
9819
9819
|
}
|
|
9820
9820
|
if (process.platform === "win32") {
|
|
9821
|
-
const appData = process.env.APPDATA
|
|
9821
|
+
const appData = process.env.APPDATA || path17.join(homeDir2, "AppData", "Roaming");
|
|
9822
9822
|
return path17.join(appData, "Claude", "claude_desktop_config.json");
|
|
9823
9823
|
}
|
|
9824
9824
|
return null;
|
|
@@ -21558,6 +21558,37 @@ function uninstallSystemd() {
|
|
|
21558
21558
|
function isSystemdInstalled() {
|
|
21559
21559
|
return fs44.existsSync(SYSTEMD_UNIT);
|
|
21560
21560
|
}
|
|
21561
|
+
function windowsStartupDir(homeDir2 = os40.homedir()) {
|
|
21562
|
+
const appData = process.env.APPDATA || path43.join(homeDir2, "AppData", "Roaming");
|
|
21563
|
+
return path43.join(appData, "Microsoft", "Windows", "Start Menu", "Programs", "Startup");
|
|
21564
|
+
}
|
|
21565
|
+
function windowsLauncherVbs(nodePath, scriptPath) {
|
|
21566
|
+
for (const p of [nodePath, scriptPath]) {
|
|
21567
|
+
if (p.includes('"')) throw new Error(`Illegal quote in path: ${p}`);
|
|
21568
|
+
}
|
|
21569
|
+
return [
|
|
21570
|
+
"' Auto-generated by node9 - starts the approval daemon with no console window.",
|
|
21571
|
+
"' Recreated by `node9 daemon install`; removed by `node9 daemon uninstall`.",
|
|
21572
|
+
'Set sh = CreateObject("Wscript.Shell")',
|
|
21573
|
+
'sh.Environment("PROCESS")("NODE9_AUTO_STARTED") = "1"',
|
|
21574
|
+
`sh.Run """${nodePath}"" ""${scriptPath}"" daemon", 0, False`,
|
|
21575
|
+
""
|
|
21576
|
+
].join("\r\n");
|
|
21577
|
+
}
|
|
21578
|
+
function installWindowsStartup(binaryPath) {
|
|
21579
|
+
const target = WIN_LAUNCHER();
|
|
21580
|
+
const dir = path43.dirname(target);
|
|
21581
|
+
if (!fs44.existsSync(dir)) fs44.mkdirSync(dir, { recursive: true });
|
|
21582
|
+
fs44.writeFileSync(target, windowsLauncherVbs(process.execPath, binaryPath), "utf-8");
|
|
21583
|
+
spawnSync2("wscript.exe", ["//B", target], { encoding: "utf8", timeout: 1e4 });
|
|
21584
|
+
}
|
|
21585
|
+
function uninstallWindowsStartup() {
|
|
21586
|
+
const target = WIN_LAUNCHER();
|
|
21587
|
+
if (fs44.existsSync(target)) fs44.unlinkSync(target);
|
|
21588
|
+
}
|
|
21589
|
+
function isWindowsStartupInstalled() {
|
|
21590
|
+
return fs44.existsSync(WIN_LAUNCHER());
|
|
21591
|
+
}
|
|
21561
21592
|
function stopRunningDaemon() {
|
|
21562
21593
|
const pidFile = path43.join(os40.homedir(), ".node9", "daemon.pid");
|
|
21563
21594
|
if (!fs44.existsSync(pidFile)) return;
|
|
@@ -21569,15 +21600,15 @@ function stopRunningDaemon() {
|
|
|
21569
21600
|
try {
|
|
21570
21601
|
process.kill(pid, "SIGTERM");
|
|
21571
21602
|
const deadline = Date.now() + 3e3;
|
|
21572
|
-
const
|
|
21573
|
-
|
|
21574
|
-
|
|
21575
|
-
|
|
21576
|
-
|
|
21603
|
+
const sleeper = new Int32Array(new SharedArrayBuffer(4));
|
|
21604
|
+
while (Date.now() < deadline) {
|
|
21605
|
+
try {
|
|
21606
|
+
process.kill(pid, 0);
|
|
21607
|
+
} catch {
|
|
21608
|
+
break;
|
|
21577
21609
|
}
|
|
21578
|
-
|
|
21579
|
-
|
|
21580
|
-
void deadline;
|
|
21610
|
+
Atomics.wait(sleeper, 0, 0, 100);
|
|
21611
|
+
}
|
|
21581
21612
|
} catch {
|
|
21582
21613
|
}
|
|
21583
21614
|
}
|
|
@@ -21615,6 +21646,11 @@ function installDaemonService() {
|
|
|
21615
21646
|
installSystemd(binary);
|
|
21616
21647
|
return { ok: true, platform: "systemd", alreadyInstalled };
|
|
21617
21648
|
}
|
|
21649
|
+
if (process.platform === "win32") {
|
|
21650
|
+
const alreadyInstalled = isWindowsStartupInstalled();
|
|
21651
|
+
installWindowsStartup(binary);
|
|
21652
|
+
return { ok: true, platform: "startup-folder", alreadyInstalled };
|
|
21653
|
+
}
|
|
21618
21654
|
return {
|
|
21619
21655
|
ok: false,
|
|
21620
21656
|
reason: `Automatic service install is not supported on ${process.platform}. Start the daemon manually with: node9 daemon start`
|
|
@@ -21636,6 +21672,10 @@ function uninstallDaemonService() {
|
|
|
21636
21672
|
uninstallSystemd();
|
|
21637
21673
|
return { ok: true, platform: "systemd", alreadyInstalled: false };
|
|
21638
21674
|
}
|
|
21675
|
+
if (process.platform === "win32") {
|
|
21676
|
+
uninstallWindowsStartup();
|
|
21677
|
+
return { ok: true, platform: "startup-folder", alreadyInstalled: false };
|
|
21678
|
+
}
|
|
21639
21679
|
return {
|
|
21640
21680
|
ok: false,
|
|
21641
21681
|
reason: `Service management not supported on ${process.platform}.`
|
|
@@ -21650,11 +21690,14 @@ function uninstallDaemonService() {
|
|
|
21650
21690
|
function isDaemonServiceInstalled() {
|
|
21651
21691
|
if (process.platform === "darwin") return isLaunchdInstalled();
|
|
21652
21692
|
if (process.platform === "linux") return isSystemdInstalled();
|
|
21693
|
+
if (process.platform === "win32") return isWindowsStartupInstalled();
|
|
21653
21694
|
return false;
|
|
21654
21695
|
}
|
|
21655
21696
|
function autostartRepairDecision(opts) {
|
|
21656
21697
|
if (!opts.autoStartDaemon) return "skip";
|
|
21657
|
-
if (process.platform !== "linux" && process.platform !== "darwin"
|
|
21698
|
+
if (process.platform !== "linux" && process.platform !== "darwin" && process.platform !== "win32") {
|
|
21699
|
+
return "unsupported";
|
|
21700
|
+
}
|
|
21658
21701
|
if (!opts.installed) return "skip";
|
|
21659
21702
|
return opts.enabled ? "ok" : "repair";
|
|
21660
21703
|
}
|
|
@@ -21667,6 +21710,9 @@ function enableDaemonServiceQuiet() {
|
|
|
21667
21710
|
});
|
|
21668
21711
|
return r.status === 0;
|
|
21669
21712
|
}
|
|
21713
|
+
if (process.platform === "win32") {
|
|
21714
|
+
return isWindowsStartupInstalled();
|
|
21715
|
+
}
|
|
21670
21716
|
return process.platform === "darwin";
|
|
21671
21717
|
} catch {
|
|
21672
21718
|
return false;
|
|
@@ -21681,10 +21727,13 @@ function ensureAutostartHealthy(autoStartDaemon) {
|
|
|
21681
21727
|
if (decision === "repair") return enableDaemonServiceQuiet() ? "repaired" : "skipped";
|
|
21682
21728
|
return decision === "ok" ? "ok" : decision === "unsupported" ? "unsupported" : "skipped";
|
|
21683
21729
|
}
|
|
21730
|
+
function autostartInstallHint() {
|
|
21731
|
+
return process.platform === "linux" ? "Run: systemctl --user enable --now node9-daemon (or: node9 daemon install)" : "Run: node9 daemon install";
|
|
21732
|
+
}
|
|
21684
21733
|
function autostartAdvice(opts) {
|
|
21685
|
-
const installable = process.platform === "linux" || process.platform === "darwin";
|
|
21734
|
+
const installable = process.platform === "linux" || process.platform === "darwin" || process.platform === "win32";
|
|
21686
21735
|
if (!opts.cloudEnabled || !installable) return null;
|
|
21687
|
-
const installHint =
|
|
21736
|
+
const installHint = autostartInstallHint();
|
|
21688
21737
|
if (opts.installed && !opts.enabled) {
|
|
21689
21738
|
return {
|
|
21690
21739
|
level: "warn",
|
|
@@ -21717,11 +21766,14 @@ function isDaemonServiceEnabled() {
|
|
|
21717
21766
|
});
|
|
21718
21767
|
return r.status === 0;
|
|
21719
21768
|
}
|
|
21769
|
+
if (process.platform === "win32") {
|
|
21770
|
+
return isWindowsStartupInstalled();
|
|
21771
|
+
}
|
|
21720
21772
|
} catch {
|
|
21721
21773
|
}
|
|
21722
21774
|
return false;
|
|
21723
21775
|
}
|
|
21724
|
-
var LAUNCHD_LABEL, LAUNCHD_PLIST, SYSTEMD_UNIT_DIR, SYSTEMD_UNIT;
|
|
21776
|
+
var LAUNCHD_LABEL, LAUNCHD_PLIST, SYSTEMD_UNIT_DIR, SYSTEMD_UNIT, STARTUP_FILE, WIN_LAUNCHER;
|
|
21725
21777
|
var init_service = __esm({
|
|
21726
21778
|
"src/daemon/service.ts"() {
|
|
21727
21779
|
"use strict";
|
|
@@ -21729,6 +21781,8 @@ var init_service = __esm({
|
|
|
21729
21781
|
LAUNCHD_PLIST = path43.join(os40.homedir(), "Library", "LaunchAgents", `${LAUNCHD_LABEL}.plist`);
|
|
21730
21782
|
SYSTEMD_UNIT_DIR = path43.join(os40.homedir(), ".config", "systemd", "user");
|
|
21731
21783
|
SYSTEMD_UNIT = path43.join(SYSTEMD_UNIT_DIR, "node9-daemon.service");
|
|
21784
|
+
STARTUP_FILE = "node9-daemon.vbs";
|
|
21785
|
+
WIN_LAUNCHER = () => path43.join(windowsStartupDir(), STARTUP_FILE);
|
|
21732
21786
|
}
|
|
21733
21787
|
});
|
|
21734
21788
|
|
|
@@ -48276,7 +48330,7 @@ async function onboardMachine(apiKey, opts = {}) {
|
|
|
48276
48330
|
push.ok ? { name: "register", ok: true, detail: "machine visible in the dashboard" } : { name: "register", ok: false, detail: push.reason }
|
|
48277
48331
|
);
|
|
48278
48332
|
const healed = ensureAutostartHealthy(!!getConfig().settings.autoStartDaemon);
|
|
48279
|
-
const detail = healed === "repaired" ? "autostart re-enabled (survives reboot)" : isDaemonRunning() ? "running" : healed === "unsupported" ? "no background service on this platform: starts on agent activity" : "starts on agent activity";
|
|
48333
|
+
const detail = healed === "repaired" ? "autostart re-enabled (survives reboot)" : isDaemonRunning() ? "running" : healed === "unsupported" ? "no background service on this platform: starts on agent activity" : "starts on agent activity (make it survive reboots: node9 daemon install)";
|
|
48280
48334
|
steps.push({ name: "daemon", ok: true, detail });
|
|
48281
48335
|
}
|
|
48282
48336
|
const required = ["credentials", "policy-sync", "register"];
|
|
@@ -50382,7 +50436,9 @@ function registerDoctorCommand(program2, version2) {
|
|
|
50382
50436
|
const fails = health.consecutiveFailures > 0 ? ` (${health.consecutiveFailures} consecutive failure${health.consecutiveFailures === 1 ? "" : "s"}${health.lastError ? `: ${health.lastError}` : ""})` : "";
|
|
50383
50437
|
warn(
|
|
50384
50438
|
`Cloud policy is STALE \u2014 ${when}${fails}. The cached policy is still enforced, but changes from the dashboard are not reaching this machine.`,
|
|
50385
|
-
|
|
50439
|
+
// Platform-aware: this hint hardcoded systemctl and told a Windows
|
|
50440
|
+
// founder to run a Linux command (QA 2026-08-28).
|
|
50441
|
+
`Run: node9 policy sync (then keep it fresh across reboots \u2014 ${autostartInstallHint()})`
|
|
50386
50442
|
);
|
|
50387
50443
|
} else if (health.lastCheckedAt) {
|
|
50388
50444
|
pass(`Cloud policy fresh \u2014 last synced ${agoLabel(health.lastCheckedAt)}`);
|
|
@@ -52124,7 +52180,7 @@ function registerInitCommand(program2) {
|
|
|
52124
52180
|
await setupAgent(agent);
|
|
52125
52181
|
console.log("");
|
|
52126
52182
|
}
|
|
52127
|
-
if ((process.platform === "darwin" || process.platform === "linux") && process.stdout.isTTY) {
|
|
52183
|
+
if ((process.platform === "darwin" || process.platform === "linux" || process.platform === "win32") && process.stdout.isTTY) {
|
|
52128
52184
|
const alreadyInstalled = isDaemonServiceInstalled();
|
|
52129
52185
|
if (!alreadyInstalled) {
|
|
52130
52186
|
const { confirm: confirm4 } = await import("@inquirer/prompts");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node9/proxy",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
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",
|