agent-dag 1.34.6 → 1.35.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/README.md +3 -1
- package/bin/deck.js +13 -3
- package/dist/web/assets/{index-G1Xt6iC6.js → index-CMZYhML1.js} +1 -1
- package/dist/web/index.html +1 -1
- package/hook/hook.js +64 -21
- package/package.json +1 -1
- package/src/server/index.mjs +32 -1
- package/src/server/log-writer.mjs +34 -19
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ No config file. No account. No telemetry — nothing about your sessions is repo
|
|
|
48
48
|
| **Survives restarts** | Events are appended to `~/.claude/agent-dag/events.jsonl` and replayed on open. |
|
|
49
49
|
| **Accounts without a terminal** | Sign a new Claude account in, share one to another machine, rename, reorder, remove — from the panel. |
|
|
50
50
|
| **Knows when it is stale** | Node caches modules at startup, so an upgraded-while-running deck keeps executing old code. This one says so, and can restart itself when nothing is running. |
|
|
51
|
-
| **Workspace scoping** | `--scope` for the current directory, `--workspace <path>` for any subtree. |
|
|
51
|
+
| **Workspace scoping** | `--scope` for the current directory, `--workspace <path>` for any subtree — for Claude Code and Codex alike. |
|
|
52
52
|
|
|
53
53
|
## How it works
|
|
54
54
|
|
|
@@ -121,6 +121,8 @@ ccdeck [options]
|
|
|
121
121
|
-h, --help Show this help
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
+
`--workspace` is a filter this deck applies to itself, not a claim on the sessions it matches: **every** running deck whose workspace contains a session's directory draws that session, so a machine-wide deck and one scoped to `~/proj` both show the agents working inside `~/proj`. It reads the same way on both capture paths — Claude Code's hook and Codex's rollout files — and the events log still gets exactly one copy of each event, whichever decks are up. A relative path is resolved against the directory you start the deck in, and once, so both paths scope to the same tree.
|
|
125
|
+
|
|
124
126
|
Environment:
|
|
125
127
|
|
|
126
128
|
| Variable | Effect |
|
package/bin/deck.js
CHANGED
|
@@ -75,8 +75,9 @@ if (flags.uninstall) {
|
|
|
75
75
|
|
|
76
76
|
const port = Number(flags.port ?? process.env.AGENT_DAG_PORT ?? 4317);
|
|
77
77
|
// Default = machine-wide (capture every CC session on this box). Pass
|
|
78
|
-
// `--workspace <path>` (or `--scope`) to restrict to a single tree.
|
|
79
|
-
|
|
78
|
+
// `--workspace <path>` (or `--scope`) to restrict to a single tree. Canonicalized
|
|
79
|
+
// just below, once the module that owns that rule is loaded.
|
|
80
|
+
const rawWorkspace = flags.workspace != null
|
|
80
81
|
? flags.workspace
|
|
81
82
|
: (flags.scope ? process.cwd() : "");
|
|
82
83
|
const openBrowser = flags.noOpen !== true;
|
|
@@ -99,9 +100,18 @@ const { installHooks, keepDiscovery, removeDiscovery, hasCodexInstalled } =
|
|
|
99
100
|
// the watcher tails, and the watcher lives in that module. Recomputing the path
|
|
100
101
|
// here is how the banner came to print ~/.codex/sessions on machines whose
|
|
101
102
|
// sessions are somewhere else entirely — see the row further down.
|
|
102
|
-
const { startServer, hookToken, releaseRestart, CODEX_SESSIONS_DIR } =
|
|
103
|
+
const { startServer, hookToken, releaseRestart, CODEX_SESSIONS_DIR, canonicalWorkspace } =
|
|
103
104
|
await import(pathToFileURL(join(PKG_ROOT, "src/server/index.mjs")).href);
|
|
104
105
|
|
|
106
|
+
// Resolved here rather than left as typed, for the reason the events log above
|
|
107
|
+
// is: the discovery file publishes this path, and the hook that reads it runs in
|
|
108
|
+
// a process whose cwd is the agent's — so a relative `--workspace ./sub` meant
|
|
109
|
+
// one directory to the Codex watcher inside this process and a different one per
|
|
110
|
+
// agent to the hook. One canonical spelling, computed in the one process that
|
|
111
|
+
// knows what the user meant, is what both capture paths compare against. See
|
|
112
|
+
// canonicalWorkspace.
|
|
113
|
+
const workspace = canonicalWorkspace(rawWorkspace);
|
|
114
|
+
|
|
105
115
|
// Whether the server starts the Codex rollout watcher. Nothing is installed
|
|
106
116
|
// and no directory is created either way — Codex hooks are not used any more,
|
|
107
117
|
// so `--codex` only means "watch even though ~/.codex/ is not there yet",
|