loki-mode 10.5.20 → 10.5.22

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 (73) hide show
  1. package/README.md +3 -2
  2. package/SKILL.md +2 -2
  3. package/VERSION +1 -1
  4. package/autonomy/loki +19 -5
  5. package/bin/loki +67 -20
  6. package/completions/_loki +1 -0
  7. package/completions/loki.bash +2 -2
  8. package/dashboard/__init__.py +1 -1
  9. package/docs/INSTALLATION.md +1 -1
  10. package/docs/exit-codes.md +10 -1
  11. package/docs/v10/GUIDE.md +58 -26
  12. package/docs/v10/PROGRESS.md +13 -0
  13. package/loki-ts/dist/loki.js +445 -435
  14. package/mcp/__init__.py +1 -1
  15. package/package.json +1 -1
  16. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  17. package/web-app/dist/assets/{AdminPage-HjtApbcL.js → AdminPage-D8w0ab3X.js} +1 -1
  18. package/web-app/dist/assets/{Avatar-BcwLENsU.js → Avatar-DdlzHGiT.js} +1 -1
  19. package/web-app/dist/assets/{Badge-DjJhHJj0.js → Badge-CsOY5IHf.js} +1 -1
  20. package/web-app/dist/assets/{Button-CSMstrCz.js → Button-OEb0K5fU.js} +1 -1
  21. package/web-app/dist/assets/{CockpitPage-BHihN-aq.js → CockpitPage-P1_J2yY7.js} +1 -1
  22. package/web-app/dist/assets/{ComparePage-_6JtexDp.js → ComparePage-Dz0OF3rY.js} +1 -1
  23. package/web-app/dist/assets/{ErrorBoundary-Cx2fnw3q.js → ErrorBoundary-BG1SdbI9.js} +1 -1
  24. package/web-app/dist/assets/{EvidenceReceiptPanel-DcUQAnju.js → EvidenceReceiptPanel-qXiSbX0T.js} +1 -1
  25. package/web-app/dist/assets/{GitHubIssuesPanel-1dYpQ5Rx.js → GitHubIssuesPanel-kZVIqzjB.js} +1 -1
  26. package/web-app/dist/assets/{GitHubPRsPanel-BPdDD1kX.js → GitHubPRsPanel-A0svwIEt.js} +1 -1
  27. package/web-app/dist/assets/{HomePage-JfmwLGnQ.js → HomePage-BTxHfUUb.js} +2 -2
  28. package/web-app/dist/assets/{LoginPage-7SnMHzPc.js → LoginPage-BWWcRTXF.js} +1 -1
  29. package/web-app/dist/assets/{MagicPage-C0IkoOzD.js → MagicPage-CKNpFDUR.js} +1 -1
  30. package/web-app/dist/assets/{MetricsPage-BJOZ0L3F.js → MetricsPage-DE7UEUGs.js} +1 -1
  31. package/web-app/dist/assets/{NotFoundPage-S49UjLyW.js → NotFoundPage-CKIOD5Ys.js} +1 -1
  32. package/web-app/dist/assets/{ProjectPage-Dj_nv2kT.js → ProjectPage-BDryei4O.js} +3 -3
  33. package/web-app/dist/assets/{ProjectsPage-C7thLjOm.js → ProjectsPage-D4JoaMkL.js} +1 -1
  34. package/web-app/dist/assets/{SettingsPage-DEcJyfsU.js → SettingsPage-BQYk2vHL.js} +1 -1
  35. package/web-app/dist/assets/{ShowcasePage-B5PshXNg.js → ShowcasePage-CXRhoXei.js} +1 -1
  36. package/web-app/dist/assets/{SystemSettingsPage-Cnp4BkN7.js → SystemSettingsPage-dapwsrQo.js} +1 -1
  37. package/web-app/dist/assets/{TeamsPage-1ImpgMzs.js → TeamsPage-Co5_ARDw.js} +1 -1
  38. package/web-app/dist/assets/{TemplatesPage-BOYKrPX8.js → TemplatesPage-CnCLNDS8.js} +1 -1
  39. package/web-app/dist/assets/{TerminalOutput-LPxzwfwm.js → TerminalOutput-BZxTHYwT.js} +1 -1
  40. package/web-app/dist/assets/{activity-Hl7iDpX_.js → activity-B43aIno-.js} +1 -1
  41. package/web-app/dist/assets/{bell-DrBfjAq4.js → bell-DMzWO8la.js} +1 -1
  42. package/web-app/dist/assets/{bot-6SoklKaZ.js → bot-B8WyaOPt.js} +1 -1
  43. package/web-app/dist/assets/{check-DhHuZH8k.js → check-DfMG8EL7.js} +1 -1
  44. package/web-app/dist/assets/{chevron-left-BUERGaLO.js → chevron-left-DqQV0gcd.js} +1 -1
  45. package/web-app/dist/assets/{circle-alert-D7UOw5bc.js → circle-alert-7GFVd60S.js} +1 -1
  46. package/web-app/dist/assets/{clock-t3v_i7fP.js → clock-BDKw1_R8.js} +1 -1
  47. package/web-app/dist/assets/{cloud-CP3eLZts.js → cloud-D3s4vkR1.js} +1 -1
  48. package/web-app/dist/assets/{code-xml-DU-CmwVx.js → code-xml-V_GOUJ82.js} +1 -1
  49. package/web-app/dist/assets/{database-J27fE_Ot.js → database-B9oHux-i.js} +1 -1
  50. package/web-app/dist/assets/{dollar-sign-BdU_HR9C.js → dollar-sign-C2JeiZKd.js} +1 -1
  51. package/web-app/dist/assets/{file-code-corner-Cu4A1aIH.js → file-code-corner-CkqFpKah.js} +1 -1
  52. package/web-app/dist/assets/{file-plus-BTli76r5.js → file-plus-DbNKpj5U.js} +1 -1
  53. package/web-app/dist/assets/{globe-Bz3m1c_-.js → globe-NgUZ94HR.js} +1 -1
  54. package/web-app/dist/assets/{hammer-HNN6jr92.js → hammer-BMDwR3rq.js} +1 -1
  55. package/web-app/dist/assets/{index-CgK4xqUy.js → index-DqLaggNg.js} +3 -3
  56. package/web-app/dist/assets/{layers-DhuXUuM6.js → layers-JrA9gfn-.js} +1 -1
  57. package/web-app/dist/assets/{loader-circle-CeBjdh2y.js → loader-circle-D3Re-zBz.js} +1 -1
  58. package/web-app/dist/assets/{lock-DjSqmIVZ.js → lock-Dzt5MqiP.js} +1 -1
  59. package/web-app/dist/assets/{package-NL0AdpIi.js → package-dKDrYcHV.js} +1 -1
  60. package/web-app/dist/assets/{plus-Lbz3hom-.js → plus-P6H35lZz.js} +1 -1
  61. package/web-app/dist/assets/{refresh-cw-uKARwuER.js → refresh-cw-DpmPbMhN.js} +1 -1
  62. package/web-app/dist/assets/{rotate-ccw-ByA6XJq1.js → rotate-ccw-DdkhV-ED.js} +1 -1
  63. package/web-app/dist/assets/{scroll-text-BV8Blxig.js → scroll-text-C7dHDNJR.js} +1 -1
  64. package/web-app/dist/assets/{server-Cy3R5hde.js → server-D7SziIKB.js} +1 -1
  65. package/web-app/dist/assets/{shield-alert-rE_xXx7r.js → shield-alert-B86sjYoT.js} +1 -1
  66. package/web-app/dist/assets/{thumbs-up-CNMITZHD.js → thumbs-up-C5Y3O7Ik.js} +1 -1
  67. package/web-app/dist/assets/{trash-2-BP3Rr5SU.js → trash-2-ByEJRbuH.js} +1 -1
  68. package/web-app/dist/assets/{trending-down-BE_8lCjD.js → trending-down-Dc44T-Va.js} +1 -1
  69. package/web-app/dist/assets/{trending-up-CF6E9-9a.js → trending-up-DwB8jgl2.js} +1 -1
  70. package/web-app/dist/assets/{upload-D-Ui4N6K.js → upload-DyaOVrs9.js} +1 -1
  71. package/web-app/dist/assets/{usePolling-DIVX97OV.js → usePolling-B4pACToJ.js} +1 -1
  72. package/web-app/dist/assets/{user-7rTiTfDj.js → user-BgUGFZBV.js} +1 -1
  73. package/web-app/dist/index.html +1 -1
