llm-party-cli 0.7.1 → 0.10.1

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 CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  <br/>
19
19
 
20
- A peer orchestrator that puts **Claude**, **Codex**, **Copilot**, and **GLM** in the same terminal. You talk, they listen. They talk to each other. Nobody is the boss except you.
20
+ A peer orchestrator that puts **Claude**, **Codex**, **Copilot**, and any Claude-compatible API (GLM, Ollama, etc.) in the same terminal. You talk, they listen. They talk to each other. Nobody is the boss except you.
21
21
 
22
22
  ```
23
23
  YOU > @claude review this function
@@ -40,8 +40,9 @@ No MCP. No master/servant. No window juggling. Just peers at a terminal table.
40
40
  | ---------------------- | ------------------------------ | -------------------------------------- |
41
41
  | **Architecture** | MCP (master controls servants) | Peer orchestration (you control all) |
42
42
  | **Integration** | CLI wrapping, output scraping | Direct SDK adapters |
43
- | **Sessions** | Fresh each time | Persistent per provider |
43
+ | **Sessions** | Fresh each time | Persistent per provider, resumable |
44
44
  | **Context** | Agents are siloed | Every agent sees the full conversation |
45
+ | **Concurrency** | Sequential or blocked | Non-blocking per-agent queues |
45
46
  | **API tokens** | Separate keys per tool | Uses your existing CLI auth |
46
47
 
47
48
  <br/>
@@ -121,6 +122,10 @@ That's it. No paths, no prompts, no usernames to configure. Just name, tag, prov
121
122
 
122
123
  Agents can pass the conversation to each other by ending their response with `@next:<tag>`. The orchestrator picks it up and dispatches automatically. Max 15 hops per cycle to prevent loops.
123
124
 
125
+ ### Non-blocking queue
126
+
127
+ You can type while agents are working. Each agent has its own queue. If an agent is busy when a new message arrives, the message is queued and processed when the agent finishes. No blocking, no waiting for slow agents to finish before fast ones can respond.
128
+
124
129
  ## **WARNING: FULL AUTONOMY.**
125
130
 
126
131
  All agents run with full permissions. They can read, write, edit files and execute shell commands with zero approval gates. There is no confirmation step before any action. Run in a disposable environment. You are responsible for any changes, data loss, costs, or side effects. Do not run against production systems.
@@ -145,18 +150,31 @@ llm-party uses **official, publicly available SDKs and CLIs** published by each
145
150
  | Codex | [`@openai/codex-sdk`](https://www.npmjs.com/package/@openai/codex-sdk) | OpenAI |
146
151
  | Copilot | [`@github/copilot-sdk`](https://www.npmjs.com/package/@github/copilot-sdk) | GitHub |
147
152
 
153
+ Custom providers (GLM, Ollama, etc.) route through a native CLI's SDK with environment overrides. No additional SDKs are required.
154
+
148
155
  All authentication flows through the provider's own CLI. llm-party does not implement its own auth flow, store credentials, or intercept authentication traffic.
149
156
 
150
157
  <br/>
151
158
 
152
159
  ## Supported providers
153
160
 
161
+ ### Native providers (detected automatically)
162
+
154
163
  | Provider | SDK | Session | Prompt Support |
155
164
  | ----------------- | ---------------------------------- | -------------------------------------- | -------------------------------------------------- |
156
165
  | **Claude** | `@anthropic-ai/claude-agent-sdk` | Persistent via session ID resume | Full control |
157
166
  | **Codex** | `@openai/codex-sdk` | Persistent thread with `run()` turns | Via `developer_instructions` (limitations below) |
158
- | **Copilot** | `@github/copilot-sdk` | Persistent via `sendAndWait()` | Full control |
159
- | **GLM** | Claude SDK + env proxy | Same as Claude | Full control |
167
+ | **Copilot** | `@github/copilot-sdk` | Persistent via session ID resume | Full control |
168
+
169
+ ### Custom providers (config-driven)
170
+
171
+ Any AI that exposes a Claude-compatible API can be added as a custom provider. Custom providers route through a native CLI (currently Claude) with environment overrides.
172
+
173
+ | Provider | API | Notes |
174
+ | ----------------- | ---------------------------------- | -------------------------------------------------- |
175
+ | **GLM** | Zhipu AI (`api.z.ai`) | Full Claude SDK compatibility via proxy |
176
+ | **Ollama** | Local (`localhost:11434`) | Any model Ollama supports |
177
+ | **Any** | Any Claude-compatible endpoint | Just set `AUTH_URL` and `AUTH_TOKEN` |
160
178
 
161
179
  <br/>
162
180
 
@@ -173,19 +191,23 @@ Terminal (you)
173
191
  |
174
192
  v
175
193
  Orchestrator
194
+ |
195
+ +-- Agent Queue Manager (per-agent queues, non-blocking dispatch)
176
196
  |
177
197
  +-- Agent Registry
178
198
  | +-- Claude -> ClaudeAdapter (SDK session, resume by ID)
179
- | +-- Codex -> CodexAdapter (SDK thread, persistent turns)
180
- | +-- Copilot -> CopilotAdapter (SDK session, sendAndWait)
181
- | +-- GLM -> GlmAdapter (Claude SDK + env proxy)
199
+ | +-- Codex -> CodexAdapter (SDK thread, resumeThread by ID)
200
+ | +-- Copilot -> CopilotAdapter (SDK session, resumeSession by ID)
201
+ | +-- Custom -> CustomAdapter (routes through native CLI + env override)
182
202
  |
183
203
  +-- Conversation Log (ordered, all messages, agent-prefixed)
184
204
  |
185
205
  +-- Transcript Writer (JSONL, append-only, per session)
206
+ |
207
+ +-- Session Manifest (per-agent cursors + SDK session IDs, for resume)
186
208
  ```
