loki-mode 11.120.0 → 11.121.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 (182) hide show
  1. package/.github/actions/issue-to-pr/action.yml +1 -1
  2. package/README.md +3 -2
  3. package/SKILL.md +18 -30
  4. package/VERSION +1 -1
  5. package/agents/custom_agents.py +1 -1
  6. package/api/openapi.yaml +3 -7
  7. package/api/routes/health.ts +5 -10
  8. package/api/routes/sessions.ts +12 -3
  9. package/api/server.js +6 -2
  10. package/api/services/cli-bridge.ts +1 -1
  11. package/api/types/api.ts +3 -5
  12. package/assets/welcome/welcome.html +1 -1
  13. package/autonomy/completion-council.sh +3 -56
  14. package/autonomy/context-tracker.py +10 -25
  15. package/autonomy/council-v2.sh +0 -28
  16. package/autonomy/grill.sh +3 -25
  17. package/autonomy/lib/chat.sh +3 -6
  18. package/autonomy/lib/claude-flags.sh +1 -1
  19. package/autonomy/lib/contract-scaffold/README.md +2 -2
  20. package/autonomy/lib/cost-summary.py +2 -2
  21. package/autonomy/lib/done-recognition.sh +1 -1
  22. package/autonomy/lib/efficiency_cost.py +1 -1
  23. package/autonomy/lib/effort_estimator.py +0 -4
  24. package/autonomy/lib/help-core.sh +6 -4
  25. package/autonomy/lib/iteration_attribution.py +1 -1
  26. package/autonomy/lib/mcp-config.sh +7 -34
  27. package/autonomy/lib/os_sandbox.py +2 -5
  28. package/autonomy/lib/outcome_ledger.py +1 -1
  29. package/autonomy/lib/project-graph.sh +1 -1
  30. package/autonomy/lib/proof-generator.py +1 -2
  31. package/autonomy/lib/scaffold-hook.sh +3 -7
  32. package/autonomy/lib/setup-requirements.json +1 -4
  33. package/autonomy/lib/skill-link-heal.sh +1 -1
  34. package/autonomy/lib/telemetry-schema.json +3 -3
  35. package/autonomy/lib/wiki_llm.py +1 -4
  36. package/autonomy/loki +95 -336
  37. package/autonomy/migration-agents.sh +1 -1
  38. package/autonomy/notification-checker.py +2 -2
  39. package/autonomy/prd-checklist.sh +1 -1
  40. package/autonomy/provider-offer.sh +7 -11
  41. package/autonomy/quickstart.sh +3 -11
  42. package/autonomy/route.sh +6 -6
  43. package/autonomy/run.sh +79 -348
  44. package/autonomy/sandbox.sh +8 -39
  45. package/autonomy/setup-wizard.sh +5 -5
  46. package/bin/loki +34 -25
  47. package/completions/_loki +4 -4
  48. package/completions/loki.bash +2 -4
  49. package/dashboard/__init__.py +1 -1
  50. package/dashboard/api_start.py +36 -6
  51. package/dashboard/api_v2.py +1 -1
  52. package/dashboard/build_supervisor.py +1 -5
  53. package/dashboard/server.py +18 -26
  54. package/docs/ARCHITECTURE.md +13 -14
  55. package/docs/CLI-REFERENCE.md +1 -1
  56. package/docs/COMPARE-OPENCODE.md +7 -6
  57. package/docs/COMPONENTS.md +6 -11
  58. package/docs/DOCKER.md +11 -10
  59. package/docs/INSTALLATION.md +5 -8
  60. package/docs/OPEN-CORE-BOUNDARY.md +1 -1
  61. package/docs/PRIVACY.md +2 -2
  62. package/docs/QUICKSTART.md +2 -2
  63. package/docs/TOOLS.md +3 -3
  64. package/docs/air-gapped.md +3 -3
  65. package/docs/alternative-installations.md +20 -10
  66. package/docs/cost-controls.md +0 -3
  67. package/docs/dev/architecture-reference.md +9 -13
  68. package/docs/dev/project-structure.md +1 -4
  69. package/docs/environment-variables.md +8 -10
  70. package/docs/exit-codes.md +5 -5
  71. package/docs/network-security.md +3 -6
  72. package/docs/v10/GUIDE.md +45 -34
  73. package/integrations/openclaw/README.md +1 -1
  74. package/integrations/openclaw/SKILL.md +3 -3
  75. package/learning/emit.sh +1 -1
  76. package/loki-ts/data/child-env.json +0 -10
  77. package/loki-ts/data/finding-schema.json +2 -2
  78. package/loki-ts/dist/cockpit.js +1 -1
  79. package/loki-ts/dist/loki.js +1348 -1354
  80. package/magic/core/debate.py +4 -11
  81. package/magic/core/generator.py +5 -18
  82. package/mcp/__init__.py +1 -1
  83. package/mcp/lsp_proxy.py +3 -3
  84. package/mcp/server.py +1 -1
  85. package/package.json +2 -3
  86. package/packages/control-plane/dist/ask-tools-server.js +1 -3
  87. package/packages/control-plane/dist/server.js +171 -395
  88. package/packages/control-plane/src/ask/invoke.ts +5 -13
  89. package/packages/control-plane/src/ask/parse.ts +3 -25
  90. package/packages/control-plane/src/ask/worker.ts +1 -2
  91. package/packages/control-plane/src/db/fixture-cleanup.ts +1 -1
  92. package/packages/control-plane/src/server/routes/ask.ts +3 -2
  93. package/packages/control-plane/src/server/routes/cost_ledger.ts +0 -1
  94. package/packages/control-plane/src/server/routes/providers.ts +4 -9
  95. package/packages/control-plane/src/server/spawn.ts +8 -4
  96. package/packages/control-plane/ui/dist/assets/{index-C4nb1aRV.js → index-Dy80VLtj.js} +22 -22
  97. package/packages/control-plane/ui/dist/index.html +1 -1
  98. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  99. package/providers/loader.sh +23 -4
  100. package/providers/model_catalog.json +2 -104
  101. package/providers/models.sh +10 -11
  102. package/providers/opencode.sh +3 -6
  103. package/references/quality-control.md +1 -1
  104. package/schemas/loki-yaml.schema.json +1 -1
  105. package/skills/model-selection.md +27 -56
  106. package/skills/providers.md +54 -221
  107. package/skills/quality-gates.md +11 -41
  108. package/skills/testing.md +1 -1
  109. package/skills/troubleshooting.md +1 -2
  110. package/src/integrations/github/action-handler.js +2 -4
  111. package/src/protocols/tools/start-project.js +1 -1
  112. package/tools/calibration-audit.py +1 -1
  113. package/tools/index-codebase.py +1 -2
  114. package/tools/preflight.sh +2 -2
  115. package/tools/probe-model-catalog.py +1 -13
  116. package/tools/regen-state-machine-refs.py +1 -2
  117. package/tools/token-guard.py +1 -1
  118. package/web-app/dist/assets/{AdminPage-D1_vz1LQ.js → AdminPage-BfxkhFXl.js} +1 -1
  119. package/web-app/dist/assets/{Avatar-BefQj_9m.js → Avatar-xV4rK0ps.js} +1 -1
  120. package/web-app/dist/assets/{Badge-BcAowN-N.js → Badge-Ds_E82Ka.js} +1 -1
  121. package/web-app/dist/assets/{Button-BeVwFkYh.js → Button-BXAwY0ni.js} +1 -1
  122. package/web-app/dist/assets/{CockpitPage-Q-sO8Psm.js → CockpitPage-y3R9sk_M.js} +1 -1
  123. package/web-app/dist/assets/ComparePage-BGbCno4C.js +1 -0
  124. package/web-app/dist/assets/{ErrorBoundary-DdIh2DlF.js → ErrorBoundary-DGqkzHdy.js} +1 -1
  125. package/web-app/dist/assets/{EvidenceReceiptPanel-cf2Jhgl3.js → EvidenceReceiptPanel-Bj57TWoJ.js} +1 -1
  126. package/web-app/dist/assets/{GitHubIssuesPanel-SfgkosoM.js → GitHubIssuesPanel-CVbtUCRI.js} +1 -1
  127. package/web-app/dist/assets/{GitHubPRsPanel-DsUqn99r.js → GitHubPRsPanel-DuNxI0k8.js} +1 -1
  128. package/web-app/dist/assets/{HomePage-C6PCzqqg.js → HomePage-DogFuRvt.js} +2 -2
  129. package/web-app/dist/assets/{LoginPage-Bqci5QVa.js → LoginPage-U-r-YNKC.js} +1 -1
  130. package/web-app/dist/assets/{MagicPage-NO5PIrOb.js → MagicPage-C5iDqK4d.js} +1 -1
  131. package/web-app/dist/assets/{MetricsPage-B0oveHbr.js → MetricsPage-COVYOGfr.js} +1 -1
  132. package/web-app/dist/assets/{NotFoundPage-CDh2DiQC.js → NotFoundPage-CZii6Z0s.js} +1 -1
  133. package/web-app/dist/assets/{ProjectPage-CrJ_t9m_.js → ProjectPage-QwOZzVqj.js} +25 -25
  134. package/web-app/dist/assets/{ProjectsPage-UPhA-lpV.js → ProjectsPage-BcxVfXVW.js} +1 -1
  135. package/web-app/dist/assets/SettingsPage-CBY9JiAE.js +10 -0
  136. package/web-app/dist/assets/{ShowcasePage-sZmG4qo4.js → ShowcasePage-D1YPQOp7.js} +1 -1
  137. package/web-app/dist/assets/SystemSettingsPage-DcpAC9Lg.js +1 -0
  138. package/web-app/dist/assets/{TeamsPage-DFuLa1I9.js → TeamsPage-BTiJPkD4.js} +1 -1
  139. package/web-app/dist/assets/{TemplatesPage-C_U8lRMD.js → TemplatesPage-LUa3bH-A.js} +1 -1
  140. package/web-app/dist/assets/{TerminalOutput-DdU-3V0-.js → TerminalOutput-BM8LH-RG.js} +1 -1
  141. package/web-app/dist/assets/{activity-BwXV9-sA.js → activity-mZHuLoR5.js} +1 -1
  142. package/web-app/dist/assets/{bell-DF148FeB.js → bell-BR_y_nMB.js} +1 -1
  143. package/web-app/dist/assets/{bot-BM1t71_O.js → bot-Ct3caGMX.js} +1 -1
  144. package/web-app/dist/assets/{check-DHJPb450.js → check-DuQpq9PN.js} +1 -1
  145. package/web-app/dist/assets/{chevron-left-DZIgwXb6.js → chevron-left-CWSfVWba.js} +1 -1
  146. package/web-app/dist/assets/{circle-alert-31lHNmy0.js → circle-alert-C7TCj9Jm.js} +1 -1
  147. package/web-app/dist/assets/{clock-D4QAxoCy.js → clock-BFsj3bRT.js} +1 -1
  148. package/web-app/dist/assets/{cloud-Dd2iypzJ.js → cloud-78sYPXff.js} +1 -1
  149. package/web-app/dist/assets/{code-xml-CnUOPwx8.js → code-xml-DuwBCDz-.js} +1 -1
  150. package/web-app/dist/assets/{database-Dhpbplpo.js → database-CwRTYKVV.js} +1 -1
  151. package/web-app/dist/assets/{dollar-sign-DCt7L7Pk.js → dollar-sign-COXAsjgd.js} +1 -1
  152. package/web-app/dist/assets/{file-code-corner-D2SPiEH7.js → file-code-corner-A8LPVBBy.js} +1 -1
  153. package/web-app/dist/assets/{file-plus-cCrpp-pe.js → file-plus-D9IXE7YW.js} +1 -1
  154. package/web-app/dist/assets/{globe-Cn6TYK_z.js → globe-Ce6xgdLR.js} +1 -1
  155. package/web-app/dist/assets/{hammer-sMLkpUw2.js → hammer-Dtq836Al.js} +1 -1
  156. package/web-app/dist/assets/{index-Dgb8Kves.js → index-uce16-nn.js} +16 -16
  157. package/web-app/dist/assets/{layers-DuPguIVU.js → layers-BOQdqOXk.js} +1 -1
  158. package/web-app/dist/assets/{loader-circle-BBhsXs18.js → loader-circle-D3y4SHAn.js} +1 -1
  159. package/web-app/dist/assets/{lock-n-qJvU_o.js → lock-miFONHLo.js} +1 -1
  160. package/web-app/dist/assets/{package-cDxKfjAD.js → package-ckZFIHTG.js} +1 -1
  161. package/web-app/dist/assets/{plus-COk5sQxp.js → plus-COJKSbOp.js} +1 -1
  162. package/web-app/dist/assets/{refresh-cw--VKVhvpo.js → refresh-cw-rPt-Oa4a.js} +1 -1
  163. package/web-app/dist/assets/{rotate-ccw-DvZ6KExW.js → rotate-ccw-Dy50K31A.js} +1 -1
  164. package/web-app/dist/assets/{scroll-text-HRyHuQUy.js → scroll-text-CbczPkkS.js} +1 -1
  165. package/web-app/dist/assets/{server-CoZSZtid.js → server-HkfTEf2O.js} +1 -1
  166. package/web-app/dist/assets/{shield-alert--WkXdHlN.js → shield-alert-DjKF0yba.js} +1 -1
  167. package/web-app/dist/assets/{thumbs-up-YeW2Lb8g.js → thumbs-up-aObjUDQm.js} +1 -1
  168. package/web-app/dist/assets/{trash-2-DuhNrOPo.js → trash-2-CQfI6Z-c.js} +1 -1
  169. package/web-app/dist/assets/{trending-down-55EMrZu6.js → trending-down-CP7J5aPV.js} +1 -1
  170. package/web-app/dist/assets/{trending-up-BaUDEQ-n.js → trending-up-CTJHoPnm.js} +1 -1
  171. package/web-app/dist/assets/{upload-BrHq6BXI.js → upload-i1zoXd2k.js} +1 -1
  172. package/web-app/dist/assets/{usePolling-BEtK-_qo.js → usePolling-CZG-IV1Y.js} +1 -1
  173. package/web-app/dist/assets/{user-DL5XlCBR.js → user-CJwbwmPE.js} +1 -1
  174. package/web-app/dist/index.html +1 -1
  175. package/web-app/server.py +26 -14
  176. package/autonomy/lib/codex-usage.py +0 -174
  177. package/providers/aider.sh +0 -191
  178. package/providers/cline.sh +0 -176
  179. package/providers/codex.sh +0 -408
  180. package/web-app/dist/assets/ComparePage-CiJ3FrSl.js +0 -1
  181. package/web-app/dist/assets/SettingsPage-DKO1LhLq.js +0 -10
  182. package/web-app/dist/assets/SystemSettingsPage-Drvx9eXK.js +0 -1
