agent-dag 3.21.0 → 3.21.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.
@@ -40,7 +40,7 @@
40
40
  document.documentElement.setAttribute("data-theme", stored === "light" ? "light" : "dark");
41
41
  })();
42
42
  </script>
43
- <script type="module" crossorigin src="/assets/index-G0ntHhBn.js"></script>
43
+ <script type="module" crossorigin src="/assets/index-CTpdETUJ.js"></script>
44
44
  <link rel="stylesheet" crossorigin href="/assets/index-BYMVIG6f.css">
45
45
  </head>
46
46
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-dag",
3
- "version": "3.21.0",
3
+ "version": "3.21.3",
4
4
  "description": "Live deck of Claude Code and Codex agents — watch tool calls, token spend and every Claude Code subagent on one calm canvas. Run it with npx ccdeck.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -3138,10 +3138,14 @@ function redactDeckToken(raw) {
3138
3138
  * same freshness every other cross-deck setting has.
3139
3139
  */
3140
3140
  let _prefs = { ...PREF_DEFAULTS };
3141
- // And LAN sync starts from the same read, so a deck that had it on comes back
3142
- // with it on. `applyLanPrefs` is defined below — this runs after module
3143
- // evaluation, which is what makes the forward reference fine.
3144
- readPrefs().then(async p => { _prefs = p; await applyLanPrefs(); }).catch(() => {});
3141
+ // Read at import, so `consider` has its answer from the first event. LAN sync
3142
+ // used to start from this same read, and it must not: bin/deck.js imports this
3143
+ // module to ASK whether a deck is already up, and a launcher that then attaches
3144
+ // and exits had already bound the beacon and the sync port on the way in —
3145
+ // which is the `lan sync (listen): EADDRINUSE` line a second `ccdeck` printed
3146
+ // above `deck already running`. The engine starts from the listen that
3147
+ // succeeds, in startServer, which is the only process that may hold a port.
3148
+ const _prefsRead = readPrefs().then(p => { _prefs = p; }).catch(() => {});
3145
3149
 
3146
3150
  const blockNotifier = createBlockNotifier({
3147
3151
  notify: osNotify,
@@ -5993,6 +5997,10 @@ export async function startServer({ port = 4317, host = "127.0.0.1", persist = n
5993
5997
  if (codex) startCodexWatcher(workspace);
5994
5998
  // Both timers are unref'd, so this never holds the process open.
5995
5999
  startSystemMetrics();
6000
+ // LAN sync, from the prefs the import read — and only from here, so a
6001
+ // deck that had it on comes back with it on, and a launcher that only
6002
+ // asked the registry never binds a port it is about to walk away from.
6003
+ _prefsRead.then(() => applyLanPrefs()).catch(() => {});
5996
6004
  // Auto-switch resumes only if the user previously turned it on; the
5997
6005
  // module reads its own persisted flag and does nothing otherwise.
5998
6006
  cswapAutoModule().then(m => m.initCswapAuto()).catch(() => {});