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

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 (92) 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 +169 -17
  5. package/dist/commands/audit.js.map +1 -1
  6. package/dist/commands/claude/claude-config.d.ts.map +1 -1
  7. package/dist/commands/claude/claude-config.js +6 -0
  8. package/dist/commands/claude/claude-config.js.map +1 -1
  9. package/dist/commands/claude/org/helpers.d.ts +59 -1
  10. package/dist/commands/claude/org/helpers.d.ts.map +1 -1
  11. package/dist/commands/claude/org/helpers.js +58 -7
  12. package/dist/commands/claude/org/helpers.js.map +1 -1
  13. package/dist/commands/claude/org/index.d.ts.map +1 -1
  14. package/dist/commands/claude/org/index.js +24 -16
  15. package/dist/commands/claude/org/index.js.map +1 -1
  16. package/dist/commands/claude/org/skills.d.ts +428 -0
  17. package/dist/commands/claude/org/skills.d.ts.map +1 -1
  18. package/dist/commands/claude/org/skills.js +1189 -91
  19. package/dist/commands/claude/org/skills.js.map +1 -1
  20. package/dist/commands/claude/org/users.d.ts.map +1 -1
  21. package/dist/commands/claude/org/users.js +3 -1
  22. package/dist/commands/claude/org/users.js.map +1 -1
  23. package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
  24. package/dist/commands/claude/org/workspaces.js +5 -2
  25. package/dist/commands/claude/org/workspaces.js.map +1 -1
  26. package/dist/commands/claude/plugin/install.js +0 -1
  27. package/dist/commands/claude/plugin/install.js.map +1 -1
  28. package/dist/commands/corpus/runner.d.ts.map +1 -1
  29. package/dist/commands/corpus/runner.js +1 -19
  30. package/dist/commands/corpus/runner.js.map +1 -1
  31. package/dist/commands/inventory.js +1 -1
  32. package/dist/commands/inventory.js.map +1 -1
  33. package/dist/commands/resources/check-progress.d.ts +145 -0
  34. package/dist/commands/resources/check-progress.d.ts.map +1 -0
  35. package/dist/commands/resources/check-progress.js +205 -0
  36. package/dist/commands/resources/check-progress.js.map +1 -0
  37. package/dist/commands/resources/check-supervisor.d.ts +465 -0
  38. package/dist/commands/resources/check-supervisor.d.ts.map +1 -0
  39. package/dist/commands/resources/check-supervisor.js +566 -0
  40. package/dist/commands/resources/check-supervisor.js.map +1 -0
  41. package/dist/commands/resources/check.d.ts +454 -0
  42. package/dist/commands/resources/check.d.ts.map +1 -0
  43. package/dist/commands/resources/check.js +1237 -0
  44. package/dist/commands/resources/check.js.map +1 -0
  45. package/dist/commands/resources/index.d.ts.map +1 -1
  46. package/dist/commands/resources/index.js +277 -6
  47. package/dist/commands/resources/index.js.map +1 -1
  48. package/dist/commands/resources/query.d.ts +89 -0
  49. package/dist/commands/resources/query.d.ts.map +1 -0
  50. package/dist/commands/resources/query.js +146 -0
  51. package/dist/commands/resources/query.js.map +1 -0
  52. package/dist/commands/resources/scan.js +1 -1
  53. package/dist/commands/resources/scan.js.map +1 -1
  54. package/dist/commands/skill/review-checklist.d.ts.map +1 -1
  55. package/dist/commands/skill/review-checklist.js +35 -0
  56. package/dist/commands/skill/review-checklist.js.map +1 -1
  57. package/dist/commands/skill/test/configure.d.ts +37 -0
  58. package/dist/commands/skill/test/configure.d.ts.map +1 -1
  59. package/dist/commands/skill/test/configure.js +57 -12
  60. package/dist/commands/skill/test/configure.js.map +1 -1
  61. package/dist/commands/skills/install.js +0 -1
  62. package/dist/commands/skills/install.js.map +1 -1
  63. package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
  64. package/dist/commands/skills/skill-discovery.js +4 -2
  65. package/dist/commands/skills/skill-discovery.js.map +1 -1
  66. package/dist/utils/agent-runner.d.ts.map +1 -1
  67. package/dist/utils/agent-runner.js +7 -3
  68. package/dist/utils/agent-runner.js.map +1 -1
  69. package/dist/utils/command-error.d.ts +56 -1
  70. package/dist/utils/command-error.d.ts.map +1 -1
  71. package/dist/utils/command-error.js +66 -3
  72. package/dist/utils/command-error.js.map +1 -1
  73. package/dist/utils/config-loader.d.ts.map +1 -1
  74. package/dist/utils/config-loader.js +30 -7
  75. package/dist/utils/config-loader.js.map +1 -1
  76. package/dist/utils/issue-severity.d.ts +12 -5
  77. package/dist/utils/issue-severity.d.ts.map +1 -1
  78. package/dist/utils/issue-severity.js +1 -1
  79. package/dist/utils/issue-severity.js.map +1 -1
  80. package/dist/utils/projection-query.d.ts +263 -0
  81. package/dist/utils/projection-query.d.ts.map +1 -0
  82. package/dist/utils/projection-query.js +262 -0
  83. package/dist/utils/projection-query.js.map +1 -0
  84. package/dist/utils/projection-store.d.ts +104 -2
  85. package/dist/utils/projection-store.d.ts.map +1 -1
  86. package/dist/utils/projection-store.js +126 -4
  87. package/dist/utils/projection-store.js.map +1 -1
  88. package/dist/utils/vat-bin-path.d.ts +36 -0
  89. package/dist/utils/vat-bin-path.d.ts.map +1 -0
  90. package/dist/utils/vat-bin-path.js +49 -0
  91. package/dist/utils/vat-bin-path.js.map +1 -0
  92. package/package.json +25 -14
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/commands/resources/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqJG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAsB,MAAM,+BAA+B,CAAC;AACxF,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,wBAAwB,EACxB,iBAAiB,GAElB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,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C7E,iCAAiC;QACjC,UAAU,EAAE,CAAC;YACX,IAAI,EAAE,YAAY;YAClB,UAAU,EAAE,UAAU,CAAC,UAAU;YACjC,YAAY,EAAE,UAAU,CAAC,YAAY;YACrC,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;SAC5C,CAAC,CAAC;QACH,wEAAwE;QACxE,0EAA0E;QAC1E,0EAA0E;QAC1E,6DAA6D;QAC7D,0EAA0E;QAC1E,MAAM,GAAG,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;QACxF,OAAO,EAAE,GAAG,GAAG,EAAE,GAAG,UAAU,EAAE,GAAG,MAAM,EAAE,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAK5C,wBAAgB,sBAAsB,IAAI,OAAO,CA+PhD;AAED,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AA8B5C,wBAAgB,sBAAsB,IAAI,OAAO,CAkgBhD;AAED,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC"}
@@ -2,8 +2,30 @@
2
2
  * Resources command group
