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

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 (194) hide show
  1. package/README.md +4 -4
  2. package/dist/bin.js +41 -158
  3. package/dist/bin.js.map +1 -1
  4. package/dist/command-loaders.d.ts +2 -2
  5. package/dist/command-loaders.d.ts.map +1 -1
  6. package/dist/command-loaders.js +4 -2
  7. package/dist/command-loaders.js.map +1 -1
  8. package/dist/commands/ard/emit.d.ts +104 -0
  9. package/dist/commands/ard/emit.d.ts.map +1 -0
  10. package/dist/commands/ard/emit.js +223 -0
  11. package/dist/commands/ard/emit.js.map +1 -0
  12. package/dist/commands/ard/index.d.ts +12 -0
  13. package/dist/commands/ard/index.d.ts.map +1 -0
  14. package/dist/commands/ard/index.js +79 -0
  15. package/dist/commands/ard/index.js.map +1 -0
  16. package/dist/commands/ard/surfaces.d.ts +56 -0
  17. package/dist/commands/ard/surfaces.d.ts.map +1 -0
  18. package/dist/commands/ard/surfaces.js +150 -0
  19. package/dist/commands/ard/surfaces.js.map +1 -0
  20. package/dist/commands/audit.d.ts +75 -8
  21. package/dist/commands/audit.d.ts.map +1 -1
  22. package/dist/commands/audit.js +605 -140
  23. package/dist/commands/audit.js.map +1 -1
  24. package/dist/commands/claude/budget.d.ts +13 -0
  25. package/dist/commands/claude/budget.d.ts.map +1 -1
  26. package/dist/commands/claude/budget.js +80 -28
  27. package/dist/commands/claude/budget.js.map +1 -1
  28. package/dist/commands/claude/context.js +1 -1
  29. package/dist/commands/claude/context.js.map +1 -1
  30. package/dist/commands/claude/marketplace/validate.d.ts +55 -22
  31. package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
  32. package/dist/commands/claude/marketplace/validate.js +380 -75
  33. package/dist/commands/claude/marketplace/validate.js.map +1 -1
  34. package/dist/commands/claude/org/skills.d.ts +84 -3
  35. package/dist/commands/claude/org/skills.d.ts.map +1 -1
  36. package/dist/commands/claude/org/skills.js +218 -46
  37. package/dist/commands/claude/org/skills.js.map +1 -1
  38. package/dist/commands/claude/plugin/build.d.ts +8 -0
  39. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  40. package/dist/commands/claude/plugin/build.js +16 -2
  41. package/dist/commands/claude/plugin/build.js.map +1 -1
  42. package/dist/commands/claude/plugin/tree-copy.d.ts +72 -0
  43. package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
  44. package/dist/commands/claude/plugin/tree-copy.js +215 -10
  45. package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
  46. package/dist/commands/corpus/index.d.ts.map +1 -1
  47. package/dist/commands/corpus/index.js +3 -0
  48. package/dist/commands/corpus/index.js.map +1 -1
  49. package/dist/commands/corpus/report.d.ts +0 -1
  50. package/dist/commands/corpus/report.d.ts.map +1 -1
  51. package/dist/commands/corpus/report.js +0 -1
  52. package/dist/commands/corpus/report.js.map +1 -1
  53. package/dist/commands/corpus/runner.d.ts +58 -1
  54. package/dist/commands/corpus/runner.d.ts.map +1 -1
  55. package/dist/commands/corpus/runner.js +90 -15
  56. package/dist/commands/corpus/runner.js.map +1 -1
  57. package/dist/commands/corpus/scan.d.ts.map +1 -1
  58. package/dist/commands/corpus/scan.js +0 -1
  59. package/dist/commands/corpus/scan.js.map +1 -1
  60. package/dist/commands/doctor.d.ts +14 -0
  61. package/dist/commands/doctor.d.ts.map +1 -1
  62. package/dist/commands/doctor.js +96 -18
  63. package/dist/commands/doctor.js.map +1 -1
  64. package/dist/commands/okf/index.d.ts +11 -0
  65. package/dist/commands/okf/index.d.ts.map +1 -0
  66. package/dist/commands/okf/index.js +102 -0
  67. package/dist/commands/okf/index.js.map +1 -0
  68. package/dist/commands/okf/validate.d.ts +82 -0
  69. package/dist/commands/okf/validate.d.ts.map +1 -0
  70. package/dist/commands/okf/validate.js +157 -0
  71. package/dist/commands/okf/validate.js.map +1 -0
  72. package/dist/commands/phase-utils.d.ts +19 -3
  73. package/dist/commands/phase-utils.d.ts.map +1 -1
  74. package/dist/commands/phase-utils.js +26 -5
  75. package/dist/commands/phase-utils.js.map +1 -1
  76. package/dist/commands/rag/index-command.d.ts +27 -2
  77. package/dist/commands/rag/index-command.d.ts.map +1 -1
  78. package/dist/commands/rag/index-command.js +44 -7
  79. package/dist/commands/rag/index-command.js.map +1 -1
  80. package/dist/commands/rag/index.d.ts.map +1 -1
  81. package/dist/commands/rag/index.js +2 -0
  82. package/dist/commands/rag/index.js.map +1 -1
  83. package/dist/commands/resources/check-progress.d.ts +3 -0
  84. package/dist/commands/resources/check-progress.d.ts.map +1 -1
  85. package/dist/commands/resources/check-progress.js +6 -0
  86. package/dist/commands/resources/check-progress.js.map +1 -1
  87. package/dist/commands/resources/check.d.ts +33 -4
  88. package/dist/commands/resources/check.d.ts.map +1 -1
  89. package/dist/commands/resources/check.js +131 -44
  90. package/dist/commands/resources/check.js.map +1 -1
  91. package/dist/commands/resources/index.d.ts.map +1 -1
  92. package/dist/commands/resources/index.js +41 -9
  93. package/dist/commands/resources/index.js.map +1 -1
  94. package/dist/commands/resources/query.d.ts +18 -1
  95. package/dist/commands/resources/query.d.ts.map +1 -1
  96. package/dist/commands/resources/query.js +29 -4
  97. package/dist/commands/resources/query.js.map +1 -1
  98. package/dist/commands/resources/validate.d.ts +29 -0
  99. package/dist/commands/resources/validate.d.ts.map +1 -1
  100. package/dist/commands/resources/validate.js +116 -13
  101. package/dist/commands/resources/validate.js.map +1 -1
  102. package/dist/commands/skill/review.d.ts.map +1 -1
  103. package/dist/commands/skill/review.js +9 -2
  104. package/dist/commands/skill/review.js.map +1 -1
  105. package/dist/commands/skill/test/run.d.ts.map +1 -1
  106. package/dist/commands/skill/test/run.js +21 -6
  107. package/dist/commands/skill/test/run.js.map +1 -1
  108. package/dist/commands/skills/build.d.ts.map +1 -1
  109. package/dist/commands/skills/build.js +16 -3
  110. package/dist/commands/skills/build.js.map +1 -1
  111. package/dist/commands/skills/list.d.ts +2 -1
  112. package/dist/commands/skills/list.d.ts.map +1 -1
  113. package/dist/commands/skills/list.js +31 -9
  114. package/dist/commands/skills/list.js.map +1 -1
  115. package/dist/commands/skills/skill-discovery.d.ts +40 -1
  116. package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
  117. package/dist/commands/skills/skill-discovery.js +32 -3
  118. package/dist/commands/skills/skill-discovery.js.map +1 -1
  119. package/dist/commands/skills/validate-command.d.ts.map +1 -1
  120. package/dist/commands/skills/validate-command.js +11 -3
  121. package/dist/commands/skills/validate-command.js.map +1 -1
  122. package/dist/commands/skills/validate.d.ts +66 -7
  123. package/dist/commands/skills/validate.d.ts.map +1 -1
  124. package/dist/commands/skills/validate.js +133 -29
  125. package/dist/commands/skills/validate.js.map +1 -1
  126. package/dist/commands/verify.d.ts +94 -3
  127. package/dist/commands/verify.d.ts.map +1 -1
  128. package/dist/commands/verify.js +192 -45
  129. package/dist/commands/verify.js.map +1 -1
  130. package/dist/skill-resolution/packaging-config.d.ts +49 -5
  131. package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
  132. package/dist/skill-resolution/packaging-config.js +59 -19
  133. package/dist/skill-resolution/packaging-config.js.map +1 -1
  134. package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
  135. package/dist/skill-resolution/resolve-skill-reference.js +6 -3
  136. package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
  137. package/dist/utils/command-error.d.ts +31 -0
  138. package/dist/utils/command-error.d.ts.map +1 -1
  139. package/dist/utils/command-error.js +45 -0
  140. package/dist/utils/command-error.js.map +1 -1
  141. package/dist/utils/edge-lens-evaluation.d.ts +83 -0
  142. package/dist/utils/edge-lens-evaluation.d.ts.map +1 -0
  143. package/dist/utils/edge-lens-evaluation.js +110 -0
  144. package/dist/utils/edge-lens-evaluation.js.map +1 -0
  145. package/dist/utils/optional-backend.d.ts +5 -4
  146. package/dist/utils/optional-backend.d.ts.map +1 -1
  147. package/dist/utils/optional-backend.js +5 -4
  148. package/dist/utils/optional-backend.js.map +1 -1
  149. package/dist/utils/project-root-policy.d.ts +20 -0
  150. package/dist/utils/project-root-policy.d.ts.map +1 -1
  151. package/dist/utils/project-root-policy.js +32 -0
  152. package/dist/utils/project-root-policy.js.map +1 -1
  153. package/dist/utils/projection-query.d.ts +41 -4
  154. package/dist/utils/projection-query.d.ts.map +1 -1
  155. package/dist/utils/projection-query.js +44 -10
  156. package/dist/utils/projection-query.js.map +1 -1
  157. package/dist/utils/projection-store.d.ts +41 -15
  158. package/dist/utils/projection-store.d.ts.map +1 -1
  159. package/dist/utils/projection-store.js +65 -18
  160. package/dist/utils/projection-store.js.map +1 -1
  161. package/dist/utils/repeatable-option.d.ts +37 -0
  162. package/dist/utils/repeatable-option.d.ts.map +1 -0
  163. package/dist/utils/repeatable-option.js +39 -0
  164. package/dist/utils/repeatable-option.js.map +1 -0
  165. package/dist/utils/resource-loader.d.ts +4 -3
  166. package/dist/utils/resource-loader.d.ts.map +1 -1
  167. package/dist/utils/resource-loader.js +61 -30
  168. package/dist/utils/resource-loader.js.map +1 -1
  169. package/dist/utils/root-argv.d.ts +53 -0
  170. package/dist/utils/root-argv.d.ts.map +1 -0
  171. package/dist/utils/root-argv.js +215 -0
  172. package/dist/utils/root-argv.js.map +1 -0
  173. package/dist/utils/run-integrity.d.ts +95 -0
  174. package/dist/utils/run-integrity.d.ts.map +1 -0
  175. package/dist/utils/run-integrity.js +102 -0
  176. package/dist/utils/run-integrity.js.map +1 -0
  177. package/dist/utils/sqlite-experimental-warning.d.ts +69 -0
  178. package/dist/utils/sqlite-experimental-warning.d.ts.map +1 -0
  179. package/dist/utils/sqlite-experimental-warning.js +144 -0
  180. package/dist/utils/sqlite-experimental-warning.js.map +1 -0
  181. package/dist/utils/user-context-scanner.d.ts +8 -0
  182. package/dist/utils/user-context-scanner.d.ts.map +1 -1
  183. package/dist/utils/user-context-scanner.js +4 -0
  184. package/dist/utils/user-context-scanner.js.map +1 -1
  185. package/dist/utils/validate-help-files.d.ts.map +1 -1
  186. package/dist/utils/validate-help-files.js +9 -2
  187. package/dist/utils/validate-help-files.js.map +1 -1
  188. package/docs/audit.md +120 -7
  189. package/docs/doctor.md +6 -6
  190. package/docs/index.md +1 -1
  191. package/docs/rag.md +3 -1
  192. package/docs/resources.md +5 -1
  193. package/docs/skills.md +47 -62
  194. package/package.json +18 -18
