@vibe-agent-toolkit/cli 0.2.0-rc.1 → 0.2.0-rc.3
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/dist/bin/vat +66 -15
- package/dist/bin/vat.js +66 -15
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +155 -36
- package/dist/bin.js.map +1 -1
- package/dist/command-loaders.d.ts +44 -0
- package/dist/command-loaders.d.ts.map +1 -0
- package/dist/command-loaders.js +58 -0
- package/dist/command-loaders.js.map +1 -0
- package/dist/commands/agent/index.js +1 -1
- package/dist/commands/agent/install.d.ts.map +1 -1
- package/dist/commands/agent/install.js +46 -5
- package/dist/commands/agent/install.js.map +1 -1
- package/dist/commands/audit/distributed-tree.d.ts +1 -1
- package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
- package/dist/commands/audit/distributed-tree.js.map +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
- package/dist/commands/audit/hierarchical-output.js +1 -1
- package/dist/commands/audit/hierarchical-output.js.map +1 -1
- package/dist/commands/audit.d.ts +22 -1
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +223 -24
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +2 -2
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cache/cache-control.d.ts +73 -0
- package/dist/commands/cache/cache-control.d.ts.map +1 -0
- package/dist/commands/cache/cache-control.js +77 -0
- package/dist/commands/cache/cache-control.js.map +1 -0
- package/dist/commands/cache/clear.d.ts +17 -3
- package/dist/commands/cache/clear.d.ts.map +1 -1
- package/dist/commands/cache/clear.js +68 -3
- package/dist/commands/cache/clear.js.map +1 -1
- package/dist/commands/cache/index.d.ts +13 -63
- package/dist/commands/cache/index.d.ts.map +1 -1
- package/dist/commands/cache/index.js +38 -79
- package/dist/commands/cache/index.js.map +1 -1
- package/dist/commands/claude/budget.d.ts +157 -0
- package/dist/commands/claude/budget.d.ts.map +1 -0
- package/dist/commands/claude/budget.js +412 -0
- package/dist/commands/claude/budget.js.map +1 -0
- package/dist/commands/claude/context.d.ts +211 -0
- package/dist/commands/claude/context.d.ts.map +1 -0
- package/dist/commands/claude/context.js +709 -0
- package/dist/commands/claude/context.js.map +1 -0
- package/dist/commands/claude/index.d.ts +13 -0
- package/dist/commands/claude/index.d.ts.map +1 -1
- package/dist/commands/claude/index.js +24 -2
- package/dist/commands/claude/index.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +18 -20
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate.d.ts +1 -1
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +1 -1
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/plugin/build.d.ts +16 -2
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +64 -11
- 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 +22 -2
- package/dist/commands/claude/plugin/install.js.map +1 -1
- package/dist/commands/claude/plugin/marketplace-json.d.ts +24 -9
- package/dist/commands/claude/plugin/marketplace-json.d.ts.map +1 -1
- package/dist/commands/claude/plugin/marketplace-json.js +10 -9
- package/dist/commands/claude/plugin/marketplace-json.js.map +1 -1
- package/dist/commands/consistency-check.d.ts.map +1 -1
- package/dist/commands/consistency-check.js +3 -3
- package/dist/commands/consistency-check.js.map +1 -1
- package/dist/commands/corpus/report.d.ts +1 -1
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +1 -1
- 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 +17 -8
- package/dist/commands/corpus/scan.js.map +1 -1
- package/dist/commands/doctor.d.ts +36 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +96 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory.d.ts +13 -1
- package/dist/commands/inventory.d.ts.map +1 -1
- package/dist/commands/inventory.js +118 -13
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/mcp/collections.d.ts +1 -1
- package/dist/commands/mcp/collections.d.ts.map +1 -1
- package/dist/commands/phase-utils.d.ts +1 -1
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/positional-args.js +1 -1
- package/dist/commands/positional-args.js.map +1 -1
- package/dist/commands/rag/index-command.d.ts +39 -0
- package/dist/commands/rag/index-command.d.ts.map +1 -1
- package/dist/commands/rag/index-command.js +28 -2
- 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 +21 -10
- package/dist/commands/rag/index.js.map +1 -1
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +10 -2
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/scan.d.ts +24 -0
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +18 -5
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate.d.ts +1 -1
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +6 -3
- 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 +1 -0
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skill/review.js +2 -2
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/configure.d.ts +19 -0
- package/dist/commands/skill/test/configure.d.ts.map +1 -1
- package/dist/commands/skill/test/configure.js +18 -3
- package/dist/commands/skill/test/configure.js.map +1 -1
- package/dist/commands/skill/test/run.d.ts +51 -4
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +112 -10
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build.d.ts +1 -1
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +72 -37
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/package.d.ts +1 -1
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/scope-guard.js +1 -1
- package/dist/commands/skills/scope-guard.js.map +1 -1
- package/dist/commands/skills/validate.d.ts +1 -1
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +37 -19
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +2 -1
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +2 -2
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +4 -4
- package/dist/commands/verify.js.map +1 -1
- package/dist/utils/command-error.d.ts +1 -1
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +1 -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 +7 -1
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/context-budget-issues.d.ts +108 -0
- package/dist/utils/context-budget-issues.d.ts.map +1 -0
- package/dist/utils/context-budget-issues.js +280 -0
- package/dist/utils/context-budget-issues.js.map +1 -0
- package/dist/utils/corpus-target.d.ts +48 -0
- package/dist/utils/corpus-target.d.ts.map +1 -0
- package/dist/utils/corpus-target.js +61 -0
- package/dist/utils/corpus-target.js.map +1 -0
- package/dist/utils/issue-anchor.d.ts +2 -2
- package/dist/utils/issue-anchor.d.ts.map +1 -1
- package/dist/utils/issue-anchor.js +1 -1
- package/dist/utils/issue-rendering.d.ts +1 -1
- package/dist/utils/issue-rendering.d.ts.map +1 -1
- package/dist/utils/issue-rendering.js +1 -1
- package/dist/utils/issue-rendering.js.map +1 -1
- package/dist/utils/issue-severity.d.ts +1 -1
- package/dist/utils/issue-severity.d.ts.map +1 -1
- package/dist/utils/issue-severity.js +1 -1
- package/dist/utils/issue-severity.js.map +1 -1
- package/dist/utils/optional-backend.d.ts +77 -0
- package/dist/utils/optional-backend.d.ts.map +1 -0
- package/dist/utils/optional-backend.js +115 -0
- package/dist/utils/optional-backend.js.map +1 -0
- package/dist/utils/output.d.ts +17 -0
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +19 -0
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/population-wiring.d.ts +59 -0
- package/dist/utils/population-wiring.d.ts.map +1 -0
- package/dist/utils/population-wiring.js +55 -0
- package/dist/utils/population-wiring.js.map +1 -0
- package/dist/utils/projection-store.d.ts +186 -0
- package/dist/utils/projection-store.d.ts.map +1 -0
- package/dist/utils/projection-store.js +255 -0
- package/dist/utils/projection-store.js.map +1 -0
- package/dist/utils/resource-loader.d.ts +127 -1
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +224 -7
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/verdict-helpers.d.ts +1 -1
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +1 -1
- package/dist/utils/verdict-helpers.js.map +1 -1
- package/docs/agent.md +2 -2
- package/docs/mcp.md +2 -2
- package/docs/resources.md +8 -1
- package/package.json +15 -12
|
@@ -30,9 +30,18 @@ export async function installAgent(agentName, options) {
|
|
|
30
30
|
// Ensure target directory exists
|
|
31
31
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- Path constructed from validated scope location
|
|
32
32
|
await fs.mkdir(targetLocation, { recursive: true });
|
|
33
|
-
// Check if already installed
|
|
33
|
+
// Check if already installed.
|
|
34
|
+
//
|
|
35
|
+
// `lstat`, not `access`: `access` FOLLOWS symlinks, so a dangling dev-mode
|
|
36
|
+
// link — precisely what `build:clean` orphans by deleting `dist/` under a
|
|
37
|
+
// previous `--dev` install — answered ENOENT here. That fell into the catch
|
|
38
|
+
// below as "not installed", which skipped the `--force` removal and left the
|
|
39
|
+
// link in place for `fs.symlink` to reject with EEXIST. `--force` was inert
|
|
40
|
+
// against the one state it most needed to clear. `lstat` stats the link
|
|
41
|
+
// itself, so the entry is seen whether or not its target still exists.
|
|
34
42
|
try {
|
|
35
|
-
|
|
43
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename -- installPath is built from a validated scope location
|
|
44
|
+
await fs.lstat(installPath);
|
|
36
45
|
if (!force) {
|
|
37
46
|
logger.error(`\n${agentName} already installed at ${installPath}\n` +
|
|
38
47
|
`Use --force to overwrite\n`);
|
|
@@ -45,9 +54,7 @@ export async function installAgent(agentName, options) {
|
|
|
45
54
|
// Not installed, continue
|
|
46
55
|
}
|
|
47
56
|
if (dev) {
|
|
48
|
-
|
|
49
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- Paths from validated sources
|
|
50
|
-
await fs.symlink(builtSkillPath, installPath, 'dir');
|
|
57
|
+
await linkForDevelopment(builtSkillPath, installPath);
|
|
51
58
|
logger.info(`✓ Symlinked ${agentName} to ${installPath} (dev mode)`);
|
|
52
59
|
logger.info(` Rebuild agent to see changes immediately`);
|
|
53
60
|
}
|
|
@@ -64,6 +71,40 @@ export async function installAgent(agentName, options) {
|
|
|
64
71
|
handleCommandError(error, logger, startTime, 'Install');
|
|
65
72
|
}
|
|
66
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Symlink a built bundle into place for `--dev`, failing legibly where the OS
|
|
76
|
+
* refuses.
|
|
77
|
+
*
|
|
78
|
+
* ⚠️ **This is POSIX-only in practice, and not by anything written here.**
|
|
79
|
+
* `installAgent` refuses `dev` on win32 before this is reachable, naming WSL
|
|
80
|
+
* and copy mode. So Windows never gets this far, and any Windows-specific
|
|
81
|
+
* handling added here would be dead code — an earlier revision added exactly
|
|
82
|
+
* that, relabelling a `SeCreateSymbolicLinkPrivilege` EPERM that cannot occur.
|
|
83
|
+
* If `--dev` is ever to work on Windows, the change belongs at that guard (a
|
|
84
|
+
* junction takes no elevation, as `dev-tools/src/link-workspace-packages.ts`
|
|
85
|
+
* already does), not in this catch.
|
|
86
|
+
*
|
|
87
|
+
* Deliberately does NOT fall back to copying. `--dev` exists so a rebuild is
|
|
88
|
+
* picked up live; a copy that reported success would leave someone editing
|
|
89
|
+
* sources and wondering why nothing changes — a silent wrong answer in place of
|
|
90
|
+
* a loud, correct refusal.
|
|
91
|
+
*
|
|
92
|
+
* @param builtSkillPath - Absolute path to the built bundle
|
|
93
|
+
* @param installPath - Where the link should be created
|
|
94
|
+
* @throws When the link cannot be created, naming the remedy
|
|
95
|
+
*/
|
|
96
|
+
async function linkForDevelopment(builtSkillPath, installPath) {
|
|
97
|
+
try {
|
|
98
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename, local/no-bare-symlink-in-tests -- eyes open: win32 is refused by the guard in `installAgent` before this runs, so the Windows privilege hazard the rule names cannot be reached here.
|
|
99
|
+
await fs.symlink(builtSkillPath, installPath, 'dir');
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
103
|
+
throw new Error(`Could not create the dev-mode symlink at ${installPath}: ${detail}\n` +
|
|
104
|
+
`Re-run with --force to replace whatever is already at ${installPath}, ` +
|
|
105
|
+
'or install without --dev to copy the bundle instead of linking it.');
|
|
106
|
+
}
|
|
107
|
+
}
|
|
67
108
|
/**
|
|
68
109
|
* Find built skill bundle
|
|
69
110
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/commands/agent/install.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OA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ings}) rather than guessing in either direction.
|
|
91
91
|
*/
|
|
92
|
-
import { type ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
|
|
93
92
|
import { type GitTrackerSource } from '@vibe-agent-toolkit/claude-marketplace';
|
|
93
|
+
import { type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
94
94
|
import { GitTracker } from '@vibe-agent-toolkit/utils';
|
|
95
95
|
/**
|
|
96
96
|
* Get (or build) the pre-populated tracker for one git root.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distributed-tree.d.ts","sourceRoot":"","sources":["../../../src/commands/audit/distributed-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;
|
|
1
|
+
{"version":3,"file":"distributed-tree.d.ts","sourceRoot":"","sources":["../../../src/commands/audit/distributed-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AAGH,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACnG,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAEL,UAAU,EAKX,MAAM,2BAA2B,CAAC;AAKnC;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAShF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,eAAO,MAAM,wBAAwB,EAAE,gBAUtC,CAAC;AAcF,iEAAiE;AACjE,wBAAgB,oBAAoB,IAAI,IAAI,CAG3C;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,aAAa,GAAG,eAAe,CAAC;AAmClF;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAIpE;AAkBD;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAShG;AA0BD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE5E;AA+BD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,eAAe,EAAE,CAAC,CAuB5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distributed-tree.js","sourceRoot":"","sources":["../../../src/commands/audit/distributed-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;
|
|
1
|
+
{"version":3,"file":"distributed-tree.js","sourceRoot":"","sources":["../../../src/commands/audit/distributed-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AAEH,OAAO,EAAE,mCAAmC,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzG,OAAO,EAAE,kBAAkB,EAAyB,MAAM,wCAAwC,CAAC;AAEnG,OAAO,EACL,WAAW,EACX,UAAU,EACV,aAAa,EACb,aAAa,EACb,QAAQ,EACR,cAAc,GACf,MAAM,2BAA2B,CAAC;AAEnC,iFAAiF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AC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,mCAAmC,CAAC,QAAQ,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;IAChF,IAAI,UAAU,KAAK,aAAa;QAAE,OAAO,OAAO,CAAC;IAEjD,yEAAyE;IACzE,gFAAgF;IAChF,iFAAiF;IACjF,+EAA+E;IAC/E,8EAA8E;IAC9E,2EAA2E;IAC3E,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACtD,OAAO;QACL,gBAAgB,CAAC,+BAA+B,EAAE;YAChD,QAAQ;YACR,MAAM,EAAE,GAAG,QAAQ,KAAK,OAAO,CAAC,MAAM,iDAAiD;SACxF,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
|
|
2
1
|
import type { ValidationResult } from '@vibe-agent-toolkit/agent-skills';
|
|
2
|
+
import { type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
3
3
|
export interface HierarchicalOutput {
|
|
4
4
|
marketplaces: MarketplaceGroup[];
|
|
5
5
|
cachedPlugins: PluginGroup[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hierarchical-output.d.ts","sourceRoot":"","sources":["../../../src/commands/audit/hierarchical-output.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"hierarchical-output.d.ts","sourceRoot":"","sources":["../../../src/commands/audit/hierarchical-output.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,4BAA4B,CAAC;AAGpC,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,gBAAgB,EAAE,UAAU,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACxC,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAqaD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,gBAAgB,EAAE,EAC3B,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,MAAM,GACnB,kBAAkB,CAyCpB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as os from 'node:os';
|
|
2
|
-
import { calculateValidationStatus, countBySeverity, } from '@vibe-agent-toolkit/
|
|
2
|
+
import { calculateValidationStatus, countBySeverity, } from '@vibe-agent-toolkit/schema';
|
|
3
3
|
import { issueLocation, toForwardSlash } from '@vibe-agent-toolkit/utils';
|
|
4
4
|
/** Build {@link ParsedSkillPath.identity} from the parsed segments. */
|
|
5
5
|
function skillIdentity(parts, marketplace, plugin, skill) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hierarchical-output.js","sourceRoot":"","sources":["../../../src/commands/audit/hierarchical-output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"hierarchical-output.js","sourceRoot":"","sources":["../../../src/commands/audit/hierarchical-output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAG9B,OAAO,EACL,yBAAyB,EACzB,eAAe,GAEhB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAsD1E,uEAAuE;AACvE,SAAS,aAAa,CACpB,KAAe,EACf,WAA+B,EAC/B,MAA0B,EAC1B,KAAa;IAEb,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,GAAG,WAAW,IAAI,EAAE,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;AACnD,CAAC;AAED,SAAS,MAAM,CACb,KAAe,EACf,KAAa,EACb,QAAiB,EACjB,WAAoB,EACpB,MAAe;IAEf,MAAM,GAAG,GAAoB;QAC3B,KAAK;QACL,QAAQ;QACR,QAAQ,EAAE,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC;KAC3D,CAAC;IACF,IAAI,WAAW,KAAK,SAAS;QAAE,GAAG,CAAC,WAAW,GAAG,WAAW,CAAC;IAC7D,IAAI,MAAM,KAAK,SAAS;QAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC;IAC9C,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,SAAS,kBAAkB,CAAC,QAAgB;IAC1C,0DAA0D;IAC1D,MAAM,cAAc,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAExC,sCAAsC;I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D,2EAA2E;QAC3E,EAAE;QACF,0EAA0E;QAC1E,4EAA4E;QAC5E,6EAA6E;QAC7E,0EAA0E;QAC1E,6CAA6C;QAC7C,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3C,SAAS;QACX,CAAC;QAED,MAAM,KAAK,GAAG,gBAAgB,CAAC,MAAM,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;QACrE,eAAe,CAAC,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;IAED,OAAO;QACL,YAAY,EAAE,6BAA6B,CAAC,eAAe,CAAC;QAC5D,aAAa,EAAE,uBAAuB,CAAC,gBAAgB,CAAC;QACxD,iBAAiB,EAAE,uBAAuB,CAAC,oBAAoB,CAAC;QAChE,gBAAgB;KACjB,CAAC;AACJ,CAAC"}
|
package/dist/commands/audit.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Audit command - audits plugins, marketplaces, registries, and Agent Skills
|
|
3
3
|
* Top-level command: vat audit [path]
|
|
4
4
|
*/
|
|
5
|
-
import { type SeverityCounts } from '@vibe-agent-toolkit/agent-schema';
|
|
6
5
|
import { type SkillPackagingConfig, type ValidationResult } from '@vibe-agent-toolkit/agent-skills';
|
|
7
6
|
import { type CompatibilityResult, type EffectiveSettings } from '@vibe-agent-toolkit/claude-marketplace';
|
|
7
|
+
import { type SeverityCounts } from '@vibe-agent-toolkit/schema';
|
|
8
8
|
import { Command } from 'commander';
|
|
9
9
|
import { createLogger } from '../utils/logger.js';
|
|
10
10
|
export interface AuditCommandOptions {
|
|
@@ -98,6 +98,27 @@ export declare function auditCommand(targetPath: string | undefined, options: Au
|
|
|
98
98
|
* location reads, or a run spanning several configs emits one document in
|
|
99
99
|
* several coordinate systems. Recursion passes it through unchanged.
|
|
100
100
|
*/
|
|
101
|
+
/**
|
|
102
|
+
* Validate ONE audit subject, degrading if the filesystem refuses it.
|
|
103
|
+
*
|
|
104
|
+
* THE boundary guard, and deliberately the only one of its kind. The first
|
|
105
|
+
* version of this fix guarded the directory walk alone, which left every other
|
|
106
|
+
* way into a validator unprotected: a `SKILL.md` named directly on the command
|
|
107
|
+
* line, a plugin directory, a marketplace, each surface of a multi-surface tree.
|
|
108
|
+
* All of them still ended the whole run with `status: error`, exit 2 and zero
|
|
109
|
+
* findings — the exact symptom of issue #180, in the lanes nobody had checked.
|
|
110
|
+
*
|
|
111
|
+
* Guarding the seven dispatch sites individually would have been the same mistake
|
|
112
|
+
* a seventh time. This function is what every one of them is reached through, so
|
|
113
|
+
* it is where "the environment refused this subject" becomes a finding instead of
|
|
114
|
+
* an abort. It is also the recursion point — `recurseIntoMarketplacePlugins` and
|
|
115
|
+
* the `--user` target loop both re-enter here — so an unreadable plugin costs its
|
|
116
|
+
* own subject and nothing else.
|
|
117
|
+
*
|
|
118
|
+
* The walk keeps its own per-entry guard: this one would answer at whole-subject
|
|
119
|
+
* granularity, discarding findings already collected from readable siblings, and
|
|
120
|
+
* degrading as narrowly as possible is the entire point.
|
|
121
|
+
*/
|
|
101
122
|
export declare function getValidationResults(scanPath: string, recursive: boolean, options: AuditCommandOptions, logger: ReturnType<typeof createLogger>, locationRoot: string): Promise<ValidationResult[]>;
|
|
102
123
|
/**
|
|
103
124
|
* Run compatibility analysis on plugin results and return a map of path -> CompatibilityResult.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/commands/audit.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/commands/audit.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAgBL,KAAK,oBAAoB,EAIzB,KAAK,gBAAgB,EACtB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAYL,KAAK,mBAAmB,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,GACf,MAAM,EAAE,CA4BV;AAwXD;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAOvC;AAkUD;;;;;;GAMG;AACH,UAAU,gBAAgB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;CACzB"}
|
package/dist/commands/audit.js
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
import * as fs from 'node:fs';
|
|
6
6
|
import { existsSync as fsExistsSync } from 'node:fs';
|
|
7
7
|
import { basename } from 'node:path';
|
|
8
|
-
import {
|
|
9
|
-
import { crawlAndResolveRegistry, detectDeclaredButMissing, detectMarketplacePluginSourceMissing, resetPackagingRegistryCache, detectPresentButUndeclared, detectReferenceTargetMissing, detectResourceFormat, enumerateSurfaces, validate, validateMarketplace, validateSkill, validateSkillForPackaging, } from '@vibe-agent-toolkit/agent-skills';
|
|
8
|
+
import { crawlAndResolveRegistry, detectDeclaredButMissing, detectMarketplacePluginSourceMissing, resetPackagingRegistryCache, detectPresentButUndeclared, detectReferenceTargetMissing, detectResourceFormat, enumerateSurfaces, materializeIssue, validate, validateMarketplace, validateSkill, validateSkillForPackaging, } from '@vibe-agent-toolkit/agent-skills';
|
|
10
9
|
import { analyzeCompatibility, checkSettingsCompatibility, detectSkillClaudePluginNameMismatch, crawlSkillLinkRegistry, extractClaudeMarketplaceInventory, extractClaudePluginInventory, getClaudeUserPaths, readEffectiveSettings, validatePlugin, } from '@vibe-agent-toolkit/claude-marketplace';
|
|
11
10
|
import { detectFormat } from '@vibe-agent-toolkit/discovery';
|
|
12
|
-
import {
|
|
11
|
+
import { calculateValidationStatus, countBySeverity, } from '@vibe-agent-toolkit/schema';
|
|
12
|
+
import { findProjectRoot, gitFindRoot, isAbsolutePath, isFilesystemAccessError, isGitUrl, issueLocation, parseGitUrl, resetProjectRootCaches, safePath, } from '@vibe-agent-toolkit/utils';
|
|
13
13
|
import { Command } from 'commander';
|
|
14
14
|
import picomatch from 'picomatch';
|
|
15
15
|
import { resetSkillDiscoveryCache, resolveProjectDeclaredEvalSuites, resolveSkillPackagingConfig, stripValidationAllowForDisplay, } from '../skill-resolution/packaging-config.js';
|
|
@@ -592,6 +592,13 @@ function applySeverityFilter(results, config) {
|
|
|
592
592
|
}
|
|
593
593
|
const skillsConfig = config.skills;
|
|
594
594
|
const defaultSeverity = skillsConfig.defaults?.validation?.severity ?? {};
|
|
595
|
+
// `.filter` after `.map`, not `.map` alone: a synthetic unreadable-path result
|
|
596
|
+
// exists ONLY to carry its finding, so once the adopter has set
|
|
597
|
+
// `severity.SCAN_PATH_UNREADABLE: ignore` the result has nothing left to say.
|
|
598
|
+
// Keeping it published `status: success` for a path the scan never read — the
|
|
599
|
+
// report positively asserting that an unread path PASSED, which is a stronger
|
|
600
|
+
// falsehood than the count inflation noted on `unreadablePathResult`. Dropping
|
|
601
|
+
// it is what "ignore" already means everywhere else.
|
|
595
602
|
return results.map(result => {
|
|
596
603
|
const skillName = SKILL_RESULT_TYPES.has(result.type) ? result.metadata?.name : undefined;
|
|
597
604
|
const perSkillSeverity = skillName === undefined
|
|
@@ -614,7 +621,21 @@ function applySeverityFilter(results, config) {
|
|
|
614
621
|
return result;
|
|
615
622
|
}
|
|
616
623
|
return buildFilteredResult(result, resolvedIssues);
|
|
617
|
-
});
|
|
624
|
+
}).filter(result => !isEmptiedUnreadablePathResult(result));
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* A synthetic unreadable-path result whose only finding was ignored away.
|
|
628
|
+
*
|
|
629
|
+
* Keyed on the shape this module itself produces — `type: 'unknown'`, no
|
|
630
|
+
* metadata, and now no issues — rather than on a marker field, because
|
|
631
|
+
* `ValidationResult` is a shared contract and this is the one producer that needs
|
|
632
|
+
* to be recognised. A genuinely-unknown resource from `unified-validator` carries
|
|
633
|
+
* metadata or issues and is unaffected.
|
|
634
|
+
*/
|
|
635
|
+
function isEmptiedUnreadablePathResult(result) {
|
|
636
|
+
return result.type === 'unknown'
|
|
637
|
+
&& result.issues.length === 0
|
|
638
|
+
&& result.metadata === undefined;
|
|
618
639
|
}
|
|
619
640
|
/**
|
|
620
641
|
* Resolve `--settings`-driven EffectiveSettings if both --settings and
|
|
@@ -649,7 +670,30 @@ export async function buildAuditReport(scanPath, options, startTime, logger) {
|
|
|
649
670
|
const scanRoot = deriveScanRoot(scanPath);
|
|
650
671
|
const rawResults = await getValidationResults(scanPath, recursive, options, logger, scanRoot);
|
|
651
672
|
// Load config for severity filtering (audit ignores allow; only severity matters).
|
|
652
|
-
|
|
673
|
+
//
|
|
674
|
+
// Guarded, and the ordering is why: the scan above has ALREADY run and collected
|
|
675
|
+
// every finding by this point. An unreadable or malformed config here threw past
|
|
676
|
+
// all of it and ended the command with `status: error` and zero findings —
|
|
677
|
+
// discarding completed work to report a problem with a file that only decides
|
|
678
|
+
// which findings to *hide*. Every other `loadConfig` in this file is already
|
|
679
|
+
// wrapped for the same reason; this one was missed.
|
|
680
|
+
//
|
|
681
|
+
// Falling back to no config means no severity overrides are applied, so findings
|
|
682
|
+
// are reported at their default severity. That is the safe direction: it can
|
|
683
|
+
// only show more than the adopter asked for, never less.
|
|
684
|
+
let config;
|
|
685
|
+
try {
|
|
686
|
+
config = loadConfig(deriveConfigRoot(scanPath));
|
|
687
|
+
}
|
|
688
|
+
catch (err) {
|
|
689
|
+
// `warn`, not `debug`. Falling back to no config is the safe direction — it
|
|
690
|
+
// can only show more than the adopter asked for, never less — but it means
|
|
691
|
+
// every `validation.severity` override they wrote is silently inert. Before
|
|
692
|
+
// this guard the command failed loudly and told them; degrading without a word
|
|
693
|
+
// would trade a crash for a config that quietly stopped working, which is the
|
|
694
|
+
// harder problem to notice.
|
|
695
|
+
logger.warn(`Config could not be read; severity overrides are not applied: ${String(err)}`);
|
|
696
|
+
}
|
|
653
697
|
// Apply severity filtering: hide codes whose effective severity is 'ignore'.
|
|
654
698
|
// Allow is deliberately NOT applied — audit is advisory only.
|
|
655
699
|
const results = applySeverityFilter(rawResults, config);
|
|
@@ -788,7 +832,7 @@ async function runInventoryDetectors(scanPath, type, locationRoot, prebuiltInv)
|
|
|
788
832
|
];
|
|
789
833
|
}
|
|
790
834
|
if (type === 'marketplace') {
|
|
791
|
-
const inv = prebuiltInv?.kind === 'marketplace' ? prebuiltInv : await extractClaudeMarketplaceInventory(scanPath);
|
|
835
|
+
const inv = prebuiltInv?.kind === 'marketplace' ? prebuiltInv : await extractClaudeMarketplaceInventory(scanPath, { gitTrackerSource: gitTrackerForProjectRoot });
|
|
792
836
|
return detectMarketplacePluginSourceMissing(inv, locationRoot);
|
|
793
837
|
}
|
|
794
838
|
return [];
|
|
@@ -869,7 +913,41 @@ function appendInventoryParseErrors(result, inv, locationRoot) {
|
|
|
869
913
|
* location reads, or a run spanning several configs emits one document in
|
|
870
914
|
* several coordinate systems. Recursion passes it through unchanged.
|
|
871
915
|
*/
|
|
916
|
+
/**
|
|
917
|
+
* Validate ONE audit subject, degrading if the filesystem refuses it.
|
|
918
|
+
*
|
|
919
|
+
* THE boundary guard, and deliberately the only one of its kind. The first
|
|
920
|
+
* version of this fix guarded the directory walk alone, which left every other
|
|
921
|
+
* way into a validator unprotected: a `SKILL.md` named directly on the command
|
|
922
|
+
* line, a plugin directory, a marketplace, each surface of a multi-surface tree.
|
|
923
|
+
* All of them still ended the whole run with `status: error`, exit 2 and zero
|
|
924
|
+
* findings — the exact symptom of issue #180, in the lanes nobody had checked.
|
|
925
|
+
*
|
|
926
|
+
* Guarding the seven dispatch sites individually would have been the same mistake
|
|
927
|
+
* a seventh time. This function is what every one of them is reached through, so
|
|
928
|
+
* it is where "the environment refused this subject" becomes a finding instead of
|
|
929
|
+
* an abort. It is also the recursion point — `recurseIntoMarketplacePlugins` and
|
|
930
|
+
* the `--user` target loop both re-enter here — so an unreadable plugin costs its
|
|
931
|
+
* own subject and nothing else.
|
|
932
|
+
*
|
|
933
|
+
* The walk keeps its own per-entry guard: this one would answer at whole-subject
|
|
934
|
+
* granularity, discarding findings already collected from readable siblings, and
|
|
935
|
+
* degrading as narrowly as possible is the entire point.
|
|
936
|
+
*/
|
|
872
937
|
export async function getValidationResults(scanPath, recursive, options, logger, locationRoot) {
|
|
938
|
+
try {
|
|
939
|
+
return await validateAuditSubject(scanPath, recursive, options, logger, locationRoot);
|
|
940
|
+
}
|
|
941
|
+
catch (error) {
|
|
942
|
+
// Only the filesystem refusing the subject degrades; a defect in a validator
|
|
943
|
+
// must still fail loudly rather than be reported as a permissions problem.
|
|
944
|
+
if (!isFilesystemAccessError(error))
|
|
945
|
+
throw error;
|
|
946
|
+
logger.debug(`Unreadable audit subject: ${scanPath}`);
|
|
947
|
+
return [unreadablePathResult(scanPath, error, locationRoot)];
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
async function validateAuditSubject(scanPath, recursive, options, logger, locationRoot) {
|
|
873
951
|
const format = detectFormat(scanPath);
|
|
874
952
|
// Special handling for direct SKILL.md file
|
|
875
953
|
if (format === RESOURCE_TYPE_AGENT_SKILL) {
|
|
@@ -923,7 +1001,7 @@ export async function getValidationResults(scanPath, recursive, options, logger,
|
|
|
923
1001
|
// recursion into co-located, path-source plugins. discovered.plugins[]
|
|
924
1002
|
// is populated only for path sources that exist on disk (git/npm/unknown
|
|
925
1003
|
// sources are declarations only and stay out of scope).
|
|
926
|
-
const marketplaceInv = await extractClaudeMarketplaceInventory(scanPath);
|
|
1004
|
+
const marketplaceInv = await extractClaudeMarketplaceInventory(scanPath, { gitTrackerSource: gitTrackerForProjectRoot });
|
|
927
1005
|
const marketplaceInventoryIssues = await runInventoryDetectors(scanPath, 'marketplace', locationRoot, marketplaceInv);
|
|
928
1006
|
appendIssues(result, marketplaceInventoryIssues);
|
|
929
1007
|
logger.debug(`Inventory detectors emitted ${marketplaceInventoryIssues.length.toString()} issues for marketplace at ${scanPath}`);
|
|
@@ -972,9 +1050,26 @@ async function validatePluginSkillsViaInventory(scanPath, options, logger, locat
|
|
|
972
1050
|
continue;
|
|
973
1051
|
}
|
|
974
1052
|
logger.debug(` Validating plugin-bundled skill (inventory): ${skill.files.skillMd}`);
|
|
975
|
-
//
|
|
976
|
-
//
|
|
977
|
-
|
|
1053
|
+
// Guarded PER SKILL, not left to the boundary. The boundary guard answers at
|
|
1054
|
+
// whole-subject granularity, so one unreadable bundled `SKILL.md` discarded
|
|
1055
|
+
// the plugin's own manifest findings and every readable sibling skill with
|
|
1056
|
+
// it — 4 results down to 1 — and anchored the finding at the plugin root,
|
|
1057
|
+
// which is perfectly readable. That contradicted this code's own promise
|
|
1058
|
+
// that an unreadable path "costs its own subject and nothing else", and the
|
|
1059
|
+
// documented promise that "a skill beside the unreadable path is validated
|
|
1060
|
+
// exactly as if it were not there". Degrading as narrowly as the structure
|
|
1061
|
+
// allows is the whole point; here the skill is the unit.
|
|
1062
|
+
try {
|
|
1063
|
+
// No crawl: `validatePlugin` already scanned the whole plugin tree, nested
|
|
1064
|
+
// skill directories included, so this lane would duplicate its findings.
|
|
1065
|
+
results.push(await validateSingleSkill(skill.files.skillMd, options, logger, locationRoot, false));
|
|
1066
|
+
}
|
|
1067
|
+
catch (error) {
|
|
1068
|
+
if (!isFilesystemAccessError(error))
|
|
1069
|
+
throw error;
|
|
1070
|
+
logger.debug(` Unreadable plugin-bundled skill: ${skill.files.skillMd}`);
|
|
1071
|
+
results.push(unreadablePathResult(skill.files.skillMd, error, locationRoot));
|
|
1072
|
+
}
|
|
978
1073
|
}
|
|
979
1074
|
return results;
|
|
980
1075
|
}
|
|
@@ -1590,7 +1685,12 @@ async function getOrCreateInventoryRegistry(projectRoot) {
|
|
|
1590
1685
|
*/
|
|
1591
1686
|
async function pluginInventoryAt(dir) {
|
|
1592
1687
|
const projectRoot = findProjectRoot(dir);
|
|
1593
|
-
return extractClaudePluginInventory(dir,
|
|
1688
|
+
return extractClaudePluginInventory(dir, {
|
|
1689
|
+
...(projectRoot === null
|
|
1690
|
+
? {}
|
|
1691
|
+
: { sharedRegistry: () => getOrCreateInventoryRegistry(projectRoot) }),
|
|
1692
|
+
gitTrackerSource: gitTrackerForProjectRoot,
|
|
1693
|
+
});
|
|
1594
1694
|
}
|
|
1595
1695
|
/**
|
|
1596
1696
|
* Reset all module-level audit caches. Must be called at the start of every
|
|
@@ -1667,6 +1767,93 @@ function getSkipReason(entry, fullPath, gitIgnoredMap, excludeMatchers) {
|
|
|
1667
1767
|
}
|
|
1668
1768
|
return null;
|
|
1669
1769
|
}
|
|
1770
|
+
/**
|
|
1771
|
+
* The one finding a path the walk could not read produces — a directory it could
|
|
1772
|
+
* not enter, or a file it could not open.
|
|
1773
|
+
*
|
|
1774
|
+
* A synthetic result rather than an issue appended to some neighbour: nothing
|
|
1775
|
+
* about the unreadable path was validated, so it has no host result to hang
|
|
1776
|
+
* off, and attaching it to a sibling would attribute the condition to a tree that
|
|
1777
|
+
* scanned fine. Typed `unknown` for the same reason — the whole point is that its
|
|
1778
|
+
* contents were never seen, so any more specific type would be a claim the scan
|
|
1779
|
+
* cannot support.
|
|
1780
|
+
*
|
|
1781
|
+
* The OS message is carried through verbatim (it names the errno and the syscall,
|
|
1782
|
+
* which is what distinguishes a permissions problem from a vanished mount), but it
|
|
1783
|
+
* is no longer the ONLY thing the run says — the code, the location and the fix
|
|
1784
|
+
* come from the registry.
|
|
1785
|
+
*
|
|
1786
|
+
* KNOWN, and deliberately not fixed here: this result counts toward
|
|
1787
|
+
* `summary.filesScanned`, so a path the scan could not read is counted among the
|
|
1788
|
+
* files it scanned. Dropping it from that denominator alone would be worse —
|
|
1789
|
+
* `filesWithWarnings` counts the same results, so the summary would report more
|
|
1790
|
+
* files with warnings than files scanned. Saying it honestly needs a field of its
|
|
1791
|
+
* own, which is a change to the report's shape and belongs with issue #177
|
|
1792
|
+
* ("report counts don't describe the artifact") rather than smuggled in here. The
|
|
1793
|
+
* finding itself names the path, so nothing is hidden in the meantime.
|
|
1794
|
+
*/
|
|
1795
|
+
function unreadablePathResult(dirPath, error, locationRoot) {
|
|
1796
|
+
// `issueLocation` is `path.relative`, so it answers `''` when the subject IS the
|
|
1797
|
+
// anchor — and for this finding that is not exotic, it is `vat audit <path>`
|
|
1798
|
+
// where the named path is the unreadable one. `''` reached the report as
|
|
1799
|
+
// `location: ""` and rendered the detail as a bare `": EACCES …"`. `.` is that
|
|
1800
|
+
// same path spelled as something a reader can act on. The identical fix, for the
|
|
1801
|
+
// identical reason, already exists on the distributed-tree finding — see
|
|
1802
|
+
// `anchoredTreeLocation` in ./audit/distributed-tree.ts.
|
|
1803
|
+
const location = issueLocation(dirPath, locationRoot) || '.';
|
|
1804
|
+
const issues = [
|
|
1805
|
+
materializeIssue('SCAN_PATH_UNREADABLE', {
|
|
1806
|
+
location,
|
|
1807
|
+
detail: `${location}: ${error instanceof Error ? error.message : String(error)}`,
|
|
1808
|
+
}),
|
|
1809
|
+
];
|
|
1810
|
+
const issueCounts = countBySeverity(issues);
|
|
1811
|
+
return {
|
|
1812
|
+
path: dirPath,
|
|
1813
|
+
type: 'unknown',
|
|
1814
|
+
status: calculateValidationStatus(issues),
|
|
1815
|
+
summary: formatCountsSummary(issueCounts),
|
|
1816
|
+
issues,
|
|
1817
|
+
issueCounts,
|
|
1818
|
+
};
|
|
1819
|
+
}
|
|
1820
|
+
/**
|
|
1821
|
+
* Scan ONE directory entry, degrading to a finding if the filesystem refuses it.
|
|
1822
|
+
*
|
|
1823
|
+
* Guarded per ENTRY, not just per directory: wrapping only the parent `readdir`
|
|
1824
|
+
* left the other half of the same defect live — an unreadable FILE (a root-owned
|
|
1825
|
+
* `SKILL.md`, a quarantined bundle) threw out of `validateSkill` and still
|
|
1826
|
+
* aborted the whole run with `status: error` and zero findings. Under
|
|
1827
|
+
* `~/.claude/plugins` — the flagship `vat audit --user` target, populated by sudo
|
|
1828
|
+
* installs and macOS quarantine — a root-owned FILE is at least as likely as a
|
|
1829
|
+
* root-owned directory (issue #180).
|
|
1830
|
+
*
|
|
1831
|
+
* Extracted from `scanDirectory` rather than inlined because the added branch put
|
|
1832
|
+
* that function over the cognitive-complexity ceiling; the walk keeps the
|
|
1833
|
+
* bookkeeping, this keeps the per-entry decision.
|
|
1834
|
+
*/
|
|
1835
|
+
async function scanEntry(entry, fullPath, ctx) {
|
|
1836
|
+
try {
|
|
1837
|
+
if (entry.isFile()) {
|
|
1838
|
+
const result = await handleFileEntry(entry, fullPath, ctx.options, ctx.logger, ctx.scanCtx);
|
|
1839
|
+
return result === null ? [] : [result];
|
|
1840
|
+
}
|
|
1841
|
+
if (entry.isDirectory()) {
|
|
1842
|
+
return await handleDirectoryEntry(fullPath, ctx.recursive, ctx.options, ctx.logger, ctx.baseDir, ctx.descendCtx, ctx.nestedConfigLog);
|
|
1843
|
+
}
|
|
1844
|
+
return [];
|
|
1845
|
+
}
|
|
1846
|
+
catch (error) {
|
|
1847
|
+
// ONLY filesystem-access errors degrade. Anything else is rethrown, because
|
|
1848
|
+
// turning a genuine VAT bug into a `warning` about the file it happened on is
|
|
1849
|
+
// the same "detector silently disables itself" shape this guard exists to
|
|
1850
|
+
// prevent — it would make the tool quietest exactly when it is most wrong.
|
|
1851
|
+
if (!isFilesystemAccessError(error))
|
|
1852
|
+
throw error;
|
|
1853
|
+
ctx.logger.debug(`Unreadable entry: ${fullPath}`);
|
|
1854
|
+
return [unreadablePathResult(fullPath, error, ctx.scanCtx.locationRoot)];
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1670
1857
|
async function scanDirectory(dirPath, recursive, options, logger, scanCtx, baseDir, nestedConfigLog) {
|
|
1671
1858
|
const fs = await import('node:fs/promises');
|
|
1672
1859
|
const results = [];
|
|
@@ -1708,7 +1895,24 @@ async function scanDirectory(dirPath, recursive, options, logger, scanCtx, baseD
|
|
|
1708
1895
|
if (resolvedScanCtx.projectExcludes !== null) {
|
|
1709
1896
|
excludeMatchers.push(resolvedScanCtx.projectExcludes);
|
|
1710
1897
|
}
|
|
1711
|
-
|
|
1898
|
+
// Guarded because `vat audit` is a bulk linter over trees it does not own, and
|
|
1899
|
+
// an unreadable entry is an ordinary condition there — one root-owned directory
|
|
1900
|
+
// under `~/.claude/plugins` used to abort the flagship `vat audit --user` run
|
|
1901
|
+
// outright, losing every finding already collected (issue #180). The failure is
|
|
1902
|
+
// scoped to the subtree that caused it: this returns instead of throwing, so the
|
|
1903
|
+
// CALLER's loop keeps its readable siblings and the walk continues.
|
|
1904
|
+
let entries;
|
|
1905
|
+
try {
|
|
1906
|
+
entries = await fs.readdir(dirPath, { withFileTypes: true });
|
|
1907
|
+
}
|
|
1908
|
+
catch (error) {
|
|
1909
|
+
// Same predicate as the per-entry guard below — see it for why a non-IO
|
|
1910
|
+
// throw must not be degraded into a finding.
|
|
1911
|
+
if (!isFilesystemAccessError(error))
|
|
1912
|
+
throw error;
|
|
1913
|
+
logger.debug(`Unreadable directory: ${dirPath}`);
|
|
1914
|
+
return [unreadablePathResult(dirPath, error, resolvedScanCtx.locationRoot)];
|
|
1915
|
+
}
|
|
1712
1916
|
const descendCtx = await contextForDescendants(dirPath, entries, resolvedScanCtx);
|
|
1713
1917
|
// Build full paths and batch-check gitignore status
|
|
1714
1918
|
const entryPaths = entries.map(e => safePath.join(dirPath, e.name));
|
|
@@ -1720,18 +1924,13 @@ async function scanDirectory(dirPath, recursive, options, logger, scanCtx, baseD
|
|
|
1720
1924
|
logger.debug(`Excluding path: ${skipReason}`);
|
|
1721
1925
|
continue;
|
|
1722
1926
|
}
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
// `descendCtx`, not `resolvedScanCtx`: this level's own skill (if any)
|
|
1731
|
-
// owns everything below, including this subdirectory.
|
|
1732
|
-
const dirResults = await handleDirectoryEntry(fullPath, recursive, options, logger, resolvedBaseDir, descendCtx, resolvedNestedLog);
|
|
1733
|
-
results.push(...dirResults);
|
|
1734
|
-
}
|
|
1927
|
+
results.push(...await scanEntry(entry, fullPath, {
|
|
1928
|
+
recursive, options, logger,
|
|
1929
|
+
scanCtx: resolvedScanCtx,
|
|
1930
|
+
descendCtx,
|
|
1931
|
+
baseDir: resolvedBaseDir,
|
|
1932
|
+
nestedConfigLog: resolvedNestedLog,
|
|
1933
|
+
}));
|
|
1735
1934
|
}
|
|
1736
1935
|
return results;
|
|
1737
1936
|
}
|