@vibe-agent-toolkit/cli 0.1.41-rc.5 → 0.1.41-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 -3
- package/dist/bin/vat +1 -1
- package/dist/bin/vat.js +1 -1
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +2 -4
- package/dist/bin.js.map +1 -1
- package/dist/commands/agent/help.d.ts.map +1 -1
- package/dist/commands/agent/help.js +2 -4
- package/dist/commands/agent/help.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 +63 -1
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +329 -187
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +47 -18
- 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.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +13 -19
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/org/skills.d.ts +21 -0
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +107 -30
- package/dist/commands/claude/org/skills.js.map +1 -1
- package/dist/commands/claude/plugin/build.d.ts +94 -1
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +307 -106
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/install.d.ts.map +1 -1
- package/dist/commands/claude/plugin/install.js +7 -2
- package/dist/commands/claude/plugin/install.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 +92 -14
- package/dist/commands/claude/plugin/plugin-json-merge.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts +10 -3
- 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/claude/plugin/uninstall.d.ts.map +1 -1
- package/dist/commands/claude/plugin/uninstall.js +10 -2
- package/dist/commands/claude/plugin/uninstall.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +15 -26
- 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/phase-utils.d.ts +62 -2
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +74 -2
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/rag/help.d.ts.map +1 -1
- package/dist/commands/rag/help.js +2 -4
- package/dist/commands/rag/help.js.map +1 -1
- package/dist/commands/resources/help.d.ts.map +1 -1
- package/dist/commands/resources/help.js +2 -4
- package/dist/commands/resources/help.js.map +1 -1
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +13 -6
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/validate.d.ts +19 -0
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +89 -24
- 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 +33 -20
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/configure.d.ts.map +1 -1
- package/dist/commands/skill/test/configure.js +1 -1
- package/dist/commands/skill/test/configure.js.map +1 -1
- package/dist/commands/skill/test/run.d.ts +29 -2
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +67 -19
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build.d.ts +51 -0
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +94 -86
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/install.d.ts.map +1 -1
- package/dist/commands/skills/install.js +79 -25
- package/dist/commands/skills/install.js.map +1 -1
- package/dist/commands/skills/list.d.ts.map +1 -1
- package/dist/commands/skills/list.js +9 -5
- package/dist/commands/skills/list.js.map +1 -1
- package/dist/commands/skills/package.d.ts +2 -0
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js +61 -42
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/skill-discovery.d.ts +7 -0
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +14 -4
- package/dist/commands/skills/skill-discovery.js.map +1 -1
- package/dist/commands/skills/validate.d.ts +38 -0
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +125 -70
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +11 -5
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +76 -28
- package/dist/commands/verify.js.map +1 -1
- package/dist/skill-resolution/classify.d.ts +7 -2
- package/dist/skill-resolution/classify.d.ts.map +1 -1
- package/dist/skill-resolution/classify.js +7 -2
- package/dist/skill-resolution/classify.js.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.d.ts +10 -8
- package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.js +62 -23
- package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
- package/dist/skill-resolution/types.d.ts +3 -2
- package/dist/skill-resolution/types.d.ts.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 +16 -0
- package/dist/utils/help-loader.d.ts.map +1 -1
- package/dist/utils/help-loader.js +31 -1
- 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 +61 -0
- package/dist/utils/issue-rendering.d.ts.map +1 -0
- package/dist/utils/issue-rendering.js +135 -0
- package/dist/utils/issue-rendering.js.map +1 -0
- package/dist/utils/output.d.ts +26 -4
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +27 -6
- 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/skill-packaging-config.d.ts +15 -6
- package/dist/utils/skill-packaging-config.d.ts.map +1 -1
- package/dist/utils/skill-packaging-config.js +23 -5
- 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 +10 -2
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +13 -3
- 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/resources.md +24 -8
- package/docs/skill-test.md +47 -3
- package/docs/skills.md +28 -6
- package/package.json +12 -12
|
@@ -18,10 +18,15 @@ export type TokenShape = {
|
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* Classify a reference token's syntactic shape (no IO):
|
|
21
|
-
* - a `kind:` prefix / `vendored` → `source-spec`
|
|
21
|
+
* - a `kind:` prefix / `vendored` → `source-spec` (note: `resolveSkillReference`
|
|
22
|
+
* re-routes the `path:` arm through its definite-path rung, because that prefix
|
|
23
|
+
* only disambiguates path-vs-name and must not change build treatment)
|
|
22
24
|
* - absolute, or contains a path separator, or starts with `.` → `definite-path`
|
|
23
25
|
* (ladder rule 1: "always a path; never name-resolved" — incl. the `./<name>`
|
|
24
|
-
* escape that forces a colliding local dir over a declared skill
|
|
26
|
+
* escape that forces a colliding local dir over a declared skill. That escape
|
|
27
|
+
* only lands on `source`: if the local dir IS the declared skill's own source
|
|
28
|
+
* dir, rung 2a resolves `./<name>` to `buildable` anyway, so there is no escape
|
|
29
|
+
* from your own source — only from an unrelated dir that merely shares the name)
|
|
25
30
|
* - otherwise a bare word → `bare-name` (resolved against config + fs by the caller)
|
|
26
31
|
*/
|
|
27
32
|
export declare function classifyToken(ref: string): TokenShape;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../src/skill-resolution/classify.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAKpE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAmBxD;AAED,iEAAiE;AACjE,MAAM,MAAM,UAAU,GAClB;IAAE,KAAK,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,GAC7C;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,GAC1B;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAS1C
|
|
1
|
+
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../src/skill-resolution/classify.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAKpE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAmBxD;AAED,iEAAiE;AACjE,MAAM,MAAM,UAAU,GAClB;IAAE,KAAK,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,GAC7C;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,GAC1B;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAS1C;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAOrD"}
|
|
@@ -40,10 +40,15 @@ function isSourceSpec(ref) {
|
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Classify a reference token's syntactic shape (no IO):
|
|
43
|
-
* - a `kind:` prefix / `vendored` → `source-spec`
|
|
43
|
+
* - a `kind:` prefix / `vendored` → `source-spec` (note: `resolveSkillReference`
|
|
44
|
+
* re-routes the `path:` arm through its definite-path rung, because that prefix
|
|
45
|
+
* only disambiguates path-vs-name and must not change build treatment)
|
|
44
46
|
* - absolute, or contains a path separator, or starts with `.` → `definite-path`
|
|
45
47
|
* (ladder rule 1: "always a path; never name-resolved" — incl. the `./<name>`
|
|
46
|
-
* escape that forces a colliding local dir over a declared skill
|
|
48
|
+
* escape that forces a colliding local dir over a declared skill. That escape
|
|
49
|
+
* only lands on `source`: if the local dir IS the declared skill's own source
|
|
50
|
+
* dir, rung 2a resolves `./<name>` to `buildable` anyway, so there is no escape
|
|
51
|
+
* from your own source — only from an unrelated dir that merely shares the name)
|
|
47
52
|
* - otherwise a bare word → `bare-name` (resolved against config + fs by the caller)
|
|
48
53
|
*/
|
|
49
54
|
export function classifyToken(ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.js","sourceRoot":"","sources":["../../src/skill-resolution/classify.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAElE;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,GAAW;IACzC,IAAI,GAAG,KAAK,UAAU;QAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAClD,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IACvD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5B,MAAM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AAE,KAAK,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,IAAI,YAAY,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;IACrF,MAAM,GAAG,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IAChC,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAChE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;IACpC,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AAC5C,CAAC"}
|
|
@@ -9,14 +9,16 @@ export declare function findDeclaredSkillForPath(pathRef: string, cwd: string):
|
|
|
9
9
|
/**
|
|
10
10
|
* Forward-lookup companion of {@link findDeclaredSkillForPath} (which matches a
|
|
11
11
|
* DIST path): does this SOURCE path point at a declared skill's authored directory
|
|
12
|
-
* (dirname of its SKILL.md)? A
|
|
13
|
-
* `path:<source-dir>` has no
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
12
|
+
* (dirname of its SKILL.md)? A definite-path reference — subject OR a
|
|
13
|
+
* `--with`/`--with-optional` companion given as `path:<source-dir>` — has no
|
|
14
|
+
* bare-name grammar to trigger the `buildable` rung of the disambiguation ladder —
|
|
15
|
+
* this is the reverse mapping that lets it get the SAME build treatment as a
|
|
16
|
+
* bare-name reference (its `files:` injection runs before staging) without
|
|
17
|
+
* inventing new syntax. Used directly by {@link resolveSkillReference} (the
|
|
18
|
+
* subject rung) and by `resolveCompanionSpec` in run.ts (the companion rung).
|
|
19
|
+
* Pure classification; no build. Returns undefined when the path matches no
|
|
20
|
+
* declared skill (a reference outside this project's config — npm-packaged,
|
|
21
|
+
* workspace, or an undeclared local dir — is unaffected and stays a plain source).
|
|
20
22
|
*/
|
|
21
23
|
export declare function findDeclaredSkillForSourceDir(pathRef: string, cwd: string): Promise<BuildableReference | undefined>;
|
|
22
24
|
export declare function resolveSkillReference(ref: string, cwd: string): Promise<SkillReference>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-skill-reference.d.ts","sourceRoot":"","sources":["../../src/skill-resolution/resolve-skill-reference.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolve-skill-reference.d.ts","sourceRoot":"","sources":["../../src/skill-resolution/resolve-skill-reference.ts"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAqB,cAAc,EAAE,MAAM,YAAY,CAAC;AA2E3G;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAQxC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAKzC;AAuED,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAe7F"}
|
|
@@ -19,10 +19,15 @@
|
|
|
19
19
|
* Callers should support the FULL surface, not narrow to paths.
|
|
20
20
|
*
|
|
21
21
|
* Disambiguation ladder:
|
|
22
|
-
* 1. kind-prefixed / `vendored`
|
|
23
|
-
*
|
|
22
|
+
* 1. kind-prefixed / `vendored` → { kind: 'source', source }
|
|
23
|
+
* EXCEPT `path:<dir>`, which is a spelling of a definite path (the prefix only
|
|
24
|
+
* disambiguates path-vs-name) and so continues at rung 2 below.
|
|
25
|
+
* 2a. definite path AT a declared skill's SOURCE dir → buildable (same contract as a bare name; #159/#158)
|
|
26
|
+
* 2b. definite path, otherwise → { kind: 'source', source: { path } } (as-is; the `./<name>` escape lands here)
|
|
24
27
|
* 3. bare name, no governing config → existing dir ? source : not-found
|
|
25
|
-
* 4. bare name matching a declared skill → buildable (preferred even on a dir collision; note the `./` escape
|
|
28
|
+
* 4. bare name matching a declared skill → buildable (preferred even on a dir collision; note the `./` escape —
|
|
29
|
+
* which only escapes to `source` when the colliding local dir is NOT the skill's own declared source dir; if it
|
|
30
|
+
* IS, rung 2a resolves `./<name>` to `buildable` too, so there is no escape from your own source)
|
|
26
31
|
* 5. bare name, undeclared, existing dir → { kind: 'source', source: { path } }
|
|
27
32
|
* 6. bare name, undeclared, not a dir → name-miss
|
|
28
33
|
*
|
|
@@ -59,7 +64,7 @@ function computeSkillDistribution(name, sourcePath, configRoot, config) {
|
|
|
59
64
|
kind: 'plugin-local',
|
|
60
65
|
marketplaceName: location.marketplaceName,
|
|
61
66
|
pluginName: location.pluginName,
|
|
62
|
-
|
|
67
|
+
skillDirPath: location.skillDirPath,
|
|
63
68
|
},
|
|
64
69
|
expectedDistDir: location.skillOutputDir,
|
|
65
70
|
};
|
|
@@ -113,30 +118,46 @@ export async function findDeclaredSkillForPath(pathRef, cwd) {
|
|
|
113
118
|
/**
|
|
114
119
|
* Forward-lookup companion of {@link findDeclaredSkillForPath} (which matches a
|
|
115
120
|
* DIST path): does this SOURCE path point at a declared skill's authored directory
|
|
116
|
-
* (dirname of its SKILL.md)? A
|
|
117
|
-
* `path:<source-dir>` has no
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
121
|
+
* (dirname of its SKILL.md)? A definite-path reference — subject OR a
|
|
122
|
+
* `--with`/`--with-optional` companion given as `path:<source-dir>` — has no
|
|
123
|
+
* bare-name grammar to trigger the `buildable` rung of the disambiguation ladder —
|
|
124
|
+
* this is the reverse mapping that lets it get the SAME build treatment as a
|
|
125
|
+
* bare-name reference (its `files:` injection runs before staging) without
|
|
126
|
+
* inventing new syntax. Used directly by {@link resolveSkillReference} (the
|
|
127
|
+
* subject rung) and by `resolveCompanionSpec` in run.ts (the companion rung).
|
|
128
|
+
* Pure classification; no build. Returns undefined when the path matches no
|
|
129
|
+
* declared skill (a reference outside this project's config — npm-packaged,
|
|
130
|
+
* workspace, or an undeclared local dir — is unaffected and stays a plain source).
|
|
124
131
|
*/
|
|
125
132
|
export async function findDeclaredSkillForSourceDir(pathRef, cwd) {
|
|
126
133
|
const absPath = safePath.resolve(cwd, pathRef);
|
|
127
134
|
return findFirstDeclaredSkillEntry(absPath, (sourcePath, name, configRoot, config) => safePath.resolve(dirname(sourcePath)) === absPath ? buildBuildable(name, sourcePath, configRoot, config) : undefined);
|
|
128
135
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Rung 2 of the disambiguation ladder: a definite path (absolute, has `/`, or
|
|
138
|
+
* starts `.` — or the `path:<dir>` spelling of one, which routes here from
|
|
139
|
+
* {@link resolveSkillReference}). A path AT a declared skill's SOURCE dir resolves to `buildable`,
|
|
140
|
+
* exactly like the bare-name form (#159's contract, extended from the companion
|
|
141
|
+
* side to the subject side: source != dist for every declared skill, so a real
|
|
142
|
+
* run must build it, not tree-copy raw source). `--no-build` remains the escape
|
|
143
|
+
* hatch. Otherwise the path is staged AS-IS (never rebuilt), but if it points at
|
|
144
|
+
* a declared skill's built dist, link it back so the harness still honors that
|
|
145
|
+
* skill's test: config. Extracted from {@link resolveSkillReference} to keep its
|
|
146
|
+
* cognitive complexity within budget.
|
|
147
|
+
*/
|
|
148
|
+
async function resolveDefinitePath(ref, cwd) {
|
|
149
|
+
const declaredSource = await findDeclaredSkillForSourceDir(ref, cwd);
|
|
150
|
+
if (declaredSource !== undefined)
|
|
151
|
+
return declaredSource;
|
|
152
|
+
const declaredSkill = await findDeclaredSkillForPath(ref, cwd);
|
|
153
|
+
return { kind: 'source', source: { path: ref }, ...(declaredSkill ? { declaredSkill } : {}) };
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Rungs 3-6 of the disambiguation ladder: a bare name, resolved against the
|
|
157
|
+
* governing project config (or its absence). Extracted from
|
|
158
|
+
* {@link resolveSkillReference} to keep its cognitive complexity within budget.
|
|
159
|
+
*/
|
|
160
|
+
async function resolveBareName(ref, cwd) {
|
|
140
161
|
const configRoot = findProjectRoot(cwd);
|
|
141
162
|
const dirCandidate = safePath.resolve(cwd, ref);
|
|
142
163
|
if (configRoot === null) {
|
|
@@ -174,6 +195,24 @@ export async function resolveSkillReference(ref, cwd) {
|
|
|
174
195
|
knownSkills: [...byName.keys()].sort((a, b) => a.localeCompare(b)),
|
|
175
196
|
};
|
|
176
197
|
}
|
|
198
|
+
export async function resolveSkillReference(ref, cwd) {
|
|
199
|
+
const shape = classifyToken(ref);
|
|
200
|
+
if (shape.shape === 'source-spec') {
|
|
201
|
+
// `path:<dir>` is a DISAMBIGUATOR — it says "read this token as a path, not a
|
|
202
|
+
// bare name" — not a build directive. So it takes the same rung-2 walk a bare
|
|
203
|
+
// definite path takes: at a declared skill's source dir it is `buildable`,
|
|
204
|
+
// anywhere else it is `source`. Spelling the same directory two ways must not
|
|
205
|
+
// change whether VAT tests the dist or raw source; `--no-build` is the one
|
|
206
|
+
// build directive. Scoped to `path:` alone: `workspace:`, `npm:`, `url:` and
|
|
207
|
+
// `vendored` are not paths into this project tree and stay untouched.
|
|
208
|
+
if ('path' in shape.source)
|
|
209
|
+
return resolveDefinitePath(shape.source.path, cwd);
|
|
210
|
+
return { kind: 'source', source: shape.source };
|
|
211
|
+
}
|
|
212
|
+
if (shape.shape === 'definite-path')
|
|
213
|
+
return resolveDefinitePath(ref, cwd);
|
|
214
|
+
return resolveBareName(ref, cwd);
|
|
215
|
+
}
|
|
177
216
|
async function buildBuildable(name, sourcePath, configRoot, config) {
|
|
178
217
|
const packagingConfig = (await resolveSkillPackagingConfig(sourcePath)) ?? {};
|
|
179
218
|
const { distribution, expectedDistDir } = computeSkillDistribution(name, sourcePath, configRoot, config);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-skill-reference.js","sourceRoot":"","sources":["../../src/skill-resolution/resolve-skill-reference.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"resolve-skill-reference.js","sourceRoot":"","sources":["../../src/skill-resolution/resolve-skill-reference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,oCAAoC,EACpC,iBAAiB,GAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAG/F,SAAS,WAAW,CAAC,CAAS;IAC5B,8FAA8F;IAC9F,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;AACvB,CAAC;AAED;;;;;GAKG;AACH,SAAS,wBAAwB,CAC/B,IAAY,EACZ,UAAkB,EAClB,UAAkB,EAClB,MAAwD;IAExD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,IAAI,CAA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,IAAI,KAAK,CAAC,MAAM;YAAE,OAAO,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC/E,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;IAClD,CAAC;IACD,IAAI,KAAK,CAAC,KAAK,KAAK,eAAe;QAAE,OAAO,mBAAmB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC1E,OAAO,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AACnC,CAAC;AAED,KAAK,UAAU,cAAc,CAC3B,IAAY,EACZ,UAAkB,EAClB,UAAkB,EAClB,MAAwD;IAExD,MAAM,eAAe,GAAG,CAAC,MAAM,2BAA2B,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9E,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,GAAG,wBAAwB,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IACzG,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAC7G,CAAC"}
|
|
@@ -10,12 +10,13 @@ export type SkillDistribution =
|
|
|
10
10
|
{
|
|
11
11
|
kind: 'pool';
|
|
12
12
|
}
|
|
13
|
-
/** Plugin-local
|
|
13
|
+
/** Plugin-local skill: packaged in place by `vat claude plugin build`. */
|
|
14
14
|
| {
|
|
15
15
|
kind: 'plugin-local';
|
|
16
16
|
marketplaceName: string;
|
|
17
17
|
pluginName: string;
|
|
18
|
-
|
|
18
|
+
/** Dir path relative to the plugin's `skills/` dir — `group/nested` when nested. */
|
|
19
|
+
skillDirPath: string;
|
|
19
20
|
};
|
|
20
21
|
/**
|
|
21
22
|
* A project-local reference (a bare NAME matching a declared skill) that must be
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/skill-resolution/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE1F,0DAA0D;AAC1D,MAAM,MAAM,iBAAiB;AAC3B,yEAAyE;AACvE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE;AAClB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/skill-resolution/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE1F,0DAA0D;AAC1D,MAAM,MAAM,iBAAiB;AAC3B,yEAAyE;AACvE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE;AAClB,0EAA0E;GACxE;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEN;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,WAAW,CAAC;IAClB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAC;IACnB,yFAAyF;IACzF,UAAU,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,eAAe,EAAE,oBAAoB,CAAC;IACtC,kCAAkC;IAClC,YAAY,EAAE,iBAAiB,CAAC;IAChC,iFAAiF;IACjF,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,UAAU,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,UAAU,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GACtB,kBAAkB,GAClB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,WAAW,CAAC;IAAC,aAAa,CAAC,EAAE,iBAAiB,CAAA;CAAE,GAC1E;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,GAC9E;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/utils/config-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAMxF;;;;;;;;GAQG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;gBACjB,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAMhD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CA8BzE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEvD;
|
|
1
|
+
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/utils/config-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAMxF;;;;;;;;GAQG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;gBACjB,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAMhD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CA8BzE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEvD;AAqBD;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAG7C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAgB/E"}
|
|
@@ -90,8 +90,6 @@ export function getConfigDir(configPath) {
|
|
|
90
90
|
*
|
|
91
91
|
* Tests that mutate fixtures between runs must call
|
|
92
92
|
* {@link resetLoadedConfigCache} to invalidate this cache.
|
|
93
|
-
*
|
|
94
|
-
* See spec docs/superpowers/specs/2026-05-17-root-model-and-leading-slash-design.md §8.
|
|
95
93
|
*/
|
|
96
94
|
const loadedConfigCache = new Map();
|
|
97
95
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-loader.js","sourceRoot":"","sources":["../../src/utils/config-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAsB,MAAM,+BAA+B,CAAC;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,eAAe,GAAG,gCAAgC,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAC/B,WAAW,CAAS;IAC7B,YAAY,WAAmB,EAAE,KAAc;QAC7C,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,C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AAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAClD,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,IAAI,SAAS,CAAC;IACrD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;QACvC,iBAAiB,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,IAAI,IAAI,CAAC,CAAC;QACnD,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,4EAA4E;QAC5E,8EAA8E;QAC9E,MAAM,SAAS,GAAG,GAAG,YAAY,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QAC/F,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAC3C,MAAM,SAAS,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -9,4 +9,20 @@
|
|
|
9
9
|
* @returns Markdown content as string
|
|
10
10
|
*/
|
|
11
11
|
export declare function loadVerboseHelp(section?: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Write a verbose-help document to stdout, SYNCHRONOUSLY, with a trailing newline.
|
|
14
|
+
*
|
|
15
|
+
* Every verbose-help path calls `process.exit(0)` the moment it has written. When
|
|
16
|
+
* stdout is a pipe, `process.stdout.write` is ASYNCHRONOUS, and `process.exit`
|
|
17
|
+
* does not wait for the pending write to drain — so everything past the first
|
|
18
|
+
* pipe buffer (~8 KB on macOS) was silently dropped. Most of the help documents
|
|
19
|
+
* in `packages/cli/docs/` are larger than that, so `vat --help --verbose | less`
|
|
20
|
+
* and `> file` lost their tail, while an interactive TTY (unbuffered) looked fine.
|
|
21
|
+
* That directly violates this package's own rule that help must survive piping.
|
|
22
|
+
*
|
|
23
|
+
* `writeSync` in a drain loop is the fix: it cannot return before the bytes are
|
|
24
|
+
* handed to the pipe, so `process.exit` has nothing left to lose. The loop is
|
|
25
|
+
* required because a single `writeSync` may accept fewer bytes than offered.
|
|
26
|
+
*/
|
|
27
|
+
export declare function writeHelpSync(content: string): void;
|
|
12
28
|
//# sourceMappingURL=help-loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-loader.d.ts","sourceRoot":"","sources":["../../src/utils/help-loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAyBxD"}
|
|
1
|
+
{"version":3,"file":"help-loader.d.ts","sourceRoot":"","sources":["../../src/utils/help-loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAyBxD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAYnD"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Help loader - reads verbose help from markdown files
|
|
3
3
|
* Markdown docs are the source of truth for CLI help
|
|
4
4
|
*/
|
|
5
|
-
import { readFileSync } from 'node:fs';
|
|
5
|
+
import { readFileSync, writeSync } from 'node:fs';
|
|
6
6
|
import { dirname } from 'node:path';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
8
|
import { safePath } from '@vibe-agent-toolkit/utils';
|
|
@@ -37,4 +37,34 @@ Please report this issue at: https://github.com/jdutton/vibe-agent-toolkit/issue
|
|
|
37
37
|
`;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Write a verbose-help document to stdout, SYNCHRONOUSLY, with a trailing newline.
|
|
42
|
+
*
|
|
43
|
+
* Every verbose-help path calls `process.exit(0)` the moment it has written. When
|
|
44
|
+
* stdout is a pipe, `process.stdout.write` is ASYNCHRONOUS, and `process.exit`
|
|
45
|
+
* does not wait for the pending write to drain — so everything past the first
|
|
46
|
+
* pipe buffer (~8 KB on macOS) was silently dropped. Most of the help documents
|
|
47
|
+
* in `packages/cli/docs/` are larger than that, so `vat --help --verbose | less`
|
|
48
|
+
* and `> file` lost their tail, while an interactive TTY (unbuffered) looked fine.
|
|
49
|
+
* That directly violates this package's own rule that help must survive piping.
|
|
50
|
+
*
|
|
51
|
+
* `writeSync` in a drain loop is the fix: it cannot return before the bytes are
|
|
52
|
+
* handed to the pipe, so `process.exit` has nothing left to lose. The loop is
|
|
53
|
+
* required because a single `writeSync` may accept fewer bytes than offered.
|
|
54
|
+
*/
|
|
55
|
+
export function writeHelpSync(content) {
|
|
56
|
+
const buffer = Buffer.from(content.endsWith('\n') ? content : `${content}\n`, 'utf8');
|
|
57
|
+
let written = 0;
|
|
58
|
+
while (written < buffer.length) {
|
|
59
|
+
try {
|
|
60
|
+
written += writeSync(1, buffer, written, buffer.length - written);
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
// A non-blocking pipe whose buffer is momentarily full raises EAGAIN; the
|
|
64
|
+
// reader will drain it, so retry. Anything else is a genuine write failure.
|
|
65
|
+
if (error.code !== 'EAGAIN')
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
40
70
|
//# sourceMappingURL=help-loader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-loader.js","sourceRoot":"","sources":["../../src/utils/help-loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"help-loader.js","sourceRoot":"","sources":["../../src/utils/help-loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,U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AAI,CAAC;YACH,OAAO,IAAI,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC;QACpE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,0EAA0E;YAC1E,4EAA4E;YAC5E,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;gBAAE,MAAM,KAAK,CAAC;QACtE,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rendering for the four `ValidationIssue` anchors.
|
|
3
|
+
*
|
|
4
|
+
* `location` / `line` / `field` are independent fields on the issue (see the
|
|
5
|
+
* anchor contract on `ValidationIssue` in `@vibe-agent-toolkit/agent-schema`).
|
|
6
|
+
* Splitting them apart in the producers only pays off if the renderers put
|
|
7
|
+
* them back together — a `line` that no output surface prints is a `line` that,
|
|
8
|
+
* from the user's side, was deleted. This is the one place that join happens,
|
|
9
|
+
* so every command spells an anchor the same way.
|
|
10
|
+
*/
|
|
11
|
+
import type { ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
|
|
12
|
+
/**
|
|
13
|
+
* Render an issue's anchor as a single human/tool-readable string.
|
|
14
|
+
*
|
|
15
|
+
* - `docs/guide.md` — file only
|
|
16
|
+
* - `docs/guide.md:24` — file + line, the `file:line` convention every editor
|
|
17
|
+
* and `grep -n` consumer already knows how to jump to
|
|
18
|
+
* - `SKILL.md (frontmatter.description)` — file + document-internal field
|
|
19
|
+
* - `(frontmatter.description)` — field with no known file (should not happen
|
|
20
|
+
* for skills-lane issues, but the renderer must not silently drop it)
|
|
21
|
+
*
|
|
22
|
+
* Returns `undefined` when the issue carries no anchor at all, so callers can
|
|
23
|
+
* skip the line entirely rather than print an empty label.
|
|
24
|
+
*/
|
|
25
|
+
export declare function formatIssueAnchor(issue: ValidationIssue): string | undefined;
|
|
26
|
+
//# sourceMappingURL=issue-anchor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue-anchor.d.ts","sourceRoot":"","sources":["../../src/utils/issue-anchor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CAe5E"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rendering for the four `ValidationIssue` anchors.
|
|
3
|
+
*
|
|
4
|
+
* `location` / `line` / `field` are independent fields on the issue (see the
|
|
5
|
+
* anchor contract on `ValidationIssue` in `@vibe-agent-toolkit/agent-schema`).
|
|
6
|
+
* Splitting them apart in the producers only pays off if the renderers put
|
|
7
|
+
* them back together — a `line` that no output surface prints is a `line` that,
|
|
8
|
+
* from the user's side, was deleted. This is the one place that join happens,
|
|
9
|
+
* so every command spells an anchor the same way.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Render an issue's anchor as a single human/tool-readable string.
|
|
13
|
+
*
|
|
14
|
+
* - `docs/guide.md` — file only
|
|
15
|
+
* - `docs/guide.md:24` — file + line, the `file:line` convention every editor
|
|
16
|
+
* and `grep -n` consumer already knows how to jump to
|
|
17
|
+
* - `SKILL.md (frontmatter.description)` — file + document-internal field
|
|
18
|
+
* - `(frontmatter.description)` — field with no known file (should not happen
|
|
19
|
+
* for skills-lane issues, but the renderer must not silently drop it)
|
|
20
|
+
*
|
|
21
|
+
* Returns `undefined` when the issue carries no anchor at all, so callers can
|
|
22
|
+
* skip the line entirely rather than print an empty label.
|
|
23
|
+
*/
|
|
24
|
+
export function formatIssueAnchor(issue) {
|
|
25
|
+
const hasLocation = issue.location !== undefined && issue.location !== '';
|
|
26
|
+
const hasField = issue.field !== undefined && issue.field !== '';
|
|
27
|
+
if (!hasLocation && !hasField) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
let anchor = hasLocation ? issue.location : '';
|
|
31
|
+
if (issue.line !== undefined) {
|
|
32
|
+
anchor = `${anchor}:${String(issue.line)}`;
|
|
33
|
+
}
|
|
34
|
+
if (hasField) {
|
|
35
|
+
anchor = anchor === '' ? `(${issue.field})` : `${anchor} (${issue.field})`;
|
|
36
|
+
}
|
|
37
|
+
return anchor;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=issue-anchor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue-anchor.js","sourceRoot":"","sources":["../../src/utils/issue-anchor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAsB;IACtD,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,KAAK,SAAS,IAAI,KAAK,CAAC,QAAQ,KAAK,EAAE,CAAC;IAC1E,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,EAAE,CAAC;IACjE,IAAI,CAAC,WAAW,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC9B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,MAAM,GAAG,WAAW,CAAC,CAAC,CAAE,KAAK,CAAC,QAAmB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3D,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC7B,MAAM,GAAG,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;IAC7C,CAAC;IACD,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,GAAG,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,KAAe,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,KAAK,KAAK,CAAC,KAAe,GAAG,CAAC;IACjG,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rendering for SETS of `ValidationIssue`s — the severity label, the set's
|
|
3
|
+
* heading, and the per-issue block.
|
|
4
|
+
*
|
|
5
|
+
* `issue-anchor.ts` answers "where is this issue?"; this module answers "what
|
|
6
|
+
* severity is it, and what is in this set?". Both exist because the answer has
|
|
7
|
+
* to be spelled identically by every command: two renderers that each invent
|
|
8
|
+
* their own severity prefix is exactly how `info` findings came to be printed
|
|
9
|
+
* as `[WARNING]` in `vat skills build` AND `vat claude plugin build`, and how a
|
|
10
|
+
* mixed set came to be labelled "post-build error(s)" wholesale.
|
|
11
|
+
*
|
|
12
|
+
* The failure mode these helpers exist to prevent is directional: every
|
|
13
|
+
* hand-rolled severity collapse in this codebase mapped the case it could not
|
|
14
|
+
* represent onto the REASSURING one (info ⇒ "warning", warnings ⇒ "all
|
|
15
|
+
* passed"). That is why none of it was ever reported — it produces silence, not
|
|
16
|
+
* a false alarm.
|
|
17
|
+
*/
|
|
18
|
+
import { type SeverityCounts, type ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
|
|
19
|
+
import type { PackageSkillResult } from '@vibe-agent-toolkit/agent-skills';
|
|
20
|
+
/** Render an issue's own severity as itself. */
|
|
21
|
+
export declare function severityLabel(severity: ValidationIssue['severity']): string;
|
|
22
|
+
/**
|
|
23
|
+
* The severity distribution in prose: `1 error, 2 warnings, 3 info`.
|
|
24
|
+
*
|
|
25
|
+
* Zero buckets are omitted so the phrase names only what is present. An
|
|
26
|
+
* all-zero set returns `no findings` rather than an empty string, because an
|
|
27
|
+
* empty string silently disappears into whatever sentence embeds it.
|
|
28
|
+
*/
|
|
29
|
+
export declare function formatSeverityBreakdown(counts: SeverityCounts): string;
|
|
30
|
+
/**
|
|
31
|
+
* Heading for a set of issues: `3 post-build issues (1 error, 2 info)`.
|
|
32
|
+
*
|
|
33
|
+
* The breakdown is not decoration — it is the only part of the heading that
|
|
34
|
+
* cannot be wrong about a mixed set. `noun` qualifies the set ("post-build"),
|
|
35
|
+
* and is omitted entirely when empty.
|
|
36
|
+
*/
|
|
37
|
+
export declare function formatIssueSetHeading(issues: readonly ValidationIssue[], noun?: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Render one issue as its own lines, each prefixed with `indent`.
|
|
40
|
+
*
|
|
41
|
+
* Returns an array rather than writing, so a caller can pick its own stream and
|
|
42
|
+
* a unit test can assert over every line without capturing output.
|
|
43
|
+
*/
|
|
44
|
+
export declare function formatIssueLines(issue: ValidationIssue, indent?: string): string[];
|
|
45
|
+
/**
|
|
46
|
+
* Every post-build finding a `PackageSkillResult` carries, from BOTH channels.
|
|
47
|
+
*
|
|
48
|
+
* `hasErrors` is the OR of two independent sets — the packager's own framework
|
|
49
|
+
* run (`postBuildIssues`: link exclusions, unreferenced files, broken packaged
|
|
50
|
+
* links) and the full validation of the built tree (`postBuildValidation`). A
|
|
51
|
+
* renderer that walks only `postBuildIssues` therefore prints NOTHING for a
|
|
52
|
+
* build that failed purely on `postBuildValidation`: the user is told the build
|
|
53
|
+
* failed and shown no reason. Reading both is the whole point of this helper.
|
|
54
|
+
*
|
|
55
|
+
* `postBuildValidation.allErrors` is the full emitted set including `info`
|
|
56
|
+
* (see its doc comment — the name lies), so info findings survive here.
|
|
57
|
+
*/
|
|
58
|
+
export declare function collectPostBuildIssues(result: PackageSkillResult): ValidationIssue[];
|
|
59
|
+
/** Sum severity counts across lanes (per-skill → per-plugin → per-run). */
|
|
60
|
+
export declare function sumSeverityCounts(counts: readonly SeverityCounts[]): SeverityCounts;
|
|
61
|
+
//# sourceMappingURL=issue-rendering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue-rendering.d.ts","sourceRoot":"","sources":["../../src/utils/issue-rendering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAiB3E,gDAAgD;AAChD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,GAAG,MAAM,CAE3E;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAYtE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,CAKR;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,EAAE,MAAM,SAAK,GAAG,MAAM,EAAE,CAY9E;AAcD;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,kBAAkB,GAAG,eAAe,EAAE,CAapF;AAED,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE,GAAG,cAAc,CASnF"}
|