loki-mode 11.120.1 → 11.122.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 (173) hide show
  1. package/.github/actions/issue-to-pr/action.yml +1 -1
  2. package/README.md +3 -2
  3. package/SKILL.md +16 -19
  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 +0 -52
  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/cost-summary.py +2 -2
  20. package/autonomy/lib/done-recognition.sh +1 -1
  21. package/autonomy/lib/efficiency_cost.py +1 -1
  22. package/autonomy/lib/effort_estimator.py +0 -4
  23. package/autonomy/lib/help-core.sh +6 -4
  24. package/autonomy/lib/iteration_attribution.py +1 -1
  25. package/autonomy/lib/mcp-config.sh +7 -34
  26. package/autonomy/lib/os_sandbox.py +2 -5
  27. package/autonomy/lib/outcome_ledger.py +1 -1
  28. package/autonomy/lib/project-graph.sh +1 -1
  29. package/autonomy/lib/setup-requirements.json +1 -4
  30. package/autonomy/lib/skill-link-heal.sh +1 -1
  31. package/autonomy/lib/telemetry-schema.json +3 -3
  32. package/autonomy/lib/wiki_llm.py +1 -4
  33. package/autonomy/loki +95 -335
  34. package/autonomy/migration-agents.sh +1 -1
  35. package/autonomy/prd-checklist.sh +1 -1
  36. package/autonomy/provider-offer.sh +7 -11
  37. package/autonomy/quickstart.sh +3 -11
  38. package/autonomy/route.sh +6 -6
  39. package/autonomy/run.sh +51 -291
  40. package/autonomy/sandbox.sh +8 -39
  41. package/autonomy/setup-wizard.sh +5 -5
  42. package/bin/loki +34 -25
  43. package/completions/_loki +4 -4
  44. package/completions/loki.bash +2 -4
  45. package/dashboard/__init__.py +1 -1
  46. package/dashboard/api_start.py +36 -6
  47. package/dashboard/build_supervisor.py +1 -5
  48. package/dashboard/server.py +18 -26
  49. package/docs/ARCHITECTURE.md +9 -10
  50. package/docs/CLI-REFERENCE.md +1 -1
  51. package/docs/COMPARE-OPENCODE.md +7 -6
  52. package/docs/COMPONENTS.md +5 -8
  53. package/docs/DOCKER.md +11 -10
  54. package/docs/INSTALLATION.md +5 -8
  55. package/docs/OPEN-CORE-BOUNDARY.md +1 -1
  56. package/docs/PRIVACY.md +2 -2
  57. package/docs/QUICKSTART.md +2 -2
  58. package/docs/TOOLS.md +3 -3
  59. package/docs/air-gapped.md +3 -3
  60. package/docs/alternative-installations.md +20 -10
  61. package/docs/cost-controls.md +0 -3
  62. package/docs/dev/architecture-reference.md +1 -1
  63. package/docs/dev/project-structure.md +1 -4
  64. package/docs/environment-variables.md +8 -10
  65. package/docs/exit-codes.md +5 -5
  66. package/docs/network-security.md +3 -6
  67. package/docs/v10/GUIDE.md +45 -34
  68. package/integrations/openclaw/README.md +1 -1
  69. package/integrations/openclaw/SKILL.md +3 -3
  70. package/learning/emit.sh +1 -1
  71. package/loki-ts/data/child-env.json +0 -8
  72. package/loki-ts/dist/cockpit.js +1 -1
  73. package/loki-ts/dist/loki.js +1339 -1345
  74. package/magic/core/debate.py +4 -11
  75. package/magic/core/generator.py +5 -18
  76. package/mcp/__init__.py +1 -1
  77. package/mcp/server.py +1 -1
  78. package/package.json +2 -3
  79. package/packages/control-plane/dist/ask-tools-server.js +1 -3
  80. package/packages/control-plane/dist/server.js +171 -395
  81. package/packages/control-plane/src/ask/invoke.ts +5 -13
  82. package/packages/control-plane/src/ask/parse.ts +3 -25
  83. package/packages/control-plane/src/ask/worker.ts +1 -2
  84. package/packages/control-plane/src/db/fixture-cleanup.ts +1 -1
  85. package/packages/control-plane/src/server/routes/ask.ts +3 -2
  86. package/packages/control-plane/src/server/routes/cost_ledger.ts +0 -1
  87. package/packages/control-plane/src/server/routes/providers.ts +4 -9
  88. package/packages/control-plane/src/server/spawn.ts +8 -4
  89. package/packages/control-plane/ui/dist/assets/{index-C4nb1aRV.js → index-Dy80VLtj.js} +22 -22
  90. package/packages/control-plane/ui/dist/index.html +1 -1
  91. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  92. package/providers/loader.sh +23 -4
  93. package/providers/model_catalog.json +2 -104
  94. package/providers/models.sh +10 -11
  95. package/providers/opencode.sh +3 -6
  96. package/references/quality-control.md +1 -1
  97. package/schemas/loki-yaml.schema.json +1 -1
  98. package/skills/model-selection.md +26 -55
  99. package/skills/providers.md +54 -221
  100. package/skills/quality-gates.md +3 -3
  101. package/skills/troubleshooting.md +1 -1
  102. package/src/integrations/github/action-handler.js +2 -4
  103. package/src/protocols/tools/start-project.js +1 -1
  104. package/tools/index-codebase.py +1 -2
  105. package/tools/preflight.sh +2 -2
  106. package/tools/probe-model-catalog.py +1 -13
  107. package/tools/regen-state-machine-refs.py +1 -2
  108. package/tools/token-guard.py +1 -1
  109. package/web-app/dist/assets/{AdminPage-CSwrd2UA.js → AdminPage-ELJcLtkb.js} +1 -1
  110. package/web-app/dist/assets/{Avatar-B6SmKtXt.js → Avatar-CsqnCi_p.js} +1 -1
  111. package/web-app/dist/assets/{Badge-CR4U3l95.js → Badge-C_AmZbBO.js} +1 -1
  112. package/web-app/dist/assets/{Button-DmcHmlo6.js → Button-BtGxa4qB.js} +1 -1
  113. package/web-app/dist/assets/{CockpitPage-CR_GmqRg.js → CockpitPage-nS3WP8mA.js} +1 -1
  114. package/web-app/dist/assets/ComparePage-DFmhp7ZQ.js +1 -0
  115. package/web-app/dist/assets/{ErrorBoundary-23WE8Kb8.js → ErrorBoundary-CIxZiWVd.js} +1 -1
  116. package/web-app/dist/assets/{EvidenceReceiptPanel-dFODI74J.js → EvidenceReceiptPanel-BhxfDSCB.js} +1 -1
  117. package/web-app/dist/assets/{GitHubIssuesPanel-CudHcPXf.js → GitHubIssuesPanel-Be1-OBZV.js} +1 -1
  118. package/web-app/dist/assets/{GitHubPRsPanel-0WcASaRW.js → GitHubPRsPanel-CQ7GJtyd.js} +1 -1
  119. package/web-app/dist/assets/{HomePage-CQL8xADH.js → HomePage-zH8kd4P5.js} +2 -2
  120. package/web-app/dist/assets/{LoginPage-BRfdWXgI.js → LoginPage-ZjJnKrHl.js} +1 -1
  121. package/web-app/dist/assets/{MagicPage-CaaPZyuJ.js → MagicPage-DI3TPf-S.js} +1 -1
  122. package/web-app/dist/assets/{MetricsPage-BjQ0sz0F.js → MetricsPage-CeR0x61k.js} +1 -1
  123. package/web-app/dist/assets/{NotFoundPage-BNnrwX96.js → NotFoundPage-BvKY8u-G.js} +1 -1
  124. package/web-app/dist/assets/{ProjectPage-pDqfWbBG.js → ProjectPage-BbIFH1-O.js} +25 -25
  125. package/web-app/dist/assets/{ProjectsPage-CiHCZYVm.js → ProjectsPage-CEUgVVLS.js} +1 -1
  126. package/web-app/dist/assets/SettingsPage-tTkVUAal.js +10 -0
  127. package/web-app/dist/assets/{ShowcasePage-BCa643R5.js → ShowcasePage-15PBVhXm.js} +1 -1
  128. package/web-app/dist/assets/SystemSettingsPage-DWTYrIOO.js +1 -0
  129. package/web-app/dist/assets/{TeamsPage-CG-DqMjn.js → TeamsPage-DIzu8nMF.js} +1 -1
  130. package/web-app/dist/assets/{TemplatesPage-CO_kXHRt.js → TemplatesPage-BqeLAU68.js} +1 -1
  131. package/web-app/dist/assets/{TerminalOutput-C_iYHB-7.js → TerminalOutput-oqqL1P5w.js} +1 -1
  132. package/web-app/dist/assets/{activity-Cp6ZIiZc.js → activity-YIEhaE4F.js} +1 -1
  133. package/web-app/dist/assets/{bell-BZf6hsa9.js → bell-DYUkKCEP.js} +1 -1
  134. package/web-app/dist/assets/{bot-CGmNbYLx.js → bot-CtgoOtgo.js} +1 -1
  135. package/web-app/dist/assets/{check-CMDDpUDY.js → check-DdihsgbN.js} +1 -1
  136. package/web-app/dist/assets/{chevron-left-DTtdfTHr.js → chevron-left-C68KK6Gu.js} +1 -1
  137. package/web-app/dist/assets/{circle-alert-Ch6h3j52.js → circle-alert-vhaF7mcu.js} +1 -1
  138. package/web-app/dist/assets/{clock-Ce1nf2ai.js → clock-D9W45YOn.js} +1 -1
  139. package/web-app/dist/assets/{cloud-p2TFekpg.js → cloud-Dxz7iDTW.js} +1 -1
  140. package/web-app/dist/assets/{code-xml-Kyu4vmM1.js → code-xml-BqkN83_U.js} +1 -1
  141. package/web-app/dist/assets/{database-B4HrqS9b.js → database-3yX88OUR.js} +1 -1
  142. package/web-app/dist/assets/{dollar-sign-Cw-uyKAg.js → dollar-sign-CF0rEEKZ.js} +1 -1
  143. package/web-app/dist/assets/{file-code-corner-C8N3vuAd.js → file-code-corner-Ce7TAquR.js} +1 -1
  144. package/web-app/dist/assets/{file-plus-Ddd367Rd.js → file-plus-2A_4XZn7.js} +1 -1
  145. package/web-app/dist/assets/{globe-BW_Nzcek.js → globe-CD9NOOOM.js} +1 -1
  146. package/web-app/dist/assets/{hammer-rS0zwOgP.js → hammer-Bih-uaC_.js} +1 -1
  147. package/web-app/dist/assets/{index-BFtUVrg2.js → index-DIs2i7KF.js} +16 -16
  148. package/web-app/dist/assets/{layers-ChTtsWHz.js → layers-BKK3PIBk.js} +1 -1
  149. package/web-app/dist/assets/{loader-circle-Dl2j378Y.js → loader-circle-bGpRrwX7.js} +1 -1
  150. package/web-app/dist/assets/{lock-H0jwxcaH.js → lock-QNU37P0J.js} +1 -1
  151. package/web-app/dist/assets/{package-Cn0OyUWi.js → package-Br0MWvyj.js} +1 -1
  152. package/web-app/dist/assets/{plus-c4Cn8Hg_.js → plus-D7_32jEf.js} +1 -1
  153. package/web-app/dist/assets/{refresh-cw-CvtIp31h.js → refresh-cw-YfmCgQZp.js} +1 -1
  154. package/web-app/dist/assets/{rotate-ccw-CACNVELf.js → rotate-ccw-DRkA8aQa.js} +1 -1
  155. package/web-app/dist/assets/{scroll-text-wcpAN4zz.js → scroll-text-yMs1sJD4.js} +1 -1
  156. package/web-app/dist/assets/{server-C8tiYYoH.js → server-DQJajJt9.js} +1 -1
  157. package/web-app/dist/assets/{shield-alert-D2EqAn5F.js → shield-alert-BuXMkNPa.js} +1 -1
  158. package/web-app/dist/assets/{thumbs-up-DoxGQgUE.js → thumbs-up-BjWoo0Rp.js} +1 -1
  159. package/web-app/dist/assets/{trash-2-HbLfFoN4.js → trash-2-CCuQNkX7.js} +1 -1
  160. package/web-app/dist/assets/{trending-down-Djd4tkxi.js → trending-down-CXHO9K8m.js} +1 -1
  161. package/web-app/dist/assets/{trending-up-B9Nco_QQ.js → trending-up-Csfmj8CR.js} +1 -1
  162. package/web-app/dist/assets/{upload-Bu_bR4UG.js → upload-ZOszdITh.js} +1 -1
  163. package/web-app/dist/assets/{usePolling-D6jTTEO8.js → usePolling-DbEhYhl9.js} +1 -1
  164. package/web-app/dist/assets/{user-3vyW2Iwk.js → user-DPJ9LSGJ.js} +1 -1
  165. package/web-app/dist/index.html +1 -1
  166. package/web-app/server.py +26 -14
  167. package/autonomy/lib/codex-usage.py +0 -174
  168. package/providers/aider.sh +0 -191
  169. package/providers/cline.sh +0 -176
  170. package/providers/codex.sh +0 -408
  171. package/web-app/dist/assets/ComparePage-DH9gwrob.js +0 -1
  172. package/web-app/dist/assets/SettingsPage-B-1-R56L.js +0 -10
  173. package/web-app/dist/assets/SystemSettingsPage-BUHVmvMB.js +0 -1
