loki-mode 11.157.0 → 11.158.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/SKILL.md +2 -2
  2. package/VERSION +1 -1
  3. package/autonomy/route.sh +1 -1
  4. package/dashboard/__init__.py +1 -1
  5. package/docs/CLI-REFERENCE.md +1 -1
  6. package/docs/INSTALLATION.md +1 -1
  7. package/docs/dev/architecture-reference.md +10 -0
  8. package/loki-ts/dist/loki.js +1901 -1891
  9. package/mcp/__init__.py +1 -1
  10. package/package.json +2 -2
  11. package/packages/control-plane/dist/server.js +232 -21
  12. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  13. package/web-app/dist/assets/{AdminPage-Dtr9qXAr.js → AdminPage-CWaUcwDm.js} +1 -1
  14. package/web-app/dist/assets/{Avatar-Bbd5nIIQ.js → Avatar-6lc2wVW0.js} +1 -1
  15. package/web-app/dist/assets/{Badge-KlCR8eBL.js → Badge-CkD9JQpc.js} +1 -1
  16. package/web-app/dist/assets/{Button-CuvgSS4G.js → Button-DkEbiW6A.js} +1 -1
  17. package/web-app/dist/assets/{CockpitPage-DoEOdgP2.js → CockpitPage-Ct-s4z5S.js} +1 -1
  18. package/web-app/dist/assets/{ComparePage-kHjdfoWo.js → ComparePage-Dt4FX5rV.js} +1 -1
  19. package/web-app/dist/assets/{ErrorBoundary-Cdm7nC6_.js → ErrorBoundary-BSovh9AG.js} +1 -1
  20. package/web-app/dist/assets/{EvidenceReceiptPanel-Cy4gJTfN.js → EvidenceReceiptPanel-LXcAwiHD.js} +1 -1
  21. package/web-app/dist/assets/{GitHubIssuesPanel-CoaeSXOe.js → GitHubIssuesPanel-CnaU29SV.js} +1 -1
  22. package/web-app/dist/assets/{GitHubPRsPanel-CQJCoIz_.js → GitHubPRsPanel-CBFOuOkd.js} +1 -1
  23. package/web-app/dist/assets/{HomePage-3XZPfCSJ.js → HomePage-CtKACBsT.js} +2 -2
  24. package/web-app/dist/assets/{LoginPage-BNSbxeMm.js → LoginPage-BSXNrDnS.js} +1 -1
  25. package/web-app/dist/assets/{MagicPage-WWH7SwfZ.js → MagicPage-BWOdNxoN.js} +1 -1
  26. package/web-app/dist/assets/{MetricsPage-Cjvh-jSf.js → MetricsPage-D50EAlFS.js} +1 -1
  27. package/web-app/dist/assets/{NotFoundPage-CgL4EF3d.js → NotFoundPage-ByLCS4wh.js} +1 -1
  28. package/web-app/dist/assets/{ProjectPage-B2y6gBfZ.js → ProjectPage-DU2grO7_.js} +3 -3
  29. package/web-app/dist/assets/{ProjectsPage-BTagWO2i.js → ProjectsPage-bN76CTu1.js} +1 -1
  30. package/web-app/dist/assets/{SettingsPage-WmRElM3E.js → SettingsPage-2ZNwlRdJ.js} +1 -1
  31. package/web-app/dist/assets/{ShowcasePage-wQ-VZyW1.js → ShowcasePage-DEg3BDY_.js} +1 -1
  32. package/web-app/dist/assets/{SystemSettingsPage-CkoLiTvO.js → SystemSettingsPage-CT7sCrKI.js} +1 -1
  33. package/web-app/dist/assets/{TeamsPage-D-LHZsn9.js → TeamsPage-CQhc0kCr.js} +1 -1
  34. package/web-app/dist/assets/{TemplatesPage-DuRKmn-s.js → TemplatesPage-W0SPAMsx.js} +1 -1
  35. package/web-app/dist/assets/{TerminalOutput-2PXo3eS2.js → TerminalOutput-BebfZZ7M.js} +1 -1
  36. package/web-app/dist/assets/{activity-D3TUBclR.js → activity-j4l9Gk8R.js} +1 -1
  37. package/web-app/dist/assets/{bell-BDl1J6X-.js → bell-DZGCYZy6.js} +1 -1
  38. package/web-app/dist/assets/{bot-CHoQ0cL1.js → bot-OYnVB94o.js} +1 -1
  39. package/web-app/dist/assets/{check-BuGreETS.js → check-C6t5iHbP.js} +1 -1
  40. package/web-app/dist/assets/{chevron-left-Dkf6mFUB.js → chevron-left-DM35O0gQ.js} +1 -1
  41. package/web-app/dist/assets/{circle-alert-WFj2TQ9c.js → circle-alert-LuDQClnV.js} +1 -1
  42. package/web-app/dist/assets/{clock-Bn6QW9zr.js → clock-9Po9qHu3.js} +1 -1
  43. package/web-app/dist/assets/{cloud-Yzjfx2Bv.js → cloud-CL7KrQ2p.js} +1 -1
  44. package/web-app/dist/assets/{code-xml-CtpDC2I8.js → code-xml-ZUDjmgxq.js} +1 -1
  45. package/web-app/dist/assets/{database-Datydoc-.js → database-Dy2MM-4L.js} +1 -1
  46. package/web-app/dist/assets/{dollar-sign-BCJkxKs6.js → dollar-sign-CmoA7igV.js} +1 -1
  47. package/web-app/dist/assets/{file-code-corner-gbgUZQ60.js → file-code-corner-BWTCMGKu.js} +1 -1
  48. package/web-app/dist/assets/{file-plus-B-Ah_CpZ.js → file-plus-D01cDOfJ.js} +1 -1
  49. package/web-app/dist/assets/{globe-Bst-IJOg.js → globe-BQER6rv6.js} +1 -1
  50. package/web-app/dist/assets/{hammer-CcKIK3jL.js → hammer-CUVQzryJ.js} +1 -1
  51. package/web-app/dist/assets/{index-DtmaWxTZ.js → index-C1IZi7yQ.js} +3 -3
  52. package/web-app/dist/assets/{layers-BAdGUPGI.js → layers-BS7Z9vCF.js} +1 -1
  53. package/web-app/dist/assets/{loader-circle-CzTwEeEV.js → loader-circle-7kYLdqEF.js} +1 -1
  54. package/web-app/dist/assets/{lock-B5s3sYxt.js → lock-4YHCWMTQ.js} +1 -1
  55. package/web-app/dist/assets/{package-BwP9xtUT.js → package-C_sd1CDA.js} +1 -1
  56. package/web-app/dist/assets/{plus-BkTkRvnl.js → plus-DdcBLEHW.js} +1 -1
  57. package/web-app/dist/assets/{refresh-cw-vZWSQT4C.js → refresh-cw-D0RISUjF.js} +1 -1
  58. package/web-app/dist/assets/{rotate-ccw-BfiOpKkJ.js → rotate-ccw-DcVMUgYT.js} +1 -1
  59. package/web-app/dist/assets/{scroll-text-0F2pJrT7.js → scroll-text-DDR9GrS9.js} +1 -1
  60. package/web-app/dist/assets/{server-DKTp6Lsg.js → server-C-PyculS.js} +1 -1
  61. package/web-app/dist/assets/{shield-alert-DpL3knlY.js → shield-alert-mjamZyn0.js} +1 -1
  62. package/web-app/dist/assets/{thumbs-up-CRr5J1fb.js → thumbs-up-D3YmttiS.js} +1 -1
  63. package/web-app/dist/assets/{trash-2-MhZJBf3n.js → trash-2-BBHz7Oec.js} +1 -1
  64. package/web-app/dist/assets/{trending-down-DL8xT5IX.js → trending-down-BmTUQZwa.js} +1 -1
  65. package/web-app/dist/assets/{trending-up-Ciy20G6q.js → trending-up-iLoyGfUy.js} +1 -1
  66. package/web-app/dist/assets/{upload-BlJIPegj.js → upload-BwEBbYzZ.js} +1 -1
  67. package/web-app/dist/assets/{usePolling-CxQ0uJJk.js → usePolling-kDnBK0Gl.js} +1 -1
  68. package/web-app/dist/assets/{user-C0ktPCL2.js → user-BZ4d4Ur5.js} +1 -1
  69. package/web-app/dist/index.html +1 -1
