zwarm 2.3__tar.gz

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 (37) hide show
  1. zwarm-2.3/.gitignore +23 -0
  2. zwarm-2.3/PKG-INFO +309 -0
  3. zwarm-2.3/README.md +297 -0
  4. zwarm-2.3/pyproject.toml +42 -0
  5. zwarm-2.3/src/zwarm/__init__.py +38 -0
  6. zwarm-2.3/src/zwarm/adapters/__init__.py +21 -0
  7. zwarm-2.3/src/zwarm/adapters/base.py +109 -0
  8. zwarm-2.3/src/zwarm/adapters/claude_code.py +357 -0
  9. zwarm-2.3/src/zwarm/adapters/codex_mcp.py +1262 -0
  10. zwarm-2.3/src/zwarm/adapters/registry.py +69 -0
  11. zwarm-2.3/src/zwarm/adapters/test_codex_mcp.py +274 -0
  12. zwarm-2.3/src/zwarm/adapters/test_registry.py +68 -0
  13. zwarm-2.3/src/zwarm/cli/__init__.py +0 -0
  14. zwarm-2.3/src/zwarm/cli/main.py +2401 -0
  15. zwarm-2.3/src/zwarm/core/__init__.py +0 -0
  16. zwarm-2.3/src/zwarm/core/compact.py +329 -0
  17. zwarm-2.3/src/zwarm/core/config.py +344 -0
  18. zwarm-2.3/src/zwarm/core/environment.py +154 -0
  19. zwarm-2.3/src/zwarm/core/models.py +315 -0
  20. zwarm-2.3/src/zwarm/core/state.py +355 -0
  21. zwarm-2.3/src/zwarm/core/test_compact.py +312 -0
  22. zwarm-2.3/src/zwarm/core/test_config.py +160 -0
  23. zwarm-2.3/src/zwarm/core/test_models.py +265 -0
  24. zwarm-2.3/src/zwarm/orchestrator.py +678 -0
  25. zwarm-2.3/src/zwarm/prompts/__init__.py +10 -0
  26. zwarm-2.3/src/zwarm/prompts/orchestrator.py +230 -0
  27. zwarm-2.3/src/zwarm/sessions/__init__.py +26 -0
  28. zwarm-2.3/src/zwarm/sessions/manager.py +680 -0
  29. zwarm-2.3/src/zwarm/test_orchestrator_watchers.py +23 -0
  30. zwarm-2.3/src/zwarm/tools/__init__.py +17 -0
  31. zwarm-2.3/src/zwarm/tools/delegation.py +705 -0
  32. zwarm-2.3/src/zwarm/watchers/__init__.py +26 -0
  33. zwarm-2.3/src/zwarm/watchers/base.py +131 -0
  34. zwarm-2.3/src/zwarm/watchers/builtin.py +518 -0
  35. zwarm-2.3/src/zwarm/watchers/manager.py +181 -0
  36. zwarm-2.3/src/zwarm/watchers/registry.py +57 -0
  37. zwarm-2.3/src/zwarm/watchers/test_watchers.py +237 -0
