@node9/proxy 2.2.0 → 2.2.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 CHANGED
@@ -50210,6 +50210,7 @@ function registerDoctorCommand(program2, version2) {
50210
50210
  program2.command("doctor").description("Check that Node9 is installed and configured correctly").action(async () => {
50211
50211
  const homeDir2 = import_os47.default.homedir();
50212
50212
  let failures = 0;
50213
+ let warnings = 0;
50213
50214
  function pass(msg) {
50214
50215
  console.log(import_chalk13.default.green(" \u2705 ") + msg);
50215
50216
  }
@@ -50221,6 +50222,7 @@ function registerDoctorCommand(program2, version2) {
50221
50222
  function warn(msg, hint) {
50222
50223
  console.log(import_chalk13.default.yellow(" \u26A0\uFE0F ") + msg);
50223
50224
  if (hint) console.log(import_chalk13.default.gray(" " + hint));
50225
+ warnings++;
50224
50226
  }
50225
50227
  function section(title) {
50226
50228
  console.log("\n" + import_chalk13.default.bold(title));
@@ -50230,8 +50232,9 @@ function registerDoctorCommand(program2, version2) {
50230
50232
  `));
50231
50233
  section("Binary");
50232
50234
  try {
50233
- const which = (0, import_child_process8.execSync)("which node9", { encoding: "utf-8", timeout: 3e3 }).trim();
50234
- pass(`node9 found at ${which}`);
50235
+ const locator = process.platform === "win32" ? "where node9" : "which node9";
50236
+ const found = (0, import_child_process8.execSync)(locator, { encoding: "utf-8", timeout: 3e3 }).split(/\r?\n/)[0].trim();
50237
+ pass(`node9 found at ${found}`);
50235
50238
  } catch {
50236
50239
  warn("node9 not found in $PATH \u2014 hooks may not find it", "Run: npm install -g node9-ai");
50237
50240
  }
@@ -50311,7 +50314,8 @@ function registerDoctorCommand(program2, version2) {
50311
50314
  )
50312
50315
  );
50313
50316
  }
50314
- section("Daemon (optional)");
50317
+ const cloudOn = import_fs53.default.existsSync(import_path51.default.join(homeDir2, ".node9", "credentials.json")) && !!getConfig().settings.approvers?.cloud;
50318
+ section(cloudOn ? "Daemon" : "Daemon (optional)");
50315
50319
  if (isDaemonRunning()) {
50316
50320
  pass(
50317
50321
  `Daemon running on ${DAEMON_HOST}:${DAEMON_PORT} \u2014 terminal & native approvals enabled`
@@ -50329,7 +50333,7 @@ function registerDoctorCommand(program2, version2) {
50329
50333
  }
50330
50334
  } else {
50331
50335
  warn(
50332
- "Daemon not running \u2014 terminal & native approvals unavailable",
50336
+ cloudOn ? "Daemon not running \u2014 approvals unavailable AND nothing ships to the dashboard until it starts (it auto-starts on agent activity)" : "Daemon not running \u2014 terminal & native approvals unavailable",
50333
50337
  "Run: node9 daemon --background"
50334
50338
  );
50335
50339
  const cause = readStartupCause();
@@ -50379,8 +50383,13 @@ function registerDoctorCommand(program2, version2) {
50379
50383
  } else {
50380
50384
  const lag = shipLagBytes2();
50381
50385
  const wm = readWatermark2(AUDIT_SHIP_WATERMARK2);
50382
- if (lag === 0) {
50386
+ if (lag === 0 && isDaemonRunning()) {
50383
50387
  pass("Audit shipping caught up \u2014 dashboard matches the local log");
50388
+ } else if (lag === 0) {
50389
+ warn(
50390
+ "Nothing queued, but the daemon is not running \u2014 new activity will not reach the dashboard until it starts",
50391
+ "It auto-starts on agent activity, or run: node9 daemon --background"
50392
+ );
50384
50393
  } else if (wm && lag !== null) {
50385
50394
  const ageMin = Math.round((Date.now() - new Date(wm.updatedAt).getTime()) / 6e4);
50386
50395
  if (ageMin > 5 && !isDaemonRunning()) {
@@ -50404,12 +50413,19 @@ function registerDoctorCommand(program2, version2) {
50404
50413
  warn(`Shipping status unavailable: ${err2.message}`);
50405
50414
  }
50406
50415
  console.log("");
50407
- if (failures === 0) {
50408
- console.log(import_chalk13.default.green.bold(" All checks passed. Node9 is ready.\n"));
50409
- } else {
50416
+ if (failures > 0) {
50410
50417
  console.log(import_chalk13.default.red.bold(` ${failures} check(s) failed. See hints above.
50411
50418
  `));
50412
50419
  process.exit(1);
50420
+ } else if (warnings > 0) {
50421
+ console.log(
50422
+ import_chalk13.default.yellow.bold(
50423
+ ` ${warnings} warning(s) \u2014 Node9 is working, but see the hints above.
50424
+ `
50425
+ )
50426
+ );
50427
+ } else {
50428
+ console.log(import_chalk13.default.green.bold(" All checks passed. Node9 is ready.\n"));
50413
50429
  }
50414
50430
  });
50415
50431
  }
package/dist/cli.mjs CHANGED
@@ -50203,6 +50203,7 @@ function registerDoctorCommand(program2, version2) {
50203
50203
  program2.command("doctor").description("Check that Node9 is installed and configured correctly").action(async () => {
50204
50204
  const homeDir2 = os50.homedir();
50205
50205
  let failures = 0;
50206
+ let warnings = 0;
50206
50207
  function pass(msg) {
50207
50208
  console.log(chalk13.green(" \u2705 ") + msg);
50208
50209
  }
@@ -50214,6 +50215,7 @@ function registerDoctorCommand(program2, version2) {
50214
50215
  function warn(msg, hint) {
50215
50216
  console.log(chalk13.yellow(" \u26A0\uFE0F ") + msg);
50216
50217
  if (hint) console.log(chalk13.gray(" " + hint));
50218
+ warnings++;
50217
50219
  }
50218
50220
  function section(title) {
50219
50221
  console.log("\n" + chalk13.bold(title));
@@ -50223,8 +50225,9 @@ function registerDoctorCommand(program2, version2) {
50223
50225
  `));
50224
50226
  section("Binary");
50225
50227
  try {
50226
- const which = execSync("which node9", { encoding: "utf-8", timeout: 3e3 }).trim();
50227
- pass(`node9 found at ${which}`);
50228
+ const locator = process.platform === "win32" ? "where node9" : "which node9";
50229
+ const found = execSync(locator, { encoding: "utf-8", timeout: 3e3 }).split(/\r?\n/)[0].trim();
50230
+ pass(`node9 found at ${found}`);
50228
50231
  } catch {
50229
50232
  warn("node9 not found in $PATH \u2014 hooks may not find it", "Run: npm install -g node9-ai");
50230
50233
  }
@@ -50304,7 +50307,8 @@ function registerDoctorCommand(program2, version2) {
50304
50307
  )
50305
50308
  );
50306
50309
  }
50307
- section("Daemon (optional)");
50310
+ const cloudOn = fs55.existsSync(path53.join(homeDir2, ".node9", "credentials.json")) && !!getConfig().settings.approvers?.cloud;
50311
+ section(cloudOn ? "Daemon" : "Daemon (optional)");
50308
50312
  if (isDaemonRunning()) {
50309
50313
  pass(
50310
50314
  `Daemon running on ${DAEMON_HOST}:${DAEMON_PORT} \u2014 terminal & native approvals enabled`
@@ -50322,7 +50326,7 @@ function registerDoctorCommand(program2, version2) {
50322
50326
  }
50323
50327
  } else {
50324
50328
  warn(
50325
- "Daemon not running \u2014 terminal & native approvals unavailable",
50329
+ cloudOn ? "Daemon not running \u2014 approvals unavailable AND nothing ships to the dashboard until it starts (it auto-starts on agent activity)" : "Daemon not running \u2014 terminal & native approvals unavailable",
50326
50330
  "Run: node9 daemon --background"
50327
50331
  );
50328
50332
  const cause = readStartupCause();
@@ -50372,8 +50376,13 @@ function registerDoctorCommand(program2, version2) {
50372
50376
  } else {
50373
50377
  const lag = shipLagBytes2();
50374
50378
  const wm = readWatermark2(AUDIT_SHIP_WATERMARK2);
50375
- if (lag === 0) {
50379
+ if (lag === 0 && isDaemonRunning()) {
50376
50380
  pass("Audit shipping caught up \u2014 dashboard matches the local log");
50381
+ } else if (lag === 0) {
50382
+ warn(
50383
+ "Nothing queued, but the daemon is not running \u2014 new activity will not reach the dashboard until it starts",
50384
+ "It auto-starts on agent activity, or run: node9 daemon --background"
50385
+ );
50377
50386
  } else if (wm && lag !== null) {
50378
50387
  const ageMin = Math.round((Date.now() - new Date(wm.updatedAt).getTime()) / 6e4);
50379
50388
  if (ageMin > 5 && !isDaemonRunning()) {
@@ -50397,12 +50406,19 @@ function registerDoctorCommand(program2, version2) {
50397
50406
  warn(`Shipping status unavailable: ${err2.message}`);
50398
50407
  }
50399
50408
  console.log("");
50400
- if (failures === 0) {
50401
- console.log(chalk13.green.bold(" All checks passed. Node9 is ready.\n"));
50402
- } else {
50409
+ if (failures > 0) {
50403
50410
  console.log(chalk13.red.bold(` ${failures} check(s) failed. See hints above.
50404
50411
  `));
50405
50412
  process.exit(1);
50413
+ } else if (warnings > 0) {
50414
+ console.log(
50415
+ chalk13.yellow.bold(
50416
+ ` ${warnings} warning(s) \u2014 Node9 is working, but see the hints above.
50417
+ `
50418
+ )
50419
+ );
50420
+ } else {
50421
+ console.log(chalk13.green.bold(" All checks passed. Node9 is ready.\n"));
50406
50422
  }
50407
50423
  });
50408
50424
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node9/proxy",
3
- "version": "2.2.0",
3
+ "version": "2.2.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",