@vibe-agent-toolkit/cli 0.1.3 → 0.1.5

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.
Files changed (50) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/bin.js.map +1 -1
  3. package/dist/commands/agent/build.js +1 -1
  4. package/dist/commands/agent/build.js.map +1 -1
  5. package/dist/commands/agent/import.js +1 -1
  6. package/dist/commands/agent/import.js.map +1 -1
  7. package/dist/commands/audit/hierarchical-output.d.ts +1 -1
  8. package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
  9. package/dist/commands/audit.js +1 -1
  10. package/dist/commands/audit.js.map +1 -1
  11. package/dist/commands/doctor.d.ts.map +1 -1
  12. package/dist/commands/doctor.js +59 -7
  13. package/dist/commands/doctor.js.map +1 -1
  14. package/dist/commands/resources/index.d.ts.map +1 -1
  15. package/dist/commands/resources/index.js +95 -15
  16. package/dist/commands/resources/index.js.map +1 -1
  17. package/dist/commands/resources/scan.d.ts +2 -0
  18. package/dist/commands/resources/scan.d.ts.map +1 -1
  19. package/dist/commands/resources/scan.js +39 -17
  20. package/dist/commands/resources/scan.js.map +1 -1
  21. package/dist/commands/resources/validate.d.ts +48 -0
  22. package/dist/commands/resources/validate.d.ts.map +1 -1
  23. package/dist/commands/resources/validate.js +326 -33
  24. package/dist/commands/resources/validate.js.map +1 -1
  25. package/dist/schemas/config.d.ts +88 -0
  26. package/dist/schemas/config.d.ts.map +1 -1
  27. package/dist/schemas/config.js +6 -0
  28. package/dist/schemas/config.js.map +1 -1
  29. package/dist/utils/agent-runner.js +2 -2
  30. package/dist/utils/agent-runner.js.map +1 -1
  31. package/dist/utils/config-loader.d.ts +18 -0
  32. package/dist/utils/config-loader.d.ts.map +1 -1
  33. package/dist/utils/config-loader.js +21 -2
  34. package/dist/utils/config-loader.js.map +1 -1
  35. package/dist/utils/duration.d.ts +24 -0
  36. package/dist/utils/duration.d.ts.map +1 -0
  37. package/dist/utils/duration.js +32 -0
  38. package/dist/utils/duration.js.map +1 -0
  39. package/dist/utils/project-root.d.ts +19 -0
  40. package/dist/utils/project-root.d.ts.map +1 -1
  41. package/dist/utils/project-root.js +23 -0
  42. package/dist/utils/project-root.js.map +1 -1
  43. package/dist/utils/resource-loader.d.ts +2 -0
  44. package/dist/utils/resource-loader.d.ts.map +1 -1
  45. package/dist/utils/resource-loader.js +33 -2
  46. package/dist/utils/resource-loader.js.map +1 -1
  47. package/dist/utils/validate-help-files.js +1 -1
  48. package/dist/utils/validate-help-files.js.map +1 -1
  49. package/docs/index.md +53 -4
  50. package/package.json +12 -12
package/docs/index.md CHANGED
@@ -12,7 +12,7 @@ vat [options] <command>
12
12
 
13
13
  ### `resources validate`
14
14
 
15
- Markdown resource scanning and link validation (run before commit)
15
+ Markdown resource scanning, link validation, and frontmatter validation (run before commit)
16
16
 
17
17
  **What it does:**
18
18
 
@@ -20,14 +20,21 @@ Markdown resource scanning and link validation (run before commit)
20
20
  2. Validates internal file links (relative paths)
