loki-mode 9.18.4 → 9.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/SKILL.md +2 -2
  2. package/VERSION +1 -1
  3. package/autonomy/lib/deadline.py +21 -1
  4. package/autonomy/lib/outcome_contract.py +128 -0
  5. package/autonomy/lib/proof-generator.py +45 -0
  6. package/autonomy/lib/proof-verify.py +53 -0
  7. package/autonomy/loki +980 -24
  8. package/autonomy/receipt_jwt.py +308 -0
  9. package/autonomy/run.sh +30 -0
  10. package/autonomy/trigger-server.py +186 -1
  11. package/dashboard/__init__.py +1 -1
  12. package/dashboard/server.py +83 -0
  13. package/dashboard/static/index.html +144 -0
  14. package/docs/COMPETITIVE-SCORECARD.md +76 -0
  15. package/docs/PROOF-PASSPORT.md +29 -0
  16. package/docs/SIGNED-RECEIPTS.md +111 -0
  17. package/docs/metrics.md +32 -0
  18. package/events/emit.sh +31 -0
  19. package/loki-ts/dist/loki.js +2 -2
  20. package/mcp/__init__.py +1 -1
  21. package/package.json +1 -1
  22. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  23. package/tools/proof-passport.py +175 -0
  24. package/web-app/dist/assets/{AdminPage-CcCJ0Sjt.js → AdminPage-DNGNuAge.js} +1 -1
  25. package/web-app/dist/assets/{Avatar-DK8kmayw.js → Avatar-CqAveJaT.js} +1 -1
  26. package/web-app/dist/assets/{Badge-4uAWnemi.js → Badge-BtMejA0Z.js} +1 -1
  27. package/web-app/dist/assets/{Button-BBMk33tk.js → Button-CikxmqSs.js} +1 -1
  28. package/web-app/dist/assets/{ComparePage-bt9rwvST.js → ComparePage-BB8DJBWR.js} +1 -1
  29. package/web-app/dist/assets/EvidenceReceiptPanel-6oquKEjd.js +1 -0
  30. package/web-app/dist/assets/{GitHubIssuesPanel-WDbH47UM.js → GitHubIssuesPanel-5XLYWzWH.js} +1 -1
  31. package/web-app/dist/assets/{GitHubPRsPanel-C2CiYtTx.js → GitHubPRsPanel-DUfmFYeu.js} +1 -1
  32. package/web-app/dist/assets/{HomePage-BQk-MUjn.js → HomePage-DZ4MmOdH.js} +5 -5
  33. package/web-app/dist/assets/{LoginPage-DMOZVGGL.js → LoginPage-VMzI6ROD.js} +1 -1
  34. package/web-app/dist/assets/{MagicPage-Bzp2Nt1z.js → MagicPage-CFbX5gWg.js} +1 -1
  35. package/web-app/dist/assets/{MetricsPage-C39JVdsw.js → MetricsPage-DbL6xmRQ.js} +2 -2
  36. package/web-app/dist/assets/{NotFoundPage-6vT_U9UL.js → NotFoundPage-BUrjXPAR.js} +1 -1
  37. package/web-app/dist/assets/{ProjectPage-BfFcZp-E.js → ProjectPage-iP6dJihg.js} +3 -3
  38. package/web-app/dist/assets/{ProjectsPage-CPMBf8Wt.js → ProjectsPage-BibN9bHl.js} +1 -1
  39. package/web-app/dist/assets/{SettingsPage-BnNN6ETl.js → SettingsPage-C0WJp1hW.js} +1 -1
  40. package/web-app/dist/assets/{ShowcasePage-WDrMf-cx.js → ShowcasePage-DUv0Njp8.js} +1 -1
  41. package/web-app/dist/assets/{SystemSettingsPage-DX4jb2e8.js → SystemSettingsPage-BIaCB0Vn.js} +1 -1
  42. package/web-app/dist/assets/{TeamsPage-BCfqcXzu.js → TeamsPage-BE0szv9r.js} +1 -1
  43. package/web-app/dist/assets/{TemplatesPage-CZvmimDj.js → TemplatesPage-BzkA9kat.js} +1 -1
  44. package/web-app/dist/assets/{TerminalOutput-BlRqFwWV.js → TerminalOutput-DBrdT_Fp.js} +1 -1
  45. package/web-app/dist/assets/{activity-CacZsUyr.js → activity-AbfFz38r.js} +1 -1
  46. package/web-app/dist/assets/{bell-DK2qtHnk.js → bell-DF6Z6y5U.js} +1 -1
  47. package/web-app/dist/assets/{bot-CkcUtHad.js → bot-DQ4np_3n.js} +1 -1
  48. package/web-app/dist/assets/{check-CbCPjX3M.js → check-RWuguCwE.js} +1 -1
  49. package/web-app/dist/assets/{chevron-left-5NUKWw3i.js → chevron-left-VpbQPOkC.js} +1 -1
  50. package/web-app/dist/assets/{circle-alert-S7uFoxC2.js → circle-alert-DwT82lJx.js} +1 -1
  51. package/web-app/dist/assets/{clock-CaQRrIrs.js → clock-BBlUa93G.js} +1 -1
  52. package/web-app/dist/assets/{cloud-DBAX6c0r.js → cloud-Dgbz3VCA.js} +1 -1
  53. package/web-app/dist/assets/{code-xml-De5-EXv3.js → code-xml-r6qqION5.js} +1 -1
  54. package/web-app/dist/assets/{copy-CUkT6k1v.js → copy-DMHj52B8.js} +1 -1
  55. package/web-app/dist/assets/{database-BAWf1Gwt.js → database-uJqHSHR1.js} +1 -1
  56. package/web-app/dist/assets/{dollar-sign-Ji8zk86R.js → dollar-sign-BZagljek.js} +1 -1
  57. package/web-app/dist/assets/{file-code-corner-ChtXoBwS.js → file-code-corner-DMopmhu0.js} +1 -1
  58. package/web-app/dist/assets/{file-plus-bFa37P76.js → file-plus-DU_hT_3w.js} +1 -1
  59. package/web-app/dist/assets/{folder-open-DhXpXscO.js → folder-open-BP5TtQAW.js} +1 -1
  60. package/web-app/dist/assets/{git-commit-horizontal-DVPeDQ3j.js → git-commit-horizontal-zFk_IobS.js} +1 -1
  61. package/web-app/dist/assets/{globe-BPZgPeeu.js → globe-mthCRtfp.js} +1 -1
  62. package/web-app/dist/assets/{hammer-jLCaujYH.js → hammer-BWaLBvSA.js} +1 -1
  63. package/web-app/dist/assets/{index-B-0iHBPO.js → index-BXA3UT6P.js} +3 -3
  64. package/web-app/dist/assets/{index-BfZSDej1.css → index-DgpUuqwR.css} +1 -1
  65. package/web-app/dist/assets/{layers-B1vsrsFW.js → layers-Q1LXV5fy.js} +1 -1
  66. package/web-app/dist/assets/{lightbulb-C-uLoq9Y.js → lightbulb-vRRNJ3dB.js} +1 -1
  67. package/web-app/dist/assets/{loader-circle-JTfD-ZuM.js → loader-circle-KgjeHEcV.js} +1 -1
  68. package/web-app/dist/assets/{lock-G9rxD4gZ.js → lock-BerKqno7.js} +1 -1
  69. package/web-app/dist/assets/{mail-BJ0PTN_V.js → mail-XAxTbprX.js} +1 -1
  70. package/web-app/dist/assets/{package-CXClfLOO.js → package-DLPKWAvW.js} +1 -1
  71. package/web-app/dist/assets/{plus-EoL5OCB7.js → plus-NMxxwHMn.js} +1 -1
  72. package/web-app/dist/assets/{refresh-cw-BjREUnVq.js → refresh-cw-Dt42kYtM.js} +1 -1
  73. package/web-app/dist/assets/{rotate-ccw-DahWX07H.js → rotate-ccw-BCR4Tp9u.js} +1 -1
  74. package/web-app/dist/assets/{save-Dek3gCn1.js → save-sR4MJd42.js} +1 -1
  75. package/web-app/dist/assets/{server-D6V1BAia.js → server-SXkchokx.js} +1 -1
  76. package/web-app/dist/assets/{shield-alert-BtTK5Sxb.js → shield-alert-Bvgp6_Dz.js} +1 -1
  77. package/web-app/dist/assets/{trash-2-BT5o_g0r.js → trash-2-D0IGudH7.js} +1 -1
  78. package/web-app/dist/assets/{trending-down-D4Jk7KF3.js → trending-down-BbFFBq-v.js} +1 -1
  79. package/web-app/dist/assets/{trending-up-EQFTzhEo.js → trending-up-DDrJKL5i.js} +1 -1
  80. package/web-app/dist/assets/{upload-JfI5lCSE.js → upload-C54rjN8K.js} +1 -1
  81. package/web-app/dist/assets/{usePolling-BnhPUuGd.js → usePolling-D7fw4YSM.js} +1 -1
  82. package/web-app/dist/assets/{user-DSUiUYtj.js → user-Cg7fbzdh.js} +1 -1
  83. package/web-app/dist/index.html +2 -2
  84. package/web-app/server.py +78 -0
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-B-0iHBPO.js";/**
1
+ import{c as e}from"./index-BXA3UT6P.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 a}from"./index-B-0iHBPO.js";/**
1
+ import{c as a}from"./index-BXA3UT6P.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 e}from"./index-B-0iHBPO.js";function m(s,u=2e3,a=!0){const[c,l]=e.useState(null),[f,o]=e.useState(null),[i,d]=e.useState(!0),r=e.useRef(!0),n=e.useCallback(async()=>{try{const t=await s();r.current&&(l(t),o(null))}catch(t){r.current&&o(t instanceof Error?t.message:"Unknown error")}finally{r.current&&d(!1)}},[s]);return e.useEffect(()=>{if(r.current=!0,!a)return;n();const t=setInterval(n,u);return()=>{r.current=!1,clearInterval(t)}},[n,u,a]),{data:c,error:f,loading:i,refresh:n}}export{m as u};
1
+ import{r as e}from"./index-BXA3UT6P.js";function m(s,u=2e3,a=!0){const[c,l]=e.useState(null),[f,o]=e.useState(null),[i,d]=e.useState(!0),r=e.useRef(!0),n=e.useCallback(async()=>{try{const t=await s();r.current&&(l(t),o(null))}catch(t){r.current&&o(t instanceof Error?t.message:"Unknown error")}finally{r.current&&d(!1)}},[s]);return e.useEffect(()=>{if(r.current=!0,!a)return;n();const t=setInterval(n,u);return()=>{r.current=!1,clearInterval(t)}},[n,u,a]),{data:c,error:f,loading:i,refresh:n}}export{m as u};
@@ -1,4 +1,4 @@
1
- import{c}from"./index-B-0iHBPO.js";/**
1
+ import{c}from"./index-BXA3UT6P.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -7,8 +7,8 @@
7
7
  <link rel="preconnect" href="https://fonts.googleapis.com">
8
8
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
9
  <link href="https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
10
- <script type="module" crossorigin src="/lab/assets/index-B-0iHBPO.js"></script>
11
- <link rel="stylesheet" crossorigin href="/lab/assets/index-BfZSDej1.css">
10
+ <script type="module" crossorigin src="/lab/assets/index-BXA3UT6P.js"></script>
11
+ <link rel="stylesheet" crossorigin href="/lab/assets/index-DgpUuqwR.css">
12
12
  </head>
13
13
  <body class="bg-background text-ink font-sans antialiased">
14
14
  <div id="root"></div>
package/web-app/server.py CHANGED
@@ -8628,6 +8628,84 @@ async def docs_get_file(session_id: str, filename: str) -> Response:
8628
8628
  return Response(content=content, media_type="text/markdown")
8629
8629
 
8630
8630
 
8631
+ # ---------------------------------------------------------------------------
8632
+ # Evidence Receipts.
8633
+ #
8634
+ # MUST be declared ABOVE the SPA catch-all below, or these return text/html
8635
+ # instead of JSON -- the exact v7.6.0 bug documented there, which silently
8636
+ # swallowed 22 API routes.
8637
+ #
8638
+ # The EvidenceReceiptPanel calls these. Without them `loki web` (port 57375)
8639
+ # rendered "Could not load receipts" for every user while the identical panel
8640
+ # worked against the dashboard on 57374, because only the dashboard defined
8641
+ # /api/proofs. Found by driving the built bundle in a real browser -- a unit
8642
+ # test against a stubbed fetch cannot see a route that does not exist.
8643
+ #
8644
+ # Delegates to dashboard.server's readers rather than reimplementing the
8645
+ # traversal guards and the honesty bucketing. Two implementations of "which
8646
+ # receipts exist" WILL drift, and a verification surface that disagrees with
8647
+ # itself is worse than one that is merely missing.
8648
+ # ---------------------------------------------------------------------------
8649
+ def _dashboard_proofs_module():
8650
+ """Import the dashboard's proof readers, or None if unavailable."""
8651
+ try:
8652
+ import sys as _sys
8653
+ _root = str(SCRIPT_DIR.parent)
8654
+ if _root not in _sys.path:
8655
+ _sys.path.insert(0, _root)
8656
+ from dashboard import server as _dash # type: ignore
8657
+ return _dash
8658
+ except Exception:
8659
+ return None
8660
+
8661
+
8662
+ @app.get("/api/proofs")
8663
+ async def webapp_list_proofs() -> Response:
8664
+ """List Evidence Receipts. Mirrors the dashboard's /api/proofs exactly."""
8665
+ dash = _dashboard_proofs_module()
8666
+ if dash is None:
8667
+ # An honest empty list, not a 500: a missing dashboard package means we
8668
+ # cannot read receipts, and the panel's own empty state explains that
8669
+ # none were found. A 500 would render as a scary error for what is a
8670
+ # normal partial install.
8671
+ return JSONResponse(content={"proofs": []})
8672
+ try:
8673
+ return JSONResponse(content=await dash.list_proofs())
8674
+ except Exception as e:
8675
+ return JSONResponse(status_code=500, content={"error": str(e)})
8676
+
8677
+
8678
+ @app.get("/api/proofs/summary")
8679
+ async def webapp_proofs_summary() -> Response:
8680
+ """Verdict distribution across receipts. Mirrors the dashboard endpoint."""
8681
+ dash = _dashboard_proofs_module()
8682
+ if dash is None:
8683
+ return JSONResponse(content={
8684
+ "total_receipts": 0, "verified": 0, "with_gaps": 0,
8685
+ "not_verified": 0, "unknown": 0,
8686
+ })
8687
+ try:
8688
+ return JSONResponse(content=await dash.proofs_summary())
8689
+ except Exception as e:
8690
+ return JSONResponse(status_code=500, content={"error": str(e)})
8691
+
8692
+
8693
+ @app.get("/api/proofs/{run_id}")
8694
+ async def webapp_get_proof(run_id: str) -> Response:
8695
+ """One receipt. The dashboard reader enforces the path-traversal guard."""
8696
+ dash = _dashboard_proofs_module()
8697
+ if dash is None:
8698
+ return JSONResponse(status_code=404, content={"error": "proofs unavailable"})
8699
+ try:
8700
+ return await dash.get_proof(run_id)
8701
+ except Exception as e:
8702
+ # HTTPException carries its own status (404 for an unknown run id);
8703
+ # anything else is a genuine read failure.
8704
+ status = getattr(e, "status_code", 500)
8705
+ detail = getattr(e, "detail", str(e))
8706
+ return JSONResponse(status_code=status, content={"error": detail})
8707
+
8708
+
8631
8709
  # ---------------------------------------------------------------------------
8632
8710
  # SPA catch-all (MUST be last @app route -- see comment at the old serve_spa
8633
8711
  # location higher in this file). Any path that isn't matched by a specific