@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.
- package/README.md +4 -4
- package/dist/bin.js +41 -158
- package/dist/bin.js.map +1 -1
- package/dist/command-loaders.d.ts +2 -2
- package/dist/command-loaders.d.ts.map +1 -1
- package/dist/command-loaders.js +4 -2
- package/dist/command-loaders.js.map +1 -1
- package/dist/commands/ard/emit.d.ts +104 -0
- package/dist/commands/ard/emit.d.ts.map +1 -0
- package/dist/commands/ard/emit.js +223 -0
- package/dist/commands/ard/emit.js.map +1 -0
- package/dist/commands/ard/index.d.ts +12 -0
- package/dist/commands/ard/index.d.ts.map +1 -0
- package/dist/commands/ard/index.js +79 -0
- package/dist/commands/ard/index.js.map +1 -0
- package/dist/commands/ard/surfaces.d.ts +56 -0
- package/dist/commands/ard/surfaces.d.ts.map +1 -0
- package/dist/commands/ard/surfaces.js +150 -0
- package/dist/commands/ard/surfaces.js.map +1 -0
- package/dist/commands/audit.d.ts +75 -8
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +726 -127
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/claude/budget.d.ts +13 -0
- package/dist/commands/claude/budget.d.ts.map +1 -1
- package/dist/commands/claude/budget.js +80 -28
- package/dist/commands/claude/budget.js.map +1 -1
- package/dist/commands/claude/claude-config.d.ts.map +1 -1
- package/dist/commands/claude/claude-config.js +6 -0
- package/dist/commands/claude/claude-config.js.map +1 -1
- package/dist/commands/claude/context.js +1 -1
- package/dist/commands/claude/context.js.map +1 -1
- package/dist/commands/claude/marketplace/validate.d.ts +55 -22
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +380 -75
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/org/helpers.d.ts +59 -1
- package/dist/commands/claude/org/helpers.d.ts.map +1 -1
- package/dist/commands/claude/org/helpers.js +58 -7
- package/dist/commands/claude/org/helpers.js.map +1 -1
- package/dist/commands/claude/org/index.d.ts.map +1 -1
- package/dist/commands/claude/org/index.js +24 -16
- package/dist/commands/claude/org/index.js.map +1 -1
- package/dist/commands/claude/org/skills.d.ts +509 -0
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +1364 -94
- package/dist/commands/claude/org/skills.js.map +1 -1
- package/dist/commands/claude/org/users.d.ts.map +1 -1
- package/dist/commands/claude/org/users.js +3 -1
- package/dist/commands/claude/org/users.js.map +1 -1
- package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
- package/dist/commands/claude/org/workspaces.js +5 -2
- package/dist/commands/claude/org/workspaces.js.map +1 -1
- package/dist/commands/claude/plugin/build.d.ts +8 -0
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +16 -2
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts +72 -0
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +215 -10
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/corpus/index.d.ts.map +1 -1
- package/dist/commands/corpus/index.js +3 -0
- package/dist/commands/corpus/index.js.map +1 -1
- package/dist/commands/corpus/report.d.ts +0 -1
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/report.js +0 -1
- package/dist/commands/corpus/report.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts +58 -1
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +90 -15
- package/dist/commands/corpus/runner.js.map +1 -1
- package/dist/commands/corpus/scan.d.ts.map +1 -1
- package/dist/commands/corpus/scan.js +0 -1
- package/dist/commands/corpus/scan.js.map +1 -1
- package/dist/commands/doctor.d.ts +14 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +96 -18
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/okf/index.d.ts +11 -0
- package/dist/commands/okf/index.d.ts.map +1 -0
- package/dist/commands/okf/index.js +102 -0
- package/dist/commands/okf/index.js.map +1 -0
- package/dist/commands/okf/validate.d.ts +82 -0
- package/dist/commands/okf/validate.d.ts.map +1 -0
- package/dist/commands/okf/validate.js +157 -0
- package/dist/commands/okf/validate.js.map +1 -0
- package/dist/commands/phase-utils.d.ts +19 -3
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +26 -5
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/rag/index-command.d.ts +27 -2
- package/dist/commands/rag/index-command.d.ts.map +1 -1
- package/dist/commands/rag/index-command.js +44 -7
- package/dist/commands/rag/index-command.js.map +1 -1
- package/dist/commands/rag/index.d.ts.map +1 -1
- package/dist/commands/rag/index.js +2 -0
- package/dist/commands/rag/index.js.map +1 -1
- package/dist/commands/resources/check-progress.d.ts +3 -0
- package/dist/commands/resources/check-progress.d.ts.map +1 -1
- package/dist/commands/resources/check-progress.js +6 -0
- package/dist/commands/resources/check-progress.js.map +1 -1
- package/dist/commands/resources/check.d.ts +33 -4
- package/dist/commands/resources/check.d.ts.map +1 -1
- package/dist/commands/resources/check.js +131 -44
- package/dist/commands/resources/check.js.map +1 -1
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +41 -9
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query.d.ts +18 -1
- package/dist/commands/resources/query.d.ts.map +1 -1
- package/dist/commands/resources/query.js +29 -4
- package/dist/commands/resources/query.js.map +1 -1
- package/dist/commands/resources/validate.d.ts +29 -0
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +116 -13
- package/dist/commands/resources/validate.js.map +1 -1
- package/dist/commands/skill/review-checklist.d.ts.map +1 -1
- package/dist/commands/skill/review-checklist.js +35 -0
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +9 -2
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/configure.d.ts +37 -0
- package/dist/commands/skill/test/configure.d.ts.map +1 -1
- package/dist/commands/skill/test/configure.js +57 -12
- package/dist/commands/skill/test/configure.js.map +1 -1
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +21 -6
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +16 -3
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/list.d.ts +2 -1
- package/dist/commands/skills/list.d.ts.map +1 -1
- package/dist/commands/skills/list.js +31 -9
- package/dist/commands/skills/list.js.map +1 -1
- package/dist/commands/skills/skill-discovery.d.ts +40 -1
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +32 -3
- package/dist/commands/skills/skill-discovery.js.map +1 -1
- package/dist/commands/skills/validate-command.d.ts.map +1 -1
- package/dist/commands/skills/validate-command.js +11 -3
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate.d.ts +66 -7
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +133 -29
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +94 -3
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +192 -45
- package/dist/commands/verify.js.map +1 -1
- package/dist/skill-resolution/packaging-config.d.ts +49 -5
- package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
- package/dist/skill-resolution/packaging-config.js +59 -19
- package/dist/skill-resolution/packaging-config.js.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.js +6 -3
- package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
- package/dist/utils/command-error.d.ts +31 -0
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +45 -0
- package/dist/utils/command-error.js.map +1 -1
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +22 -6
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/edge-lens-evaluation.d.ts +83 -0
- package/dist/utils/edge-lens-evaluation.d.ts.map +1 -0
- package/dist/utils/edge-lens-evaluation.js +110 -0
- package/dist/utils/edge-lens-evaluation.js.map +1 -0
- package/dist/utils/optional-backend.d.ts +5 -4
- package/dist/utils/optional-backend.d.ts.map +1 -1
- package/dist/utils/optional-backend.js +5 -4
- package/dist/utils/optional-backend.js.map +1 -1
- package/dist/utils/project-root-policy.d.ts +20 -0
- package/dist/utils/project-root-policy.d.ts.map +1 -1
- package/dist/utils/project-root-policy.js +32 -0
- package/dist/utils/project-root-policy.js.map +1 -1
- package/dist/utils/projection-query.d.ts +41 -4
- package/dist/utils/projection-query.d.ts.map +1 -1
- package/dist/utils/projection-query.js +44 -10
- package/dist/utils/projection-query.js.map +1 -1
- package/dist/utils/projection-store.d.ts +41 -15
- package/dist/utils/projection-store.d.ts.map +1 -1
- package/dist/utils/projection-store.js +65 -18
- package/dist/utils/projection-store.js.map +1 -1
- package/dist/utils/repeatable-option.d.ts +37 -0
- package/dist/utils/repeatable-option.d.ts.map +1 -0
- package/dist/utils/repeatable-option.js +39 -0
- package/dist/utils/repeatable-option.js.map +1 -0
- package/dist/utils/resource-loader.d.ts +4 -3
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +61 -30
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/root-argv.d.ts +53 -0
- package/dist/utils/root-argv.d.ts.map +1 -0
- package/dist/utils/root-argv.js +215 -0
- package/dist/utils/root-argv.js.map +1 -0
- package/dist/utils/run-integrity.d.ts +95 -0
- package/dist/utils/run-integrity.d.ts.map +1 -0
- package/dist/utils/run-integrity.js +102 -0
- package/dist/utils/run-integrity.js.map +1 -0
- package/dist/utils/sqlite-experimental-warning.d.ts +69 -0
- package/dist/utils/sqlite-experimental-warning.d.ts.map +1 -0
- package/dist/utils/sqlite-experimental-warning.js +144 -0
- package/dist/utils/sqlite-experimental-warning.js.map +1 -0
- package/dist/utils/user-context-scanner.d.ts +8 -0
- package/dist/utils/user-context-scanner.d.ts.map +1 -1
- package/dist/utils/user-context-scanner.js +4 -0
- package/dist/utils/user-context-scanner.js.map +1 -1
- package/dist/utils/validate-help-files.d.ts.map +1 -1
- package/dist/utils/validate-help-files.js +9 -2
- package/dist/utils/validate-help-files.js.map +1 -1
- package/docs/audit.md +120 -7
- package/docs/doctor.md +6 -6
- package/docs/index.md +1 -1
- package/docs/rag.md +3 -1
- package/docs/resources.md +5 -1
- package/docs/skills.md +47 -62
- package/package.json +18 -18
|
@@ -11,7 +11,7 @@ import { basename, dirname } from 'node:path';
|
|
|
11
11
|
import { readDeclaredSkillName } from '@vibe-agent-toolkit/agent-skills';
|
|
12
12
|
import { getClaudeUserPaths } from '@vibe-agent-toolkit/claude-marketplace';
|
|
13
13
|
import { scan } from '@vibe-agent-toolkit/discovery';
|
|
14
|
-
import { safePath } from '@vibe-agent-toolkit/utils';
|
|
14
|
+
import { safePath, toForwardSlash } from '@vibe-agent-toolkit/utils';
|
|
15
15
|
import { loadConfig } from '../../utils/config-loader.js';
|
|
16
16
|
import { createLogger } from '../../utils/logger.js';
|
|
17
17
|
import { relativizePathEntries } from '../../utils/relativize-paths.js';
|
|
@@ -57,10 +57,13 @@ function processDiscoveredSkills(discoveredSkills) {
|
|
|
57
57
|
* `path` beneath it is relative to it. Absolute paths here named the operator's
|
|
58
58
|
* home directory on every `--user` run and made two machines' output undiffable.
|
|
59
59
|
*/
|
|
60
|
-
export function formatSkillsYaml(skills, context, root) {
|
|
60
|
+
export function formatSkillsYaml(skills, context, root, unreadable) {
|
|
61
61
|
const lines = [
|
|
62
62
|
'---',
|
|
63
|
-
|
|
63
|
+
// `warning`, not `success`, when the scan could not list a directory: the
|
|
64
|
+
// count below is then a floor, not the answer, and the document a CI
|
|
65
|
+
// wrapper diffs is the place that has to say so — stderr is not.
|
|
66
|
+
`status: ${unreadable.length === 0 ? 'success' : 'warning'}`,
|
|
64
67
|
`root: ${root}`,
|
|
65
68
|
`context: ${context}`,
|
|
66
69
|
`skillsFound: ${skills.length}`,
|
|
@@ -72,6 +75,15 @@ export function formatSkillsYaml(skills, context, root) {
|
|
|
72
75
|
lines.push(` warning: "${skill.warning}"`);
|
|
73
76
|
}
|
|
74
77
|
}
|
|
78
|
+
// Same root-relative coordinates as every skill path above, and REQUIRED of
|
|
79
|
+
// every caller (no default): a lane that inherited `[]` would publish
|
|
80
|
+
// `status: success` over a listing it knows to be short.
|
|
81
|
+
if (unreadable.length > 0) {
|
|
82
|
+
lines.push('unreadable:');
|
|
83
|
+
for (const refusal of unreadable) {
|
|
84
|
+
lines.push(` - path: ${toForwardSlash(safePath.relative(root, refusal.directory)) || '.'}`, ` code: ${refusal.code}`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
75
87
|
return `${lines.join('\n')}\n`;
|
|
76
88
|
}
|
|
77
89
|
/**
|
|
@@ -83,7 +95,11 @@ export function formatSkillsYaml(skills, context, root) {
|
|
|
83
95
|
* `root` alongside; stderr states no root, so a relative path there would be
|
|
84
96
|
* unresolvable.
|
|
85
97
|
*/
|
|
86
|
-
function outputSkillsHuman(skills, logger, options) {
|
|
98
|
+
function outputSkillsHuman(skills, unreadable, logger, options) {
|
|
99
|
+
// Absolute, like every other path on this channel — see the docstring.
|
|
100
|
+
for (const refusal of unreadable) {
|
|
101
|
+
logger.info(`warning: could not list ${refusal.directory} (${refusal.code}); any skill beneath it is missing from this list.`);
|
|
102
|
+
}
|
|
87
103
|
if (skills.length === 0) {
|
|
88
104
|
logger.info(`\n No skills found`);
|
|
89
105
|
return;
|
|
@@ -146,8 +162,11 @@ async function listFromNpmSource(source, logger, options) {
|
|
|
146
162
|
const skills = scanSkillsDir(resolved.skillsDir);
|
|
147
163
|
// The extracted package's own skills dir is the base — the enclosing temp
|
|
148
164
|
// directory is an implementation detail nobody can act on.
|
|
149
|
-
|
|
150
|
-
|
|
165
|
+
// `[]` is a statement, not a default: `scanSkillsDir` is a `readdirSync`
|
|
166
|
+
// over a tree this process just extracted, so there is no walk that can be
|
|
167
|
+
// refused short of the extraction itself failing.
|
|
168
|
+
process.stdout.write(formatSkillsYaml(skills, 'npm', resolved.skillsDir, []));
|
|
169
|
+
outputSkillsHuman(skills, [], logger, options);
|
|
151
170
|
process.exit(0);
|
|
152
171
|
}
|
|
153
172
|
finally {
|
|
@@ -174,10 +193,12 @@ export async function listCommand(pathArg, options) {
|
|
|
174
193
|
// The ONE base every reported path is relative to. User and project runs
|
|
175
194
|
// scan different trees, so each names its own.
|
|
176
195
|
let root;
|
|
196
|
+
let unreadable;
|
|
177
197
|
if (options.user) {
|
|
178
198
|
// User context: scan ~/.claude
|
|
179
199
|
logger.info('📋 Listing user-installed skills');
|
|
180
|
-
const { plugins, skills: standaloneSkills } = await scanUserContext();
|
|
200
|
+
const { plugins, skills: standaloneSkills, unreadable: userUnreadable } = await scanUserContext();
|
|
201
|
+
unreadable = userUnreadable;
|
|
181
202
|
const allResources = [...plugins, ...standaloneSkills];
|
|
182
203
|
const discoveredSkills = discoverSkills(allResources);
|
|
183
204
|
skills = processDiscoveredSkills(discoveredSkills);
|
|
@@ -201,11 +222,12 @@ export async function listCommand(pathArg, options) {
|
|
|
201
222
|
skills = processDiscoveredSkills(discoveredSkills);
|
|
202
223
|
context = 'project';
|
|
203
224
|
root = safePath.resolve(rootDir);
|
|
225
|
+
unreadable = scanResult.unreadable;
|
|
204
226
|
}
|
|
205
227
|
// Output YAML to stdout
|
|
206
|
-
process.stdout.write(formatSkillsYaml(skills, context, root));
|
|
228
|
+
process.stdout.write(formatSkillsYaml(skills, context, root, unreadable));
|
|
207
229
|
// Human-friendly output to stderr
|
|
208
|
-
outputSkillsHuman(skills, logger, options);
|
|
230
|
+
outputSkillsHuman(skills, unreadable, logger, options);
|
|
209
231
|
process.exit(0);
|
|
210
232
|
}
|
|
211
233
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/skills/list.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAoB,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/skills/list.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAoB,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGrE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAA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CAAC;QAEvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,MAAM,CAAC,KAAK,CAAC,0BAA0B,YAAY,EAAE,CAAC,CAAC;QACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -5,14 +5,51 @@
|
|
|
5
5
|
* finds matching SKILL.md files, and extracts skill names from frontmatter.
|
|
6
6
|
*/
|
|
7
7
|
import type { SkillsConfig } from '@vibe-agent-toolkit/resources';
|
|
8
|
+
import { type UnreadablePolicy } from '@vibe-agent-toolkit/utils/crawl';
|
|
8
9
|
import type { DiscoveredSkill } from './command-helpers.js';
|
|
10
|
+
/**
|
|
11
|
+
* How discovery treats a directory its crawl cannot list. REQUIRED at every
|
|
12
|
+
* call — there is no default, so `tsc` enumerates the callers and each one
|
|
13
|
+
* carries its decision at the call site.
|
|
14
|
+
*
|
|
15
|
+
* `'refuse'` — discovery throws `DirectoryListingRefusedError` with the
|
|
16
|
+
* adopter-facing sentence (root-relative directory, `skills.include` remedy),
|
|
17
|
+
* because a shorter skill list is the tell-less drop every command downstream
|
|
18
|
+
* would then confidently work from. The right answer for `vat skills validate`,
|
|
19
|
+
* `vat skills build`, `vat verify` and the rest, which must not act on a
|
|
20
|
+
* population they could not see. Discovery owns the sentence, which is why the
|
|
21
|
+
* arm is a literal here rather than the crawler's `{ refuse: { root, remedy } }`.
|
|
22
|
+
*
|
|
23
|
+
* `{ degrade }` — for a caller whose honest answer is to keep going: `vat
|
|
24
|
+
* audit`, which reports an unreadable path as `SCAN_PATH_UNREADABLE` and
|
|
25
|
+
* validates every readable sibling. Discovery enumerates around the refused
|
|
26
|
+
* directory, hands the refusal to the handler, and returns every skill it
|
|
27
|
+
* COULD see. The same arm, same shape, as the crawler's own.
|
|
28
|
+
*
|
|
29
|
+
* 🪤 This was `DiscoveryOptions { onUnreadable?: … }`, optional, defaulting to
|
|
30
|
+
* refuse. Every caller that omitted it compiled, and the one that should have
|
|
31
|
+
* degraded surfaced a round later as a HIGH.
|
|
32
|
+
*/
|
|
33
|
+
export type DiscoveryUnreadablePolicy = 'refuse' | Extract<UnreadablePolicy, {
|
|
34
|
+
degrade: unknown;
|
|
35
|
+
}>;
|
|
9
36
|
/**
|
|
10
37
|
* Read a skill's name from SKILL.md frontmatter, falling back to its H1 title and
|
|
11
38
|
* then its filename. Exported so the Claude plugin build resolves a plugin-local
|
|
12
39
|
* skill's name through the SAME definition `vat skills build` uses — per-skill
|
|
13
40
|
* config is keyed by name, so two answers would mean two effective configs.
|
|
41
|
+
*
|
|
42
|
+
* The fallback is a KEY, not a verdict. A name is optional on the agentskills.io
|
|
43
|
+
* schema, so a nameless frontmatter block is a legal skill and needs a key; a
|
|
44
|
+
* file with NO frontmatter at all is not a skill, but discovery still returns it
|
|
45
|
+
* under this key so the glob match is reported rather than dropped — the
|
|
46
|
+
* packaging validator refuses it as `SKILL_MISSING_FRONTMATTER`, located at the
|
|
47
|
+
* file's path. Excluding it here instead would shrink the denominator silently,
|
|
48
|
+
* which is the exact tell-less drop `includeUntracked` below exists to prevent.
|
|
14
49
|
*/
|
|
15
50
|
export declare function readSkillName(skillPath: string): Promise<string | undefined>;
|
|
51
|
+
/** The knob an adopter has when `skills.include` reaches a directory the crawl cannot list. */
|
|
52
|
+
export declare const SKILLS_INCLUDE_REMEDY = "Fix the permissions on that directory, or narrow the `skills.include` pattern so its base no longer reaches into it.";
|
|
16
53
|
/**
|
|
17
54
|
* Discover skills from config yaml skills section.
|
|
18
55
|
*
|
|
@@ -28,7 +65,9 @@ export declare function readSkillName(skillPath: string): Promise<string | undef
|
|
|
28
65
|
*
|
|
29
66
|
* @param skillsConfig - The skills section from vibe-agent-toolkit.config.yaml
|
|
30
67
|
* @param projectRoot - Absolute path to project root (where config yaml lives)
|
|
68
|
+
* @param unreadable - What to do with a directory the crawl cannot list —
|
|
69
|
+
* see {@link DiscoveryUnreadablePolicy}; required, no default
|
|
31
70
|
* @returns Array of discovered skills with names and source paths
|
|
32
71
|
*/
|
|
33
|
-
export declare function discoverSkillsFromConfig(skillsConfig: SkillsConfig, projectRoot: string): Promise<DiscoveredSkill[]>;
|
|
72
|
+
export declare function discoverSkillsFromConfig(skillsConfig: SkillsConfig, projectRoot: string, unreadable: DiscoveryUnreadablePolicy): Promise<DiscoveredSkill[]>;
|
|
34
73
|
//# sourceMappingURL=skill-discovery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-discovery.d.ts","sourceRoot":"","sources":["../../../src/commands/skills/skill-discovery.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"skill-discovery.d.ts","sourceRoot":"","sources":["../../../src/commands/skills/skill-discovery.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG,OAAO,CAAC,gBAAgB,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAYnG;;;;;;;;;;;;;GAaG;AACH,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAkBlF;AA0FD,+FAA+F;AAC/F,eAAO,MAAM,qBAAqB,yHACsF,CAAC;AAEzH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,wBAAwB,CAC5C,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,yBAAyB,GACpC,OAAO,CAAC,eAAe,EAAE,CAAC,CA0B5B"}
|
|
@@ -24,6 +24,14 @@ const DISCOVERY_EXCLUDE = [
|
|
|
24
24
|
* then its filename. Exported so the Claude plugin build resolves a plugin-local
|
|
25
25
|
* skill's name through the SAME definition `vat skills build` uses — per-skill
|
|
26
26
|
* config is keyed by name, so two answers would mean two effective configs.
|
|
27
|
+
*
|
|
28
|
+
* The fallback is a KEY, not a verdict. A name is optional on the agentskills.io
|
|
29
|
+
* schema, so a nameless frontmatter block is a legal skill and needs a key; a
|
|
30
|
+
* file with NO frontmatter at all is not a skill, but discovery still returns it
|
|
31
|
+
* under this key so the glob match is reported rather than dropped — the
|
|
32
|
+
* packaging validator refuses it as `SKILL_MISSING_FRONTMATTER`, located at the
|
|
33
|
+
* file's path. Excluding it here instead would shrink the denominator silently,
|
|
34
|
+
* which is the exact tell-less drop `includeUntracked` below exists to prevent.
|
|
27
35
|
*/
|
|
28
36
|
export async function readSkillName(skillPath) {
|
|
29
37
|
const parsed = await parseFileCached(skillPath, 'markdown');
|
|
@@ -84,7 +92,7 @@ function groupIncludePatternsByBase(include, projectRoot) {
|
|
|
84
92
|
* the root does not exist (mirrors audit's filesystem-first tolerance for
|
|
85
93
|
* patterns pointing at nothing).
|
|
86
94
|
*/
|
|
87
|
-
async function crawlOneBase(base, globs) {
|
|
95
|
+
async function crawlOneBase(base, globs, projectRoot, unreadable) {
|
|
88
96
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- base derived from validated config
|
|
89
97
|
if (!existsSync(base)) {
|
|
90
98
|
return [];
|
|
@@ -102,8 +110,27 @@ async function crawlOneBase(base, globs) {
|
|
|
102
110
|
// this and keeps the fast path (unlike `respectGitignore: false`, which costs
|
|
103
111
|
// a full walk); the inventory lane already used it for the same reason.
|
|
104
112
|
includeUntracked: true,
|
|
113
|
+
// Under `'refuse'`, a directory the crawl cannot LIST stops discovery, by
|
|
114
|
+
// name. The alternative — enumerate around it — is the same tell-less drop
|
|
115
|
+
// described above, from the other direction: one fewer skill, exit 0, and
|
|
116
|
+
// every command downstream (build, validate, verify, audit's config-aware
|
|
117
|
+
// lane) confidently working from the shorter list. The remedy names
|
|
118
|
+
// `skills.include` rather than `skills.exclude`, because `exclude` is
|
|
119
|
+
// applied to the crawl's RESULT and cannot stop the crawl from entering
|
|
120
|
+
// the directory; only a narrower include base can. Expressed against the
|
|
121
|
+
// project root — the coordinates the include pattern itself is written in,
|
|
122
|
+
// `..` and all.
|
|
123
|
+
//
|
|
124
|
+
// A caller that has decided to degrade passes its handler straight through
|
|
125
|
+
// (see {@link DiscoveryUnreadablePolicy}); the refusal is then reported by
|
|
126
|
+
// that caller, and the crawl continues past the directory.
|
|
127
|
+
unreadable: unreadable === 'refuse'
|
|
128
|
+
? { refuse: { root: projectRoot, remedy: SKILLS_INCLUDE_REMEDY } }
|
|
129
|
+
: unreadable,
|
|
105
130
|
});
|
|
106
131
|
}
|
|
132
|
+
/** The knob an adopter has when `skills.include` reaches a directory the crawl cannot list. */
|
|
133
|
+
export const SKILLS_INCLUDE_REMEDY = 'Fix the permissions on that directory, or narrow the `skills.include` pattern so its base no longer reaches into it.';
|
|
107
134
|
/**
|
|
108
135
|
* Discover skills from config yaml skills section.
|
|
109
136
|
*
|
|
@@ -119,9 +146,11 @@ async function crawlOneBase(base, globs) {
|
|
|
119
146
|
*
|
|
120
147
|
* @param skillsConfig - The skills section from vibe-agent-toolkit.config.yaml
|
|
121
148
|
* @param projectRoot - Absolute path to project root (where config yaml lives)
|
|
149
|
+
* @param unreadable - What to do with a directory the crawl cannot list —
|
|
150
|
+
* see {@link DiscoveryUnreadablePolicy}; required, no default
|
|
122
151
|
* @returns Array of discovered skills with names and source paths
|
|
123
152
|
*/
|
|
124
|
-
export async function discoverSkillsFromConfig(skillsConfig, projectRoot) {
|
|
153
|
+
export async function discoverSkillsFromConfig(skillsConfig, projectRoot, unreadable) {
|
|
125
154
|
const { include, exclude } = skillsConfig;
|
|
126
155
|
const patternsByBase = groupIncludePatternsByBase(include, projectRoot);
|
|
127
156
|
const userExcludeMatcher = exclude && exclude.length > 0
|
|
@@ -129,7 +158,7 @@ export async function discoverSkillsFromConfig(skillsConfig, projectRoot) {
|
|
|
129
158
|
: null;
|
|
130
159
|
const foundAbsPaths = new Set();
|
|
131
160
|
for (const [base, globs] of patternsByBase) {
|
|
132
|
-
const crawled = await crawlOneBase(base, globs);
|
|
161
|
+
const crawled = await crawlOneBase(base, globs, projectRoot, unreadable);
|
|
133
162
|
for (const absPath of crawled) {
|
|
134
163
|
if (userExcludeMatcher) {
|
|
135
164
|
const relFromProject = toForwardSlash(safePath.relative(projectRoot, absPath));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-discovery.js","sourceRoot":"","sources":["../../../src/commands/skills/skill-discovery.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"skill-discovery.js","sourceRoot":"","sources":["../../../src/commands/skills/skill-discovery.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;A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AC;QAC3C,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;QACzE,KAAK,MAAM,OAAO,IAAI,OAAO,EAAE,CAAC;YAC9B,IAAI,kBAAkB,EAAE,CAAC;gBACvB,MAAM,cAAc,GAAG,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;gBAC/E,IAAI,kBAAkB,CAAC,cAAc,CAAC;oBAAE,SAAS;YACnD,CAAC;YACD,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAED,MAAM,UAAU,GAAsB,EAAE,CAAC;IACzC,KAAK,MAAM,SAAS,IAAI,aAAa,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,SAAS,CAAC,CAAC;QAC5C,IAAI,IAAI;YAAE,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,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;AAoBpC,wBAAgB,qBAAqB,IAAI,OAAO,
|
|
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,CAqH/C"}
|
|
@@ -43,8 +43,10 @@ Description:
|
|
|
43
43
|
|
|
44
44
|
Validation Checks:
|
|
45
45
|
Required (non-overridable):
|
|
46
|
-
-
|
|
47
|
-
|
|
46
|
+
- A YAML frontmatter block that parses. A matched file with none — a
|
|
47
|
+
README the glob drifted onto, a SKILL.md that lost its fence — is
|
|
48
|
+
refused as SKILL_MISSING_FRONTMATTER at error, not passed as a skill.
|
|
49
|
+
(A block without a name is legal — agentskills.io makes name optional.)
|
|
48
50
|
- No reserved words (anthropic/claude)
|
|
49
51
|
- No broken internal links
|
|
50
52
|
- No circular references
|
|
@@ -107,9 +109,15 @@ Output:
|
|
|
107
109
|
Run-level findings (validation.allow entries no skill matched) are printed
|
|
108
110
|
in full in both forms; they belong to the project config, not to any skill.
|
|
109
111
|
|
|
112
|
+
A run that validated ZERO skills — skills.include globs that matched no
|
|
113
|
+
SKILL.md — is refused, not passed: one non-overridable RESOURCE_CHECK_BROKEN
|
|
114
|
+
at error naming the globs, status: error, exit 1. A config with no skills:
|
|
115
|
+
block at all is "nothing to validate": no document, exit 0.
|
|
116
|
+
|
|
110
117
|
Exit Codes:
|
|
111
118
|
0 - All validations passed (or all errors allowed by valid config)
|
|
112
|
-
1 - Validation errors found (severity=error, not allowed)
|
|
119
|
+
1 - Validation errors found (severity=error, not allowed), or the run
|
|
120
|
+
validated no skill (skills.include matched nothing)
|
|
113
121
|
2 - System error (config invalid, skill path not found)
|
|
114
122
|
|
|
115
123
|
Requirements:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-command.js","sourceRoot":"","sources":["../../../src/commands/skills/validate-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAA2B,MAAM,kBAAkB,CAAC;AACjF,OAAO,EAAqC,eAAe,EAAE,MAAM,eAAe,CAAC;AAEnF;;;;;;;;;GASG;AACH,MAAM,aAAa,GAAuB;IACxC,OAAO,EAAE,qBAAqB;IAC9B,aAAa,EAAE,qBAAqB;CACrC,CAAC;AAEF,M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AA2B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGL,CACI,CAAC;IAEJ,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* using validateSkillForPackaging with merged packaging config.
|
|
6
6
|
*/
|
|
7
7
|
import { type DeclaredEvalSuite, type PackagingValidationResult, type SkillPackagingConfig, type SkillValidationSharedContext } from '@vibe-agent-toolkit/agent-skills';
|
|
8
|
-
import { ResourceRegistry, type ProjectConfig, type ResourcePopulationSource } from '@vibe-agent-toolkit/resources';
|
|
8
|
+
import { ResourceRegistry, type ProjectConfig, type ResourcePopulationSource, type SkillsConfig } from '@vibe-agent-toolkit/resources';
|
|
9
9
|
import { type SeverityCounts, type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
10
10
|
import { type createLogger } from '../../utils/logger.js';
|
|
11
11
|
import { type PhaseOutcome } from '../phase-utils.js';
|
|
@@ -36,6 +36,46 @@ type ValidationStatus = 'success' | 'warning' | 'error';
|
|
|
36
36
|
* validated at the time is what produced 78 warnings from 3 real entries.
|
|
37
37
|
*/
|
|
38
38
|
type RunIssues = readonly ValidationIssue[];
|
|
39
|
+
/**
|
|
40
|
+
* The discovery declaration a run's document answers for: the globs that
|
|
41
|
+
* decided which skills it validated. Only these two keys are read, so a caller
|
|
42
|
+
* with a full `SkillsConfig` and a test with two arrays hand in the same thing.
|
|
43
|
+
*/
|
|
44
|
+
export type SkillDiscoveryPatterns = Pick<SkillsConfig, 'include' | 'exclude'>;
|
|
45
|
+
/**
|
|
46
|
+
* The run-level findings, with the run-integrity refusal derived in front of
|
|
47
|
+
* them when the run validated no skill.
|
|
48
|
+
*
|
|
49
|
+
* 🚨 **Zero skills validated is an ERROR, not a clean run.** `skills.include`
|
|
50
|
+
* globs that discover nothing — a typo, a renamed directory, an `exclude` that
|
|
51
|
+
* swallows every match — used to take an early return that printed one info
|
|
52
|
+
* line and published NO document at exit 0, and `vat validate` folded that into
|
|
53
|
+
* `status: success`: the gate the docs name as THE gate, green forever on a
|
|
54
|
+
* config that checked nothing. `vat verify` refused the identical config in its
|
|
55
|
+
* `packaged-content` phase and its message sent the operator to this command,
|
|
56
|
+
* which then said nothing.
|
|
57
|
+
*
|
|
58
|
+
* 🔑 The ONE seam both channels read. {@link buildValidateSummary} (the
|
|
59
|
+
* document) and {@link formatValidationReportLines} (stderr) both derive their
|
|
60
|
+
* issue set here, so "denominator zero, status clean" is unrepresentable on
|
|
61
|
+
* either channel rather than merely unwritten, and the exit code — derived from
|
|
62
|
+
* the document's own counts — agrees with both by construction. Through the
|
|
63
|
+
* shared mechanism in `run-integrity.ts`: one non-overridable
|
|
64
|
+
* `RESOURCE_CHECK_BROKEN` at `error`.
|
|
65
|
+
*
|
|
66
|
+
* Only the empty GLOB is refused. A config with no `skills:` block at all is a
|
|
67
|
+
* choice — the project declares no skills — and both orchestrators already skip
|
|
68
|
+
* this phase on that config; the phase declines it the same way (no document,
|
|
69
|
+
* exit 0) rather than inventing a refusal for a gate nobody declared.
|
|
70
|
+
*
|
|
71
|
+
* @param results - One result per skill the run validated: the denominator
|
|
72
|
+
* @param runIssues - The run's own findings so far (`ALLOW_UNUSED`), so an
|
|
73
|
+
* existing run-integrity report is not duplicated
|
|
74
|
+
* @param patterns - The discovery globs, named in the refusal so the operator
|
|
75
|
+
* sees what matched nothing
|
|
76
|
+
* @returns The run-level issues the document and the stderr report publish
|
|
77
|
+
*/
|
|
78
|
+
export declare function withRunIntegrity(results: readonly PackagingValidationResult[], runIssues: RunIssues, patterns: SkillDiscoveryPatterns): ValidationIssue[];
|
|
39
79
|
/**
|
|
40
80
|
* Build the YAML summary object.
|
|
41
81
|
*
|
|
@@ -62,8 +102,13 @@ type RunIssues = readonly ValidationIssue[];
|
|
|
62
102
|
* zeros: `issueCounts` and `runIssueCounts` keep their complete
|
|
63
103
|
* `{errors, warnings, info}` shape in both modes, because they are the
|
|
64
104
|
* reconciliation identity rather than something a reader scans.
|
|
105
|
+
*
|
|
106
|
+
* A run over ZERO skills is refused here, not passed — see
|
|
107
|
+
* {@link withRunIntegrity}, which is why the discovery `patterns` are a
|
|
108
|
+
* parameter of a document builder: the refusal names the globs that matched
|
|
109
|
+
* nothing, and the builder is where the refusal is derived.
|
|
65
110
|
*/
|
|
66
|
-
export declare function buildValidateSummary(results: PackagingValidationResult[], duration: number, verbose: boolean, runIssues: RunIssues): {
|
|
111
|
+
export declare function buildValidateSummary(results: PackagingValidationResult[], duration: number, verbose: boolean, runIssues: RunIssues, patterns: SkillDiscoveryPatterns): {
|
|
67
112
|
status: ValidationStatus;
|
|
68
113
|
issueCounts: SeverityCounts;
|
|
69
114
|
runIssueCounts: SeverityCounts;
|
|
@@ -89,8 +134,12 @@ export declare function buildValidateSummary(results: PackagingValidationResult[
|
|
|
89
134
|
* Run-level findings and the banner are printed in full either way — there are
|
|
90
135
|
* ~14 of the former, and they belong to the project config rather than to any
|
|
91
136
|
* asset, so there is no row for them to collapse into.
|
|
137
|
+
*
|
|
138
|
+
* Reads the same seam as the document builder ({@link withRunIntegrity}), so a
|
|
139
|
+
* run over zero skills prints the refusal here too rather than a green banner
|
|
140
|
+
* over a document that says `error`.
|
|
92
141
|
*/
|
|
93
|
-
export declare function formatValidationReportLines(results: PackagingValidationResult[], runIssues: RunIssues, verbose: boolean): string[];
|
|
142
|
+
export declare function formatValidationReportLines(results: PackagingValidationResult[], runIssues: RunIssues, verbose: boolean, patterns: SkillDiscoveryPatterns): string[];
|
|
94
143
|
/**
|
|
95
144
|
* Log validation progress for a single skill.
|
|
96
145
|
*
|
|
@@ -161,10 +210,20 @@ export declare function buildSharedValidationContext(skills: ValidatableSkill[],
|
|
|
161
210
|
* Validate every configured skill and hand back the document and exit code,
|
|
162
211
|
* printing the document nowhere.
|
|
163
212
|
*
|
|
164
|
-
* The phase entry point for `vat validate` and `vat verify`. The
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
* `
|
|
213
|
+
* The phase entry point for `vat validate` and `vat verify`. The one early
|
|
214
|
+
* return publishes NO document: a config with no `skills:` block prints one
|
|
215
|
+
* info line, exits 0, and `phaseResultFromOutcome` records that as `success`
|
|
216
|
+
* with no `report` — both orchestrators skip the phase on that config anyway,
|
|
217
|
+
* because declaring no skills is a choice.
|
|
218
|
+
*
|
|
219
|
+
* A `skills:` block whose globs discover nothing is NOT a second early return.
|
|
220
|
+
* It used to be — one info line, no document, exit 0 — and that made `vat
|
|
221
|
+
* validate` green forever on a typo'd glob. It now runs through the same
|
|
222
|
+
* builder as a populated batch, which refuses a zero denominator (see
|
|
223
|
+
* {@link withRunIntegrity}): a document with one `RESOURCE_CHECK_BROKEN` at
|
|
224
|
+
* `error`, `status: error`, exit 1. Exit 1 and not 2, deliberately: the run
|
|
225
|
+
* completed and the gate FAILED, which is the class an operator's CI already
|
|
226
|
+
* handles; 2 is for a run that could not answer at all.
|
|
168
227
|
*/
|
|
169
228
|
export declare function runSkillsValidatePhase(pathArg: string | undefined, options: SkillsValidateCommandOptions): Promise<PhaseOutcome>;
|
|
170
229
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/skills/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/skills/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,4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