agent-dag 3.22.1 → 3.22.4

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.
Files changed (70) hide show
  1. package/README.md +6 -477
  2. package/package.json +14 -48
  3. package/shim.js +107 -0
  4. package/LICENSE +0 -661
  5. package/LICENSING.md +0 -82
  6. package/THIRD_PARTY_NOTICES.md +0 -395
  7. package/bin/agent-dag.js +0 -626
  8. package/bin/deck.js +0 -1805
  9. package/dist/web/assets/index-CJYsv0lr.css +0 -1
  10. package/dist/web/assets/index-Ifm23DDC.js +0 -270
  11. package/dist/web/index.html +0 -49
  12. package/hook/hook.js +0 -542
  13. package/release-notes.json +0 -398
  14. package/src/server/activity.mjs +0 -52
  15. package/src/server/agent-activity.mjs +0 -522
  16. package/src/server/args.mjs +0 -183
  17. package/src/server/auto-update.mjs +0 -79
  18. package/src/server/block-notify.mjs +0 -173
  19. package/src/server/boot-deadline.mjs +0 -127
  20. package/src/server/brand.mjs +0 -16
  21. package/src/server/browser-history.mjs +0 -497
  22. package/src/server/browser-presence.mjs +0 -211
  23. package/src/server/browser-profiles.mjs +0 -279
  24. package/src/server/browser-react.mjs +0 -284
  25. package/src/server/browser-watch-store.mjs +0 -350
  26. package/src/server/browser-watch.mjs +0 -905
  27. package/src/server/ccusage.mjs +0 -1168
  28. package/src/server/claude-accounts.mjs +0 -951
  29. package/src/server/claude-dir.mjs +0 -213
  30. package/src/server/codex-auth.mjs +0 -388
  31. package/src/server/codex-dir.mjs +0 -171
  32. package/src/server/codex-quota.mjs +0 -449
  33. package/src/server/codex-usage.mjs +0 -512
  34. package/src/server/cswap-admin.mjs +0 -1562
  35. package/src/server/cswap-auto.mjs +0 -658
  36. package/src/server/cswap-install.mjs +0 -641
  37. package/src/server/deck-home.mjs +0 -243
  38. package/src/server/deck-prefs.mjs +0 -301
  39. package/src/server/deck-probe.mjs +0 -111
  40. package/src/server/detach.mjs +0 -244
  41. package/src/server/exec.mjs +0 -996
  42. package/src/server/global-install.mjs +0 -67
  43. package/src/server/hwmonitor.mjs +0 -56
  44. package/src/server/index.mjs +0 -6043
  45. package/src/server/installer.mjs +0 -912
  46. package/src/server/invoked-as.mjs +0 -144
  47. package/src/server/lan-about.mjs +0 -119
  48. package/src/server/lan-engine.mjs +0 -952
  49. package/src/server/lan-reach.mjs +0 -256
  50. package/src/server/lan-socket.mjs +0 -682
  51. package/src/server/lan-sync.mjs +0 -941
  52. package/src/server/lhm-parse.mjs +0 -91
  53. package/src/server/log-tail.mjs +0 -139
  54. package/src/server/log-writer.mjs +0 -322
  55. package/src/server/login-service.mjs +0 -473
  56. package/src/server/macmon.mjs +0 -310
  57. package/src/server/npx.mjs +0 -264
  58. package/src/server/open-url.mjs +0 -242
  59. package/src/server/presence.mjs +0 -40
  60. package/src/server/quota.mjs +0 -792
  61. package/src/server/relay-guard.mjs +0 -507
  62. package/src/server/reset-label.mjs +0 -78
  63. package/src/server/retire-sound-hook.mjs +0 -349
  64. package/src/server/running-deck.mjs +0 -234
  65. package/src/server/self-update.mjs +0 -1380
  66. package/src/server/stop-deck.mjs +0 -171
  67. package/src/server/supervisor.mjs +0 -392
  68. package/src/server/system-metrics.mjs +0 -1825
  69. package/src/server/term.mjs +0 -686
  70. package/src/server/uv-bootstrap.mjs +0 -337
