loki-mode 11.2.1 → 11.3.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/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/lib/skill-link-heal.sh +78 -1
- package/autonomy/loki +96 -1195
- package/autonomy/provider-offer.sh +4 -4
- package/bin/loki +14 -0
- package/dashboard/__init__.py +1 -1
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/docs/KNOWN-ISSUES.md +0 -1
- package/docs/v10/ADOPTION-PLAN.md +2 -2
- package/docs/v10/FAILURE-CLASSES.md +21 -0
- package/loki-ts/dist/loki.js +724 -702
- package/mcp/__init__.py +1 -1
- package/package.json +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/web-app/dist/assets/{AdminPage-BZ1QNSju.js → AdminPage-D_e45uTw.js} +1 -1
- package/web-app/dist/assets/{Avatar-Dnzzsk2U.js → Avatar-T3nIpoaf.js} +1 -1
- package/web-app/dist/assets/{Badge-DWtsAw6M.js → Badge-BKqb59pP.js} +1 -1
- package/web-app/dist/assets/{Button-zEMFjJEr.js → Button-DjVlkh8_.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-Ddo5Zhnz.js → CockpitPage-DXJgLGmh.js} +1 -1
- package/web-app/dist/assets/{ComparePage-kCkyRrrz.js → ComparePage-BRP_eVc_.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-BZrVi8Ui.js → ErrorBoundary-CLjpGLjC.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-B9eDIWUr.js → EvidenceReceiptPanel-DX-vb4Xy.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-DX5A2UkV.js → GitHubIssuesPanel-214HVHtX.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-DKKxBe6-.js → GitHubPRsPanel-BEiZKc4t.js} +1 -1
- package/web-app/dist/assets/{HomePage-BSn_-fHq.js → HomePage-VvMHS5ga.js} +2 -2
- package/web-app/dist/assets/{LoginPage-C1BGwj0s.js → LoginPage-5WD-v7n3.js} +1 -1
- package/web-app/dist/assets/{MagicPage-B9JJw_BQ.js → MagicPage-DUQT_Jye.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-B-lNQr8Q.js → MetricsPage-lga-z79v.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-DkktBNvI.js → NotFoundPage-CGhBX3G1.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-DUAraQw9.js → ProjectPage-CdzF2GzZ.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-DgMo4QHm.js → ProjectsPage-DRG64N8s.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-fnL3nqGC.js → SettingsPage-5fzW9Frb.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-Bn7rWTXn.js → ShowcasePage-DrTdxO4y.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-DxrytIXT.js → SystemSettingsPage-C9Mqs6Rd.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-BQDC12Mn.js → TeamsPage-CUGPdSWo.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-C_JEygcZ.js → TemplatesPage-CNraDY0F.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-H0584wn0.js → TerminalOutput-BIu_6Pea.js} +1 -1
- package/web-app/dist/assets/{activity-Bse7FP2H.js → activity-Bk-kgqaf.js} +1 -1
- package/web-app/dist/assets/{bell-BMtgCGSW.js → bell-BXmUdmo8.js} +1 -1
- package/web-app/dist/assets/{bot-6SW_XTZN.js → bot-CiuzXxUR.js} +1 -1
- package/web-app/dist/assets/{check-C3f9aTHx.js → check-BEzjXppd.js} +1 -1
- package/web-app/dist/assets/{chevron-left-Bi60XjBc.js → chevron-left-AYWCXHf8.js} +1 -1
- package/web-app/dist/assets/{circle-alert-Bepfb6dn.js → circle-alert-BNg2uSRq.js} +1 -1
- package/web-app/dist/assets/{clock-jQIU5AuJ.js → clock-DTj0kkGT.js} +1 -1
- package/web-app/dist/assets/{cloud-BLZn6J9A.js → cloud-x4nTDBLT.js} +1 -1
- package/web-app/dist/assets/{code-xml-CRgKi92z.js → code-xml-BVh_MLrk.js} +1 -1
- package/web-app/dist/assets/{database-DWg9XT6Y.js → database-DdfBaowG.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-Cfif5nlf.js → dollar-sign-XuYFmAOY.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-DSiLXED8.js → file-code-corner-D4cRnmeL.js} +1 -1
- package/web-app/dist/assets/{file-plus-8lIzYfAS.js → file-plus-CyoVlHc_.js} +1 -1
- package/web-app/dist/assets/{globe-DZkvR077.js → globe-Y6IK2RPW.js} +1 -1
- package/web-app/dist/assets/{hammer-BtQyfpf_.js → hammer-BKzr9VZI.js} +1 -1
- package/web-app/dist/assets/{index-B-uQiPRR.js → index-B20cSx5G.js} +3 -3
- package/web-app/dist/assets/{layers-Dlfo3jwV.js → layers-DebNOhGS.js} +1 -1
- package/web-app/dist/assets/{loader-circle-BQ2hL7m5.js → loader-circle-DyGbrEgd.js} +1 -1
- package/web-app/dist/assets/{lock-LzpJKEAP.js → lock-BKPpyt20.js} +1 -1
- package/web-app/dist/assets/{package-zp-qZxpp.js → package-egF5Wi4y.js} +1 -1
- package/web-app/dist/assets/{plus-CuiDkGsm.js → plus-OiEgKIc-.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-Dx57uk3-.js → refresh-cw-CzKvrONq.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-Bp1YOkM6.js → rotate-ccw-Bu2mII0p.js} +1 -1
- package/web-app/dist/assets/{scroll-text-Dc8LjRT5.js → scroll-text-CSkiyax8.js} +1 -1
- package/web-app/dist/assets/{server-CE0Mzyfz.js → server-DlPthJFw.js} +1 -1
- package/web-app/dist/assets/{shield-alert-DBj71EDP.js → shield-alert-CbpHWQQX.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-C0q9J-0y.js → thumbs-up-DgGpZe-Q.js} +1 -1
- package/web-app/dist/assets/{trash-2-YNPSnz_h.js → trash-2-BV3GlCB-.js} +1 -1
- package/web-app/dist/assets/{trending-down-BlyQB_Gh.js → trending-down-Y4TJtXhD.js} +1 -1
- package/web-app/dist/assets/{trending-up-CStScgAm.js → trending-up-DsDNoHZY.js} +1 -1
- package/web-app/dist/assets/{upload-CLs-rKu9.js → upload-gkThrc_I.js} +1 -1
- package/web-app/dist/assets/{usePolling-BmFkptqQ.js → usePolling-jpNSeNAe.js} +1 -1
- package/web-app/dist/assets/{user-CV0TBz6A.js → user-3Zez1WOK.js} +1 -1
- package/web-app/dist/index.html +1 -1
|
@@ -401,10 +401,10 @@ _provider_gate_emit_blocked() {
|
|
|
401
401
|
|
|
402
402
|
# render_provider_availability: print the "Provider Availability" doctor section.
|
|
403
403
|
#
|
|
404
|
-
# WHY IT LIVES HERE.
|
|
405
|
-
#
|
|
406
|
-
#
|
|
407
|
-
# cannot. This is the same parity-by-construction seam the install offer and the
|
|
404
|
+
# WHY IT LIVES HERE. The provider priority order lives in ONE bash function;
|
|
405
|
+
# doctor (the Bun implementation, loki-ts/src/commands/doctor.ts) calls this
|
|
406
|
+
# rather than carrying a second copy. Two independent renderers drift; one shared
|
|
407
|
+
# renderer cannot. This is the same parity-by-construction seam the install offer and the
|
|
408
408
|
# detect-sdk probe already use, so doctor.ts calls this instead of reimplementing
|
|
409
409
|
# the priority list in TypeScript.
|
|
410
410
|
#
|
package/bin/loki
CHANGED
|
@@ -537,6 +537,20 @@ if [ "${1:-}" = "doctor" ]; then
|
|
|
537
537
|
exec "$BASH_CLI" "$@"
|
|
538
538
|
fi
|
|
539
539
|
done
|
|
540
|
+
# FC-DUP: bun is the single doctor. A crashing or missing Bun route must not
|
|
541
|
+
# leave the user with a stack trace and no verdict, so preflight it here and
|
|
542
|
+
# fall to bash, whose cmd_doctor prints the minimal diagnostic and exits 1.
|
|
543
|
+
# Uses the _loki_bun resolver (PATH, then @oven/bun-*), not bare `command -v`.
|
|
544
|
+
_doctor_bun="$(_loki_bun)"
|
|
545
|
+
if [ -z "$_doctor_bun" ] || [ -z "${BUN_CLI:-}" ]; then
|
|
546
|
+
exec "$BASH_CLI" "$@"
|
|
547
|
+
fi
|
|
548
|
+
_doctor_t=$(command -v timeout || command -v gtimeout || true)
|
|
549
|
+
if [ -n "$_doctor_t" ]; then
|
|
550
|
+
"$_doctor_t" -k 1 5 "$_doctor_bun" "$BUN_CLI" version >/dev/null 2>&1 || exec "$BASH_CLI" "$@"
|
|
551
|
+
else
|
|
552
|
+
"$_doctor_bun" "$BUN_CLI" version >/dev/null 2>&1 || exec "$BASH_CLI" "$@"
|
|
553
|
+
fi
|
|
540
554
|
fi
|
|
541
555
|
|
|
542
556
|
# CLI consolidation (Phase B): `report kpis` is the canonical form of the
|
package/dashboard/__init__.py
CHANGED
package/docs/CLI-REFERENCE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CLI reference
|
|
2
2
|
|
|
3
|
-
Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.
|
|
3
|
+
Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.3.0. Do not edit by hand.
|
|
4
4
|
Hidden and legacy-only commands are omitted; see `docs/v10/CLI-MODERN.md` for the full inventory.
|
|
5
5
|
|
|
6
6
|
| Command | Description |
|
package/docs/INSTALLATION.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The flagship product of [Autonomi](https://www.autonomi.dev/). Loki Mode is a spec-driven autonomous builder with a built-in trust layer that takes any spec to a deployed product and verifies completion with evidence (quality gates plus a completion council), not just a "done" claim. Complete installation instructions for all platforms and use cases.
|
|
4
4
|
|
|
5
|
-
**Version:** v11.
|
|
5
|
+
**Version:** v11.3.0
|
|
6
6
|
|
|
7
7
|
**Engine note:** `loki "<task>"`, `loki owner/repo#N` and `loki quick` run the Loki 10 engine. `loki start` still routes to the legacy engine, which is being removed (planned work resumes 2026-10-07); prefer `loki owner/repo#N`. See [docs/v10/GUIDE.md](v10/GUIDE.md).
|
|
8
8
|
|
package/docs/KNOWN-ISSUES.md
CHANGED
|
@@ -11,7 +11,6 @@ autonomy/loki: line 14066: status: command not found
|
|
|
11
11
|
**Not user-affecting, and not a JSON defect.** stdout is 5176 bytes of valid
|
|
12
12
|
JSON; only stderr is polluted. Every `doctor --json` assertion in the repo
|
|
13
13
|
discards stderr (`tests/test-airgap-commands.sh:50`,
|
|
14
|
-
`tests/test-doctor-blocker-parity.sh:129,132`,
|
|
15
14
|
`tests/test-doctor-ci-gateable.sh:46,84,86`).
|
|
16
15
|
`tests/test-e2e-features.sh:104` was the lone outlier using `2>&1` and has been
|
|
17
16
|
brought into line.
|
|
@@ -235,11 +235,11 @@ Architect: opus. Source: the founder directive (2026-09-30, from building to pro
|
|
|
235
235
|
- The last line is exactly one of:
|
|
236
236
|
- `Ready: <provider> (<model>), receipts signed (kid <8>)`
|
|
237
237
|
- the one blocking reason.
|
|
238
|
-
- Files: loki-ts/src/commands/doctor.ts, autonomy/loki (cmd_doctor only, for bash parity), loki-ts/tests/commands/doctor.test.ts, tests/test-doctor-providers.sh, tests/test-doctor-optional-skill-not-blocking.sh, tests/test-doctor-blocker-parity.sh.
|
|
238
|
+
- Files: loki-ts/src/commands/doctor.ts, autonomy/loki (cmd_doctor only, for bash parity), loki-ts/tests/commands/doctor.test.ts, tests/test-doctor-providers.sh, tests/test-doctor-optional-skill-not-blocking.sh, tests/test-doctor-single-impl.sh (replaces the deleted tests/test-doctor-blocker-parity.sh).
|
|
239
239
|
- Wall check:
|
|
240
240
|
- A HOME with a broken ~/.cline skill symlink and LOKI_PROVIDER=claude: doctor exits 0 and prints one Ready line.
|
|
241
241
|
- With claude missing, it exits non-zero and names the blocker.
|
|
242
|
-
- Commands: `cd loki-ts && bun test tests/commands/doctor.test.ts && cd .. && bash tests/test-doctor-providers.sh && bash tests/test-doctor-optional-skill-not-blocking.sh && bash tests/test-doctor-
|
|
242
|
+
- Commands: `cd loki-ts && bun test tests/commands/doctor.test.ts && cd .. && bash tests/test-doctor-providers.sh && bash tests/test-doctor-optional-skill-not-blocking.sh && bash tests/test-doctor-single-impl.sh`
|
|
243
243
|
- Tier: MEDIUM. Budget: net 0 or less.
|
|
244
244
|
- Depends: A-122 (doctor.ts, autonomy/loki). Wave 3.
|
|
245
245
|
|
|
@@ -344,6 +344,9 @@ L0 review rule (ENGINE-LAWS.md L0): a fix that adds an `if` or a regex about the
|
|
|
344
344
|
- Siblings: swept every place Loki writes an install-time path. Provider skill links ~/.claude, ~/.codex, ~/.cline, ~/.aider skills/loki-mode (all four covered by the shared mechanism); `cmd_remote` ln -sf of the Claude skill link in autonomy/loki (only creates when SKILL.md is absent, covered by the same repair on the next run); shell completions via `completion --postinstall` and the shim (already self-healing, stamped by VERSION in ~/.loki/completions-version); no PATH shims or bin links are written by Loki (the package manager owns bin/loki). Real directories and foreign links are deliberately left to doctor.
|
|
345
345
|
- Mechanism of the fix: autonomy/lib/skill-link-heal.sh `loki_skill_link_heal` repoints a symlink only when its target is a Loki install path (node_modules/loki-mode or a Homebrew loki-mode dir) that is missing or is a different install than the running one, and only when the running root is itself an install path. Atomic temp link plus rename, one stderr line, silent no-op when correct, LOKI_NO_SKILL_LINK_HEAL=1 opts out. Called from bin/loki-postinstall.js (install and upgrade) and the bin/loki shim (first run).
|
|
346
346
|
- Fixture: tests/test-skill-link-heal.sh (dangling, other install, real dir, foreign link, correct link, opt-out, dev checkout), red before autonomy/lib/skill-link-heal.sh existed.
|
|
347
|
+
- Amendment (FC30-DURABLE): the repair repointed to WHATEVER install was running, so a one-off `npx loki-mode@x` or a scratch-prefix install would hijack the user's link to a path that later disappears and dangles again. Rule: repoint only when the running install is durable (under `npm root -g`, the bun global dir, or a Homebrew prefix). An npx cache (_npx), a temp dir or any other prefix is refused with one stderr line and the link is left untouched. The rule lives only in autonomy/lib/skill-link-heal.sh (`_loki_skill_root_durable`); there is no TS copy, and bin/loki-postinstall.js and the bin/loki shim both call it. The check runs only on the repair path, so the steady state stays subprocess-free.
|
|
348
|
+
- Amendment siblings swept: other Loki writers that derive a user-owned path from the running install location: `cmd_remote` ln -sf of the Claude skill link (creates only when SKILL.md is absent; shares the same later repair, no repoint from the running root); shell completions (stamped by VERSION, content not install-path dependent); no PATH shim or bin link is written by Loki. No other self-repair writes from the running root.
|
|
349
|
+
- Amendment fixture: tests/test-skill-link-heal.sh cases 8-12 (npx cache refused, temp or arbitrary prefix refused, brew prefix healed, bun global healed, foreign link untouched), red on the npx and temp cases before the fix (11 passed, 2 failed), with npm stubbed and HOME and HOMEBREW_PREFIX faked.
|
|
347
350
|
|
|
348
351
|
## FC-31 A slice gate skips the suites that guard its own files, and main goes red in Tier B
|
|
349
352
|
- User saw: main 27447cf46 failed Tier B on tests/test-doctor-blocker-parity.sh (run 37697291383). The slice R1-20 (8ff988516) changed loki-ts/src/commands/doctor.ts and gated only on tsc and bun test. The local-ci fast tier had timed out (rc=124) on a loaded host, so no shell suite ran.
|
|
@@ -360,3 +363,21 @@ L0 review rule (ENGINE-LAWS.md L0): a fix that adds an `if` or a regex about the
|
|
|
360
363
|
- Mechanism (this slice, minimal): the parity test discovers greps with `type -ap grep ggrep` (no absolute paths); the three files are added to Dockerfile.control-plane. 11.2.2 follow-up (root fix): replace the hand-maintained COPY list with a directory COPY or a generated list, make CP-04 build the image and import the bundle, and extend scripts/select-tests.sh so a touched tests/*.sh selects the hardcoded-path and structural-checks suites and a loki-ts/src file reachable from packages/control-plane selects CP-04.
|
|
361
364
|
- Siblings swept: tests/test-no-hardcoded-paths.sh scans every tests/ file (3 passed, 0 failed after the fix); the CP-04 closure guard covers every loki-ts/src value import (25 passed, 0 failed); no other hits.
|
|
362
365
|
- Fixture: the two existing guards, red on 6a01413bd and green here.
|
|
366
|
+
|
|
367
|
+
## FC-33 Duplicate implementations kept in sync by tests (FC-DUP)
|
|
368
|
+
- User saw: `loki doctor` printed different checks, counts and verdicts depending on the route (bash vs bun), which `bin/loki` picks from bun on PATH, LOKI_LEGACY_BASH, a missing dist, LOKI_TS_ENTRY or `--airgap`. Two parity tests (test-doctor-blocker-parity.sh, test-doctor-install-integrity-parity.sh) existed only to keep the two copies equal, and each new doctor check had to be written twice. Raw Claude Code has one doctor.
|
|
369
|
+
- Law: L2 (one verdict has one author), L0 (the harness must not hold two answers to one question).
|
|
370
|
+
- Siblings (twin sweep):
|
|
371
|
+
- Command twins and their guards: version, provider, memory (loki-ts/tests/all-ported.test.ts); stats (tests/test-bash-bun-parity.sh check 6); proof verify (loki-ts/tests/proof_verify_parity.test.ts); crash (crash.test.ts:308); status (status.test.ts:398); rollback, trust, wiki (unguarded).
|
|
372
|
+
- Runner twins: run.sh vs loki-ts/src/runner, guarded by test-bash-bun-parity.sh, test-parity-*.sh, the gate-failures-cap parity test and test-pricing-parity. goal_score.ts vs run.sh has NO guard. These collapse when the D57 default-loop flip lands.
|
|
373
|
+
- Mechanism: `_loki_bun_delegate <cmd> "$@"` in autonomy/loki (bun resolved PATH then @oven/bun-*, dist then src, `version` preflight under 5s, then exec). Doctor is the first command moved onto it; bash keeps only a minimal "bun route unavailable" diagnostic. `cmd_control` is the precedent. Remaining twins move onto the same helper as their slices land.
|
|
374
|
+
- Known gap: the delegate preflight only runs `<cli> version`. A throw inside doctor.ts AFTER the CLI loads (during the doctor run itself) is not covered by the preflight and surfaces as that crash, not the minimal fallback.
|
|
375
|
+
- Fixture: tests/test-doctor-single-impl.sh.
|
|
376
|
+
|
|
377
|
+
## FC-34 Test imports a temp copy of src in-process under bun --coverage
|
|
378
|
+
- User saw: Tier B on main 83109bc1a failed in "Bun tests on ubuntu-latest bun=1.3.13" (`cd loki-ts && bun test --coverage`): every test printed (pass), no (fail) line and no summary, the output stopped mid coverage table and the job ended "exit code 1". The table was full of /tmp/loki-rmx-*/src/... rows. Raw view: a green test list with a dead process.
|
|
379
|
+
- Law: L2 (a verdict must be produced by the runner, not lost with it), L0 (the harness must not depend on a reporter surviving deleted files).
|
|
380
|
+
- Cause (measured): loki-ts/tests/engine10/route_matrix_mutation.test.ts (e49c7d29f) copies src into a mkdtemp dir 31 times and route_matrix_lib.ts matrixViolations(root) dynamically imports those copies in the test process; afterAll removes the dirs before the coverage reporter reads them. macOS exits 0 but prints 2170 loki-rmx rows; Linux died after 4 dirs.
|
|
381
|
+
- Siblings swept: grep of loki-ts/tests and loki-ts/test for in-process dynamic imports from tmp/mkdtemp roots and for cpSync tests that import. Only route_matrix_lib.ts (lines 57-60, 178-179) imports from a variable root. graph.test.ts and providers.test.ts copy fixtures, not src; providers.test.ts imports real src inside a spawned script. route_matrix.test.ts passes the real src dir, which coverage tracks normally. No other hits.
|
|
382
|
+
- Mechanism: the mutation test evaluates each copy through `Bun.spawn([process.execPath, route_matrix_child.ts, root])` (no --coverage), reading violations as JSON. A non-zero exit or unparsable output throws, so a crashed child can never pass a red case or the control case vacuously.
|
|
383
|
+
- Fixture: the "FC-34 guard" describe block in loki-ts/tests/engine10/route_matrix_mutation.test.ts (red when the file imports route_matrix_lib in-process or does `await import(join(root` against a temp root; verified red by reverting the fix locally).
|