@@ -10,7 +10,7 @@ reading 90% from cache costs roughly a tenth of the same run reading fresh --
10
10
  and nothing on the CLI surfaced it.
11
11
 
12
12
  THE HONESTY RULE THIS INHERITS. Unmeasured is not free. That confusion shipped
13
- to a user on four separate surfaces (v8.51.0 through v8.54.0: the codex
13
+ to a user on four separate surfaces (v8.51.0 through v8.54.0: a provider
14
14
  dispatch recorded no tokens, the receipt said {"usd": 0.0, "available": true},
15
15
  the PROMPT said "$0.00" per iteration, and the verifier never checked). Each
16
16
  was fixed in isolation. This is a fifth surface reading the same records, so it
@@ -133,7 +133,7 @@ def summarize(workspace="."):
133
133
  # UNPRICED IS NOT FREE. record_is_measured() is field-agnostic: a record
134
134
  # with real tokens but cost_usd 0 is "measured" on the strength of its
135
135
  # tokens, and the cost slot would then render $0.0000 -- the headline
136
- # rule inverted, on a shape that actually ships. Codex tiers can record
136
+ # rule inverted, on a shape that actually ships. An unpriced model can record
137
137
  # tokens with no priced cost, and the real FireLater records wrote an
138
138
  # explicit "cost_usd": 0 rather than omitting the key.
139
139
  #
@@ -220,7 +220,7 @@ except Exception:
220
220
  # Decide whether model verification can be attempted.
221
221
  #
222
222
  # v8.2.0: this used to require LOKI_PROVIDER=claude specifically, so a user on
223
- # codex/opencode/cline/aider silently lost done-recognition. That is a
223
+ # opencode silently lost done-recognition. That is a
224
224
  # CAPABILITY question, not an identity question -- the real requirement is "can
225
225
  # we reach a model AND bound the call with a timeout". Any provider exposing the
226
226
  # argv seam (provider_invoke_argv, see providers/claude.sh) satisfies both.
@@ -180,7 +180,7 @@ def collect_efficiency(loki_dir):
180
180
  # exactly that.
181
181
  #
182
182
  # Measured on the real FireLater run: four efficiency records, every token
183
- # field 0 (codex wrote no usage before v8.51.0), and collect_efficiency
183
+ # field 0 (that provider wrote no usage before v8.51.0), and collect_efficiency
184
184
  # returned {'usd': 0.0, ..., 'available': True}.
185
185
  #
186
186
  # A run that did work necessarily consumed tokens. So "available" now means
@@ -268,10 +268,6 @@ def _llm_estimate(canon_inputs, timeout=18):
268
268
  provider = os.environ.get("LOKI_PROVIDER", "claude")
269
269
  cmds = {
270
270
  "claude": ["claude", "-p", prompt],
271
- "codex": ["codex", "exec", "--sandbox", "read-only", prompt],
272
- "cline": ["cline", "-y", prompt],
273
- "aider": ["aider", "--message", prompt, "--yes-always",
274
- "--no-auto-commits"],
275
271
  }
276
272
  base = cmds.get(provider)
277
273
  if base is None or not _which(base[0]):
@@ -89,12 +89,14 @@ T
89
89
  cat <<'T'
90
90
  Providers
91
91
 
92
- Claude Code is the default and the only Tier 1 provider.
92
+ Supported providers: claude (Claude Code CLI, or an Anthropic API key through
93
+ the Agent SDK) and opencode (any model, including OpenRouter).
93
94
  loki provider list Providers and install status
94
- loki provider set codex Switch provider (claude, codex, cline, aider, opencode)
95
- loki start ./prd.md --provider cline
95
+ loki provider set opencode Switch provider (claude, opencode)
96
+ loki start ./prd.md --provider opencode
96
97
 
97
- Tier 2: cline. Tier 3 (sequential, degraded): codex, aider. opencode is model-agnostic.
98
+ opencode with OpenRouter: export OPENROUTER_API_KEY=sk-or-..., then
99
+ loki start ./prd.md --provider opencode --model openrouter/<vendor>/<model>
98
100
  T
99
101
  ;;
100
102
  agents)
