overlane 0.1.134 → 0.1.135

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/dist/overlane.mjs CHANGED
@@ -23553,7 +23553,7 @@ var init_wording = __esm({
23553
23553
  });
23554
23554
 
23555
23555
  // ../contracts/src/code-map-context.ts
23556
- var CodeMapDigest, CODE_MAP_DIGEST_PATH;
23556
+ var CodeMapDigest, CODE_MAP_DIGEST_PATH, CODE_INDEX_PATH;
23557
23557
  var init_code_map_context = __esm({
23558
23558
  "../contracts/src/code-map-context.ts"() {
23559
23559
  "use strict";
@@ -23571,6 +23571,7 @@ var init_code_map_context = __esm({
23571
23571
  seeds: external_exports.array(external_exports.string())
23572
23572
  }).strict();
23573
23573
  CODE_MAP_DIGEST_PATH = ".harness/code-map.json";
23574
+ CODE_INDEX_PATH = ".harness/code-index.json";
23574
23575
  }
23575
23576
  });
23576
23577
 
@@ -33307,7 +33308,7 @@ var VERSION;
33307
33308
  var init_assets = __esm({
33308
33309
  "src/assets.ts"() {
33309
33310
  "use strict";
33310
- VERSION = true ? "0.1.134" : "0.0.0-dev";
33311
+ VERSION = true ? "0.1.135" : "0.0.0-dev";
33311
33312
  }
33312
33313
  });
33313
33314
 
@@ -41445,10 +41446,7 @@ var init_oidc = __esm({
41445
41446
  }
41446
41447
  });
41447
41448
 
41448
- // ../index-builder/src/context-map.ts
41449
- function stripNoise(text) {
41450
- return text.replace(/\/\*[\s\S]*?\*\//g, " ").replace(/\/\/[^\n]*/g, " ").replace(/"(?:[^"\\\n]|\\.)*"|'(?:[^'\\\n]|\\.)*'|`(?:[^`\\]|\\.)*`/g, '""');
41451
- }
41449
+ // ../index-builder/src/rank.ts
41452
41450
  function wordsOf(text) {
41453
41451
  const parts2 = text.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[^A-Za-z0-9]+/);
41454
41452
  const out2 = [];
@@ -41463,106 +41461,6 @@ function wordsOf(text) {
41463
41461
  }
41464
41462
  return out2;
41465
41463
  }