@@ -35,7 +35,7 @@ inputs:
35
35
  required: false
36
36
  default: ''
37
37
  provider:
38
- description: 'AI provider: claude, codex, cline, aider, or opencode'
38
+ description: 'AI provider: claude or opencode'
39
39
  required: false
40
40
  default: 'claude'
41
41
  budget_limit:
package/README.md CHANGED
@@ -123,10 +123,11 @@ Core verbs: [docs/CLI-CORE-VERBS.md](docs/CLI-CORE-VERBS.md). Every command (gen
123
123
 
124
124
  ### Models, providers and local models
125
125
 
126
- Claude Code is the default Tier-1 provider. `--provider codex|cline|aider|opencode` (or `LOKI_PROVIDER`) picks another; on all of them the Loki 10 engine enforces the wall-clock limit and a post-iteration guard scan, and measures cost for codex, cline and aider (parsed from CLI output or estimated, flagged `estimated`) so `--max-cost` applies. For OpenRouter or a local model, set `LOKI_MODEL_ROUTE=<kind>/<id>` (kinds: `openrouter`, `ollama`, `lmstudio`, `llamacpp`, `vllm`, `custom`) before `loki start`; `loki models --local` finds local runtimes and prints ready-to-paste values.
126
+ Two providers are supported. Claude Code is the default Tier-1 provider (the `claude` CLI, or, with only `ANTHROPIC_API_KEY`, the Anthropic Agent SDK). `--provider opencode` (or `LOKI_PROVIDER=opencode`) runs opencode, which reaches any model, including OpenRouter: export `OPENROUTER_API_KEY` and pass `--model openrouter/<vendor>/<model>`; the Loki 10 engine enforces the wall-clock limit and a post-iteration guard scan there. codex, cline, aider and gemini were removed and exit 2 with a one-line migration message. To keep the Claude harness on OpenRouter or a local model, set `LOKI_MODEL_ROUTE=<kind>/<id>` (kinds: `openrouter`, `ollama`, `lmstudio`, `llamacpp`, `vllm`, `custom`) before `loki start`; `loki models --local` finds local runtimes and prints ready-to-paste values.
127
127
 
128
128
  ```bash
129
129
  LOKI_MODEL_ROUTE=ollama/qwen3-coder loki start prd.md
130
+ OPENROUTER_API_KEY=sk-or-... loki start --provider opencode --model openrouter/deepseek/deepseek-v3.2 prd.md
130
131
  ```
131
132
 
132
133
  ## Control Plane
@@ -156,7 +157,7 @@ Optional:
156
157
 
157
158
  - Python 3.8+ (`python3`): deep scans, Python repos and group runs use it. `loki "<goal>"` runs without it.
158
159
  - `jq`: `loki status` and the bash fallback CLI use it.
159
- - Other coding CLIs: Codex, Cline, Aider, opencode (`--provider`). Ollama or an OpenRouter key for model routes.
160
+ - opencode (`--provider opencode`) for any model, including OpenRouter. Ollama or an OpenRouter key for model routes.
160
161
  - Bun 1.3+ (`bun`) on your PATH (the npm package also bundles it).
161
162
  - Docker, to run Loki from the published image.
162
163
 
package/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: loki-mode
3
3
  description: Runs an autonomous software factory that knows what it is supposed to deliver and proves it did, with a signed receipt. Use when the user says Loki Mode or asks to build, fix or verify software autonomously.
4
4
  ---
5
5
 
6
- # Loki Mode v11.120.0
6
+ # Loki Mode v11.121.0
7
7
 
8
8
  **Current entry points (Loki 10 engine):** `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"` run the Loki 10 engine and end with a signed receipt (`loki verify`). `loki backlog owner/repo --all` runs many issues in parallel. Guide: `docs/v10/GUIDE.md`. The skill instructions below, and `loki start`, describe the previous bash loop. PRD-file starts (`loki start ./prd.md`) and the opencode provider still run on it until FC38-SWEEP ports them; the legacy-engine command and the LOKI_ENGINE switch remain removed. Prefer `loki owner/repo#N` for issues.
9
9
 
@@ -15,7 +15,7 @@ description: Runs an autonomous software factory that knows what it is supposed
15
15
 
16
16
  **Evidence Receipt (verify it yourself).** Every run writes a receipt to `.loki/proofs/<run_id>/` (opt out with `LOKI_PROOF=0`) that separates deterministic FACTS (git diff with base/head SHAs and a `diff_sha256`, the test command + exit code, the build command + exit code, each gate verdict) from AI ASSESSMENTS (the council verdict, labeled judgment not proof). The headline is computed only from the facts: VERIFIED (tests ran a real command and exited 0, diff non-empty, nothing skipped), VERIFIED WITH GAPS (each gap listed by name), or NOT VERIFIED (a check ran and failed). Inspect and re-check with `loki proof list|show <id>|verify <id>` (aliased `loki receipt`); `loki proof verify` re-hashes the receipt (tamper) and re-derives the diff from the recorded base SHA against the live repo (drift), exiting 0 clean / 1 tamper-or-drift / 2 could not check (64 usage, 66 unknown id; see `docs/exit-codes.md`). This is honesty-of-done, not a claim that the code is bug-free.
17
17
 
18
- **Provider-agnostic (stable since v5.0.0):** runs on Claude/Codex/Cline/Aider with abstract model tiers and degraded mode for non-Claude providers; no vendor lock-in. Gemini deprecated v7.5.18. See `skills/providers.md`. **Legacy track (v8.0.0):** the Anthropic Agent SDK route (see below), spec-mode expansion for OpenAPI/GraphQL/Postman contracts, the runtime-boot and secret-leak evidence axes, and `loki steer` / `loki why` for mid-run control. Earlier tracks: LSP grounding as a first-class agent tool (v7.7.x) and Phase 1 RARV-C closure (real provider judges, gate-failure flock, synthetic PRD e2e, status `--json`).
18
+ **Providers:** Claude Code (full), the Anthropic Agent SDK path for API-key users (still `--provider claude`), and opencode (any model, including OpenRouter). codex, cline, aider and gemini were removed and exit 2 with a migration line. See `skills/providers.md`. **Legacy track (v8.0.0):** the Anthropic Agent SDK route (see below), spec-mode expansion for OpenAPI/GraphQL/Postman contracts, the runtime-boot and secret-leak evidence axes, and `loki steer` / `loki why` for mid-run control. Earlier tracks: LSP grounding as a first-class agent tool (v7.7.x) and Phase 1 RARV-C closure (real provider judges, gate-failure flock, synthetic PRD e2e, status `--json`).
19
19
 
20
20
  **Runtime migration:** Bash-to-Bun migration. `bin/loki` is the router: the commands in its Bun-route `case` (read-only ones such as `version`, `status`, `stats`, `doctor`, `provider`, `memory`, plus stateful ones such as `rollback`, `trust`, `proof`/`receipt`, `control`, `answer`) run through `loki-ts/src/cli.ts` on Bun; the rest, and some flag forms (for example `doctor --airgap`, `trust detail`), run on Bash (`autonomy/loki`). `start` and `quick` are routed by `autonomy/route.sh` to the Loki 10 engine; the Bash loop runs only on `--engine legacy`. Read `bin/loki` and `cli.ts` for the exact set rather than trusting a list here. Rollback: `LOKI_LEGACY_BASH=1`. See `docs/architecture/ADR-001-runtime-migration.md`.
21
21
 
@@ -113,17 +113,17 @@ These rules guide autonomous operation. Test results and code quality always tak
113
113
 
114
114
  **Default since v5.3.0 (reaffirmed in v7.5.13):** Haiku disabled for quality. Use `--allow-haiku` or `LOKI_ALLOW_HAIKU=true` to enable.
115
115
 
116
- | Task Type | Tier | Claude (default) | Claude (--allow-haiku) | Codex (GPT-5.3) |
117
- |-----------|------|------------------|------------------------|------------------|
118
- | Spec analysis, architecture, system design | **planning** | opus | opus | effort=xhigh |
119
- | Feature implementation, complex bugs | **development** | opus | sonnet | effort=high |
120
- | Code review (planned: 3 parallel reviewers) | **development** | opus | sonnet | effort=high |
121
- | Integration tests, E2E, deployment | **development** | opus | sonnet | effort=high |
122
- | Unit tests, linting, docs, simple fixes | **fast** | sonnet | haiku | effort=low |
116
+ | Task Type | Tier | Claude (default) | Claude (--allow-haiku) |
117
+ |-----------|------|------------------|------------------------|
118
+ | Spec analysis, architecture, system design | **planning** | opus | opus |
119
+ | Feature implementation, complex bugs | **development** | opus | sonnet |
120
+ | Code review (planned: 3 parallel reviewers) | **development** | opus | sonnet |
121
+ | Integration tests, E2E, deployment | **development** | opus | sonnet |
122
+ | Unit tests, linting, docs, simple fixes | **fast** | sonnet | haiku |
123
123
 
124
124
  **Parallelization rule (Claude only):** Launch independent tasks in parallel.
125
125
 
126
- **Degraded mode (Codex/Cline/Aider):** No parallel agents or Task tool. Codex has MCP support. Runs RARV cycle sequentially. See `skills/model-selection.md`.
126
+ **opencode:** one `provider/model` for every tier (`LOKI_OPENCODE_MODEL`), no parallel agents or Task tool, MCP supported. Runs the RARV cycle sequentially. See `skills/model-selection.md`.
127
127
 
128
128
  **Git worktree parallelism:** For true parallel feature development, use `--parallel` flag with run.sh. See `skills/parallel-workflows.md`.
129
129
 
@@ -200,7 +200,7 @@ Pick modules from this table, one hop from here. Each module over 100 lines open
200
200
  | Artifacts, reports | [artifacts.md](skills/artifacts.md) |
201
201
  | Parallel features, git worktrees, 50+ agents | [parallel-workflows.md](skills/parallel-workflows.md) |
202
202
  | GitHub issues, PRs, syncing | [github-integration.md](skills/github-integration.md) |
203
- | Multi-provider (Codex, Cline, Aider) | [providers.md](skills/providers.md) |
203
+ | Providers (Claude, Agent SDK, opencode/OpenRouter) | [providers.md](skills/providers.md) |
204
204
  | OpenSpec delta context, brownfield changes | [openspec-integration.md](skills/openspec-integration.md) |
205
205
  | MiroFish validation, `--mirofish` | [mirofish-integration.md](skills/mirofish-integration.md) |
206
206
  | Writing documentation, `loki docs` | [documentation.md](skills/documentation.md) |
@@ -252,9 +252,7 @@ loki start --issue 123 # Explicit issue mode (overrides de
252
252
 
253
253
  # With provider selection (supports .md and .json PRDs)
254
254
  loki start --provider claude ./prd.md # Default, full features
255
- loki start --provider codex ./prd.json # GPT-5.3 Codex, degraded mode
256
- loki start --provider cline ./prd.md # Cline CLI, degraded mode
257
- loki start --provider aider ./prd.md # Aider (18+ providers), degraded mode
255
+ loki start --provider opencode --model openrouter/deepseek/deepseek-v3.2 ./prd.md # opencode via OpenRouter (OPENROUTER_API_KEY)
258
256
 
259
257
  # Parallel and auto-merge (legacy loop only; the default engine refuses these flags)
260
258
  loki start ./prd.md --parallel --engine legacy
@@ -275,10 +273,9 @@ loki docker --image IMG start prd.md # override the image
275
273
 
276
274
  **Provider capabilities:**
277
275
  - **Claude**: Opus 4.6, 1M context (beta), 128K output, adaptive thinking, agent teams, full features (Task tool, parallel agents, MCP)
278
- - **Codex**: GPT-5.3, 400K context, 128K output, MCP support, --full-auto mode, degraded (sequential only, no Task tool)
279
- - **Cline**: Multi-provider CLI, degraded mode (sequential only, no Task tool)
280
- - **Aider**: 18+ provider backends, degraded mode (sequential only, no Task tool)
281
- - **Google Gemini CLI**: DEPRECATED starting v7.5.18 (upstream deprecated; runtime removed)
276
+ - **Claude via the Agent SDK**: same provider, for `ANTHROPIC_API_KEY` users without a CLI login
277
+ - **opencode**: 75+ model providers including OpenRouter (`openrouter/<vendor>/<model>`), MCP support, sequential only (no Task tool)
278
+ - **Removed**: codex, cline, aider, gemini (selecting one exits 2 naming claude and opencode)
282
279
 
283
280
  ---
284
281
 
@@ -395,15 +392,12 @@ Two completion-trust features extend the verification gates. Full details in `sk
395
392
 
396
393
  ## Harness intelligence (v8.0.0)
397
394
 
398
- Four measured-harness disciplines layered onto the existing trust core. None of
395
+ Three measured-harness disciplines layered onto the existing trust core. None of
399
396
  them can weaken a gate: each either adds verification or saves budget on work
400
397
  that cannot succeed.
401
398
 
402
399
  | Env Var | Default | Effect |
403
400
  |---------|---------|--------|
404
- | `LOKI_CONFIDENCE_SPIKE=0` | on | Disable the confidence-spike re-check |
405
- | `LOKI_CONFIDENCE_SPIKE_DELTA` | `40` | Confidence jump (points) that counts as a spike |
406
- | `LOKI_CONFIDENCE_SPIKE_MIN` | `90` | Absolute level that counts as a spike on first arrival |
407
401
  | `LOKI_GOAL_SCORING=0` | on | Disable the goal-measurability advisory |
408
402
  | `LOKI_SMART_RETRY=0` | on | Retry every failure, including non-retryable ones |
409
403
  | `LOKI_SIMPLE=1` | off | Strip the coaching half of the system prompt (-78%, ~1562 tokens/iteration). Experimental ablation arm. |
@@ -413,18 +407,12 @@ that cannot succeed.
413
407
  `[CACHE_BREAKPOINT]`; the SDK judge path applies `cache_control` on that split.
414
408
  Any new always-on instruction belongs in the prefix, or it busts the cache
415
409
  every iteration.
416
- - **Confidence-spike re-check.** A jump to near-maximal self-reported confidence
417
- forces ONE extra verification before the done-signal valve force-stops a run.
418
- Strictly additive: a spike can only ADD a verification pass, never skip,
419
- shorten, or satisfy a gate. It cannot delay the stagnation valve, and the
420
- delay is one-shot, so a repeatedly-spiking run cannot postpone the valve
421
- indefinitely.
422
410
  - **Hill-climbable goal scoring.** A `COMPLETION_PROMISE` with no measurable
423
411
  target (no number, comparator, named metric, or verifiable artifact) gets a
424
412
  prompt advisory asking for a checkable success condition. Advisory only: it
425
413
  never blocks a build and never rewrites the goal. Suppressed for an absent
426
414
  goal and in perpetual mode, where open-endedness is the chosen configuration.
427
- Byte-mirrored across the bash and TypeScript routes.
415
+ Implemented in the bash loop (`autonomy/run.sh`).
428
416
  - **Smart retry.** A positively-identified permanent failure (bad credentials,
429
417
  unknown model, exhausted quota) stops early instead of burning the retry
430
418
  budget on guaranteed-identical failures. Fail-safe: an unrecognized error
@@ -473,4 +461,4 @@ Implemented, planned and deprecated items, with the version each landed in: `CHA
473
461
 
474
462
  ---
475
463
 
476
- **v11.120.0 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
464
+ **v11.121.0 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 11.120.0
1
+ 11.121.0
@@ -14,7 +14,7 @@ PERMISSIONS = ("plan", "edit", "full")
14
14
  KEYS = ("name", "description", "model", "provider", "tools", "deny", "permission", "role")
15
15
  LIST_KEYS = ("tools", "deny")
16
16
  NAME_RE = re.compile(r"^[a-z0-9][a-z0-9_-]{0,63}$")
17
- PROVIDERS = ("claude", "codex", "cline", "aider", "opencode")
17
+ PROVIDERS = ("claude", "opencode")
18
18
  # Tools a plan-permission agent must not use when exported to Claude Code.
19
19
  PLAN_DENY = ["Edit", "Write", "NotebookEdit", "Bash"]
20
20
 
package/api/openapi.yaml CHANGED
@@ -704,7 +704,7 @@ components:
704
704
  nullable: true
705
705
  provider:
706
706
  type: string
707
- enum: [claude, codex, cline, aider]
707
+ enum: [claude, opencode]
708
708
  status:
709
709
  type: string
710
710
  enum: [starting, running, paused, stopping, stopped, failed, completed]
@@ -770,7 +770,7 @@ components:
770
770
  description: Path to PRD file
771
771
  provider:
772
772
  type: string
773
- enum: [claude, codex, cline, aider]
773
+ enum: [claude, opencode]
774
774
  default: claude
775
775
  options:
776
776
  type: object
@@ -835,11 +835,7 @@ components:
835
835
  properties:
836
836
  claude:
837
837
  type: boolean
838
- codex:
839
- type: boolean
840
- cline:
841
- type: boolean
842
- aider:
838
+ opencode:
843
839
  type: boolean
844
840
  activeSession:
845
841
  type: string
@@ -152,9 +152,7 @@ export async function detailedStatus(_req: Request): Promise<Response> {
152
152
  */
153
153
  async function checkProviders(): Promise<{
154
154
  claude: boolean;
155
- codex: boolean;
156
- cline: boolean;
157
- aider: boolean;
155
+ opencode: boolean;
158
156
  }> {
159
157
  const checkCommand = async (cmd: string): Promise<boolean> => {
160
158
  try {
@@ -170,16 +168,13 @@ async function checkProviders(): Promise<{
170
168
  }
171
169
  };
172
170
 
173
- // v7.5.18: gemini removed (runtime deprecated); cline + aider are the real
174
- // Tier-2/Tier-3 providers. Probe the actually-supported set.
175
- const [claude, codex, cline, aider] = await Promise.all([
171
+ // The supported set (providers/loader.sh SUPPORTED_PROVIDERS).
172
+ const [claude, opencode] = await Promise.all([
176
173
  checkCommand("claude"),
177
- checkCommand("codex"),
178
- checkCommand("cline"),
179
- checkCommand("aider"),
174
+ checkCommand("opencode"),
180
175
  ]);
181
176
 
182
- return { claude, codex, cline, aider };
177
+ return { claude, opencode };
183
178
  }
184
179
 
185
180
  /**
@@ -23,6 +23,13 @@ import {
23
23
  successResponse,
24
24
  } from "../middleware/error.ts";
25
25
 
26
+ // Restated from loki-ts/src/runner/types.ts (VALID_PROVIDERS, REMOVED_PROVIDERS, removedProviderMessage);
27
+ // api/ ships without loki-ts/src, so it cannot import them. Keep the message byte-identical.
28
+ const SUPPORTED_PROVIDERS: string[] = ["claude", "opencode"];
29
+ const REMOVED_PROVIDERS: string[] = ["codex", "cline", "aider", "gemini"];
30
+ const removedProviderMessage = (provider: string): string =>
31
+ `loki: provider '${provider}' is no longer supported. Supported providers: claude (Claude Code CLI, or an Anthropic API key through the Agent SDK) and opencode (any model, including OpenRouter via OPENROUTER_API_KEY). Switch with --provider claude or --provider opencode, or unset LOKI_PROVIDER.`;
32
+
26
33
  /**
27
34
  * POST /api/sessions - Start a new session
28
35
  */
@@ -38,9 +45,11 @@ export async function startSession(req: Request): Promise<Response> {
38
45
 
39
46
  // Validate provider
40
47
  const provider = data.provider || "claude";
41
- if (!["claude", "codex", "cline", "aider"].includes(provider)) {
48
+ if (!SUPPORTED_PROVIDERS.includes(provider)) {
42
49
  throw new LokiApiError(
43
- `Invalid provider: ${provider}. Must be one of: claude, codex, cline, aider`,
50
+ REMOVED_PROVIDERS.includes(provider)
51
+ ? removedProviderMessage(provider)
52
+ : `Invalid provider: ${provider}. Must be one of: ${SUPPORTED_PROVIDERS.join(", ")}`,
44
53
  ErrorCodes.VALIDATION_ERROR
45
54
  );
46
55
  }
@@ -51,7 +60,7 @@ export async function startSession(req: Request): Promise<Response> {
51
60
  "provider",
52
61
  provider,
53
62
  {
54
- alternativesRejected: ["claude", "codex", "cline", "aider"].filter((p) => p !== provider),
63
+ alternativesRejected: SUPPORTED_PROVIDERS.filter((p) => p !== provider),
55
64
  context: {
56
65
  hasPrd: !!data.prdPath,
57
66
  options: data.options,
package/api/server.js CHANGED
@@ -38,7 +38,11 @@ const DEFAULT_HOST = '127.0.0.1';
38
38
  const PROJECT_DIR = process.env.LOKI_PROJECT_DIR || process.cwd();
39
39
 
40
40
  // Security constants
41
- const VALID_PROVIDERS = ['claude', 'codex', 'cline', 'aider'];
41
+ const VALID_PROVIDERS = ['claude', 'opencode'];
42
+ // Restated from loki-ts/src/runner/types.ts (REMOVED_PROVIDERS, removedProviderMessage); keep byte-identical.
43
+ const REMOVED_PROVIDERS = ['codex', 'cline', 'aider', 'gemini'];
44
+ const removedProviderMessage = (provider) =>
45
+ `loki: provider '${provider}' is no longer supported. Supported providers: claude (Claude Code CLI, or an Anthropic API key through the Agent SDK) and opencode (any model, including OpenRouter via OPENROUTER_API_KEY). Switch with --provider claude or --provider opencode, or unset LOKI_PROVIDER.`;
42
46
  const MAX_BODY_SIZE = 1024 * 1024; // 1MB limit
43
47
  const MAX_LOG_LINES = 1000;
44
48
  const LOKI_DIR = path.join(PROJECT_DIR, '.loki');
@@ -233,7 +237,7 @@ class ProcessManager {
233
237
 
234
238
  // Validate provider (security: prevent command injection)
235
239
  if (!VALID_PROVIDERS.includes(provider)) {
236
- throw new Error(`Invalid provider: ${provider}. Must be one of: ${VALID_PROVIDERS.join(', ')}`);
240
+ throw new Error(REMOVED_PROVIDERS.includes(provider) ? removedProviderMessage(provider) : `Invalid provider: ${provider}. Must be one of: ${VALID_PROVIDERS.join(', ')}`);
237
241
  }
238
242
 
239
243
  // Validate PRD path (security: prevent path traversal)
@@ -48,7 +48,7 @@ class CLIBridge {
48
48
  */
49
49
  async startSession(
50
50
  prdPath?: string,
51
- provider: "claude" | "codex" | "cline" | "aider" = "claude",
51
+ provider: "claude" | "opencode" = "claude",
52
52
  options: { dryRun?: boolean; verbose?: boolean } = {}
53
53
  ): Promise<Session> {
54
54
  const sessionId = `session_${Date.now()}_${crypto.randomUUID().slice(0, 8)}`;
package/api/types/api.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  export interface Session {
9
9
  id: string;
10
10
  prdPath: string | null;
11
- provider: "claude" | "codex" | "cline" | "aider";
11
+ provider: "claude" | "opencode";
12
12
  status: SessionStatus;
13
13
  startedAt: string;
14
14
  updatedAt: string;
@@ -62,7 +62,7 @@ export type TaskStatus =
62
62
  // API Request/Response types
63
63
  export interface StartSessionRequest {
64
64
  prdPath?: string;
65
- provider?: "claude" | "codex" | "cline" | "aider";
65
+ provider?: "claude" | "opencode";
66
66
  options?: {
67
67
  dryRun?: boolean;
68
68
  verbose?: boolean;
@@ -115,9 +115,7 @@ export interface HealthResponse {
115
115
  uptime: number;
116
116
  providers: {
117
117
  claude: boolean;
118
- codex: boolean;
119
- cline: boolean;
120
- aider: boolean;
118
+ opencode: boolean;
121
119
  };
122
120
  activeSession: string | null;
123
121
  }
@@ -165,7 +165,7 @@
165
165
  <div class="card">
166
166
  <span class="tag">Yours to run</span>
167
167
  <h3>Provider-agnostic and private</h3>
168
- <p>Runs on Claude, Codex, Cline, or Aider. Your keys, your infrastructure, no vendor lock-in.</p>
168
+ <p>Runs on Claude Code or opencode (any model, including OpenRouter). Your keys, your infrastructure, no vendor lock-in.</p>
169
169
  </div>
170
170
  </div>
171
171
 
@@ -2031,7 +2031,7 @@ runner = d.get('runner', 'none')
2031
2031
  passed = d.get('pass')
2032
2032
  status = d.get('status', '')
2033
2033
  # BACKLOG 89: a recorded failure count above zero is a failure whatever "pass"
2034
- # says, as the Bun gate reads it (quality_gates.ts artifactCount): a numeric
2034
+ # says: a numeric
2035
2035
  # failed_count wins, the legacy numeric failed is the fallback, and anything
2036
2036
  # else (null, missing, a bool) is unmeasured, never a failure and never 0.
2037
2037
  def _count(v):
@@ -3121,10 +3121,6 @@ council_member_review() {
3121
3121
  command -v claude >/dev/null 2>&1 || { log_error "Claude CLI not found"; return 1; }
3122
3122
  fi
3123
3123
  ;;
3124
- codex) command -v codex >/dev/null 2>&1 || { log_error "Codex CLI not found"; return 1; } ;;
3125
- gemini) command -v gemini >/dev/null 2>&1 || { log_error "Gemini CLI not found"; return 1; } ;;
3126
- cline) command -v cline >/dev/null 2>&1 || { log_error "Cline CLI not found"; return 1; } ;;
3127
- aider) command -v aider >/dev/null 2>&1 || { log_error "Aider not found"; return 1; } ;;
3128
3124
  esac
3129
3125
 
3130
3126
  local evidence
@@ -3295,8 +3291,7 @@ ISSUES: CRITICAL:description (optional, one per line per issue)"
3295
3291
  # output; the downstream parse already greps VOTE/REASON/ISSUES.
3296
3292
  # CAVEMAN_DEFAULT_MODE=off suppression is preserved (see above).
3297
3293
  # bash-F3: timeout-guard the provider subcall so a hung CLI can
3298
- # not stall the whole council. Default 600s matches the Bun route
3299
- # (council.ts LOKI_COUNCIL_TIMEOUT_MS=600000).
3294
+ # not stall the whole council. Default 600s.
3300
3295
  # bash-F4 (WAVE10 SAFE-DEFAULT): capture the subcall exit code so a
3301
3296
  # timeout (124) is NOT silently routed into council_heuristic_review.
3302
3297
  # The heuristic fallback defaults to APPROVE on benign evidence, so
@@ -3309,30 +3304,6 @@ ISSUES: CRITICAL:description (optional, one per line per issue)"
3309
3304
  _provider_rc=$?
3310
3305
  fi
3311
3306
  ;;
3312
- codex)
3313
- if command -v codex &>/dev/null; then
3314
- verdict=$(timeout "${LOKI_COUNCIL_REVIEW_TIMEOUT:-600}" codex exec --sandbox workspace-write "$prompt" 2>/dev/null)
3315
- _provider_rc=$?
3316
- fi
3317
- ;;
3318
- gemini)
3319
- if command -v gemini &>/dev/null; then
3320
- verdict=$(echo "$prompt" | timeout "${LOKI_COUNCIL_REVIEW_TIMEOUT:-600}" gemini 2>/dev/null)
3321
- _provider_rc=$?
3322
- fi
3323
- ;;
3324
- cline)
3325
- if command -v cline &>/dev/null; then
3326
- verdict=$(timeout "${LOKI_COUNCIL_REVIEW_TIMEOUT:-600}" cline -y "$prompt" 2>/dev/null)
3327
- _provider_rc=$?
3328
- fi
3329
- ;;
3330
- aider)
3331
- if command -v aider &>/dev/null; then
3332
- verdict=$(timeout "${LOKI_COUNCIL_REVIEW_TIMEOUT:-600}" aider --message "$prompt" --yes-always --no-auto-commits --no-git 2>/dev/null)
3333
- _provider_rc=$?
3334
- fi
3335
- ;;
3336
3307
  *)
3337
3308
  # v8.2.0 TIMEOUT SEAM. Any provider exposing provider_invoke_argv can
3338
3309
  # cast a real council vote instead of falling straight to the
@@ -3403,10 +3374,6 @@ council_devils_advocate() {
3403
3374
  command -v claude >/dev/null 2>&1 || { log_error "Claude CLI not found"; return 1; }
3404
3375
  fi
3405
3376
  ;;
3406
- codex) command -v codex >/dev/null 2>&1 || { log_error "Codex CLI not found"; return 1; } ;;
3407
- gemini) command -v gemini >/dev/null 2>&1 || { log_error "Gemini CLI not found"; return 1; } ;;
3408
- cline) command -v cline >/dev/null 2>&1 || { log_error "Cline CLI not found"; return 1; } ;;
3409
- aider) command -v aider >/dev/null 2>&1 || { log_error "Aider not found"; return 1; } ;;
3410
3377
  esac
3411
3378
 
3412
3379
  local evidence
@@ -3502,31 +3469,11 @@ REASON: one-line justification citing path:line evidence"
3502
3469
  # v7.41.3 BUG A: full capture, no tail-truncation (see member
3503
3470
  # subcall note). CAVEMAN_DEFAULT_MODE=off suppression preserved.
3504
3471
  # bash-F3: timeout-guard the devil's-advocate subcall (same 600s
3505
- # default as the member subcalls / Bun council.ts). An empty
3472
+ # default as the member subcalls). An empty
3506
3473
  # verdict on timeout hits the conservative REJECT fallback below.
3507
3474
  verdict=$(echo "$prompt" | timeout "${LOKI_COUNCIL_REVIEW_TIMEOUT:-600}" env "SHELL=$_co_shell" CAVEMAN_DEFAULT_MODE=off claude "${_co_argv[@]}" -p 2>/dev/null)
3508
3475
  fi
3509
3476
  ;;
3510
- codex)
3511
- if command -v codex &>/dev/null; then
3512
- verdict=$(timeout "${LOKI_COUNCIL_REVIEW_TIMEOUT:-600}" codex exec --sandbox workspace-write "$prompt" 2>/dev/null)
3513
- fi
3514
- ;;
3515
- gemini)
3516
- if command -v gemini &>/dev/null; then
3517
- verdict=$(echo "$prompt" | timeout "${LOKI_COUNCIL_REVIEW_TIMEOUT:-600}" gemini 2>/dev/null)
3518
- fi
3519
- ;;
3520
- cline)
3521
- if command -v cline &>/dev/null; then
3522
- verdict=$(timeout "${LOKI_COUNCIL_REVIEW_TIMEOUT:-600}" cline -y "$prompt" 2>/dev/null)
3523
- fi
3524
- ;;
3525
- aider)
3526
- if command -v aider &>/dev/null; then
3527
- verdict=$(timeout "${LOKI_COUNCIL_REVIEW_TIMEOUT:-600}" aider --message "$prompt" --yes-always --no-auto-commits --no-git 2>/dev/null)
3528
- fi
3529
- ;;
3530
3477
  *)
