@vibe-agent-toolkit/utils 0.1.37 → 0.1.39-rc.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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,gBAAgB,CAAC;AAG/B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,eAAe,CAAC;AAG9B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,wBAAwB,CAAC;AAGvC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,oBAAoB,CAAC;AAGnC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,wBAAwB,CAAC;AAGvC,cAAc,eAAe,CAAC;AAG9B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,gBAAgB,CAAC;AAG/B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,eAAe,CAAC;AAG9B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,wBAAwB,CAAC;AAGvC,cAAc,gBAAgB,CAAC;AAI/B,cAAc,oBAAoB,CAAC;AAGnC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,wBAAwB,CAAC;AAGvC,cAAc,eAAe,CAAC;AAG9B,cAAc,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -18,7 +18,8 @@ export * from './file-crawler.js';
18
18
  export * from './gitignore-checker.js';
19
19
  // Git utilities (using git commands directly)
20
20
  export * from './git-utils.js';
21
- // Project root discovery (workspace root -> git root -> fallback)
21
+ // Project root discovery (canonical: config git null).
22
+ // CLI-boundary use only — see docs/concepts/roots-and-config.md.
22
23
  export * from './project-utils.js';
23
24
  // Git tracking cache (for efficient git-ignore checking)
24
25
  export * from './git-tracker.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,8DAA8D;AAC9D,cAAc,gBAAgB,CAAC;AAE/B,gCAAgC;AAChC,cAAc,iBAAiB,CAAC;AAEhC,2DAA2D;AAC3D,cAAc,sBAAsB,CAAC;AAErC,uBAAuB;AACvB,cAAc,eAAe,CAAC;AAE9B,wCAAwC;AACxC,cAAc,mBAAmB,CAAC;AAElC,sBAAsB;AACtB,cAAc,wBAAwB,CAAC;AAEvC,8CAA8C;AAC9C,cAAc,gBAAgB,CAAC;AAE/B,kEAAkE;AAClE,cAAc,oBAAoB,CAAC;AAEnC,yDAAyD;AACzD,cAAc,kBAAkB,CAAC;AAEjC,oDAAoD;AACpD,cAAc,mBAAmB,CAAC;AAElC,4CAA4C;AAC5C,cAAc,wBAAwB,CAAC;AAEvC,2DAA2D;AAC3D,cAAc,eAAe,CAAC;AAE9B,oEAAoE;AACpE,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,8DAA8D;AAC9D,cAAc,gBAAgB,CAAC;AAE/B,gCAAgC;AAChC,cAAc,iBAAiB,CAAC;AAEhC,2DAA2D;AAC3D,cAAc,sBAAsB,CAAC;AAErC,uBAAuB;AACvB,cAAc,eAAe,CAAC;AAE9B,wCAAwC;AACxC,cAAc,mBAAmB,CAAC;AAElC,sBAAsB;AACtB,cAAc,wBAAwB,CAAC;AAEvC,8CAA8C;AAC9C,cAAc,gBAAgB,CAAC;AAE/B,2DAA2D;AAC3D,iEAAiE;AACjE,cAAc,oBAAoB,CAAC;AAEnC,yDAAyD;AACzD,cAAc,kBAAkB,CAAC;AAEjC,oDAAoD;AACpD,cAAc,mBAAmB,CAAC;AAElC,4CAA4C;AAC5C,cAAc,wBAAwB,CAAC;AAEvC,2DAA2D;AAC3D,cAAc,eAAe,CAAC;AAE9B,oEAAoE;AACpE,cAAc,oBAAoB,CAAC"}
@@ -1,19 +1,58 @@
1
1
  /**
2
- * Project root discovery utilities.
2
+ * Canonical root-discovery primitives for VAT.
3
3
  *
4
- * Finds the project root directory using a layered detection strategy:
5
- * workspace root (monorepo) -> git root -> directory fallback.
4
+ * Per spec docs/superpowers/specs/2026-05-17-root-model-and-leading-slash-design.md §6,
5
+ * these are CLI-boundary functions: inner libraries take roots as parameters, not these.
6
+ * All return `string | null` with no internal fallbacks.
6
7
  */