41466
- function resolveImport(from, spec) {
41467
- if (!spec.startsWith(".")) return null;
41468
- const parts2 = from.split("/").slice(0, -1);
41469
- for (const piece of spec.split("/")) {
41470
- if (piece === "." || piece === "") continue;
41471
- if (piece === "..") parts2.pop();
41472
- else parts2.push(piece);
41473
- }
41474
- return stripModuleExtension(parts2.join("/"));
41475
- }
41476
- function stripModuleExtension(path) {
41477
- return path.replace(/\.(?:[cm]?[jt]sx?|d\.ts)$/, "");
41478
- }
41479
- function reaches(visible, path) {
41480
- const bare = stripModuleExtension(path);
41481
- return visible.has(bare) || visible.has(path) || bare.endsWith("/index") && visible.has(bare.slice(0, -"/index".length));
41482
- }
41483
- function headerOf(content, symbol2) {
41484
- const lines = content.split("\n");
41485
- const start2 = symbol2.range[0];
41486
- const chunk = [];
41487
- for (let i2 = start2; i2 < Math.min(lines.length, start2 + 4); i2 += 1) {
41488
- const line3 = lines[i2] ?? "";
41489
- chunk.push(line3);
41490
- if (line3.includes("{")) break;
41491
- }
41492
- return chunk.join(" ");
41493
- }
41494
- async function buildRepoIndex(files) {
41495
- const symbols2 = /* @__PURE__ */ new Map();
41496
- const byName = /* @__PURE__ */ new Map();
41497
- const byFile = /* @__PURE__ */ new Map();
41498
- const imports = /* @__PURE__ */ new Map();
41499
- const ranges = /* @__PURE__ */ new Map();
41500
- const headers = /* @__PURE__ */ new Map();
41501
- const paths = [...files.keys()].filter((path) => languageForPath(path) !== null).sort();
41502
- for (const path of paths) {
41503
- const content = files.get(path);
41504
- const shard = await parseDeclarations(path, content);
41505
- if (shard === null) continue;
41506
- const targets = /* @__PURE__ */ new Set();
41507
- for (const match of content.matchAll(/from\s+["']([^"']+)["']/g)) {
41508
- const resolved = resolveImport(path, match[1] ?? "");
41509
- if (resolved !== null) targets.add(resolved);
41510
- }
41511
- imports.set(path, targets);
41512
- for (const symbol2 of shard.symbols) {
41513
- const hash2 = symbol2.symbol.indexOf("#");
41514
- const entry = { id: symbol2.symbol, name: symbol2.name, qualified: symbol2.symbol.slice(hash2 + 1), kind: symbol2.kind, path, line: symbol2.range[0] + 1, parent: symbol2.parent };
41515
- symbols2.set(entry.id, entry);
41516
- ranges.set(entry.id, symbol2);
41517
- byName.set(entry.name, [...byName.get(entry.name) ?? [], entry]);
41518
- byFile.set(path, [...byFile.get(path) ?? [], entry]);
41519
- if (symbol2.kind === "class" || symbol2.kind === "interface") headers.set(entry.id, headerOf(content, symbol2));
41520
- }
41521
- }
41522
- const callees = /* @__PURE__ */ new Map();
41523
- const callers = /* @__PURE__ */ new Map();
41524
- for (const entry of symbols2.values()) {
41525
- if (!CALLABLE.has(entry.kind)) continue;
41526
- const range = ranges.get(entry.id)?.enclosingRange;
41527
- if (range === void 0) continue;
41528
- const text = stripNoise(files.get(entry.path).split("\n").slice(range[0], range[2] + 1).join("\n"));
41529
- const visible = imports.get(entry.path) ?? /* @__PURE__ */ new Set();
41530
- const seen = /* @__PURE__ */ new Set();
41531
- for (const match of text.matchAll(/[A-Za-z_$][\w$]*/g)) {
41532
- const id2 = match[0];
41533
- if (KEYWORDS.has(id2) || seen.has(id2)) continue;
41534
- seen.add(id2);
41535
- for (const target2 of byName.get(id2) ?? []) {
41536
- if (target2.id === entry.id || target2.kind === "property" || target2.kind === "parameter") continue;
41537
- if (target2.path !== entry.path && !reaches(visible, target2.path)) continue;
41538
- if (target2.id === entry.parent) continue;
41539
- callees.set(entry.id, (callees.get(entry.id) ?? /* @__PURE__ */ new Set()).add(target2.id));
41540
- callers.set(target2.id, (callers.get(target2.id) ?? /* @__PURE__ */ new Set()).add(entry.id));
41541
- }
41542
- }
41543
- }
41544
- const heritage = /* @__PURE__ */ new Map();
41545
- const heirs = /* @__PURE__ */ new Map();
41546
- const resolve16 = (from, name2) => {
41547
- const visible = imports.get(from.path) ?? /* @__PURE__ */ new Set();
41548
- return (byName.get(baseName(name2)) ?? []).find((candidate) => candidate.path === from.path || reaches(visible, candidate.path));
41549
- };
41550
- for (const [id2, header] of headers) {
41551
- const entry = symbols2.get(id2);
41552
- const stem2 = header.slice(header.indexOf(entry.name) + entry.name.length).replace(/^<[^>]*>/, "").replace(/\{.*$/, "");
41553
- const ext = /\bextends\s+([A-Za-z_$][\w$.]*)/.exec(stem2)?.[1];
41554
- const impl = /\bimplements\s+(.+)$/.exec(stem2)?.[1];
41555
- const extendsIds = ext === void 0 ? [] : [resolve16(entry, ext)?.id].filter((value) => value !== void 0);
41556
- const implementsIds = (impl === void 0 ? [] : impl.split(/,(?![^<]*>)/).map((part) => resolve16(entry, part.trim()))).filter((value) => value !== void 0).map((value) => value.id);
41557
- if (extendsIds.length === 0 && implementsIds.length === 0) continue;
41558
- heritage.set(id2, { extends: extendsIds, implements: implementsIds });
41559
- for (const target2 of extendsIds) heirs.set(target2, { extendedBy: [...heirs.get(target2)?.extendedBy ?? [], id2], implementedBy: heirs.get(target2)?.implementedBy ?? [] });
41560
- for (const target2 of implementsIds) heirs.set(target2, { extendedBy: heirs.get(target2)?.extendedBy ?? [], implementedBy: [...heirs.get(target2)?.implementedBy ?? [], id2] });
41561
- }
41562
- const words = /* @__PURE__ */ new Map();
41563
- for (const entry of symbols2.values()) for (const word of new Set(wordsOf(entry.name))) words.set(word, (words.get(word) ?? 0) + 1);
41564
- return { files: paths.length, symbols: symbols2, byName, byFile, callees, callers, heritage, heirs, imports, words, wordDocs: symbols2.size };
41565
- }
41566
41464
  function idf(index, word) {
41567
41465
  return Math.log(index.wordDocs / (1 + (index.words.get(word) ?? 0)));
41568
41466
  }
@@ -41760,27 +41658,150 @@ function buildCodeMapDigest(input2) {
41760
41658
  seeds: map2.seeds
41761
41659
  };
41762
41660
  }
