agency-cli 1.1.0 → 1.2.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 +36 -17
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
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
|
|
|
@@ -42,7 +41,7 @@ Everything available in the TUI is also available via the CLI:
|
|
|
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
43
|
- `agency ps` - List all tasks and their status.
|
|
45
|
-
- `agency daemon start|stop|restart` - Manage the background daemon that
|
|
44
|
+
- `agency daemon start|stop|restart` - Manage the background daemon that tracks sessions and notifies clients.
|
|
46
45
|
- ... and many more (see `agency --help`).
|
|
47
46
|
|
|
48
47
|
## Configuration
|
|
@@ -53,6 +52,19 @@ Configuration is layered in three tiers:
|
|
|
53
52
|
2. Global file `~/.config/agency/agency.toml` (created by `agency setup`)
|
|
54
53
|
3. Project overrides at `./.agency/agency.toml`
|
|
55
54
|
|
|
55
|
+
### Tmux
|
|
56
|
+
|
|
57
|
+
Agency uses Tmux to manage the background agents.
|
|
58
|
+
|
|
59
|
+
If you attach to an agent you are basically opening Tmux.
|
|
60
|
+
|
|
61
|
+
Config precedence when starting sessions:
|
|
62
|
+
|
|
63
|
+
1. User defaults (best-effort): `~/.tmux.conf`, then `~/.config/tmux/tmux.conf`
|
|
64
|
+
2. Agency defaults (baseline UI/options applied programmatically)
|
|
65
|
+
3. Agency global overrides: `~/.config/agency/tmux.conf`
|
|
66
|
+
4. Project overrides: `./.agency/tmux.conf`
|
|
67
|
+
|
|
56
68
|
### Defining a custom agent
|
|
57
69
|
|
|
58
70
|
You can define custom agents using any CLI command.
|
|
@@ -66,6 +78,7 @@ The following environment variables are injected into the command:
|
|
|
66
78
|
|
|
67
79
|
- `$AGENCY_TASK` - The full prompt for the current task.
|
|
68
80
|
- `$AGENCY_ROOT` - The path to the folder of the main repo (not the worktree).
|
|
81
|
+
- `$AGENCY_TASK_ID` - The numeric ID of the task.
|
|
69
82
|
|
|
70
83
|
You can also use the `<root>` placeholder for relative paths (works in any config in which you define a path).
|
|
71
84
|
|
|
@@ -78,22 +91,29 @@ Check out the [default config](./crates/agency/defaults/agency.toml) for a few e
|
|
|
78
91
|
|
|
79
92
|
## Architecture
|
|
80
93
|
|
|
81
|
-
Agency uses a daemon + client architecture. The daemon
|
|
94
|
+
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
95
|
|
|
83
|
-
|
|
96
|
+
Daemon socket path precedence:
|
|
84
97
|
|
|
85
98
|
- `$AGENCY_SOCKET_PATH` env override
|
|
86
99
|
- `daemon.socket_path` in config
|
|
87
100
|
- `$XDG_RUNTIME_DIR/agency.sock`
|
|
88
101
|
- `~/.local/run/agency.sock` (Default)
|
|
89
102
|
|
|
103
|
+
Tmux socket path precedence (used for all sessions):
|
|
104
|
+
|
|
105
|
+
- `$AGENCY_TMUX_SOCKET_PATH` env override
|
|
106
|
+
- `daemon.tmux_socket_path` in config
|
|
107
|
+
- `$XDG_RUNTIME_DIR/agency-tmux.sock`
|
|
108
|
+
- `~/.local/run/agency-tmux.sock` (Default)
|
|
109
|
+
|
|
90
110
|
```mermaid
|
|
91
111
|
flowchart LR
|
|
92
112
|
U[User] --> C[TUI/CLI]
|
|
93
113
|
C <--> S[Unix Socket]
|
|
94
114
|
S <--> D[Agency Daemon]
|
|
95
|
-
|
|
96
|
-
|
|
115
|
+
C <--> T[tmux Server]
|
|
116
|
+
T --> A[CLI Agents]
|
|
97
117
|
|
|
98
118
|
subgraph Project
|
|
99
119
|
A
|
|
@@ -107,16 +127,15 @@ sequenceDiagram
|
|
|
107
127
|
participant U as User
|
|
108
128
|
participant C as Agency CLI
|
|
109
129
|
participant D as Daemon
|
|
110
|
-
participant
|
|
130
|
+
participant T as tmux
|
|
111
131
|
participant A as Agent
|
|
112
132
|
|
|
113
133
|
U->>C: agency new my-task
|
|
114
134
|
C->>C: Create .agency/tasks/my-task.md
|
|
115
|
-
C->>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
D->>C: Notifications
|
|
135
|
+
C->>T: new-session -d -s agency-<id>-<slug> (remain-on-exit)
|
|
136
|
+
T->>A: Exec agent cmd in worktree
|
|
137
|
+
C->>T: attach-session -t agency-<id>-<slug>
|
|
138
|
+
U<<->>T: Terminal I/O
|
|
139
|
+
T->>D: (indirect) State via list-sessions/list-panes
|
|
140
|
+
D->>C: SessionsChanged/TasksChanged
|
|
122
141
|
```
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"hasInstallScript": true,
|
|
24
24
|
"name": "agency-cli",
|
|
25
|
-
"version": "1.
|
|
25
|
+
"version": "1.2.0"
|
|
26
26
|
},
|
|
27
27
|
"node_modules/@isaacs/balanced-match": {
|
|
28
28
|
"engines": {
|
|
@@ -895,5 +895,5 @@
|
|
|
895
895
|
}
|
|
896
896
|
},
|
|
897
897
|
"requires": true,
|
|
898
|
-
"version": "1.
|
|
898
|
+
"version": "1.2.0"
|
|
899
899
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"artifactDownloadUrl": "https://github.com/tobias-walle/agency/releases/download/v1.
|
|
2
|
+
"artifactDownloadUrl": "https://github.com/tobias-walle/agency/releases/download/v1.2.0",
|
|
3
3
|
"bin": {
|
|
4
4
|
"agency": "run-agency.js"
|
|
5
5
|
},
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"zipExt": ".tar.xz"
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
-
"version": "1.
|
|
64
|
+
"version": "1.2.0",
|
|
65
65
|
"volta": {
|
|
66
66
|
"node": "18.14.1",
|
|
67
67
|
"npm": "9.5.0"
|