7
8
  /**
8
- * Find the project root for boundary enforcement.
9
+ * Find the nearest vibe-agent-toolkit.config.yaml by walking up from startDir.
9
10
  *
10
- * Detection order:
11
- * 1. Walk up from startDir looking for package.json with "workspaces" (monorepo root)
12
- * 2. Fall back to git repository root
13
- * 3. Fall back to startDir itself (tests / standalone)
11
+ * Returns the path to the config file itself (not its directory). Returns null
12
+ * if no config exists in any ancestor.
14
13
  *
15
- * @param startDir - Directory to start searching from (e.g., dirname of SKILL.md)
16
- * @returns Project root directory
14
+ * @param startDir - Directory to start the walk from
15
+ * @returns Path to the config file, or null if not found
17
16
  */
18
- export declare function findProjectRoot(startDir: string): string;
17
+ export declare function findConfigFile(startDir: string): string | null;
18
+ /**
19
+ * Find the nearest package.json with a "workspaces" key by walking up.
20
+ *
21
+ * Used for Node-monorepo binary discovery and Node-specific tooling only.
22
+ * NOT a substitute for findProjectRoot — VAT projects are not required to be
23
+ * npm workspaces. Returns null when no workspaces-bearing package.json is found.
24
+ *
25
+ * @param startDir - Directory to start the walk from
26
+ * @returns Path to the workspace root directory, or null if not found
27
+ */
28
+ export declare function findNodeWorkspaceRoot(startDir: string): string | null;
29
+ /**
30
+ * Reset {@link findProjectRoot}'s module-level cache.
31
+ *
32
+ * Call at the start of each independent CLI invocation so in-process callers
33
+ * (and integration tests sharing a vitest worker) don't observe stale results.
34
+ */
35
+ export declare function resetProjectRootCaches(): void;
36
+ /**
37
+ * Find the VAT project root.
38
+ *
39
+ * Discovery ladder (checks startDir itself first, then each ancestor):
40
+ * 1. Directory containing vibe-agent-toolkit.config.yaml → that directory
41
+ * 2. Directory containing .git/ → that directory
42
+ * 3. null
43
+ *
44
+ * The config-anchored ladder runs to completion first; only if no config is
45
+ * found anywhere up the tree do we walk a second time looking for .git/.
46
+ * This implements the "config wins over git, regardless of relative depth"
47
+ * semantic from spec §4 (config-file placement is a stronger declaration of
48
+ * intent than the git boundary).
49
+ *
50
+ * Cached at the module level via {@link walkUpCache}. The cache is keyed by
51
+ * each walked directory; entries are written for every dir touched on the
52
+ * walk so subsequent calls from siblings/descendants become Layer-1 hits.
53
+ *
54
+ * @param startDir - Directory to start the walk from
55
+ * @returns Project root directory, or null if neither config nor git root found
56
+ */
57
+ export declare function findProjectRoot(startDir: string): string | null;
19
58
  //# sourceMappingURL=project-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"project-utils.d.ts","sourceRoot":"","sources":["../src/project-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA+BxD"}
