loki-mode 11.2.2 → 11.3.1

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 (216) hide show
  1. package/README.md +68 -650
  2. package/SKILL.md +4 -4
  3. package/VERSION +1 -1
  4. package/autonomy/completion-council.sh +2 -2
  5. package/autonomy/context-tracker.py +4 -4
  6. package/autonomy/council-v2.sh +1 -1
  7. package/autonomy/grill.sh +1 -1
  8. package/autonomy/lib/done-recognition.sh +1 -1
  9. package/autonomy/lib/prd-enrich.sh +1 -1
  10. package/autonomy/lib/skill-link-heal.sh +78 -1
  11. package/autonomy/lib/voter-agents.sh +1 -1
  12. package/autonomy/loki +99 -75
  13. package/autonomy/run.sh +30 -18
  14. package/autonomy/sandbox.sh +1 -1
  15. package/autonomy/tui.sh +6 -5
  16. package/autonomy/verify.sh +1 -1
  17. package/bin/loki +166 -59
  18. package/completions/_loki +2 -0
  19. package/completions/loki.bash +2 -2
  20. package/dashboard/__init__.py +1 -1
  21. package/dashboard/server.py +25 -31
  22. package/docs/ARCHITECTURE.md +337 -0
  23. package/docs/BRANDING.md +124 -0
  24. package/docs/CLI-REFERENCE.md +7 -1
  25. package/docs/COMPONENTS.md +447 -0
  26. package/docs/DEPLOYMENT.md +9 -9
  27. package/docs/DOCKER.md +469 -0
  28. package/docs/INSTALLATION.md +67 -1045
  29. package/docs/KNOWN-ISSUES.md +11 -35
  30. package/docs/TESTING.md +161 -0
  31. package/docs/air-gapped.md +1 -2
  32. package/docs/alternative-installations.md +14 -24
  33. package/docs/architecture/DECISIONS.md +333 -0
  34. package/docs/audit-logging.md +7 -7
  35. package/docs/authentication.md +3 -3
  36. package/docs/authorization.md +1 -1
  37. package/docs/certification/04-production-deployment/lab.md +6 -6
  38. package/docs/certification/04-production-deployment/lesson.md +4 -4
  39. package/docs/certification/README.md +1 -1
  40. package/docs/control-plane-container.md +2 -2
  41. package/docs/dev/real-run.md +34 -0
  42. package/docs/dev/release-checklist.md +2 -2
  43. package/docs/exit-codes.md +3 -3
  44. package/docs/git-workflow.md +3 -3
  45. package/docs/metrics.md +37 -55
  46. package/docs/network-security.md +1 -1
  47. package/docs/siem-integration.md +5 -5
  48. package/docs/v10/CLI-MODERN.md +4 -3
  49. package/docs/v10/DECISIONS.md +44 -0
  50. package/docs/v10/DEPS.md +22 -22
  51. package/docs/v10/ENGINE.md +1 -1
  52. package/docs/v10/FAILURE-CLASSES.md +129 -1
  53. package/docs/v10/FOUNDER-QUEUE.md +1 -0
  54. package/docs/v10/GUARDS.md +13 -0
  55. package/docs/v10/LEGACY-REMOVAL.md +4 -6
  56. package/docs/v10/METRICS.md +2 -2
  57. package/docs/v10/MODERNIZE.md +1 -1
  58. package/docs/v10/OPERATING-MODEL.md +2 -1
  59. package/docs/v10/PROGRESS.md +29 -0
  60. package/docs/v11/COST-HALF.md +352 -0
  61. package/docs/v11/MARKET-SLICES.md +315 -0
  62. package/docs/v11/REGISTRIES.md +730 -0
  63. package/loki-ts/data/model-pricing.json +52 -24
  64. package/loki-ts/dist/loki.js +1036 -957
  65. package/mcp/__init__.py +1 -1
  66. package/package.json +1 -1
  67. package/packages/control-plane/dist/server.js +2467 -736
  68. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  69. package/src/protocols/mcp-client.js +6 -2
  70. package/src/protocols/mcp-server.js +13 -3
  71. package/tools/audit-docs.py +1 -1
  72. package/web-app/dist/assets/{AdminPage-C-iMLNxe.js → AdminPage-CMkHNJbF.js} +1 -1
  73. package/web-app/dist/assets/{Avatar-C7VUvwsO.js → Avatar-BJyjV7Zi.js} +1 -1
  74. package/web-app/dist/assets/{Badge-tGvQEhnw.js → Badge-D572l0uq.js} +1 -1
  75. package/web-app/dist/assets/{Button-_iHlH_yL.js → Button-T4BnOZgl.js} +1 -1
  76. package/web-app/dist/assets/{CockpitPage-J_nNjbcR.js → CockpitPage-Cj_GFsNn.js} +1 -1
  77. package/web-app/dist/assets/{ComparePage-B05ui6Xt.js → ComparePage-A8m4ZXak.js} +1 -1
  78. package/web-app/dist/assets/{ErrorBoundary-Bxex6DLn.js → ErrorBoundary-hugCg5yg.js} +1 -1
  79. package/web-app/dist/assets/{EvidenceReceiptPanel-BsgWfdD1.js → EvidenceReceiptPanel-CuJKDC2G.js} +1 -1
  80. package/web-app/dist/assets/{GitHubIssuesPanel-DZBhZ8_X.js → GitHubIssuesPanel-BYGKjarC.js} +1 -1
  81. package/web-app/dist/assets/{GitHubPRsPanel-BaxlAl6R.js → GitHubPRsPanel-c7sFIJlf.js} +1 -1
  82. package/web-app/dist/assets/{HomePage-mVJvzqbF.js → HomePage-A1MIkG2P.js} +2 -2
  83. package/web-app/dist/assets/{LoginPage-B0zd4A_G.js → LoginPage-8KQMRhtR.js} +1 -1
  84. package/web-app/dist/assets/{MagicPage-DXLQ-y_R.js → MagicPage-C05QW2Lx.js} +1 -1
  85. package/web-app/dist/assets/{MetricsPage-CLS34Xvr.js → MetricsPage-Oukv5hme.js} +1 -1
  86. package/web-app/dist/assets/{NotFoundPage-BXG8PbNV.js → NotFoundPage-DKIwsawz.js} +1 -1
  87. package/web-app/dist/assets/{ProjectPage-D3kFFC0F.js → ProjectPage-DwFRPLCG.js} +3 -3
  88. package/web-app/dist/assets/{ProjectsPage-2bFn-gnC.js → ProjectsPage-CgY4YYDX.js} +1 -1
  89. package/web-app/dist/assets/{SettingsPage-CBM0ziWE.js → SettingsPage-BpfcSjUA.js} +1 -1
  90. package/web-app/dist/assets/{ShowcasePage-BTaXhjI3.js → ShowcasePage-BqBakC4K.js} +1 -1
  91. package/web-app/dist/assets/{SystemSettingsPage-BrC2hyAr.js → SystemSettingsPage-CZLu5VB0.js} +1 -1
  92. package/web-app/dist/assets/{TeamsPage-oqxdbVbY.js → TeamsPage-D55S1jKz.js} +1 -1
  93. package/web-app/dist/assets/{TemplatesPage-CEbUIY21.js → TemplatesPage-D3SydvxN.js} +1 -1
  94. package/web-app/dist/assets/{TerminalOutput-aIoWLbJA.js → TerminalOutput-hNg8G1-e.js} +1 -1
  95. package/web-app/dist/assets/{activity-CPyi45gt.js → activity-D2C0VagO.js} +1 -1
  96. package/web-app/dist/assets/{bell-BhaNBaJp.js → bell-CMvYi36w.js} +1 -1
  97. package/web-app/dist/assets/{bot-Da8REaEP.js → bot-BvtQ6lmo.js} +1 -1
  98. package/web-app/dist/assets/{check-DPj99ArM.js → check-B13xkXed.js} +1 -1
  99. package/web-app/dist/assets/{chevron-left-CkxonN0X.js → chevron-left-emu6r49E.js} +1 -1
  100. package/web-app/dist/assets/{circle-alert-C0JkB1y5.js → circle-alert-CExlwjuy.js} +1 -1
  101. package/web-app/dist/assets/{clock-COzFIiWi.js → clock-D7Uas3oL.js} +1 -1
  102. package/web-app/dist/assets/{cloud-bjkac4kn.js → cloud-CkB4S86C.js} +1 -1
  103. package/web-app/dist/assets/{code-xml-hlKlvXUJ.js → code-xml-SL9IIWIn.js} +1 -1
  104. package/web-app/dist/assets/{database-D555S5Km.js → database-BQFkd7t1.js} +1 -1
  105. package/web-app/dist/assets/{dollar-sign-CVcApzcD.js → dollar-sign-qHmnNYsU.js} +1 -1
  106. package/web-app/dist/assets/{file-code-corner-UORaMIcO.js → file-code-corner-C2YUDP0K.js} +1 -1
  107. package/web-app/dist/assets/{file-plus-ALJtDoI2.js → file-plus-C_ooIkDe.js} +1 -1
  108. package/web-app/dist/assets/{globe-CPlrM_IC.js → globe-CQ-GL485.js} +1 -1
  109. package/web-app/dist/assets/{hammer-qaGZHpja.js → hammer-U05L_D7V.js} +1 -1
  110. package/web-app/dist/assets/{index-BcXljIAO.js → index-CooHd7I-.js} +3 -3
  111. package/web-app/dist/assets/{layers-BV8R9VUK.js → layers-Buo17rjW.js} +1 -1
  112. package/web-app/dist/assets/{loader-circle-6TlDS9Tu.js → loader-circle-15vK3oV1.js} +1 -1
  113. package/web-app/dist/assets/{lock-B9t6oWI0.js → lock-BeXLebuJ.js} +1 -1
  114. package/web-app/dist/assets/{package-2gEUAtZJ.js → package-MVh_6-6R.js} +1 -1
  115. package/web-app/dist/assets/{plus-DXocxPjU.js → plus-Dh_nd9vS.js} +1 -1
  116. package/web-app/dist/assets/{refresh-cw-D3dWHBd6.js → refresh-cw-C9cBJEAT.js} +1 -1
  117. package/web-app/dist/assets/{rotate-ccw-CvuWqaSB.js → rotate-ccw-D3PAtzST.js} +1 -1
  118. package/web-app/dist/assets/{scroll-text-ktmD_xJY.js → scroll-text-DZCoXQjo.js} +1 -1
  119. package/web-app/dist/assets/{server-E7pZtj5A.js → server-OCOLI5J_.js} +1 -1
  120. package/web-app/dist/assets/{shield-alert-968j9z0V.js → shield-alert-oVhmf1_h.js} +1 -1
  121. package/web-app/dist/assets/{thumbs-up-Tz_8rpU_.js → thumbs-up-B-kbX4vN.js} +1 -1
  122. package/web-app/dist/assets/{trash-2-Drh9IIj8.js → trash-2-EL6moveW.js} +1 -1
  123. package/web-app/dist/assets/{trending-down-DCQXtVSL.js → trending-down-Cl3kjpsx.js} +1 -1
  124. package/web-app/dist/assets/{trending-up-BIiwQbWV.js → trending-up-DST7I6M2.js} +1 -1
  125. package/web-app/dist/assets/{upload-sCbPkfmy.js → upload-CUOT780G.js} +1 -1
  126. package/web-app/dist/assets/{usePolling-BMIg6ZVT.js → usePolling-Djmt90eb.js} +1 -1
  127. package/web-app/dist/assets/{user-kGzXC3V2.js → user-BRBohA6J.js} +1 -1
  128. package/web-app/dist/index.html +1 -1
  129. package/docs/ARCHITECTURE-OVERVIEW.md +0 -209
  130. package/docs/AUTONOMI-ECOSYSTEM.md +0 -107
  131. package/docs/COCKPIT-SPEC.md +0 -72
  132. package/docs/COCKPIT-UX-MANDATE.md +0 -53
  133. package/docs/COMPETITIVE-ANALYSIS.md +0 -303
  134. package/docs/COMPETITIVE-NEXT-10.md +0 -316
  135. package/docs/COMPETITIVE-RALPH-ZEROSHOT-2026-07-08.md +0 -81
  136. package/docs/DASHBOARD-9.12-EVIDENCE.md +0 -97
  137. package/docs/DASHBOARD-ARCHITECTURE.md +0 -425
  138. package/docs/DASHBOARD_V2_CHECKLIST.md +0 -243
  139. package/docs/DEMOS.md +0 -63
  140. package/docs/ENTERPRISE-IDENTITY-ROADMAP.md +0 -206
  141. package/docs/EVIDENCE-RECEIPT-BUILD-APPLICABILITY.md +0 -79
  142. package/docs/FEAT-PRDREUSE-DOCKER-PLAN.md +0 -144
  143. package/docs/GATE-FAILURE-TRIAGE.md +0 -254
  144. package/docs/HANDOFF-2026-08-03.md +0 -439
  145. package/docs/LOOP-CANDIDATE-PROPOSAL-v1.md +0 -167
  146. package/docs/LOOP-HARNESS-AUDIT.md +0 -684
  147. package/docs/MERGE-DEDUP-MAP.md +0 -420
  148. package/docs/MERGE-ROUTE-MAP.md +0 -139
  149. package/docs/MODEL-REGISTRY-PLAN.md +0 -155
  150. package/docs/OUTCOME-FRONTIER.md +0 -536
  151. package/docs/P2-SPEC-ROBUSTNESS-PLAN.md +0 -192
  152. package/docs/PLANS-INDEX.md +0 -32
  153. package/docs/PRD-REUSE-DONE-RECOGNITION-PLAN.md +0 -536
  154. package/docs/PROMPT-ABLATION-RESULT.md +0 -97
  155. package/docs/R4-TRUST-TRAJECTORY-DESIGN.md +0 -127
  156. package/docs/R5-AUTO-WIKI-DESIGN.md +0 -137
  157. package/docs/R6-ROLLBACK-CHECKPOINT-PLAN.md +0 -107
  158. package/docs/R7-ZERO-CONFIG-FIRST-RUN-PLAN.md +0 -137
  159. package/docs/R8-SHAREABLE-TEAM-ASSETS-PLAN.md +0 -129
  160. package/docs/R9-OPEN-CORE-HOOKS-PLAN.md +0 -113
  161. package/docs/RARV-C-100X-PLAN.md +0 -286
  162. package/docs/RARV-C-LOOP-EFFICIENCY-PLAN.md +0 -470
  163. package/docs/SHAREABLE-PROOF-PLAN.md +0 -194
  164. package/docs/SONNET5-DEFAULT-PLAN.md +0 -157
  165. package/docs/SPEED-AND-FIRST-PASS-PLAN.md +0 -281
  166. package/docs/STALE-STATE-AUDIT.md +0 -174
  167. package/docs/SYNERGY-TASKS.md +0 -143
  168. package/docs/TASKLIST-ACCURACY-PLAN.md +0 -355
  169. package/docs/TOP-100-BACKLOG.md +0 -159
  170. package/docs/V8-ACCEPTANCE-TRIAGE-2026-07-24.md +0 -114
  171. package/docs/V8-COMPLEXITY-AUDIT-2026-07-24.md +0 -45
  172. package/docs/V8-MAJOR-RELEASE-PLAN.md +0 -137
  173. package/docs/V8-OVERNIGHT-PLAN-2026-07-25.md +0 -82
  174. package/docs/V8-SDK-RESEARCH-RAW.md +0 -129
  175. package/docs/WELCOME-OPENER-PLAN.md +0 -106
  176. package/docs/adoption-baseline-2026-07-31.md +0 -84
  177. package/docs/architecture/bmad-integration-epic.md +0 -271
  178. package/docs/architecture/bmad-integration-review.md +0 -86
  179. package/docs/architecture/bmad-integration-validation.md +0 -249
  180. package/docs/architecture/bmad-loki-voice-agent-council-analysis.md +0 -61
  181. package/docs/auto-claude-comparison.md +0 -250
  182. package/docs/bug-fixes/agent-01-cli-fixes.md +0 -101
  183. package/docs/bug-fixes/agent-02-purplelab-fixes.md +0 -88
  184. package/docs/bug-fixes/agent-03-dashboard-fixes.md +0 -119
  185. package/docs/bug-fixes/agent-04-memory-fixes.md +0 -105
  186. package/docs/bug-fixes/agent-05-provider-fixes.md +0 -86
  187. package/docs/bug-fixes/agent-06-integration-fixes.md +0 -101
  188. package/docs/bug-fixes/agent-07-dash-run-fixes.md +0 -101
  189. package/docs/bug-fixes/agent-08-docker-fixes.md +0 -164
  190. package/docs/bug-fixes/agent-09-e2e-build-fixes.md +0 -69
  191. package/docs/bug-fixes/agent-10-e2e-fullstack-fixes.md +0 -102
  192. package/docs/bug-fixes/agent-11-e2e-session-fixes.md +0 -70
  193. package/docs/bug-fixes/agent-12-scenario-fixes.md +0 -120
  194. package/docs/bug-fixes/agent-13-enterprise-fixes.md +0 -143
  195. package/docs/bug-fixes/agent-14-uat-newuser-fixes.md +0 -88
  196. package/docs/bug-fixes/agent-15-uat-poweruser-fixes.md +0 -132
  197. package/docs/bug-fixes/agent-19-code-review.md +0 -316
  198. package/docs/bug-fixes/agent-20-architecture-review.md +0 -331
  199. package/docs/competitive/bolt-new-analysis.md +0 -579
  200. package/docs/competitive/emergence-others-analysis.md +0 -605
  201. package/docs/competitive/replit-lovable-analysis.md +0 -622
  202. package/docs/dashboard-guide.md +0 -487
  203. package/docs/enterprise/migration.md +0 -265
  204. package/docs/history/one-run-audit.md +0 -304
  205. package/docs/plans/FORGE-AUTONOMOUS-QUEUE.md +0 -312
  206. package/docs/plans/ULTRAPLAN-FORGE-BAAS.md +0 -612
  207. package/docs/plans/UT2-6-LSP-DIAGNOSTIC-BROADCAST.md +0 -394
  208. package/docs/prd-purple-lab-ide.md +0 -152
  209. package/docs/prd-purple-lab-platform-v2.md +0 -223
  210. package/docs/prd-purple-lab-platform.md +0 -319
  211. package/docs/retrospectives/v7.5.15-fleet-postmortem.md +0 -325
  212. package/docs/retrospectives/v7.5.15-honesty-audit.md +0 -136
  213. package/docs/retrospectives/v7.5.15-llm-failure-modes.md +0 -49
  214. package/docs/show-hn-post.md +0 -46
  215. package/docs/test-scenarios/enterprise-scenarios.md +0 -732
  216. package/docs/thick2thin.md +0 -173
