agency-cli 1.0.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 +42 -19
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-

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

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

|
|
7
|
+
|
|
5
8
|
Agency is an AI agent orchestrator running purely in the command line.
|
|
6
9
|
|
|
7
10
|
- User-friendly TUI heavily inspired by [Lazygit](https://github.com/jesseduffield/lazygit)
|
|
8
11
|
- CLI commands for easy automation
|
|
9
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)
|
|
10
|
-
|
|
13
|
+
- Isolated environments for each task using [Git Worktrees](https://git-scm.com/docs/git-worktree) and [Tmux](https://github.com/tmux/tmux)
|
|
11
14
|
|
|
12
15
|
## Getting Started
|
|
13
16
|
|
|
14
17
|
1. Install Agency with your preferred method (macOS and Linux supported)
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
+
- NPM: `npm install -g agency-cli`
|
|
19
|
+
- Homebrew : `brew install tobias-walle/tap/agency`
|
|
20
|
+
- Build from source: `cargo install --git https://github.com/tobias-walle/agency`
|
|
18
21
|
2. Set up your preferences: `agency setup`
|
|
19
22
|
3. Set up Agency in your project: `agency init`
|
|
20
23
|
4. Start the TUI: `agency`
|
|
@@ -38,7 +41,7 @@ Everything available in the TUI is also available via the CLI:
|
|
|
38
41
|
- `agency path my-task` - Get the worktree path for a task.
|
|
39
42
|
- `agency shell my-task` - Open a shell in the task's worktree.
|
|
40
43
|
- `agency ps` - List all tasks and their status.
|
|
41
|
-
- `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.
|
|
42
45
|
- ... and many more (see `agency --help`).
|
|
43
46
|
|
|
44
47
|
## Configuration
|
|
@@ -49,6 +52,19 @@ Configuration is layered in three tiers:
|
|
|
49
52
|
2. Global file `~/.config/agency/agency.toml` (created by `agency setup`)
|
|
50
53
|
3. Project overrides at `./.agency/agency.toml`
|
|
51
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
|
+
|
|
52
68
|
### Defining a custom agent
|
|
53
69
|
|
|
54
70
|
You can define custom agents using any CLI command.
|
|
@@ -62,6 +78,7 @@ The following environment variables are injected into the command:
|
|
|
62
78
|
|
|
63
79
|
- `$AGENCY_TASK` - The full prompt for the current task.
|
|
64
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.
|
|
65
82
|
|
|
66
83
|
You can also use the `<root>` placeholder for relative paths (works in any config in which you define a path).
|
|
67
84
|
|
|
@@ -74,22 +91,29 @@ Check out the [default config](./crates/agency/defaults/agency.toml) for a few e
|
|
|
74
91
|
|
|
75
92
|
## Architecture
|
|
76
93
|
|
|
77
|
-
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.
|
|
78
95
|
|
|
79
|
-
|
|
96
|
+
Daemon socket path precedence:
|
|
80
97
|
|
|
81
98
|
- `$AGENCY_SOCKET_PATH` env override
|
|
82
99
|
- `daemon.socket_path` in config
|
|
83
100
|
- `$XDG_RUNTIME_DIR/agency.sock`
|
|
84
101
|
- `~/.local/run/agency.sock` (Default)
|
|
85
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
|
+
|
|
86
110
|
```mermaid
|
|
87
111
|
flowchart LR
|
|
88
112
|
U[User] --> C[TUI/CLI]
|
|
89
113
|
C <--> S[Unix Socket]
|
|
90
114
|
S <--> D[Agency Daemon]
|
|
91
|
-
|
|
92
|
-
|
|
115
|
+
C <--> T[tmux Server]
|
|
116
|
+
T --> A[CLI Agents]
|
|
93
117
|
|
|
94
118
|
subgraph Project
|
|
95
119
|
A
|
|
@@ -103,16 +127,15 @@ sequenceDiagram
|
|
|
103
127
|
participant U as User
|
|
104
128
|
participant C as Agency CLI
|
|
105
129
|
participant D as Daemon
|
|
106
|
-
participant
|
|
130
|
+
participant T as tmux
|
|
107
131
|
participant A as Agent
|
|
108
132
|
|
|
109
133
|
U->>C: agency new my-task
|
|
110
134
|
C->>C: Create .agency/tasks/my-task.md
|
|
111
|
-
C->>
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
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
|
|
118
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"
|