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.
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/lib/deadline.py +21 -1
- package/autonomy/lib/outcome_contract.py +128 -0
- package/autonomy/lib/proof-generator.py +45 -0
- package/autonomy/lib/proof-verify.py +53 -0
- package/autonomy/loki +980 -24
- package/autonomy/receipt_jwt.py +308 -0
- package/autonomy/run.sh +30 -0
- package/autonomy/trigger-server.py +186 -1
- package/dashboard/__init__.py +1 -1
- package/dashboard/server.py +83 -0
- package/dashboard/static/index.html +144 -0
- package/docs/COMPETITIVE-SCORECARD.md +76 -0
- package/docs/PROOF-PASSPORT.md +29 -0
- package/docs/SIGNED-RECEIPTS.md +111 -0
- package/docs/metrics.md +32 -0
- package/events/emit.sh +31 -0
- package/loki-ts/dist/loki.js +2 -2
- package/mcp/__init__.py +1 -1
- package/package.json +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/tools/proof-passport.py +175 -0
- package/web-app/dist/assets/{AdminPage-CcCJ0Sjt.js → AdminPage-DNGNuAge.js} +1 -1
- package/web-app/dist/assets/{Avatar-DK8kmayw.js → Avatar-CqAveJaT.js} +1 -1
- package/web-app/dist/assets/{Badge-4uAWnemi.js → Badge-BtMejA0Z.js} +1 -1
- package/web-app/dist/assets/{Button-BBMk33tk.js → Button-CikxmqSs.js} +1 -1
- package/web-app/dist/assets/{ComparePage-bt9rwvST.js → ComparePage-BB8DJBWR.js} +1 -1
- package/web-app/dist/assets/EvidenceReceiptPanel-6oquKEjd.js +1 -0
- package/web-app/dist/assets/{GitHubIssuesPanel-WDbH47UM.js → GitHubIssuesPanel-5XLYWzWH.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-C2CiYtTx.js → GitHubPRsPanel-DUfmFYeu.js} +1 -1
- package/web-app/dist/assets/{HomePage-BQk-MUjn.js → HomePage-DZ4MmOdH.js} +5 -5
- package/web-app/dist/assets/{LoginPage-DMOZVGGL.js → LoginPage-VMzI6ROD.js} +1 -1
- package/web-app/dist/assets/{MagicPage-Bzp2Nt1z.js → MagicPage-CFbX5gWg.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-C39JVdsw.js → MetricsPage-DbL6xmRQ.js} +2 -2
- package/web-app/dist/assets/{NotFoundPage-6vT_U9UL.js → NotFoundPage-BUrjXPAR.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-BfFcZp-E.js → ProjectPage-iP6dJihg.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-CPMBf8Wt.js → ProjectsPage-BibN9bHl.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-BnNN6ETl.js → SettingsPage-C0WJp1hW.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-WDrMf-cx.js → ShowcasePage-DUv0Njp8.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-DX4jb2e8.js → SystemSettingsPage-BIaCB0Vn.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-BCfqcXzu.js → TeamsPage-BE0szv9r.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-CZvmimDj.js → TemplatesPage-BzkA9kat.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-BlRqFwWV.js → TerminalOutput-DBrdT_Fp.js} +1 -1
- package/web-app/dist/assets/{activity-CacZsUyr.js → activity-AbfFz38r.js} +1 -1
- package/web-app/dist/assets/{bell-DK2qtHnk.js → bell-DF6Z6y5U.js} +1 -1
- package/web-app/dist/assets/{bot-CkcUtHad.js → bot-DQ4np_3n.js} +1 -1
- package/web-app/dist/assets/{check-CbCPjX3M.js → check-RWuguCwE.js} +1 -1
- package/web-app/dist/assets/{chevron-left-5NUKWw3i.js → chevron-left-VpbQPOkC.js} +1 -1
- package/web-app/dist/assets/{circle-alert-S7uFoxC2.js → circle-alert-DwT82lJx.js} +1 -1
- package/web-app/dist/assets/{clock-CaQRrIrs.js → clock-BBlUa93G.js} +1 -1
- package/web-app/dist/assets/{cloud-DBAX6c0r.js → cloud-Dgbz3VCA.js} +1 -1
- package/web-app/dist/assets/{code-xml-De5-EXv3.js → code-xml-r6qqION5.js} +1 -1
- package/web-app/dist/assets/{copy-CUkT6k1v.js → copy-DMHj52B8.js} +1 -1
- package/web-app/dist/assets/{database-BAWf1Gwt.js → database-uJqHSHR1.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-Ji8zk86R.js → dollar-sign-BZagljek.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-ChtXoBwS.js → file-code-corner-DMopmhu0.js} +1 -1
- package/web-app/dist/assets/{file-plus-bFa37P76.js → file-plus-DU_hT_3w.js} +1 -1
- package/web-app/dist/assets/{folder-open-DhXpXscO.js → folder-open-BP5TtQAW.js} +1 -1
- package/web-app/dist/assets/{git-commit-horizontal-DVPeDQ3j.js → git-commit-horizontal-zFk_IobS.js} +1 -1
- package/web-app/dist/assets/{globe-BPZgPeeu.js → globe-mthCRtfp.js} +1 -1
- package/web-app/dist/assets/{hammer-jLCaujYH.js → hammer-BWaLBvSA.js} +1 -1
- package/web-app/dist/assets/{index-B-0iHBPO.js → index-BXA3UT6P.js} +3 -3
- package/web-app/dist/assets/{index-BfZSDej1.css → index-DgpUuqwR.css} +1 -1
- package/web-app/dist/assets/{layers-B1vsrsFW.js → layers-Q1LXV5fy.js} +1 -1
- package/web-app/dist/assets/{lightbulb-C-uLoq9Y.js → lightbulb-vRRNJ3dB.js} +1 -1
- package/web-app/dist/assets/{loader-circle-JTfD-ZuM.js → loader-circle-KgjeHEcV.js} +1 -1
- package/web-app/dist/assets/{lock-G9rxD4gZ.js → lock-BerKqno7.js} +1 -1
- package/web-app/dist/assets/{mail-BJ0PTN_V.js → mail-XAxTbprX.js} +1 -1
- package/web-app/dist/assets/{package-CXClfLOO.js → package-DLPKWAvW.js} +1 -1
- package/web-app/dist/assets/{plus-EoL5OCB7.js → plus-NMxxwHMn.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-BjREUnVq.js → refresh-cw-Dt42kYtM.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-DahWX07H.js → rotate-ccw-BCR4Tp9u.js} +1 -1
- package/web-app/dist/assets/{save-Dek3gCn1.js → save-sR4MJd42.js} +1 -1
- package/web-app/dist/assets/{server-D6V1BAia.js → server-SXkchokx.js} +1 -1
- package/web-app/dist/assets/{shield-alert-BtTK5Sxb.js → shield-alert-Bvgp6_Dz.js} +1 -1
- package/web-app/dist/assets/{trash-2-BT5o_g0r.js → trash-2-D0IGudH7.js} +1 -1
- package/web-app/dist/assets/{trending-down-D4Jk7KF3.js → trending-down-BbFFBq-v.js} +1 -1
- package/web-app/dist/assets/{trending-up-EQFTzhEo.js → trending-up-DDrJKL5i.js} +1 -1
- package/web-app/dist/assets/{upload-JfI5lCSE.js → upload-C54rjN8K.js} +1 -1
- package/web-app/dist/assets/{usePolling-BnhPUuGd.js → usePolling-D7fw4YSM.js} +1 -1
- package/web-app/dist/assets/{user-DSUiUYtj.js → user-Cg7fbzdh.js} +1 -1
- package/web-app/dist/index.html +2 -2
- package/web-app/server.py +78 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./index-
|
|
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};
|
package/web-app/dist/index.html
CHANGED
|
@@ -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-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="/lab/assets/index-
|
|
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
|