scopecairn 0.14.0 → 0.14.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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  isProtected
4
- } from "./chunk-4VHUOZ7J.js";
4
+ } from "./chunk-JQBYQ4EF.js";
5
5
 
6
6
  // src/retrieval/classify.ts
7
7
  var FANIN_THRESHOLD = 5;
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  isProtected,
7
7
  loadProtectedPatterns
8
- } from "./chunk-4VHUOZ7J.js";
8
+ } from "./chunk-JQBYQ4EF.js";
9
9
  import {
10
10
  coChangeSet,
11
11
  groupHistoryFiles
@@ -30,6 +30,9 @@ function openDb(repoRoot) {
30
30
  const db = new DatabaseSync(dbPath(repoRoot));
31
31
  db.exec(`
32
32
  PRAGMA journal_mode = WAL;
33
+ PRAGMA synchronous = NORMAL;
34
+ PRAGMA temp_store = MEMORY;
35
+ PRAGMA cache_size = -64000;
33
36
  PRAGMA foreign_keys = ON;
34
37
  CREATE TABLE IF NOT EXISTS files (
35
38
  id INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  dataDir,
4
4
  ensureProtectedFile
5
- } from "./chunk-4VHUOZ7J.js";
5
+ } from "./chunk-JQBYQ4EF.js";
6
6
  import {
7
7
  tokenizeIdentifier,
8
8
  tokenizeTask
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  classify
4
- } from "./chunk-UUPA64KG.js";
5
- import "./chunk-4VHUOZ7J.js";
4
+ } from "./chunk-2MIHTOLI.js";
5
+ import "./chunk-JQBYQ4EF.js";
6
6
  export {
7
7
  classify
8
8
  };
package/dist/cli.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  buildContext,
5
5
  buildContextPayload,
6
6
  resolveEffectiveMode
7
- } from "./chunk-HTJIVHYW.js";
7
+ } from "./chunk-IRYNTYZD.js";
8
8
  import "./chunk-ZV4BSIQM.js";
9
9
  import {
10
10
  ensureHistoryIndex
@@ -25,10 +25,10 @@ import {
25
25
  gitSignalsFor,
26
26
  retrieve,
27
27
  syncFileIndex
28
- } from "./chunk-K7D5EIMF.js";
28
+ } from "./chunk-NAQXQTMH.js";
29
29
  import {
30
30
  classify
31
- } from "./chunk-UUPA64KG.js";
31
+ } from "./chunk-2MIHTOLI.js";
32
32
  import {
33
33
  dataDir,
34
34
  dbPath,
@@ -38,7 +38,7 @@ import {
38
38
  loadProtectedPatterns,
39
39
  matchPattern,
40
40
  openDb
41
- } from "./chunk-4VHUOZ7J.js";
41
+ } from "./chunk-JQBYQ4EF.js";
42
42
  import {
43
43
  coChangeSet,
44
44
  groupHistoryFiles,
@@ -5913,15 +5913,24 @@ function writeArchaeologyIfAbsent(repoRoot2) {
5913
5913
  function toPosixRel(repoRoot2, abs) {
5914
5914
  return path14.relative(repoRoot2, abs).split(path14.sep).join("/");
5915
5915
  }
5916
- function walk(absDir, out) {
5917
- const entries = fs13.readdirSync(absDir, { withFileTypes: true });
5916
+ function walk(repoRoot2, absDir, rules, out) {
5917
+ let entries;
5918
+ try {
5919
+ entries = fs13.readdirSync(absDir, { withFileTypes: true });
5920
+ } catch {
5921
+ return;
5922
+ }
5918
5923
  for (const e of entries) {
5919
5924
  const abs = path14.join(absDir, e.name);
5925
+ const rel = toPosixRel(repoRoot2, abs);
5920
5926
  if (e.isDirectory()) {
5921
5927
  if (e.isSymbolicLink()) continue;
5922
- walk(abs, out);
5928
+ if (isIgnored(rel + "/", rules) || isIgnored(rel, rules)) continue;
5929
+ walk(repoRoot2, abs, rules, out);
5923
5930
  } else if (e.isFile()) {
5924
- out.push(abs);
5931
+ if (!isIgnored(rel, rules)) {
5932
+ out.push(abs);
5933
+ }
5925
5934
  }
5926
5935
  }
5927
5936
  }
@@ -5933,8 +5942,8 @@ async function scanRepository(repoRoot2) {
5933
5942
  try {
5934
5943
  ensureDefaultFiles(repoRoot2);
5935
5944
  const allAbs = [];
5936
- walk(repoRoot2, allAbs);
5937
- await prepareTreeSitter(allAbs.filter((abs) => isSourceFile(abs) && !isIgnored(toPosixRel(repoRoot2, abs), rules)).map((abs) => grammarForPath(abs)).filter((name) => name !== null));
5945
+ walk(repoRoot2, repoRoot2, rules, allAbs);
5946
+ await prepareTreeSitter(allAbs.filter((abs) => isSourceFile(abs)).map((abs) => grammarForPath(abs)).filter((name) => name !== null));
5938
5947
  let totalFilesSeen = 0;
5939
5948
  let inserted = 0;
5940
5949
  let updated = 0;
@@ -7811,10 +7820,10 @@ function loadPersistedScope(db, task) {
7811
7820
  return { scope, taskId: row.id };
7812
7821
  }
7813
7822
  async function computeTaskScope(db, repoRoot2, task, opts) {
7814
- const { retrieve: retrieve2 } = await import("./retrieve-TDD2N24I.js");
7815
- const { classify: classify2 } = await import("./classify-HAX4TC7I.js");
7816
- const { buildContext: buildContext2 } = await import("./contextBuilder-HVF5CRXG.js");
7817
- const { loadProtectedPatterns: loadProtectedPatterns2 } = await import("./protected-MW57HNV6.js");
7823
+ const { retrieve: retrieve2 } = await import("./retrieve-GW6YA7BQ.js");
7824
+ const { classify: classify2 } = await import("./classify-V7GTELLP.js");
7825
+ const { buildContext: buildContext2 } = await import("./contextBuilder-A5NX7EQO.js");
7826
+ const { loadProtectedPatterns: loadProtectedPatterns2 } = await import("./protected-37GK4NAJ.js");
7818
7827
  const { historySearch: historySearch2 } = await import("./search-RFQREAFV.js");
7819
7828
  const result = retrieve2(db, repoRoot2, task);
7820
7829
  if (result.ranked.length === 0) {
@@ -9867,7 +9876,7 @@ import { execFileSync as execFileSync6, execSync } from "child_process";
9867
9876
  // package.json
9868
9877
  var package_default = {
9869
9878
  name: "scopecairn",
9870
- version: "0.14.0",
9879
+ version: "0.14.1",
9871
9880
  description: "ScopeCairn \u2014 Codebase Intelligence & Agent Optimization Layer (local-first)",
9872
9881
  license: "MIT",
9873
9882
  type: "module",
@@ -3,9 +3,9 @@ import {
3
3
  buildContext,
4
4
  buildContextPayload,
5
5
  resolveEffectiveMode
6
- } from "./chunk-HTJIVHYW.js";
6
+ } from "./chunk-IRYNTYZD.js";
7
7
  import "./chunk-ZV4BSIQM.js";
8
- import "./chunk-4VHUOZ7J.js";
8
+ import "./chunk-JQBYQ4EF.js";
9
9
  import "./chunk-GQFBQRDD.js";
10
10
  import "./chunk-OPA4TMAT.js";
11
11
  import "./chunk-UVKHDHBU.js";
@@ -8,7 +8,7 @@ import {
8
8
  isSecretFile,
9
9
  loadProtectedPatterns,
10
10
  matchPattern
11
- } from "./chunk-4VHUOZ7J.js";
11
+ } from "./chunk-JQBYQ4EF.js";
12
12
  export {
13
13
  DEFAULT_PROTECTED_PATTERNS,
14
14
  SECRET_PATTERNS,
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  retrieve
4
- } from "./chunk-K7D5EIMF.js";
5
- import "./chunk-4VHUOZ7J.js";
4
+ } from "./chunk-NAQXQTMH.js";
5
+ import "./chunk-JQBYQ4EF.js";
6
6
  import "./chunk-UVKHDHBU.js";
7
7
  export {
8
8
  retrieve
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scopecairn",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "ScopeCairn — Codebase Intelligence & Agent Optimization Layer (local-first)",
5
5
  "license": "MIT",
6
6
  "type": "module",