loki-mode 11.76.0 → 11.78.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 (103) hide show
  1. package/SKILL.md +2 -2
  2. package/VERSION +1 -1
  3. package/autonomy/lib/check_author.py +146 -0
  4. package/autonomy/lib/claude-flags.sh +5 -1
  5. package/autonomy/lib/mcp-config.sh +41 -1
  6. package/autonomy/lib/proof-analytics-props.py +115 -6
  7. package/autonomy/lib/proof-verify.py +22 -0
  8. package/autonomy/lib/telemetry-schema.json +52 -0
  9. package/autonomy/loki +398 -7
  10. package/autonomy/telemetry.sh +70 -31
  11. package/completions/_loki +19 -0
  12. package/completions/loki.bash +17 -1
  13. package/dashboard/__init__.py +1 -1
  14. package/dashboard/api_start.py +2 -10
  15. package/dashboard/secure_tmp.py +92 -0
  16. package/dashboard/telemetry.py +81 -15
  17. package/docs/ARCHITECTURE.md +6 -4
  18. package/docs/{v10/CLI-MODERN.md → CLI-INVENTORY.md} +6 -6
  19. package/docs/CLI-REFERENCE.md +3 -2
  20. package/docs/COMPARISON.md +6 -8
  21. package/docs/COMPONENTS.md +1 -1
  22. package/docs/INSTALLATION.md +1 -1
  23. package/docs/PRIVACY.md +47 -11
  24. package/docs/V10-RESEARCH.md +1 -1
  25. package/docs/architecture/ADR-001-runtime-migration.md +7 -7
  26. package/docs/cursor-comparison.md +1 -1
  27. package/docs/dev/architecture-reference.md +7 -2
  28. package/docs/dev/project-structure.md +2 -1
  29. package/docs/image-provenance.md +32 -7
  30. package/docs/slack.md +2 -0
  31. package/docs/v11/COST-HALF.md +2 -1
  32. package/loki-ts/dist/loki.js +1744 -1604
  33. package/loki-ts/package.json +2 -2
  34. package/mcp/__init__.py +1 -1
  35. package/mcp/requirements.txt +1 -1
  36. package/package.json +3 -3
  37. package/packages/control-plane/dist/server.js +20045 -19119
  38. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  39. package/providers/aider.sh +7 -0
  40. package/providers/claude.sh +8 -1
  41. package/providers/cline.sh +3 -0
  42. package/providers/loader.sh +5 -0
  43. package/providers/model_catalog.json +3 -0
  44. package/providers/models.sh +59 -0
  45. package/providers/opencode.sh +9 -3
  46. package/skills/providers.md +1 -0
  47. package/web-app/dist/assets/{AdminPage-DoGPqZIa.js → AdminPage-BPF2Xehf.js} +1 -1
  48. package/web-app/dist/assets/{Avatar-Dyf7xJsz.js → Avatar-CSW9BhBU.js} +1 -1
  49. package/web-app/dist/assets/{Badge-Cm4dADew.js → Badge-wgm79wim.js} +1 -1
  50. package/web-app/dist/assets/{Button-LGxjldY5.js → Button-BcIAcPKr.js} +1 -1
  51. package/web-app/dist/assets/{CockpitPage-DuC9g48J.js → CockpitPage-BFi-0Kwj.js} +1 -1
  52. package/web-app/dist/assets/{ComparePage-DuTrmedK.js → ComparePage-B7Wibrfn.js} +1 -1
  53. package/web-app/dist/assets/{ErrorBoundary-B0f7NEiT.js → ErrorBoundary-BYyOVh2c.js} +1 -1
  54. package/web-app/dist/assets/{EvidenceReceiptPanel-DsE8B9Hw.js → EvidenceReceiptPanel-C9QcrjNl.js} +1 -1
  55. package/web-app/dist/assets/{GitHubIssuesPanel-aYflOqd4.js → GitHubIssuesPanel-CWbuBxVZ.js} +1 -1
  56. package/web-app/dist/assets/{GitHubPRsPanel-CCJGck6c.js → GitHubPRsPanel-qcBHK615.js} +1 -1
  57. package/web-app/dist/assets/{HomePage-BJU3PVkJ.js → HomePage-B1mYFU4t.js} +2 -2
  58. package/web-app/dist/assets/{LoginPage-UzYoF5CJ.js → LoginPage-CmIO1xL7.js} +1 -1
  59. package/web-app/dist/assets/{MagicPage-5X3hQ7lt.js → MagicPage-L7UP4qKP.js} +1 -1
  60. package/web-app/dist/assets/{MetricsPage-CFsTNyOu.js → MetricsPage-DVPCjN1U.js} +1 -1
  61. package/web-app/dist/assets/{NotFoundPage-Ba0nMlqG.js → NotFoundPage-D3XZmCH5.js} +1 -1
  62. package/web-app/dist/assets/{ProjectPage-fvU-EYZb.js → ProjectPage-BlaMzlVi.js} +3 -3
  63. package/web-app/dist/assets/{ProjectsPage-CVEKCorG.js → ProjectsPage-DN7W28Zq.js} +1 -1
  64. package/web-app/dist/assets/{SettingsPage-JGbsNmqD.js → SettingsPage-2u9ODYB5.js} +1 -1
  65. package/web-app/dist/assets/{ShowcasePage-Dr2c_V-y.js → ShowcasePage-CoKuTfab.js} +1 -1
  66. package/web-app/dist/assets/{SystemSettingsPage-D9dCc4Ir.js → SystemSettingsPage-Crhj2XAU.js} +1 -1
  67. package/web-app/dist/assets/{TeamsPage-B56u-bod.js → TeamsPage-DehMgnKh.js} +1 -1
  68. package/web-app/dist/assets/{TemplatesPage-CUwqj6ge.js → TemplatesPage-DGtwfZgU.js} +1 -1
  69. package/web-app/dist/assets/{TerminalOutput-Cm920SDi.js → TerminalOutput-7HZRtXoC.js} +1 -1
  70. package/web-app/dist/assets/{activity-DDF6juD-.js → activity-DAp5wswo.js} +1 -1
  71. package/web-app/dist/assets/{bell-7MW_oAcb.js → bell-Ncvnrz7d.js} +1 -1
  72. package/web-app/dist/assets/{bot-b63uz2Ov.js → bot-BWob3K3E.js} +1 -1
  73. package/web-app/dist/assets/{check-2oBMAALa.js → check-DReWA2vm.js} +1 -1
  74. package/web-app/dist/assets/{chevron-left-UuhI6pbU.js → chevron-left-CBJpzVU1.js} +1 -1
  75. package/web-app/dist/assets/{circle-alert-BikRzQA7.js → circle-alert-2c_vs5PW.js} +1 -1
  76. package/web-app/dist/assets/{clock-BdkTaAgO.js → clock-BrS_ZKKi.js} +1 -1
  77. package/web-app/dist/assets/{cloud-oKg24kTO.js → cloud-Czvuo51R.js} +1 -1
  78. package/web-app/dist/assets/{code-xml-CpDmdnYQ.js → code-xml-BWEqJ2I8.js} +1 -1
  79. package/web-app/dist/assets/{database-BT133u2w.js → database-CJ6M-oK-.js} +1 -1
  80. package/web-app/dist/assets/{dollar-sign-khUEgmXm.js → dollar-sign-DSObKmVv.js} +1 -1
  81. package/web-app/dist/assets/{file-code-corner-_TlPqN5g.js → file-code-corner-CVEW-gF5.js} +1 -1
  82. package/web-app/dist/assets/{file-plus-B5UT0SZU.js → file-plus-CAK0I0tE.js} +1 -1
  83. package/web-app/dist/assets/{globe-Chhrgg2K.js → globe-DeUgcsSZ.js} +1 -1
  84. package/web-app/dist/assets/{hammer-DJ6Z4tiA.js → hammer-B74PyjS0.js} +1 -1
  85. package/web-app/dist/assets/{index-BprNVRFx.js → index-DW3_HRqp.js} +3 -3
  86. package/web-app/dist/assets/{layers-CtYWuenz.js → layers-Dw7kaGyJ.js} +1 -1
  87. package/web-app/dist/assets/{loader-circle-BRxnh_Va.js → loader-circle-B6xzlAjw.js} +1 -1
  88. package/web-app/dist/assets/{lock-btaZm2bN.js → lock-5ncCPzIG.js} +1 -1
  89. package/web-app/dist/assets/{package-BFU4d6gL.js → package-x59_dTx0.js} +1 -1
  90. package/web-app/dist/assets/{plus-BogXrZQi.js → plus-BcVBzjpS.js} +1 -1
  91. package/web-app/dist/assets/{refresh-cw-CsdQkR5n.js → refresh-cw-CNrJhks6.js} +1 -1
  92. package/web-app/dist/assets/{rotate-ccw-BeLxChlE.js → rotate-ccw-BpmS_ezI.js} +1 -1
  93. package/web-app/dist/assets/{scroll-text-DAXSJc0i.js → scroll-text-CwBYNyoj.js} +1 -1
  94. package/web-app/dist/assets/{server-Cf_yJUqU.js → server-C4hnxkk6.js} +1 -1
  95. package/web-app/dist/assets/{shield-alert-B2gh1hM3.js → shield-alert-CSVUyWCM.js} +1 -1
  96. package/web-app/dist/assets/{thumbs-up-DxYjJ1v8.js → thumbs-up-DEU9fmDX.js} +1 -1
  97. package/web-app/dist/assets/{trash-2-BaAsSOYk.js → trash-2-DJKMevAm.js} +1 -1
  98. package/web-app/dist/assets/{trending-down-Kc-Tady7.js → trending-down-Dq3wAM59.js} +1 -1
  99. package/web-app/dist/assets/{trending-up-BDsns895.js → trending-up-DribptN4.js} +1 -1
  100. package/web-app/dist/assets/{upload-CCJzLwO9.js → upload-DUlZxsH1.js} +1 -1
  101. package/web-app/dist/assets/{usePolling-4aqc_A7F.js → usePolling-PecqVZ0k.js} +1 -1
  102. package/web-app/dist/assets/{user-BzoHXLDe.js → user-BcLYLDVU.js} +1 -1
  103. package/web-app/dist/index.html +1 -1
