@vibe-agent-toolkit/cli 0.2.0-rc.4 → 0.2.0-rc.5

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.
Files changed (65) hide show
  1. package/dist/bin.js +35 -2
  2. package/dist/bin.js.map +1 -1
  3. package/dist/commands/audit.d.ts.map +1 -1
  4. package/dist/commands/audit.js +23 -5
  5. package/dist/commands/audit.js.map +1 -1
  6. package/dist/commands/claude/plugin/install.js +0 -1
  7. package/dist/commands/claude/plugin/install.js.map +1 -1
  8. package/dist/commands/corpus/runner.d.ts.map +1 -1
  9. package/dist/commands/corpus/runner.js +1 -19
  10. package/dist/commands/corpus/runner.js.map +1 -1
  11. package/dist/commands/inventory.js +1 -1
  12. package/dist/commands/inventory.js.map +1 -1
  13. package/dist/commands/resources/check-progress.d.ts +145 -0
  14. package/dist/commands/resources/check-progress.d.ts.map +1 -0
  15. package/dist/commands/resources/check-progress.js +205 -0
  16. package/dist/commands/resources/check-progress.js.map +1 -0
  17. package/dist/commands/resources/check-supervisor.d.ts +465 -0
  18. package/dist/commands/resources/check-supervisor.d.ts.map +1 -0
  19. package/dist/commands/resources/check-supervisor.js +566 -0
  20. package/dist/commands/resources/check-supervisor.js.map +1 -0
  21. package/dist/commands/resources/check.d.ts +454 -0
  22. package/dist/commands/resources/check.d.ts.map +1 -0
  23. package/dist/commands/resources/check.js +1237 -0
  24. package/dist/commands/resources/check.js.map +1 -0
  25. package/dist/commands/resources/index.d.ts.map +1 -1
  26. package/dist/commands/resources/index.js +277 -6
  27. package/dist/commands/resources/index.js.map +1 -1
  28. package/dist/commands/resources/query.d.ts +89 -0
  29. package/dist/commands/resources/query.d.ts.map +1 -0
  30. package/dist/commands/resources/query.js +146 -0
  31. package/dist/commands/resources/query.js.map +1 -0
  32. package/dist/commands/resources/scan.js +1 -1
  33. package/dist/commands/resources/scan.js.map +1 -1
  34. package/dist/commands/skills/install.js +0 -1
  35. package/dist/commands/skills/install.js.map +1 -1
  36. package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
  37. package/dist/commands/skills/skill-discovery.js +4 -2
  38. package/dist/commands/skills/skill-discovery.js.map +1 -1
  39. package/dist/utils/agent-runner.d.ts.map +1 -1
  40. package/dist/utils/agent-runner.js +7 -3
  41. package/dist/utils/agent-runner.js.map +1 -1
  42. package/dist/utils/command-error.d.ts +56 -1
  43. package/dist/utils/command-error.d.ts.map +1 -1
  44. package/dist/utils/command-error.js +66 -3
  45. package/dist/utils/command-error.js.map +1 -1
  46. package/dist/utils/config-loader.d.ts.map +1 -1
  47. package/dist/utils/config-loader.js +10 -3
  48. package/dist/utils/config-loader.js.map +1 -1
  49. package/dist/utils/issue-severity.d.ts +12 -5
  50. package/dist/utils/issue-severity.d.ts.map +1 -1
  51. package/dist/utils/issue-severity.js +1 -1
  52. package/dist/utils/issue-severity.js.map +1 -1
  53. package/dist/utils/projection-query.d.ts +263 -0
  54. package/dist/utils/projection-query.d.ts.map +1 -0
  55. package/dist/utils/projection-query.js +262 -0
  56. package/dist/utils/projection-query.js.map +1 -0
  57. package/dist/utils/projection-store.d.ts +104 -2
  58. package/dist/utils/projection-store.d.ts.map +1 -1
  59. package/dist/utils/projection-store.js +126 -4
  60. package/dist/utils/projection-store.js.map +1 -1
  61. package/dist/utils/vat-bin-path.d.ts +36 -0
  62. package/dist/utils/vat-bin-path.d.ts.map +1 -0
  63. package/dist/utils/vat-bin-path.js +49 -0
  64. package/dist/utils/vat-bin-path.js.map +1 -0
  65. package/package.json +25 -14