41763
- var KEYWORDS, CALLABLE, SEEDABLE, MIN_WORD_IDF, MIN_SOFT_SCORE, MAX_RELATED_FILES, STOP, baseName, DEFAULT_MAP_OPTIONS, estimateTokens, where;
41764
- var init_context_map = __esm({
41765
- "../index-builder/src/context-map.ts"() {
41661
+ function serializeRepoIndex(index) {
41662
+ const position = /* @__PURE__ */ new Map();
41663
+ for (const id2 of index.symbols.keys()) position.set(id2, position.size);
41664
+ const at = (id2) => position.get(id2) ?? -1;
41665
+ const symbols2 = [...index.symbols.values()].map((s) => [s.name, s.qualified, s.kind, s.path, s.line, s.parent === void 0 ? -1 : at(s.parent)]);
41666
+ const callees = [...index.callees].map(([from, to]) => [at(from), ...[...to].map(at)]);
41667
+ const heritage = [...index.heritage].map(([id2, h]) => ({ id: at(id2), extends: h.extends.map(at), implements: h.implements.map(at) }));
41668
+ return { schemaVersion: "1", files: index.files, wordDocs: index.wordDocs, symbols: symbols2, callees, heritage, paths: [...index.imports.keys()], words: [...index.words] };
41669
+ }
41670
+ var SEEDABLE, MIN_WORD_IDF, MIN_SOFT_SCORE, MAX_RELATED_FILES, STOP, DEFAULT_MAP_OPTIONS, estimateTokens, where;
41671
+ var init_rank = __esm({
41672
+ "../index-builder/src/rank.ts"() {
41766
41673
  "use strict";
41767
41674
  init_src();
41768
- init_languages();
41769
- init_treesitter();
41770
- KEYWORDS = /* @__PURE__ */ new Set(["const", "let", "var", "function", "return", "if", "else", "new", "this", "class", "extends", "implements", "import", "export", "from", "type", "interface", "async", "await", "string", "number", "boolean", "void", "null", "undefined", "true", "false", "private", "protected", "public", "readonly", "static", "abstract", "super", "typeof", "for", "of", "in", "while", "throw", "try", "catch", "as"]);
41771
- CALLABLE = /* @__PURE__ */ new Set(["function", "method", "constant", "variable"]);
41772
41675
  SEEDABLE = /* @__PURE__ */ new Set(["function", "method", "class", "interface", "type", "constant"]);
41773
41676
  MIN_WORD_IDF = 2.5;
41774
41677
  MIN_SOFT_SCORE = 3.5;
41775
41678
  MAX_RELATED_FILES = 14;
41776
41679
  STOP = /* @__PURE__ */ new Set(["the", "a", "an", "of", "to", "in", "is", "are", "and", "or", "for", "that", "this", "it", "its", "by", "be", "on", "as", "at", "with", "from", "which", "what", "when", "where", "who", "how", "do", "does", "not", "any", "each", "every", "all", "also", "than", "then", "so", "if", "into", "file", "path", "answer", "end", "final", "message", "line", "start", "follow", "separate", "comma", "give", "name", "modify", "files", "repository", "source", "code", "change", "update", "make", "use", "uses", "used", "other", "only", "about", "will", "can", "should", "need", "needs", "happen", "merely", "share", "same", "return", "returns", "pass", "passes"]);
41777
- baseName = (name2) => name2.replace(/<.*$/, "").split(".").pop() ?? name2;
41778
41680
  DEFAULT_MAP_OPTIONS = { maxTokens: 3400, maxSeeds: 6 };
41779
41681
  estimateTokens = estimateCodeMapTokens;
41780
41682
  where = (symbol2) => `${symbol2.qualified} ${symbol2.path}:${symbol2.line}`;
41781
41683
  }
41782
41684
  });
41783
41685
 
41686
+ // ../index-builder/src/context-map.ts
41687
+ function stripNoise(text) {
41688
+ return text.replace(/\/\*[\s\S]*?\*\//g, " ").replace(/\/\/[^\n]*/g, " ").replace(/"(?:[^"\\\n]|\\.)*"|'(?:[^'\\\n]|\\.)*'|`(?:[^`\\]|\\.)*`/g, '""');
41689
+ }
41690
+ function resolveImport(from, spec) {
41691
+ if (!spec.startsWith(".")) return null;
41692
+ const parts2 = from.split("/").slice(0, -1);
41693
+ for (const piece of spec.split("/")) {
41694
+ if (piece === "." || piece === "") continue;
41695
+ if (piece === "..") parts2.pop();
41696
+ else parts2.push(piece);
41697
+ }
41698
+ return stripModuleExtension(parts2.join("/"));
41699
+ }
41700
+ function stripModuleExtension(path) {
41701
+ return path.replace(/\.(?:[cm]?[jt]sx?|d\.ts)$/, "");
41702
+ }
41703
+ function reaches(visible, path) {
41704
+ const bare = stripModuleExtension(path);
41705
+ return visible.has(bare) || visible.has(path) || bare.endsWith("/index") && visible.has(bare.slice(0, -"/index".length));
41706
+ }
41707
+ function headerOf(content, symbol2) {
41708
+ const lines = content.split("\n");
41709
+ const start2 = symbol2.range[0];
41710
+ const chunk = [];
41711
+ for (let i2 = start2; i2 < Math.min(lines.length, start2 + 4); i2 += 1) {
41712
+ const line3 = lines[i2] ?? "";
41713
+ chunk.push(line3);
41714
+ if (line3.includes("{")) break;
41715
+ }
41716
+ return chunk.join(" ");
41717
+ }
41718
+ async function buildRepoIndex(files) {
41719
+ const symbols2 = /* @__PURE__ */ new Map();
41720
+ const byName = /* @__PURE__ */ new Map();
41721
+ const byFile = /* @__PURE__ */ new Map();
41722
+ const imports = /* @__PURE__ */ new Map();
41723
+ const ranges = /* @__PURE__ */ new Map();
41724
+ const headers = /* @__PURE__ */ new Map();
41725
+ const paths = [...files.keys()].filter((path) => languageForPath(path) !== null).sort();
41726
+ for (const path of paths) {
41727
+ const content = files.get(path);
41728
+ const shard = await parseDeclarations(path, content);
41729
+ if (shard === null) continue;
41730
+ const targets = /* @__PURE__ */ new Set();
41731
+ for (const match of content.matchAll(/from\s+["']([^"']+)["']/g)) {
41732
+ const resolved = resolveImport(path, match[1] ?? "");
41733
+ if (resolved !== null) targets.add(resolved);
41734
+ }
41735
+ imports.set(path, targets);
41736
+ for (const symbol2 of shard.symbols) {
41737
+ const hash2 = symbol2.symbol.indexOf("#");
41738
+ const entry = { id: symbol2.symbol, name: symbol2.name, qualified: symbol2.symbol.slice(hash2 + 1), kind: symbol2.kind, path, line: symbol2.range[0] + 1, parent: symbol2.parent };
41739
+ symbols2.set(entry.id, entry);
41740
+ ranges.set(entry.id, symbol2);
41741
+ byName.set(entry.name, [...byName.get(entry.name) ?? [], entry]);
41742
+ byFile.set(path, [...byFile.get(path) ?? [], entry]);
41743
+ if (symbol2.kind === "class" || symbol2.kind === "interface") headers.set(entry.id, headerOf(content, symbol2));
41744
+ }
41745
+ }
41746
+ const callees = /* @__PURE__ */ new Map();
41747
+ const callers = /* @__PURE__ */ new Map();
41748
+ for (const entry of symbols2.values()) {
41749
+ if (!CALLABLE.has(entry.kind)) continue;
41750
+ const range = ranges.get(entry.id)?.enclosingRange;
41751
+ if (range === void 0) continue;
41752
+ const text = stripNoise(files.get(entry.path).split("\n").slice(range[0], range[2] + 1).join("\n"));
41753
+ const visible = imports.get(entry.path) ?? /* @__PURE__ */ new Set();
41754
+ const seen = /* @__PURE__ */ new Set();
41755
+ for (const match of text.matchAll(/[A-Za-z_$][\w$]*/g)) {
41756
+ const id2 = match[0];
41757
+ if (KEYWORDS.has(id2) || seen.has(id2)) continue;
41758
+ seen.add(id2);
41759
+ for (const target2 of byName.get(id2) ?? []) {
41760
+ if (target2.id === entry.id || target2.kind === "property" || target2.kind === "parameter") continue;
41761
+ if (target2.path !== entry.path && !reaches(visible, target2.path)) continue;
41762
+ if (target2.id === entry.parent) continue;
41763
+ callees.set(entry.id, (callees.get(entry.id) ?? /* @__PURE__ */ new Set()).add(target2.id));
41764
+ callers.set(target2.id, (callers.get(target2.id) ?? /* @__PURE__ */ new Set()).add(entry.id));
41765
+ }
41766
+ }
41767
+ }
41768
+ const heritage = /* @__PURE__ */ new Map();
41769
+ const heirs = /* @__PURE__ */ new Map();
41770
+ const resolve16 = (from, name2) => {
41771
+ const visible = imports.get(from.path) ?? /* @__PURE__ */ new Set();
41772
+ return (byName.get(baseName(name2)) ?? []).find((candidate) => candidate.path === from.path || reaches(visible, candidate.path));
41773
+ };
41774
+ for (const [id2, header] of headers) {
41775
+ const entry = symbols2.get(id2);
41776
+ const stem2 = header.slice(header.indexOf(entry.name) + entry.name.length).replace(/^<[^>]*>/, "").replace(/\{.*$/, "");
41777
+ const ext = /\bextends\s+([A-Za-z_$][\w$.]*)/.exec(stem2)?.[1];
41778
+ const impl = /\bimplements\s+(.+)$/.exec(stem2)?.[1];
41779
+ const extendsIds = ext === void 0 ? [] : [resolve16(entry, ext)?.id].filter((value) => value !== void 0);
41780
+ const implementsIds = (impl === void 0 ? [] : impl.split(/,(?![^<]*>)/).map((part) => resolve16(entry, part.trim()))).filter((value) => value !== void 0).map((value) => value.id);
41781
+ if (extendsIds.length === 0 && implementsIds.length === 0) continue;
41782
+ heritage.set(id2, { extends: extendsIds, implements: implementsIds });
41783
+ for (const target2 of extendsIds) heirs.set(target2, { extendedBy: [...heirs.get(target2)?.extendedBy ?? [], id2], implementedBy: heirs.get(target2)?.implementedBy ?? [] });
41784
+ for (const target2 of implementsIds) heirs.set(target2, { extendedBy: heirs.get(target2)?.extendedBy ?? [], implementedBy: [...heirs.get(target2)?.implementedBy ?? [], id2] });
41785
+ }
41786
+ const words = /* @__PURE__ */ new Map();
41787
+ for (const entry of symbols2.values()) for (const word of new Set(wordsOf(entry.name))) words.set(word, (words.get(word) ?? 0) + 1);
41788
+ return { files: paths.length, symbols: symbols2, byName, byFile, callees, callers, heritage, heirs, imports, words, wordDocs: symbols2.size };
41789
+ }
41790
+ var KEYWORDS, CALLABLE, baseName;
41791
+ var init_context_map = __esm({
41792
+ "../index-builder/src/context-map.ts"() {
41793
+ "use strict";
41794
+ init_src();
41795
+ init_languages();
41796
+ init_treesitter();
41797
+ init_rank();
41798
+ init_rank();
41799
+ KEYWORDS = /* @__PURE__ */ new Set(["const", "let", "var", "function", "return", "if", "else", "new", "this", "class", "extends", "implements", "import", "export", "from", "type", "interface", "async", "await", "string", "number", "boolean", "void", "null", "undefined", "true", "false", "private", "protected", "public", "readonly", "static", "abstract", "super", "typeof", "for", "of", "in", "while", "throw", "try", "catch", "as"]);
41800
+ CALLABLE = /* @__PURE__ */ new Set(["function", "method", "constant", "variable"]);
41801
+ baseName = (name2) => name2.replace(/<.*$/, "").split(".").pop() ?? name2;
41802
+ }
41803
+ });
41804
+
41784
41805
  // ../index-builder/src/context-map-build.ts
41785
41806
  import { execFile as execFile2 } from "node:child_process";
41786
41807
  import { mkdir as mkdir3, readFile as readFile5, writeFile as writeFile3 } from "node:fs/promises";
@@ -41790,7 +41811,7 @@ async function git5(root, args2) {
41790
41811
  const { stdout } = await execFileAsync2("git", args2, { cwd: root, encoding: "utf8", maxBuffer: 256 * 1024 * 1024 });
41791
41812
  return stdout.trim();
41792
41813
  }
41793
- async function buildDigestForCheckout(options) {
41814
+ async function buildArtifactsForCheckout(options) {
41794
41815
  const tracked = (await execFileAsync2("git", ["ls-files", "-z"], { cwd: options.root, encoding: "utf8", maxBuffer: 256 * 1024 * 1024 })).stdout.split("\0").filter((path) => path !== "");
41795
41816
  const files = /* @__PURE__ */ new Map();
41796
41817
  let uncovered = 0;
@@ -41815,9 +41836,17 @@ async function buildDigestForCheckout(options) {
41815
41836
  } catch {
41816
41837
  branch = void 0;
41817
41838
  }
41818
- return CodeMapDigest.parse(
41819
- buildCodeMapDigest({ index, commitSha, ...branch === void 0 ? {} : { branch }, uncovered, builtAt: options.builtAt ?? (/* @__PURE__ */ new Date()).toISOString(), ...options.task === void 0 ? {} : { task: options.task } })
41820
- );
41839
+ const builtAt = options.builtAt ?? (/* @__PURE__ */ new Date()).toISOString();
41840
+ const digest = CodeMapDigest.parse(buildCodeMapDigest({ index, commitSha, ...branch === void 0 ? {} : { branch }, uncovered, builtAt, ...options.task === void 0 ? {} : { task: options.task } }));
41841
+ const indexFile = { schemaVersion: "1", revision: { commitSha, ...branch === void 0 ? {} : { branch } }, builtAt, uncovered, index: serializeRepoIndex(index) };
41842
+ return { digest, indexFile };
41843
+ }
41844
+ async function writeIndexFile(root, indexFile) {
41845
+ const path = join27(root, CODE_INDEX_PATH);
41846
+ await mkdir3(dirname10(path), { recursive: true });
41847
+ await writeFile3(path, `${JSON.stringify(indexFile)}
41848
+ `);
41849
+ return path;
41821
41850
  }
41822
41851
  async function writeDigest(root, digest, out2) {
41823
41852
  const path = out2 ?? join27(root, CODE_MAP_DIGEST_PATH);
@@ -41896,9 +41925,10 @@ async function runCli2(argv, env, out2 = console.log, err2 = console.error) {
41896
41925
  }
41897
41926
  if (command === "map") {
41898
41927
  const root = resolve14(values.root ?? process.cwd());
41899
- const digest = await buildDigestForCheckout({ root, ...values.task === void 0 ? {} : { task: values.task } });
41928
+ const { digest, indexFile } = await buildArtifactsForCheckout({ root, ...values.task === void 0 ? {} : { task: values.task } });
41900
41929
  const path = await writeDigest(root, digest, values.out === void 0 ? void 0 : resolve14(values.out));
41901
- out2(`wrote the code map digest for ${digest.revision.commitSha.slice(0, 12)} (${digest.coverage.files} files, ${digest.coverage.symbols} symbols, ${digest.lines.length} lines) to ${path}`);
41930
+ const indexPath = values.out === void 0 ? await writeIndexFile(root, indexFile) : null;
41931
+ out2(`wrote the code map digest for ${digest.revision.commitSha.slice(0, 12)} (${digest.coverage.files} files, ${digest.coverage.symbols} symbols, ${digest.lines.length} lines) to ${path}${indexPath === null ? "" : `, and the ranking index to ${indexPath}`}`);
41902
41932
  return 0;
41903
41933
  }
41904
41934
  if (command === "upload") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "overlane",
3
- "version": "0.1.134",
3
+ "version": "0.1.135",
4
4
  "description": "Overlane: connect a GitHub project to your coding agents. One portable CLI with project memory, tasks, a code index, guardrails and the Claude Code and Codex plugin.",
5
5
  "keywords": [
6
6
  "overlane",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mvrx-harness",
3
- "version": "0.1.134",
3
+ "version": "0.1.135",
4
4
  "description": "Overlane context at session start and the shared Overlane skills.",
5
5
  "author": {
6
6
  "name": "owenob1"
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Task gate: refuses file edits and mutating shell commands while the working copy holds no task; reads and overlane commands always pass. Fails open on its own errors. Inject the Overlane context packet at session start. Fails open: on any error it prints nothing and exits 0. Completion gate: blocks a stop twice while the claimed task is running and not submitted. Fails open: any error prints nothing and exits 0. On a usage-limit failure, checkpoints and pauses the claimed task with reason quota. Fails open: any error prints nothing and exits 0. Turns a user instruction that asks for work into a prioritised task, attaches follow-ups to the active task and preempts it when a new task outranks it. Fails open: any error prints nothing and exits 0.",
2
+ "description": "Task gate: refuses file edits and mutating shell commands while the working copy holds no task; reads and overlane commands always pass. Fails open on its own errors. Inject the Overlane context packet at session start. Fails open: on any error it prints nothing and exits 0. Completion gate: blocks a stop twice while the claimed task is running and not submitted. Fails open: any error prints nothing and exits 0. On a usage-limit failure, checkpoints and pauses the claimed task with reason quota. Fails open: any error prints nothing and exits 0. Delivers the code map once per session on the first prompt, ranked by the prompt's words (ADR 0055). Fails open: any error prints nothing and exits 0. Turns a user instruction that asks for work into a prioritised task, attaches follow-ups to the active task and preempts it when a new task outranks it. Fails open: any error prints nothing and exits 0.",
3
3
  "hooks": {
4
4
  "PreToolUse": [
5
5
  {
@@ -48,6 +48,15 @@
48
48
  }
49
49
  ],
50
50
  "UserPromptSubmit": [
51
+ {
52
+ "hooks": [
53
+ {
54
+ "type": "command",
55
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/harness-codemap.mjs\"",
56
+ "timeout": 10
57
+ }
58
+ ]
59
+ },
51
60
  {
52
61
  "hooks": [
53
62
  {