loki-mode 11.17.22 → 11.17.23

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/lib/chat.sh +81 -3
  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/v10/BOARD.md +6 -6
  8. package/docs/v10/PROGRESS.md +5 -0
  9. package/loki-ts/dist/loki.js +2 -2
  10. package/mcp/__init__.py +1 -1
  11. package/package.json +2 -2
  12. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  13. package/web-app/dist/assets/{AdminPage-CQWI_3mK.js → AdminPage-CMOI_uF1.js} +1 -1
  14. package/web-app/dist/assets/{Avatar-BPmAoSfT.js → Avatar-CJysHgMZ.js} +1 -1
  15. package/web-app/dist/assets/{Badge-aGj4xspI.js → Badge-BSW1p4ME.js} +1 -1
  16. package/web-app/dist/assets/{Button-pJQGPQG3.js → Button-BL7bzQ1Y.js} +1 -1
  17. package/web-app/dist/assets/{CockpitPage-DHMIYaxA.js → CockpitPage-Bmv45KJ7.js} +1 -1
  18. package/web-app/dist/assets/{ComparePage-D2V0hmdL.js → ComparePage-uh4k5jP4.js} +1 -1
  19. package/web-app/dist/assets/{ErrorBoundary-Cy2nQmav.js → ErrorBoundary-DsaRVLEW.js} +1 -1
  20. package/web-app/dist/assets/{EvidenceReceiptPanel-CejdTO8x.js → EvidenceReceiptPanel-NjY2vPsh.js} +1 -1
  21. package/web-app/dist/assets/{GitHubIssuesPanel-DnhZq0EQ.js → GitHubIssuesPanel-Ddy2-mYL.js} +1 -1
  22. package/web-app/dist/assets/{GitHubPRsPanel-Dt0qFVhr.js → GitHubPRsPanel-CwsVtffj.js} +1 -1
  23. package/web-app/dist/assets/{HomePage-BmIuJ6x6.js → HomePage-C1rxgaCV.js} +2 -2
  24. package/web-app/dist/assets/{LoginPage-CwIqLxDo.js → LoginPage-CZLtGgxf.js} +1 -1
  25. package/web-app/dist/assets/{MagicPage-vHlxLhHy.js → MagicPage-D5ShnBjc.js} +1 -1
  26. package/web-app/dist/assets/{MetricsPage-Ch1_tLGT.js → MetricsPage-hHtlc_d8.js} +1 -1
  27. package/web-app/dist/assets/{NotFoundPage-CqbhVSVc.js → NotFoundPage-DTxd8zWf.js} +1 -1
  28. package/web-app/dist/assets/{ProjectPage-ebHX3sGB.js → ProjectPage-DMiW_LqF.js} +3 -3
  29. package/web-app/dist/assets/{ProjectsPage-B89zXpBD.js → ProjectsPage-B6w8YYFp.js} +1 -1
  30. package/web-app/dist/assets/{SettingsPage-ChFvJS_q.js → SettingsPage-D8NBJ6Ow.js} +1 -1
  31. package/web-app/dist/assets/{ShowcasePage-BwXsSLnZ.js → ShowcasePage-unLoXtfS.js} +1 -1
  32. package/web-app/dist/assets/{SystemSettingsPage-DFpGUEWE.js → SystemSettingsPage-hRWLltaq.js} +1 -1
  33. package/web-app/dist/assets/{TeamsPage-DokKqNEm.js → TeamsPage-CRgl9T-3.js} +1 -1
  34. package/web-app/dist/assets/{TemplatesPage-C0nYB8LZ.js → TemplatesPage-DpF7tvl-.js} +1 -1
  35. package/web-app/dist/assets/{TerminalOutput-DAY4Byu3.js → TerminalOutput-DCbwnSOM.js} +1 -1
  36. package/web-app/dist/assets/{activity-BOOOTjKZ.js → activity-D2WvJEeh.js} +1 -1
  37. package/web-app/dist/assets/{bell-BJnn6bBl.js → bell-CouZdkFh.js} +1 -1
  38. package/web-app/dist/assets/{bot-Bf2uaoIj.js → bot-DtfJgjKu.js} +1 -1
  39. package/web-app/dist/assets/{check-8ImSobx9.js → check-CdrUQ4RX.js} +1 -1
  40. package/web-app/dist/assets/{chevron-left-CltmqJT_.js → chevron-left-BAv_BwrD.js} +1 -1
  41. package/web-app/dist/assets/{circle-alert-BbAswQCH.js → circle-alert-Banmaa4K.js} +1 -1
  42. package/web-app/dist/assets/{clock-BavtSHCG.js → clock-Ccvc0Bww.js} +1 -1
  43. package/web-app/dist/assets/{cloud-CNROigPM.js → cloud-CAeKGGor.js} +1 -1
  44. package/web-app/dist/assets/{code-xml-CPMgX0Yl.js → code-xml-DxXcmu73.js} +1 -1
  45. package/web-app/dist/assets/{database-DbHRpxUI.js → database-SG1OE1xb.js} +1 -1
  46. package/web-app/dist/assets/{dollar-sign-BMsw7HY3.js → dollar-sign-h_V-9TZ3.js} +1 -1
  47. package/web-app/dist/assets/{file-code-corner-MmKizbcw.js → file-code-corner-CcRJ91yF.js} +1 -1
  48. package/web-app/dist/assets/{file-plus-B2klPCRF.js → file-plus-j20DnVVI.js} +1 -1
  49. package/web-app/dist/assets/{globe-DSscdsP3.js → globe-D_-OzrzF.js} +1 -1
  50. package/web-app/dist/assets/{hammer-CROPWX47.js → hammer-CkcYFWJ9.js} +1 -1
  51. package/web-app/dist/assets/{index-e6AJj_FZ.js → index-DJsL2Ayw.js} +3 -3
  52. package/web-app/dist/assets/{layers-CEObwoRd.js → layers-BnRTYNN0.js} +1 -1
  53. package/web-app/dist/assets/{loader-circle-BCqpe4tG.js → loader-circle-Dkw28D-E.js} +1 -1
  54. package/web-app/dist/assets/{lock-BnMvxGFU.js → lock-BjYcYzEv.js} +1 -1
  55. package/web-app/dist/assets/{package-B17YBJlQ.js → package-DuIzKQMO.js} +1 -1
  56. package/web-app/dist/assets/{plus-CDOsU3Nf.js → plus-FVb01j9e.js} +1 -1
  57. package/web-app/dist/assets/{refresh-cw-B3e5PosV.js → refresh-cw-C_Mb0BAy.js} +1 -1
  58. package/web-app/dist/assets/{rotate-ccw-Bq7bL0VU.js → rotate-ccw-DilrklmO.js} +1 -1
  59. package/web-app/dist/assets/{scroll-text-DnDLp_Iy.js → scroll-text-Du7cBUqO.js} +1 -1
  60. package/web-app/dist/assets/{server-DlV0wYge.js → server-BaQvJLcB.js} +1 -1
  61. package/web-app/dist/assets/{shield-alert-BBHJ_lXm.js → shield-alert-CZvOoSfx.js} +1 -1
  62. package/web-app/dist/assets/{thumbs-up-Bkv2XfEI.js → thumbs-up-72iprVd_.js} +1 -1
  63. package/web-app/dist/assets/{trash-2-D_G3y6X3.js → trash-2-BdF6Svmn.js} +1 -1
  64. package/web-app/dist/assets/{trending-down-VAFpBENN.js → trending-down-B3Qcyamg.js} +1 -1
  65. package/web-app/dist/assets/{trending-up-C1xa0U9-.js → trending-up-COX_uXpi.js} +1 -1
  66. package/web-app/dist/assets/{upload-YAZyAmu-.js → upload-D2rl_sqR.js} +1 -1
  67. package/web-app/dist/assets/{usePolling-CXWrIloO.js → usePolling-DOchRMKs.js} +1 -1
  68. package/web-app/dist/assets/{user-B1vdZy5k.js → user-CUIAuAG6.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: 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 v11.17.22
6
+ # Loki Mode v11.17.23
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
 
@@ -483,4 +483,4 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
483
483
 
484
484
  ---
485
485
 
486
- **v11.17.22 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
486
+ **v11.17.23 | [Autonomi](https://www.autonomi.dev/) flagship product | core skill**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 11.17.22
1
+ 11.17.23
@@ -168,6 +168,81 @@ _chat_run_launch() {
168
168
  return 1
169
169
  }
170
170
 
171
+ # Startup readiness: at most 3 lines, nothing when everything is ready.
172
+ _chat_readiness() {
173
+ local p="${_CHAT_PROVIDER:-claude}" out="" t hint="" prov="" git_line=""
174
+ if ! command -v "$p" >/dev/null 2>&1; then
175
+ [ "$p" = "claude" ] || hint=" (or try /provider claude)"
176
+ prov="$p CLI not found$hint. Fix (same as loki doctor):"$'\n'"$(_loki_req_fix_line "$p")"
177
+ elif [ "$p" = "claude" ] && [ -z "${ANTHROPIC_API_KEY:-}" ]; then
178
+ t="$(command -v timeout 2>/dev/null || command -v gtimeout 2>/dev/null || true)"
179
+ if [ -n "$t" ]; then out="$("$t" 5 claude auth status 2>/dev/null)" || out=""; else out="$(claude auth status 2>/dev/null)" || out=""; fi
180
+ case "$out" in
181
+ *'"loggedIn"'*false*) prov="claude is logged out: claude login (or set ANTHROPIC_API_KEY)" ;;
182
+ esac
183
+ fi
184
+ if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
185
+ if [ -z "$(ls -A 2>/dev/null)" ]; then
186
+ git_line="Empty folder: /run will set it up as a new project."
187
+ else
188
+ git_line="Not a git repo: /run needs git init in this folder first."
189
+ fi
190
+ fi
191
+ # Cap: provider block keeps at most 2 lines (3 total with the folder line).
192
+ if [ -n "$prov" ]; then
193
+ if [ -n "$git_line" ]; then printf '%s\n' "$prov" | head -n 2; else printf '%s\n' "$prov" | head -n 3; fi
194
+ fi
195
+ [ -z "$git_line" ] || printf '%s\n' "$git_line"
196
+ return 0
197
+ }
198
+
199
+ # Command names listed in _chat_help.
200
+ _chat_command_names() {
201
+ _chat_help | sed -n 's/^ \(\/[a-z][a-z]*\)\([ ,].*\)\{0,1\}$/\1/p' | sort -u
202
+ echo /exit
203
+ }
204
+
205
+ # True when $1 and $2 differ by exactly one substitution, insertion or deletion.
206
+ _chat_one_edit() {
207
+ local a="$1" b="$2" la=${#1} lb=${#2} i d=0 s l k=0
208
+ [ $(( la - lb )) -le 1 ] && [ $(( lb - la )) -le 1 ] || return 1
209
+ if [ "$la" -eq "$lb" ]; then
210
+ for (( i = 0; i < la; i++ )); do [ "${a:i:1}" = "${b:i:1}" ] || d=$((d + 1)); done
211
+ [ "$d" -eq 1 ]
212
+ return
213
+ fi
214
+ if [ "$la" -lt "$lb" ]; then s="$a"; l="$b"; else s="$b"; l="$a"; fi
215
+ while [ "$k" -lt "${#s}" ] && [ "${s:k:1}" = "${l:k:1}" ]; do k=$((k + 1)); done
216
+ [ "${s:k}" = "${l:k+1}" ]
217
+ }
218
+
219
+ # Suggest a command for an unknown slash command: unique prefix first, else a unique single-edit match.
220
+ _chat_suggest() {
221
+ local cmd="$1" c hit="" n=0 names
222
+ names="$(_chat_command_names)"
223
+ [ "${#cmd}" -ge 3 ] || return 0
224
+ while IFS= read -r c; do
225
+ case "$c" in "$cmd"?*) hit="$c"; n=$((n + 1)) ;; esac
226
+ done <<EOF2
227
+ $names
228
+ EOF2
229
+ if [ "$n" -eq 1 ]; then echo "$hit"; return 0; fi
230
+ n=0; hit=""
231
+ while IFS= read -r c; do
232
+ if _chat_one_edit "$cmd" "$c"; then hit="$c"; n=$((n + 1)); fi
233
+ done <<EOF2
234
+ $names
235
+ EOF2
236
+ if [ "$n" -eq 1 ]; then echo "$hit"; fi
237
+ return 0
238
+ }
239
+
240
+ # Provider failed to load: show the doctor fix line instead of a bare error.
241
+ _chat_load_fail() {
242
+ echo "loki chat: cannot load provider $1. Fix (same as loki doctor):" >&2
243
+ _loki_req_fix_line "$1" >&2
244
+ }
245
+
171
246
  # Run a delegate without letting a non-zero exit end the session (autonomy/loki runs under set -e).
172
247
  _chat_do() { local _rc=0; "$@" || _rc=$?; [ "$_rc" -eq 0 ] || echo "(exit $_rc)"; return 0; }
173
248
 
@@ -256,7 +331,7 @@ _chat_send() {
256
331
  (
257
332
  # shellcheck disable=SC1091
258
333
  source "${_LOKI_SCRIPT_DIR:-.}/../providers/loader.sh" 2>/dev/null || exit 1
259
- load_provider "$_CHAT_PROVIDER" >/dev/null 2>&1 || { echo "loki chat: cannot load provider $_CHAT_PROVIDER" >&2; exit 1; }
334
+ load_provider "$_CHAT_PROVIDER" >/dev/null 2>&1 || { _chat_load_fail "$_CHAT_PROVIDER"; exit 1; }
260
335
  provider_invoke "$prompt"
261
336
  )
262
337
  return $?
@@ -268,7 +343,7 @@ _chat_send() {
268
343
  (
269
344
  # shellcheck disable=SC1091
270
345
  source "${_LOKI_SCRIPT_DIR:-.}/../providers/loader.sh" 2>/dev/null || exit 1
271
- load_provider "$_CHAT_PROVIDER" >/dev/null 2>&1 || { echo "loki chat: cannot load provider $_CHAT_PROVIDER" >&2; exit 1; }
346
+ load_provider "$_CHAT_PROVIDER" >/dev/null 2>&1 || { _chat_load_fail "$_CHAT_PROVIDER"; exit 1; }
272
347
  case "$_CHAT_PROVIDER" in
273
348
  codex) codex exec --sandbox read-only --skip-git-repo-check "$prompt" < /dev/null ;;
274
349
  opencode) opencode run --agent plan --model "$PROVIDER_MODEL_DEVELOPMENT" "$prompt" < /dev/null ;;
@@ -398,6 +473,7 @@ cmd_chat() {
398
473
  _CHAT_STARTED=0
399
474
  local attached=0
400
475
  echo "Loki chat (provider: $_CHAT_PROVIDER). /help for commands, /exit to quit."
476
+ _chat_readiness
401
477
  _chat_memory_context "$loki"
402
478
  if [ "$attach" = "1" ]; then _chat_attach_banner && attached=1; fi
403
479
  while true; do
@@ -480,7 +556,9 @@ Question: $line" || true
480
556
  claude|codex|cline|aider|opencode) _CHAT_PROVIDER="$rest"; _CHAT_STARTED=0; echo "provider: $rest" ;;
481
557
  *) echo "usage: /provider claude|codex|cline|aider|opencode (now: $_CHAT_PROVIDER)" ;;
482
558
  esac ;;
483
- *) echo "unknown command: $cmd (try /help)" ;;
559
+ *)
560
+ local _sg; _sg="$(_chat_suggest "$cmd")"
561
+ if [ -n "$_sg" ]; then echo "unknown command: $cmd (did you mean $_sg?)"; else echo "unknown command: $cmd (try /help)"; fi ;;
484
562
  esac