package/autonomy/loki CHANGED
@@ -1860,7 +1860,7 @@ show_help() {
1860
1860
  echo " # only the OpenAI-shaped /v1/chat/completions. Use the aider or"
1861
1861
  echo " # cline route above for OpenRouter."
1862
1862
  echo ""
1863
- echo " # Cross-project context (Phase F v7.5.23+)"
1863
+ echo " # Cross-project context (Phase F)"
1864
1864
  echo " # Drop .loki/app.json with {schema_version:1,app_id:myapp,members:[ui,api]}"
1865
1865
  echo " # at the parent of related repos for shared CLAUDE.md + memory."
1866
1866
  echo ""
@@ -1871,7 +1871,7 @@ show_help() {
1871
1871
  echo ""
1872
1872
  echo " # Config + dashboard"
1873
1873
  echo " loki config set maxTier sonnet # Cap model cost"
1874
- echo " loki dashboard start # Web dashboard at localhost:57374"
1874
+ echo " loki dashboard start # Open the Control Plane UI"
1875
1875
  echo " loki watch # Auto-rerun on PRD changes"
1876
1876
  echo " loki cockpit # Live multi-repo cockpit (terminal image)"
1877
1877
  echo " loki remote # Remote session (phone/browser)"
@@ -1904,7 +1904,7 @@ show_help() {
1904
1904
  echo ""
1905
1905
  echo "Any command: loki <command> --help"
1906
1906
  echo ""
1907
- echo "Phase A-J features (v7.5.18 - v7.5.28) are default-on. See CHANGELOG."
1907
+ echo "Phase A-J features are default-on. See CHANGELOG."
1908
1908
  echo ""
1909
1909
  echo "Environment variables an operator would set: docs/environment-variables.md"
1910
1910
  echo "Cost controls (budget, iteration and wall-clock caps): docs/cost-controls.md"
@@ -2534,7 +2534,7 @@ cmd_start() {
2534
2534
  while [[ $# -gt 0 ]]; do
2535
2535
  case "$1" in
2536
2536
  --help|-h)
2537
- echo -e "${BOLD}loki start${NC} - Unified entry point for Loki Mode (v6.84.0)"
2537
+ echo -e "${BOLD}loki start${NC} - Unified entry point for Loki Mode"
2538
2538
  echo ""
2539
2539
  echo "Usage: loki start [REPO|PRD|ISSUE-REF] [options]"
2540
2540
  echo ""
@@ -2574,6 +2574,8 @@ cmd_start() {
2574
2574
  echo " --sandbox Run in Docker sandbox (default: off; requires Docker)"
2575
2575
  echo " --isolation LEVEL Per-run isolation: none (default) | worktree | docker."
2576
2576
  echo " Unified dial; --parallel = worktree, --sandbox = docker."
2577
+ echo " --attempts N Run N (1-5, default 1) independent attempts in separate git worktrees;"
2578
+ echo " the most executed passing checks wins, losers are recorded on the receipt"
2577
2579
  echo " --skip-memory Skip loading memory context at startup"
2578
2580
  echo " --fresh-prd Regenerate the PRD from the codebase on a no-PRD run"
2579
2581
  echo " (ignores the reusable generated PRD; aliases: --regen-prd,"
@@ -2728,6 +2730,17 @@ cmd_start() {
2728
2730
  args+=("--parallel")
2729
2731
  shift
2730
2732
  ;;
2733
+ --attempts)
2734
+ # 11.3.0 T5: N>=2 is routed to the Bun route by bin/loki; N=1 is today's behavior.
2735
+ if [[ "${2:-}" != "1" ]]; then
2736
+ echo -e "${RED}--attempts N (2-5) needs the Bun route: run via bin/loki${NC}"
2737
+ exit 1
2738
+ fi
2739
+ shift 2
2740
+ ;;
2741
+ --attempts=1)
2742
+ shift
2743
+ ;;
2731
2744
  --allow-haiku)
2732
2745
  # Enable Haiku for the fast tier. Mirrors the LOKI_ALLOW_HAIKU=true
2733
2746
  # env var (consumed by providers/claude.sh and run.sh). Documented in
@@ -4232,7 +4245,7 @@ cmd_stop() {
4232
4245
  while [[ $# -gt 0 ]]; do
4233
4246
  case "$1" in
4234
4247
  --help|-h)
4235
- echo -e "${BOLD}loki stop${NC} - Stop running sessions (v7.7.30)"
4248
+ echo -e "${BOLD}loki stop${NC} - Stop running sessions"
4236
4249
  echo ""
4237
4250
  echo "Usage: loki stop [session-id] [--all]"
4238
4251
  echo ""
@@ -7085,7 +7098,7 @@ cmd_provider() {
7085
7098
  echo " info Show provider details"
7086
7099
  echo " models Show resolved model configuration for all providers"
7087
7100
  echo ""
7088
- echo "Precedence (v7.7.2 -- highest wins):"
7101
+ echo "Precedence (highest wins):"
7089
7102
  echo " 1. loki start --provider NAME CLI flag (per-invocation)"
7090
7103
  echo " 2. .loki/state/provider saved value (per-project)"
7091
7104
  echo " 3. LOKI_PROVIDER env var shell session default"
@@ -7591,13 +7604,14 @@ cmd_dashboard_help() {
7591
7604
  echo ""
7592
7605
  echo "Usage: loki dashboard <command> [options]"
7593
7606
  echo ""
7594
- echo "Note: 'loki dashboard' is the operations/observability UI (port ${DASHBOARD_DEFAULT_PORT})."
7595
- echo " It is NOT the same as 'loki web' (Purple Lab, port ${PURPLE_LAB_DEFAULT_PORT}, deprecated v7.44.0)."
7596
- echo " Use 'loki dashboard' to monitor agents, tasks, costs, council, escalations,"
7597
- echo " and to submit a PRD via the embedded 'Lab' tab (replaces the deprecated 'loki web')."
7607
+ echo "'loki dashboard', 'loki dashboard start' and 'loki dashboard open' open the Control Plane,"
7608
+ echo "the browser UI for runs, cost, receipts and events (default port 47821; override with"
7609
+ echo "LOKI_CONTROL_PORT). Needs bun; see 'loki control --help'."
7610
+ echo "The commands below manage the classic dashboard server, which serves the API only."
7611
+ echo "Setting LOKI_LEGACY_DASHBOARD=1, or passing --host, --tls-cert or --tls-key, selects it."
7598
7612
  echo ""
7599
7613
  echo "Commands:"
7600
- echo " start Start the dashboard server"
7614
+ echo " start Open the Control Plane (or start the classic API server with the flags below)"
7601
7615
  echo " stop Stop the dashboard server"
7602
7616
  echo " status Show server status and URL"
7603
7617
  echo " url Get the dashboard URL"
@@ -7605,7 +7619,7 @@ cmd_dashboard_help() {
7605
7619
  echo " help Show this help"
7606
7620
  echo ""
7607
7621
  echo "Options for 'start':"
7608
- echo " --port PORT Port to listen on (default: $DASHBOARD_DEFAULT_PORT)"
7622
+ echo " --port PORT Port for the classic API server (default: see LOKI_DASHBOARD_PORT)"
7609
7623
  echo " --host HOST Host to bind to (default: $DASHBOARD_DEFAULT_HOST)"
7610
7624
  echo " --tls-cert PATH Path to PEM certificate (enables HTTPS)"
7611
7625
  echo " --tls-key PATH Path to PEM private key (enables HTTPS)"
@@ -7614,7 +7628,7 @@ cmd_dashboard_help() {
7614
7628
  echo " --format FMT Output format: text (default) or json"
7615
7629
  echo ""
7616
7630
  echo "Environment:"
7617
- echo " LOKI_DASHBOARD_PORT Default port (overrides $DASHBOARD_DEFAULT_PORT)"
7631
+ echo " LOKI_DASHBOARD_PORT Port for the classic API server"
7618
7632
  echo " LOKI_DASHBOARD_HOST Default host (overrides $DASHBOARD_DEFAULT_HOST)"
7619
7633
  echo " LOKI_TLS_CERT Path to PEM certificate (enables HTTPS)"
7620
7634
  echo " LOKI_TLS_KEY Path to PEM private key (enables HTTPS)"
@@ -7625,7 +7639,7 @@ cmd_dashboard_help() {
7625
7639
  echo " loki dashboard start --tls-cert cert.pem --tls-key key.pem"
7626
7640
  echo " loki dashboard status # Check if running"
7627
7641
  echo " loki dashboard url --format json # Get URL as JSON"
7628
- echo " loki dashboard open # Print the Control Plane hint (no browser)"
7642
+ echo " loki dashboard open # Open the Control Plane"
7629
7643
  echo " loki dashboard stop # Stop server"
7630
7644
  }
7631
7645
 
@@ -8409,39 +8423,29 @@ cmd_web_redirect_to_dashboard() {
8409
8423
  }
8410
8424
 
8411
8425
  cmd_web_help() {
8412
- echo -e "${BOLD}Purple Lab -- Loki Mode Web UI (deprecated -- use the dashboard)${NC}"
8426
+ echo -e "${BOLD}loki web${NC} - Deprecated alias for the Control Plane"
8413
8427
  echo ""
8414
8428
  echo "Usage: loki web [command] [options]"
8415
8429
  echo ""
8416
- echo "DEPRECATED as of v7.44.0: Purple Lab is consolidated into the dashboard."
8417
- echo " 'loki web' (no subcommand) now LAUNCHES THE DASHBOARD"
8418
- echo " (http://localhost:${DASHBOARD_DEFAULT_PORT}) instead of the deprecated Purple"
8419
- echo " Lab, so the obvious command lands you on the working UI. Use the embedded"
8420
- echo " 'Lab' tab there to submit a PRD. For the hosted platform, see Autonomi Cloud."
8421
- echo ""
8422
- echo "Note: the canonical command is 'loki dashboard' (operations UI, port ${DASHBOARD_DEFAULT_PORT})."
8423
- echo " Use it to monitor running agents, tasks, costs, council, escalations."
8430
+ echo "The standalone web UI was folded into the Control Plane. 'loki web' with no"
8431
+ echo "subcommand launches the Control Plane (default port 47821, override with"
8432
+ echo "LOKI_CONTROL_PORT). The canonical command is 'loki dashboard'."
8424
8433
  echo ""
8425
8434
  echo "Commands:"
8426
- echo " start Launch the dashboard (default; Purple Lab is deprecated)"
8427
- echo " stop Stop the Purple Lab server (if one was started the old way)"
8428
- echo " status Show Purple Lab server status"
8429
- echo " logs Show Purple Lab server logs"
8435
+ echo " start Launch the Control Plane (default)"
8436
+ echo " stop Stop a standalone web server started the old way"
8437
+ echo " status Show standalone web server status"
8438
+ echo " logs Show standalone web server logs"
8430
8439
  echo " help Show this help"
8431
8440
  echo ""
8432
8441
  echo "Options (for start):"
8433
- echo " --port PORT Use custom port (default: ${DASHBOARD_DEFAULT_PORT})"
8434
- echo " --no-open Accepted for back-compat; ignored (no-op on the dashboard)"
8442
+ echo " --port PORT Use custom port"
8443
+ echo " --no-open Accepted for back-compat; ignored (no-op)"
8435
8444
  echo ""
8436
8445
  echo "Examples:"
8437
- echo " loki web Launch the dashboard"
8438
- echo " loki web --no-open Launch the dashboard (--no-open is a no-op)"
8439
- echo " loki web stop Stop a Purple Lab server started the old way"
8440
- echo ""
8441
- echo "Note (since v7.5.30):"
8442
- echo " The same PRD-input UI is embedded in the dashboard as a 'Lab' sidebar entry."
8443
- echo " 'loki web stop|status|logs' still operate on a standalone Purple Lab"
8444
- echo " process so anyone who started one the old way is never stranded."
8446
+ echo " loki web Launch the Control Plane"
8447
+ echo " loki web --no-open Same (--no-open is a no-op)"
8448
+ echo " loki web stop Stop a standalone web server started the old way"
8445
8449
  }
8446
8450
 
8447
8451
  cmd_web_start() {
@@ -11836,7 +11840,7 @@ cmd_watch() {
11836
11840
  while [[ $# -gt 0 ]]; do
11837
11841
  case "$1" in
11838
11842
  --help|-h)
11839
- echo -e "${BOLD}loki watch${NC} - Auto-rerun on PRD file changes (v6.33.0)"
11843
+ echo -e "${BOLD}loki watch${NC} - Auto-rerun on PRD file changes"
11840
11844
  echo ""
11841
11845
  echo "Usage: loki watch [prd-path] [options]"
11842
11846
  echo ""
@@ -12134,7 +12138,7 @@ cmd_cockpit() {
12134
12138
  while [[ $# -gt 0 ]]; do
12135
12139
  case "$1" in
12136
12140
  --help|-h)
12137
- echo -e "${BOLD}loki cockpit${NC} - Live multi-repo status as a terminal inline image (v7.128.0)"
12141
+ echo -e "${BOLD}loki cockpit${NC} - Live multi-repo status as a terminal inline image"
12138
12142
  echo ""
12139
12143
  echo "Usage: loki cockpit [options]"
12140
12144
  echo ""
@@ -12380,7 +12384,7 @@ cmd_export() {
12380
12384
 
12381
12385
  case "$format" in
12382
12386
  --help|-h)
12383
- echo -e "${BOLD}loki export${NC} - Export session data (v6.0.0)"
12387
+ echo -e "${BOLD}loki export${NC} - Export session data"
12384
12388
  echo ""
12385
12389
  echo "Usage: loki export <format> [output-path]"
12386
12390
  echo ""
@@ -12936,7 +12940,7 @@ cmd_config() {
12936
12940
  echo " schema Print the key -> env-var mapping table"
12937
12941
  echo " validate [FILE] Validate loki.yaml (no FILE: repo root, then ~/.loki) or a --config file"
12938
12942
  echo ""
12939
- echo "Settable keys (v6.0.0):"
12943
+ echo "Settable keys:"
12940
12944
  echo " maxTier Cost ceiling: opus, sonnet, haiku (default: opus)"
12941
12945
  echo " model.planning Model for planning tier"
12942
12946
  echo " model.development Model for development tier"
@@ -13291,7 +13295,7 @@ cmd_config_show() {
13291
13295
  echo " max_iterations: ${LOKI_MAX_ITERATIONS:-1000}"
13292
13296
  echo " autonomy_mode: ${LOKI_AUTONOMY_MODE:-perpetual}"
13293
13297
  echo ""
13294
- echo "v6.0.0 Settings:"
13298
+ echo "Settings:"
13295
13299
  echo " maxTier: ${LOKI_MAX_TIER:-(unlimited)}"
13296
13300
  echo " blind_validation: ${LOKI_BLIND_VALIDATION:-true}"
13297
13301
  echo " adversarial_testing: ${LOKI_ADVERSARIAL_TESTING:-true}"
@@ -14396,7 +14400,7 @@ cmd_logs() {
14396
14400
  # Resolve the log the runner ACTUALLY writes.
14397
14401
  #
14398
14402
  # This read a logs/session.log path that nothing in the tree writes (other
14399
- # readers of it exist in web-app/ and api-examples/, all equally dead). So
14403
+ # readers of it exist in web-app/ and examples/api/, all equally dead). So
14400
14404
  # `loki logs`, the
14401
14405
  # most natural "what is it doing?" command, reported "No log file found"
14402
14406
  # while the real logs sat in that same directory. run.sh:22409 writes
@@ -14585,7 +14589,7 @@ cmd_api() {
14585
14589
  echo " status Check if dashboard server is running"
14586
14590
  echo ""
14587
14591
  echo "Environment:"
14588
- echo " LOKI_DASHBOARD_PORT Port to listen on (default: 57374)"
14592
+ echo " LOKI_DASHBOARD_PORT Port for the API server"
14589
14593
  echo ""
14590
14594
  echo "Endpoints:"
14591
14595
  echo " GET /api/health - Health check"
@@ -17957,7 +17961,7 @@ cmd_mcp() {
17957
17961
  }
17958
17962
 
17959
17963
  cmd_heal_help() {
17960
- echo -e "${BOLD}loki heal${NC} - Legacy system healing (v6.67.0)"
17964
+ echo -e "${BOLD}loki heal${NC} - Legacy system healing"
17961
17965
  echo ""
17962
17966
  echo "Heal legacy codebases by understanding their real behaviors -- the quirks,"
17963
17967
  echo "delays, error states, and invisible dependencies -- then modernizing"
@@ -18992,7 +18996,7 @@ cmd_cluster() {
18992
18996
 
18993
18997
  case "$subcmd" in
18994
18998
  --help|-h|help)
18995
- echo -e "${BOLD}loki cluster${NC} - Custom workflow templates (v6.3.0)"
18999
+ echo -e "${BOLD}loki cluster${NC} - Custom workflow templates"
18996
19000
  echo ""
18997
19001
  echo "Usage: loki cluster <command> [options]"
18998
19002
  echo ""
@@ -19710,7 +19714,7 @@ with open(failover_file, 'w') as f: json.dump(d, f, indent=2)
19710
19714
  shift
19711
19715
  ;;
19712
19716
  --help|-h)
19713
- echo -e "${BOLD}loki failover${NC} - Cross-provider auto-failover management (v6.19.0)"
19717
+ echo -e "${BOLD}loki failover${NC} - Cross-provider auto-failover management"
19714
19718
  echo ""
19715
19719
  echo "Usage: loki failover [options]"
19716
19720
  echo ""
@@ -19949,7 +19953,7 @@ def _resolve_session_pin(alias):
19949
19953
  # fable unavailable, collapse to opus. Claude Fable 5 is not available at
19950
19954
  # the Claude API (advises use Opus 4.8); the runner dispatches opus for a
19951
19955
  # fable pin (claude.sh resolve_model_for_tier, run.sh dispatch backstop).
19952
- # Quote opus pricing (\$5/\$25) so the estimator agrees with dispatch and
19956
+ # Quote opus pricing (\$4/\$20) so the estimator agrees with dispatch and
19953
19957
  # the dashboard (v7.39.1).
19954
19958
  _m = 'opus'
19955
19959
  else: # development (and the '*' fallthrough)
@@ -20279,22 +20283,23 @@ tokens_per_tier = {
20279
20283
  'fast': {'input': 30000, 'output': 5000, 'model': 'Haiku'},
20280
20284
  }
20281
20285
 
20282
- # Pricing per 1M tokens. Fable 5 is the top-tier advisory model at exactly 2x
20283
- # Opus per token (published \$10/\$50 in/out vs Opus \$5/\$25). The Opus row was
20284
- # corrected from a stale \$15/\$75 to the real Opus 4.8 \$5/\$25, and the Haiku
20285
- # row from a stale \$0.25/\$1.25 (Haiku 3.5) to the published Claude Haiku 4.5
20286
- # price of \$1/\$5 (anthropic.com/news/claude-haiku-4-5), so all four rows now
20286
+ # Pricing per 1M tokens. Fable 5 is the top-tier advisory model at 2.5x
20287
+ # Opus per token (published \$10/\$50 in/out vs Opus 5.5 \$4/\$20). The Opus row was
20288
+ # corrected to the published Opus 5.5 \$4/\$20 (platform.claude.com pricing, 2026-10-08), and the Haiku
20289
+ # row from a stale \$0.25/\$1.25 (Haiku 3.5) to Haiku 5.5 \$0.10/\$0.50 (the haiku alias target
20290
+ # in the model catalog, up to 100K prompt tokens), so all four rows now
20287
20291
  # match the three canonical model-keyed tables (run.sh pricing.json, run.sh
20288
20292
  # check_budget_limit, dashboard _DEFAULT_PRICING). The Fable row (\$10/\$50) is
20289
20293
  # kept as the reference price, but since v7.39.1 fable is unavailable at the API
20290
20294
  # and a fable pin RESOLVES to Opus everywhere -- so a fable-pinned run both
20291
- # dispatches AND quotes Opus (\$5/\$25), matching the runner. The Fable price row
20295
+ # dispatches AND quotes Opus (\$4/\$20), matching the runner. The Fable price row
20292
20296
  # is only reachable as an explicit advisory reference, not via a session pin.
20293
20297
  pricing = {
20294
20298
  'Fable': {'input': 10.00, 'output': 50.00},
20295
- 'Opus': {'input': 5.00, 'output': 25.00},
20299
+ 'Opus': {'input': 4.00, 'output': 20.00},
20296
20300
  'Sonnet': {'input': 2.00, 'output': 10.00},
20297
- 'Haiku': {'input': 1.00, 'output': 5.00},
20301
+ # Haiku = Haiku 5.5 up to 100K prompt tokens (alias target in the model catalog)
20302
+ 'Haiku': {'input': 0.10, 'output': 0.50},
20298
20303
  }
20299
20304
 
20300
20305
  # Build per-iteration plan
@@ -20888,6 +20893,23 @@ main() {
20888
20893
  # (CLI > config). The pre-pass SCANS without consuming; the per-command
20889
20894
  # loops carry consume-and-ignore arms for the three aliases. Gated to
20890
20895
  # start/run/quick so status/config/stop never trigger a config load.
20896
+ # T5-D2 (FC-38 sweep): the bash entries have no attempts engine. --attempts (any value) is refused
20897
+ # here, before cmd_start / cmd_run / cmd_quick / cmd_demo can reach the legacy loop. bin/loki sends
20898
+ # `start --attempts N` to the Bun start command and never gets here with it.
20899
+ case "$command" in
20900
+ start|run|quick|demo|tour)
20901
+ local _att_a
20902
+ for _att_a in "$@"; do
20903
+ case "$_att_a" in
20904
+ --attempts|--attempts=*)
20905
+ echo -e "${RED}--attempts is only supported by 'loki start --attempts N --no-pr' (the Loki 10 engine); 'loki $command' would run the removed legacy loop.${NC}" >&2
20906
+ exit 2
20907
+ ;;
20908
+ esac
20909
+ done
20910
+ ;;
20911
+ esac
20912
+
20891
20913
  case "$command" in
20892
20914
  start|run|quick)
20893
20915
  if declare -f loki_maybe_apply_config_file >/dev/null 2>&1; then
@@ -21017,13 +21039,13 @@ main() {
21017
21039
  echo "Usage: loki serve [options]"
21018
21040
  echo ""
21019
21041
  echo "Alias for 'loki api start'. Starts the dashboard HTTP API"
21020
- echo "server (FastAPI, port 57374 by default)."
21042
+ echo "server (FastAPI)."
21021
21043
  echo ""
21022
21044
  echo "For the UI, run 'loki' (opens the Control Plane) or 'loki control serve'."
21023
21045
  echo ""
21024
21046
  echo "Options:"
21025
21047
  echo " --host HOST Bind host (default: 127.0.0.1)"
21026
- echo " --port PORT Bind port (default: 57374)"
21048
+ echo " --port PORT Bind port (default: LOKI_DASHBOARD_PORT)"
21027
21049
  echo " --help, -h Show this help and exit"
21028
21050
  echo ""
21029
21051
  echo "Side effects: starts a long-running HTTP server bound to a TCP port."
@@ -22449,7 +22471,7 @@ MERGE_VALIDATE_PY
22449
22471
  ;;
22450
22472
 
22451
22473
  --help|-h|help)
22452
- echo -e "${BOLD}loki worktree${NC} - Manage parallel worktrees (v6.7.0)"
22474
+ echo -e "${BOLD}loki worktree${NC} - Manage parallel worktrees"
22453
22475
  echo ""
22454
22476
  echo "Usage: loki worktree <command>"
22455
22477
  echo ""
@@ -22475,7 +22497,7 @@ cmd_state() {
22475
22497
 
22476
22498
  case "$subcmd" in
22477
22499
  --help|-h|help)
22478
- echo -e "${BOLD}loki state${NC} - Query the SQLite state layer (v6.3.0)"
22500
+ echo -e "${BOLD}loki state${NC} - Query the SQLite state layer"
22479
22501
  echo ""
22480
22502
  echo "Usage: loki state <command> [options]"
22481
22503
  echo ""
@@ -24356,7 +24378,7 @@ except Exception as e:
24356
24378
  echo " skill [name] Show skill by name or list all skills"
24357
24379
  echo " vectors [rebuild] Show vector index stats or rebuild indices"
24358
24380
  echo ""
24359
- echo "Namespace Commands (v5.19.0):"
24381
+ echo "Namespace Commands:"
24360
24382
  echo " namespace detect Auto-detect namespace from current directory"
24361
24383
  echo " namespace list List all available namespaces"
24362
24384
  echo " namespace create NAME Create a new namespace"
@@ -24384,14 +24406,14 @@ except Exception as e:
24384
24406
  echo " loki memory vectors"
24385
24407
  echo " loki memory vectors rebuild"
24386
24408
  echo ""
24387
- echo " loki memory ingest --from-claude-transcript <path> # v7.7.18"
24388
- echo " loki memory ingest --from-stdin # v7.7.18"
24389
- echo " loki memory replay <episode-id> [--json] # v7.7.22"
24390
- echo " loki memory crossproject --for 'build api' # v7.7.20"
24391
- echo " loki memory graph --export graph.json # v7.7.20"
24392
- echo " loki memory graph rebuild # v7.7.20"
24393
- echo " loki memory enable-hook # v7.7.20"
24394
- echo " loki memory disable-hook # v7.7.20"
24409
+ echo " loki memory ingest --from-claude-transcript <path>"
24410
+ echo " loki memory ingest --from-stdin"
24411
+ echo " loki memory replay <episode-id> [--json]"
24412
+ echo " loki memory crossproject --for 'build api'"
24413
+ echo " loki memory graph --export graph.json"
24414
+ echo " loki memory graph rebuild"
24415
+ echo " loki memory enable-hook"
24416
+ echo " loki memory disable-hook"
24395
24417
  echo ""
24396
24418
  echo " loki memory namespace detect"
24397
24419
  echo " loki memory namespace list"
@@ -27166,15 +27188,17 @@ TELEM_DISABLE_PY
27166
27188
  echo " status Show OTEL config + collection state + pending crash reports"
27167
27189
  echo " enable [endpoint] Enable OTEL (default: http://localhost:4318)"
27168
27190
  echo " disable Disable OTEL for current project"
27169
- echo " on Opt in to anonymous diagnostics (off by default)"
27191
+ echo " on Opt in explicitly to anonymous diagnostics"
27170
27192
  echo " off Opt out of all anonymous diagnostics (telemetry + crash)"
27171
27193
  echo " start Alias for 'on' (persistent opt-in across all sessions)"
27172
27194
  echo " stop Alias for 'off' (persistent opt-out across all sessions)"
27173
27195
  echo " analytics on|off|status"
27174
27196
  echo " Opt in/out of build-outcome analytics (off by default)"
27175
27197
  echo ""
27176
- echo "Anonymous diagnostics are OFF by default. Nothing is collected or"
27177
- echo "sent unless you opt in. See docs/PRIVACY.md for the full disclosure."
27198
+ echo "Anonymous diagnostics are ON by default for individual interactive installs,"
27199
+ echo "and OFF in CI, enterprise, air-gapped and non-interactive contexts. An opt-out"
27200
+ echo "(loki telemetry off, LOKI_TELEMETRY=off or DO_NOT_TRACK=1) always wins."
27201
+ echo "See docs/PRIVACY.md for the full disclosure."
27178
27202
  echo ""
27179
27203
  ;;
27180
27204
  *)
@@ -29829,7 +29853,7 @@ PYEOF
29829
29853
  ;;
29830
29854
 
29831
29855
  --help|-h|help)
29832
- echo -e "${BOLD}loki agent${NC} - Agent type dispatch (v6.7.0)"
29856
+ echo -e "${BOLD}loki agent${NC} - Agent type dispatch"
29833
29857
  echo ""
29834
29858
  echo "Usage: loki agent <command> [args]"
29835
29859
  echo ""
@@ -31506,7 +31530,7 @@ _docs_invoke_provider() {
31506
31530
  # not the workload that needs the top tier. Pinned to the same
31507
31531
  # default the review subcall uses (run.sh:13762), and overridable
31508
31532
  # for anyone who wants a different trade.
31509
- result=$($t_prefix env CAVEMAN_DEFAULT_MODE=off claude -p --model "${LOKI_DOCS_MODEL:-claude-sonnet-5}" "$prompt" 2>/dev/null) || exit_code=$?
31533
+ result=$($t_prefix env CAVEMAN_DEFAULT_MODE=off claude -p --model "${LOKI_DOCS_MODEL:-sonnet}" "$prompt" 2>/dev/null) || exit_code=$?
31510
31534
  ;;
31511
31535
  codex)
31512
31536
  result=$($t_prefix codex exec --sandbox workspace-write "$prompt" 2>/dev/null) || exit_code=$?
@@ -35029,7 +35053,7 @@ cmd_report_legacy() {
35029
35053
  while [[ $# -gt 0 ]]; do
35030
35054
  case "$1" in
35031
35055
  --help|-h)
35032
- echo -e "${BOLD}loki report${NC} - Session report generator (v6.27.0)"
35056
+ echo -e "${BOLD}loki report${NC} - Session report generator"
35033
35057
  echo ""
35034
35058
  echo "Usage: loki report [subcommand] [options]"
35035
35059
  echo ""
package/autonomy/run.sh CHANGED
@@ -7578,12 +7578,13 @@ _write_pricing_json() {
7578
7578
  "updated": "${updated}",
7579
7579
  "source": "static",
7580
7580
  "models": {
7581
- "fable": {"input": 10.00, "output": 50.00, "label": "Fable 5 (top, 2x Opus)", "provider": "claude"},
7582
- "claude-fable-5": {"input": 10.00, "output": 50.00, "label": "Fable 5 (top, 2x Opus)", "provider": "claude"},
7583
- "opus": {"input": 5.00, "output": 25.00, "label": "Opus (latest)", "provider": "claude"},
7584
- "sonnet": {"input": 2.00, "output": 10.00, "label": "Sonnet (latest)", "provider": "claude"},
7585
- "haiku": {"input": 1.00, "output": 5.00, "label": "Haiku (latest)", "provider": "claude"},
7586
- "claude-haiku-5-5": {"input": 0.10, "output": 0.50, "over_100k": {"input": 0.50, "output": 2.50}, "label": "Haiku 5.5", "provider": "claude"},
7581
+ "fable": {"input": 10.00, "output": 50.00, "cache_read": 0.25, "cache_write": 12.5, "cache_write_1h": 20, "label": "Fable 5 (top tier)", "provider": "claude"},
7582
+ "claude-fable-5": {"input": 10.00, "output": 50.00, "cache_read": 0.25, "cache_write": 12.5, "cache_write_1h": 20, "label": "Fable 5 (top tier)", "provider": "claude"},
7583
+ "opus": {"input": 4.00, "output": 20.00, "cache_read": 0.2, "cache_write": 5, "cache_write_1h": 8, "label": "Opus (latest)", "provider": "claude"},
7584
+ "sonnet": {"input": 2.00, "output": 10.00, "cache_read": 0.1, "cache_write": 2.5, "cache_write_1h": 4, "label": "Sonnet (latest)", "provider": "claude"},
7585
+ "haiku": {"input": 0.10, "output": 0.50, "cache_read": 0.01, "cache_write": 0.125, "cache_write_1h": 0.2, "over_100k": {"input": 0.50, "output": 2.50}, "label": "Haiku 5.5 (latest)", "provider": "claude"},
7586
+ "claude-haiku-4-5": {"input": 1.00, "output": 5.00, "cache_read": 0.1, "cache_write": 1.25, "cache_write_1h": 2, "label": "Haiku 4.5", "provider": "claude"},
7587
+ "claude-haiku-5-5": {"input": 0.10, "output": 0.50, "cache_read": 0.01, "cache_write": 0.125, "cache_write_1h": 0.2, "over_100k": {"input": 0.50, "output": 2.50}, "label": "Haiku 5.5", "provider": "claude"},
7587
7588
  "gpt-5.3-codex": {"input": 1.75, "output": 14.00, "label": "GPT-5.3 Codex", "provider": "codex"}
7588
7589
  }
7589
7590
  }
@@ -16425,7 +16426,7 @@ _dispatch_reviewer() {
16425
16426
  _crs_out="$(_loki_with_deadline "$_crs_cap" \
16426
16427
  "${_cr_provider_env[@]}" "$_crs_loki" internal sdk-judge \
16427
16428
  --prompt-file "$_crs_pf" --schema-file "$_crs_schema_file" \
16428
- --model "${LOKI_SDK_REVIEW_MODEL:-claude-sonnet-5}" --effort high \
16429
+ --model "${LOKI_SDK_REVIEW_MODEL:-sonnet}" --effort high \
16429
16430
  --timeout-ms "$(( _crs_to_s * 1000 ))")" || _crs_rc=$?
16430
16431
  _crs_invoked=true
16431
16432
  rm -f "$_crs_pf" 2>/dev/null || true
@@ -20248,15 +20249,20 @@ check_budget_limit() {
20248
20249
  import json, glob
20249
20250
  total = 0.0
20250
20251
  pricing = {
20251
- 'fable': {'input': 10.00, 'output': 50.00},
20252
- 'claude-fable-5': {'input': 10.00, 'output': 50.00},
20253
- 'opus': {'input': 5.00, 'output': 25.00},
20254
- 'sonnet': {'input': 2.00, 'output': 10.00},
20255
- 'haiku': {'input': 1.00, 'output': 5.00},
20252
+ 'fable': {'input': 10.00, 'output': 50.00, 'cache_read': 0.25, 'cache_write': 12.5, 'cache_write_1h': 20},
20253
+ 'claude-fable-5': {'input': 10.00, 'output': 50.00, 'cache_read': 0.25, 'cache_write': 12.5, 'cache_write_1h': 20},
20254
+ 'opus': {'input': 4.00, 'output': 20.00, 'cache_read': 0.2, 'cache_write': 5, 'cache_write_1h': 8},
20255
+ 'sonnet': {'input': 2.00, 'output': 10.00, 'cache_read': 0.1, 'cache_write': 2.5, 'cache_write_1h': 4},
20256
+ # haiku = Haiku 5.5 up to 100K prompt tokens (no over-100K tier in this gate)
20257
+ 'haiku': {'input': 0.10, 'output': 0.50, 'cache_read': 0.01, 'cache_write': 0.125, 'cache_write_1h': 0.2},
20258
+ # Exact ids: this dict is keyed by the recorded model string with a sonnet
20259
+ # fallback, so an id missing here is priced at sonnet (20x for Haiku 5.5).
20260
+ 'claude-haiku-4-5': {'input': 1.00, 'output': 5.00, 'cache_read': 0.1, 'cache_write': 1.25, 'cache_write_1h': 2},
20261
+ 'claude-haiku-5-5': {'input': 0.10, 'output': 0.50, 'cache_read': 0.01, 'cache_write': 0.125, 'cache_write_1h': 0.2},
20256
20262
  'gpt-5.3-codex': {'input': 1.75, 'output': 14.00},
20257
- 'gpt-5.6-sol': {'input': 2.50, 'output': 20.00},
20258
- 'gpt-5.6-terra': {'input': 1.50, 'output': 12.00},
20259
- 'gpt-5.6-luna': {'input': 0.50, 'output': 4.00},
20263
+ 'gpt-5.6-sol': {'input': 4.00, 'output': 20.00},
20264
+ 'gpt-5.6-terra': {'input': 2.00, 'output': 12.00},
20265
+ 'gpt-5.6-luna': {'input': 0.20, 'output': 1.20},
20260
20266
  }
20261
20267
  for f in glob.glob('${efficiency_dir}/*.json'):
20262
20268
  try:
@@ -20273,8 +20279,9 @@ for f in glob.glob('${efficiency_dir}/*.json'):
20273
20279
  # DOMINATE real traffic: a measured iteration carried 797,496
20274
20280
  # cache-read tokens against 10,272 of plain input. Pricing them at
20275
20281
  # zero under-counted a real iteration 5.4x, so a breaker set to
20276
- # stop a runaway let it run far past the cap. Published multipliers:
20277
- # cache read 0.1x input, cache write 1.25x input.
20282
+ # stop a runaway let it run far past the cap. Rates come from the
20283
+ # table row (cache read is 0.05x on Opus 5.5 / Sonnet 5.5, 0.025x
20284
+ # on Fable 5.1, 0.1x elsewhere); rows without them use 0.1x / 1.25x.
20278
20285
  #
20279
20286
  # This mirrors the TS route's calculateCostFromRecords
20280
20287
  # (loki-ts/src/runner/budget.ts). Both routes must agree or the
@@ -20282,7 +20289,7 @@ for f in glob.glob('${efficiency_dir}/*.json'):
20282
20289
  cr = d.get('cache_read_tokens', 0) or 0
20283
20290
  cw = d.get('cache_creation_tokens', 0) or 0
20284
20291
  total += (inp / 1_000_000) * p['input'] + (out / 1_000_000) * p['output']
20285
- total += (cr / 1_000_000) * (p['input'] * 0.1) + (cw / 1_000_000) * (p['input'] * 1.25)
20292
+ total += (cr / 1_000_000) * p.get('cache_read', p['input'] * 0.1) + (cw / 1_000_000) * p.get('cache_write', p['input'] * 1.25)
20286
20293
  except: pass
20287
20294
  print(round(total, 4))
20288
20295
  " 2>/dev/null || echo "0")
@@ -28817,6 +28824,11 @@ main() {
28817
28824
  REMAINING_ARGS=()
28818
28825
  while [[ $# -gt 0 ]]; do
28819
28826
  case "$1" in
28827
+ --attempts|--attempts=*)
28828
+ # T5-D2: run.sh is the legacy loop; attempts run only on the engine10 path.
28829
+ echo "run.sh: --attempts is only supported by 'loki start --attempts N --no-pr' (the Loki 10 engine), not the legacy loop." >&2
28830
+ exit 2
28831
+ ;;
28820
28832
  --parallel)
28821
28833
  PARALLEL_MODE=true
28822
28834
  shift
@@ -279,7 +279,7 @@ check_docker() {
279
279
  }
280
280
 
281
281
  build_sandbox_image() {
282
- local dockerfile="$SKILL_DIR/Dockerfile.sandbox"
282
+ local dockerfile="$SKILL_DIR/docker/Dockerfile.sandbox"
283
283
 
284
284
  if [[ ! -f "$dockerfile" ]]; then
285
285
  log_error "Sandbox Dockerfile not found at $dockerfile"
package/autonomy/tui.sh CHANGED
@@ -390,16 +390,17 @@ display_token_cost() {
390
390
  local input_tokens="$2"
391
391
  local output_tokens="$3"
392
392
 
393
- # Pricing per 1M tokens (March 2026 rates)
393
+ # Pricing per 1M tokens (2026-10-08 rates, loki-ts/data/model-pricing.json)
394
394
  local input_rate=0
395
395
  local output_rate=0
396
396
  case "$model" in
397
- *opus*) input_rate=15.0; output_rate=75.0 ;;
398
- *sonnet*) input_rate=3.0; output_rate=15.0 ;;
399
- *haiku*) input_rate=0.25; output_rate=1.25 ;;
397
+ *opus*) input_rate=4.0; output_rate=20.0 ;;
398
+ *sonnet*) input_rate=2.0; output_rate=10.0 ;;
399
+ # Haiku 5.5 up to 100K prompt tokens (no over-100K tier here)
400
+ *haiku*) input_rate=0.10; output_rate=0.50 ;;
400
401
  *gpt-4o-mini*) input_rate=0.15; output_rate=0.6 ;;
401
402
  *gpt-4o*) input_rate=2.5; output_rate=10.0 ;;
402
- *) input_rate=3.0; output_rate=15.0 ;; # default sonnet-like
403
+ *) input_rate=2.0; output_rate=10.0 ;; # default sonnet-like
403
404
  esac
404
405
 
405
406
  local input_cost
@@ -207,7 +207,7 @@ _verify_llm_review() {
207
207
  }
208
208
  SCHEMA
209
209
 
210
- model="${LOKI_VERIFY_LLM_MODEL:-claude-sonnet-5}"
210
+ model="${LOKI_VERIFY_LLM_MODEL:-sonnet}"
211
211
  local to_s="${LOKI_VERIFY_LLM_TIMEOUT_S:-120}"
212
212
  local wrap=""
213
213
  if command -v timeout >/dev/null 2>&1; then wrap="timeout $(( to_s + 15 ))"