package/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: loki-mode
3
3
  description: Runs an autonomous software factory that knows what it is supposed to deliver and proves it did, with a signed receipt. Use when the user says Loki Mode or asks to build, fix or verify software autonomously.
4
4
  ---
5
5
 
6
- # Loki Mode v11.157.0
6
+ # Loki Mode v11.158.0
7
7
 
8
8
  **Current entry points (Loki 10 engine):** `loki "<task>"`, `loki owner/repo#N` and `loki quick "<task>"` run the Loki 10 engine and end with a signed receipt (`loki verify`). `loki backlog owner/repo --all` runs many issues in parallel. Guide: `docs/v10/GUIDE.md`. The skill instructions below, and `loki start`, describe the previous bash loop. PRD-file starts (`loki start ./prd.md`) and the opencode provider still run on it until FC38-SWEEP ports them; the legacy-engine command and the LOKI_ENGINE switch remain removed. Prefer `loki owner/repo#N` for issues.
9
9
 
@@ -461,4 +461,4 @@ Implemented, planned and deprecated items, with the version each landed in: `CHA
461
461
 
462
462
  ---
463
463
 
464
- **v11.157.0 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
464
+ **v11.158.0 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 11.157.0
1
+ 11.158.0
package/autonomy/route.sh CHANGED
@@ -19,7 +19,7 @@ _ROUTE_OPTVAL_FLAGS=" --mirofish "
19
19
  # engine rather than configure it: the route still resolves (R_FRONT=1) but the dispatcher leaves the call to the front end.
20
20
  _ROUTE_FRONT_FLAGS=" --workspace --deploy --health-url --health-match --auto-rollback --destination --canary --domain "
21
21
  # Flags engine10 honors as-is.
22
- _ROUTE_E10_FLAGS=" --no-pr --deep --verified --json --verbose --quiet --resume --provider --max-cost --spec --attempts --seal-existing --detach -d "
22
+ _ROUTE_E10_FLAGS=" --no-pr --deep --verified --json --verbose --quiet --resume --provider --max-cost --spec --attempts --seal-existing --detach -d --base-current "
23
23
  # The largest PRD engine10 takes: it carries the task in env vars and CLI arguments (with a context pack added under
24
24
  # --session-model), and Linux caps one string at 128 KiB. A bigger PRD runs on the legacy engine, or is refused under
25
25
  # SDK mode with claude (the legacy engine has no SDK path).
@@ -7,6 +7,6 @@ Modules:
7
7
  control: Session control helpers (status, atomic writes, origin check)
8
8
  """
9
9
 
10
- __version__ = "11.157.0"
10
+ __version__ = "11.158.0"
11
11
 
12
12
  __all__ = ["__version__"]
@@ -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.157.0. Do not edit by hand.
3
+ Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.158.0. Do not edit by hand.
4
4
  Hidden and legacy-only commands are omitted; see `docs/CLI-INVENTORY.md` for the full inventory.
5
5
 
6
6
  | Command | Description |
@@ -2,7 +2,7 @@
2
2
 
3
3
  Loki Mode, by [Autonomi](https://www.autonomi.dev/), turns a spec or an issue into a verified pull request with a receipt you can check. This page covers installing it, a first run, and the options around it.
4
4
 
5
- **Version:** v11.157.0
5
+ **Version:** v11.158.0
6
6
 
7
7
  **Engine note:** `loki start` is the primary command. `loki start`, `loki "<task>"`, `loki owner/repo#N` and `loki quick` all run the Loki 10 engine, whatever the flag order or input form (PRD file, issue ref, task or one-word brief). The previous loop runs only on `--engine legacy`, `LOKI_ENGINE=legacy`, or for one call when a flag Loki 10 cannot honor is present. See the [user guide](v10/GUIDE.md) and the [5-minute quickstart](QUICKSTART.md).