485
563
  done
486
564
  return 0
@@ -7,6 +7,6 @@ Modules:
7
7
  control: Session control helpers (status, atomic writes, origin check)
8
8
  """
9
9
 
10
- __version__ = "11.17.22"
10
+ __version__ = "11.17.23"
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.17.22. Do not edit by hand.
3
+ Generated from `loki-ts/src/cli/registry.ts` by `scripts/generate-stale-zero.sh` for v11.17.23. 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
  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.17.22
5
+ **Version:** v11.17.23
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
 
package/docs/v10/BOARD.md CHANGED
@@ -1040,19 +1040,19 @@ Source: ~/git/autonomi-dev/research/2026-09-30-adoption/SWARM-PROMPT-ADOPTION.md
1040
1040
  | TEN-QUALITY-09 | Offline localization-recall eval on the pinned SWE-bench subset | benchmarks/swebench/loader.py, benchmarks/bench/tests/ (extend the existing loader test file there; grep for its current name before adding) | LOW | see Wall in note | released@2026-10-17T03:50Z | TL APPROVE db3196348. wave 1; depends: none. Goal: benchmarks/swebench/loader.py gains gold_files(patch), which parses the paths in the gold patch's diff headers, and a `localization` subcommand. For each pinned instance with a checkout at $LOKI_SWEBENCH_REPOS/<repo>@<base_commit>, it runs `bun -e` importing buildRepoMap and selectRelevantFiles from loki-ts/src. It writes recall@8 and recall@20 JSON with per-instance hits. An instance without a checkout is listed as skipped with its reason, never scored 0. Offline only, with no network. This gives TEN-QUALITY-04/05 a before/after number versus E-98d's 4/7, and gives TEN-QUALITY-08's paid A/B a pre-registered harness to run through the existing claude_code and loki adapters. Wall: Red first: gold_files on a recorded 2-file patch returns both paths and ignores /dev/null. The localization command on a temp git repo fixture plus a stub instance gives recall@8 = 1.0 when the gold file is named in the problem statement. A missing checkout appears as skipped with recall None, never 0. Mutation: count skipped as 0 and the skip test goes red. Gate: cd /Users/lokesh/git/lokimode-anthropic && python3 -I -m pytest benchmarks/bench/tests -q && bash scripts/local-ci.sh Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. Shipped in npm 11.17.15 (latest+next) or 11.17.16 (Release run success on e3d445460). |
1041
1041
  | TEN-UX-01 | Empty-folder first run: loki start "<brief>" sets up a repo and checks Claude login before any spend | loki-ts/src/util/first_run_repo.ts (new; justification: no existing module owns setting up an empty folder as a repo, and core has about 36 lines left so the logic cannot live in preflight.ts); loki-ts/src/engine10/preflight.ts (call the helper and the login check, net +3 lines max); loki-ts/src/commands/doctor.ts (export claudeAuthStatusLoggedIn only, and let it take an argv/env so preflight reuses it; no second parser); loki-ts/tests/engine10/preflight.test.ts; docs/v10/FAILURE-CLASSES.md (row first) | MEDIUM | see Wall in note | released@2026-10-17T05:06Z | SPLIT per CTO critic into (a) empty folder becomes a repo, (b) Claude login check in preflight plus doctor export; build as two commits or two agents. wave 2; depends: none. Goal: In an empty folder with no git repo, `loki start "<brief>"` runs git init -q, sets the default branch to main and makes an empty initial commit, then continues. It prints one line: `initialized a new git repository in <dir> (LOKI_AUTO_GIT_INIT=0 to refuse)`. A folder that is not empty and has no repo is never initialised automatically: it stays fatal, and the message gives the exact commands (git init && git add . && git commit -m init). A missing git identity stays fatal with the exact git config command; the identity is never set automatically. When the provider is claude and no ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN is set, preflight runs `claude auth status` (5s timeout, using the run env's PATH and LOKI_CLAUDE_CLI). A clear loggedIn:false is fatal and names the fix `claude login (or set ANTHROPIC_API_KEY)`. An unknown or empty answer is a warning only, never fatal, so a stub CLI still works. Wall: Red first: preflight.test.ts gains cases that fail on main today: (a) empty temp folder, no repo: checkPreflight returns fatal null, the folder now has .git and HEAD resolves; (b) folder holding one file, no repo: fatal contains `git init && git add . && git commit -m init`, and no .git is created; (c) LOKI_AUTO_GIT_INIT=0 on an empty folder: still fatal, no .git; (d) a fake claude on PATH printing {"loggedIn":false} gives a fatal containing `claude login`; (e) fake printing {} or exiting 1 gives fatal null plus one warning; (f) ANTHROPIC_API_KEY set: the fake claude is never called (it writes a marker file; assert the file is absent). Mutations: (1) drop the emptiness check, so case (b) must go red; (2) treat the unknown login answer as fatal, so case (e) must go red; (3) delete the export in doctor.ts, so the build/typecheck must go red. Gate: cd loki-ts && bun test tests/engine10/preflight.test.ts tests/engine10/budget.test.ts tests/commands/doctor.test.ts && bun test && bunx tsc --noEmit; then bash scripts/local-ci.sh Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1042
1042
  | TEN-UX-02 | Failure-specific Next line: every failed start names the exact fix | loki-ts/src/util/run_summary.ts (nextOf only); loki-ts/src/engine10/supervisor.ts (line 393 argument only; rebase after Q18-07 if it lands first); loki-ts/tests/util/run_summary.test.ts | LOW | see Wall in note | released@2026-10-17T02:57Z | merge 63cdd70ec, dist bd6348d77; TL APPROVE f450cf65f (94 pass, 2 mutations red); post-merge tsc 0 errors, 130 pass. wave 1; depends: none (rebase onto Q18-07 if supervisor.ts:313 moved). Goal: nextOf takes the run's reason and outcome and returns one concrete command per failure class: provider authentication failed -> `claude login` (or that provider's fix line from setup-requirements.json via requirementFix); provider credit exhausted -> `loki start ... --provider <other>` or check billing; '<check> failed: ...' -> `loki chat --attach` (ask why) plus `loki undo` when files changed; spec conflict (BLOCKED) -> `loki answer --text "..."`; STALLED -> `loki chat --attach`; engine ended before sealing a receipt -> `loki doctor`. The existing verified, done-unverified and budget branches stay byte-identical. The supervisor call site passes res.reason on the same line, with zero net core lines. Wall: Red first: run_summary.test.ts adds one table row per reason string that output.ts:74 reasonOf really produces (copy the literals, do not paraphrase), each asserting the exact Next command. These fail today because nextOf returns loki doctor/loki undo. A pin asserts the old outputs for verified, done-unverified, stopped and failed-without-reason, so default output does not drift. A source-scan test asserts every literal reason produced at output.ts:74 has a nextOf mapping (catches new reasons with no mapping). Mutation: make nextOf ignore the reason argument, so every new row must go red; remove the supervisor argument, so a contract test in tests/features/contract.test.ts that runs the summary with fatal:auth must go red. Gate: cd loki-ts && bun test tests/util/run_summary.test.ts tests/features/contract.test.ts tests/engine10/budget.test.ts && bun test && bunx tsc --noEmit Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. v11.17.13 npm next 11.17.13 |
1043
- | TEN-UX-03 | Funnel on the default engine10 route: first_run_blocked at preflight and build_verified at seal | loki-ts/src/util/funnel.ts (new; justification: telemetry.sh is the owner and this file is the only TS bridge to it, replacing the private copy in doctor.ts); loki-ts/src/commands/doctor.ts (emitFirstRunBlocked becomes a call to the helper; remove the spawn code); loki-ts/src/engine10/cli.ts (one call after main, at most +2 lines); autonomy/telemetry.sh (_loki_known_blocker keys and a loki_emit_build_verified_enum function); tests/test-first-run-funnel-coverage.sh | MEDIUM | see Wall in note | ready@2026-10-17T01:40Z | wave 3; depends: TEN-UX-01 (shares doctor.ts; also needs the not_a_repo fatal text to exist). Goal: Move the detached, opt-out-respecting telemetry.sh spawn from doctor.ts:1047-1069 into one TS helper (emitFunnel(kind, key)), and delete the copy in doctor.ts in the same change. Call it from engine10/cli.ts after the supervisor returns: preflight exit 2 sends first_run_blocked with a bounded key; a VERIFIED or ALREADY_SATISFIED exit sends build_verified carrying only headline=VERIFIED and route=engine10. No other field is sent. Add keys not_a_repo and git_identity to _loki_known_blocker (telemetry.sh:204), and add an allowlisted build_verified variant that takes enum args instead of a proof.json path. All existing opt-outs still apply because everything goes through _loki_analytics_enabled. Wall: Red first: test-first-run-funnel-coverage.sh gains (a) a wiring assertion that engine10/cli.ts reaches emitFunnel on a preflight exit 2 and on a VERIFIED exit, and (b) a run with a stub telemetry.sh in a throwaway HOME, analytics forced on, with no network: loki_telemetry is replaced by a recorder function. Assert that one first_run_blocked blocker=not_a_repo line is recorded for a start in a non-empty folder with no repo, and that a second identical run records nothing (once-per-install marker). Assert DO_NOT_TRACK=1 and LOKI_TELEMETRY_DISABLED=1 each record zero lines. Assert the recorded payload contains no path, home dir or brief text (grep the recorder file for the temp folder path and the brief: must be absent). Mutations: emit a raw blocker string instead of the enum, so the no-path assertion must go red; drop the marker write, so the second-run assertion must go red; leave doctor's old spawn copy in place, so a grep guard counting `telemetry.sh` spawns in loki-ts/src (exactly 1) must go red. Gate: bash tests/test-first-run-funnel-coverage.sh && bash tests/test-first-run-blocked-signal.sh && cd loki-ts && bun test tests/engine10/budget.test.ts tests/commands/doctor.test.ts && bun test; then bash scripts/local-ci.sh Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1043
+ | TEN-UX-03 | Funnel on the default engine10 route: first_run_blocked at preflight and build_verified at seal | loki-ts/src/util/funnel.ts (new; justification: telemetry.sh is the owner and this file is the only TS bridge to it, replacing the private copy in doctor.ts); loki-ts/src/commands/doctor.ts (emitFirstRunBlocked becomes a call to the helper; remove the spawn code); loki-ts/src/engine10/cli.ts (one call after main, at most +2 lines); autonomy/telemetry.sh (_loki_known_blocker keys and a loki_emit_build_verified_enum function); tests/test-first-run-funnel-coverage.sh | MEDIUM | see Wall in note | building@2026-10-17T05:07Z | wave 3; depends: TEN-UX-01 (shares doctor.ts; also needs the not_a_repo fatal text to exist). Goal: Move the detached, opt-out-respecting telemetry.sh spawn from doctor.ts:1047-1069 into one TS helper (emitFunnel(kind, key)), and delete the copy in doctor.ts in the same change. Call it from engine10/cli.ts after the supervisor returns: preflight exit 2 sends first_run_blocked with a bounded key; a VERIFIED or ALREADY_SATISFIED exit sends build_verified carrying only headline=VERIFIED and route=engine10. No other field is sent. Add keys not_a_repo and git_identity to _loki_known_blocker (telemetry.sh:204), and add an allowlisted build_verified variant that takes enum args instead of a proof.json path. All existing opt-outs still apply because everything goes through _loki_analytics_enabled. Wall: Red first: test-first-run-funnel-coverage.sh gains (a) a wiring assertion that engine10/cli.ts reaches emitFunnel on a preflight exit 2 and on a VERIFIED exit, and (b) a run with a stub telemetry.sh in a throwaway HOME, analytics forced on, with no network: loki_telemetry is replaced by a recorder function. Assert that one first_run_blocked blocker=not_a_repo line is recorded for a start in a non-empty folder with no repo, and that a second identical run records nothing (once-per-install marker). Assert DO_NOT_TRACK=1 and LOKI_TELEMETRY_DISABLED=1 each record zero lines. Assert the recorded payload contains no path, home dir or brief text (grep the recorder file for the temp folder path and the brief: must be absent). Mutations: emit a raw blocker string instead of the enum, so the no-path assertion must go red; drop the marker write, so the second-run assertion must go red; leave doctor's old spawn copy in place, so a grep guard counting `telemetry.sh` spawns in loki-ts/src (exactly 1) must go red. Gate: bash tests/test-first-run-funnel-coverage.sh && bash tests/test-first-run-blocked-signal.sh && cd loki-ts && bun test tests/engine10/budget.test.ts tests/commands/doctor.test.ts && bun test; then bash scripts/local-ci.sh Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1044
1044
  | TEN-UX-04 | loki doctor --fix: consent-gated installs and Claude login, plus its first tests | loki-ts/src/commands/doctor_fix.ts; loki-ts/src/commands/doctor.ts (pass --yes through to runDoctorFix only; rebase after TEN-UX-01/03 if they touch the same hunk); loki-ts/tests/commands/doctor.test.ts (extend; no doctor_fix test exists today) | MEDIUM | see Wall in note | ready@2026-10-17T01:40Z | wave 4; depends: TEN-UX-03 (doctor.ts edit order only). Goal: On a TTY, `loki doctor --fix` offers each missing default-provider install as a y/N question before running it: `npm install -g @anthropic-ai/claude-code`, then `claude login` when evaluateClaudeLogin returns fail. `--fix --yes` runs the same steps without asking, for scripted onboarding. Without a TTY and without --yes, it prints the commands only, exactly as today. System package managers and sudo are never run. Every step that runs reports `fixed:` or `failed: <first stderr line>`, and the command exits non-zero when a required step still fails. Command execution is behind an injectable runner, so tests never install anything. Wall: Red first: doctor.test.ts gains applyDoctorFixes/runDoctorFix cases with an injected has() and runner: (a) claude missing, tty=false, no --yes: the runner is never called and the npm command is printed; (b) claude missing, --yes: the runner gets exactly [npm, install, -g, @anthropic-ai/claude-code]; (c) runner fails: output has `failed:` and the exit code is non-zero; (d) jq missing with --yes: the runner is never called for jq (system package, print only); (e) claude present and logged out with --yes: the runner gets [claude, login]. These fail today because doctor_fix has no runner, no --yes and no exit code. Mutations: drop the tty/--yes gate, so (a) must go red; let system packages through the runner, so (d) must go red. Gate: cd loki-ts && bun test tests/commands/doctor.test.ts tests/commands/doctor_router.test.ts && bun test && bunx tsc --noEmit; bash tests/test-doctor-ux.sh; bash tests/test-doctor-single-impl.sh Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1045
- | TEN-UX-05 | loki chat startup readiness check and slash-command suggestions | autonomy/lib/chat.sh; tests/test-doctor-ux.sh (already owns the chat assertions, P12-16) | LOW | see Wall in note | building@2026-10-17T04:43Z | wave 3; depends: none (the folder message text refers to TEN-UX-01 behaviour; write it to whichever behaviour is on main). Goal: When cmd_chat starts (after the TTY check), print at most 3 readiness lines, once, using existing helpers only. (1) The provider CLI for _CHAT_PROVIDER is missing (any provider, not only claude): print `_loki_req_fix_line <provider>` and a hint to try `/provider claude`. (2) claude is logged out: print `claude login (or set ANTHROPIC_API_KEY)`. (3) The folder is not a git repo: say that `/run` will set up an empty folder (TEN-UX-01) or needs `git init` for a non-empty one. When everything is ready, print nothing extra, so a working setup sees no new text. An unknown slash command prints `unknown command: /stat (did you mean /status?)` by unique-prefix or single-edit match against the _chat_help list. The hint for a missing non-Claude provider replaces the bare 'cannot load provider X' at chat.sh:259/:271 with the fix line. Wall: Red first: test-doctor-ux.sh adds cases that drive cmd_chat through `script`/a pty helper already used there (or calls the new _chat_readiness function directly). With PATH holding no codex and LOKI_PROVIDER=codex, the output contains the codex fix string from setup-requirements.json. With a fake claude printing {"loggedIn":false}, the output contains `claude login`. In a non-git temp folder, the output mentions git. With every check passing (fake claude logged in, inside a repo), the readiness output is empty. `/stat` suggests `/status`; `/zzzz` prints no suggestion. Mutations: print readiness lines unconditionally, so the all-ready empty assertion must go red; hardcode the claude fix for every provider, so the codex fix assertion must go red. bash -n and shellcheck on chat.sh. Gate: bash tests/test-doctor-ux.sh && bash tests/test-loki-steer.sh && bash tests/test-first-run-bash32.sh && shellcheck autonomy/lib/chat.sh; then bash scripts/local-ci.sh Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1045
+ | TEN-UX-05 | loki chat startup readiness check and slash-command suggestions | autonomy/lib/chat.sh; tests/test-doctor-ux.sh (already owns the chat assertions, P12-16) | LOW | see Wall in note | released@2026-10-17T05:25Z v11.17.23 | wave 3; depends: none (the folder message text refers to TEN-UX-01 behaviour; write it to whichever behaviour is on main). Goal: When cmd_chat starts (after the TTY check), print at most 3 readiness lines, once, using existing helpers only. (1) The provider CLI for _CHAT_PROVIDER is missing (any provider, not only claude): print `_loki_req_fix_line <provider>` and a hint to try `/provider claude`. (2) claude is logged out: print `claude login (or set ANTHROPIC_API_KEY)`. (3) The folder is not a git repo: say that `/run` will set up an empty folder (TEN-UX-01) or needs `git init` for a non-empty one. When everything is ready, print nothing extra, so a working setup sees no new text. An unknown slash command prints `unknown command: /stat (did you mean /status?)` by unique-prefix or single-edit match against the _chat_help list. The hint for a missing non-Claude provider replaces the bare 'cannot load provider X' at chat.sh:259/:271 with the fix line. Wall: Red first: test-doctor-ux.sh adds cases that drive cmd_chat through `script`/a pty helper already used there (or calls the new _chat_readiness function directly). With PATH holding no codex and LOKI_PROVIDER=codex, the output contains the codex fix string from setup-requirements.json. With a fake claude printing {"loggedIn":false}, the output contains `claude login`. In a non-git temp folder, the output mentions git. With every check passing (fake claude logged in, inside a repo), the readiness output is empty. `/stat` suggests `/status`; `/zzzz` prints no suggestion. Mutations: print readiness lines unconditionally, so the all-ready empty assertion must go red; hardcode the claude fix for every provider, so the codex fix assertion must go red. bash -n and shellcheck on chat.sh. Gate: bash tests/test-doctor-ux.sh && bash tests/test-loki-steer.sh && bash tests/test-first-run-bash32.sh && shellcheck autonomy/lib/chat.sh; then bash scripts/local-ci.sh Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1046
1046
  | TEN-UX-06 | Dashboard page: empty state, auto-select of the live run, stage progress strip, readable timeline, theme and narrow-screen layout | loki-ts/src/util/dashboard_page.ts; loki-ts/tests/engine10/dashboard_entry.test.ts (extend; it already serves the real page from a fixture events.jsonl) | LOW | see Wall in note | released@2026-10-17T03:50Z | merged 0a45be416 (TL APPROVE d933581dc; follow-up: test that a later click survives the next poll) Shipped in npm 11.17.15 (latest+next) or 11.17.16 (Release run success on e3d445460). |
1047
1047
  | TEN-UX-07 | Dashboard server panels: Reason, Next step and current stage elapsed | loki-ts/src/runner/engine10_dashboard.ts (formatPanels and summarizeRun only); loki-ts/tests/engine10/dashboard.test.ts | LOW | see Wall in note | released@2026-10-17T04:08Z | v11.17.17; TL APPROVE batch J workflow w9sw9xytw |
1048
- | TEN-UX-08 | First-run gate: empty-folder loki start scenario and the install-to-first-success time budget | scripts/first-run-gate.sh; tests/test-first-run-gate.sh; docs/v10/METRICS.md (row 14 text only, written by --real runs, not by the engineer) | MEDIUM | see Wall in note | ready@2026-10-17T01:40Z | wave 4; depends: TEN-UX-01 (empty-folder start must work), TEN-UX-02 (Next wording). Goal: Add `--entry start-empty` to scripts/first-run-gate.sh. It installs (with --installed) or uses the tree, creates an empty folder under the run-owned temp directory, sets git identity through GIT_* env vars only, and runs `loki doctor` then `loki start "<brief>"` with the existing stub claude. It asserts: the folder was set up as a repo, Outcome is VERIFIED, a receipt is sealed, Next is present, and install+doctor+start wall time on the stub is <= 120s, recorded as `install_to_first_success_s`. The stub run measures harness overhead only. With --real, it appends the measured time-to-first-sealed-result row to docs/v10/METRICS.md, replacing the 'not measured' row at METRICS.md:14 with a dated measurement and its command. In stub mode it never writes METRICS. Wall: Red first: test-first-run-gate.sh adds fake-loki modes for the new entry: (a) a fake that leaves the folder without a repo: FAIL repo-init; (b) a fake that sleeps past an injected budget FRG_BUDGET_S=1: FAIL first-success-budget; (c) a fake with no Next line: FAIL next-line; (d) a well-behaved fake: all PASS and the report has `install_to_first_success_s=<int>`. The new entry does not exist today, so these fail. Mutations: drop the budget comparison, so (b) must go red; parse the time field as a string compare, so a budget of 9 vs a measured 10 must go red. Tests use loki_run_tmp_create/cleanup only, never /tmp globs. Gate: bash tests/test-first-run-gate.sh && bash scripts/first-run-gate.sh --stub --entry start-empty; then bash scripts/local-ci.sh Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1048
+ | TEN-UX-08 | First-run gate: empty-folder loki start scenario and the install-to-first-success time budget | scripts/first-run-gate.sh; tests/test-first-run-gate.sh; docs/v10/METRICS.md (row 14 text only, written by --real runs, not by the engineer) | MEDIUM | see Wall in note | building@2026-10-17T05:07Z | wave 4; depends: TEN-UX-01 (empty-folder start must work), TEN-UX-02 (Next wording). Goal: Add `--entry start-empty` to scripts/first-run-gate.sh. It installs (with --installed) or uses the tree, creates an empty folder under the run-owned temp directory, sets git identity through GIT_* env vars only, and runs `loki doctor` then `loki start "<brief>"` with the existing stub claude. It asserts: the folder was set up as a repo, Outcome is VERIFIED, a receipt is sealed, Next is present, and install+doctor+start wall time on the stub is <= 120s, recorded as `install_to_first_success_s`. The stub run measures harness overhead only. With --real, it appends the measured time-to-first-sealed-result row to docs/v10/METRICS.md, replacing the 'not measured' row at METRICS.md:14 with a dated measurement and its command. In stub mode it never writes METRICS. Wall: Red first: test-first-run-gate.sh adds fake-loki modes for the new entry: (a) a fake that leaves the folder without a repo: FAIL repo-init; (b) a fake that sleeps past an injected budget FRG_BUDGET_S=1: FAIL first-success-budget; (c) a fake with no Next line: FAIL next-line; (d) a well-behaved fake: all PASS and the report has `install_to_first_success_s=<int>`. The new entry does not exist today, so these fail. Mutations: drop the budget comparison, so (b) must go red; parse the time field as a string compare, so a budget of 9 vs a measured 10 must go red. Tests use loki_run_tmp_create/cleanup only, never /tmp globs. Gate: bash tests/test-first-run-gate.sh && bash scripts/first-run-gate.sh --stub --entry start-empty; then bash scripts/local-ci.sh Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1049
1049
  | TEN-GATES-01 | FC row plus pure check-provenance classifier in check_result.ts | loki-ts/src/util/check_result.ts, loki-ts/tests/engine10/check_result.test.ts, docs/v10/FAILURE-CLASSES.md | HIGH | see Wall in note | released@2026-10-17T03:50Z | merged 0970d5887 (HIGH r2 APPROVE 10be1a1bd; FAILURE-CLASSES append conflict kept both sections) Shipped in npm 11.17.15 (latest+next) or 11.17.16 (Release run success on e3d445460). |
1050
1050
  | TEN-GATES-02 | Seal: receipt checks carry provenance; VERIFIED requires agent-independent proof | loki-ts/src/engine10/stages/seal.ts, loki-ts/src/engine10/types.ts, loki-ts/tests/engine10/seal.test.ts, docs/v10/DECISIONS.md | HIGH | see Wall in note | ready@2026-10-17T01:40Z | wave 3; depends: TEN-GATES-01, Q18-05b (seal.ts in flight). Goal: In seal.ts replace hasExecutedProof at seal.ts:190 with hasExogenousProof (wallGreenOnBase still counts); when only agent_authored/llm_judge checks passed, verdict caps at PARTIAL and not_proven gains 'only agent-authored tests executed (no agent-independent proof)'. Each receipt check gains additive optional provenance (types.ts ReceiptCheck provenance?: ...; omitted key keeps older receipts byte-stable for verification). renderReceiptMd splits '### Agent-independent checks' and '### Agent-authored / advisory checks'. Opt-out LOKI_EXOGENOUS_PROOF=0 (record the default-on decision in DECISIONS.md under the D99 grant). Net-zero line change in engine10 core (fold into existing lines or move helpers to util). Wall: Red first in seal.test.ts: fake verify outputs with one passing check on a test file ADDED in the diff and no Wall -> expect PARTIAL plus the not_proven line (today VERIFIED); same check on a pre-existing file -> VERIFIED; receipt.json checks carry provenance; receipt.md has both sections. Mutation: revert to hasExecutedProof -> red. LOKI_EXOGENOUS_PROOF=0 restores old verdict. Gate: cd loki-ts && bun test tests/engine10/seal.test.ts tests/engine10/seal_verify_roundtrip.test.ts tests/engine10/budget.test.ts && bun test && bunx tsc --noEmit Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1051
1051
  | TEN-GATES-03 | loki verify reports agent-independent evidence and adds --require-exogenous | loki-ts/src/engine10/verify_cmd.ts, loki-ts/tests/engine10/verify_cmd.test.ts | HIGH | see Wall in note | released@2026-10-17T04:08Z | v11.17.17; TL APPROVE batch J workflow w9sw9xytw |
1052
- | TEN-GATES-04 | TS-callable app boot and HTTP health probe over app-runner.sh | loki-ts/src/util/app_probe.ts (new), loki-ts/tests/util/app_probe.test.ts (new) | MEDIUM | see Wall in note | building@2026-10-17T04:38Z | SPLIT per CTO critic into (a) app boot and health, (b) functional-verify run and artifact write; build as two commits or two agents. wave 2; depends: none. Goal: New loki-ts/src/util/app_probe.ts (justification: no TS module owns app boot; app-runner.sh is bash-only and deep.ts:121-122 names this missing surface). appProbe(repoDir, lokiDir, {specText?, timeoutMs}) sources autonomy/app-runner.sh in a bash child (token-free env via plainTestEnv), runs app_runner_init, app_runner_start, app_runner_health_check, reads .loki/app-runner/health.json, then (when specText given) runs autonomy/lib/functional-verify.py against the URL and writes .loki/quality/functional-results.json in the shape proof-generator.py:841-870 reads. ALWAYS calls app_runner_stop in finally (stops only the PID app-runner recorded). Returns ReceiptCheck-shaped results: 'app boot' and 'http probe' with result pass/fail/not_run and reason; missing runtime or no app detected = not_run, never fail. Wall: Red first: fixture repo with a static index.html (app-runner static-site path, as tests/test-app-runner-static-site.sh) -> app boot pass + health.json ok; fixture whose start command exits 1 -> fail; empty repo -> not_run. Assert no process left on the recorded PID after return. Mutation: drop the stop call -> leftover-PID assertion red. Gate: cd loki-ts && bun test tests/util/app_probe.test.ts && bun test && bunx tsc --noEmit; register the new test file per the structural guards (select-tests.sh --guards-only rows, shard registration) Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1052
+ | TEN-GATES-04 | TS-callable app boot and HTTP health probe over app-runner.sh | loki-ts/src/util/app_probe.ts (new), loki-ts/tests/util/app_probe.test.ts (new) | MEDIUM | see Wall in note | released@2026-10-17T05:25Z v11.17.23 | SPLIT per CTO critic into (a) app boot and health, (b) functional-verify run and artifact write; build as two commits or two agents. wave 2; depends: none. Goal: New loki-ts/src/util/app_probe.ts (justification: no TS module owns app boot; app-runner.sh is bash-only and deep.ts:121-122 names this missing surface). appProbe(repoDir, lokiDir, {specText?, timeoutMs}) sources autonomy/app-runner.sh in a bash child (token-free env via plainTestEnv), runs app_runner_init, app_runner_start, app_runner_health_check, reads .loki/app-runner/health.json, then (when specText given) runs autonomy/lib/functional-verify.py against the URL and writes .loki/quality/functional-results.json in the shape proof-generator.py:841-870 reads. ALWAYS calls app_runner_stop in finally (stops only the PID app-runner recorded). Returns ReceiptCheck-shaped results: 'app boot' and 'http probe' with result pass/fail/not_run and reason; missing runtime or no app detected = not_run, never fail. Wall: Red first: fixture repo with a static index.html (app-runner static-site path, as tests/test-app-runner-static-site.sh) -> app boot pass + health.json ok; fixture whose start command exits 1 -> fail; empty repo -> not_run. Assert no process left on the recorded PID after return. Mutation: drop the stop call -> leftover-PID assertion red. Gate: cd loki-ts && bun test tests/util/app_probe.test.ts && bun test && bunx tsc --noEmit; register the new test file per the structural guards (select-tests.sh --guards-only rows, shard registration) Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1053
1053
  | TEN-GATES-05 | Spec-derived API auth probe in functional-verify.py | autonomy/lib/functional-verify.py, tests/test_functional_verify.py | HIGH | see Wall in note | parked@2026-10-17T03:30Z | HIGH r1 BLOCK; re-sliced as TEN-GATES-05b |
1054
- | TEN-GATES-06 | Deep verify: real app boot and secure-scan rules on engine10 | loki-ts/src/engine10/stages/deep.ts, loki-ts/tests/engine10/deep.test.ts | HIGH | see Wall in note | ready@2026-10-17T01:40Z | wave 3; depends: TEN-GATES-04, Q18-04 (deep.ts in flight). Goal: Replace runAppBoot's hard-coded not_run (deep.ts:105-130) with a call to util/app_probe.ts, pushing its 'app boot' and 'http probe' checks; extend the existing 'security scan' check to also run autonomy/lib/secure-scan.py over changed files (HIGH active finding = fail, scanner absent = not_run). DEEP_NOT_PROVEN entries clear only for checks that actually ran. Net-zero lines in engine10 core (app boot body shrinks to the call). Wall: Red first in deep.test.ts: injected appProbe fake returning pass -> 'app boot' check result pass (today always not_run); a changed file with a committed PEM private key -> security scan fail with secure-scan rule id; secure-scan missing -> not_run. Mutation: ignore secure-scan exit -> red. Gate: cd loki-ts && bun test tests/engine10/deep.test.ts tests/engine10/deep_wiring.test.ts tests/engine10/budget.test.ts && bun test && bunx tsc --noEmit Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1055
- | TEN-GATES-07 | loki start route: collect app health and functional facts before the proof | loki-ts/src/runner/proof.ts, loki-ts/tests/runner/proof.test.ts | MEDIUM | see Wall in note | ready@2026-10-17T01:40Z | wave 3; depends: TEN-GATES-04. Goal: In runner/proof.ts, before spawning proof-generator.py, call util/app_probe.ts with the run's PRD text (LOKI_PROOF_APP_PROBE=0 opts out) so .loki/app-runner/health.json and .loki/quality/functional-results.json exist on the primary route; the proof's healthcheck and functional facts stop being permanently not_run. Still never throws; probe failure leaves the facts absent (not_run), never fabricated. Wall: Red first in proof.test.ts: inject a fake probe that writes both artifacts -> generator facts.healthcheck/functional ran=true; probe throwing -> generator still invoked, facts not_run. Mutation: skip probe -> red. Gate: cd loki-ts && bun test tests/runner/proof.test.ts tests/runner/proof_run_id_pointer.test.ts && bun test && bunx tsc --noEmit Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1054
+ | TEN-GATES-06 | Deep verify: real app boot and secure-scan rules on engine10 | loki-ts/src/engine10/stages/deep.ts, loki-ts/tests/engine10/deep.test.ts | HIGH | see Wall in note | building@2026-10-17T05:20Z | wave 3; depends: TEN-GATES-04, Q18-04 (deep.ts in flight). Goal: Replace runAppBoot's hard-coded not_run (deep.ts:105-130) with a call to util/app_probe.ts, pushing its 'app boot' and 'http probe' checks; extend the existing 'security scan' check to also run autonomy/lib/secure-scan.py over changed files (HIGH active finding = fail, scanner absent = not_run). DEEP_NOT_PROVEN entries clear only for checks that actually ran. Net-zero lines in engine10 core (app boot body shrinks to the call). Wall: Red first in deep.test.ts: injected appProbe fake returning pass -> 'app boot' check result pass (today always not_run); a changed file with a committed PEM private key -> security scan fail with secure-scan rule id; secure-scan missing -> not_run. Mutation: ignore secure-scan exit -> red. Gate: cd loki-ts && bun test tests/engine10/deep.test.ts tests/engine10/deep_wiring.test.ts tests/engine10/budget.test.ts && bun test && bunx tsc --noEmit Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1055
+ | TEN-GATES-07 | loki start route: collect app health and functional facts before the proof | loki-ts/src/runner/proof.ts, loki-ts/tests/runner/proof.test.ts | MEDIUM | see Wall in note | building@2026-10-17T05:20Z | wave 3; depends: TEN-GATES-04. Goal: In runner/proof.ts, before spawning proof-generator.py, call util/app_probe.ts with the run's PRD text (LOKI_PROOF_APP_PROBE=0 opts out) so .loki/app-runner/health.json and .loki/quality/functional-results.json exist on the primary route; the proof's healthcheck and functional facts stop being permanently not_run. Still never throws; probe failure leaves the facts absent (not_run), never fabricated. Wall: Red first in proof.test.ts: inject a fake probe that writes both artifacts -> generator facts.healthcheck/functional ran=true; probe throwing -> generator still invoked, facts not_run. Mutation: skip probe -> red. Gate: cd loki-ts && bun test tests/runner/proof.test.ts tests/runner/proof_run_id_pointer.test.ts && bun test && bunx tsc --noEmit Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
1056
1056
  | TEN-GATES-08 | loki start route: secure-scan as an exogenous security_scan gate | loki-ts/src/runner/quality_gates.ts, loki-ts/tests/runner/quality_gates.test.ts | MEDIUM | see Wall in note | released@2026-10-17T04:08Z | v11.17.17; TL APPROVE batch J workflow w9sw9xytw |
1057
1057
  | TEN-GATES-09 | loki start route: write build-results.json (wire the dead pythonBuildCheck) | loki-ts/src/util/python_build_check.ts, loki-ts/src/runner/autonomous.ts, loki-ts/tests/util/python_build_check.test.ts | MEDIUM | see Wall in note | released@2026-10-17T03:50Z | merged f24496198 (TL APPROVE 09a2ae73f) Shipped in npm 11.17.15 (latest+next) or 11.17.16 (Release run success on e3d445460). |
1058
1058
  | TEN-GATES-10 | Proof headline: VERIFIED needs one agent-independent fact beside the agent's suite | autonomy/lib/proof-generator.py, tests/test_proof_generator.py, docs/v10/DECISIONS.md | HIGH | see Wall in note | ready@2026-10-17T01:40Z | wave 4; depends: COST-WALL-f (proof-generator.py in flight), TEN-GATES-07, TEN-GATES-08, TEN-GATES-09 (facts must exist before tightening, or every primary-route run downgrades). Goal: In proof-generator.py the tests_verified branch (:2045-2055) returns VERIFIED only when at least one exogenous fact also passed: build verified, healthcheck ok, functional passed, security clean that actually ran, or an exogenous quality gate passed; otherwise VERIFIED WITH GAPS with degraded item 'no agent-independent evidence (only the agent's own test suite passed)'. Gap record is additive; LOKI_PROOF_REQUIRE_EXOGENOUS=0 opt-out; decision recorded in DECISIONS.md under D99. Wall: Red first in test_proof_generator.py: facts with tests verified + nonempty diff and nothing else -> 'VERIFIED WITH GAPS' plus the degraded item (today VERIFIED); add build verified -> VERIFIED; only an advisory code_review pass -> still WITH GAPS. Mutation: count advisory gates as corroboration -> red. Gate: python3 -m pytest -q tests/test_proof_generator.py tests/test_proof_degraded_disabled_gates.py tests/test_proof_verify.py; bash tests/test-proven-pr-receipt.sh Rules: FAILURE-CLASSES row first for any bug fix (D86); no CHANGELOG edits (Release Manager writes notes); DECISIONS numbers assigned by the Chief of Staff; reuse util/secure_scan.ts, the shared badge helper, keys_cmd export and the TS claude login probe instead of new copies; new CLI flags update autonomy/completions and the help-drift guard. |
@@ -2438,3 +2438,8 @@ v11.17.20 published (Release run success on e2b6b77d2; npm latest 11.17.20, next
2438
2438
  ## 2026-10-17T05:06Z (CoS) v11.17.22
2439
2439
 
2440
2440
  v11.17.21 published (Release success on 462fbc40a; npm latest 11.17.21, next 11.17.21). Security Audit red on 462fbc40a: 4 leaks, reproduced locally only with --diff-merges=first-parent (slice-branch merges fd027051c, bc0e97c63 re-add the QUALITY-01 fixture key); fingerprints added, rescan rc=0. Pre-push scans without first-parent merge diffs, so it passed; TEN-SEC-GITLEAKS-01 (HIGH) dispatched to make the fixture key runtime-built and align pre-push with CI. Ships batch P approvals: DEPLOY-04 (TL APPROVE 4ed77ee5b), QUALITY-05 (TL APPROVE 69f284f71), UX-01 (TL APPROVE 08a8ae052), STABILITY-07 (TL APPROVE 0261d735a); tsc on merged main clean. Round 2 dispatched: DEPLOY-02 (HIGH BLOCK, --max-age ignored on --url), GATES-04 (TL BLOCK, app leak on boot timeout), UX-05 (TL BLOCK, 4 readiness lines), COST-11 (HIGH BLOCK, haiku already-satisfied false green and stage limit cuts the sonnet retry).
2441
+
2442
+ ## 2026-10-17T05:25Z (CoS) v11.17.23
2443
+ - v11.17.22 published: npm latest=11.17.22 next=11.17.22 (npm view dist-tags). Its Release gate job failed on P9 injection-cannot-reach-token (reproduced locally: bash tests/moat/p9-rule-of-two.sh prints CASE P9.injection-cannot-reach-token FAIL on 2a4dad0c1); P0 fix-forward TEN-P9-FIX dispatched with opus HIGH review (workflow wpvgygoia). Security Audit on 67c21ba72: success.
2444
+ - v11.17.23 ships TEN-GATES-04 (TL APPROVE 6ce706340) and TEN-UX-05 (TL APPROVE bbba42387).
2445
+ - TEN-SEC-GITLEAKS-01 r1 HIGH BLOCK c2db05d04 (G1 greps the echo line, not the gitleaks call); r2 dispatched. Round 3 for DEPLOY-02 and COST-11 plus GATES-06 and GATES-07 building (workflow wg0hl8nge).
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- var hR0=Object.create;var{getPrototypeOf:gR0,defineProperty:iQ,getOwnPropertyNames:Ed,getOwnPropertyDescriptor:mR0}=Object,Rd=Object.prototype.hasOwnProperty;function Dd(Z){return this[Z]}var uR0,pR0,dR0=(Z,$,J)=>{var X=Z!=null&&typeof Z==="object";if(X){var Y=$?uR0??=new WeakMap:pR0??=new WeakMap,z=Y.get(Z);if(z)return z}J=Z!=null?hR0(gR0(Z)):{};let Q=$||!Z||!Z.__esModule?iQ(J,"default",{value:Z,enumerable:!0}):J;for(let W of Ed(Z))if(!Rd.call(Q,W))iQ(Q,W,{get:Dd.bind(Z,W),enumerable:!0});if(X)Y.set(Z,Q);return Q},cR0=(Z)=>{var $=(Pd??=new WeakMap).get(Z),J;if($)return $;if($=iQ({},"__esModule",{value:!0}),Z&&typeof Z==="object"||typeof Z==="function"){for(var X of Ed(Z))if(!Rd.call($,X))iQ($,X,{get:Dd.bind(Z,X),enumerable:!(J=mR0(Z,X))||J.enumerable})}return Pd.set(Z,$),$},Pd,nU=(Z,$)=>()=>($||Z(($={exports:{}}).exports,$),$.exports);var lR0=(Z)=>Z;function aR0(Z,$){this[Z]=lR0.bind(null,$)}var A0=(Z,$)=>{for(var J in $)iQ(Z,J,{get:$[J],enumerable:!0,configurable:!0,set:aR0.bind($,J)})};var x=(Z,$)=>()=>(Z&&($=Z(Z=0)),$);var M5=import.meta.require;var _d={};A0(_d,{lokiDir:()=>D0,homeLokiDir:()=>g2,findRepoRootForVersion:()=>KT,REPO_ROOT:()=>F0});import{resolve as u3,dirname as WT}from"path";import{fileURLToPath as iR0}from"url";import{existsSync as sU}from"fs";import{homedir as oR0}from"os";function nR0(){let Z=wd;for(let $=0;$<6;$++){if(sU(u3(Z,"VERSION"))&&sU(u3(Z,"autonomy/run.sh")))return Z;let J=WT(Z);if(J===Z)break;Z=J}return u3(wd,"..","..","..")}function KT(Z){let $=Z;for(let J=0;J<6;J++){if(sU(u3($,"VERSION"))&&sU(u3($,"autonomy/run.sh")))return $;let X=WT($);if(X===$)break;$=X}return u3(Z,"..","..","..")}function D0(){return process.env.LOKI_DIR??u3(process.cwd(),".loki")}function g2(){return u3(oR0(),".loki")}var wd,F0;var t0=x(()=>{wd=WT(iR0(import.meta.url));F0=nR0()});import{readFileSync as sR0}from"fs";import{resolve as rR0,dirname as tR0}from"path";import{fileURLToPath as eR0}from"url";function r6(){if(m$!==null)return m$;let Z="11.17.22";if(typeof Z==="string"&&Z.length>0)return m$=Z,m$;try{let $=tR0(eR0(import.meta.url)),J=KT($);m$=sR0(rR0(J,"VERSION"),"utf-8").trim()}catch{m$="unknown"}return m$}var m$=null;var u$=x(()=>{t0()});import{mkdirSync as ZD0,readFileSync as xd,realpathSync as $D0,statSync as JD0,writeFileSync as XD0}from"fs";import{dirname as VT,join as kd,resolve as YD0}from"path";function KD0(){return YD0(g2(),"cache","update-check.json")}function KX(Z){let $=/^(\d+)\.(\d+)\.(\d+)$/.exec(Z.trim());if(!$)return null;return[Number($[1]),Number($[2]),Number($[3])]}function rU(Z,$){let J=KX(Z),X=KX($);if(!J||!X)return!1;let[Y,z,Q]=J,[W,K,V]=X;if(Y!==W)return Y>W;if(z!==K)return z>K;return Q>V}function VD0(){if(process.env.LOKI_NO_UPDATE_CHECK==="1")return!0;if(process.env.CI)return!0;if(!process.stdout.isTTY)return!0;return!1}function GD0(Z){try{let $=xd(Z,"utf-8"),J=JSON.parse($);if(typeof J.checkedAt==="number"&&typeof J.latest==="string"&&KX(J.latest)!==null)return{checkedAt:J.checkedAt,latest:J.latest}}catch{}return null}function HD0(Z,$){try{ZD0(VT(Z),{recursive:!0}),XD0(Z,JSON.stringify($),"utf-8")}catch{}}async function qD0(){try{let Z=await fetch(zD0,{signal:AbortSignal.timeout(WD0),headers:{accept:"application/json"}});if(!Z.ok)return null;let $=await Z.json();if(typeof $.version==="string"&&KX($.version)!==null)return $.version}catch{}return null}async function UD0(Z=Date.now(),$=qD0,J=KD0()){let X=GD0(J);if(X&&Z-X.checkedAt<QD0)return X.latest;let Y=await $();if(Y===null)return null;return HD0(J,{checkedAt:Z,latest:Y}),Y}function BD0(Z,$=process.env){if(KX(Z)===null)return null;let X=$.PATH;if(!X)return null;let Y=new Set;for(let z of X.split(":")){if(!z)continue;let Q=kd(z,"loki"),W;try{JD0(Q),W=$D0(Q)}catch{continue}if(Y.has(W))continue;Y.add(W);try{let K=kd(VT(VT(W)),"package.json"),V=JSON.parse(xd(K,"utf8")).version;if(typeof V!=="string")continue;if(rU(V,Z))return{path:Q,version:V}}catch{continue}}return null}async function Sd(Z,$={}){try{if(VD0())return;if(KX(Z)===null)return;let J=$.write??((z)=>process.stderr.write(z)),X=BD0(Z,$.env??process.env);if(X!==null){J(`Loki Mode ${X.version} is installed but not the one running (you are running ${Z}).
2
+ var hR0=Object.create;var{getPrototypeOf:gR0,defineProperty:iQ,getOwnPropertyNames:Ed,getOwnPropertyDescriptor:mR0}=Object,Rd=Object.prototype.hasOwnProperty;function Dd(Z){return this[Z]}var uR0,pR0,dR0=(Z,$,J)=>{var X=Z!=null&&typeof Z==="object";if(X){var Y=$?uR0??=new WeakMap:pR0??=new WeakMap,z=Y.get(Z);if(z)return z}J=Z!=null?hR0(gR0(Z)):{};let Q=$||!Z||!Z.__esModule?iQ(J,"default",{value:Z,enumerable:!0}):J;for(let W of Ed(Z))if(!Rd.call(Q,W))iQ(Q,W,{get:Dd.bind(Z,W),enumerable:!0});if(X)Y.set(Z,Q);return Q},cR0=(Z)=>{var $=(Pd??=new WeakMap).get(Z),J;if($)return $;if($=iQ({},"__esModule",{value:!0}),Z&&typeof Z==="object"||typeof Z==="function"){for(var X of Ed(Z))if(!Rd.call($,X))iQ($,X,{get:Dd.bind(Z,X),enumerable:!(J=mR0(Z,X))||J.enumerable})}return Pd.set(Z,$),$},Pd,nU=(Z,$)=>()=>($||Z(($={exports:{}}).exports,$),$.exports);var lR0=(Z)=>Z;function aR0(Z,$){this[Z]=lR0.bind(null,$)}var A0=(Z,$)=>{for(var J in $)iQ(Z,J,{get:$[J],enumerable:!0,configurable:!0,set:aR0.bind($,J)})};var x=(Z,$)=>()=>(Z&&($=Z(Z=0)),$);var M5=import.meta.require;var _d={};A0(_d,{lokiDir:()=>D0,homeLokiDir:()=>g2,findRepoRootForVersion:()=>KT,REPO_ROOT:()=>F0});import{resolve as u3,dirname as WT}from"path";import{fileURLToPath as iR0}from"url";import{existsSync as sU}from"fs";import{homedir as oR0}from"os";function nR0(){let Z=wd;for(let $=0;$<6;$++){if(sU(u3(Z,"VERSION"))&&sU(u3(Z,"autonomy/run.sh")))return Z;let J=WT(Z);if(J===Z)break;Z=J}return u3(wd,"..","..","..")}function KT(Z){let $=Z;for(let J=0;J<6;J++){if(sU(u3($,"VERSION"))&&sU(u3($,"autonomy/run.sh")))return $;let X=WT($);if(X===$)break;$=X}return u3(Z,"..","..","..")}function D0(){return process.env.LOKI_DIR??u3(process.cwd(),".loki")}function g2(){return u3(oR0(),".loki")}var wd,F0;var t0=x(()=>{wd=WT(iR0(import.meta.url));F0=nR0()});import{readFileSync as sR0}from"fs";import{resolve as rR0,dirname as tR0}from"path";import{fileURLToPath as eR0}from"url";function r6(){if(m$!==null)return m$;let Z="11.17.23";if(typeof Z==="string"&&Z.length>0)return m$=Z,m$;try{let $=tR0(eR0(import.meta.url)),J=KT($);m$=sR0(rR0(J,"VERSION"),"utf-8").trim()}catch{m$="unknown"}return m$}var m$=null;var u$=x(()=>{t0()});import{mkdirSync as ZD0,readFileSync as xd,realpathSync as $D0,statSync as JD0,writeFileSync as XD0}from"fs";import{dirname as VT,join as kd,resolve as YD0}from"path";function KD0(){return YD0(g2(),"cache","update-check.json")}function KX(Z){let $=/^(\d+)\.(\d+)\.(\d+)$/.exec(Z.trim());if(!$)return null;return[Number($[1]),Number($[2]),Number($[3])]}function rU(Z,$){let J=KX(Z),X=KX($);if(!J||!X)return!1;let[Y,z,Q]=J,[W,K,V]=X;if(Y!==W)return Y>W;if(z!==K)return z>K;return Q>V}function VD0(){if(process.env.LOKI_NO_UPDATE_CHECK==="1")return!0;if(process.env.CI)return!0;if(!process.stdout.isTTY)return!0;return!1}function GD0(Z){try{let $=xd(Z,"utf-8"),J=JSON.parse($);if(typeof J.checkedAt==="number"&&typeof J.latest==="string"&&KX(J.latest)!==null)return{checkedAt:J.checkedAt,latest:J.latest}}catch{}return null}function HD0(Z,$){try{ZD0(VT(Z),{recursive:!0}),XD0(Z,JSON.stringify($),"utf-8")}catch{}}async function qD0(){try{let Z=await fetch(zD0,{signal:AbortSignal.timeout(WD0),headers:{accept:"application/json"}});if(!Z.ok)return null;let $=await Z.json();if(typeof $.version==="string"&&KX($.version)!==null)return $.version}catch{}return null}async function UD0(Z=Date.now(),$=qD0,J=KD0()){let X=GD0(J);if(X&&Z-X.checkedAt<QD0)return X.latest;let Y=await $();if(Y===null)return null;return HD0(J,{checkedAt:Z,latest:Y}),Y}function BD0(Z,$=process.env){if(KX(Z)===null)return null;let X=$.PATH;if(!X)return null;let Y=new Set;for(let z of X.split(":")){if(!z)continue;let Q=kd(z,"loki"),W;try{JD0(Q),W=$D0(Q)}catch{continue}if(Y.has(W))continue;Y.add(W);try{let K=kd(VT(VT(W)),"package.json"),V=JSON.parse(xd(K,"utf8")).version;if(typeof V!=="string")continue;if(rU(V,Z))return{path:Q,version:V}}catch{continue}}return null}async function Sd(Z,$={}){try{if(VD0())return;if(KX(Z)===null)return;let J=$.write??((z)=>process.stderr.write(z)),X=BD0(Z,$.env??process.env);if(X!==null){J(`Loki Mode ${X.version} is installed but not the one running (you are running ${Z}).
3
3
  Another loki earlier on PATH is winning. Newer copy: ${X.path}
4
4
  Run \`which -a loki\` to see the order, then remove or re-point the earlier entry.
5
5
  `);return}let Y=await UD0($.now,$.fetcher,$.cacheFile);if(Y===null)return;if(!rU(Y,Z))return;J(`A newer Loki Mode is available: ${Y} (you have ${Z}). Update: bun install -g loki-mode (or npm i -g loki-mode)
@@ -2608,4 +2608,4 @@ Unknown commands exit 2 with a suggestion; run 'loki help' for the full list.
2608
2608
  `);{let{suggestCommand:X}=await Promise.resolve().then(() => (Vd(),QR0)),Y=$===void 0?void 0:X($);if(Y)process.stderr.write(`Did you mean 'loki ${Y}'?
2609
2609
  `)}return process.stderr.write(_R0),2}}kB0();var kR0=()=>globalThis[Symbol.for("loki.ownsStopSignals")]===!0;process.on("SIGINT",()=>{if(!kR0())process.exit(130)});process.on("SIGTERM",()=>{if(!kR0())process.exit(143)});var JJ9=await $J9(Bun.argv.slice(2));process.exit(JJ9);
2610
2610
 
2611
- //# debugId=94207E11A2FCC7FC5FF334C9B94E1A45
2611
+ //# debugId=C3B2C0A567212424F3475CECA296D7AC
package/mcp/__init__.py CHANGED
@@ -75,4 +75,4 @@ try:
75
75
  except ImportError:
76
76
  __all__ = ['mcp']
77
77
 
78
- __version__ = '11.17.22'
78
+ __version__ = '11.17.23'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "loki-mode",
3
3
  "mcpName": "io.github.asklokesh/loki-mode",
4
- "version": "11.17.22",
4
+ "version": "11.17.23",
5
5
  "description": "An autonomous software factory that knows what it is supposed to deliver, and proves it did.",
6
6
  "keywords": [
7
7
  "agent",
@@ -160,5 +160,5 @@
160
160
  "dependencies": {
161
161
  "@resvg/resvg-wasm": "^2.6.2"
162
162
  },
163
- "gitHead": "67c21ba72cca485bd544935054e675c6cc8fa0f1"
163
+ "gitHead": "ed2d878fa5db32151fa5a3e7d305101586caf648"
164
164
  }
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "loki-mode",
4
4
  "displayName": "Loki Mode",
5
- "version": "11.17.22",
5
+ "version": "11.17.23",
6
6
  "description": "Autonomous spec-to-product build system with a built-in trust layer (RARV-C closure loop, 8 quality gates, completion council). Ships Loki's spec-hardening, drift-detection, and deterministic PR verification commands plus the Loki MCP server.",
7
7
  "author": {
8
8
  "name": "Autonomi",
@@ -1,4 +1,4 @@
1
- import{c as L,r as x,j as e,w as re,Z as ne,m as le,h as ie,p as P,F as ye,U as I,X as ce,L as de,x as oe,M as Ae,T as Z,S as we,l as xe,k as me,y as Ce,E as Fe,a0 as Se,a as U,a2 as he}from"./index-e6AJj_FZ.js";import{B as C}from"./Button-pJQGPQG3.js";import{T as $e}from"./trending-up-C1xa0U9-.js";import{C as z}from"./clock-BavtSHCG.js";import{A as Be,U as ue,M as De}from"./Avatar-BPmAoSfT.js";import{A as J}from"./activity-BOOOTjKZ.js";import{R as pe}from"./refresh-cw-B3e5PosV.js";import{G as ze}from"./globe-DSscdsP3.js";import{C as Le}from"./chevron-left-CltmqJT_.js";import{C as je}from"./check-8ImSobx9.js";import{D as Y}from"./dollar-sign-BMsw7HY3.js";import{U as Te}from"./user-B1vdZy5k.js";import{D as Me}from"./database-DbHRpxUI.js";import{L as Ue}from"./lock-BnMvxGFU.js";import{S as Re}from"./scroll-text-DnDLp_Iy.js";import{S as Ie}from"./shield-alert-BBHJ_lXm.js";/**
1
+ import{c as L,r as x,j as e,w as re,Z as ne,m as le,h as ie,p as P,F as ye,U as I,X as ce,L as de,x as oe,M as Ae,T as Z,S as we,l as xe,k as me,y as Ce,E as Fe,a0 as Se,a as U,a2 as he}from"./index-DJsL2Ayw.js";import{B as C}from"./Button-BL7bzQ1Y.js";import{T as $e}from"./trending-up-COX_uXpi.js";import{C as z}from"./clock-Ccvc0Bww.js";import{A as Be,U as ue,M as De}from"./Avatar-CJysHgMZ.js";import{A as J}from"./activity-D2WvJEeh.js";import{R as pe}from"./refresh-cw-C_Mb0BAy.js";import{G as ze}from"./globe-D_-OzrzF.js";import{C as Le}from"./chevron-left-BAv_BwrD.js";import{C as je}from"./check-CdrUQ4RX.js";import{D as Y}from"./dollar-sign-h_V-9TZ3.js";import{U as Te}from"./user-CUIAuAG6.js";import{D as Me}from"./database-SG1OE1xb.js";import{L as Ue}from"./lock-BjYcYzEv.js";import{S as Re}from"./scroll-text-Du7cBUqO.js";import{S as Ie}from"./shield-alert-CZvOoSfx.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as l,j as s}from"./index-e6AJj_FZ.js";/**
1
+ import{c as l,j as s}from"./index-DJsL2Ayw.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as e}from"./index-e6AJj_FZ.js";import{C as r}from"./clock-BavtSHCG.js";import{C as a}from"./circle-alert-BbAswQCH.js";import{C as l}from"./check-8ImSobx9.js";const i={completed:"bg-[#1FC5A8]/10 text-[#1FC5A8]",running:"bg-[#553DE9]/10 text-[#553DE9]",failed:"bg-[#C45B5B]/10 text-[#C45B5B]",started:"bg-[#D4A03C]/10 text-[#D4A03C]",empty:"bg-[#F8F4F0] text-[#6B6960]",version:"bg-[#553DE9]/10 text-[#553DE9]"};function o({status:t}){switch(t){case"completed":return e.jsx(l,{size:12});case"running":return e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"animate-ping motion-reduce:animate-none absolute inline-flex h-full w-full rounded-full bg-current opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-current"})]});case"failed":return e.jsx(a,{size:12});case"started":return e.jsx(r,{size:12});default:return null}}function f({status:t,children:n,className:s=""}){return e.jsxs("span",{className:["inline-flex items-center gap-1 rounded-btn px-2.5 py-0.5 text-xs font-semibold",i[t],s].filter(Boolean).join(" "),children:[e.jsx(o,{status:t}),n]})}export{f as B};
1
+ import{j as e}from"./index-DJsL2Ayw.js";import{C as r}from"./clock-Ccvc0Bww.js";import{C as a}from"./circle-alert-Banmaa4K.js";import{C as l}from"./check-CdrUQ4RX.js";const i={completed:"bg-[#1FC5A8]/10 text-[#1FC5A8]",running:"bg-[#553DE9]/10 text-[#553DE9]",failed:"bg-[#C45B5B]/10 text-[#C45B5B]",started:"bg-[#D4A03C]/10 text-[#D4A03C]",empty:"bg-[#F8F4F0] text-[#6B6960]",version:"bg-[#553DE9]/10 text-[#553DE9]"};function o({status:t}){switch(t){case"completed":return e.jsx(l,{size:12});case"running":return e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"animate-ping motion-reduce:animate-none absolute inline-flex h-full w-full rounded-full bg-current opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-current"})]});case"failed":return e.jsx(a,{size:12});case"started":return e.jsx(r,{size:12});default:return null}}function f({status:t,children:n,className:s=""}){return e.jsxs("span",{className:["inline-flex items-center gap-1 rounded-btn px-2.5 py-0.5 text-xs font-semibold",i[t],s].filter(Boolean).join(" "),children:[e.jsx(o,{status:t}),n]})}export{f as B};
@@ -1 +1 @@
1
- import{r as p,j as t}from"./index-e6AJj_FZ.js";const m={primary:"bg-[#553DE9] text-white hover:bg-[#4432c4] shadow-button rounded-btn",secondary:"border border-[#553DE9] text-[#553DE9] hover:bg-[#E8E4FD] bg-transparent rounded-btn",ghost:"text-[#36342E] hover:bg-[#F8F4F0] rounded-btn",danger:"bg-[#C45B5B]/10 text-[#C45B5B] border border-[#C45B5B]/20 hover:bg-[#C45B5B]/20 rounded-btn"},b={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},u={sm:14,md:16,lg:18};function h({size:e}){return t.jsxs("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[t.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),t.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}const B=p.forwardRef(({variant:e="primary",size:o="md",icon:n,iconRight:i,loading:r=!1,disabled:a,className:c="",children:l,...x},d)=>{const s=u[o];return t.jsxs("button",{ref:d,disabled:a||r,className:["inline-flex items-center justify-center gap-2 font-medium transition-colors",m[e],b[o],(a||r)&&"opacity-60 cursor-not-allowed",c].filter(Boolean).join(" "),...x,children:[r?t.jsx(h,{size:s}):n?t.jsx(n,{size:s}):null,l,i&&!r&&t.jsx(i,{size:s})]})});B.displayName="Button";export{B};
1
+ import{r as p,j as t}from"./index-DJsL2Ayw.js";const m={primary:"bg-[#553DE9] text-white hover:bg-[#4432c4] shadow-button rounded-btn",secondary:"border border-[#553DE9] text-[#553DE9] hover:bg-[#E8E4FD] bg-transparent rounded-btn",ghost:"text-[#36342E] hover:bg-[#F8F4F0] rounded-btn",danger:"bg-[#C45B5B]/10 text-[#C45B5B] border border-[#C45B5B]/20 hover:bg-[#C45B5B]/20 rounded-btn"},b={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},u={sm:14,md:16,lg:18};function h({size:e}){return t.jsxs("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[t.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),t.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}const B=p.forwardRef(({variant:e="primary",size:o="md",icon:n,iconRight:i,loading:r=!1,disabled:a,className:c="",children:l,...x},d)=>{const s=u[o];return t.jsxs("button",{ref:d,disabled:a||r,className:["inline-flex items-center justify-center gap-2 font-medium transition-colors",m[e],b[o],(a||r)&&"opacity-60 cursor-not-allowed",c].filter(Boolean).join(" "),...x,children:[r?t.jsx(h,{size:s}):n?t.jsx(n,{size:s}):null,l,i&&!r&&t.jsx(i,{size:s})]})});B.displayName="Button";export{B};
@@ -1,4 +1,4 @@
1
- import{c as $,r as l,j as e,G as we,Q as Se,F as Ce,h as Re,T as U,Z as Ee,a as S,V as Me,S as $e,Y as Te,X as Pe,P as ie,i as Ae,g as ze,C as Ie,l as Le,N as I,J as _e,K as De,O as Fe,u as Oe}from"./index-e6AJj_FZ.js";import{P as K,S as He,E as Be}from"./ErrorBoundary-Cy2nQmav.js";import{C as qe,F as Ge,M as Ue,H as Ke,a as We,G as Ve,T as Qe}from"./thumbs-up-Bkv2XfEI.js";import{C as oe}from"./check-8ImSobx9.js";import{C as Ye}from"./clock-BavtSHCG.js";import{D as Xe}from"./dollar-sign-BMsw7HY3.js";import{U as Ze}from"./upload-YAZyAmu-.js";import{L as V}from"./loader-circle-BCqpe4tG.js";/**
1
+ import{c as $,r as l,j as e,G as we,Q as Se,F as Ce,h as Re,T as U,Z as Ee,a as S,V as Me,S as $e,Y as Te,X as Pe,P as ie,i as Ae,g as ze,C as Ie,l as Le,N as I,J as _e,K as De,O as Fe,u as Oe}from"./index-DJsL2Ayw.js";import{P as K,S as He,E as Be}from"./ErrorBoundary-DsaRVLEW.js";import{C as qe,F as Ge,M as Ue,H as Ke,a as We,G as Ve,T as Qe}from"./thumbs-up-72iprVd_.js";import{C as oe}from"./check-CdrUQ4RX.js";import{C as Ye}from"./clock-Ccvc0Bww.js";import{D as Xe}from"./dollar-sign-h_V-9TZ3.js";import{U as Ze}from"./upload-D2rl_sqR.js";import{L as V}from"./loader-circle-Dkw28D-E.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as o,j as e}from"./index-e6AJj_FZ.js";function f({value:r,prefix:t="",suffix:s=""}){const[u,n]=o.useState(0),c=o.useRef(0);return o.useEffect(()=>{const a=c.current,h=r-a;if(h===0)return;const i=600,d=performance.now();function l(b){const v=b-d,m=Math.min(v/i,1),N=1-Math.pow(1-m,3),p=Math.round(a+h*N);n(p),c.current=p,m<1&&requestAnimationFrame(l)}requestAnimationFrame(l)},[r]),e.jsxs("span",{className:"tabular-nums",children:[t,u.toLocaleString(),s]})}function g(){const[r,t]=o.useState(5),[s,u]=o.useState(30),[n,c]=o.useState(75),a=.4,i=Math.round(r*s*a*4.33),d=Math.round(i*n);return e.jsxs("div",{className:"bg-white border border-[#ECEAE3] rounded-xl p-6 shadow-sm",children:[e.jsx("h3",{className:"text-lg font-bold text-[#36342E] mb-1",children:"ROI Calculator"}),e.jsx("p",{className:"text-sm text-[#6B6960] mb-6",children:"Estimate how much your team could save with autonomous development."}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-sm font-medium text-[#36342E]",children:"Team size"}),e.jsxs("span",{className:"text-sm font-semibold text-[#553DE9] tabular-nums",children:[r," developers"]})]}),e.jsx("input",{type:"range",min:1,max:50,value:r,onChange:l=>t(Number(l.target.value)),className:"w-full h-2 bg-[#ECEAE3] rounded-full appearance-none cursor-pointer accent-[#553DE9]"}),e.jsxs("div",{className:"flex justify-between text-xs text-[#939084] mt-1",children:[e.jsx("span",{children:"1"}),e.jsx("span",{children:"50"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-sm font-medium text-[#36342E]",children:"Hours coding per week"}),e.jsxs("span",{className:"text-sm font-semibold text-[#553DE9] tabular-nums",children:[s,"h"]})]}),e.jsx("input",{type:"range",min:5,max:60,value:s,onChange:l=>u(Number(l.target.value)),className:"w-full h-2 bg-[#ECEAE3] rounded-full appearance-none cursor-pointer accent-[#553DE9]"}),e.jsxs("div",{className:"flex justify-between text-xs text-[#939084] mt-1",children:[e.jsx("span",{children:"5h"}),e.jsx("span",{children:"60h"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-sm font-medium text-[#36342E]",children:"Average hourly rate"}),e.jsxs("span",{className:"text-sm font-semibold text-[#553DE9] tabular-nums",children:["$",n,"/hr"]})]}),e.jsx("input",{type:"range",min:25,max:250,step:5,value:n,onChange:l=>c(Number(l.target.value)),className:"w-full h-2 bg-[#ECEAE3] rounded-full appearance-none cursor-pointer accent-[#553DE9]"}),e.jsxs("div",{className:"flex justify-between text-xs text-[#939084] mt-1",children:[e.jsx("span",{children:"$25"}),e.jsx("span",{children:"$250"})]})]})]}),e.jsxs("div",{className:"mt-6 pt-6 border-t border-[#ECEAE3]",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 text-center",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold text-[#553DE9]",children:e.jsx(f,{value:i,suffix:"h"})}),e.jsx("div",{className:"text-xs text-[#6B6960] mt-1",children:"Est. hours saved / month"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold text-[#1FC5A8]",children:e.jsx(f,{value:d,prefix:"$"})}),e.jsx("div",{className:"text-xs text-[#6B6960] mt-1",children:"Est. cost saved / month"})]})]}),e.jsxs("div",{className:"mt-4 p-3 rounded-lg bg-[#553DE9]/5 border border-[#553DE9]/10",children:[e.jsxs("p",{className:"text-sm text-[#36342E] text-center",children:["If Loki Mode saved ",Math.round(a*100),"% of coding time, your team could save"," ",e.jsxs("span",{className:"font-bold text-[#553DE9]",children:[i.toLocaleString()," hours"]})," ","and"," ",e.jsxs("span",{className:"font-bold text-[#1FC5A8]",children:["$",d.toLocaleString()]})," ","per month."]}),e.jsxs("p",{className:"mt-2 text-xs text-[#6B6960] text-center",children:["The ",Math.round(a*100),"% is an assumption, not a measurement. Model and API spend is not included."]})]})]})]})}const j=[{feature:"Claude (Opus/Sonnet/Haiku)",category:"AI Models",lokiMode:!0,boltNew:!1,replit:!1,lovable:!0},{feature:"GPT-4o / Codex",category:"AI Models",lokiMode:!0,boltNew:!0,replit:!0,lovable:!1},{feature:"5-provider auto-failover",category:"AI Models",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"8 automated quality gates",category:"Quality",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"Blind 3-reviewer code review",category:"Quality",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"Anti-sycophancy checks",category:"Quality",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"Automated test generation",category:"Quality",lokiMode:!0,boltNew:!1,replit:"Partial",lovable:!1},{feature:"Docker container generation",category:"Deployment",lokiMode:!0,boltNew:!1,replit:!0,lovable:!1},{feature:"CI/CD pipeline generation",category:"Deployment",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"One-click cloud deploy",category:"Deployment",lokiMode:"Planned",boltNew:!0,replit:!0,lovable:!0},{feature:"Self-hosted (your keys)",category:"Cost",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"Free tier available",category:"Cost",lokiMode:"Source-available (BUSL-1.1)",boltNew:!0,replit:!0,lovable:!0},{feature:"No vendor lock-in",category:"Cost",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"SSO / OIDC authentication",category:"Enterprise",lokiMode:!0,boltNew:!1,replit:!0,lovable:!1},{feature:"RBAC access control",category:"Enterprise",lokiMode:!0,boltNew:!1,replit:!0,lovable:!1},{feature:"Audit logging",category:"Enterprise",lokiMode:!0,boltNew:!1,replit:!0,lovable:!1},{feature:"Air-gapped deployment",category:"Enterprise",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1}];function y(){return e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",className:"text-[#1FC5A8]",children:e.jsx("path",{d:"M20 6L9 17l-5-5",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function w(){return e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",className:"text-[#C45B5B]/40",children:e.jsx("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function x({value:r}){return typeof r=="string"?e.jsx("span",{className:"text-xs text-[#6B6960] font-medium",children:r}):r?e.jsx(y,{}):e.jsx(w,{})}const k=[{title:"Full Autonomy",description:"Describe what you want. Loki Mode handles planning, coding, testing, and verification automatically.",icon:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"text-[#553DE9]",children:e.jsx("path",{d:"M13 2L3 14h9l-1 8 10-12h-9l1-8z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},{title:"Production Quality",description:"8 quality gates, blind code review, and anti-sycophancy checks ensure code that actually works.",icon:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"text-[#1FC5A8]",children:e.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},{title:"Your Infrastructure",description:"Self-hosted, source-available (BUSL-1.1), no data leaves your network. Use your own API keys across 5 providers.",icon:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"text-[#2F71E3]",children:[e.jsx("rect",{x:"2",y:"2",width:"20",height:"8",rx:"2",stroke:"currentColor",strokeWidth:"2"}),e.jsx("rect",{x:"2",y:"14",width:"20",height:"8",rx:"2",stroke:"currentColor",strokeWidth:"2"}),e.jsx("circle",{cx:"6",cy:"6",r:"1",fill:"currentColor"}),e.jsx("circle",{cx:"6",cy:"18",r:"1",fill:"currentColor"})]})},{title:"Built for Teams",description:"Enterprise auth, RBAC, audit logs, and parallel workflows for teams of any size.",icon:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"text-[#E93D82]",children:[e.jsx("path",{d:"M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("circle",{cx:"9",cy:"7",r:"4",stroke:"currentColor",strokeWidth:"2"}),e.jsx("path",{d:"M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}];function C(){const r=[...new Set(j.map(t=>t.category))];return e.jsx("div",{className:"min-h-screen bg-[#FAF9F6]",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-2xl font-bold text-[#36342E]",children:"Compare"}),e.jsx("p",{className:"text-[#6B6960] mt-1",children:"See how Loki Mode stacks up against other AI development platforms."})]}),e.jsx("div",{className:"bg-white border border-[#ECEAE3] rounded-xl overflow-hidden shadow-sm",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[#ECEAE3]",children:[e.jsx("th",{className:"text-left px-4 py-3 font-medium text-[#6B6960] w-[240px]",children:"Feature"}),e.jsx("th",{className:"text-center px-4 py-3 font-bold text-[#553DE9] bg-[#553DE9]/5 w-[130px]",children:"Loki Mode"}),e.jsx("th",{className:"text-center px-4 py-3 font-medium text-[#6B6960] w-[130px]",children:"bolt.new"}),e.jsx("th",{className:"text-center px-4 py-3 font-medium text-[#6B6960] w-[130px]",children:"Replit"}),e.jsx("th",{className:"text-center px-4 py-3 font-medium text-[#6B6960] w-[130px]",children:"Lovable"})]})}),e.jsx("tbody",{children:r.map(t=>e.jsxs(e.Fragment,{children:[e.jsx("tr",{className:"bg-[#FAF9F6]",children:e.jsx("td",{colSpan:5,className:"px-4 py-2 text-xs font-bold text-[#939084] uppercase tracking-wider",children:t})},`cat-${t}`),j.filter(s=>s.category===t).map(s=>e.jsxs("tr",{className:"border-b border-[#ECEAE3] last:border-b-0",children:[e.jsx("td",{className:"px-4 py-2.5 text-[#36342E]",children:s.feature}),e.jsx("td",{className:"px-4 py-2.5 text-center bg-[#553DE9]/5",children:e.jsx("div",{className:"flex justify-center",children:e.jsx(x,{value:s.lokiMode})})}),e.jsx("td",{className:"px-4 py-2.5 text-center",children:e.jsx("div",{className:"flex justify-center",children:e.jsx(x,{value:s.boltNew})})}),e.jsx("td",{className:"px-4 py-2.5 text-center",children:e.jsx("div",{className:"flex justify-center",children:e.jsx(x,{value:s.replit})})}),e.jsx("td",{className:"px-4 py-2.5 text-center",children:e.jsx("div",{className:"flex justify-center",children:e.jsx(x,{value:s.lovable})})})]},s.feature))]}))})]})})}),e.jsxs("div",{className:"mt-12",children:[e.jsx("h2",{className:"text-xl font-bold text-[#36342E] mb-6",children:"Why developers choose Loki Mode"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:k.map(t=>e.jsxs("div",{className:"bg-white border border-[#ECEAE3] rounded-xl p-5 shadow-sm hover:shadow-md transition-shadow",children:[e.jsx("div",{className:"mb-3",children:t.icon}),e.jsx("h3",{className:"text-base font-bold text-[#36342E] mb-1",children:t.title}),e.jsx("p",{className:"text-sm text-[#6B6960]",children:t.description})]},t.title))})]}),e.jsx("div",{className:"mt-12 max-w-xl mx-auto",children:e.jsx(g,{})})]})})}export{C as default};
1
+ import{r as o,j as e}from"./index-DJsL2Ayw.js";function f({value:r,prefix:t="",suffix:s=""}){const[u,n]=o.useState(0),c=o.useRef(0);return o.useEffect(()=>{const a=c.current,h=r-a;if(h===0)return;const i=600,d=performance.now();function l(b){const v=b-d,m=Math.min(v/i,1),N=1-Math.pow(1-m,3),p=Math.round(a+h*N);n(p),c.current=p,m<1&&requestAnimationFrame(l)}requestAnimationFrame(l)},[r]),e.jsxs("span",{className:"tabular-nums",children:[t,u.toLocaleString(),s]})}function g(){const[r,t]=o.useState(5),[s,u]=o.useState(30),[n,c]=o.useState(75),a=.4,i=Math.round(r*s*a*4.33),d=Math.round(i*n);return e.jsxs("div",{className:"bg-white border border-[#ECEAE3] rounded-xl p-6 shadow-sm",children:[e.jsx("h3",{className:"text-lg font-bold text-[#36342E] mb-1",children:"ROI Calculator"}),e.jsx("p",{className:"text-sm text-[#6B6960] mb-6",children:"Estimate how much your team could save with autonomous development."}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-sm font-medium text-[#36342E]",children:"Team size"}),e.jsxs("span",{className:"text-sm font-semibold text-[#553DE9] tabular-nums",children:[r," developers"]})]}),e.jsx("input",{type:"range",min:1,max:50,value:r,onChange:l=>t(Number(l.target.value)),className:"w-full h-2 bg-[#ECEAE3] rounded-full appearance-none cursor-pointer accent-[#553DE9]"}),e.jsxs("div",{className:"flex justify-between text-xs text-[#939084] mt-1",children:[e.jsx("span",{children:"1"}),e.jsx("span",{children:"50"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-sm font-medium text-[#36342E]",children:"Hours coding per week"}),e.jsxs("span",{className:"text-sm font-semibold text-[#553DE9] tabular-nums",children:[s,"h"]})]}),e.jsx("input",{type:"range",min:5,max:60,value:s,onChange:l=>u(Number(l.target.value)),className:"w-full h-2 bg-[#ECEAE3] rounded-full appearance-none cursor-pointer accent-[#553DE9]"}),e.jsxs("div",{className:"flex justify-between text-xs text-[#939084] mt-1",children:[e.jsx("span",{children:"5h"}),e.jsx("span",{children:"60h"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-sm font-medium text-[#36342E]",children:"Average hourly rate"}),e.jsxs("span",{className:"text-sm font-semibold text-[#553DE9] tabular-nums",children:["$",n,"/hr"]})]}),e.jsx("input",{type:"range",min:25,max:250,step:5,value:n,onChange:l=>c(Number(l.target.value)),className:"w-full h-2 bg-[#ECEAE3] rounded-full appearance-none cursor-pointer accent-[#553DE9]"}),e.jsxs("div",{className:"flex justify-between text-xs text-[#939084] mt-1",children:[e.jsx("span",{children:"$25"}),e.jsx("span",{children:"$250"})]})]})]}),e.jsxs("div",{className:"mt-6 pt-6 border-t border-[#ECEAE3]",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 text-center",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold text-[#553DE9]",children:e.jsx(f,{value:i,suffix:"h"})}),e.jsx("div",{className:"text-xs text-[#6B6960] mt-1",children:"Est. hours saved / month"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold text-[#1FC5A8]",children:e.jsx(f,{value:d,prefix:"$"})}),e.jsx("div",{className:"text-xs text-[#6B6960] mt-1",children:"Est. cost saved / month"})]})]}),e.jsxs("div",{className:"mt-4 p-3 rounded-lg bg-[#553DE9]/5 border border-[#553DE9]/10",children:[e.jsxs("p",{className:"text-sm text-[#36342E] text-center",children:["If Loki Mode saved ",Math.round(a*100),"% of coding time, your team could save"," ",e.jsxs("span",{className:"font-bold text-[#553DE9]",children:[i.toLocaleString()," hours"]})," ","and"," ",e.jsxs("span",{className:"font-bold text-[#1FC5A8]",children:["$",d.toLocaleString()]})," ","per month."]}),e.jsxs("p",{className:"mt-2 text-xs text-[#6B6960] text-center",children:["The ",Math.round(a*100),"% is an assumption, not a measurement. Model and API spend is not included."]})]})]})]})}const j=[{feature:"Claude (Opus/Sonnet/Haiku)",category:"AI Models",lokiMode:!0,boltNew:!1,replit:!1,lovable:!0},{feature:"GPT-4o / Codex",category:"AI Models",lokiMode:!0,boltNew:!0,replit:!0,lovable:!1},{feature:"5-provider auto-failover",category:"AI Models",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"8 automated quality gates",category:"Quality",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"Blind 3-reviewer code review",category:"Quality",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"Anti-sycophancy checks",category:"Quality",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"Automated test generation",category:"Quality",lokiMode:!0,boltNew:!1,replit:"Partial",lovable:!1},{feature:"Docker container generation",category:"Deployment",lokiMode:!0,boltNew:!1,replit:!0,lovable:!1},{feature:"CI/CD pipeline generation",category:"Deployment",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"One-click cloud deploy",category:"Deployment",lokiMode:"Planned",boltNew:!0,replit:!0,lovable:!0},{feature:"Self-hosted (your keys)",category:"Cost",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"Free tier available",category:"Cost",lokiMode:"Source-available (BUSL-1.1)",boltNew:!0,replit:!0,lovable:!0},{feature:"No vendor lock-in",category:"Cost",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"SSO / OIDC authentication",category:"Enterprise",lokiMode:!0,boltNew:!1,replit:!0,lovable:!1},{feature:"RBAC access control",category:"Enterprise",lokiMode:!0,boltNew:!1,replit:!0,lovable:!1},{feature:"Audit logging",category:"Enterprise",lokiMode:!0,boltNew:!1,replit:!0,lovable:!1},{feature:"Air-gapped deployment",category:"Enterprise",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1}];function y(){return e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",className:"text-[#1FC5A8]",children:e.jsx("path",{d:"M20 6L9 17l-5-5",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function w(){return e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",className:"text-[#C45B5B]/40",children:e.jsx("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function x({value:r}){return typeof r=="string"?e.jsx("span",{className:"text-xs text-[#6B6960] font-medium",children:r}):r?e.jsx(y,{}):e.jsx(w,{})}const k=[{title:"Full Autonomy",description:"Describe what you want. Loki Mode handles planning, coding, testing, and verification automatically.",icon:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"text-[#553DE9]",children:e.jsx("path",{d:"M13 2L3 14h9l-1 8 10-12h-9l1-8z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},{title:"Production Quality",description:"8 quality gates, blind code review, and anti-sycophancy checks ensure code that actually works.",icon:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"text-[#1FC5A8]",children:e.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},{title:"Your Infrastructure",description:"Self-hosted, source-available (BUSL-1.1), no data leaves your network. Use your own API keys across 5 providers.",icon:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"text-[#2F71E3]",children:[e.jsx("rect",{x:"2",y:"2",width:"20",height:"8",rx:"2",stroke:"currentColor",strokeWidth:"2"}),e.jsx("rect",{x:"2",y:"14",width:"20",height:"8",rx:"2",stroke:"currentColor",strokeWidth:"2"}),e.jsx("circle",{cx:"6",cy:"6",r:"1",fill:"currentColor"}),e.jsx("circle",{cx:"6",cy:"18",r:"1",fill:"currentColor"})]})},{title:"Built for Teams",description:"Enterprise auth, RBAC, audit logs, and parallel workflows for teams of any size.",icon:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"text-[#E93D82]",children:[e.jsx("path",{d:"M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("circle",{cx:"9",cy:"7",r:"4",stroke:"currentColor",strokeWidth:"2"}),e.jsx("path",{d:"M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}];function C(){const r=[...new Set(j.map(t=>t.category))];return e.jsx("div",{className:"min-h-screen bg-[#FAF9F6]",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-2xl font-bold text-[#36342E]",children:"Compare"}),e.jsx("p",{className:"text-[#6B6960] mt-1",children:"See how Loki Mode stacks up against other AI development platforms."})]}),e.jsx("div",{className:"bg-white border border-[#ECEAE3] rounded-xl overflow-hidden shadow-sm",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[#ECEAE3]",children:[e.jsx("th",{className:"text-left px-4 py-3 font-medium text-[#6B6960] w-[240px]",children:"Feature"}),e.jsx("th",{className:"text-center px-4 py-3 font-bold text-[#553DE9] bg-[#553DE9]/5 w-[130px]",children:"Loki Mode"}),e.jsx("th",{className:"text-center px-4 py-3 font-medium text-[#6B6960] w-[130px]",children:"bolt.new"}),e.jsx("th",{className:"text-center px-4 py-3 font-medium text-[#6B6960] w-[130px]",children:"Replit"}),e.jsx("th",{className:"text-center px-4 py-3 font-medium text-[#6B6960] w-[130px]",children:"Lovable"})]})}),e.jsx("tbody",{children:r.map(t=>e.jsxs(e.Fragment,{children:[e.jsx("tr",{className:"bg-[#FAF9F6]",children:e.jsx("td",{colSpan:5,className:"px-4 py-2 text-xs font-bold text-[#939084] uppercase tracking-wider",children:t})},`cat-${t}`),j.filter(s=>s.category===t).map(s=>e.jsxs("tr",{className:"border-b border-[#ECEAE3] last:border-b-0",children:[e.jsx("td",{className:"px-4 py-2.5 text-[#36342E]",children:s.feature}),e.jsx("td",{className:"px-4 py-2.5 text-center bg-[#553DE9]/5",children:e.jsx("div",{className:"flex justify-center",children:e.jsx(x,{value:s.lokiMode})})}),e.jsx("td",{className:"px-4 py-2.5 text-center",children:e.jsx("div",{className:"flex justify-center",children:e.jsx(x,{value:s.boltNew})})}),e.jsx("td",{className:"px-4 py-2.5 text-center",children:e.jsx("div",{className:"flex justify-center",children:e.jsx(x,{value:s.replit})})}),e.jsx("td",{className:"px-4 py-2.5 text-center",children:e.jsx("div",{className:"flex justify-center",children:e.jsx(x,{value:s.lovable})})})]},s.feature))]}))})]})})}),e.jsxs("div",{className:"mt-12",children:[e.jsx("h2",{className:"text-xl font-bold text-[#36342E] mb-6",children:"Why developers choose Loki Mode"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:k.map(t=>e.jsxs("div",{className:"bg-white border border-[#ECEAE3] rounded-xl p-5 shadow-sm hover:shadow-md transition-shadow",children:[e.jsx("div",{className:"mb-3",children:t.icon}),e.jsx("h3",{className:"text-base font-bold text-[#36342E] mb-1",children:t.title}),e.jsx("p",{className:"text-sm text-[#6B6960]",children:t.description})]},t.title))})]}),e.jsx("div",{className:"mt-12 max-w-xl mx-auto",children:e.jsx(g,{})})]})})}export{C as default};
@@ -1,4 +1,4 @@
1
- import{c as o,r as a,j as e,T as n,h as i,p as c}from"./index-e6AJj_FZ.js";/**
1
+ import{c as o,r as a,j as e,T as n,h as i,p as c}from"./index-DJsL2Ayw.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as l,a as x,j as e}from"./index-e6AJj_FZ.js";const N={verified:{badge:"bg-success/10 text-success border-success/20",dot:"bg-success",label:"Verified",proven:"The server recomputed the integrity hash and it matches, and the gpg signature verified against its keyring.",notProven:"That the code is correct, or that the recorded diff still matches your repo. A receipt records which checks ran, not that the result is right."},unsigned:{badge:"bg-warning/10 text-warning border-warning/20",dot:"bg-warning",label:"Unsigned",proven:"The server recomputed the integrity hash and it matches these receipt bytes.",notProven:"Who produced it. An unsigned receipt is forgeable: whoever controls the builder can rewrite the facts and recompute the hash."},unchecked:{badge:"bg-warning/10 text-warning border-warning/20",dot:"bg-warning",label:"Not checked",proven:"The server recomputed the integrity hash and it matches.",notProven:"Provenance. A signature is present but was not evaluated here, which is not the same as a bad signature."},tampered:{badge:"bg-danger/10 text-danger border-danger/20",dot:"bg-danger",label:"Tampered",proven:"Nothing. The server recomputed the integrity hash and it does not match the contents.",notProven:"Anything at all. This receipt was edited after it was written. Do not trust this build."},failed:{badge:"bg-danger/10 text-danger border-danger/20",dot:"bg-danger",label:"Failed verification",proven:"Nothing. A verification check ran on the server and said no.",notProven:"Anything the receipt claims. Read the reason below."},not_verified:{badge:"border-muted/20 text-muted",dot:"bg-muted/40",label:"Not verified here",proven:"Nothing. No verification result was computed for this receipt here.",notProven:"Integrity or provenance. Run the command below to check it yourself."}};function w(t){const n=t==null?void 0:t.integrity_check,r=t==null?void 0:t.verification;return n?n.status==="tampered"?"tampered":n.status==="failed"?"failed":n.status!=="verified"?"not_verified":n.gpg_ok===!0?"verified":r!=null&&r.attestation||r!=null&&r.gpg_signature?"unchecked":"unsigned":"not_verified"}const v=[{key:"verified",label:"Verified",bar:"bg-success",text:"text-success"},{key:"with_gaps",label:"With gaps",bar:"bg-warning",text:"text-warning"},{key:"not_verified",label:"Not verified",bar:"bg-danger",text:"text-danger"},{key:"unknown",label:"Unknown",bar:"bg-muted/40",text:"text-muted"}];function y({summary:t}){const n=t.total_receipts;return n?e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex h-1.5 rounded-full overflow-hidden bg-muted/10",children:v.map(({key:r,bar:s})=>{const i=t[r];return i?e.jsx("div",{className:s,style:{width:`${i/n*100}%`},title:`${i} ${r}`},r):null})}),e.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs",children:v.map(({key:r,label:s,text:i})=>{const c=t[r];return c?e.jsxs("span",{className:i,children:[e.jsx("span",{className:"font-semibold",children:c})," ",s.toLowerCase()]},r):null})}),e.jsxs("p",{className:"text-muted text-xs",children:["Recorded verdicts across ",n," receipt",n===1?"":"s",", not re-verified here."]})]}):null}function u({label:t,value:n}){return e.jsxs("div",{className:"flex items-baseline gap-2 text-xs",children:[e.jsx("span",{className:"text-muted w-28 flex-shrink-0",children:t}),e.jsx("span",{className:"font-mono truncate",title:n,children:n})]})}function k({proof:t}){var m,p,g,f,b;const[n,r]=l.useState(!1),[s,i]=l.useState(null),[c,d]=l.useState(null);l.useEffect(()=>{if(!n||s||c)return;let o=!1;return x.getProof(t.run_id).then(h=>{o||i(h)}).catch(h=>{o||d((h==null?void 0:h.message)||"could not load this receipt")}),()=>{o=!0}},[n,t.run_id,s,c]);const a=N[w(s)],j=t.generated_at?new Date(t.generated_at).toLocaleString():"unknown";return e.jsxs("div",{className:`border rounded-card overflow-hidden ${s?a.badge:"border-muted/20"}`,children:[e.jsxs("button",{type:"button",className:"w-full flex items-center gap-3 px-3 py-2.5 text-left",onClick:()=>r(!n),"aria-expanded":n,children:[e.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${s?a.dot:"bg-muted/40"}`}),e.jsx("span",{className:"text-sm font-medium flex-1 truncate",children:t.headline?`Recorded: ${t.headline}`:t.run_id}),t.final_verdict&&e.jsxs("span",{className:"text-xs font-mono uppercase tracking-wider flex-shrink-0 text-muted",children:["council ",t.final_verdict]}),e.jsx("span",{className:"text-muted text-xs flex-shrink-0",children:n?"−":"+"})]}),n&&e.jsxs("div",{className:"px-3 pb-3 space-y-3 border-t border-current/10 pt-3",children:[c&&e.jsxs("p",{className:"text-xs text-danger",children:["Could not load this receipt: ",c]}),!c&&!s&&e.jsx("p",{className:"text-xs text-muted",children:"Loading receipt…"}),s&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(u,{label:"Run",value:s.run_id}),e.jsx(u,{label:"Generated",value:j}),e.jsx(u,{label:"Loki version",value:s.loki_version||"unknown"}),e.jsx(u,{label:"Cost",value:typeof((m=s.cost)==null?void 0:m.usd)=="number"?`${s.cost.cost_partial===!0?"at least ":""}$${s.cost.usd.toFixed(2)}`:"unknown"}),e.jsx(u,{label:"Files changed",value:typeof((p=s.files_changed)==null?void 0:p.count)=="number"?String(s.files_changed.count):"unknown"}),((g=s.verification)==null?void 0:g.hash)&&e.jsx(u,{label:"Recorded hash",value:s.verification.hash})]}),e.jsxs("div",{className:`rounded-card border px-3 py-2 ${a.badge}`,children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider mb-1",children:a.label}),e.jsxs("p",{className:"text-xs mb-1",children:[e.jsx("span",{className:"font-semibold",children:"Proven: "}),a.proven]}),e.jsxs("p",{className:"text-xs opacity-80",children:[e.jsx("span",{className:"font-semibold",children:"Not proven: "}),a.notProven]}),(((f=s.integrity_check)==null?void 0:f.reasons)||[]).slice(0,2).map(o=>e.jsx("p",{className:"text-xs opacity-80 mt-1",children:o},o))]}),e.jsxs("p",{className:"text-xs text-muted",children:["Verify it yourself (also re-derives the diff against your repo):"," ",e.jsxs("code",{className:"font-mono",children:["loki proof verify ",s.run_id,(b=s.verification)!=null&&b.attestation?" --jwks <url|file>":""]})]}),t.pr_url&&e.jsx("a",{href:t.pr_url,target:"_blank",rel:"noreferrer noopener",className:"text-xs text-primary underline",children:"View the pull request"})]})]})]})}function P(){const[t,n]=l.useState(null),[r,s]=l.useState(null),[i,c]=l.useState(null);return l.useEffect(()=>{let d=!1;return x.listProofs().then(a=>{d||n(a.proofs||[])}).catch(a=>{d||c((a==null?void 0:a.message)||"could not load receipts")}),x.proofsSummary().then(a=>{d||s(a)}).catch(()=>{}),()=>{d=!0}},[]),e.jsxs("section",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Evidence Receipts"}),e.jsx("p",{className:"text-muted text-xs mt-1",children:"What each build actually checked, recorded so you can verify it yourself."})]}),i&&e.jsxs("p",{className:"text-xs text-danger",children:["Could not load receipts: ",i]}),!i&&t===null&&e.jsx("p",{className:"text-xs text-muted",children:"Loading…"}),r&&e.jsx(y,{summary:r}),t!==null&&t.length===0&&e.jsxs("p",{className:"text-xs text-muted",children:["No receipts yet. One is written at the end of each run (set ",e.jsx("code",{className:"font-mono",children:"LOKI_PROOF=0"})," to opt out)."]}),e.jsx("div",{className:"space-y-2",children:t==null?void 0:t.map(d=>e.jsx(k,{proof:d},d.run_id))})]})}export{P as E};
1
+ import{r as l,a as x,j as e}from"./index-DJsL2Ayw.js";const N={verified:{badge:"bg-success/10 text-success border-success/20",dot:"bg-success",label:"Verified",proven:"The server recomputed the integrity hash and it matches, and the gpg signature verified against its keyring.",notProven:"That the code is correct, or that the recorded diff still matches your repo. A receipt records which checks ran, not that the result is right."},unsigned:{badge:"bg-warning/10 text-warning border-warning/20",dot:"bg-warning",label:"Unsigned",proven:"The server recomputed the integrity hash and it matches these receipt bytes.",notProven:"Who produced it. An unsigned receipt is forgeable: whoever controls the builder can rewrite the facts and recompute the hash."},unchecked:{badge:"bg-warning/10 text-warning border-warning/20",dot:"bg-warning",label:"Not checked",proven:"The server recomputed the integrity hash and it matches.",notProven:"Provenance. A signature is present but was not evaluated here, which is not the same as a bad signature."},tampered:{badge:"bg-danger/10 text-danger border-danger/20",dot:"bg-danger",label:"Tampered",proven:"Nothing. The server recomputed the integrity hash and it does not match the contents.",notProven:"Anything at all. This receipt was edited after it was written. Do not trust this build."},failed:{badge:"bg-danger/10 text-danger border-danger/20",dot:"bg-danger",label:"Failed verification",proven:"Nothing. A verification check ran on the server and said no.",notProven:"Anything the receipt claims. Read the reason below."},not_verified:{badge:"border-muted/20 text-muted",dot:"bg-muted/40",label:"Not verified here",proven:"Nothing. No verification result was computed for this receipt here.",notProven:"Integrity or provenance. Run the command below to check it yourself."}};function w(t){const n=t==null?void 0:t.integrity_check,r=t==null?void 0:t.verification;return n?n.status==="tampered"?"tampered":n.status==="failed"?"failed":n.status!=="verified"?"not_verified":n.gpg_ok===!0?"verified":r!=null&&r.attestation||r!=null&&r.gpg_signature?"unchecked":"unsigned":"not_verified"}const v=[{key:"verified",label:"Verified",bar:"bg-success",text:"text-success"},{key:"with_gaps",label:"With gaps",bar:"bg-warning",text:"text-warning"},{key:"not_verified",label:"Not verified",bar:"bg-danger",text:"text-danger"},{key:"unknown",label:"Unknown",bar:"bg-muted/40",text:"text-muted"}];function y({summary:t}){const n=t.total_receipts;return n?e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex h-1.5 rounded-full overflow-hidden bg-muted/10",children:v.map(({key:r,bar:s})=>{const i=t[r];return i?e.jsx("div",{className:s,style:{width:`${i/n*100}%`},title:`${i} ${r}`},r):null})}),e.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs",children:v.map(({key:r,label:s,text:i})=>{const c=t[r];return c?e.jsxs("span",{className:i,children:[e.jsx("span",{className:"font-semibold",children:c})," ",s.toLowerCase()]},r):null})}),e.jsxs("p",{className:"text-muted text-xs",children:["Recorded verdicts across ",n," receipt",n===1?"":"s",", not re-verified here."]})]}):null}function u({label:t,value:n}){return e.jsxs("div",{className:"flex items-baseline gap-2 text-xs",children:[e.jsx("span",{className:"text-muted w-28 flex-shrink-0",children:t}),e.jsx("span",{className:"font-mono truncate",title:n,children:n})]})}function k({proof:t}){var m,p,g,f,b;const[n,r]=l.useState(!1),[s,i]=l.useState(null),[c,d]=l.useState(null);l.useEffect(()=>{if(!n||s||c)return;let o=!1;return x.getProof(t.run_id).then(h=>{o||i(h)}).catch(h=>{o||d((h==null?void 0:h.message)||"could not load this receipt")}),()=>{o=!0}},[n,t.run_id,s,c]);const a=N[w(s)],j=t.generated_at?new Date(t.generated_at).toLocaleString():"unknown";return e.jsxs("div",{className:`border rounded-card overflow-hidden ${s?a.badge:"border-muted/20"}`,children:[e.jsxs("button",{type:"button",className:"w-full flex items-center gap-3 px-3 py-2.5 text-left",onClick:()=>r(!n),"aria-expanded":n,children:[e.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${s?a.dot:"bg-muted/40"}`}),e.jsx("span",{className:"text-sm font-medium flex-1 truncate",children:t.headline?`Recorded: ${t.headline}`:t.run_id}),t.final_verdict&&e.jsxs("span",{className:"text-xs font-mono uppercase tracking-wider flex-shrink-0 text-muted",children:["council ",t.final_verdict]}),e.jsx("span",{className:"text-muted text-xs flex-shrink-0",children:n?"−":"+"})]}),n&&e.jsxs("div",{className:"px-3 pb-3 space-y-3 border-t border-current/10 pt-3",children:[c&&e.jsxs("p",{className:"text-xs text-danger",children:["Could not load this receipt: ",c]}),!c&&!s&&e.jsx("p",{className:"text-xs text-muted",children:"Loading receipt…"}),s&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(u,{label:"Run",value:s.run_id}),e.jsx(u,{label:"Generated",value:j}),e.jsx(u,{label:"Loki version",value:s.loki_version||"unknown"}),e.jsx(u,{label:"Cost",value:typeof((m=s.cost)==null?void 0:m.usd)=="number"?`${s.cost.cost_partial===!0?"at least ":""}$${s.cost.usd.toFixed(2)}`:"unknown"}),e.jsx(u,{label:"Files changed",value:typeof((p=s.files_changed)==null?void 0:p.count)=="number"?String(s.files_changed.count):"unknown"}),((g=s.verification)==null?void 0:g.hash)&&e.jsx(u,{label:"Recorded hash",value:s.verification.hash})]}),e.jsxs("div",{className:`rounded-card border px-3 py-2 ${a.badge}`,children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider mb-1",children:a.label}),e.jsxs("p",{className:"text-xs mb-1",children:[e.jsx("span",{className:"font-semibold",children:"Proven: "}),a.proven]}),e.jsxs("p",{className:"text-xs opacity-80",children:[e.jsx("span",{className:"font-semibold",children:"Not proven: "}),a.notProven]}),(((f=s.integrity_check)==null?void 0:f.reasons)||[]).slice(0,2).map(o=>e.jsx("p",{className:"text-xs opacity-80 mt-1",children:o},o))]}),e.jsxs("p",{className:"text-xs text-muted",children:["Verify it yourself (also re-derives the diff against your repo):"," ",e.jsxs("code",{className:"font-mono",children:["loki proof verify ",s.run_id,(b=s.verification)!=null&&b.attestation?" --jwks <url|file>":""]})]}),t.pr_url&&e.jsx("a",{href:t.pr_url,target:"_blank",rel:"noreferrer noopener",className:"text-xs text-primary underline",children:"View the pull request"})]})]})]})}function P(){const[t,n]=l.useState(null),[r,s]=l.useState(null),[i,c]=l.useState(null);return l.useEffect(()=>{let d=!1;return x.listProofs().then(a=>{d||n(a.proofs||[])}).catch(a=>{d||c((a==null?void 0:a.message)||"could not load receipts")}),x.proofsSummary().then(a=>{d||s(a)}).catch(()=>{}),()=>{d=!0}},[]),e.jsxs("section",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Evidence Receipts"}),e.jsx("p",{className:"text-muted text-xs mt-1",children:"What each build actually checked, recorded so you can verify it yourself."})]}),i&&e.jsxs("p",{className:"text-xs text-danger",children:["Could not load receipts: ",i]}),!i&&t===null&&e.jsx("p",{className:"text-xs text-muted",children:"Loading…"}),r&&e.jsx(y,{summary:r}),t!==null&&t.length===0&&e.jsxs("p",{className:"text-xs text-muted",children:["No receipts yet. One is written at the end of each run (set ",e.jsx("code",{className:"font-mono",children:"LOKI_PROOF=0"})," to opt out)."]}),e.jsx("div",{className:"space-y-2",children:t==null?void 0:t.map(d=>e.jsx(k,{proof:d},d.run_id))})]})}export{P as E};
@@ -1,4 +1,4 @@
1
- import{c as _,r as o,a as k,j as e,m as B,J as v,N as h,a5 as H,M as L,l as q}from"./index-e6AJj_FZ.js";import{B as N}from"./Button-pJQGPQG3.js";import{C as y}from"./thumbs-up-Bkv2XfEI.js";import{R as S}from"./refresh-cw-B3e5PosV.js";import{C as z}from"./circle-alert-BbAswQCH.js";import{U as D}from"./user-B1vdZy5k.js";import{L as G}from"./loader-circle-BCqpe4tG.js";import{R as T}from"./rotate-ccw-Bq7bL0VU.js";/**
1
+ import{c as _,r as o,a as k,j as e,m as B,J as v,N as h,a5 as H,M as L,l as q}from"./index-DJsL2Ayw.js";import{B as N}from"./Button-BL7bzQ1Y.js";import{C as y}from"./thumbs-up-72iprVd_.js";import{R as S}from"./refresh-cw-C_Mb0BAy.js";import{C as z}from"./circle-alert-Banmaa4K.js";import{U as D}from"./user-CUIAuAG6.js";import{L as G}from"./loader-circle-Dkw28D-E.js";import{R as T}from"./rotate-ccw-DilrklmO.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as I,r as c,a as b,j as e,G as me,A as ue,S as Z,k as ee,m as pe,h as he,p as fe,X as te,M as be}from"./index-e6AJj_FZ.js";import{B as y}from"./Button-pJQGPQG3.js";import{C as ge}from"./chevron-left-CltmqJT_.js";import{G as P}from"./thumbs-up-Bkv2XfEI.js";import{R as $}from"./refresh-cw-B3e5PosV.js";import{C as Ne}from"./circle-alert-BbAswQCH.js";import{L as Q,S as je}from"./ProjectPage-ebHX3sGB.js";import{S as se}from"./shield-alert-BBHJ_lXm.js";import{F as ye}from"./file-code-corner-MmKizbcw.js";import{C as V}from"./clock-BavtSHCG.js";import{C as re}from"./check-8ImSobx9.js";import"./ErrorBoundary-Cy2nQmav.js";import"./TerminalOutput-DAY4Byu3.js";import"./lock-BnMvxGFU.js";import"./package-B17YBJlQ.js";import"./file-plus-B2klPCRF.js";import"./activity-BOOOTjKZ.js";import"./scroll-text-DnDLp_Iy.js";import"./bot-Bf2uaoIj.js";import"./loader-circle-BCqpe4tG.js";import"./hammer-CROPWX47.js";import"./dollar-sign-BMsw7HY3.js";import"./globe-DSscdsP3.js";import"./trash-2-D_G3y6X3.js";import"./upload-YAZyAmu-.js";import"./plus-CDOsU3Nf.js";import"./rotate-ccw-Bq7bL0VU.js";import"./code-xml-CPMgX0Yl.js";import"./trending-up-C1xa0U9-.js";import"./layers-CEObwoRd.js";import"./trending-down-VAFpBENN.js";import"./server-DlV0wYge.js";/**
1
+ import{c as I,r as c,a as b,j as e,G as me,A as ue,S as Z,k as ee,m as pe,h as he,p as fe,X as te,M as be}from"./index-DJsL2Ayw.js";import{B as y}from"./Button-BL7bzQ1Y.js";import{C as ge}from"./chevron-left-BAv_BwrD.js";import{G as P}from"./thumbs-up-72iprVd_.js";import{R as $}from"./refresh-cw-C_Mb0BAy.js";import{C as Ne}from"./circle-alert-Banmaa4K.js";import{L as Q,S as je}from"./ProjectPage-DMiW_LqF.js";import{S as se}from"./shield-alert-CZvOoSfx.js";import{F as ye}from"./file-code-corner-CcRJ91yF.js";import{C as V}from"./clock-Ccvc0Bww.js";import{C as re}from"./check-CdrUQ4RX.js";import"./ErrorBoundary-DsaRVLEW.js";import"./TerminalOutput-DCbwnSOM.js";import"./lock-BjYcYzEv.js";import"./package-DuIzKQMO.js";import"./file-plus-j20DnVVI.js";import"./activity-D2WvJEeh.js";import"./scroll-text-Du7cBUqO.js";import"./bot-DtfJgjKu.js";import"./loader-circle-Dkw28D-E.js";import"./hammer-CkcYFWJ9.js";import"./dollar-sign-h_V-9TZ3.js";import"./globe-D_-OzrzF.js";import"./trash-2-BdF6Svmn.js";import"./upload-D2rl_sqR.js";import"./plus-FVb01j9e.js";import"./rotate-ccw-DilrklmO.js";import"./code-xml-DxXcmu73.js";import"./trending-up-COX_uXpi.js";import"./layers-BnRTYNN0.js";import"./trending-down-B3Qcyamg.js";import"./server-BaQvJLcB.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.