@@ -44,6 +44,7 @@
44
44
  * standard legible error, and a tree that cannot be keyed says so on stderr
45
45
  * rather than silently declining.
46
46
  */
47
+ import type * as ProjectionSqlite from '@vibe-agent-toolkit/projection-sqlite';
47
48
  import type { PopulationCache } from '@vibe-agent-toolkit/resources';
48
49
  /**
49
50
  * The env var that selects a projection store for this process.
@@ -90,6 +91,34 @@ import type { PopulationCache } from '@vibe-agent-toolkit/resources';
90
91
  export declare const PROJECTION_STORE_ENV = "VAT_PROJECTION_STORE";
91
92
  /** {@link PROJECTION_STORE_ENV}'s value that selects the SQLite backend. */
92
93
  export declare const PROJECTION_STORE_SQLITE = "sqlite";
94
+ /**
95
+ * Where the projection store's database lives, overriding the default.
96
+ *
97
+ * The default is `tmpdir/.vat-cache/<version>/projection-<shapeDigest>` — one
98
+ * database per VAT release, shared by every root on the machine. This names a
99
+ * different one **explicitly**, which is what an adopter with a per-job cache
100
+ * directory, a shared build agent running two jobs at once, or a test arm that
101
+ * must not touch the developer's live cache actually needs.
102
+ *
103
+ * ðŸŠĪ **What it replaces is redirecting `TMPDIR`, which works and is the wrong
104
+ * instrument.** `defaultStoreDirectory()` resolves through
105
+ * `vatCacheNamespaceRoot()` → `normalizedTmpdir()`, so pointing the OS temp
106
+ * directory elsewhere does move the store — along with every other temp
107
+ * consumer in the process, on a variable whose name is not the same on both
108
+ * platforms (`TMPDIR` on POSIX; `TEMP`, then `TMP`, on Windows, so setting one
109
+ * is silently inert on the other). It relocates the store as a side effect of
110
+ * relocating something larger. This variable says the one thing meant.
111
+ *
112
+ * ⚠ïļ It does **not** consult `XDG_CACHE_HOME` or `HOME`. A caller that set
113
+ * those believed it had its own database and was writing into the shared one;
114
+ * the fix is to name the directory here, not to add more implicit roots.
115
+ *
116
+ * An environment variable rather than a config field, for the same reason
117
+ * {@link PROJECTION_STORE_ENV} is one: it says where an INSTRUMENT keeps its
118
+ * scratch space, not what the project means, and it has to be reachable from a
119
+ * harness that spawns the binary.
120
+ */
121
+ export declare const PROJECTION_STORE_DIR_ENV = "VAT_PROJECTION_STORE_DIR";
93
122
  /**
94
123
  * The env var that turns VAT's disk caches off for a run.
95
124
  *
@@ -133,7 +162,19 @@ export declare const CACHE_DISABLED = "0";
133
162
  * @returns `true` when a store is selected
134
163
  */
135
164
  export declare function projectionStoreSelected(): boolean;