3531
3478
  # v8.2.0 TIMEOUT SEAM (contrarian / devil's-advocate vote). Same
3532
3479
  # rationale as the member vote: a real argv keeps the `timeout`
@@ -4,16 +4,16 @@
4
4
  Parses provider session files to extract token usage data
5
5
  and writes tracking information to .loki/context/tracking.json.
6
6
 
7
- Provider-agnostic: supports Claude, Codex, and Gemini CLIs.
7
+ Provider-agnostic: supports the Claude Code and opencode CLIs.
8
8
  - Claude: parses session JSONL from ~/.claude/projects/
9
- - Codex/Gemini: accepts token data via --tokens-input/--tokens-output CLI args
9
+ - opencode: accepts token data via --tokens-input/--tokens-output CLI args
10
10
  - All providers: can accept --session-file to specify session file directly
11
11
 
12
12
  Called by run.sh after each RARV iteration.
13
13
 
14
14
  Usage:
15
15
  python3 context-tracker.py --iteration N --loki-dir .loki [--window-size N] [--model ID]
16
- python3 context-tracker.py --iteration N --loki-dir .loki --provider codex \
16
+ python3 context-tracker.py --iteration N --loki-dir .loki --provider opencode \
17
17
  --tokens-input 5000 --tokens-output 2000
