agent-dag 1.33.78 → 1.33.80
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/bin/deck.js +10 -1
- package/dist/web/assets/{index-Ffz1bNVI.js → index-5_r9cSQl.js} +18 -18
- package/dist/web/assets/index-dwRx-2y0.css +1 -0
- package/dist/web/index.html +2 -2
- package/hook/hook.js +63 -9
- package/package.json +1 -1
- package/src/server/index.mjs +80 -10
- package/src/server/installer.mjs +27 -7
- package/dist/web/assets/index-CF2yG9oG.css +0 -1
package/bin/deck.js
CHANGED
|
@@ -73,9 +73,14 @@ const openBrowser = flags.noOpen !== true;
|
|
|
73
73
|
// config dir rather than assuming ~/.claude — see src/server/claude-dir.mjs.
|
|
74
74
|
const { claudeConfigDir } =
|
|
75
75
|
await import(pathToFileURL(join(PKG_ROOT, "src/server/claude-dir.mjs")).href);
|
|
76
|
+
// Resolved here rather than left as typed: the discovery file publishes this
|
|
77
|
+
// path so the hook can tell which decks share one log and elect a single
|
|
78
|
+
// writer for it, and two spellings of one file would read as two files.
|
|
79
|
+
// startServer resolves it the same way, from this same process, so the two
|
|
80
|
+
// always name the same file.
|
|
76
81
|
const persist = flags.noPersist
|
|
77
82
|
? null
|
|
78
|
-
: (flags.history ?? join(claudeConfigDir(), "agent-dag", "events.jsonl"));
|
|
83
|
+
: resolve(flags.history ?? join(claudeConfigDir(), "agent-dag", "events.jsonl"));
|
|
79
84
|
|
|
80
85
|
const { installHooks, keepDiscovery, removeDiscovery, hasCodexInstalled } =
|
|
81
86
|
await import(pathToFileURL(join(PKG_ROOT, "src/server/installer.mjs")).href);
|
|
@@ -337,11 +342,15 @@ if (RESPAWN) {
|
|
|
337
342
|
//
|
|
338
343
|
// The token goes in with the port: it is what lets a hook tell this deck from
|
|
339
344
|
// whatever else may later be listening on the same number. See hookToken().
|
|
345
|
+
//
|
|
346
|
+
// The log path goes in with them, so a hook can see which decks share one events
|
|
347
|
+
// log and elect a single writer for it. See electWriters in hook/hook.js.
|
|
340
348
|
let registered = null;
|
|
341
349
|
const discovery = keepDiscovery({
|
|
342
350
|
port: realPort,
|
|
343
351
|
workspace,
|
|
344
352
|
token: hookToken(),
|
|
353
|
+
persist,
|
|
345
354
|
onState: (state) => {
|
|
346
355
|
const first = registered === null;
|
|
347
356
|
registered = state.ok;
|