loki-mode 11.123.0 → 11.124.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/loki +72 -73
- package/autonomy/route.sh +17 -10
- package/bin/loki +31 -12
- package/dashboard/__init__.py +1 -1
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/COMPARE-OPENCODE.md +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/docs/v10/GUIDE.md +17 -3
- package/loki-ts/data/child-env.json +0 -1
- package/loki-ts/dist/loki.js +1314 -1309
- package/mcp/__init__.py +1 -1
- package/package.json +2 -2
- package/packages/control-plane/dist/server.js +77 -38
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/providers/loader.sh +18 -3
- package/web-app/dist/assets/{AdminPage-D1Pq4MQi.js → AdminPage-C9YXclra.js} +1 -1
- package/web-app/dist/assets/{Avatar-A2BFZ8T8.js → Avatar-DcHwmo8Q.js} +1 -1
- package/web-app/dist/assets/{Badge-BeAiw5Sl.js → Badge-DFRrk7D-.js} +1 -1
- package/web-app/dist/assets/{Button-DprfqpF8.js → Button-y19VaxSR.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-C4h6TT-c.js → CockpitPage-DX3I-w5q.js} +1 -1
- package/web-app/dist/assets/{ComparePage-apBsndqK.js → ComparePage-CkBggRv7.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-B6mK7ggZ.js → ErrorBoundary-mLvOnCJ1.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-DNEXfKYK.js → EvidenceReceiptPanel-BkmkNppK.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-BHMnS0dv.js → GitHubIssuesPanel-Cs8rKLO7.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-Bg1hQTBZ.js → GitHubPRsPanel-FgKZAobV.js} +1 -1
- package/web-app/dist/assets/{HomePage-C0uIfnbC.js → HomePage-F_FNrAKj.js} +2 -2
- package/web-app/dist/assets/{LoginPage-C5W1PwxV.js → LoginPage-B-2bqmPh.js} +1 -1
- package/web-app/dist/assets/{MagicPage-B9v5J6kn.js → MagicPage-WPCVC2fy.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-TyFW2Mi7.js → MetricsPage-DYJ6MOpJ.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-fhomLjyo.js → NotFoundPage-CyrIHlCL.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-B7Q9_E7J.js → ProjectPage-BAmwg2sJ.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-BRlw-ztJ.js → ProjectsPage-COAKl6xX.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-DBS-DpXz.js → SettingsPage-rpHmbyL0.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-C609Y2vd.js → ShowcasePage-btQXeHy5.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-CpZ_F3Pz.js → SystemSettingsPage-RRwW7JCN.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-C8gdvyoH.js → TeamsPage-BiUdYmVH.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-JcmMFDss.js → TemplatesPage-BRh8dRWR.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-DeKTksvK.js → TerminalOutput-HXMsEbnh.js} +1 -1
- package/web-app/dist/assets/{activity-fohF0bEH.js → activity-CP62VCuF.js} +1 -1
- package/web-app/dist/assets/{bell-DXoB51yh.js → bell-D6tfe2Lc.js} +1 -1
- package/web-app/dist/assets/{bot-ozfD3tc3.js → bot-BcumQWsn.js} +1 -1
- package/web-app/dist/assets/{check-DJIvauO5.js → check-Dr3Y24yi.js} +1 -1
- package/web-app/dist/assets/{chevron-left-DubgZZGE.js → chevron-left-DqxUiGVI.js} +1 -1
- package/web-app/dist/assets/{circle-alert-DVP3spwP.js → circle-alert-DItIPVXH.js} +1 -1
- package/web-app/dist/assets/{clock-D0y8bHsc.js → clock-DW0A6_om.js} +1 -1
- package/web-app/dist/assets/{cloud-AZw6GZdP.js → cloud-Dpg6r2M0.js} +1 -1
- package/web-app/dist/assets/{code-xml-lxx2SVRo.js → code-xml-CRCM56ot.js} +1 -1
- package/web-app/dist/assets/{database-DSHk51Pu.js → database-DrakaR5y.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-jBZCz460.js → dollar-sign-Bx88-uC1.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-HGtDqBI1.js → file-code-corner-u54f6D1m.js} +1 -1
- package/web-app/dist/assets/{file-plus-L3tAznio.js → file-plus-BoUK6DIP.js} +1 -1
- package/web-app/dist/assets/{globe-f50xCoGa.js → globe-CxjteMVu.js} +1 -1
- package/web-app/dist/assets/{hammer-Btdop6UY.js → hammer-DfPVK8V-.js} +1 -1
- package/web-app/dist/assets/{index-alvwtVBH.js → index-PdsIYs8D.js} +3 -3
- package/web-app/dist/assets/{layers-WZi-3fiX.js → layers-BkC-tIBJ.js} +1 -1
- package/web-app/dist/assets/{loader-circle-B13s_pbT.js → loader-circle-ZFbmGHbG.js} +1 -1
- package/web-app/dist/assets/{lock-DPzrJtGd.js → lock-DCPTgRju.js} +1 -1
- package/web-app/dist/assets/{package-q3dYbP9u.js → package-CQiO2qzH.js} +1 -1
- package/web-app/dist/assets/{plus-nLd8kLVM.js → plus-CnOfFWUF.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-T4m4o3p9.js → refresh-cw-odLkbX4s.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-BsPRTRVr.js → rotate-ccw-BwYmXJvd.js} +1 -1
- package/web-app/dist/assets/{scroll-text-BKYY62-4.js → scroll-text--pDgaJgE.js} +1 -1
- package/web-app/dist/assets/{server-WY0czRua.js → server-CD4f5Vze.js} +1 -1
- package/web-app/dist/assets/{shield-alert-JFzWB4HO.js → shield-alert-CcQwHRj8.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-DY-6b3kG.js → thumbs-up-Dlt9cYEo.js} +1 -1
- package/web-app/dist/assets/{trash-2-Rij5mMzF.js → trash-2-xnhro-Jd.js} +1 -1
- package/web-app/dist/assets/{trending-down-BwEIkU-x.js → trending-down-UmLy_Cck.js} +1 -1
- package/web-app/dist/assets/{trending-up-Coe2CO4y.js → trending-up-ahzpV7N6.js} +1 -1
- package/web-app/dist/assets/{upload-CPuWWzzF.js → upload-BMRTmfO-.js} +1 -1
- package/web-app/dist/assets/{usePolling-Ce5XHOw4.js → usePolling-VSt8R-0Q.js} +1 -1
- package/web-app/dist/assets/{user-D1q10hes.js → user-C72PyQtn.js} +1 -1
- package/web-app/dist/index.html +1 -1
package/mcp/__init__.py
CHANGED
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.
|
|
4
|
+
"version": "11.124.1",
|
|
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",
|
|
@@ -161,5 +161,5 @@
|
|
|
161
161
|
"dependencies": {
|
|
162
162
|
"@resvg/resvg-wasm": "^2.6.2"
|
|
163
163
|
},
|
|
164
|
-
"gitHead": "
|
|
164
|
+
"gitHead": "4713c5e5b48a99da8cf803091deff79e03354271"
|
|
165
165
|
}
|
|
@@ -855,13 +855,24 @@ function routerMode(env = process.env) {
|
|
|
855
855
|
return "opt-out";
|
|
856
856
|
if (v === "1" || v === "true" || v === "on")
|
|
857
857
|
return "on";
|
|
858
|
+
if (v === "auto")
|
|
859
|
+
return "auto";
|
|
858
860
|
return "off";
|
|
859
861
|
}
|
|
862
|
+
function presetExecutor(env = process.env) {
|
|
863
|
+
const fixed = (env.LOKI_ROUTER_EXECUTOR ?? "").trim();
|
|
864
|
+
if (fixed)
|
|
865
|
+
return { model: fixed, reason: "LOKI_ROUTER=auto, executor from LOKI_ROUTER_EXECUTOR" };
|
|
866
|
+
return env.LOKI_ALLOW_HAIKU === "false" ? { model: "sonnet", reason: "LOKI_ROUTER=auto with LOKI_ALLOW_HAIKU=false: Sonnet executes implement and fix" } : { model: "haiku", reason: "LOKI_ROUTER=auto: Haiku executes implement and fix" };
|
|
867
|
+
}
|
|
860
868
|
function advisorOnlyEnabled(env = process.env) {
|
|
861
869
|
const v = (env.LOKI_ADVISOR ?? "").trim().toLowerCase();
|
|
862
870
|
return v === "1" || v === "true" || v === "on";
|
|
863
871
|
}
|
|
864
|
-
var routerEnabled = (env = process.env) =>
|
|
872
|
+
var routerEnabled = (env = process.env) => {
|
|
873
|
+
const m = routerMode(env);
|
|
874
|
+
return m === "on" || m === "auto";
|
|
875
|
+
}, routerPreset = (env = process.env) => routerMode(env) === "auto", sessionPlanEnabled = (env = process.env) => routerEnabled(env) || advisorOnlyEnabled(env);
|
|
865
876
|
|
|
866
877
|
// ../../loki-ts/src/providers/price_table.ts
|
|
867
878
|
import { readFileSync as readFileSync2, statSync as statSync2 } from "fs";
|
|
@@ -12709,7 +12720,7 @@ function parseRoute(input, advisorAvailable) {
|
|
|
12709
12720
|
return { route: { executor: r.executor, reason: r.reason, risk: r.risk, source: r.source }, notProven: null };
|
|
12710
12721
|
}
|
|
12711
12722
|
function envOverride(env) {
|
|
12712
|
-
for (const k of ["LOKI_MODEL_OVERRIDE", "LOKI_CLAUDE_MODEL_DEVELOPMENT"]) {
|
|
12723
|
+
for (const k of ["LOKI_MODEL_OVERRIDE", "LOKI_CLAUDE_MODEL_DEVELOPMENT", "LOKI_MODEL_DEVELOPMENT", "LOKI_SESSION_MODEL"]) {
|
|
12713
12724
|
const v = (env[k] ?? "").trim();
|
|
12714
12725
|
if (v)
|
|
12715
12726
|
return v;
|
|
@@ -12831,23 +12842,19 @@ function cascadeDowngrade(runModel, env = process.env) {
|
|
|
12831
12842
|
const to = cascadeImplementModel(env);
|
|
12832
12843
|
return cascadeEnabled(env) && modelRank(to) < modelRank(runModel) ? { from: runModel, to, note: `model downgraded by cascade: ${runModel} -> ${to} (opt-in)` } : null;
|
|
12833
12844
|
}
|
|
12834
|
-
function haikuFirstDowngrade(runModel, env = process.env) {
|
|
12835
|
-
const to = resolveModelAlias("haiku");
|
|
12836
|
-
return haikuFirstEnabled(env) && modelRank(to) < modelRank(runModel) ? { from: runModel, to, note: `model downgraded by haiku-first: ${runModel} -> ${to} (opt-in; a failed verify escalates to ${runModel})` } : null;
|
|
12837
|
-
}
|
|
12838
12845
|
function climb(unit, current, trigger, evidence) {
|
|
12839
12846
|
const k = klass(current);
|
|
12840
12847
|
const model = k.includes("haiku") ? "haiku" : k.includes("sonnet") ? "sonnet" : null;
|
|
12841
12848
|
if (!model)
|
|
12842
12849
|
return null;
|
|
12843
12850
|
const t = nextState({ model, swapped: false }, EVENT[trigger]);
|
|
12844
|
-
const next = t.action === "none" || t.action === "blocked" || t.action === "stalled" ? model === "sonnet" && trigger === "escalate_marker" ? "opus" : null : t.state.model;
|
|
12845
|
-
return next && next !== model ? { unit, from: current, to: resolveModelAlias(next), trigger, evidence: evidence.slice(0, 300) } : null;
|
|
12851
|
+
const next = t.action === "none" || t.action === "blocked" || t.action === "stalled" ? model === "sonnet" && (trigger === "escalate_marker" || trigger === "already_done_claim") ? "opus" : null : t.state.model;
|
|
12852
|
+
return next && next !== model ? { unit, from: current, to: resolveModelAlias(next), trigger, evidence: redactSecrets(evidence).slice(0, 300) } : null;
|
|
12846
12853
|
}
|
|
12847
12854
|
var modelRank = (m) => {
|
|
12848
12855
|
const id = resolveModelAlias(m).toLowerCase();
|
|
12849
12856
|
return ["haiku", "sonnet", "opus", "fable"].findIndex((t) => id.includes(t)) + (id.match(/haiku|sonnet|opus|fable/) ? 0 : 5);
|
|
12850
|
-
}, escalationModel = (runModel) => sessionPinModel() ? runModel : runModel !== PROVIDER_DEFAULT_MODEL && modelRank(runModel) > modelRank("opus") ? runModel : resolveModelAlias("opus"),
|
|
12857
|
+
}, escalationModel = (runModel) => sessionPinModel() ? runModel : runModel !== PROVIDER_DEFAULT_MODEL && modelRank(runModel) > modelRank("opus") ? runModel : resolveModelAlias("opus"), capToRunTier = (pin, runModel, pinKeys, env = process.env) => pinKeys.some((k) => !!env[k]) || !runModel || modelRank(pin) <= modelRank(runModel) ? pin : runModel, capToSessionPin = (model, env = process.env) => {
|
|
12851
12858
|
const pin = sessionPinModel(env);
|
|
12852
12859
|
return model && pin && modelRank(model) > modelRank(pin) ? pin : model;
|
|
12853
12860
|
}, klass = (m) => resolveModelAlias(m).toLowerCase(), EVENT;
|
|
@@ -12855,7 +12862,8 @@ var init_model_rank = __esm(() => {
|
|
|
12855
12862
|
init_sizing();
|
|
12856
12863
|
init_session();
|
|
12857
12864
|
init_decision();
|
|
12858
|
-
|
|
12865
|
+
init_redact();
|
|
12866
|
+
EVENT = { code_fail: { kind: "code_fail_repeat" }, escalate_marker: { kind: "escalate_marker" }, spec_conflict: { kind: "spec_conflict" }, limit_kill: { kind: "limit_kill" }, stall: { kind: "stall" }, already_done_claim: { kind: "escalate_marker" } };
|
|
12859
12867
|
});
|
|
12860
12868
|
|
|
12861
12869
|
// ../../loki-ts/src/engine10/sizing.ts
|
|
@@ -12866,9 +12874,9 @@ function namedFiles(task, map) {
|
|
|
12866
12874
|
return (map?.files ?? []).filter((f) => new RegExp(`(?<![\\w.-])${escRe(basename11(f).toLowerCase())}(?![\\w-]|\\.\\w)`).test(text3));
|
|
12867
12875
|
}
|
|
12868
12876
|
function sizeTask(task, map, tests) {
|
|
12869
|
-
const named = namedFiles(task, map).length;
|
|
12870
|
-
if (
|
|
12871
|
-
return { size: "large", reasons: [`task names ${
|
|
12877
|
+
const named = namedFiles(task, map).length, distinct = namedDistinct(task, map);
|
|
12878
|
+
if (distinct > LARGE_NAMED_FILES)
|
|
12879
|
+
return { size: "large", reasons: [`task names ${distinct} distinct files > ${LARGE_NAMED_FILES}: decompose`] };
|
|
12872
12880
|
const st = deliverables(task);
|
|
12873
12881
|
if (st.large)
|
|
12874
12882
|
return { size: "large", reasons: [`${st.reason}: decompose`] };
|
|
@@ -12883,6 +12891,18 @@ function sizeTask(task, map, tests) {
|
|
|
12883
12891
|
].filter((w) => typeof w === "string");
|
|
12884
12892
|
return why.length ? { size: "normal", reasons: why } : { size: "small", reasons: [`task ${task.length} chars, names ${named} files`] };
|
|
12885
12893
|
}
|
|
12894
|
+
function namedDistinct(task, map) {
|
|
12895
|
+
const text3 = task.toLowerCase(), named = namedFiles(task, map).filter((f) => !isTestFile(f)).map((f) => f.toLowerCase());
|
|
12896
|
+
const spelled = new Set(named.filter((f) => f.includes("/") && new RegExp(`(?<![\\w./-])(?:\\./)?${escRe(f)}(?![\\w-]|\\.\\w)`).test(text3)));
|
|
12897
|
+
const spelledBase = new Set([...spelled].map((f) => basename11(f)));
|
|
12898
|
+
return spelled.size + new Set(named.map((f) => basename11(f)).filter((b) => !spelledBase.has(b))).size;
|
|
12899
|
+
}
|
|
12900
|
+
function hardReason(size, map, task) {
|
|
12901
|
+
if (size === "large")
|
|
12902
|
+
return "task sized large";
|
|
12903
|
+
const n3 = namedDistinct(task, map);
|
|
12904
|
+
return n3 > HARD_NAMED_FILES ? `task names ${n3} distinct non-test files > ${HARD_NAMED_FILES}` : null;
|
|
12905
|
+
}
|
|
12886
12906
|
function loadRepoMap(repomapRef) {
|
|
12887
12907
|
try {
|
|
12888
12908
|
return repomapRef && existsSync22(repomapRef) ? JSON.parse(readFileSync33(repomapRef, "utf8")) : null;
|
|
@@ -12915,7 +12935,7 @@ var escRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), LARGE_NAMED_FILES =
|
|
|
12915
12935
|
return n3;
|
|
12916
12936
|
noteOnce("LOKI_E10_SMALL_MAX_CHARS", env.LOKI_E10_SMALL_MAX_CHARS, "is not a positive number; using 600");
|
|
12917
12937
|
return 600;
|
|
12918
|
-
}, WALL_TINY_MAX_CHARS = 300, WALL_TINY_BOUND = "Tiny task: write exactly one test file with at most 6 assertions unless more acceptance lines exist, then exactly one per acceptance line.", isTinyGreenfield = (size, task, tests) => size === "small" && task.length <= WALL_TINY_MAX_CHARS && !tests?.runners.length && !tests?.tests.length, smallTaskPath = (size, relevantTests) => size !== "large" && relevantTests ? "lean" : "wall", knob = (v, words) => words.includes((v ?? "").toLowerCase()), planMode = (env = process.env) => knob(env.LOKI_E10_PLAN, ["0", "off", "never", "false"]) ? "never" : knob(env.LOKI_E10_PLAN, ["1", "on", "always", "true"]) ? "always" : "auto", wallEnabled = (env = process.env) => !knob(env.LOKI_E10_WALL, ["0", "off", "false"]), wallLimitS = (size, env = process.env) => {
|
|
12938
|
+
}, HARD_NAMED_FILES = 4, WALL_TINY_MAX_CHARS = 300, WALL_TINY_BOUND = "Tiny task: write exactly one test file with at most 6 assertions unless more acceptance lines exist, then exactly one per acceptance line.", isTinyGreenfield = (size, task, tests) => size === "small" && task.length <= WALL_TINY_MAX_CHARS && !tests?.runners.length && !tests?.tests.length, smallTaskPath = (size, relevantTests) => size !== "large" && relevantTests ? "lean" : "wall", knob = (v, words) => words.includes((v ?? "").toLowerCase()), planMode = (env = process.env) => knob(env.LOKI_E10_PLAN, ["0", "off", "never", "false"]) ? "never" : knob(env.LOKI_E10_PLAN, ["1", "on", "always", "true"]) ? "always" : "auto", wallEnabled = (env = process.env) => !knob(env.LOKI_E10_WALL, ["0", "off", "false"]), wallLimitS = (size, env = process.env) => {
|
|
12919
12939
|
const raw2 = env.LOKI_E10_WALL_LIMIT_S, n3 = Number(raw2), dflt = size === "small" ? 90 : 180;
|
|
12920
12940
|
if (Number.isFinite(n3) && n3 > 0) {
|
|
12921
12941
|
if (n3 > 300)
|
|
@@ -12934,6 +12954,7 @@ var init_sizing = __esm(() => {
|
|
|
12934
12954
|
init_lean_select();
|
|
12935
12955
|
init_decompose();
|
|
12936
12956
|
init_claude_model();
|
|
12957
|
+
init_test_file_text();
|
|
12937
12958
|
init_wall_knobs();
|
|
12938
12959
|
init_model_rank();
|
|
12939
12960
|
init_wall_knobs();
|
|
@@ -13202,13 +13223,10 @@ function modelDowngrades(provider, env = process.env, runModel = env.LOKI_CLAUDE
|
|
|
13202
13223
|
const out2 = [];
|
|
13203
13224
|
if (cascadeEnabled(env))
|
|
13204
13225
|
out2.push({ stage: "implement,fix", model: cascadeImplementModel(env), reason: "LOKI_E10_CASCADE opt-in" });
|
|
13205
|
-
if (
|
|
13206
|
-
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
out2.push({ stage: "implement", model: cascadeImplementModel(env), reason: "LOKI_IMPLEMENT_HAIKU_FIRST overridden by LOKI_E10_CASCADE" });
|
|
13210
|
-
else
|
|
13211
|
-
out2.push({ stage: "implement", model: resolveModelAlias("haiku"), reason: "LOKI_IMPLEMENT_HAIKU_FIRST opt-in" });
|
|
13226
|
+
if (routerPreset(env) && routerActive(env)) {
|
|
13227
|
+
const p = presetExecutor(env);
|
|
13228
|
+
if (weak(p.model))
|
|
13229
|
+
out2.push({ stage: "implement,fix", model: resolveModelAlias(p.model), reason: "LOKI_ROUTER=auto preset (climbs on a code-owned failure)" });
|
|
13212
13230
|
}
|
|
13213
13231
|
if (leanEnabled(env) && routerActive(env))
|
|
13214
13232
|
out2.push({ stage: "implement", model: resolveModelAlias("sonnet"), reason: "LOKI_LEAN opt-in (small and normal units; one rung up after a failed verify)" });
|
|
@@ -13225,7 +13243,6 @@ function modelDowngrades(provider, env = process.env, runModel = env.LOKI_CLAUDE
|
|
|
13225
13243
|
var weak = (m) => !!m && /sonnet|haiku/i.test(m);
|
|
13226
13244
|
var init_model_downgrades = __esm(() => {
|
|
13227
13245
|
init_sizing();
|
|
13228
|
-
init_model_rank();
|
|
13229
13246
|
init_claude_model();
|
|
13230
13247
|
init_unit_model();
|
|
13231
13248
|
init_decision();
|
|
@@ -18922,6 +18939,10 @@ function validHaikuRoute(plan) {
|
|
|
18922
18939
|
return { reason: String(units[0]["reason"]) };
|
|
18923
18940
|
}
|
|
18924
18941
|
function routeRecord(runModel, plan, historyFloor, size, env = process.env) {
|
|
18942
|
+
if (routerPreset(env)) {
|
|
18943
|
+
const p = presetExecutor(env);
|
|
18944
|
+
return { model: resolveModelAlias(p.model), source: "preset", reason: p.reason, valid: true };
|
|
18945
|
+
}
|
|
18925
18946
|
const v = validHaikuRoute(plan);
|
|
18926
18947
|
const h = v && historyFloor ? historyRaisedRoute(v.reason, historyFloor()) : null;
|
|
18927
18948
|
if (h)
|
|
@@ -18933,14 +18954,15 @@ function routeRecord(runModel, plan, historyFloor, size, env = process.env) {
|
|
|
18933
18954
|
}
|
|
18934
18955
|
function routedFix(runModel, out2, o) {
|
|
18935
18956
|
const rec = routeRecord(runModel, out2["plan"]);
|
|
18936
|
-
const
|
|
18957
|
+
const impl = String(out2["implement"]?.["route_model"] ?? rec.model), last = String(out2["fix"]?.["model"] ?? impl);
|
|
18958
|
+
const carried = modelRank(last) >= modelRank(impl) ? last : impl;
|
|
18937
18959
|
const floor = runFloor(runModel);
|
|
18938
18960
|
const cur = !rec.valid && modelRank(carried) < modelRank(floor) ? floor : carried;
|
|
18939
18961
|
const lean = leanEnabled() && routerPinsAllowed() && modelRank(carried) >= modelRank("sonnet") && modelRank(carried) < modelRank(floor);
|
|
18940
18962
|
const tests = o.groups.filter((g) => !g.signature.startsWith("lint:") && g.signature !== "select-tests").length;
|
|
18941
18963
|
if (lean && tests > 0) {
|
|
18942
18964
|
const to = runModel === PROVIDER_DEFAULT_MODEL ? undefined : runModel;
|
|
18943
|
-
return { pin: to, climbed: { unit: "run", from: carried, to: to ?? floor, trigger: o.stall ? "stall" : "code_fail", evidence: o.reason.slice(0, 300) } };
|
|
18965
|
+
return { pin: to, climbed: { unit: "run", from: carried, to: to ?? floor, trigger: o.stall ? "stall" : "code_fail", evidence: redactSecrets(o.reason).slice(0, 300) } };
|
|
18944
18966
|
}
|
|
18945
18967
|
if (lean)
|
|
18946
18968
|
return { pin: carried, climbed: null };
|
|
@@ -18963,6 +18985,7 @@ var init_unit_model = __esm(() => {
|
|
|
18963
18985
|
init_decision();
|
|
18964
18986
|
init_history();
|
|
18965
18987
|
init_model_rank();
|
|
18988
|
+
init_redact();
|
|
18966
18989
|
});
|
|
18967
18990
|
|
|
18968
18991
|
// ../../loki-ts/src/runner/router/session_route.ts
|
|
@@ -22750,6 +22773,10 @@ function routeStartLine(env, provider) {
|
|
|
22750
22773
|
return null;
|
|
22751
22774
|
const fixed = (env["LOKI_ROUTER_EXECUTOR"] ?? "").trim();
|
|
22752
22775
|
const why = advisorUnavailableReason(env, provider);
|
|
22776
|
+
if (routerPreset(env)) {
|
|
22777
|
+
const p = presetExecutor(env);
|
|
22778
|
+
return `route: auto preset, ${modelLabel(p.model)} executes implement and fix, Opus plans a hard task, climbs on failure${why ? `, advisor unavailable: ${why}` : ", advisor opus on plan and fix"}`;
|
|
22779
|
+
}
|
|
22753
22780
|
const exec = `route: decided at plan time, per-unit executors not applied (stages run the run model)${fixed ? `, ${modelLabel(fixed)} requested by LOKI_ROUTER_EXECUTOR` : ""}`;
|
|
22754
22781
|
if (why)
|
|
22755
22782
|
return `${exec}, advisor unavailable: ${why}`;
|
|
@@ -29399,6 +29426,8 @@ import { join as join91 } from "path";
|
|
|
29399
29426
|
function buildRouteRecord(i) {
|
|
29400
29427
|
const notProven = [...i.notProven, ...i.planModelNote ? [`plan model: NOT PROVEN (owner provider): ${i.planModelNote}`] : []];
|
|
29401
29428
|
const base2 = { plan_model: i.planModel, shape_key: i.shapeKey, route_not_proven: notProven, applied: PER_UNIT_EXECUTORS_APPLIED };
|
|
29429
|
+
if (i.preset)
|
|
29430
|
+
return { ...base2, applied: true, routed: true, executor: i.preset.model, source: "preset", reason: `${i.preset.reason}${i.skipReason ? `; ${i.skipReason}` : ""}`, units: [] };
|
|
29402
29431
|
if (i.units.length === 0) {
|
|
29403
29432
|
const why = i.skipReason ?? i.notProven[0] ?? "no per-unit routes returned";
|
|
29404
29433
|
return { ...base2, routed: false, executor: "sonnet", source: "default", reason: `no plan route (NOT PROVEN): ${why}`, units: [] };
|
|
@@ -32313,15 +32342,17 @@ async function planRoute(runDir, provider, env = process.env, repoDir = "") {
|
|
|
32313
32342
|
cached = bad ? { units: [], notProven: [bad] } : parseUnits(scope, advisorAvailable);
|
|
32314
32343
|
return cached;
|
|
32315
32344
|
};
|
|
32345
|
+
const preset = routerPreset(env);
|
|
32316
32346
|
const out2 = {
|
|
32317
32347
|
routed,
|
|
32348
|
+
preset,
|
|
32318
32349
|
advisor,
|
|
32319
32350
|
pinOpus,
|
|
32320
32351
|
pin: pinOpus ? { model: "opus" } : {},
|
|
32321
32352
|
pinFor: (onSonnet, runModel) => onSonnet ? { model: planFallbackModel(runModel) } : out2.pin,
|
|
32322
32353
|
planModel: (fastModel) => pinOpus ? "opus" : provider === "claude" ? fastModel : "provider default",
|
|
32323
32354
|
units: () => {
|
|
32324
|
-
if (!routed)
|
|
32355
|
+
if (!routed || preset)
|
|
32325
32356
|
return {};
|
|
32326
32357
|
const parsed = parse3();
|
|
32327
32358
|
return { units: parsed.units, route_not_proven: parsed.notProven };
|
|
@@ -32329,15 +32360,15 @@ async function planRoute(runDir, provider, env = process.env, repoDir = "") {
|
|
|
32329
32360
|
record: (o) => {
|
|
32330
32361
|
if (!routed)
|
|
32331
32362
|
return null;
|
|
32332
|
-
const parsed = o.skipReason ? { units: [], notProven: [] } : parse3();
|
|
32333
|
-
const rec2 = buildRouteRecord({ units: parsed.units, notProven: parsed.notProven, planModel: o.planModel, planModelNote: o.planModelNote ?? null, shapeKey: shapeKey2, skipReason: o.skipReason });
|
|
32363
|
+
const parsed = o.skipReason || preset ? { units: [], notProven: [] } : parse3();
|
|
32364
|
+
const rec2 = buildRouteRecord({ units: parsed.units, notProven: parsed.notProven, planModel: o.planModel, planModelNote: o.planModelNote ?? null, shapeKey: shapeKey2, skipReason: o.skipReason, ...preset ? { preset: presetExecutor(env) } : {} });
|
|
32334
32365
|
writeRouteRecord(runDir, rec2);
|
|
32335
32366
|
return rec2;
|
|
32336
32367
|
}
|
|
32337
32368
|
};
|
|
32338
32369
|
return out2;
|
|
32339
32370
|
}
|
|
32340
|
-
var ROUTER_UNITS_INSTRUCTION = 'In the same JSON file (<scope>) also add "units": [{"id":"<unit id>","kind":"<short kind>","executor":"sonnet"|"haiku","reason":"<=200 chars"}], one entry per work unit of your plan. The default executor is sonnet. Assign haiku to a unit only when you judge it safe for that unit and say why in reason. Give the Wall acceptance-test unit the id "wall".', planFallbackModel = (runModel) => {
|
|
32371
|
+
var ROUTER_UNITS_INSTRUCTION = 'In the same JSON file (<scope>) also add "units": [{"id":"<unit id>","kind":"<short kind>","executor":"sonnet"|"haiku","reason":"<=200 chars"}], one entry per work unit of your plan. The default executor is sonnet. Assign haiku to a unit only when you judge it safe for that unit and say why in reason. Give the Wall acceptance-test unit the id "wall".', PRESET_PLAN_INSTRUCTION = "A smaller model will implement your plan without re-deriving it. In those lines name the exact files and functions to change, the steps, the pitfalls (edge cases the task implies, behaviour that must not change) and the test to add or run that proves the fix.", planFallbackModel = (runModel) => {
|
|
32341
32372
|
const floor = runModel ? runFloor(runModel) : "sonnet";
|
|
32342
32373
|
const r = modelRank(clampToMaxTier(floor));
|
|
32343
32374
|
return r > modelRank("sonnet") && modelRank(floor) < modelRank("unknown-id") ? floor : "sonnet";
|
|
@@ -32430,11 +32461,12 @@ var init_plan = __esm(() => {
|
|
|
32430
32461
|
const sz = sizeTask(task, loaded, testMap);
|
|
32431
32462
|
const mode = planMode();
|
|
32432
32463
|
const pr = await planRoute(ctx.runDir, ctx.provider, process.env, ctx.repoDir);
|
|
32433
|
-
const
|
|
32464
|
+
const hard = pr.preset ? hardReason(sz.size, loaded, task) : null, routedPlan = pr.routed && (!pr.preset || hard !== null);
|
|
32465
|
+
const skip = mode === "never" || mode === "auto" && sz.size !== "large" && !routedPlan && !keepsPlanForConsentOrCap(process.env, process.stderr.isTTY === true, sz.size, () => namedFiles(task, loaded).length, () => loadProjectApi(ctx.repoDir)?.packages().length ?? 0);
|
|
32434
32466
|
const path = mode === "always" ? "wall" : smallTaskPath(sz.size, hasRelevantTests(task, loaded, testMap, ctx.tests.impacted));
|
|
32435
32467
|
ctx.emit("variant", null, { size: sz.size, reasons: sz.reasons, plan_mode: mode, plan_skipped: skip, wall_model: wallEnabled() ? wallFirstModel(sz.size) : null, wall_model_reauthor: wallEnabled() ? wallModel() : null, small_task_path: path, cascade: cascadeEnabled() });
|
|
32436
32468
|
if (skip)
|
|
32437
|
-
pr.record({ planModel: "none", skipReason: "plan stage skipped (LOKI_E10_PLAN=0)" });
|
|
32469
|
+
pr.record({ planModel: "none", skipReason: mode === "never" || !pr.preset ? "plan stage skipped (LOKI_E10_PLAN=0)" : `no plan session: task sized ${sz.size} and not hard` });
|
|
32438
32470
|
if (skip && mode === "auto")
|
|
32439
32471
|
seedPlanScope(ctx.runDir, namedFiles(task, loaded));
|
|
32440
32472
|
if (skip)
|
|
@@ -32445,7 +32477,9 @@ var init_plan = __esm(() => {
|
|
|
32445
32477
|
const cardOn = intentCardEnabled(process.env);
|
|
32446
32478
|
const runPlan = (onSonnet) => ctx.sessions.run({
|
|
32447
32479
|
stage: "plan",
|
|
32448
|
-
brief: buildPlanBrief(task, relevantFiles, outputPath, join102(ctx.runDir, PLAN_SCOPE_FILE), pr.routed, cardOn, mutationStrict(), reviewerBriefEnabled(), prior.intake?.assumptions)
|
|
32480
|
+
brief: buildPlanBrief(task, relevantFiles, outputPath, join102(ctx.runDir, PLAN_SCOPE_FILE), pr.routed && !pr.preset, cardOn, mutationStrict(), reviewerBriefEnabled(), prior.intake?.assumptions) + (pr.preset ? `
|
|
32481
|
+
|
|
32482
|
+
${PRESET_PLAN_INSTRUCTION}` : ""),
|
|
32449
32483
|
tier: "fast",
|
|
32450
32484
|
iterationId,
|
|
32451
32485
|
limitS: planStage.limitS,
|
|
@@ -32498,9 +32532,10 @@ function routeStart(ctx, first, plan, size) {
|
|
|
32498
32532
|
ctx.emit("route", "implement", { unit: UNIT, model: rr.model, source: rr.source, reason: rr.reason });
|
|
32499
32533
|
return { current: rr.model, escalations: [] };
|
|
32500
32534
|
}
|
|
32501
|
-
async function routeEscalate(ctx, first, session, rt, ids) {
|
|
32502
|
-
const
|
|
32503
|
-
const
|
|
32535
|
+
async function routeEscalate(ctx, first, session, rt, ids, noDiff = () => false) {
|
|
32536
|
+
const claim = !session.killed && session.markers.alreadyDone !== null && routerPreset() && noDiff();
|
|
32537
|
+
const trig = session.killed ? "limit_kill" : session.markers.escalate ? "escalate_marker" : session.markers.specConflict ? "spec_conflict" : claim ? "already_done_claim" : null;
|
|
32538
|
+
const esc4 = trig ? climb(UNIT, rt.current, trig, session.markers.escalate ?? session.markers.specConflict ?? (claim ? `already-done claim with no diff: ${session.markers.alreadyDone}` : "implement session limit kill")) : null;
|
|
32504
32539
|
if (!esc4)
|
|
32505
32540
|
return session;
|
|
32506
32541
|
rt.escalations.push(esc4);
|
|
@@ -32682,7 +32717,7 @@ var init_implement = __esm(() => {
|
|
|
32682
32717
|
const impacted = impactedTests(ctx);
|
|
32683
32718
|
const readOnly = prior.wall?.readOnlyFiles ?? [];
|
|
32684
32719
|
const routed = routerActive();
|
|
32685
|
-
const downgrade = routed ? null : cascadeDowngrade(ctx.model)
|
|
32720
|
+
const downgrade = routed ? null : cascadeDowngrade(ctx.model);
|
|
32686
32721
|
const cascade = downgrade !== null;
|
|
32687
32722
|
if (downgrade)
|
|
32688
32723
|
process.stderr.write(`${downgrade.note}
|
|
@@ -32733,7 +32768,7 @@ var init_implement = __esm(() => {
|
|
|
32733
32768
|
session = await ctx.sessions.run({ ...unchained(), iterationId: retry });
|
|
32734
32769
|
}
|
|
32735
32770
|
if (rt && !signal.aborted)
|
|
32736
|
-
session = await routeEscalate(ctx, first, session, rt, ids);
|
|
32771
|
+
session = await routeEscalate(ctx, first, session, rt, ids, () => treeIsEmpty(ctx));
|
|
32737
32772
|
if (session.markers.specConflict && !session.killed) {
|
|
32738
32773
|
const r = await resumeAfterConflict(ctx, { ...unchained(), iterationId: ids[ids.length - 1] }, session);
|
|
32739
32774
|
session = r.session;
|
|
@@ -35915,7 +35950,7 @@ function claudeAuthStatusLoggedIn(cli = "claude", env = process.env) {
|
|
|
35915
35950
|
return "";
|
|
35916
35951
|
}
|
|
35917
35952
|
}
|
|
35918
|
-
function providerAutodetected(checks, env = process.env) {
|
|
35953
|
+
function providerAutodetected(checks, env = process.env, repoDir = process.cwd()) {
|
|
35919
35954
|
return PROVIDERS.some((p) => {
|
|
35920
35955
|
const c = checks.find((x) => x.command === p);
|
|
35921
35956
|
if (!c?.found)
|
|
@@ -35923,7 +35958,7 @@ function providerAutodetected(checks, env = process.env) {
|
|
|
35923
35958
|
const cli = c.path ?? p;
|
|
35924
35959
|
if (p === "claude")
|
|
35925
35960
|
return !providerAuthPath(p, env).startsWith("cli_login") || claudeAuthStatusLoggedIn(cli, env) === "yes";
|
|
35926
|
-
return providerLoginIssue(p, cli, env) === null;
|
|
35961
|
+
return providerLoginIssue(p, cli, env, repoDir) === null;
|
|
35927
35962
|
});
|
|
35928
35963
|
}
|
|
35929
35964
|
function claudeLoginProbeCached(cli, env = process.env, now2 = Date.now()) {
|
|
@@ -88775,6 +88810,8 @@ function planRouterSession(args) {
|
|
|
88775
88810
|
const routed = routerEnabled(env);
|
|
88776
88811
|
if (!routed && !advisorOnlyEnabled(env))
|
|
88777
88812
|
return null;
|
|
88813
|
+
if (routed && routerPreset(env) && /opus/i.test(args.model))
|
|
88814
|
+
return null;
|
|
88778
88815
|
const probe = probeAdvisor(env, "claude", args.claudeCodeVersion, args.runDir, advisorPair(env, args.model));
|
|
88779
88816
|
if (!routed)
|
|
88780
88817
|
return probe.available ? { model: args.model, settings: { advisorModel: ROUTER_ADVISOR_MODEL } } : null;
|
|
@@ -88788,6 +88825,8 @@ function planRouterSession(args) {
|
|
|
88788
88825
|
}
|
|
88789
88826
|
};
|
|
88790
88827
|
}
|
|
88828
|
+
if (routerPreset(env) && env["LOKI_ADVISOR_SCOPE"] === "off")
|
|
88829
|
+
return null;
|
|
88791
88830
|
return { model: isHaikuModel(args.model) ? "sonnet" : args.model, advisorReason: probe.reason };
|
|
88792
88831
|
}
|
|
88793
88832
|
function cliSettingsJson(hostGuard2, router, fence2) {
|
|
@@ -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.
|
|
5
|
+
"version": "11.124.1",
|
|
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",
|
package/providers/loader.sh
CHANGED
|
@@ -18,6 +18,12 @@ loki_removed_provider_message() {
|
|
|
18
18
|
printf "loki: provider '%s' is no longer supported. Supported providers: claude (Claude Code CLI, or an Anthropic API key through the Agent SDK) and opencode (any model, including OpenRouter via OPENROUTER_API_KEY). Switch with --provider claude or --provider opencode, or unset LOKI_PROVIDER.\n" "$1"
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
# loki_removed_saved_provider_hint NAME -- the second line when NAME came from the
|
|
22
|
+
# project's saved choice (.loki/state/provider), which the flag and env advice cannot clear.
|
|
23
|
+
loki_removed_saved_provider_hint() {
|
|
24
|
+
printf "loki: this project saved provider '%s' in .loki/state/provider; switch it with: loki provider set claude\n" "$1"
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
# loki_is_removed_provider NAME -- 0 when NAME is a removed provider.
|
|
22
28
|
loki_is_removed_provider() {
|
|
23
29
|
local p
|
|
@@ -57,7 +63,7 @@ loki_otel_passthrough_export() {
|
|
|
57
63
|
|
|
58
64
|
# Validate provider name
|
|
59
65
|
validate_provider() {
|
|
60
|
-
local provider="$1"
|
|
66
|
+
local provider="$1" p
|
|
61
67
|
for p in "${SUPPORTED_PROVIDERS[@]}"; do
|
|
62
68
|
if [[ "$p" == "$provider" ]]; then
|
|
63
69
|
return 0
|
|
@@ -66,6 +72,14 @@ validate_provider() {
|
|
|
66
72
|
return 1
|
|
67
73
|
}
|
|
68
74
|
|
|
75
|
+
# loki_supported_providers_joined [SEP] -- SUPPORTED_PROVIDERS joined by SEP (default ", "),
|
|
76
|
+
# independent of the caller's IFS.
|
|
77
|
+
loki_supported_providers_joined() {
|
|
78
|
+
local sep="${1-, }" out="" p
|
|
79
|
+
for p in "${SUPPORTED_PROVIDERS[@]}"; do out="${out:+$out$sep}$p"; done
|
|
80
|
+
printf '%s' "$out"
|
|
81
|
+
}
|
|
82
|
+
|
|
69
83
|
# Load provider configuration
|
|
70
84
|
load_provider() {
|
|
71
85
|
local provider="${1:-$DEFAULT_PROVIDER}"
|
|
@@ -236,9 +250,10 @@ print_capability_matrix() {
|
|
|
236
250
|
}
|
|
237
251
|
|
|
238
252
|
# Auto-detect best available provider
|
|
239
|
-
# Priority: Claude (Tier 1, full) > opencode (model-agnostic)
|
|
253
|
+
# Priority: SUPPORTED_PROVIDERS order, Claude (Tier 1, full) > opencode (model-agnostic)
|
|
240
254
|
auto_detect_provider() {
|
|
241
|
-
|
|
255
|
+
local p
|
|
256
|
+
for p in "${SUPPORTED_PROVIDERS[@]}"; do
|
|
242
257
|
if check_provider_installed "$p"; then
|
|
243
258
|
echo "$p"
|
|
244
259
|
return 0
|
|
@@ -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-PdsIYs8D.js";import{B as C}from"./Button-y19VaxSR.js";import{T as $e}from"./trending-up-ahzpV7N6.js";import{C as z}from"./clock-DW0A6_om.js";import{A as Be,U as ue,M as De}from"./Avatar-DcHwmo8Q.js";import{A as J}from"./activity-CP62VCuF.js";import{R as pe}from"./refresh-cw-odLkbX4s.js";import{G as ze}from"./globe-CxjteMVu.js";import{C as Le}from"./chevron-left-DqxUiGVI.js";import{C as je}from"./check-Dr3Y24yi.js";import{D as Y}from"./dollar-sign-Bx88-uC1.js";import{U as Te}from"./user-C72PyQtn.js";import{D as Me}from"./database-DrakaR5y.js";import{L as Ue}from"./lock-DCPTgRju.js";import{S as Re}from"./scroll-text--pDgaJgE.js";import{S as Ie}from"./shield-alert-CcQwHRj8.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-PdsIYs8D.js";import{C as r}from"./clock-DW0A6_om.js";import{C as a}from"./circle-alert-DItIPVXH.js";import{C as l}from"./check-Dr3Y24yi.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-PdsIYs8D.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-PdsIYs8D.js";import{P as K,S as He,E as Be}from"./ErrorBoundary-mLvOnCJ1.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-Dlt9cYEo.js";import{C as oe}from"./check-Dr3Y24yi.js";import{C as Ye}from"./clock-DW0A6_om.js";import{D as Xe}from"./dollar-sign-Bx88-uC1.js";import{U as Ze}from"./upload-BMRTmfO-.js";import{L as V}from"./loader-circle-ZFbmGHbG.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-alvwtVBH.js";function f({value:l,prefix:t="",suffix:s=""}){const[u,n]=o.useState(0),c=o.useRef(0);return o.useEffect(()=>{const a=c.current,h=l-a;if(h===0)return;const i=600,d=performance.now();function r(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(r)}requestAnimationFrame(r)},[l]),e.jsxs("span",{className:"tabular-nums",children:[t,u.toLocaleString(),s]})}function g(){const[l,t]=o.useState(5),[s,u]=o.useState(30),[n,c]=o.useState(75),a=.4,i=Math.round(l*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:[l," developers"]})]}),e.jsx("input",{type:"range",min:1,max:50,value:l,onChange:r=>t(Number(r.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:r=>u(Number(r.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:r=>c(Number(r.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:"Any model via opencode (OpenRouter, local)",category:"AI Models",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"Provider auto-failover (Claude Code, opencode)",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:l}){return typeof l=="string"?e.jsx("span",{className:"text-xs text-[#6B6960] font-medium",children:l}):l?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 l=[...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:l.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-PdsIYs8D.js";function f({value:l,prefix:t="",suffix:s=""}){const[u,n]=o.useState(0),c=o.useRef(0);return o.useEffect(()=>{const a=c.current,h=l-a;if(h===0)return;const i=600,d=performance.now();function r(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(r)}requestAnimationFrame(r)},[l]),e.jsxs("span",{className:"tabular-nums",children:[t,u.toLocaleString(),s]})}function g(){const[l,t]=o.useState(5),[s,u]=o.useState(30),[n,c]=o.useState(75),a=.4,i=Math.round(l*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:[l," developers"]})]}),e.jsx("input",{type:"range",min:1,max:50,value:l,onChange:r=>t(Number(r.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:r=>u(Number(r.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:r=>c(Number(r.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:"Any model via opencode (OpenRouter, local)",category:"AI Models",lokiMode:!0,boltNew:!1,replit:!1,lovable:!1},{feature:"Provider auto-failover (Claude Code, opencode)",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:l}){return typeof l=="string"?e.jsx("span",{className:"text-xs text-[#6B6960] font-medium",children:l}):l?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 l=[...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:l.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-DNEXfKYK.js → EvidenceReceiptPanel-BkmkNppK.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-PdsIYs8D.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-PdsIYs8D.js";import{B as N}from"./Button-y19VaxSR.js";import{C as y}from"./thumbs-up-Dlt9cYEo.js";import{R as S}from"./refresh-cw-odLkbX4s.js";import{C as z}from"./circle-alert-DItIPVXH.js";import{U as D}from"./user-C72PyQtn.js";import{L as G}from"./loader-circle-ZFbmGHbG.js";import{R as T}from"./rotate-ccw-BwYmXJvd.js";/**
|
|
2
2
|
* @license lucide-react v0.577.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|