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

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 (211) hide show
  1. package/dist/bin/vat +68 -16
  2. package/dist/bin/vat.js +68 -16
  3. package/dist/bin/vat.js.map +1 -1
  4. package/dist/bin.js +157 -37
  5. package/dist/bin.js.map +1 -1
  6. package/dist/command-loaders.d.ts +44 -0
  7. package/dist/command-loaders.d.ts.map +1 -0
  8. package/dist/command-loaders.js +58 -0
  9. package/dist/command-loaders.js.map +1 -0
  10. package/dist/commands/agent/index.js +1 -1
  11. package/dist/commands/agent/install.d.ts.map +1 -1
  12. package/dist/commands/agent/install.js +46 -5
  13. package/dist/commands/agent/install.js.map +1 -1
  14. package/dist/commands/audit/distributed-tree.d.ts +2 -2
  15. package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
  16. package/dist/commands/audit/distributed-tree.js +2 -1
  17. package/dist/commands/audit/distributed-tree.js.map +1 -1
  18. package/dist/commands/audit/git-url-clone.d.ts +1 -1
  19. package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
  20. package/dist/commands/audit/git-url-clone.js.map +1 -1
  21. package/dist/commands/audit/hierarchical-output.d.ts +1 -1
  22. package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
  23. package/dist/commands/audit/hierarchical-output.js +1 -1
  24. package/dist/commands/audit/hierarchical-output.js.map +1 -1
  25. package/dist/commands/audit.d.ts +22 -1
  26. package/dist/commands/audit.d.ts.map +1 -1
  27. package/dist/commands/audit.js +224 -24
  28. package/dist/commands/audit.js.map +1 -1
  29. package/dist/commands/build.d.ts +1 -1
  30. package/dist/commands/build.d.ts.map +1 -1
  31. package/dist/commands/build.js +15 -12
  32. package/dist/commands/build.js.map +1 -1
  33. package/dist/commands/cache/cache-control.d.ts +82 -0
  34. package/dist/commands/cache/cache-control.d.ts.map +1 -0
  35. package/dist/commands/cache/cache-control.js +86 -0
  36. package/dist/commands/cache/cache-control.js.map +1 -0
  37. package/dist/commands/cache/clear.d.ts +17 -3
  38. package/dist/commands/cache/clear.d.ts.map +1 -1
  39. package/dist/commands/cache/clear.js +68 -3
  40. package/dist/commands/cache/clear.js.map +1 -1
  41. package/dist/commands/cache/index.d.ts +13 -63
  42. package/dist/commands/cache/index.d.ts.map +1 -1
  43. package/dist/commands/cache/index.js +38 -79
  44. package/dist/commands/cache/index.js.map +1 -1
  45. package/dist/commands/claude/budget.d.ts +157 -0
  46. package/dist/commands/claude/budget.d.ts.map +1 -0
  47. package/dist/commands/claude/budget.js +412 -0
  48. package/dist/commands/claude/budget.js.map +1 -0
  49. package/dist/commands/claude/context.d.ts +340 -0
  50. package/dist/commands/claude/context.d.ts.map +1 -0
  51. package/dist/commands/claude/context.js +1079 -0
  52. package/dist/commands/claude/context.js.map +1 -0
  53. package/dist/commands/claude/index.d.ts +13 -0
  54. package/dist/commands/claude/index.d.ts.map +1 -1
  55. package/dist/commands/claude/index.js +24 -2
  56. package/dist/commands/claude/index.js.map +1 -1
  57. package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
  58. package/dist/commands/claude/marketplace/git-publish.js +18 -19
  59. package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
  60. package/dist/commands/claude/marketplace/validate.d.ts +19 -1
  61. package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
  62. package/dist/commands/claude/marketplace/validate.js +41 -21
  63. package/dist/commands/claude/marketplace/validate.js.map +1 -1
  64. package/dist/commands/claude/plugin/build.d.ts +18 -2
  65. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  66. package/dist/commands/claude/plugin/build.js +55 -18
  67. package/dist/commands/claude/plugin/build.js.map +1 -1
  68. package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
  69. package/dist/commands/claude/plugin/helpers.js +2 -1
  70. package/dist/commands/claude/plugin/helpers.js.map +1 -1
  71. package/dist/commands/claude/plugin/install.d.ts.map +1 -1
  72. package/dist/commands/claude/plugin/install.js +24 -3
  73. package/dist/commands/claude/plugin/install.js.map +1 -1
  74. package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
  75. package/dist/commands/claude/plugin/tree-copy.js +2 -1
  76. package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
  77. package/dist/commands/consistency-check.d.ts.map +1 -1
  78. package/dist/commands/consistency-check.js +4 -3
  79. package/dist/commands/consistency-check.js.map +1 -1
  80. package/dist/commands/corpus/report.d.ts +1 -1
  81. package/dist/commands/corpus/report.d.ts.map +1 -1
  82. package/dist/commands/corpus/runner.d.ts.map +1 -1
  83. package/dist/commands/corpus/runner.js +3 -2
  84. package/dist/commands/corpus/runner.js.map +1 -1
  85. package/dist/commands/corpus/scan.d.ts.map +1 -1
  86. package/dist/commands/corpus/scan.js +18 -8
  87. package/dist/commands/corpus/scan.js.map +1 -1
  88. package/dist/commands/doctor.d.ts +36 -0
  89. package/dist/commands/doctor.d.ts.map +1 -1
  90. package/dist/commands/doctor.js +99 -2
  91. package/dist/commands/doctor.js.map +1 -1
  92. package/dist/commands/inventory.d.ts +13 -1
  93. package/dist/commands/inventory.d.ts.map +1 -1
  94. package/dist/commands/inventory.js +118 -13
  95. package/dist/commands/inventory.js.map +1 -1
  96. package/dist/commands/mcp/collections.d.ts +1 -1
  97. package/dist/commands/mcp/collections.d.ts.map +1 -1
  98. package/dist/commands/phase-utils.d.ts +155 -104
  99. package/dist/commands/phase-utils.d.ts.map +1 -1
  100. package/dist/commands/phase-utils.js +109 -155
  101. package/dist/commands/phase-utils.js.map +1 -1
  102. package/dist/commands/rag/index-command.d.ts +39 -0
  103. package/dist/commands/rag/index-command.d.ts.map +1 -1
  104. package/dist/commands/rag/index-command.js +28 -2
  105. package/dist/commands/rag/index-command.js.map +1 -1
  106. package/dist/commands/rag/index.d.ts.map +1 -1
  107. package/dist/commands/rag/index.js +21 -10
  108. package/dist/commands/rag/index.js.map +1 -1
  109. package/dist/commands/resources/index.d.ts.map +1 -1
  110. package/dist/commands/resources/index.js +10 -2
  111. package/dist/commands/resources/index.js.map +1 -1
  112. package/dist/commands/resources/scan.d.ts +24 -0
  113. package/dist/commands/resources/scan.d.ts.map +1 -1
  114. package/dist/commands/resources/scan.js +19 -6
  115. package/dist/commands/resources/scan.js.map +1 -1
  116. package/dist/commands/resources/validate.d.ts +12 -1
  117. package/dist/commands/resources/validate.d.ts.map +1 -1
  118. package/dist/commands/resources/validate.js +102 -51
  119. package/dist/commands/resources/validate.js.map +1 -1
  120. package/dist/commands/skill/review-checklist.d.ts.map +1 -1
  121. package/dist/commands/skill/review-checklist.js +1 -0
  122. package/dist/commands/skill/review-checklist.js.map +1 -1
  123. package/dist/commands/skill/review.js +2 -2
  124. package/dist/commands/skill/review.js.map +1 -1
  125. package/dist/commands/skill/test/configure.d.ts +19 -0
  126. package/dist/commands/skill/test/configure.d.ts.map +1 -1
  127. package/dist/commands/skill/test/configure.js +18 -3
  128. package/dist/commands/skill/test/configure.js.map +1 -1
  129. package/dist/commands/skill/test/run.d.ts +51 -4
  130. package/dist/commands/skill/test/run.d.ts.map +1 -1
  131. package/dist/commands/skill/test/run.js +123 -12
  132. package/dist/commands/skill/test/run.js.map +1 -1
  133. package/dist/commands/skills/build.d.ts +11 -1
  134. package/dist/commands/skills/build.d.ts.map +1 -1
  135. package/dist/commands/skills/build.js +154 -61
  136. package/dist/commands/skills/build.js.map +1 -1
  137. package/dist/commands/skills/package.d.ts +1 -1
  138. package/dist/commands/skills/package.d.ts.map +1 -1
  139. package/dist/commands/skills/package.js.map +1 -1
  140. package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
  141. package/dist/commands/skills/skill-discovery.js +2 -1
  142. package/dist/commands/skills/skill-discovery.js.map +1 -1
  143. package/dist/commands/skills/validate.d.ts +79 -2
  144. package/dist/commands/skills/validate.d.ts.map +1 -1
  145. package/dist/commands/skills/validate.js +101 -48
  146. package/dist/commands/skills/validate.js.map +1 -1
  147. package/dist/commands/validate.d.ts.map +1 -1
  148. package/dist/commands/validate.js +26 -16
  149. package/dist/commands/validate.js.map +1 -1
  150. package/dist/commands/verify.d.ts +11 -10
  151. package/dist/commands/verify.d.ts.map +1 -1
  152. package/dist/commands/verify.js +49 -38
  153. package/dist/commands/verify.js.map +1 -1
  154. package/dist/utils/command-error.d.ts +33 -2
  155. package/dist/utils/command-error.d.ts.map +1 -1
  156. package/dist/utils/command-error.js +34 -10
  157. package/dist/utils/command-error.js.map +1 -1
  158. package/dist/utils/config-loader.d.ts.map +1 -1
  159. package/dist/utils/config-loader.js +7 -1
  160. package/dist/utils/config-loader.js.map +1 -1
  161. package/dist/utils/context-budget-issues.d.ts +108 -0
  162. package/dist/utils/context-budget-issues.d.ts.map +1 -0
  163. package/dist/utils/context-budget-issues.js +280 -0
  164. package/dist/utils/context-budget-issues.js.map +1 -0
  165. package/dist/utils/corpus-target.d.ts +48 -0
  166. package/dist/utils/corpus-target.d.ts.map +1 -0
  167. package/dist/utils/corpus-target.js +61 -0
  168. package/dist/utils/corpus-target.js.map +1 -0
  169. package/dist/utils/issue-anchor.d.ts +2 -2
  170. package/dist/utils/issue-anchor.d.ts.map +1 -1
  171. package/dist/utils/issue-anchor.js +1 -1
  172. package/dist/utils/issue-rendering.d.ts +1 -1
  173. package/dist/utils/issue-rendering.d.ts.map +1 -1
  174. package/dist/utils/issue-rendering.js +1 -1
  175. package/dist/utils/issue-rendering.js.map +1 -1
  176. package/dist/utils/issue-severity.d.ts +1 -1
  177. package/dist/utils/issue-severity.d.ts.map +1 -1
  178. package/dist/utils/issue-severity.js +1 -1
  179. package/dist/utils/issue-severity.js.map +1 -1
  180. package/dist/utils/optional-backend.d.ts +77 -0
  181. package/dist/utils/optional-backend.d.ts.map +1 -0
  182. package/dist/utils/optional-backend.js +115 -0
  183. package/dist/utils/optional-backend.js.map +1 -0
  184. package/dist/utils/output.d.ts +17 -0
  185. package/dist/utils/output.d.ts.map +1 -1
  186. package/dist/utils/output.js +19 -0
  187. package/dist/utils/output.js.map +1 -1
  188. package/dist/utils/population-wiring.d.ts +100 -0
  189. package/dist/utils/population-wiring.d.ts.map +1 -0
  190. package/dist/utils/population-wiring.js +98 -0
  191. package/dist/utils/population-wiring.js.map +1 -0
  192. package/dist/utils/projection-store.d.ts +188 -0
  193. package/dist/utils/projection-store.d.ts.map +1 -0
  194. package/dist/utils/projection-store.js +257 -0
  195. package/dist/utils/projection-store.js.map +1 -0
  196. package/dist/utils/resource-loader.d.ts +128 -2
  197. package/dist/utils/resource-loader.d.ts.map +1 -1
  198. package/dist/utils/resource-loader.js +234 -7
  199. package/dist/utils/resource-loader.js.map +1 -1
  200. package/dist/utils/verdict-helpers.d.ts +1 -1
  201. package/dist/utils/verdict-helpers.d.ts.map +1 -1
  202. package/dist/utils/verdict-helpers.js +1 -1
  203. package/dist/utils/verdict-helpers.js.map +1 -1
  204. package/docs/agent.md +2 -2
  205. package/docs/mcp.md +2 -2
  206. package/docs/resources.md +8 -1
  207. package/package.json +15 -12
  208. package/dist/commands/resources/command-helpers.d.ts +0 -5
  209. package/dist/commands/resources/command-helpers.d.ts.map +0 -1
  210. package/dist/commands/resources/command-helpers.js +0 -6
  211. package/dist/commands/resources/command-helpers.js.map +0 -1
