loki-mode 11.36.0 → 11.36.2
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/SKILL.md +2 -2
- package/VERSION +1 -1
- package/dashboard/__init__.py +1 -1
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/COMPONENTS.md +2 -2
- package/docs/INSTALLATION.md +1 -1
- package/docs/ISSUE-TO-PR-GOLDEN-PATH-PLAN.md +2 -2
- package/docs/dev/project-structure.md +0 -1
- package/loki-ts/dist/loki.js +2 -2
- package/mcp/__init__.py +1 -1
- package/package.json +2 -2
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/references/agent-types.md +1047 -0
- package/skills/agents.md +1 -1
- package/skills/production.md +602 -1
- package/skills/providers.md +256 -1
- package/web-app/dist/assets/{AdminPage-D73t1zi7.js → AdminPage-VMdXCL6Z.js} +1 -1
- package/web-app/dist/assets/{Avatar-Pgu94LDs.js → Avatar-u2uOGouZ.js} +1 -1
- package/web-app/dist/assets/{Badge-B2X33p01.js → Badge-Djyiy-OK.js} +1 -1
- package/web-app/dist/assets/{Button-BaRCk5ob.js → Button-DtzBRjJb.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-Du1NIwsO.js → CockpitPage-B5Q3cIfS.js} +1 -1
- package/web-app/dist/assets/{ComparePage-CVLjwYcX.js → ComparePage-D26OOxGe.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-C6umXLhq.js → ErrorBoundary-gQ0ajPif.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-BVOwvWB9.js → EvidenceReceiptPanel-BoWDPbo6.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-CgKnhO5u.js → GitHubIssuesPanel-C4gdFuJu.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-PRvPjrr2.js → GitHubPRsPanel-Gb37Pfw2.js} +1 -1
- package/web-app/dist/assets/{HomePage-DcZri4TP.js → HomePage-C2XTx12e.js} +2 -2
- package/web-app/dist/assets/{LoginPage-_4Ao0Rez.js → LoginPage-Bpmi4ohR.js} +1 -1
- package/web-app/dist/assets/{MagicPage-BbJc2ZOg.js → MagicPage-B5nvAWDT.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-CeZVEo69.js → MetricsPage-TcUUhxGR.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-g8x8mIY4.js → NotFoundPage-feaH_MlW.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-DJa1I91a.js → ProjectPage-DctsQGNj.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-DNLPtJay.js → ProjectsPage-DQQ-t6go.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-BlpOmTtJ.js → SettingsPage-BSgKRreC.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-CHJyHYEN.js → ShowcasePage-DfPu21Jh.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-0ZnQejCy.js → SystemSettingsPage-h9_O9kOO.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-FdJfcD1C.js → TeamsPage-C7DTUuMO.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-CaPsg6RE.js → TemplatesPage-Bi37a0cj.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-BBf53veh.js → TerminalOutput-DQzYlXby.js} +1 -1
- package/web-app/dist/assets/{activity-BZZBaTk4.js → activity-DLAeEmKf.js} +1 -1
- package/web-app/dist/assets/{bell-CEbh5wcI.js → bell-DgRtSLvd.js} +1 -1
- package/web-app/dist/assets/{bot-CR3ELz3P.js → bot-C2m7OeqV.js} +1 -1
- package/web-app/dist/assets/{check-CSZ8Imm9.js → check-BrBcDclF.js} +1 -1
- package/web-app/dist/assets/{chevron-left-DanE2Hss.js → chevron-left-C9VzYegT.js} +1 -1
- package/web-app/dist/assets/{circle-alert-DbJb8YuD.js → circle-alert-BCmS5TEl.js} +1 -1
- package/web-app/dist/assets/{clock-BP8uTe0w.js → clock-BNvzvy9h.js} +1 -1
- package/web-app/dist/assets/{cloud-L-gsOd6z.js → cloud-B9RC-OzI.js} +1 -1
- package/web-app/dist/assets/{code-xml-Y_EN8uAF.js → code-xml-Dq5h9Y4x.js} +1 -1
- package/web-app/dist/assets/{database-Dk3IyOhB.js → database-BZM5e6dN.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-u1BAuVVd.js → dollar-sign-CG2hFMYV.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-Cx4c5ngU.js → file-code-corner-CbkPzEr1.js} +1 -1
- package/web-app/dist/assets/{file-plus-ZttsmeuR.js → file-plus-DLIPXn2k.js} +1 -1
- package/web-app/dist/assets/{globe-B4wt_UbY.js → globe-7kPrJ_Vy.js} +1 -1
- package/web-app/dist/assets/{hammer-Bkkzme0X.js → hammer-ZsTmZCz4.js} +1 -1
- package/web-app/dist/assets/{index-qFl2U4PP.js → index-BJfP9ylx.js} +3 -3
- package/web-app/dist/assets/{layers-uK6Y9vzW.js → layers-DT-7ulEf.js} +1 -1
- package/web-app/dist/assets/{loader-circle-CSEhSCyJ.js → loader-circle-B4HgIJl7.js} +1 -1
- package/web-app/dist/assets/{lock-Cl8vENNw.js → lock-CcK3qv3U.js} +1 -1
- package/web-app/dist/assets/{package-B4KdlkGK.js → package-D7j5jIRE.js} +1 -1
- package/web-app/dist/assets/{plus-Cx7wCatc.js → plus-D61O8i_1.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-Ba8y00l0.js → refresh-cw-BwKxbGei.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-Dj_tGfar.js → rotate-ccw-BFsHb_Do.js} +1 -1
- package/web-app/dist/assets/{scroll-text-DKp4aaqK.js → scroll-text-BHIKikTn.js} +1 -1
- package/web-app/dist/assets/{server-DHSSF41S.js → server-DbucCXky.js} +1 -1
- package/web-app/dist/assets/{shield-alert-3z9YnSzz.js → shield-alert-CfPhky3w.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-BA2y9kYN.js → thumbs-up-CyQoJXN3.js} +1 -1
- package/web-app/dist/assets/{trash-2-0RcWshkw.js → trash-2-DTmFWzg7.js} +1 -1
- package/web-app/dist/assets/{trending-down-BdhmG8vV.js → trending-down-CS5Oqc6g.js} +1 -1
- package/web-app/dist/assets/{trending-up-Cn6kNnmP.js → trending-up-CmBBN4R9.js} +1 -1
- package/web-app/dist/assets/{upload-DFOQfmyN.js → upload-DGePZkS3.js} +1 -1
- package/web-app/dist/assets/{usePolling-40ulE-Te.js → usePolling-DEPQP4xT.js} +1 -1
- package/web-app/dist/assets/{user-BVPC2VOO.js → user-Bogh2WEE.js} +1 -1
- package/web-app/dist/index.html +1 -1
- package/references/agents.md +0 -1043
- package/references/multi-provider.md +0 -445
- package/references/production-patterns.md +0 -574
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
# Multi-Provider Architecture Reference
|
|
2
|
-
|
|
3
|
-
> **Status:** Production | **Provider list and model config verified against source at v9.8.1**
|
|
4
|
-
>
|
|
5
|
-
> Values below are illustrative. `providers/*.sh` is the authority; prefer
|
|
6
|
-
> reading it over trusting a literal copied into this document.
|
|
7
|
-
|
|
8
|
-
Loki Mode supports five AI CLI providers with a unified abstraction layer. This document provides detailed technical reference for the multi-provider system.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Provider Overview
|
|
13
|
-
|
|
14
|
-
Source of truth: `SUPPORTED_PROVIDERS` in `providers/loader.sh:8`.
|
|
15
|
-
|
|
16
|
-
| Provider | CLI | Status | Features |
|
|
17
|
-
|----------|-----|--------|----------|
|
|
18
|
-
| **Claude Code** | `claude` | Full | Subagents, Parallel, Task Tool, MCP |
|
|
19
|
-
| **OpenAI Codex** | `codex` | Degraded | Sequential, Effort Parameter, MCP (basic) |
|
|
20
|
-
| **Cline CLI** | `cline` | Near-Full (Tier 2) | Subagents, MCP, 12+ providers |
|
|
21
|
-
| **Aider** | `aider` | Degraded | Sequential, 18+ providers |
|
|
22
|
-
| **opencode** | `opencode` | Sequential | MCP, 75+ providers, model-agnostic |
|
|
23
|
-
|
|
24
|
-
When `LOKI_PROVIDER` is unset, providers auto-detect in priority order:
|
|
25
|
-
`claude > cline > codex > aider > opencode`. An explicit choice always wins and
|
|
26
|
-
is never silently substituted.
|
|
27
|
-
|
|
28
|
-
Gemini was removed as a provider.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Provider Configuration Files
|
|
33
|
-
|
|
34
|
-
Located in `providers/` directory:
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
providers/
|
|
38
|
-
claude.sh # Full-featured provider
|
|
39
|
-
codex.sh # Degraded mode, effort parameter
|
|
40
|
-
cline.sh # Near-full mode, 12+ providers (Tier 2)
|
|
41
|
-
aider.sh # Degraded mode, 18+ providers
|
|
42
|
-
opencode.sh # Sequential, 75+ providers, model-agnostic
|
|
43
|
-
loader.sh # Provider loader utility
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Configuration Variables
|
|
47
|
-
|
|
48
|
-
Each provider config exports these variables:
|
|
49
|
-
|
|
50
|
-
#### Identity Variables
|
|
51
|
-
```bash
|
|
52
|
-
PROVIDER_NAME="claude" # Internal identifier
|
|
53
|
-
PROVIDER_DISPLAY_NAME="Claude Code" # Human-readable name
|
|
54
|
-
PROVIDER_CLI="claude" # CLI binary name
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
#### CLI Invocation Variables
|
|
58
|
-
```bash
|
|
59
|
-
PROVIDER_AUTONOMOUS_FLAG="--dangerously-skip-permissions"
|
|
60
|
-
PROVIDER_PROMPT_FLAG="-p" # Empty for positional prompt
|
|
61
|
-
PROVIDER_PROMPT_POSITIONAL=false # true if prompt is positional arg
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
#### Capability Flags
|
|
65
|
-
```bash
|
|
66
|
-
PROVIDER_HAS_SUBAGENTS=true # Can spawn Task tool subagents
|
|
67
|
-
PROVIDER_HAS_PARALLEL=true # Supports parallel execution
|
|
68
|
-
PROVIDER_HAS_TASK_TOOL=true # Has Task tool for agent spawning
|
|
69
|
-
PROVIDER_HAS_MCP=true # Supports MCP server integration (Codex also has basic MCP)
|
|
70
|
-
PROVIDER_MAX_PARALLEL=10 # Maximum concurrent agents
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
#### Model Configuration
|
|
74
|
-
|
|
75
|
-
Models are NOT hardcoded model IDs. Each tier resolves through env indirection
|
|
76
|
-
to a tier alias (`providers/claude.sh:70-72`):
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
PROVIDER_MODEL_PLANNING="${LOKI_CLAUDE_MODEL_PLANNING:-${LOKI_MODEL_PLANNING:-$CLAUDE_DEFAULT_PLANNING}}"
|
|
80
|
-
PROVIDER_MODEL_DEVELOPMENT="${LOKI_CLAUDE_MODEL_DEVELOPMENT:-${LOKI_MODEL_DEVELOPMENT:-$CLAUDE_DEFAULT_DEVELOPMENT}}"
|
|
81
|
-
PROVIDER_MODEL_FAST="${LOKI_CLAUDE_MODEL_FAST:-${LOKI_MODEL_FAST:-$CLAUDE_DEFAULT_FAST}}"
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Defaults are all `sonnet` (`providers/claude.sh:60-62`). Setting
|
|
85
|
-
`LOKI_ALLOW_HAIKU` flips the fast tier to `haiku` (`providers/claude.sh:66`).
|
|
86
|
-
Do not cite pinned model IDs here; they drift. Read `providers/claude.sh` and
|
|
87
|
-
`providers/model_catalog.json` for current values.
|
|
88
|
-
|
|
89
|
-
#### Rate Limiting
|
|
90
|
-
```bash
|
|
91
|
-
PROVIDER_RATE_LIMIT_RPM=50 # Requests per minute
|
|
92
|
-
PROVIDER_CONTEXT_WINDOW=1000000 # Max context tokens (Opus 4.7: 1M at standard pricing)
|
|
93
|
-
PROVIDER_MAX_OUTPUT_TOKENS=128000
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
`PROVIDER_CONTEXT_WINDOW` also caps code-review size. The review diff and prompt
|
|
97
|
-
limits derive from it (assuming ~3 bytes per token and ~75% of the window for
|
|
98
|
-
input), so a small-window local model is not handed a prompt sized for a 200k
|
|
99
|
-
one. The derived value is only ever used to LOWER a cap, and a window at or above
|
|
100
|
-
roughly 188889 tokens clamps to the historical 400000/425000 byte defaults, so no
|
|
101
|
-
provider shipping today changes behavior (a provider that declares no window
|
|
102
|
-
keeps the defaults as well). `LOKI_REVIEW_MAX_DIFF_BYTES` and
|
|
103
|
-
`LOKI_REVIEW_MAX_PROMPT_BYTES` still override both.
|
|
104
|
-
|
|
105
|
-
#### Degraded Mode
|
|
106
|
-
```bash
|
|
107
|
-
PROVIDER_DEGRADED=false # true for Codex/Aider
|
|
108
|
-
PROVIDER_DEGRADED_REASONS=() # Array of limitation descriptions
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Abstract Model Tiers
|
|
114
|
-
|
|
115
|
-
Loki Mode uses abstract tiers that map to provider-specific configurations:
|
|
116
|
-
|
|
117
|
-
| Abstract Tier | Purpose | Claude | Codex |
|
|
118
|
-
|---------------|---------|--------|-------|
|
|
119
|
-
| `planning` | Architecture, PRD analysis | opus | xhigh effort |
|
|
120
|
-
| `development` | Implementation, tests | sonnet | high effort |
|
|
121
|
-
| `fast` | Simple tasks, docs | haiku | low effort |
|
|
122
|
-
|
|
123
|
-
### Tier Selection by RARV Phase
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
RARV Phase -> Abstract Tier -> Provider-Specific
|
|
127
|
-
-----------------------------------------------------
|
|
128
|
-
REASON -> planning -> opus/xhigh
|
|
129
|
-
ACT -> development -> sonnet/high
|
|
130
|
-
REFLECT -> development -> sonnet/high
|
|
131
|
-
VERIFY -> fast -> haiku/low
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Provider Loader API
|
|
137
|
-
|
|
138
|
-
### Functions
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
# Load a provider configuration
|
|
142
|
-
load_provider "claude" # Returns 0 on success, 1 on failure
|
|
143
|
-
|
|
144
|
-
# Check if provider is valid
|
|
145
|
-
validate_provider "codex" # Returns 0 if valid
|
|
146
|
-
|
|
147
|
-
# Check if provider CLI is installed
|
|
148
|
-
check_provider_installed "cline" # Returns 0 if installed
|
|
149
|
-
|
|
150
|
-
# Auto-detect first available provider
|
|
151
|
-
auto_detect_provider # Echoes provider name or returns 1
|
|
152
|
-
|
|
153
|
-
# Print provider info
|
|
154
|
-
print_provider_info # Displays loaded provider details
|
|
155
|
-
|
|
156
|
-
# Print capability matrix
|
|
157
|
-
print_capability_matrix # Shows all providers comparison
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Usage Example
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
source providers/loader.sh
|
|
164
|
-
|
|
165
|
-
# Load specific provider
|
|
166
|
-
if load_provider "codex"; then
|
|
167
|
-
echo "Loaded: $PROVIDER_DISPLAY_NAME"
|
|
168
|
-
echo "CLI: $PROVIDER_CLI"
|
|
169
|
-
echo "Degraded: $PROVIDER_DEGRADED"
|
|
170
|
-
fi
|
|
171
|
-
|
|
172
|
-
# Auto-detect
|
|
173
|
-
if provider=$(auto_detect_provider); then
|
|
174
|
-
load_provider "$provider"
|
|
175
|
-
fi
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## Provider Invocation Functions
|
|
181
|
-
|
|
182
|
-
Each provider exports these functions:
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
# Check if CLI is installed
|
|
186
|
-
provider_detect() # Returns 0 if installed
|
|
187
|
-
|
|
188
|
-
# Get CLI version
|
|
189
|
-
provider_version() # Echoes version string
|
|
190
|
-
|
|
191
|
-
# Invoke with prompt (autonomous mode)
|
|
192
|
-
provider_invoke "Your prompt here"
|
|
193
|
-
|
|
194
|
-
# Invoke with tier-specific configuration
|
|
195
|
-
provider_invoke_with_tier "planning" "Your prompt here"
|
|
196
|
-
|
|
197
|
-
# Get tier parameter value
|
|
198
|
-
provider_get_tier_param "development" # Returns: opus/sonnet/haiku or xhigh/high/low
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
## Degraded Mode Behavior
|
|
204
|
-
|
|
205
|
-
When running with Codex or Aider:
|
|
206
|
-
|
|
207
|
-
1. **RARV Cycle executes sequentially** - No parallel agents
|
|
208
|
-
2. **Task tool calls are skipped** - Main thread handles all work
|
|
209
|
-
3. **Model tier maps to provider configuration:**
|
|
210
|
-
- Codex: `CODEX_MODEL_REASONING_EFFORT` environment variable
|
|
211
|
-
4. **Quality gates run sequentially** - No 3-reviewer parallel review
|
|
212
|
-
5. **Git worktree parallelism disabled** - `--parallel` flag has no effect
|
|
213
|
-
|
|
214
|
-
### Degraded Mode Detection
|
|
215
|
-
|
|
216
|
-
```bash
|
|
217
|
-
if [ "$PROVIDER_DEGRADED" = "true" ]; then
|
|
218
|
-
echo "Running in degraded mode"
|
|
219
|
-
echo "Limitations:"
|
|
220
|
-
for reason in "${PROVIDER_DEGRADED_REASONS[@]}"; do
|
|
221
|
-
echo " - $reason"
|
|
222
|
-
done
|
|
223
|
-
fi
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
---
|
|
227
|
-
|
|
228
|
-
## Rate Limit Detection
|
|
229
|
-
|
|
230
|
-
The rate limiting system is provider-agnostic:
|
|
231
|
-
|
|
232
|
-
### Detection Patterns
|
|
233
|
-
|
|
234
|
-
```bash
|
|
235
|
-
# Generic patterns (all providers)
|
|
236
|
-
- HTTP 429 status code
|
|
237
|
-
- "rate limit" / "rate-limit" / "ratelimit" (case insensitive)
|
|
238
|
-
- "too many requests"
|
|
239
|
-
- "quota exceeded"
|
|
240
|
-
- "request limit"
|
|
241
|
-
- "retry-after" header
|
|
242
|
-
|
|
243
|
-
# Claude-specific
|
|
244
|
-
- "resets Xam/pm" format
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
### Fallback Chain
|
|
248
|
-
|
|
249
|
-
```
|
|
250
|
-
1. Provider-specific parsing (Claude's reset time)
|
|
251
|
-
|
|
|
252
|
-
v (if no result)
|
|
253
|
-
2. Generic Retry-After header parsing
|
|
254
|
-
|
|
|
255
|
-
v (if no result)
|
|
256
|
-
3. Calculated backoff based on PROVIDER_RATE_LIMIT_RPM
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
### Rate Limit Functions
|
|
260
|
-
|
|
261
|
-
```bash
|
|
262
|
-
# Check if output contains rate limit indicators
|
|
263
|
-
is_rate_limited "$log_file" # Returns 0 if rate limited
|
|
264
|
-
|
|
265
|
-
# Get wait time from rate limit response
|
|
266
|
-
detect_rate_limit "$log_file" # Echoes seconds to wait
|
|
267
|
-
|
|
268
|
-
# Parse Retry-After header
|
|
269
|
-
parse_retry_after "$log_file" # Echoes seconds
|
|
270
|
-
|
|
271
|
-
# Calculate default backoff
|
|
272
|
-
calculate_rate_limit_backoff # Uses PROVIDER_RATE_LIMIT_RPM
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
---
|
|
276
|
-
|
|
277
|
-
## CLI Integration
|
|
278
|
-
|
|
279
|
-
### Provider Selection
|
|
280
|
-
|
|
281
|
-
```bash
|
|
282
|
-
# Via CLI flag
|
|
283
|
-
./autonomy/run.sh --provider codex ./prd.md
|
|
284
|
-
loki start --provider cline ./prd.md
|
|
285
|
-
|
|
286
|
-
# Via environment variable
|
|
287
|
-
export LOKI_PROVIDER=codex
|
|
288
|
-
./autonomy/run.sh ./prd.md
|
|
289
|
-
|
|
290
|
-
# Precedence: flag > env > default (claude)
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
### Help Output
|
|
294
|
-
|
|
295
|
-
```
|
|
296
|
-
$ loki start --help
|
|
297
|
-
|
|
298
|
-
Provider Options:
|
|
299
|
-
--provider PROVIDER Select AI provider (claude, codex, cline, aider)
|
|
300
|
-
Default: claude (auto-detect if not installed)
|
|
301
|
-
|
|
302
|
-
Provider Capability Matrix:
|
|
303
|
-
Provider Features Parallel Task Tool MCP
|
|
304
|
-
--------------------------------------------------
|
|
305
|
-
claude Full Yes (10) Yes Yes
|
|
306
|
-
codex Degraded No No Basic
|
|
307
|
-
cline Near-Full No Yes Yes
|
|
308
|
-
aider Degraded No No No
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
---
|
|
312
|
-
|
|
313
|
-
## Verified CLI Flags
|
|
314
|
-
|
|
315
|
-
All CLI flags have been verified against actual CLI help output:
|
|
316
|
-
|
|
317
|
-
| Provider | Flag | Verified Version | Notes |
|
|
318
|
-
|----------|------|------------------|-------|
|
|
319
|
-
| Claude | `--dangerously-skip-permissions` | v2.1.34 | Autonomous mode |
|
|
320
|
-
| Codex | `--sandbox workspace-write` | v0.132.0 | Recommended (--full-auto deprecated 0.125+); legacy: `exec --dangerously-bypass-approvals-and-sandbox` |
|
|
321
|
-
| Cline | `--auto-approve` | latest | Autonomous mode |
|
|
322
|
-
| Aider | `--yes-always` | latest | Autonomous mode |
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
|
-
## Test Coverage
|
|
327
|
-
|
|
328
|
-
The multi-provider system has 180 tests across 5 test suites:
|
|
329
|
-
|
|
330
|
-
| Test Suite | Tests | Coverage |
|
|
331
|
-
|------------|-------|----------|
|
|
332
|
-
| `test-provider-loader.sh` | 12 | Provider loading, validation |
|
|
333
|
-
| `test-provider-invocation.sh` | 24 | Invoke functions, tier params |
|
|
334
|
-
| `test-provider-degraded-mode.sh` | 19 | Degraded flags, capabilities |
|
|
335
|
-
| `test-cli-provider-flag.sh` | 39 | CLI flag parsing, precedence |
|
|
336
|
-
| `test-rate-limiting.sh` | 27 | Rate limit detection, backoff |
|
|
337
|
-
|
|
338
|
-
Run tests:
|
|
339
|
-
```bash
|
|
340
|
-
for test in tests/test-provider-*.sh tests/test-cli-provider-flag.sh tests/test-rate-limiting.sh; do
|
|
341
|
-
bash "$test"
|
|
342
|
-
done
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
---
|
|
346
|
-
|
|
347
|
-
## Adding New Providers
|
|
348
|
-
|
|
349
|
-
To add a new provider:
|
|
350
|
-
|
|
351
|
-
1. Create `providers/<name>.sh` with all required variables
|
|
352
|
-
2. Implement the four provider functions:
|
|
353
|
-
- `provider_detect()`
|
|
354
|
-
- `provider_version()`
|
|
355
|
-
- `provider_invoke()`
|
|
356
|
-
- `provider_invoke_with_tier()`
|
|
357
|
-
- `provider_get_tier_param()`
|
|
358
|
-
3. Add to `SUPPORTED_PROVIDERS` array in `loader.sh`
|
|
359
|
-
4. Update `validate_provider()` regex
|
|
360
|
-
5. Add provider case in `run.sh` invocation switch
|
|
361
|
-
6. Add tests for new provider
|
|
362
|
-
|
|
363
|
-
### Provider Template
|
|
364
|
-
|
|
365
|
-
```bash
|
|
366
|
-
#!/bin/bash
|
|
367
|
-
# <Provider Name> CLI Provider Configuration
|
|
368
|
-
|
|
369
|
-
# Provider Identity
|
|
370
|
-
PROVIDER_NAME="<name>"
|
|
371
|
-
PROVIDER_DISPLAY_NAME="<Display Name>"
|
|
372
|
-
PROVIDER_CLI="<cli-binary>"
|
|
373
|
-
|
|
374
|
-
# CLI Invocation
|
|
375
|
-
PROVIDER_AUTONOMOUS_FLAG="<autonomous-flag>"
|
|
376
|
-
PROVIDER_PROMPT_FLAG="" # or "-p" etc
|
|
377
|
-
PROVIDER_PROMPT_POSITIONAL=true
|
|
378
|
-
|
|
379
|
-
# Capability Flags
|
|
380
|
-
PROVIDER_HAS_SUBAGENTS=false
|
|
381
|
-
PROVIDER_HAS_PARALLEL=false
|
|
382
|
-
PROVIDER_HAS_TASK_TOOL=false
|
|
383
|
-
PROVIDER_HAS_MCP=false
|
|
384
|
-
PROVIDER_MAX_PARALLEL=1
|
|
385
|
-
|
|
386
|
-
# Model Configuration
|
|
387
|
-
PROVIDER_MODEL_PLANNING="<model>"
|
|
388
|
-
PROVIDER_MODEL_DEVELOPMENT="<model>"
|
|
389
|
-
PROVIDER_MODEL_FAST="<model>"
|
|
390
|
-
|
|
391
|
-
# Context and Limits
|
|
392
|
-
PROVIDER_CONTEXT_WINDOW=128000
|
|
393
|
-
PROVIDER_MAX_OUTPUT_TOKENS=32000
|
|
394
|
-
PROVIDER_RATE_LIMIT_RPM=60
|
|
395
|
-
|
|
396
|
-
# Degraded Mode
|
|
397
|
-
PROVIDER_DEGRADED=true
|
|
398
|
-
PROVIDER_DEGRADED_REASONS=(
|
|
399
|
-
"Reason 1"
|
|
400
|
-
"Reason 2"
|
|
401
|
-
)
|
|
402
|
-
|
|
403
|
-
# Provider Functions
|
|
404
|
-
provider_detect() {
|
|
405
|
-
command -v <cli-binary> >/dev/null 2>&1
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
provider_version() {
|
|
409
|
-
<cli-binary> --version 2>/dev/null | head -1
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
provider_invoke() {
|
|
413
|
-
local prompt="$1"
|
|
414
|
-
shift
|
|
415
|
-
<cli-binary> <autonomous-flag> "$prompt" "$@"
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
provider_get_tier_param() {
|
|
419
|
-
local tier="$1"
|
|
420
|
-
case "$tier" in
|
|
421
|
-
planning) echo "<planning-param>" ;;
|
|
422
|
-
development) echo "<dev-param>" ;;
|
|
423
|
-
fast) echo "<fast-param>" ;;
|
|
424
|
-
*) echo "<default-param>" ;;
|
|
425
|
-
esac
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
provider_invoke_with_tier() {
|
|
429
|
-
local tier="$1"
|
|
430
|
-
local prompt="$2"
|
|
431
|
-
shift 2
|
|
432
|
-
local param=$(provider_get_tier_param "$tier")
|
|
433
|
-
# Provider-specific tier invocation
|
|
434
|
-
<cli-binary> <autonomous-flag> "$prompt" "$@"
|
|
435
|
-
}
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
---
|
|
439
|
-
|
|
440
|
-
## Related Documentation
|
|
441
|
-
|
|
442
|
-
- `skills/providers.md` - User-facing provider guide
|
|
443
|
-
- `skills/model-selection.md` - Model tier selection patterns
|
|
444
|
-
- `references/core-workflow.md` - RARV cycle documentation
|
|
445
|
-
- `docs/INSTALLATION.md` - Installation instructions per provider
|