@vibe-agent-toolkit/cli 0.1.41-rc.7 → 0.1.41
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 +24 -1
- package/dist/bin/vat.js +24 -1
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +23 -2
- 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/distributed-tree.d.ts +172 -0
- package/dist/commands/audit/distributed-tree.d.ts.map +1 -0
- package/dist/commands/audit/distributed-tree.js +319 -0
- package/dist/commands/audit/distributed-tree.js.map +1 -0
- package/dist/commands/audit.d.ts +69 -1
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +525 -174
- 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 +103 -26
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +21 -3
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate.d.ts +125 -0
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +251 -44
- package/dist/commands/claude/marketplace/validate.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 +34 -4
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +187 -16
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.js +6 -2
- package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-json-merge.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-json-merge.js +15 -0
- package/dist/commands/claude/plugin/plugin-json-merge.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts +40 -0
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +100 -4
- 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 +40 -22
- package/dist/commands/corpus/runner.js.map +1 -1
- package/dist/commands/doctor.js +1 -1
- 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 +183 -14
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +294 -29
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/positional-args.d.ts +36 -0
- package/dist/commands/positional-args.d.ts.map +1 -0
- package/dist/commands/positional-args.js +52 -0
- package/dist/commands/positional-args.js.map +1 -0
- 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 +27 -9
- 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 +105 -66
- 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 +5 -0
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +7 -3
- 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 +349 -11
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +901 -97
- 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 +15 -0
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js +30 -20
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/scope-guard.d.ts +64 -0
- package/dist/commands/skills/scope-guard.d.ts.map +1 -0
- package/dist/commands/skills/scope-guard.js +86 -0
- package/dist/commands/skills/scope-guard.js.map +1 -0
- package/dist/commands/skills/validate-command.d.ts.map +1 -1
- package/dist/commands/skills/validate-command.js +41 -7
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate.d.ts +44 -3
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +217 -53
- 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 +89 -68
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +113 -6
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +440 -123
- 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/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-rendering.d.ts +130 -0
- package/dist/utils/issue-rendering.d.ts.map +1 -1
- package/dist/utils/issue-rendering.js +147 -0
- package/dist/utils/issue-rendering.js.map +1 -1
- package/dist/utils/issue-severity.d.ts +51 -0
- package/dist/utils/issue-severity.d.ts.map +1 -0
- package/dist/utils/issue-severity.js +63 -0
- package/dist/utils/issue-severity.js.map +1 -0
- package/dist/utils/output.d.ts +54 -5
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +111 -17
- package/dist/utils/output.js.map +1 -1
- 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/verdict-helpers.d.ts +4 -3
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +6 -13
- package/dist/utils/verdict-helpers.js.map +1 -1
- package/dist/version.d.ts +22 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +31 -2
- package/dist/version.js.map +1 -1
- package/docs/index.md +12 -0
- package/docs/rag.md +9 -4
- package/docs/resources.md +30 -14
- package/docs/skills.md +25 -7
- package/package.json +12 -12
package/dist/bin/vat
CHANGED
|
@@ -18,7 +18,27 @@ import { spawnSync } from 'node:child_process';
|
|
|
18
18
|
import { existsSync, readFileSync } from 'node:fs';
|
|
19
19
|
import { dirname } from 'node:path';
|
|
20
20
|
import { fileURLToPath } from 'node:url';
|
|
21
|
-
import { findNodeWorkspaceRoot, safePath } from '@vibe-agent-toolkit/utils';
|
|
21
|
+
import { describeStdioBlocking, findNodeWorkspaceRoot, makeStdioBlocking, safePath, } from '@vibe-agent-toolkit/utils';
|
|
22
|
+
// Before ANY output. This file — not bin.ts — is what package.json maps `vat` to,
|
|
23
|
+
// so it is the CLI entry point in every installed copy, and `makeStdioBlocking`
|
|
24
|
+
// is documented as belonging first thing in one. The delegated child applies it
|
|
25
|
+
// again for the command's own output; what this protects is THIS process's
|
|
26
|
+
// writes, every one of which is followed by `spawnCli`'s immediate
|
|
27
|
+
// `process.exit`. See ../utils/output.ts.
|
|
28
|
+
const stdioBlocking = makeStdioBlocking();
|
|
29
|
+
/**
|
|
30
|
+
* Report whether the streams above actually went blocking.
|
|
31
|
+
*
|
|
32
|
+
* A free function rather than an inline `if` in `main()` because `main()` is
|
|
33
|
+
* already at the cognitive-complexity ceiling, and because reaching through an
|
|
34
|
+
* internal Node handle is precisely the kind of thing that can fail quietly on
|
|
35
|
+
* Windows — the diagnostic must not be the first thing dropped to save a branch.
|
|
36
|
+
*/
|
|
37
|
+
function reportStdioBlocking(debug) {
|
|
38
|
+
if (debug) {
|
|
39
|
+
console.error(`[vat debug] ${describeStdioBlocking(stdioBlocking)}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
22
42
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
23
43
|
function spawnCli(binPath, context, contextPath) {
|
|
24
44
|
const env = {
|
|
@@ -111,6 +131,9 @@ function main() {
|
|
|
111
131
|
const cwd = testRoot ? safePath.resolve(testRoot) : process.cwd();
|
|
112
132
|
const args = process.argv.slice(2);
|
|
113
133
|
const debug = process.env['VAT_DEBUG'] === '1';
|
|
134
|
+
// Reported here rather than in the block further down because every dispatch
|
|
135
|
+
// path below ends in `spawnCli`, which never returns.
|
|
136
|
+
reportStdioBlocking(debug);
|
|
114
137
|
// Priority 1: Explicit override via VAT_ROOT_DIR
|
|
115
138
|
if (process.env['VAT_ROOT_DIR']) {
|
|
116
139
|
const binPath = safePath.join(process.env['VAT_ROOT_DIR'], 'packages/cli/dist/bin.js');
|
package/dist/bin/vat.js
CHANGED
|
@@ -18,7 +18,27 @@ import { spawnSync } from 'node:child_process';
|
|
|
18
18
|
import { existsSync, readFileSync } from 'node:fs';
|
|
19
19
|
import { dirname } from 'node:path';
|
|
20
20
|
import { fileURLToPath } from 'node:url';
|
|
21
|
-
import { findNodeWorkspaceRoot, safePath } from '@vibe-agent-toolkit/utils';
|
|
21
|
+
import { describeStdioBlocking, findNodeWorkspaceRoot, makeStdioBlocking, safePath, } from '@vibe-agent-toolkit/utils';
|
|
22
|
+
// Before ANY output. This file — not bin.ts — is what package.json maps `vat` to,
|
|
23
|
+
// so it is the CLI entry point in every installed copy, and `makeStdioBlocking`
|
|
24
|
+
// is documented as belonging first thing in one. The delegated child applies it
|
|
25
|
+
// again for the command's own output; what this protects is THIS process's
|
|
26
|
+
// writes, every one of which is followed by `spawnCli`'s immediate
|
|
27
|
+
// `process.exit`. See ../utils/output.ts.
|
|
28
|
+
const stdioBlocking = makeStdioBlocking();
|
|
29
|
+
/**
|
|
30
|
+
* Report whether the streams above actually went blocking.
|
|
31
|
+
*
|
|
32
|
+
* A free function rather than an inline `if` in `main()` because `main()` is
|
|
33
|
+
* already at the cognitive-complexity ceiling, and because reaching through an
|
|
34
|
+
* internal Node handle is precisely the kind of thing that can fail quietly on
|
|
35
|
+
* Windows — the diagnostic must not be the first thing dropped to save a branch.
|
|
36
|
+
*/
|
|
37
|
+
function reportStdioBlocking(debug) {
|
|
38
|
+
if (debug) {
|
|
39
|
+
console.error(`[vat debug] ${describeStdioBlocking(stdioBlocking)}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
22
42
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
23
43
|
function spawnCli(binPath, context, contextPath) {
|
|
24
44
|
const env = {
|
|
@@ -111,6 +131,9 @@ function main() {
|
|
|
111
131
|
const cwd = testRoot ? safePath.resolve(testRoot) : process.cwd();
|
|
112
132
|
const args = process.argv.slice(2);
|
|
113
133
|
const debug = process.env['VAT_DEBUG'] === '1';
|
|
134
|
+
// Reported here rather than in the block further down because every dispatch
|
|
135
|
+
// path below ends in `spawnCli`, which never returns.
|
|
136
|
+
reportStdioBlocking(debug);
|
|
114
137
|
// Priority 1: Explicit override via VAT_ROOT_DIR
|
|
115
138
|
if (process.env['VAT_ROOT_DIR']) {
|
|
116
139
|
const binPath = safePath.join(process.env['VAT_ROOT_DIR'], 'packages/cli/dist/bin.js');
|
package/dist/bin/vat.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vat.js","sourceRoot":"","sources":["../../src/bin/vat.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAG,OAAO,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,
|
|
1
|
+
{"version":3,"file":"vat.js","sourceRoot":"","sources":["../../src/bin/vat.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAG,OAAO,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,GACT,MAAM,2BAA2B,CAAC;AAEnC,kFAAkF;AAClF,gFAAgF;AAChF,gFAAgF;AAChF,2EAA2E;AAC3E,mEAAmE;AACnE,0CAA0C;AAC1C,MAAM,aAAa,GAAG,iBAAiB,EAAE,CAAC;AAE1C;;;;;;;GAOG;AACH,SAAS,mBAAmB,CAAC,KAAc;IACzC,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CAAC,KAAK,CAAC,eAAe,qBAAqB,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IACvE,CAAC;AACH,CAAC;AAED,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAI1D,SAAS,QAAQ,CAAC,OAAe,EAAE,OAAgB,EAAE,WAAoB;IACvE,MAAM,GAAG,GAAG;QACV,GAAG,OAAO,CAAC,GAAG;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AAW,GAAG,OAAO,KAAK,KAAK,IAAI,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;IACvF,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;AAC1C,CAAC;AAED,oBAAoB;AACpB,IAAI,EAAE,CAAC"}
|
package/dist/bin.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Main entry point for vat CLI
|
|
4
4
|
* Uses Commander.js for command structure
|
|
5
5
|
*/
|
|
6
|
-
import { safePath } from '@vibe-agent-toolkit/utils';
|
|
6
|
+
import { describeStdioBlocking, makeStdioBlocking, safePath } from '@vibe-agent-toolkit/utils';
|
|
7
7
|
import { Command } from 'commander';
|
|
8
8
|
import { createAgentCommand, showAgentVerboseHelp } from './commands/agent/index.js';
|
|
9
9
|
import { createAuditCommand } from './commands/audit.js';
|
|
@@ -22,6 +22,17 @@ import { createVerifyTopLevelCommand } from './commands/verify.js';
|
|
|
22
22
|
import { loadVerboseHelp, writeHelpSync } from './utils/help-loader.js';
|
|
23
23
|
import { createLogger } from './utils/logger.js';
|
|
24
24
|
import { version, getVersionString } from './version.js';
|
|
25
|
+
// Before ANY output: a piped stdio is non-blocking, and every command here exits
|
|
26
|
+
// the moment it finishes, so unflushed bytes would be discarded. See output.ts.
|
|
27
|
+
const stdioBlocking = makeStdioBlocking();
|
|
28
|
+
// Reported by hand rather than through the parsed `--debug` option because this
|
|
29
|
+
// has to run before Commander parses anything — the same reason the verbose-help
|
|
30
|
+
// checks below read process.argv directly. Reaching through an internal Node
|
|
31
|
+
// handle can fail silently, and a truncated report with no explanation is the
|
|
32
|
+
// exact failure this reporting exists to make diagnosable.
|
|
33
|
+
if (process.argv.includes('--debug')) {
|
|
34
|
+
process.stderr.write(`[DEBUG] ${describeStdioBlocking(stdioBlocking)}\n`);
|
|
35
|
+
}
|
|
25
36
|
const program = new Command();
|
|
26
37
|
// Context detection from environment
|
|
27
38
|
const context = process.env['VAT_CONTEXT']
|
|
@@ -33,7 +44,17 @@ const context = process.env['VAT_CONTEXT']
|
|
|
33
44
|
program
|
|
34
45
|
.name('vat')
|
|
35
46
|
.description('Agent-friendly toolkit for building, testing, and deploying portable AI agents')
|
|
36
|
-
.
|
|
47
|
+
// `import.meta.filename`, NOT process.argv[1] and NOT anything cwd-derived:
|
|
48
|
+
// this is the file Node actually loaded (symlinks already resolved), so it
|
|
49
|
+
// identifies the running build even when the wrapper's cwd-derived context
|
|
50
|
+
// resolves to a bare 'global'. See getVersionString for the incident.
|
|
51
|
+
// Long form ONLY. A short `-v` here is registered on the ROOT program, and
|
|
52
|
+
// Commander resolves root options before the subcommand's own — so it silently
|
|
53
|
+
// shadowed the `-v, --verbose` that validate/verify/build/skills-build each
|
|
54
|
+
// advertise in their own --help. `vat validate -v` printed the version and
|
|
55
|
+
// exited 0 without validating, making a CI step spelled that way a
|
|
56
|
+
// permanently-green gate that ran nothing. Do not re-add the short flag.
|
|
57
|
+
.version(getVersionString(version, context, import.meta.filename), '--version', 'Output version number')
|
|
37
58
|
.option('--cwd <dir>', 'Change working directory before running any command')
|
|
38
59
|
.option('--debug', 'Enable debug logging')
|
|
39
60
|
.helpCommand(false) // Disable redundant 'help' command, use --help instead
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAGH,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,M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AAQ,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC;IAC7E,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACjB,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAChC,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,KAAK,EAAE,CAAC;AAEhB,SAAS,eAAe;IACtB,aAAa,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,+BAA+B;AACnE,CAAC"}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent list command - discovers and lists all agents
|
|
3
3
|
*/
|
|
4
|
+
import { type DiscoveredAgent } from '../../utils/agent-discovery.js';
|
|
4
5
|
export interface ListCommandOptions {
|
|
5
6
|
debug?: boolean;
|
|
6
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Build the agent-list payload.
|
|
10
|
+
*
|
|
11
|
+
* Pure, so the payload's shape — including the fact that `path` is root-relative
|
|
12
|
+
* — is under unit test rather than only under a CLI spawn. `root` is stated
|
|
13
|
+
* once and is the only absolute path in the document; without it a relative
|
|
14
|
+
* `path` is unresolvable, and with absolute paths the payload names the machine
|
|
15
|
+
* it ran on.
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildAgentListOutput(agents: readonly DiscoveredAgent[], root: string, durationMs: number): Record<string, unknown>;
|
|
7
18
|
export declare function listCommand(options: ListCommandOptions): Promise<void>;
|
|
8
19
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/list.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/list.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAMtF,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AASD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAczB;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8B5E"}
|
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent list command - discovers and lists all agents
|
|
3
3
|
*/
|
|
4
|
+
import { safePath } from '@vibe-agent-toolkit/utils';
|
|
4
5
|
import { discoverAgents } from '../../utils/agent-discovery.js';
|
|
5
6
|
import { handleCommandError } from '../../utils/command-error.js';
|
|
6
7
|
import { createLogger } from '../../utils/logger.js';
|
|
7
8
|
import { writeYamlOutput } from '../../utils/output.js';
|
|
9
|
+
import { relativizePathEntries } from '../../utils/relativize-paths.js';
|
|
10
|
+
/**
|
|
11
|
+
* Build the agent-list payload.
|
|
12
|
+
*
|
|
13
|
+
* Pure, so the payload's shape — including the fact that `path` is root-relative
|
|
14
|
+
* — is under unit test rather than only under a CLI spawn. `root` is stated
|
|
15
|
+
* once and is the only absolute path in the document; without it a relative
|
|
16
|
+
* `path` is unresolvable, and with absolute paths the payload names the machine
|
|
17
|
+
* it ran on.
|
|
18
|
+
*/
|
|
19
|
+
export function buildAgentListOutput(agents, root, durationMs) {
|
|
20
|
+
const reported = agents.map(agent => ({
|
|
21
|
+
name: agent.name,
|
|
22
|
+
version: agent.version,
|
|
23
|
+
path: agent.path,
|
|
24
|
+
}));
|
|
25
|
+
return {
|
|
26
|
+
status: 'success',
|
|
27
|
+
root,
|
|
28
|
+
agents: relativizePathEntries(reported, root),
|
|
29
|
+
count: agents.length,
|
|
30
|
+
duration: `${durationMs}ms`,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
8
33
|
export async function listCommand(options) {
|
|
9
34
|
const logger = createLogger(options.debug ? { debug: true } : {});
|
|
10
35
|
const startTime = Date.now();
|
|
@@ -12,23 +37,17 @@ export async function listCommand(options) {
|
|
|
12
37
|
logger.debug('Discovering agents...');
|
|
13
38
|
logger.debug(`Search paths: packages/vat-development-agents/agents, agents, .`);
|
|
14
39
|
const agents = await discoverAgents();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
version: agent.version,
|
|
20
|
-
path: agent.path,
|
|
21
|
-
})),
|
|
22
|
-
count: agents.length,
|
|
23
|
-
duration: `${Date.now() - startTime}ms`,
|
|
24
|
-
};
|
|
40
|
+
// `discoverAgents` resolves its search paths against cwd, so cwd — not a
|
|
41
|
+
// config/git projectRoot — is the honest base for what it found.
|
|
42
|
+
const root = safePath.resolve(process.cwd());
|
|
43
|
+
const output = buildAgentListOutput(agents, root, Date.now() - startTime);
|
|
25
44
|
writeYamlOutput(output);
|
|
26
45
|
if (agents.length === 0) {
|
|
27
46
|
logger.info('No agents discovered');
|
|
28
47
|
}
|
|
29
48
|
else {
|
|
30
49
|
logger.info(`Found ${agents.length} agent(s):`);
|
|
31
|
-
for (const agent of agents) {
|
|
50
|
+
for (const agent of output['agents']) {
|
|
32
51
|
logger.info(` ${agent.name} (${agent.version}) - ${agent.path}`);
|
|
33
52
|
}
|
|
34
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/agent/list.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/agent/list.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAE,cAAc,EAAwB,MAAM,gCAAgC,CAAC;AACtF,OAAO,EAAE,kBAAkB,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AG,oBAAoB,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC;QAE1E,eAAe,CAAC,MAAM,CAAC,CAAC;QAExB,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,MAAM,YAAY,CAAC,CAAC;YAChD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,QAAQ,CAAoB,EAAE,CAAC;gBACxD,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YACpE,CAAC;QACH,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "Is this tree repository SOURCE, or an artifact somebody published?"
|
|
3
|
+
*
|
|
4
|
+
* `vat audit` needs an answer before it can run the presence-side detectors —
|
|
5
|
+
* `PACKAGED_AGENT_INSTRUCTION_FILE` above all — because the same `CLAUDE.md`
|
|
6
|
+
* means opposite things on the two sides of that line. Sitting beside a source
|
|
7
|
+
* `SKILL.md` in a working repo it is ordinary repo guidance that ships nowhere;
|
|
8
|
+
* sitting in a built bundle or an installed plugin it demonstrably travelled to
|
|
9
|
+
* a consumer.
|
|
10
|
+
*
|
|
11
|
+
* ## The discriminator this replaced, and why it was wrong
|
|
12
|
+
*
|
|
13
|
+
* The first answer was "does the project's `vibe-agent-toolkit.config.yaml`
|
|
14
|
+
* declare this SKILL.md, matched by absolute path?" — no match meant the tree
|
|
15
|
+
* had been handed to us. Two ordinary cases falsify that inference, and both
|
|
16
|
+
* were observed on adopter fixtures:
|
|
17
|
+
*
|
|
18
|
+
* - **A repo that has not adopted VAT at all** has no config, so nothing is
|
|
19
|
+
* declared. `vat audit` on a fresh repo is the first command a new user runs,
|
|
20
|
+
* and it greeted them with a warning whose first remedy is "remove the file,
|
|
21
|
+
* or move it outside the directory that is packaged" — about guidance that
|
|
22
|
+
* ships nowhere.
|
|
23
|
+
* - **An adopting repo whose `include` globs do not enumerate every skill
|
|
24
|
+
* directory in the tree** — drafts, vendored copies, test fixtures. Not being
|
|
25
|
+
* named by a glob is not evidence of publication.
|
|
26
|
+
*
|
|
27
|
+
* ## What replaced it
|
|
28
|
+
*
|
|
29
|
+
* Two observable facts about where the file actually LIVES, in this order:
|
|
30
|
+
*
|
|
31
|
+
* 1. **Inside a Claude install root** (`plugins/`, `skills/`, `marketplaces/`
|
|
32
|
+
* under `$CLAUDE_CONFIG_DIR` or `~/.claude`) — the directories whose entire
|
|
33
|
+
* purpose is holding artifacts an installer put there. This clause wins over
|
|
34
|
+
* the git test below, and it must: Claude Code installs a marketplace by
|
|
35
|
+
* `git clone`, so an installed tree's files are TRACKED SOURCE — of somebody
|
|
36
|
+
* else's repository. For a git-distributed plugin, tracked source *is* what
|
|
37
|
+
* ships, which is precisely how a scaffold template like Anthropic's
|
|
38
|
+
* `dataverse` `templates/CLAUDE.md` reaches every consumer. Judging that tree
|
|
39
|
+
* by tracked-ness would silence the dominant audited population.
|
|
40
|
+
*
|
|
41
|
+
* Both halves of that sentence are statements about somebody else's product,
|
|
42
|
+
* and clause 1 outranking clause 2 rests on them. No test in this repo can
|
|
43
|
+
* contradict either — they can only be re-read:
|
|
44
|
+
*
|
|
45
|
+
* @vendor-claim reviewed=2026-08-02 verify=Install a marketplace with /plugin marketplace add and confirm ~/.claude/plugins/marketplaces/<name> is a git working copy; confirm dataverse still ships templates/CLAUDE.md
|
|
46
|
+
*
|
|
47
|
+
* 2. **Not git-visible source** — the `SKILL.md` is gitignored, or it lies
|
|
48
|
+
* outside any git repository. A built `dist/` bundle is gitignored; an
|
|
49
|
+
* unpacked tarball is outside a repo; a working tree's skill is neither.
|
|
50
|
+
*
|
|
51
|
+
* Neither clause consults the project's config, and neither is CONDITIONAL on it:
|
|
52
|
+
* `vat audit` asks this question in its config-aware lane exactly as it does in
|
|
53
|
+
* its wild one. The config-declaration test was not merely replaced inside this
|
|
54
|
+
* module — it also had to stop gating whether this module is reached, or it
|
|
55
|
+
* survives at the caller in its purest form, where it can only suppress.
|
|
56
|
+
*
|
|
57
|
+
* Untracked-but-not-ignored is deliberately SOURCE, not "distributed": that is
|
|
58
|
+
* a skill the author has written and not yet committed, and treating authoring
|
|
59
|
+
* in progress as a distribution artifact would make the first audit of a new
|
|
60
|
+
* skill the loudest one. `GitTracker`'s active set (`git ls-files --cached
|
|
61
|
+
* --others --exclude-standard`) answers exactly this three-way question in O(1),
|
|
62
|
+
* which is why this module reuses it rather than adding a second git-status path.
|
|
63
|
+
*
|
|
64
|
+
* Deliberately NOT inferred from a `dist/` path substring or from a bundle's
|
|
65
|
+
* frontmatter `name`: both assert a cause the code cannot observe, and adopter
|
|
66
|
+
* output directories vary. Location under an install root is not that kind of
|
|
67
|
+
* guess — it is the same directory constant the `--user` scan itself is defined
|
|
68
|
+
* by, resolved from {@link getClaudeUserPaths}.
|
|
69
|
+
*
|
|
70
|
+
* ## Known limits, both deliberate
|
|
71
|
+
*
|
|
72
|
+
* - A skill the author writes IN PLACE under `~/.claude/skills/` and keeps in a
|
|
73
|
+
* dotfiles repo is reported, because it is indistinguishable by location from
|
|
74
|
+
* an installed one. The install root is what a consumer's Claude reads from;
|
|
75
|
+
* a skill living there is being consumed either way.
|
|
76
|
+
* - A third-party skills repo audited by `vat audit <git-url>` is a clone, so
|
|
77
|
+
* its skills read as source and stay silent. That is consistent: auditing
|
|
78
|
+
* somebody's repo source is the same situation as auditing your own. A
|
|
79
|
+
* third-party *plugin* still reports, because the plugin lane crawls the whole
|
|
80
|
+
* plugin tree independently of this classifier.
|
|
81
|
+
*
|
|
82
|
+
* ## When git cannot be consulted
|
|
83
|
+
*
|
|
84
|
+
* Clause 2 is only as good as git's willingness to answer, and `gitLsFiles`
|
|
85
|
+
* returns the same `null` for a missing binary, a corrupt `.git` and an
|
|
86
|
+
* unreadable one. That `null` used to arrive here as "not ignored" — i.e. source,
|
|
87
|
+
* i.e. silence — so the detector switched itself off and the run still reported
|
|
88
|
+
* `status: success` with nothing to indicate why. This module therefore has a
|
|
89
|
+
* third answer, `'indeterminate'`, and reports it (see
|
|
90
|
+
* {@link distributedTreeFindings}) rather than guessing in either direction.
|
|
91
|
+
*/
|
|
92
|
+
import { type ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
|
|
93
|
+
import { GitTracker } from '@vibe-agent-toolkit/utils';
|
|
94
|
+
/**
|
|
95
|
+
* Get (or build) the pre-populated tracker for one git root.
|
|
96
|
+
*
|
|
97
|
+
* Shared with `resolveScanContext` in audit.ts so a run pays for `git ls-files`
|
|
98
|
+
* once per repository, whether the caller wants scan-time gitignore filtering or
|
|
99
|
+
* the provenance answer below.
|
|
100
|
+
*/
|
|
101
|
+
export declare function getOrCreateGitTracker(gitRoot: string): Promise<GitTracker>;
|
|
102
|
+
/** Clear the per-root tracker cache (see `resetAuditCaches`). */
|
|
103
|
+
export declare function resetGitTrackerCache(): void;
|
|
104
|
+
/**
|
|
105
|
+
* Where a scanned skill tree came from, as far as the filesystem can testify.
|
|
106
|
+
*
|
|
107
|
+
* `'repo-source'` — a working tree somebody is authoring in.
|
|
108
|
+
* `'distributed'` — an artifact somebody published: a built bundle, an installed
|
|
109
|
+
* skill or plugin, an unpacked third-party tarball.
|
|
110
|
+
* `'indeterminate'` — the question could not be asked, because git could not be
|
|
111
|
+
* consulted. A THIRD state, not a default: the two-valued version of this type
|
|
112
|
+
* forced every git failure into `'repo-source'` (see
|
|
113
|
+
* {@link classifyScannedSkillTree}), which is the answer that stays silent.
|
|
114
|
+
*/
|
|
115
|
+
export type SkillTreeProvenance = 'repo-source' | 'distributed' | 'indeterminate';
|
|
116
|
+
/**
|
|
117
|
+
* True when `absolutePath` is `root` or lies beneath it.
|
|
118
|
+
*
|
|
119
|
+
* Both sides are put through {@link toForwardSlash} first: a Windows caller can
|
|
120
|
+
* hand us a backslash path, and a prefix test across mixed separators reports a
|
|
121
|
+
* sibling directory as "outside" — the exact shape that would quietly turn this
|
|
122
|
+
* whole clause off on one platform.
|
|
123
|
+
*
|
|
124
|
+
* Exported because `audit.ts` asks the same containment question of the same
|
|
125
|
+
* kind of path when deciding which crawl owns a subtree; a second spelling of a
|
|
126
|
+
* prefix test is how the separator bug gets reintroduced on one side only.
|
|
127
|
+
*/
|
|
128
|
+
export declare function isWithin(root: string, absolutePath: string): boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Classify the tree holding `skillMdPath`. See this module's header for the
|
|
131
|
+
* reasoning behind each clause and the order they are applied in.
|
|
132
|
+
*/
|
|
133
|
+
export declare function classifyScannedSkillTree(skillMdPath: string): Promise<SkillTreeProvenance>;
|
|
134
|
+
/**
|
|
135
|
+
* Will a crawl rooted at this SKILL.md's directory actually report the WHOLE
|
|
136
|
+
* subtree beneath it — nested skills included?
|
|
137
|
+
*
|
|
138
|
+
* The question the directory walk needs before it descends, and it is not the
|
|
139
|
+
* same as "is there a SKILL.md here". {@link distributedTreeFindings} matches at
|
|
140
|
+
* any depth, so a distributed (or unclassifiable) skill's crawl covers every
|
|
141
|
+
* descendant and they must stand down or one file is counted once per ancestor.
|
|
142
|
+
* A `repo-source` skill's crawl does not run at all, so standing its descendants
|
|
143
|
+
* down would convert a double count into silence — and provenance is NOT
|
|
144
|
+
* monotone down a tree: a gitignored bundle can sit inside a tracked source
|
|
145
|
+
* skill, and a scan rooted above `<claudeDir>/skills` reaches an install root
|
|
146
|
+
* from outside one.
|
|
147
|
+
*/
|
|
148
|
+
export declare function crawlOwnsSubtree(skillMdPath: string): Promise<boolean>;
|
|
149
|
+
/**
|
|
150
|
+
* The agent-instruction files present in a skill's own directory, when that
|
|
151
|
+
* directory is a distributed tree. Empty otherwise — including when the caller
|
|
152
|
+
* says a plugin lane already owns this subtree.
|
|
153
|
+
*
|
|
154
|
+
* `[]` declared dests, from BOTH callers, including the config-aware one that does
|
|
155
|
+
* hold a `files:` block. The parameter takes skill-OUTPUT-relative dests, and the
|
|
156
|
+
* tree crawled here is not an output tree — it is wherever the SKILL.md lives, so
|
|
157
|
+
* a `dest` and a path relative to this root are two different coordinate systems.
|
|
158
|
+
* Feeding dests in would exempt by accidental basename agreement and mislabel it
|
|
159
|
+
* as intent. `vat verify` is the lane that maps a built bundle back to the config
|
|
160
|
+
* that produced it, with both sides in output coordinates, and it applies the
|
|
161
|
+
* explicit-`files:` exemption there — which is what
|
|
162
|
+
* `PACKAGED_AGENT_INSTRUCTION_FILE`'s own remediation already tells readers.
|
|
163
|
+
*
|
|
164
|
+
* @param crawlTree `false` when a plugin lane already crawled this subtree.
|
|
165
|
+
* REQUIRED and never defaulted, because the wrong answer is silent in both
|
|
166
|
+
* directions: a skill nested inside a plugin is already crawled by
|
|
167
|
+
* `validatePlugin` at any depth, so crawling again reports one file twice,
|
|
168
|
+
* while omitting it for a standalone bundle is the blindness this pass exists
|
|
169
|
+
* to end.
|
|
170
|
+
*/
|
|
171
|
+
export declare function distributedTreeFindings(skillPath: string, locationRoot: string, crawlTree: boolean): Promise<ValidationIssue[]>;
|
|
172
|
+
//# sourceMappingURL=distributed-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"distributed-tree.d.ts","sourceRoot":"","sources":["../../../src/commands/audit/distributed-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AAEH,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAGxE,OAAO,EAEL,UAAU,EAKX,MAAM,2BAA2B,CAAC;AAKnC;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAShF;AAcD,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"}
|