@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
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* Utilities for loading and crawling resources
|
|
3
3
|
*/
|
|
4
4
|
import { existsSync, statSync } from 'node:fs';
|
|
5
|
-
import { DEFAULT_RESOURCE_INCLUDE, ResourceRegistry, } from '@vibe-agent-toolkit/resources';
|
|
6
|
-
import { GitTracker, safePath, toForwardSlash } from '@vibe-agent-toolkit/utils';
|
|
5
|
+
import { buildResourcePopulation, DEFAULT_RESOURCE_INCLUDE, gitExtentSelected, ResourceRegistry, } from '@vibe-agent-toolkit/resources';
|
|
6
|
+
import { GitTracker, gitTreeSnapshot, safePath, toForwardSlash } from '@vibe-agent-toolkit/utils';
|
|
7
7
|
import { loadConfig } from './config-loader.js';
|
|
8
|
+
import { withPopulationCache } from './projection-store.js';
|
|
8
9
|
/**
|
|
9
10
|
* Scope resource include patterns to a subdirectory of the crawl base.
|
|
10
11
|
*
|
|
@@ -56,6 +57,169 @@ function crawlOptionsForPath(pathArg, projectRoot, config, logger) {
|
|
|
56
57
|
...(config?.resources?.exclude ? { exclude: config.resources.exclude } : {}),
|
|
57
58
|
};
|
|
58
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* The env var that selects the crawler behind every resources-crawling verb —
|
|
62
|
+
* `vat resources scan`/`validate`, `vat rag index`, the pipeline oracles, and
|
|
63
|
+
* (via {@link withResourcePopulationSource}) the packaging verbs
|
|
64
|
+
* `vat skills build`/`validate` and `vat claude plugin build`, which is what
|
|
65
|
+
* puts `vat build` on the lane at all.
|
|
66
|
+
*
|
|
67
|
+
* An environment switch rather than a config field, for the same reason
|
|
68
|
+
* `VAT_INVENTORY_CRAWL` is one: it selects which INSTRUMENT runs, not what
|
|
69
|
+
* the project means, and it has to be reachable from the lab, which spawns the
|
|
70
|
+
* binary and controls its environment. A config field would put the A and B arms
|
|
71
|
+
* inside the subject's own tree, where a measurement edits the thing it measures.
|
|
72
|
+
*/
|
|
73
|
+
export const RESOURCES_CRAWL_ENV = 'VAT_RESOURCES_CRAWL';
|
|
74
|
+
/** {@link RESOURCES_CRAWL_ENV}'s value that selects the projection lane. */
|
|
75
|
+
export const RESOURCES_CRAWL_PROJECTION = 'projection';
|
|
76
|
+
/**
|
|
77
|
+
* {@link RESOURCES_CRAWL_ENV}'s value that opts BACK to the incumbent walk.
|
|
78
|
+
*
|
|
79
|
+
* The projection lane is the default now, so this is the escape hatch rather
|
|
80
|
+
* than the selector. Any other value — including the historical `projection` —
|
|
81
|
+
* leaves the projection lane selected, so existing scripts and lab arms that
|
|
82
|
+
* name it explicitly keep working and keep MEANING the same thing.
|
|
83
|
+
*/
|
|
84
|
+
export const RESOURCES_CRAWL_WALK = 'walk';
|
|
85
|
+
/**
|
|
86
|
+
* Whether this process should source the resources population from a projection.
|
|
87
|
+
*
|
|
88
|
+
* **Defaults to the projection lane.** Both lanes now enumerate
|
|
89
|
+
* `tracked ∪ (untracked ∧ ¬ignored)` — `ResourceRegistry.crawl` passes
|
|
90
|
+
* `includeUntracked: true` per `docs/architecture/resource-scanning-and-caching.md`
|
|
91
|
+
* §2.1 — so the population question they answer is the same one.
|
|
92
|
+
*
|
|
93
|
+
* ⚠️⚠️ **ONE DISAGREEMENT SURVIVES, AND IT DROPS FINDINGS: SYMLINKS.** The
|
|
94
|
+
* `filesystem` extent crawls with `followSymlinks: false` and records no link's
|
|
95
|
+
* own path, and `GitCrawlSource` skips mode `120000` deliberately to match it —
|
|
96
|
+
* so BOTH projection extents omit a committed symlink that the incumbent walk
|
|
97
|
+
* includes. For an out-of-tree target those bytes have no other path into the
|
|
98
|
+
* population, which means **a broken symlink the walk reports as
|
|
99
|
+
* `LINK_BROKEN_FILE` is not reported on this lane.** That is a real loss, it is
|
|
100
|
+
* known, and it is the cost this default was accepted at; closing it is its own
|
|
101
|
+
* change (teaching an extent to admit `120000` entries as their own paths).
|
|
102
|
+
* {@link RESOURCES_CRAWL_WALK} is the one-value escape hatch meanwhile.
|
|
103
|
+
*
|
|
104
|
+
* Read from the environment at each call rather than memoized at module load:
|
|
105
|
+
* `vitest.setup.js` deletes every `VAT_*` variable before any test module loads,
|
|
106
|
+
* so a module-level binding would make the switch unobservable to every test
|
|
107
|
+
* that sets it.
|
|
108
|
+
*
|
|
109
|
+
* @returns `true` when the projection lane is selected
|
|
110
|
+
*/
|
|
111
|
+
export function resourcesProjectionCrawlSelected() {
|
|
112
|
+
return process.env[RESOURCES_CRAWL_ENV] !== RESOURCES_CRAWL_WALK;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The projection-backed enumeration for this run, or `undefined` to keep the
|
|
116
|
+
* incumbent `crawlDirectory` walk.
|
|
117
|
+
*
|
|
118
|
+
* Gated on the selector alone — and NOT additionally on a discoverable project
|
|
119
|
+
* root, which is where this differs from `vat inventory`'s
|
|
120
|
+
* `populationProviderFor`. That gate exists there because inventory membership
|
|
121
|
+
* is resolved per skill against a root the extractor derives itself, so a
|
|
122
|
+
* population rooted anywhere else answers a different question.
|
|
123
|
+
*
|
|
124
|
+
* The root the caller resolved is carried ON the source rather than merely used
|
|
125
|
+
* to build it, which is what lets `ResourceRegistry.populationFrom` decline a
|
|
126
|
+
* crawl of some OTHER tree instead of answering it with this tree's ignore
|
|
127
|
+
* oracle. This function used to argue that no second root existed to disagree
|
|
128
|
+
* with; it does — `crawlOptionsForPath` re-bases `baseDir` onto a path argument
|
|
129
|
+
* that lies outside the project root, and the packaging validator's
|
|
130
|
+
* `findProjectRoot(...) ?? dirname(skillPath)` can land on a build output
|
|
131
|
+
* directory. Both are now declined rather than served.
|
|
132
|
+
*
|
|
133
|
+
* The tracker is threaded through because its absence is not cosmetic: with no
|
|
134
|
+
* tracker every realization row reads `gitignored: false`, and the population
|
|
135
|
+
* would admit the ignored half of a git tree rather than decline it. See
|
|
136
|
+
* `buildResourcePopulation`.
|
|
137
|
+
*
|
|
138
|
+
* @param root - The root this source may answer for, and no other
|
|
139
|
+
* @param gitTracker - The run's ignore oracle
|
|
140
|
+
* @param observeExtentSource - Called with the enumerator that actually ran,
|
|
141
|
+
* once per enumerated root. The value cannot be recovered afterwards by
|
|
142
|
+
* re-reading the environment — see {@link ResourceLoadResult.extentSource}.
|
|
143
|
+
* 🪤 On a cache hit NO enumerator runs and this still reports the one this
|
|
144
|
+
* process selected, because the source is chosen before the store is asked
|
|
145
|
+
* @param cache - The run's projection store, or `undefined` to enumerate every
|
|
146
|
+
* time. A SEPARATE selector from {@link RESOURCES_CRAWL_ENV}: which lane
|
|
147
|
+
* enumerates and whether its answer is cached are independent choices, and a
|
|
148
|
+
* cache folded into the lane switch could never be measured against it
|
|
149
|
+
* @returns A population source, or `undefined` to use the walk
|
|
150
|
+
*/
|
|
151
|
+
function populationSourceFor(root, gitTracker, observeExtentSource, cache) {
|
|
152
|
+
if (!resourcesProjectionCrawlSelected()) {
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
root: safePath.resolve(root),
|
|
157
|
+
enumerate: async (enumeratedRoot) => {
|
|
158
|
+
const population = await buildResourcePopulation({
|
|
159
|
+
root: enumeratedRoot,
|
|
160
|
+
gitTracker,
|
|
161
|
+
...(cache !== undefined && { cache }),
|
|
162
|
+
});
|
|
163
|
+
observeExtentSource(population.extentSource);
|
|
164
|
+
return population.paths;
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Run one command's work with the projection-backed population source it
|
|
170
|
+
* selected, and the store that answers it open for the whole call.
|
|
171
|
+
*
|
|
172
|
+
* The lane-selection seam for every command that builds its OWN registry rather
|
|
173
|
+
* than going through {@link loadResourcesWithConfig} — `vat skills build` and
|
|
174
|
+
* `vat claude plugin build` (via `createProjectRegistry`) and
|
|
175
|
+
* `vat skills validate` (via its shared-context registry). Those three are what
|
|
176
|
+
* put `vat build` on the projection lane at all: before this, that verb reached
|
|
177
|
+
* a projection store on NO phase.
|
|
178
|
+
*
|
|
179
|
+
* Same selector, same store, same ignore oracle as the resource loader —
|
|
180
|
+
* deliberately, and not merely for tidiness. A second way to decide the lane is
|
|
181
|
+
* a second thing to keep in step, and a packaging lane that answered the
|
|
182
|
+
* selector differently from the validation lane would make a whole-run A/B
|
|
183
|
+
* uninterpretable: half the phases on one population, half on the other, and
|
|
184
|
+
* nothing in the output saying so.
|
|
185
|
+
*
|
|
186
|
+
* ⚠️ The tracker is **not optional dressing**. With no `GitTracker` every
|
|
187
|
+
* realization row reads `gitignored: false`, so the population would admit the
|
|
188
|
+
* ignored half of a git tree — generated markdown, caches, vendored corpora —
|
|
189
|
+
* and the packaging run would start bundling and validating files the project
|
|
190
|
+
* told git to forget. One is built here when the caller has none, rooted at the
|
|
191
|
+
* same root the population is enumerated from.
|
|
192
|
+
*
|
|
193
|
+
* @param options - Where the corpus is, and what to reuse
|
|
194
|
+
* @param options.root - The absolute corpus root, which is also the basis every
|
|
195
|
+
* enumerated path is returned against
|
|
196
|
+
* @param options.gitTracker - An already-initialized tracker to reuse. Omit to
|
|
197
|
+
* have one built, which costs a `git ls-files` spawn — and only when the lane
|
|
198
|
+
* is actually selected
|
|
199
|
+
* @param options.observeExtentSource - Called with the enumerator that ran, once
|
|
200
|
+
* per enumerated root. 🪤 NOT a cache-hit marker: on a hit no enumerator runs
|
|
201
|
+
* and this still reports the one this process selected
|
|
202
|
+
* @param work - Given the source, or `undefined` when the walk stays selected
|
|
203
|
+
* @returns Whatever `work` returned
|
|
204
|
+
*/
|
|
205
|
+
export async function withResourcePopulationSource(options, work) {
|
|
206
|
+
// Checked before anything is built or opened: an unselected lane must cost
|
|
207
|
+
// nothing, or every command pays a tracker and a store to decline them.
|
|
208
|
+
if (!resourcesProjectionCrawlSelected()) {
|
|
209
|
+
return work(undefined);
|
|
210
|
+
}
|
|
211
|
+
const gitTracker = options.gitTracker ?? new GitTracker(options.root);
|
|
212
|
+
return withPopulationCache({ root: options.root }, async (cache) => {
|
|
213
|
+
// Initialized inside the bracket for the reason `loadResourcesWithConfig`
|
|
214
|
+
// gives at its own call: the store has already taken the snapshot that
|
|
215
|
+
// answers this tracker's question, so asking git again is a spawn spent
|
|
216
|
+
// rebuilding a set the process is holding.
|
|
217
|
+
if (options.gitTracker === undefined) {
|
|
218
|
+
await gitTracker.initialize();
|
|
219
|
+
}
|
|
220
|
+
return work(populationSourceFor(options.root, gitTracker, options.observeExtentSource ?? (() => undefined), cache));
|
|
221
|
+
});
|
|
222
|
+
}
|
|
59
223
|
/**
|
|
60
224
|
* Fail loudly on a path argument that cannot be crawled.
|
|
61
225
|
*
|
|
@@ -108,11 +272,10 @@ export async function loadResourcesWithConfig(pathArg, projectRoot, logger) {
|
|
|
108
272
|
if (config) {
|
|
109
273
|
logger.debug(`Loaded config from ${projectRoot}`);
|
|
110
274
|
}
|
|
111
|
-
//
|
|
275
|
+
// Built here, but deliberately NOT initialized here — see the call inside the
|
|
276
|
+
// population-cache bracket below. The registry only reads the tracker during
|
|
277
|
+
// `crawl`, which happens inside that bracket, so nothing observes it empty.
|
|
112
278
|
const gitTracker = new GitTracker(projectRoot);
|
|
113
|
-
await gitTracker.initialize();
|
|
114
|
-
const stats = gitTracker.getStats();
|
|
115
|
-
logger.debug(`GitTracker initialized with ${stats.cacheSize} tracked files`);
|
|
116
279
|
// Create registry and crawl
|
|
117
280
|
// Build options conditionally to satisfy exactOptionalPropertyTypes
|
|
118
281
|
const registryOptions = {
|
|
@@ -142,13 +305,67 @@ export async function loadResourcesWithConfig(pathArg, projectRoot, logger) {
|
|
|
142
305
|
...(config?.resources?.exclude ? { exclude: config.resources.exclude } : {}),
|
|
143
306
|
};
|
|
144
307
|
}
|
|
145
|
-
|
|
308
|
+
// Which lane enumerates. Applied to the options both branches above produced,
|
|
309
|
+
// so the path-argument case and the whole-root case cannot end up on different
|
|
310
|
+
// crawlers — the bug shape this file already carries one fix for.
|
|
311
|
+
let extentSource = null;
|
|
312
|
+
// The store brackets the crawl and is closed however the crawl ends. Nothing
|
|
313
|
+
// outside this bracket can reach it: the population source is called from
|
|
314
|
+
// inside `registry.crawl` and nowhere else.
|
|
315
|
+
const lane = await withPopulationCache({ root: projectRoot }, async (cache) => {
|
|
316
|
+
// The git enumerator takes a `gitTreeSnapshot` during the crawl below no matter
|
|
317
|
+
// what. Taking it HERE instead is the same snapshot moved a few lines earlier —
|
|
318
|
+
// the open bracket memoizes it, so the enumerator's own call becomes a lookup —
|
|
319
|
+
// and it puts the answer in hand before the tracker asks its question.
|
|
320
|
+
//
|
|
321
|
+
// ⚠️ Gated, because ungated this is a LOSS: a snapshot is `git add --all` plus
|
|
322
|
+
// two more spawns, and on the filesystem enumerator or the incumbent walk
|
|
323
|
+
// nothing would ever consume it. Guarded by `gitExtentSelected` rather than a
|
|
324
|
+
// second copy of the condition, so the two cannot drift.
|
|
325
|
+
//
|
|
326
|
+
// ⚠️⚠️ BOTH HALVES, and the second one is not redundant. `gitExtentSelected`
|
|
327
|
+
// answers "which ENUMERATOR would the projection lane use", which stopped
|
|
328
|
+
// implying "the projection lane is running" the moment git became the extent
|
|
329
|
+
// default: under `VAT_RESOURCES_CRAWL=walk` it still answers true inside any
|
|
330
|
+
// repository, so the walk paid for a snapshot nothing consumed — measured at
|
|
331
|
+
// 7 git spawns on the escape hatch against 2 before the flip. The lane check
|
|
332
|
+
// is the half that went missing when the default moved.
|
|
333
|
+
if (resourcesProjectionCrawlSelected() && gitExtentSelected(projectRoot)) {
|
|
334
|
+
gitTreeSnapshot({ cwd: projectRoot });
|
|
335
|
+
}
|
|
336
|
+
// Now inside the bracket, and after the snapshot above. The set a snapshot
|
|
337
|
+
// describes — `tracked ∪ (untracked ∧ ¬ignored)` — is exactly the set this
|
|
338
|
+
// would otherwise spawn `git ls-files --cached --others --exclude-standard` to
|
|
339
|
+
// rebuild, so on the git lane it reads the answer instead of re-asking. Where
|
|
340
|
+
// no snapshot was taken the peek misses and it spawns exactly as before.
|
|
341
|
+
await gitTracker.initialize();
|
|
342
|
+
logger.debug(`GitTracker initialized with ${gitTracker.getStats().cacheSize} tracked files`);
|
|
343
|
+
const populationSource = populationSourceFor(projectRoot, gitTracker, (kind) => {
|
|
344
|
+
extentSource = kind;
|
|
345
|
+
}, cache);
|
|
346
|
+
const selected = populationSource ? 'projection' : 'walk';
|
|
347
|
+
if (populationSource) {
|
|
348
|
+
logger.debug(`Enumerating via the projection lane (${RESOURCES_CRAWL_ENV}=${RESOURCES_CRAWL_PROJECTION})`);
|
|
349
|
+
crawlOptions = { ...crawlOptions, populationSource };
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
// Said for the same reason the projection branch says it, and the symmetry
|
|
353
|
+
// is the point: a marker that only one lane emits makes the other lane
|
|
354
|
+
// identifiable by ABSENCE, which is indistinguishable from a build too old
|
|
355
|
+
// to have either lane.
|
|
356
|
+
logger.debug(`Enumerating via the incumbent walk (${RESOURCES_CRAWL_ENV} unset)`);
|
|
357
|
+
}
|
|
358
|
+
await registry.crawl(crawlOptions);
|
|
359
|
+
return selected;
|
|
360
|
+
});
|
|
146
361
|
return {
|
|
147
362
|
scanPath: pathArg ?? projectRoot,
|
|
148
363
|
projectRoot,
|
|
149
364
|
config,
|
|
150
365
|
registry,
|
|
151
366
|
gitTracker,
|
|
367
|
+
lane,
|
|
368
|
+
extentSource,
|
|
152
369
|
};
|
|
153
370
|
}
|
|
154
371
|
//# sourceMappingURL=resource-loader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-loader.js","sourceRoot":"","sources":["../../src/utils/resource-loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EACL,wBAAwB,EACxB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"resource-loader.js","sourceRoot":"","sources":["../../src/utils/resource-loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,GAOjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAElG,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OA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GAAG,EAAE,GAAG,YAAY,EAAE,gBAAgB,EAAE,CAAC;QACvD,CAAC;aAAM,CAAC;YACN,2EAA2E;YAC3E,uEAAuE;YACvE,2EAA2E;YAC3E,uBAAuB;YACvB,MAAM,CAAC,KAAK,CAAC,uCAAuC,mBAAmB,SAAS,CAAC,CAAC;QACpF,CAAC;QAED,MAAM,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACnC,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,QAAQ,EAAE,OAAO,IAAI,WAAW;QAChC,WAAW;QACX,MAAM;QACN,QAAQ;QACR,UAAU;QACV,IAAI;QACJ,YAAY;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* nor in marketplace (which knows nothing about config-level packaging
|
|
13
13
|
* options).
|
|
14
14
|
*/
|
|
15
|
-
import { type ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
|
|
16
15
|
import { type Observation, type PackagingValidationResult } from '@vibe-agent-toolkit/agent-skills';
|
|
17
16
|
import { type Target, type Verdict } from '@vibe-agent-toolkit/claude-marketplace';
|
|
17
|
+
import { type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
18
18
|
/**
|
|
19
19
|
* Convert a verdict into a ValidationIssue using CODE_REGISTRY for severity,
|
|
20
20
|
* fix and reference. Pure function — no I/O.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdict-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/verdict-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"verdict-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/verdict-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,OAAO,EACb,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAGjF;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,eAAe,CAUlF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,SAAS,WAAW,EAAE,EACpC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,EAChD,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,GACnB,eAAe,EAAE,CAkBnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,yBAAyB,EACjC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,EAChD,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,GACnB,IAAI,CAcN"}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* nor in marketplace (which knows nothing about config-level packaging
|
|
13
13
|
* options).
|
|
14
14
|
*/
|
|
15
|
-
import { CODE_REGISTRY } from '@vibe-agent-toolkit/agent-schema';
|
|
16
15
|
import { computeVerdicts, resolveEffectiveTargets, } from '@vibe-agent-toolkit/claude-marketplace';
|
|
16
|
+
import { CODE_REGISTRY } from '@vibe-agent-toolkit/schema';
|
|
17
17
|
import { issueLocation } from '@vibe-agent-toolkit/utils';
|
|
18
18
|
/**
|
|
19
19
|
* Convert a verdict into a ValidationIssue using CODE_REGISTRY for severity,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdict-helpers.js","sourceRoot":"","sources":["../../src/utils/verdict-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"verdict-helpers.js","sourceRoot":"","sources":["../../src/utils/verdict-helpers.ts"],"names":[],"mappings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c,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAiC,EACjC,aAAgD,EAChD,eAAuB,EACvB,YAAoB;IAEpB,MAAM,aAAa,GAAG,qBAAqB,CACzC,MAAM,CAAC,YAAY,EACnB,aAAa,EACb,eAAe,EACf,YAAY,CACb,CAAC;IACF,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO;IACT,CAAC;IACD,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;IACxC,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,EAAE,CAAC;QAC/D,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC;IAC1B,CAAC;AACH,CAAC"}
|
package/docs/agent.md
CHANGED
|
@@ -70,7 +70,7 @@ spec:
|
|
|
70
70
|
type: template
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
See `@vibe-agent-toolkit/
|
|
73
|
+
See `@vibe-agent-toolkit/schema` for complete schema reference.
|
|
74
74
|
|
|
75
75
|
## Examples
|
|
76
76
|
|
|
@@ -120,6 +120,6 @@ for terminology.
|
|
|
120
120
|
|
|
121
121
|
## See Also
|
|
122
122
|
|
|
123
|
-
- [@vibe-agent-toolkit/
|
|
123
|
+
- [@vibe-agent-toolkit/schema](../../schema/README.md) - Schema reference
|
|
124
124
|
- [agent-generator](../../vat-development-agents/agents/agent-generator/README.md) - Example agent
|
|
125
125
|
- [RAG Commands](./rag.md) - Indexing documentation for RAG tools
|
package/docs/mcp.md
CHANGED
|
@@ -152,8 +152,8 @@ MCP agent packages must export collections via the `/mcp-collections` entrypoint
|
|
|
152
152
|
### Example: `src/mcp-collections.ts`
|
|
153
153
|
|
|
154
154
|
```typescript
|
|
155
|
-
import type { Agent, OneShotAgentOutput } from '@vibe-agent-toolkit/
|
|
156
|
-
import { createSuccess } from '@vibe-agent-toolkit/
|
|
155
|
+
import type { Agent, OneShotAgentOutput } from '@vibe-agent-toolkit/schema';
|
|
156
|
+
import { createSuccess } from '@vibe-agent-toolkit/schema';
|
|
157
157
|
|
|
158
158
|
export interface MCPAgentRegistration {
|
|
159
159
|
name: string;
|
package/docs/resources.md
CHANGED
|
@@ -31,16 +31,23 @@ including link integrity checking and anchor validation.
|
|
|
31
31
|
- `--debug` - Enable debug logging
|
|
32
32
|
- `--verbose` - Add a `files:` list with per-file link/anchor counts and checksums
|
|
33
33
|
- `--collection <id>` - Only report files in the named collection (config mode — no path argument)
|
|
34
|
+
- `--format <format>` - `yaml` (default) or `json`. The same document either way
|
|
34
35
|
|
|
35
36
|
**Exit Codes:**
|
|
36
37
|
- `0` - Always (scan is informational)
|
|
37
38
|
- `2` - System error (file access, parsing error)
|
|
38
39
|
|
|
39
|
-
**Output:** YAML on stdout, logs on stderr
|
|
40
|
+
**Output:** YAML on stdout (JSON with `--format json`), logs on stderr
|
|
40
41
|
|
|
41
42
|
`root` is stated once and is the only absolute path in the document; every
|
|
42
43
|
`path` beneath it is relative to it.
|
|
43
44
|
|
|
45
|
+
`lane` names which enumerator produced the population — `walk` (the default
|
|
46
|
+
crawl) or `projection` (`VAT_RESOURCES_CRAWL=projection`). Two scans of one tree
|
|
47
|
+
that report different populations are only interpretable if each says which lane
|
|
48
|
+
produced it, so the field is derived from the load that ran rather than read back
|
|
49
|
+
from the environment.
|
|
50
|
+
|
|
44
51
|
**Example:**
|
|
45
52
|
```bash
|
|
46
53
|
# Recursively scan all *.md files under docs/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibe-agent-toolkit/cli",
|
|
3
|
-
"version": "0.2.0-rc.
|
|
3
|
+
"version": "0.2.0-rc.3",
|
|
4
4
|
"description": "Command-line interface for vibe-agent-toolkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -46,16 +46,14 @@
|
|
|
46
46
|
"//dependencies-note": "DO NOT add example agent packages or adopter packages here. Adopter packages (like vat-development-agents) depend on the CLI binary at build time — declaring them as deps creates a circular build dependency. They are built in a second turbo pass via package#task overrides in turbo.json.",
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@anthropic-ai/sdk": "^0.71.2",
|
|
49
|
-
"@vibe-agent-toolkit/agent-config": "0.2.0-rc.
|
|
50
|
-
"@vibe-agent-toolkit/
|
|
51
|
-
"@vibe-agent-toolkit/agent-skills": "0.2.0-rc.
|
|
52
|
-
"@vibe-agent-toolkit/claude-marketplace": "0.2.0-rc.
|
|
53
|
-
"@vibe-agent-toolkit/discovery": "0.2.0-rc.
|
|
54
|
-
"@vibe-agent-toolkit/gateway-mcp": "0.2.0-rc.
|
|
55
|
-
"@vibe-agent-toolkit/
|
|
56
|
-
"@vibe-agent-toolkit/
|
|
57
|
-
"@vibe-agent-toolkit/resources": "0.2.0-rc.1",
|
|
58
|
-
"@vibe-agent-toolkit/utils": "0.2.0-rc.1",
|
|
49
|
+
"@vibe-agent-toolkit/agent-config": "0.2.0-rc.3",
|
|
50
|
+
"@vibe-agent-toolkit/schema": "0.2.0-rc.3",
|
|
51
|
+
"@vibe-agent-toolkit/agent-skills": "0.2.0-rc.3",
|
|
52
|
+
"@vibe-agent-toolkit/claude-marketplace": "0.2.0-rc.3",
|
|
53
|
+
"@vibe-agent-toolkit/discovery": "0.2.0-rc.3",
|
|
54
|
+
"@vibe-agent-toolkit/gateway-mcp": "0.2.0-rc.3",
|
|
55
|
+
"@vibe-agent-toolkit/resources": "0.2.0-rc.3",
|
|
56
|
+
"@vibe-agent-toolkit/utils": "0.2.0-rc.3",
|
|
59
57
|
"adm-zip": "^0.6.0",
|
|
60
58
|
"commander": "^12.1.0",
|
|
61
59
|
"picomatch": "^4.0.3",
|
|
@@ -70,7 +68,7 @@
|
|
|
70
68
|
"@types/picomatch": "^4.0.2",
|
|
71
69
|
"@types/semver": "^7.7.1",
|
|
72
70
|
"@types/tar": "^6.1.13",
|
|
73
|
-
"@vibe-agent-toolkit/dev-tools": "0.2.0-rc.
|
|
71
|
+
"@vibe-agent-toolkit/dev-tools": "0.2.0-rc.3",
|
|
74
72
|
"rimraf": "^6.0.1",
|
|
75
73
|
"typescript": "^5.7.3",
|
|
76
74
|
"vitest": "^3.2.4"
|
|
@@ -81,5 +79,10 @@
|
|
|
81
79
|
"repository": {
|
|
82
80
|
"type": "git",
|
|
83
81
|
"url": "https://github.com/jdutton/vibe-agent-toolkit.git"
|
|
82
|
+
},
|
|
83
|
+
"optionalDependencies": {
|
|
84
|
+
"@vibe-agent-toolkit/projection-sqlite": "workspace:*",
|
|
85
|
+
"@vibe-agent-toolkit/rag": "workspace:*",
|
|
86
|
+
"@vibe-agent-toolkit/rag-lancedb": "workspace:*"
|
|
84
87
|
}
|
|
85
88
|
}
|