agent-dag 3.8.2 → 3.8.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-D4ZAGkpT.js"></script>
43
+ <script type="module" crossorigin src="/assets/index-ClUU1-9w.js"></script>
44
44
  <link rel="stylesheet" crossorigin href="/assets/index-ByAgTqB8.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.8.2",
3
+ "version": "3.8.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": {
@@ -31,6 +31,12 @@
31
31
  "about a defect in the type, and the suite refuses both it and no space at",
32
32
  "all."
33
33
  ],
34
+ "3.8.3": [
35
+ {
36
+ "title": "\ud83e\ude9f Windows: two settings files that could refuse to save",
37
+ "body": "On Windows a file cannot be moved into place while anything else has it open, and Defender and the search indexer open a file the instant it is written. The deck has had a retry for that for a long time, and two files written in the last few days were not using it: the notifications preference, and Browser Watch's episode archive.\n\nWhen it bit, the notifications switch silently did not stick, and Browser Watch answered an error and showed an empty panel. Both now retry the way everything else in the deck already did.\n\nNothing changes on macOS or Linux, where the operating system never refused the move in the first place \u2014 which is why this got past a green test suite on both."
38
+ }
39
+ ],
34
40
  "3.8.2": [
35
41
  {
36
42
  "title": "\u2328\ufe0f A closed-behind-your-back dialog no longer kills every keyboard shortcut",
@@ -17,7 +17,10 @@
17
17
  // `~/.claude/agent-dag`: readLiveDecks() reads every `.json` in that directory
18
18
  // and would have to keep skipping this one forever. A subdirectory is not a
19
19
  // name it can collide with.
20
- import { appendFile, mkdir, readFile, rename, writeFile } from "node:fs/promises";
20
+ import { appendFile, mkdir, readFile, writeFile } from "node:fs/promises";
21
+ // The rename, with the Windows retry ladder installer.mjs wrote for exactly
22
+ // this call. See the note over `writeNow` (#786).
23
+ import { renameWithRetry } from "./installer.mjs";
21
24
  import { join } from "node:path";
22
25
  import { claudeConfigDir } from "./claude-dir.mjs";
23
26
 
@@ -258,7 +261,12 @@ export async function writeStore(state, home = claudeConfigDir(), deps = {}) {
258
261
  async function writeNow(state, home, deps) {
259
262
  const mk = deps.mkdir ?? mkdir;
260
263
  const write = deps.writeFile ?? writeFile;
261
- const mv = deps.rename ?? rename;
264
+ // `renameWithRetry`, not `rename` (#786). Same Windows rule as deck-prefs,
265
+ // and the stakes are higher here: none of the three writers catches the
266
+ // throw, so a refused rename 500s `GET /api/browser-watch` and the panel goes
267
+ // blank, while the episode archive — the file that exists BECAUSE an intruder
268
+ // can clear the browser's own history — is not written at all.
269
+ const mv = deps.rename ?? renameWithRetry;
262
270
  await mk(storeDir(home), { recursive: true });
263
271
  const body = JSON.stringify({
264
272
  v: STORE_VERSION,
@@ -26,7 +26,10 @@
26
26
  // temp file, rename — because the alternative is a truncated JSON document as
27
27
  // the only record of what the user chose, and a corrupt file here silently
28
28
  // turns the notifications back on.
29
- import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
29
+ import { mkdir, readFile, writeFile } from "node:fs/promises";
30
+ // The rename, with the Windows retry ladder installer.mjs wrote for exactly
31
+ // this call. See the note over the write below (#786).
32
+ import { renameWithRetry } from "./installer.mjs";
30
33
  import { join } from "node:path";
31
34
  import { claudeConfigDir } from "./claude-dir.mjs";
32
35
 
@@ -87,7 +90,13 @@ export async function writePrefs(patch, home = claudeConfigDir(), deps = {}) {
87
90
  const job = async () => {
88
91
  const mk = deps.mkdir ?? mkdir;
89
92
  const write = deps.writeFile ?? writeFile;
90
- const mv = deps.rename ?? rename;
93
+ // `renameWithRetry`, not `rename` (#786). MoveFileExW refuses while any
94
+ // handle without FILE_SHARE_DELETE is open on either side, and Defender and
95
+ // the search indexer open a file the instant it is written — so on Windows
96
+ // a bare rename fails on a perfectly healthy machine, `POST /api/prefs`
97
+ // 500s through `guard`, and the notifications switch silently does not
98
+ // stick. POSIX rename(2) has no such rule, which is why this shipped green.
99
+ const mv = deps.rename ?? renameWithRetry;
91
100
  const next = normalise({ ...(await readPrefs(home, deps)), ...patch });
92
101
  await mk(prefsDir(home), { recursive: true });
93
102
  const tmp = `${prefsPath(home)}.${process.pid}.tmp`;