8
8
 
@@ -259,6 +259,16 @@ These knobs together implement the RARV-C (closure) loop: findings -> override c
259
259
  - `LOKI_E10_DEFECT_PIN` -- existing assertions that pin the wrong value the issue reports are listed in the implement brief, and a pure value replacement of exactly such an assertion is not counted as a weakened test (it never counts as fail-then-pass proof, and the receipt always lists the rewrite). `=0` turns both off. Code: `findDefectPins` in `loki-ts/src/e10ext/context.ts`, `pinLift` in `loki-ts/src/engine10/stages/seal.ts`.
260
260
  - `LOKI_E10_ATTEMPTS` and `LOKI_E10_ATTEMPTS_EARLY` stay off by default (N=1) until the bench decides; the older form (2 extra attempts after a red verify) raised cost per run 17-47% on the v131 ledger with no accuracy evidence.
261
261
 
262
+ ## Pull request base and target (`loki-ts/src/util/base_guard.ts`, PR-BASE)
263
+
264
+ The label must describe exactly what the pull request merges. Three places hold that, all on one measurement (`prScope`: files from `merge-base(target, head)` to head, commits in `target..head`, against the run's `base_sha..head`).
265
+
266
+ - Start (`prBasePlan`, called by `engine10/supervisor.ts` before the header, pull request runs only). HEAD already in the target: nothing changes and nothing is fetched. Otherwise the target is fetched once and the run (a) starts from the target tip when the tracked tree is clean (intake creates `loki/<run>` from that commit; the user's branch is never moved), (b) with `--base-current` or `LOKI_BASE_CURRENT=1` builds on the current branch and targets it (`LOKI_PR_BASE` is set to the branch) when origin has the branch and HEAD is in it, or (c) exits 2 with the reason and two commands. A dirty tracked tree is refused by intake as before; a detached HEAD starts from its commit as before and the seal holds its label.
267
+ - Seal (`sealPrScope`, one open note in `engine10/stages/seal.ts`): a difference holds the label at PARTIAL and the receipt records `pr_base` (target, target_sha, merge_base, base_sha, pr_files, measured_files, pr_commits, measured_commits, mode, start_branch, line). The key is absent on a run that opens no pull request.
268
+ - Pull request stage (`prScopeGate` in `engine10/stages/pr.ts`, called first in `runPr`): the same measurement after fetching the target; a difference that appeared after the seal opens the pull request as a draft with the reason.
269
+ - `--base-current` / `LOKI_BASE_CURRENT=1` -- build on the current branch; the pull request targets that branch. Off by default.
270
+ - `LOKI_E10_START_FROM`, `LOKI_E10_PR_TARGET` -- set by the supervisor for its own worker (the commit to start from, the target ref); never inherited from the caller's environment.
271
+
262
272
  ## Worktree substrate (autonomy/lib/worktree_prep.py)
263
273
 
264
274
  `prepare_worktree(source_repo, dest, branch, setup=None, base=None)` creates an isolated git worktree and returns `{path, base_sha, deps, left_out_changes, deps_skipped}`. The start point is `origin/HEAD` after a fetch (when a remote exists), else HEAD. Uncommitted edits in the source checkout are never carried or stashed; their count is reported as `left_out_changes`. An fcntl lock at `~/.loki/repos/<slug>.lock` covers fetch and worktree add. Dependencies: a `setup` command run in the worktree, else a copy-on-write copy of ignored top-level `node_modules`, `.venv`, `venv`, `vendor` (a dir holding absolute symlinks or editable finders is never copied: it (or whose copy fails, with the partial copy removed) is left out, named in `deps_skipped`, `deps` is `skipped`, and the session installs it; a declared `setup` still fails hard), else `none`. CLI: `python3 autonomy/lib/worktree_prep.py SRC DEST BRANCH [--setup CMD] [--base REF]` prints the result as JSON. Callers: `autonomy/lib/backlog.py` (logs skipped deps), `autonomy/lib/workspace.py` (passes the entry `setup`) and `dashboard/api_start.py`.