loki-mode 11.120.1 → 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.
- package/.github/actions/issue-to-pr/action.yml +1 -1
- package/README.md +3 -2
- package/SKILL.md +16 -19
- package/VERSION +1 -1
- package/agents/custom_agents.py +1 -1
- package/api/openapi.yaml +3 -7
- package/api/routes/health.ts +5 -10
- package/api/routes/sessions.ts +12 -3
- package/api/server.js +6 -2
- package/api/services/cli-bridge.ts +1 -1
- package/api/types/api.ts +3 -5
- package/assets/welcome/welcome.html +1 -1
- package/autonomy/completion-council.sh +0 -52
- package/autonomy/context-tracker.py +10 -25
- package/autonomy/council-v2.sh +0 -28
- package/autonomy/grill.sh +3 -25
- package/autonomy/lib/chat.sh +3 -6
- package/autonomy/lib/claude-flags.sh +1 -1
- package/autonomy/lib/cost-summary.py +2 -2
- package/autonomy/lib/done-recognition.sh +1 -1
- package/autonomy/lib/efficiency_cost.py +1 -1
- package/autonomy/lib/effort_estimator.py +0 -4
- package/autonomy/lib/help-core.sh +6 -4
- package/autonomy/lib/iteration_attribution.py +1 -1
- package/autonomy/lib/mcp-config.sh +7 -34
- package/autonomy/lib/os_sandbox.py +2 -5
- package/autonomy/lib/outcome_ledger.py +1 -1
- package/autonomy/lib/project-graph.sh +1 -1
- package/autonomy/lib/setup-requirements.json +1 -4
- package/autonomy/lib/skill-link-heal.sh +1 -1
- package/autonomy/lib/telemetry-schema.json +3 -3
- package/autonomy/lib/wiki_llm.py +1 -4
- package/autonomy/loki +95 -335
- package/autonomy/migration-agents.sh +1 -1
- package/autonomy/prd-checklist.sh +1 -1
- package/autonomy/provider-offer.sh +7 -11
- package/autonomy/quickstart.sh +3 -11
- package/autonomy/route.sh +6 -6
- package/autonomy/run.sh +51 -291
- package/autonomy/sandbox.sh +8 -39
- package/autonomy/setup-wizard.sh +5 -5
- package/bin/loki +34 -25
- package/completions/_loki +4 -4
- package/completions/loki.bash +2 -4
- package/dashboard/__init__.py +1 -1
- package/dashboard/api_start.py +36 -6
- package/dashboard/build_supervisor.py +1 -5
- package/dashboard/server.py +18 -26
- package/docs/ARCHITECTURE.md +9 -10
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/COMPARE-OPENCODE.md +7 -6
- package/docs/COMPONENTS.md +5 -8
- package/docs/DOCKER.md +11 -10
- package/docs/INSTALLATION.md +5 -8
- package/docs/OPEN-CORE-BOUNDARY.md +1 -1
- package/docs/PRIVACY.md +2 -2
- package/docs/QUICKSTART.md +2 -2
- package/docs/TOOLS.md +3 -3
- package/docs/air-gapped.md +3 -3
- package/docs/alternative-installations.md +20 -10
- package/docs/cost-controls.md +0 -3
- package/docs/dev/architecture-reference.md +1 -1
- package/docs/dev/project-structure.md +1 -4
- package/docs/environment-variables.md +8 -10
- package/docs/exit-codes.md +5 -5
- package/docs/network-security.md +3 -6
- package/docs/v10/GUIDE.md +45 -34
- package/integrations/openclaw/README.md +1 -1
- package/integrations/openclaw/SKILL.md +3 -3
- package/learning/emit.sh +1 -1
- package/loki-ts/data/child-env.json +0 -8
- package/loki-ts/dist/cockpit.js +1 -1
- package/loki-ts/dist/loki.js +1339 -1345
- package/magic/core/debate.py +4 -11
- package/magic/core/generator.py +5 -18
- package/mcp/__init__.py +1 -1
- package/mcp/server.py +1 -1
- package/package.json +2 -3
- package/packages/control-plane/dist/ask-tools-server.js +1 -3
- package/packages/control-plane/dist/server.js +171 -395
- package/packages/control-plane/src/ask/invoke.ts +5 -13
- package/packages/control-plane/src/ask/parse.ts +3 -25
- package/packages/control-plane/src/ask/worker.ts +1 -2
- package/packages/control-plane/src/db/fixture-cleanup.ts +1 -1
- package/packages/control-plane/src/server/routes/ask.ts +3 -2
- package/packages/control-plane/src/server/routes/cost_ledger.ts +0 -1
- package/packages/control-plane/src/server/routes/providers.ts +4 -9
- package/packages/control-plane/src/server/spawn.ts +8 -4
- package/packages/control-plane/ui/dist/assets/{index-C4nb1aRV.js → index-Dy80VLtj.js} +22 -22
- package/packages/control-plane/ui/dist/index.html +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/providers/loader.sh +23 -4
- package/providers/model_catalog.json +2 -104
- package/providers/models.sh +10 -11
- package/providers/opencode.sh +3 -6
- package/references/quality-control.md +1 -1
- package/schemas/loki-yaml.schema.json +1 -1
- package/skills/model-selection.md +26 -55
- package/skills/providers.md +54 -221
- package/skills/quality-gates.md +3 -3
- package/skills/troubleshooting.md +1 -1
- package/src/integrations/github/action-handler.js +2 -4
- package/src/protocols/tools/start-project.js +1 -1
- package/tools/index-codebase.py +1 -2
- package/tools/preflight.sh +2 -2
- package/tools/probe-model-catalog.py +1 -13
- package/tools/regen-state-machine-refs.py +1 -2
- package/tools/token-guard.py +1 -1
- package/web-app/dist/assets/{AdminPage-CSwrd2UA.js → AdminPage-BfxkhFXl.js} +1 -1
- package/web-app/dist/assets/{Avatar-B6SmKtXt.js → Avatar-xV4rK0ps.js} +1 -1
- package/web-app/dist/assets/{Badge-CR4U3l95.js → Badge-Ds_E82Ka.js} +1 -1
- package/web-app/dist/assets/{Button-DmcHmlo6.js → Button-BXAwY0ni.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-CR_GmqRg.js → CockpitPage-y3R9sk_M.js} +1 -1
- package/web-app/dist/assets/ComparePage-BGbCno4C.js +1 -0
- package/web-app/dist/assets/{ErrorBoundary-23WE8Kb8.js → ErrorBoundary-DGqkzHdy.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-dFODI74J.js → EvidenceReceiptPanel-Bj57TWoJ.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-CudHcPXf.js → GitHubIssuesPanel-CVbtUCRI.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-0WcASaRW.js → GitHubPRsPanel-DuNxI0k8.js} +1 -1
- package/web-app/dist/assets/{HomePage-CQL8xADH.js → HomePage-DogFuRvt.js} +2 -2
- package/web-app/dist/assets/{LoginPage-BRfdWXgI.js → LoginPage-U-r-YNKC.js} +1 -1
- package/web-app/dist/assets/{MagicPage-CaaPZyuJ.js → MagicPage-C5iDqK4d.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-BjQ0sz0F.js → MetricsPage-COVYOGfr.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-BNnrwX96.js → NotFoundPage-CZii6Z0s.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-pDqfWbBG.js → ProjectPage-QwOZzVqj.js} +25 -25
- package/web-app/dist/assets/{ProjectsPage-CiHCZYVm.js → ProjectsPage-BcxVfXVW.js} +1 -1
- package/web-app/dist/assets/SettingsPage-CBY9JiAE.js +10 -0
- package/web-app/dist/assets/{ShowcasePage-BCa643R5.js → ShowcasePage-D1YPQOp7.js} +1 -1
- package/web-app/dist/assets/SystemSettingsPage-DcpAC9Lg.js +1 -0
- package/web-app/dist/assets/{TeamsPage-CG-DqMjn.js → TeamsPage-BTiJPkD4.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-CO_kXHRt.js → TemplatesPage-LUa3bH-A.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-C_iYHB-7.js → TerminalOutput-BM8LH-RG.js} +1 -1
- package/web-app/dist/assets/{activity-Cp6ZIiZc.js → activity-mZHuLoR5.js} +1 -1
- package/web-app/dist/assets/{bell-BZf6hsa9.js → bell-BR_y_nMB.js} +1 -1
- package/web-app/dist/assets/{bot-CGmNbYLx.js → bot-Ct3caGMX.js} +1 -1
- package/web-app/dist/assets/{check-CMDDpUDY.js → check-DuQpq9PN.js} +1 -1
- package/web-app/dist/assets/{chevron-left-DTtdfTHr.js → chevron-left-CWSfVWba.js} +1 -1
- package/web-app/dist/assets/{circle-alert-Ch6h3j52.js → circle-alert-C7TCj9Jm.js} +1 -1
- package/web-app/dist/assets/{clock-Ce1nf2ai.js → clock-BFsj3bRT.js} +1 -1
- package/web-app/dist/assets/{cloud-p2TFekpg.js → cloud-78sYPXff.js} +1 -1
- package/web-app/dist/assets/{code-xml-Kyu4vmM1.js → code-xml-DuwBCDz-.js} +1 -1
- package/web-app/dist/assets/{database-B4HrqS9b.js → database-CwRTYKVV.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-Cw-uyKAg.js → dollar-sign-COXAsjgd.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-C8N3vuAd.js → file-code-corner-A8LPVBBy.js} +1 -1
- package/web-app/dist/assets/{file-plus-Ddd367Rd.js → file-plus-D9IXE7YW.js} +1 -1
- package/web-app/dist/assets/{globe-BW_Nzcek.js → globe-Ce6xgdLR.js} +1 -1
- package/web-app/dist/assets/{hammer-rS0zwOgP.js → hammer-Dtq836Al.js} +1 -1
- package/web-app/dist/assets/{index-BFtUVrg2.js → index-uce16-nn.js} +16 -16
- package/web-app/dist/assets/{layers-ChTtsWHz.js → layers-BOQdqOXk.js} +1 -1
- package/web-app/dist/assets/{loader-circle-Dl2j378Y.js → loader-circle-D3y4SHAn.js} +1 -1
- package/web-app/dist/assets/{lock-H0jwxcaH.js → lock-miFONHLo.js} +1 -1
- package/web-app/dist/assets/{package-Cn0OyUWi.js → package-ckZFIHTG.js} +1 -1
- package/web-app/dist/assets/{plus-c4Cn8Hg_.js → plus-COJKSbOp.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-CvtIp31h.js → refresh-cw-rPt-Oa4a.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-CACNVELf.js → rotate-ccw-Dy50K31A.js} +1 -1
- package/web-app/dist/assets/{scroll-text-wcpAN4zz.js → scroll-text-CbczPkkS.js} +1 -1
- package/web-app/dist/assets/{server-C8tiYYoH.js → server-HkfTEf2O.js} +1 -1
- package/web-app/dist/assets/{shield-alert-D2EqAn5F.js → shield-alert-DjKF0yba.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-DoxGQgUE.js → thumbs-up-aObjUDQm.js} +1 -1
- package/web-app/dist/assets/{trash-2-HbLfFoN4.js → trash-2-CQfI6Z-c.js} +1 -1
- package/web-app/dist/assets/{trending-down-Djd4tkxi.js → trending-down-CP7J5aPV.js} +1 -1
- package/web-app/dist/assets/{trending-up-B9Nco_QQ.js → trending-up-CTJHoPnm.js} +1 -1
- package/web-app/dist/assets/{upload-Bu_bR4UG.js → upload-i1zoXd2k.js} +1 -1
- package/web-app/dist/assets/{usePolling-D6jTTEO8.js → usePolling-CZG-IV1Y.js} +1 -1
- package/web-app/dist/assets/{user-3vyW2Iwk.js → user-CJwbwmPE.js} +1 -1
- package/web-app/dist/index.html +1 -1
- package/web-app/server.py +26 -14
- package/autonomy/lib/codex-usage.py +0 -174
- package/providers/aider.sh +0 -191
- package/providers/cline.sh +0 -176
- package/providers/codex.sh +0 -408
- package/web-app/dist/assets/ComparePage-DH9gwrob.js +0 -1
- package/web-app/dist/assets/SettingsPage-B-1-R56L.js +0 -10
- 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:
|
|
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.
|
|
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
|
-
#
|
|
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 (
|
|
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
|
|
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
|
|
95
|
-
loki start ./prd.md --provider
|
|
95
|
+
loki provider set opencode Switch provider (claude, opencode)
|
|
96
|
+
loki start ./prd.md --provider opencode
|
|
96
97
|
|
|
97
|
-
|
|
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
|
|
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|
|
|
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.
|
|
235
|
-
#
|
|
236
|
-
#
|
|
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
|
|
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
|
-
|
|
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"
|
|
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
|
-
# ~/.
|
|
45
|
-
#
|
|
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
|
-
# (
|
|
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/
|
|
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": "
|
|
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
|
|
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", "
|
|
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", "
|
|
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", "
|
|
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"]},
|
package/autonomy/lib/wiki_llm.py
CHANGED
|
@@ -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
|
|
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]):
|