@agentdocumentformat/cli 0.8.2 → 0.8.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 (129) hide show
  1. package/README.md +55 -4
  2. package/dist/adf.mjs +16 -13
  3. package/dist/chunks/{App-4AZZJNN2.mjs → App-XOPHZTGN.mjs} +515 -349
  4. package/dist/chunks/{auth-manager-TBNKCJ45.mjs → auth-manager-2YHTYI3C.mjs} +2 -1
  5. package/dist/chunks/{build-QF5W473T.mjs → build-BFOCXM5S.mjs} +1 -1
  6. package/dist/chunks/{chunk-RHBGCOS3.mjs → chunk-22ZGZFOV.mjs} +5 -16
  7. package/dist/chunks/chunk-26RK7T5L.mjs +20 -0
  8. package/dist/chunks/{chunk-KCIRFUZH.mjs → chunk-2WIFHJV2.mjs} +2 -2
  9. package/dist/chunks/{chunk-D7A77SNL.mjs → chunk-3FWPIWYM.mjs} +1 -1
  10. package/dist/chunks/chunk-4T745GJA.mjs +431 -0
  11. package/dist/chunks/{chunk-7JZXMDDF.mjs → chunk-7ADDKFT5.mjs} +105 -31
  12. package/dist/chunks/chunk-A53XYNJL.mjs +26 -0
  13. package/dist/chunks/{chunk-MZRXFWPQ.mjs → chunk-AN6USKYQ.mjs} +40 -8
  14. package/dist/chunks/{chunk-2Z7X3UUR.mjs → chunk-DHO5Z6HP.mjs} +14 -12
  15. package/dist/chunks/{chunk-F5ELW46V.mjs → chunk-GJYMGPH4.mjs} +1 -0
  16. package/dist/chunks/chunk-HONGRUAE.mjs +175 -0
  17. package/dist/chunks/{chunk-AEAJDCVK.mjs → chunk-IM5JKLXO.mjs} +1 -1
  18. package/dist/chunks/chunk-J2N63ZUD.mjs +12 -0
  19. package/dist/chunks/{chunk-IMVMSU3A.mjs → chunk-JK6K2BMV.mjs} +12 -38
  20. package/dist/chunks/{chunk-75DC5EWN.mjs → chunk-KBXC5EHK.mjs} +1 -0
  21. package/dist/chunks/chunk-NRTRTR7C.mjs +43 -0
  22. package/dist/chunks/{chunk-BS3USVEA.mjs → chunk-P4G5ZEBI.mjs} +1 -1
  23. package/dist/chunks/{chunk-E7LC6SHP.mjs → chunk-RIAB37IS.mjs} +4 -2
  24. package/dist/chunks/{chunk-LVF2DRBR.mjs → chunk-TBMQOM7Y.mjs} +247 -610
  25. package/dist/chunks/{chunk-SOSPQPEN.mjs → chunk-TDRQG5UO.mjs} +1 -162
  26. package/dist/chunks/{chunk-RJDOVMM4.mjs → chunk-TPA2ITKV.mjs} +49 -33
  27. package/dist/chunks/{chunk-BHY7QDCM.mjs → chunk-UBWWGUMU.mjs} +1 -0
  28. package/dist/chunks/{chunk-3AT7IIP7.mjs → chunk-WZ6S3SQP.mjs} +1 -1
  29. package/dist/chunks/chunk-X6R32YVE.mjs +43 -0
  30. package/dist/chunks/chunk-XJWGENZ5.mjs +5903 -0
  31. package/dist/chunks/{chunk-F3WSCAJD.mjs → chunk-XP4U4A2W.mjs} +1 -1
  32. package/dist/chunks/chunk-XS46KYYY.mjs +31 -0
  33. package/dist/chunks/{chunk-HBOFZRUS.mjs → chunk-XZQVDY3U.mjs} +9 -1
  34. package/dist/chunks/chunk-ZECGH3LT.mjs +88 -0
  35. package/dist/chunks/{claude-subscription-EB4LAAVV.mjs → claude-subscription-42L4YM5L.mjs} +4 -3
  36. package/dist/chunks/{cli-PCVFB6B4.mjs → cli-JPRYEY4J.mjs} +53 -13
  37. package/dist/chunks/{commands-KOMPXJZS.mjs → commands-TZW2FSXG.mjs} +5 -2
  38. package/dist/chunks/context-AZOIJOUG.mjs +5933 -0
  39. package/dist/chunks/{daemon-HEQ3FUYH.mjs → daemon-DK3KUDZJ.mjs} +3571 -6806
  40. package/dist/chunks/{daemon-control-MKN7G5M3.mjs → daemon-control-U4OGCAAJ.mjs} +4 -4
  41. package/dist/chunks/{devtools-H7CI2ZVG.mjs → devtools-AUZWFIPL.mjs} +1 -1
  42. package/dist/chunks/firewall-service-7RGJN4LD.mjs +163 -0
  43. package/dist/chunks/{open-3OR6WT4T.mjs → open-T3VGLWGF.mjs} +6 -5
  44. package/dist/chunks/{pipeline-executor-DRYEEFDR.mjs → pipeline-executor-MHRI7ODL.mjs} +6 -3
  45. package/dist/chunks/{remote-access-cli-GLEEP7DI.mjs → remote-access-cli-EFVCXFOY.mjs} +22 -6
  46. package/dist/chunks/{store-55CQSAOX.mjs → store-37YHXFJ6.mjs} +4 -3
  47. package/dist/chunks/{tui-RAUVFOYY.mjs → tui-NJKGFAKU.mjs} +12 -11
  48. package/dist/chunks/web-F4XHDGUX.mjs +149 -0
  49. package/dist/chunks/{whatsapp-YJFFVN4Q.mjs → whatsapp-J7PX7TKT.mjs} +1 -1
  50. package/package.json +4 -3
  51. package/web/assets/EditorPanel-5ZGWvexa.js +161 -0
  52. package/web/assets/MeshGraphView-BZV40eAE.css +1 -0
  53. package/web/assets/MeshGraphView-Vp2R5TLK.js +23 -0
  54. package/web/assets/SettingsPage-_uHkBERV.js +6 -0
  55. package/web/assets/agent-window-B8X7FV4_.js +3 -0
  56. package/web/assets/agent.store-BHweGGTh.js +1 -0
  57. package/web/assets/app.store-j_-OuVPe.js +1 -0
  58. package/web/assets/core-DVezgdzc.js +12 -0
  59. package/web/assets/css-Z72CF80r.js +1 -0
  60. package/web/assets/diff-D97Zzqfu.js +1 -0
  61. package/web/assets/document.store-CMD3_OM0.js +1 -0
  62. package/web/assets/edit-recovery-Ce8tPQZl.js +3 -0
  63. package/web/assets/engine-javascript-CuxHA8oH.js +141 -0
  64. package/web/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
  65. package/web/assets/github-light-DAi9KRSo.js +1 -0
  66. package/web/assets/go-C27-OAKa.js +1 -0
  67. package/web/assets/html-BlS82ilI.js +1 -0
  68. package/web/assets/index-B5Eot_tL.js +1 -0
  69. package/web/assets/index-B5FYMbFc.js +3 -0
  70. package/web/assets/index-BQIEMvvt.js +2 -0
  71. package/web/assets/index-C_gf4L3q.js +1 -0
  72. package/web/assets/index-Ca6bEWGu.js +1 -0
  73. package/web/assets/index-CuTaWSEs.css +1 -0
  74. package/web/assets/index-DBFkrLao.js +1 -0
  75. package/web/assets/index-DF1leTEa.js +11 -0
  76. package/web/assets/index-DS9H-PJI.js +1 -0
  77. package/web/assets/index-DkhbLs9K.js +6 -0
  78. package/web/assets/index-KNnHrO8-.js +13 -0
  79. package/web/assets/index-nM_Q5x7Q.js +1 -0
  80. package/web/assets/inter-tight-cyrillic-ext-wght-italic-BJqtfpQe.woff2 +0 -0
  81. package/web/assets/inter-tight-cyrillic-ext-wght-normal-okcGN4Nq.woff2 +0 -0
  82. package/web/assets/inter-tight-cyrillic-wght-italic-HmhN1gQv.woff2 +0 -0
  83. package/web/assets/inter-tight-cyrillic-wght-normal-BS41q_Tv.woff2 +0 -0
  84. package/web/assets/inter-tight-greek-ext-wght-italic-B_3RbJza.woff2 +0 -0
  85. package/web/assets/inter-tight-greek-ext-wght-normal-DQgQPNk4.woff2 +0 -0
  86. package/web/assets/inter-tight-greek-wght-italic-Bb1BGCmL.woff2 +0 -0
  87. package/web/assets/inter-tight-greek-wght-normal-sS1B39LI.woff2 +0 -0
  88. package/web/assets/inter-tight-latin-ext-wght-italic-DYqsmiDd.woff2 +0 -0
  89. package/web/assets/inter-tight-latin-ext-wght-normal-B4u9PlvR.woff2 +0 -0
  90. package/web/assets/inter-tight-latin-wght-italic-DiXukCDG.woff2 +0 -0
  91. package/web/assets/inter-tight-latin-wght-normal-DX-nOvPD.woff2 +0 -0
  92. package/web/assets/inter-tight-vietnamese-wght-italic-CiVF0Juh.woff2 +0 -0
  93. package/web/assets/inter-tight-vietnamese-wght-normal-TKKdAiBA.woff2 +0 -0
  94. package/web/assets/javascript-wDzz0qaB.js +1 -0
  95. package/web/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  96. package/web/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  97. package/web/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  98. package/web/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  99. package/web/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  100. package/web/assets/json-Cp-IABpG.js +1 -0
  101. package/web/assets/jsx-g9-lgVsj.js +1 -0
  102. package/web/assets/main-Zf3qnQYd.css +1 -0
  103. package/web/assets/main-o2ocfqUC.js +319 -0
  104. package/web/assets/markdown-Cvjx9yec.js +1 -0
  105. package/web/assets/message-queue.store-ke_rFZAb.js +2 -0
  106. package/web/assets/module-RjUF93sV.js +716 -0
  107. package/web/assets/native-48B9X9Wg.js +1 -0
  108. package/web/assets/orbital-render.worker-BovOTauk.js +1 -0
  109. package/web/assets/python-B6aJPvgy.js +1 -0
  110. package/web/assets/react-D-F9gHrJ.js +1 -0
  111. package/web/assets/rust-DPvrY3IQ.js +1 -0
  112. package/web/assets/shellscript-Yzrsuije.js +1 -0
  113. package/web/assets/sql-DkvoVjww.js +1 -0
  114. package/web/assets/stix-two-text-cyrillic-wght-italic-BzL1BdzR.woff2 +0 -0
  115. package/web/assets/stix-two-text-cyrillic-wght-normal-CcrOj1MU.woff2 +0 -0
  116. package/web/assets/stix-two-text-greek-wght-italic-glgrbyRu.woff2 +0 -0
  117. package/web/assets/stix-two-text-greek-wght-normal-DAdwyhkq.woff2 +0 -0
  118. package/web/assets/stix-two-text-latin-ext-wght-italic--XhV508b.woff2 +0 -0
  119. package/web/assets/stix-two-text-latin-ext-wght-normal-BUpo8gM0.woff2 +0 -0
  120. package/web/assets/stix-two-text-latin-wght-italic-BDl6bBME.woff2 +0 -0
  121. package/web/assets/stix-two-text-latin-wght-normal-BTZaHlTl.woff2 +0 -0
  122. package/web/assets/stix-two-text-vietnamese-wght-italic-B1jFRJrJ.woff2 +0 -0
  123. package/web/assets/stix-two-text-vietnamese-wght-normal-CfS0RdBA.woff2 +0 -0
  124. package/web/assets/tsx-COt5Ahok.js +1 -0
  125. package/web/assets/typescript-BPQ3VLAy.js +1 -0
  126. package/web/assets/window-kind-mxlpdE1l.js +1 -0
  127. package/web/assets/with-selector-Ot-ZoUn0.js +1 -0
  128. package/web/assets/yaml-Buea-lGh.js +1 -0
  129. package/web/index.html +15 -0