@@ -216,7 +216,7 @@ def prompt_block(loki_dir):
216
216
  # give, and it survives into every downstream decision the agent makes.
217
217
  #
218
218
  # Measured on the real FireLater run: every iteration rendered "$0.00"
219
- # because codex wrote no usage before v8.51.0. The honesty rule was
219
+ # because that provider wrote no usage before v8.51.0. The honesty rule was
220
220
  # already documented at the top of this file ("reported as null, not as
221
221
  # $0.00") and only the summary path honoured it; the per-iteration line
222
222
  # did not.
@@ -29,7 +29,7 @@
29
29
  # emission fails.
30
30
  # loki_mcp_launch_for -- emit the per-provider MCP launch as one compact JSON
31
31
  # object {"argv":[..],"env":{..}[,"reason":".."]}
32
- # for claude|codex|opencode|cline|aider. Mirror of
32
+ # for claude|opencode. Mirror of
33
33
  # mcpLaunchFor in loki-ts/src/providers/mcp_config.ts;
34
34
  # tests/providers parity test reads both.
35
35
  #
@@ -231,19 +231,19 @@ loki_mcp_config_argv() {
231
231
 
232
232
  # ---------- Per-provider MCP launch (CW-10) ----------
233
233
  # Usage: loki_mcp_launch_for <provider> [target_dir]
234
- # claude: the pre-CW-10 --mcp-config paths, unchanged. codex: `-c mcp_servers.*`
235
- # overrides. opencode: env OPENCODE_CONFIG_CONTENT. cline/aider/unknown: empty
236
- # launch plus a reason. Servers for codex/opencode: Loki bundle, project
234
+ # claude: the pre-CW-10 --mcp-config paths, unchanged. opencode: env
235
+ # OPENCODE_CONFIG_CONTENT. unknown: empty launch plus a reason. Servers for
236
+ # opencode: Loki bundle, project
237
237
  # <target_dir>/.mcp.json only when LOKI_MCP_PROJECT=1, ~/.claude/mcp.json overlay;
238
238
  # bundle wins a name collision, then project over overlay. `${...}` stays literal.
239
239
  loki_mcp_launch_for() {
240
240
  local provider="${1:-}" target="${2:-${TARGET_DIR:-.}}"
241
- local claude_argv="" user_path="" project_path="" lsp_detected=0 lsp_bin cline_ver="unknown" line
241
+ local claude_argv="" user_path="" project_path="" lsp_detected=0 lsp_bin
242
242
  case "$provider" in
243
243
  claude)
244
244
  claude_argv=$(TARGET_DIR="$target" loki_mcp_config_argv) || return 1
245
245
  ;;
246
- codex | opencode)
246
+ opencode)
247
247
  TARGET_DIR="$target" loki_mcp_config_path >/dev/null || return 1
