@emaxe/agento 0.1.2 → 0.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.
Files changed (46) hide show
  1. package/AGENTS.md +340 -0
  2. package/CHANGELOG.md +102 -0
  3. package/README.md +152 -30
  4. package/README.ru.md +427 -0
  5. package/dist/src/adapters/base.d.ts +3 -1
  6. package/dist/src/adapters/base.d.ts.map +1 -1
  7. package/dist/src/adapters/claude-code.d.ts +1 -0
  8. package/dist/src/adapters/claude-code.d.ts.map +1 -1
  9. package/dist/src/adapters/claude-code.js +5 -2
  10. package/dist/src/adapters/claude-code.js.map +1 -1
  11. package/dist/src/adapters/codex.d.ts +1 -0
  12. package/dist/src/adapters/codex.d.ts.map +1 -1
  13. package/dist/src/adapters/codex.js +3 -1
  14. package/dist/src/adapters/codex.js.map +1 -1
  15. package/dist/src/adapters/opencode.d.ts +1 -0
  16. package/dist/src/adapters/opencode.d.ts.map +1 -1
  17. package/dist/src/adapters/opencode.js +30 -1
  18. package/dist/src/adapters/opencode.js.map +1 -1
  19. package/dist/src/adapters/qwen.d.ts +1 -0
  20. package/dist/src/adapters/qwen.d.ts.map +1 -1
  21. package/dist/src/adapters/qwen.js +9 -4
  22. package/dist/src/adapters/qwen.js.map +1 -1
  23. package/dist/src/cli/commands/launch.d.ts.map +1 -1
  24. package/dist/src/cli/commands/launch.js +13 -0
  25. package/dist/src/cli/commands/launch.js.map +1 -1
  26. package/dist/src/cli/commands/provider.d.ts.map +1 -1
  27. package/dist/src/cli/commands/provider.js +7 -3
  28. package/dist/src/cli/commands/provider.js.map +1 -1
  29. package/dist/src/config/schema.d.ts +176 -29
  30. package/dist/src/config/schema.d.ts.map +1 -1
  31. package/dist/src/config/schema.js +17 -2
  32. package/dist/src/config/schema.js.map +1 -1
  33. package/dist/src/config/store.d.ts.map +1 -1
  34. package/dist/src/config/store.js +25 -1
  35. package/dist/src/config/store.js.map +1 -1
  36. package/dist/src/tui/screens/LaunchAgent.d.ts.map +1 -1
  37. package/dist/src/tui/screens/LaunchAgent.js +21 -4
  38. package/dist/src/tui/screens/LaunchAgent.js.map +1 -1
  39. package/dist/src/tui/screens/MainMenu.js +1 -1
  40. package/dist/src/tui/screens/Profiles.d.ts.map +1 -1
  41. package/dist/src/tui/screens/Profiles.js +5 -4
  42. package/dist/src/tui/screens/Profiles.js.map +1 -1
  43. package/dist/src/tui/screens/Providers.d.ts.map +1 -1
  44. package/dist/src/tui/screens/Providers.js +40 -20
  45. package/dist/src/tui/screens/Providers.js.map +1 -1
  46. package/package.json +4 -2
package/README.md CHANGED
@@ -7,14 +7,16 @@
7
7
 
8
8
  AgentO is a CLI tool that centralizes configuration management for popular AI coding agents. Define your API providers once, create profiles with different model combinations, and switch between them with a single command.
9
9
 
10
+ **Русская версия:** [README.ru.md](README.ru.md)
11
+
10
12
  ## Supported Agents
11
13
 
