agency-cli 1.1.0 → 1.4.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 +54 -19
- package/npm-shrinkwrap.json +10 -10
- package/package.json +4 -11
package/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
1
|
# Agency
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+

|
|
4
|
+
|
|
6
5
|
[](https://www.npmjs.com/package/agency-cli)
|
|
7
6
|

|
|
8
7
|
|
|
@@ -11,7 +10,7 @@ Agency is an AI agent orchestrator running purely in the command line.
|
|
|
11
10
|
- User-friendly TUI heavily inspired by [Lazygit](https://github.com/jesseduffield/lazygit)
|
|
12
11
|
- CLI commands for easy automation
|
|
13
12
|
- Supports any CLI coding agent: [Claude Code](https://github.com/anthropics/claude-code), [Codex CLI](https://github.com/openai/codex), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [OpenCode](https://github.com/sst/opencode) and [you can add more](#defining-a-custom-agent)
|
|
14
|
-
- Isolated environments for each task using Git
|
|
13
|
+
- Isolated environments for each task using [Git Worktrees](https://git-scm.com/docs/git-worktree) and [Tmux](https://github.com/tmux/tmux)
|
|
15
14
|
|
|
16
15
|
## Getting Started
|
|
17
16
|
|
|
@@ -32,7 +31,7 @@ The easiest option is to use the TUI; run `agency tui` or just `agency`.
|
|
|
32
31
|
Everything available in the TUI is also available via the CLI:
|
|
33
32
|
|
|
34
33
|
- `agency --help` - See all available commands
|
|
35
|
-
- `agency new my-task` - Start a new task with slug `my-task`; opens your
|
|
34
|
+
- `agency new my-task` - Start a new task with slug `my-task`; opens your configured editor to describe what the agent should do.
|
|
36
35
|
- `agency new --draft my-task` - Create a new task as a draft (doesn't start it yet).
|
|
37
36
|
- `agency edit my-task` - Edit a draft task.
|
|
38
37
|
- `agency start my-task` - Start a task that is a draft or stopped.
|
|
@@ -41,8 +40,9 @@ Everything available in the TUI is also available via the CLI:
|
|
|
41
40
|
- `agency merge my-task` - Merge the task back into the base branch.
|
|
42
41
|
- `agency path my-task` - Get the worktree path for a task.
|
|
43
42
|
- `agency shell my-task` - Open a shell in the task's worktree.
|
|
44
|
-
- `agency
|
|
45
|
-
- `agency
|
|
43
|
+
- `agency tasks` - List all tasks and their status.
|
|
44
|
+
- `agency config` - Open the global Agency config in your editor.
|
|
45
|
+
- `agency daemon start|stop|restart` - Manage the background daemon that tracks sessions and notifies clients.
|
|
46
46
|
- ... and many more (see `agency --help`).
|
|
47
47
|
|
|
48
48
|
## Configuration
|
|
@@ -53,6 +53,19 @@ Configuration is layered in three tiers:
|
|
|
53
53
|
2. Global file `~/.config/agency/agency.toml` (created by `agency setup`)
|
|
54
54
|
3. Project overrides at `./.agency/agency.toml`
|
|
55
55
|
|
|
56
|
+
### Tmux
|
|
57
|
+
|
|
58
|
+
Agency uses Tmux to manage the background agents.
|
|
59
|
+
|
|
60
|
+
If you attach to an agent you are basically opening Tmux.
|
|
61
|
+
|
|
62
|
+
Config precedence when starting sessions:
|
|
63
|
+
|
|
64
|
+
1. User defaults (best-effort): `~/.tmux.conf`, then `~/.config/tmux/tmux.conf`
|
|
65
|
+
2. Agency defaults (baseline UI/options applied programmatically)
|
|
66
|
+
3. Agency global overrides: `~/.config/agency/tmux.conf`
|
|
67
|
+
4. Project overrides: `./.agency/tmux.conf`
|
|
68
|
+
|
|
56
69
|
### Defining a custom agent
|
|
57
70
|
|
|
58
71
|
You can define custom agents using any CLI command.
|
|
@@ -66,6 +79,7 @@ The following environment variables are injected into the command:
|
|
|
66
79
|
|
|
67
80
|
- `$AGENCY_TASK` - The full prompt for the current task.
|
|
68
81
|
- `$AGENCY_ROOT` - The path to the folder of the main repo (not the worktree).
|
|
82
|
+
- `$AGENCY_TASK_ID` - The numeric ID of the task.
|
|
69
83
|
|
|
70
84
|
You can also use the `<root>` placeholder for relative paths (works in any config in which you define a path).
|
|
71
85
|
|
|
@@ -76,24 +90,46 @@ cmd = ["<root>./my-local-agent", "-p", "$AGENCY_TASK"]
|
|
|
76
90
|
|
|
77
91
|
Check out the [default config](./crates/agency/defaults/agency.toml) for a few examples.
|
|
78
92
|
|
|
93
|
+
### Editor
|
|
94
|
+
|
|
95
|
+
Control which editor Agency uses when opening files (e.g. task descriptions, worktrees, and config):
|
|
96
|
+
|
|
97
|
+
```toml
|
|
98
|
+
# Preferred editor argv. If unset, Agency falls back to $EDITOR, then to `vi`.
|
|
99
|
+
editor = ["nvim"]
|
|
100
|
+
|
|
101
|
+
# Examples:
|
|
102
|
+
# editor = ["code", "-w"]
|
|
103
|
+
# editor = ["zed", "--wait"]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
You can also run `agency config` to open (and create if missing) the global config file directly in your editor.
|
|
107
|
+
|
|
79
108
|
## Architecture
|
|
80
109
|
|
|
81
|
-
Agency uses a daemon + client architecture. The daemon
|
|
110
|
+
Agency uses a daemon + client architecture with tmux-managed sessions. The daemon is slim: it computes session/task status from tmux and broadcasts notifications. Clients (CLI or TUI) communicate with the daemon via a Unix socket but attach directly to tmux for interactive views.
|
|
82
111
|
|
|
83
|
-
|
|
112
|
+
Daemon socket path precedence:
|
|
84
113
|
|
|
85
114
|
- `$AGENCY_SOCKET_PATH` env override
|
|
86
115
|
- `daemon.socket_path` in config
|
|
87
116
|
- `$XDG_RUNTIME_DIR/agency.sock`
|
|
88
117
|
- `~/.local/run/agency.sock` (Default)
|
|
89
118
|
|
|
119
|
+
Tmux socket path precedence (used for all sessions):
|
|
120
|
+
|
|
121
|
+
- `$AGENCY_TMUX_SOCKET_PATH` env override
|
|
122
|
+
- `daemon.tmux_socket_path` in config
|
|
123
|
+
- `$XDG_RUNTIME_DIR/agency-tmux.sock`
|
|
124
|
+
- `~/.local/run/agency-tmux.sock` (Default)
|
|
125
|
+
|
|
90
126
|
```mermaid
|
|
91
127
|
flowchart LR
|
|
92
128
|
U[User] --> C[TUI/CLI]
|
|
93
129
|
C <--> S[Unix Socket]
|
|
94
130
|
S <--> D[Agency Daemon]
|
|
95
|
-
|
|
96
|
-
|
|
131
|
+
C <--> T[tmux Server]
|
|
132
|
+
T --> A[CLI Agents]
|
|
97
133
|
|
|
98
134
|
subgraph Project
|
|
99
135
|
A
|
|
@@ -107,16 +143,15 @@ sequenceDiagram
|
|
|
107
143
|
participant U as User
|
|
108
144
|
participant C as Agency CLI
|
|
109
145
|
participant D as Daemon
|
|
110
|
-
participant
|
|
146
|
+
participant T as tmux
|
|
111
147
|
participant A as Agent
|
|
112
148
|
|
|
113
149
|
U->>C: agency new my-task
|
|
114
150
|
C->>C: Create .agency/tasks/my-task.md
|
|
115
|
-
C->>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
D->>C: Notifications
|
|
151
|
+
C->>T: new-session -d -s agency-<id>-<slug> (remain-on-exit)
|
|
152
|
+
T->>A: Exec agent cmd in worktree
|
|
153
|
+
C->>T: attach-session -t agency-<id>-<slug>
|
|
154
|
+
U<<->>T: Terminal I/O
|
|
155
|
+
T->>D: (indirect) State via list-sessions/list-panes
|
|
156
|
+
D->>C: SessionsChanged/TasksChanged
|
|
122
157
|
```
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
"agency": "run-agency.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"axios": "^1.
|
|
10
|
+
"axios": "^1.12.2",
|
|
11
11
|
"axios-proxy-builder": "^0.1.2",
|
|
12
12
|
"console.table": "^0.10.0",
|
|
13
|
-
"detect-libc": "^2.
|
|
13
|
+
"detect-libc": "^2.1.2",
|
|
14
14
|
"rimraf": "^6.0.1"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"hasInstallScript": true,
|
|
24
24
|
"name": "agency-cli",
|
|
25
|
-
"version": "1.
|
|
25
|
+
"version": "1.4.0"
|
|
26
26
|
},
|
|
27
27
|
"node_modules/@isaacs/balanced-match": {
|
|
28
28
|
"engines": {
|
|
@@ -98,10 +98,10 @@
|
|
|
98
98
|
"form-data": "^4.0.4",
|
|
99
99
|
"proxy-from-env": "^1.1.0"
|
|
100
100
|
},
|
|
101
|
-
"integrity": "sha512-
|
|
101
|
+
"integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==",
|
|
102
102
|
"license": "MIT",
|
|
103
|
-
"resolved": "https://registry.npmjs.org/axios/-/axios-1.
|
|
104
|
-
"version": "1.
|
|
103
|
+
"resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz",
|
|
104
|
+
"version": "1.12.2"
|
|
105
105
|
},
|
|
106
106
|
"node_modules/axios-proxy-builder": {
|
|
107
107
|
"dependencies": {
|
|
@@ -217,10 +217,10 @@
|
|
|
217
217
|
"engines": {
|
|
218
218
|
"node": ">=8"
|
|
219
219
|
},
|
|
220
|
-
"integrity": "sha512-
|
|
220
|
+
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
|
|
221
221
|
"license": "Apache-2.0",
|
|
222
|
-
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.
|
|
223
|
-
"version": "2.
|
|
222
|
+
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
|
|
223
|
+
"version": "2.1.2"
|
|
224
224
|
},
|
|
225
225
|
"node_modules/dunder-proto": {
|
|
226
226
|
"dependencies": {
|
|
@@ -895,5 +895,5 @@
|
|
|
895
895
|
}
|
|
896
896
|
},
|
|
897
897
|
"requires": true,
|
|
898
|
-
"version": "1.
|
|
898
|
+
"version": "1.4.0"
|
|
899
899
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"artifactDownloadUrl": "https://github.com/tobias-walle/agency/releases/download/v1.
|
|
2
|
+
"artifactDownloadUrl": "https://github.com/tobias-walle/agency/releases/download/v1.4.0",
|
|
3
3
|
"bin": {
|
|
4
4
|
"agency": "run-agency.js"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"axios": "^1.
|
|
7
|
+
"axios": "^1.12.2",
|
|
8
8
|
"axios-proxy-builder": "^0.1.2",
|
|
9
9
|
"console.table": "^0.10.0",
|
|
10
|
-
"detect-libc": "^2.
|
|
10
|
+
"detect-libc": "^2.1.2",
|
|
11
11
|
"rimraf": "^6.0.1"
|
|
12
12
|
},
|
|
13
13
|
"description": "AI Agent Orchestrator in the terminal",
|
|
@@ -46,13 +46,6 @@
|
|
|
46
46
|
},
|
|
47
47
|
"zipExt": ".tar.xz"
|
|
48
48
|
},
|
|
49
|
-
"x86_64-apple-darwin": {
|
|
50
|
-
"artifactName": "agency-x86_64-apple-darwin.tar.xz",
|
|
51
|
-
"bins": {
|
|
52
|
-
"agency": "agency"
|
|
53
|
-
},
|
|
54
|
-
"zipExt": ".tar.xz"
|
|
55
|
-
},
|
|
56
49
|
"x86_64-unknown-linux-gnu": {
|
|
57
50
|
"artifactName": "agency-x86_64-unknown-linux-gnu.tar.xz",
|
|
58
51
|
"bins": {
|
|
@@ -61,7 +54,7 @@
|
|
|
61
54
|
"zipExt": ".tar.xz"
|
|
62
55
|
}
|
|
63
56
|
},
|
|
64
|
-
"version": "1.
|
|
57
|
+
"version": "1.4.0",
|
|
65
58
|
"volta": {
|
|
66
59
|
"node": "18.14.1",
|
|
67
60
|
"npm": "9.5.0"
|