187
209
 
188
- Each agent receives a rolling window of recent messages (configurable, default 16) plus any unseen messages since its last turn. Messages from other agents are included so everyone sees the full multi-party conversation.
210
+ Each agent has its own processing queue. When you send a message, idle agents start immediately while busy agents queue it. You can keep typing while agents work. Each agent receives only unseen messages since its last turn, so no duplicate processing on resume or during concurrent dispatch.
189
211
 
190
212
  `~/.llm-party/config.json` is your global config. Every agent receives a base system prompt automatically. The `prompts` field in config adds extra prompt files on top of it.
191
213
 
@@ -207,7 +229,7 @@ Each agent receives a rolling window of recent messages (configurable, default 1
207
229
  | | |
208
230
  | ------- | ---------------------------------------------------------------------------------------------------------------- |
209
231
  | SDK | `@openai/codex-sdk` |
210
- | Session | Persistent thread.`startThread()` creates it, `thread.run()` adds turns to the same conversation. |
232
+ | Session | Persistent thread. `startThread()` creates it, `resumeThread()` restores it. `thread.run()` adds turns. |
211
233
  | Prompt | Injected via `developer_instructions` config key. Appended alongside Codex's built-in 13k token system prompt. |
212
234
  | Tools | exec_command, apply_patch, file operations |
213
235
 
@@ -218,20 +240,20 @@ Each agent receives a rolling window of recent messages (configurable, default 1
218
240
  | | |
219
241
  | ------- | ----------------------------------------------------------- |
220
242
  | SDK | `@github/copilot-sdk` |
221
- | Session | Persistent via `CopilotClient.createSession()`. |
243
+ | Session | Persistent via `createSession()` with session ID. Resumable via `resumeSession()`. |
222
244
  | Prompt | Set as `systemMessage` on session creation. Full control. |
223
245
  | Tools | Copilot built-in toolset |
224
246
 
225
- ### GLM
247
+ ### Custom (GLM, Ollama, etc.)
226
248
 
227
- | | |
228
- | ------- | --------------------------------------------------------- |
229
- | SDK | `@anthropic-ai/claude-agent-sdk` (same as Claude) |
230
- | Session | Same as Claude, routed through a proxy via env overrides. |
231
- | Prompt | Same as Claude. Full control. |
232
- | Tools | Same as Claude |
249
+ | | |
250
+ | ------- | -------------------------------------------------------------------------------- |
251
+ | SDK | Uses the native CLI's SDK (currently Claude's `@anthropic-ai/claude-agent-sdk`) |
252
+ | Session | Same as the underlying CLI |
253
+ | Prompt | Same as the underlying CLI. Full control. |
254
+ | Tools | Same as the underlying CLI |
233
255
 
234
- GLM uses the Claude SDK as a transport layer. The adapter routes API calls through a proxy by setting `ANTHROPIC_BASE_URL` and model aliases via the `env` config field.
256
+ Custom providers route API calls through a native CLI by overriding `AUTH_URL` and `AUTH_TOKEN` in the agent's `env` block. The `cli` field selects which native CLI to use (defaults to `claude`).
235
257
 
236
258
  <br/>
237
259
 
@@ -247,7 +269,7 @@ Override with `LLM_PARTY_CONFIG` env var to point to a different file.
247
269
  | --------------- | -------- | -------------------------- | ---------------------------------------------------------------------------- |
248
270
  | `humanName` | No | Your system username | Display name in the terminal prompt and passed to agents |
249
271
  | `humanTag` | No | derived from `humanName` | Tag for human handoff detection (`@next:you`) |
250
- | `maxAutoHops` | No | `15` | Max agent-to-agent handoffs per cycle. Use `"unlimited"` to remove the cap |
272
+ | `maxAutoHops` | No | `15` | Max agent-to-agent handoffs per cycle. `0` = unlimited |
251
273
  | `timeout` | No | `600` | Default timeout in seconds for all agents |
252
274
  | `agents` | Yes | | Array of agent definitions |
253
275
 
@@ -257,7 +279,9 @@ Override with `LLM_PARTY_CONFIG` env var to point to a different file.
257
279
  | ------------------ | -------- | ------------------------ | --------------------------------------------------------------------------------------------------- |
258
280
  | `name` | Yes | | Display name shown in responses as `[AGENT NAME]`. Must be unique. |
259
281
  | `tag` | Yes | | Routing tag for `@tag` targeting. Letters, numbers, hyphens, underscores only. No spaces. |
260
- | `provider` | Yes | | SDK adapter:`claude`, `codex`, `copilot`, or `glm` |
282
+ | `provider` | Yes | | SDK adapter: `claude`, `codex`, `copilot`, or `custom` |
283
+ | `cli` | No | `"claude"` | For custom providers: which native CLI to route through |
284
+ | `active` | No | `true` | Set to `false` to disable an agent without removing its config |
261
285
  | `model` | Yes | | Model ID passed to the provider. Examples:`opus`, `sonnet`, `gpt-5.2`, `gpt-4.1`, `glm-5` |
262
286
  | `prompts` | No | none | Array of extra prompt file paths, concatenated after `base.md`. Relative to project root |
263
287
  | `executablePath` | No | PATH lookup | Path to the CLI binary. Supports `~/`. Only needed if the CLI is not in your PATH |
@@ -294,25 +318,42 @@ Template variables available in prompt files:
294
318
  | `{{validHandoffTargets}}` | Valid `@next:tag` targets |
295
319
  | `{{preloadedSkills}}` | Skills assigned to this agent via `preloadSkills` |
296
320
 
297
- ### GLM environment setup
321
+ ### Custom provider setup
322
+
323
+ Custom providers use `AUTH_URL` and `AUTH_TOKEN` in the `env` block. The adapter maps these to the correct environment variables for the underlying CLI.
298
324
 
299
- GLM requires environment overrides to route through a proxy. The adapter tries to load env variables from your shell `glm` alias automatically. Without the alias, provide everything in the `env` block:
325
+ **GLM (Zhipu AI):**
300
326
 
301
327
  ```json
302
328
  {
303
329
  "name": "GLM",
304
- "provider": "glm",
330
+ "provider": "custom",
331
+ "cli": "claude",
305
332
  "model": "glm-5",
306
333
  "env": {
307
- "ANTHROPIC_AUTH_TOKEN": "your-glm-api-key",
308
- "ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
309
- "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air",
310
- "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.5",
311
- "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5"
334
+ "AUTH_URL": "https://api.z.ai/api/anthropic",
335
+ "AUTH_TOKEN": "your-glm-api-key"
312
336
  }
313
337
  }
314
338
  ```
315
339
 
340
+ **Ollama (local):**
341
+
342
+ ```json
343
+ {
344
+ "name": "Ollama",
345
+ "provider": "custom",
346
+ "cli": "claude",
347
+ "model": "llama3",
348
+ "env": {
349
+ "AUTH_URL": "http://localhost:11434/v1",
350
+ "AUTH_TOKEN": "ollama"
351
+ }
352
+ }
353
+ ```
354
+
355
+ Any endpoint that speaks the Anthropic API protocol works. Set `AUTH_URL` to the base URL and `AUTH_TOKEN` to the API key.
356
+
316
357
  <br/>
317
358
 
318
359
  ## Skills
@@ -353,6 +394,26 @@ Every run generates a unique session ID and appends messages to a JSONL transcri
353
394
 
354
395
  File changes made by agents are detected via `git status` after each response. Newly modified files are printed with timestamps.
355
396
 
397
+ ### Resume a session
398
+
399
+ Pick up where you left off by passing the session ID:
400
+
401
+ ```bash
402
+ llm-party --resume 20260402-102915-74722-ba956b96
403
+ ```
404
+
405
+ Or use the `/resume` command as your first input in a fresh session:
406
+
407
+ ```
408
+ /resume 20260402-102915-74722-ba956b96
409
+ ```
410
+
411
+ The session ID is shown at startup or via `/session`. Resume loads the full transcript, restores per-agent SDK sessions (Claude session IDs, Codex thread IDs, Copilot session IDs), and tracks which messages each agent has already seen. Agents pick up exactly where they left off with no duplicate processing.
412
+
413
+ A `.manifest.json` file alongside each transcript stores the session state: agent cursors, SDK session IDs, sticky targets. This is what makes cross-provider resume possible.
414
+
415
+ Resume only works before the first message is sent. Once a conversation has started, resuming another session into it is not allowed.
416
+
356
417
  <br/>
357
418
 
358
419
  ## Terminal commands
@@ -364,6 +425,7 @@ File changes made by agents are detected via `git status` after each response. N
364
425
  | `/info` | Commands and keyboard shortcuts panel |
365
426
  | `/save <path>` | Export conversation as JSON |
366
427
  | `/session` | Show session ID and transcript path |
428
+ | `/resume <id>` | Resume a previous session (first message only) |
367
429
  | `/changes` | Show git-modified files |
368
430
  | `/clear` | Clear chat display (Ctrl+L also works) |
369
431
  | `/exit` | Quit (graceful shutdown, all adapters cleaned up) |
@@ -409,7 +471,7 @@ LLM_PARTY_CONFIG=/path/to/config.json bun run dev
409
471
  Run `/agents` to see available tags. Tags match against agent `tag`, `name`, and `provider`.
410
472
 
411
473
  **"Unsupported provider"**
412
- Valid providers: `claude`, `codex`, `copilot`, `glm`.
474
+ Valid providers: `claude`, `codex`, `copilot`, `custom`.
413
475
 
414
476
  **"Duplicate agent name"**
415
477
  Agent names must be unique (case-insensitive). Rename one of the duplicates in config.