loki-mode 11.2.1 → 11.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/SKILL.md +2 -2
  2. package/VERSION +1 -1
  3. package/autonomy/loki +96 -1195
  4. package/autonomy/provider-offer.sh +4 -4
  5. package/bin/loki +14 -0
  6. package/dashboard/__init__.py +1 -1
  7. package/docs/CLI-REFERENCE.md +1 -1
  8. package/docs/INSTALLATION.md +1 -1
  9. package/docs/KNOWN-ISSUES.md +0 -1
  10. package/docs/v10/ADOPTION-PLAN.md +2 -2
  11. package/docs/v10/FAILURE-CLASSES.md +10 -0
  12. package/loki-ts/dist/loki.js +723 -701
  13. package/mcp/__init__.py +1 -1
  14. package/package.json +1 -1
  15. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  16. package/web-app/dist/assets/{AdminPage-BZ1QNSju.js → AdminPage-C-iMLNxe.js} +1 -1
  17. package/web-app/dist/assets/{Avatar-Dnzzsk2U.js → Avatar-C7VUvwsO.js} +1 -1
  18. package/web-app/dist/assets/{Badge-DWtsAw6M.js → Badge-tGvQEhnw.js} +1 -1
  19. package/web-app/dist/assets/{Button-zEMFjJEr.js → Button-_iHlH_yL.js} +1 -1
  20. package/web-app/dist/assets/{CockpitPage-Ddo5Zhnz.js → CockpitPage-J_nNjbcR.js} +1 -1
  21. package/web-app/dist/assets/{ComparePage-kCkyRrrz.js → ComparePage-B05ui6Xt.js} +1 -1
  22. package/web-app/dist/assets/{ErrorBoundary-BZrVi8Ui.js → ErrorBoundary-Bxex6DLn.js} +1 -1
  23. package/web-app/dist/assets/{EvidenceReceiptPanel-B9eDIWUr.js → EvidenceReceiptPanel-BsgWfdD1.js} +1 -1
  24. package/web-app/dist/assets/{GitHubIssuesPanel-DX5A2UkV.js → GitHubIssuesPanel-DZBhZ8_X.js} +1 -1
  25. package/web-app/dist/assets/{GitHubPRsPanel-DKKxBe6-.js → GitHubPRsPanel-BaxlAl6R.js} +1 -1
  26. package/web-app/dist/assets/{HomePage-BSn_-fHq.js → HomePage-mVJvzqbF.js} +2 -2
  27. package/web-app/dist/assets/{LoginPage-C1BGwj0s.js → LoginPage-B0zd4A_G.js} +1 -1
  28. package/web-app/dist/assets/{MagicPage-B9JJw_BQ.js → MagicPage-DXLQ-y_R.js} +1 -1
  29. package/web-app/dist/assets/{MetricsPage-B-lNQr8Q.js → MetricsPage-CLS34Xvr.js} +1 -1
  30. package/web-app/dist/assets/{NotFoundPage-DkktBNvI.js → NotFoundPage-BXG8PbNV.js} +1 -1
  31. package/web-app/dist/assets/{ProjectPage-DUAraQw9.js → ProjectPage-D3kFFC0F.js} +3 -3
  32. package/web-app/dist/assets/{ProjectsPage-DgMo4QHm.js → ProjectsPage-2bFn-gnC.js} +1 -1
  33. package/web-app/dist/assets/{SettingsPage-fnL3nqGC.js → SettingsPage-CBM0ziWE.js} +1 -1
  34. package/web-app/dist/assets/{ShowcasePage-Bn7rWTXn.js → ShowcasePage-BTaXhjI3.js} +1 -1
  35. package/web-app/dist/assets/{SystemSettingsPage-DxrytIXT.js → SystemSettingsPage-BrC2hyAr.js} +1 -1
  36. package/web-app/dist/assets/{TeamsPage-BQDC12Mn.js → TeamsPage-oqxdbVbY.js} +1 -1
  37. package/web-app/dist/assets/{TemplatesPage-C_JEygcZ.js → TemplatesPage-CEbUIY21.js} +1 -1
  38. package/web-app/dist/assets/{TerminalOutput-H0584wn0.js → TerminalOutput-aIoWLbJA.js} +1 -1
  39. package/web-app/dist/assets/{activity-Bse7FP2H.js → activity-CPyi45gt.js} +1 -1
  40. package/web-app/dist/assets/{bell-BMtgCGSW.js → bell-BhaNBaJp.js} +1 -1
  41. package/web-app/dist/assets/{bot-6SW_XTZN.js → bot-Da8REaEP.js} +1 -1
  42. package/web-app/dist/assets/{check-C3f9aTHx.js → check-DPj99ArM.js} +1 -1
  43. package/web-app/dist/assets/{chevron-left-Bi60XjBc.js → chevron-left-CkxonN0X.js} +1 -1
  44. package/web-app/dist/assets/{circle-alert-Bepfb6dn.js → circle-alert-C0JkB1y5.js} +1 -1
  45. package/web-app/dist/assets/{clock-jQIU5AuJ.js → clock-COzFIiWi.js} +1 -1
  46. package/web-app/dist/assets/{cloud-BLZn6J9A.js → cloud-bjkac4kn.js} +1 -1
  47. package/web-app/dist/assets/{code-xml-CRgKi92z.js → code-xml-hlKlvXUJ.js} +1 -1
  48. package/web-app/dist/assets/{database-DWg9XT6Y.js → database-D555S5Km.js} +1 -1
  49. package/web-app/dist/assets/{dollar-sign-Cfif5nlf.js → dollar-sign-CVcApzcD.js} +1 -1
  50. package/web-app/dist/assets/{file-code-corner-DSiLXED8.js → file-code-corner-UORaMIcO.js} +1 -1
  51. package/web-app/dist/assets/{file-plus-8lIzYfAS.js → file-plus-ALJtDoI2.js} +1 -1
  52. package/web-app/dist/assets/{globe-DZkvR077.js → globe-CPlrM_IC.js} +1 -1
  53. package/web-app/dist/assets/{hammer-BtQyfpf_.js → hammer-qaGZHpja.js} +1 -1
  54. package/web-app/dist/assets/{index-B-uQiPRR.js → index-BcXljIAO.js} +3 -3
  55. package/web-app/dist/assets/{layers-Dlfo3jwV.js → layers-BV8R9VUK.js} +1 -1
  56. package/web-app/dist/assets/{loader-circle-BQ2hL7m5.js → loader-circle-6TlDS9Tu.js} +1 -1
  57. package/web-app/dist/assets/{lock-LzpJKEAP.js → lock-B9t6oWI0.js} +1 -1
  58. package/web-app/dist/assets/{package-zp-qZxpp.js → package-2gEUAtZJ.js} +1 -1
  59. package/web-app/dist/assets/{plus-CuiDkGsm.js → plus-DXocxPjU.js} +1 -1
  60. package/web-app/dist/assets/{refresh-cw-Dx57uk3-.js → refresh-cw-D3dWHBd6.js} +1 -1
  61. package/web-app/dist/assets/{rotate-ccw-Bp1YOkM6.js → rotate-ccw-CvuWqaSB.js} +1 -1
  62. package/web-app/dist/assets/{scroll-text-Dc8LjRT5.js → scroll-text-ktmD_xJY.js} +1 -1
  63. package/web-app/dist/assets/{server-CE0Mzyfz.js → server-E7pZtj5A.js} +1 -1
  64. package/web-app/dist/assets/{shield-alert-DBj71EDP.js → shield-alert-968j9z0V.js} +1 -1
  65. package/web-app/dist/assets/{thumbs-up-C0q9J-0y.js → thumbs-up-Tz_8rpU_.js} +1 -1
  66. package/web-app/dist/assets/{trash-2-YNPSnz_h.js → trash-2-Drh9IIj8.js} +1 -1
  67. package/web-app/dist/assets/{trending-down-BlyQB_Gh.js → trending-down-DCQXtVSL.js} +1 -1
  68. package/web-app/dist/assets/{trending-up-CStScgAm.js → trending-up-BIiwQbWV.js} +1 -1
  69. package/web-app/dist/assets/{upload-CLs-rKu9.js → upload-sCbPkfmy.js} +1 -1
  70. package/web-app/dist/assets/{usePolling-BmFkptqQ.js → usePolling-BMIg6ZVT.js} +1 -1
  71. package/web-app/dist/assets/{user-CV0TBz6A.js → user-kGzXC3V2.js} +1 -1
  72. 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. `loki doctor` stdout is compared byte for byte between the
