@vibe-agent-toolkit/cli 0.2.0-rc.5 → 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 (220) 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 +726 -127
  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/claude-config.d.ts.map +1 -1
  29. package/dist/commands/claude/claude-config.js +6 -0
  30. package/dist/commands/claude/claude-config.js.map +1 -1
  31. package/dist/commands/claude/context.js +1 -1
  32. package/dist/commands/claude/context.js.map +1 -1
  33. package/dist/commands/claude/marketplace/validate.d.ts +55 -22
  34. package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
  35. package/dist/commands/claude/marketplace/validate.js +380 -75
  36. package/dist/commands/claude/marketplace/validate.js.map +1 -1
  37. package/dist/commands/claude/org/helpers.d.ts +59 -1
  38. package/dist/commands/claude/org/helpers.d.ts.map +1 -1
  39. package/dist/commands/claude/org/helpers.js +58 -7
  40. package/dist/commands/claude/org/helpers.js.map +1 -1
  41. package/dist/commands/claude/org/index.d.ts.map +1 -1
  42. package/dist/commands/claude/org/index.js +24 -16
  43. package/dist/commands/claude/org/index.js.map +1 -1
  44. package/dist/commands/claude/org/skills.d.ts +509 -0
  45. package/dist/commands/claude/org/skills.d.ts.map +1 -1
  46. package/dist/commands/claude/org/skills.js +1364 -94
  47. package/dist/commands/claude/org/skills.js.map +1 -1
  48. package/dist/commands/claude/org/users.d.ts.map +1 -1
  49. package/dist/commands/claude/org/users.js +3 -1
  50. package/dist/commands/claude/org/users.js.map +1 -1
  51. package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
  52. package/dist/commands/claude/org/workspaces.js +5 -2
  53. package/dist/commands/claude/org/workspaces.js.map +1 -1
  54. package/dist/commands/claude/plugin/build.d.ts +8 -0
  55. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  56. package/dist/commands/claude/plugin/build.js +16 -2
  57. package/dist/commands/claude/plugin/build.js.map +1 -1
  58. package/dist/commands/claude/plugin/tree-copy.d.ts +72 -0
  59. package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
  60. package/dist/commands/claude/plugin/tree-copy.js +215 -10
  61. package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
  62. package/dist/commands/corpus/index.d.ts.map +1 -1
  63. package/dist/commands/corpus/index.js +3 -0
  64. package/dist/commands/corpus/index.js.map +1 -1
  65. package/dist/commands/corpus/report.d.ts +0 -1
  66. package/dist/commands/corpus/report.d.ts.map +1 -1
  67. package/dist/commands/corpus/report.js +0 -1
  68. package/dist/commands/corpus/report.js.map +1 -1
  69. package/dist/commands/corpus/runner.d.ts +58 -1
  70. package/dist/commands/corpus/runner.d.ts.map +1 -1
  71. package/dist/commands/corpus/runner.js +90 -15
  72. package/dist/commands/corpus/runner.js.map +1 -1
  73. package/dist/commands/corpus/scan.d.ts.map +1 -1
  74. package/dist/commands/corpus/scan.js +0 -1
  75. package/dist/commands/corpus/scan.js.map +1 -1
  76. package/dist/commands/doctor.d.ts +14 -0
  77. package/dist/commands/doctor.d.ts.map +1 -1
  78. package/dist/commands/doctor.js +96 -18
  79. package/dist/commands/doctor.js.map +1 -1
  80. package/dist/commands/okf/index.d.ts +11 -0
  81. package/dist/commands/okf/index.d.ts.map +1 -0
  82. package/dist/commands/okf/index.js +102 -0
  83. package/dist/commands/okf/index.js.map +1 -0
  84. package/dist/commands/okf/validate.d.ts +82 -0
  85. package/dist/commands/okf/validate.d.ts.map +1 -0
  86. package/dist/commands/okf/validate.js +157 -0
  87. package/dist/commands/okf/validate.js.map +1 -0
  88. package/dist/commands/phase-utils.d.ts +19 -3
  89. package/dist/commands/phase-utils.d.ts.map +1 -1
  90. package/dist/commands/phase-utils.js +26 -5
  91. package/dist/commands/phase-utils.js.map +1 -1
  92. package/dist/commands/rag/index-command.d.ts +27 -2
  93. package/dist/commands/rag/index-command.d.ts.map +1 -1
  94. package/dist/commands/rag/index-command.js +44 -7
  95. package/dist/commands/rag/index-command.js.map +1 -1
  96. package/dist/commands/rag/index.d.ts.map +1 -1
  97. package/dist/commands/rag/index.js +2 -0
  98. package/dist/commands/rag/index.js.map +1 -1
  99. package/dist/commands/resources/check-progress.d.ts +3 -0
  100. package/dist/commands/resources/check-progress.d.ts.map +1 -1
  101. package/dist/commands/resources/check-progress.js +6 -0
  102. package/dist/commands/resources/check-progress.js.map +1 -1
  103. package/dist/commands/resources/check.d.ts +33 -4
  104. package/dist/commands/resources/check.d.ts.map +1 -1
  105. package/dist/commands/resources/check.js +131 -44
  106. package/dist/commands/resources/check.js.map +1 -1
  107. package/dist/commands/resources/index.d.ts.map +1 -1
  108. package/dist/commands/resources/index.js +41 -9
  109. package/dist/commands/resources/index.js.map +1 -1
  110. package/dist/commands/resources/query.d.ts +18 -1
  111. package/dist/commands/resources/query.d.ts.map +1 -1
  112. package/dist/commands/resources/query.js +29 -4
  113. package/dist/commands/resources/query.js.map +1 -1
  114. package/dist/commands/resources/validate.d.ts +29 -0
  115. package/dist/commands/resources/validate.d.ts.map +1 -1
  116. package/dist/commands/resources/validate.js +116 -13
  117. package/dist/commands/resources/validate.js.map +1 -1
  118. package/dist/commands/skill/review-checklist.d.ts.map +1 -1
  119. package/dist/commands/skill/review-checklist.js +35 -0
  120. package/dist/commands/skill/review-checklist.js.map +1 -1
  121. package/dist/commands/skill/review.d.ts.map +1 -1
  122. package/dist/commands/skill/review.js +9 -2
  123. package/dist/commands/skill/review.js.map +1 -1
  124. package/dist/commands/skill/test/configure.d.ts +37 -0
  125. package/dist/commands/skill/test/configure.d.ts.map +1 -1
  126. package/dist/commands/skill/test/configure.js +57 -12
  127. package/dist/commands/skill/test/configure.js.map +1 -1
  128. package/dist/commands/skill/test/run.d.ts.map +1 -1
  129. package/dist/commands/skill/test/run.js +21 -6
  130. package/dist/commands/skill/test/run.js.map +1 -1
  131. package/dist/commands/skills/build.d.ts.map +1 -1
  132. package/dist/commands/skills/build.js +16 -3
  133. package/dist/commands/skills/build.js.map +1 -1
  134. package/dist/commands/skills/list.d.ts +2 -1
  135. package/dist/commands/skills/list.d.ts.map +1 -1
  136. package/dist/commands/skills/list.js +31 -9
  137. package/dist/commands/skills/list.js.map +1 -1
  138. package/dist/commands/skills/skill-discovery.d.ts +40 -1
  139. package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
  140. package/dist/commands/skills/skill-discovery.js +32 -3
  141. package/dist/commands/skills/skill-discovery.js.map +1 -1
  142. package/dist/commands/skills/validate-command.d.ts.map +1 -1
  143. package/dist/commands/skills/validate-command.js +11 -3
  144. package/dist/commands/skills/validate-command.js.map +1 -1
  145. package/dist/commands/skills/validate.d.ts +66 -7
  146. package/dist/commands/skills/validate.d.ts.map +1 -1
  147. package/dist/commands/skills/validate.js +133 -29
  148. package/dist/commands/skills/validate.js.map +1 -1
  149. package/dist/commands/verify.d.ts +94 -3
  150. package/dist/commands/verify.d.ts.map +1 -1
  151. package/dist/commands/verify.js +192 -45
  152. package/dist/commands/verify.js.map +1 -1
  153. package/dist/skill-resolution/packaging-config.d.ts +49 -5
  154. package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
  155. package/dist/skill-resolution/packaging-config.js +59 -19
  156. package/dist/skill-resolution/packaging-config.js.map +1 -1
  157. package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
  158. package/dist/skill-resolution/resolve-skill-reference.js +6 -3
  159. package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
  160. package/dist/utils/command-error.d.ts +31 -0
  161. package/dist/utils/command-error.d.ts.map +1 -1
  162. package/dist/utils/command-error.js +45 -0
  163. package/dist/utils/command-error.js.map +1 -1
  164. package/dist/utils/config-loader.d.ts.map +1 -1
  165. package/dist/utils/config-loader.js +22 -6
  166. package/dist/utils/config-loader.js.map +1 -1
  167. package/dist/utils/edge-lens-evaluation.d.ts +83 -0
  168. package/dist/utils/edge-lens-evaluation.d.ts.map +1 -0
  169. package/dist/utils/edge-lens-evaluation.js +110 -0
  170. package/dist/utils/edge-lens-evaluation.js.map +1 -0
  171. package/dist/utils/optional-backend.d.ts +5 -4
  172. package/dist/utils/optional-backend.d.ts.map +1 -1
  173. package/dist/utils/optional-backend.js +5 -4
  174. package/dist/utils/optional-backend.js.map +1 -1
  175. package/dist/utils/project-root-policy.d.ts +20 -0
  176. package/dist/utils/project-root-policy.d.ts.map +1 -1
  177. package/dist/utils/project-root-policy.js +32 -0
  178. package/dist/utils/project-root-policy.js.map +1 -1
  179. package/dist/utils/projection-query.d.ts +41 -4
  180. package/dist/utils/projection-query.d.ts.map +1 -1
  181. package/dist/utils/projection-query.js +44 -10
  182. package/dist/utils/projection-query.js.map +1 -1
  183. package/dist/utils/projection-store.d.ts +41 -15
  184. package/dist/utils/projection-store.d.ts.map +1 -1
  185. package/dist/utils/projection-store.js +65 -18
  186. package/dist/utils/projection-store.js.map +1 -1
  187. package/dist/utils/repeatable-option.d.ts +37 -0
  188. package/dist/utils/repeatable-option.d.ts.map +1 -0
  189. package/dist/utils/repeatable-option.js +39 -0
  190. package/dist/utils/repeatable-option.js.map +1 -0
  191. package/dist/utils/resource-loader.d.ts +4 -3
  192. package/dist/utils/resource-loader.d.ts.map +1 -1
  193. package/dist/utils/resource-loader.js +61 -30
  194. package/dist/utils/resource-loader.js.map +1 -1
  195. package/dist/utils/root-argv.d.ts +53 -0
  196. package/dist/utils/root-argv.d.ts.map +1 -0
  197. package/dist/utils/root-argv.js +215 -0
  198. package/dist/utils/root-argv.js.map +1 -0
  199. package/dist/utils/run-integrity.d.ts +95 -0
  200. package/dist/utils/run-integrity.d.ts.map +1 -0
  201. package/dist/utils/run-integrity.js +102 -0
  202. package/dist/utils/run-integrity.js.map +1 -0
  203. package/dist/utils/sqlite-experimental-warning.d.ts +69 -0
  204. package/dist/utils/sqlite-experimental-warning.d.ts.map +1 -0
  205. package/dist/utils/sqlite-experimental-warning.js +144 -0
  206. package/dist/utils/sqlite-experimental-warning.js.map +1 -0
  207. package/dist/utils/user-context-scanner.d.ts +8 -0
  208. package/dist/utils/user-context-scanner.d.ts.map +1 -1
  209. package/dist/utils/user-context-scanner.js +4 -0
  210. package/dist/utils/user-context-scanner.js.map +1 -1
  211. package/dist/utils/validate-help-files.d.ts.map +1 -1
  212. package/dist/utils/validate-help-files.js +9 -2
  213. package/dist/utils/validate-help-files.js.map +1 -1
  214. package/docs/audit.md +120 -7
  215. package/docs/doctor.md +6 -6
  216. package/docs/index.md +1 -1
  217. package/docs/rag.md +3 -1
  218. package/docs/resources.md +5 -1
  219. package/docs/skills.md +47 -62
  220. package/package.json +18 -18