21
21
  3. Validates anchor links within files (#heading)
22
22
  4. Validates cross-file anchor links (file.md#heading)
23
- 5. Reports broken links to stderr
23
+ 5. **Validates frontmatter against JSON Schemas** (per-collection)
24
+ 6. Reports broken links and validation errors to stderr
25
+
26
+ **Per-collection frontmatter validation:**
27
+
28
+ Define collections in `vibe-agent-toolkit.config.yaml` to validate frontmatter fields, types, and patterns using JSON Schemas. Collections support strict mode (no extra fields) or permissive mode (extra fields allowed).
29
+
30
+ See [Collection Validation Guide](../../../docs/guides/collection-validation.md) for full documentation, examples, and schema patterns.
24
31
 
25
32
  **When to use:** Before committing changes that touch markdown files
26
33
 
27
34
  **Exit codes:**
28
35
 
29
- - `0` - All links valid
30
- - `1` - Broken links found (see stderr for details)
36
+ - `0` - All links and frontmatter valid
37
+ - `1` - Broken links or validation errors found (see stderr for details)
31
38
  - `2` - System error (invalid config, directory not found)
32
39
 
33
40
  **Creates/modifies:** None (read-only validation)
@@ -262,6 +269,48 @@ Override automatic context detection to force dev mode:
262
269
  VAT_ROOT_DIR=/path/to/vibe-agent-toolkit vat --version
263
270
  ```
264
271
 
272
+ ### VAT_TEST_ROOT
273
+
274
+ Override project root detection for testing:
275
+
276
+ ```bash
277
+ VAT_TEST_ROOT=/path/to/test/fixtures vat resources validate
278
+ ```
279
+
280
+ **Use case**: Integration tests that need to run vat commands against test fixtures without relying on directory structure (.git or config file).
281
+
282
+ **Example**:
283
+ ```typescript
284
+ // Test setup
285
+ process.env.VAT_TEST_ROOT = '/path/to/test/fixtures';
286
+ const root = findProjectRoot(process.cwd()); // Returns /path/to/test/fixtures
287
+ ```
288
+
289
+ ### VAT_TEST_CONFIG
290
+
291
+ Override config file path for testing:
292
+
293
+ ```bash
294
+ VAT_TEST_CONFIG=/path/to/test/fixtures/config.yaml vat resources validate
295
+ ```
296
+
297
+ **Use case**: Integration tests that need to test with specific config files without modifying project structure.
298
+
299
+ **Example**:
300
+ ```typescript
301
+ // Test setup
302
+ process.env.VAT_TEST_CONFIG = '/path/to/test/fixtures/config.yaml';
303
+ const config = loadConfig('/any/path'); // Uses override path
304
+ ```
305
+
306
+ **Testing pattern**: Combine VAT_TEST_ROOT and VAT_TEST_CONFIG for complete control:
307
+
308
+ ```bash
309
+ VAT_TEST_ROOT=/path/to/fixtures \
310
+ VAT_TEST_CONFIG=/path/to/fixtures/config.yaml \
311
+ vat resources validate
312
+ ```
313
+
265
314
  ## Context Detection
266
315
 
267
316
  The `vat` wrapper automatically detects your execution context:
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@vibe-agent-toolkit/cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Command-line interface for vibe-agent-toolkit",
5
5
  "type": "module",
6
6
  "bin": {
7
- "vat": "./dist/bin/vat"
7
+ "vat": "./dist/bin/vat.js"
8
8
  },
9
9
  "main": "./dist/index.js",
10
10
  "types": "./dist/index.d.ts",
@@ -40,16 +40,16 @@
40
40
  "license": "MIT",
41
41
  "dependencies": {
42
42
  "@anthropic-ai/sdk": "^0.71.2",
43
- "@vibe-agent-toolkit/agent-config": "0.1.3",
44
- "@vibe-agent-toolkit/agent-schema": "0.1.3",
45
- "@vibe-agent-toolkit/discovery": "0.1.3",
46
- "@vibe-agent-toolkit/gateway-mcp": "0.1.3",
47
- "@vibe-agent-toolkit/rag": "0.1.3",
48
- "@vibe-agent-toolkit/rag-lancedb": "0.1.3",
49
- "@vibe-agent-toolkit/resources": "0.1.3",
50
- "@vibe-agent-toolkit/runtime-claude-skills": "0.1.3",
51
- "@vibe-agent-toolkit/utils": "0.1.3",
52
- "@vibe-agent-toolkit/vat-example-cat-agents": "0.1.3",
43
+ "@vibe-agent-toolkit/agent-config": "0.1.5",
44
+ "@vibe-agent-toolkit/agent-schema": "0.1.5",
45
+ "@vibe-agent-toolkit/discovery": "0.1.5",
46
+ "@vibe-agent-toolkit/gateway-mcp": "0.1.5",
47
+ "@vibe-agent-toolkit/rag": "0.1.5",
48
+ "@vibe-agent-toolkit/rag-lancedb": "0.1.5",
49
+ "@vibe-agent-toolkit/resources": "0.1.5",
50
+ "@vibe-agent-toolkit/agent-skills": "0.1.5",
51
+ "@vibe-agent-toolkit/utils": "0.1.5",
52
+ "@vibe-agent-toolkit/vat-example-cat-agents": "0.1.5",
53
53
  "commander": "^12.1.0",
54
54
  "js-yaml": "^4.1.0",
55
55
  "semver": "^7.7.3",