248
248
  user_path=$(loki_user_mcp_config_path)
249
249
  if [ "${LOKI_MCP_PROJECT:-}" = "1" ]; then
@@ -256,16 +256,8 @@ loki_mcp_launch_for() {
256
256
  fi
257
257
  done
258
258
  ;;
259
- cline)
260
- if command -v cline >/dev/null 2>&1; then
261
- line=$(cline --version 2>/dev/null | head -n 1) || line=""
262
- line="${line#"${line%%[![:space:]]*}"}"
263
- line="${line%"${line##*[![:space:]]}"}"
264
- [ -n "$line" ] && cline_ver="$line"
265
- fi
266
- ;;
267
259
  esac
268
- _MCP_PROVIDER="$provider" _MCP_CLAUDE_ARGV="$claude_argv" _MCP_USER="$user_path" _MCP_PROJECT="$project_path" _MCP_LSP="$lsp_detected" _MCP_CLINE_VER="$cline_ver" python3 -c '
260
+ _MCP_PROVIDER="$provider" _MCP_CLAUDE_ARGV="$claude_argv" _MCP_USER="$user_path" _MCP_PROJECT="$project_path" _MCP_LSP="$lsp_detected" python3 -c '
269
261
  import json, os, re
270
262
  prov = os.environ["_MCP_PROVIDER"]
271
263
  NAME = re.compile(r"^[A-Za-z0-9_-]+$")
@@ -322,21 +314,6 @@ def servers():
322
314
  res = {"argv": [], "env": {}}
323
315
  if prov == "claude":
324
316
  res["argv"] = ["--mcp-config"] + os.environ["_MCP_CLAUDE_ARGV"].split()
325
- elif prov == "codex":
326
- skipped = []
327
- for n, s in servers().items():
328
- names = [k for k in s["env"] if NAME.match(k)]
329
- if any(k in res["env"] and res["env"][k] != s["env"][k] for k in names):
330
- skipped.append(n)
331
- continue
332
- res["argv"] += ["-c", "mcp_servers.%s.command=%s" % (n, dumps(s["command"]))]
333
- res["argv"] += ["-c", "mcp_servers.%s.args=%s" % (n, dumps(s["args"]))]
334
- if names:
335
- for k in names:
336
- res["env"][k] = s["env"][k]
337
- res["argv"] += ["-c", "mcp_servers.%s.env_vars=%s" % (n, dumps(names))]
338
- if skipped:
339
- res["reason"] = "mcp: skipped %s (env name conflict)" % ",".join(skipped)
340
317
  elif prov == "opencode":
341
318
  mcp = {}
342
319
  for n, s in servers().items():
@@ -345,10 +322,6 @@ elif prov == "opencode":
345
322
  e["environment"] = s["env"]
346
323
  mcp[n] = e
347
324
  res["env"] = {"OPENCODE_CONFIG_CONTENT": dumps({"mcp": mcp})}
348
- elif prov == "cline":
349
- res["reason"] = "mcp: unsupported (cline %s)" % os.environ["_MCP_CLINE_VER"]
350
- elif prov == "aider":
351
- res["reason"] = "mcp: unsupported (aider has no MCP support)"
352
325
  else:
353
326
  res["reason"] = "mcp: unsupported (provider %s)" % prov
354
327
  print(dumps(res))
@@ -41,18 +41,15 @@ WALK_MAX_ENTRIES = 200000
41
41
 
42
42
  # Provider CLI state the confined process must be able to write. Each entry was
43
43
  # checked against a machine with the CLI installed (~/.claude, ~/.claude.json,
44
- # ~/.codex, ~/.config/opencode, ~/.local/share/opencode, ~/.cache/opencode,
45
- # ~/.cline, ~/.aider*). A trailing * is a prefix glob inside HOME.
44
+ # ~/.config/opencode, ~/.local/share/opencode, ~/.cache/opencode). A trailing *
45
+ # is a prefix glob inside HOME.
46
46
  PROVIDER_WRITE_PATHS: dict[str, tuple[str, ...]] = {
47
47
  "claude": ("~/.claude", "~/.claude.json"),
48
- "codex": ("~/.codex",),
49
48
  "opencode": (
50
49
  "~/.config/opencode",
51
50
  "~/.local/share/opencode",
52
51
  "~/.cache/opencode",
53
52
  ),
54
- "cline": ("~/.cline",),
55
- "aider": ("~/.aider*",),
56
53
  }
57
54
 
58
55
  INSTALL_HINT = {
@@ -67,7 +67,7 @@ EMPTY_TREE_SHA = "4b825dc642cb6eb9a060e54bf8d69288fbee4904"
67
67
  # 9 receipts:
68
68
  #
69
69
  # 8 of 9 carry base_sha="" and head_sha=1385e71c. That commit touches TWO files
70
- # (providers/codex.sh, tests/test-provider-degraded-mode.sh) while the receipts
70
+ # (a provider config and its test) while the receipts
71
71
  # attest to EIGHT including autonomy/telemetry.sh. They are not the same change.
72
72
  # The 9th carries base_sha=4b825dc6 (empty tree) and 4017 files.
73
73
  #
@@ -561,7 +561,7 @@ _lpg_find_git_root() {
561
561
  #
562
562
  # Resolve the per-directory memory/conventions file for the layered doc walker.
563
563
  # Prefers AGENTS.md (the agents.md standard: plain Markdown, nearest-file-wins,
564
- # read natively by Claude Code/Codex/etc.) and falls back to CLAUDE.md only when
564
+ # read natively by Claude Code/opencode/etc.) and falls back to CLAUDE.md only when
565
565
  # AGENTS.md is absent in that directory. The two are never merged. The reader
566
566
  # (_lpg_read_layer / _append_layer) is filename-agnostic, so this is the single
567
567
  # point that decides which file each layer site reads.
@@ -5,7 +5,7 @@
5
5
  { "id": "common", "title": "All paths", "summary": "Needed by every Loki command" },
6
6
  { "id": "claude-cli", "title": "Claude Code CLI path (default, loki start)", "summary": "Loki drives the claude binary you installed and logged in" },
7
7
  { "id": "api-key-sdk", "title": "Anthropic API-key path (Agent SDK, no claude CLI)", "summary": "loki \"<goal>\" runs on the bundled Agent SDK over HTTPS with only a key; no claude CLI and no extra setting" },
8
- { "id": "other-providers", "title": "Other provider CLIs", "summary": "codex (degraded), cline, aider, opencode: any one replaces the claude CLI" }
8
+ { "id": "other-providers", "title": "opencode CLI (any model, including OpenRouter)", "summary": "opencode replaces the claude CLI; with OPENROUTER_API_KEY set it runs openrouter/<vendor>/<model> ids" }
9
9
  ],
10
10
  "requirements": [
11
11
  { "id": "node", "path": "common", "level": "required", "kind": "command", "target": "node", "min": "20.0", "label": "Node.js 20 or newer", "fix": "install Node 20+ from https://nodejs.org" },
@@ -22,9 +22,6 @@
22
22
  { "id": "sdk-binary", "path": "api-key-sdk", "level": "required", "kind": "sdk_binary", "target": "@anthropic-ai/claude-agent-sdk", "label": "Claude Agent SDK platform binary (optional npm dependency)", "fix": "reinstall without --no-optional: npm install -g loki-mode (the SDK is an optionalDependency)" },
23
23
  { "id": "sdk-bun", "path": "api-key-sdk", "level": "required", "kind": "command", "target": "bun", "min": "1.3", "label": "Bun runtime (the SDK loop runs only on the Bun route)", "fix": "reinstall without --no-optional (npm bundles @oven/bun-*) or install from https://bun.sh" },
24
24
 
25
- { "id": "codex", "path": "other-providers", "level": "optional", "kind": "command", "target": "codex", "label": "codex CLI", "fix": "npm install -g @openai/codex" },
26
- { "id": "cline", "path": "other-providers", "level": "optional", "kind": "command", "target": "cline", "label": "cline CLI", "fix": "npm install -g cline" },
27
- { "id": "aider", "path": "other-providers", "level": "optional", "kind": "command", "target": "aider", "label": "aider CLI", "fix": "pip install aider-chat" },
28
25
  { "id": "opencode", "path": "other-providers", "level": "optional", "kind": "command", "target": "opencode", "label": "opencode CLI", "fix": "npm install -g opencode-ai" }
29
26
  ],
30
27
  "missing_optional": [
@@ -150,7 +150,7 @@ loki_skill_link_heal() {
150
150
  fi
151
151
  run_v="$(head -n 1 "$root_p/VERSION" 2>/dev/null | tr -d '[:space:]')"
152
152
 
153
- for rel in .claude .codex .cline .aider; do
153
+ for rel in .claude; do
154
154
  link="$home/$rel/skills/loki-mode"
155
155
  [ -L "$link" ] || continue
156
156
  tgt="$(readlink "$link" 2>/dev/null)" || continue
@@ -21,12 +21,12 @@
21
21
  "command": {"type": "enum", "values": ["--help", "--version", "-h", "-v", "agent", "analyze", "api", "assets", "audit", "bench", "checkpoint", "ci", "cleanup", "cluster", "cockpit", "code", "completion", "completions", "compliance", "compound", "config", "context", "control", "cost", "council", "cp", "crash", "ctx", "dashboard", "demo", "deploy", "docker", "docs", "doctor", "dogfood", "enterprise", "explain", "export", "factory", "failover", "github", "grill", "handoff", "heal", "help", "import", "init", "internal", "issue", "kpis", "logs", "magic", "mcp", "memory", "metrics", "migrate", "modernize", "monitor", "next", "notify", "onboard", "open", "optimize", "otel", "own", "pause", "plan", "preview", "projects", "proof", "provider", "quick", "quickstart", "rc", "receipt", "remote", "report", "reset", "resume", "review", "rollback", "run", "sandbox", "secrets", "secure", "self_update", "self-update", "sentrux", "serve", "setup-skill", "share", "ship", "spec", "start", "state", "stats", "status", "steer", "stop", "syslog", "telemetry", "template", "test", "tour", "trigger", "trust", "trust-metrics", "ultracode", "update", "verify", "version", "voice", "watch", "watchdog", "web", "welcome", "why", "wiki", "worktree", "wow", "wt", "other"]}
22
22
  },
23
23
  "session_start": {
24
- "provider": {"type": "enum", "values": ["claude", "codex", "cline", "aider", "opencode"]},
24
+ "provider": {"type": "enum", "values": ["claude", "opencode"]},
25
25
  "complexity": {"type": "enum", "values": ["simple", "standard", "complex"]},
26
26
  "parallel": {"type": "bool"}
27
27
  },
28
28
  "session_end": {
29
- "provider": {"type": "enum", "values": ["claude", "codex", "cline", "aider", "opencode"]},
29
+ "provider": {"type": "enum", "values": ["claude", "opencode"]},
30
30
  "duration": {"type": "int", "min": 0, "max": 31536000},
31
31
  "iterations": {"type": "int", "min": 0, "max": 100000},
32
32
  "result": {"type": "int", "min": 0, "max": 255}
@@ -68,7 +68,7 @@
68
68
  "duration_s": {"type": "int", "min": 0, "max": 31536000},
69
69
  "fix_rounds": {"type": "int", "min": 0, "max": 1000},
70
70
  "exit_code": {"type": "int", "min": 0, "max": 255},
71
- "provider": {"type": "enum", "values": ["claude", "codex", "cline", "aider", "opencode", "other", "unknown"]},
71
+ "provider": {"type": "enum", "values": ["claude", "opencode", "other", "unknown"]},
72
72
  "model_tier": {"type": "enum", "values": ["fast", "balanced", "deep", "mixed", "unknown"]},
73
73
  "lang_bucket": {"type": "enum", "values": ["python", "javascript", "typescript", "go", "rust", "java", "ruby", "php", "csharp", "c_cpp", "shell", "other"]},
74
74
  "repo_size_bucket": {"type": "enum", "values": ["xs", "s", "m", "l", "xl"]},
@@ -4,7 +4,7 @@ Keeps every paid-call and grounding-guarantee concern in one place so the
4
4
  generator and the ask script behave identically.
5
5
 
6
6
  LLM stub contract (CI-safe, zero paid calls in tests):
7
- LOKI_WIKI_LLM_STUB unset -> call the real provider (claude -p / codex / ...)
7
+ LOKI_WIKI_LLM_STUB unset -> call the real provider (claude -p)
8
8
  via the same mechanism loki docs uses; if no
9
9
  provider is on PATH, return None (callers then
10
10
  fall back to extractive/template output).
@@ -94,9 +94,6 @@ def invoke_llm(prompt, timeout=120, lean=False):
94
94
 
95
95
  cmds = {
96
96
  "claude": ["claude", "-p", prompt],
97
- "codex": ["codex", "exec", "--sandbox", "workspace-write", prompt],
98
- "cline": ["cline", "-y", prompt],
99
- "aider": ["aider", "--message", prompt, "--yes-always", "--no-auto-commits"],
100
97
  }
101
98
  base = cmds.get(provider)
102
99
  if base is None or not _which(base[0]):