loki-mode 11.60.16 → 11.60.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/SKILL.md +2 -2
  2. package/VERSION +1 -1
  3. package/dashboard/__init__.py +1 -1
  4. package/docs/CLI-REFERENCE.md +1 -1
  5. package/docs/INSTALLATION.md +1 -1
  6. package/docs/v10/ENGINE.md +1 -1
  7. package/docs/v10/FAILURE-CLASSES.md +11 -1
  8. package/loki-ts/dist/loki.js +1139 -1139
  9. package/mcp/__init__.py +1 -1
  10. package/package.json +2 -2
  11. package/packages/control-plane/dist/server.js +93 -66
  12. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  13. package/web-app/dist/assets/{AdminPage-TvrgrZuw.js → AdminPage-BW8YrW2R.js} +1 -1
  14. package/web-app/dist/assets/{Avatar-Bb4nNhFM.js → Avatar-CCDSSzLt.js} +1 -1
  15. package/web-app/dist/assets/{Badge-HJfuedzY.js → Badge-BD5d92z2.js} +1 -1
  16. package/web-app/dist/assets/{Button-BFyEBTEH.js → Button-f63Oxy1n.js} +1 -1
  17. package/web-app/dist/assets/{CockpitPage-cRbFng0Y.js → CockpitPage-CsdBSsAj.js} +1 -1
  18. package/web-app/dist/assets/{ComparePage-BDWvRPJH.js → ComparePage-BP11ARlq.js} +1 -1
  19. package/web-app/dist/assets/{ErrorBoundary-BFB3B6qS.js → ErrorBoundary-C00mkTuC.js} +1 -1
  20. package/web-app/dist/assets/{EvidenceReceiptPanel-DfPpa99E.js → EvidenceReceiptPanel-BPl72tXy.js} +1 -1
  21. package/web-app/dist/assets/{GitHubIssuesPanel-Cgg-TamR.js → GitHubIssuesPanel-dCYFAAjl.js} +1 -1
  22. package/web-app/dist/assets/{GitHubPRsPanel-DXlznNaT.js → GitHubPRsPanel-wAvjuDVv.js} +1 -1
  23. package/web-app/dist/assets/{HomePage-RDqLk0LD.js → HomePage-Bfu3HCuS.js} +2 -2
  24. package/web-app/dist/assets/{LoginPage-Dxhe9oga.js → LoginPage-DOgJ0boz.js} +1 -1
  25. package/web-app/dist/assets/{MagicPage-HANTah--.js → MagicPage-DSe4H6rd.js} +1 -1
  26. package/web-app/dist/assets/{MetricsPage-BxjoBHhg.js → MetricsPage-SUZcqVZa.js} +1 -1
  27. package/web-app/dist/assets/{NotFoundPage-Bn3V3qWo.js → NotFoundPage-71HqvBpd.js} +1 -1
  28. package/web-app/dist/assets/{ProjectPage-D3KYFM_N.js → ProjectPage-6pM92L4H.js} +3 -3
  29. package/web-app/dist/assets/{ProjectsPage-DV6_tZIm.js → ProjectsPage-C31K8vK7.js} +1 -1
  30. package/web-app/dist/assets/{SettingsPage-JtbU2vOp.js → SettingsPage-CPYtV5p5.js} +1 -1
  31. package/web-app/dist/assets/{ShowcasePage-DuB5e7_g.js → ShowcasePage-DIrDa7WZ.js} +1 -1
  32. package/web-app/dist/assets/{SystemSettingsPage-BU3kLT-C.js → SystemSettingsPage-B_Lr8J2w.js} +1 -1
  33. package/web-app/dist/assets/{TeamsPage-B5etAmaN.js → TeamsPage-CVpXnDrZ.js} +1 -1
  34. package/web-app/dist/assets/{TemplatesPage-sM2zXEt-.js → TemplatesPage-BUmcz9TZ.js} +1 -1
  35. package/web-app/dist/assets/{TerminalOutput-DO6_1_OF.js → TerminalOutput-DIKRGZky.js} +1 -1
  36. package/web-app/dist/assets/{activity-D_wZmvHi.js → activity-DQGYAnDo.js} +1 -1
  37. package/web-app/dist/assets/{bell-CVimd2CM.js → bell-CmH_uF75.js} +1 -1
  38. package/web-app/dist/assets/{bot-BKqzjwM8.js → bot-DKzc5Abb.js} +1 -1
  39. package/web-app/dist/assets/{check-Cn1hwqkh.js → check-N7f-OZcj.js} +1 -1
  40. package/web-app/dist/assets/{chevron-left-DB9zn9HI.js → chevron-left-BVF4vk0j.js} +1 -1
  41. package/web-app/dist/assets/{circle-alert-BzFzXBcE.js → circle-alert-BwfEcWFa.js} +1 -1
  42. package/web-app/dist/assets/{clock-CVVX5Ua9.js → clock-DxNOfHv8.js} +1 -1
  43. package/web-app/dist/assets/{cloud-DiI7PVHH.js → cloud-CAUegaX1.js} +1 -1
  44. package/web-app/dist/assets/{code-xml-BqlhbmzB.js → code-xml-BUxlP8E0.js} +1 -1
  45. package/web-app/dist/assets/{database-DgseRvlB.js → database-IUnWpRt1.js} +1 -1
  46. package/web-app/dist/assets/{dollar-sign-BAT5CB0s.js → dollar-sign-DLcxkHGd.js} +1 -1
  47. package/web-app/dist/assets/{file-code-corner-C28U8mha.js → file-code-corner-Crt-zQTD.js} +1 -1
  48. package/web-app/dist/assets/{file-plus-BHpkgmZD.js → file-plus-CfW5zriD.js} +1 -1
  49. package/web-app/dist/assets/{globe-efHzOFvw.js → globe-CSge_JW3.js} +1 -1
  50. package/web-app/dist/assets/{hammer-BNj9Z8wQ.js → hammer-Cl2U11bR.js} +1 -1
  51. package/web-app/dist/assets/{index-DrlVp90a.js → index-DQ8ylLMg.js} +3 -3
  52. package/web-app/dist/assets/{layers-SnxbBdfu.js → layers-5sdMKBmv.js} +1 -1
  53. package/web-app/dist/assets/{loader-circle-CpbdyIIE.js → loader-circle-CIViNlk9.js} +1 -1
  54. package/web-app/dist/assets/{lock-B9Mcva56.js → lock-DbeIC2jA.js} +1 -1
  55. package/web-app/dist/assets/{package-BBjAd_UN.js → package-bfVjg0k1.js} +1 -1
  56. package/web-app/dist/assets/{plus-ej-ppzKQ.js → plus-1s7_sbc6.js} +1 -1
  57. package/web-app/dist/assets/{refresh-cw-BXbsk51e.js → refresh-cw-Ch_wn5l7.js} +1 -1
  58. package/web-app/dist/assets/{rotate-ccw-Cb4X8EVi.js → rotate-ccw-BartSyn7.js} +1 -1
  59. package/web-app/dist/assets/{scroll-text-DCb61Xlz.js → scroll-text-YPRcU_Qk.js} +1 -1
  60. package/web-app/dist/assets/{server-BZhPvvap.js → server-BY-Tbej7.js} +1 -1
  61. package/web-app/dist/assets/{shield-alert-DbWTSwyQ.js → shield-alert-FM6n4l1C.js} +1 -1
  62. package/web-app/dist/assets/{thumbs-up-D5g0RmUD.js → thumbs-up-CrX-0nPE.js} +1 -1
  63. package/web-app/dist/assets/{trash-2-BMXU1ub4.js → trash-2-C02sNQRG.js} +1 -1
  64. package/web-app/dist/assets/{trending-down-CIRdrfaH.js → trending-down-D7xSwH0o.js} +1 -1
  65. package/web-app/dist/assets/{trending-up-BSwU7Axb.js → trending-up-C5gGWwWf.js} +1 -1
  66. package/web-app/dist/assets/{upload-CwgdnNp1.js → upload-GjbBw0lN.js} +1 -1
  67. package/web-app/dist/assets/{usePolling-BciPnllz.js → usePolling-BYewznRd.js} +1 -1
  68. package/web-app/dist/assets/{user-umWJhl16.js → user-BQ4x5DPu.js} +1 -1
  69. package/web-app/dist/index.html +1 -1