@@ -0,0 +1,157 @@
1
+ /**
2
+ * `vat okf validate [bundle]` — conformance for the OKF bundles a project declares.
3
+ *
4
+ * Producer-side, and the exit code says so: OKF §11 tells CONSUMERS not to
5
+ * reject a bundle over broken cross-links or unknown keys, but VAT is tooling
6
+ * for the publisher — the one party who can fix them — so a finding at `error`
7
+ * severity fails the command. An adopter who wants a softer gate lowers
8
+ * `okf.bundles.<name>.severity`; the finding is still reported either way.
9
+ */
10
+ import { dirname } from 'node:path';
11
+ import { okfBundleRuns, parseConfigFile, validateOkfBundle, } from '@vibe-agent-toolkit/resources';
12
+ import { findConfigFile } from '@vibe-agent-toolkit/utils';
13
+ import { handleCommandError } from '../../utils/command-error.js';
14
+ import { createLogger } from '../../utils/logger.js';
15
+ import { writeJsonOutput, writeYamlOutput } from '../../utils/output.js';
16
+ /**
17
+ * Count one bundle set's findings by severity.
18
+ *
19
+ * Not `countBySeverity` from `@vibe-agent-toolkit/schema`: that takes
20
+ * `ValidationIssue[]`, whose `code` is the shared `IssueCode` registry union,
21
+ * and an OKF finding's code is drawn from the specification's own vocabulary
22
+ * rather than that registry. The counts field is still typed as the shared
23
+ * `SeverityCounts`, so the SHAPE stays checked against the canonical one and a
24
+ * bucket cannot be added, renamed or dropped here alone.
25
+ *
26
+ * @param findings - Every finding across every bundle that was checked
27
+ * @returns The per-severity distribution
28
+ */
29
+ function countOkfFindings(findings) {
30
+ let errors = 0;
31
+ let warnings = 0;
32
+ let info = 0;
33
+ for (const finding of findings) {
34
+ if (finding.severity === 'error') {
35
+ errors += 1;
36
+ }
37
+ else if (finding.severity === 'warning') {
38
+ warnings += 1;
39
+ }
40
+ else {
41
+ info += 1;
42
+ }
43
+ }
44
+ return { errors, warnings, info };
45
+ }
46
+ /**
47
+ * The bundles whose root was read successfully and held not one markdown file.
48
+ *
49
+ * 🪤 The same green-without-running shape the `no-bundles` notice exists for,
50
+ * one level down. A `root:` typo that lands on a real-but-wrong directory, or a
51
+ * root written one level too deep, produces `status: passed`, exit 0 and an
52
+ * empty findings list — a report indistinguishable from a bundle that was read
53
+ * in full and found conformant.
54
+ *
55
+ * A bundle carrying findings is excluded even when its document lists are empty:
56
+ * that is the unreadable-root case, which already says the truthful thing in its
57
+ * own finding, and "contains no .md files" would be a second, wronger sentence
58
+ * about a directory that does not exist.
59
+ *
60
+ * @param bundles - Every bundle report in the run
61
+ * @returns The names of the vacuous ones, in report order
62
+ */
63
+ function vacuousBundles(bundles) {
64
+ return bundles
65
+ .filter((report) => report.findings.length === 0 &&
66
+ report.conceptDocuments.length === 0 &&
67
+ report.reservedDocuments.length === 0)
68
+ .map((report) => report.bundle);
69
+ }
70
+ /**
71
+ * The sentence a run with one or more vacuous bundles carries.
72
+ *
73
+ * @param vacuous - Names of the bundles whose root held no markdown at all
74
+ * @returns A notice naming each of them and the config key to check
75
+ */
76
+ function vacuousNotice(vacuous) {
77
+ const named = vacuous.map((bundle) => `'${bundle}'`).join(', ');
78
+ const subject = vacuous.length === 1 ? 'it' : 'them';
79
+ return `${named} contains no .md files, so nothing was checked in ${subject}. A root pointing one level too deep, or at a real-but-wrong directory, reads exactly like this — check \`okf.bundles.<name>.root\`.`;
80
+ }
81
+ /**
82
+ * Decide the status word and the counts for a set of bundle reports.
83
+ *
84
+ * @param bundles - One report per bundle that was actually checked
85
+ * @returns The status, the finding count and severity distribution, and a
86
+ * notice when nothing was declared or a declared bundle held nothing
87
+ */
88
+ export function summarizeOkfBundles(bundles) {
89
+ const findings = bundles.flatMap((report) => report.findings);
90
+ const findingCount = findings.length;
91
+ const issueCounts = countOkfFindings(findings);
92
+ if (bundles.length === 0) {
93
+ return {
94
+ status: 'no-bundles',
95
+ findingCount,
96
+ issueCounts,
97
+ notice: 'No OKF bundles are declared, so nothing was checked. Declare one under `okf.bundles.<name>.root` in vibe-agent-toolkit.config.yaml; every non-reserved .md beneath that root is then checked for frontmatter carrying a non-empty `type`.',
98
+ };
99
+ }
100
+ // Status and exit code deliberately do NOT move: nothing failed, and failing a
101
+ // build over an empty directory would be worse than the silence. It is the
102
+ // report that must stop implying a bundle was read when it was not.
103
+ const vacuous = vacuousBundles(bundles);
104
+ const status = issueCounts.errors > 0 ? 'failed' : 'passed';
105
+ return {
106
+ status,
107
+ findingCount,
108
+ issueCounts,
109
+ ...(vacuous.length > 0 && { notice: vacuousNotice(vacuous) }),
110
+ };
111
+ }
112
+ /**
113
+ * Assemble the report for every selected bundle.
114
+ *
115
+ * Separate from the action so the shape is testable without a process exit.
116
+ *
117
+ * @param bundleArg - A single declared bundle name, or undefined for all of them
118
+ * @param options - Output format and the optional revision to cross-check against
119
+ */
120
+ export async function okfValidateReport(bundleArg, options) {
121
+ const configPath = findConfigFile(process.cwd());
122
+ if (!configPath) {
123
+ throw new Error('No vibe-agent-toolkit.config.yaml found. Run from a project directory.');
124
+ }
125
+ const config = await parseConfigFile(configPath);
126
+ const runs = okfBundleRuns(config.okf, dirname(configPath), {
127
+ ...(bundleArg !== undefined && { bundle: bundleArg }),
128
+ ...(options.specVersion !== undefined && { specVersion: options.specVersion }),
129
+ });
130
+ const bundles = [];
131
+ for (const run of runs) {
132
+ bundles.push(await validateOkfBundle(run));
133
+ }
134
+ return { ...summarizeOkfBundles(bundles), bundles };
135
+ }
136
+ /** Action handler for `vat okf validate [bundle]`. */
137
+ export async function okfValidateCommand(bundleArg, options) {
138
+ const logger = createLogger(options.debug === true ? { debug: true } : {});
139
+ const startTime = Date.now();
140
+ try {
141
+ const report = await okfValidateReport(bundleArg, options);
142
+ if (options.format === 'json') {
143
+ writeJsonOutput(report);
144
+ }
145
+ else {
146
+ writeYamlOutput(report);
147
+ }
148
+ // Read from the counts the report PUBLISHES, not from the status word: an
149
+ // adopter who promotes or lowers a bundle's severity then gates on exactly
150
+ // the number a reader can see.
151
+ process.exit(report.issueCounts.errors > 0 ? 1 : 0);
152
+ }
153
+ catch (error) {
154
+ handleCommandError(error, logger, startTime, 'OKF validate', options.format);
155
+ }
156
+ }
157
+ //# sourceMappingURL=validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/commands/okf/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,aAAa,EACb,eAAe,EACf,iBAAiB,GAGlB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAwDzE;;;;;;;;;;;;GAYG;AACH,SAAS,gBAAgB,CAAC,QAA+B;IACvD,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;YACjC,MAAM,IAAI,CAAC,CAAC;QACd,CAAC;aAAM,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC1C,QAAQ,IAAI,CAAC,CAAC;QAChB,CAAC;aAAM,CAAC;YACN,IAAI,IAAI,CAAC,CAAC;QACZ,CAAC;IACH,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACpC,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,S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B,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC3E,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC3D,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC9B,eAAe,CAAC,MAAM,CAAC,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,eAAe,CAAC,MAAM,CAAC,CAAC;QAC1B,CAAC;QACD,0EAA0E;QAC1E,2EAA2E;QAC3E,+BAA+B;QAC/B,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/E,CAAC;AACH,CAAC"}
@@ -252,15 +252,31 @@ export declare function phaseResultFromOutcome(name: string, outcome: PhaseOutco
252
252
  * `phases[].report` instead.
253
253
  *
254
254
  * Three cases, and the middle one is the one to get right:
255
- * - an unexpected failure publishes the shared envelope through
256
- * `writeYamlOutput`, matching `handleCommandError`;
255
+ * - an unexpected failure publishes the shared envelope in the format the
256
+ * operator asked for, matching `handleCommandError`;
257
257
  * - a command's own report goes through the command's own `render`;
258
258
  * - no document at all (an unconfigured run, a dry run) publishes nothing.
259
259
  *
260
+ * 🔑 **`format` is REQUIRED, and that is the whole point of it being a
261
+ * parameter.** This arm hardcoded `writeYamlOutput`, and it is `vat resources
262
+ * validate`'s ONLY error exit — so `--format json` silently produced YAML on the
263
+ * one path a scripted consumer most needs to parse. The sibling
264
+ * `handleCommandError` has the same parameter as an OPTIONAL one carrying a
265
+ * docstring that says a caller with a `--format` option must pass it, and two
266
+ * commands added in the same change dropped it anyway: a docstring is not a
267
+ * mechanism. Here the type system asks, so a new caller cannot forget. A command
268
+ * that offers no `--format` passes `undefined` and says so at its call site.
269
+ *
270
+ * ⚠️ It governs the FAILURE envelope only. A command's own report still goes
271
+ * through `render`, which is what a `--format text` lane needs.
272
+ *
260
273
  * @param outcome - What the phase produced
261
274
  * @param render - How this command publishes its OWN report shape
275
+ * @param format - What the operator asked for: `json`, or anything else (and
276
+ * `undefined`) for YAML — the same two-branch switch `handleCommandError` and
277
+ * every success path use
262
278
  */
263
- export declare function finishCommand(outcome: PhaseOutcome, render: (document: unknown) => void): never;
279
+ export declare function finishCommand(outcome: PhaseOutcome, render: (document: unknown) => void, format: string | undefined): never;
264
280
  /**
265
281
  * Run a single phase in THIS process and fold its outcome into a result.
266
282
  *
@@ -1 +1 @@
1
- {"version":3,"file":"phase-utils.d.ts","sourceRoot":"","sources":["../../src/commands/phase-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;GAgBG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GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAI5E"}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { Option } from 'commander';
5
5
  import { createLogger } from '../utils/logger.js';
6
- import { writeYamlOutput } from '../utils/output.js';
6
+ import { writeJsonOutput, writeYamlOutput } from '../utils/output.js';
7
7
  /**
8
8
  * Declare `--only` on a command that has RETIRED it, solely so the command can
9
9
  * explain itself instead of emitting Commander's bare `error: unknown option
@@ -219,17 +219,38 @@ export function phaseResultFromOutcome(name, outcome) {
219
219
  * `phases[].report` instead.
220
220
  *
221
221
  * Three cases, and the middle one is the one to get right:
222
- * - an unexpected failure publishes the shared envelope through
223
- * `writeYamlOutput`, matching `handleCommandError`;
222
+ * - an unexpected failure publishes the shared envelope in the format the
223
+ * operator asked for, matching `handleCommandError`;
224
224
  * - a command's own report goes through the command's own `render`;
225
225
  * - no document at all (an unconfigured run, a dry run) publishes nothing.
226
226
  *
227
+ * 🔑 **`format` is REQUIRED, and that is the whole point of it being a
228
+ * parameter.** This arm hardcoded `writeYamlOutput`, and it is `vat resources
229
+ * validate`'s ONLY error exit — so `--format json` silently produced YAML on the
230
+ * one path a scripted consumer most needs to parse. The sibling
231
+ * `handleCommandError` has the same parameter as an OPTIONAL one carrying a
232
+ * docstring that says a caller with a `--format` option must pass it, and two
233
+ * commands added in the same change dropped it anyway: a docstring is not a
234
+ * mechanism. Here the type system asks, so a new caller cannot forget. A command
235
+ * that offers no `--format` passes `undefined` and says so at its call site.
236
+ *
237
+ * ⚠️ It governs the FAILURE envelope only. A command's own report still goes
238
+ * through `render`, which is what a `--format text` lane needs.
239
+ *
227
240
  * @param outcome - What the phase produced
228
241
  * @param render - How this command publishes its OWN report shape
242
+ * @param format - What the operator asked for: `json`, or anything else (and
243
+ * `undefined`) for YAML — the same two-branch switch `handleCommandError` and
244
+ * every success path use
229
245
  */
230
- export function finishCommand(outcome, render) {
246
+ export function finishCommand(outcome, render, format) {
231
247
  if (outcome.failed === true) {
232
- writeYamlOutput(outcome.document);
248
+ if (format === 'json') {
249
+ writeJsonOutput(outcome.document);
250
+ }
251
+ else {
252
+ writeYamlOutput(outcome.document);
253
+ }
233
254
  }
234
255
  else if (outcome.document !== undefined) {
235
256
  render(outcome.document);
@@ -1 +1 @@
1
- {"version":3,"file":"phase-utils.js","sourceRoot":"","sources":["../../src/commands/phase-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAgB,MAAM,EAAE,MAAM,WAAW,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAkDrD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,OAAO,OAAO,CAAC,SAAS,CACtB,IAAI,MAAM,CAAC,gBAAgB,EAAE,qCAAqC,CAAC,CAAC,QAAQ,EAAE,CAC/E,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAwB,EAAE,OAAe,EAAE,OAAe;IAC1F,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO;IAE/B,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,qCAAqC,OAAO,MAAM;QAChD,IAAI;QACJ,0BAA0B,OAAO,8CAA8C;QAC/E,8EAA8E;QAC9E,gFAAgF;QAChF,IAAI;QACJ,2BAA2B,OAAO,oCAAoC;QACtE,yFAAyF,CAC5F,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAqBD,gFAAgF;AAChF,MAAM,CAAC,MAAM,YAAY,GAAgB,cAAc,CAAC;AAmCxD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAA8B;IAC/D,OAAO;QACL,MAAM,EAAE,YAAY,CAA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EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAClE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAC5D,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC;QACvB,KAAK,CAAC,QAAQ,IAAI,QAAQ,CAAC;QAC3B,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC;IACrB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAA+B;IAC/D,MAAM,KAAK,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC5C,IAAI,KAAK,KAAK,YAAY;QAAE,OAAO,CAAC,CAAC;IACrC,OAAO,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC"}
@@ -2,6 +2,7 @@
2
2
  * RAG index command - index markdown resources into vector database
3
3
  */
4
4
  import type { IndexResult } from '@vibe-agent-toolkit/rag';
5
+ import type { UnreadableResource } from '@vibe-agent-toolkit/resources';
5
6
  interface IndexOptions {
6
7
  db?: string;
7
8
  debug?: boolean;
@@ -37,13 +38,37 @@ export interface IndexOutcome {
37
38
  * `indexResources` can fail a resource for any reason (unreadable file,
38
39
  * embedding-provider error, provider unavailable).
39
40
  *
40
- * `errors` is optional on `IndexResult`: the provider omits it entirely when
41
- * nothing failed, and can also return `[]`. Both are success.
41
+ * `errors` is optional on `IndexResult`'s schema, so a provider MAY omit it;
42
+ * `LanceDBRAGProvider` never does (it always carries `errors: []` when nothing
43
+ * failed). Both shapes are success here, because the schema allows both.
42
44
  *
43
45
  * @param indexResult - The result of the indexing run (only `errors` is read)
44
46
  * @returns The status to publish and the exit code that agrees with it
45
47
  */
46
48
  export declare function indexOutcome(indexResult: Pick<IndexResult, 'errors'>): IndexOutcome;
49
+ /** One entry of `IndexResult['errors']`. */
50
+ type IndexError = NonNullable<IndexResult['errors']>[number];
51
+ /**
52
+ * The resources the crawl enumerated but could not read, as index errors.
53
+ *
54
+ * Such a file never reaches `indexResources`: the crawl reads and parses every
55
+ * file itself, so an unreadable one is dropped before the provider sees it. It
56
+ * is therefore in none of the provider's counters and not in its `errors` —
57
+ * the registry keeps the reconciliation log (`getUnreadableResources()`), and
58
+ * this command did not read it, so a corpus with a document missing from the
59
+ * index was reported `status: success`, exit 0, on both crawl lanes. Folding
60
+ * the log into the same `errors` list the provider's failures land in is what
61
+ * lets one status and one exit code cover "did not index everything asked".
62
+ *
63
+ * The id is the path relative to the crawl root: the registry never assigned
64
+ * one (it could not read the file to), and the relative path is what an
65
+ * operator needs to find it.
66
+ *
67
+ * @param unreadable - The registry's read-failure log
68
+ * @param crawlRoot - The directory the crawl was rooted at
69
+ * @returns One error per unreadable file, in the order the crawl met them
70
+ */
71
+ export declare function unreadableIndexErrors(unreadable: readonly UnreadableResource[], crawlRoot: string): IndexError[];
47
72
  export declare function indexCommand(pathArg: string | undefined, options: IndexOptions): Promise<void>;
48
73
  export {};
49
74
  //# sourceMappingURL=index-command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-command.d.ts","sourceRoot":"","sources":["../../../src/commands/rag/index-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAU3D,UAAU,YAAY;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,YAAY,CAInF;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,IAAI,CAAC,CA6Df"}
1
+ {"version":3,"file":"index-command.d.ts","sourceRoot":"","sources":["../../../src/commands/rag/index-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAUxE,UAAU,YAAY;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,YAAY,CAInF;AAED,4CAA4C;AAC5C,KAAK,UAAU,GAAG,WAAW,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,SAAS,kBAAkB,EAAE,EACzC,SAAS,EAAE,MAAM,GAChB,UAAU,EAAE,CAKd;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,IAAI,CAAC,CAuEf"}
@@ -2,6 +2,7 @@
2
2
  * RAG index command - index markdown resources into vector database
3
3
  */
4
4
  import { LanceDBRAGProvider } from '@vibe-agent-toolkit/rag-lancedb';
5
+ import { safePath, toForwardSlash } from '@vibe-agent-toolkit/utils';
5
6
  import { createLogger } from '../../utils/logger.js';
6
7
  import { writeYamlOutput } from '../../utils/output.js';
7
8
  import { projectRootOrNull } from '../../utils/project-root-policy.js';
@@ -18,8 +19,9 @@ import { formatDuration, handleCommandError, resolveDbPath } from './command-hel
18
19
  * `indexResources` can fail a resource for any reason (unreadable file,
19
20
  * embedding-provider error, provider unavailable).
20
21
  *
21
- * `errors` is optional on `IndexResult`: the provider omits it entirely when
22
- * nothing failed, and can also return `[]`. Both are success.
22
+ * `errors` is optional on `IndexResult`'s schema, so a provider MAY omit it;
23
+ * `LanceDBRAGProvider` never does (it always carries `errors: []` when nothing
24
+ * failed). Both shapes are success here, because the schema allows both.
23
25
  *
24
26
  * @param indexResult - The result of the indexing run (only `errors` is read)
25
27
  * @returns The status to publish and the exit code that agrees with it
@@ -28,6 +30,32 @@ export function indexOutcome(indexResult) {
28
30
  const failed = indexResult.errors?.length ?? 0;
29
31
  return failed > 0 ? { status: 'partial', exitCode: 1 } : { status: 'success', exitCode: 0 };
30
32
  }
33
+ /**
34
+ * The resources the crawl enumerated but could not read, as index errors.
35
+ *
36
+ * Such a file never reaches `indexResources`: the crawl reads and parses every
37
+ * file itself, so an unreadable one is dropped before the provider sees it. It
38
+ * is therefore in none of the provider's counters and not in its `errors` —
39
+ * the registry keeps the reconciliation log (`getUnreadableResources()`), and
40
+ * this command did not read it, so a corpus with a document missing from the
41
+ * index was reported `status: success`, exit 0, on both crawl lanes. Folding
42
+ * the log into the same `errors` list the provider's failures land in is what
43
+ * lets one status and one exit code cover "did not index everything asked".
44
+ *
45
+ * The id is the path relative to the crawl root: the registry never assigned
46
+ * one (it could not read the file to), and the relative path is what an
47
+ * operator needs to find it.
48
+ *
49
+ * @param unreadable - The registry's read-failure log
50
+ * @param crawlRoot - The directory the crawl was rooted at
51
+ * @returns One error per unreadable file, in the order the crawl met them
52
+ */
53
+ export function unreadableIndexErrors(unreadable, crawlRoot) {
54
+ return unreadable.map((entry) => ({
55
+ resourceId: toForwardSlash(safePath.relative(crawlRoot, entry.filePath)),
56
+ error: `Enumerated by the crawl but could not be read, so it is not in the index: ${entry.reason}`,
57
+ }));
58
+ }
31
59
  export async function indexCommand(pathArg, options) {
32
60
  const logger = createLogger({ debug: options.debug ?? false });
33
61
  const startTime = Date.now();
@@ -45,7 +73,15 @@ export async function indexCommand(pathArg, options) {
45
73
  const crawlRoot = projectRoot ?? process.cwd();
46
74
  const { registry } = await loadResourcesWithConfig(pathArg, crawlRoot, logger);
47
75
  const allResources = registry.getAllResources();
48
- logger.debug(`Found ${allResources.length} resources to index`);
76
+ // The declared population is the admitted one PLUS what the crawl could not
77
+ // read; the second half is reported below, not dropped — see `unreadableIndexErrors`.
78
+ const unreadable = unreadableIndexErrors(registry.getUnreadableResources(), crawlRoot);
79
+ logger.debug(`Found ${allResources.length} resources to index (${unreadable.length} enumerated but unreadable)`);
80
+ for (const entry of unreadable) {
81
+ // On stderr as well, the way the provider reports its own per-resource
82
+ // failures, so a caller reading only the exit code still sees the name.
83
+ logger.warn(`[vat-rag] Failed to index resource '${entry.resourceId}': ${entry.error}`);
84
+ }
49
85
  // Create RAG provider in admin mode (readonly: false)
50
86
  const ragProvider = await LanceDBRAGProvider.create({
51
87
  dbPath,
@@ -56,20 +92,21 @@ export async function indexCommand(pathArg, options) {
56
92
  // Close provider
57
93
  await ragProvider.close();
58
94
  const duration = Date.now() - startTime;
95
+ // One list for both kinds of failure — the provider's and the crawl's.
96
+ const errors = [...unreadable, ...(indexResult.errors ?? [])];
59
97
  // Status is DERIVED, never asserted: see `indexOutcome`.
60
- const outcome = indexOutcome(indexResult);
98
+ const outcome = indexOutcome({ errors });
61
99
  // Output results as YAML
62
100
  writeYamlOutput({
63
101
  status: outcome.status,
64
102
  resourcesIndexed: indexResult.resourcesIndexed,
65
103
  resourcesSkipped: indexResult.resourcesSkipped,
104
+ resourcesEmpty: indexResult.resourcesEmpty,
66
105
  resourcesUpdated: indexResult.resourcesUpdated,
67
106
  chunksCreated: indexResult.chunksCreated,
68
107
  chunksDeleted: indexResult.chunksDeleted,
69
108
  duration: formatDuration(duration),
70
- ...(indexResult.errors && indexResult.errors.length > 0
71
- ? { errors: indexResult.errors }
72
- : {}),
109
+ ...(errors.length > 0 ? { errors } : {}),
73
110
  });
74
111
  // The report is published FIRST and the failure signalled after, so a
75
112
  // partial run still hands the operator the `errors` list naming exactly
@@ -1 +1 @@
1
- {"version":3,"file":"index-command.js","sourceRoot":"","sources":["../../../src/commands/rag/index-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AA4BzF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,YAAY,CAAC,WAAwC;IACnE,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC;IAE/C,OAAO,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;AAC9F,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,OAA2B,EAC3B,OAAqB;IAErB,MAAM,MAAM,GAAG,YAAY,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK,EAAE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E,WAAW,CAAC,gBAAgB;YAC9C,cAAc,EAAE,WAAW,CAAC,cAAc;YAC1C,gBAAgB,EAAE,WAAW,CAAC,gBAAgB;YAC9C,aAAa,EAAE,WAAW,CAAC,aAAa;YACxC,aAAa,EAAE,WAAW,CAAC,aAAa;YACxC,QAAQ,EAAE,cAAc,CAAC,QAAQ,CAAC;YAClC,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACzC,CAAC,CAAC;QAEH,sEAAsE;QACtE,wEAAwE;QACxE,iDAAiD;QACjD,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/rag/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC,wBAAgB,gBAAgB,IAAI,OAAO,CAwM1C;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/rag/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC,wBAAgB,gBAAgB,IAAI,OAAO,CA0M1C;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
@@ -65,6 +65,8 @@ Output Structure (YAML):
65
65
  status: success (every resource indexed) / partial (some failed) / error
66
66
  resourcesIndexed: new/updated files
67
67
  resourcesSkipped: unchanged files (content hash match)
68
+ resourcesEmpty: files that chunked to nothing (frontmatter-only or blank);
69
+ recorded, not searchable, not an error
68
70
  resourcesUpdated: files with new content
69
71
  chunksCreated: total chunks added
70
72
  chunksDeleted: chunks removed from updated files
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/rag/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAwB,MAAM,iCAAiC,CAAC;AAEnF;;;;;;;GAOG;AACH,MAAM,WAAW,GAAoB;IACnC,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,iCAAiC;CAC/C,CAAC;AAEF,6BAA6B;AAC7B,MAAM,cAAc,GAAG,aAAa,CAAC;AACrC,MAAM,YAAY,GAAG,kDAAkD,CAAC;AACxE,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;AAEjD,MAAM,UAAU,gBAAgB;IAC9B,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;IAE/B,GAAG;SACA,WAAW,CAAC,qEAAqE,CAAC;SAClF,WAAW,CAAC,KAAK,CAAC,CAAC,uDAAuD;SAC1E,WAAW,CACV,OAAO,EACP;;;;;;;;;;;;;;;;;;;CAmBL,CACI,CAAC;IAEJ,GAAG;SACA,OAAO,CAAC,cAAc,CAAC;SACvB,WAAW,CAAC,+CAA+C,CAAC;SAC5D,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC;SACpC,MAAM,CAAC,SAAS,EAAE,iBAAiB,CAAC;SACpC,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;SAC9F,WAAW,CACV,OAAO,EACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCL,CACI,CAAC;IAEJ,GAAG;SACA,OAAO,CAAC,cAAc,CAAC;SACvB,WAAW,CAAC,yC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[z.ZodLiteral<"derived">, z.ZodLiteral<"store">]>;
44
44
  populationMs: z.ZodNumber;
45
+ lensMs: z.ZodNumber;
45
46
  membersEnumerated: z.ZodNumber;
46
47
  }, "strict", z.ZodTypeAny, {
47
48
  kind: "population";
48
49
  population: "derived" | "store";
49
50
  populationMs: number;
51
+ lensMs: number;
50
52
  membersEnumerated: number;
51
53
  }, {
52
54
  kind: "population";
53
55
  population: "derived" | "store";
54
56
  populationMs: number;
57
+ lensMs: number;
55
58
  membersEnumerated: number;
56
59
  }>, z.ZodObject<{
57
60
  kind: z.ZodLiteral<"start">;
@@ -1 +1 @@
1
- {"version":3,"file":"check-progress.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/check-progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0ExB,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKvB,CAAC;AAEH,oCAAoC;AACpC,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GAC/B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9B;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAQ9D;AAyBD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,GAAG,YAAY,CAuB5E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAKjF"}
1
+ {"version":3,"file":"check-progress.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/check-progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgFxB,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKvB,CAAC;AAEH,oCAAoC;AACpC,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GAC/B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9B;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAQ9D;AAyBD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,GAAG,YAAY,CAuB5E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAKjF"}
@@ -52,6 +52,12 @@ const PopulationEntrySchema = z.object({
52
52
  kind: z.literal('population'),
53
53
  population: z.union([z.literal('derived'), z.literal('store')]),
54
54
  populationMs: z.number(),
55
+ // Carried across the process boundary rather than recomputed, for the same
56
+ // reason every other field here is: a killed run's document is rebuilt from
57
+ // these lines alone, and a cost the parent cannot see is a cost it would have
58
+ // to invent or omit. Omitting it would make an interrupted run's report claim
59
+ // the lens was free.
60
+ lensMs: z.number(),
55
61
  membersEnumerated: z.number(),
56
62
  }).strict();
57
63
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"check-progress.js","sourceRoot":"","sources":["../../../src/commands/resources/check-progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;IAC7B,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;CAC9B,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ;;;;;;;GAOG;AACH,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ;;;;;;;;;GASG;AACH,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CA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AI,KAAK,iBAAiB,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IAC5F,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1B,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,8GAA8G;QAC9G,cAAc,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC,CAAC;AACJ,CAAC"}
@@ -47,6 +47,19 @@
47
47
  * and exited 0. `requireDeclaredCheck` refuses it before the crawl, naming the
48
48
  * declared set. A gate that cannot fail is worse than no gate.
49
49
  *
50
+ * ## 🔑 NO checks at all is the same refusal, and the one that shipped longest
51
+ *
52
+ * A project with a valid config and no `checks:` block reported `status:
53
+ * success`, `checksRun: 0`, exit 0 — so DELETING the `checks:` block silently
54
+ * deleted the gate and nothing anywhere said so. A gate that checked nothing is
55
+ * indistinguishable from a gate that was removed, and the entire argument for
56
+ * having these gates is that you never let those two look alike. It is now a
57
+ * `RESOURCE_CHECK_BROKEN` error like the other three — see
58
+ * {@link noCheckRanFinding}, and `RUN_INTEGRITY_CODE` for why one code
59
+ * covers all four. Declaring no checks is a legitimate CHOICE; running a gate
60
+ * that can only pass is not, so the remedy is to take the command out of the
61
+ * pipeline.
62
+ *
50
63
  * ## 🔑 SQL is the surface a user OPTED IN to, so no BUILT-IN check may be SQL
51
64
  *
52
65
  * Every check this verb runs is adopter-declared: {@link checkCommand} reads
@@ -250,6 +263,11 @@ export interface CheckPayloadInput extends CheckOutcome {
250
263
  * sum to `durationSecs`. The population is paid once and shared by every check;
251
264
  * see {@link CheckCost} for why it is charged to none of them.
252
265
  *
266
+ * 🔑 A denominator of zero is refused HERE rather than published — see
267
+ * {@link noCheckRanFinding}. This is the one function every lane's document
268
+ * passes through, so deriving the refusal in it is what makes "checked nothing,
269
+ * status clean" unrepresentable rather than merely unwritten.
270
+ *
253
271
  * @param input - The findings and the provenance of the run behind them
254
272
  * @returns The document to serialize
255
273
  */
@@ -302,9 +320,11 @@ export declare function requireDeclaredCheck(checks: Readonly<Record<string, Res
302
320
  * as the "no checks are declared" warning in {@link checkCommand}.
303
321
  *
304
322
  * 📌 The registry half of the key space needs no equivalent: a misspelled
305
- * REGISTRY code is already refused by `SeverityOverrideCodeSchema`'s enum
306
- * branch. Only the open `CUSTOM:` namespace can name something that does not
307
- * exist.
323
+ * REGISTRY code is already refused by `SeverityOverrideCodeSchema`, whose
324
+ * `SEVERITY_KEY_PATTERN` alternates every registry code name with the `CUSTOM:`
325
+ * namespace — so a key has to BE one of the shipped codes to match that half.
326
+ * Only the open `CUSTOM:` half can name something that does not exist, because
327
+ * only it matches on shape rather than on identity.
308
328
  *
309
329
  * @param checks - The project's `resources.checks`
310
330
  * @param validation - The project's `resources.validation`, or undefined
@@ -446,7 +466,16 @@ export declare function runDeclaredChecks(options: {
446
466
  * bound enforced from outside itself, and a hang becomes a bounded failure
447
467
  * instead of a job that burns its runner minutes and reports nothing.
448
468
  *
449
- * @param pathArg - The corpus root, or omitted for the current directory
469
+ * ## `[path]` locates the project; a `WHERE` clause is the only scope a check has
470
+ *
471
+ * Same contract as `vat resources query`, for the same reason (see
472
+ * `queryCommand`): the projection is the whole tracked tree, so the argument is
473
+ * where root discovery starts and nothing more. A locator that names no
474
+ * directory is refused HERE, before the fork below — the parent would otherwise
475
+ * resolve it silently to the cwd's project and spawn a child to run every check
476
+ * over a tree the operator did not name, at exit 0.
477
+ *
478
+ * @param pathArg - Where to look for the project, or omitted for the current directory
450
479
  * @param options - Parsed command-line options
451
480
  */
452
481
  export declare function checkCommand(pathArg: string | undefined, options: CheckOptions): Promise<void>;