@@ -1,10 +1,12 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { serializeInventory, serializeInventoryShallow, } from '@vibe-agent-toolkit/agent-skills';
3
- import { crawlSkillLinkRegistry, extractClaudeInstallInventory, extractClaudeMarketplaceInventory, extractClaudePluginInventory, extractClaudeSkillInventory, getClaudeUserPaths, } from '@vibe-agent-toolkit/claude-marketplace';
3
+ import { buildInventoryPopulation, crawlSkillLinkRegistry, extractClaudeInstallInventory, extractClaudeMarketplaceInventory, extractClaudePluginInventory, extractClaudeSkillInventory, getClaudeUserPaths, projectionCrawlSelected, } from '@vibe-agent-toolkit/claude-marketplace';
4
4
  import { findProjectRoot, safePath } from '@vibe-agent-toolkit/utils';
5
5
  import { Command } from 'commander';
6
6
  import { handleCommandError } from '../utils/command-error.js';
7
7
  import { createLogger } from '../utils/logger.js';
8
+ import { populationWiring } from '../utils/population-wiring.js';
9
+ import { withPopulationCache } from '../utils/projection-store.js';
8
10
  import { gitTrackerForProjectRoot } from './audit/distributed-tree.js';
9
11
  /**
10
12
  * Create and configure the `vat inventory` command.
@@ -27,7 +29,6 @@ Description:
27
29
  detectors — pure structural enumeration.
28
30
 
29
31
  Output:
30
- - schema: vat.inventory/v1alpha
31
32
  - kind: marketplace | plugin | skill | install
32
33
  - vendor: claude-code
33
34
  - declared / discovered / references / unexpected (per kind)
@@ -49,7 +50,7 @@ export async function inventoryCommand(pathArg, options) {
49
50
  const logger = createLogger(options.debug === true ? { debug: true } : {});
50
51
  const startTime = Date.now();
51
52
  try {
52
- const inv = await routeInventory(pathArg, options);
53
+ const inv = await routeInventory(pathArg, options, logger);
53
54
  const format = options.format ?? 'yaml';
54
55
  const out = options.shallow === true
55
56
  ? serializeInventoryShallow(inv, format)
@@ -61,9 +62,28 @@ export async function inventoryCommand(pathArg, options) {
61
62
  handleCommandError(error, logger, startTime, 'Inventory');
62
63
  }
63
64
  }
64
- export async function routeInventory(pathArg, options) {
65
+ /**
66
+ * Dispatch to the extractor the subject's shape calls for.
67
+ *
68
+ * @param pathArg - The path argument, or undefined under `--user` / `--system`
69
+ * @param options - The command's flags
70
+ * @param logger - Where diagnostics go. Defaults to a REPORTING logger, never a
71
+ * silent one: the default has to be the loud behaviour, or a caller acquires
72
+ * silence by leaving an argument off — which is the exact defect the blob
73
+ * stage's refusal counts were lost to in the first place
74
+ * @returns The extracted inventory
75
+ */
76
+ export async function routeInventory(pathArg, options, logger = createLogger()) {
65
77
  if (options.user === true) {
66
- return extractClaudeInstallInventory(getClaudeUserPaths());
78
+ // The tracker source is REQUIRED here now, and this is the lane it matters
79
+ // most on: `--user` walks every cached plugin under ~/.claude/plugins/cache,
80
+ // and until 2026-08-15 every one of those skills answered its gitignore
81
+ // questions with a `git check-ignore` spawn per link target because the
82
+ // obligation stopped at `extract-plugin.ts`.
83
+ return extractClaudeInstallInventory({
84
+ pathsOrRoot: getClaudeUserPaths(),
85
+ gitTrackerSource: gitTrackerForProjectRoot,
86
+ });
67
87
  }
68
88
  if (options.system === true) {
69
89
  throw new Error('--system inventory is not implemented in this version');
@@ -80,8 +100,10 @@ export async function routeInventory(pathArg, options) {
80
100
  //
81
101
  // A git-tracker source IS worth handing over even for one skill: the saving is per
82
102
  // LINK TARGET, not per skill. One `git ls-files` replaces one `git check-ignore`
83
- // spawn for every distinct target this skill's link graph reaches.
84
- return extractClaudeSkillInventory(absolute, undefined, gitTrackerForProjectRoot);
103
+ // spawn for every distinct target this skill's link graph reaches. It is also not
104
+ // optional to hand over: the extractor requires a source, so a lane that wanted
105
+ // none would have to say `NO_GIT_TRACKER` out loud.
106
+ return extractClaudeSkillInventory(absolute, { gitTrackerSource: gitTrackerForProjectRoot });
85
107
  }
86
108
  const claudePluginDir = safePath.join(absolute, '.claude-plugin');
87
109
  // eslint-disable-next-line security/detect-non-literal-fs-filename -- absolute is caller-resolved, used for presence check only
@@ -92,17 +114,100 @@ export async function routeInventory(pathArg, options) {
92
114
  // When both are present, the plugin extractor takes precedence (plugin is installed,
93
115
  // marketplace.json is a cached metadata artifact alongside it).
94
116
  if (hasMarketplace && !hasPlugin) {
95
- // No shared registry here: `extractClaudeMarketplaceInventory` (like
96
- // `extractClaudeInstallInventory` above) takes no `sharedRegistry` parameter,
97
- // so every plugin it fans out to still re-crawls. Threading one through those
98
- // two extractors is a claude-marketplace change, not a CLI one.
99
- return extractClaudeMarketplaceInventory(absolute);
117
+ // A tracker source but deliberately NO shared registry: that extractor accepts
118
+ // only the former, because a marketplace fans out to plugins that each sit in
119
+ // their own directory, so one registry matches none of their skills' project
120
+ // roots and was measured 1.5x SLOWER than the N+1 crawl. The tracker source is
121
+ // the opposite case — asked per skill about its own root, `undefined` where it
122
+ // cannot serve — so it costs nothing where it does not apply.
123
+ //
124
+ // ⚠️ NO shared POPULATION either, and that is the same decision rather than an
125
+ // oversight: a population is rooted, and `membersOf` refuses any root that is not
126
+ // the one the extractor derives per skill. Rooted at the marketplace it would
127
+ // match no skill and answer nothing; rooted per plugin it is not shared. So this
128
+ // subject shape keeps the walk, and **the flip is plugin-directory-only** — as are
129
+ // the `--user` and single-`SKILL.md` lanes above, for the same rootedness reason.
130
+ // Measured 2026-08-15 on three real marketplace roots (35/51/29 skills): both arms
131
+ // filed only the walker's `crawl` stratum, no `base`/`closure`, so their identical
132
+ // output is the two arms agreeing about ONE lane, not evidence about the flip.
133
+ return extractClaudeMarketplaceInventory(absolute, {
134
+ gitTrackerSource: gitTrackerForProjectRoot,
135
+ });
100
136
  }
101
137
  // Lazy, not eager: the extractor calls this only when it is about to walk its first
102
138
  // skill, so a plugin of commands/ and agents/ alone crawls nothing. The tracker source
103
139
  // is unconditional — it is asked per skill, about that skill's own root, and answers
104
140
  // `undefined` for any root it cannot serve.
105
- return extractClaudePluginInventory(absolute, linkRegistryProviderFor(absolute), gitTrackerForProjectRoot);
141
+ const sharedRegistry = linkRegistryProviderFor(absolute);
142
+ // Root discovery at the CLI boundary, once, and then handed down — both the
143
+ // population provider and the store key are rooted, and deriving the root
144
+ // twice is how two rules drift into disagreeing about which corpus this is.
145
+ const projectRoot = findProjectRoot(absolute);
146
+ // The store scopes the whole extraction, not the provider call: the extractor
147
+ // MEMOIZES `sharedPopulation` and reaches it when it is about to walk its
148
+ // first skill, which is after this frame would otherwise have closed it.
149
+ return withPopulationCache({ root: projectRoot ?? absolute }, async (cache) => {
150
+ const sharedPopulation = populationProviderFor(projectRoot, cache, logger);
151
+ return extractClaudePluginInventory(absolute, {
152
+ ...(sharedRegistry !== undefined && { sharedRegistry }),
153
+ ...(sharedPopulation !== undefined && { sharedPopulation }),
154
+ gitTrackerSource: gitTrackerForProjectRoot,
155
+ });
156
+ });
157
+ }
158
+ /**
159
+ * The projection-backed membership lane — **now the default for this command** —
160
+ * or `undefined` to fall back to the incumbent link walk.
161
+ *
162
+ * Gated on two things, in this order:
163
+ *
164
+ * 1. **Not `VAT_INVENTORY_CRAWL=walker`.** The projection answers this command's
165
+ * membership question unless a caller asks for the walk back. It shipped the
166
+ * other way round, gated off, while it was a second implementation being
167
+ * measured against the first; it is now the implementation, with the walk kept
168
+ * reachable as an escape hatch and as the lab's B arm. ⚠️ It is ~5.3× slower on
169
+ * a real adopter and that was a deliberate, accepted trade — see
170
+ * {@link projectionCrawlSelected} for the measurement and for why neither half
171
+ * of the cost can be trimmed without changing the answer.
172
+ * 2. **A discoverable project root**, exactly as {@link linkRegistryProviderFor}
173
+ * requires and for the identical reason: membership is resolved relative to a
174
+ * root, and where `findProjectRoot` finds none the extractor falls back to each
175
+ * skill's OWN directory — so one population rooted at the plugin would answer a
176
+ * different question for every skill. No root, no provider.
177
+ *
178
+ * Root discovery belongs at this CLI boundary; this function takes the root the
179
+ * caller already discovered rather than discovering a second one.
180
+ *
181
+ * The tracker is resolved here too, and its absence is not cosmetic: with no
182
+ * tracker `resource_realizations.gitignored` is `false` on every row, and the
183
+ * declaration correspondingly drops its gitignore refusal rather than claiming a
184
+ * branch that cannot run.
185
+ *
186
+ * @param projectRoot - The discovered project root, or `null` when there is none
187
+ * @param cache - The run's projection store, or `undefined` to re-derive. A
188
+ * SEPARATE selector from the one above: which crawler answers membership and
189
+ * whether the answer is cached are independent choices, and conflating them
190
+ * would make the cache unmeasurable against the lane it is supposed to speed up
191
+ * @param logger - Where the blob stage's refusals are reported. stderr, never
192
+ * stdout: this command's stdout is the YAML document a caller parses, and a
193
+ * diagnostic in the middle of it would break every consumer
194
+ * @returns A population source, or `undefined` to use the walk
195
+ */
196
+ function populationProviderFor(projectRoot, cache, logger) {
197
+ if (!projectionCrawlSelected())
198
+ return undefined;
199
+ if (projectRoot === null)
200
+ return undefined;
201
+ return async (skillMdPaths) => {
202
+ const gitTracker = await gitTrackerForProjectRoot(projectRoot);
203
+ return buildInventoryPopulation({
204
+ root: projectRoot,
205
+ skillMdPaths,
206
+ // The observer this lane went without — see `populationWiring` for why
207
+ // the reporting half is written once rather than per lane.
208
+ ...populationWiring(logger, gitTracker, cache, projectRoot),
209
+ });
210
+ };
106
211
  }
107
212
  /**
108
213
  * A way to obtain the ONE markdown registry every skill under `subjectDir` link-walks
@@ -1 +1 @@
1
- {"version":3,"file":"inventory.js","sourceRoot":"","sources":["../../src/commands/inventory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EACN,kBAAkB,EAClB,yBAAyB,GAEzB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACN,sBAAsB,EACtB,6BAA6B,EAC7B,iCAAiC,EACjC,4BAA4B,EAC5B,2BAA2B,EAC3B,kBAAkB,GAClB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAUvE;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACrC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IACzC,OAAO;SACL,WAAW,CAAC,+EAA+E,CAAC;SAC5F,QAAQ,CAAC,QAAQ,EAAE,2CAA2C,CAAC;SAC/D,MAAM,CAAC,QAAQ,EAAE,6DAA6D,CAAC;SAC/E,MAAM,CAAC,UAAU,EAAE,2CAA2C,CAAC;SAC/D,MAAM,CAAC,sBAAsB,EAAE,eAAe,EAAE,MAAM,CAAC;SACvD,MAAM,CAAC,WAAW,EAAE,sCAAsC,CAAC;SAC3D,MAAM,CAAC,SAAS,EAAE,2BAA2B,CAAC;SAC9C,MAAM,CAAC,gBAAgB,CAAC;SACxB,WAAW,CAAC,OAA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c;IAEd,IAAI,CAAC,uBAAuB,EAAE;QAAE,OAAO,SAAS,CAAC;IACjD,IAAI,WAAW,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,EAAE;QAC7B,MAAM,UAAU,GAAG,MAAM,wBAAwB,CAAC,WAAW,CAAC,CAAC;QAC/D,OAAO,wBAAwB,CAAC;YAC/B,IAAI,EAAE,WAAW;YACjB,YAAY;YACZ,uEAAuE;YACvE,2DAA2D;YAC3D,GAAG,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC;SAC3D,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAS,uBAAuB,CAC/B,UAAkB;IAElB,MAAM,WAAW,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAChD,IAAI,WAAW,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC3C,OAAO,GAAG,EAAE,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC;AAClD,CAAC"}
@@ -9,7 +9,7 @@
9
9
  * Phase 1: Dynamic loading from npm packages or file paths
10
10
  * Phase 2+: Global discovery registry
11
11
  */
12
- import type { Agent, OneShotAgentOutput } from '@vibe-agent-toolkit/agent-schema';
12
+ import type { Agent, OneShotAgentOutput } from '@vibe-agent-toolkit/schema';
13
13
  export interface AgentRegistration {
14
14
  name: string;
15
15
  agent: Agent<unknown, OneShotAgentOutput<unknown, string>>;
@@ -1 +1 @@
1
- {"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../../src/commands/mcp/collections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAElF,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC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,iBAAiB,CAAC,EAAE,eAAe,CAAC;IACpC,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CASvF;AA+HD;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAOhF"}
@@ -1,12 +1,54 @@
1
1
  /**
2
2
  * Shared utilities for top-level phase orchestration commands (vat build, vat verify, vat validate).
3
3
  */
4
- import { type SeverityCounts } from '@vibe-agent-toolkit/agent-schema';
4
+ import { type SeverityCounts } from '@vibe-agent-toolkit/schema';
5
5
  import { type Command } from 'commander';
6
6
  import { createLogger } from '../utils/logger.js';
7
+ /**
8
+ * What one phase produced: the document it publishes, and the exit code it
9
+ * claims for itself.
10
+ *
11
+ * This pair is the whole of what an orchestrator needs from a phase: an exit
12
+ * code, and the document the phase publishes. Naming it as a value is what lets
13
+ * a phase run in the orchestrator's own process — stderr streams directly either
14
+ * way, so nothing else has to cross.
15
+ *
16
+ * `document` is the object the phase PRINTS, not the internal summary it is
17
+ * built from. The distinction is load-bearing: `vat skills build` renders its
18
+ * summary in two pieces and publishes `skillsWithErrors` as a COUNT while the
19
+ * summary object holds an ARRAY under that name.
20
+ *
21
+ * ⚠️ This field is `unknown`, so nothing typechecks it. Handing back the summary
22
+ * object instead of the printed document changes the emitted contract silently.
23
+ */
24
+ export interface PhaseOutcome {
25
+ document: unknown;
26
+ exitCode: number;
27
+ /**
28
+ * The phase failed UNEXPECTEDLY, so `document` is the shared error envelope
29
+ * (`{status, error, duration}`) rather than the command's own report.
30
+ *
31
+ * The orchestrated lane does not need this — it folds any document under
32
+ * `phases[].report` the same way. The command-line lane does: each command
33
+ * renders its own report with its own renderer (streamed YAML, `--format
34
+ * json`, a hand-built header), and none of those renderers understand an
35
+ * envelope. Handing one to them silently changes both the channel and the
36
+ * shape of the failure document every `vat … | jq` consumer depends on.
37
+ */
38
+ failed?: boolean;
39
+ }
40
+ /**
41
+ * One orchestrated phase: a name, and the work to run for it.
42
+ *
43
+ * `run` is a bound closure rather than an argv array because the phase executes
44
+ * in this process. An argv array would mean re-entering Commander to
45
+ * parse arguments this process has already parsed — a second, weaker copy of the
46
+ * orchestrator's own options, and the exact seam through which `vat validate`'s
47
+ * `--verbose` could be forwarded to one phase and dropped by another.
48
+ */
7
49
  export interface Phase {
8
50
  name: string;
9
- args: string[];
51
+ run: () => Promise<PhaseOutcome>;
10
52
  }
11
53
  /**
12
54
  * Declare `--only` on a command that has RETIRED it, solely so the command can
@@ -44,16 +86,18 @@ export declare function rejectRetiredOnly(only: string | undefined, command: str
44
86
  * Outcome of one orchestrated phase.
45
87
  *
46
88
  * `system-error` is a value of its own because **a phase that could not RUN is
47
- * not a phase that found problems.** Collapsing it into `error` (which is what
48
- * `result.status === 0 ? 'passed' : 'failed'` did) made the documented exit
49
- * code 2 unreachable from every orchestrator, so a CI script could not tell an
50
- * invalid config or a killed child from a broken link.
89
+ * not a phase that found problems.**
90
+ *
91
+ * ⚠️ Any two-valued mapping — `status === 0 ? 'passed' : 'failed'` and its
92
+ * relatives — collapses it into `error` and makes the documented exit code 2
93
+ * unreachable from every orchestrator, leaving a CI script unable to tell an
94
+ * invalid config from a broken link.
51
95
  *
52
- * `warning` reaches a subprocess phase through the child's own reported
53
- * `status`, NOT through its exit code — `vat skills validate` exits 0 while
54
- * reporting `status: warning`, so an exit-code-only mapping answered `success`
55
- * on the very tree where the child said otherwise. In-process phases (e.g.
56
- * verify's consistency check) emit it directly.
96
+ * `warning` reaches a phase through its own reported `status`, NOT through its
97
+ * exit code — `vat skills validate` exits 0 while reporting `status: warning`,
98
+ * so an exit-code-only mapping answered `success` on the very tree where the
99
+ * phase said otherwise. Phases that hold their own findings (e.g. verify's
100
+ * consistency check) emit it directly.
57
101
  */
58
102
  export type PhaseStatus = 'success' | 'warning' | 'error' | 'system-error';
59
103
  /** The phase outcome for "we did not learn what this phase would have said". */
@@ -61,58 +105,44 @@ export declare const SYSTEM_ERROR: PhaseStatus;
61
105
  export interface PhaseResult {
62
106
  name: string;
63
107
  status: PhaseStatus;
64
- /** Child exit code, when the child ran and exited on its own. */
108
+ /** The exit code the phase claimed for itself. */
65
109
  exitCode?: number;
66
- /** POSIX signal that killed the child, when one did (then `exitCode` is absent). */
67
- signal?: string;
68
- /** Why the phase could not run at all (the spawn itself failed). */
110
+ /** Why the phase could not run at all (it threw past its own error handling). */
69
111
  error?: string;
70
112
  /**
71
- * Per-severity distribution for in-process phases that hold their own
72
- * findings. Absent for subprocess phases: the child owns its own findings,
73
- * and inventing counts here would be a second, weaker answer — the child's
74
- * are carried verbatim in {@link PhaseResult.report} instead.
113
+ * Per-severity distribution for phases that hold their own findings and
114
+ * publish no document of their own. Absent for phases that DO publish one:
115
+ * those own their findings, and inventing counts here would be a second,
116
+ * weaker answer — theirs are carried verbatim in {@link PhaseResult.report}.
75
117
  */
76
118
  issueCounts?: SeverityCounts;
77
119
  /**
78
- * The child's own YAML document, parsed and folded in.
120
+ * The phase's own document, folded in under its name.
79
121
  *
80
- * The child used to write this straight onto the parent's stdout (`stdio:
81
- * 'inherit'`), which concatenated N documents with no `---` between them: two
82
- * phases produced one map carrying `status:` and `durationSecs:` twice, and
83
- * `YAML.parse()` threw "Map keys must be unique". Nesting each child's
84
- * document under its own phase makes the parent's stdout one parseable
85
- * document again and loses nothing.
122
+ * Nested under the phase's own entry so the orchestrator's stdout stays ONE
123
+ * parseable document.
124
+ *
125
+ * ⚠️ Phase documents written onto a shared stdout concatenate with no `---`
126
+ * between them: two phases each carrying `status:` and `durationSecs:` become
127
+ * a single map with duplicate keys, and `YAML.parse()` throws "Map keys must
128
+ * be unique".
86
129
  */
87
130
  report?: unknown;
88
131
  }
89
- /** The subset of a `spawnSync` return that decides a phase's outcome. */
90
- export interface PhaseSpawnOutcome {
91
- status: number | null;
92
- signal: NodeJS.Signals | null;
93
- error?: Error | undefined;
94
- /** The child's captured stdout, when it was piped rather than inherited. */
95
- stdout?: string | null | undefined;
96
- }
97
- /**
98
- * Resolve the absolute path to the vat binary.
99
- * This file lives in commands/, one level above bin/.
100
- */
101
- export declare function resolveBinPath(): string;
102
132
  export interface PhaseContext {
103
133
  logger: ReturnType<typeof createLogger>;
104
134
  startTime: number;
105
- binPath: string;
106
135
  }
107
136
  /**
108
137
  * Create the shared phase command context: logger, startTime, and bin path.
109
138
  *
110
- * It used to THROW when the phase list came out empty — and it was called
111
- * before the command's try block, so an unroutable `--only` reached the user as
112
- * a raw Node stack trace with zero bytes of stdout and an exit 1 that looked
113
- * like "validation errors". `--only` routing is decided by
114
- * {@link decidePhaseSelection} and reported by {@link applyPhaseSelection} now,
115
- * which emit the command's normal structured document.
139
+ * Total by design: it builds the context and decides nothing.
140
+ *
141
+ * ⚠️ This runs BEFORE the command's try block, so anything that throws here
142
+ * reaches the user as a raw Node stack trace with zero bytes of stdout and an
143
+ * exit 1 indistinguishable from "validation errors". Phase routing therefore
144
+ * belongs to {@link decidePhaseSelection} and {@link applyPhaseSelection}, which
145
+ * emit the command's normal structured document.
116
146
  */
117
147
  export declare function createPhaseContext(debugFlag: boolean | undefined): PhaseContext;
118
148
  /**
@@ -156,30 +186,26 @@ export interface PhaseVocabulary {
156
186
  * Decide what an orchestrator should do with its `--only` value and the phase
157
187
  * list its config produced.
158
188
  *
159
- * Shared by all three orchestrators because they used to disagree: `vat verify`
160
- * built its phase list without consulting the config at all, so `vat verify
161
- * --only skills` in a project with no `skills:` block exited 0 while `vat
162
- * validate --only skills` on the same project exited 1 — opposite verdicts on
163
- * the same question. (`vat verify` has since retired `--only` entirely and now
164
- * always passes `only: undefined`; `vat validate` and `vat build` still route
165
- * their own `--only` through here.)
189
+ * THE single decision site for all three orchestrators, so they cannot answer
190
+ * the same question differently. An orchestrator that builds its phase list
191
+ * without consulting the config exits 0 on `--only skills` in a project with no
192
+ * `skills:` block while another exits 1 — opposite verdicts on one question.
193
+ * `vat verify` has retired `--only` and always passes `only: undefined`;
194
+ * `vat validate` and `vat build` route their own `--only` through here.
166
195
  *
167
- * There used to be a third option, `emptyIsValid`, which existed solely so
168
- * `vat verify --only consistency` could run with an empty SUBPROCESS list
169
- * (consistency runs in-process). It was checked BEFORE `unreadableConfig`, so
170
- * `vat verify --only consistency` against an unparseable config answered the
171
- * confidently-wrong "no skills: block" instead of reporting the config error.
172
- * `--only` is gone from verify, `emptyIsValid` went with it, and that ordering
173
- * hazard cannot recur: nothing short-circuits ahead of the config-error arm.
196
+ * ⚠️ **Nothing may short-circuit ahead of the config-error arm.** A check
197
+ * evaluated before `unreadableConfig` answers a confident "not configured" for a
198
+ * tree whose config could not be parsed — which is the one answer this function
199
+ * must never give, because it is indistinguishable from a correct one.
174
200
  *
175
201
  * @param unreadableConfig - The config-load error, when the config exists but
176
202
  * could not be parsed. A broken config is NOT "the phase is unconfigured":
177
203
  * we do not know what it declares, so we must not answer with a confident
178
204
  * "not configured". Only `vat verify` passes it, and only defensively — its
179
- * phase builder pushes every subprocess phase when the config is unreadable
180
- * (so the CHILD reports the real error), which makes the list non-empty and
181
- * this arm unreachable by construction today. It is kept because the arm that
182
- * would otherwise catch an empty list is the "not configured" lie.
205
+ * phase builder pushes every configured phase when the config is unreadable
206
+ * (so the phase itself reports the real error), which makes the list non-empty
207
+ * and this arm unreachable by construction today. It is kept because the arm
208
+ * that would otherwise catch an empty list is the "not configured" lie.
183
209
  */
184
210
  export declare function decidePhaseSelection(only: string | undefined, phases: Phase[], vocab: PhaseVocabulary, options?: {
185
211
  unreadableConfig?: string | undefined;
@@ -188,46 +214,71 @@ export declare function decidePhaseSelection(only: string | undefined, phases: P
188
214
  * Act on a {@link PhaseSelection}: return the phases to run, or emit the
189
215
  * command's normal structured document and exit.
190
216
  *
191
- * Both terminal arms go through `writeYamlOutput` deliberately. A `--only`
192
- * failure used to be an uncaught throw, so the one output a scripted caller
193
- * parses — the YAML document on stdout — was never written at all.
217
+ * Both terminal arms go through `writeYamlOutput` deliberately: the YAML
218
+ * document on stdout is the one output a scripted caller parses, so a routing
219
+ * failure has to publish one rather than throw past it.
194
220
  */
195
221
  export declare function applyPhaseSelection(selection: PhaseSelection, logger: ReturnType<typeof createLogger>, startTime: number): Phase[];
196
222
  /** The worse of two phase statuses, per {@link PHASE_STATUS_ORDER}. */
197
223
  export declare function worseOf(a: PhaseStatus, b: PhaseStatus): PhaseStatus;
198
224
  /**
199
- * Map a spawn outcome to a phase outcome. The pure core of {@link runPhase}.
225
+ * Map what a phase produced to its outcome. The pure core of {@link runPhase}.
200
226
  *
201
- * Every branch that is NOT "the child ran and told us what it found" is a
202
- * system error, because the orchestrator learned nothing about the artifact:
227
+ * | exit code | phase status | why |
228
+ * |-----------------------|----------------|-----------------------------------------|
229
+ * | 0 | `success` | ran, found nothing actionable |
230
+ * | 1 | `error` | ran, found validation errors |
231
+ * | 2 (or any other) | `system-error` | the phase itself reported a system error |
203
232
  *
204
- * | spawn outcome | phase status | why |
205
- * |--------------------------|----------------|--------------------------------------------|
206
- * | `error` set | `system-error` | the child never ran |
207
- * | killed by a signal | `system-error` | the child was cut off mid-answer |
208
- * | no exit code, no signal | `system-error` | there is no answer to read |
209
- * | stdout not parseable | `system-error` | the child's answer cannot be read |
210
- * | exit 0 | `success` | ran, found nothing actionable |
211
- * | exit 1 | `error` | ran, found validation errors |
212
- * | exit 2 (or any other) | `system-error` | the child itself reported a system error |
233
+ * The exit code is then reconciled with the phase's OWN reported `status`,
234
+ * worst-wins. An exit code has three values and cannot express `warning`:
235
+ * `vat skills validate` exits 0 while reporting `status: warning`, so its exit
236
+ * code alone reads as `success` — including on the tree VAT's CI dogfoods on
237
+ * VAT itself.
213
238
  *
214
- * The exit code is then reconciled with the child's OWN reported `status`,
215
- * worst-wins. An exit code has three values and cannot express `warning`, so
216
- * `vat skills validate` — which exits 0 while reporting `status: warning` —
217
- * was being recorded as `success` by every orchestrator, including the one
218
- * VAT's CI dogfoods on VAT itself.
239
+ * The table has no row for a signal kill, a missing status code, or a document
240
+ * that fails to parse, and that is the design rather than an omission. A phase
241
+ * runs in this process: there is no serialization step in which to lose a
242
+ * document, and no signal that could take a phase without taking the
243
+ * orchestrator with it.
219
244
  */
220
- export declare function phaseResultFromSpawn(name: string, outcome: PhaseSpawnOutcome): PhaseResult;
245
+ export declare function phaseResultFromOutcome(name: string, outcome: PhaseOutcome): PhaseResult;
221
246
  /**
222
- * Run a single phase by spawning the vat binary with the phase args.
247
+ * End a command-line run from a phase outcome: publish the document, then exit.
248
+ *
249
+ * THE single place the two lanes diverge, so they cannot diverge anywhere else.
250
+ * A phase hands back the same `{ document, exitCode }` either way; this decides
251
+ * what a *command* does with it, while an orchestrator folds it into
252
+ * `phases[].report` instead.
253
+ *
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`;
257
+ * - a command's own report goes through the command's own `render`;
258
+ * - no document at all (an unconfigured run, a dry run) publishes nothing.
223
259
  *
224
- * stdout is CAPTURED, not inherited: the child's YAML document belongs in this
225
- * phase's `report`, and letting it stream onto the parent's stdout is what made
226
- * `vat validate`'s output a run of documents with no `---` between them.
227
- * stderr stays inherited — progress output is on stderr by design and must keep
228
- * streaming live rather than arriving in one lump at the end.
260
+ * @param outcome - What the phase produced
261
+ * @param render - How this command publishes its OWN report shape
229
262
  */
230
- export declare function runPhase(binPath: string, phase: Phase): PhaseResult;
263
+ export declare function finishCommand(outcome: PhaseOutcome, render: (document: unknown) => void): never;
264
+ /**
265
+ * Run a single phase in THIS process and fold its outcome into a result.
266
+ *
267
+ * In THIS process, because everything an orchestrator reads back from a phase is
268
+ * the {@link PhaseOutcome} pair. A process per phase buys neither half of it and
269
+ * charges, on every phase, a full Node startup and the whole module graph again
270
+ * (~730 ms of remark per isolate), a parse cache whose miss counters restart
271
+ * from zero, and a worker pool built and torn down before the next phase begins.
272
+ * Phases run sequentially, so none of that cost is ever overlapped with work.
273
+ *
274
+ * The `catch` is a BACKSTOP, not the error path. Every phase function reports
275
+ * its own failures through `reportCommandError` and returns them as a document.
276
+ *
277
+ * ⚠️ This arm exists for a throw that escaped that handling. Sharing the
278
+ * orchestrator's process is what makes it load-bearing: an escaped throw aborts
279
+ * the orchestrator itself and silently skips every later phase.
280
+ */
281
+ export declare function runPhase(phase: Phase): Promise<PhaseResult>;
231
282
  /**
232
283
  * Worst-wins aggregate across phases. `system-error` outranks `error`: "we could
233
284
  * not determine the answer" must never be filed under "we determined it is bad".
@@ -236,26 +287,26 @@ export declare function aggregatePhaseStatus(results: readonly PhaseResult[]): P
236
287
  /**
237
288
  * One phase's per-severity distribution, wherever that phase keeps it.
238
289
  *
239
- * An in-process phase holds its own findings and publishes {@link
240
- * PhaseResult.issueCounts}. A subprocess phase deliberately does not — the child
241
- * owns its findings, and its document rides verbatim in {@link
242
- * PhaseResult.report}. Reading only the former is why an orchestrator's header
243
- * could report `{0, 0, 0}` over children that had just reported 12 warnings.
290
+ * A phase that holds its own findings publishes {@link PhaseResult.issueCounts}.
291
+ * A phase that publishes its own document deliberately does not — it owns its
292
+ * findings, and its document rides verbatim in {@link PhaseResult.report}.
293
+ *
294
+ * ⚠️ Both places must be read. Reading only `issueCounts` makes an
295
+ * orchestrator's header report `{0, 0, 0}` over phases that just reported 12
296
+ * warnings.
244
297
  *
245
298
  * Absent or malformed counts read as zero rather than throwing: a phase that
246
- * published no distribution contributes nothing to the total, which is the same
247
- * answer as before this function existed — just no longer the answer for phases
248
- * that DID publish one.
299
+ * publishes no distribution contributes nothing to the total.
249
300
  */
250
301
  export declare function phaseIssueCounts(result: PhaseResult): SeverityCounts;
251
302
  /**
252
303
  * Sum every phase's distribution, so an orchestrator's header total reconciles
253
304
  * against the phases printed beneath it.
254
305
  *
255
- * The companion to {@link aggregatePhaseStatus}: status has always been
256
- * worst-wins ACROSS phases, and a header whose `status` can see the children
257
- * while its `issueCounts` cannot is the same contradiction in one document —
258
- * `status: warning` beside `warnings: 0`.
306
+ * The companion to {@link aggregatePhaseStatus}: status is worst-wins ACROSS
307
+ * phases, so a header whose `status` can see the phases while its `issueCounts`
308
+ * cannot publishes a contradiction in one document — `status: warning` beside
309
+ * `warnings: 0`.
259
310
  */
260
311
  export declare function aggregatePhaseIssueCounts(results: readonly PhaseResult[]): SeverityCounts;
261
312
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"phase-utils.d.ts","sourceRoot":"","sources":["../../src/commands/phase-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAI9D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAclG;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,cAAc,CAAC;AAE3E,gFAAgF;AAChF,eAAO,MAAM,YAAY,EAAE,WAA4B,CAAC;AAExD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;I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