package/README.md CHANGED
@@ -48,6 +48,7 @@ Upgrade with `loki self-update`. Long form: [Installation Guide](docs/INSTALLATI
48
48
  ```bash
49
49
  export ANTHROPIC_API_KEY=sk-...
50
50
  loki doctor
51
+ loki quick "fix the login bug" # one small task on the Loki 10 engine
51
52
  ```
52
53
 
53
54
  <details>
@@ -71,9 +72,9 @@ loki-seal is a Claude Code Stop hook that runs your repo's real test suite when
71
72
 
72
73
  ## Loki 10 engine
73
74
 
74
- Opt-in: set LOKI_ENGINE=v10 <!-- loki10-default -->
75
+ Default: Loki 10 engine for `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"`. Set LOKI_ENGINE=legacy or run `loki legacy <args>` for the previous engine. <!-- loki10-default -->
75
76
 
76
- Loki 10 is the rewritten engine. It is not the default yet: with `LOKI_ENGINE` unset, `loki` runs the [legacy engine](#legacy-engine-reference) exactly as before. A default flip is in flight; this section describes what `main` does today (`bin/loki` routes to the v10 engine only when `LOKI_ENGINE=v10` is set). Guide, provider table and summary format: [docs/v10/GUIDE.md](docs/v10/GUIDE.md).
77
+ Loki 10 is the rewritten engine and the default for tasks, issue mode and `quick`; `status`, `verify` and `dashboard` use it when `LOKI_ENGINE=v10` is set. Guide, provider table and summary format: [docs/v10/GUIDE.md](docs/v10/GUIDE.md).
77
78
 
78
79
  ```
79
80
  LOKI_ENGINE=v10 loki "fix the login redirect loop" --no-pr
package/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: loki-mode
3
3
  description: An autonomous software factory that knows what it is supposed to deliver, and proves it did. Use when the user says Loki Mode or asks to build, fix or verify software autonomously.
4
4
  ---
5
5
 
6
- # Loki Mode v10.5.20
6
+ # Loki Mode v10.5.22
7
7
 
8
8
  **You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
9
9
 
@@ -470,4 +470,4 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
470
470
 
471
471
  ---
472
472
 
473
- **v10.5.20 | [Autonomi](https://www.autonomi.dev/) flagship product | ~410 lines core**
473
+ **v10.5.22 | [Autonomi](https://www.autonomi.dev/) flagship product | ~410 lines core**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 10.5.20
1
+ 10.5.22
package/autonomy/loki CHANGED
@@ -1606,7 +1606,9 @@ show_help() {
1606
1606
  echo " loki doctor Check your setup is ready (a few seconds)"
1607
1607
  echo " loki quickstart Guided first build from your idea (no PRD needed)"
1608
1608
  echo " loki start ./prd.md Build from a spec (PRD file, GitHub/GitLab/Jira/Azure issue, or no arg)"
1609
- echo " quickstart = guided first build; quick = one small task (3 iters max)."
1609
+ echo " quickstart = guided first build; quick = one small task (Loki 10 engine, no PR)."
1610
+ echo " loki \"<task>\", loki owner/repo#N and loki quick run on the Loki 10 engine by default."
1611
+ echo " Previous engine: set LOKI_ENGINE=legacy or run 'loki legacy <args>'."
1610
1612
  echo " Docs: https://github.com/asklokesh/loki-mode | Report a problem: loki crash"
1611
1613
  echo ""
1612
1614
  # CLI consolidation (Phase A): the front page presents ~17 canonical
@@ -1640,6 +1642,7 @@ show_help() {
1640
1642
  echo ""
1641
1643
  echo "Verify / trust:"
1642
1644
  echo " verify [base] Deterministic PR verification (CI-gate exit codes)"
1645
+ echo " keys export Print the public receipt-signing key (JWK) for third-party verify --pubkey"
1643
1646
  echo " review [opts] Standalone code review with quality gates"
1644
1647
  echo " ultracode \"task\" Run a task as a native Claude Code Dynamic Workflow (opt-in, Claude-only)"
1645
1648
  echo " trust [cmd] Visible trust trajectory; 'trust detail' for metrics"
@@ -1705,7 +1708,7 @@ show_help() {
1705
1708
  echo " loki start PROJ-456 # Jira issue"
1706
1709
  echo " loki start --bg ./prd.md # Start in background"
1707
1710
  echo " loki start --parallel ./prd.md # Parallel mode (git worktrees)"
1708
- echo " loki quick \"add dark mode\" # Single-task mode (3 iters max)"
1711
+ echo " loki quick \"add dark mode\" # Single-task mode (Loki 10 engine; LOKI_ENGINE=legacy for 3 iters max)"
1709
1712
  echo " loki tour # See a real sample result (no provider, no key, no spend)"
1710
1713
  echo " loki demo # Build a sample todo app end to end"
1711
1714
  echo " loki init -t saas-starter # Scaffold from template"
@@ -1916,7 +1919,7 @@ show_landing() {
1916
1919
  echo -e " ${CYAN}loki doctor${NC} Check your setup is ready (a few seconds)"
1917
1920
  echo -e " ${CYAN}loki quickstart${NC} Guided first build from your idea (no PRD needed)"
1918
1921
  echo -e " ${CYAN}loki start ./prd.md${NC} Build from a spec (PRD file, GitHub/GitLab/Jira/Azure issue, or no arg)"
1919
- echo " quickstart = guided first build; quick = one small task (3 iters max)."
1922
+ echo " quickstart = guided first build; quick = one small task (Loki 10 engine, no PR)."
1920
1923
  echo ""
1921
1924
  echo -e "Need help? ${CYAN}loki help${NC} lists every command."
1922
1925
  echo "Tip: preview cost and scope before building: loki plan <your-prd.md>"
@@ -16408,8 +16411,10 @@ cmd_quick() {
16408
16411
  echo ""
16409
16412
  echo "Usage: loki quick \"description of what to do\""
16410
16413
  echo ""
16411
- echo "Runs Loki with a lightweight execution profile: 3 iterations max,"
16412
- echo "no quality council, no completion gate. Best for tiny tasks."
16414
+ echo "Runs the Loki 10 engine on one small task (no PR is opened). Set"
16415
+ echo "LOKI_ENGINE=legacy or run 'loki legacy quick ...' for the previous engine:"
16416
+ echo "a lightweight profile, 3 iterations max, no quality council, no completion"
16417
+ echo "gate. Best for tiny tasks. The options below apply to the previous engine."
16413
16418
  echo ""
16414
16419
  echo "Examples:"
16415
16420
  echo " loki quick \"add dark mode to this React app\""
@@ -18647,6 +18652,11 @@ with open(manifest_path, 'w') as f:
18647
18652
  # usable.
18648
18653
  # ---------------------------------------------------------------------------
18649
18654
  cmd_verify() {
18655
+ # D48: --pubkey verifies a receipt against a given public key (v10 engine, no ~/.loki needed).
18656
+ local _pk_arg
18657
+ for _pk_arg in "$@"; do
18658
+ [ "$_pk_arg" = "--pubkey" ] && LOKI_ENGINE=v10 exec "$_LOKI_SCRIPT_DIR/../bin/loki" verify "$@"
18659
+ done
18650
18660
  # --fast: deterministic checks only, in milliseconds. Measured on this repo
18651
18661
  # (1,932 tracked files): 298 ms cold, 87 ms warm, 19 ms diff-scoped, against
18652
18662
  # an 11,040 ms shell-based baseline.
@@ -21959,6 +21969,10 @@ main() {
21959
21969
  verify)
21960
21970
  cmd_verify "$@"
21961
21971
  ;;
21972
+ keys)
21973
+ # D48: public-key export lives in the Bun v10 engine; re-enter the shim on that route.
21974
+ LOKI_ENGINE=v10 exec "$_LOKI_SCRIPT_DIR/../bin/loki" keys "$@"
21975
+ ;;
21962
21976
  spec)
21963
21977
  cmd_spec "$@"
21964
21978
  ;;
package/bin/loki CHANGED
@@ -271,26 +271,73 @@ if [ "${1:-}" = "modernize" ]; then
271
271
  unset _loki_mod_a
272
272
  fi
273
273
 
274
- # Loki 10 engine (D29): additive; skipped entirely unless LOKI_ENGINE=v10.
275
- if [ "${LOKI_ENGINE:-}" = "v10" ]; then
276
- _e10=0
277
- case "${1:-}" in
278
- status|verify|dashboard) _e10=1 ;;
279
- ""|-*) _e10=0 ;;
280
- # http*://*/issues/* also covers GitLab's /-/issues/ URLs.
281
- */*\#[0-9]*|http*://*/issues/*|http*://*/browse/*) _e10=1 ;;
282
- *" "*) _e10=1 ;;
283
- # ponytail: a one-word argument stays on the legacy CLI. The telemetry
284
- # allowlist is not a command registry (estimate, intent, outcomes are
285
- # missing from it), so it cannot decide routing. Multi-word tasks and
286
- # issue refs reach v10.
287
- *) _e10=0 ;;
288
- esac
289
- if [ "$_e10" = "1" ]; then
290
- command -v bun >/dev/null 2>&1 || { echo "Error: LOKI_ENGINE=v10 needs bun. Unset LOKI_ENGINE to use the current engine." >&2; exit 1; }
291
- exec bun "$BUN_CLI" engine10 "$@"
292
- fi
293
- fi
274
+ # `loki legacy <args>` (D29/D48): the previous engine, exactly as LOKI_ENGINE=legacy.
275
+ # Re-runs this shim with the pin so every route below is the pre-flip route.
276
+ case "${1:-}" in
277
+ legacy)
278
+ shift
279
+ [ -f "$REPO_ROOT/autonomy/lib/engine10-legacy-notice.txt" ] && cat "$REPO_ROOT/autonomy/lib/engine10-legacy-notice.txt" >&2
280
+ LOKI_ENGINE=legacy exec "$SCRIPT_PATH" "$@"
281
+ ;;
282
+ esac
283
+
284
+ # Loki 10 engine (D29, flipped to the default by D48 rows 7-9). LOKI_ENGINE unset
285
+ # or v10 routes `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"` to
286
+ # engine10; LOKI_ENGINE=v10 (explicit) also routes status/verify/dashboard. Any
287
+ # other value (legacy, v9, ...) skips this block: the previous engine, unchanged.
288
+ _loki_engine_default="v10"
289
+ case "${LOKI_ENGINE:-$_loki_engine_default}" in
290
+ v10)
291
+ _e10=0
292
+ _e10_args=("$@")
293
+ case "${1:-}" in
294
+ status|verify|dashboard|keys)
295
+ [ "${LOKI_ENGINE:-}" = "v10" ] && _e10=1
296
+ # Bare `loki verify` follows the newest run: a v10 run newer than the newest
297
+ # legacy proof is verified by v10, so a FAILED default run is never VERIFIED.
298
+ # Only a bare call or a v10 run id (e10-*) goes there; any flag (--fast, --pr, --json, unknown) stays on legacy verify.
299
+ if [ "$1" = "verify" ] && [ "$_e10" = "0" ] && [ -z "${LOKI_ENGINE:-}" ] && case "${2:-}" in ""|e10-*) true ;; *) false ;; esac; then
300
+ _r10=""; _p10=""
301
+ for _d in "${LOKI_DIR:-.loki}"/runs/e10-*/; do [ -d "$_d" ] && _r10="$_d"; done
302
+ for _d in "${LOKI_DIR:-.loki}"/proofs/*/proof.json; do [ -f "$_d" ] && { [ -z "$_p10" ] || [ "$_d" -nt "$_p10" ]; } && _p10="$_d"; done
303
+ if [ -n "$_r10" ] && { [ -z "$_p10" ] || [ "$_r10" -nt "$_p10" ]; }; then _e10=1; fi
304
+ unset _r10 _p10 _d
305
+ fi
306
+ ;;
307
+ ""|-*) _e10=0 ;;
308
+ # quick: the lean small path, no PR (legacy quick never opened one). A flag-first
309
+ # call (--help, -v) stays on the legacy quick.
310
+ quick)
311
+ case "${2:-}" in
312
+ ""|-*) _e10=0 ;;
313
+ *) _e10=1; _e10_args=(--no-pr "${@:2}") ;;
314
+ esac
315
+ ;;
316
+ # http*://*/issues/* also covers GitLab's /-/issues/ URLs.
317
+ */*\#[0-9]*|http*://*/issues/*|http*://*/browse/*) _e10=1 ;;
318
+ *" "*) _e10=1 ;;
319
+ # ponytail: a one-word argument stays on the legacy CLI. The telemetry
320
+ # allowlist is not a command registry (estimate, intent, outcomes are
321
+ # missing from it), so it cannot decide routing. Multi-word tasks and
322
+ # issue refs reach v10.
323
+ *) _e10=0 ;;
324
+ esac
325
+ # Default (unset) mode never breaks a host: no bun, or a provider engine10 has no
326
+ # invoker for, falls through to the legacy engine. Explicit v10 keeps its hard error.
327
+ if [ "$_e10" = "1" ] && [ "${LOKI_ENGINE:-}" != "v10" ]; then
328
+ case "${LOKI_PROVIDER:-claude}" in claude|codex|cline|aider) ;; *) _e10=0 ;; esac
329
+ command -v bun >/dev/null 2>&1 || _e10=0
330
+ if [ "$_e10" = "0" ]; then
331
+ echo "loki: using the legacy engine (the Loki 10 engine needs bun and LOKI_PROVIDER of claude, codex, cline or aider)." >&2
332
+ fi
333
+ fi
334
+ if [ "$_e10" = "1" ]; then
335
+ command -v bun >/dev/null 2>&1 || { echo "Error: LOKI_ENGINE=v10 needs bun. Install bun, or set LOKI_ENGINE=legacy to use the previous engine." >&2; exit 1; }
336
+ exec bun "$BUN_CLI" engine10 "${_e10_args[@]}"
337
+ fi
338
+ unset _e10 _e10_args
339
+ ;;
340
+ esac
294
341
 
