agent-dag 1.0.6 → 1.1.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/bin/agent-dag.js CHANGED
@@ -24,7 +24,11 @@ if (flags.uninstall) {
24
24
  }
25
25
 
26
26
  const port = Number(flags.port ?? process.env.AGENT_DAG_PORT ?? 4317);
27
- const workspace = flags.all ? "" : (flags.workspace ?? process.cwd());
27
+ // Default = machine-wide (capture every CC session on this box). Pass
28
+ // `--workspace <path>` (or `--scope`) to restrict to a single tree.
29
+ const workspace = flags.workspace != null
30
+ ? flags.workspace
31
+ : (flags.scope ? process.cwd() : "");
28
32
  const openBrowser = flags.noOpen !== true;
29
33
  const persist = flags.noPersist
30
34
  ? null
@@ -163,7 +167,8 @@ function parseArgs(args) {
163
167
  else if (a === "--no-open") out.noOpen = true;
164
168
  else if (a === "--uninstall") out.uninstall = true;
165
169
  else if (a === "--workspace") out.workspace = args[++i];
166
- else if (a === "--all") out.all = true;
170
+ else if (a === "--scope") out.scope = true;
171
+ else if (a === "--all") out.all = true; // legacy no-op (now default)
167
172
  else if (a === "--no-persist") out.noPersist = true;
168
173
  else if (a === "--history") out.history = args[++i];
169
174
  }
@@ -179,8 +184,9 @@ Usage:
179
184
  Options:
180
185
  -p, --port <number> Preferred port (default: 4317; falls back to random 4318–4400)
181
186
  --no-open Don't open the browser automatically
182
- --workspace <path> Workspace root (default: cwd)
183
- --all Capture sessions from ALL workspaces (machine-wide)
187
+ --workspace <path> Only capture sessions whose cwd is inside <path>
188
+ --scope Restrict to current working directory
189
+ --all Capture every Claude Code session (default)
184
190
  --history <path> Override events log file (default: ~/.claude/agent-dag/events.jsonl)
185
191
  --no-persist Don't write or replay events log (RAM-only)
186
192
  --uninstall Remove agent-dag hook entries from ~/.claude/settings.json