@node9/proxy 1.62.1 → 1.63.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 +18 -4
- package/dist/cli.mjs +18 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17451,7 +17451,7 @@ var init_ship = __esm({
|
|
|
17451
17451
|
});
|
|
17452
17452
|
|
|
17453
17453
|
// src/policy-snapshot/build.ts
|
|
17454
|
-
function buildPolicySnapshot(config, activeShields, overrides, mcpTools = {}, statusEntries = []) {
|
|
17454
|
+
function buildPolicySnapshot(config, activeShields, overrides, mcpTools = {}, statusEntries = [], syncHealth) {
|
|
17455
17455
|
const p = config.policy;
|
|
17456
17456
|
const statusByKey = /* @__PURE__ */ new Map();
|
|
17457
17457
|
for (const s of statusEntries) {
|
|
@@ -17510,7 +17510,17 @@ function buildPolicySnapshot(config, activeShields, overrides, mcpTools = {}, st
|
|
|
17510
17510
|
dlpEnabled: p.dlp.enabled,
|
|
17511
17511
|
engineVersion: ENGINE_VERSION,
|
|
17512
17512
|
// Connected rows first so they win the cap; non-connected SEE rows fill the rest.
|
|
17513
|
-
mcpServers: [...connectedRows, ...extraRows].slice(0, MAX_MCP_SERVERS)
|
|
17513
|
+
mcpServers: [...connectedRows, ...extraRows].slice(0, MAX_MCP_SERVERS),
|
|
17514
|
+
// fleet-ship Step 2: ship the proxy's own sync health so the dashboard can
|
|
17515
|
+
// derive a "sync failing" badge. Only included when the caller passes it.
|
|
17516
|
+
...syncHealth && {
|
|
17517
|
+
syncHealth: {
|
|
17518
|
+
lastCheckedAt: syncHealth.lastCheckedAt,
|
|
17519
|
+
lastChangedAt: syncHealth.lastChangedAt,
|
|
17520
|
+
lastError: syncHealth.lastError,
|
|
17521
|
+
consecutiveFailures: syncHealth.consecutiveFailures
|
|
17522
|
+
}
|
|
17523
|
+
}
|
|
17514
17524
|
};
|
|
17515
17525
|
}
|
|
17516
17526
|
var MAX_RULES, MAX_EGRESS, MAX_MCP_SERVERS, MAX_MCP_TOOLS;
|
|
@@ -18285,7 +18295,10 @@ async function pushPolicySnapshot(creds) {
|
|
|
18285
18295
|
// Merged config-vs-connected status. resolveMcpStatus reads process.env to
|
|
18286
18296
|
// resolve ${VAR} placeholders — so this push reflects THIS process's env
|
|
18287
18297
|
// (daemon here, user shell in runPolicyPush); see the P2 design's two-env note.
|
|
18288
|
-
resolveMcpStatus()
|
|
18298
|
+
resolveMcpStatus(),
|
|
18299
|
+
// fleet-ship Step 2: ship this machine's sync health so the dashboard can
|
|
18300
|
+
// show "sync failing" badges. readSyncHealth is local (same module, no circular).
|
|
18301
|
+
readSyncHealth()
|
|
18289
18302
|
);
|
|
18290
18303
|
await shipPolicySnapshot(body, creds);
|
|
18291
18304
|
} catch {
|
|
@@ -18308,7 +18321,8 @@ async function runPolicyPush() {
|
|
|
18308
18321
|
// Merged config-vs-connected status. resolveMcpStatus reads process.env to
|
|
18309
18322
|
// resolve ${VAR} placeholders — so this push reflects THIS process's env
|
|
18310
18323
|
// (daemon here, user shell in runPolicyPush); see the P2 design's two-env note.
|
|
18311
|
-
resolveMcpStatus()
|
|
18324
|
+
resolveMcpStatus(),
|
|
18325
|
+
readSyncHealth()
|
|
18312
18326
|
);
|
|
18313
18327
|
const sent = await shipPolicySnapshot(body, creds);
|
|
18314
18328
|
return sent ? { ok: true } : { ok: false, reason: "Push failed (network or server error)" };
|
package/dist/cli.mjs
CHANGED
|
@@ -17448,7 +17448,7 @@ var init_ship = __esm({
|
|
|
17448
17448
|
});
|
|
17449
17449
|
|
|
17450
17450
|
// src/policy-snapshot/build.ts
|
|
17451
|
-
function buildPolicySnapshot(config, activeShields, overrides, mcpTools = {}, statusEntries = []) {
|
|
17451
|
+
function buildPolicySnapshot(config, activeShields, overrides, mcpTools = {}, statusEntries = [], syncHealth) {
|
|
17452
17452
|
const p = config.policy;
|
|
17453
17453
|
const statusByKey = /* @__PURE__ */ new Map();
|
|
17454
17454
|
for (const s of statusEntries) {
|
|
@@ -17507,7 +17507,17 @@ function buildPolicySnapshot(config, activeShields, overrides, mcpTools = {}, st
|
|
|
17507
17507
|
dlpEnabled: p.dlp.enabled,
|
|
17508
17508
|
engineVersion: ENGINE_VERSION,
|
|
17509
17509
|
// Connected rows first so they win the cap; non-connected SEE rows fill the rest.
|
|
17510
|
-
mcpServers: [...connectedRows, ...extraRows].slice(0, MAX_MCP_SERVERS)
|
|
17510
|
+
mcpServers: [...connectedRows, ...extraRows].slice(0, MAX_MCP_SERVERS),
|
|
17511
|
+
// fleet-ship Step 2: ship the proxy's own sync health so the dashboard can
|
|
17512
|
+
// derive a "sync failing" badge. Only included when the caller passes it.
|
|
17513
|
+
...syncHealth && {
|
|
17514
|
+
syncHealth: {
|
|
17515
|
+
lastCheckedAt: syncHealth.lastCheckedAt,
|
|
17516
|
+
lastChangedAt: syncHealth.lastChangedAt,
|
|
17517
|
+
lastError: syncHealth.lastError,
|
|
17518
|
+
consecutiveFailures: syncHealth.consecutiveFailures
|
|
17519
|
+
}
|
|
17520
|
+
}
|
|
17511
17521
|
};
|
|
17512
17522
|
}
|
|
17513
17523
|
var MAX_RULES, MAX_EGRESS, MAX_MCP_SERVERS, MAX_MCP_TOOLS;
|
|
@@ -18283,7 +18293,10 @@ async function pushPolicySnapshot(creds) {
|
|
|
18283
18293
|
// Merged config-vs-connected status. resolveMcpStatus reads process.env to
|
|
18284
18294
|
// resolve ${VAR} placeholders — so this push reflects THIS process's env
|
|
18285
18295
|
// (daemon here, user shell in runPolicyPush); see the P2 design's two-env note.
|
|
18286
|
-
resolveMcpStatus()
|
|
18296
|
+
resolveMcpStatus(),
|
|
18297
|
+
// fleet-ship Step 2: ship this machine's sync health so the dashboard can
|
|
18298
|
+
// show "sync failing" badges. readSyncHealth is local (same module, no circular).
|
|
18299
|
+
readSyncHealth()
|
|
18287
18300
|
);
|
|
18288
18301
|
await shipPolicySnapshot(body, creds);
|
|
18289
18302
|
} catch {
|
|
@@ -18306,7 +18319,8 @@ async function runPolicyPush() {
|
|
|
18306
18319
|
// Merged config-vs-connected status. resolveMcpStatus reads process.env to
|
|
18307
18320
|
// resolve ${VAR} placeholders — so this push reflects THIS process's env
|
|
18308
18321
|
// (daemon here, user shell in runPolicyPush); see the P2 design's two-env note.
|
|
18309
|
-
resolveMcpStatus()
|
|
18322
|
+
resolveMcpStatus(),
|
|
18323
|
+
readSyncHealth()
|
|
18310
18324
|
);
|
|
18311
18325
|
const sent = await shipPolicySnapshot(body, creds);
|
|
18312
18326
|
return sent ? { ok: true } : { ok: false, reason: "Push failed (network or server error)" };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node9/proxy",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.63.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",
|