136
- /** An open store, the key half it is used with, and the way to let it go. */
165
+ /**
166
+ * An open store, the key half it is used with, and the way to let it go.
167
+ *
168
+ * ⚠ïļ **Deliberately NOT typed for SQL, and do not re-widen it.** This handle
169
+ * reaches the database at {@link PROJECTION_STORE_DIR_ENV}'s directory, which
170
+ * defaults to one file per VAT release shared by every root on the machine —
171
+ * holding other repositories' link text, heading text and frontmatter. A field
172
+ * typed `SqlQueryableStore` used to live here "for a caller that needs to ASK
173
+ * the store something", and that caller was removed precisely because arbitrary
174
+ * SQL over this store answers from trees the asker never named. `populate()`
175
+ * needs the engine-free {@link PopulationCache} and nothing more; a query lane
176
+ * builds its own store (see `projection-query.ts`).
177
+ */
137
178
  export interface OpenedPopulationCache {
138
179
  /** Hand this to `populate()`. */
139
180
  readonly cache: PopulationCache;
@@ -163,6 +204,57 @@ export interface OpenedPopulationCache {
163
204
  export declare function openPopulationCache(options: {
164
205
  root: string;
165
206
  }): Promise<OpenedPopulationCache | undefined>;
207
+ /**
208
+ * Open a store that lives only in this process's memory.
209
+ *
210
+ * 🔑 **This is what keeps the query surface an ANSWER rather than a privilege.**
211
+ * A caller with no store selected — CI's first run, or a developer who never set
212
+ * the selector — still gets the same SQL over the same schema; the on-disk store
213
+ * only makes the second run cheap. Without it, "what does this tree contain"
214
+ * would be answerable only where a cache happened to exist, and two callers
215
+ * would hold differently-shaped views of one tree.
216
+ *
217
+ * It is a cache that cannot hit: nothing survives the close, so a caller must
218
+ * write the projection into it before asking anything.
219
+ *
220
+ * @returns An open, empty store; close it when done
221
+ */
222
+ export declare function openEphemeralQueryStore(): Promise<ProjectionSqlite.SqlQueryableStore>;
223
+ /**
224
+ * The legible failure for "your Node is too old", or `undefined` when this is
225
+ * some other failure — including "the package is absent".
226
+ *
227
+ * Exported, and returning the error rather than throwing it, so the DIAGNOSIS
228
+ * is unit-testable without a mocked dynamic import. A test cannot make a mocked
229
+ * `import()` reject with a plain `{ code }` — the test runner wraps whatever a
230
+ * module factory throws in its own error, so the code never survives to be
231
+ * read — and the branch's whole value is the message it produces.
232
+ *
233
+ * ðŸŠĪ The two are **different error codes**, and only one of them reaches
234
+ * {@link isModuleMissing}. `@vibe-agent-toolkit/projection-sqlite` imports
235
+ * `node:sqlite`, which arrived in Node 22.13.0; on 22.0–22.12 the import fails
236
+ * with `ERR_UNKNOWN_BUILTIN_MODULE`, not `ERR_MODULE_NOT_FOUND`. Without this
237
+ * branch the user gets a bare `No such built-in module: node:sqlite` — which
238
+ * names neither the version floor nor the fix.
239
+ *
240
+ * ⚠ïļ It is reachable on EVERY `vat resources query`/`check` run, and not a
241
+ * corner: VAT's own floor is `>=22.0.0`, so a supported Node hits it. That was
242
+ * already true before the store-selected path stopped querying a shared
243
+ * database — the query lane has always fallen back to
244
+ * {@link openEphemeralQueryStore} when no store is selected, which is the
245
+ * default, so `node:sqlite` was required on every default run. Nothing here
246
+ * became newly reachable; the branch is load-bearing because the FLOOR is,
247
+ * whichever way the lane resolves its store.
248
+ *
249
+ * The repair stays distinct from the missing-package one on purpose:
250
+ * "install this package" is the wrong instruction for "upgrade Node", and
251
+ * sending someone round that loop cannot terminate.
252
+ *
253
+ * @param error - Whatever the dynamic import threw
254
+ * @returns The error to raise when Node itself lacks the builtin; `undefined`
255
+ * when this failure is something else and the caller should keep diagnosing
256
+ */
257
+ export declare function nodeSqliteFloorFailure(error: unknown): Error | undefined;
166
258
  /**
167
259
  * Run one command's work with a projection store open for its whole duration,
168
260
  * and closed however it ends.
@@ -175,7 +267,17 @@ export declare function openPopulationCache(options: {
175
267
  *
176
268
  * It is also the `withGitSnapshotCache` bracket for the work inside it, so the
177
269
  * key and the extent filed under it come from ONE git snapshot — see the note
178
- * on the call below.
270
+ * in the body.
271
+ *
272
+ * `undefined` on a run with no store selected, which is the shape every
273
+ * population lane wants: no store means re-derive, not fail.
274
+ *
275
+ * ⚠ïļ A caller that wants to run SQL must NOT query this store. It is one
276
+ * database per VAT release, shared by every root on the machine, so arbitrary
277
+ * SQL over it answers from other repositories — see `projection-query.ts`.
278
+ * That is also why this is the ONLY scope over the opened store: there is no
279
+ * separate "opened handle" bracket for a caller wanting more than the cache,
280
+ * because there is nothing legitimate for such a caller to want.
179
281
  *
180
282
  * @param options - Where the corpus is
181
283
  * @param options.root - The absolute corpus root
@@ -1 +1 @@
1
- {"version":3,"file":"projection-store.d.ts","sourceRoot":"","sources":["../../src/utils/projection-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAKrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAE3D,4EAA4E;AAC5E,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAEhD;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,cAAc,CAAC;AAErC,gHAAgH;AAChH,eAAO,MAAM,cAAc,MAAM,CAAC;AAelC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CAGjD;AAED,6EAA6E;AAC7E,MAAM,WAAW,qBAAqB;IACpC,iCAAiC;IACjC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC;;;;;;OAMG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE;IACjD,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAsB7C;AAuBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,EACzC,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EACzB,IAAI,EAAE,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,GACvD,OAAO,CAAC,CAAC,CAAC,CA0BZ"}
1
+ {"version":3,"file":"projection-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CAaxE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,EACzC,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EACzB,IAAI,EAAE,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,GACvD,OAAO,CAAC,CAAC,CAAC,CA0BZ"}
@@ -91,6 +91,34 @@ import { isModuleMissing, reportMissingBackend } from './optional-backend.js';
91
91
  export const PROJECTION_STORE_ENV = 'VAT_PROJECTION_STORE';
92
92
  /** {@link PROJECTION_STORE_ENV}'s value that selects the SQLite backend. */
93
93
  export const PROJECTION_STORE_SQLITE = 'sqlite';
94
+ /**
95
+ * Where the projection store's database lives, overriding the default.
96
+ *
97
+ * The default is `tmpdir/.vat-cache/<version>/projection-<shapeDigest>` — one
98
+ * database per VAT release, shared by every root on the machine. This names a
99
+ * different one **explicitly**, which is what an adopter with a per-job cache
100
+ * directory, a shared build agent running two jobs at once, or a test arm that
101
+ * must not touch the developer's live cache actually needs.
102
+ *
103
+ * ðŸŠĪ **What it replaces is redirecting `TMPDIR`, which works and is the wrong
104
+ * instrument.** `defaultStoreDirectory()` resolves through
105
+ * `vatCacheNamespaceRoot()` → `normalizedTmpdir()`, so pointing the OS temp
106
+ * directory elsewhere does move the store — along with every other temp
107
+ * consumer in the process, on a variable whose name is not the same on both
108
+ * platforms (`TMPDIR` on POSIX; `TEMP`, then `TMP`, on Windows, so setting one
109
+ * is silently inert on the other). It relocates the store as a side effect of
110
+ * relocating something larger. This variable says the one thing meant.
111
+ *
112
+ * ⚠ïļ It does **not** consult `XDG_CACHE_HOME` or `HOME`. A caller that set
113
+ * those believed it had its own database and was writing into the shared one;
114
+ * the fix is to name the directory here, not to add more implicit roots.
115
+ *
116
+ * An environment variable rather than a config field, for the same reason
117
+ * {@link PROJECTION_STORE_ENV} is one: it says where an INSTRUMENT keeps its
118
+ * scratch space, not what the project means, and it has to be reachable from a
119
+ * harness that spawns the binary.
120
+ */
121
+ export const PROJECTION_STORE_DIR_ENV = 'VAT_PROJECTION_STORE_DIR';
94
122
  /**
95
123
  * The env var that turns VAT's disk caches off for a run.
96
124
  *
@@ -111,6 +139,8 @@ export const CACHE_DISABLED = '0';
111
139
  * it: RAG carries a platform-native binary, while this one carries a Node
112
140
  * version floor.
113
141
  */
142
+ /** What Node throws for `import('node:sqlite')` before 22.13.0. */
143
+ const UNKNOWN_BUILTIN_MODULE = 'ERR_UNKNOWN_BUILTIN_MODULE';
114
144
  const PROJECTION_STORE_BACKEND = {
115
145
  feature: 'The projection store',
116
146
  packageName: '@vibe-agent-toolkit/projection-sqlite',
@@ -193,19 +223,101 @@ export async function openPopulationCache(options) {
193
223
  * for "upgrade Node", and diagnosing a version floor as a missing dependency
194
224
  * sends a user round a loop that cannot terminate.
195
225
  *
196
- * @returns The opened store
226
+ * @returns The opened store, typed as the engine-free contract — the SQLite
227
+ * backend really does return a `SqlQueryableStore`, and this narrows it away
228
+ * on purpose so the population path cannot grow a query
197
229
  */
198
230
  async function loadStore() {
231
+ const directory = process.env[PROJECTION_STORE_DIR_ENV];
232
+ // Spread rather than passed, because the backend defaults the field when it is
233
+ // ABSENT and an explicit `undefined` is a different argument under
234
+ // `exactOptionalPropertyTypes`. Empty string is treated as unset: an unset
235
+ // variable and one exported as `''` are the same intent, and `''` would
236
+ // otherwise resolve to the process cwd.
237
+ return (await loadBackend()).openSqliteProjectionStore(directory === undefined || directory === '' ? {} : { directory });
238
+ }
239
+ /**
240
+ * Open a store that lives only in this process's memory.
241
+ *
242
+ * 🔑 **This is what keeps the query surface an ANSWER rather than a privilege.**
243
+ * A caller with no store selected — CI's first run, or a developer who never set
244
+ * the selector — still gets the same SQL over the same schema; the on-disk store
245
+ * only makes the second run cheap. Without it, "what does this tree contain"
246
+ * would be answerable only where a cache happened to exist, and two callers
247
+ * would hold differently-shaped views of one tree.
248
+ *
249
+ * It is a cache that cannot hit: nothing survives the close, so a caller must
250
+ * write the projection into it before asking anything.
251
+ *
252
+ * @returns An open, empty store; close it when done
253
+ */
254
+ export async function openEphemeralQueryStore() {
255
+ return (await loadBackend()).openEphemeralProjectionStore();
256
+ }
257
+ /**
258
+ * Load the selected backend module, or report it as uninstalled and exit.
259
+ *
260
+ * @returns The backend's module namespace
261
+ */
262
+ async function loadBackend() {
199
263
  try {
200
- const backend = await import('@vibe-agent-toolkit/projection-sqlite');
201
- return backend.openSqliteProjectionStore();
264
+ return await import('@vibe-agent-toolkit/projection-sqlite');
202
265
  }
203
266
  catch (error) {
267
+ const floor = nodeSqliteFloorFailure(error);
268
+ if (floor !== undefined)
269
+ throw floor;
204
270
  if (!isModuleMissing(error))
205
271
  throw error;
206
272
  reportMissingBackend(PROJECTION_STORE_BACKEND);
207
273
  }
208
274
  }
275
+ /**
276
+ * The legible failure for "your Node is too old", or `undefined` when this is
277
+ * some other failure — including "the package is absent".
278
+ *
279
+ * Exported, and returning the error rather than throwing it, so the DIAGNOSIS
280
+ * is unit-testable without a mocked dynamic import. A test cannot make a mocked
281
+ * `import()` reject with a plain `{ code }` — the test runner wraps whatever a
282
+ * module factory throws in its own error, so the code never survives to be
283
+ * read — and the branch's whole value is the message it produces.
284
+ *
285
+ * ðŸŠĪ The two are **different error codes**, and only one of them reaches
286
+ * {@link isModuleMissing}. `@vibe-agent-toolkit/projection-sqlite` imports
287
+ * `node:sqlite`, which arrived in Node 22.13.0; on 22.0–22.12 the import fails
288
+ * with `ERR_UNKNOWN_BUILTIN_MODULE`, not `ERR_MODULE_NOT_FOUND`. Without this
289
+ * branch the user gets a bare `No such built-in module: node:sqlite` — which
290
+ * names neither the version floor nor the fix.
291
+ *
292
+ * ⚠ïļ It is reachable on EVERY `vat resources query`/`check` run, and not a
293
+ * corner: VAT's own floor is `>=22.0.0`, so a supported Node hits it. That was
294
+ * already true before the store-selected path stopped querying a shared
295
+ * database — the query lane has always fallen back to
296
+ * {@link openEphemeralQueryStore} when no store is selected, which is the
297
+ * default, so `node:sqlite` was required on every default run. Nothing here
298
+ * became newly reachable; the branch is load-bearing because the FLOOR is,
299
+ * whichever way the lane resolves its store.
300
+ *
301
+ * The repair stays distinct from the missing-package one on purpose:
302
+ * "install this package" is the wrong instruction for "upgrade Node", and
303
+ * sending someone round that loop cannot terminate.
304
+ *
305
+ * @param error - Whatever the dynamic import threw
306
+ * @returns The error to raise when Node itself lacks the builtin; `undefined`
307
+ * when this failure is something else and the caller should keep diagnosing
308
+ */
309
+ export function nodeSqliteFloorFailure(error) {
310
+ const isFloor = typeof error === 'object'
311
+ && error !== null
312
+ && 'code' in error
313
+ && error.code === UNKNOWN_BUILTIN_MODULE;
314
+ if (!isFloor)
315
+ return undefined;
316
+ return new Error('The projection store needs `node:sqlite`, which this Node does not have.'
317
+ + ` VAT runs on Node >= 22.0.0, but \`node:sqlite\` arrived in 22.13.0 — you are on ${process.version}.`
318
+ + ' Upgrade Node to 22.13.0 or newer. Installing a package will not help:'
319
+ + ' the module is built into Node, not published to npm.');
320
+ }
209
321
  /**
210
322
  * Run one command's work with a projection store open for its whole duration,
211
323
  * and closed however it ends.
@@ -218,7 +330,17 @@ async function loadStore() {
218
330
  *
219
331
  * It is also the `withGitSnapshotCache` bracket for the work inside it, so the
220
332
  * key and the extent filed under it come from ONE git snapshot — see the note
221
- * on the call below.
333
+ * in the body.
334
+ *
335
+ * `undefined` on a run with no store selected, which is the shape every
336
+ * population lane wants: no store means re-derive, not fail.
337
+ *
338
+ * ⚠ïļ A caller that wants to run SQL must NOT query this store. It is one
339
+ * database per VAT release, shared by every root on the machine, so arbitrary
340
+ * SQL over it answers from other repositories — see `projection-query.ts`.
341
+ * That is also why this is the ONLY scope over the opened store: there is no
342
+ * separate "opened handle" bracket for a caller wanting more than the cache,
343
+ * because there is nothing legitimate for such a caller to want.
222
344
  *
223
345
  * @param options - Where the corpus is
224
346
  * @param options.root - The absolute corpus root
@@ -1 +1 @@
1
- {"version":3,"file":"projection-store.js","sourceRoot":"","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AAC,KAAK,IAAI,EAAE;QACrC,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;QACjD,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC;gBAAS,CAAC;YACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Where the built vat CLI entry is, for the commands that re-invoke it as a
3
+ * child process.
4
+ *
5
+ * ## ðŸŠĪ `dist/bin.js`, deliberately NOT `dist/bin/vat.js`
6
+ *
7
+ * `packages/lab/src/harness/instrument.ts` documents `dist/bin/vat.js` as a
8
+ * re-resolving WRAPPER: it looks the CLI up again at run time, so spawning it
9
+ * can execute a different build than the one the caller is running from. A
10
+ * supervisor that thinks it is bounding its own code, and a corpus runner that
11
+ * thinks it is auditing with its own validators, both need the entry point that
12
+ * cannot be redirected.
13
+ *
14
+ * ## Why the two branches
15
+ *
16
+ * `node` cannot execute `.ts`, so a caller running from SOURCE under vitest
17
+ * still has to reach the COMPILED entry — which is why the source-tree branch
18
+ * walks across to `packages/cli/dist/bin.js` rather than to a sibling. A build
19
+ * is therefore a precondition for every test that spawns the CLI, and a system
20
+ * test that skipped it would prove things about a stale `dist`.
21
+ *
22
+ * ðŸŠĪ Shared rather than copied. This resolution lived inline in
23
+ * `commands/corpus/runner.ts` and a second caller wanted it; a second copy is a
24
+ * duplication-gate failure under this repo's zero-tolerance policy, and — worse
25
+ * — two copies drift, so one caller would keep spawning the wrapper long after
26
+ * the other stopped. The `__dirname`-relative hops below are correct for THIS
27
+ * module's location and nothing else, which is precisely why it is not a snippet
28
+ * to paste.
29
+ */
30
+ /**
31
+ * Resolve the path to the built vat CLI entry.
32
+ *
33
+ * @returns An absolute path to `dist/bin.js`
34
+ */
35
+ export declare function resolveVatBinPath(): string;
36
+ //# sourceMappingURL=vat-bin-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vat-bin-path.d.ts","sourceRoot":"","sources":["../../src/utils/vat-bin-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAUH;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAO1C"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Where the built vat CLI entry is, for the commands that re-invoke it as a
3
+ * child process.
4
+ *
5
+ * ## ðŸŠĪ `dist/bin.js`, deliberately NOT `dist/bin/vat.js`
6
+ *
7
+ * `packages/lab/src/harness/instrument.ts` documents `dist/bin/vat.js` as a
8
+ * re-resolving WRAPPER: it looks the CLI up again at run time, so spawning it
9
+ * can execute a different build than the one the caller is running from. A
10
+ * supervisor that thinks it is bounding its own code, and a corpus runner that
11
+ * thinks it is auditing with its own validators, both need the entry point that
12
+ * cannot be redirected.
13
+ *
14
+ * ## Why the two branches
15
+ *
16
+ * `node` cannot execute `.ts`, so a caller running from SOURCE under vitest
17
+ * still has to reach the COMPILED entry — which is why the source-tree branch
18
+ * walks across to `packages/cli/dist/bin.js` rather than to a sibling. A build
19
+ * is therefore a precondition for every test that spawns the CLI, and a system
20
+ * test that skipped it would prove things about a stale `dist`.
21
+ *
22
+ * ðŸŠĪ Shared rather than copied. This resolution lived inline in
23
+ * `commands/corpus/runner.ts` and a second caller wanted it; a second copy is a
24
+ * duplication-gate failure under this repo's zero-tolerance policy, and — worse
25
+ * — two copies drift, so one caller would keep spawning the wrapper long after
26
+ * the other stopped. The `__dirname`-relative hops below are correct for THIS
27
+ * module's location and nothing else, which is precisely why it is not a snippet
28
+ * to paste.
29
+ */
30
+ import { existsSync } from 'node:fs';
31
+ import { dirname } from 'node:path';
32
+ import { fileURLToPath } from 'node:url';
33
+ import { safePath } from '@vibe-agent-toolkit/utils';
34
+ const HERE = dirname(fileURLToPath(import.meta.url));
35
+ /**
36
+ * Resolve the path to the built vat CLI entry.
37
+ *
38
+ * @returns An absolute path to `dist/bin.js`
39
+ */
40
+ export function resolveVatBinPath() {
41
+ // Compiled tree: packages/cli/dist/utils/vat-bin-path.js → packages/cli/dist/bin.js
42
+ const compiled = safePath.resolve(HERE, '../bin.js');
43
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- internal path
44
+ if (existsSync(compiled))
45
+ return compiled;
46
+ // Source tree (vitest): packages/cli/src/utils/vat-bin-path.ts → packages/cli/dist/bin.js
47
+ return safePath.resolve(HERE, '../../dist/bin.js');
48
+ }
49
+ //# sourceMappingURL=vat-bin-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vat-bin-path.js","sourceRoot":"","sources":["../../src/utils/vat-bin-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAErD;;;;GAIG;AACH,MAAM,UAAU,iBAAiB;IAC/B,oFAAoF;IACpF,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACrD,oFAAoF;IACpF,IAAI,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC1C,0FAA0F;IAC1F,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;AACrD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-agent-toolkit/cli",
3
- "version": "0.2.0-rc.4",
3
+ "version": "0.2.0-rc.5",
4
4
  "description": "Command-line interface for vibe-agent-toolkit",
5
5
  "type": "module",
6
6
  "bin": {
@@ -46,14 +46,15 @@
46
46
  "//dependencies-note": "DO NOT add example agent packages or adopter packages here. Adopter packages (like vat-development-agents) depend on the CLI binary at build time — declaring them as deps creates a circular build dependency. They are built in a second turbo pass via package#task overrides in turbo.json.",
47
47
  "dependencies": {
48
48
  "@anthropic-ai/sdk": "^0.71.2",
49
- "@vibe-agent-toolkit/agent-config": "0.2.0-rc.4",
50
- "@vibe-agent-toolkit/schema": "0.2.0-rc.4",
51
- "@vibe-agent-toolkit/agent-skills": "0.2.0-rc.4",
52
- "@vibe-agent-toolkit/claude-marketplace": "0.2.0-rc.4",
53
- "@vibe-agent-toolkit/discovery": "0.2.0-rc.4",
54
- "@vibe-agent-toolkit/gateway-mcp": "0.2.0-rc.4",
55
- "@vibe-agent-toolkit/resources": "0.2.0-rc.4",
56
- "@vibe-agent-toolkit/utils": "0.2.0-rc.4",
49
+ "@vibe-agent-toolkit/agent-config": "0.2.0-rc.5",
50
+ "@vibe-agent-toolkit/agent-skills": "0.2.0-rc.5",
51
+ "@vibe-agent-toolkit/claude-marketplace": "0.2.0-rc.5",
52
+ "@vibe-agent-toolkit/discovery": "0.2.0-rc.5",
53
+ "@vibe-agent-toolkit/gateway-mcp": "0.2.0-rc.5",
54
+ "@vibe-agent-toolkit/projection-sqlite": "0.2.0-rc.5",
55
+ "@vibe-agent-toolkit/resources": "0.2.0-rc.5",
56
+ "@vibe-agent-toolkit/schema": "0.2.0-rc.5",
57
+ "@vibe-agent-toolkit/utils": "0.2.0-rc.5",
57
58
  "adm-zip": "^0.6.0",
58
59
  "commander": "^12.1.0",
59
60
  "picomatch": "^4.0.3",
@@ -68,7 +69,9 @@
68
69
  "@types/picomatch": "^4.0.2",
69
70
  "@types/semver": "^7.7.1",
70
71
  "@types/tar": "^6.1.13",
71
- "@vibe-agent-toolkit/dev-tools": "0.2.0-rc.4",
72
+ "@vibe-agent-toolkit/dev-tools": "0.2.0-rc.5",
73
+ "@vibe-agent-toolkit/rag": "0.2.0-rc.5",
74
+ "@vibe-agent-toolkit/rag-lancedb": "0.2.0-rc.5",
72
75
  "rimraf": "^6.0.1",
73
76
  "typescript": "^5.7.3",
74
77
  "vitest": "^3.2.4"
@@ -80,9 +83,17 @@
80
83
  "type": "git",
81
84
  "url": "https://github.com/jdutton/vibe-agent-toolkit.git"
82
85
  },
83
- "optionalDependencies": {
84
- "@vibe-agent-toolkit/projection-sqlite": "0.2.0-rc.4",
85
- "@vibe-agent-toolkit/rag": "0.2.0-rc.4",
86
- "@vibe-agent-toolkit/rag-lancedb": "0.2.0-rc.4"
86
+ "//peerDependencies-note": "The RAG backends are OPTIONAL PEERS, never optionalDependencies. `optionalDependencies` are INSTALLED BY DEFAULT by npm and pnpm alike - 'optional' there means the install may fail without failing the build, not that it is skipped - so declaring them that way shipped ~240 MB (onnxruntime-web 136 MB, a LanceDB platform binary 93 MB, a third apache-arrow, protobufjs) to every adopter, contradicting the seam in src/utils/optional-backend.ts that exists precisely to keep them out. Optional peers are NOT auto-installed, so the manifest now says what that module already says: these ship separately, and an absent one is a legible error naming the package to install. projection-sqlite is deliberately NOT in this group: it has zero third-party dependencies (only node:sqlite, which is built into Node) and a 152 KB dist, so the platform-binary argument that justifies the seam is simply false for it. It is also what `vat resources query` builds its ephemeral in-memory store from, and a query surface that works only where a backend was separately installed is the capability gate the projection design forbids.",
87
+ "peerDependencies": {
88
+ "@vibe-agent-toolkit/rag": "0.2.0-rc.5",
89
+ "@vibe-agent-toolkit/rag-lancedb": "0.2.0-rc.5"
90
+ },
91
+ "peerDependenciesMeta": {
92
+ "@vibe-agent-toolkit/rag": {
93
+ "optional": true
94
+ },
95
+ "@vibe-agent-toolkit/rag-lancedb": {
96
+ "optional": true
97
+ }
87
98
  }
88
99
  }