@vibe-agent-toolkit/cli 0.1.0-rc.10

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 (162) hide show
  1. package/README.md +125 -0
  2. package/dist/bin/vat.d.ts +18 -0
  3. package/dist/bin/vat.d.ts.map +1 -0
  4. package/dist/bin/vat.js +174 -0
  5. package/dist/bin/vat.js.map +1 -0
  6. package/dist/bin.d.ts +7 -0
  7. package/dist/bin.d.ts.map +1 -0
  8. package/dist/bin.js +108 -0
  9. package/dist/bin.js.map +1 -0
  10. package/dist/commands/agent/audit.d.ts +9 -0
  11. package/dist/commands/agent/audit.d.ts.map +1 -0
  12. package/dist/commands/agent/audit.js +139 -0
  13. package/dist/commands/agent/audit.js.map +1 -0
  14. package/dist/commands/agent/build.d.ts +13 -0
  15. package/dist/commands/agent/build.d.ts.map +1 -0
  16. package/dist/commands/agent/build.js +52 -0
  17. package/dist/commands/agent/build.js.map +1 -0
  18. package/dist/commands/agent/help.d.ts +5 -0
  19. package/dist/commands/agent/help.d.ts.map +1 -0
  20. package/dist/commands/agent/help.js +10 -0
  21. package/dist/commands/agent/help.js.map +1 -0
  22. package/dist/commands/agent/import.d.ts +10 -0
  23. package/dist/commands/agent/import.d.ts.map +1 -0
  24. package/dist/commands/agent/import.js +50 -0
  25. package/dist/commands/agent/import.js.map +1 -0
  26. package/dist/commands/agent/index.d.ts +7 -0
  27. package/dist/commands/agent/index.d.ts.map +1 -0
  28. package/dist/commands/agent/index.js +293 -0
  29. package/dist/commands/agent/index.js.map +1 -0
  30. package/dist/commands/agent/install.d.ts +15 -0
  31. package/dist/commands/agent/install.d.ts.map +1 -0
  32. package/dist/commands/agent/install.js +107 -0
  33. package/dist/commands/agent/install.js.map +1 -0
  34. package/dist/commands/agent/installed.d.ts +13 -0
  35. package/dist/commands/agent/installed.d.ts.map +1 -0
  36. package/dist/commands/agent/installed.js +106 -0
  37. package/dist/commands/agent/installed.js.map +1 -0
  38. package/dist/commands/agent/list.d.ts +8 -0
  39. package/dist/commands/agent/list.d.ts.map +1 -0
  40. package/dist/commands/agent/list.js +41 -0
  41. package/dist/commands/agent/list.js.map +1 -0
  42. package/dist/commands/agent/run.d.ts +17 -0
  43. package/dist/commands/agent/run.d.ts.map +1 -0
  44. package/dist/commands/agent/run.js +44 -0
  45. package/dist/commands/agent/run.js.map +1 -0
  46. package/dist/commands/agent/uninstall.d.ts +13 -0
  47. package/dist/commands/agent/uninstall.d.ts.map +1 -0
  48. package/dist/commands/agent/uninstall.js +48 -0
  49. package/dist/commands/agent/uninstall.js.map +1 -0
  50. package/dist/commands/agent/validate.d.ts +8 -0
  51. package/dist/commands/agent/validate.d.ts.map +1 -0
  52. package/dist/commands/agent/validate.js +51 -0
  53. package/dist/commands/agent/validate.js.map +1 -0
  54. package/dist/commands/rag/clear-command.d.ts +10 -0
  55. package/dist/commands/rag/clear-command.d.ts.map +1 -0
  56. package/dist/commands/rag/clear-command.js +22 -0
  57. package/dist/commands/rag/clear-command.js.map +1 -0
  58. package/dist/commands/rag/command-helpers.d.ts +27 -0
  59. package/dist/commands/rag/command-helpers.d.ts.map +1 -0
  60. package/dist/commands/rag/command-helpers.js +58 -0
  61. package/dist/commands/rag/command-helpers.js.map +1 -0
  62. package/dist/commands/rag/help.d.ts +5 -0
  63. package/dist/commands/rag/help.d.ts.map +1 -0
  64. package/dist/commands/rag/help.js +10 -0
  65. package/dist/commands/rag/help.js.map +1 -0
  66. package/dist/commands/rag/index-command.d.ts +10 -0
  67. package/dist/commands/rag/index-command.d.ts.map +1 -0
  68. package/dist/commands/rag/index-command.js +49 -0
  69. package/dist/commands/rag/index-command.js.map +1 -0
  70. package/dist/commands/rag/index.d.ts +7 -0
  71. package/dist/commands/rag/index.d.ts.map +1 -0
  72. package/dist/commands/rag/index.js +168 -0
  73. package/dist/commands/rag/index.js.map +1 -0
  74. package/dist/commands/rag/query-command.d.ts +11 -0
  75. package/dist/commands/rag/query-command.d.ts.map +1 -0
  76. package/dist/commands/rag/query-command.js +54 -0
  77. package/dist/commands/rag/query-command.js.map +1 -0
  78. package/dist/commands/rag/stats-command.d.ts +10 -0
  79. package/dist/commands/rag/stats-command.d.ts.map +1 -0
  80. package/dist/commands/rag/stats-command.js +25 -0
  81. package/dist/commands/rag/stats-command.js.map +1 -0
  82. package/dist/commands/resources/command-helpers.d.ts +5 -0
  83. package/dist/commands/resources/command-helpers.d.ts.map +1 -0
  84. package/dist/commands/resources/command-helpers.js +6 -0
  85. package/dist/commands/resources/command-helpers.js.map +1 -0
  86. package/dist/commands/resources/help.d.ts +5 -0
  87. package/dist/commands/resources/help.d.ts.map +1 -0
  88. package/dist/commands/resources/help.js +10 -0
  89. package/dist/commands/resources/help.js.map +1 -0
  90. package/dist/commands/resources/index.d.ts +7 -0
  91. package/dist/commands/resources/index.d.ts.map +1 -0
  92. package/dist/commands/resources/index.js +64 -0
  93. package/dist/commands/resources/index.js.map +1 -0
  94. package/dist/commands/resources/scan.d.ts +9 -0
  95. package/dist/commands/resources/scan.d.ts.map +1 -0
  96. package/dist/commands/resources/scan.js +47 -0
  97. package/dist/commands/resources/scan.js.map +1 -0
  98. package/dist/commands/resources/validate.d.ts +9 -0
  99. package/dist/commands/resources/validate.d.ts.map +1 -0
  100. package/dist/commands/resources/validate.js +61 -0
  101. package/dist/commands/resources/validate.js.map +1 -0
  102. package/dist/index.d.ts +14 -0
  103. package/dist/index.d.ts.map +1 -0
  104. package/dist/index.js +15 -0
  105. package/dist/index.js.map +1 -0
  106. package/dist/schemas/config.d.ts +1034 -0
  107. package/dist/schemas/config.d.ts.map +1 -0
  108. package/dist/schemas/config.js +135 -0
  109. package/dist/schemas/config.js.map +1 -0
  110. package/dist/utils/agent-discovery.d.ts +32 -0
  111. package/dist/utils/agent-discovery.d.ts.map +1 -0
  112. package/dist/utils/agent-discovery.js +108 -0
  113. package/dist/utils/agent-discovery.js.map +1 -0
  114. package/dist/utils/agent-runner.d.ts +22 -0
  115. package/dist/utils/agent-runner.d.ts.map +1 -0
  116. package/dist/utils/agent-runner.js +120 -0
  117. package/dist/utils/agent-runner.js.map +1 -0
  118. package/dist/utils/command-error.d.ts +19 -0
  119. package/dist/utils/command-error.d.ts.map +1 -0
  120. package/dist/utils/command-error.js +36 -0
  121. package/dist/utils/command-error.js.map +1 -0
  122. package/dist/utils/config-loader.d.ts +12 -0
  123. package/dist/utils/config-loader.d.ts.map +1 -0
  124. package/dist/utils/config-loader.js +39 -0
  125. package/dist/utils/config-loader.js.map +1 -0
  126. package/dist/utils/help-loader.d.ts +12 -0
  127. package/dist/utils/help-loader.d.ts.map +1 -0
  128. package/dist/utils/help-loader.js +39 -0
  129. package/dist/utils/help-loader.js.map +1 -0
  130. package/dist/utils/logger.d.ts +14 -0
  131. package/dist/utils/logger.d.ts.map +1 -0
  132. package/dist/utils/logger.js +21 -0
  133. package/dist/utils/logger.js.map +1 -0
  134. package/dist/utils/output.d.ts +20 -0
  135. package/dist/utils/output.d.ts.map +1 -0
  136. package/dist/utils/output.js +40 -0
  137. package/dist/utils/output.js.map +1 -0
  138. package/dist/utils/project-root.d.ts +11 -0
  139. package/dist/utils/project-root.d.ts.map +1 -0
  140. package/dist/utils/project-root.js +35 -0
  141. package/dist/utils/project-root.js.map +1 -0
  142. package/dist/utils/resource-loader.d.ts +30 -0
  143. package/dist/utils/resource-loader.d.ts.map +1 -0
  144. package/dist/utils/resource-loader.js +63 -0
  145. package/dist/utils/resource-loader.js.map +1 -0
  146. package/dist/utils/scope-locations.d.ts +17 -0
  147. package/dist/utils/scope-locations.d.ts.map +1 -0
  148. package/dist/utils/scope-locations.js +40 -0
  149. package/dist/utils/scope-locations.js.map +1 -0
  150. package/dist/utils/validate-help-files.d.ts +14 -0
  151. package/dist/utils/validate-help-files.d.ts.map +1 -0
  152. package/dist/utils/validate-help-files.js +61 -0
  153. package/dist/utils/validate-help-files.js.map +1 -0
  154. package/dist/version.d.ts +13 -0
  155. package/dist/version.d.ts.map +1 -0
  156. package/dist/version.js +27 -0
  157. package/dist/version.js.map +1 -0
  158. package/docs/agent.md +100 -0
  159. package/docs/index.md +309 -0
  160. package/docs/rag.md +449 -0
  161. package/docs/resources.md +158 -0
  162. package/package.json +68 -0
