@agentdocumentformat/cli 0.7.2 → 0.7.3
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 +44 -21
- package/dist/adf.mjs +8 -6
- package/dist/chunks/{App-L5L37JI5.mjs → App-QMFRLBPQ.mjs} +1766 -1667
- package/dist/chunks/{adf-schema-JRU2BTOG.mjs → adf-schema-US4NFHMR.mjs} +2 -2
- package/dist/chunks/{chunk-4MQPTCXY.mjs → chunk-2WSQ7V6K.mjs} +1 -1
- package/dist/chunks/{chunk-X34PDRUH.mjs → chunk-3UCKYP7P.mjs} +55 -7
- package/dist/chunks/{chunk-WFQUVXML.mjs → chunk-CD3ATSXE.mjs} +6 -1
- package/dist/chunks/chunk-GKKCMXIZ.mjs +94 -0
- package/dist/chunks/{chunk-HWLWPXQ7.mjs → chunk-HDBPBORT.mjs} +7 -2
- package/dist/chunks/{chunk-3M4ZPOA3.mjs → chunk-J74STFKE.mjs} +35 -6
- package/dist/chunks/{chunk-TMT32MXT.mjs → chunk-TPRZQ7Z4.mjs} +1 -1
- package/dist/chunks/chunk-UEZR2CNS.mjs +65 -0
- package/dist/chunks/{chunk-7MTRVW2U.mjs → chunk-ZROSGV65.mjs} +16 -7
- package/dist/chunks/{cli-TCMBNZF6.mjs → cli-ZGVQRVSQ.mjs} +48 -22
- package/dist/chunks/{commands-DTEKM4ZL.mjs → commands-XNJMCD5L.mjs} +2 -2
- package/dist/chunks/{daemon-ZC3FZ2P4.mjs → daemon-G6OQZER2.mjs} +16380 -3911
- package/dist/chunks/{daemon-control-WDX7PMTC.mjs → daemon-control-HKFVSQTQ.mjs} +27 -9
- package/dist/chunks/{pipeline-executor-BHBSJX2K.mjs → pipeline-executor-U6IMCCP3.mjs} +3 -3
- package/dist/chunks/{store-WR7TZJZS.mjs → store-HUVDJPYN.mjs} +1 -1
- package/dist/chunks/{tui-ODVYUIMT.mjs → tui-LWLJUXZ3.mjs} +8 -7
- package/package.json +1 -1
- package/dist/chunks/chunk-G426FACA.mjs +0 -49
package/README.md
CHANGED
|
@@ -1,44 +1,67 @@
|
|
|
1
1
|
# @agentdocumentformat/cli
|
|
2
2
|
|
|
3
|
-
The ADF CLI
|
|
3
|
+
The **ADF CLI**: run ADF (Agent Document Format) agents from a terminal, with
|
|
4
|
+
no desktop app. An ADF agent is a single `.adf` file: config, memory, files
|
|
5
|
+
and history in one portable document. For the desktop app, ADF Studio, see
|
|
6
|
+
the [releases](https://github.com/christianbalevski/adf/releases).
|
|
7
|
+
|
|
8
|
+
- `adf`: the **terminal app**. Your fleet of agents in one screen: chat with
|
|
9
|
+
any agent or any of its loops, approve tool calls, edit files, schedule
|
|
10
|
+
inner loops (side loops), watch live events.
|
|
11
|
+
- `adf <command>`: one-shot commands for scripts (`adf help`).
|
|
12
|
+
- `adf daemon`: the background daemon that runs the agents. `adf` starts it
|
|
13
|
+
for you; it keeps running after you quit.
|
|
4
14
|
|
|
5
15
|
## Install
|
|
6
16
|
|
|
7
|
-
Requires Node.js 22 or newer.
|
|
17
|
+
Requires Node.js 22 or newer. Native modules (SQLite, OS keychain) come
|
|
18
|
+
prebuilt for Windows, macOS (arm64, x64) and Linux (x64, arm64, glibc).
|
|
8
19
|
|
|
9
20
|
```bash
|
|
10
21
|
npm i -g @agentdocumentformat/cli
|
|
11
22
|
adf
|
|
12
23
|
```
|
|
13
24
|
|
|
14
|
-
|
|
25
|
+
`EEXIST` on install? Remove the old package first:
|
|
26
|
+
`npm uninstall -g agent-document-format`.
|
|
15
27
|
|
|
16
|
-
|
|
28
|
+
Upgrade: `npm i -g @agentdocumentformat/cli@latest`, then
|
|
29
|
+
`adf daemon restart`.
|
|
17
30
|
|
|
18
|
-
|
|
19
|
-
adf # the terminal app; starts the daemon in the background if needed
|
|
20
|
-
adf agents # one-shot CLI commands; `adf help` lists them
|
|
21
|
-
adf daemon status # the background daemon: status | stop | restart | logs -f
|
|
22
|
-
adf daemon # or run the daemon in the foreground (http://127.0.0.1:7385)
|
|
23
|
-
adf --version
|
|
24
|
-
```
|
|
31
|
+
## Quickstart
|
|
25
32
|
|
|
26
|
-
|
|
33
|
+
In the terminal app (a welcome checklist opens on first run):
|
|
27
34
|
|
|
28
|
-
|
|
35
|
+
```text
|
|
36
|
+
/identity create # your owner identity: 12 words, the same as in ADF Studio
|
|
37
|
+
/login chatgpt # or /login grok, or /provider add for an API key
|
|
38
|
+
/new # create an agent; its chat opens
|
|
39
|
+
/loop new consolidator # optional: an inner loop that tidies memory nightly
|
|
40
|
+
```
|
|
29
41
|
|
|
30
|
-
|
|
42
|
+
Or with one-shot commands:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
adf identity new
|
|
46
|
+
adf auth login chatgpt
|
|
47
|
+
adf new agent-1 --start
|
|
48
|
+
adf chat agent-1 "hello"
|
|
49
|
+
adf events agent-1
|
|
50
|
+
```
|
|
31
51
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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.
|
|
35
55
|
|
|
36
56
|
## Docs
|
|
37
57
|
|
|
38
|
-
- [
|
|
39
|
-
- [
|
|
40
|
-
- [Terminal app](https://github.com/christianbalevski/adf/blob/main/docs/
|
|
41
|
-
- [
|
|
58
|
+
- [ADF CLI](https://github.com/christianbalevski/adf/blob/main/docs/cli/index.md)
|
|
59
|
+
- [Getting started](https://github.com/christianbalevski/adf/blob/main/docs/cli/getting-started.md)
|
|
60
|
+
- [Terminal app](https://github.com/christianbalevski/adf/blob/main/docs/cli/terminal-app.md)
|
|
61
|
+
- [Reference](https://github.com/christianbalevski/adf/blob/main/docs/cli/reference.md): every command, flag, slash command and key
|
|
62
|
+
- [Remote daemon](https://github.com/christianbalevski/adf/blob/main/docs/cli/remote-daemon.md)
|
|
63
|
+
- [Troubleshooting](https://github.com/christianbalevski/adf/blob/main/docs/cli/troubleshooting.md)
|
|
64
|
+
- [Daemon HTTP API](https://github.com/christianbalevski/adf/blob/main/docs/daemon/http-api.md)
|
|
42
65
|
|
|
43
66
|
## License
|
|
44
67
|
|
package/dist/adf.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import "./chunks/chunk-M2RX3S2T.mjs";
|
|
|
9
9
|
|
|
10
10
|
// src/main/cli/bin.ts
|
|
11
11
|
function version() {
|
|
12
|
-
return "0.7.
|
|
12
|
+
return "0.7.3";
|
|
13
13
|
}
|
|
14
14
|
var DAEMON_HELP = `Usage: adf daemon [--port <n>] [--host <h>] [--settings <file>]
|
|
15
15
|
adf daemon start [--port <n>] [--force]
|
|
@@ -27,10 +27,12 @@ on this machine by itself (<data dir>/daemon-token, created on first start);
|
|
|
27
27
|
token prints it for a client elsewhere (--token or ADF_DAEMON_TOKEN there).
|
|
28
28
|
ADF_DAEMON_TOKEN overrides the file, and is required with a non-loopback
|
|
29
29
|
--host (plus ADF_DAEMON_ALLOWED_HOSTS for host names clients use).
|
|
30
|
+
Behind a reverse proxy on this host set ADF_DAEMON_BEHIND_PROXY=1: identity
|
|
31
|
+
secrets and stop then work only from adf on this host, against its loopback port.
|
|
30
32
|
|
|
31
33
|
Environment: ADF_DAEMON_PORT, ADF_DAEMON_HOST, ADF_DAEMON_SETTINGS,
|
|
32
34
|
ADF_USER_DATA_DIR, ADF_DAEMON_PIDFILE, ADF_DAEMON_TOKEN,
|
|
33
|
-
ADF_DAEMON_ALLOWED_HOSTS`;
|
|
35
|
+
ADF_DAEMON_ALLOWED_HOSTS, ADF_DAEMON_BEHIND_PROXY`;
|
|
34
36
|
function applyDaemonArgs(args, env = process.env) {
|
|
35
37
|
for (let i = 0; i < args.length; i++) {
|
|
36
38
|
let arg = args[i], [flag, inline] = arg.startsWith("--") && arg.includes("=") ? [arg.slice(0, arg.indexOf("=")), arg.slice(arg.indexOf("=") + 1)] : [arg, void 0], value = () => {
|
|
@@ -48,7 +50,7 @@ ${DAEMON_HELP}`);
|
|
|
48
50
|
}
|
|
49
51
|
var DAEMON_SUBCOMMANDS = /* @__PURE__ */ new Set(["start", "status", "stop", "restart", "logs", "token"]);
|
|
50
52
|
async function daemonSubcommand(sub, args) {
|
|
51
|
-
let control = await import("./chunks/daemon-control-
|
|
53
|
+
let control = await import("./chunks/daemon-control-HKFVSQTQ.mjs"), out = (text) => {
|
|
52
54
|
process.stdout.write(text);
|
|
53
55
|
}, { url, rest } = control.daemonUrlFrom(args), target = control.daemonTarget(url), force = rest.includes("--force"), start = async () => {
|
|
54
56
|
if (await control.isHealthy(target.url))
|
|
@@ -135,12 +137,12 @@ async function main(argv) {
|
|
|
135
137
|
`), 2;
|
|
136
138
|
}
|
|
137
139
|
if (!process.env.ADF_DAEMON_PIDFILE) {
|
|
138
|
-
let { daemonPaths } = await import("./chunks/daemon-control-
|
|
140
|
+
let { daemonPaths } = await import("./chunks/daemon-control-HKFVSQTQ.mjs");
|
|
139
141
|
process.env.ADF_DAEMON_PIDFILE = daemonPaths(Number(process.env.ADF_DAEMON_PORT ?? 7385)).pidFile;
|
|
140
142
|
}
|
|
141
|
-
return await import("./chunks/daemon-
|
|
143
|
+
return await import("./chunks/daemon-G6OQZER2.mjs"), -1;
|
|
142
144
|
}
|
|
143
|
-
let [{ runCli, tuiInvocation }, control] = await Promise.all([import("./chunks/cli-
|
|
145
|
+
let [{ runCli, tuiInvocation }, control] = await Promise.all([import("./chunks/cli-ZGVQRVSQ.mjs"), import("./chunks/daemon-control-HKFVSQTQ.mjs")]);
|
|
144
146
|
return tuiInvocation(argv) && process.env.NODE_ENV === void 0 && (process.env.NODE_ENV = "production", process.env.ADF_NODE_ENV_DEFAULTED = "1"), await runCli(argv, {
|
|
145
147
|
fetch: globalThis.fetch.bind(globalThis),
|
|
146
148
|
stdout: (text) => process.stdout.write(text),
|