@@ -9,19 +9,21 @@
9
9
  * - README.md should exist (warning)
10
10
  * - CHANGELOG.md should exist (warning)
11
11
  */
12
- import { existsSync, readdirSync } from 'node:fs';
12
+ import { existsSync, readdirSync, statSync } from 'node:fs';
13
13
  import { validateMarketplace, validateSkill, } from '@vibe-agent-toolkit/agent-skills';
14
14
  import { validatePlugin } from '@vibe-agent-toolkit/claude-marketplace';
15
15
  import { calculateValidationStatus, countBySeverity, } from '@vibe-agent-toolkit/schema';
16
- import { findProjectRoot, issueLocation, safePath } from '@vibe-agent-toolkit/utils';
16
+ import { findProjectRoot, issueLocation, normalizePath, safePath, toForwardSlash } from '@vibe-agent-toolkit/utils';
17
17
  import { Command } from 'commander';
18
18
  import { formatDuration, reportCommandError } from '../../../utils/command-error.js';
19
19
  import { loadConfig } from '../../../utils/config-loader.js';
20
+ import { escapesCorpusRoot } from '../../../utils/corpus-target.js';
20
21
  import { summarizeFindings } from '../../../utils/issue-rendering.js';
21
22
  import { resolveIssueSeverity } from '../../../utils/issue-severity.js';
