@vibe-agent-toolkit/cli 0.1.41-rc.7 → 0.1.41

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 (185) hide show
  1. package/dist/bin/vat +24 -1
  2. package/dist/bin/vat.js +24 -1
  3. package/dist/bin/vat.js.map +1 -1
  4. package/dist/bin.js +23 -2
  5. package/dist/bin.js.map +1 -1
  6. package/dist/commands/agent/list.d.ts +11 -0
  7. package/dist/commands/agent/list.d.ts.map +1 -1
  8. package/dist/commands/agent/list.js +30 -11
  9. package/dist/commands/agent/list.js.map +1 -1
  10. package/dist/commands/audit/distributed-tree.d.ts +172 -0
  11. package/dist/commands/audit/distributed-tree.d.ts.map +1 -0
  12. package/dist/commands/audit/distributed-tree.js +319 -0
  13. package/dist/commands/audit/distributed-tree.js.map +1 -0
  14. package/dist/commands/audit.d.ts +69 -1
  15. package/dist/commands/audit.d.ts.map +1 -1
  16. package/dist/commands/audit.js +525 -174
  17. package/dist/commands/audit.js.map +1 -1
  18. package/dist/commands/build.d.ts +14 -0
  19. package/dist/commands/build.d.ts.map +1 -1
  20. package/dist/commands/build.js +103 -26
  21. package/dist/commands/build.js.map +1 -1
  22. package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
  23. package/dist/commands/claude/marketplace/git-publish.js +21 -3
  24. package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
  25. package/dist/commands/claude/marketplace/validate.d.ts +125 -0
  26. package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
  27. package/dist/commands/claude/marketplace/validate.js +251 -44
  28. package/dist/commands/claude/marketplace/validate.js.map +1 -1
  29. package/dist/commands/claude/org/stubs.d.ts +9 -1
  30. package/dist/commands/claude/org/stubs.d.ts.map +1 -1
  31. package/dist/commands/claude/org/stubs.js +11 -3
  32. package/dist/commands/claude/org/stubs.js.map +1 -1
  33. package/dist/commands/claude/plugin/build.d.ts +34 -4
  34. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  35. package/dist/commands/claude/plugin/build.js +187 -16
  36. package/dist/commands/claude/plugin/build.js.map +1 -1
  37. package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
  38. package/dist/commands/claude/plugin/plugin-files.js +6 -2
  39. package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
  40. package/dist/commands/claude/plugin/plugin-json-merge.d.ts.map +1 -1
  41. package/dist/commands/claude/plugin/plugin-json-merge.js +15 -0
  42. package/dist/commands/claude/plugin/plugin-json-merge.js.map +1 -1
  43. package/dist/commands/claude/plugin/tree-copy.d.ts +40 -0
  44. package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
  45. package/dist/commands/claude/plugin/tree-copy.js +100 -4
  46. package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
  47. package/dist/commands/corpus/report.d.ts +22 -4
  48. package/dist/commands/corpus/report.d.ts.map +1 -1
  49. package/dist/commands/corpus/report.js +1 -0
  50. package/dist/commands/corpus/report.js.map +1 -1
  51. package/dist/commands/corpus/runner.d.ts +16 -1
  52. package/dist/commands/corpus/runner.d.ts.map +1 -1
  53. package/dist/commands/corpus/runner.js +40 -22
  54. package/dist/commands/corpus/runner.js.map +1 -1
  55. package/dist/commands/doctor.js +1 -1
  56. package/dist/commands/doctor.js.map +1 -1
  57. package/dist/commands/inventory.d.ts +2 -0
  58. package/dist/commands/inventory.d.ts.map +1 -1
  59. package/dist/commands/inventory.js +45 -4
  60. package/dist/commands/inventory.js.map +1 -1
  61. package/dist/commands/phase-utils.d.ts +183 -14
  62. package/dist/commands/phase-utils.d.ts.map +1 -1
  63. package/dist/commands/phase-utils.js +294 -29
  64. package/dist/commands/phase-utils.js.map +1 -1
  65. package/dist/commands/positional-args.d.ts +36 -0
  66. package/dist/commands/positional-args.d.ts.map +1 -0
  67. package/dist/commands/positional-args.js +52 -0
  68. package/dist/commands/positional-args.js.map +1 -0
  69. package/dist/commands/rag/query-command.d.ts +40 -0
  70. package/dist/commands/rag/query-command.d.ts.map +1 -1
  71. package/dist/commands/rag/query-command.js +47 -20
  72. package/dist/commands/rag/query-command.js.map +1 -1
  73. package/dist/commands/resources/index.d.ts.map +1 -1
  74. package/dist/commands/resources/index.js +27 -9
  75. package/dist/commands/resources/index.js.map +1 -1
  76. package/dist/commands/resources/scan.d.ts +37 -0
  77. package/dist/commands/resources/scan.d.ts.map +1 -1
  78. package/dist/commands/resources/scan.js +47 -32
  79. package/dist/commands/resources/scan.js.map +1 -1
  80. package/dist/commands/resources/validate.d.ts +136 -1
  81. package/dist/commands/resources/validate.d.ts.map +1 -1
  82. package/dist/commands/resources/validate.js +105 -66
  83. package/dist/commands/resources/validate.js.map +1 -1
  84. package/dist/commands/skill/review-checklist.d.ts.map +1 -1
  85. package/dist/commands/skill/review-checklist.js +5 -0
  86. package/dist/commands/skill/review-checklist.js.map +1 -1
  87. package/dist/commands/skill/review.d.ts.map +1 -1
  88. package/dist/commands/skill/review.js +7 -3
  89. package/dist/commands/skill/review.js.map +1 -1
  90. package/dist/commands/skill/test/run.d.ts +1 -1
  91. package/dist/commands/skill/test/run.d.ts.map +1 -1
  92. package/dist/commands/skill/test/run.js +8 -6
  93. package/dist/commands/skill/test/run.js.map +1 -1
  94. package/dist/commands/skills/build.d.ts +349 -11
  95. package/dist/commands/skills/build.d.ts.map +1 -1
  96. package/dist/commands/skills/build.js +901 -97
  97. package/dist/commands/skills/build.js.map +1 -1
  98. package/dist/commands/skills/command-helpers.d.ts +6 -10
  99. package/dist/commands/skills/command-helpers.d.ts.map +1 -1
  100. package/dist/commands/skills/command-helpers.js +6 -22
  101. package/dist/commands/skills/command-helpers.js.map +1 -1
  102. package/dist/commands/skills/list.d.ts +18 -0
  103. package/dist/commands/skills/list.d.ts.map +1 -1
  104. package/dist/commands/skills/list.js +41 -15
  105. package/dist/commands/skills/list.js.map +1 -1
  106. package/dist/commands/skills/package.d.ts +15 -0
  107. package/dist/commands/skills/package.d.ts.map +1 -1
  108. package/dist/commands/skills/package.js +30 -20
  109. package/dist/commands/skills/package.js.map +1 -1
  110. package/dist/commands/skills/scope-guard.d.ts +64 -0
  111. package/dist/commands/skills/scope-guard.d.ts.map +1 -0
  112. package/dist/commands/skills/scope-guard.js +86 -0
  113. package/dist/commands/skills/scope-guard.js.map +1 -0
  114. package/dist/commands/skills/validate-command.d.ts.map +1 -1
  115. package/dist/commands/skills/validate-command.js +41 -7
  116. package/dist/commands/skills/validate-command.js.map +1 -1
  117. package/dist/commands/skills/validate.d.ts +44 -3
  118. package/dist/commands/skills/validate.d.ts.map +1 -1
  119. package/dist/commands/skills/validate.js +217 -53
  120. package/dist/commands/skills/validate.js.map +1 -1
  121. package/dist/commands/validate.d.ts +18 -0
  122. package/dist/commands/validate.d.ts.map +1 -1
  123. package/dist/commands/validate.js +89 -68
  124. package/dist/commands/validate.js.map +1 -1
  125. package/dist/commands/verify.d.ts +113 -6
  126. package/dist/commands/verify.d.ts.map +1 -1
  127. package/dist/commands/verify.js +440 -123
  128. package/dist/commands/verify.js.map +1 -1
  129. package/dist/index.d.ts +1 -1
  130. package/dist/index.d.ts.map +1 -1
  131. package/dist/index.js +7 -1
  132. package/dist/index.js.map +1 -1
  133. package/dist/skill-resolution/index.d.ts +1 -1
  134. package/dist/skill-resolution/index.d.ts.map +1 -1
  135. package/dist/skill-resolution/index.js +1 -1
  136. package/dist/skill-resolution/index.js.map +1 -1
  137. package/dist/skill-resolution/packaging-config.d.ts +15 -2
  138. package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
  139. package/dist/skill-resolution/packaging-config.js +39 -2
  140. package/dist/skill-resolution/packaging-config.js.map +1 -1
  141. package/dist/utils/command-error.d.ts +34 -1
  142. package/dist/utils/command-error.d.ts.map +1 -1
  143. package/dist/utils/command-error.js +32 -1
  144. package/dist/utils/command-error.js.map +1 -1
  145. package/dist/utils/help-loader.d.ts +6 -2
  146. package/dist/utils/help-loader.d.ts.map +1 -1
  147. package/dist/utils/help-loader.js +9 -16
  148. package/dist/utils/help-loader.js.map +1 -1
  149. package/dist/utils/issue-rendering.d.ts +130 -0
  150. package/dist/utils/issue-rendering.d.ts.map +1 -1
  151. package/dist/utils/issue-rendering.js +147 -0
  152. package/dist/utils/issue-rendering.js.map +1 -1
  153. package/dist/utils/issue-severity.d.ts +51 -0
  154. package/dist/utils/issue-severity.d.ts.map +1 -0
  155. package/dist/utils/issue-severity.js +63 -0
  156. package/dist/utils/issue-severity.js.map +1 -0
  157. package/dist/utils/output.d.ts +54 -5
  158. package/dist/utils/output.d.ts.map +1 -1
  159. package/dist/utils/output.js +111 -17
  160. package/dist/utils/output.js.map +1 -1
  161. package/dist/utils/relativize-paths.d.ts +45 -0
  162. package/dist/utils/relativize-paths.d.ts.map +1 -0
  163. package/dist/utils/relativize-paths.js +67 -0
  164. package/dist/utils/relativize-paths.js.map +1 -0
  165. package/dist/utils/resource-loader.d.ts +21 -2
  166. package/dist/utils/resource-loader.d.ts.map +1 -1
  167. package/dist/utils/resource-loader.js +85 -11
  168. package/dist/utils/resource-loader.js.map +1 -1
  169. package/dist/utils/skill-packaging-config.d.ts +22 -1
  170. package/dist/utils/skill-packaging-config.d.ts.map +1 -1
  171. package/dist/utils/skill-packaging-config.js +26 -0
  172. package/dist/utils/skill-packaging-config.js.map +1 -1
  173. package/dist/utils/verdict-helpers.d.ts +4 -3
  174. package/dist/utils/verdict-helpers.d.ts.map +1 -1
  175. package/dist/utils/verdict-helpers.js +6 -13
  176. package/dist/utils/verdict-helpers.js.map +1 -1
  177. package/dist/version.d.ts +22 -2
  178. package/dist/version.d.ts.map +1 -1
  179. package/dist/version.js +31 -2
  180. package/dist/version.js.map +1 -1
  181. package/docs/index.md +12 -0
  182. package/docs/rag.md +9 -4
  183. package/docs/resources.md +30 -14
  184. package/docs/skills.md +25 -7
  185. package/package.json +12 -12
