@vibe-agent-toolkit/utils 0.1.33-rc.1 → 0.1.33-rc.2

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.
@@ -2,34 +2,110 @@
2
2
  * Git tracking cache for efficient git-ignore checking.
3
3
  *
4
4
  * Problem: Calling git check-ignore on every file is expensive (spawns process each time).
5
- * Solution: Cache results and pre-populate with git ls-files (tracked files are never ignored).
5
+ * Solution: Cache results and pre-populate with git ls-files (tracked + untracked non-ignored).
6
6
  */
7
+ /**
8
+ * Options for {@link GitTracker.initialize}.
9
+ */
10
+ export interface GitTrackerInitOptions {
11
+ /**
12
+ * When true (default), pre-populate the "active set" from
13
+ * `git ls-files --cached --others --exclude-standard`, which returns all
14
+ * tracked + untracked-but-not-gitignored files. This enables O(1) bulk
15
+ * `isIgnoredByActiveSet` lookups without spawning `git check-ignore` per
16
+ * path.
17
+ *
18
+ * When false, only tracked files are pre-populated (legacy v0.1.31 behavior).
19
+ * Use this only when you know the caller will still rely on
20
+ * {@link GitTracker.isIgnored}'s cache-miss fallback and untracked
21
+ * non-ignored files are rare.
22
+ */
23
+ includeUntracked?: boolean;
24
+ }
7
25
  /**
8
26
  * Git tracking cache service.
9
27
  *
10
28
  * Provides efficient git-ignore checking with caching and pre-population from git ls-files.
11
29
  *
30
+ * Bulk callers (directory walkers that process hundreds+ of paths) should
31
+ * prefer {@link isIgnoredByActiveSet} and {@link hasActiveDescendant} — both
32
+ * answer in O(1) against the pre-populated active set and never spawn a git
33
+ * subprocess for paths inside the project root.
34
+ *
35
+ * One-off callers (e.g. link validators that only check a handful of paths)
36
+ * can use {@link isIgnored}, which falls back to `git check-ignore` on cache
37
+ * miss.
38
+ *
12
39
  * @example
13
40
  * ```typescript
14
41
  * const tracker = new GitTracker('/project');
15
- * await tracker.initialize();
42
+ * await tracker.initialize(); // defaults to includeUntracked: true
43
+ *
44
+ * // Bulk path: O(1) lookup against pre-populated active set
45
+ * if (!tracker.isIgnoredByActiveSet('/project/docs/file.md')) { ... }
16
46
  *
17
- * // Check if file is ignored (uses cache)
18
- * const ignored = tracker.isTrackedByGit('/project/docs/file.md');
47
+ * // One-off path: may spawn `git check-ignore` on miss
48
+ * if (!tracker.isIgnored('/project/docs/file.md')) { ... }
19
49
  * ```
20
50
  */