22
23
  import { createLogger } from '../../../utils/logger.js';
23
24
  import { writeYamlOutput } from '../../../utils/output.js';
24
25
  import { relativizePathEntries } from '../../../utils/relativize-paths.js';
26
+ import { runIntegrityFinding } from '../../../utils/run-integrity.js';
25
27
  import { finishCommand } from '../../phase-utils.js';
26
28
  /**
27
29
  * Check for required/recommended files in the marketplace root.
@@ -46,21 +48,70 @@ function checkMarketplaceFiles(marketplacePath) {
46
48
  }
47
49
  return issues;
48
50
  }
51
+ /**
52
+ * The boundary of what this command may read, applied to every path the walk
53
+ * opens below a contained plugin — not only to the declared `source`.
54
+ *
55
+ * 🚨 **Containment used to stop at the `source`.** Inside a contained plugin,
56
+ * `skills/` was `readdir`ed through a directory link, a `SKILL.md` parsed
57
+ * through a file link, and `.claude-plugin/plugin.json` read through one — each
58
+ * pointing OUT of the root — and the outside file's findings were published at
59
+ * a root-relative location whose real file is not under the root. A
60
+ * marketplace checkout is the untrusted input (git carries symlinks), so the
61
+ * class the source lane closed was open one level down, while the help text
62
+ * and the refusal message promised the absolute.
63
+ *
64
+ * Same predicate as {@link containedPluginDir}: real path against the root's
65
+ * own real path, so a link INSIDE the root is followed (the link is not the
66
+ * offence, leaving the root is) and one that leaves it is recorded by its
67
+ * root-relative spelling in `refused` and never opened. The record is what the
68
+ * document publishes and what the builder turns into the run-integrity
69
+ * refusal: a path the run would not read is a plugin the run did not finish
70
+ * validating, and silence there is the reassuring failure.
71
+ */
72
+ class WalkBoundary {
73
+ marketplacePath;
74
+ realRoot;
75
+ refused = [];
76
+ constructor(marketplacePath, realRoot) {
77
+ this.marketplacePath = marketplacePath;
78
+ this.realRoot = realRoot;
79
+ }
80
+ /**
81
+ * May the walk open `abs`? `true` when its real path sits under the root.
82
+ * `false` records the refusal by name and is final for that path: nothing
83
+ * beneath it is visited either, because nothing beneath it was read.
84
+ */
85
+ contains(abs) {
86
+ const real = toForwardSlash(normalizePath(abs));
87
+ if (!escapesCorpusRoot(safePath.relative(this.realRoot, real)))
88
+ return true;
89
+ this.refused.push(issueLocation(abs, this.marketplacePath));
90
+ return false;
91
+ }
92
+ }
49
93
  /**
50
94
  * Validate all SKILL.md files within a plugin's skills/ directory.
95
+ *
96
+ * Every path opened here — `skills/`, each skill directory, each `SKILL.md` —
97
+ * is checked against `boundary` first, so a link out of the root at any of
98
+ * the three depths is refused by name rather than read. A skill directory is
99
+ * recognised by what it RESOLVES to (a link to an in-root directory is a
100
+ * skill directory; `Dirent.isDirectory()` said no to every link and skipped
101
+ * the skill silently), which is the same by-real-path rule the source gets.
51
102
  */