18
18
  python3 context-tracker.py --iteration N --loki-dir .loki --session-file /path/to/session.jsonl
19
19
  """
@@ -28,7 +28,7 @@ from pathlib import Path
28
28
 
29
29
 
30
30
  # Default pricing (USD per million tokens) - provider-specific overrides below
31
- # NOTE (fable): this table is keyed by PROVIDER (claude/codex/gemini), not by
31
+ # NOTE (fable): this table is keyed by PROVIDER (claude), not by
32
32
  # model, so it cannot price Fable distinctly from Opus/Sonnet under "claude".
33
33
  # It is intentionally NOT refactored for the fable change: this table is an
34
34
  # ESTIMATE-ONLY fallback for context-window projections. The authoritative
@@ -43,26 +43,11 @@ PRICING_BY_PROVIDER = {
43
43
  "cache_read": 0.10,
44
44
  "cache_creation": 2.5,
45
45
  },
46
- "codex": {
47
- "input": 2.0,
48
- "output": 8.0,
49
- "cache_read": 0.0,
50
- "cache_creation": 0.0,
51
- },
52
- "gemini": {
53
- "input": 1.25,
54
- "output": 5.0,
55
- "cache_read": 0.0,
56
- "cache_creation": 0.0,
57
- },
58
46
  }
59
47
 
60
48
  # Last-resort window for providers whose models carry no context_window in
61
49
  # providers/model_catalog.json (the catalog owns Claude model capacity).
62
- FALLBACK_WINDOW_SIZES = {
63
- "codex": 200000,
64
- "gemini": 1000000,
65
- }
50
+ FALLBACK_WINDOW_SIZES = {}
66
51
  DEFAULT_WINDOW_SIZE = 200000
67
52
  CATALOG_PATH = Path(__file__).resolve().parent.parent / "providers" / "model_catalog.json"
68
53
 
@@ -116,7 +101,7 @@ def find_session_file(provider, session_file_arg=None):
116
101
  """Find the most recently modified session file for the given provider.