package/shim.js ADDED
@@ -0,0 +1,107 @@
1
+ #!/usr/bin/env node
2
+ // The old names, kept working.
3
+ //
4
+ // This deck was published under three names for its whole life — `ccdeck`,
5
+ // `agents-deck` and `agent-dag` — and the README, the banner and the docs have
6
+ // pointed at `ccdeck` for a long time. Publishing one product three times is a
7
+ // cost paid on every release forever, and a person reading two different
8
+ // commands for one tool has to work out that they are the same tool.
9
+ //
10
+ // SO THE OTHER TWO STOP BEING THE DECK AND BECOME A DOOR TO IT. They depend on
11
+ // `ccdeck`, print the command to use next time, and hand over. Nothing anybody
12
+ // has typed into a script or an alias stops working, and nobody is left on a
13
+ // version that quietly never updates again.
14
+ //
15
+ // A DEPENDENCY RATHER THAN `npx ccdeck`. Spawning npx would mean a second
16
+ // registry resolution on every single start — slower, and a hard requirement on
17
+ // the network even when everything needed is already on disk. Declaring the
18
+ // dependency makes npm fetch the deck once, alongside this, and this then runs
19
+ // the binary out of node_modules. One resolution, no runtime fetch.
20
+ //
21
+ // WHAT IT MUST NOT DO is get in the way. The notice goes to stderr so a script
22
+ // reading stdout is unaffected, every argument is passed through untouched,
23
+ // the child inherits the terminal so the deck's own output is unchanged, and
24
+ // the exit code is the deck's. Somebody who never reads the notice still gets
25
+ // exactly the deck they asked for.
26
+ import { spawn } from "node:child_process";
27
+ import { createRequire } from "node:module";
28
+ import { existsSync } from "node:fs";
29
+ import { dirname, join } from "node:path";
30
+
31
+ const require = createRequire(import.meta.url);
32
+
33
+ /** The name this copy was started as, for a notice that names the right thing.
34
+ *
35
+ * From the manifest sitting beside this file, not from `npm_package_name`:
36
+ * npm sets that for lifecycle scripts and NOT for a bin, so the first version
37
+ * of this printed "this package is the old name" to anybody who ran it. */
38
+ function calledAs() {
39
+ try {
40
+ return require(new URL("./package.json", import.meta.url).pathname).name || "this package";
41
+ } catch {
42
+ return "this package";
43
+ }
44
+ }
45
+ const CALLED_AS = calledAs();
46
+
47
+ /** Where the real deck's launcher is.
48
+ *
49
+ * Resolved through `ccdeck`'s own manifest rather than by guessing a path:
50
+ * a dependency can be hoisted to a parent `node_modules`, nested under this
51
+ * one, or linked, and only the resolver knows which happened here. */
52
+ function deckLauncher() {
53
+ let manifestPath;
54
+ try {
55
+ manifestPath = require.resolve("ccdeck/package.json");
56
+ } catch {
57
+ return null;
58
+ }
59
+ const root = dirname(manifestPath);
60
+ let bin;
61
+ try {
62
+ bin = require(manifestPath).bin;
63
+ } catch {
64
+ return null;
65
+ }
66
+ // `bin` is a string for a single-binary package and a map for this one.
67
+ const rel = typeof bin === "string" ? bin : bin?.ccdeck ?? Object.values(bin ?? {})[0];
68
+ if (typeof rel !== "string") return null;
69
+ const full = join(root, rel);
70
+ return existsSync(full) ? full : null;
71
+ }
72
+
73
+ const launcher = deckLauncher();
74
+
75
+ if (!launcher) {
76
+ // Say what to run rather than what went wrong internally: the reader's next
77
+ // move is the same either way, and it is one command.
78
+ process.stderr.write(
79
+ `\n ${CALLED_AS} is now a pointer to ccdeck, and ccdeck could not be found beside it.\n` +
80
+ ` Run this instead:\n\n npx ccdeck\n\n`,
81
+ );
82
+ process.exit(1);
83
+ }
84
+
85
+ process.stderr.write(
86
+ `\n ${CALLED_AS} is the old name for this deck. It still works and always will.\n` +
87
+ ` The name it is published under now is ccdeck:\n\n npx ccdeck\n\n` +
88
+ ` Starting it for you.\n\n`,
89
+ );
90
+
91
+ // `inherit` on all three, so the deck owns the terminal exactly as it would if
92
+ // it had been started directly — its prompts, its colours, its Ctrl-C.
93
+ const child = spawn(process.execPath, [launcher, ...process.argv.slice(2)], { stdio: "inherit" });
94
+
95
+ // The deck's exit is this process's exit, signal included: a supervisor reading
96
+ // the code has to see what the deck actually did, not what a wrapper decided.
97
+ child.on("exit", (code, signal) => {
98
+ if (signal) {
99
+ process.kill(process.pid, signal);
100
+ return;
101
+ }
102
+ process.exit(code ?? 0);
103
+ });
104
+ child.on("error", err => {
105
+ process.stderr.write(`\n Could not start ccdeck: ${err?.message ?? err}\n\n npx ccdeck\n\n`);
106
+ process.exit(1);
107
+ });