52
- async function validatePluginSkills(pluginDir, marketplacePath) {
103
+ async function validatePluginSkills(pluginDir, marketplacePath, boundary) {
53
104
  const skillsDir = safePath.join(pluginDir, 'skills');
54
- if (!existsSync(skillsDir))
105
+ if (!existsSync(skillsDir) || !boundary.contains(skillsDir))
55
106
  return [];
56
107
  const issues = [];
57
108
  const skillEntries = readdirSync(skillsDir, { withFileTypes: true });
58
109
  for (const skillEntry of skillEntries) {
59
- if (!skillEntry.isDirectory())
60
- continue;
61
110
  const skillDir = safePath.join(skillsDir, skillEntry.name);
111
+ if (!isDirectory(skillDir) || !boundary.contains(skillDir))
112
+ continue;
62
113
  const skillMdPath = safePath.join(skillDir, 'SKILL.md');
63
- if (!existsSync(skillMdPath))
114
+ if (!existsSync(skillMdPath) || !boundary.contains(skillMdPath))
64
115
  continue;
65
116
  const skillResult = await validateSkill({ skillPath: skillMdPath, rootDir: skillDir, locationRoot: marketplacePath });
66
117
  issues.push(...skillResult.issues);
@@ -68,7 +119,89 @@ async function validatePluginSkills(pluginDir, marketplacePath) {
68
119
  return issues;
69
120
  }
70
121
  /**
71
- * Validate all plugins under the plugins/ directory.
122
+ * Whether `dir` is a directory. `false` for a file, for nothing, and for a path
123
+ * the process cannot stat — all three are "no plugin directory here".
124
+ */
125
+ function isDirectory(dir) {
126
+ try {
127
+ return statSync(dir).isDirectory();
128
+ }
129
+ catch {
130
+ return false;
131
+ }
132
+ }
133
+ /**
134
+ * The directory a declared `source` names, as the two paths the run needs —
135
+ * or `undefined` when it names nothing this command may enter.
136
+ *
137
+ * 🚨 **This used to be `safePath.resolve(root, source)` + `isDirectory`, and
138
+ * that walked `/etc`.** `marketplace.json` is attacker-reachable content — it
139
+ * is the thing being audited — and every string `source` was resolved and
140
+ * ENTERED. The document then published `../../../../etc/…` locations, breaking
141
+ * the "every location is relative to root" contract the help text claims.
142
+ *
143
+ * Containment is decided by REAL path, in two steps:
144
+ *
145
+ * 1. `joinUnderRoot` refuses lexically: an absolute source (POSIX root, drive
146
+ * letter) or a `..` that climbs above the root. The source is
147
+ * forward-slashed FIRST, because on POSIX `plugins\..\..\x` is one segment
148
+ * to `path.resolve` — it resolved to a name containing backslashes, and the
149
+ * same string walks out of the root on Windows. That also fixes the LOW:
150
+ * `.\plugins\x` resolved to `<root>/./plugins/x`, which `statSync` accepts
151
+ * but which is not the string `undeclared` builds for the same directory,
152
+ * so one plugin was published as both validated and undeclared.
153
+ * 2. `realpath` refuses what only the filesystem knows: a symlink inside the
154
+ * root pointing out is outside. The check is against the root's OWN real
155
+ * path, so a root reached through a symlink (macOS `/var` → `/private/var`)
156
+ * does not read as escaping itself.
157
+ *
158
+ * The schema refuses step 1's cases at the manifest before this runs, so here
159
+ * step 1 is the belt to that suspender. The consumer keeps it because the
160
+ * schema is `.passthrough()` Postel's-Law tolerant by design and this is the
161
+ * one place a wrong answer opens a directory.
162
+ *
163
+ * @returns `lexical` — the path as declared, resolved, which is what the
164
+ * validators are handed so findings read `plugins/s/…` as the manifest spells
165
+ * it; `real` — the identity, for "have I seen this directory?"
166
+ */
167
+ function containedPluginDir(marketplacePath, realRoot, source) {
168
+ let lexical;
169
+ try {
170
+ lexical = safePath.joinUnderRoot(marketplacePath, toForwardSlash(source));
171
+ }
172
+ catch {
173
+ return undefined;
174
+ }
175
+ if (!isDirectory(lexical))
176
+ return undefined;
177
+ const real = toForwardSlash(normalizePath(lexical));
178
+ return escapesCorpusRoot(safePath.relative(realRoot, real)) ? undefined : { lexical, real };
179
+ }
180
+ /**
181
+ * Validate the plugins the manifest DECLARES with a local source.
182
+ *
183
+ * 🚨 **This walked `plugins/*` and shipped both defects that has.** The
184
+ * denominator was a count of directories under `plugins/`, so a co-located
185
+ * marketplace (`source: "./"` — the shape `detectResourceFormat` recognises on
186
+ * purpose and `vat audit` recurses into) declared 1, walked 0, and was refused
187
+ * at exit 1 on a code no override can lower; and a manifest declaring
188
+ * `./plugins/a` over a `plugins/` holding only an undeclared `b` validated
189
+ * "1 of 1" and passed with `a` never looked at. Each declared `source` is now
190
+ * resolved against the marketplace root and THAT directory is validated — see
191
+ * {@link containedPluginDir} for the containment the resolution enforces;
192
+ * `extractClaudeMarketplaceInventory` (`vat inventory`/`vat audit`) applies
193
+ * the same predicate on its side. A source that does not resolve to a directory INSIDE the root is
194
+ * simply absent from the results; the builder derives the refusal from that
195
+ * absence, so it lands on the document whatever this function's caller does.
196
+ *
197
+ * Directories under `plugins/` that no entry names come back as `undeclared`,
198
+ * relative to the root: listed, not validated, not a failure. The manifest is
199
+ * the marketplace's contract with its installer — Claude Code installs only
200
+ * what `plugins[]` names — so an undeclared directory cannot ship and grading
201
+ * it would grade something no consumer can receive; failing on it would turn a
202
+ * publishing gate into a tree-hygiene gate. Naming it costs nothing and is what
203
+ * lets a reader tell "the plugin you meant is under another name" from "it is
204
+ * not there at all" when a declared source did not resolve.
72
205
  *
73
206
  * `validation` is the governing project's severity map (see
74
207
  * {@link resolveProjectValidationConfig}). It is applied to each plugin result
@@ -79,36 +212,97 @@ async function validatePluginSkills(pluginDir, marketplacePath) {
79
212
  * `plugins[]`, or a plugin `status: warning` above an issue list that no longer
80
213
  * contains a warning.
81
214
  */
82
- async function validatePlugins(marketplacePath, validation) {
83
- const pluginsDir = safePath.join(marketplacePath, 'plugins');
84
- if (!existsSync(pluginsDir))
85
- return { pluginResults: [], issues: [] };
215
+ async function validateDeclaredPlugins(marketplacePath, declared, validation) {
86
216
  const pluginResults = [];
87
217
  const issues = [];
88
- const entries = readdirSync(pluginsDir, { withFileTypes: true });
89
- for (const entry of entries) {
90
- if (!entry.isDirectory())
218
+ // Keyed by REAL path: one directory is validated once however many entries
219
+ // name it, and the same key is what `undeclaredPluginDirs` compares against.
220
+ const validatedByDir = new Map();
221
+ const realRoot = toForwardSlash(normalizePath(marketplacePath));
222
+ const boundary = new WalkBoundary(marketplacePath, realRoot);
223
+ for (const entry of declared) {
224
+ // A source that names nothing inside the root — nothing at all, a file,
225
+ // an absolute path, a `..` climb, a symlink out — is simply absent from the
226
+ // results, and the builder refuses the run by name from that absence.
227
+ const dir = containedPluginDir(marketplacePath, realRoot, entry.source);
228
+ if (dir === undefined)
91
229
  continue;
92
- const pluginDir = safePath.join(pluginsDir, entry.name);
93
- // `locationRoot` is not optional here even though the parameter is: omitted,
94
- // `validatePlugin` anchors at the plugin's own discovered project root, so
95
- // its findings land in a different coordinate system than the marketplace
96
- // and skill findings beside them — and every plugin's manifest collapses to
97
- // the same `.claude-plugin/plugin.json`.
98
- const rawResult = await validatePlugin(pluginDir, { strict: true, locationRoot: marketplacePath });
99
- const pluginIssues = resolveIssueSeverity(rawResult.issues, validation);
100
- const pluginResult = {
101
- ...rawResult,
102
- issues: pluginIssues,
103
- status: calculateValidationStatus(pluginIssues),
104
- issueCounts: countBySeverity(pluginIssues),
105
- };
106
- pluginResults.push(pluginResult);
107
- issues.push(...pluginIssues);
108
- const skillIssues = await validatePluginSkills(pluginDir, marketplacePath);
230
+ // Two entries, one directory: the directory's findings were collected
231
+ // twice and COUNTED twice (`PLUGIN_MISSING_AUTHOR: 2` for one file). Each
232
+ // entry still gets its row — the manifest declared two — but the file is
233
+ // inspected once and its findings enter `issues` once.
234
+ const seen = validatedByDir.get(dir.real);
235
+ if (seen !== undefined) {
236
+ pluginResults.push({ ...entry, result: seen });
237
+ continue;
238
+ }
239
+ const result = await validateContainedPlugin(dir.lexical, marketplacePath, boundary, validation);
240
+ validatedByDir.set(dir.real, result);
241
+ pluginResults.push({ ...entry, result });
242
+ issues.push(...result.issues);
243
+ const skillIssues = await validatePluginSkills(dir.lexical, marketplacePath, boundary);
109
244
  issues.push(...resolveIssueSeverity(skillIssues, validation));
110
245
  }
111
- return { pluginResults, issues };
246
+ return {
247
+ pluginResults,
248
+ undeclared: undeclaredPluginDirs(marketplacePath, new Set(validatedByDir.keys())),
249
+ refused: boundary.refused,
250
+ issues,
251
+ };
252
+ }
253
+ /**
254
+ * Validate one contained plugin directory — unless its manifest is a link out
255
+ * of the root, in which case the manifest is refused by name and the plugin's
256
+ * row says so instead of carrying findings about a file the run did not read.
257
+ *
258
+ * The row keeps `status: 'error'` with no issues: the error is the refusal
259
+ * the builder publishes once for the run, and a `success` row for a plugin
260
+ * whose manifest was never opened would be the reassuring lie this whole
261
+ * boundary exists to refuse.
262
+ */
263
+ async function validateContainedPlugin(pluginDir, marketplacePath, boundary, validation) {
264
+ const manifestPath = safePath.join(pluginDir, '.claude-plugin', 'plugin.json');
265
+ if (existsSync(manifestPath) && !boundary.contains(manifestPath)) {
266
+ return {
267
+ path: pluginDir,
268
+ type: 'claude-plugin',
269
+ status: 'error',
270
+ summary: `Plugin manifest not read: ${issueLocation(manifestPath, marketplacePath)} resolves outside the marketplace root`,
271
+ issues: [],
272
+ issueCounts: countBySeverity([]),
273
+ };
274
+ }
275
+ // `locationRoot` is not optional here even though the parameter is: omitted,
276
+ // `validatePlugin` anchors at the plugin's own discovered project root, so
277
+ // its findings land in a different coordinate system than the marketplace
278
+ // and skill findings beside them — and every plugin's manifest collapses to
279
+ // the same `.claude-plugin/plugin.json`.
280
+ const rawResult = await validatePlugin(pluginDir, { strict: true, locationRoot: marketplacePath });
281
+ const pluginIssues = resolveIssueSeverity(rawResult.issues, validation);
282
+ return {
283
+ ...rawResult,
284
+ issues: pluginIssues,
285
+ status: calculateValidationStatus(pluginIssues),
286
+ issueCounts: countBySeverity(pluginIssues),
287
+ };
288
+ }
289
+ /**
290
+ * Directories under `<root>/plugins/` that no declared source resolved to,
291
+ * relative to the root. The conventional location is the only one walked: an
292
+ * undeclared plugin anywhere else is indistinguishable from any other directory.
293
+ *
294
+ * @param validatedDirs - REAL paths of the directories the run validated, so
295
+ * the comparison cannot be defeated by two spellings of one directory.
296
+ */
297
+ function undeclaredPluginDirs(marketplacePath, validatedDirs) {
298
+ const pluginsDir = safePath.join(marketplacePath, 'plugins');
299
+ if (!existsSync(pluginsDir))
300
+ return [];
301
+ return readdirSync(pluginsDir, { withFileTypes: true })
302
+ .filter((entry) => entry.isDirectory())
303
+ .map((entry) => safePath.join(pluginsDir, entry.name))
304
+ .filter((dir) => !validatedDirs.has(toForwardSlash(normalizePath(dir))))
305
+ .map((dir) => issueLocation(dir, marketplacePath));
112
306
  }
113
307
  /**
114
308
  * The `validation` config governing findings about `marketplacePath`.
@@ -174,10 +368,13 @@ function resolveProjectValidationConfig(marketplacePath, logger) {
174
368
  *
175
369
  * Severity resolution is likewise INSIDE this function rather than a step the
176
370
  * command adds after it. Its absence is the whole defect this addressed, and a
177
- * command-body step is one a caller can forget: with it here, `status`, the
178
- * exit code, the flat `issues` list and `plugins[].issues` all derive from a
179
- * single resolved set, and the smallest testable entry point is the one that
180
- * includes the filter.
371
+ * command-body step is one a caller can forget: with it here, the flat `issues`
372
+ * list and `plugins[].issues` derive from a single resolved set, and the
373
+ * smallest testable entry point is the one that includes the filter. The run's
374
+ * `status` — and with it the exit code — is derived one step later, in
375
+ * {@link buildMarketplaceValidateReport}, from the issues the document actually
376
+ * publishes: that is where the run-integrity refusal is added, and a status
377
+ * computed here would not see it.
181
378
  *
182
379
  * Exported so that contract is testable against a real marketplace without a
183
380
  * CLI spawn; the command adds only the exit code and the emission.
@@ -201,24 +398,20 @@ export async function collectMarketplaceFindings(marketplacePath, logger) {
201
398
  return {
202
399
  marketplaceResult,
203
400
  pluginResults: [],
401
+ undeclared: [],
402
+ refused: [],
204
403
  issues: [...marketplaceResult.issues],
205
- status: 'error',
206
404
  };
207
405
  }
208
406
  const validation = resolveProjectValidationConfig(marketplacePath, logger);
209
407
  const fileIssues = checkMarketplaceFiles(marketplacePath);
210
- const { pluginResults, issues: pluginIssues } = await validatePlugins(marketplacePath, validation);
408
+ const { pluginResults, undeclared, refused, issues: pluginIssues } = await validateDeclaredPlugins(marketplacePath, marketplaceResult.metadata?.localPluginSources ?? [], validation);
211
409
  const issues = [
212
410
  ...resolveIssueSeverity(marketplaceResult.issues, validation),
213
411
  ...resolveIssueSeverity(fileIssues, validation),
214
412
  ...pluginIssues,
215
413
  ];
216
- return {
217
- marketplaceResult,
218
- pluginResults,
219
- issues,
220
- status: calculateValidationStatus(issues),
221
- };
414
+ return { marketplaceResult, pluginResults, undeclared, refused, issues };
222
415
  }
223
416
  /**
224
417
  * Group key for findings that carry no `location` at all.
@@ -278,19 +471,40 @@ export function summarizeIssuesByLocation(issues) {
278
471
  * against a real marketplace in `payload-path-coordinates.test.ts`, not here.
279
472
  */
280
473
  export function buildMarketplaceValidateReport(input) {
281
- const { status, root, marketplace, pluginResults, issues, issueCounts, summary, duration, verbose } = input;
282
- const plugins = pluginResults.map(r => ({
283
- path: r.path,
284
- status: r.status,
285
- metadata: r.metadata,
286
- issues: r.issues,
474
+ const { root, marketplace, pluginResults, undeclared, refused, bailSummary, duration, verbose } = input;
475
+ const issues = [
476
+ ...unfinishedRunFinding(marketplace, pluginResults, refused),
477
+ ...input.issues,
478
+ ];
479
+ const issueCounts = countBySeverity(issues);
480
+ const plugins = pluginResults.map(({ name, source, result }) => ({
481
+ name,
482
+ source,
483
+ path: result.path,
484
+ status: result.status,
485
+ metadata: result.metadata,
486
+ issues: result.issues,
287
487
  }));
288
488
  return {
289
- status,
489
+ // Derived from the issues THIS document publishes — the refusal above
490
+ // included — so the status, the counts and the listing cannot disagree, and
491
+ // the exit code the command takes from it cannot either.
492
+ status: calculateValidationStatus(issues),
290
493
  // Stated once, and the only absolute path in the document.
291
494
  root,
292
495
  ...(marketplace ? { marketplace } : {}),
496
+ // The numerator. Beside `marketplace.localPluginSources` it says whether
497
+ // every declared source resolved; without it "three local plugins, all
498
+ // clean" and "three local plugins, none looked at" are the same document.
499
+ pluginsValidated: pluginResults.length,
293
500
  plugins: relativizePathEntries(plugins, root),
501
+ // Named, not graded — see `validateDeclaredPlugins`. Always present, so an
502
+ // empty list is a statement that `plugins/` was looked at.
503
+ undeclared: [...undeclared],
504
+ // Paths the walk would not open (real path outside the root) — see
505
+ // `WalkBoundary`. Always present: an empty list says every path the run
506
+ // read was under `root`, which is the containment claim the help text makes.
507
+ refused: [...refused],
294
508
  // One row per inspected asset by default; the flat per-issue list under
295
509
  // `--verbose`. Either way every `location` stays relative to `root` above.
296
510
  issues: verbose === true ? issues : summarizeIssuesByLocation(issues),
@@ -298,10 +512,82 @@ export function buildMarketplaceValidateReport(input) {
298
512
  // severity, so an info-only run is `success` and the info would otherwise
299
513
  // be unreported.
300
514
  issueCounts,
301
- summary,
515
+ summary: bailSummary
516
+ ?? `${issueCounts.errors} error(s), ${issueCounts.warnings} warning(s), ${issueCounts.info} info`,
302
517
  duration,
303
518
  };
304
519
  }
520
+ /**
521
+ * The refusal for a run in which a declared local source did not resolve.
522
+ *
523
+ * 🚨 **Two shapes of this shipped.** First, the plugin walk returned nothing
524
+ * when `plugins/` was absent, and the document carried no count, so a
525
+ * marketplace declaring three relative-path plugins over a missing `plugins/`
526
+ * reported `status: success`, exit 0. Then the count that fixed it —
527
+ * `validated < declared` by NUMBER — was wrong in both directions: a co-located
528
+ * `source: "./"` marketplace walked 0 against declared 1 and was refused, and
529
+ * an undeclared `plugins/b` counted for a declared `a` that did not exist.
530
+ *
531
+ * 🔑 **The condition is by IDENTITY, not by count.** `marketplace.localPluginSources`
532
+ * is the manifest's own list of local entries; `pluginResults` names the entry
533
+ * each validated plugin satisfies. A declared entry with no result is a source
534
+ * that did not resolve to a directory, and that is what is refused — whatever
535
+ * else the tree holds. Both halves are in the document, so the refusal is
536
+ * derivable from the document alone. All-remote stays green (nothing local
537
+ * declared); no entries stays green; an undeclared directory is listed under
538
+ * `undeclared` and stays green here — it cannot ship, so it is not a plugin
539
+ * that went unvalidated; a bailed manifest carries no sources and stays a
540
+ * manifest error alone.
541
+ *
542
+ * The message names the unresolved sources: the reader's next move is to fix
543
+ * the `source` or build the tree, and either needs the name.
544
+ *
545
+ * The second half is the same claim one level down: a path INSIDE a validated
546
+ * plugin that the walk refused to open because it resolves outside the root
547
+ * (`refused`, from {@link WalkBoundary}). The plugin's row exists, but what
548
+ * sits behind that path was never read, so the document is not a verdict
549
+ * about it either. ONE finding carries both halves — the claim is about the
550
+ * run, and two reports about one run is the per-finding duplication
551
+ * `run-integrity.ts` forbids.
552
+ *
553
+ * Derived here in the builder, not in {@link collectMarketplaceFindings}, so
554
+ * the status the document publishes — and the exit code taken from it — cannot
555
+ * be computed over an issue set that lacks it. Shared mechanism:
556
+ * `run-integrity.ts`.
557
+ *
558
+ * @param marketplace - The manifest's metadata; `undefined` when the run bailed
559
+ * @param validated - The declared local plugins the run validated
560
+ * @param refused - Root-relative paths the walk would not open
561
+ * @returns The one finding, or nothing
562
+ */
563
+ function unfinishedRunFinding(marketplace, validated, refused) {
564
+ const declared = marketplace?.localPluginSources ?? [];
565
+ const unresolved = declared.filter((entry) => !validated.some((v) => v.name === entry.name && v.source === entry.source));
566
+ if (unresolved.length === 0 && refused.length === 0)
567
+ return [];
568
+ const parts = [];
569
+ if (unresolved.length > 0) {
570
+ const named = unresolved.map((entry) => `\`${entry.name}\` (${entry.source})`).join(', ');
571
+ parts.push(`The manifest declares ${declared.length} plugin(s) with a local source and this run validated`
572
+ + ` ${validated.length} of them, so this document is not a verdict about the rest: it reads the`
573
+ + ' same as a run over a marketplace whose plugins are all clean.'
574
+ + ` Declared source(s) that did not resolve to a directory under the marketplace root: ${named}.`
575
+ + ' Usually the marketplace was not built, was built somewhere else, or the entry\'s `source`'
576
+ + ' names the wrong directory — `undeclared` above lists the `plugins/` directories the'
577
+ + ' manifest does not name. A source that resolves OUTSIDE the root (a symlink pointing out)'
578
+ + ' is refused the same way: this command never leaves the directory it was pointed at.'
579
+ + ' Fix the `source`, run `vat build` first, or point this command at the built marketplace.');
580
+ }
581
+ if (refused.length > 0) {
582
+ const named = refused.map((path) => `\`${path}\``).join(', ');
583
+ parts.push(`This run refused to open ${refused.length} path(s) inside a validated plugin because each resolves`
584
+ + ` OUTSIDE the marketplace root (a symbolic link pointing out): ${named}.`
585
+ + ' Nothing behind them was read, so this document is not a verdict about the skills or manifest'
586
+ + ' they hold — this command never leaves the directory it was pointed at. Replace each link'
587
+ + ' with the files it points at, or move its target under the marketplace root.');
588
+ }
589
+ return [runIntegrityFinding(parts.join(' '))];
590
+ }
305
591
  /**
306
592
  * Validate a marketplace and hand back its document and exit code, printing
307
593
  * nothing on stdout.
@@ -318,28 +604,26 @@ export async function runMarketplaceValidatePhase(targetPath, options) {
318
604
  try {
319
605
  const marketplacePath = safePath.resolve(targetPath ?? '.');
320
606
  logger.info(`Validating marketplace: ${marketplacePath}`);
321
- const { marketplaceResult, pluginResults, issues, status } = await collectMarketplaceFindings(marketplacePath, logger);
607
+ const { marketplaceResult, pluginResults, undeclared, refused, issues } = await collectMarketplaceFindings(marketplacePath, logger);
608
+ // A bailed run reports WHY it stopped; a completed run reports what it
609
+ // found. Both emit through the one builder, so the document has a single
610
+ // shape either way.
322
611
  const bailed = marketplaceResult.status === 'error';
323
- const issueCounts = countBySeverity(issues);
324
- return {
325
- document: buildMarketplaceValidateReport({
326
- status,
327
- root: marketplacePath,
328
- marketplace: marketplaceResult.metadata,
329
- pluginResults,
330
- issues,
331
- issueCounts,
332
- // A bailed run reports WHY it stopped; a completed run reports what it
333
- // found. Both emit through the one builder, so the document has a
334
- // single shape either way.
335
- summary: bailed
336
- ? marketplaceResult.summary
337
- : `${issueCounts.errors} error(s), ${issueCounts.warnings} warning(s), ${issueCounts.info} info`,
338
- duration: formatDuration(Date.now() - startTime),
339
- verbose: options.verbose === true,
340
- }),
341
- exitCode: status === 'error' ? 1 : 0,
342
- };
612
+ const document = buildMarketplaceValidateReport({
613
+ root: marketplacePath,
614
+ marketplace: marketplaceResult.metadata,
615
+ pluginResults,
616
+ undeclared,
617
+ refused,
618
+ issues,
619
+ ...(bailed ? { bailSummary: marketplaceResult.summary } : {}),
620
+ duration: formatDuration(Date.now() - startTime),
621
+ verbose: options.verbose === true,
622
+ });
623
+ // From the DOCUMENT, so the exit code and the published status are one
624
+ // derivation — the run-integrity refusal lands in the builder, and an exit
625
+ // code computed upstream of it would answer 0 over `status: error`.
626
+ return { document, exitCode: document.status === 'error' ? 1 : 0 };
343
627
  }
344
628
  catch (error) {
345
629
  return {
@@ -350,7 +634,9 @@ export async function runMarketplaceValidatePhase(targetPath, options) {
350
634
  }
351
635
  }
352
636
  async function marketplaceValidateCommand(targetPath, options) {
353
- finishCommand(await runMarketplaceValidatePhase(targetPath, options), writeYamlOutput);
637
+ // `undefined`: this command offers no `--format`, so its failure envelope is
638
+ // YAML like its report.
639
+ finishCommand(await runMarketplaceValidatePhase(targetPath, options), writeYamlOutput, undefined);
354
640
  }
355
641
  export function createMarketplaceValidateCommand() {
356
642
  const command = new Command('validate');
@@ -370,6 +656,25 @@ Description:
370
656
  Output (YAML on stdout):
371
657
  root: the marketplace directory — every location below is relative to it
372
658
  status, issueCounts, summary, duration, marketplace, plugins
659
+ pluginsValidated: how many of the manifest's relative-path sources
660
+ (marketplace.localPluginSources) resolved to a directory and were
661
+ validated — each plugins[] row names the entry it satisfies. A
662
+ declared source that does not resolve is reported as
663
+ RESOURCE_CHECK_BROKEN at error (exit 1), naming it, rather than as
664
+ a pass — a plugin the manifest ships and this run never saw is not
665
+ a verdict. A source is never followed outside the root: an absolute
666
+ path or a ".." segment fails the manifest schema, and a symlink that
667
+ points out is refused like an unresolved source. Co-located
668
+ marketplaces (source: "./") are validated at the root. An
669
+ all-remote marketplace has nothing local and stays green.
670
+ undeclared: directories under plugins/ that no manifest entry names.
671
+ Listed only — they cannot be installed, so they are neither
672
+ validated nor a failure.
673
+ refused: paths inside a validated plugin this run would not open because
674
+ they resolve outside the root (a skills/ dir, skill dir, SKILL.md
675
+ or plugin.json that is a symlink pointing out). Containment is by
676
+ real path at every depth, not only at the declared source; each is
677
+ named here and in the RESOURCE_CHECK_BROKEN finding (exit 1).
373
678
 
374
679
  issues: one row per inspected location, carrying only that location's counts
375
680
  ({location, errors?, warnings?, info?, codes}). A zero bucket is
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../src/commands/claude/marketplace/validate.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGlD,OAAO,EACL,mBAAmB,EACnB,aAAa,GAEd,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EACL,yBAAyB,EACzB,eAAe,GAIhB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,cAA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