117
102
 
118
103
  Args:
119
- provider: 'claude', 'codex', or 'gemini'
104
+ provider: 'claude' or 'opencode'
120
105
  session_file_arg: explicit path from --session-file flag
121
106
 
122
107
  Returns:
@@ -141,7 +126,7 @@ def find_session_file(provider, session_file_arg=None):
141
126
  jsonl_files = sorted(session_dir.glob("*.jsonl"), key=lambda p: p.stat().st_mtime, reverse=True)
142
127
  return jsonl_files[0] if jsonl_files else None
143
128
 
144
- # For codex/gemini, no standard session file location yet
129
+ # For opencode, no standard session file location yet
145
130
  # They rely on --tokens-input/--tokens-output args instead
146
131
  return None
147
132
 
@@ -249,7 +234,7 @@ def update_tracking(loki_dir, iteration, window_size, provider="claude", model=N
249
234
  iteration: Current RARV iteration number
250
235
  window_size: Context window size in tokens (0 = resolve from the catalog)
251
236
  model: Run model id used to look up the window (default: model seen in the session)
252
- provider: Provider name (claude, codex, gemini)
237
+ provider: Provider name (claude, opencode)
253
238
  session_file: Explicit path to session file (optional)
254
239
  direct_tokens: Dict with input/output token counts for non-Claude providers
255
240
  """
@@ -403,8 +388,8 @@ def main():
403
388
  parser.add_argument("--loki-dir", default=".loki", help="Path to .loki directory")
404
389
  parser.add_argument("--window-size", type=int, default=0,
405
390
  help="Context window size in tokens (0 = auto-detect from provider)")
406
- parser.add_argument("--provider", default="claude", choices=["claude", "codex", "gemini"],
407
- help="LLM provider (claude, codex, gemini)")
391
+ parser.add_argument("--provider", default="claude", choices=["claude", "opencode"],
392
+ help="LLM provider (claude, opencode)")
408
393
  parser.add_argument("--model", default=None,
409
394
  help="Run model id for the catalog window lookup (default: model seen in the session)")
410
395
  parser.add_argument("--session-file", default=None,
@@ -494,34 +494,6 @@ except Exception:
494
494
  result='{"verdict":"INCONCLUSIVE","justification":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
495
495
  fi
496
496
  ;;
497
- codex)
498
- if command -v codex &>/dev/null; then
499
- result=$(codex exec -q "$full_prompt" 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","justification":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
500
- else
501
- result='{"verdict":"INCONCLUSIVE","justification":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
502
- fi
503
- ;;
504
- gemini)
505
- if command -v gemini &>/dev/null; then
506
- result=$(echo "$full_prompt" | gemini 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","justification":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
507
- else
508
- result='{"verdict":"INCONCLUSIVE","justification":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
509
- fi
510
- ;;
511
- cline)
512
- if command -v cline &>/dev/null; then
513
- result=$(cline -y "$full_prompt" 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","justification":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
514
- else
515
- result='{"verdict":"INCONCLUSIVE","justification":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
516
- fi
517
- ;;
518
- aider)
519
- if command -v aider &>/dev/null; then
520
- result=$(aider --message "$full_prompt" --yes-always --no-auto-commits --no-git 2>/dev/null || echo '{"verdict":"INCONCLUSIVE","justification":"review execution failed (no verdict obtained; NOT a rejection)","issues":[]}')
521
- else
522
- result='{"verdict":"INCONCLUSIVE","justification":"reviewer CLI unavailable (no verdict obtained; NOT a rejection)","issues":[]}'
523
- fi
524
- ;;
525
497
  *)
526
498
  # v8.2.0 TIMEOUT SEAM. A provider exposing provider_invoke_argv gets
527
499
  # a real reviewer instead of an automatic INCONCLUSIVE. The argv is a