package/docs/PRIVACY.md CHANGED
@@ -68,15 +68,48 @@ paths, keys, or repo names -- only anonymous diagnostics.
68
68
 
69
69
  - Endpoint: `https://us.i.posthog.com/capture/` (override with
70
70
  `LOKI_TELEMETRY_ENDPOINT`). The PostHog project key is a public ingest key.
71
- - Events: `install` (on `npm install`), `session_start`, `session_end`,
72
- `cli_command`, and `dashboard_start`.
73
- - Exact payload (every event): `os` (uname system), `arch` (CPU arch),
74
- `version` (Loki Mode version), `channel` (npm / docker / homebrew / skill /
75
- source), and a random per-machine `distinct_id` (a uuid4 stored in
76
- `~/.loki-telemetry-id`, never an email or name). The `install` event also adds
77
- `node_version` and `providers_installed` (which provider CLIs were detected,
78
- e.g. "claude,codex"). Some events add a small free-of-PII property such as the
79
- command name. No code, prompts, paths, keys, repo names, emails, or IPs.
71
+ - One allowlisted schema, enforced in the send path of every sender (the bash
72
+ sender in `autonomy/telemetry.sh`, the dashboard sender in
73
+ `dashboard/telemetry.py`, and the build-outcome reader
74
+ `autonomy/lib/proof-analytics-props.py`). The schema is
75
+ `autonomy/lib/telemetry-schema.json`. An event that is not listed there is not
76
+ sent. A property that is not listed is dropped. A value outside its enum, type
77
+ or range is dropped, never truncated or forwarded. The opt-out check runs
78
+ before any of this, so `LOKI_TELEMETRY=off` and `DO_NOT_TRACK=1` make zero
79
+ network calls.
80
+ - Exactly what is sent. Every event carries a random per-machine `distinct_id`
81
+ (a uuid4 stored in `~/.loki-telemetry-id`, never an email or name) and these
82
+ common properties:
83
+
84
+ | Property | Values |
85
+ |---|---|
86
+ | `os_family` | linux, darwin, windows, other (a raw uname such as `MINGW64_NT-10.0-19045` is folded to `windows`) |
87
+ | `arch` | x64, arm64, other |
88
+ | `version` | the Loki Mode semver |
89
+ | `channel` | npm, docker, homebrew, skill, source, unknown |
90
+ | `traffic` | user, ci, internal (derived from CI environment variables, a non-interactive session, or an internal marker, so analytics can filter automation and our own use) |
91
+ | `introspective` | true or false, present on every event (false unless the event carries a command; true for version, help, completion, memory and internal commands, so they are flagged rather than counted as usage) |
92
+
93
+ Per-event properties, and nothing else:
94
+
95
+ | Event | Fires | Extra properties |
96
+ |---|---|---|
97
+ | `installed` | first command ever run | `first_command` (a known loki subcommand, else `other`) |
98
+ | `cli_command` | each command | `command` (a known loki subcommand, else `other`) |
99
+ | `session_start` | a run starts (legacy engine) | `provider` (claude, codex, cline, aider, opencode), `complexity` (simple, standard, complex), `parallel` (true or false) |
100
+ | `session_end` | a run ends (legacy engine) | `provider`, `duration` (seconds), `iterations` (count), `result` (exit code 0 to 255) |
101
+ | `dashboard_start` | the dashboard starts | none |
102
+ | `first_start_attempted` | first `loki start`, strict opt-in (section 4) | `entry` (a known loki subcommand, else `other`) |
103
+ | `first_run_blocked` | first run stopped, strict opt-in (section 5) | `blocker` (fixed enum, section 5) |
104
+ | `build_verified` | a build finishes, strict opt-in (section 4) | see section 4 |
105
+
106
+ The `install` event of older versions is now `installed`. The npm postinstall
107
+ script sends nothing. There are no `node_version` or `providers_installed`
108
+ properties.
109
+ - Never sent, by construction (nothing in the schema can carry them): prompts,
110
+ PRD or issue text, code or diffs, file paths or names, repo names or URLs,
111
+ branch names, raw error text or stack traces, environment variable values,
112
+ secrets, emails, usernames, hostnames, or IP addresses.
80
113
 