12
- | Agent | Command | Config Format | Special Features |
13
- |-------|---------|---------------|------------------|
14
- | [Claude Code](https://github.com/anthropics/claude-code) | `claude` | JSON | Multi-tier support (small/base/smart) |
15
- | [OpenCode](https://github.com/opencode-ai/opencode) | `opencode` | JSON | Custom provider prefix |
16
- | [Qwen CLI](https://github.com/QwenLM/qwen) | `qwen` | JSON | OpenAI-compatible providers |
17
- | [Codex CLI](https://github.com/openai/codex) | `codex` | TOML | Environment variable injection. Hidden by default (`--dev` to show). |
14
+ | Agent | Command | Config Format | Supported Providers | Special Features |
15
+ |-------|---------|---------------|---|------------------|
16
+ | [Claude Code](https://github.com/anthropics/claude-code) | `claude` | JSON | `anthropic`, `fireworks` | Multi-tier support (small/base/smart) |
17
+ | [OpenCode](https://github.com/opencode-ai/opencode) | `opencode` | JSON | `anthropic`, `openai-compatible`, `fireworks` | Full function calling support via Vercel AI SDK |
18
+ | [Qwen CLI](https://github.com/QwenLM/qwen) | `qwen` | JSON | `openai-compatible`, `fireworks` | OpenAI-compatible API structure |
19
+ | [Codex CLI](https://github.com/openai/codex) | `codex` | TOML | All types | Environment variable injection. Hidden by default (`--dev` to show). |
18
20
 
19
21
  ## Installation
20
22
 
@@ -36,25 +38,63 @@ npx @emaxe/agento
36
38
  - Node.js ≥ 18
37
39
  - One or more supported AI agent CLI tools installed
38
40
 
41
+ ## Supported Provider Types
42
+
43
+ | Provider Type | Compatible Agents | Examples |
44
+ |---|---|---|
45
+ | `anthropic` | claude-code | Anthropic |
46
+ | `openai-compatible` | opencode, qwen | OpenAI, Together.ai, Cerebras, Perplexity, DeepSeek, etc. |
47
+ | `fireworks` | claude-code, opencode, qwen, codex | Fireworks AI (supports all 3 API types) |
48
+
49
+ **Note:** `claude-code` only works with `anthropic` and `fireworks` types (Anthropic SDK requirement). Use `opencode` or `qwen` for other OpenAI-compatible providers.
50
+
51
+ ## Model Capability Flags
52
+
53
+ Every model in a provider carries three capability flags that describe which modalities it supports:
54
+
55
+ - **`image`** — model can process image inputs
56
+ - **`video`** — model can process video inputs
57
+ - **`audio`** — model can process audio inputs
58
+
59
+ Defaults when adding a model: `image=true`, `video=false`, `audio=false`.
60
+
61
+ **Marker format:** in the TUI and `agento provider list`, capabilities render as `[iva]` (all on), `[i--]` (image only), `[---]` (text only), etc. The marker is informational and is **never** written into the launched agent's config.
62
+
63
+ **Why it matters:**
64
+ - **Qwen** receives `generationConfig.modalities` derived from these flags (previously hardcoded to `false` — images didn't work).
65
+ - **OpenCode** emits per-model `modalities: { input: ["text", "image", ...], output: ["text"] }` so the agent knows what the model accepts.
66
+ - **Claude Code** and **Codex** ignore these flags today (Anthropic SDK and Codex `responses` API don't expose modality config).
67
+
68
+ **Toggling capabilities:** open the TUI → Providers → Edit, navigate to a model row, press `i` / `v` / `a` to toggle each flag. Add new models via the `[+ add model]` row (Enter). The CLI `provider add -M ...` creates models with default capabilities.
69
+
70
+ > Existing configs from older versions (with `string[]` models) are auto-migrated on first read with default capabilities.
71
+
39
72
  ## Quick Start
40
73
 
41
- ### 1. Add an API Provider
74
+ ### 1. Add API Providers
42
75
 
43
76
  ```bash
44
- # OpenAI-compatible provider (e.g., Fireworks AI)
45
- agento provider add \
46
- -n "Fireworks AI" \
47
- -t openai-compatible \
48
- -k "sk-your-api-key" \
49
- -u "https://api.fireworks.ai/inference/v1" \
50
- -M "accounts/fireworks/models/llama-v3p1-70b-instruct,accounts/fireworks/models/kimi-k2p6"
51
-
52
77
  # Anthropic provider
53
78
  agento provider add \
54
79
  -n "Anthropic" \
55
80
  -t anthropic \
56
81
  -k "sk-ant-your-key" \
57
82
  -M "claude-sonnet-4-20250514,claude-3-5-haiku-20241022"
83
+
84
+ # Fireworks AI provider (works with all agents)
85
+ agento provider add \
86
+ -n "Fireworks" \
87
+ -t fireworks \
88
+ -k "fw-your-key" \
89
+ -M "accounts/fireworks/models/llama-v3p1-70b-instruct,accounts/fireworks/models/kimi-k2p6"
90
+
91
+ # Other OpenAI-compatible providers (use with opencode or qwen)
92
+ agento provider add \
93
+ -n "Together" \
94
+ -t openai-compatible \
95
+ -k "your-api-key" \
96
+ -u "https://api.together.xyz/v1" \
97
+ -M "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo"
58
98
  ```
59
99
 
60
100
  ### 2. Create a Profile
@@ -73,9 +113,12 @@ agento profile add -n "multi" -m "provider-id:claude-3-5-haiku-20241022:small,pr
73
113
  # Interactive TUI mode (default)
74
114
  agento
75
115
 
76
- # Direct launch
116
+ # Direct launch with Anthropic/Fireworks provider
77
117
  agento launch -p default -a claude-code
78
118
 
119
+ # Launch with OpenAI-compatible provider (use opencode or qwen)
120
+ agento launch -p openai-profile -a opencode
121
+
79
122
  # Launch with specific mode and scope
80
123
  agento launch -p default -a qwen -m child -s project
81
124
  ```
@@ -87,7 +130,7 @@ Running `agento` without arguments launches an interactive Terminal User Interfa
87
130
  ### Main Menu
88
131
 
89
132
  ```
90
- ┌────────── AgentO v0.1.1 ──────────┐
133
+ ┌────────── AgentO v0.2.0 ──────────┐
91
134
  │ │
92
135
  │ ▶ Launch Agent │
93
136
  │ Providers │
@@ -105,7 +148,7 @@ Running `agento` without arguments launches an interactive Terminal User Interfa
105
148
  | Screen | What You Can Do | Key Shortcuts |
106
149
  |--------|----------------|---------------|
107
150
  | **Launch Agent** | Select profile → select agent → choose mode/scope → launch | **Enter** select, **Esc** back |
108
- | **Providers** | View, add, edit, delete API providers | **Enter** details, **a** add, **e** edit, **d** delete, **Esc** back |
151
+ | **Providers** | View, add, edit, delete API providers; toggle model capabilities | **Enter** details / add model, **a** add provider, **e** edit, **d** delete, **i/v/a** toggle capability, **Esc** back |
109
152
  | **Profiles** | View, add, delete profiles. In profile details: add/remove/edit models | **Enter** details, **a** add, **d** delete, **Esc** back |
110
153
  | **Agents** | Check config status (global/project), backup availability | **Enter** details, **Esc** back |
111
154
  | **Settings** | Change default launch mode, default config scope, independent mode | **↑↓** change, **Enter** toggle, **Esc** save & back |
@@ -133,11 +176,13 @@ In **independent mode**, AgentO exits immediately and leaves the patched config
133
176
 
134
177
  Manage your API providers without memorizing CLI flags:
135
178
 
136
- - **View** all providers with their type, models count, and base URL
179
+ - **View** all providers with their type, models, capability markers, and base URL
137
180
  - **Add** a new provider with guided prompts (name, type, API key, models, base URL)
138
- - **Edit** existing provider details
181
+ - **Edit** existing provider details — including per-model capability flags (`i`/`v`/`a` toggles)
139
182
  - **Delete** providers you no longer need
140
183
 
184
+ In edit view, models render as `▶ [i--] model-name`. Press `i` / `v` / `a` while a model row is highlighted to toggle image / video / audio capabilities. Use the `[+ add model]` row (Enter) to append models, `d` to delete, `e` to rename.
185
+
141
186
  ### Profiles Screen
142
187
 
143
188
  Organize your model configurations:
@@ -178,6 +223,19 @@ Configure defaults for AgentO behavior:
178
223
 
179
224
  Use **TUI** for exploration and interactive workflows. Use **CLI** for scripting, aliases, and quick launches.
180
225
 
226
+ ## Provider & Agent Compatibility Matrix
227
+
228
+ | Provider Type | claude-code | opencode | qwen | codex |
229
+ |---|---|---|---|---|
230
+ | **anthropic** | ✅ Full support | ✅ (via SDK) | ❌ Not supported | ✅ (via Responses API) |
231
+ | **openai-compatible** | ❌ Not supported | ✅ Full support | ✅ Full support | ✅ (via Responses API) |
232
+ | **fireworks** | ✅ (Anthropic API) | ✅ (OpenAI API) | ✅ (OpenAI API) | ✅ (Responses API) |
233
+
234
+ **Key Constraints:**
235
+ - `claude-code` uses **Anthropic SDK** and only works with `anthropic` or `fireworks` types
236
+ - Other OpenAI-compatible providers must use `opencode` or `qwen` agents
237
+ - `fireworks` type is the most flexible — works with all agents through native Fireworks APIs
238
+
181
239
  ## CLI Reference
182
240
 
183
241
  ### `agento` — Main Command
@@ -218,13 +276,18 @@ Options:
218
276
  agento provider list # List all providers
219
277
  agento provider add [options] # Add a new provider
220
278
  -n, --name <name> Provider display name (required)
221
- -t, --type <type> Provider type: openai-compatible or anthropic (required)
279
+ -t, --type <type> Provider type: anthropic, openai-compatible, or fireworks (required)
222
280
  -k, --api-key <key> API key (required)
223
- -u, --base-url <url> Base URL (for openai-compatible)
281
+ -u, --base-url <url> Base URL (required for openai-compatible, optional for others)
224
282
  -M, --models <models> Comma-separated list of model names (required)
225
283
  agento provider remove <name> # Remove a provider
226
284
  ```
227
285
 
286
+ **Base URL Defaults:**
287
+ - `anthropic`: Uses Anthropic's default endpoint
288
+ - `fireworks`: Auto-defaults to `https://api.fireworks.ai/inference` if not specified
289
+ - `openai-compatible`: Must be explicitly provided with `-u`
290
+
228
291
  ### `agento profile` — Manage Profiles
229
292
 
230
293
  ```bash
@@ -263,11 +326,32 @@ AgentO stores its configuration in `~/.agento/config.json`:
263
326
  "providers": [
264
327
  {
265
328
  "id": "uuid",
266
- "name": "Fireworks AI",
329
+ "name": "Anthropic",
330
+ "type": "anthropic",
331
+ "apiKey": "sk-ant-...",
332
+ "models": [
333
+ { "name": "claude-opus-4-20250514", "capabilities": { "image": true, "video": false, "audio": false } },
334
+ { "name": "claude-sonnet-4-20250514", "capabilities": { "image": true, "video": false, "audio": false } }
335
+ ]
336
+ },
337
+ {
338
+ "id": "uuid",
339
+ "name": "Fireworks",
340
+ "type": "fireworks",
341
+ "apiKey": "fw-...",
342
+ "models": [
343
+ { "name": "accounts/fireworks/models/llama-v3p1-70b-instruct", "capabilities": { "image": false, "video": false, "audio": false } }
344
+ ]
345
+ },
346
+ {
347
+ "id": "uuid",
348
+ "name": "Together",
267
349
  "type": "openai-compatible",
268
- "apiKey": "sk-...",
269
- "baseUrl": "https://api.fireworks.ai/inference/v1",
270
- "models": ["accounts/fireworks/models/llama-v3p1-70b-instruct"]
350
+ "apiKey": "your-api-key",
351
+ "baseUrl": "https://api.together.xyz/v1",
352
+ "models": [
353
+ { "name": "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo", "capabilities": { "image": false, "video": false, "audio": false } }
354
+ ]
271
355
  }
272
356
  ],
273
357
  "profiles": [
@@ -291,16 +375,23 @@ AgentO stores its configuration in `~/.agento/config.json`:
291
375
  }
292
376
  ```
293
377
 
378
+ > Configs created with AgentO < 0.2.0 use bare `string[]` for `models`. They are migrated automatically on read; capabilities default to `{ image: true, video: false, audio: false }` and can be adjusted in the TUI.
379
+
294
380
  ## How It Works
295
381
 
296
382
  ### Agent Adapters
297
383
 
298
384
  Each supported agent has a dedicated adapter that translates AgentO's generic config format into the agent's specific configuration:
299
385
 
300
- - **Claude Code**: Generates `~/.claude/settings.json` with tier-based model selection
301
- - **OpenCode**: Generates `~/.config/opencode/config.json` with provider-prefixed model names
302
- - **Qwen CLI**: Generates `~/.qwen/settings.json` with OpenAI-compatible provider structure
303
- - **Codex CLI** (`--dev` to show): Generates `~/.codex/config.toml` with `wire_api: responses`, profiles, and environment variable references. In project scope, splits config between global (`model_providers`) and project (`model`) configs.
386
+ - **Claude Code** (supports `anthropic`, `fireworks`): Generates `~/.claude/settings.json` with tier-based model selection and ANTHROPIC_* env vars. Uses Anthropic SDK.
387
+ - ⚠️ **Does NOT support** `openai-compatible` providers (Anthropic SDK incompatibility)
388
+ - Capability flags are not propagated (Anthropic SDK doesn't expose modality config)
389
+
390
+ - **OpenCode** (supports `anthropic`, `openai-compatible`, `fireworks`): Generates `~/.config/opencode/config.json` using Vercel AI SDK with provider-prefixed model names. Full function calling support via `@ai-sdk/openai-compatible`. Emits per-model `modalities: { input: [...], output: ["text"] }` derived from capability flags.
391
+
392
+ - **Qwen CLI** (supports `openai-compatible`, `fireworks`): Generates `~/.qwen/settings.json` with OpenAI-compatible provider structure. Requires `baseUrl` for all providers. Auto-defaults for `fireworks` type. Passes capability flags via `generationConfig.modalities`.
393
+
394
+ - **Codex CLI** (`--dev` to show): Generates `~/.codex/config.toml` with `wire_api: responses`, profiles, and environment variable references. In project scope, splits config between global (`model_providers`) and project (`model`) configs. Supports all provider types. Capability flags are not propagated (Codex `responses` API has no modality config).
304
395
 
305
396
  ### Backup & Restore
306
397
 
@@ -345,6 +436,37 @@ src/
345
436
  └── tui/ # Terminal UI (Ink + React)
346
437
  ```
347
438
 
439
+ ## Limitations & Known Issues
440
+
441
+ ### Claude Code with OpenAI-Compatible Providers
442
+
443
+ **Problem:** Claude Code only works with Anthropic API due to hard dependency on Anthropic SDK.
444
+
445
+ **Solution:** Use `opencode` or `qwen` agents instead:
446
+ ```bash
447
+ # ❌ This won't work:
448
+ agento launch -p myprofile -a claude-code # (if profile uses openai-compatible provider)
449
+
450
+ # ✅ Use OpenCode instead:
451
+ agento launch -p myprofile -a opencode
452
+ ```
453
+
454
+ ### Qwen CLI with Missing Base URL
455
+
456
+ **Problem:** Qwen requires `baseUrl` for all providers. Using `anthropic` type without URL will error.
457
+
458
+ **Solution:** Always provide `-u` for Qwen with non-standard providers, or use `fireworks` type which auto-defaults.
459
+
460
+ ### Codex CLI Hidden by Default
461
+
462
+ **Problem:** Codex is a development agent and hidden in TUI/CLI by default.
463
+
464
+ **Solution:** Add `--dev` flag to show it:
465
+ ```bash
466
+ agento --dev # TUI with Codex
467
+ agento launch -a codex --dev # CLI with Codex
468
+ ```
469
+
348
470
  ## Troubleshooting
349
471
 
350
472
  ### Changes in `src/` not applied