@@ -0,0 +1,86 @@
1
+ /**
2
+ * The shared `[path]` scope guard for the skills commands that take one.
3
+ *
4
+ * `vat skills validate` and `vat skills build` both accept `[path]` meaning
5
+ * "read the config in THIS directory". Neither checked that the directory
6
+ * existed or held one, so a mistyped path silently rescoped the run to NOTHING
7
+ * and still exited 0 — a green tick for a scan that never happened. The two
8
+ * commands print different words while doing it (`nothing to validate` vs
9
+ * `nothing to build`), which is the only thing that varies between them.
10
+ *
11
+ * One implementation, parameterised by those words. Fixing this for one command
12
+ * and copying it into the other is how the pair drifts.
13
+ */
14
+ import { existsSync, statSync } from 'node:fs';
15
+ import { safePath } from '@vibe-agent-toolkit/utils';
16
+ /** The name `loadConfig` looks for in the directory these commands are pointed at. */
17
+ export const CONFIG_FILENAME = 'vibe-agent-toolkit.config.yaml';
18
+ /**
19
+ * Why the path the operator typed cannot scope this run — or `undefined` when it
20
+ * can.
21
+ *
22
+ * Only an EXPLICIT argument is judged. With no argument the command means "the
23
+ * current directory", and a cwd that happens to hold no config is the documented
24
+ * nothing-to-do case, not a mis-scoped run.
25
+ *
26
+ * `VAT_TEST_CONFIG` is honoured for the same reason `loadConfig` honours it: when
27
+ * it is set, the config does not come from the named directory at all, so
28
+ * demanding one there would reject a scope that is in fact resolvable.
29
+ *
30
+ * Pure — returns the message instead of writing it, so both answers are
31
+ * assertable without capturing a stream.
32
+ */
33
+ export function unscopableSkillsPath(pathArg) {
34
+ if (pathArg === undefined)
35
+ return undefined;
36
+ const resolved = safePath.resolve(pathArg);
37
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- a CLI argument is the subject of this check
38
+ if (!existsSync(resolved))
39
+ return 'no such directory';
40
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- ditto; existence was just established
41
+ if (!statSync(resolved).isDirectory())
42
+ return 'not a directory';
43
+ if (process.env['VAT_TEST_CONFIG'] !== undefined)
44
+ return undefined;
45
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- ditto
46
+ if (!existsSync(safePath.join(resolved, CONFIG_FILENAME))) {
47
+ return `no ${CONFIG_FILENAME} there`;
48
+ }
49
+ return undefined;
50
+ }
51
+ /**
52
+ * The refusal text, as a string.
53
+ *
54
+ * Separate from the writing and the exiting so a test can assert what the
55
+ * operator is told without capturing a stream or trapping `process.exit`.
56
+ */
57
+ export function unscopablePathMessage(subject, pathArg, reason) {
58
+ const { command, silentSuccess } = subject;
59
+ return (`error: '${command}' cannot scope to '${pathArg}' (${reason}).\n` +
60
+ `\n` +
61
+ ` '${command} <path>' reads the ${CONFIG_FILENAME} in the directory it is\n` +
62
+ ` pointed at. This argument used to be accepted and the run silently\n` +
63
+ ` rescoped to NOTHING: it printed "${silentSuccess}" and exited 0, so an\n` +
64
+ ` operator who mistyped a path got a green tick for a run that never\n` +
65
+ ` happened.\n` +
66
+ `\n` +
67
+ ` Fix: point '${command}' at a directory holding a ${CONFIG_FILENAME},\n` +
68
+ ` or run it with no argument to use the current directory.\n` +
69
+ ` To inspect ONE skill or bundle by path, use: vat audit <path>\n`);
70
+ }
71
+ /**
72
+ * Refuse to run when the operator scoped the command at something it cannot
73
+ * read a config from.
74
+ *
75
+ * Exit 2, matching `rejectPositionalArguments`: exit 1 on these commands is
76
+ * documented as "errors found", and reporting a usage error as 1 tells a CI gate
77
+ * the project's skills are broken when nothing was inspected.
78
+ */
79
+ export function rejectUnscopablePath(subject, pathArg) {
80
+ const reason = unscopableSkillsPath(pathArg);
81
+ if (reason === undefined)
82
+ return;
83
+ process.stderr.write(unscopablePathMessage(subject, String(pathArg), reason));
84
+ process.exit(2);
85
+ }
86
+ //# sourceMappingURL=scope-guard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope-guard.js","sourceRoot":"","sources":["../../../src/commands/skills/scope-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,sFAAsF;AACtF,MAAM,CAAC,MAAM,eAAe,GAAG,gCAAgC,CAAC;AAmBhE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,oBAAo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AAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"validate-command.d.ts","sourceRoot":"","sources":["../../../src/commands/skills/validate-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,qBAAqB,IAAI,OAAO,CA0F/C"}
1
+ {"version":3,"file":"validate-command.d.ts","sourceRoot":"","sources":["../../../src/commands/skills/validate-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBpC,wBAAgB,qBAAqB,IAAI,OAAO,CA6G/C"}
@@ -2,16 +2,34 @@
2
2
  * Skills validate command - Commander.js wrapper
3
3
  */
4
4
  import { Command } from 'commander';
5
+ import { rejectUnscopablePath } from './scope-guard.js';
5
6
  import { validateCommand } from './validate.js';
7
+ /**
8
+ * What a mis-scoped `vat skills validate` used to do.
9
+ *
10
+ * In a package where the bare invocation validates 13 skills, one mistyped
11
+ * character rescoped it to nothing and still reported success — the same
12
+ * "went wide / went narrow and reported success" defect
13
+ * `rejectPositionalArguments` was added to `vat verify` / `vat validate` /
14
+ * `vat build` for, arrived at from the opposite direction. `vat skills build`
15
+ * carried the identical hole and is guarded by the same module.
16
+ */
17
+ const SCOPE_SUBJECT = {
18
+ command: 'vat skills validate',
19
+ silentSuccess: 'nothing to validate',
20
+ };
6
21
  export function createValidateCommand() {
7
22
  const command = new Command('validate');
8
23
  command
9
24
  .description('Validate skills for packaging (reads skills config from config yaml)')
10
25
  .argument('[path]', 'Path to directory with config yaml (default: current directory)')
11
26
  .option('--skill <name>', 'Validate specific skill only')
12
- .option('-v, --verbose', 'Show full details including excluded reference paths')
27
+ .option('-v, --verbose', 'Show all validated skills and every individual finding, including excluded reference paths')
13
28
  .option('-d, --debug', 'Enable debug logging')
14
- .action(validateCommand)
29
+ .action(async (pathArg, options) => {
30
+ rejectUnscopablePath(SCOPE_SUBJECT, pathArg);
31
+ await validateCommand(pathArg, options);
32
+ })
15
33
  .addHelpText('after', `
16
34
  Description:
17
35
  Validates skills declared in vibe-agent-toolkit.config.yaml using the
@@ -65,14 +83,30 @@ Validation Config:
65
83
 
66
84
  Output:
67
85
  YAML summary → stdout (for programmatic parsing)
68
- Detailed errors → stderr (for human reading)
86
+ Findings report → stderr (for human reading)
69
87
 
70
- Output includes:
71
- - status: success/error
72
- - skillsValidated: number of skills validated
73
- - results: per-skill validation details (activeErrors, activeWarnings, ignoredErrors)
88
+ The stdout summary always publishes:
89
+ - status: success/warning/error (worst actionable severity in the run)
90
+ - issueCounts / runIssueCounts: the run total, always with all three
91
+ buckets, and the run-level (project config) share of it. The run total
92
+ always equals the sum of the per-skill rows plus runIssueCounts.
93
+ - skillsValidated: number of skills validated (the true denominator)
74
94
  - durationSecs: validation time
75
95
 
96
+ By default, results[] is one row per skill WITH findings — its issue counts
97
+ and a per-code tally, dominant code first. A skill with no findings is
98
+ omitted from the listing entirely; a zero count is an absent field, never
99
+ "errors: 0". stderr prints the same thing as one line per skill.
100
+
101
+ --verbose publishes every validated skill (findings or not) with its full
102
+ detail: allErrors, ignoredErrors, observations, evidence and complete
103
+ metadata on stdout, one block per individual finding on stderr. That form is
104
+ meant for redirect-then-grep, not for reading — on a 90-skill repo it is
105
+ ~30x the default output.
106
+
107
+ Run-level findings (validation.allow entries no skill matched) are printed
108
+ in full in both forms; they belong to the project config, not to any skill.
109
+
76
110
  Exit Codes:
77
111
  0 - All validations passed (or all errors allowed by valid config)
78
112
  1 - Validation errors found (severity=error, not allowed)
@@ -1 +1 @@
1
- {"version":3,"file":"validate-command.js","sourceRoot":"","sources":["../../../src/commands/skills/validate-command.ts"],"names":[],"mappings":"AAAA;;G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E,4FAA4F,CAAC;SACrH,MAAM,CAAC,aAAa,EAAE,sBAAsB,CAAC;SAC7C,MAAM,CAAC,KAAK,EAAE,OAA2B,EAAE,OAAqC,EAAE,EAAE;QACnF,oBAAoB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC7C,MAAM,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC,CAAC;SACD,WAAW,CACV,OAAO,EACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0FL,CACI,CAAC;IAEJ,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * Discovers skills from config yaml skills.include/exclude, validates each
5
5
  * using validateSkillForPackaging with merged packaging config.
6
6
  */
7
- import { type SeverityCounts } from '@vibe-agent-toolkit/agent-schema';
7
+ import { type SeverityCounts, type ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
8
8
  import { type PackagingValidationResult } from '@vibe-agent-toolkit/agent-skills';
9
9
  /**
10
10
  * Skills validate command options
@@ -16,6 +16,16 @@ export interface SkillsValidateCommandOptions {
16
16
  }
17
17
  /** The vocabulary of a validation verdict: worst ACTIONABLE severity. */
18
18
  type ValidationStatus = 'success' | 'warning' | 'error';
19
+ /**
20
+ * Findings about the RUN rather than about any one skill — currently the
21
+ * `validation.allow` entries no skill in the batch matched (ALLOW_UNUSED).
22
+ *
23
+ * They are a separate parameter, not folded into a skill's result, because
24
+ * that is what they are: `validation.allow` is declared once per package, so
25
+ * attributing "nothing matched this entry" to whichever skill happened to be
26
+ * validated at the time is what produced 78 warnings from 3 real entries.
27
+ */
28
+ type RunIssues = readonly ValidationIssue[];
19
29
  /**
20
30
  * Build the YAML summary object.
21
31
  *
@@ -24,12 +34,32 @@ type ValidationStatus = 'success' | 'warning' | 'error';
24
34
  * `results.some(r => r.status === 'error') ? 'error' : 'success'` — a two-value
25
35
  * collapse that could never report the warning case, and so reported 33 active
26
36
  * warnings as `success`.
37
+ *
38
+ * The header total counts BOTH the per-skill findings and the run-level ones,
39
+ * because the exit code does too — dropping run issues from the header would
40
+ * divorce the published verdict from the code the process actually returns.
41
+ * That is why `runIssueCounts` exists beside them: on a large real repo the
42
+ * header read 1814 warnings against a per-skill sum of 1800, and the missing 14
43
+ * were run-level ALLOW_UNUSED entries published only as a bare LIST. The
44
+ * identity `issueCounts === Σ results[].issueCounts + runIssueCounts` now holds
45
+ * by construction, so a consumer can reconcile the two numbers instead of
46
+ * hand-counting a list to find out whether anything went missing.
47
+ *
48
+ * That identity survives the default mode dropping every finding-free skill from
49
+ * `results[]`, because a dropped row contributes exactly zero to each bucket —
50
+ * and it survives the default row publishing its counts flat with zero buckets
51
+ * omitted, because an absent bucket reads as zero. Only the per-asset ROWS omit
52
+ * zeros: `issueCounts` and `runIssueCounts` keep their complete
53
+ * `{errors, warnings, info}` shape in both modes, because they are the
54
+ * reconciliation identity rather than something a reader scans.
27
55
  */
28
- export declare function buildValidateSummary(results: PackagingValidationResult[], duration: number, verbose: boolean): {
56
+ export declare function buildValidateSummary(results: PackagingValidationResult[], duration: number, verbose: boolean, runIssues: RunIssues): {
29
57
  status: ValidationStatus;
30
58
  issueCounts: SeverityCounts;
59
+ runIssueCounts: SeverityCounts;
31
60
  skillsValidated: number;
32
61
  results: unknown[];
62
+ runIssues: ValidationIssue[];
33
63
  durationSecs: number;
34
64
  };
35
65
  /**
@@ -38,8 +68,19 @@ export declare function buildValidateSummary(results: PackagingValidationResult[
38
68
  * Renders every skill with ANY emitted finding, not just the ones that failed
39
69
  * the gate: a warning-only or info-only run used to print the success banner and
40
70
  * nothing else, so the findings existed only in the YAML on stdout.
71
+ *
72
+ * Every skill with findings gets its summary row at every verbosity; `verbose`
73
+ * picks only which findings are ALSO rendered in full beneath that row, per
74
+ * {@link issuesToRenderAtVerbosity} — errors always, `warning`/`info` when
75
+ * asked, `ignore` never. `verbose` deliberately does NOT gate errors: a default
76
+ * run that collapsed the error it exited 1 on into a count line forced the reader
77
+ * to re-run with a flag to learn what broke.
78
+ *
79
+ * Run-level findings and the banner are printed in full either way — there are
80
+ * ~14 of the former, and they belong to the project config rather than to any
81
+ * asset, so there is no row for them to collapse into.
41
82
  */
42
- export declare function formatValidationReportLines(results: PackagingValidationResult[]): string[];
83
+ export declare function formatValidationReportLines(results: PackagingValidationResult[], runIssues: RunIssues, verbose: boolean): string[];
43
84
  /**
44
85
  * Log validation progress for a single skill.
45
86
  *
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/skills/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAGL,KAAK,cAAc,EAEpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,KAAK,yBAAyB,EAG/B,MAAM,kCAAkC,CAAC;AA2B1C;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AASD,yEAAyE;AACzE,KAAK,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAiCxD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,yBAAyB,EAAE,EACpC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,GACf;IACD,MAAM,EAAE,gBAAgB,CAAC;IACzB,WAAW,EAAE,cAAc,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CASA;AA6DD;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,yBAAyB,EAAE,GAAG,MAAM,EAAE,CAW1F;AA8BD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,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