@node9/proxy 1.47.0 → 1.48.0

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
@@ -4415,6 +4415,7 @@ function getConfig(cwd) {
4415
4415
  };
4416
4416
  applyLayer(globalConfig);
4417
4417
  applyLayer(projectConfig);
4418
+ let cloudManagedShields = [];
4418
4419
  {
4419
4420
  const cacheFile = import_path3.default.join(import_os3.default.homedir(), ".node9", "rules-cache.json");
4420
4421
  try {
@@ -4422,6 +4423,9 @@ function getConfig(cwd) {
4422
4423
  if (Array.isArray(raw.rules) && raw.rules.length > 0) {
4423
4424
  applyLayer({ policy: { smartRules: raw.rules } });
4424
4425
  }
4426
+ if (Array.isArray(raw.shields)) {
4427
+ cloudManagedShields = raw.shields.filter((s) => typeof s === "string");
4428
+ }
4425
4429
  if (raw.panicMode === true) {
4426
4430
  mergedSettings.panicMode = true;
4427
4431
  }
@@ -4432,7 +4436,8 @@ function getConfig(cwd) {
4432
4436
  }
4433
4437
  }
4434
4438
  const shieldOverrides = readShieldOverrides();
4435
- for (const shieldName of readActiveShields()) {
4439
+ const activeShieldNames = [.../* @__PURE__ */ new Set([...readActiveShields(), ...cloudManagedShields])];
4440
+ for (const shieldName of activeShieldNames) {
4436
4441
  const shield = getShield(shieldName);
4437
4442
  if (!shield) continue;
4438
4443
  const existingRuleNames = new Set(mergedPolicy.smartRules.map((r) => r.name));
@@ -16882,6 +16887,9 @@ function extractRules(body) {
16882
16887
  if (Array.isArray(body.rules)) return body.rules;
16883
16888
  return [];
16884
16889
  }
16890
+ function extractShields(body) {
16891
+ return Array.isArray(body.shields) ? body.shields.filter((s) => typeof s === "string") : [];
16892
+ }
16885
16893
  function writeCache2(cache) {
16886
16894
  const dir = import_path31.default.dirname(rulesCacheFile());
16887
16895
  if (!import_fs32.default.existsSync(dir)) import_fs32.default.mkdirSync(dir, { recursive: true });
@@ -16901,7 +16909,8 @@ async function syncOnce() {
16901
16909
  panicMode: result.body.panicMode,
16902
16910
  shadowMode: result.body.shadowMode,
16903
16911
  syncIntervalHours: result.body.syncIntervalHours,
16904
- workspaceId: result.body.workspaceId
16912
+ workspaceId: result.body.workspaceId,
16913
+ shields: extractShields(result.body)
16905
16914
  };
16906
16915
  writeCache2(cache);
16907
16916
  }
@@ -17073,7 +17082,8 @@ async function runCloudSync() {
17073
17082
  panicMode: result.body.panicMode,
17074
17083
  shadowMode: result.body.shadowMode,
17075
17084
  syncIntervalHours: result.body.syncIntervalHours,
17076
- workspaceId: result.body.workspaceId
17085
+ workspaceId: result.body.workspaceId,
17086
+ shields: extractShields(result.body)
17077
17087
  };
17078
17088
  writeCache2(cache);
17079
17089
  maybePushBlast();
package/dist/cli.mjs CHANGED
@@ -4396,6 +4396,7 @@ function getConfig(cwd) {
4396
4396
  };
4397
4397
  applyLayer(globalConfig);
4398
4398
  applyLayer(projectConfig);
4399
+ let cloudManagedShields = [];
4399
4400
  {
4400
4401
  const cacheFile = path3.join(os3.homedir(), ".node9", "rules-cache.json");
4401
4402
  try {
@@ -4403,6 +4404,9 @@ function getConfig(cwd) {
4403
4404
  if (Array.isArray(raw.rules) && raw.rules.length > 0) {
4404
4405
  applyLayer({ policy: { smartRules: raw.rules } });
4405
4406
  }
4407
+ if (Array.isArray(raw.shields)) {
4408
+ cloudManagedShields = raw.shields.filter((s) => typeof s === "string");
4409
+ }
4406
4410
  if (raw.panicMode === true) {
4407
4411
  mergedSettings.panicMode = true;
4408
4412
  }
@@ -4413,7 +4417,8 @@ function getConfig(cwd) {
4413
4417
  }
4414
4418
  }
4415
4419
  const shieldOverrides = readShieldOverrides();
4416
- for (const shieldName of readActiveShields()) {
4420
+ const activeShieldNames = [.../* @__PURE__ */ new Set([...readActiveShields(), ...cloudManagedShields])];
4421
+ for (const shieldName of activeShieldNames) {
4417
4422
  const shield = getShield(shieldName);
4418
4423
  if (!shield) continue;
4419
4424
  const existingRuleNames = new Set(mergedPolicy.smartRules.map((r) => r.name));
@@ -16856,6 +16861,9 @@ function extractRules(body) {
16856
16861
  if (Array.isArray(body.rules)) return body.rules;
16857
16862
  return [];
16858
16863
  }
16864
+ function extractShields(body) {
16865
+ return Array.isArray(body.shields) ? body.shields.filter((s) => typeof s === "string") : [];
16866
+ }
16859
16867
  function writeCache2(cache) {
16860
16868
  const dir = path31.dirname(rulesCacheFile());
16861
16869
  if (!fs32.existsSync(dir)) fs32.mkdirSync(dir, { recursive: true });
@@ -16875,7 +16883,8 @@ async function syncOnce() {
16875
16883
  panicMode: result.body.panicMode,
16876
16884
  shadowMode: result.body.shadowMode,
16877
16885
  syncIntervalHours: result.body.syncIntervalHours,
16878
- workspaceId: result.body.workspaceId
16886
+ workspaceId: result.body.workspaceId,
16887
+ shields: extractShields(result.body)
16879
16888
  };
16880
16889
  writeCache2(cache);
16881
16890
  }
@@ -17047,7 +17056,8 @@ async function runCloudSync() {
17047
17056
  panicMode: result.body.panicMode,
17048
17057
  shadowMode: result.body.shadowMode,
17049
17058
  syncIntervalHours: result.body.syncIntervalHours,
17050
- workspaceId: result.body.workspaceId
17059
+ workspaceId: result.body.workspaceId,
17060
+ shields: extractShields(result.body)
17051
17061
  };
17052
17062
  writeCache2(cache);
17053
17063
  maybePushBlast();
package/dist/index.js CHANGED
@@ -3947,6 +3947,7 @@ function getConfig(cwd) {
3947
3947
  };
3948
3948
  applyLayer(globalConfig);
3949
3949
  applyLayer(projectConfig);
3950
+ let cloudManagedShields = [];
3950
3951
  {
3951
3952
  const cacheFile = import_path3.default.join(import_os3.default.homedir(), ".node9", "rules-cache.json");
3952
3953
  try {
@@ -3954,6 +3955,9 @@ function getConfig(cwd) {
3954
3955
  if (Array.isArray(raw.rules) && raw.rules.length > 0) {
3955
3956
  applyLayer({ policy: { smartRules: raw.rules } });
3956
3957
  }
3958
+ if (Array.isArray(raw.shields)) {
3959
+ cloudManagedShields = raw.shields.filter((s) => typeof s === "string");
3960
+ }
3957
3961
  if (raw.panicMode === true) {
3958
3962
  mergedSettings.panicMode = true;
3959
3963
  }
@@ -3964,7 +3968,8 @@ function getConfig(cwd) {
3964
3968
  }
3965
3969
  }
3966
3970
  const shieldOverrides = readShieldOverrides();
3967
- for (const shieldName of readActiveShields()) {
3971
+ const activeShieldNames = [.../* @__PURE__ */ new Set([...readActiveShields(), ...cloudManagedShields])];
3972
+ for (const shieldName of activeShieldNames) {
3968
3973
  const shield = getShield(shieldName);
3969
3974
  if (!shield) continue;
3970
3975
  const existingRuleNames = new Set(mergedPolicy.smartRules.map((r) => r.name));
package/dist/index.mjs CHANGED
@@ -3917,6 +3917,7 @@ function getConfig(cwd) {
3917
3917
  };
3918
3918
  applyLayer(globalConfig);
3919
3919
  applyLayer(projectConfig);
3920
+ let cloudManagedShields = [];
3920
3921
  {
3921
3922
  const cacheFile = path3.join(os3.homedir(), ".node9", "rules-cache.json");
3922
3923
  try {
@@ -3924,6 +3925,9 @@ function getConfig(cwd) {
3924
3925
  if (Array.isArray(raw.rules) && raw.rules.length > 0) {
3925
3926
  applyLayer({ policy: { smartRules: raw.rules } });
3926
3927
  }
3928
+ if (Array.isArray(raw.shields)) {
3929
+ cloudManagedShields = raw.shields.filter((s) => typeof s === "string");
3930
+ }
3927
3931
  if (raw.panicMode === true) {
3928
3932
  mergedSettings.panicMode = true;
3929
3933
  }
@@ -3934,7 +3938,8 @@ function getConfig(cwd) {
3934
3938
  }
3935
3939
  }
3936
3940
  const shieldOverrides = readShieldOverrides();
3937
- for (const shieldName of readActiveShields()) {
3941
+ const activeShieldNames = [.../* @__PURE__ */ new Set([...readActiveShields(), ...cloudManagedShields])];
3942
+ for (const shieldName of activeShieldNames) {
3938
3943
  const shield = getShield(shieldName);
3939
3944
  if (!shield) continue;
3940
3945
  const existingRuleNames = new Set(mergedPolicy.smartRules.map((r) => r.name));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node9/proxy",
3
- "version": "1.47.0",
3
+ "version": "1.48.0",
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",