@cejel/cejel 0.4.10 → 0.5.0

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.
@@ -3,7 +3,7 @@ import { createRequire as __cejelCreateRequire } from 'node:module';
3
3
  const require = __cejelCreateRequire(import.meta.url);
4
4
  import {
5
5
  init_esm_shims
6
- } from "./chunk-PTZU6G4E.js";
6
+ } from "./chunk-O3MHSK25.js";
7
7
 
8
8
  // src/witan/git-exec.ts
9
9
  init_esm_shims();
@@ -4,7 +4,7 @@ const require = __cejelCreateRequire(import.meta.url);
4
4
  import {
5
5
  __export,
6
6
  init_esm_shims
7
- } from "./chunk-PTZU6G4E.js";
7
+ } from "./chunk-O3MHSK25.js";
8
8
 
9
9
  // node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js
10
10
  var external_exports = {};
@@ -5,10 +5,10 @@ import {
5
5
  describeGitFailure,
6
6
  execGit,
7
7
  isExpectedGitAbsence
8
- } from "./chunk-IHT7B6L7.js";
8
+ } from "./chunk-63XQDYQ5.js";
9
9
  import {
10
10
  init_esm_shims
11
- } from "./chunk-PTZU6G4E.js";
11
+ } from "./chunk-O3MHSK25.js";
12
12
 
13
13
  // src/packs/llm/files.ts
14
14
  init_esm_shims();
@@ -171,7 +171,8 @@ function trackContentReads(_repoPath, collect) {
171
171
  unattributedCriteria: /* @__PURE__ */ new Set(),
172
172
  criterionSkipReasons: /* @__PURE__ */ new Map(),
173
173
  signalSkipReasons: /* @__PURE__ */ new Map(),
174
- withheldPaths: /* @__PURE__ */ new Map()
174
+ withheldPaths: /* @__PURE__ */ new Map(),
175
+ withheldPathIntersections: /* @__PURE__ */ new Map()
175
176
  };
176
177
  activeSession = session;
177
178
  try {
@@ -225,16 +226,42 @@ function registerWithheldRepoPath(relativePath, reason) {
225
226
  if (!session) return;
226
227
  addSkipReason(session.withheldPaths, relativePath, reason);
227
228
  }
228
- function abstainSignalOnWithheldPaths(criterionId, signalId, wouldHaveRead) {
229
+ function withheldRepoPaths() {
230
+ const session = activeSession;
231
+ if (!session) return [];
232
+ return [...session.withheldPaths].map(([path2, reasons]) => {
233
+ const intersection = session.withheldPathIntersections.get(path2);
234
+ return {
235
+ path: path2,
236
+ reasons,
237
+ signalsAdmitting: intersection ? [...intersection.signalsAdmitting].sort() : [],
238
+ actedOn: intersection?.actedOn ?? false
239
+ };
240
+ }).sort((left, right) => left.path.localeCompare(right.path));
241
+ }
242
+ function abstainSignalOnWithheldPaths(criterionId, signalId, wouldHaveRead, act) {
229
243
  const session = activeSession;
230
244
  if (!session) return false;
231
- let abstained = false;
245
+ let admitted = false;
246
+ const signalKey = `${criterionId}.${signalId}`;
232
247
  for (const [path2, reasons] of session.withheldPaths) {
233
248
  if (!wouldHaveRead(path2)) continue;
234
- abstained = true;
235
- for (const reason of reasons) attributeSkip(session, criterionId, [signalId], reason);
249
+ admitted = true;
250
+ const existing = session.withheldPathIntersections.get(path2);
251
+ if (existing) {
252
+ existing.signalsAdmitting.add(signalKey);
253
+ if (act) existing.actedOn = true;
254
+ } else {
255
+ session.withheldPathIntersections.set(path2, {
256
+ signalsAdmitting: /* @__PURE__ */ new Set([signalKey]),
257
+ actedOn: act
258
+ });
259
+ }
260
+ if (act) {
261
+ for (const reason of reasons) attributeSkip(session, criterionId, [signalId], reason);
262
+ }
236
263
  }
237
- return abstained;
264
+ return admitted && act;
238
265
  }
239
266
  function recordFilesystemSkip(path2, error, deniedContext = false, deduplicate = true) {
240
267
  const errno = errnoClass(error);
@@ -315,6 +342,7 @@ export {
315
342
  withContentReadSignals,
316
343
  recordContentSkip,
317
344
  registerWithheldRepoPath,
345
+ withheldRepoPaths,
318
346
  abstainSignalOnWithheldPaths,
319
347
  recordFilesystemSkip,
320
348
  readRepoText,
@@ -7,7 +7,7 @@ import {
7
7
  __filename,
8
8
  __require,
9
9
  init_esm_shims
10
- } from "./chunk-PTZU6G4E.js";
10
+ } from "./chunk-O3MHSK25.js";
11
11
 
12
12
  // node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/typescript.js
13
13
  var require_typescript = __commonJS({