@vibe-agent-toolkit/cli 0.1.41-rc.6 → 0.1.41-rc.8
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 -3
- package/dist/bin/vat +25 -2
- package/dist/bin/vat.js +25 -2
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +12 -1
- package/dist/bin.js.map +1 -1
- package/dist/commands/agent/list.d.ts +11 -0
- package/dist/commands/agent/list.d.ts.map +1 -1
- package/dist/commands/agent/list.js +30 -11
- package/dist/commands/agent/list.js.map +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts +6 -2
- package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
- package/dist/commands/audit/hierarchical-output.js +93 -50
- package/dist/commands/audit/hierarchical-output.js.map +1 -1
- package/dist/commands/audit-settings.d.ts +35 -0
- package/dist/commands/audit-settings.d.ts.map +1 -1
- package/dist/commands/audit-settings.js +121 -51
- package/dist/commands/audit-settings.js.map +1 -1
- package/dist/commands/audit.d.ts +97 -2
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +505 -231
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts +14 -0
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +126 -32
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.d.ts +39 -2
- package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.js +114 -68
- package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/publish.js +5 -4
- package/dist/commands/claude/marketplace/publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate.d.ts +97 -0
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +157 -49
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/org/skills.d.ts +11 -3
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +70 -20
- package/dist/commands/claude/org/skills.js.map +1 -1
- package/dist/commands/claude/org/stubs.d.ts +9 -1
- package/dist/commands/claude/org/stubs.d.ts.map +1 -1
- package/dist/commands/claude/org/stubs.js +11 -3
- package/dist/commands/claude/org/stubs.js.map +1 -1
- package/dist/commands/claude/plugin/build.d.ts +116 -0
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +173 -40
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/marketplace-json.d.ts +36 -0
- package/dist/commands/claude/plugin/marketplace-json.d.ts.map +1 -0
- package/dist/commands/claude/plugin/marketplace-json.js +34 -0
- package/dist/commands/claude/plugin/marketplace-json.js.map +1 -0
- package/dist/commands/claude/plugin/plugin-json-merge.d.ts +30 -1
- package/dist/commands/claude/plugin/plugin-json-merge.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-json-merge.js +107 -14
- package/dist/commands/claude/plugin/plugin-json-merge.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +0 -1
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/corpus/report.d.ts +22 -4
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/report.js +1 -0
- package/dist/commands/corpus/report.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts +16 -1
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +55 -48
- package/dist/commands/corpus/runner.js.map +1 -1
- package/dist/commands/doctor.d.ts +57 -8
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +142 -67
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory.d.ts +2 -0
- package/dist/commands/inventory.d.ts.map +1 -1
- package/dist/commands/inventory.js +45 -4
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/phase-utils.d.ts +240 -11
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +352 -15
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/rag/query-command.d.ts +40 -0
- package/dist/commands/rag/query-command.d.ts.map +1 -1
- package/dist/commands/rag/query-command.js +47 -20
- package/dist/commands/rag/query-command.js.map +1 -1
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +38 -13
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/scan.d.ts +37 -0
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +47 -32
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate.d.ts +136 -1
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +121 -68
- package/dist/commands/resources/validate.js.map +1 -1
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +40 -23
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/run.d.ts +1 -1
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +8 -6
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build.d.ts +140 -0
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +348 -94
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/command-helpers.d.ts +6 -10
- package/dist/commands/skills/command-helpers.d.ts.map +1 -1
- package/dist/commands/skills/command-helpers.js +6 -22
- package/dist/commands/skills/command-helpers.js.map +1 -1
- package/dist/commands/skills/list.d.ts +18 -0
- package/dist/commands/skills/list.d.ts.map +1 -1
- package/dist/commands/skills/list.js +41 -15
- package/dist/commands/skills/list.js.map +1 -1
- package/dist/commands/skills/package.d.ts +17 -0
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js +72 -43
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +9 -1
- 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 +22 -6
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate.d.ts +79 -0
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +268 -79
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts +18 -0
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +79 -66
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +38 -1
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +247 -84
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/skill-resolution/index.d.ts +1 -1
- package/dist/skill-resolution/index.d.ts.map +1 -1
- package/dist/skill-resolution/index.js +1 -1
- package/dist/skill-resolution/index.js.map +1 -1
- package/dist/skill-resolution/packaging-config.d.ts +15 -2
- package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
- package/dist/skill-resolution/packaging-config.js +39 -2
- package/dist/skill-resolution/packaging-config.js.map +1 -1
- package/dist/utils/command-error.d.ts +34 -1
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +32 -1
- 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 +0 -2
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/help-loader.d.ts +6 -2
- package/dist/utils/help-loader.d.ts.map +1 -1
- package/dist/utils/help-loader.js +9 -16
- package/dist/utils/help-loader.js.map +1 -1
- package/dist/utils/issue-anchor.d.ts +26 -0
- package/dist/utils/issue-anchor.d.ts.map +1 -0
- package/dist/utils/issue-anchor.js +39 -0
- package/dist/utils/issue-anchor.js.map +1 -0
- package/dist/utils/issue-rendering.d.ts +149 -0
- package/dist/utils/issue-rendering.d.ts.map +1 -0
- package/dist/utils/issue-rendering.js +229 -0
- package/dist/utils/issue-rendering.js.map +1 -0
- package/dist/utils/output.d.ts +80 -9
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +138 -23
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/project-root-policy.d.ts +2 -2
- package/dist/utils/project-root-policy.js +2 -2
- package/dist/utils/relativize-paths.d.ts +45 -0
- package/dist/utils/relativize-paths.d.ts.map +1 -0
- package/dist/utils/relativize-paths.js +67 -0
- package/dist/utils/relativize-paths.js.map +1 -0
- package/dist/utils/resource-loader.d.ts +21 -2
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +85 -11
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/skill-packaging-config.d.ts +22 -1
- package/dist/utils/skill-packaging-config.d.ts.map +1 -1
- package/dist/utils/skill-packaging-config.js +26 -0
- package/dist/utils/skill-packaging-config.js.map +1 -1
- package/dist/utils/validate-help-files.d.ts +3 -2
- package/dist/utils/validate-help-files.d.ts.map +1 -1
- package/dist/utils/validate-help-files.js +48 -5
- package/dist/utils/validate-help-files.js.map +1 -1
- package/dist/utils/verdict-helpers.d.ts +14 -5
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +19 -16
- package/dist/utils/verdict-helpers.js.map +1 -1
- package/docs/audit.md +40 -14
- package/docs/doctor.md +46 -10
- package/docs/index.md +1 -1
- package/docs/rag.md +9 -4
- package/docs/resources.md +54 -22
- package/docs/skills.md +11 -7
- package/package.json +12 -12
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-basing report `path` values onto the run's single stated root.
|
|
3
|
+
*
|
|
4
|
+
* A report states its coordinate system ONCE — `root:` — and every `path`
|
|
5
|
+
* beneath it is relative to that. Producers keep absolute paths internally on
|
|
6
|
+
* purpose: an absolute path is the identity every internal map keys on (compat
|
|
7
|
+
* results, visited-path de-duplication, registry caches), and unlike a
|
|
8
|
+
* `location` it is trivially recoverable, since an absolute path plus a known
|
|
9
|
+
* root yields the relative form. Re-basing therefore happens once, at the
|
|
10
|
+
* document boundary, and this module is that one place.
|
|
11
|
+
*
|
|
12
|
+
* Deliberately NOT a deep walk over every `path`-named property: re-basing is
|
|
13
|
+
* not idempotent (`relative(root, someRelativeValue)` resolves the value
|
|
14
|
+
* against the process cwd and produces nonsense), so a helper that guesses
|
|
15
|
+
* which values are absolute would silently corrupt an already-relative one.
|
|
16
|
+
* The caller names the nested carriers it owns instead.
|
|
17
|
+
*/
|
|
18
|
+
import { issueLocation } from '@vibe-agent-toolkit/utils';
|
|
19
|
+
/**
|
|
20
|
+
* Re-base one absolute path onto `root`, as a forward-slashed relative path.
|
|
21
|
+
*
|
|
22
|
+
* Pointing a report AT a single resource makes that resource the root, which
|
|
23
|
+
* relativizes to the empty string. That is spelled `.` — the POSIX name for
|
|
24
|
+
* "the root itself" — so no consumer has to special-case a blank value, and
|
|
25
|
+
* `join(root, path)` still resolves.
|
|
26
|
+
*/
|
|
27
|
+
export function relativizePath(absolutePath, root) {
|
|
28
|
+
const relative = issueLocation(absolutePath, root);
|
|
29
|
+
return relative === '' ? '.' : relative;
|
|
30
|
+
}
|
|
31
|
+
/** Whether an unknown value is shaped like something this module can re-base. */
|
|
32
|
+
function isPathEntry(value) {
|
|
33
|
+
return (typeof value === 'object' &&
|
|
34
|
+
value !== null &&
|
|
35
|
+
typeof value.path === 'string');
|
|
36
|
+
}
|
|
37
|
+
function relativizeEntry(entry, root, nestedKeys) {
|
|
38
|
+
const out = { ...entry, path: relativizePath(entry.path, root) };
|
|
39
|
+
// The nested carriers are named by the caller, so they are not on T's known
|
|
40
|
+
// keys; the bag view is the only way to reach them without demanding every
|
|
41
|
+
// caller widen its own result type.
|
|
42
|
+
const bag = out;
|
|
43
|
+
for (const key of nestedKeys) {
|
|
44
|
+
const nested = bag[key];
|
|
45
|
+
if (!Array.isArray(nested))
|
|
46
|
+
continue;
|
|
47
|
+
bag[key] = nested.map((item) => isPathEntry(item) ? relativizeEntry(item, root, nestedKeys) : item);
|
|
48
|
+
}
|
|
49
|
+
return out;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Re-base the `path` of every entry — and of every entry inside the nested
|
|
53
|
+
* carriers named by `nestedKeys`, at any depth — onto `root`.
|
|
54
|
+
*
|
|
55
|
+
* Returns new objects; the input is never mutated.
|
|
56
|
+
*
|
|
57
|
+
* @param entries - Report entries carrying absolute `path` values.
|
|
58
|
+
* @param root - The single root the document states.
|
|
59
|
+
* @param nestedKeys - Names of array-valued properties whose elements also
|
|
60
|
+
* carry an absolute `path` (audit passes `['linkedFiles']`). Omitting a
|
|
61
|
+
* carrier leaves its paths absolute, which is how a document ends up in two
|
|
62
|
+
* coordinate systems — so a producer that adds a carrier must name it here.
|
|
63
|
+
*/
|
|
64
|
+
export function relativizePathEntries(entries, root, nestedKeys = []) {
|
|
65
|
+
return entries.map((entry) => relativizeEntry(entry, root, nestedKeys));
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=relativize-paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relativize-paths.js","sourceRoot":"","sources":["../../src/utils/relativize-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAO1D;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,YAAoB,EAAE,IAAY;IAC/D,MAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IACnD,OAAO,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;AA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
|
|
14
|
+
/**
|
|
15
|
+
* Scope resource include patterns to a subdirectory of the crawl base.
|
|
16
|
+
*
|
|
17
|
+
* Pure, and exported so the scoping rule is testable without a filesystem.
|
|
18
|
+
* `relDir` is base-relative with forward slashes; `''` means "the base itself",
|
|
19
|
+
* for which the patterns are already correctly scoped.
|
|
20
|
+
*
|
|
21
|
+
* The patterns in {@link DEFAULT_RESOURCE_INCLUDE} are all `**`-rooted, so
|
|
22
|
+
* prefixing is enough: picomatch's `**` matches zero segments, meaning
|
|
23
|
+
* `docs/**\/*.md` still matches `docs/a.md`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function scopeIncludeToSubtree(include: readonly string[], relDir: string): string[];
|
|
14
26
|
/**
|
|
15
27
|
* Load resources from a path with config support
|
|
16
28
|
*
|
|
@@ -20,8 +32,15 @@ export interface ResourceLoadResult {
|
|
|
20
32
|
* 3. Create registry and crawl
|
|
21
33
|
*
|
|
22
34
|
* Behavior:
|
|
23
|
-
* - When path argument
|
|
24
|
-
*
|
|
35
|
+
* - When no path argument: crawl the project root, applying the config's
|
|
36
|
+
* `resources.include` and `resources.exclude` patterns.
|
|
37
|
+
* - When a path argument is provided: still crawl on the project-root basis (so
|
|
38
|
+
* the config's root-relative globs remain meaningful), with `include` replaced
|
|
39
|
+
* by the default resource patterns scoped to that subtree and the config's
|
|
40
|
+
* `exclude` still applied. A path argument says WHICH tree to scan; it does
|
|
41
|
+
* not license scanning files the project excluded.
|
|
42
|
+
* - When the path argument lies outside the project root, the config's patterns
|
|
43
|
+
* describe a different tree: they are dropped, with a warning.
|
|
25
44
|
*
|
|
26
45
|
* Per CLI-boundary rule (spec §5): `projectRoot` MUST be resolved by the
|
|
27
46
|
* caller using one of the policy helpers in `project-root-policy.ts`. This
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-loader.d.ts","sourceRoot":"","sources":["../../src/utils/resource-loader.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"resource-loader.d.ts","sourceRoot":"","sources":["../../src/utils/resource-loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAEL,gBAAgB,EAEhB,KAAK,aAAa,EAEnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAA4B,MAAM,2BAA2B,CAAC;AAGjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC;CACpC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAK1F;AAkED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,kBAAkB,CAAC,CAuD7B"}
|
|
@@ -1,9 +1,79 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Utilities for loading and crawling resources
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { existsSync, statSync } from 'node:fs';
|
|
5
|
+
import { DEFAULT_RESOURCE_INCLUDE, ResourceRegistry, } from '@vibe-agent-toolkit/resources';
|
|
6
|
+
import { GitTracker, safePath, toForwardSlash } from '@vibe-agent-toolkit/utils';
|
|
6
7
|
import { loadConfig } from './config-loader.js';
|
|
8
|
+
/**
|
|
9
|
+
* Scope resource include patterns to a subdirectory of the crawl base.
|
|
10
|
+
*
|
|
11
|
+
* Pure, and exported so the scoping rule is testable without a filesystem.
|
|
12
|
+
* `relDir` is base-relative with forward slashes; `''` means "the base itself",
|
|
13
|
+
* for which the patterns are already correctly scoped.
|
|
14
|
+
*
|
|
15
|
+
* The patterns in {@link DEFAULT_RESOURCE_INCLUDE} are all `**`-rooted, so
|
|
16
|
+
* prefixing is enough: picomatch's `**` matches zero segments, meaning
|
|
17
|
+
* `docs/**\/*.md` still matches `docs/a.md`.
|
|
18
|
+
*/
|
|
19
|
+
export function scopeIncludeToSubtree(include, relDir) {
|
|
20
|
+
if (relDir === '') {
|
|
21
|
+
return [...include];
|
|
22
|
+
}
|
|
23
|
+
return include.map((pattern) => `${relDir}/${pattern}`);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Build the crawl options for an explicit path argument.
|
|
27
|
+
*
|
|
28
|
+
* The path argument RESTATES which tree to scan; it does not license scanning
|
|
29
|
+
* files the project has declared out of bounds. So `exclude` — a "never treat
|
|
30
|
+
* this as a resource" statement about node_modules, build output, vendored
|
|
31
|
+
* trees, and deliberately-broken test fixtures — is applied either way, while
|
|
32
|
+
* the path replaces `include`.
|
|
33
|
+
*
|
|
34
|
+
* That is only expressible by keeping `baseDir` at the project root: config
|
|
35
|
+
* globs are declared relative to the project root, so re-basing the crawl onto
|
|
36
|
+
* the path argument (the previous behavior) silently voided every one of them.
|
|
37
|
+
* Instead the path argument becomes an include PREFIX on the same basis.
|
|
38
|
+
*/
|
|
39
|
+
function crawlOptionsForPath(pathArg, projectRoot, config, logger) {
|
|
40
|
+
const resolved = safePath.resolve(pathArg);
|
|
41
|
+
// safePath.relative already normalizes, but toForwardSlash makes the
|
|
42
|
+
// separator assumption in the `../` test below explicit on Windows too.
|
|
43
|
+
const normalizedRelDir = toForwardSlash(safePath.relative(projectRoot, resolved));
|
|
44
|
+
if (normalizedRelDir === '..' || normalizedRelDir.startsWith('../')) {
|
|
45
|
+
// Outside the project root, so the config's root-relative globs describe a
|
|
46
|
+
// different tree and genuinely cannot apply. Say so rather than dropping
|
|
47
|
+
// them silently — silent dropping is the bug this function exists to fix.
|
|
48
|
+
logger.warn(`${resolved} is outside projectRoot ${projectRoot}; ` +
|
|
49
|
+
`resources include/exclude patterns from the config do not apply to it`);
|
|
50
|
+
return { baseDir: resolved };
|
|
51
|
+
}
|
|
52
|
+
assertCrawlableDirectory(resolved);
|
|
53
|
+
return {
|
|
54
|
+
baseDir: projectRoot,
|
|
55
|
+
include: scopeIncludeToSubtree(DEFAULT_RESOURCE_INCLUDE, normalizedRelDir),
|
|
56
|
+
...(config?.resources?.exclude ? { exclude: config.resources.exclude } : {}),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Fail loudly on a path argument that cannot be crawled.
|
|
61
|
+
*
|
|
62
|
+
* The crawler used to perform this check itself, because it received the path
|
|
63
|
+
* argument as its `baseDir`. Now that `baseDir` is the project root, a bad path
|
|
64
|
+
* argument would otherwise degrade into a glob that matches nothing — a green
|
|
65
|
+
* run reporting `filesScanned: 0`.
|
|
66
|
+
*/
|
|
67
|
+
function assertCrawlableDirectory(resolved) {
|
|
68
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename -- CLI path argument, resolved above
|
|
69
|
+
if (!existsSync(resolved)) {
|
|
70
|
+
throw new Error(`Path does not exist: ${resolved}`);
|
|
71
|
+
}
|
|
72
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename -- CLI path argument, existence checked above
|
|
73
|
+
if (!statSync(resolved).isDirectory()) {
|
|
74
|
+
throw new Error(`Path is not a directory: ${resolved}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
7
77
|
/**
|
|
8
78
|
* Load resources from a path with config support
|
|
9
79
|
*
|
|
@@ -13,8 +83,15 @@ import { loadConfig } from './config-loader.js';
|
|
|
13
83
|
* 3. Create registry and crawl
|
|
14
84
|
*
|
|
15
85
|
* Behavior:
|
|
16
|
-
* - When path argument
|
|
17
|
-
*
|
|
86
|
+
* - When no path argument: crawl the project root, applying the config's
|
|
87
|
+
* `resources.include` and `resources.exclude` patterns.
|
|
88
|
+
* - When a path argument is provided: still crawl on the project-root basis (so
|
|
89
|
+
* the config's root-relative globs remain meaningful), with `include` replaced
|
|
90
|
+
* by the default resource patterns scoped to that subtree and the config's
|
|
91
|
+
* `exclude` still applied. A path argument says WHICH tree to scan; it does
|
|
92
|
+
* not license scanning files the project excluded.
|
|
93
|
+
* - When the path argument lies outside the project root, the config's patterns
|
|
94
|
+
* describe a different tree: they are dropped, with a warning.
|
|
18
95
|
*
|
|
19
96
|
* Per CLI-boundary rule (spec §5): `projectRoot` MUST be resolved by the
|
|
20
97
|
* caller using one of the policy helpers in `project-root-policy.ts`. This
|
|
@@ -48,14 +125,11 @@ export async function loadResourcesWithConfig(pathArg, projectRoot, logger) {
|
|
|
48
125
|
const registry = new ResourceRegistry(registryOptions);
|
|
49
126
|
let crawlOptions;
|
|
50
127
|
if (pathArg) {
|
|
51
|
-
// Path argument provided:
|
|
52
|
-
//
|
|
128
|
+
// Path argument provided: narrow the scan to that subtree, but keep the
|
|
129
|
+
// project's exclude patterns — see crawlOptionsForPath.
|
|
53
130
|
logger.debug(`Path argument provided: ${pathArg}`);
|
|
54
|
-
|
|
55
|
-
crawlOptions
|
|
56
|
-
baseDir: pathArg,
|
|
57
|
-
// Use defaults from ResourceRegistry.crawl (will use **/*.md)
|
|
58
|
-
};
|
|
131
|
+
crawlOptions = crawlOptionsForPath(pathArg, projectRoot, config, logger);
|
|
132
|
+
logger.debug(`Crawling ${crawlOptions.baseDir} with include: ${JSON.stringify(crawlOptions.include)}`);
|
|
59
133
|
}
|
|
60
134
|
else {
|
|
61
135
|
// No path argument: crawl from projectRoot with config patterns
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-loader.js","sourceRoot":"","sources":["../../src/utils/resource-loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,gBAAgB,
|
|
1
|
+
{"version":3,"file":"resource-loader.js","sourceRoot":"","sources":["../../src/utils/resource-lo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,CAAC"}
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
* Most fields are a shallow override: a per-skill value replaces the default
|
|
10
10
|
* outright. `files:` is the exception — see below.
|
|
11
11
|
*/
|
|
12
|
-
import { type SkillPackagingConfig } from '@vibe-agent-toolkit/agent-skills';
|
|
12
|
+
import { type DeclaredEvalSuite, type SkillPackagingConfig } from '@vibe-agent-toolkit/agent-skills';
|
|
13
|
+
import type { SkillsConfig } from '@vibe-agent-toolkit/resources';
|
|
13
14
|
/**
|
|
14
15
|
* Merge defaults with per-skill overrides, dropping undefined values.
|
|
15
16
|
*
|
|
@@ -25,4 +26,24 @@ import { type SkillPackagingConfig } from '@vibe-agent-toolkit/agent-skills';
|
|
|
25
26
|
* the build did — the exact class of divergence this module exists to prevent.
|
|
26
27
|
*/
|
|
27
28
|
export declare function mergeSkillPackagingConfig(defaults: Record<string, unknown> | undefined, perSkillOverrides: Record<string, unknown> | undefined): SkillPackagingConfig;
|
|
29
|
+
/**
|
|
30
|
+
* The PROJECT's declared eval suites: one {@link DeclaredEvalSuite} per discovered
|
|
31
|
+
* skill, from the same discovery + merge every lane already runs.
|
|
32
|
+
*
|
|
33
|
+
* Test input never ships, and that rule is project-wide rather than per-skill — a file
|
|
34
|
+
* ANY skill declares as its eval suite is an answer key, and no other skill's bundle may
|
|
35
|
+
* carry it. Every lane that packages or models a bundle therefore needs the whole
|
|
36
|
+
* project's declarations, not just the subject's.
|
|
37
|
+
*
|
|
38
|
+
* Build this ONCE per invocation, from the UNFILTERED discovery, and pass the same array
|
|
39
|
+
* down to every skill:
|
|
40
|
+
* - unfiltered, because `--skill x` narrows what is BUILT, never what counts as test
|
|
41
|
+
* input; a suite excluded from the run is still an answer key;
|
|
42
|
+
* - once, because assembling it per skill would walk the project's whole skills config
|
|
43
|
+
* inside a per-skill loop — a per-item cost against whole-corpus work.
|
|
44
|
+
*/
|
|
45
|
+
export declare function collectDeclaredEvalSuites(skillsConfig: SkillsConfig | undefined, discovered: ReadonlyArray<{
|
|
46
|
+
name: string;
|
|
47
|
+
sourcePath: string;
|
|
48
|
+
}>): DeclaredEvalSuite[];
|
|
28
49
|
//# sourceMappingURL=skill-packaging-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-packaging-config.d.ts","sourceRoot":"","sources":["../../src/utils/skill-packaging-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAoB,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"skill-packaging-config.d.ts","sourceRoot":"","sources":["../../src/utils/skill-packaging-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAoB,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACvH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGlE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC7C,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACrD,oBAAoB,CAmBtB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,UAAU,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,GAC9D,iBAAiB,EAAE,CAUrB"}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* outright. `files:` is the exception — see below.
|
|
11
11
|
*/
|
|
12
12
|
import { mergeFilesConfig } from '@vibe-agent-toolkit/agent-skills';
|
|
13
|
+
import { safePath } from '@vibe-agent-toolkit/utils';
|
|
13
14
|
/**
|
|
14
15
|
* Merge defaults with per-skill overrides, dropping undefined values.
|
|
15
16
|
*
|
|
@@ -42,4 +43,29 @@ export function mergeSkillPackagingConfig(defaults, perSkillOverrides) {
|
|
|
42
43
|
}
|
|
43
44
|
return packagingConfig;
|
|
44
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* The PROJECT's declared eval suites: one {@link DeclaredEvalSuite} per discovered
|
|
48
|
+
* skill, from the same discovery + merge every lane already runs.
|
|
49
|
+
*
|
|
50
|
+
* Test input never ships, and that rule is project-wide rather than per-skill — a file
|
|
51
|
+
* ANY skill declares as its eval suite is an answer key, and no other skill's bundle may
|
|
52
|
+
* carry it. Every lane that packages or models a bundle therefore needs the whole
|
|
53
|
+
* project's declarations, not just the subject's.
|
|
54
|
+
*
|
|
55
|
+
* Build this ONCE per invocation, from the UNFILTERED discovery, and pass the same array
|
|
56
|
+
* down to every skill:
|
|
57
|
+
* - unfiltered, because `--skill x` narrows what is BUILT, never what counts as test
|
|
58
|
+
* input; a suite excluded from the run is still an answer key;
|
|
59
|
+
* - once, because assembling it per skill would walk the project's whole skills config
|
|
60
|
+
* inside a per-skill loop — a per-item cost against whole-corpus work.
|
|
61
|
+
*/
|
|
62
|
+
export function collectDeclaredEvalSuites(skillsConfig, discovered) {
|
|
63
|
+
if (skillsConfig === undefined)
|
|
64
|
+
return [];
|
|
65
|
+
const { defaults, config: perSkillConfig } = skillsConfig;
|
|
66
|
+
return discovered.map((skill) => ({
|
|
67
|
+
skillDir: safePath.resolve(skill.sourcePath, '..'),
|
|
68
|
+
config: mergeSkillPackagingConfig(defaults, perSkillConfig?.[skill.name]),
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
45
71
|
//# sourceMappingURL=skill-packaging-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-packaging-config.js","sourceRoot":"","sources":["../../src/utils/skill-packaging-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"skill-packaging-config.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OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAChC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,CAAC;QAClD,MAAM,EAAE,yBAAyB,CAC/B,QAA+C,EAC/C,cAAc,EAAE,CAAC,KAAK,CAAC,IAAI,CAAwC,CACpE;KACF,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
* rather than runtime errors when users request verbose help.
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
|
-
* Validate
|
|
9
|
+
* Validate the help-docs directory in BOTH directions.
|
|
10
10
|
*
|
|
11
|
-
* @throws {Error} If
|
|
11
|
+
* @throws {Error} If a required help file is missing, or a shipped doc is
|
|
12
|
+
* classified as neither command-served nor prose-only.
|
|
12
13
|
*/
|
|
13
14
|
export declare function validateHelpFiles(): void;
|
|
14
15
|
//# sourceMappingURL=validate-help-files.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-help-files.d.ts","sourceRoot":"","sources":["../../src/utils/validate-help-files.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"validate-help-files.d.ts","sourceRoot":"","sources":["../../src/utils/validate-help-files.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0CH;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAkDxC"}
|
|
@@ -5,13 +5,17 @@
|
|
|
5
5
|
* This provides "fail fast" behavior - missing help files cause build failure
|
|
6
6
|
* rather than runtime errors when users request verbose help.
|
|
7
7
|
*/
|
|
8
|
-
import { existsSync } from 'node:fs';
|
|
8
|
+
import { existsSync, readdirSync } from 'node:fs';
|
|
9
9
|
import { dirname } from 'node:path';
|
|
10
10
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
11
11
|
import { safePath } from '@vibe-agent-toolkit/utils';
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* Files `loadVerboseHelp()` is actually asked for by a command.
|
|
14
|
+
*
|
|
15
|
+
* This list must stay in step with the `loadVerboseHelp(...)` call sites —
|
|
16
|
+
* each entry is a document some `--help --verbose` path will read at runtime,
|
|
17
|
+
* and a missing one degrades to an in-band "Help Documentation Not Found" page
|
|
18
|
+
* that still exits 0.
|
|
15
19
|
*/
|
|
16
20
|
const REQUIRED_HELP_FILES = [
|
|
17
21
|
'index.md', // Root-level verbose help (vat --help --verbose)
|
|
@@ -20,9 +24,28 @@ const REQUIRED_HELP_FILES = [
|
|
|
20
24
|
'agent.md', // Agent command verbose help (vat agent --help --verbose)
|
|
21
25
|
];
|
|
22
26
|
/**
|
|
23
|
-
*
|
|
27
|
+
* Shipped docs that NO command serves — reference pages, reached only by a
|
|
28
|
+
* prose link from `docs/index.md`, this repo's CLAUDE.md, or the README.
|
|
29
|
+
*
|
|
30
|
+
* Recorded explicitly because the forward check alone cannot see them: they are
|
|
31
|
+
* published in the npm package (`files: ["docs"]`) and read like verbose help,
|
|
32
|
+
* so an author can reasonably expect `vat audit --help --verbose` to print
|
|
33
|
+
* `audit.md` when in fact nothing does. Every file in `docs/` must be in this
|
|
34
|
+
* set or in {@link REQUIRED_HELP_FILES}, so adding a page forces the author to
|
|
35
|
+
* say which it is.
|
|
36
|
+
*/
|
|
37
|
+
const PROSE_ONLY_HELP_FILES = new Set([
|
|
38
|
+
'audit.md',
|
|
39
|
+
'doctor.md',
|
|
40
|
+
'mcp.md',
|
|
41
|
+
'skills.md',
|
|
42
|
+
'skill-test.md',
|
|
43
|
+
]);
|
|
44
|
+
/**
|
|
45
|
+
* Validate the help-docs directory in BOTH directions.
|
|
24
46
|
*
|
|
25
|
-
* @throws {Error} If
|
|
47
|
+
* @throws {Error} If a required help file is missing, or a shipped doc is
|
|
48
|
+
* classified as neither command-served nor prose-only.
|
|
26
49
|
*/
|
|
27
50
|
export function validateHelpFiles() {
|
|
28
51
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
@@ -42,6 +65,26 @@ export function validateHelpFiles() {
|
|
|
42
65
|
`These files must exist for verbose help (--help --verbose) to work.\n` +
|
|
43
66
|
`Create them before building the CLI package.`);
|
|
44
67
|
}
|
|
68
|
+
// Reverse direction: a doc nobody serves and nobody classified.
|
|
69
|
+
const required = new Set(REQUIRED_HELP_FILES);
|
|
70
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename -- docsDir is derived from this module's own location
|
|
71
|
+
const present = readdirSync(docsDir).filter(f => f.endsWith('.md'));
|
|
72
|
+
const unclassified = present.filter(f => !required.has(f) && !PROSE_ONLY_HELP_FILES.has(f));
|
|
73
|
+
if (unclassified.length > 0) {
|
|
74
|
+
const fileList = unclassified.map(f => ` - docs/${f}`).join('\n');
|
|
75
|
+
throw new Error(`Unclassified help documentation files:\n${fileList}\n\n` +
|
|
76
|
+
`Every file in packages/cli/docs/ ships in the npm package and must be\n` +
|
|
77
|
+
`either served by a command (add it to REQUIRED_HELP_FILES and call\n` +
|
|
78
|
+
`loadVerboseHelp('<name>') from that command's help path) or recorded as\n` +
|
|
79
|
+
`reference-only (add it to PROSE_ONLY_HELP_FILES). Without this, a page can\n` +
|
|
80
|
+
`be written, published, and never reachable from any --help --verbose.`);
|
|
81
|
+
}
|
|
82
|
+
const stalelyClassified = [...PROSE_ONLY_HELP_FILES].filter(f => !present.includes(f));
|
|
83
|
+
if (stalelyClassified.length > 0) {
|
|
84
|
+
throw new Error(`PROSE_ONLY_HELP_FILES lists files that no longer exist:\n` +
|
|
85
|
+
stalelyClassified.map(f => ` - docs/${f}`).join('\n') +
|
|
86
|
+
`\n\nRemove the stale entries.`);
|
|
87
|
+
}
|
|
45
88
|
}
|
|
46
89
|
/**
|
|
47
90
|
* Run validation if this file is executed directly
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-help-files.js","sourceRoot":"","sources":["../../src/utils/validate-help-files.ts"],"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C,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACvF,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CACb,2DAA2D;YAC3D,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;YACtD,+BAA+B,CAChC,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/E,IAAI,CAAC;QACH,iBAAiB,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC;QAC7D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAChD,OAAO,CAAC,KAAK,CAAE,KAAe,CAAC,OAAO,CAAC,CAAC;QACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -27,15 +27,24 @@ export declare function verdictToIssue(verdict: Verdict, location: string): Vali
|
|
|
27
27
|
* config-level targets only. Plugin-level and marketplace-level targets
|
|
28
28
|
* are surfaced by the analyzer (`vat audit --compat`) which has its own
|
|
29
29
|
* walk over plugin / marketplace manifests.
|
|
30
|
+
*
|
|
31
|
+
* Takes the skill's path plus the anchor root and re-bases internally rather
|
|
32
|
+
* than accepting a pre-rendered `location`. That is deliberate: when this took
|
|
33
|
+
* a caller-supplied location string, each of the four call sites got its own
|
|
34
|
+
* chance to answer "relative to what?" and three answered "absolute" — one
|
|
35
|
+
* `vat skill review --yaml` document ended up carrying two coordinate systems,
|
|
36
|
+
* and `vat skills validate` leaked a full home-directory path. Owning the
|
|
37
|
+
* re-base here makes that unrepresentable at every call site at once.
|
|
30
38
|
*/
|
|
31
|
-
export declare function computeConfigVerdicts(observations: readonly Observation[], configTargets: ReadonlyArray<Target> | undefined,
|
|
39
|
+
export declare function computeConfigVerdicts(observations: readonly Observation[], configTargets: ReadonlyArray<Target> | undefined, skillSourcePath: string, locationRoot: string): ValidationIssue[];
|
|
32
40
|
/**
|
|
33
41
|
* Mutate a PackagingValidationResult in place to include compat verdicts
|
|
34
42
|
* derived from the result's observations and the configured targets.
|
|
35
43
|
*
|
|
36
|
-
* Verdict issues land in `allErrors
|
|
37
|
-
*
|
|
38
|
-
*
|
|
44
|
+
* Verdict issues land in `allErrors`, which is the sole container for every
|
|
45
|
+
* emitted issue regardless of severity — callers derive the active partition
|
|
46
|
+
* with `activeErrorsOf` / `activeWarningsOf` rather than reading a second
|
|
47
|
+
* pre-filtered copy. Verdicts are not allow-filterable.
|
|
39
48
|
*/
|
|
40
|
-
export declare function applyConfigVerdicts(result: PackagingValidationResult, configTargets: ReadonlyArray<Target> | undefined, skillSourcePath: string): void;
|
|
49
|
+
export declare function applyConfigVerdicts(result: PackagingValidationResult, configTargets: ReadonlyArray<Target> | undefined, skillSourcePath: string, locationRoot: string): void;
|
|
41
50
|
//# sourceMappingURL=verdict-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdict-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/verdict-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,OAAO,EACb,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"verdict-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/verdict-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,OAAO,EACb,MAAM,wCAAwC,CAAC;AAGhD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,eAAe,CAUlF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,SAAS,WAAW,EAAE,EACpC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,EAChD,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,GACnB,eAAe,EAAE,CAkBnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,yBAAyB,EACjC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,EAChD,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,GACnB,IAAI,CAcN"}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { CODE_REGISTRY } from '@vibe-agent-toolkit/agent-schema';
|
|
16
16
|
import { computeVerdicts, resolveEffectiveTargets, } from '@vibe-agent-toolkit/claude-marketplace';
|
|
17
|
+
import { issueLocation } from '@vibe-agent-toolkit/utils';
|
|
17
18
|
/**
|
|
18
19
|
* Convert a verdict into a ValidationIssue using CODE_REGISTRY for severity,
|
|
19
20
|
* fix and reference. Pure function — no I/O.
|
|
@@ -36,8 +37,16 @@ export function verdictToIssue(verdict, location) {
|
|
|
36
37
|
* config-level targets only. Plugin-level and marketplace-level targets
|
|
37
38
|
* are surfaced by the analyzer (`vat audit --compat`) which has its own
|
|
38
39
|
* walk over plugin / marketplace manifests.
|
|
40
|
+
*
|
|
41
|
+
* Takes the skill's path plus the anchor root and re-bases internally rather
|
|
42
|
+
* than accepting a pre-rendered `location`. That is deliberate: when this took
|
|
43
|
+
* a caller-supplied location string, each of the four call sites got its own
|
|
44
|
+
* chance to answer "relative to what?" and three answered "absolute" — one
|
|
45
|
+
* `vat skill review --yaml` document ended up carrying two coordinate systems,
|
|
46
|
+
* and `vat skills validate` leaked a full home-directory path. Owning the
|
|
47
|
+
* re-base here makes that unrepresentable at every call site at once.
|
|
39
48
|
*/
|
|
40
|
-
export function computeConfigVerdicts(observations, configTargets,
|
|
49
|
+
export function computeConfigVerdicts(observations, configTargets, skillSourcePath, locationRoot) {
|
|
41
50
|
if (observations.length === 0) {
|
|
42
51
|
return [];
|
|
43
52
|
}
|
|
@@ -50,31 +59,25 @@ export function computeConfigVerdicts(observations, configTargets, location) {
|
|
|
50
59
|
observations: [...observations],
|
|
51
60
|
targets: effectiveTargets,
|
|
52
61
|
});
|
|
62
|
+
const location = issueLocation(skillSourcePath, locationRoot);
|
|
53
63
|
return verdicts.map(v => verdictToIssue(v, location));
|
|
54
64
|
}
|
|
55
65
|
/**
|
|
56
66
|
* Mutate a PackagingValidationResult in place to include compat verdicts
|
|
57
67
|
* derived from the result's observations and the configured targets.
|
|
58
68
|
*
|
|
59
|
-
* Verdict issues land in `allErrors
|
|
60
|
-
*
|
|
61
|
-
*
|
|
69
|
+
* Verdict issues land in `allErrors`, which is the sole container for every
|
|
70
|
+
* emitted issue regardless of severity — callers derive the active partition
|
|
71
|
+
* with `activeErrorsOf` / `activeWarningsOf` rather than reading a second
|
|
72
|
+
* pre-filtered copy. Verdicts are not allow-filterable.
|
|
62
73
|
*/
|
|
63
|
-
export function applyConfigVerdicts(result, configTargets, skillSourcePath) {
|
|
64
|
-
const verdictIssues = computeConfigVerdicts(result.observations, configTargets, skillSourcePath);
|
|
74
|
+
export function applyConfigVerdicts(result, configTargets, skillSourcePath, locationRoot) {
|
|
75
|
+
const verdictIssues = computeConfigVerdicts(result.observations, configTargets, skillSourcePath, locationRoot);
|
|
65
76
|
if (verdictIssues.length === 0) {
|
|
66
77
|
return;
|
|
67
78
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (issue.severity === 'error') {
|
|
71
|
-
result.activeErrors.push(issue);
|
|
72
|
-
}
|
|
73
|
-
else if (issue.severity === 'warning') {
|
|
74
|
-
result.activeWarnings.push(issue);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
if (result.activeErrors.length > 0) {
|
|
79
|
+
result.allErrors.push(...verdictIssues);
|
|
80
|
+
if (result.allErrors.some(issue => issue.severity === 'error')) {
|
|
78
81
|
result.status = 'error';
|
|
79
82
|
}
|
|
80
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdict-helpers.js","sourceRoot":"","sources":["../../src/utils/verdict-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAwB,MAAM,kCAAkC,CAAC;AAKvF,OAAO,EACL,eAAe,EACf,uBAAuB,GAGxB,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"verdict-helpers.js","sourceRoot":"","sources":["../../src/utils/verdict-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAwB,MAAM,kCAAkC,CAAC;AAKvF,OAAO,EACL,eAAe,EACf,uBAAuB,GAGxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgB,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,OAAO;QACL,QAAQ,EAAE,K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