package/docs/index.md ADDED
@@ -0,0 +1,309 @@
1
+ # vat - Vibe Agent Toolkit CLI
2
+
3
+ > Agent-friendly toolkit for building, testing, and deploying portable AI agents
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ vat [options] <command>
9
+ ```
10
+
11
+ ## Commands
12
+
13
+ ### `resources validate`
14
+
15
+ Markdown resource scanning and link validation (run before commit)
16
+
17
+ **What it does:**
18
+
19
+ 1. Scans markdown files for links and anchors
20
+ 2. Validates internal file links (relative paths)
21
+ 3. Validates anchor links within files (#heading)
22
+ 4. Validates cross-file anchor links (file.md#heading)
23
+ 5. Reports broken links to stderr
24
+
25
+ **When to use:** Before committing changes that touch markdown files
26
+
27
+ **Exit codes:**
28
+
29
+ - `0` - All links valid
30
+ - `1` - Broken links found (see stderr for details)
31
+ - `2` - System error (invalid config, directory not found)
32
+
33
+ **Creates/modifies:** None (read-only validation)
34
+
35
+ **Examples:**
36
+
37
+ ```bash
38
+ vat resources validate docs/ # Validate docs directory
39
+ vat resources validate # Use config patterns
40
+ vat resources validate --debug # Show detailed progress
41
+ ```
42
+
43
+ ---
44
+
45
+ ### `resources scan`
46
+
47
+ Discover markdown resources in directory and report statistics
48
+
49
+ **What it does:**
50
+
51
+ 1. Recursively finds markdown files
52
+ 2. Counts links and anchors
53
+ 3. Outputs statistics as YAML to stdout
54
+
55
+ **When to use:** Understanding markdown structure before processing
56
+
57
+ **Exit codes:**
58
+
59
+ - `0` - Scan completed successfully
60
+
61
+ **Creates/modifies:** None (read-only scan)
62
+
63
+ **Output format:** YAML to stdout
64
+
65
+ ```yaml
66
+ status: success
67
+ filesScanned: 42
68
+ linksFound: 156
69
+ anchorsFound: 89
70
+ duration: 234
71
+ ```
72
+
73
+ **Examples:**
74
+
75
+ ```bash
76
+ vat resources scan . # Scan current directory
77
+ vat resources scan docs/ # Scan specific directory
78
+ ```
79
+
80
+ ---
81
+
82
+ ### `agent build`
83
+
84
+ Build agent for deployment to target runtime
85
+
86
+ **What it does:**
87
+
88
+ 1. Resolves agent dependencies
89
+ 2. Bundles agent code for target runtime
90
+ 3. Generates runtime-specific manifest
91
+ 4. Creates deployment artifacts
92
+
93
+ **When to use:** Preparing agent for production deployment
94
+
95
+ **Exit codes:**
96
+
97
+ - `0` - Build succeeded
98
+ - `1` - Build failed (see stderr for details)
99
+ - `2` - Configuration error
100
+
101
+ **Creates/modifies:**
102
+
103
+ - `dist/vat-bundles/{target}/` - Bundled agent artifacts
104
+ - Runtime-specific manifest files
105
+
106
+ **Examples:**
107
+
108
+ ```bash
109
+ vat agent build ./my-agent # Build for default target
110
+ vat agent build ./my-agent --target claude-skills
111
+ vat agent build ./my-agent --output ./dist
112
+ ```
113
+
114
+ ---
115
+
116
+ ### `agent run`
117
+
118
+ Execute agent locally for testing
119
+
120
+ **What it does:**
121
+
122
+ 1. Loads agent from path
123
+ 2. Executes agent with provided input
124
+ 3. Outputs agent results
125
+
126
+ **When to use:** Testing agent behavior before deployment
127
+
128
+ **Exit codes:**
129
+
130
+ - `0` - Execution succeeded
131
+ - `1` - Execution failed
132
+
133
+ **Creates/modifies:** Depends on agent behavior
134
+
135
+ **Examples:**
136
+
137
+ ```bash
138
+ vat agent run ./my-agent --input "test query"
139
+ vat agent run ./my-agent --debug
140
+ ```
141
+
142
+ ---
143
+
144
+ ### `rag index`
145
+
146
+ Create vector embeddings for semantic search over documentation
147
+
148
+ **What it does:**
149
+
150
+ 1. Scans markdown files in specified path
151
+ 2. Chunks documents for embedding
152
+ 3. Generates vector embeddings
153
+ 4. Stores in vector database for fast retrieval
154
+
155
+ **When to use:** Setting up semantic search capabilities
156
+
157
+ **Exit codes:**
158
+
159
+ - `0` - Indexing succeeded
160
+ - `1` - Indexing failed
161
+
162
+ **Creates/modifies:**
163
+
164
+ - Vector database files for semantic search
165
+ - Index metadata
166
+
167
+ **Examples:**
168
+
169
+ ```bash
170
+ vat rag index docs/ # Index documentation
171
+ vat rag index docs/ --chunk-size 512
172
+ ```
173
+
174
+ ---
175
+
176
+ ### `rag search`
177
+
178
+ Search indexed documentation semantically
179
+
180
+ **What it does:**
181
+
182
+ 1. Queries vector database by semantic meaning
183
+ 2. Returns ranked results by similarity
184
+ 3. Outputs results to stdout
185
+
186
+ **When to use:** Finding relevant documentation by meaning (not keywords)
187
+
188
+ **Exit codes:**
189
+
190
+ - `0` - Search succeeded
191
+ - `1` - Search failed (no index, query error)
192
+
193
+ **Creates/modifies:** None (read-only query)
194
+
195
+ **Examples:**
196
+
197
+ ```bash
198
+ vat rag search "how to validate markdown links"
199
+ vat rag search "agent deployment" --limit 5
200
+ ```
201
+
202
+ ---
203
+
204
+ ## Global Options
205
+
206
+ - `--version` - Show version number (with `-dev` suffix when running from development repo)
207
+ - `--help` - Show help for any command
208
+ - `--help --verbose` - Show comprehensive help (this output)
209
+ - `--debug` - Enable debug logging
210
+
211
+ ## Environment Variables
212
+
213
+ ### VAT_DEBUG
214
+ Enable detailed wrapper diagnostics showing context detection and resolution:
215
+
216
+ ```bash
217
+ VAT_DEBUG=1 vat --version
218
+ # Output includes:
219
+ # - Current working directory
220
+ # - Detected project root
221
+ # - Context (dev/local/global)
222
+ # - Binary path being used
223
+ # - Version information
224
+ ```
225
+
226
+ ### VAT_ROOT_DIR
227
+ Override automatic context detection to force dev mode:
228
+
229
+ ```bash
230
+ VAT_ROOT_DIR=/path/to/vibe-agent-toolkit vat --version
231
+ ```
232
+
233
+ ## Context Detection
234
+
235
+ The `vat` wrapper automatically detects your execution context:
236
+
237
+ **Dev mode** - Running from within vibe-agent-toolkit repository:
238
+ - Shows version with `-dev` suffix: `0.1.0-rc.9-dev (/path/to/repo)`
239
+ - Uses development build directly (no packaging)
240
+ - Works from any subdirectory within the repo
241
+
242
+ **Local install** - Project has vibe-agent-toolkit in node_modules:
243
+ - Uses locally installed version
244
+ - Shown in version output: `0.1.0-rc.9 (local: /path/to/project)`
245
+
246
+ **Global install** - Fallback when no local install found:
247
+ - Uses globally installed version
248
+ - Shows clean version: `0.1.0-rc.9`
249
+
250
+ When running global `vat` from within the toolkit repository, it automatically
251
+ switches to dev mode and shows the `-dev` suffix.
252
+
253
+ ## Configuration
254
+
255
+ Place `vibe-agent-toolkit.config.yaml` at project root:
256
+
257
+ ```yaml
258
+ version: 1
259
+ resources:
260
+ include:
261
+ - "docs/**/*.md"
262
+ - "README.md"
263
+ exclude:
264
+ - "node_modules/**"
265
+ - "**/archive/**"
266
+ ```
267
+
268
+ ## Exit Code Summary
269
+
270
+ - `0` - Success (validation passed, scan completed, build succeeded)
271
+ - `1` - Expected failures (validation errors, broken links, build failures)
272
+ - `2` - System errors (invalid config, directory not found, missing dependencies)
273
+
274
+ ## Output Formats
275
+
276
+ **Structured output (YAML)** - Commands like `scan` output YAML to stdout for parsing:
277
+ ```bash
278
+ vat resources scan . | yq '.filesScanned'
279
+ ```
280
+
281
+ **Error output (stderr)** - Validation errors use test format:
282
+ ```
283
+ file:line:col: severity: message
284
+ ```
285
+
286
+ ## Common Workflows
287
+
288
+ **Before committing documentation:**
289
+ ```bash
290
+ vat resources validate docs/ && git commit -m "Update docs"
291
+ ```
292
+
293
+ **Building and testing agent:**
294
+ ```bash
295
+ vat agent build ./my-agent
296
+ vat agent run ./my-agent --input "test"
297
+ ```
298
+
299
+ **Setting up semantic search:**
300
+ ```bash
301
+ vat rag index docs/
302
+ vat rag search "markdown validation"
303
+ ```
304
+
305
+ ## More Information
306
+
307
+ - **Agent guidance:** `docs/cli/CLAUDE.md` (strategic patterns for AI agents)
308
+ - **Documentation:** https://github.com/jdutton/vibe-agent-toolkit
309
+ - **Issues:** https://github.com/jdutton/vibe-agent-toolkit/issues