3
3
  */
4
4
  import { Command, Option } from 'commander';
5
+ import { checkCommand } from './check.js';
6
+ import { queryCommand } from './query.js';
5
7
  import { scanCommand } from './scan.js';
6
8
  import { validateCommand } from './validate.js';
9
+ /** What every subcommand's `--debug` flag says it does. */
10
+ const DEBUG_HELP = 'Enable debug logging';
11
+ /** The two serializations `scan` and `query` offer of one document. */
12
+ const OUTPUT_YAML = 'yaml';
13
+ const OUTPUT_JSON = 'json';
14
+ /**
15
+ * The `--format` option `scan` and `query` share.
16
+ *
17
+ * A factory rather than a shared instance: Commander mutates an `Option` as it
18
+ * is added, so one object handed to two commands is one object two commands
19
+ * disagree about. `validate` deliberately does NOT use this — it offers a third
20
+ * format, `text`, which is a different question.
21
+ *
22
+ * @returns A fresh option for one command
23
+ */
24
+ function yamlOrJsonFormat() {
25
+ return new Option('--format <format>', 'Output format: yaml (default) or json')
26
+ .choices([OUTPUT_YAML, OUTPUT_JSON])
27
+ .default(OUTPUT_YAML);
28
+ }
7
29
  export function createResourcesCommand() {
8
30
  const resources = new Command('resources');
9
31
  resources
@@ -19,13 +41,10 @@ Configuration:
19
41
  resources
20
42
  .command('scan [path]')
21
43
  .description('Discover markdown resources in directory')
22
- .option('--debug', 'Enable debug logging')
44
+ .option('--debug', DEBUG_HELP)
23
45
  .option('--verbose', 'Show full file list with details')
24
46
  .option('--collection <id>', 'Filter by collection ID')
25
- .addOption(new Option('--format <format>', 'Output format: yaml (default) or json').choices([
26
- 'yaml',
27
- 'json',
28
- ]).default('yaml'))
47
+ .addOption(yamlOrJsonFormat())
29
48
  .action(scanCommand)
30
49
  .addHelpText('after', `
31
50
  Description:
@@ -59,11 +78,263 @@ Examples:
59
78
  $ vat resources scan docs/ # Scan all *.md under docs/
60
79
  $ vat resources scan --verbose # Include full file details
61
80
  $ vat resources scan --collection guides # Only scan guides collection
81
+ `);
82
+ resources
83
+ .command('query <sql> [path]')
84
+ .description('Run one read-only SQL statement against the resource projection')
85
+ .option('--debug', DEBUG_HELP)
86
+ .option('--param <values...>', 'Values bound in order to the ? placeholders in the statement')
87
+ .addOption(yamlOrJsonFormat())
88
+ .action(queryCommand)
89
+ .addHelpText('after', `
90
+ Description:
91
+ Populates this tree's resource projection and runs ONE read-only SQL
92
+ statement against it. Answers questions no command reports a field for --
93
+ which files carry which headings, what links at what, which paths were
94
+ refused and why.
95
+
96
+ One tree, one answer. The statement always runs against an in-memory
97
+ database holding THIS tree's projection and nothing else. A selected
98
+ projection store makes the population cheap and is never queried -- it is
99
+ one database per VAT release shared by every root on the machine.
100
+
101
+ The corpus is the TRACKED TREE, not your configured resource set:
102
+ The projection holds every file git tracks (plus untracked, non-ignored
103
+ work). .gitignore IS honoured -- nothing under node_modules reaches it.
104
+ resources.include and resources.exclude are NOT: they scope vat resources
105
+ scan and vat resources validate, and the projection ignores them.
106
+
107
+ Measured on one adopter: scan reported 1,473 files and the projection held
108
+ 11,685 members, including 142 rows under a path that config excluded.
109
+
110
+ That is what a projection IS -- the tree, not a view of it -- and it is what
111
+ makes a query able to ask about files no collection claims. But it means a
112
+ WHERE clause is the only thing narrowing your statement. Write the exclusion
113
+ into the SQL:
114
+
115
+ SELECT path FROM resource_realizations
116
+ WHERE path NOT LIKE 'docs/architecture/adrs/archive/%'
117
+
118
+ One query, and read-only:
119
+ The statement must BE a query -- its first significant token has to be
120
+ SELECT, WITH or VALUES. Anything else (ATTACH, PRAGMA, DELETE, EXPLAIN) is
121
+ refused before it reaches SQLite. That is a gate on statement KIND and
122
+ deliberately not an inspection of your SQL; EXPLAIN is excluded even though
123
+ it is side-effect free, because admitting a prefix keyword would mean
124
+ deciding safety by looking PAST the first token.
125
+
126
+ Read-only-ness stays the engine's job: the connection is put into PRAGMA
127
+ query_only, so a write is refused by SQLite rather than by pattern-matching.
128
+
129
+ One statement only -- SQLite compiles the first and discards the rest WITHOUT
130
+ error, so trailing text would be silently ignored. A comment after the
131
+ terminating semicolon is fine ('SELECT 1; -- see ADR-14').
132
+
133
+ Output Fields:
134
+ status, root, rowCount, durationSecs
135
+ population: 'derived' or 'store' -- whether the rows were built this run or
136
+ read from the projection store. Reported because it cannot be
137
+ inferred: a correct hit and a correct re-derivation produce
138
+ identical rows
139
+ populationSecs:
140
+ What that population cost. The store's whole job is to make it
141
+ cheap, so this is the number that says whether it did
142
+ rows: The selected rows, exactly as SQLite holds them -- a boolean as
143
+ 0/1, a date and a JSON column as text. Values are NOT decoded,
144
+ because decoding needs a table spec and arbitrary SQL has none
145
+
146
+ Exit Codes:
147
+ 0 - The statement ran | 2 - The statement was refused, or the crawl failed
148
+
149
+ Requirements:
150
+ projectRoot: optional (falls back to cwd with a warning)
151
+ config: optional (uses defaults if absent)
152
+
153
+ Examples:
154
+ $ vat resources query 'SELECT path FROM resource_realizations LIMIT 5'
155
+ $ vat resources query 'SELECT COUNT(*) AS n FROM blobs'
156
+ $ vat resources query 'SELECT * FROM blob_conditions' # what was refused
157
+ $ vat resources query 'SELECT target FROM blob_references WHERE kind = ?' --param markdown-link
158
+ `);
159
+ resources
160
+ .command('check [path]')
161
+ .description('Run the project\'s declared SQL assertions over its resource projection')
162
+ .option('--debug', DEBUG_HELP)
163
+ .option('--check <name>', 'Run only this check, by its key in resources.checks')
164
+ .option('--budget <seconds>', 'Kill the run if it goes this long without completing a unit of work'
165
+ + ' (default: 300; 0 removes the bound and can then hang forever)')
166
+ .addOption(
167
+ // Hidden because it is not an operator's flag: it is how a supervising
168
+ // parent tells the child it spawned to do the work rather than spawn one
169
+ // of its own, and where to append its progress. Documenting it would
170
+ // invite adopters to depend on a file whose only contract is the
171
+ // `.strict()` schema the same build reads it with.
172
+ new Option('--cost-log <path>', 'Internal: append per-unit progress here').hideHelp())
173
+ .addOption(yamlOrJsonFormat())
174
+ .action(checkCommand)
175
+ .addHelpText('after', `
176
+ Description:
177
+ Runs every assertion declared under \`resources.checks\` in
178
+ vibe-agent-toolkit.config.yaml against the same projection \`vat resources
179
+ query\` reads, and fails the run when any error-severity check is violated.
180
+
181
+ A query answers a question once. This runs the questions a project decided
182
+ were worth asking every time.
183
+
184
+ Declaring a check:
185
+ resources:
186
+ checks:
187
+ orphan-skills:
188
+ description: Every SKILL.md must be referenced by a plugin
189
+ sql: SELECT path FROM resource_realizations WHERE ...
190
+ severity: error # optional; error is the default
191
+
192
+ The statement selects the VIOLATIONS -- zero rows is a pass. Each returned
193
+ row becomes one finding, and its columns are that finding's evidence; a
194
+ selected \`path\` column anchors the finding to the file.
195
+
196
+ Findings are ordinary validation issues with the code CUSTOM:<name>, so
197
+ resources.validation.severity can downgrade or ignore one you inherited.
198
+
199
+ A check's SQL runs through the same surface as vat resources query, so
200
+ the same rule applies: it must be a query, beginning SELECT, WITH or VALUES.
201
+ A comment after the terminating semicolon is accepted.
202
+
203
+ A check that cannot run FAILS:
204
+ A renamed column breaks a check's SQL. That is reported as an error naming
205
+ the check and listing the columns the projection actually has -- never
206
+ skipped, because a check that stopped running looks exactly like one that
207
+ passed.
208
+
209
+ That report carries the code RESOURCE_CHECK_BROKEN, and NO
210
+ resources.validation.severity entry can silence it -- the config schema
211
+ refuses it as a severity key. Downgrade or ignore the CHECK all you like;
212
+ you cannot downgrade the news that it stopped checking.
213
+
214
+ Checks run over the TRACKED TREE, not your configured resource set:
215
+ resources.include and resources.exclude scope vat resources scan and vat
216
+ resources validate. They do NOT scope the projection, so they do not scope
217
+ a check. .gitignore IS honoured -- nothing under node_modules reaches it --
218
+ but a path you excluded in config is still in the corpus and a check will
219
+ fire on it.
220
+
221
+ Measured on one adopter: scan reported 1,473 files while the same tree's
222
+ projection held 11,685 members, 142 of them under a config-excluded archive
223
+ directory. A correct "every ADR carries frontmatter" check produced a real
224
+ false finding on a frozen historical file nobody intends to fix.
225
+
226
+ Narrow the check itself -- a WHERE clause is the only scope it has:
227
+
228
+ sql: |
229
+ SELECT path FROM resource_realizations
230
+ WHERE path LIKE 'docs/architecture/adrs/%'
231
+ AND path NOT LIKE 'docs/architecture/adrs/archive/%'
232
+
233
+ A check with NOTHING TO RUN OVER fails the same way:
234
+ Zero findings is the pass condition, so a run whose projection enumerated no
235
+ members passed every check while asserting nothing. If checks ran and
236
+ membersEnumerated is 0, that is reported as RESOURCE_CHECK_BROKEN at error
237
+ and the run fails. Usual causes: a broad .gitignore pattern, a shallow or
238
+ sparse CI checkout, or a root that resolved somewhere other than intended.
239
+ Declaring no checks at all is different -- that stays a warning and exit 0.
240
+
241
+ A run that HANGS is killed and reported, not waited on:
242
+ A check's SQL is adopter-authored and unbounded -- an accidental cross join
243
+ or a WITH RECURSIVE that never terminates runs forever, and nothing inside
244
+ the process can stop it (the query is synchronous and holds the event loop).
245
+ So the work runs in a child process and --budget <seconds> bounds it.
246
+
247
+ The budget is time WITHOUT PROGRESS, not total runtime: the clock resets
248
+ every time the run finishes a unit (the population, then each check, then
249
+ once more when the checks are done and the document is being built). So a
250
+ large repository with many rules is never at risk while its rules keep
251
+ finishing. Default 300.
252
+
253
+ That per-unit property holds for the CHECKS. It does NOT hold for the
254
+ population, which reports progress only when it FINISHES -- so for that one
255
+ unit the budget is a total bound, and a population slower than the budget is
256
+ killed however healthily it is working. Most of it is one uninterruptible
257
+ parse stage, so the default is set well above every tree anyone has measured
258
+ rather than pretending to instrument it. Two MEASURED trees, for scale, and
259
+ neither of them is yours: VAT's own repository is ~1.2s warm and 33-35s with
260
+ a cold parse cache; a 9,992-file adopter tree is ~5s warm and 16.5s cold. On
261
+ a tree much larger than that with a cold parse cache, raise the bound.
262
+
263
+ An interrupted run NEVER exits 0 and never looks like a pass. There are two
264
+ ways to be interrupted and they are reported differently:
265
+
266
+ Killed by the budget -- exit 1, status: error, and a RESOURCE_CHECK_BROKEN
267
+ finding naming the check that was in flight and the bound that was blown.
268
+
269
+ Died -- the child ran out of memory materialising a result set (Node aborts
270
+ with SIGABRT), or something outside killed it (a runner's OOM killer sends
271
+ SIGKILL, a step timeout or a cancelled job sends SIGTERM), or it crashed in
272
+ native code (SIGSEGV), or it could not be started at all. Also exit 1,
273
+ status: error, RESOURCE_CHECK_BROKEN -- naming what ended it, with the
274
+ remedy that ending actually earns, and saying plainly that raising --budget
275
+ is not it.
276
+
277
+ Either way the checks that COMPLETED keep their entry under checks (including
278
+ rows), but their individual violations are NOT in issues -- the progress the
279
+ child records is costs, not findings. Read that issue list as incomplete.
280
+
281
+ Interrupted before the population finished, there is no projection and no
282
+ honest document: that is an operator error (exit 2) saying which of the two
283
+ happened.
284
+
285
+ --budget cannot be combined with --cost-log (exit 2): --cost-log means the
286
+ work runs in this process, where the budget could not be enforced.
287
+
288
+ --budget 0 removes the bound and runs everything in this process. Nothing
289
+ will then stop a runaway statement. It has to be written exactly 0: an empty
290
+ --budget, and any other value that PARSES to zero (1e-400 underflows, -0 is
291
+ negative zero), are refused rather than read as 0 -- an unset shell variable
292
+ must not silently remove the bound.
293
+ Ctrl-C still works at a keyboard, because this command installs no signal
294
+ handler -- do not add one, a process blocked in synchronous SQLite survives
295
+ SIGINT once a handler exists.
296
+
297
+ Output Fields:
298
+ status, root, population, populationSecs, checksRun, membersEnumerated,
299
+ issueCounts, durationSecs, checks
300
+ checksRun: How many checks ran. Read it: no findings from four checks and no
301
+ findings from NO checks are otherwise the same document
302
+ membersEnumerated:
303
+ How many members the projection enumerated -- the corpus the
304
+ checks ran AGAINST, where checksRun is how many rules ran. Four
305
+ checks over 8,000 files and four over 0 are otherwise the same
306
+ document, and only one of them is a gate. It counts the TRACKED
307
+ TREE and not your configured resource set, so it is legitimately
308
+ far larger than scan's filesScanned -- see the section above
309
+ checks: What each check COST -- {name, durationSecs, rows} per check, or
310
+ {name, durationSecs, broken} for one whose statement threw. rows
311
+ is what the statement SELECTED, and it is a memory signal: rows
312
+ are fully materialised. It is not a finding count -- a severity
313
+ override of 'ignore' drops findings the statement still selected,
314
+ so sum(rows) and issueCounts legitimately disagree
315
+ populationSecs:
316
+ What the shared population cost. It is NOT charged to any check:
317
+ every check's durationSecs is its own statement and nothing else,
318
+ so this is the term that reconciles them against durationSecs
319
+ issues: One row per violation ({code, severity, message, path?})
320
+
321
+ Exit Codes:
322
+ 0 - No error-severity findings
323
+ 1 - At least one (a violation, a broken check, an empty corpus, a run killed
324
+ for making no progress within --budget, or a run whose child DIED)
325
+ 2 - System error, an unknown --check name, an unusable --budget (an empty
326
+ one, one that means zero without being written 0, or one passed with
327
+ --cost-log), or a run interrupted before its population completed
328
+
329
+ Examples:
330
+ $ vat resources check
331
+ $ vat resources check --check orphan-skills
332
+ $ vat resources check --budget 60
62
333
  `);
63
334
  resources
64
335
  .command('validate [path]')
65
336
  .description('Validate markdown resources (link integrity, anchors)')
66
- .option('--debug', 'Enable debug logging')
337
+ .option('--debug', DEBUG_HELP)
67
338
  .option('-v, --verbose', 'Show all scanned resources, including those without issues')
68
339
  .option('--frontmatter-schema <path>', 'Validate frontmatter against JSON Schema file (.json or .yaml)')
69
340
  .option('--validation-mode <mode>', 'Validation mode for schemas: strict (default) or permissive', 'strict')
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/resources/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,UAAU,sBAAsB;IACpC,MAAM,SAAS,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IAE3C,SAAS;SACN,WAAW,CAAC,oEAAoE,CAAC;SACjF,WAAW,CAAC,KAAK,CAAC,CAAC,uDAAuD;SAC1E,WAAW,CACV,OAAO,EACP;;;;;;CAML,CACI,CAAC;IAEJ,SAAS;SACN,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,0CAA0C,CAAC;SACvD,MAAM,CAAC,SAAS,EAAE,sBAAsB,CAAC;SACzC,MAAM,CAAC,WAAW,EAAE,kCAAkC,CAAC;SACvD,MAAM,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;SACtD,SAAS,CACR,IAAI,MAAM,CAAC,mBAAmB,EAAE,uCAAuC,CAAC,CAAC,OAAO,CAAC;QAC/E,MAAM;QACN,MAAM;KACP,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CACnB;SACA,MAAM,CAAC,WAAW,CAAC;SACnB,WAA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BAAmB,EAAE,yBAAyB,CAAC;SACtD,MAAM,CAAC,uBAAuB,EAAE,yDAAyD,CAAC;SAC1F,MAAM,CAAC,sBAAsB,EAAE,8HAA8H,CAAC;SAC9J,MAAM,CAAC,YAAY,EAAE,0HAA0H,CAAC;SAChJ,MAAM,CAAC,8BAA8B,EAAE,0FAA0F,CAAC;SAClI,MAAM,CAAC,eAAe,CAAC;SACvB,WAAW,CACV,OAAO,EACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwKL,CACI,CAAC;IAEJ,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * `vat resources query` — ask the resource projection a read-only SQL question.
3
+ *
4
+ * ## Why a query verb at all, when `scan` already reports counts
5
+ *
6
+ * `vat resources scan` answers the questions its payload was written for, and
7
+ * nothing else. The projection holds twelve tables — realizations, references,
8
+ * sections, conditions, provenance — and every question about them that nobody
9
+ * anticipated currently has no answer short of writing a new command. This verb
10
+ * is the general case: one statement, the rows it selects, no new field.
11
+ *
12
+ * ## 🔑 One tree, one answer — and that is now a property, not a promise
13
+ *
14
+ * The SQL always runs against a per-run in-memory database holding this tree's
15
+ * projection and nothing else. A selected projection store makes the POPULATION
16
+ * cheap and is never queried, because it is one database per VAT release shared
17
+ * by every root on the machine — querying it answered from other repositories,
18
+ * with a two-file corpus reporting 5,779 rows instead of 3.
19
+ * `utils/projection-query.ts`'s header carries the measurement and the reasoning.
20
+ *
21
+ * ## 🔑 The document says where its rows came from, and that is the cache tell
22
+ *
23
+ * `population` reports whether the projection was **derived** this run or read
24
+ * from the **store**. It has to be reported, because it cannot be inferred: a
25
+ * correct hit and a correct re-derivation produce byte-identical rows, so "did
26
+ * the cache work" is otherwise unfalsifiable — this repository's most repeated
27
+ * failure. The signal is real rather than declarative: a store hit
28
+ * short-circuits `populate()` before the builder exists, so no contributor runs
29
+ * and no timing record is filed. An empty record list IS the hit.
30
+ *
31
+ * `populationSecs` sits beside it and says what that origin was worth — the wall
32
+ * time of the setup both this verb and `vat resources check` pay before either
33
+ * runs a statement. Measured as that field on this repository with the parse
34
+ * cache warm: 1.16-1.18 s derived against 0.29-0.31 s served. Without it the
35
+ * tell is a label a reader has to trust; with it the saving is a number they can
36
+ * check, and a per-statement cost published elsewhere has something to be read
37
+ * against. `utils/projection-query.ts` states exactly which work the span covers
38
+ * and why its start line is load-bearing.
39
+ *
40
+ * ## What this verb does NOT do
41
+ *
42
+ * It does not decode. Rows come back exactly as SQLite holds them — a boolean as
43
+ * `0`/`1`, a date and a JSON column as text — because decoding needs a table
44
+ * spec and arbitrary SQL has none. `SqlQueryableStore.query`'s docstring is the
45
+ * authority on why.
46
+ */
47
+ import { type ProjectionProvenance } from '../../utils/projection-query.js';
48
+ interface QueryOptions {
49
+ debug?: boolean;
50
+ /** Bound in order, for every `?` in the statement. */
51
+ param?: string[];
52
+ /** `yaml` (default) or `json`. Same document either way. */
53
+ format?: string;
54
+ }
55
+ /** What one query run produced, and what produced it. */
56
+ interface QueryOutcome extends ProjectionProvenance {
57
+ rows: readonly Record<string, unknown>[];
58
+ }
59
+ export interface ProjectionQueryPayloadInput extends QueryOutcome {
60
+ /** The stated root the query was asked about. */
61
+ root: string;
62
+ durationMs: number;
63
+ }
64
+ /**
65
+ * Build the query payload.
66
+ *
67
+ * Pure: no file system, no clock, no `process.exit` — the same contract
68
+ * `buildScanOutputData` follows, and for the same reason: it keeps the
69
+ * document's shape, field names included, under unit test rather than only
70
+ * under a CLI spawn.
71
+ *
72
+ * `rowCount` is stated beside `rows` rather than left for the consumer to
73
+ * count, because the two answer different questions once a caller pipes the
74
+ * document somewhere: a truncated read still carries the true total.
75
+ *
76
+ * @param input - The rows and the provenance of the run that produced them
77
+ * @returns The document to serialize
78
+ */
79
+ export declare function buildProjectionQueryOutputData(input: ProjectionQueryPayloadInput): Record<string, unknown>;
80
+ /**
81
+ * Run one read-only SQL statement against this tree's resource projection.
82
+ *
83
+ * @param sql - The statement
84
+ * @param pathArg - The corpus root, or omitted for the current directory
85
+ * @param options - Parsed command-line options
86
+ */
87
+ export declare function queryCommand(sql: string, pathArg: string | undefined, options: QueryOptions): Promise<void>;
88
+ export {};
89
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAOH,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,iCAAiC,CAAC;AAEzC,UAAU,YAAY;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,yDAAyD;AACzD,UAAU,YAAa,SAAQ,oBAAoB;IACjD,IAAI,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;CAC1C;AAED,MAAM,WAAW,2BAA4B,SAAQ,YAAY;IAC/D,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,2BAA2B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAe1G;AAiCD;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,IAAI,CAAC,CA+Bf"}
@@ -0,0 +1,146 @@
1
+ /**
2
+ * `vat resources query` — ask the resource projection a read-only SQL question.
3
+ *
4
+ * ## Why a query verb at all, when `scan` already reports counts
5
+ *
6
+ * `vat resources scan` answers the questions its payload was written for, and
7
+ * nothing else. The projection holds twelve tables — realizations, references,
8
+ * sections, conditions, provenance — and every question about them that nobody
9
+ * anticipated currently has no answer short of writing a new command. This verb
10
+ * is the general case: one statement, the rows it selects, no new field.
11
+ *
12
+ * ## 🔑 One tree, one answer — and that is now a property, not a promise
13
+ *
14
+ * The SQL always runs against a per-run in-memory database holding this tree's
15
+ * projection and nothing else. A selected projection store makes the POPULATION
16
+ * cheap and is never queried, because it is one database per VAT release shared
17
+ * by every root on the machine — querying it answered from other repositories,
18
+ * with a two-file corpus reporting 5,779 rows instead of 3.
19
+ * `utils/projection-query.ts`'s header carries the measurement and the reasoning.
20
+ *
21
+ * ## 🔑 The document says where its rows came from, and that is the cache tell
22
+ *
23
+ * `population` reports whether the projection was **derived** this run or read
24
+ * from the **store**. It has to be reported, because it cannot be inferred: a
25
+ * correct hit and a correct re-derivation produce byte-identical rows, so "did
26
+ * the cache work" is otherwise unfalsifiable — this repository's most repeated
27
+ * failure. The signal is real rather than declarative: a store hit
28
+ * short-circuits `populate()` before the builder exists, so no contributor runs
29
+ * and no timing record is filed. An empty record list IS the hit.
30
+ *
31
+ * `populationSecs` sits beside it and says what that origin was worth — the wall
32
+ * time of the setup both this verb and `vat resources check` pay before either
33
+ * runs a statement. Measured as that field on this repository with the parse
34
+ * cache warm: 1.16-1.18 s derived against 0.29-0.31 s served. Without it the
35
+ * tell is a label a reader has to trust; with it the saving is a number they can
36
+ * check, and a per-statement cost published elsewhere has something to be read
37
+ * against. `utils/projection-query.ts` states exactly which work the span covers
38
+ * and why its start line is load-bearing.
39
+ *
40
+ * ## What this verb does NOT do
41
+ *
42
+ * It does not decode. Rows come back exactly as SQLite holds them — a boolean as
43
+ * `0`/`1`, a date and a JSON column as text — because decoding needs a table
44
+ * spec and arbitrary SQL has none. `SqlQueryableStore.query`'s docstring is the
45
+ * authority on why.
46
+ */
47
+ import { handleCommandError } from '../../utils/command-error.js';
48
+ import { formatDurationSecs } from '../../utils/duration.js';
49
+ import { createLogger } from '../../utils/logger.js';
50
+ import { writeJsonOutput, writeYamlOutput } from '../../utils/output.js';
51
+ import { projectRootOrLoudCwd } from '../../utils/project-root-policy.js';
52
+ import { withQueriedProjection, } from '../../utils/projection-query.js';
53
+ /**
54
+ * Build the query payload.
55
+ *
56
+ * Pure: no file system, no clock, no `process.exit` — the same contract
57
+ * `buildScanOutputData` follows, and for the same reason: it keeps the
58
+ * document's shape, field names included, under unit test rather than only
59
+ * under a CLI spawn.
60
+ *
61
+ * `rowCount` is stated beside `rows` rather than left for the consumer to
62
+ * count, because the two answer different questions once a caller pipes the
63
+ * document somewhere: a truncated read still carries the true total.
64
+ *
65
+ * @param input - The rows and the provenance of the run that produced them
66
+ * @returns The document to serialize
67
+ */
68
+ export function buildProjectionQueryOutputData(input) {
69
+ return {
70
+ status: 'success',
71
+ // Stated once, and the only absolute path in the document.
72
+ root: input.root,
73
+ // The cache tell — see the header.
74
+ population: input.population,
75
+ // Immediately after the origin, because the two are one statement: served
76
+ // or derived, and what that was worth. Separated they read as two unrelated
77
+ // numbers in a list.
78
+ populationSecs: formatDurationSecs(input.populationMs),
79
+ rowCount: input.rows.length,
80
+ durationSecs: formatDurationSecs(input.durationMs),
81
+ rows: input.rows,
82
+ };
83
+ }
84
+ /**
85
+ * Populate the tree and run the caller's one statement against it.
86
+ *
87
+ * Thin by design: everything that is not "one statement, all its rows" —
88
+ * population, store selection, the ephemeral fallback, the cache tell and the
89
+ * legible-failure wrapper — is shared with `vat resources check` in
90
+ * {@link withQueriedProjection}, so the two verbs cannot drift into answering
91
+ * about different corpora.
92
+ *
93
+ * @param options - The run
94
+ * @param options.root - Absolute corpus root
95
+ * @param options.sql - The single read-only statement
96
+ * @param options.parameters - Bound in order, for every `?`
97
+ * @param options.logger - Where blob-stage refusals are reported
98
+ * @returns The rows and the provenance of the population behind them
99
+ */
100
+ async function runProjectionQuery(options) {
101
+ const { root, sql, parameters, logger } = options;
102
+ // The statement is compiled against the empty schema first, so a typo'd
103
+ // column costs milliseconds instead of a full population.
104
+ return withQueriedProjection({ root, logger, preflight: [sql] }, (ask, provenance) => ({
105
+ rows: ask(sql, ...parameters),
106
+ ...provenance,
107
+ }));
108
+ }
109
+ /**
110
+ * Run one read-only SQL statement against this tree's resource projection.
111
+ *
112
+ * @param sql - The statement
113
+ * @param pathArg - The corpus root, or omitted for the current directory
114
+ * @param options - Parsed command-line options
115
+ */
116
+ export async function queryCommand(sql, pathArg, options) {
117
+ const logger = createLogger({ debug: options.debug ?? false });
118
+ const startTime = Date.now();
119
+ try {
120
+ // Resolved at the CLI boundary, like every other command — the loud-cwd
121
+ // policy is where root discovery belongs.
122
+ const projectRoot = projectRootOrLoudCwd(pathArg ?? process.cwd(), logger);
123
+ const outcome = await runProjectionQuery({
124
+ root: projectRoot,
125
+ sql,
126
+ parameters: options.param ?? [],
127
+ logger,
128
+ });
129
+ const payload = buildProjectionQueryOutputData({
130
+ ...outcome,
131
+ root: projectRoot,
132
+ durationMs: Date.now() - startTime,
133
+ });
134
+ if (options.format === 'json') {
135
+ writeJsonOutput(payload);
136
+ }
137
+ else {
138
+ writeYamlOutput(payload);
139
+ }
140
+ process.exit(0);
141
+ }
142
+ catch (error) {
143
+ handleCommandError(error, logger, startTime, 'Query', options.format);
144
+ }
145
+ }
146
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/commands/resources/query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE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2B,EAC3B,OAAqB;IAErB,MAAM,MAAM,GAAG,YAAY,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK,EAAE,CAAC,CAAC;IAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,IAAI,CAAC;QACH,wEAAwE;QACxE,0CAA0C;QAC1C,MAAM,WAAW,GAAG,oBAAoB,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;QAE3E,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC;YACvC,IAAI,EAAE,WAAW;YACjB,GAAG;YACH,UAAU,EAAE,OAAO,CAAC,KAAK,IAAI,EAAE;YAC/B,MAAM;SACP,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,8BAA8B,CAAC;YAC7C,GAAG,OAAO;YACV,IAAI,EAAE,WAAW;YACjB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;SACnC,CAAC,CAAC;QACH,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC9B,eAAe,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,eAAe,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACxE,CAAC;AACH,CAAC"}
@@ -102,7 +102,7 @@ export async function scanCommand(pathArg, options) {
102
102
  process.exit(0);
103
103
  }
104
104
  catch (error) {
105
- handleCommandError(error, logger, startTime, 'Scan');
105
+ handleCommandError(error, logger, startTime, 'Scan', options.format);
106
106
  }
107
107
  }
108
108
  //# sourceMappingURL=scan.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"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