zwarm-2.3/.gitignore ADDED
@@ -0,0 +1,23 @@
1
+ .DS_Store
2
+ .ipynb_checkpoints
3
+ .python-version
4
+ __pycache__/
5
+ .env
6
+ *.egg-info/
7
+ *.qzl
8
+ *.zip
9
+ *.7z
10
+ *.csv
11
+ runs/
12
+ _tmp_
13
+ .f1_state/
14
+
15
+ # Node.js / Frontend
16
+ node_modules/
17
+ dist/
18
+ dist-ssr/
19
+ *.local
20
+
21
+ jobs/
22
+
23
+ .zwarm/
zwarm-2.3/PKG-INFO ADDED
@@ -0,0 +1,309 @@
1
+ Metadata-Version: 2.4
2
+ Name: zwarm
3
+ Version: 2.3
4
+ Summary: Multi-Agent CLI Orchestration Research Platform
5
+ Requires-Python: <3.14,>=3.13
6
+ Requires-Dist: python-dotenv>=1.0.0
7
+ Requires-Dist: pyyaml>=6.0
8
+ Requires-Dist: rich>=13.0.0
9
+ Requires-Dist: typer>=0.9.0
10
+ Requires-Dist: wbal>=0.5.8
11
+ Description-Content-Type: text/markdown
12
+
13
+ # zwarm
14
+
15
+ Multi-agent CLI for orchestrating coding agents. Spawn, manage, and converse with multiple Codex sessions in parallel.
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ # From the workspace
21
+ cd /path/to/labs
22
+ uv sync
23
+
24
+ # Or install directly
25
+ uv pip install -e ./zwarm
26
+ ```
27
+
28
+ **Requirements:**
29
+ - Python 3.13+
30
+ - `codex` CLI installed and authenticated
31
+
32
+ **Environment:**
33
+ ```bash
34
+ export OPENAI_API_KEY="sk-..." # Required for Codex
35
+ export WEAVE_PROJECT="entity/zwarm" # Optional: Weave tracing
36
+ ```
37
+
38
+ ## Two Modes
39
+
40
+ zwarm has two ways to orchestrate coding agents:
41
+
42
+ | Mode | Who's in charge | Use case |
43
+ |------|-----------------|----------|
44
+ | `zwarm interactive` | **You** | Manual control, experimentation |
45
+ | `zwarm orchestrate` | **LLM** | Autonomous task execution |
46
+
47
+ Both use the **same underlying session manager** - the orchestrator LLM has access to the exact same tools you do.
48
+
49
+ ---
50
+
51
+ ## Interactive Mode
52
+
53
+ **You are the orchestrator.** Spawn sessions, check on them, continue conversations.
54
+
55
+ ```bash
56
+ zwarm interactive
57
+ ```
58
+
59
+ ### Commands
60
+
61
+ | Command | Description |
62
+ |---------|-------------|
63
+ | `spawn "task"` | Start a session (waits for completion) |
64
+ | `spawn --async "task"` | Start async (returns immediately) |
65
+ | `spawn -d /path "task"` | Start in specific directory |
66
+ | `ls` | List all sessions |
67
+ | `? <id>` | Quick peek: status + latest message |
68
+ | `show <id>` | Full details: all messages, tokens, etc. |
69
+ | `c <id> "msg"` | Continue conversation (waits) |
70
+ | `ca <id> "msg"` | Continue async (returns immediately) |
71
+ | `kill <id>` | Stop a running session |
72
+ | `rm <id>` | Delete session entirely |
73
+ | `killall` | Stop all running sessions |
74
+ | `clean` | Remove sessions older than 7 days |
75
+ | `q` | Quit |
76
+
77
+ ### Example Session
78
+
79
+ ```
80
+ $ zwarm interactive
81
+
82
+ > spawn "Add a login function to auth.py"
83
+ ✓ Started session a1b2c3d4, waiting...
84
+ [a1b2c3d4] codex (completed) - 32s
85
+ Response: I've added a login function with JWT support...
86
+
87
+ > spawn --async "Fix the type errors in utils.py"
88
+ ✓ Session: b2c3d4e5 (running in background)
89
+
90
+ > spawn --async "Add unit tests for auth.py"
91
+ ✓ Session: c3d4e5f6 (running in background)
92
+
93
+ > ls
94
+ 1 running | 2 done
95
+
96
+ ID │ │ T │ Task │ Updated │ Last Message
97
+ a1b2c3d4 │ ✓ │ 1 │ Add a login function... │ 2m │ I've added a login function...
98
+ b2c3d4e5 │ ✓ │ 1 │ Fix the type errors... │ 30s ★ │ Fixed 3 type errors in...
99
+ c3d4e5f6 │ ● │ 1 │ Add unit tests... │ 5s │ (working...)
100
+
101
+ > ? b2c3d4e5
102
+ ✓ b2c3d4e5 Fixed 3 type errors: Optional[str] -> str | None, added missing...
103
+
104
+ > c a1b2c3d4 "Now add password hashing with bcrypt"
105
+ Continuing session a1b2c3d4...
106
+ [a1b2c3d4] codex (completed) - 28s
107
+ Response: Done! I've updated the login function to use bcrypt...
108
+
109
+ > rm b2c3d4e5
110
+ ✓ Deleted session b2c3d4e5
111
+
112
+ > q
113
+ ```
114
+
115
+ ### Session Status Icons
116
+
117
+ | Icon | Status |
118
+ |------|--------|
119
+ | `●` | Running |
120
+ | `✓` | Completed |
121
+ | `✗` | Failed |
122
+ | `○` | Killed |
123
+ | `★` | Recently completed (< 60s) |
124
+
125
+ ---
126
+
127
+ ## Orchestrate Mode
128
+
129
+ **An LLM is the orchestrator.** Give it a task and it delegates to coding agents.
130
+
131
+ ```bash
132
+ zwarm orchestrate --task "Build a REST API with authentication"
133
+ ```
134
+
135
+ The orchestrator LLM uses the same tools available in interactive mode:
136
+
137
+ | Tool | Description |
138
+ |------|-------------|
139
+ | `delegate(task, ...)` | Start a new session |
140
+ | `converse(id, msg)` | Continue a conversation |
141
+ | `peek_session(id)` | Quick status check |
142
+ | `check_session(id)` | Full session details |
143
+ | `list_sessions()` | List all sessions with `needs_attention` flags |
144
+ | `end_session(id, delete=False)` | Kill/delete a session |
145
+
146
+ ### Task Input
147
+
148
+ ```bash
149
+ # Direct
150
+ zwarm orchestrate --task "Build a REST API"
151
+
152
+ # From file
153
+ zwarm orchestrate --task-file task.md
154
+
155
+ # From stdin
156
+ echo "Fix the bug in auth.py" | zwarm orchestrate
157
+ ```
158
+
159
+ ---
160
+
161
+ ## Configuration
162
+
163
+ zwarm looks for config in this order:
164
+ 1. `--config` flag
165
+ 2. `.zwarm/config.toml`
166
+ 3. `config.toml` in working directory
167
+
168
+ ### Minimal Config
169
+
170
+ ```toml
171
+ [weave]
172
+ enabled = true
173
+ project = "your-entity/zwarm"
174
+
175
+ [executor]
176
+ adapter = "codex_mcp"
177
+ model = "gpt-5.1-codex-mini"
178
+ ```
179
+
180
+ ### Full Config Reference
181
+
182
+ ```toml
183
+ [orchestrator]
184
+ lm = "gpt-5-mini"
185
+ max_steps = 100
186
+
187
+ [orchestrator.compaction]
188
+ enabled = true
189
+ max_tokens = 100000
190
+ threshold_pct = 0.85
191
+ target_pct = 0.7
192
+
193
+ [executor]
194
+ adapter = "codex_mcp"
195
+ model = "gpt-5.1-codex-mini"
196
+ sandbox = "workspace-write"
197
+ timeout = 300
198
+
199
+ [weave]
200
+ enabled = true
201
+ project = "your-entity/zwarm"
202
+
203
+ [watchers]
204
+ enabled = true
205
+ watchers = [
206
+ { name = "progress" },
207
+ { name = "budget", config = { max_steps = 50, max_sessions = 10 } },
208
+ { name = "delegation_reminder", config = { threshold = 10 } },
209
+ ]
210
+ ```
211
+
212
+ ---
213
+
214
+ ## Session Management
215
+
216
+ Sessions are the core abstraction. Each session is a conversation with a Codex agent.
217
+
218
+ ### Lifecycle
219
+
220
+ ```
221
+ spawn → running → completed/failed
222
+
223
+ continue → running → completed
224
+
225
+ continue → ...
226
+ ```
227
+
228
+ ### Storage
229
+
230
+ ```
231
+ .zwarm/sessions/<uuid>/
232
+ ├── meta.json # Status, task, model, messages, tokens
233
+ └── turns/
234
+ ├── turn_1.jsonl # Raw codex output for turn 1
235
+ ├── turn_2.jsonl # Output after first continue
236
+ └── ...
237
+ ```
238
+
239
+ ### Sync vs Async
240
+
241
+ | Mode | Spawn | Continue | Use case |
242
+ |------|-------|----------|----------|
243
+ | **Sync** | `spawn "task"` | `c id "msg"` | Sequential work, immediate feedback |
244
+ | **Async** | `spawn --async "task"` | `ca id "msg"` | Parallel work, batch processing |
245
+
246
+ Async sessions return immediately. Poll with `ls` or `?` to check status.
247
+
248
+ ---
249
+
250
+ ## Watchers
251
+
252
+ Watchers monitor agent behavior and intervene when needed.
253
+
254
+ | Watcher | Purpose |
255
+ |---------|---------|
256
+ | `progress` | Detects stuck/spinning agents |
257
+ | `budget` | Enforces step/session limits |
258
+ | `scope` | Detects scope creep |
259
+ | `delegation_reminder` | Nudges orchestrator to delegate |
260
+
261
+ Configure in `config.toml`:
262
+
263
+ ```toml
264
+ [watchers]
265
+ enabled = true
266
+ watchers = [
267
+ { name = "progress" },
268
+ { name = "budget", config = { max_steps = 50 } },
269
+ ]
270
+ ```
271
+
272
+ ---
273
+
274
+ ## CLI Reference
275
+
276
+ ```bash
277
+ zwarm init # Initialize .zwarm/ in current directory
278
+ zwarm interactive # Start interactive REPL
279
+ zwarm orchestrate # Start LLM orchestrator
280
+ zwarm exec # Run single executor directly (testing)
281
+ zwarm status # Show current state
282
+ zwarm history # Show event history
283
+ zwarm clean # Remove old sessions
284
+ ```
285
+
286
+ ---
287
+
288
+ ## Project Structure
289
+
290
+ ```
291
+ zwarm/
292
+ ├── src/zwarm/
293
+ │ ├── sessions/ # Session management (core)
294
+ │ │ ├── manager.py # CodexSessionManager
295
+ │ │ └── __init__.py
296
+ │ ├── tools/
297
+ │ │ └── delegation.py # Orchestrator tools (delegate, converse, etc.)
298
+ │ ├── cli/
299
+ │ │ └── main.py # CLI commands and interactive REPL
300
+ │ ├── core/
301
+ │ │ ├── config.py # Configuration loading
302
+ │ │ ├── compact.py # Context window management
303
+ │ │ └── state.py # State persistence
304
+ │ ├── watchers/ # Trajectory alignment
305
+ │ └── orchestrator.py # Orchestrator agent
306
+ ├── docs/
307
+ │ └── INTERNALS.md # Technical architecture
308
+ └── README.md
309
+ ```
zwarm-2.3/README.md ADDED
@@ -0,0 +1,297 @@
1
+ # zwarm
2
+
3
+ Multi-agent CLI for orchestrating coding agents. Spawn, manage, and converse with multiple Codex sessions in parallel.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ # From the workspace
9
+ cd /path/to/labs
10
+ uv sync
11
+
12
+ # Or install directly
13
+ uv pip install -e ./zwarm
14
+ ```
15
+
16
+ **Requirements:**
17
+ - Python 3.13+
18
+ - `codex` CLI installed and authenticated
19
+
20
+ **Environment:**
21
+ ```bash
22
+ export OPENAI_API_KEY="sk-..." # Required for Codex
23
+ export WEAVE_PROJECT="entity/zwarm" # Optional: Weave tracing
24
+ ```
25
+
26
+ ## Two Modes
27
+
28
+ zwarm has two ways to orchestrate coding agents:
29
+
30
+ | Mode | Who's in charge | Use case |
31
+ |------|-----------------|----------|
32
+ | `zwarm interactive` | **You** | Manual control, experimentation |
33
+ | `zwarm orchestrate` | **LLM** | Autonomous task execution |
34
+
35
+ Both use the **same underlying session manager** - the orchestrator LLM has access to the exact same tools you do.
36
+
37
+ ---
38
+
39
+ ## Interactive Mode
40
+
41
+ **You are the orchestrator.** Spawn sessions, check on them, continue conversations.
42
+
43
+ ```bash
44
+ zwarm interactive
45
+ ```
46
+
47
+ ### Commands
48
+
49
+ | Command | Description |
50
+ |---------|-------------|
51
+ | `spawn "task"` | Start a session (waits for completion) |
52
+ | `spawn --async "task"` | Start async (returns immediately) |
53
+ | `spawn -d /path "task"` | Start in specific directory |
54
+ | `ls` | List all sessions |
55
+ | `? <id>` | Quick peek: status + latest message |
56
+ | `show <id>` | Full details: all messages, tokens, etc. |
57
+ | `c <id> "msg"` | Continue conversation (waits) |
58
+ | `ca <id> "msg"` | Continue async (returns immediately) |
59
+ | `kill <id>` | Stop a running session |
60
+ | `rm <id>` | Delete session entirely |
61
+ | `killall` | Stop all running sessions |
62
+ | `clean` | Remove sessions older than 7 days |
63
+ | `q` | Quit |
64
+
65
+ ### Example Session
66
+
67
+ ```
68
+ $ zwarm interactive
69
+
70
+ > spawn "Add a login function to auth.py"
71
+ ✓ Started session a1b2c3d4, waiting...
72
+ [a1b2c3d4] codex (completed) - 32s
73
+ Response: I've added a login function with JWT support...
74
+
75
+ > spawn --async "Fix the type errors in utils.py"
76
+ ✓ Session: b2c3d4e5 (running in background)
77
+
78
+ > spawn --async "Add unit tests for auth.py"
79
+ ✓ Session: c3d4e5f6 (running in background)
80
+
81
+ > ls
82
+ 1 running | 2 done
83
+
84
+ ID │ │ T │ Task │ Updated │ Last Message
85
+ a1b2c3d4 │ ✓ │ 1 │ Add a login function... │ 2m │ I've added a login function...
86
+ b2c3d4e5 │ ✓ │ 1 │ Fix the type errors... │ 30s ★ │ Fixed 3 type errors in...
87
+ c3d4e5f6 │ ● │ 1 │ Add unit tests... │ 5s │ (working...)
88
+
89
+ > ? b2c3d4e5
90
+ ✓ b2c3d4e5 Fixed 3 type errors: Optional[str] -> str | None, added missing...
91
+
92
+ > c a1b2c3d4 "Now add password hashing with bcrypt"
93
+ Continuing session a1b2c3d4...
94
+ [a1b2c3d4] codex (completed) - 28s
95
+ Response: Done! I've updated the login function to use bcrypt...
96
+
97
+ > rm b2c3d4e5
98
+ ✓ Deleted session b2c3d4e5
99
+
100
+ > q
101
+ ```
102
+
103
+ ### Session Status Icons
104
+
105
+ | Icon | Status |
106
+ |------|--------|
107
+ | `●` | Running |
108
+ | `✓` | Completed |
109
+ | `✗` | Failed |
110
+ | `○` | Killed |
111
+ | `★` | Recently completed (< 60s) |
112
+
113
+ ---
114
+
115
+ ## Orchestrate Mode
116
+
117
+ **An LLM is the orchestrator.** Give it a task and it delegates to coding agents.
118
+
119
+ ```bash
120
+ zwarm orchestrate --task "Build a REST API with authentication"
121
+ ```
122
+
123
+ The orchestrator LLM uses the same tools available in interactive mode:
124
+
125
+ | Tool | Description |
126
+ |------|-------------|
127
+ | `delegate(task, ...)` | Start a new session |
128
+ | `converse(id, msg)` | Continue a conversation |
129
+ | `peek_session(id)` | Quick status check |
130
+ | `check_session(id)` | Full session details |
131
+ | `list_sessions()` | List all sessions with `needs_attention` flags |
132
+ | `end_session(id, delete=False)` | Kill/delete a session |
133
+
134
+ ### Task Input
135
+
136
+ ```bash
137
+ # Direct
138
+ zwarm orchestrate --task "Build a REST API"
139
+
140
+ # From file
141
+ zwarm orchestrate --task-file task.md
142
+
143
+ # From stdin
144
+ echo "Fix the bug in auth.py" | zwarm orchestrate
145
+ ```
146
+
147
+ ---
148
+
149
+ ## Configuration
150
+
151
+ zwarm looks for config in this order:
152
+ 1. `--config` flag
153
+ 2. `.zwarm/config.toml`
154
+ 3. `config.toml` in working directory
155
+
156
+ ### Minimal Config
157
+
158
+ ```toml
159
+ [weave]
160
+ enabled = true
161
+ project = "your-entity/zwarm"
162
+
163
+ [executor]
164
+ adapter = "codex_mcp"
165
+ model = "gpt-5.1-codex-mini"
166
+ ```
167
+
168
+ ### Full Config Reference
169
+
170
+ ```toml
171
+ [orchestrator]
172
+ lm = "gpt-5-mini"
173
+ max_steps = 100
174
+
175
+ [orchestrator.compaction]
176
+ enabled = true
177
+ max_tokens = 100000
178
+ threshold_pct = 0.85
179
+ target_pct = 0.7
180
+
181
+ [executor]
182
+ adapter = "codex_mcp"
183
+ model = "gpt-5.1-codex-mini"
184
+ sandbox = "workspace-write"
185
+ timeout = 300
186
+
187
+ [weave]
188
+ enabled = true
189
+ project = "your-entity/zwarm"
190
+
191
+ [watchers]
192
+ enabled = true
193
+ watchers = [
194
+ { name = "progress" },
195
+ { name = "budget", config = { max_steps = 50, max_sessions = 10 } },
196
+ { name = "delegation_reminder", config = { threshold = 10 } },
197
+ ]
198
+ ```
199
+
200
+ ---
201
+
202
+ ## Session Management
203
+
204
+ Sessions are the core abstraction. Each session is a conversation with a Codex agent.
205
+
206
+ ### Lifecycle
207
+
208
+ ```
209
+ spawn → running → completed/failed
210
+
211
+ continue → running → completed
212
+
213
+ continue → ...
214
+ ```
215
+
216
+ ### Storage
217
+
218
+ ```
219
+ .zwarm/sessions/<uuid>/
220
+ ├── meta.json # Status, task, model, messages, tokens
221
+ └── turns/
222
+ ├── turn_1.jsonl # Raw codex output for turn 1
223
+ ├── turn_2.jsonl # Output after first continue
224
+ └── ...
225
+ ```
226
+
227
+ ### Sync vs Async
228
+
229
+ | Mode | Spawn | Continue | Use case |
230
+ |------|-------|----------|----------|
231
+ | **Sync** | `spawn "task"` | `c id "msg"` | Sequential work, immediate feedback |
232
+ | **Async** | `spawn --async "task"` | `ca id "msg"` | Parallel work, batch processing |
233
+
234
+ Async sessions return immediately. Poll with `ls` or `?` to check status.
235
+
236
+ ---
237
+
238
+ ## Watchers
239
+
240
+ Watchers monitor agent behavior and intervene when needed.
241
+
242
+ | Watcher | Purpose |
243
+ |---------|---------|
244
+ | `progress` | Detects stuck/spinning agents |
245
+ | `budget` | Enforces step/session limits |
246
+ | `scope` | Detects scope creep |
247
+ | `delegation_reminder` | Nudges orchestrator to delegate |
248
+
249
+ Configure in `config.toml`:
250
+
251
+ ```toml
252
+ [watchers]
253
+ enabled = true
254
+ watchers = [
255
+ { name = "progress" },
256
+ { name = "budget", config = { max_steps = 50 } },
257
+ ]
258
+ ```
259
+
260
+ ---
261
+
262
+ ## CLI Reference
263
+
264
+ ```bash
265
+ zwarm init # Initialize .zwarm/ in current directory
266
+ zwarm interactive # Start interactive REPL
267
+ zwarm orchestrate # Start LLM orchestrator
268
+ zwarm exec # Run single executor directly (testing)
269
+ zwarm status # Show current state
270
+ zwarm history # Show event history
271
+ zwarm clean # Remove old sessions
272
+ ```
273
+
274
+ ---
275
+
276
+ ## Project Structure
277
+
278
+ ```
279
+ zwarm/
280
+ ├── src/zwarm/
281
+ │ ├── sessions/ # Session management (core)
282
+ │ │ ├── manager.py # CodexSessionManager
283
+ │ │ └── __init__.py
284
+ │ ├── tools/
285
+ │ │ └── delegation.py # Orchestrator tools (delegate, converse, etc.)
286
+ │ ├── cli/
287
+ │ │ └── main.py # CLI commands and interactive REPL
288
+ │ ├── core/
289
+ │ │ ├── config.py # Configuration loading
290
+ │ │ ├── compact.py # Context window management
291
+ │ │ └── state.py # State persistence
292
+ │ ├── watchers/ # Trajectory alignment
293
+ │ └── orchestrator.py # Orchestrator agent
294
+ ├── docs/
295
+ │ └── INTERNALS.md # Technical architecture
296
+ └── README.md
297
+ ```
@@ -0,0 +1,42 @@
1
+ [project]
2
+ name = "zwarm"
3
+ version = "2.3"
4
+ description = "Multi-Agent CLI Orchestration Research Platform"
5
+ readme = "README.md"
6
+ requires-python = ">=3.13,<3.14"
7
+ dependencies = [
8
+ "typer>=0.9.0",
9
+ "rich>=13.0.0",
10
+ "python-dotenv>=1.0.0",
11
+ "pyyaml>=6.0",
12
+ "wbal>=0.5.8",
13
+ ]
14
+
15
+ [project.scripts]
16
+ zwarm = "zwarm.cli.main:main"
17
+
18
+ [build-system]
19
+ requires = ["hatchling"]
20
+ build-backend = "hatchling.build"
21
+
22
+ [tool.hatch.build.targets.wheel]
23
+ packages = ["src/zwarm"]
24
+
25
+ [tool.hatch.build.targets.sdist]
26
+ include = [
27
+ "src/zwarm/**/*.py",
28
+ "src/zwarm/**/*.yaml",
29
+ "src/zwarm/**/*.toml",
30
+ ]
31
+
32
+ [tool.pytest.ini_options]
33
+ asyncio_mode = "auto"
34
+ markers = [
35
+ "integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
36
+ ]
37
+
38
+ [dependency-groups]
39
+ dev = [
40
+ "pytest>=8.0.0",
41
+ "pytest-asyncio>=1.3.0",
42
+ ]
@@ -0,0 +1,38 @@
1
+ """
2
+ zwarm: Multi-Agent CLI Orchestration Research Platform
3
+
4
+ A framework for orchestrating multiple CLI coding agents (codex, claude-code, gemini)
5
+ with support for sync (conversational) and async (fire-and-forget) delegation.
6
+ """
7
+
8
+ from zwarm.core.config import ZwarmConfig, load_config
9
+ from zwarm.core.models import (
10
+ ConversationSession,
11
+ Event,
12
+ Message,
13
+ SessionMode,
14
+ SessionStatus,
15
+ Task,
16
+ TaskStatus,
17
+ )
18
+ from zwarm.core.state import StateManager
19
+ from zwarm.orchestrator import Orchestrator, build_orchestrator
20
+
21
+ __all__ = [
22
+ # Config
23
+ "ZwarmConfig",
24
+ "load_config",
25
+ # Models
26
+ "ConversationSession",
27
+ "Event",
28
+ "Message",
29
+ "SessionMode",
30
+ "SessionStatus",
31
+ "Task",
32
+ "TaskStatus",
33
+ # State
34
+ "StateManager",
35
+ # Orchestrator
36
+ "Orchestrator",
37
+ "build_orchestrator",
38
+ ]