81
114
  ### 3. Welcome page form (anonymous, explicit submit, opt-in)
82
115
 
@@ -105,9 +138,12 @@ field not named there is never read, so a schema change cannot silently start
105
138
  sending something new. Fields sent:
106
139
 
107
140
  - headline (a bounded enum: VERIFIED / VERIFIED WITH GAPS / NOT VERIFIED)
108
- - evidence_gate_verdict, final_verdict (bounded verdict strings)
141
+ - evidence_gate_verdict (PASS, BLOCK) and final_verdict (APPROVED, REJECTED,
142
+ APPROVE, REJECT, COMPLETE, CONTINUE); any other string is dropped. A test
143
+ pins both lists to the values the producers write.
109
144
  - iterations, files_changed_count (a COUNT -- never the file paths)
110
145
  - wall_clock_sec, gates_passed, gates_total, gate_pass_rate
146
+ - route (engine10 only: the default engine sends just headline=VERIFIED and route)
111
147
 
112
148
  It NEVER sends your spec/PRD text, file paths or names, code, or diffs. Because
113
149
  it sits below the base telemetry gate, every telemetry opt-out (`loki telemetry
@@ -129,7 +165,7 @@ provider, no key and no spend). Nobody could see that happening.
129
165
 
130
166
  The ONLY field is `blocker`, clamped to this fixed enum:
131
167
 
132
- no_provider | node | python3 | jq | git | curl | disk | skill_symlink | other
168
+ no_provider | not_logged_in | not_a_repo | git_identity | node | python3 | jq | git | curl | disk | skill_symlink | other
133
169
 
134
170
  Anything not on that list becomes `other`. It is deliberately coarse: `node` is
135
171
  enough to act on, and a version string or an install path would be a leak. It
@@ -50,7 +50,7 @@ Vendor figures are vendor claims. Re-check a source before quoting it publicly.
50
50
  - **Scale verification depth by risk.** Meta's Diff Risk Score does this. Source: [VEN].
51
51
 
52
52
  ### 6. Adoption: sell verified outcomes and reclaimed review time
53
- - **Perceived speed is not real speed.** METR RCT: experienced developers were 19% slower with AI while believing they were 20% faster. The 2026 follow-up is inconclusive. Source: [research org].
53
+ - **Perceived speed is not real speed.** METR RCT: experienced developers were 19% slower with AI while believing they were 20% faster. The 2026 follow-up is inconclusive. Source: METR RCT, arXiv 2507.09089 [PRE]. <!-- claim-ok -->
54
54
  - **Review is where the gains are lost.** AI raised PRs 98%, review time 91% and PR size 154%. Source: Faros 2025 [VEN].
55
55
  - **Developers do not check what they distrust.** 96% do not fully trust AI code; only 48% always verify it. Source: Sonar 2026 [VEN].
56
56
  - **Acceptance depends on task type.** Agent PR acceptance runs from 82.1% for docs to 66.1% for new features. Source: MSR 2026 [PR].
@@ -111,7 +111,7 @@ All three viable options (Bun runtime, Bun compiled, Go binary) keep the `npm in
111
111
  **Pro:**
112
112
  - **Anthropic owns Bun.** Strategic alignment with the company that owns the model we depend on.
113
113
  - Native shell built in (`Bun.$\`echo hello\``) - minimal friction porting bash idioms.
114
- - Bun's `npm install` is 20-40x faster than npm - every CI run faster.
114
+ - Bun's package install is faster than npm's (a vendor claim, not measured in this ADR).
115
115
  - TypeScript: types catch bugs bash can't.
116
116
  - Anthropic-funded development means Bun improvements specifically target AI agent workloads.
117
117
  - 98% Node.js compatibility - npm packages work directly.
@@ -150,7 +150,7 @@ Reasons:
150
150
  4. **Hybrid is now harder to justify.** When bash loses by 8.6x on the actual workload, keeping it for 3 ms theoretical wins on hello-world is bad engineering.
151
151
  5. **Go would still be 2-4x faster than Bun** in absolute cold-start, but: zero existing Go in the codebase, no Anthropic alignment, larger rewrite cost, no JS ecosystem reuse. Unless Loki specifically targets the sub-millisecond CLI category (which it doesn't - every command runs in a multi-second/minute autonomous loop), the absolute speed delta doesn't justify the strategic cost.
152
152
 
153
- **If user explicitly wants the absolute fastest:** Go (Option A) is 2.5x faster than Bun. But for orchestrator-heavy work where most time is spent waiting on Claude API calls, the difference is invisible.
153
+ **If user explicitly wants the absolute fastest:** Go (Option A) starts in 1.8 ms against Bun's 6.9-7.6 ms (Layer 1 table). But for orchestrator-heavy work where most time is spent waiting on Claude API calls, the difference is invisible.
154
154
 
155
155
  ## Migration plan (Option C)
156
156
 
@@ -168,7 +168,7 @@ Reasons:
168
168
 
169
169
  ### Phase 3: Build/release tooling
170
170
  - Replace npm publish with `bun publish` in CI
171
- - Replace legacy-ui esbuild with `bun build` (already 4-5x faster)
171
+ - Replace legacy-ui esbuild with `bun build`
172
172
  - Replace pytest where possible with `bun test` for non-Python tests
173
173
  - Measure: full CI wall time, npm install time
174
174
 
@@ -193,10 +193,10 @@ Reasons:
193
193
 
194
194
  | Today | Tomorrow | Win |
195
195
  |---|---|---|
196
- | `npm publish` (45-60 sec) | `bun publish` | ~5x faster CI publish |
197
- | `npm install -g loki-mode` for users | Same UX, `bun install` under the hood when available | 20-40x faster install (verified) |
198
- | Tests via `npm test` (Node 20-25 sec) | `bun test` for non-Python | ~10x faster test runs |
199
- | Dashboard build with esbuild (122 ms) | `bun build` | 2-4x faster |
196
+ | `npm publish` (45-60 sec) | `bun publish` | Faster CI publish (projected, not measured) |
197
+ | `npm install -g loki-mode` for users | Same UX, `bun install` under the hood when available | Faster install (vendor claim, not measured here) |
198
+ | Tests via `npm test` (Node 20-25 sec) | `bun test` for non-Python | Faster test runs (projected, not measured) |
199
+ | Dashboard build with esbuild (122 ms) | `bun build` | Faster build (projected, not measured) |
200
200
  | Per-iteration cold start in run.sh: bash 4.5ms × N | Compiled Bun start once, run 100s | Net negative if iteration count low; net positive for sessions >5 iterations |
201
201
  | Python `mcp/server.py` | Stays Python (already good) | No change |
202
202
 
@@ -125,7 +125,7 @@ BOOTSTRAP -> DISCOVERY -> ARCHITECTURE -> INFRASTRUCTURE
125
125
  -> DEVELOPMENT -> QA -> DEPLOYMENT -> GROWTH (continuous)
126
126
  ```
127
127
 
128
- **41 Specialized Agent Roles across 8 domains** (prompt-defined specifications the orchestrator adopts per phase; parallel review council and optional worktree streams on Claude Code, sequential on other providers):
128
+ **Role inventory: 41 prompt-defined roles across 8 domains** (`agents/types.json`; specifications the orchestrator adopts per phase; parallel review council and optional worktree streams on Claude Code, sequential on other providers):
129
129
  - Engineering (8 types)
130
130
  - Operations (8 types)
131
131
  - Business (8 types)
@@ -82,7 +82,7 @@ time-to-first-preview write-once (bash route only).
82
82
 
83
83
  ## Anthropic SDK upgrade capability matrix (RQ-104, 2026-10-23)
84
84
 
85
- Pins (exact, all sites): `@anthropic-ai/sdk` 0.124.0 -> 1.2.0 (loki-ts/package.json, loki-ts/bun.lock, docker/Dockerfile peer pin); `@anthropic-ai/claude-agent-sdk` 0.3.293 -> 0.3.309 (loki-ts/package.json, package.json, package-lock.json, bun.lock, docker/Dockerfile). `tests/test-sdk-version-sync.sh` asserts both. Sources: sdk CHANGELOG 0.125.0..1.2.0, agent-sdk CHANGELOG 0.3.294..0.3.309.
85
+ Pins (exact, all sites): `@anthropic-ai/sdk` 0.124.0 -> 1.3.0 (loki-ts/package.json, loki-ts/bun.lock, docker/Dockerfile peer pin); `@anthropic-ai/claude-agent-sdk` 0.3.293 -> 0.3.312 (loki-ts/package.json, package.json, package-lock.json, bun.lock, docker/Dockerfile). `tests/test-sdk-version-sync.sh` asserts both. Sources: sdk CHANGELOG 0.125.0..1.3.0, agent-sdk CHANGELOG 0.3.294..0.3.312.
86
86
 
87
87
  | Change | Status |
88
88
  |---|---|
@@ -120,6 +120,11 @@ Default-on in the Bun runner (see `CHANGELOG.md` v7.x entries; documented in `sk
120
120
 
121
121
  These knobs together implement the RARV-C (closure) loop: findings -> override council -> learnings -> handoff. Reference: `skills/quality-gates.md`, `CHANGELOG.md` entries from v7.x for default-on flip and override-council semantics.
122
122
 
123
+ ## engine10 sizing knobs (`loki-ts/src/engine10/sizing.ts`)
124
+
125
+ - `LOKI_E10_SMALL_NO_RUNNER` -- default on: a missing test runner no longer disqualifies a task from "small". A small task skips the plan session (the implementer plans) and the skipped plan writes `plan-scope.json` from the files the task names. Set to `0` to make a missing runner force "normal".
126
+ - `LOKI_E10_SMALL_MAX_CHARS` -- task text length above which a task is not small (positive number, default 600; an invalid value falls back to 600 with a stderr note).
127
+
123
128
  ## Worktree substrate (autonomy/lib/worktree_prep.py)
124
129
 
125
130
  `prepare_worktree(source_repo, dest, branch, setup=None, base=None)` creates an isolated git worktree and returns `{path, base_sha, deps, left_out_changes}`. 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` (refused as "copy unsafe, declare setup" if it holds absolute symlinks or editable finders), else `none`. CLI: `python3 autonomy/lib/worktree_prep.py SRC DEST BRANCH [--setup CMD] [--base REF]` prints the result as JSON. Not yet wired into backlog or the UI.
@@ -137,7 +142,7 @@ extract_learnings_from_session (autonomy/run.sh) mirrors learnings and decisions
137
142
 
138
143
  - Wall publish (FC-VERIFIED-PR-WITHOUT-ITS-TEST): on a VERIFIED seal only, `publishWall` (`util/check_result.ts`, called from `stages/seal.ts`) makes ONE child commit (trailer `Loki-Wall-Publish: <runId>`) of the SEALED Wall bytes (`runDir/wall`, hash-checked against `wall.files[].sha256`) that verify ran and passed (`publishableWall`). Before writing, the realpath of each Wall file's parent directory must be inside the repo, and an existing file or symlink is removed first. The child commit runs with hooks and signing OFF (the default `git()` call, no `userHooks`), so a pre-commit hook cannot add files or rewrite the Wall bytes. Afterwards the commit must touch exactly the published paths and each committed blob must equal the blob hash of the sealed bytes (computed in process, never read from the worktree); on any mismatch the child is rolled back (`update-ref` HEAD to the product head plus `read-tree`), nothing is published and a NOT PROVEN note is added. The receipt binds the PRODUCT head (head_sha, tree, diff_sha256 are computed before the child commit). A re-seal binds `HEAD^` only when HEAD's message has the exact trailer line for this run, HEAD touches only paths of this run's `wall.files`, and every blob sha256 matches (`wallChild`); a forged trailer is not enough. `util/seal_drift.ts` accepts a moved HEAD after head_sha as benign only when every commit after it is such a Wall publish commit (linear, trailer line for the receipt's run_id, only `wall.files` paths, blob sha256 equal to the sealed one); any commit after head_sha that carries this run's trailer but fails that check is head drift (UNCHECKED). Later commits without the trailer stay under the TEN-GATES-16 sealed-path overlap rule. The PR body gains an "Acceptance tests" section. Commit stage and `backstopCommit` still drop Wall files. `LOKI_COMMIT_WALL=0` restores the old behavior (nothing published).
139
144
 
140
- ### Python anthropic SDK (RQ-105: pinned `anthropic==2.2.0`)
145
+ ### Python anthropic SDK (RQ-105: pinned `anthropic==2.3.0`)
141
146
 
142
147
  `mcp/requirements.txt` pins the Python SDK exactly (was `>=0.40,<1.0.0`; the resolver landed on 0.125.0). Requires Python >=3.10 (Ubuntu 24.04 image ships 3.12). The SDK runs on `httpx2`; no repo code passes `httpx` objects to it. v2.0.0 changes (API version 2026-10-21): `temperature`/`top_p`/`top_k` removed from Messages (no call site uses them), Admin API field renames (unused). Python-side call sites: `memory/managed_memory/client.py` (the only importer) and `providers/managed.py` (lazy import, `tests/managed/test_registry_lazy.py` contract unchanged).
143
148
 
@@ -61,7 +61,8 @@ events/ # Unified Event Bus (v5.17.0)
61
61
  emit.sh # Bash helper for emitting events
62
62
  docs/ # Architecture documentation
63
63
  SYNERGY-ROADMAP.md # 5-pillar tool integration architecture
64
- v10/ # User guides: GUIDE.md, GUIDE-MODERNIZE.md, CLI-MODERN.md, DEPS.md
64
+ CLI-INVENTORY.md # Generated command inventory (from loki-ts/src/cli/registry.ts)
65
+ v10/ # User guides: GUIDE.md, GUIDE-MODERNIZE.md, DEPS.md
65
66
  dev/ # Developer reference docs (this file and its siblings)
66
67
  autonomy/ # Runtime and autonomous execution
67
68
  context-tracker.py # Context window usage tracking
@@ -16,10 +16,16 @@ delivers is worse than none, because it is exactly what an auditor will test.
16
16
  | Container image (`asklokesh/loki-mode`) | first release after v8.5.2 | first release after v8.5.2 through v11.17.98 |
17
17
  | npm tarball (`loki-mode`) | v7.4.10 and later | v7.4.10 through v11.17.98 |
18
18
 
19
- **Releases after v11.17.98 ship no SBOM.** The release workflow was cut to the
20
- minimum that publishes (so every channel is live within minutes of a version
21
- bump), and SBOM generation and attestation were removed with it. The image is
22
- still signed. Generate an SBOM yourself with `syft` (see below) if you need one.
19
+ **Releases after v11.17.98 carry no CycloneDX image attestation.** The release
20
+ workflow was cut to the minimum that publishes, and that attestation was removed
21
+ with it. Releases from the first one that includes the `attach-sbom` job carry
22
+ two replacements, both produced by steps marked `continue-on-error` so a failure
23
+ never blocks a distribution channel: SPDX JSON SBOMs
24
+ (`loki-mode-npm.spdx.json`, `loki-mode-image.spdx.json`) attached to the GitHub
25
+ Release by the `attach-sbom` job, and GitHub build provenance attestations
26
+ (`actions/attest-build-provenance`) for the npm tarball and the image digest.
27
+ Because those steps are best effort, a given release can lack them: check the
28
+ release assets before relying on one. The image is still signed.
23
29
 
24
30
  **Images published up to and including v8.5.2 are not signed and have no SBOM.** A signing
25
31
  workflow existed from v7.4.10 but was triggered on `release: published`, and
@@ -66,9 +72,10 @@ name `release.yml` in this repository.
66
72
 
67
73
  ## Verify and read the SBOM
68
74
 
69
- Applies to images through v11.17.98 only; later images carry no SBOM
70
- attestation, so this command fails for them by design. For those, run `syft`
71
- against the digest (shown at the end of this section).
75
+ The CycloneDX attestation below applies to images through v11.17.98 only;
76
+ later images carry no such attestation, so that command fails for them by
77
+ design. For later releases, download the SPDX JSON SBOM from the GitHub Release
78
+ assets, or run `syft` against the digest (shown at the end of this section).
72
79
 
73
80
  The SBOM is attached to the image as a CycloneDX attestation. Note this is a
74
81
  *separate* artifact from the npm SBOM published on the GitHub Release: the
@@ -105,6 +112,24 @@ syft "asklokesh/loki-mode:${VERSION}" --platform linux/arm64 -o cyclonedx-json
105
112
  Feed `image-sbom.cdx.json` to Grype, Trivy, Dependency-Track or any other
106
113
  CycloneDX consumer for CVE scanning.
107
114
 
115
+ ## Verify build provenance
116
+
117
+ Releases that carry the attestations (see the coverage section) can be checked
118
+ with the GitHub CLI against the public attestation store:
119
+
120
+ ```sh
121
+ # npm tarball, downloaded with: npm pack loki-mode@<version>
122
+ gh attestation verify loki-mode-<version>.tgz --repo asklokesh/loki-mode
123
+
124
+ # container image, by digest
125
+ gh attestation verify "oci://index.docker.io/asklokesh/loki-mode@${DIGEST}" \
126
+ --repo asklokesh/loki-mode
127
+ ```
128
+
129
+ A pass confirms the artifact was built by this repository's release workflow.
130
+ A failure on a release that predates the attestation step, or on one where the
131
+ best effort step did not run, is expected.
132
+
108
133
  ## Air-gapped environments
109
134
 
110
135
  Both commands above reach the public sigstore infrastructure (Rekor and
package/docs/slack.md CHANGED
@@ -33,3 +33,5 @@ Bot token scopes: `app_mentions:read`, `chat:write`, `channels:history` (and `gr
33
33
  Subscribe to bot events: `app_mention`, `message.channels` (plus `message.groups` for private channels).
34
34
 
35
35
  Outbound notifications (PR opened, BLOCKED, finished) are separate and use `LOKI_SLACK_WEBHOOK_URL`.
36
+
37
+ Stuck-run alert: if a live run writes no event for `LOKI_STUCK_MIN` minutes (default 15), one alert names the last stage, its event time and a suggested action. It always prints to stderr and also goes to Slack when a webhook is set. A new event clears the alert, and a later silence can alert again. Checked on the 15-second supervisor beat. A value of 0, a negative number or a non-number falls back to 15.
@@ -28,7 +28,8 @@ see, read earlier, or edit the Wall checks. No slice skips wall, verify, commit,
28
28
  | Haiku 5.5, prompt <= 100K | 0.10 | 0.125 | 0.01 | 0.50 |
29
29
  | Haiku 5.5, prompt > 100K | 0.50 | 0.625 | 0.05 | 2.50 |
30
30
 
31
- - Sonnet is 2x cheaper than Opus. Haiku is 20x cheaper than Sonnet, but only under 100K.
31
+ - From the table: Sonnet costs half of Opus on every column. Under 100K, Haiku input, cache write and
32
+ output cost 1/20 of Sonnet's, and Haiku cache reads cost 1/10.
32
33
  - Cache reads cost 0.05x input on Opus and Sonnet.
33
34
  - The advisor tool definition alone is about 1,000 prompt tokens per request.
34
35
  - Drift found: loki-ts/data/model-pricing.json says Opus is 5/25/0.5/6.25 and Sonnet's cache read is