21
51
  export declare class GitTracker {
22
52
  private readonly projectRoot;
53
+ private readonly normalizedProjectRoot;
23
54
  private readonly cache;
55
+ /** Absolute paths of all files known to be NOT ignored (tracked + untracked non-ignored). */
56
+ private readonly activeSet;
57
+ /** Absolute paths of every directory that contains at least one active-set file. */
58
+ private readonly activeAncestors;
24
59
  private initialized;
60
+ private activeSetPopulated;
25
61
  constructor(projectRoot: string);
26
62
  /**
27
63
  * Initialize the tracker by pre-populating cache from git ls-files.
28
64
  *
29
- * All files returned by git ls-files are tracked and therefore NOT ignored.
30
- * This avoids calling git check-ignore for the common case (tracked files).
65
+ * With `includeUntracked: true` (default), the tracker builds an "active set"
66
+ * of all files that are NOT gitignored (tracked + untracked-not-ignored).
67
+ * This lets {@link isIgnoredByActiveSet} answer in O(1) without spawning
68
+ * `git check-ignore` per file.
69
+ *
70
+ * With `includeUntracked: false`, only tracked files are pre-populated.
71
+ * Untracked non-ignored files will miss the cache and fall through to
72
+ * `git check-ignore` via {@link isIgnored}.
31
73
  */
32
- initialize(): Promise<void>;
74
+ initialize(options?: GitTrackerInitOptions): Promise<void>;
75
+ /** Walk up from each active-set file's directory and record every ancestor up to projectRoot. */
76
+ private populateAncestorSet;
77
+ /**
78
+ * Returns true if the given absolute path IS an active-set file OR is an
79
+ * ancestor directory of at least one active-set file.
80
+ *
81
+ * Used by walkers to decide whether descending into a directory is worth
82
+ * the cost: an ignored directory with no active descendants can be skipped
83
+ * outright. Requires {@link initialize} with `includeUntracked: true`
84
+ * (the default); returns `true` for any path otherwise, to preserve the
85
+ * legacy behavior where walkers descended unconditionally.
86
+ *
87
+ * @param absolutePath - Absolute path to check (file or directory)
88
+ */
89
+ hasActiveDescendant(absolutePath: string): boolean;
90
+ /**
91
+ * Fast O(1) ignore check against the pre-populated active set.
92
+ *
93
+ * For paths INSIDE the project root, membership in the active set is
94
+ * authoritative: a path is ignored iff it is not in the active set AND not
95
+ * an ancestor of any active-set path. No `git check-ignore` spawn.
96
+ *
97
+ * For paths OUTSIDE the project root, falls back to {@link isIgnored} so
98
+ * legacy behavior is preserved.
99
+ *
100
+ * Requires {@link initialize} with `includeUntracked: true` (the default).
101
+ * When initialized without untracked files, this method delegates to
102
+ * {@link isIgnored} so callers still get correct results at the cost of a
103
+ * possible per-path spawn.
104
+ *
105
+ * @param absolutePath - Absolute path to check
106
+ */
107
+ isIgnoredByActiveSet(absolutePath: string): boolean;
108
+ private isWithinProjectRoot;
33
109
  /**
34
110
  * Check if a file is ignored by git.
35
111
  *
@@ -41,11 +117,11 @@ export declare class GitTracker {
41
117
  isIgnored(filePath: string): boolean;
42
118
  /**
43
119
  * Get cache statistics.
44
- *
45
- * @returns Object with cache size
46
120
  */
47
121
  getStats(): {
48
122
  cacheSize: number;
123
+ activeSetSize: number;
124
+ activeAncestorsSize: number;
49
125
  };
50
126
  /**
51
127
  * Clear the cache.
@@ -1 +1 @@
1
- {"version":3,"file":"git-tracker.d.ts","sourceRoot":"","sources":["../src/git-tracker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;;;;;;;;GAaG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAmC;IACzD,OAAO,CAAC,WAAW,CAAS;gBAEhB,WAAW,EAAE,MAAM;IAI/B;;;;;OAKG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAmBjC;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAcpC;;;;OAIG;IACH,QAAQ,IAAI;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE;IAMjC;;OAE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  * Git tracking cache for efficient git-ignore checking.
3
3
  *
4
4
  * Problem: Calling git check-ignore on every file is expensive (spawns process each time).
5
- * Solution: Cache results and pre-populate with git ls-files (tracked files are never ignored).
5
+ * Solution: Cache results and pre-populate with git ls-files (tracked + untracked non-ignored).
6
6
  */
7
+ import { dirname } from 'node:path';
7
8
  import { gitLsFiles, isGitIgnored } from './git-utils.js';
9
+ import { safePath } from './path-utils.js';
8
10
  /**
9
11
  * Git tracking cache service.
10
12
  *
11
13
  * Provides efficient git-ignore checking with caching and pre-population from git ls-files.
12
14
  *
15
+ * Bulk callers (directory walkers that process hundreds+ of paths) should
16
+ * prefer {@link isIgnoredByActiveSet} and {@link hasActiveDescendant} — both
17
+ * answer in O(1) against the pre-populated active set and never spawn a git
18
+ * subprocess for paths inside the project root.
19
+ *
20
+ * One-off callers (e.g. link validators that only check a handful of paths)
21
+ * can use {@link isIgnored}, which falls back to `git check-ignore` on cache
22
+ * miss.
23
+ *
13
24
  * @example
14
25
  * ```typescript
15
26
  * const tracker = new GitTracker('/project');
16
- * await tracker.initialize();
27
+ * await tracker.initialize(); // defaults to includeUntracked: true
17
28
  *
18
- * // Check if file is ignored (uses cache)
19
- * const ignored = tracker.isTrackedByGit('/project/docs/file.md');
29
+ * // Bulk path: O(1) lookup against pre-populated active set
30
+ * if (!tracker.isIgnoredByActiveSet('/project/docs/file.md')) { ... }
31
+ *
32
+ * // One-off path: may spawn `git check-ignore` on miss
33
+ * if (!tracker.isIgnored('/project/docs/file.md')) { ... }
20
34
  * ```
21
35
  */
22
36
  export class GitTracker {
23
37
  projectRoot;
38
+ normalizedProjectRoot;
24
39
  cache = new Map();
40
+ /** Absolute paths of all files known to be NOT ignored (tracked + untracked non-ignored). */
41
+ activeSet = new Set();
42
+ /** Absolute paths of every directory that contains at least one active-set file. */
43
+ activeAncestors = new Set();
25
44
  initialized = false;
45
+ activeSetPopulated = false;
26
46
  constructor(projectRoot) {
27
47
  this.projectRoot = projectRoot;
48
+ this.normalizedProjectRoot = safePath.resolve(projectRoot);
28
49
  }
29
50
  /**
30
51
  * Initialize the tracker by pre-populating cache from git ls-files.
31
52
  *
32
- * All files returned by git ls-files are tracked and therefore NOT ignored.
33
- * This avoids calling git check-ignore for the common case (tracked files).
53
+ * With `includeUntracked: true` (default), the tracker builds an "active set"
54
+ * of all files that are NOT gitignored (tracked + untracked-not-ignored).
55
+ * This lets {@link isIgnoredByActiveSet} answer in O(1) without spawning
56
+ * `git check-ignore` per file.
57
+ *
58
+ * With `includeUntracked: false`, only tracked files are pre-populated.
59
+ * Untracked non-ignored files will miss the cache and fall through to
60
+ * `git check-ignore` via {@link isIgnored}.
34
61
  */
35
- async initialize() {
62
+ async initialize(options) {
36
63
  if (this.initialized) {
37
64
  return;
38
65
  }
39
- // Get all tracked files from git
40
- const trackedFiles = gitLsFiles({ cwd: this.projectRoot });
41
- // Pre-populate cache: tracked files are NOT ignored
42
- if (trackedFiles !== null) {
43
- for (const relativePath of trackedFiles) {
44
- const absolutePath = `${this.projectRoot}/${relativePath}`;
66
+ const includeUntracked = options?.includeUntracked ?? true;
67
+ const files = gitLsFiles({
68
+ cwd: this.projectRoot,
69
+ ...(includeUntracked ? { includeUntracked: true } : {}),
70
+ });
71
+ if (files !== null) {
72
+ for (const relativePath of files) {
73
+ const absolutePath = safePath.resolve(this.projectRoot, relativePath);
45
74
  this.cache.set(absolutePath, false); // false = not ignored
75
+ this.activeSet.add(absolutePath);
46
76
  }
77
+ this.populateAncestorSet();
47
78
  }
79
+ this.activeSetPopulated = includeUntracked && files !== null;
48
80
  this.initialized = true;
49
81
  }
82
+ /** Walk up from each active-set file's directory and record every ancestor up to projectRoot. */
83
+ populateAncestorSet() {
84
+ const root = this.normalizedProjectRoot;
85
+ for (const absolutePath of this.activeSet) {
86
+ let current = dirname(absolutePath);
87
+ while (current !== root && current.length > root.length) {
88
+ if (this.activeAncestors.has(current)) {
89
+ // Ancestor (and all of its ancestors) already recorded — avoid redundant work.
90
+ break;
91
+ }
92
+ this.activeAncestors.add(current);
93
+ const parent = dirname(current);
94
+ if (parent === current) {
95
+ break;
96
+ }
97
+ current = parent;
98
+ }
99
+ }
100
+ // projectRoot itself is always an implicit ancestor of everything under it.
101
+ this.activeAncestors.add(root);
102
+ }
103
+ /**
104
+ * Returns true if the given absolute path IS an active-set file OR is an
105
+ * ancestor directory of at least one active-set file.
106
+ *
107
+ * Used by walkers to decide whether descending into a directory is worth
108
+ * the cost: an ignored directory with no active descendants can be skipped
109
+ * outright. Requires {@link initialize} with `includeUntracked: true`
110
+ * (the default); returns `true` for any path otherwise, to preserve the
111
+ * legacy behavior where walkers descended unconditionally.
112
+ *
113
+ * @param absolutePath - Absolute path to check (file or directory)
114
+ */
115
+ hasActiveDescendant(absolutePath) {
116
+ if (!this.activeSetPopulated) {
117
+ return true;
118
+ }
119
+ const normalized = safePath.resolve(absolutePath);
120
+ return this.activeSet.has(normalized) || this.activeAncestors.has(normalized);
121
+ }
122
+ /**
123
+ * Fast O(1) ignore check against the pre-populated active set.
124
+ *
125
+ * For paths INSIDE the project root, membership in the active set is
126
+ * authoritative: a path is ignored iff it is not in the active set AND not
127
+ * an ancestor of any active-set path. No `git check-ignore` spawn.
128
+ *
129
+ * For paths OUTSIDE the project root, falls back to {@link isIgnored} so
130
+ * legacy behavior is preserved.
131
+ *
132
+ * Requires {@link initialize} with `includeUntracked: true` (the default).
133
+ * When initialized without untracked files, this method delegates to
134
+ * {@link isIgnored} so callers still get correct results at the cost of a
135
+ * possible per-path spawn.
136
+ *
137
+ * @param absolutePath - Absolute path to check
138
+ */
139
+ isIgnoredByActiveSet(absolutePath) {
140
+ if (!this.activeSetPopulated) {
141
+ return this.isIgnored(absolutePath);
142
+ }
143
+ const normalized = safePath.resolve(absolutePath);
144
+ // Paths outside projectRoot can't be answered from the active set alone.
145
+ if (!this.isWithinProjectRoot(normalized)) {
146
+ return this.isIgnored(absolutePath);
147
+ }
148
+ return !(this.activeSet.has(normalized) || this.activeAncestors.has(normalized));
149
+ }
150
+ isWithinProjectRoot(normalizedAbsolutePath) {
151
+ const root = this.normalizedProjectRoot;
152
+ if (normalizedAbsolutePath === root) {
153
+ return true;
154
+ }
155
+ return normalizedAbsolutePath.startsWith(`${root}/`);
156
+ }
50
157
  /**
51
158
  * Check if a file is ignored by git.
52
159
  *
@@ -68,12 +175,12 @@ export class GitTracker {
68
175
  }
69
176
  /**
70
177
  * Get cache statistics.
71
- *
72
- * @returns Object with cache size
73
178
  */
74
179
  getStats() {
75
180
  return {
76
181
  cacheSize: this.cache.size,
182
+ activeSetSize: this.activeSet.size,
183
+ activeAncestorsSize: this.activeAncestors.size,
77
184
  };
78
185
  }
79
186
  /**
@@ -81,7 +188,10 @@ export class GitTracker {
81
188
  */
82
189
  clear() {
83
190
  this.cache.clear();
191
+ this.activeSet.clear();
192
+ this.activeAncestors.clear();
84
193
  this.initialized = false;
194
+ this.activeSetPopulated = false;
85
195
  }
86
196
  }
87
197
  //# sourceMappingURL=git-tracker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"git-tracker.js","sourceRoot":"","sources":["../src/git-tracker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE1D;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,UAAU;IACJ,WAAW,CAAS;IACpB,KAAK,GAAyB,IAAI,GAAG,EAAE,CAAC;IACjD,WAAW,GAAG,KAAK,CAAC;IAE5B,YAAY,WAAmB;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAU;QACd,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO;QACT,CAAC;QAED,iCAAiC;QACjC,MAAM,YAAY,GAAG,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAE3D,oDAAoD;QACpD,IAAI,YAAY,KAAK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C,KAAK,CAAC,IAAI;YAC1B,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI;YAClC,mBAAmB,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI;SAC/C,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClC,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-agent-toolkit/utils",
3
- "version": "0.1.33-rc.1",
3
+ "version": "0.1.33-rc.2",
4
4
  "type": "module",
5
5
  "description": "Core utility functions with no external dependencies",
6
6
  "keywords": [