1
+ {"version":3,"file":"project-utils.d.ts","sourceRoot":"","sources":["../src/project-utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAY9D;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAmBrE;AAkBD;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C;AAoED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK/D"}
@@ -1,53 +1,181 @@
1
1
  /**
2
- * Project root discovery utilities.
2
+ * Canonical root-discovery primitives for VAT.
3
3
  *
4
- * Finds the project root directory using a layered detection strategy:
5
- * workspace root (monorepo) -> git root -> directory fallback.
4
+ * Per spec docs/superpowers/specs/2026-05-17-root-model-and-leading-slash-design.md §6,
5
+ * these are CLI-boundary functions: inner libraries take roots as parameters, not these.
6
+ * All return `string | null` with no internal fallbacks.
6
7
  */
7
8
  import { existsSync, readFileSync } from 'node:fs';
8
- import { dirname } from 'node:path';
9
- import { gitFindRoot } from './git-utils.js';
9
+ import { dirname, parse } from 'node:path';
10
10
  import { safePath } from './path-utils.js';
11
+ const CONFIG_FILENAME = 'vibe-agent-toolkit.config.yaml';
11
12
  const PACKAGE_JSON_FILENAME = 'package.json';
12
13
  /**
13
- * Find the project root for boundary enforcement.
14
+ * Find the nearest vibe-agent-toolkit.config.yaml by walking up from startDir.
14
15
  *
15
- * Detection order:
16
- * 1. Walk up from startDir looking for package.json with "workspaces" (monorepo root)
17
- * 2. Fall back to git repository root
18
- * 3. Fall back to startDir itself (tests / standalone)
16
+ * Returns the path to the config file itself (not its directory). Returns null
17
+ * if no config exists in any ancestor.
19
18
  *
20
- * @param startDir - Directory to start searching from (e.g., dirname of SKILL.md)
21
- * @returns Project root directory
19
+ * @param startDir - Directory to start the walk from
20
+ * @returns Path to the config file, or null if not found
22
21
  */
23
- export function findProjectRoot(startDir) {
24
- let currentDir = safePath.resolve(startDir);
25
- const resolvedStartDir = currentDir;
26
- // 1. Walk up looking for workspace root (package.json with "workspaces")
27
- while (currentDir !== dirname(currentDir)) {
28
- const packageJsonPath = safePath.join(currentDir, PACKAGE_JSON_FILENAME);
29
- // eslint-disable-next-line security/detect-non-literal-fs-filename -- Walking up from validated startDir
30
- if (existsSync(packageJsonPath)) {
22
+ export function findConfigFile(startDir) {
23
+ let current = safePath.resolve(startDir);
24
+ const root = parse(current).root;
25
+ while (true) {
26
+ const candidate = safePath.join(current, CONFIG_FILENAME);
27
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- walk-up is intentional
28
+ if (existsSync(candidate))
29
+ return candidate;
30
+ if (current === root)
31
+ return null;
32
+ const parent = dirname(current);
33
+ if (parent === current)
34
+ return null;
35
+ current = parent;
36
+ }
37
+ }
38
+ /**
39
+ * Find the nearest package.json with a "workspaces" key by walking up.
40
+ *
41
+ * Used for Node-monorepo binary discovery and Node-specific tooling only.
42
+ * NOT a substitute for findProjectRoot — VAT projects are not required to be
43
+ * npm workspaces. Returns null when no workspaces-bearing package.json is found.
44
+ *
45
+ * @param startDir - Directory to start the walk from
46
+ * @returns Path to the workspace root directory, or null if not found
47
+ */
48
+ export function findNodeWorkspaceRoot(startDir) {
49
+ let current = safePath.resolve(startDir);
50
+ while (current !== dirname(current)) {
51
+ const pkgPath = safePath.join(current, PACKAGE_JSON_FILENAME);
52
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- walk-up is intentional
53
+ if (existsSync(pkgPath)) {
31
54
  try {
32
- // eslint-disable-next-line security/detect-non-literal-fs-filename -- Walking up from validated startDir
33
- const content = readFileSync(packageJsonPath, 'utf-8');
34
- const parsed = JSON.parse(content);
55
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- walk-up is intentional
56
+ const parsed = JSON.parse(readFileSync(pkgPath, 'utf-8'));
35
57
  if (typeof parsed === 'object' && parsed !== null && 'workspaces' in parsed) {
36
- return currentDir;
58
+ return current;
37
59
  }
38
60
  }
39
61
  catch {
40
- // Invalid JSON - skip this package.json
62
+ // Invalid JSON skip and continue walking up.
41
63
  }
42
64
  }
43
- currentDir = dirname(currentDir);
65
+ current = dirname(current);
66
+ }
67
+ return null;
68
+ }
69
+ /**
70
+ * Layer 1 cache for {@link findProjectRoot}.
71
+ *
72
+ * Each entry answers a property *of the keyed directory*: "what `projectRoot`
73
+ * governs files at or below this dir?" Because the answer is independent of
74
+ * where a walk-up started, entries can be safely shared across starting
75
+ * points.
76
+ *
77
+ * Tests that mutate fixtures between runs (or in-process callers that
78
+ * re-enter `vat audit` in the same process) must call
79
+ * {@link resetProjectRootCaches} to invalidate this cache.
80
+ *
81
+ * See spec docs/superpowers/specs/2026-05-17-root-model-and-leading-slash-design.md §8.
82
+ */
83
+ const walkUpCache = new Map();
84
+ /**
85
+ * Reset {@link findProjectRoot}'s module-level cache.
86
+ *
87
+ * Call at the start of each independent CLI invocation so in-process callers
88
+ * (and integration tests sharing a vitest worker) don't observe stale results.
89
+ */
90
+ export function resetProjectRootCaches() {
91
+ walkUpCache.clear();
92
+ }
93
+ /** Write `entry` into walkUpCache for every dir in `visited`. */
94
+ function propagateCache(visited, entry) {
95
+ for (const dir of visited)
96
+ walkUpCache.set(dir, entry);
97
+ }
98
+ /**
99
+ * Config-anchored walk-up phase. Walks ancestors of `startDir`, populating
100
+ * `visited` and consulting/writing the walk-up cache.
101
+ *
102
+ * Returns one of three results:
103
+ * - `{ kind: 'found', configRoot }` — a config or cache hit produced an
104
+ * answer; cache has already been propagated to all visited dirs.
105
+ * - `{ kind: 'exhausted' }` — reached filesystem root without finding a
106
+ * config; the caller should run the git-anchored phase.
107
+ *
108
+ * @returns walk result
109
+ */
110
+ function configWalkPhase(startDir, visited) {
111
+ let current = safePath.resolve(startDir);
112
+ while (true) {
113
+ const cached = walkUpCache.get(current);
114
+ if (cached !== undefined) {
115
+ propagateCache(visited, cached);
116
+ return { kind: 'found', configRoot: cached.configRoot };
117
+ }
118
+ visited.push(current);
119
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- walk-up is intentional
120
+ if (existsSync(safePath.join(current, CONFIG_FILENAME))) {
121
+ const entry = { configRoot: current };
122
+ propagateCache(visited, entry);
123
+ return { kind: 'found', configRoot: current };
124
+ }
125
+ const parent = dirname(current);
126
+ if (parent === current)
127
+ return { kind: 'exhausted' };
128
+ current = parent;
44
129
  }
45
- // 2. Fall back to git root
46
- const gitRoot = gitFindRoot(resolvedStartDir);
47
- if (gitRoot !== null) {
48
- return gitRoot;
130
+ }
131
+ /**
132
+ * Git-anchored walk-up phase. Only runs after `configWalkPhase` reports
133
+ * `exhausted`. Walks the same chain looking for `.git/` and writes the final
134
+ * answer (the .git dir or null) into walkUpCache for every visited dir.
135
+ */
136
+ function gitWalkPhase(startDir, visited) {
137
+ let current = safePath.resolve(startDir);
138
+ while (true) {
139
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- walk-up is intentional
140
+ if (existsSync(safePath.join(current, '.git'))) {
141
+ const entry = { configRoot: current };
142
+ propagateCache(visited, entry);
143
+ return current;
144
+ }
145
+ const parent = dirname(current);
146
+ if (parent === current) {
147
+ propagateCache(visited, { configRoot: null });
148
+ return null;
149
+ }
150
+ current = parent;
49
151
  }
50
- // 3. Fall back to start directory
51
- return resolvedStartDir;
152
+ }
153
+ /**
154
+ * Find the VAT project root.
155
+ *
156
+ * Discovery ladder (checks startDir itself first, then each ancestor):
157
+ * 1. Directory containing vibe-agent-toolkit.config.yaml → that directory
158
+ * 2. Directory containing .git/ → that directory
159
+ * 3. null
160
+ *
161
+ * The config-anchored ladder runs to completion first; only if no config is
162
+ * found anywhere up the tree do we walk a second time looking for .git/.
163
+ * This implements the "config wins over git, regardless of relative depth"
164
+ * semantic from spec §4 (config-file placement is a stronger declaration of
165
+ * intent than the git boundary).
166
+ *
167
+ * Cached at the module level via {@link walkUpCache}. The cache is keyed by
168
+ * each walked directory; entries are written for every dir touched on the
169
+ * walk so subsequent calls from siblings/descendants become Layer-1 hits.
170
+ *
171
+ * @param startDir - Directory to start the walk from
172
+ * @returns Project root directory, or null if neither config nor git root found
173
+ */
174
+ export function findProjectRoot(startDir) {
175
+ const visited = [];
176
+ const configPhase = configWalkPhase(startDir, visited);
177
+ if (configPhase.kind === 'found')
178
+ return configPhase.configRoot;
179
+ return gitWalkPhase(startDir, visited);
52
180
  }
53
181
  //# sourceMappingURL=project-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"project-utils.js","sourceRoot":"","sources":["../src/project-ut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AAG,MAAM,CAAC;IACnB,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,WAAW,GAAG,eAAe,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACvD,IAAI,WAAW,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,WAAW,CAAC,UAAU,CAAC;IAChE,OAAO,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-agent-toolkit/utils",
3
- "version": "0.1.37",
3
+ "version": "0.1.39-rc.1",
4
4
  "type": "module",
5
5
  "description": "Core utility functions with no external dependencies",
6
6
  "keywords": [