package/mcp/__init__.py CHANGED
@@ -75,4 +75,4 @@ try:
75
75
  except ImportError:
76
76
  __all__ = ['mcp']
77
77
 
78
- __version__ = '11.60.16'
78
+ __version__ = '11.60.17'
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.60.16",
4
+ "version": "11.60.17",
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": "c891c77d561e750bbee24a8c4d13a427fa922a42"
163
+ "gitHead": "d7ee510e430526280534fe0c4cbc886b5a1deda8"
164
164
  }
@@ -7651,8 +7651,8 @@ var init_paths = __esm(() => {
7651
7651
 
7652
7652
  // ../../loki-ts/src/engine10/cache.ts
7653
7653
  import { createHash as createHash6 } from "crypto";
7654
- import { existsSync as existsSync15, mkdirSync as mkdirSync5, readdirSync as readdirSync9, readFileSync as readFileSync18, statSync as statSync12, unlinkSync as unlinkSync3, writeFileSync as writeFileSync8 } from "fs";
7655
- import { basename as basename8, resolve as resolve8 } from "path";
7654
+ import { chmodSync as chmodSync4, existsSync as existsSync15, mkdirSync as mkdirSync5, readdirSync as readdirSync9, readFileSync as readFileSync18, renameSync as renameSync4, statSync as statSync12, unlinkSync as unlinkSync3, writeFileSync as writeFileSync8 } from "fs";
7655
+ import { basename as basename8, relative, resolve as resolve8 } from "path";
7656
7656
  function repoKey(originUrl, repoDir) {
7657
7657
  const basis = originUrl && originUrl.trim() !== "" ? originUrl : resolve8(repoDir);
7658
7658
  return createHash6("sha256").update(basis).digest("hex");
@@ -7676,7 +7676,34 @@ function readJson3(path, isValid = (_v) => true) {
7676
7676
  function isRepoMap(v) {
7677
7677
  return typeof v === "object" && v !== null && Array.isArray(v.files) && Array.isArray(v.entries);
7678
7678
  }
7679
- var readRepoMapCache = (dir, tree) => readJson3(resolve8(dir, `repomap2-${tree}.json`), isRepoMap);
7679
+ function sourceFingerprint(root) {
7680
+ const h = createHash6("sha256");
7681
+ const walk = (dir) => {
7682
+ for (const e of readdirSync9(dir, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : 1)) {
7683
+ const p = resolve8(dir, e.name);
7684
+ if (e.isDirectory()) {
7685
+ if (e.name !== "node_modules")
7686
+ walk(p);
7687
+ } else if (e.isFile() && e.name.endsWith(".ts"))
7688
+ h.update(`${relative(root, p)}\x00`).update(readFileSync18(p)).update("\x00");
7689
+ }
7690
+ };
7691
+ walk(root);
7692
+ return h.digest("hex");
7693
+ }
7694
+ function computeProducerFingerprint(root = resolve8(import.meta.dir, ".."), injected = globalThis.__LOKI_PRODUCER_FP__) {
7695
+ if (typeof injected === "string" && /^[0-9a-f]{64}$/.test(injected))
7696
+ return injected;
7697
+ try {
7698
+ return sourceFingerprint(root);
7699
+ } catch {
7700
+ return createHash6("sha256").update(`unbound:${process.pid}:${Date.now()}:${Math.random()}`).digest("hex");
7701
+ }
7702
+ }
7703
+ function producerFingerprint() {
7704
+ return producerFp ??= computeProducerFingerprint();
7705
+ }
7706
+ var producerFp = null, cacheFileName = (kind, tree, fp = producerFingerprint()) => `${kind}-${fp.slice(0, 16)}-${tree}.json`, readRepoMapCache = (dir, tree, fp = producerFingerprint()) => readJson3(resolve8(dir, cacheFileName("repomap", tree, fp)), isRepoMap);
7680
7707
  var init_cache = __esm(() => {
7681
7708
  init_paths();
7682
7709
  });
@@ -7867,7 +7894,7 @@ var init_price_table = __esm(() => {
7867
7894
  });
7868
7895
 
7869
7896
  // ../../loki-ts/src/providers/provider_cost.ts
7870
- import { existsSync as existsSync16, mkdirSync as mkdirSync6, readdirSync as readdirSync10, readFileSync as readFileSync20, renameSync as renameSync4, writeFileSync as writeFileSync9 } from "fs";
7897
+ import { existsSync as existsSync16, mkdirSync as mkdirSync6, readdirSync as readdirSync10, readFileSync as readFileSync20, renameSync as renameSync5, writeFileSync as writeFileSync9 } from "fs";
7871
7898
  import { dirname as dirname7, join as join27 } from "path";
7872
7899
  function withArchivedCosts(lokiRoot, ids, keep = () => true) {
7873
7900
  let files = [];
@@ -8102,7 +8129,7 @@ import {
8102
8129
  mkdirSync as mkdirSync8,
8103
8130
  openSync as openSync5,
8104
8131
  readSync as readSync4,
8105
- renameSync as renameSync5,
8132
+ renameSync as renameSync6,
8106
8133
  rmSync as rmSync5,
8107
8134
  statSync as statSync13,
8108
8135
  unlinkSync as unlinkSync4,
@@ -8120,7 +8147,7 @@ function durableWriteThenRename(target, body) {
8120
8147
  } finally {
8121
8148
  closeSync5(fd);
8122
8149
  }
8123
- renameSync5(tmp, target);
8150
+ renameSync6(tmp, target);
8124
8151
  fsyncParentDir(target);
8125
8152
  }
8126
8153
  function fsyncParentDir(target) {
@@ -8148,7 +8175,7 @@ function atomicWriteText(target, body, opts = {}) {
8148
8175
  mkdirSync8(dirname9(target), { recursive: true });
8149
8176
  const tmp = tmpPathFor(target);
8150
8177
  writeFileSync11(tmp, body);
8151
- renameSync5(tmp, target);
8178
+ renameSync6(tmp, target);
8152
8179
  return;
8153
8180
  }
8154
8181
  durableWriteThenRename(target, body);
@@ -8615,7 +8642,7 @@ var init_schema = __esm(() => {
8615
8642
  });
8616
8643
 
8617
8644
  // ../../loki-ts/src/runner/router/history_store.ts
8618
- import { existsSync as existsSync19, mkdirSync as mkdirSync10, readFileSync as readFileSync24, renameSync as renameSync6, rmSync as rmSync6, writeFileSync as writeFileSync13 } from "fs";
8645
+ import { existsSync as existsSync19, mkdirSync as mkdirSync10, readFileSync as readFileSync24, renameSync as renameSync7, rmSync as rmSync6, writeFileSync as writeFileSync13 } from "fs";
8619
8646
  import { resolve as resolve12 } from "path";
8620
8647
  function validRun(v) {
8621
8648
  if (typeof v !== "object" || v === null)
@@ -8647,7 +8674,7 @@ function appendRunOutcome(key, outcome, cacheRoot) {
8647
8674
  const tmp = `${target}.${process.pid}.tmp`;
8648
8675
  try {
8649
8676
  writeFileSync13(tmp, JSON.stringify({ runs: runs2 }));
8650
- renameSync6(tmp, target);
8677
+ renameSync7(tmp, target);
8651
8678
  } catch (e) {
8652
8679
  rmSync6(tmp, { force: true, recursive: false });
8653
8680
  throw e;
@@ -9418,11 +9445,11 @@ var init_test_file_text = __esm(() => {
9418
9445
 
9419
9446
  // ../../loki-ts/src/engine10/testmap.ts
9420
9447
  import { existsSync as existsSync23, readFileSync as readFileSync29, realpathSync as realpathSync15 } from "fs";
9421
- import { basename as basename11, dirname as dirname14, extname, isAbsolute as isAbsolute2, join as join36, relative, sep as sep10 } from "path";
9448
+ import { basename as basename11, dirname as dirname14, extname, isAbsolute as isAbsolute2, join as join36, relative as relative2, sep as sep10 } from "path";
9422
9449
  function projectInterpreter(root) {
9423
9450
  const ve = process.env["VIRTUAL_ENV"], inRepo = (p) => {
9424
9451
  try {
9425
- const r = relative(realpathSync15(root), realpathSync15(p));
9452
+ const r = relative2(realpathSync15(root), realpathSync15(p));
9426
9453
  return r !== "" && !r.startsWith("..") && !isAbsolute2(r);
9427
9454
  } catch {
9428
9455
  return false;
@@ -9441,8 +9468,8 @@ var init_testmap = __esm(() => {
9441
9468
  // ../../loki-ts/src/util/check_result.ts
9442
9469
  import { spawn as spawn7 } from "child_process";
9443
9470
  import { createHash as createHash8 } from "crypto";
9444
- import { existsSync as existsSync24, mkdirSync as mkdirSync12, readFileSync as readFileSync30, realpathSync as realpathSync16, renameSync as renameSync7, rmSync as rmSync8, writeFileSync as writeFileSync15 } from "fs";
9445
- import { basename as basename12, dirname as dirname15, isAbsolute as isAbsolute3, join as join37, relative as relative2 } from "path";
9471
+ import { existsSync as existsSync24, mkdirSync as mkdirSync12, readFileSync as readFileSync30, realpathSync as realpathSync16, renameSync as renameSync8, rmSync as rmSync8, writeFileSync as writeFileSync15 } from "fs";
9472
+ import { basename as basename12, dirname as dirname15, isAbsolute as isAbsolute3, join as join37, relative as relative3 } from "path";
9446
9473
  function plainTestEnv(base = process.env) {
9447
9474
  const e = {};
9448
9475
  for (const [k, v] of Object.entries(tokenFreeEnv(base)))
@@ -9869,7 +9896,7 @@ function publishableWall(repoDir, runDir, o, env = process.env) {
9869
9896
  if (env["LOKI_COMMIT_WALL"] === "0")
9870
9897
  return out2;
9871
9898
  for (const w of arr2(o.wall?.["files"])) {
9872
- const rel = relative2(repoDir, String(w["path"])), hit = arr2(o.verify?.["checks"]).find((c) => tgt.has(String(c["name"])) && String(c["name"]).slice(String(c["name"]).indexOf(":") + 1) === rel && hasExecutedProof([c]));
9899
+ const rel = relative3(repoDir, String(w["path"])), hit = arr2(o.verify?.["checks"]).find((c) => tgt.has(String(c["name"])) && String(c["name"]).slice(String(c["name"]).indexOf(":") + 1) === rel && hasExecutedProof([c]));
9873
9900
  if (!hit || rel.startsWith("..") || isAbsolute3(rel) || rel.startsWith(".loki/") || !basename12(rel).startsWith("loki_wall_"))
9874
9901
  continue;
9875
9902
  try {
@@ -9963,7 +9990,7 @@ function recordRisk(repoDir, a) {
9963
9990
  mkdirSync12(dir, { recursive: true });
9964
9991
  writeFileSync15(`${p}.tmp`, JSON.stringify(a, null, 2) + `
9965
9992
  `);
9966
- renameSync7(`${p}.tmp`, p);
9993
+ renameSync8(`${p}.tmp`, p);
9967
9994
  return p;
9968
9995
  } catch {
9969
9996
  return null;
@@ -10147,7 +10174,7 @@ ${err}` });
10147
10174
  function resolveTool(repoDir, bin, fallback, lastResort = fallback) {
10148
10175
  const inRepo = (p) => {
10149
10176
  try {
10150
- const r = relative2(realpathSync16(repoDir), realpathSync16(p));
10177
+ const r = relative3(realpathSync16(repoDir), realpathSync16(p));
10151
10178
  return r !== "" && !r.startsWith("..") && !isAbsolute3(r);
10152
10179
  } catch {
10153
10180
  return false;
@@ -10201,7 +10228,7 @@ async function wallChild(git, runId, repoDir, wallFiles) {
10201
10228
  if (!(await git(["log", "-1", "--format=%B", "HEAD"])).out.split(`
10202
10229
  `).includes(`Loki-Wall-Publish: ${runId}`))
10203
10230
  return false;
10204
- const want = new Map((Array.isArray(wallFiles) ? wallFiles : []).map((w) => [relative2(repoDir, w.path), w.sha256]));
10231
+ const want = new Map((Array.isArray(wallFiles) ? wallFiles : []).map((w) => [relative3(repoDir, w.path), w.sha256]));
10205
10232
  const names = (await git(["diff", "--name-only", "--no-renames", "-z", "HEAD^", "HEAD"])).out.split("\x00").filter(Boolean);
10206
10233
  if (names.length === 0)
10207
10234
  return false;
@@ -10255,7 +10282,7 @@ var NO_TESTS_REASON = "no tests executed", NO_RUNNER_REASON = "no runner of this
10255
10282
  return null;
10256
10283
  }
10257
10284
  }, OWNER_FILES, CRITICAL_TOKENS, criticalToken = (path) => path.split(/[\/._-]+/).find((t) => CRITICAL_TOKENS.test(t)), withoutStaleWall = (items, own, repoDir) => {
10258
- const mine = new Set(own.map((p) => isAbsolute3(p) ? relative2(repoDir, p) : p));
10285
+ const mine = new Set(own.map((p) => isAbsolute3(p) ? relative3(repoDir, p) : p));
10259
10286
  return items.filter((it) => {
10260
10287
  const f = typeof it === "string" ? it : it.path;
10261
10288
  return !/(^|\/)loki_wall_[^/]*$/.test(f) || mine.has(f);
@@ -10327,7 +10354,7 @@ var init_check_result = __esm(() => {
10327
10354
 
10328
10355
  // ../../loki-ts/src/util/receipt_signer.ts
10329
10356
  import { createHash as createHash9, randomBytes as randomBytes3, createPrivateKey, createPublicKey as createPublicKey2, generateKeyPairSync, sign, verify as verify2 } from "crypto";
10330
- import { chmodSync as chmodSync4, linkSync, mkdirSync as mkdirSync13, readdirSync as readdirSync14, readFileSync as readFileSync31, renameSync as renameSync8, statSync as statSync15, unlinkSync as unlinkSync5, writeFileSync as writeFileSync16 } from "fs";
10357
+ import { chmodSync as chmodSync5, linkSync, mkdirSync as mkdirSync13, readdirSync as readdirSync14, readFileSync as readFileSync31, renameSync as renameSync9, statSync as statSync15, unlinkSync as unlinkSync5, writeFileSync as writeFileSync16 } from "fs";
10331
10358
  import { homedir as homedir8 } from "os";
10332
10359
  import { spawnSync as spawnSync2 } from "child_process";
10333
10360
  import { dirname as dirname16, join as join38 } from "path";
@@ -10357,7 +10384,7 @@ function loadSigningKey(generate = true) {
10357
10384
  if (!given) {
10358
10385
  for (const [f, m] of [[file, 384], [dirname16(file), 448]])
10359
10386
  if (statSync15(f).mode & 63)
10360
- chmodSync4(f, m);
10387
+ chmodSync5(f, m);
10361
10388
  }
10362
10389
  } catch (e) {
10363
10390
  if (e.code !== "ENOENT")
@@ -10510,7 +10537,7 @@ var init_stop_restore = __esm(() => {
10510
10537
 
10511
10538
  // ../../loki-ts/src/util/base_guard.ts
10512
10539
  import { existsSync as existsSync25, readdirSync as readdirSync15, readFileSync as readFileSync32, readlinkSync, realpathSync as realpathSync17, symlinkSync } from "fs";
10513
- import { basename as basename13, join as join39, relative as relative3, resolve as resolve14, sep as sep11 } from "path";
10540
+ import { basename as basename13, join as join39, relative as relative4, resolve as resolve14, sep as sep11 } from "path";
10514
10541
  import { fileURLToPath as fileURLToPath6 } from "url";
10515
10542
  function insideAny(p, roots) {
10516
10543
  const under = (q) => roots.some((r) => q === r || q.startsWith(r + sep11));
@@ -10579,7 +10606,7 @@ function depsSeeHead(pkgDir, repoDir) {
10579
10606
  async function zeroOnBase(cands, baseDir, repoDir, run2, note) {
10580
10607
  const zero = [];
10581
10608
  for (const c of cands) {
10582
- const src = join39(repoDir, relative3(baseDir, c.cwd));
10609
+ const src = join39(repoDir, relative4(baseDir, c.cwd));
10583
10610
  if (depsSeeHead(src, repoDir))
10584
10611
  continue;
10585
10612
  for (const d of ["node_modules", ".venv"]) {
@@ -11483,7 +11510,7 @@ var init_state = __esm(() => {
11483
11510
 
11484
11511
  // ../../loki-ts/src/runner/repo_profile.ts
11485
11512
  import { spawnSync as spawnSync3 } from "child_process";
11486
- import { existsSync as existsSync26, lstatSync as lstatSync10, readFileSync as readFileSync33, mkdirSync as mkdirSync14, readdirSync as readdirSync16, renameSync as renameSync9, rmSync as rmSync9, writeFileSync as writeFileSync17 } from "fs";
11513
+ import { existsSync as existsSync26, lstatSync as lstatSync10, readFileSync as readFileSync33, mkdirSync as mkdirSync14, readdirSync as readdirSync16, renameSync as renameSync10, rmSync as rmSync9, writeFileSync as writeFileSync17 } from "fs";
11487
11514
  import { basename as basename14, join as join40, resolve as resolve15, isAbsolute as isAbsolute4 } from "path";
11488
11515
  function detectFormatters(repoDir) {
11489
11516
  const out2 = [];
@@ -11673,7 +11700,7 @@ var init_context = __esm(() => {
11673
11700
  });
11674
11701
 
11675
11702
  // ../../loki-ts/src/util/steer.ts
11676
- import { appendFileSync as appendFileSync2, closeSync as closeSync8, constants as constants2, fstatSync as fstatSync6, readdirSync as readdirSync17, lstatSync as lstatSync11, mkdirSync as mkdirSync15, linkSync as linkSync2, openSync as openSync8, readFileSync as readFileSync34, readSync as readSync7, renameSync as renameSync10, statSync as statSync16, lutimesSync, rmSync as rmSync10, unlinkSync as unlinkSync6, writeFileSync as writeFileSync18, existsSync as existsSync27 } from "fs";
11703
+ import { appendFileSync as appendFileSync2, closeSync as closeSync8, constants as constants2, fstatSync as fstatSync6, readdirSync as readdirSync17, lstatSync as lstatSync11, mkdirSync as mkdirSync15, linkSync as linkSync2, openSync as openSync8, readFileSync as readFileSync34, readSync as readSync7, renameSync as renameSync11, statSync as statSync16, lutimesSync, rmSync as rmSync10, unlinkSync as unlinkSync6, writeFileSync as writeFileSync18, existsSync as existsSync27 } from "fs";
11677
11704
  import { createHash as createHash11, randomBytes as randomBytes4 } from "crypto";
11678
11705
  import { basename as basename15, join as join41 } from "path";
11679
11706
  function archiveTo(logs, prefix, src, link = linkSync2, onLinked) {
@@ -11688,7 +11715,7 @@ function archiveTo(logs, prefix, src, link = linkSync2, onLinked) {
11688
11715
  if (code !== "EPERM" && code !== "ENOTSUP" && code !== "EXDEV" && code !== "EMLINK")
11689
11716
  throw e;
11690
11717
  const name2 = `${prefix}-${randomBytes4(4).toString("hex")}.md`;
11691
- renameSync10(src, join41(logs, name2));
11718
+ renameSync11(src, join41(logs, name2));
11692
11719
  onLinked?.(name2);
11693
11720
  return name2;
11694
11721
  }
@@ -11780,7 +11807,7 @@ function consumeSteer(repoDir, env = process.env, now2 = () => new Date, sink, h
11780
11807
  sweepOrphans(logs, stamp2, unapplied, hooks2?.link, now2().getTime());
11781
11808
  claimed = join41(logs, `.claim-${process.pid}-${randomBytes4(6).toString("hex")}`);
11782
11809
  try {
11783
- renameSync10(f, claimed);
11810
+ renameSync11(f, claimed);
11784
11811
  } catch (e) {
11785
11812
  claimed = "";
11786
11813
  if (e.code === "ENOENT")
@@ -11803,7 +11830,7 @@ function consumeSteer(repoDir, env = process.env, now2 = () => new Date, sink, h
11803
11830
  let restored = false;
11804
11831
  try {
11805
11832
  if (lstatSync11(claimed).isDirectory())
11806
- renameSync10(claimed, f);
11833
+ renameSync11(claimed, f);
11807
11834
  else
11808
11835
  (hooks2?.link ?? linkSync2)(claimed, f);
11809
11836
  restored = true;
@@ -12398,12 +12425,12 @@ var init_seal_drift = __esm(() => {
12398
12425
  });
12399
12426
 
12400
12427
  // ../../loki-ts/src/util/spec_file.ts
12401
- import { isAbsolute as isAbsolute5, join as join43, relative as relative4 } from "path";
12428
+ import { isAbsolute as isAbsolute5, join as join43, relative as relative5 } from "path";
12402
12429
  function specReceiptBlock(env) {
12403
12430
  const { LOKI_E10_SPEC_PATH: p, LOKI_E10_SPEC_SHA256: sha2 } = env;
12404
12431
  if (!p || !sha2)
12405
12432
  return {};
12406
- const rel = isAbsolute5(p) && env.LOKI_E10_REPO_DIR ? relative4(env.LOKI_E10_REPO_DIR, p) : p;
12433
+ const rel = isAbsolute5(p) && env.LOKI_E10_REPO_DIR ? relative5(env.LOKI_E10_REPO_DIR, p) : p;
12407
12434
  return { spec: { path: rel, sha256: sha2 } };
12408
12435
  }
12409
12436
  var SPEC_DIR;
@@ -12462,9 +12489,9 @@ var init_run_cap = __esm(() => {
12462
12489
  // ../../loki-ts/src/util/mutation_proof.ts
12463
12490
  import { existsSync as existsSync29, mkdirSync as mkdirSync17, mkdtempSync as mkdtempSync3, readFileSync as readFileSync37, rmSync as rmSync11, symlinkSync as symlinkSync2, writeFileSync as writeFileSync20 } from "fs";
12464
12491
  import { tmpdir as tmpdir4 } from "os";
12465
- import { basename as basename16, dirname as dirname17, isAbsolute as isAbsolute6, join as join44, relative as relative5 } from "path";
12492
+ import { basename as basename16, dirname as dirname17, isAbsolute as isAbsolute6, join as join44, relative as relative6 } from "path";
12466
12493
  function mutationProof(i) {
12467
- const rels = i.wallFiles.map((f) => isAbsolute6(f.path) ? relative5(i.repoDir, f.path) : f.path);
12494
+ const rels = i.wallFiles.map((f) => isAbsolute6(f.path) ? relative6(i.repoDir, f.path) : f.path);
12468
12495
  if (rels.length === 0)
12469
12496
  return np("no Wall tests");
12470
12497
  const tests = rels.flatMap((rel) => {
@@ -13002,7 +13029,7 @@ Example: test('name', () => { assert.strictEqual(fn(1), 2); }); Run: node --tes
13002
13029
  import { createHash as createHash15 } from "crypto";
13003
13030
  import { appendFileSync as appendFileSync3, copyFileSync as copyFileSync2, existsSync as existsSync31, mkdirSync as mkdirSync18, readFileSync as readFileSync39, rmSync as rmSync13, writeFileSync as writeFileSync21 } from "fs";
13004
13031
  import { tmpdir as tmpdir6 } from "os";
13005
- import { basename as basename18, join as join45, relative as relative6 } from "path";
13032
+ import { basename as basename18, join as join45, relative as relative7 } from "path";
13006
13033
  function wallHoldoutRatio(env = process.env) {
13007
13034
  if (env["LOKI_WALL_HOLDOUT"]?.trim() === "0")
13008
13035
  return 0;
@@ -13058,7 +13085,7 @@ function stageHoldout(dir, repoDir) {
13058
13085
  const dest = join45(man.targetDir, `loki_wall_holdout_${i + 1}${f.name.slice(f.name.indexOf("."))}`);
13059
13086
  copyFileSync2(src, dest);
13060
13087
  put.push(dest);
13061
- tests.push({ runner: f.runner, path: relative6(repoDir, dest) });
13088
+ tests.push({ runner: f.runner, path: relative7(repoDir, dest) });
13062
13089
  });
13063
13090
  return { tests, missing, cleanup: () => {
13064
13091
  for (const p of put)
@@ -13277,7 +13304,7 @@ var init_load_owner = __esm(() => {
13277
13304
  });
13278
13305
 
13279
13306
  // ../../loki-ts/src/project_model/package_suite.ts
13280
- import { isAbsolute as isAbsolute7, join as join47, relative as relative7 } from "path";
13307
+ import { isAbsolute as isAbsolute7, join as join47, relative as relative8 } from "path";
13281
13308
  function packageSuiteSpecs(api) {
13282
13309
  if (!isMultiRoot(api))
13283
13310
  return null;
@@ -13291,7 +13318,7 @@ function suiteEnv(path) {
13291
13318
  return path ? { ...plainTestEnv(), PATH: path } : plainTestEnv();
13292
13319
  }
13293
13320
  function execProves(repoDir, o, owned) {
13294
- const proofs = o.proofFiles ?? [], rel = (f) => isAbsolute7(f) ? relative7(repoDir, f) : f;
13321
+ const proofs = o.proofFiles ?? [], rel = (f) => isAbsolute7(f) ? relative8(repoDir, f) : f;
13295
13322
  if (!o.wallBaseRed || !proofs.length || !o.changed)
13296
13323
  return false;
13297
13324
  const wall = new Set(proofs.map(rel)), rest = o.changed.filter((f) => !wall.has(rel(f)));
@@ -13323,7 +13350,7 @@ ${r.stderr}`);
13323
13350
  if (cls.result === "not_run")
13324
13351
  notProven.add(`not run: ${name} (${cls.reason ?? NO_TESTS_REASON})`);
13325
13352
  }
13326
- const ran2 = checks.some((c) => c.result === "pass" || c.result === "fail"), rel = (f) => isAbsolute7(f) ? relative7(repoDir, f) : f, wallOwn = new Set((opts.proofFiles ?? []).map(rel));
13353
+ const ran2 = checks.some((c) => c.result === "pass" || c.result === "fail"), rel = (f) => isAbsolute7(f) ? relative8(repoDir, f) : f, wallOwn = new Set((opts.proofFiles ?? []).map(rel));
13327
13354
  const product = opts.changed?.filter((f) => !wallOwn.has(rel(f)));
13328
13355
  const testless = api.packages().filter((p) => !p.commands.test), isRoot = (p) => p.root === "." || p.root === "";
13329
13356
  const unowned = (product ?? []).filter((f) => !f.startsWith('"') && !api.packageOf(f)), unprovenFiles = execProves(repoDir, opts, (f) => !api.packageOf(f)) ? [] : unowned;
@@ -14005,7 +14032,7 @@ var init_select = __esm(() => {
14005
14032
  });
14006
14033
 
14007
14034
  // ../../loki-ts/src/util/wall_owned.ts
14008
- import { isAbsolute as isAbsolute8, join as join50, relative as relative8 } from "path";
14035
+ import { isAbsolute as isAbsolute8, join as join50, relative as relative9 } from "path";
14009
14036
  function failingLocations(raw2, cwd, repoDir) {
14010
14037
  const out2 = raw2.replace(ANSI2, "").replace(/\r\n?/g, `
14011
14038
  `), files = new Set;
@@ -14037,7 +14064,7 @@ function failingLocations(raw2, cwd, repoDir) {
14037
14064
  }
14038
14065
  if (errors2 === 0 || located !== errors2)
14039
14066
  return null;
14040
- return [...files].map((f) => relative8(repoDir, isAbsolute8(f) ? f : join50(cwd, f)));
14067
+ return [...files].map((f) => relative9(repoDir, isAbsolute8(f) ? f : join50(cwd, f)));
14041
14068
  }
14042
14069
  function wallOwnedFailure(raw2, cwd, repoDir, wall) {
14043
14070
  const locs = failingLocations(raw2, cwd, repoDir);
@@ -14050,7 +14077,7 @@ var init_wall_owned = __esm(() => {
14050
14077
 
14051
14078
  // ../../loki-ts/src/util/app_probe.ts
14052
14079
  import { spawnSync as spawnSync6 } from "child_process";
14053
- import { existsSync as existsSync32, mkdirSync as mkdirSync19, readFileSync as readFileSync42, renameSync as renameSync11, writeFileSync as writeFileSync22 } from "fs";
14080
+ import { existsSync as existsSync32, mkdirSync as mkdirSync19, readFileSync as readFileSync42, renameSync as renameSync12, writeFileSync as writeFileSync22 } from "fs";
14054
14081
  import { join as join51 } from "path";
14055
14082
  function readJson4(p) {
14056
14083
  try {
@@ -14131,7 +14158,7 @@ async function functionalVerify(opts, url, dir, lokiDir2, timeoutMs) {
14131
14158
  mkdirSync19(q, { recursive: true });
14132
14159
  const tmp = join51(q, `functional-results.json.tmp.${process.pid}`);
14133
14160
  writeFileSync22(tmp, JSON.stringify(out2, null, 2));
14134
- renameSync11(tmp, join51(q, "functional-results.json"));
14161
+ renameSync12(tmp, join51(q, "functional-results.json"));
14135
14162
  const s = String(out2["functional_status"] ?? "inconclusive");
14136
14163
  return res(s === "verified" ? "pass" : s === "failed" ? "fail" : "not_run", `functional_status ${s}`);
14137
14164
  }
@@ -14465,7 +14492,7 @@ var init_retry_class = () => {};
14465
14492
 
14466
14493
  // ../../loki-ts/src/project_model/conventions.ts
14467
14494
  import { existsSync as existsSync34, readdirSync as readdirSync19, readFileSync as readFileSync44 } from "fs";
14468
- import { basename as basename22, dirname as dirname21, isAbsolute as isAbsolute9, join as join53, relative as relative9, resolve as resolve18 } from "path";
14495
+ import { basename as basename22, dirname as dirname21, isAbsolute as isAbsolute9, join as join53, relative as relative10, resolve as resolve18 } from "path";
14469
14496
  function parseJsonc(text2) {
14470
14497
  let out2 = "", i = 0;
14471
14498
  while (i < text2.length) {
@@ -14557,7 +14584,7 @@ function outOfRepoTarget(content) {
14557
14584
  function nearestPackageRoot(testDir, repoDir, fileName) {
14558
14585
  const api = loadProjectApi(repoDir);
14559
14586
  if (api)
14560
- return siteFor(api, repoDir, relative9(repoDir, join53(testDir, fileName)))?.cwd ?? repoDir;
14587
+ return siteFor(api, repoDir, relative10(repoDir, join53(testDir, fileName)))?.cwd ?? repoDir;
14561
14588
  const shaped = (d) => {
14562
14589
  try {
14563
14590
  return readdirSync19(d).some((f) => {
@@ -14623,7 +14650,7 @@ function phantomRepoPaths(content, fileName, testDir, repoDir, planText) {
14623
14650
  return -1;
14624
14651
  };
14625
14652
  const strayInTestDir = (out2) => {
14626
- const first = relative9(testDir, out2).split("/")[0];
14653
+ const first = relative10(testDir, out2).split("/")[0];
14627
14654
  return !!first && first !== "__self__" && !existsSync34(join53(testDir, first)) && [pkg, repoDir].some((d) => d !== testDir && existsSync34(join53(d, first)));
14628
14655
  };
14629
14656
  const scan = (cwd) => {
@@ -14658,8 +14685,8 @@ function phantomRepoPaths(content, fileName, testDir, repoDir, planText) {
14658
14685
  return dirname21(args[0]);
14659
14686
  const out2 = resolve18(...args);
14660
14687
  const first = parts.slice(1).map((a) => /^\s*["'`]([^"'`]*)["'`]\s*$/.exec(a)?.[1]).find((x) => x), viaWalk = !!first && walk.has(parts[0].trim()) && [pkg, repoDir].some((d) => existsSync34(join53(d, first.split("/").filter(Boolean)[0] ?? "\x00")));
14661
- if (report && (viaWalk || !parts.some((a) => walk.has(a.trim()) || taint.has(a.trim())) && (relative9(testDir, out2).startsWith("..") || strayInTestDir(out2))) && parts.some((a) => /^\s*["'`]/.test(a)))
14662
- reports.set(`${ln}|${e}`, { out: out2, rel: relative9(repoDir, out2), tail: viaWalk ? join53(...args.slice(1)) : undefined });
14688
+ if (report && (viaWalk || !parts.some((a) => walk.has(a.trim()) || taint.has(a.trim())) && (relative10(testDir, out2).startsWith("..") || strayInTestDir(out2))) && parts.some((a) => /^\s*["'`]/.test(a)))
14689
+ reports.set(`${ln}|${e}`, { out: out2, rel: relative10(repoDir, out2), tail: viaWalk ? join53(...args.slice(1)) : undefined });
14663
14690
  return out2;
14664
14691
  };
14665
14692
  for (const line2 of walkCode.split(`
@@ -14929,7 +14956,7 @@ import { spawn as spawn8 } from "child_process";
14929
14956
  import { createHash as createHash16, randomBytes as randomBytes6 } from "crypto";
14930
14957
  import { existsSync as existsSync35, lstatSync as lstatSync13, mkdirSync as mkdirSync21, readdirSync as readdirSync20, readFileSync as readFileSync45, writeFileSync as writeFileSync24 } from "fs";
14931
14958
  import { createServer } from "net";
14932
- import { dirname as dirname23, isAbsolute as isAbsolute10, join as join55, normalize as normalize3, relative as relative10, sep as sep13 } from "path";
14959
+ import { dirname as dirname23, isAbsolute as isAbsolute10, join as join55, normalize as normalize3, relative as relative11, sep as sep13 } from "path";
14933
14960
  function routeFor(file) {
14934
14961
  let r = file.replace(/^(?:.*?\/)?(?:app|pages|src|public)\//, "").replace(/^(?:routes|pages)\//, "");
14935
14962
  r = r.replace(/\.(?:html|jsx|tsx|vue|svelte)$/, "").replace(/\/?(?:page|index|\+page)$/, "");
@@ -15034,7 +15061,7 @@ async function recordE2eMedia(repoDir, runDir, relDir, base, routes, ms, signal)
15034
15061
  if (e.isDirectory())
15035
15062
  walk(full);
15036
15063
  else if (e.isFile() && /\.(webm|zip)$/.test(e.name))
15037
- rels.push(join55(relDir, "e2e", relative10(dir, full)));
15064
+ rels.push(join55(relDir, "e2e", relative11(dir, full)));
15038
15065
  }
15039
15066
  };
15040
15067
  walk(join55(dir, "out"));
@@ -15804,7 +15831,7 @@ var init_deep = __esm(() => {
15804
15831
  // ../../loki-ts/src/engine10/stages/verify.ts
15805
15832
  import { existsSync as existsSync39, mkdtempSync as mkdtempSync10, rmSync as rmSync19 } from "fs";
15806
15833
  import { tmpdir as tmpdir11 } from "os";
15807
- import { isAbsolute as isAbsolute11, join as join60, relative as relative11 } from "path";
15834
+ import { isAbsolute as isAbsolute11, join as join60, relative as relative12 } from "path";
15808
15835
  async function runOnce2(cmd2, args, cwd, signal, opts) {
15809
15836
  if (!Bun.which(cmd2, { PATH: opts.path ?? process.env["PATH"] ?? "" }))
15810
15837
  return { ok: false, missing: true, cut: false, out: "" };
@@ -15956,7 +15983,7 @@ var CHECK_TIMEOUT_MS = 60000, excerpts, isHold = (c) => isHoldoutCheck(c.name),
15956
15983
  return r.missing || r.cut ? null : r;
15957
15984
  }, base: (f) => {
15958
15985
  try {
15959
- return safeGit(ctx.repoDir, ["show", `${ctx.baseSha}:${relative11(ctx.repoDir, join60(cwd, f))}`], { stdio: ["ignore", "pipe", "ignore"] });
15986
+ return safeGit(ctx.repoDir, ["show", `${ctx.baseSha}:${relative12(ctx.repoDir, join60(cwd, f))}`], { stdio: ["ignore", "pipe", "ignore"] });
15960
15987
  } catch {
15961
15988
  return null;
15962
15989
  }
@@ -16022,7 +16049,7 @@ var init_verify = __esm(() => {
16022
16049
  const impacted = ctx.tests.impacted(map, changed);
16023
16050
  const changedTestFiles = map.tests.filter((t) => changed.includes(t.path));
16024
16051
  const wall = ctx.outputs().wall ?? {};
16025
- const wallPaths = new Set((wall.files ?? []).map((f) => isAbsolute11(f.path) ? relative11(ctx.repoDir, f.path) : f.path));
16052
+ const wallPaths = new Set((wall.files ?? []).map((f) => isAbsolute11(f.path) ? relative12(ctx.repoDir, f.path) : f.path));
16026
16053
  const intake = ctx.outputs().intake, repoMap = loadRepoMap(intake?.repomap_ref), relevant2 = ctx.tests.impacted(map, namedFiles(intake?.task ?? "", repoMap));
16027
16054
  const harness = map.runners.length === 0 ? harnessRunners(map.runners, repoMap?.files ?? [])[0] : undefined, wallTests = [...map.tests.filter((t) => wallPaths.has(t.path)), ...harness ? [...wallPaths].filter((p) => /[._](?:test|spec)\.[cm]?[jt]sx?$/.test(p) && !map.tests.some((t) => t.path === p)).map((path) => ({ runner: harness, path })) : []];
16028
16055
  const tests = failedFirst(dedupeTests([...impacted, ...changedTestFiles, ...wallTests, ...relevant2]), ctx.outputs().verify?.checks);
@@ -16135,7 +16162,7 @@ ${x}` : c.cmd };
16135
16162
  import { spawnSync as spawnSync7 } from "child_process";
16136
16163
  import { existsSync as existsSync40, mkdirSync as mkdirSync25, mkdtempSync as mkdtempSync11, readFileSync as readFileSync48, readdirSync as readdirSync21, rmSync as rmSync20, writeFileSync as writeFileSync28 } from "fs";
16137
16164
  import { tmpdir as tmpdir12 } from "os";
16138
- import { dirname as dirname26, join as join61, relative as relative12 } from "path";
16165
+ import { dirname as dirname26, join as join61, relative as relative13 } from "path";
16139
16166
 
16140
16167
  class RealBaseTestRunner {
16141
16168
  api;
@@ -16247,7 +16274,7 @@ async function wallAuthor(ctx, signal, retry) {
16247
16274
  return done({ status: "skipped", data: { size: sz.size, files: [], no_interpreter: true, not_proven: ["Wall skipped: no project test interpreter"] }, reason: "Wall skipped: no project test interpreter" });
16248
16275
  const tree = prior.intake?.tree;
16249
16276
  const repomapText = repoMapText(ctx.repoDir, tree, repomapRef, WALL_MAP_MAX_LINES);
16250
- const targetDir = wallTargetDir(ctx.repoDir, existingTests), pkg = loadProjectApi(ctx.repoDir)?.packageOf(`${relative12(ctx.repoDir, targetDir)}/x`);
16277
+ const targetDir = wallTargetDir(ctx.repoDir, existingTests), pkg = loadProjectApi(ctx.repoDir)?.packageOf(`${relative13(ctx.repoDir, targetDir)}/x`);
16251
16278
  const conv2 = readPackageConventions(join61(ctx.repoDir, pkg?.root ?? "."), pkg?.runner ?? null);
16252
16279
  const cwd = mkdtempSync11(join61(tmpdir12(), "loki-e15-wall-"));
16253
16280
  const wm = wallManifestFor(ctx.repoDir, tree, task);
@@ -16256,7 +16283,7 @@ async function wallAuthor(ctx, signal, retry) {
16256
16283
  const model = retry?.model ?? wallFirstModel(sz.size), iterationId = `${ctx.runId}-wall${retry?.suffix ?? ""}`;
16257
16284
  const session = await ctx.sessions.run({
16258
16285
  stage: "wall",
16259
- brief: buildWallBrief(task, repomapText, runners, !!wm, conventionsBrief(conv2), unitSpec()?.acceptance ?? [], relative12(ctx.repoDir, targetDir)),
16286
+ brief: buildWallBrief(task, repomapText, runners, !!wm, conventionsBrief(conv2), unitSpec()?.acceptance ?? [], relative13(ctx.repoDir, targetDir)),
16260
16287
  tier: "development",
16261
16288
  model,
16262
16289
  iterationId,
@@ -16270,7 +16297,7 @@ async function wallAuthor(ctx, signal, retry) {
16270
16297
  }
16271
16298
  const planText = typeof prior.plan?.plan === "string" ? prior.plan.plan : null, repoFiles = repoMap?.files ?? [];
16272
16299
  const oor = () => readdirSync21(cwd).filter((f) => f.startsWith(WALL_PREFIX)).flatMap((name) => {
16273
- const text2 = readFileSync48(join61(cwd, name), "utf8"), why = outOfRepoTarget(text2) ?? phantomReason(phantomRepoPaths(text2, name, targetDir, ctx.repoDir, planText), repoFiles, relative12(ctx.repoDir, targetDir), pkg?.root ?? "");
16300
+ const text2 = readFileSync48(join61(cwd, name), "utf8"), why = outOfRepoTarget(text2) ?? phantomReason(phantomRepoPaths(text2, name, targetDir, ctx.repoDir, planText), repoFiles, relative13(ctx.repoDir, targetDir), pkg?.root ?? "");
16274
16301
  return why ? [{ name, why }] : [];
16275
16302
  });
16276
16303
  const bad1 = oor();
@@ -16318,13 +16345,13 @@ function* installCore(ctx, a, baseDir, opts) {
16318
16345
  sealedFiles.push({ path: dest, sha256: sha2562(content) });
16319
16346
  readOnlyFiles.push({ path: dest, content });
16320
16347
  if (runner)
16321
- wallTests.push({ runner, path: relative12(ctx.repoDir, dest) });
16348
+ wallTests.push({ runner, path: relative13(ctx.repoDir, dest) });
16322
16349
  }
16323
16350
  ctx.wallSealed = true;
16324
16351
  ctx.emit("wall.sealed", "wall", { files: sealedFiles, ...a.manifestSha256 ? { manifest_sha256: a.manifestSha256 } : {} });
16325
16352
  const baseRunner = opts.baseRunner ?? new RealBaseTestRunner, baseRun = { pass: 0, fail: 0, not_run: discarded.length }, notRunFiles = [];
16326
16353
  for (const f of sealedFiles) {
16327
- const rel = relative12(ctx.repoDir, f.path);
16354
+ const rel = relative13(ctx.repoDir, f.path);
16328
16355
  if (!wallTests.some((t) => t.path === rel))
16329
16356
  notRunFiles.push({ file: rel, reason: NO_RUNNER_REASON });
16330
16357
  }
@@ -16407,10 +16434,10 @@ var init_wall = __esm(() => {
16407
16434
  });
16408
16435
 
16409
16436
  // ../../loki-ts/src/e10ext/discard.ts
16410
- import { chmodSync as chmodSync5, closeSync as closeSync9, lstatSync as lstatSync16, mkdirSync as mkdirSync26, openSync as openSync9, readFileSync as readFileSync49, realpathSync as realpathSync23, rmdirSync, unlinkSync as unlinkSync7, writeFileSync as writeFileSync29 } from "fs";
16411
- import { dirname as dirname27, join as join62, relative as relative13, sep as sep14 } from "path";
16437
+ import { chmodSync as chmodSync6, closeSync as closeSync9, lstatSync as lstatSync16, mkdirSync as mkdirSync26, openSync as openSync9, readFileSync as readFileSync49, realpathSync as realpathSync23, rmdirSync, unlinkSync as unlinkSync7, writeFileSync as writeFileSync29 } from "fs";
16438
+ import { dirname as dirname27, join as join62, relative as relative14, sep as sep14 } from "path";
16412
16439
  function safeRestore(repoDir, f, want, mode) {
16413
- const root = realpathSync23(repoDir), fp = join62(root, f), rel = relative13(root, dirname27(fp));
16440
+ const root = realpathSync23(repoDir), fp = join62(root, f), rel = relative14(root, dirname27(fp));
16414
16441
  if (rel.startsWith(".."))
16415
16442
  throw new Error("outside repo");
16416
16443
  let cur = root;
@@ -16433,7 +16460,7 @@ function safeRestore(repoDir, f, want, mode) {
16433
16460
  st = null;
16434
16461
  }
16435
16462
  if (st?.isFile() && readFileSync49(fp).equals(want)) {
16436
- chmodSync5(fp, mode);
16463
+ chmodSync6(fp, mode);
16437
16464
  return;
16438
16465
  }
16439
16466
  if (st) {
@@ -16448,7 +16475,7 @@ function safeRestore(repoDir, f, want, mode) {
16448
16475
  } finally {
16449
16476
  closeSync9(fd);
16450
16477
  }
16451
- chmodSync5(fp, mode);
16478
+ chmodSync6(fp, mode);
16452
16479
  }
16453
16480
  function alreadySatisfied(o) {
16454
16481
  return o.intake?.already_satisfied === true || o.implement?.exit === "already_done";
@@ -16661,7 +16688,7 @@ var init_colors = __esm(() => {
16661
16688
  });
16662
16689
 
16663
16690
  // ../../loki-ts/src/util/run_summary.ts
16664
- import { existsSync as existsSync42, mkdirSync as mkdirSync28, readFileSync as readFileSync51, renameSync as renameSync12, statSync as statSync20, writeFileSync as writeFileSync30 } from "fs";
16691
+ import { existsSync as existsSync42, mkdirSync as mkdirSync28, readFileSync as readFileSync51, renameSync as renameSync13, statSync as statSync20, writeFileSync as writeFileSync30 } from "fs";
16665
16692
  import { join as join65 } from "path";
16666
16693
  function readRiskRecord(repoDir, sinceMs = 0) {
16667
16694
  try {
@@ -17021,7 +17048,7 @@ var init_contract = __esm(() => {
17021
17048
 
17022
17049
  // ../../loki-ts/src/features/speed/seal_group.ts
17023
17050
  import { createHash as createHash19 } from "crypto";
17024
- import { existsSync as existsSync45, mkdirSync as mkdirSync30, readdirSync as readdirSync23, readFileSync as readFileSync54, renameSync as renameSync13, statSync as statSync21, writeFileSync as writeFileSync32 } from "fs";
17051
+ import { existsSync as existsSync45, mkdirSync as mkdirSync30, readdirSync as readdirSync23, readFileSync as readFileSync54, renameSync as renameSync14, statSync as statSync21, writeFileSync as writeFileSync32 } from "fs";
17025
17052
  import { dirname as dirname30, join as join68 } from "path";
17026
17053
  function sealGroup(runDir, rh) {
17027
17054
  const manifestPath = join68(runDir, "group", "manifest.json");
@@ -17408,7 +17435,7 @@ var init_supply_guard = __esm(() => {
17408
17435
  // ../../loki-ts/src/engine10/stages/seal.ts
17409
17436
  import { createHash as createHash20 } from "crypto";
17410
17437
  import { existsSync as existsSync47, readdirSync as readdirSync24, mkdirSync as mkdirSync31, readFileSync as readFileSync56 } from "fs";
17411
- import { basename as basename26, isAbsolute as isAbsolute13, join as join70, relative as relative14 } from "path";
17438
+ import { basename as basename26, isAbsolute as isAbsolute13, join as join70, relative as relative15 } from "path";
17412
17439
  function receiptSha256(r) {
17413
17440
  const { verification: _v, receipt_sha256: _h, ...body } = r;
17414
17441
  return sha2562(canonicalJson(body));
@@ -17483,7 +17510,7 @@ function renderReceiptMd(r) {
17483
17510
  `);
17484
17511
  }
17485
17512
  var SIGNING_UNAVAILABLE = "receipt signing unavailable (no usable signing key: invalid key or unwritable ~/.loki/keys)", AGENT_ONLY_REASON = "only agent-authored tests executed (no agent-independent proof)", WALL_GREEN_ON_BASE_REASON = "Wall green on base: no Wall test discriminates the change", EXCLUDE_LOKI = ":(exclude).loki", sha2562 = (s) => createHash20("sha256").update(s).digest("hex"), str4 = (v) => typeof v === "string" && v !== "" ? v : null, strs2 = (v) => Array.isArray(v) ? v.filter((x) => typeof x === "string" && x !== "") : [], g = (ctx) => (a) => git4(ctx, a), receiptRel = (ctx) => {
17486
- const r = relative14(ctx.repoDir, join70(ctx.runDir, "receipt.json"));
17513
+ const r = relative15(ctx.repoDir, join70(ctx.runDir, "receipt.json"));
17487
17514
  return r.startsWith("..") || isAbsolute13(r) ? `.loki/runs/${ctx.runId}/receipt.json` : r;
17488
17515
  }, commitStage, wallGreenOnBaseOf = (o) => {
17489
17516
  const b = o.wall?.base_run ?? {};
@@ -17913,7 +17940,7 @@ var init_keys_cmd = __esm(() => {
17913
17940
  });
17914
17941
 
17915
17942
  // ../../loki-ts/src/engine10/verify_cmd.ts
17916
- import { existsSync as existsSync49, readFileSync as readFileSync58, renameSync as renameSync14, statSync as statSync24, writeFileSync as writeFileSync34 } from "fs";
17943
+ import { existsSync as existsSync49, readFileSync as readFileSync58, renameSync as renameSync15, statSync as statSync24, writeFileSync as writeFileSync34 } from "fs";
17917
17944
  import { basename as basename28, dirname as dirname33, join as join72 } from "path";
17918
17945
  import { createHash as createHash21, createPublicKey as createPublicKey4, verify as verify4 } from "crypto";
17919
17946
  function pubFor(kid, given) {
@@ -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.60.16",
5
+ "version": "11.60.17",
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-DrlVp90a.js";import{B as C}from"./Button-BFyEBTEH.js";import{T as $e}from"./trending-up-BSwU7Axb.js";import{C as z}from"./clock-CVVX5Ua9.js";import{A as Be,U as ue,M as De}from"./Avatar-Bb4nNhFM.js";import{A as J}from"./activity-D_wZmvHi.js";import{R as pe}from"./refresh-cw-BXbsk51e.js";import{G as ze}from"./globe-efHzOFvw.js";import{C as Le}from"./chevron-left-DB9zn9HI.js";import{C as je}from"./check-Cn1hwqkh.js";import{D as Y}from"./dollar-sign-BAT5CB0s.js";import{U as Te}from"./user-umWJhl16.js";import{D as Me}from"./database-DgseRvlB.js";import{L as Ue}from"./lock-B9Mcva56.js";import{S as Re}from"./scroll-text-DCb61Xlz.js";import{S as Ie}from"./shield-alert-DbWTSwyQ.js";/**
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-DQ8ylLMg.js";import{B as C}from"./Button-f63Oxy1n.js";import{T as $e}from"./trending-up-C5gGWwWf.js";import{C as z}from"./clock-DxNOfHv8.js";import{A as Be,U as ue,M as De}from"./Avatar-CCDSSzLt.js";import{A as J}from"./activity-DQGYAnDo.js";import{R as pe}from"./refresh-cw-Ch_wn5l7.js";import{G as ze}from"./globe-CSge_JW3.js";import{C as Le}from"./chevron-left-BVF4vk0j.js";import{C as je}from"./check-N7f-OZcj.js";import{D as Y}from"./dollar-sign-DLcxkHGd.js";import{U as Te}from"./user-BQ4x5DPu.js";import{D as Me}from"./database-IUnWpRt1.js";import{L as Ue}from"./lock-DbeIC2jA.js";import{S as Re}from"./scroll-text-YPRcU_Qk.js";import{S as Ie}from"./shield-alert-FM6n4l1C.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 l,j as s}from"./index-DrlVp90a.js";/**
1
+ import{c as l,j as s}from"./index-DQ8ylLMg.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-DrlVp90a.js";import{C as r}from"./clock-CVVX5Ua9.js";import{C as a}from"./circle-alert-BzFzXBcE.js";import{C as l}from"./check-Cn1hwqkh.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
+ import{j as e}from"./index-DQ8ylLMg.js";import{C as r}from"./clock-DxNOfHv8.js";import{C as a}from"./circle-alert-BwfEcWFa.js";import{C as l}from"./check-N7f-OZcj.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-DrlVp90a.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
+ import{r as p,j as t}from"./index-DQ8ylLMg.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};