295
342
  # Bun must be installed for the new path; if it isn't, fall through to bash
296
343
  # silently rather than fail. This keeps users on systems without Bun working.
package/completions/_loki CHANGED
@@ -193,6 +193,7 @@ function _loki_commands {
193
193
  'spec:Living spec drift detection'
194
194
  'intent:Does the spec still say what was actually wanted'
195
195
  'verify:Deterministic PR verification'
196
+ 'keys:Export the receipt-signing public key'
196
197
  'grill:Interrogate a spec before building'
197
198
  'trust:Visible trust trajectory'
198
199
  'trust-metrics:Trust metrics report'
@@ -5,8 +5,8 @@ _loki_completion() {
5
5
  _init_completion || return
6
6
 
7
7
  # Main subcommands (must match autonomy/loki main case statement)
8
- local main_commands="start backlog quick monitor demo tour welcome init stop pause resume steer status next ship dashboard web serve api sandbox notify import github issue config provider reset memory compound checkpoint council dogfood projects enterprise secrets cockpit secure own handoff doctor watchdog audit metrics syslog onboard share proof receipt outcomes explain plan report cost estimate kpis stats test ci watch telemetry agent context ctx code run export review optimize heal modernize migrate cluster worktree wt trigger failover remote deploy docker mcp magic assets analyze compliance crash open otel preview quickstart rc rollback self-update sentrux setup-skill spec state template trust trust-metrics ultracode update verify voice why wiki bench cleanup logs grill docs cp version completions help"
9
- local main_commands="start backlog quick monitor demo tour welcome init stop pause resume steer status next ship dashboard web serve api sandbox notify import github issue intent config provider reset memory compound checkpoint council dogfood projects enterprise secrets cockpit secure own handoff doctor watchdog audit metrics syslog onboard share proof receipt explain plan report cost estimate kpis stats test ci watch telemetry agent context ctx code run export review optimize heal modernize migrate cluster worktree wt trigger failover remote deploy docker mcp magic assets analyze compliance crash open otel preview quickstart rc rollback self-update sentrux setup-skill spec state template trust trust-metrics ultracode update verify voice why wiki bench cleanup logs grill docs cp version completions help"
8
+ local main_commands="start backlog quick monitor demo tour welcome init stop pause resume steer status next ship dashboard web serve api sandbox notify import github issue config provider reset memory compound checkpoint council dogfood projects enterprise secrets cockpit secure own handoff doctor watchdog audit metrics syslog onboard share proof receipt outcomes explain plan report cost estimate kpis stats test ci watch telemetry agent context ctx code run export review optimize heal modernize migrate cluster worktree wt trigger failover remote deploy docker mcp magic assets analyze compliance crash open otel preview quickstart rc rollback self-update sentrux setup-skill spec state template trust trust-metrics ultracode update verify voice why wiki bench cleanup logs grill docs cp version completions help keys"
9
+ local main_commands="start backlog quick monitor demo tour welcome init stop pause resume steer status next ship dashboard web serve api sandbox notify import github issue intent config provider reset memory compound checkpoint council dogfood projects enterprise secrets cockpit secure own handoff doctor watchdog audit metrics syslog onboard share proof receipt explain plan report cost estimate kpis stats test ci watch telemetry agent context ctx code run export review optimize heal modernize migrate cluster worktree wt trigger failover remote deploy docker mcp magic assets analyze compliance crash open otel preview quickstart rc rollback self-update sentrux setup-skill spec state template trust trust-metrics ultracode update verify voice why wiki bench cleanup logs grill docs cp version completions help keys"
10
10
 
11
11
  # 1. If we are on the first argument (subcommand)
12
12
  if [[ $cword -eq 1 ]]; then
@@ -7,7 +7,7 @@ Modules:
7
7
  control: Session control API (start/stop/pause/resume)
8
8
  """
9
9
 
10
- __version__ = "10.5.20"
10
+ __version__ = "10.5.22"
11
11
 
12
12
  # Expose the control app for easy import
13
13
  try:
@@ -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:** v10.5.20
5
+ **Version:** v10.5.22
6
6
 
7
7
  ---
8
8
 
@@ -89,9 +89,18 @@ not rank above UNCHECKED.
89
89
  | Legacy shell (`autonomy/verify.sh`) | BLOCKED (non-zero) | the receipt line passes with the same accepted line |
90
90
 
91
91
  Engine10 `loki verify [run-id]` exits: 0 verified, 1 tampered, 2 unchecked,
92
- 3 unsigned (refused), 66 no runs. The flag never changes TAMPERED or UNCHECKED,
92
+ 3 unsigned (refused), 4 run outcome not verified (a sealed receipt of a FAILED or
93
+ otherwise unverified run), 66 no runs. The outcome check runs before the UNSIGNED
94
+ branch, so the flag never changes exit 4, TAMPERED or UNCHECKED,
93
95
  and verify never creates a signing key.
94
96
 
97
+ `loki verify --pubkey FILE <receipt.json|run-id>` (v10 only) checks the signature
98
+ against the supplied Ed25519 public key (JWK from `loki keys export`, or PEM) and
99
+ never the local JWKS. Exits: 0 VERIFIED, 1 TAMPERED, 2 UNCHECKED (kid does not
100
+ match the key, or the key file is unusable), 3 UNSIGNED (a receipt with no
101
+ signature is refused even with `--allow-unsigned`, because the caller asked for a
102
+ signature check), 4 run outcome not verified (checked before UNSIGNED).
103
+
95
104
  An early draft spec listed `1=BLOCKED, 2=CONCERNS`. That ordering was rejected:
96
105
  it is not used anywhere, it has no consumers, and it inverts the
97
106
  severity-rises-with-the-code rule that every other command follows.
package/docs/v10/GUIDE.md CHANGED
@@ -1,10 +1,20 @@
1
1
  # Loki 10 engine guide
2
2
 
3
- Opt-in: set LOKI_ENGINE=v10 <!-- loki10-default -->
4
-
5
- Loki 10 is the rewritten engine (docs/v10/ENGINE.md). It is not the default
6
- yet. Every command below only runs when LOKI_ENGINE=v10 is set; leave it
7
- unset and `loki` keeps using the current (legacy) engine exactly as before.
3
+ Default: Loki 10 engine for `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"`. Set LOKI_ENGINE=legacy or run `loki legacy <args>` for the previous engine. <!-- loki10-default -->
4
+
5
+ Loki 10 is the rewritten engine (docs/v10/ENGINE.md). Since the D48 flip it
6
+ is the default for three entry points: `loki "<task>"`, `loki owner/repo#N`
7
+ (issue mode) and `loki quick "<task>"`. Each prints one start line,
8
+ `Loki 10 engine (set LOKI_ENGINE=legacy or run 'loki legacy' for the previous
9
+ engine)`, then the summary below. Everything else (`loki start`, `loki
10
+ status`, `loki dashboard` and the rest) is unchanged unless you set
11
+ LOKI_ENGINE=v10 explicitly, which also routes status, verify and dashboard
12
+ to the v10 commands. Bare `loki verify` (no LOKI_ENGINE) follows the newest
13
+ run: when the newest entry in .loki/runs/ is a v10 run newer than the newest
14
+ legacy proof it runs the v10 verify, otherwise the legacy verify. If bun is
15
+ missing or LOKI_PROVIDER is unsupported, the default mode falls back to the
16
+ legacy engine and prints one stderr line saying why. The previous engine stays one step away:
17
+ `loki legacy <args>` and LOKI_ENGINE=legacy.
8
18
 
9
19
  Some pieces named in this guide are still being built. Each one below says
10
20
  so plainly instead of describing a finished feature.
@@ -12,19 +22,34 @@ so plainly instead of describing a finished feature.
12
22
  ## Quickstart
13
23
 
14
24
  Put the task first, as a quoted multi-word string, so bin/loki's router
15
- sends it to the v10 engine instead of the legacy one. A one-word argument
16
- that is not an issue ref, or any first argument starting with `-`, stays
17
- on the legacy engine.
25
+ sends it to the v10 engine. A one-word argument that is not an issue ref,
26
+ or any first argument starting with `-`, stays on the legacy engine.
27
+
28
+ ```
29
+ loki "fix the login redirect loop" --no-pr
30
+ ```
31
+
32
+ `loki quick "<task>"` is the small-task entry. It runs the same engine
33
+ without opening a pull request (the legacy quick never opened one), and the
34
+ engine's own sizing picks the lean path for a small task: Plan and Wall are
35
+ skipped and implement starts on sonnet, escalating to the top model only
36
+ on a real test failure (E-64; `LOKI_E10_CASCADE=0` turns the cascade off).
37
+ `loki quick --help` and a flag-first `loki quick -v "<task>"` stay on the
38
+ legacy quick.
18
39
 
19
40
  ```
20
- LOKI_ENGINE=v10 loki "fix the login redirect loop" --no-pr
41
+ loki quick "fix the login redirect loop"
21
42
  ```
22
43
 
44
+ If bun is not installed, or LOKI_PROVIDER names a provider the v10 engine
45
+ has no invoker for (anything but claude, codex, cline, aider), these entry
46
+ points fall back to the legacy engine instead of failing.
47
+
23
48
  Issue refs work the same way:
24
49
 
25
50
  ```
26
- LOKI_ENGINE=v10 loki owner/repo#123
27
- LOKI_ENGINE=v10 loki https://github.com/owner/repo/issues/123
51
+ loki owner/repo#123
52
+ loki https://github.com/owner/repo/issues/123
28
53
  ```
29
54
 
30
55
  bin/loki routes GitHub, GitLab (`.../-/issues/N`) and Jira
@@ -58,9 +83,13 @@ verify, seal) and then, in the supervisor, the pr stage, ending in the
58
83
  Slack is not part of the v10 engine surface (no command, no notification
59
84
  hook) and is in progress, tracked with the other wave 3 items.
60
85
 
61
- ## The 5-line summary
86
+ ## The summary
62
87
 
63
- A finished run prints five lines, one label each:
88
+ A finished run prints the start line, then one label per line (Outcome,
89
+ PR, Receipt, NOT PROVEN, Cost, Time; a Reason line is added for any
90
+ outcome other than VERIFIED or ALREADY_SATISFIED). The quiet default stays
91
+ within 8 lines. The block below is the older 5-line form; the labels are the
92
+ same:
64
93
 
65
94
  ```
66
95
  PR: https://github.com/owner/repo/pull/1
@@ -81,7 +110,13 @@ Time: 4m12s (intake 11s, plan 20s, implement 3m10s, verify 31s)
81
110
  separate `; flaky ...` clause on the same line.
82
111
  - **Cost**: the provider-reported dollar figure and token count. When the
83
112
  provider does not report cost, this line reads `not measured` instead of
84
- `$0.00`; a missing cost is never rendered as free.
113
+ `$0.00`; a missing cost is never rendered as free. The one exception is the
114
+ CLI invoker (LOKI_E10_INVOKER=cli, which the first-run gate's stub uses): it
115
+ has no dollar figure to report, so the run records 0 with the source marker
116
+ `cli-invoker-unmetered` in the cost event, the receipt (`cost.source`) and
117
+ the efficiency record, shows `$0.00 (...; CLI invoker records no cost)`, and
118
+ adds `cost unmetered (CLI invoker; recorded as 0)` to NOT PROVEN. The cost
119
+ fields are never null on such a run.
85
120
  - **Time**: total wall time, then each stage's own duration in parentheses.
86
121
 
87
122
  This formatter (`loki-ts/src/engine10/output.ts`, `formatSummary`) is
@@ -138,15 +173,12 @@ provider names (`claude`, `codex`, `cline`, `aider`); it is not supported.
138
173
 
139
174
  ## After the flip
140
175
 
141
- Once v10 becomes the default (docs/v10/DECISIONS.md, D29), `loki`, `loki
142
- status`, `loki verify` and `loki dashboard` with no `LOKI_ENGINE` set will
143
- mean the v10 commands described above. The previous engine stays
144
- reachable through `LOKI_ENGINE=legacy` (bin/loki sends every value other
145
- than `v10` to it), unchanged. Nothing is removed at the flip. A separate
146
- legacy alias command is planned (docs/v10/ENGINE.md, E-31) but is not on
147
- main.
148
-
149
- That flip has not happened on main as of this guide. The opt-in line near
150
- the top of this file and of README.md's section is the one place that
151
- records which state we are in; it changes in the same commit as the flip
152
- itself.
176
+ D48 made v10 the default for `loki "<task>"`, `loki owner/repo#N` and
177
+ `loki quick "<task>"`. The previous engine stays fully reachable and
178
+ unchanged: `loki legacy <args>` (prints a short deprecation notice to
179
+ stderr, then runs exactly the pre-flip route for `<args>`) and
180
+ `LOKI_ENGINE=legacy` (the same, without the notice, for scripts). Any
181
+ LOKI_ENGINE value other than v10 or unset also keeps the legacy engine.
182
+ Nothing is removed at the flip. The one place that records which state we
183
+ are in is the marked line near the top of this file and of README.md's
184
+ Loki 10 section; it changed in the same commit as the flip.
@@ -1747,3 +1747,16 @@ The swarm is stopped: .loki/V10-STOP exists, the loop has no wake-ups, and the c
1747
1747
  - Merged on local main: D48-flip r3 (opus APPROVE: FAILED receipt exits 4 with or without --allow-unsigned; dispatch 56/0; gate --stub 0 failed), A-134b r4 (sonnet APPROVE; registration rc=0, shard rc=0, own test 6/0), E-162 (opus APPROVE as CTO call).
1748
1748
  - train/33 63db8710 pushed. Guards: registration rc=0, shard-coverage rc=0 (E2e Features row 19 -> 20 to keep the five heaviest suites in distinct shards), v10-ops rc=0, run-shellcheck rc=0, docs-cli-drift rc=0, release-dist-guard rc=0, budget.test 24 pass.
1749
1749
  - REJECTED, fix rounds building: E-163 (live /usage timeout has no process-group kill), D48-r2 (unsigned receipt exits 0 under --pubkey; merge conflicts with the exit-4 change).
1750
+
1751
+ ## 2026-10-01T05:34Z v10.5.19 published and auto-promoted; train/33 red, flip dropped
1752
+ - v10.5.19: Release run 47050d65 completed success; npm view loki-mode@10.5.19 gitHead 47050d6533d7 matches; dist-tags latest=10.5.19 next=10.5.19 (D49 auto-promote). Unblocks the CodeQL P0 (10.5.18 never published).
1753
+ - train/33 63db8710 RED: Tests shard 7/8, suite "first-run gate assertion logic (A-02)" (tests/test-first-run-gate.sh): "FAIL clean: gate exit 1". Reproduced locally on 63db8710, not on aad61f9a. Cause: D48-flip r3 added gate checks (engine-start-line, cost-non-null, output-lines 8, bare verify rc 4) that the test's clean fixture does not emit.
1754
+ - D46 drop: reverted c2c43fd10 on main (5d25b205; reverted paths identical to aad61f9a; local test-first-run-gate rc=0, 0 FAIL). train/34 5d25b205 pushed with E-163 r3 (haiku fix; env parse probes abc/-5/nan/inf/0 -> 20, 46/0), A-134b r4, E-162.
1755
+ - D48-flip r4 (fixture fix) building; D48-r2b (pubkey, null-jwt exits 3 under --pubkey) built, in opus re-review; it needs the flip re-landed first.
1756
+
1757
+ ## 2026-10-01T06:07Z v10.5.20 promoted; v10.5.21 (D48 engine flip) released; train/39
1758
+ - v10.5.20 240f3285: Release success; npm gitHead 240f3285f42b matches; dist-tags latest=10.5.20 next=10.5.20 (auto-promote, watcher bybzbhat6). Contents A-134b, E-162, E-163.
1759
+ - train/35 RED (Tests shard 1/8: "1 command(s) absent from 'loki help': keys"). D46 drop of D48-r2b (76e3d25c, revert clean vs flip-r4 merge). Fix r2c 2e7c68a3 (one help line), re-landed as 3eade3d4; train/37 green on Tests, Bun Parity, Coverage, Security Audit.
1760
+ - train/36 76e3d25c green (all four); main fast-forwarded; v10.5.21 189f347e pushed (--check-clean rc=0, parent == origin/main). CHANGELOG corrected: the flip's Unreleased notes said "loki verify unchanged"; r3 routes bare verify to v10 when the newest run is a v10 run (bin/loki:296-305), exit 4 for a non-VERIFIED outcome. Watcher bpighrue2.
1761
+ - Tier A red on every train since train/33: E-162 ran tests/test-shard-coverage.sh before the Python deps install; two pytest-gated suites (run-all-tests.sh:782-787) were not registered, 666 of 668. Fix 55d559ea moves the step after pip install (train/38).
1762
+ - train/39 c34511e5 = flip + keys (D48 rows 2, 7-9) + Tier A fix + 10.5.21 merge; local help, registration, shard-coverage, docs-drift, v10-ops all rc=0.