405
- # bash route and the Bun route (tests/test-doctor-blocker-parity.sh, and the
406
- # bun-parity workflow). Two independent renderers drift; one shared renderer
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
@@ -7,7 +7,7 @@ Modules:
7
7
  control: Session control API (start/stop/pause/resume)
8
8
  """
9
9
 
10
- __version__ = "11.2.1"
10
+ __version__ = "11.2.2"
11
11
 
12
12
  # Expose the control app for easy import
13
13
  try:
@@ -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.2.1. Do not edit by hand.
3
+ Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.2.2. 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 |
@@ -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.2.1
5
+ **Version:** v11.2.2
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
 
@@ -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-blocker-parity.sh`
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
 
@@ -360,3 +360,13 @@ L0 review rule (ENGINE-LAWS.md L0): a fix that adds an `if` or a regex about the
360
360
  - 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
361
  - 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
362
  - Fixture: the two existing guards, red on 6a01413bd and green here.
363
+
364
+ ## FC-33 Duplicate implementations kept in sync by tests (FC-DUP)
365
+ - 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.
366
+ - Law: L2 (one verdict has one author), L0 (the harness must not hold two answers to one question).
367
+ - Siblings (twin sweep):
368
+ - 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).
369
+ - 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.
370
+ - 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.
371
+ - 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.
372
+ - Fixture: tests/test-doctor-single-impl.sh.