loki-mode 11.17.71 → 11.17.72
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/dashboard/__init__.py +1 -1
- package/dashboard/api_start.py +1 -1
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/docs/v10/FAILURE-CLASSES.md +8 -0
- package/docs/v10/PROGRESS.md +3 -0
- package/loki-ts/dist/loki.js +1105 -1105
- package/mcp/__init__.py +1 -1
- package/mcp/tests/test_v10_tools.py +12 -0
- package/mcp/v10_tools.py +1 -1
- package/package.json +2 -2
- package/packages/control-plane/dist/ask-tools-server.js +6 -2
- package/packages/control-plane/dist/server.js +8 -3
- package/packages/control-plane/src/server/answer.ts +2 -1
- package/packages/control-plane/src/server/runs.ts +2 -2
- package/packages/control-plane/ui/dist/assets/{index-Dww-8G06.js → index-BJq1KhqJ.js} +1 -1
- package/packages/control-plane/ui/dist/index.html +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/web-app/dist/assets/{AdminPage-D9E5rMDa.js → AdminPage-q7AvWPmz.js} +1 -1
- package/web-app/dist/assets/{Avatar-2HIimGbJ.js → Avatar-DX0Ro-Kx.js} +1 -1
- package/web-app/dist/assets/{Badge-X1pm0Suj.js → Badge-B6aMP7ok.js} +1 -1
- package/web-app/dist/assets/{Button-D3JPQKEY.js → Button-B4ly42_O.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-yg3fHf13.js → CockpitPage-CUItj7z8.js} +1 -1
- package/web-app/dist/assets/{ComparePage-CZcaSHhK.js → ComparePage-BWnt4_MV.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-AbJVpUqd.js → ErrorBoundary-DRVM0zGG.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-c1YRf1qj.js → EvidenceReceiptPanel-DfO4dvGV.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-0wLSsoUy.js → GitHubIssuesPanel-DYZFX6o-.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-BhY2M87Z.js → GitHubPRsPanel-BgkAFMqI.js} +1 -1
- package/web-app/dist/assets/{HomePage-BGGhvITG.js → HomePage-CzJznn_a.js} +2 -2
- package/web-app/dist/assets/{LoginPage-SWb9qWEA.js → LoginPage-B_mZt6Sp.js} +1 -1
- package/web-app/dist/assets/{MagicPage-M8MSb7l_.js → MagicPage-Ls9c71fL.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-D_hgyPT5.js → MetricsPage-8lpb75g8.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-DACxcv9V.js → NotFoundPage-BaicmKYS.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-Crhlw7MG.js → ProjectPage-DxjqqFKI.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-Da-dndE0.js → ProjectsPage-DSMmh50F.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-DZVy9d-7.js → SettingsPage-B0cCvoM9.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-K549XnJu.js → ShowcasePage-BNxpthYk.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-BzYX8exp.js → SystemSettingsPage-CmTwMh5i.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-B-NFe-RU.js → TeamsPage-W9rWeLgb.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-B0rflxjJ.js → TemplatesPage-i3iRj6Gh.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-Cztmzbib.js → TerminalOutput-DcmUp7At.js} +1 -1
- package/web-app/dist/assets/{activity-D6OLvSTu.js → activity-CtB07gdy.js} +1 -1
- package/web-app/dist/assets/{bell-CEbcuu6k.js → bell-CW3mpbA-.js} +1 -1
- package/web-app/dist/assets/{bot-DvUoBtIi.js → bot-B-HD8ThU.js} +1 -1
- package/web-app/dist/assets/{check-k1SeYCYx.js → check-CIELTwXt.js} +1 -1
- package/web-app/dist/assets/{chevron-left-CeUTHzvt.js → chevron-left-e5Mb1gVD.js} +1 -1
- package/web-app/dist/assets/{circle-alert-C7qJ5LE9.js → circle-alert-CKqDQz6l.js} +1 -1
- package/web-app/dist/assets/{clock-2mey5blZ.js → clock-BTqJOjXa.js} +1 -1
- package/web-app/dist/assets/{cloud-DYOkaKXJ.js → cloud-BxntKOGA.js} +1 -1
- package/web-app/dist/assets/{code-xml-BrfSPBeq.js → code-xml-Dpfd5NCk.js} +1 -1
- package/web-app/dist/assets/{database-BT8Fq2mO.js → database-BbsI4cut.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-DxwW6pq5.js → dollar-sign-B8aOi92U.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-BFcn4EtI.js → file-code-corner-wC1AYauR.js} +1 -1
- package/web-app/dist/assets/{file-plus-Nxp-eviU.js → file-plus-Citl6qA-.js} +1 -1
- package/web-app/dist/assets/{globe-lrcCFaSs.js → globe-mDkZYUTR.js} +1 -1
- package/web-app/dist/assets/{hammer-6dyrHj_E.js → hammer-C2fVEIcT.js} +1 -1
- package/web-app/dist/assets/{index-CfG9cuZ-.js → index-jKPg1ndO.js} +3 -3
- package/web-app/dist/assets/{layers-Beh61xd-.js → layers-rwZFcMlR.js} +1 -1
- package/web-app/dist/assets/{loader-circle-BkQN4_tt.js → loader-circle-DeOuSCFS.js} +1 -1
- package/web-app/dist/assets/{lock-C614_wuJ.js → lock-DsCkUel5.js} +1 -1
- package/web-app/dist/assets/{package-4CpdKErA.js → package-DKnYDpLL.js} +1 -1
- package/web-app/dist/assets/{plus-FozAX8-T.js → plus-CM1HV1o9.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-DElhmy2T.js → refresh-cw-CjSls06A.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-BiqvSaHk.js → rotate-ccw-CBvpmOst.js} +1 -1
- package/web-app/dist/assets/{scroll-text-BTOP8eTS.js → scroll-text-B3UbaZ5b.js} +1 -1
- package/web-app/dist/assets/{server-D_hT6jF9.js → server-BUrmAE6N.js} +1 -1
- package/web-app/dist/assets/{shield-alert-UcwG-fFq.js → shield-alert-DkRN-hAa.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-CCBQEpsU.js → thumbs-up-zW7CQqpr.js} +1 -1
- package/web-app/dist/assets/{trash-2-CURJAi5R.js → trash-2-DpIfXzL9.js} +1 -1
- package/web-app/dist/assets/{trending-down-BoiOB4Qf.js → trending-down-YPIRE8kJ.js} +1 -1
- package/web-app/dist/assets/{trending-up-BhFeoKLJ.js → trending-up-B0rfGJk5.js} +1 -1
- package/web-app/dist/assets/{upload-Dm4LbLvG.js → upload-DP61hjp9.js} +1 -1
- package/web-app/dist/assets/{usePolling-Dt1olG1R.js → usePolling-DyVk1DpE.js} +1 -1
- package/web-app/dist/assets/{user-Dpu23ils.js → user-DABxdGCx.js} +1 -1
- package/web-app/dist/index.html +1 -1
package/mcp/__init__.py
CHANGED
|
@@ -153,6 +153,18 @@ class StatusTests(unittest.TestCase):
|
|
|
153
153
|
self.assertEqual(r["verdict"], "BLOCKED")
|
|
154
154
|
self.assertEqual(r["blocked_question"], "spec says A but tests say B")
|
|
155
155
|
|
|
156
|
+
def test_blocked_returns_fix_round_question(self):
|
|
157
|
+
ev = [
|
|
158
|
+
{"seq": 0, "type": "stage.completed", "stage": "implement", "data": {"exit": "done"}},
|
|
159
|
+
{"seq": 1, "type": "stage.completed", "stage": "fix",
|
|
160
|
+
"data": {"exit": "spec_conflict", "spec_conflict_reason": "test demands X but spec says Y"}},
|
|
161
|
+
{"seq": 2, "type": "run.completed", "stage": None, "data": {"verdict": "BLOCKED"}},
|
|
162
|
+
]
|
|
163
|
+
with tempfile.TemporaryDirectory() as repo:
|
|
164
|
+
_write_events(repo, "e10-blk2", ev)
|
|
165
|
+
r = v10_tools.v10_status("e10-blk2", repo, _ok)
|
|
166
|
+
self.assertEqual(r["blocked_question"], "test demands X but spec says Y")
|
|
167
|
+
|
|
156
168
|
def test_verified_has_no_blocked_question(self):
|
|
157
169
|
ev = [{"seq": 0, "type": "run.completed", "stage": None, "data": {"verdict": "VERIFIED"}}]
|
|
158
170
|
with tempfile.TemporaryDirectory() as repo:
|
package/mcp/v10_tools.py
CHANGED
|
@@ -140,7 +140,7 @@ def v10_status(run_id: str, repo_path: str, validate: Callable[[str], str]) -> d
|
|
|
140
140
|
open_stages[stage] = True
|
|
141
141
|
elif t in _TERMINAL:
|
|
142
142
|
open_stages.pop(stage, None)
|
|
143
|
-
if t == "stage.completed" and stage
|
|
143
|
+
if t == "stage.completed" and stage in ("implement", "fix") and isinstance(data.get("spec_conflict_reason"), str) and data["spec_conflict_reason"]: # mirror of conflictReasonOf (loki-ts/src/engine10/events.ts): a later fix reason overwrites implement's
|
|
144
144
|
question = re.sub(r"[\x00-\x1f\x7f]+", " ", data["spec_conflict_reason"])[:500]
|
|
145
145
|
if t == "run.completed":
|
|
146
146
|
done = True
|
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.
|
|
4
|
+
"version": "11.17.72",
|
|
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": "
|
|
163
|
+
"gitHead": "b44d6c14efa361b88db81c0cd70150b6f1e98636"
|
|
164
164
|
}
|
|
@@ -40965,6 +40965,10 @@ function fold(events2) {
|
|
|
40965
40965
|
f.cost.usd = sawCost && !unmeasured ? usd : null;
|
|
40966
40966
|
return f;
|
|
40967
40967
|
}
|
|
40968
|
+
var conflictReasonOf = (events2) => {
|
|
40969
|
+
const of = (s) => events2.findLast((e) => e.type === "stage.completed" && e.stage === s && typeof e.data["spec_conflict_reason"] === "string" && e.data["spec_conflict_reason"] !== "")?.data["spec_conflict_reason"];
|
|
40970
|
+
return of("fix") ?? of("implement");
|
|
40971
|
+
};
|
|
40968
40972
|
|
|
40969
40973
|
// ../../loki-ts/src/util/redact.ts
|
|
40970
40974
|
var B64 = (n) => new RegExp(`^[A-Za-z0-9_-]{${n}}$`);
|
|
@@ -40983,7 +40987,7 @@ function repoNames(db) {
|
|
|
40983
40987
|
function blockedQuestion(evs, verdict) {
|
|
40984
40988
|
if (verdict !== "SPEC_CONFLICT")
|
|
40985
40989
|
return null;
|
|
40986
|
-
const why = evs
|
|
40990
|
+
const why = conflictReasonOf(evs);
|
|
40987
40991
|
return (typeof why === "string" && why ? why : "the run is blocked on a spec conflict").replace(/[\x00-\x1f\x7f]+/g, " ").slice(0, 500);
|
|
40988
40992
|
}
|
|
40989
40993
|
|
|
@@ -41188,7 +41192,7 @@ var oneLine = (s, max) => s.replace(ANSI, "").replace(/[\x00-\x1f\x7f\s]+/g, " "
|
|
|
41188
41192
|
var OWN_RULES = /\bstage rules\b|\bstage-rules\b/i;
|
|
41189
41193
|
function stopReason(evs, verdict) {
|
|
41190
41194
|
if (verdict === "SPEC_CONFLICT") {
|
|
41191
|
-
const why = evs
|
|
41195
|
+
const why = conflictReasonOf(evs);
|
|
41192
41196
|
const text2 = typeof why === "string" ? oneLine(why, 4000) : "";
|
|
41193
41197
|
const first = text2.split(/(?<=[.!?])\s+(?=[A-Z])/)[0] ?? "";
|
|
41194
41198
|
const reason = `The run stopped on a spec conflict: ${first ? first.slice(0, 240) : "the task and the repository disagree"}`;
|
|
@@ -128,7 +128,10 @@ function partialCost(events2, tampered = false) {
|
|
|
128
128
|
}
|
|
129
129
|
return { measured, total, usd };
|
|
130
130
|
}
|
|
131
|
-
var isObj = (x) => typeof x === "object" && x !== null && !Array.isArray(x), ISO_TS, KEYS
|
|
131
|
+
var isObj = (x) => typeof x === "object" && x !== null && !Array.isArray(x), ISO_TS, KEYS, conflictReasonOf = (events2) => {
|
|
132
|
+
const of = (s) => events2.findLast((e) => e.type === "stage.completed" && e.stage === s && typeof e.data["spec_conflict_reason"] === "string" && e.data["spec_conflict_reason"] !== "")?.data["spec_conflict_reason"];
|
|
133
|
+
return of("fix") ?? of("implement");
|
|
134
|
+
};
|
|
132
135
|
var init_events = __esm(() => {
|
|
133
136
|
ISO_TS = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/;
|
|
134
137
|
KEYS = ["v", "seq", "ts", "run", "type", "stage", "data"];
|
|
@@ -9881,6 +9884,7 @@ var init_registry = () => {};
|
|
|
9881
9884
|
var init_output = __esm(() => {
|
|
9882
9885
|
init_registry();
|
|
9883
9886
|
init_redact();
|
|
9887
|
+
init_events();
|
|
9884
9888
|
init_types();
|
|
9885
9889
|
});
|
|
9886
9890
|
|
|
@@ -22958,6 +22962,7 @@ init_redact();
|
|
|
22958
22962
|
init_events();
|
|
22959
22963
|
|
|
22960
22964
|
// src/server/answer.ts
|
|
22965
|
+
init_events();
|
|
22961
22966
|
import { chmodSync, mkdirSync as mkdirSync2, writeFileSync } from "fs";
|
|
22962
22967
|
import { homedir as homedir2 } from "os";
|
|
22963
22968
|
import { join as join3 } from "path";
|
|
@@ -22967,7 +22972,7 @@ var defaultAnswerDir = (env = process.env) => env.LOKI_CONTROL_ANSWER_DIR || joi
|
|
|
22967
22972
|
function blockedQuestion(evs, verdict) {
|
|
22968
22973
|
if (verdict !== "SPEC_CONFLICT")
|
|
22969
22974
|
return null;
|
|
22970
|
-
const why = evs
|
|
22975
|
+
const why = conflictReasonOf(evs);
|
|
22971
22976
|
return (typeof why === "string" && why ? why : "the run is blocked on a spec conflict").replace(/[\x00-\x1f\x7f]+/g, " ").slice(0, 500);
|
|
22972
22977
|
}
|
|
22973
22978
|
function writeAnswer(dir, source, run, answer) {
|
|
@@ -23418,7 +23423,7 @@ var oneLine = (s, max) => s.replace(ANSI, "").replace(/[\x00-\x1f\x7f\s]+/g, " "
|
|
|
23418
23423
|
var OWN_RULES = /\bstage rules\b|\bstage-rules\b/i;
|
|
23419
23424
|
function stopReason(evs, verdict) {
|
|
23420
23425
|
if (verdict === "SPEC_CONFLICT") {
|
|
23421
|
-
const why = evs
|
|
23426
|
+
const why = conflictReasonOf(evs);
|
|
23422
23427
|
const text2 = typeof why === "string" ? oneLine(why, 4000) : "";
|
|
23423
23428
|
const first = text2.split(/(?<=[.!?])\s+(?=[A-Z])/)[0] ?? "";
|
|
23424
23429
|
const reason = `The run stopped on a spec conflict: ${first ? first.slice(0, 240) : "the task and the repository disagree"}`;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { chmodSync, mkdirSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import { join } from "node:path";
|
|
6
|
+
import { conflictReasonOf } from "../../../../loki-ts/src/engine10/events.ts";
|
|
6
7
|
import type { EventEnvelope } from "../../../../loki-ts/src/engine10/types.ts";
|
|
7
8
|
|
|
8
9
|
export const MAX_ANSWER = 4000;
|
|
@@ -14,7 +15,7 @@ export const defaultAnswerDir = (env: NodeJS.ProcessEnv = process.env): string =
|
|
|
14
15
|
/** The question a BLOCKED (spec conflict) run is waiting on, or null when it is not blocked. */
|
|
15
16
|
export function blockedQuestion(evs: EventEnvelope[], verdict: string | null): string | null {
|
|
16
17
|
if (verdict !== "SPEC_CONFLICT") return null;
|
|
17
|
-
const why = evs
|
|
18
|
+
const why = conflictReasonOf(evs);
|
|
18
19
|
return (typeof why === "string" && why ? why : "the run is blocked on a spec conflict").replace(/[\x00-\x1f\x7f]+/g, " ").slice(0, 500);
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { and, asc, desc, eq, gte, lt, sql } from "drizzle-orm";
|
|
2
|
-
import { fold, partialCost } from "../../../../loki-ts/src/engine10/events.ts";
|
|
2
|
+
import { conflictReasonOf, fold, partialCost } from "../../../../loki-ts/src/engine10/events.ts";
|
|
3
3
|
import type { EventEnvelope } from "../../../../loki-ts/src/engine10/types.ts";
|
|
4
4
|
import type { Db } from "../db/migrate.ts";
|
|
5
5
|
import { events, runs } from "../db/schema.ts";
|
|
@@ -151,7 +151,7 @@ const OWN_RULES = /\bstage rules\b|\bstage-rules\b/i;
|
|
|
151
151
|
/** The terminal stop reason as one ANSI-free sentence, from the run's own end (never from verify output); null when the run did not stop short. */
|
|
152
152
|
export function stopReason(evs: EventEnvelope[], verdict: string | null): { reason: string | null; ownRules: boolean } {
|
|
153
153
|
if (verdict === "SPEC_CONFLICT") {
|
|
154
|
-
const why = evs
|
|
154
|
+
const why = conflictReasonOf(evs);
|
|
155
155
|
const text = typeof why === "string" ? oneLine(why, 4000) : "";
|
|
156
156
|
const first = text.split(/(?<=[.!?])\s+(?=[A-Z])/)[0] ?? "";
|
|
157
157
|
const reason = `The run stopped on a spec conflict: ${first ? first.slice(0, 240) : "the task and the repository disagree"}`;
|
|
@@ -177,7 +177,7 @@ Error generating stack: `+n.message+`
|
|
|
177
177
|
|
|
178
178
|
`),c=o.pop()??"";for(const d of o){const m=d.split(`
|
|
179
179
|
`).filter(p=>p.startsWith("data:")).map(p=>p.slice(5).trim()).join("");if(!(!m||!/^event: event$/m.test(d)))try{r(JSON.parse(m))}catch{}}return c}async function qb(i,r,o,c,d){try{const m=await fetch(`${Of()}${Af(i,r)}/stream?after=${o()}`,{headers:{...Cf(),accept:"text/event-stream"},signal:d});if(!m.ok||!m.body)return;const p=m.body.getReader(),g=new TextDecoder;let b="";for(;;){const{done:v,value:R}=await p.read();if(v)return;b=Bb(b+g.decode(R,{stream:!0}),c)}}catch{}}const O0=i=>i&&typeof i=="object"?i:{},C0=i=>typeof i=="number"&&Number.isFinite(i)?i:null,ul=i=>typeof i=="string"&&i?i:null,af=i=>{const r=i?Date.parse(i):NaN;return Number.isNaN(r)?null:r};function $b(i){const r=[],o=new Map,c=new Map,d=new Map,m=new Set;for(const g of i){const b=O0(g.data),v=g.stage??"";if(g.type==="session.started"&&v&&m.add(v),g.type==="session.started"&&v&&ul(b.model)&&d.set(v,ul(b.model)),g.type==="cost"&&v){const R=c.get(v)??{usd:0,unmeasured:!1,seen:!1},y=C0(b.usd);R.seen=!0,y===null?R.unmeasured=!0:R.usd+=y,c.set(v,R),ul(b.model)&&!d.has(v)&&d.set(v,ul(b.model))}}const p=g=>{const b=c.get(g);return!b&&!m.has(g)&&!d.has(g)?"no-session":b&&b.seen&&!b.unmeasured?b.usd:null};for(const g of i){const b=O0(g.data);if(g.type==="run.started")r.push({key:`s${g.seq}`,ts:g.ts??null,kind:"run",label:"Run started",duration_s:null,model:ul(b.model),cost_usd:null,outcome:"started",detail:ul(b.issue_ref)??void 0});else if(g.type==="stage.started"&&g.stage){const v={key:`s${g.seq}`,ts:g.ts??null,kind:"stage",label:g.stage,duration_s:null,model:d.get(g.stage)??null,cost_usd:p(g.stage),outcome:"running",startedMs:af(g.ts)};o.set(g.stage,v),r.push(v)}else if((g.type==="stage.skipped"||g.type==="stage.failed")&&g.stage){const v=o.get(g.stage),R=ul(b.reason)??(g.type==="stage.skipped"?"no reason recorded":null),y=g.type==="stage.skipped"?"skipped":"failed";v?Object.assign(v,{outcome:y,detail:R??void 0,cost_usd:p(g.stage)}):r.push({key:`s${g.seq}`,ts:g.ts??null,kind:"stage",label:g.stage,duration_s:null,model:null,cost_usd:p(g.stage),outcome:y,detail:R??void 0}),o.delete(g.stage)}else if(g.type==="stage.completed"&&g.stage){const v=o.get(g.stage),R=C0(b.duration_s)??((v==null?void 0:v.startedMs)!=null&&af(g.ts)!=null?(af(g.ts)-v.startedMs)/1e3:null),y=ul(b.skipped_reason)??ul(b.reason),A=b.skipped===!0?"skipped":"completed",B=Array.isArray(b.files)?b.files.length:void 0;v?Object.assign(v,{duration_s:R,outcome:A,model:d.get(g.stage)??v.model,cost_usd:p(g.stage),detail:y??void 0,files:B}):r.push({key:`s${g.seq}`,ts:g.ts??null,kind:"stage",label:g.stage,duration_s:R,model:d.get(g.stage)??null,cost_usd:p(g.stage),outcome:A,detail:y??void 0,files:B}),o.delete(g.stage)}else g.type==="pr.opened"?r.push({key:`s${g.seq}`,ts:g.ts??null,kind:"pr",label:"Pull request opened",duration_s:null,model:null,cost_usd:null,outcome:b.draft===!0?"draft":"opened",detail:ul(b.url)??void 0}):g.type==="receipt.sealed"?r.push({key:`s${g.seq}`,ts:g.ts??null,kind:"receipt",label:"Receipt sealed",duration_s:null,model:null,cost_usd:null,outcome:b.signed===!0?"signed":"unsigned"}):g.type==="run.completed"&&r.push({key:`s${g.seq}`,ts:g.ts??null,kind:"verdict",label:"Run completed",duration_s:null,model:null,cost_usd:null,outcome:ul(b.verdict)??"no verdict"})}return r}const ve="unmeasured",Yb={intake:"Read the issue and its comments",plan:"Named the files and tests in scope",implement:"Edited the code in an isolated worktree",fix:"Fixed what the failing checks reported",verify:"Ran the repo tests against the change",commit:"Committed the change to the run branch",wall:"Wrote acceptance checks",seal:"Signed a receipt with the diff hash","deep-verify":"Full suite and secret scan after the PR opens"};function Vb(i){const r=i.detail?` (${i.detail})`:"";if(i.kind==="run")return`Run started${i.detail?` for ${i.detail}`:""}`;if(i.kind==="pr")return`Opened a ${i.outcome==="draft"?"draft ":""}pull request${r}`;if(i.kind==="receipt")return`Sealed the receipt, ${i.outcome}`;if(i.kind==="verdict")return`Run finished: ${i.outcome==="no verdict"?i.outcome:Ae(i.outcome).label}`;if(i.label==="wall"){if(i.outcome==="skipped")return"Wall skipped: no checks written";if(i.outcome==="completed"&&typeof i.files=="number")return`Wrote acceptance checks (${i.files} ${i.files===1?"file":"files"})`}const o=Yb[i.label]??`Stage ${i.label}`;return i.outcome==="failed"?`${o}: failed${r}`:i.outcome==="skipped"?`${o}: skipped${r}`:i.outcome==="running"?`${o}: in progress`:`${o}${r}`}function Gb(i){const r=i?Date.parse(i):NaN;return Number.isNaN(r)?null:new Date(r).toISOString().slice(11,19)}function Qb(i){const r=[];let o=null;for(const c of i.split(`
|
|
180
|
-
`)){const d=/^diff --git a\/(.+?) b\/(.+)$/.exec(c);if(d){o={path:d[2],added:0,removed:0,kind:"modified"},r.push(o);continue}if(o)if(c.startsWith("new file mode"))o.kind="added";else if(c.startsWith("deleted file mode"))o.kind="deleted";else{if(c.startsWith("+++")||c.startsWith("---"))continue;c.startsWith("+")?o.added++:c.startsWith("-")&&o.removed++}}return r}function Xb(i){const r=/^\s*\[([^\]]{1,40})\]\s*(.*)$/.exec(i);if(r)return{owner:r[1],text:r[2]};const o=/^(.*?)[\s,;(-]*\(?owner[:\s]+([A-Za-z0-9_@./-]{1,40})\)?\s*$/i.exec(i);return o?{owner:o[2],text:o[1]}:{owner:null,text:i}}function Zb(i){const r=i.length,o=i.some(d=>d.status==="started"),c=i.filter(d=>d.status!=="started").length;return{n:Math.min(r,c+(o?1:0)),m:r,running:o}}function bg(i){return typeof i!="number"?ve:i>=3600?`${Math.floor(i/3600)}h ${Math.floor(i%3600/60)}m`:i>=60?`${Math.floor(i/60)}m ${Math.floor(i%60)}s`:`${i.toFixed(1)}s`}function Kb(i,r){const o=i?Qb(i):[];return o.length?{files:o,source:"patch"}:r&&r.files.length?{files:r.files.map(c=>({...c,kind:"modified"})),source:"git"}:null}const Jb=i=>i&&typeof i=="object"?i:{},Qu=i=>typeof i=="string"&&i.trim()?i.trim():null,sf=(i,r=120)=>i.length>r?`${i.slice(0,r-3)}...`:i,Ib=/time ?limit|timed out|time budget|over cap/i;function Fb(i){const r=new Map,o=[];let c=0;for(const g of i){const b=Jb(g.data);if(g.type==="test.result"){const v=Qu(b.name);v&&r.set(v,{result:String(b.result??""),why:Qu(b.first_error)??Qu(b.reason)})}else if(g.type==="stage.completed"&&g.stage==="fix"&&b.killed===!0)c++;else if((g.type==="stage.failed"||g.type==="stage.skipped")&&g.stage){const v=Qu(b.reason);v&&g.stage!=="fix"?o.push(`${g.stage}: ${sf(v)}`):v&&Ib.test(v)&&c++}}const d=[],m=[...r].filter(([,g])=>g.result==="fail");m.length&&d.push(`verify: ${m.slice(0,3).map(([g,b])=>b.why?`${g} ${sf(b.why,90)}`:`${g} failed`).join("; ")}${m.length>3?`; ${m.length-3} more`:""}`);const p=[...r].filter(([,g])=>g.result==="not_run");!m.length&&p.length&&d.push(`verify: ${p.slice(0,3).map(([g,b])=>b.why?`${g} not run (${sf(b.why,60)})`:`${g} not run`).join("; ")}`);for(const g of o.slice(0,2))d.some(b=>b.includes(g))||d.push(g);return c&&d.push(`${c} fix round${c===1?"":"s"} hit time limits`),d.length?d.join("; "):null}const Ja=i=>i&&typeof i=="object"&&!Array.isArray(i)?i:{},Ia=i=>typeof i=="string"&&i.trim()?i.trim():null,ql=(i,r)=>{for(const o of r){const c=Ia(i[o]);if(c)return c}return null},Wb={pass:"pass",passed:"pass",ok:"pass",success:"pass",flaky:"pass",fail:"fail",failed:"fail",failure:"fail",error:"fail",not_run:"not_run",skipped:"not_run",skip:"not_run"},jg=i=>{const r=Ja(i),o=typeof i=="string"?i:Ia(r.result)??Ia(r.status)??Ia(r.outcome);return o?Wb[o.toLowerCase()]??null:null},Sg=i=>({total:i.length,pass:i.filter(r=>r==="pass").length,fail:i.filter(r=>r==="fail").length,notRun:i.filter(r=>r==="not_run").length});function Pb(i){if(!i)return null;let r;try{const g=JSON.parse(i);if(!g||typeof g!="object"||Array.isArray(g))return null;r=g}catch{return null}const o=Ja(r.git),c=Ja(r.diff),d=Array.isArray(r.checks)?r.checks:Array.isArray(r.tests)?r.tests:null,m=!d&&r.checks&&typeof r.checks=="object"?Object.values(Ja(r.checks)):null,p=d??m;return{verdict:ql(r,["verdict","result","outcome"]),diffSha:ql(r,["diff_sha256","diff_hash","diff_sha"])??ql(c,["sha256","hash"]),base:ql(r,["base_sha","base","base_commit"])??ql(o,["base","base_sha"]),head:ql(r,["head_sha","head","head_commit"])??ql(o,["head","head_sha"]),checks:p?Sg(p.map(jg)):null}}function tj(i){let r=null,o=null;const c=new Map;for(const d of i){const m=Ja(d.data);if(d.type==="stage.completed"&&d.stage==="commit"&&(r=ql(m,["head_sha"])??r),o=ql(m,["base_sha"])??o,d.type==="test.result"){const p=Ia(m.name);p&&c.set(p,jg(m))}}return{verdict:null,diffSha:null,base:o,head:r,checks:c.size?Sg([...c.values()]):null}}function ej(i,r){if(i===void 0)return{facts:{verdict:null,diffSha:null,base:null,head:null,checks:null},state:"loading"};const o=Pb(i);return o?{facts:o,state:"read"}:{facts:tj(r),state:"unreachable"}}function uf(i,r){return r==="read"?ve:r==="loading"?"loading":"receipt file not reachable from this Control Plane"}const lj="Loki's own rules stopped this run (fixed in 10.10.3). Retry on the latest version.";function rf(i){return Ae(i.verdict?sr(i)??i.verdict:null)}function nj(i){var c;const r=i.verdict?sr(i)??i.verdict:null;if(!r)return null;const o=(c=i.integrity_reasons)==null?void 0:c[0];return(r==="TAMPERED"||r==="UNVERIFIED")&&o?tr(`The receipt did not pass the integrity check: ${o}`):i.stop_reason?tr(i.stop_reason).replace(/\s+/g," ").trim():null}function aj(i){const r=i.
|
|
180
|
+
`)){const d=/^diff --git a\/(.+?) b\/(.+)$/.exec(c);if(d){o={path:d[2],added:0,removed:0,kind:"modified"},r.push(o);continue}if(o)if(c.startsWith("new file mode"))o.kind="added";else if(c.startsWith("deleted file mode"))o.kind="deleted";else{if(c.startsWith("+++")||c.startsWith("---"))continue;c.startsWith("+")?o.added++:c.startsWith("-")&&o.removed++}}return r}function Xb(i){const r=/^\s*\[([^\]]{1,40})\]\s*(.*)$/.exec(i);if(r)return{owner:r[1],text:r[2]};const o=/^(.*?)[\s,;(-]*\(?owner[:\s]+([A-Za-z0-9_@./-]{1,40})\)?\s*$/i.exec(i);return o?{owner:o[2],text:o[1]}:{owner:null,text:i}}function Zb(i){const r=i.length,o=i.some(d=>d.status==="started"),c=i.filter(d=>d.status!=="started").length;return{n:Math.min(r,c+(o?1:0)),m:r,running:o}}function bg(i){return typeof i!="number"?ve:i>=3600?`${Math.floor(i/3600)}h ${Math.floor(i%3600/60)}m`:i>=60?`${Math.floor(i/60)}m ${Math.floor(i%60)}s`:`${i.toFixed(1)}s`}function Kb(i,r){const o=i?Qb(i):[];return o.length?{files:o,source:"patch"}:r&&r.files.length?{files:r.files.map(c=>({...c,kind:"modified"})),source:"git"}:null}const Jb=i=>i&&typeof i=="object"?i:{},Qu=i=>typeof i=="string"&&i.trim()?i.trim():null,sf=(i,r=120)=>i.length>r?`${i.slice(0,r-3)}...`:i,Ib=/time ?limit|timed out|time budget|over cap/i;function Fb(i){const r=new Map,o=[];let c=0;for(const g of i){const b=Jb(g.data);if(g.type==="test.result"){const v=Qu(b.name);v&&r.set(v,{result:String(b.result??""),why:Qu(b.first_error)??Qu(b.reason)})}else if(g.type==="stage.completed"&&g.stage==="fix"&&b.killed===!0)c++;else if((g.type==="stage.failed"||g.type==="stage.skipped")&&g.stage){const v=Qu(b.reason);v&&g.stage!=="fix"?o.push(`${g.stage}: ${sf(v)}`):v&&Ib.test(v)&&c++}}const d=[],m=[...r].filter(([,g])=>g.result==="fail");m.length&&d.push(`verify: ${m.slice(0,3).map(([g,b])=>b.why?`${g} ${sf(b.why,90)}`:`${g} failed`).join("; ")}${m.length>3?`; ${m.length-3} more`:""}`);const p=[...r].filter(([,g])=>g.result==="not_run");!m.length&&p.length&&d.push(`verify: ${p.slice(0,3).map(([g,b])=>b.why?`${g} not run (${sf(b.why,60)})`:`${g} not run`).join("; ")}`);for(const g of o.slice(0,2))d.some(b=>b.includes(g))||d.push(g);return c&&d.push(`${c} fix round${c===1?"":"s"} hit time limits`),d.length?d.join("; "):null}const Ja=i=>i&&typeof i=="object"&&!Array.isArray(i)?i:{},Ia=i=>typeof i=="string"&&i.trim()?i.trim():null,ql=(i,r)=>{for(const o of r){const c=Ia(i[o]);if(c)return c}return null},Wb={pass:"pass",passed:"pass",ok:"pass",success:"pass",flaky:"pass",fail:"fail",failed:"fail",failure:"fail",error:"fail",not_run:"not_run",skipped:"not_run",skip:"not_run"},jg=i=>{const r=Ja(i),o=typeof i=="string"?i:Ia(r.result)??Ia(r.status)??Ia(r.outcome);return o?Wb[o.toLowerCase()]??null:null},Sg=i=>({total:i.length,pass:i.filter(r=>r==="pass").length,fail:i.filter(r=>r==="fail").length,notRun:i.filter(r=>r==="not_run").length});function Pb(i){if(!i)return null;let r;try{const g=JSON.parse(i);if(!g||typeof g!="object"||Array.isArray(g))return null;r=g}catch{return null}const o=Ja(r.git),c=Ja(r.diff),d=Array.isArray(r.checks)?r.checks:Array.isArray(r.tests)?r.tests:null,m=!d&&r.checks&&typeof r.checks=="object"?Object.values(Ja(r.checks)):null,p=d??m;return{verdict:ql(r,["verdict","result","outcome"]),diffSha:ql(r,["diff_sha256","diff_hash","diff_sha"])??ql(c,["sha256","hash"]),base:ql(r,["base_sha","base","base_commit"])??ql(o,["base","base_sha"]),head:ql(r,["head_sha","head","head_commit"])??ql(o,["head","head_sha"]),checks:p?Sg(p.map(jg)):null}}function tj(i){let r=null,o=null;const c=new Map;for(const d of i){const m=Ja(d.data);if(d.type==="stage.completed"&&d.stage==="commit"&&(r=ql(m,["head_sha"])??r),o=ql(m,["base_sha"])??o,d.type==="test.result"){const p=Ia(m.name);p&&c.set(p,jg(m))}}return{verdict:null,diffSha:null,base:o,head:r,checks:c.size?Sg([...c.values()]):null}}function ej(i,r){if(i===void 0)return{facts:{verdict:null,diffSha:null,base:null,head:null,checks:null},state:"loading"};const o=Pb(i);return o?{facts:o,state:"read"}:{facts:tj(r),state:"unreachable"}}function uf(i,r){return r==="read"?ve:r==="loading"?"loading":"receipt file not reachable from this Control Plane"}const lj="Loki's own rules stopped this run (fixed in 10.10.3). Retry on the latest version.";function rf(i){return Ae(i.verdict?sr(i)??i.verdict:null)}function nj(i){var c;const r=i.verdict?sr(i)??i.verdict:null;if(!r)return null;const o=(c=i.integrity_reasons)==null?void 0:c[0];return(r==="TAMPERED"||r==="UNVERIFIED")&&o?tr(`The receipt did not pass the integrity check: ${o}`):i.stop_reason?tr(i.stop_reason).replace(/\s+/g," ").trim():null}function aj(i){const r=m=>[...i].reverse().map(p=>p.type==="stage.completed"&&p.stage===m?Ia(Ja(p.data).spec_conflict_reason):null).find(p=>!!p)??null,o=r("fix")??r("implement"),c=Fb(i.map(m=>({type:m.type,stage:m.stage,data:m.data}))),d=[o,c].filter(m=>!!m);return d.length?d.join(`
|
|
181
181
|
|
|
182
182
|
`):null}const ij=ve,sj={good:"success",warn:"warning",bad:"error",neutral:"neutral"};function Wu({verdict:i,label:r,tone:o,testid:c}){const d=r?{label:r,tone:o??"neutral"}:Ae(i);return u.jsx(Bt,{tone:sj[d.tone],pulse:d.label==="Running","data-testid":c,style:{textTransform:"none",letterSpacing:0},children:d.label})}function A0(i){return i.token_sessions!=null&&i.total_sessions>0&&i.token_sessions<i.total_sessions?`partial: ${i.token_sessions} of ${i.total_sessions} sessions`:null}function uj(i){return i.cost_usd!==null&&i.cost_usd!==void 0?Ve(i.cost_usd):i.partial_usd?`at least ${Ve(i.partial_usd)} (${i.measured_sessions} of ${i.total_sessions} sessions measured)`:ij}function rj(i){const r=i.data,o=r==null?"":typeof r=="string"?r:JSON.stringify(r);return[i.type,i.stage,o.length>160?`${o.slice(0,160)}...`:o].filter(Boolean).join(" ")}function cj(i,r){const[o,c]=N.useState([]),d=N.useRef(-1);return N.useEffect(()=>{const m=new AbortController;d.current=-1;const p=g=>{const b=g.filter(v=>v.seq>d.current);b.length&&(d.current=b[b.length-1].seq,c(v=>[...v,...b].slice(-2e3)))};return(async()=>{for(p(await Lb(i,r));!m.signal.aborted;)await qb(i,r,()=>d.current,g=>p([g]),m.signal),m.signal.aborted||await new Promise(g=>setTimeout(g,3e3))})(),()=>m.abort()},[i,r]),o}function cf(i,r,o){const[c,d]=N.useState(void 0);return N.useEffect(()=>{let m=!0;return xg(i,r,o).then(p=>{m&&d(p)}),()=>{m=!1}},[i,r,o]),c}const yf={completed:"var(--cp-term-green)",running:"var(--cp-term-purple)",failed:"var(--cp-term-red)",skipped:"var(--cp-term-amber)"},oj=i=>yf[i==="started"?"running":i]??"var(--cp-term-dim)";function Za({color:i,pulse:r}){return u.jsx("span",{"aria-hidden":"true",className:r?"cp-pulse":void 0,style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:i,flexShrink:0}})}function fj({d:i}){return u.jsxs("aside",{className:"cp-term-side","data-testid":"run-stages","aria-label":"Stages",children:[u.jsx("div",{style:{color:"var(--cp-term-dim)",marginBottom:10,textTransform:"uppercase",letterSpacing:"0.12em",fontSize:10},children:"Stages"}),i.stages.length===0?u.jsx("div",{style:{color:"var(--cp-term-muted)"},children:"no stages recorded yet"}):null,i.stages.map((r,o)=>u.jsxs("div",{"data-testid":"run-stage","data-status":r.status,style:{display:"flex",alignItems:"center",gap:8,padding:"4px 0",color:r.status==="started"?"var(--cp-term-lilac)":"var(--cp-term-text)"},children:[u.jsx(Za,{color:oj(r.status),pulse:r.status==="started"}),u.jsx("span",{className:"cp-trunc",style:{flex:1},children:r.stage}),r.reason?u.jsx("span",{"data-testid":"run-stage-reason",className:"cp-trunc",style:{maxWidth:80,color:"var(--cp-term-muted)"},title:r.reason,children:r.reason}):r.status==="skipped"?u.jsx("span",{"data-testid":"run-stage-reason",style:{color:"var(--cp-term-muted)"},children:"no reason recorded"}):null]},`${r.stage}-${o}`))]})}function dj({events:i,awaiting:r}){const o=$b(i);return o.length===0?u.jsx("div",{"data-testid":"run-timeline",style:{color:"var(--cp-term-muted)",fontSize:12},children:r?"Waiting for the first event":"No events recorded for this run."}):u.jsx("ol",{"data-testid":"run-timeline","aria-live":"polite",style:{listStyle:"none",margin:0,padding:0},children:o.map(c=>{const d=c.kind==="stage";return u.jsxs("li",{className:"cp-tl-row","data-testid":"timeline-line","data-outcome":c.outcome,children:[u.jsx("span",{"data-testid":"tl-time",style:{fontFamily:"var(--cp-font-mono)",color:"var(--cp-term-dim)"},children:Gb(c.ts)??ve}),u.jsxs("span",{style:{display:"flex",alignItems:"flex-start",gap:6,fontFamily:"var(--cp-font-mono)",color:yf[c.outcome]??"var(--cp-term-lilac)"},children:[u.jsx("span",{style:{marginTop:6},children:u.jsx(Za,{color:yf[c.outcome]??"var(--cp-term-purple)",pulse:c.outcome==="running"})}),u.jsx("strong",{"data-testid":"tl-label",className:"cp-trunc",style:{fontWeight:500},children:c.label})]}),u.jsx("span",{"data-testid":"tl-desc",style:{color:"var(--cp-term-text)"},children:Vb(c)}),d?u.jsxs("span",{className:"cp-tl-meta",children:[u.jsx("span",{"data-testid":"tl-duration",children:typeof c.duration_s=="number"?bg(c.duration_s):c.outcome==="running"?"running":ve}),u.jsx("span",{"data-testid":"tl-model",children:c.model??(c.cost_usd==="no-session"?"-":ve)}),u.jsx("span",{"data-testid":"tl-cost",children:c.cost_usd==="no-session"?"-":c.cost_usd===null?ve:Ve(c.cost_usd)})]}):null]},c.key)})})}const hj={display:"flex",flexDirection:"column",gap:10};function li({title:i,meta:r,children:o,testid:c}){return u.jsxs(Qt,{"data-testid":c,style:hj,children:[u.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,flexWrap:"wrap"},children:[u.jsx("h2",{className:"cp-display",style:{margin:0,fontSize:18},children:i}),r?u.jsx("span",{style:{color:"var(--cp-text-muted)",fontSize:"var(--cp-text-base)"},children:r}):null]}),o]})}function mj({d:i,patch:r}){const o=Kb(r,i.diff_stat),c=i.files_touched??[],d=(o==null?void 0:o.files)??null,m=(d==null?void 0:d.reduce((v,R)=>v+(R.added??0),0))??0,p=(d==null?void 0:d.reduce((v,R)=>v+(R.removed??0),0))??0,g={added:["+","var(--cp-success-ink)"],deleted:["-","var(--cp-error-ink)"],modified:["~","var(--cp-warning-ink)"]},b=(v,R)=>v===null?"binary":`${R}${v}`;return u.jsx(li,{title:"Changed files",testid:"run-diff",meta:d&&d.length?`${d.length} files, +${m} -${p}${(o==null?void 0:o.source)==="git"?" (from the receipt's commit range)":""}`:c.length?`${c.length} files touched`:void 0,children:d&&d.length?u.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-base)"},children:d.map(v=>u.jsxs("li",{"data-testid":"changed-file",style:{display:"flex",gap:10,padding:"3px 0"},children:[u.jsx("span",{style:{color:g[v.kind][1],width:12},children:g[v.kind][0]}),u.jsx("span",{className:"cp-trunc",style:{flex:1},title:v.path,children:v.path}),u.jsx("span",{style:{color:"var(--cp-success-ink)"},children:b(v.added,"+")}),u.jsx("span",{style:{color:"var(--cp-error-ink)"},children:v.removed===null?"":b(v.removed,"-")})]},v.path))}):c.length?u.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-base)"},children:c.map(v=>u.jsxs("li",{"data-testid":"changed-file",className:"cp-trunc",title:v,children:[v," ",u.jsxs("span",{style:{color:"var(--cp-text-muted)"},children:["(line counts ",ve,")"]})]},v))}):u.jsx("span",{"data-testid":"changed-files-unmeasured",children:r===void 0?u.jsx(qt,{label:"Loading diff"}):`Changed files ${ve}: no diff or commit range could be read for this run.`})})}function Xa({k:i,children:r,testid:o}){return u.jsxs("div",{"data-testid":o,style:{display:"flex",gap:12,alignItems:"baseline",padding:"3px 0",borderBottom:"1px solid var(--cp-border)"},children:[u.jsx("span",{style:{width:120,flexShrink:0,color:"var(--cp-text-muted)"},children:i}),u.jsx("span",{style:{minWidth:0,overflowWrap:"anywhere"},children:r})]})}function pj({d:i,source:r,run:o,receipt:c,receiptJson:d,events:m}){var L,G,ct,I;const[p,g]=N.useState({busy:!1}),[b,v]=N.useState(!1),R=((L=i.receipt)==null?void 0:L.sha256)??null,{facts:y,state:A}=ej(d,m),B=async()=>{g({busy:!0});try{g({busy:!1,res:await yg(r,o)})}catch(et){g({busy:!1,error:et.message})}},Q=y.base??(A==="read"?null:((G=i.diff_stat)==null?void 0:G.base)??null),at=y.head??(A==="read"?null:((ct=i.diff_stat)==null?void 0:ct.head)??null),H=(et,Vt)=>et?et.slice(0,Vt):uf(null,A),Y=y.verdict??((I=i.receipt)==null?void 0:I.verdict)??null,tt=i.receipt?i.receipt.signed?i.sig_checked?"signed, signature checked":"signed, signature not checked":"unsigned":"no receipt sealed in the run's events",M=y.checks;return u.jsxs(li,{title:"Evidence and receipt",testid:"run-receipt",meta:R?`sha256 ${R.slice(0,16)}`:"no receipt",children:[u.jsxs("div",{"data-testid":"receipt-rows",style:{display:"flex",flexDirection:"column",fontSize:"var(--cp-text-base)"},children:[u.jsx(Xa,{k:"Verdict",testid:"rr-verdict",children:Y?`receipt says ${Ae(Y).label}`:uf(null,A)}),u.jsx(Xa,{k:"Diff hash",testid:"rr-diff",children:u.jsx("code",{title:y.diffSha??void 0,children:H(y.diffSha,16)})}),u.jsx(Xa,{k:"Base",testid:"rr-base",children:u.jsx("code",{title:Q??void 0,children:H(Q,12)})}),u.jsx(Xa,{k:"Head",testid:"rr-head",children:u.jsx("code",{title:at??void 0,children:H(at,12)})}),u.jsx(Xa,{k:"Signature",testid:"rr-sig",children:tt}),u.jsx(Xa,{k:"Checks run",testid:"rr-checks",children:M?M.total===0?"none recorded":`${M.total} run: ${M.pass} passed, ${M.fail} failed${M.notRun?`, ${M.notRun} not run`:""}`:uf(null,A)})]}),u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[u.jsxs(pt,{variant:"secondary",size:"sm","data-testid":"run-verify",disabled:!R||p.busy,onClick:()=>void B(),children:[u.jsx(V1,{size:13,"aria-hidden":"true"})," ",p.busy?"Verifying":"Verify"]}),u.jsx(pt,{variant:"ghost",size:"sm","data-testid":"receipt-raw-toggle","aria-pressed":b,onClick:()=>v(et=>!et),children:b?"Hide raw":"Show raw"}),R?null:u.jsx("span",{style:{color:"var(--cp-text-muted)"},children:"No receipt to verify."}),p.res?u.jsxs("span",{"data-testid":"run-verify-result",role:"status",children:[u.jsx(Wu,{verdict:p.res.verdict})," ",tr(p.res.reasons[0]??"")]}):null,p.error?u.jsx("span",{role:"alert","data-testid":"run-verify-error",style:{color:"var(--cp-error-ink)"},children:p.error}):null]}),b?c===void 0?u.jsx(qt,{label:"Loading receipt"}):c===null?u.jsx("div",{"data-testid":"receipt-raw",children:"Receipt text not available for this run."}):u.jsx("pre",{"data-testid":"receipt-raw",style:{margin:0,whiteSpace:"pre-wrap",fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-sm)",maxHeight:280,overflow:"auto",color:"var(--cp-text-2)"},children:c}):null]})}function gj({d:i}){return u.jsx(li,{title:"NOT PROVEN",testid:"run-not-proven",meta:i.not_proven.length?`${i.not_proven.length} item${i.not_proven.length===1?"":"s"}`:void 0,children:i.not_proven.length?u.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:8},children:i.not_proven.map((r,o)=>{const c=Xb(r);return u.jsxs("li",{"data-testid":"not-proven-item",style:{display:"flex",gap:10,alignItems:"flex-start",justifyContent:"space-between"},children:[u.jsx("span",{style:{minWidth:0},children:c.text}),c.owner?u.jsxs(Bt,{tone:"info","data-testid":"not-proven-owner",style:{flexShrink:0,textTransform:"none"},children:["owner: ",c.owner]}):null]},o)})}):u.jsx("span",{children:i.verdict?"Nothing listed as not proven.":"Not known until the run finishes."})})}function vj({source:i,run:r,question:o,onSent:c}){const[d,m]=N.useState(""),[p,g]=N.useState({busy:!1}),b=async()=>{g({busy:!0});try{await F0(i,r,d.trim()),g({busy:!1,sent:!0}),c()}catch(v){g({busy:!1,error:v.message})}};return u.jsxs(li,{title:"Needs your answer",testid:"run-reply-card",meta:u.jsx(w1,{size:16,"aria-hidden":"true"}),children:[u.jsx("div",{children:o}),u.jsxs("div",{"data-testid":"run-reply",style:{display:"flex",flexDirection:"column",gap:8},children:[u.jsx(lg,{"aria-label":"Your reply",rows:3,value:d,onChange:v=>m(v.target.value),disabled:p.busy||p.sent}),u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[u.jsx(pt,{onClick:b,disabled:!d.trim()||p.busy||p.sent,children:"Send reply"}),p.sent?u.jsx("span",{role:"status",children:"Reply saved. Resume the run to continue."}):null,p.error?u.jsx("span",{role:"alert",style:{color:"var(--cp-error-ink)"},children:p.error}):null]})]})]})}function yj({d:i}){let r;return i.pr_url?r=/^https?:\/\//.test(i.pr_url)?u.jsxs("a",{href:i.pr_url,target:"_blank",rel:"noreferrer",style:{color:"var(--cp-accent-ink)",wordBreak:"break-all"},children:[i.pr_url," ",u.jsx(Nf,{size:12,"aria-hidden":"true"})]}):u.jsx("span",{children:i.pr_url}):i.verdict?Ae(i.verdict).tone==="good"?r=u.jsxs("span",{children:["No PR opened ",ve,": the run recorded no PR address."]}):r=u.jsxs("span",{children:["No PR opened: the run ended as ",Ae(i.verdict).label.toLowerCase(),", and a PR opens only after the run verifies."]}):r=u.jsx("span",{children:"No PR yet: the run is still in progress."}),u.jsx(li,{title:"Pull request",testid:"run-pr",meta:i.pr_draft?"draft":void 0,children:u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[u.jsx(J0,{size:14,"aria-hidden":"true"}),r]})})}function xj({source:i,run:r,slot:o,renderSlot:c}){const[d,m]=N.useState(null),[p,g]=N.useState(null),[b,v]=N.useState(!1),[R,y]=N.useState(!1),[A,B]=N.useState({busy:!1}),[Q,at]=N.useState({busy:!1}),H=cj(i,r),Y=cf(i,r,"diff.patch"),tt=cf(i,r,"receipt.md"),M=cf(i,r,"receipt.json"),L=tt===void 0||M===void 0?void 0:tt??M,G=N.useCallback(()=>{ur(i,r).then(Z=>{m(Z),g(null)},Z=>g(Z.message))},[i,r]),ct=!d||d.status==="running"||d.verdict===null;if(N.useEffect(()=>{if(G(),!ct)return;const Z=setInterval(G,4e3);return()=>clearInterval(Z)},[G,ct]),p&&!d)return u.jsx(Tt,{title:"Run not available",hint:p});if(!d)return u.jsx(qt,{label:"Loading run"});const I=d.title??d.issue_ref??d.origin_repo??`Title ${ve}`,et=!!d.verdict&&rf(d).label==="Tampered",Vt=!!d.blocked_question&&!et,Dt=d.status==="running"||d.verdict===null&&!d.ended_at,Ht=Zb(d.stages),q=Dt?null:nj(d),Nt=q?aj(H):null,Xt=!Dt&&!et&&d.own_rules_block===!0,It=!Dt&&!!d.issue_ref,V=async()=>{B({busy:!0});try{await dg(i,r,"retry"),B({busy:!1,msg:"Retry started as a new run."}),G()}catch(Z){B({busy:!1,msg:Z.message,error:!0})}},lt=async()=>{at({busy:!0});try{await pg({target:d.issue_ref}),at({busy:!1,msg:"Started a new run."})}catch(Z){at({busy:!1,msg:Z.message,error:!0})}};return u.jsxs("section",{"data-testid":"run-thread",style:{maxWidth:1100,margin:"0 auto",padding:"8px 0 32px",display:"flex",flexDirection:"column",gap:20},children:[u.jsxs("header",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:12},children:[u.jsxs("div",{style:{flex:"1 1 320px",minWidth:0},children:[u.jsxs("div",{className:"cp-eyebrow",children:[d.origin_repo??d.source_id,d.issue_ref&&d.title?` / ${d.issue_ref}`:""]}),u.jsx("h1",{"data-testid":"run-title",className:"cp-display",style:{margin:"4px 0 0",fontSize:30,overflowWrap:"anywhere"},children:I})]}),Vt?u.jsx(Wu,{verdict:"BLOCKED",testid:"run-outcome"}):d.verdict?u.jsx(Wu,{label:rf(d).label,tone:rf(d).tone,testid:"run-outcome"}):u.jsx(Wu,{verdict:null,testid:"run-outcome"}),u.jsx("span",{"data-testid":"run-elapsed",style:{fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-base)"},children:bg(d.elapsed_s??d.wall_s)}),u.jsx("span",{"data-testid":"run-cost",style:{fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-base)"},children:uj(d)}),A0(d)&&u.jsxs("span",{"data-testid":"run-tokens-partial",style:{fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-sm, 12px)"},children:["tokens ",A0(d)]}),u.jsxs("span",{"data-testid":"run-header-slot",style:{display:"inline-flex",gap:8},children:[o,c?c(Xt?{...d,blocked_question:null}:d,G):null]}),c?null:u.jsxs(pt,{variant:Xt?"primary":"secondary",size:"sm","data-testid":"run-retry",disabled:!It||Q.busy,title:Dt?"The run is still in progress":d.issue_ref?"Start this issue again":`No issue reference recorded ${ve}`,onClick:()=>void lt(),children:[u.jsx(b0,{size:13,"aria-hidden":"true"})," Retry"]}),Q.msg?u.jsx("span",{role:Q.error?"alert":"status","data-testid":"run-retry-msg",style:{color:Q.error?"var(--cp-error-ink)":"var(--cp-text-2)",fontSize:"var(--cp-text-base)"},children:Q.msg}):null]}),Xt?u.jsxs(li,{title:"Loki's own rules stopped this run",testid:"run-own-rules",children:[u.jsx("p",{"data-testid":"run-own-rules-text",style:{margin:0},children:lj}),u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[u.jsxs(pt,{"data-testid":"run-own-rules-retry",disabled:A.busy,onClick:()=>void V(),children:[u.jsx(b0,{size:13,"aria-hidden":"true"})," Retry"]}),A.msg?u.jsx("span",{role:A.error?"alert":"status",style:{color:A.error?"var(--cp-error-ink)":"var(--cp-text-2)"},children:A.msg}):null]})]}):null,q&&!Xt?u.jsxs("div",{style:{margin:"-8px 0 0"},children:[u.jsxs("p",{"data-testid":"run-why",style:{margin:0,fontSize:"var(--cp-text-md)",color:"var(--cp-text-2)",overflowWrap:"anywhere"},children:[u.jsx("strong",{style:{color:"var(--cp-text)"},children:"Why:"})," ",q]}),Nt?u.jsx(pt,{variant:"ghost",size:"sm","data-testid":"run-why-raw-toggle","aria-pressed":R,onClick:()=>y(Z=>!Z),children:R?"Hide raw":"Show raw"}):null,R&&Nt?u.jsx("pre",{"data-testid":"run-why-raw",style:{margin:"6px 0 0",whiteSpace:"pre-wrap",overflowWrap:"anywhere",fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-sm)",maxHeight:280,overflow:"auto",color:"var(--cp-text-2)"},children:Nt}):null]}):null,Vt&&!Xt&&d.blocked_question?u.jsx(vj,{source:i,run:r,question:tr(d.blocked_question),onSent:G}):null,u.jsxs("div",{"data-testid":"run-summary",style:{display:"grid",gap:16,gridTemplateColumns:"repeat(auto-fit, minmax(min(100%, 440px), 1fr))",alignItems:"start"},children:[u.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,minWidth:0},children:[u.jsx(mj,{d,patch:Y}),u.jsx(pj,{d,source:i,run:r,receipt:L,receiptJson:M,events:H})]}),u.jsxs("div",{"data-testid":"run-aside",style:{display:"flex",flexDirection:"column",gap:16,minWidth:0},children:[u.jsx(gj,{d}),u.jsx(yj,{d})]})]}),u.jsxs("div",{className:"cp-term","data-testid":"run-panel",children:[u.jsxs("div",{className:"cp-term-bar",children:[u.jsxs("span",{style:{display:"inline-flex",gap:6},"aria-hidden":"true",children:[u.jsx(Za,{color:"#FF5F57"}),u.jsx(Za,{color:"#FEBC2E"}),u.jsx(Za,{color:"#28C840"})]}),u.jsxs("span",{className:"cp-trunc",children:["Control Plane / ",d.model??`model ${ve}`]}),u.jsx("span",{"data-testid":"run-active-stage",children:Dt?`now: ${d.current_stage??"starting"}`:d.provider??`provider ${ve}`})]}),u.jsxs("div",{className:"cp-term-body",children:[u.jsx(fj,{d}),u.jsx("div",{className:"cp-term-main",children:u.jsx(dj,{events:H,awaiting:Dt})})]}),u.jsxs("div",{className:"cp-term-foot",children:[u.jsx("span",{"data-testid":"run-progress",children:Ht.m?`stage ${Ht.n} / ${Ht.m}`:`stage ${ve}`}),Dt?u.jsxs("span",{"data-testid":"run-live",style:{display:"inline-flex",alignItems:"center",gap:8,color:"var(--cp-term-green)"},children:[u.jsx(Za,{color:"var(--cp-term-green)",pulse:!0})," live"]}):u.jsx("span",{"data-testid":"run-ended",children:d.ended_at?"run ended":`end time ${ve}`})]})]}),u.jsxs("div",{children:[u.jsx(pt,{variant:"ghost",size:"sm","data-testid":"run-raw-toggle","aria-pressed":b,onClick:()=>v(Z=>!Z),children:b?"Hide raw":"Show raw"}),b?u.jsxs("div",{"data-testid":"run-log",style:{marginTop:8},children:[u.jsx("pre",{"data-testid":"run-raw-json",style:{margin:0,padding:12,borderRadius:12,background:"var(--cp-term-bg)",color:"var(--cp-term-text)",fontFamily:"var(--cp-font-mono)",fontSize:11,maxHeight:360,overflow:"auto",whiteSpace:"pre-wrap"},children:JSON.stringify(d,null,2)}),u.jsx("div",{role:"log",style:{marginTop:8,maxHeight:280,overflow:"auto",fontFamily:"var(--cp-font-mono)",fontSize:11,color:"var(--cp-text-2)"},children:H.length===0?u.jsx("div",{children:"No events yet."}):H.map(Z=>u.jsx("div",{children:`${Z.seq} ${rj(Z)}`},Z.seq))})]}):null]})]})}function bj(){var r,o;const i=/\/runs?\/([^/]+)\/([^/?#]+)/.exec(((r=globalThis.location)==null?void 0:r.pathname)??"")??/#\/runs?\/([^/]+)\/([^/?#]+)/.exec(((o=globalThis.location)==null?void 0:o.hash)??"");return i?{source:decodeURIComponent(i[1]),run:decodeURIComponent(i[2])}:null}function jj({source:i,run:r,slot:o,renderSlot:c}){const d=i&&r?{source:i,run:r}:bj();return d?u.jsx(xj,{source:d.source,run:d.run,slot:o,renderSlot:c}):u.jsx(Tt,{title:"No run selected",hint:"Open a run from Home or Runs."})}const _g={id:"run",path:"/runs/:source/:run",title:"Run",component:jj},Eg="loki-theme",nr=new Set,Sj=()=>{try{const i=localStorage.getItem(Eg);return i==="light"||i==="dark"?i:null}catch{return null}},Tg=()=>{try{return typeof globalThis.matchMedia=="function"?globalThis.matchMedia("(prefers-color-scheme: dark)"):null}catch{return null}},Ng=()=>{const i=Tg();return i?i.matches?"dark":"light":"dark"};let cr=Sj(),ds=cr??Ng();function or(i=ds){var o;const r=(o=globalThis.document)==null?void 0:o.documentElement;r&&(cr?r.setAttribute("data-theme",i):r.removeAttribute("data-theme"),r.classList.toggle("dark",i==="dark"))}function _j(i){ds=i,cr=i;try{localStorage.setItem(Eg,i)}catch{}or(i);for(const r of nr)r()}const ar=()=>_j(ds==="dark"?"light":"dark");var Fu,Z0;(Z0=(Fu=Tg())==null?void 0:Fu.addEventListener)==null||Z0.call(Fu,"change",()=>{if(!cr){ds=Ng(),or();for(const i of nr)i()}});function Rg(){return N.useSyncExternalStore(i=>(nr.add(i),()=>{nr.delete(i)}),()=>ds,()=>"dark")}const Ej="min-h-11 rounded bg-sky-700 px-4 py-2 text-sm text-white disabled:opacity-50 md:min-h-0 md:px-3 md:py-1",Tj="loki start owner/repo#N";function zg(){const[i,r]=N.useState(null),[o,c]=N.useState(!1),d=async()=>{c(!0);try{const m=await P1();r(m.failed.length?{ok:!1,text:`Imported ${m.runs} runs; ${m.failed.length} failed.`}:{ok:!0,text:m.runs===0?"No runs found in this folder.":`Imported ${m.runs} runs. Reload to see them.`})}catch(m){r({ok:!1,text:m.message})}c(!1)};return u.jsxs("div",{children:[u.jsx("button",{type:"button","data-testid":"import-runs",disabled:o,onClick:d,className:Ej,children:"Import runs from this folder"}),i&&u.jsx("p",{role:i.ok?"status":"alert",className:`mt-2 text-sm ${i.ok?"text-emerald-600":"text-red-600"}`,children:i.text})]})}function wf(){return u.jsxs("div",{"data-testid":"empty-state",className:"rounded border border-dashed border-slate-300 p-8 text-center dark:border-slate-700",children:[u.jsx("p",{className:"text-lg font-medium",children:"No runs yet"}),u.jsx("div",{className:"mt-4 flex justify-center",children:u.jsx(zg,{})}),u.jsx("p",{className:"mt-6 text-sm text-slate-600 dark:text-slate-400",children:"Or start your first run from a terminal:"}),u.jsx("code",{className:"mt-2 inline-block rounded bg-slate-200 px-2 py-1 text-sm dark:bg-slate-800",children:Tj})]})}function Nj(){const i=Rg();return u.jsxs("section",{children:[u.jsx("h2",{className:"mb-4 text-xl",style:{fontFamily:"var(--cp-font-serif)",fontWeight:400},children:"General"}),u.jsx("p",{className:"mb-2 text-sm",style:{color:"var(--cp-text-2)"},children:"Appearance"}),u.jsx(pt,{variant:"secondary",onClick:ar,children:i==="dark"?"Switch to light theme":"Switch to dark theme"}),u.jsx("div",{className:"mt-6",children:u.jsx(zg,{})})]})}let Og={open:!1,preset:null};const xf=new Set,Cg=i=>{Og=i;for(const r of xf)r()},Wa=(i=null)=>Cg({open:!0,preset:i}),w0=()=>Cg({open:!1,preset:null}),D0=()=>Og,Rj=()=>N.useSyncExternalStore(i=>(xf.add(i),()=>{xf.delete(i)}),D0,D0),zj=()=>globalThis.LOKI_CONTROL_BASE??"",Oj=10;async function Cj(){const i=[];let r=null;for(let o=0;o<Oj;o++){const c=_e(),d=new URLSearchParams({limit:"200"});r&&d.set("cursor",r);const m=await fetch(`${zj()}/v1/runs?${d}`,{headers:c?{authorization:`Bearer ${c}`}:{}});if(!m.ok)throw new Error(`/v1/runs: HTTP ${m.status}`);const p=await m.json();if(i.push(...p.runs),r=p.next_cursor,!r)break}return i}function fr(i=!0){const[r,o]=N.useState({runs:null,error:null}),c=N.useCallback(()=>{Cj().then(d=>o({runs:d,error:null}),d=>o(m=>({runs:m.runs,error:d.message})))},[]);return N.useEffect(()=>(c(),i?W0(c):void 0),[c,i]),r}const Ag=864e5,Aj=14,Ka=i=>{const r=Date.parse(i.started_at??i.last_event_at??"");return Number.isNaN(r)?-1/0:r},hs=i=>`#/runs/${encodeURIComponent(i.source_id)}/${encodeURIComponent(i.run_id)}`,_n=i=>i.status==="running"||!i.verdict&&!i.ended_at?null:sr(i),Df=i=>Ae(_n(i)),wj=i=>_n(i)===null,dr=i=>(_n(i)??"").trim().toUpperCase(),Dj=i=>["SPEC_CONFLICT","BLOCKED"].includes(dr(i)),Mj=i=>dr(i)==="PARTIAL",kj=i=>dr(i)==="VERIFIED",Uj=i=>!wj(i),M0=i=>{var r;return((r=i.title)==null?void 0:r.trim())||i.issue_ref||"Untitled task"};function hr(i){const r=new Map;for(const c of i){const d=c.issue_ref?`${c.origin_repo??""}|${c.issue_ref}`:`${c.source_id}/${c.run_id}`;r.set(d,[...r.get(d)??[],c])}const o=[];for(const[c,d]of r){const m=[...d].sort((b,v)=>Ka(v)-Ka(b)),p=m[0],g=m.find(b=>{var v;return(v=b.title)==null?void 0:v.trim()});o.push({key:c,title:M0(g||p),repo:p.origin_repo,ref:p.issue_ref,attempts:m,latest:p})}return o.sort((c,d)=>Ka(d.latest)-Ka(c.latest))}function Hj(i){return i.attempts.length<2?null:`${i.ref?i.ref.includes("/")?i.ref.split("/").slice(1).join("/"):i.ref:i.title}, ${i.attempts.length} attempts, latest ${Df(i.latest).label}`}function Mf(i){return typeof i.cost_usd=="number"?Ve(i.cost_usd):i.partial_usd?`${Ve(i.partial_usd)}+`:null}function wg(i){const r=i.wall_s??i.elapsed_s;return typeof r!="number"||!Number.isFinite(r)?null:r<60?`${Math.round(r)}s`:r<3600?`${Math.floor(r/60)}m ${Math.round(r%60)}s`:`${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}function ni(i,r){const o=Date.parse(i.started_at??i.last_event_at??"");if(Number.isNaN(o))return null;const c=Math.max(0,Math.round((r-o)/1e3));return c<60?"just now":c<3600?`${Math.floor(c/60)}m ago`:c<86400?`${Math.floor(c/3600)}h ago`:`${Math.floor(c/86400)}d ago`}function Dg(i,r){const o=i.filter(m=>Dj(m.latest)),c=i.filter(m=>Mj(m.latest)),d=i.filter(m=>m.latest.pr_url&&["VERIFIED","ALREADY_SATISFIED"].includes(dr(m.latest))&&r-Ka(m.latest)<=Aj*Ag);return{blocked:o,partial:c,prs:d}}function Lj(i,r,o){const c=i.filter(b=>Ka(b)>=o-7*Ag),d=c.filter(Uj),m=d.filter(kj),p=c.filter(b=>typeof b.cost_usd=="number"),g=Dg(r,o);return{runsWeek:c.length,finishedWeek:d.length,verifiedWeek:m.length,verifiedShare:d.length?m.length/d.length:null,costWeek:p.length?p.reduce((b,v)=>b+(v.cost_usd??0),0):null,avgCostWeek:p.length?p.reduce((b,v)=>b+(v.cost_usd??0),0)/p.length:null,pricedWeek:p.length,costPartial:p.length<c.length,needsYou:g.blocked.length+g.partial.length+g.prs.length}}const Bj={good:"success",warn:"warning",bad:"error",neutral:"neutral"};function ms({verdict:i}){const r=Ae(i);return u.jsx(Bt,{tone:Bj[r.tone],pulse:r.label==="Running","data-outcome":r.label,style:{textTransform:"none",letterSpacing:0,whiteSpace:"nowrap"},children:r.label})}const Se={padding:"12px 14px",verticalAlign:"top"},qj={...Se,textAlign:"left",fontSize:"var(--cp-text-sm)",fontWeight:500,color:"var(--cp-text-muted)",borderBottom:"1px solid var(--cp-border)"},ns={color:"var(--cp-text-muted)",fontSize:"var(--cp-text-sm)"},Mg={color:"var(--cp-text)",textDecoration:"none"};function mr({run:i}){if(!i.pr_url)return null;const r=/\/pull\/(\d+)/.exec(i.pr_url);return u.jsxs("a",{href:i.pr_url,target:"_blank",rel:"noreferrer",style:{color:"var(--cp-accent)",display:"inline-flex",gap:4,alignItems:"center",textDecoration:"none"},children:[r?`PR #${r[1]}`:"PR",u.jsx(Nf,{size:12,"aria-hidden":"true"})]})}function $j({run:i,now:r}){return u.jsxs("tr",{"data-testid":"attempt-row",style:{background:"var(--cp-bg-3)"},children:[u.jsx("td",{style:{...Se,paddingLeft:40},children:u.jsx("a",{href:hs(i),style:{...Mg,color:"var(--cp-accent)"},children:"Attempt"})}),u.jsx("td",{style:Se}),u.jsx("td",{style:Se,children:u.jsx(ms,{verdict:_n(i)})}),u.jsx("td",{style:Se,children:u.jsx(mr,{run:i})}),u.jsx("td",{style:Se,children:Mf(i)}),u.jsx("td",{style:Se,children:wg(i)}),u.jsx("td",{style:{...Se,...ns},children:ni(i,r)})]})}function Yj({g:i,now:r}){const[o,c]=N.useState(!1),d=i.attempts.length>1,m=Hj(i),p=i.latest;return u.jsxs(N.Fragment,{children:[u.jsxs("tr",{"data-testid":"issue-row","data-attempts":i.attempts.length,style:{borderTop:"1px solid var(--cp-border-light)"},children:[u.jsx("td",{style:Se,children:u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"flex-start"},children:[d?u.jsx("button",{type:"button","data-testid":"expand","aria-expanded":o,"aria-label":o?"Hide attempts":"Show attempts",onClick:()=>c(g=>!g),style:{background:"none",border:0,padding:2,cursor:"pointer",color:"var(--cp-text-muted)"},children:o?u.jsx(y1,{size:14,"aria-hidden":"true"}):u.jsx(b1,{size:14,"aria-hidden":"true"})}):u.jsx("span",{style:{width:18}}),u.jsxs("div",{style:{minWidth:0},children:[u.jsx("a",{href:hs(p),"data-testid":"issue-title",style:Mg,children:i.title}),m?u.jsx("div",{"data-testid":"group-summary",style:ns,children:m}):i.ref?u.jsx("div",{style:ns,children:i.ref}):null]})]})}),u.jsx("td",{style:{...Se,...ns},children:i.repo}),u.jsx("td",{style:Se,children:u.jsx(ms,{verdict:_n(p)})}),u.jsx("td",{style:Se,children:u.jsx(mr,{run:p})}),u.jsx("td",{style:Se,children:Mf(p)}),u.jsx("td",{style:Se,children:wg(p)}),u.jsx("td",{style:{...Se,...ns},children:ni(p,r)})]}),d&&o?i.attempts.map(g=>u.jsx($j,{run:g,now:r},`${g.source_id}/${g.run_id}`)):null]})}const Vj={outcome:"",repo:"",q:""};function Gj(i,r){const o=r.q.trim().toLowerCase();return i.filter(c=>!(r.outcome&&Df(c.latest).label!==r.outcome||r.repo&&c.repo!==r.repo||o&&![c.title,c.ref,c.repo].some(d=>(d??"").toLowerCase().includes(o))))}function Qj({runs:i,now:r=Date.now()}){const[o,c]=N.useState(Vj),d=N.useMemo(()=>hr(i),[i]),m=N.useMemo(()=>Gj(d,o),[d,o]),p=N.useMemo(()=>[...new Set(d.map(v=>Df(v.latest).label))].sort(),[d]),g=N.useMemo(()=>[...new Set(d.map(v=>v.repo).filter(v=>!!v))].sort(),[d]),b=o.outcome!==""||o.repo!==""||o.q!=="";return u.jsxs("section",{"data-testid":"runs-page",style:{display:"flex",flexDirection:"column",gap:20},children:[u.jsxs("header",{style:{display:"flex",flexWrap:"wrap",gap:12,alignItems:"center"},children:[u.jsx("h1",{style:{fontFamily:"var(--cp-font-serif)",fontWeight:400,fontSize:"var(--cp-text-2xl)",margin:0,marginRight:"auto"},children:"Runs"}),u.jsx(Pn,{"aria-label":"Search runs",placeholder:"Search issues",value:o.q,onChange:v=>c({...o,q:v.target.value}),style:{maxWidth:220}}),u.jsx("span",{"data-testid":"filter-outcome",children:u.jsx(gf,{label:"Outcome",value:o.outcome||"All",options:[{value:"",label:"All"},...p.map(v=>({value:v,label:v}))],onSelect:v=>c({...o,outcome:v})})}),u.jsx("span",{"data-testid":"filter-repo",children:u.jsx(gf,{label:"Repo",value:o.repo||"All",options:[{value:"",label:"All"},...g.map(v=>({value:v,label:v}))],onSelect:v=>c({...o,repo:v})})}),u.jsx(pt,{"data-testid":"new-run-button",onClick:()=>Wa(),children:"New run"})]}),i.length===0?u.jsx(wf,{}):m.length===0?u.jsx(Tt,{title:b?"No runs match these filters":"No runs yet",hint:b?"Clear a filter or the search to see more.":"Use New run to start one from a registered repo."}):u.jsx(Qt,{style:{padding:0,overflow:"auto"},children:u.jsxs("table",{"data-testid":"runs-table",style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--cp-text-base)"},children:[u.jsx("thead",{children:u.jsx("tr",{children:["Issue","Repo","Outcome","PR","Cost","Duration","When"].map(v=>u.jsx("th",{scope:"col",style:qj,children:v},v))})}),u.jsx("tbody",{children:m.map(v=>u.jsx(Yj,{g:v,now:r},v.key))})]})})]})}function Xj(){const{runs:i,error:r}=fr();return i===null?r?u.jsx(Tt,{title:"Could not load runs",hint:r}):u.jsx(qt,{label:"Loading runs"}):u.jsx(Qj,{runs:i})}const Zj={id:"runs",path:"/runs",title:"Runs",component:Xj,inSettings:!1},Kj=12,jn={color:"var(--cp-text-muted)",fontSize:"var(--cp-text-sm)"},kf={fontFamily:"var(--cp-font-serif)",fontWeight:400,fontSize:"var(--cp-text-xl)",margin:0};function Jj(i){const r=i.verifiedShare===null?"No finished runs":`${Math.round(i.verifiedShare*100)}%`;return[{id:"kpi-runs",label:"Runs this week",value:String(i.runsWeek)},{id:"kpi-verified",label:"Verified share",value:r,trend:i.finishedWeek?`${i.verifiedWeek} of ${i.finishedWeek} finished`:void 0},{id:"kpi-cost",label:"Cost this week",value:i.costWeek===null?"No priced runs":`${Ve(i.costWeek)}${i.costPartial?"+":""}`,trend:i.avgCostWeek===null?void 0:`avg ${Ve(i.avgCostWeek)} across ${i.pricedWeek} priced`},{id:"kpi-needs",label:"Needs you",value:String(i.needsYou)}]}function of({title:i,items:r,now:o,testid:c}){return r.length===0?null:u.jsxs("div",{"data-testid":c,children:[u.jsxs("div",{style:{...jn,fontWeight:500,padding:"10px 16px 4px"},children:[i," (",r.length,")"]}),r.map(d=>u.jsxs("div",{"data-testid":"inbox-row",style:{display:"flex",gap:12,alignItems:"center",padding:"10px 16px",borderTop:"1px solid var(--cp-border-light)"},children:[u.jsx("a",{href:hs(d.latest),style:{flex:1,minWidth:0,color:"var(--cp-text)",textDecoration:"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.title}),d.repo?u.jsx("span",{style:jn,children:d.repo}):null,u.jsx(mr,{run:d.latest}),u.jsx("span",{style:jn,children:ni(d.latest,o)})]},d.key))]})}function Ij({groups:i,now:r}){const o=N.useMemo(()=>Dg(i,r),[i,r]),c=o.blocked.length+o.partial.length+o.prs.length===0;return u.jsxs("section",{"data-testid":"needs-you","aria-label":"Needs you",style:{display:"flex",flexDirection:"column",gap:12},children:[u.jsx("h2",{style:kf,children:"Needs you"}),u.jsx(Qt,{style:{padding:0},children:c?u.jsx("p",{"data-testid":"needs-you-empty",style:{...jn,margin:0,padding:16},children:"Nothing is waiting on you."}):u.jsxs(u.Fragment,{children:[u.jsx(of,{testid:"inbox-blocked",title:"Runs waiting for your answer",items:o.blocked,now:r}),u.jsx(of,{testid:"inbox-partial",title:"Partly verified, review",items:o.partial,now:r}),u.jsx(of,{testid:"inbox-prs",title:"Pull requests to review",items:o.prs,now:r})]})})]})}function Fj({groups:i,now:r}){const o=i.slice(0,Kj);return u.jsxs("section",{"data-testid":"latest-by-issue","aria-label":"Latest by issue",style:{display:"flex",flexDirection:"column",gap:12},children:[u.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:12},children:[u.jsx("h2",{style:{...kf,marginRight:"auto"},children:"Latest by issue"}),i.length>o.length?u.jsx("a",{href:"#/runs",style:{color:"var(--cp-accent)",fontSize:"var(--cp-text-sm)"},children:"All runs"}):null]}),o.length===0?u.jsx(wf,{}):u.jsx(Qt,{style:{padding:0},children:o.map((c,d)=>u.jsxs("div",{"data-testid":"latest-row",style:{display:"flex",gap:12,alignItems:"center",padding:"12px 16px",borderTop:d?"1px solid var(--cp-border-light)":void 0},children:[u.jsx("a",{href:hs(c.latest),style:{flex:1,minWidth:0,color:"var(--cp-text)",textDecoration:"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.title}),c.repo?u.jsx("span",{style:jn,children:c.repo}):null,u.jsx(ms,{verdict:_n(c.latest)}),u.jsx("span",{style:{...jn,minWidth:64,textAlign:"right"},children:ni(c.latest,r)})]},c.key))})]})}const Wj={pass:"success",warn:"warning",fail:"error"},Pj={pass:"Pass",warn:"Warning",fail:"Failing"};function tS({doctor:i,noRuns:r}){if(!i)return null;const o="checks"in i&&i.checks.some(c=>c.status!=="pass");return!("error"in i)&&!o&&!r?null:u.jsxs("section",{"data-testid":"getting-started","aria-label":"Getting started",style:{display:"flex",flexDirection:"column",gap:12},children:[u.jsx("h2",{style:kf,children:"Getting started"}),u.jsx(Qt,{style:{padding:0},children:"error"in i?u.jsxs("p",{"data-testid":"getting-started-error",role:"alert",style:{...jn,margin:0,padding:16},children:["Could not run the setup checks: ",i.error]}):i.checks.map((c,d)=>u.jsxs("div",{"data-testid":"doctor-check","data-status":c.status,style:{display:"flex",gap:12,alignItems:"center",padding:"10px 16px",borderTop:d?"1px solid var(--cp-border-light)":void 0},children:[u.jsx(Bt,{tone:Wj[c.status],children:Pj[c.status]}),u.jsx("span",{style:{flex:1,minWidth:0},children:c.name}),u.jsx("span",{style:jn,children:c.detail})]},c.name))})]})}function eS({runs:i,now:r=Date.now(),doctor:o=null}){const c=N.useMemo(()=>hr(i),[i]),d=N.useMemo(()=>Jj(Lj(i,c,r)),[i,c,r]);return u.jsxs("div",{"data-testid":"overview",style:{display:"flex",flexDirection:"column",gap:32,maxWidth:960},children:[u.jsxs("header",{style:{display:"flex",alignItems:"center",gap:12},children:[u.jsx("h1",{style:{fontFamily:"var(--cp-font-serif)",fontWeight:400,fontSize:"var(--cp-text-2xl)",margin:0,marginRight:"auto"},children:"Overview"}),u.jsx(pt,{"data-testid":"new-run-button",onClick:()=>Wa(),children:"New run"})]}),u.jsx("div",{"data-testid":"kpis",style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:16},children:d.map(m=>u.jsx("div",{"data-testid":m.id,children:u.jsx(Jn,{label:m.label,value:m.value,trend:m.trend})},m.id))}),u.jsx(tS,{doctor:o,noRuns:i.length===0}),u.jsx(Ij,{groups:c,now:r}),u.jsx(Fj,{groups:c,now:r})]})}function lS(){const{runs:i,error:r}=fr(),[o,c]=N.useState(null);return N.useEffect(()=>{let d=!0;return lb().then(m=>d&&c(m),m=>d&&c({error:m.message})),()=>{d=!1}},[]),i===null?r?u.jsx(Tt,{title:"Could not load runs",hint:r}):u.jsx(qt,{label:"Loading overview"}):u.jsx(eS,{runs:i,doctor:o})}const nS={id:"home",path:"/home",title:"Overview",component:lS};function aS(i){return i.verdict?cs(i)?"verified":"notproven":i.pr_url?"pr":i.status==="running"||i.started_at?"running":"issue"}const k0={issue:"Issue",running:"Running",pr:"PR open",verified:"Verified",notproven:"Not proven"};function iS({r:i}){const r=i.issue_ref??i.run_id;return u.jsx("a",{href:`#/runs/${encodeURIComponent(i.source_id)}/${encodeURIComponent(i.run_id)}`,"data-testid":"board-card","data-run":i.run_id,style:{textDecoration:"none",color:"inherit"},children:u.jsxs(Qt,{interactive:!0,compact:!0,children:[u.jsx("div",{style:{fontWeight:600,fontSize:"var(--cp-text-md)",overflowWrap:"anywhere"},children:r}),u.jsx("div",{style:{color:"var(--cp-text-muted)",fontSize:"var(--cp-text-xs)",marginTop:2},children:i.origin_repo??"repo not recorded"}),u.jsxs("div",{style:{display:"flex",gap:6,marginTop:8,flexWrap:"wrap",alignItems:"center"},children:[i.verdict?u.jsx(Fa,{run:i}):i.pr_url?u.jsx(Bt,{tone:"info",children:i.pr_draft?"draft PR":"PR open"}):i.status==="running"?u.jsx(Fa,{verdict:St.RUNNING}):u.jsx(Bt,{children:"queued"}),i.current_stage&&!i.verdict?u.jsx(Bt,{children:i.current_stage}):null]})]})})}function es({id:i,runs:r}){return u.jsxs("section",{"data-testid":`lane-${i}`,"aria-label":k0[i],style:{display:"flex",flexDirection:"column",gap:8},children:[u.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"var(--cp-text-xs)",color:"var(--cp-text-2)",textTransform:"uppercase",letterSpacing:"0.05em"},children:[u.jsx("span",{children:k0[i]}),u.jsx("span",{children:r.length})]}),r.length===0?u.jsx("div",{style:{color:"var(--cp-text-muted)",fontSize:"var(--cp-text-xs)"},children:"none"}):r.map(o=>u.jsx(iS,{r:o},`${o.source_id}/${o.run_id}`))]})}function Xu({id:i,children:r}){return u.jsx("div",{"data-testid":`col-${i}`,style:{background:"var(--cp-bg-2)",borderRadius:"var(--cp-radius-lg)",padding:10,display:"flex",flexDirection:"column",gap:16,minWidth:220},children:r})}function sS(){const[i,r]=N.useState(null),[o,c]=N.useState(null),d=N.useCallback(()=>{Wn().then(p=>{r(p.runs),c(null)}).catch(p=>c(p.message))},[]);if(N.useEffect(()=>(d(),W0(d)),[d]),o&&!i)return u.jsx(Tt,{title:"Could not load runs",hint:o});if(!i)return u.jsx("div",{style:{padding:24},children:u.jsx(qt,{label:"Loading runs"})});if(i.length===0)return u.jsx(Tt,{title:"No runs yet",hint:"Start a run and it will appear here."});const m=p=>i.filter(g=>aS(g)===p);return u.jsxs("div",{style:{padding:24},children:[u.jsx("h1",{style:{fontFamily:"var(--cp-font-serif)",fontSize:"var(--cp-text-2xl)",margin:"0 0 16px"},children:"Work"}),u.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:12,alignItems:"start"},children:[u.jsx(Xu,{id:"issue",children:u.jsx(es,{id:"issue",runs:m("issue")})}),u.jsx(Xu,{id:"running",children:u.jsx(es,{id:"running",runs:m("running")})}),u.jsx(Xu,{id:"pr",children:u.jsx(es,{id:"pr",runs:m("pr")})}),u.jsxs(Xu,{id:"done",children:[u.jsx(es,{id:"verified",runs:m("verified")}),u.jsx(es,{id:"notproven",runs:m("notproven")})]})]})]})}const uS={id:"work",path:"/work",title:"Work",component:()=>u.jsx(sS,{})},Zu=i=>`${i.source_id}/${i.run_id}`;function rS(){const[i,r]=N.useState(null),[o,c]=N.useState(null),[d,m]=N.useState({}),[p,g]=N.useState(void 0);N.useEffect(()=>{let A=!0;return Wn().then(B=>A&&r(B.runs),B=>A&&c(B.message)),Ub().then(B=>A&&g(B),()=>A&&g(null)),()=>{A=!1}},[]);const b=async A=>{m(B=>({...B,[Zu(A)]:"pending"}));try{const B=await yg(A.source_id,A.run_id);m(Q=>({...Q,[Zu(A)]:B}))}catch(B){m(Q=>({...Q,[Zu(A)]:{error:B.message}}))}};if(o)return u.jsx(Tt,{title:"Receipts unavailable",hint:o});if(!i)return u.jsx(qt,{label:"Loading receipts"});const v=i.filter(A=>A.verdict),R=Hb(v),y=v.length?Math.round(v.filter(A=>cs(A)).length/v.length*100):null;return u.jsxs("div",{"data-testid":"receipts",style:{display:"flex",flexDirection:"column",gap:16},children:[u.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(240px, 1fr))",gap:12},children:[u.jsx(Jn,{label:`Verified rate (${v.length} finished run${v.length===1?"":"s"}, by run outcome)`,value:y===null?"not measured":`${y}%`,series:R.map(A=>A.rate),trend:R.length>1?`${R.length} days`:void 0}),u.jsxs(Qt,{style:{padding:"14px 16px"},"data-testid":"public-key",children:[u.jsx("div",{style:{fontSize:"var(--cp-text-sm)",color:"var(--cp-text-2)"},children:"Public key (Ed25519)"}),p===void 0?u.jsx(qt,{size:12}):p===null?u.jsx("div",{children:"not measured: no signing key on this machine yet"}):u.jsxs("div",{style:{fontFamily:"var(--cp-font-mono)",fontSize:12,wordBreak:"break-all"},children:[u.jsxs("div",{"data-testid":"key-kid",children:["kid ",p.kid]}),u.jsxs("div",{"data-testid":"key-x",children:["x ",p.x]})]})]})]}),v.length===0?u.jsx(Tt,{title:"No finished runs yet",hint:"A receipt appears here when a run completes."}):u.jsx(ta,{caption:"Receipts",columns:["Run","Outcome","Started","Verify"],rows:v.map(A=>{const B=d[Zu(A)];return[u.jsx("span",{style:{fontFamily:"var(--cp-font-mono)"},children:A.run_id},"run"),u.jsx(Fa,{run:A},"out"),A.started_at??"not measured",u.jsxs("span",{style:{display:"inline-flex",gap:8,alignItems:"center"},children:[u.jsx(pt,{size:"sm",variant:"secondary",disabled:B==="pending",onClick:()=>void b(A),"data-testid":"verify-btn",children:B==="pending"?"Verifying":"Verify"}),B&&B!=="pending"?"error"in B?u.jsx(Bt,{tone:"error","data-testid":"verify-result",children:B.error}):u.jsxs("span",{"data-testid":"verify-result","data-verdict":B.verdict,children:[u.jsx(Fa,{run:{verdict:B.verdict,tampered:A.tampered}}),B.reasons[0]?u.jsx("span",{style:{marginLeft:8,color:"var(--cp-text-2)",fontSize:12},children:B.reasons[0]}):null]}):null]},"v")]})})]})}const cS={id:"receipts",path:"/receipts",title:"Receipts",component:rS},Pe={padding:"12px 14px",verticalAlign:"top"},kg={...Pe,textAlign:"left",fontSize:"var(--cp-text-sm)",fontWeight:500,color:"var(--cp-text-muted)",borderBottom:"1px solid var(--cp-border)"},bf={color:"var(--cp-text-muted)",fontSize:"var(--cp-text-sm)"},Ug={fontFamily:"var(--cp-font-serif)",fontWeight:400,fontSize:"var(--cp-text-2xl)",margin:0};function oS({runs:i,now:r=Date.now()}){const o=N.useMemo(()=>hr(i).filter(c=>c.attempts.some(d=>d.pr_url)).map(c=>({g:c,r:c.attempts.find(d=>d.pr_url)})),[i]);return u.jsxs("section",{"data-testid":"prs-page",style:{display:"flex",flexDirection:"column",gap:20},children:[u.jsx("h1",{style:Ug,children:"Pull requests"}),o.length===0?u.jsx(Tt,{title:"No pull requests yet",hint:"A run that opens a PR lists it here."}):u.jsx(Qt,{style:{padding:0,overflow:"auto"},children:u.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--cp-text-base)"},children:[u.jsx("thead",{children:u.jsx("tr",{children:["Issue","Repo","Outcome","PR","When"].map(c=>u.jsx("th",{scope:"col",style:kg,children:c},c))})}),u.jsx("tbody",{children:o.map(({g:c,r:d})=>u.jsxs("tr",{"data-testid":"pr-row",style:{borderTop:"1px solid var(--cp-border-light)"},children:[u.jsx("td",{style:Pe,children:u.jsx("a",{href:hs(d),style:{color:"var(--cp-text)",textDecoration:"none"},children:c.title})}),u.jsx("td",{style:{...Pe,...bf},children:c.repo}),u.jsx("td",{style:Pe,children:u.jsx(ms,{verdict:_n(d)})}),u.jsx("td",{style:Pe,children:u.jsx(mr,{run:d})}),u.jsx("td",{style:{...Pe,...bf},children:ni(d,r)})]},c.key))})]})})]})}function fS(){const{runs:i,error:r}=fr();return i===null?r?u.jsx(Tt,{title:"Could not load pull requests",hint:r}):u.jsx(qt,{label:"Loading pull requests"}):u.jsx(oS,{runs:i})}function dS(i){const r=new Map;for(const o of i)o.origin_repo&&r.set(o.origin_repo,[...r.get(o.origin_repo)??[],o]);return[...r].map(([o,c])=>{const d=c.filter(p=>typeof p.cost_usd=="number"),m=hr(c);return{repo:o,issues:m.length,runs:c.length,latest:m[0].latest,cost:d.length?d.reduce((p,g)=>p+(g.cost_usd??0),0):null}}).sort((o,c)=>Date.parse(c.latest.started_at??"")-Date.parse(o.latest.started_at??""))}function hS({runs:i,now:r=Date.now()}){const o=N.useMemo(()=>dS(i),[i]);return u.jsxs("section",{"data-testid":"repos-page",style:{display:"flex",flexDirection:"column",gap:20},children:[u.jsx("h1",{style:Ug,children:"Repos"}),o.length===0?u.jsx(Tt,{title:"No repos yet",hint:"Repos appear once a run has recorded its origin."}):u.jsx(Qt,{style:{padding:0,overflow:"auto"},children:u.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--cp-text-base)"},children:[u.jsx("thead",{children:u.jsx("tr",{children:["Repo","Issues","Runs","Latest outcome","Cost","Last run"].map(c=>u.jsx("th",{scope:"col",style:kg,children:c},c))})}),u.jsx("tbody",{children:o.map(c=>u.jsxs("tr",{"data-testid":"repo-row",style:{borderTop:"1px solid var(--cp-border-light)"},children:[u.jsx("td",{style:Pe,children:c.repo}),u.jsx("td",{style:Pe,children:c.issues}),u.jsx("td",{style:Pe,children:c.runs}),u.jsx("td",{style:Pe,children:u.jsx(ms,{verdict:_n(c.latest)})}),u.jsx("td",{style:Pe,children:Mf({...c.latest,cost_usd:c.cost,partial_usd:0})}),u.jsx("td",{style:{...Pe,...bf},children:ni(c.latest,r)})]},c.repo))})]})})]})}function mS(){const{runs:i,error:r}=fr();return i===null?r?u.jsx(Tt,{title:"Could not load repos",hint:r}):u.jsx(qt,{label:"Loading repos"}):u.jsx(hS,{runs:i})}const pS={id:"pulls",path:"/pulls",title:"Pull requests",component:fS},gS={id:"repos",path:"/repos",title:"Repos",component:mS};class pr extends Error{constructor(r,o){super(o),this.status=r}}const Hg=()=>globalThis.LOKI_CONTROL_BASE??"",Lg=(i={})=>{const r=_e();return r?{...i,authorization:`Bearer ${r}`}:i};async function Uf(i,r){const o=await fetch(`${Hg()}${i}`,{...r,headers:Lg(r!=null&&r.body?{"content-type":"application/json"}:{})}),c=await o.json().catch(()=>({}));if(!o.ok)throw new pr(o.status,c.error??`HTTP ${o.status}`);return c}const vS=async()=>(await Uf("/v1/ask/threads")).threads,yS=i=>Uf(`/v1/ask/threads/${encodeURIComponent(i)}`),Bg=i=>Uf("/v1/ask",{method:"POST",body:JSON.stringify(i)});function xS(i){var d,m;const r=i.split(`
|
|
183
183
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Loki Mode</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-BJq1KhqJ.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="./assets/index-DeSVrWgd.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
@@ -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.
|
|
5
|
+
"version": "11.17.72",
|
|
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-
|
|
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-jKPg1ndO.js";import{B as C}from"./Button-B4ly42_O.js";import{T as $e}from"./trending-up-B0rfGJk5.js";import{C as z}from"./clock-BTqJOjXa.js";import{A as Be,U as ue,M as De}from"./Avatar-DX0Ro-Kx.js";import{A as J}from"./activity-CtB07gdy.js";import{R as pe}from"./refresh-cw-CjSls06A.js";import{G as ze}from"./globe-mDkZYUTR.js";import{C as Le}from"./chevron-left-e5Mb1gVD.js";import{C as je}from"./check-CIELTwXt.js";import{D as Y}from"./dollar-sign-B8aOi92U.js";import{U as Te}from"./user-DABxdGCx.js";import{D as Me}from"./database-BbsI4cut.js";import{L as Ue}from"./lock-DsCkUel5.js";import{S as Re}from"./scroll-text-B3UbaZ5b.js";import{S as Ie}from"./shield-alert-DkRN-hAa.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-
|
|
1
|
+
import{j as e}from"./index-jKPg1ndO.js";import{C as r}from"./clock-BTqJOjXa.js";import{C as a}from"./circle-alert-CKqDQz6l.js";import{C as l}from"./check-CIELTwXt.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-
|
|
1
|
+
import{r as p,j as t}from"./index-jKPg1ndO.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-
|
|
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-jKPg1ndO.js";import{P as K,S as He,E as Be}from"./ErrorBoundary-DRVM0zGG.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-zW7CQqpr.js";import{C as oe}from"./check-CIELTwXt.js";import{C as Ye}from"./clock-BTqJOjXa.js";import{D as Xe}from"./dollar-sign-B8aOi92U.js";import{U as Ze}from"./upload-DP61hjp9.js";import{L as V}from"./loader-circle-DeOuSCFS.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-CfG9cuZ-.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-jKPg1ndO.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};
|
package/web-app/dist/assets/{EvidenceReceiptPanel-c1YRf1qj.js → EvidenceReceiptPanel-DfO4dvGV.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,a as x,j as e}from"./index-
|
|
1
|
+
import{r as l,a as x,j as e}from"./index-jKPg1ndO.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-
|
|
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-jKPg1ndO.js";import{B as N}from"./Button-B4ly42_O.js";import{C as y}from"./thumbs-up-zW7CQqpr.js";import{R as S}from"./refresh-cw-CjSls06A.js";import{C as z}from"./circle-alert-CKqDQz6l.js";import{U as D}from"./user-DABxdGCx.js";import{L as G}from"./loader-circle-DeOuSCFS.js";import{R as T}from"./rotate-ccw-CBvpmOst.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-
|
|
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-jKPg1ndO.js";import{B as y}from"./Button-B4ly42_O.js";import{C as ge}from"./chevron-left-e5Mb1gVD.js";import{G as P}from"./thumbs-up-zW7CQqpr.js";import{R as $}from"./refresh-cw-CjSls06A.js";import{C as Ne}from"./circle-alert-CKqDQz6l.js";import{L as Q,S as je}from"./ProjectPage-DxjqqFKI.js";import{S as se}from"./shield-alert-DkRN-hAa.js";import{F as ye}from"./file-code-corner-wC1AYauR.js";import{C as V}from"./clock-BTqJOjXa.js";import{C as re}from"./check-CIELTwXt.js";import"./ErrorBoundary-DRVM0zGG.js";import"./TerminalOutput-DcmUp7At.js";import"./lock-DsCkUel5.js";import"./package-DKnYDpLL.js";import"./file-plus-Citl6qA-.js";import"./activity-CtB07gdy.js";import"./scroll-text-B3UbaZ5b.js";import"./bot-B-HD8ThU.js";import"./loader-circle-DeOuSCFS.js";import"./hammer-C2fVEIcT.js";import"./dollar-sign-B8aOi92U.js";import"./globe-mDkZYUTR.js";import"./trash-2-DpIfXzL9.js";import"./upload-DP61hjp9.js";import"./plus-CM1HV1o9.js";import"./rotate-ccw-CBvpmOst.js";import"./code-xml-Dpfd5NCk.js";import"./trending-up-B0rfGJk5.js";import"./layers-rwZFcMlR.js";import"./trending-down-YPIRE8kJ.js";import"./server-BUrmAE6N.js";/**
|
|
2
2
|
* @license lucide-react v0.577.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|