package/README.md CHANGED
@@ -8,13 +8,19 @@ the [releases](https://github.com/christianbalevski/adf/releases).
8
8
  - `adf`: the **terminal app**. Your fleet of agents in one screen: chat with
9
9
  any agent or any of its loops, approve tool calls, edit files, schedule
10
10
  inner loops (side loops), watch live events.
11
+ - `adf web`: **Browser Studio**, using the shared desktop renderer. Available
12
+ in builds that include browser support; published npm v0.8.3 does not include it.
11
13
  - `adf <command>`: one-shot commands for scripts (`adf help`).
12
14
  - `adf daemon`: the background daemon that runs the agents. `adf` starts it
13
15
  for you; it keeps running after you quit.
14
16
 
15
17
  ## Install
16
18
 
17
- Requires Node.js 22 or newer. Native modules (SQLite, OS keychain) come
19
+ Current `main` requires Node.js `^22.23.4 || ^24.22.1 || ^26.12.1`; `adf`
20
+ refuses earlier releases and 23.x/25.x because of CVE-2026-111497, and 27+
21
+ until tested. Published npm v0.8.3 declares `>=22` and predates this check.
22
+ See [Node.js versions](https://github.com/christianbalevski/adf/blob/main/docs/cli/index.md#nodejs-versions).
23
+ Native modules (SQLite, OS keychain) come
18
24
  prebuilt for Windows, macOS (arm64, x64) and Linux (x64, arm64, glibc).
19
25
 
20
26
  ```bash
@@ -28,6 +34,48 @@ adf
28
34
  Upgrade: `npm i -g @agentdocumentformat/cli@latest`, then
29
35
  `adf daemon restart`.
30
36
 
37
+ ## Browser Studio
38
+
39
+ With a browser-enabled CLI and daemon build:
40
+
41
+ ```bash
42
+ adf web # start the local daemon if needed and open the browser
43
+ adf web --port 7485 # choose another local daemon port
44
+ adf web --no-daemon # use an already-running daemon
45
+ ```
46
+
47
+ The browser signs in through a short-lived, one-use link. No desktop app or
48
+ manual token copying is needed. `adf web` is local-only; for another device,
49
+ run these commands on the daemon host:
50
+
51
+ ```bash
52
+ adf daemon remote on
53
+ adf daemon remote status
54
+ adf daemon remote allow-network <network-id-or-name> # if not already allowed
55
+ adf daemon pair
56
+ ```
57
+
58
+ Open the printed `/studio/` address on the other device, enter the six-digit
59
+ code and a browser name, then approve that request in the host terminal.
60
+ Paired browsers are remembered for up to 30 days; browser sessions last eight
61
+ hours. Signing out clears the remembered credential. Revoke access with
62
+ `adf daemon devices revoke <id-or-label>`.
63
+
64
+ These instructions describe the browser-enabled build, not published npm
65
+ v0.8.3. From its source checkout, use `npm run build:web` followed by
66
+ `npm run adf -- web`; `npm run build:npm` packages the browser assets with the
67
+ CLI. See the [Browser Studio guide](https://github.com/christianbalevski/adf/blob/main/docs/guides/studio-web.md)
68
+ for source setup, network access and browser limitations.
69
+
70
+ ## Local models
71
+
72
+ Use Ollama, LM Studio, or any server that implements the OpenAI-compatible
73
+ chat API. Both the server and selected model need tool calling for agent
74
+ tools. Vision is needed only when the model must understand images or screenshots. Add the server with
75
+ `/provider add`, using its API base URL and model ID; supply a key only if
76
+ the server requires one. See
77
+ [local model requirements](https://github.com/christianbalevski/adf/blob/main/docs/cli/models-and-providers.md#local-model-requirements).
78
+
31
79
  ## Quickstart
32
80
 
33
81
  In the terminal app (a welcome checklist opens on first run):
@@ -49,14 +97,17 @@ adf chat agent-1 "hello"
49
97
  adf events agent-1
50
98
  ```
51
99
 
52
- Daemon: `adf daemon status | stop | restart | logs -f | token`. Studio and
53
- the CLI share settings and the owner identity on one machine; `adf` does not
54
- start a daemon while Studio is running.
100
+ Daemon: `adf daemon status | stop | restart | logs -f | token`. On current
101
+ `main`, Studio in Local mode and the CLI share one daemon, settings and owner
102
+ identity, and can run side by side. With Inside Studio (legacy), `adf`
103
+ refuses to start a daemon on the same settings while Studio runs; switch
104
+ Studio to Local mode or quit it first.
55
105
 
56
106
  ## Docs
57
107
 
58
108
  - [ADF CLI](https://github.com/christianbalevski/adf/blob/main/docs/cli/index.md)
59
109
  - [Getting started](https://github.com/christianbalevski/adf/blob/main/docs/cli/getting-started.md)
110
+ - [Browser Studio](https://github.com/christianbalevski/adf/blob/main/docs/guides/studio-web.md) (browser-enabled build)
60
111
  - [Terminal app](https://github.com/christianbalevski/adf/blob/main/docs/cli/terminal-app.md)
61
112
  - [Reference](https://github.com/christianbalevski/adf/blob/main/docs/cli/reference.md): every command, flag, slash command and key
62
113
  - [Remote daemon](https://github.com/christianbalevski/adf/blob/main/docs/cli/remote-daemon.md)
package/dist/adf.mjs CHANGED
@@ -5,11 +5,14 @@ import { dirname as __adfDirname } from 'node:path';
5
5
  const require = __adfCreateRequire(import.meta.url);
6
6
  const __filename = __adfFileURLToPath(import.meta.url);
7
7
  const __dirname = __adfDirname(__filename);
8
+ import "./chunks/chunk-J2N63ZUD.mjs";
9
+ import "./chunks/chunk-ZECGH3LT.mjs";
10
+ import "./chunks/chunk-26RK7T5L.mjs";
8
11
  import "./chunks/chunk-M2RX3S2T.mjs";
9
12
 
10
13
  // src/main/cli/bin.ts
11
14
  function version() {
12
- return "0.8.2";
15
+ return "0.8.4";
13
16
  }
14
17
  var DAEMON_HELP = `Usage: adf daemon [--port <n>] [--host <h>] [--settings <file>]
15
18
  adf daemon start [--port <n>] [--force]
@@ -25,9 +28,12 @@ start runs it in the background, like adf does on its own when it needs one;
25
28
  the log goes to <data dir>/logs/adf-daemon.log. stop is graceful: agents are
26
29
  unloaded and compute containers stopped.
27
30
 
28
- Every request but GET /health needs the daemon's access token. adf reads it
29
- on this machine by itself (<data dir>/daemon-token, created on first start);
30
- token prints it for a client elsewhere (--token or ADF_DAEMON_TOKEN there).
31
+ CLI and REST operations use bearer authentication. adf reads this machine's
32
+ token itself (<data dir>/daemon-token, created on first start). token prints
33
+ it for advanced clients (--token or ADF_DAEMON_TOKEN); remote-access listeners
34
+ require a device token instead. Browser Studio uses cookie sessions: adf web
35
+ opens a local one-use sign-in link; adf daemon pair prints browser addresses
36
+ and a six-digit code, then asks for approval in this terminal.
31
37
  ADF_DAEMON_TOKEN overrides the file, and is required with a non-loopback
32
38
  --host (plus ADF_DAEMON_ALLOWED_HOSTS for host names clients use).
33
39
  Behind a reverse proxy on this host set ADF_DAEMON_BEHIND_PROXY=1: identity
@@ -59,7 +65,7 @@ ${DAEMON_HELP}`);
59
65
  }
60
66
  var DAEMON_SUBCOMMANDS = /* @__PURE__ */ new Set(["start", "status", "stop", "restart", "logs", "token", "remote", "devices", "pair"]);
61
67
  async function daemonSubcommand(sub, args) {
62
- let control = await import("./chunks/daemon-control-MKN7G5M3.mjs"), out = (text) => {
68
+ let control = await import("./chunks/daemon-control-U4OGCAAJ.mjs"), out = (text) => {
63
69
  process.stdout.write(text);
64
70
  }, { url, rest } = control.daemonUrlFrom(args), target = control.daemonTarget(url), force = rest.includes("--force"), refusal = sub === "logs" || sub === "token" ? null : control.hostOnlyRefusal(sub, target);
65
71
  if (refusal)
@@ -124,7 +130,7 @@ ${advice ? `${advice}
124
130
  `), 3;
125
131
  if (await start() !== 0) return 1;
126
132
  }
127
- let [{ runHostRemoteCommand }, { stdinPrompt }] = await Promise.all([import("./chunks/remote-access-cli-GLEEP7DI.mjs"), import("./chunks/prompt-RRHZX4YT.mjs")]), prompt = stdinPrompt();
133
+ let [{ runHostRemoteCommand }, { stdinPrompt }] = await Promise.all([import("./chunks/remote-access-cli-EFVCXFOY.mjs"), import("./chunks/prompt-RRHZX4YT.mjs")]), prompt = stdinPrompt();
128
134
  try {
129
135
  return await runHostRemoteCommand(sub, rest, {
130
136
  fetch: globalThis.fetch.bind(globalThis),
@@ -156,9 +162,6 @@ ${advice ? `${advice}
156
162
  return 2;
157
163
  }
158
164
  async function main(argv) {
159
- if (Number(process.versions.node.split(".")[0]) < 22)
160
- return process.stderr.write(`adf needs Node.js 22 or newer (this is ${process.version}).
161
- `), 1;
162
165
  let noDaemon = argv.includes("--no-daemon");
163
166
  noDaemon && (argv = argv.filter((a) => a !== "--no-daemon"));
164
167
  for (let i = 0; i < argv.length; i++) {
@@ -188,17 +191,17 @@ async function main(argv) {
188
191
  `), 2;
189
192
  }
190
193
  if (!process.env.ADF_DAEMON_PIDFILE) {
191
- let { daemonPaths } = await import("./chunks/daemon-control-MKN7G5M3.mjs");
194
+ let { daemonPaths } = await import("./chunks/daemon-control-U4OGCAAJ.mjs");
192
195
  process.env.ADF_DAEMON_PIDFILE = daemonPaths(Number(process.env.ADF_DAEMON_PORT ?? 7385)).pidFile;
193
196
  }
194
- return await import("./chunks/daemon-HEQ3FUYH.mjs"), -1;
197
+ return await import("./chunks/daemon-DK3KUDZJ.mjs"), -1;
195
198
  }
196
- let [{ runCli, tuiInvocation }, control] = await Promise.all([import("./chunks/cli-PCVFB6B4.mjs"), import("./chunks/daemon-control-MKN7G5M3.mjs")]);
199
+ let [{ runCli, tuiInvocation }, control] = await Promise.all([import("./chunks/cli-JPRYEY4J.mjs"), import("./chunks/daemon-control-U4OGCAAJ.mjs")]);
197
200
  return tuiInvocation(argv) && process.env.NODE_ENV === void 0 && (process.env.NODE_ENV = "production", process.env.ADF_NODE_ENV_DEFAULTED = "1"), await runCli(argv, {
198
201
  fetch: globalThis.fetch.bind(globalThis),
199
202
  stdout: (text) => process.stdout.write(text),
200
203
  stderr: (text) => process.stderr.write(text),
201
- ensureDaemon: (url) => control.ensureDaemon(url, { disabled: noDaemon })
204
+ ensureDaemon: (url, env) => control.ensureDaemon(url, { disabled: noDaemon, env })
202
205
  });
203
206
  }
204
207
  main(process.argv.slice(2)).then(