aegis-bridge 2.17.2 → 2.17.3

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.
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Aegis Dashboard</title>
7
7
  <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🛡️</text></svg>" />
8
- <script type="module" crossorigin src="/dashboard/assets/index-FXVsThDA.js"></script>
8
+ <script type="module" crossorigin src="/dashboard/assets/index-CFVRwPA_.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/dashboard/assets/index-DnIfWYzW.css">
10
10
  </head>
11
11
  <body class="bg-[#0a0a0f] text-gray-200 antialiased">
package/dist/server.js CHANGED
@@ -54,6 +54,17 @@ import { authKeySchema, sendMessageSchema, commandSchema, bashSchema, screenshot
54
54
  const __filename = fileURLToPath(import.meta.url);
55
55
  const __dirname = path.dirname(__filename);
56
56
  const consensusRequests = new Map();
57
+ /** #1091: TTL for consensus request entries (1 hour) */
58
+ const CONSENSUS_REQUEST_TTL_MS = 60 * 60 * 1000;
59
+ /** #1091: Prune consensus requests older than the TTL to prevent unbounded memory growth. */
60
+ function pruneConsensusRequests() {
61
+ const cutoff = Date.now() - CONSENSUS_REQUEST_TTL_MS;
62
+ for (const [id, request] of consensusRequests) {
63
+ if (request.createdAt < cutoff) {
64
+ consensusRequests.delete(id);
65
+ }
66
+ }
67
+ }
57
68
  // ── Configuration ────────────────────────────────────────────────────
58
69
  // Issue #349: CSP policy for dashboard responses (shared between static and SPA fallback)
59
70
  const DASHBOARD_CSP = "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self' ws: wss: https://registry.npmjs.org";
@@ -1769,6 +1780,8 @@ async function main() {
1769
1780
  const authFailPruneInterval = setInterval(pruneAuthFailLimits, 60_000);
1770
1781
  // #398: Sweep stale API key rate limit buckets every 5 minutes
1771
1782
  const authSweepInterval = setInterval(() => auth.sweepStaleRateLimits(), 5 * 60_000);
1783
+ // #1091: Prune stale consensus requests every minute
1784
+ const consensusPruneInterval = setInterval(pruneConsensusRequests, 60_000);
1772
1785
  let pidFilePath = '';
1773
1786
  // Issue #361: Graceful shutdown handler
1774
1787
  // Issue #415: Reentrance guard at handler level prevents double execution on rapid SIGINT
@@ -1798,6 +1811,7 @@ async function main() {
1798
1811
  clearInterval(ipPruneInterval);
1799
1812
  clearInterval(authFailPruneInterval);
1800
1813
  clearInterval(authSweepInterval);
1814
+ clearInterval(consensusPruneInterval);
1801
1815
  // Issue #569: Kill all CC sessions and tmux windows before exit
1802
1816
  try {
1803
1817
  await killAllSessions(sessions, tmux);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aegis-bridge",
3
- "version": "2.17.2",
3
+ "version": "2.17.3",
4
4
  "type": "module",
5
5
  "description": "Orchestrate Claude Code sessions via API. Create, brief, monitor, refine, ship.",
6
6
  "main": "dist/server.js",