@vibe-agent-toolkit/cli 0.2.0-rc.3 → 0.2.0-rc.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.
- package/dist/bin/vat +2 -1
- package/dist/bin/vat.js +2 -1
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +37 -3
- package/dist/bin.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 +2 -1
- package/dist/commands/audit/distributed-tree.js.map +1 -1
- package/dist/commands/audit/git-url-clone.d.ts +1 -1
- package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
- package/dist/commands/audit/git-url-clone.js.map +1 -1
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +25 -6
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +14 -11
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cache/cache-control.d.ts +16 -7
- package/dist/commands/cache/cache-control.d.ts.map +1 -1
- package/dist/commands/cache/cache-control.js +17 -8
- package/dist/commands/cache/cache-control.js.map +1 -1
- package/dist/commands/claude/budget.js +1 -1
- package/dist/commands/claude/budget.js.map +1 -1
- package/dist/commands/claude/context.d.ts +138 -9
- package/dist/commands/claude/context.d.ts.map +1 -1
- package/dist/commands/claude/context.js +450 -80
- package/dist/commands/claude/context.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +2 -1
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate.d.ts +18 -0
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +40 -20
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/plugin/build.d.ts +17 -1
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +45 -16
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
- package/dist/commands/claude/plugin/helpers.js +2 -1
- package/dist/commands/claude/plugin/helpers.js.map +1 -1
- package/dist/commands/claude/plugin/install.d.ts.map +1 -1
- package/dist/commands/claude/plugin/install.js +2 -2
- package/dist/commands/claude/plugin/install.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +2 -1
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/consistency-check.d.ts.map +1 -1
- package/dist/commands/consistency-check.js +2 -1
- package/dist/commands/consistency-check.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +3 -20
- 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 +2 -1
- package/dist/commands/corpus/scan.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +3 -2
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory.js +2 -2
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/phase-utils.d.ts +154 -103
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +109 -155
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/resources/check-progress.d.ts +145 -0
- package/dist/commands/resources/check-progress.d.ts.map +1 -0
- package/dist/commands/resources/check-progress.js +205 -0
- package/dist/commands/resources/check-progress.js.map +1 -0
- package/dist/commands/resources/check-supervisor.d.ts +465 -0
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -0
- package/dist/commands/resources/check-supervisor.js +566 -0
- package/dist/commands/resources/check-supervisor.js.map +1 -0
- package/dist/commands/resources/check.d.ts +454 -0
- package/dist/commands/resources/check.d.ts.map +1 -0
- package/dist/commands/resources/check.js +1237 -0
- package/dist/commands/resources/check.js.map +1 -0
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +277 -6
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query.d.ts +89 -0
- package/dist/commands/resources/query.d.ts.map +1 -0
- package/dist/commands/resources/query.js +146 -0
- package/dist/commands/resources/query.js.map +1 -0
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +2 -2
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate.d.ts +11 -0
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +96 -48
- package/dist/commands/resources/validate.js.map +1 -1
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +11 -2
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build.d.ts +10 -0
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +83 -25
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/install.js +0 -1
- package/dist/commands/skills/install.js.map +1 -1
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +6 -3
- package/dist/commands/skills/skill-discovery.js.map +1 -1
- package/dist/commands/skills/validate.d.ts +78 -1
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +67 -32
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +26 -16
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +9 -8
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +46 -35
- package/dist/commands/verify.js.map +1 -1
- package/dist/utils/agent-runner.d.ts.map +1 -1
- package/dist/utils/agent-runner.js +7 -3
- package/dist/utils/agent-runner.js.map +1 -1
- package/dist/utils/command-error.d.ts +88 -2
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +98 -11
- 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 +10 -3
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/issue-severity.d.ts +12 -5
- 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/population-wiring.d.ts +47 -6
- package/dist/utils/population-wiring.d.ts.map +1 -1
- package/dist/utils/population-wiring.js +45 -2
- package/dist/utils/population-wiring.js.map +1 -1
- package/dist/utils/projection-query.d.ts +263 -0
- package/dist/utils/projection-query.d.ts.map +1 -0
- package/dist/utils/projection-query.js +262 -0
- package/dist/utils/projection-query.js.map +1 -0
- package/dist/utils/projection-store.d.ts +110 -6
- package/dist/utils/projection-store.d.ts.map +1 -1
- package/dist/utils/projection-store.js +133 -9
- package/dist/utils/projection-store.js.map +1 -1
- package/dist/utils/resource-loader.d.ts +1 -1
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +11 -1
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/vat-bin-path.d.ts +36 -0
- package/dist/utils/vat-bin-path.d.ts.map +1 -0
- package/dist/utils/vat-bin-path.js +49 -0
- package/dist/utils/vat-bin-path.js.map +1 -0
- package/package.json +25 -14
- package/dist/commands/resources/command-helpers.d.ts +0 -5
- package/dist/commands/resources/command-helpers.d.ts.map +0 -1
- package/dist/commands/resources/command-helpers.js +0 -6
- package/dist/commands/resources/command-helpers.js.map +0 -1
package/dist/commands/build.js
CHANGED
|
@@ -16,8 +16,10 @@ import { loadConfig } from '../utils/config-loader.js';
|
|
|
16
16
|
import { sumSeverityCounts } from '../utils/issue-rendering.js';
|
|
17
17
|
import { writeYamlOutput } from '../utils/output.js';
|
|
18
18
|
import { requireProjectRoot } from '../utils/project-root-policy.js';
|
|
19
|
+
import { runClaudePluginBuildPhase } from './claude/plugin/build.js';
|
|
19
20
|
import { aggregatePhaseIssueCounts, aggregatePhaseStatus, applyPhaseSelection, createPhaseContext, decidePhaseSelection, exitCodeForPhases, runPhase, SYSTEM_ERROR, worseOf, } from './phase-utils.js';
|
|
20
21
|
import { rejectPositionalArguments } from './positional-args.js';
|
|
22
|
+
import { runSkillsBuildPhase } from './skills/build.js';
|
|
21
23
|
export function createBuildTopLevelCommand() {
|
|
22
24
|
const command = new Command('build');
|
|
23
25
|
command
|
|
@@ -65,9 +67,8 @@ Exit Codes:
|
|
|
65
67
|
0 - All phases completed successfully (warnings do not fail a build)
|
|
66
68
|
1 - Build error, or '--only' named a phase that is unrecognized or unconfigured
|
|
67
69
|
2 - System error (this command's own, a usage error such as a positional
|
|
68
|
-
argument, or propagated from a phase that could not run: exited 2,
|
|
69
|
-
|
|
70
|
-
parsed)
|
|
70
|
+
argument, or propagated from a phase that could not run: it exited 2, or
|
|
71
|
+
reported 'system-error' for itself)
|
|
71
72
|
|
|
72
73
|
Requirements:
|
|
73
74
|
projectRoot: required (errors if no vibe-agent-toolkit.config.yaml or .git/ ancestor)
|
|
@@ -188,15 +189,14 @@ const BUILD_VOCABULARY = {
|
|
|
188
189
|
*/
|
|
189
190
|
export function selectBuildPhases(only, hasClaudeMarketplaces, verbose = false) {
|
|
190
191
|
const phases = [];
|
|
191
|
-
//
|
|
192
|
-
//
|
|
193
|
-
//
|
|
194
|
-
const verboseArgs = verbose ? ['--verbose'] : [];
|
|
192
|
+
// A flag not forwarded here is a flag the composite command silently cannot
|
|
193
|
+
// express: `vat build` would always get the collapsed report with no way to
|
|
194
|
+
// ask for the full one.
|
|
195
195
|
if (!only || only === 'skills') {
|
|
196
|
-
phases.push({ name: 'skills',
|
|
196
|
+
phases.push({ name: 'skills', run: () => runSkillsBuildPhase(undefined, { verbose }) });
|
|
197
197
|
}
|
|
198
198
|
if ((!only || only === 'claude') && hasClaudeMarketplaces) {
|
|
199
|
-
phases.push({ name: 'claude',
|
|
199
|
+
phases.push({ name: 'claude', run: () => runClaudePluginBuildPhase({ verbose }) });
|
|
200
200
|
}
|
|
201
201
|
return decidePhaseSelection(only, phases, BUILD_VOCABULARY);
|
|
202
202
|
}
|
|
@@ -209,7 +209,7 @@ async function buildTopLevelCommand(options, command) {
|
|
|
209
209
|
const cwd = process.cwd();
|
|
210
210
|
// Spec §7: `vat build` requires a projectRoot.
|
|
211
211
|
requireProjectRoot(cwd, 'vat build');
|
|
212
|
-
const { logger, startTime
|
|
212
|
+
const { logger, startTime } = createPhaseContext(options.debug);
|
|
213
213
|
try {
|
|
214
214
|
// Inside the try, deliberately: this used to throw from outside it, so an
|
|
215
215
|
// unroutable `--only` produced a raw stack trace and zero bytes of stdout.
|
|
@@ -223,7 +223,10 @@ async function buildTopLevelCommand(options, command) {
|
|
|
223
223
|
let shippedLinkIssues = [];
|
|
224
224
|
for (const phase of phases) {
|
|
225
225
|
logger.info(`\n▶ Phase: ${phase.name}`);
|
|
226
|
-
|
|
226
|
+
// Awaited in the loop, deliberately, and here it is a DEPENDENCY rather
|
|
227
|
+
// than a presentation choice: `claude` packages what `skills` just wrote
|
|
228
|
+
// into dist/, so overlapping the two would read a half-built tree.
|
|
229
|
+
const result = await runPhase(phase);
|
|
227
230
|
phaseResults.push(result);
|
|
228
231
|
// Only a real failure stops the build. A `warning` phase must NOT abort:
|
|
229
232
|
// warnings are non-blocking everywhere else in VAT, and phase status only
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EACL,yBAAyB,EACzB,eAAe,GAEhB,MAAM,4BA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C1B,CAAC,CAAC;QAEH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;AACH,CAAC"}
|
|
@@ -27,16 +27,25 @@ export interface CacheControlOptions {
|
|
|
27
27
|
*
|
|
28
28
|
* ## Why this sets an environment variable instead of plumbing a flag
|
|
29
29
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* the
|
|
34
|
-
*
|
|
35
|
-
*
|
|
30
|
+
* ⚠️ The ORIGINAL reason has expired, and saying so is the point of this note.
|
|
31
|
+
* It was that `vat validate` / `vat verify` / `vat build` enumerated nothing in
|
|
32
|
+
* their own process — each `spawnSync`ed the vat binary once per phase, so a
|
|
33
|
+
* flag parsed in the parent never reached the process doing the parsing, while
|
|
34
|
+
* `process.env` crossed the boundary for free. Phases run in this process now,
|
|
35
|
+
* so that argument no longer holds.
|
|
36
|
+
*
|
|
37
|
+
* What still holds is narrower but sufficient: the flag has to reach code that
|
|
38
|
+
* no CLI option is threaded through. `ParseCache` is constructed deep inside
|
|
39
|
+
* `@vibe-agent-toolkit/resources`, by callers several layers below any command,
|
|
40
|
+
* and `bin.ts` leans on the same mechanism for `VAT_CONTEXT` /
|
|
41
|
+
* `VAT_CONTEXT_PATH`. Plumbing a `noCache` parameter down every one of those
|
|
42
|
+
* call chains is the alternative, and it is a real one — this is now a choice
|
|
43
|
+
* rather than a necessity, so treat it as revisitable rather than as settled.
|
|
36
44
|
*
|
|
37
45
|
* `VAT_CACHE=0` is read by `ParseCache` (packages/resources/src/parse-cache.ts)
|
|
38
46
|
* per construction, never at module load, so setting it from a `preAction` hook
|
|
39
|
-
* — after Commander has parsed, before any command body runs — is observed
|
|
47
|
+
* — after Commander has parsed, before any command body runs — is observed by
|
|
48
|
+
* every phase, all of which now start after that hook has run.
|
|
40
49
|
*
|
|
41
50
|
* ## The collision with `vat resources validate --no-cache`
|
|
42
51
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache-control.d.ts","sourceRoot":"","sources":["../../../src/commands/cache/cache-control.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED
|
|
1
|
+
{"version":3,"file":"cache-control.d.ts","sourceRoot":"","sources":["../../../src/commands/cache/cache-control.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAM3D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,mBAAmB,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI,CAWhG"}
|
|
@@ -16,16 +16,25 @@
|
|
|
16
16
|
*
|
|
17
17
|
* ## Why this sets an environment variable instead of plumbing a flag
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* the
|
|
23
|
-
*
|
|
24
|
-
*
|
|
19
|
+
* ⚠️ The ORIGINAL reason has expired, and saying so is the point of this note.
|
|
20
|
+
* It was that `vat validate` / `vat verify` / `vat build` enumerated nothing in
|
|
21
|
+
* their own process — each `spawnSync`ed the vat binary once per phase, so a
|
|
22
|
+
* flag parsed in the parent never reached the process doing the parsing, while
|
|
23
|
+
* `process.env` crossed the boundary for free. Phases run in this process now,
|
|
24
|
+
* so that argument no longer holds.
|
|
25
|
+
*
|
|
26
|
+
* What still holds is narrower but sufficient: the flag has to reach code that
|
|
27
|
+
* no CLI option is threaded through. `ParseCache` is constructed deep inside
|
|
28
|
+
* `@vibe-agent-toolkit/resources`, by callers several layers below any command,
|
|
29
|
+
* and `bin.ts` leans on the same mechanism for `VAT_CONTEXT` /
|
|
30
|
+
* `VAT_CONTEXT_PATH`. Plumbing a `noCache` parameter down every one of those
|
|
31
|
+
* call chains is the alternative, and it is a real one — this is now a choice
|
|
32
|
+
* rather than a necessity, so treat it as revisitable rather than as settled.
|
|
25
33
|
*
|
|
26
34
|
* `VAT_CACHE=0` is read by `ParseCache` (packages/resources/src/parse-cache.ts)
|
|
27
35
|
* per construction, never at module load, so setting it from a `preAction` hook
|
|
28
|
-
* — after Commander has parsed, before any command body runs — is observed
|
|
36
|
+
* — after Commander has parsed, before any command body runs — is observed by
|
|
37
|
+
* every phase, all of which now start after that hook has run.
|
|
29
38
|
*
|
|
30
39
|
* ## The collision with `vat resources validate --no-cache`
|
|
31
40
|
*
|
|
@@ -46,7 +55,7 @@
|
|
|
46
55
|
* @param program - The root program to register the flag and hook on
|
|
47
56
|
*/
|
|
48
57
|
export function registerCacheControl(program) {
|
|
49
|
-
program.option('--no-cache', "Disable VAT's disk caches for this run (
|
|
58
|
+
program.option('--no-cache', "Disable VAT's disk caches for this run (every phase included)");
|
|
50
59
|
program.hook('preAction', (_thisCommand, actionCommand) => {
|
|
51
60
|
applyCacheControl(program.opts(), actionCommand);
|
|
52
61
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache-control.js","sourceRoot":"","sources":["../../../src/commands/cache/cache-control.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAeH
|
|
1
|
+
{"version":3,"file":"cache-control.js","sourceRoot":"","sources":["../../../src/commands/cache/cache-control.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAeH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,+DAA+D,CAAC,CAAC;IAE9F,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,EAAE;QACxD,iBAAiB,CAAC,OAAO,CAAC,IAAI,EAAuB,EAAE,aAAa,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAAC,WAAgC,EAAE,aAAsB;IACxF,IAAI,WAAW,CAAC,KAAK,KAAK,KAAK;QAAE,OAAO;IAExC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,GAAG,CAAC;IAE/B,uEAAuE;IACvE,0EAA0E;IAC1E,kDAAkD;IAClD,IAAI,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,OAAO,CAAC,EAAE,CAAC;QAC/E,aAAa,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
|
|
@@ -261,7 +261,7 @@ function warnUnmatched(unmatched, logger) {
|
|
|
261
261
|
async function sweepBudgets(root, threshold, logger) {
|
|
262
262
|
const projection = await withPopulationCache({ root }, async (cache) => {
|
|
263
263
|
const gitTracker = await gitTrackerForProjectRoot(root);
|
|
264
|
-
return buildClaudeContextPopulation({ root, ...populationWiring(logger, gitTracker, cache) });
|
|
264
|
+
return buildClaudeContextPopulation({ root, ...populationWiring(logger, gitTracker, cache, root) });
|
|
265
265
|
});
|
|
266
266
|
return sweepAlwaysLoadedBudgets(projection, threshold);
|
|
267
267
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"budget.js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e,EAAE,CAAC,CAAC;QAC5F,KAAK,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QACnC,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,UAAU,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QACnE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,SAAS,cAAc,CAAC,SAA4B;IAClD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACtC,OAAO;QACL,gCAAgC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACtD,iFAAiF;QACjF,EAAE;KACH,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -30,13 +30,24 @@
|
|
|
30
30
|
* domain content owned beside the list it frames, so every other consumer of the
|
|
31
31
|
* list reaches it too.
|
|
32
32
|
*
|
|
33
|
-
* ⛔ They belong to the ENVELOPE, never to an answer, and
|
|
34
|
-
* that identically — see {@link ContextEnvelope} for why.
|
|
35
|
-
* answer was not a formatting preference: on
|
|
36
|
-
* (6,224 answers) `--format json`
|
|
37
|
-
* 6,581,468 with the block hoisted — 70.3
|
|
38
|
-
* repeated. That is the JSON spelling of the
|
|
39
|
-
* {@link renderEnvelopeText} refuses to do in text
|
|
33
|
+
* ⛔ They belong to the ENVELOPE, never to an answer or a region, and every
|
|
34
|
+
* rendering obeys that identically — see {@link ContextEnvelope} for why.
|
|
35
|
+
* Attaching them per answer was not a formatting preference: on the whole-tree
|
|
36
|
+
* sweep `--all` used to be (6,224 answers on this repository) `--format json`
|
|
37
|
+
* measured 76,877,016 bytes and measures 6,581,468 with the block hoisted — 70.3
|
|
38
|
+
* MB of ONE byte-identical paragraph, repeated. That is the JSON spelling of the
|
|
39
|
+
* very burial {@link renderEnvelopeText} refuses to do in text, and it is why
|
|
40
|
+
* {@link ContextCostMapEnvelope} hoists the same block rather than growing one
|
|
41
|
+
* per region.
|
|
42
|
+
*
|
|
43
|
+
* ## `--all` is a MAP, not a sweep
|
|
44
|
+
*
|
|
45
|
+
* ⛔ `--all` emits no per-path documents in any format. It used to answer for
|
|
46
|
+
* every realized path — 10,438 documents and 205,918 lines on a large adopter
|
|
47
|
+
* monorepo, ~491 s — which is not a report anyone reads. It now emits the
|
|
48
|
+
* whole-tree cost map {@link buildContextCostMap} builds, which answers the
|
|
49
|
+
* question the flag exists for: where in this tree is it expensive to work.
|
|
50
|
+
* Naming paths is the drill-down, and is the only way to get a per-path answer.
|
|
40
51
|
*
|
|
41
52
|
* ⛔ Nothing here may read as "complete". Many of the stated limits are signed
|
|
42
53
|
* `over-report`/`under-report` and apply whether or not `unknownTokenRows`,
|
|
@@ -48,8 +59,30 @@
|
|
|
48
59
|
* one, and the same reasoning is why an unrealized path answers `unknown` rather
|
|
49
60
|
* than an empty table.
|
|
50
61
|
*/
|
|
51
|
-
import { type AccountedRow, type ContextTotals, type DiscoverableContext, type GradedCondition, type LoadedContextAnswer, type ModelledBehaviour, type Projection, type StatedLimit } from '@vibe-agent-toolkit/resources';
|
|
62
|
+
import { type AccountedRow, type ContextCostMap, type ContextTotals, type DiscoverableContext, type GradedCondition, type LoadedContextAnswer, type ModelledBehaviour, type Projection, type StatedLimit } from '@vibe-agent-toolkit/resources';
|
|
52
63
|
import { Command } from 'commander';
|
|
64
|
+
/**
|
|
65
|
+
* How many rows each RANKED section of the `--all` cost map prints.
|
|
66
|
+
*
|
|
67
|
+
* ⛔ A cap exists because the previous shape of `--all` had none: it answered for
|
|
68
|
+
* every realized path, which on a large adopter monorepo was 10,438 documents and
|
|
69
|
+
* 205,918 lines — an output nobody, human or agent, can act on. The map collapses
|
|
70
|
+
* that to two ranked lists, and a ranked list is only useful if its head is
|
|
71
|
+
* readable in one screen. 20 is that head: enough that a real hot spot is
|
|
72
|
+
* somewhere in it, few enough that the whole report stays scannable.
|
|
73
|
+
*
|
|
74
|
+
* ⛔ It bounds the TEXT rendering ONLY. `--format json` carries the map whole —
|
|
75
|
+
* see {@link ContextCostMapEnvelope} — because a program asked for the map, not
|
|
76
|
+
* for a summary of it, and a silently-truncated array is a defect a consumer
|
|
77
|
+
* cannot see.
|
|
78
|
+
*
|
|
79
|
+
* ⛔ Whenever it fires, {@link omittedNotice} says how many rows were left out. A
|
|
80
|
+
* silent cap reads as "this is everything", which is the one thing this report
|
|
81
|
+
* must never say. Exported so a test pins the notice's arithmetic against the
|
|
82
|
+
* same number the renderer slices at, rather than against a literal that is free
|
|
83
|
+
* to disagree with it.
|
|
84
|
+
*/
|
|
85
|
+
export declare const COST_MAP_ROW_LIMIT = 20;
|
|
53
86
|
/** How the answer is rendered. `text` is for a person; the other two are for a program. */
|
|
54
87
|
export type ContextOutputFormat = 'text' | 'yaml' | 'json';
|
|
55
88
|
/** Flags `vat claude context` accepts. */
|
|
@@ -78,6 +111,17 @@ export interface ClaudeContextOptions {
|
|
|
78
111
|
* is pure duplication, byte-identical every time.
|
|
79
112
|
*/
|
|
80
113
|
export interface ContextEnvelope {
|
|
114
|
+
/**
|
|
115
|
+
* Which of this command's two documents this is.
|
|
116
|
+
*
|
|
117
|
+
* ⛔ A SHAPE discriminator, not a version. `--all` emits
|
|
118
|
+
* {@link ContextCostMapEnvelope} and everything else emits this one; the two
|
|
119
|
+
* share only `root` and the limit block, so a consumer that guessed would read
|
|
120
|
+
* `answers` off a map and silently get `undefined`. It says nothing about a
|
|
121
|
+
* schema generation — under pre-1.0 the package version is the only contract,
|
|
122
|
+
* and this project prohibits emitting a second versioning scheme.
|
|
123
|
+
*/
|
|
124
|
+
readonly kind: 'context-answers';
|
|
81
125
|
readonly root: string;
|
|
82
126
|
readonly answers: readonly (ContextAnswerDocument | ContextUnknownDocument)[];
|
|
83
127
|
/** What these answers do not settle, in either direction. Stated once. */
|
|
@@ -87,6 +131,45 @@ export interface ContextEnvelope {
|
|
|
87
131
|
/** The vendor behaviours modelled, each cited. Stated once. */
|
|
88
132
|
readonly modelledBehaviours: readonly ModelledBehaviour[];
|
|
89
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* The envelope `--all` emits: the whole-tree cost map, not a pile of answers.
|
|
136
|
+
*
|
|
137
|
+
* ⛔ **A DIFFERENT document from {@link ContextEnvelope}, deliberately, and
|
|
138
|
+
* `kind` is what tells them apart.** `--all` used to answer for every realized
|
|
139
|
+
* path — 10,438 documents on a large adopter monorepo — which answered the
|
|
140
|
+
* question "what loads at each of ten thousand paths" nobody asked, in place of
|
|
141
|
+
* "where is it expensive to work here", which is what the flag is for. Naming
|
|
142
|
+
* paths explicitly is still the per-path answer, and is now the only way to get
|
|
143
|
+
* one.
|
|
144
|
+
*
|
|
145
|
+
* ⛔ The three limit fields ride HERE, exactly as they ride on
|
|
146
|
+
* {@link ContextEnvelope}, and for the same measured reason: attached per row
|
|
147
|
+
* they were 70.3 MB of one byte-identical paragraph on a single sweep. They bound
|
|
148
|
+
* the MEASUREMENT METHOD, so a region carrying its own copy would also read as
|
|
149
|
+
* though that region had caveats of its own.
|
|
150
|
+
*
|
|
151
|
+
* 🔑 `costMap` is nested rather than spread across the envelope so that "the
|
|
152
|
+
* limits are on the envelope and on nothing inside it" is a structural property a
|
|
153
|
+
* reader can check by eye, rather than an invariant maintained by hand at each
|
|
154
|
+
* new field.
|
|
155
|
+
*/
|
|
156
|
+
export interface ContextCostMapEnvelope {
|
|
157
|
+
/** Which of this command's two documents this is — see {@link ContextEnvelope.kind}. */
|
|
158
|
+
readonly kind: 'context-cost-map';
|
|
159
|
+
readonly root: string;
|
|
160
|
+
/**
|
|
161
|
+
* The map WHOLE — every region and every directory, never the text
|
|
162
|
+
* rendering's top {@link COST_MAP_ROW_LIMIT}. A program asked for the map, and
|
|
163
|
+
* a silently-shortened array is a truncation its consumer cannot detect.
|
|
164
|
+
*/
|
|
165
|
+
readonly costMap: ContextCostMap;
|
|
166
|
+
/** What this map does not settle, in either direction. Stated once. */
|
|
167
|
+
readonly boundsStatement: string;
|
|
168
|
+
/** The signed over/under-report bounds on the method. Stated once. */
|
|
169
|
+
readonly limits: readonly StatedLimit[];
|
|
170
|
+
/** The vendor behaviours modelled, each cited. Stated once. */
|
|
171
|
+
readonly modelledBehaviours: readonly ModelledBehaviour[];
|
|
172
|
+
}
|
|
90
173
|
/**
|
|
91
174
|
* The yaml/json document for a path the projection realizes.
|
|
92
175
|
*
|
|
@@ -144,7 +227,13 @@ export declare function createContextCommand(): Command;
|
|
|
144
227
|
/**
|
|
145
228
|
* Action handler for `vat claude context [path]`.
|
|
146
229
|
*
|
|
147
|
-
*
|
|
230
|
+
* ⛔ The two branches produce DIFFERENT documents and there is no third mode: a
|
|
231
|
+
* `--per-path` escape hatch back to the old sweep is exactly the backward
|
|
232
|
+
* compatibility shim this project forbids pre-1.0, and naming paths explicitly
|
|
233
|
+
* already gives the per-path answer — now from a population the caller pays for
|
|
234
|
+
* once instead of ten thousand times.
|
|
235
|
+
*
|
|
236
|
+
* @param pathArgs - The paths to answer for; empty means the current directory
|
|
148
237
|
* @param options - The command's flags
|
|
149
238
|
*/
|
|
150
239
|
export declare function claudeContextCommand(pathArgs: readonly string[], options: ClaudeContextOptions): Promise<void>;
|
|
@@ -187,6 +276,46 @@ export declare function answerDocument(answer: LoadedContextAnswer, projection:
|
|
|
187
276
|
* @returns The envelope, ready to serialize
|
|
188
277
|
*/
|
|
189
278
|
export declare function contextEnvelope(root: string, answers: readonly (ContextAnswerDocument | ContextUnknownDocument)[]): ContextEnvelope;
|
|
279
|
+
/**
|
|
280
|
+
* Wrap the `--all` cost map in its envelope, with the limits attached ONCE.
|
|
281
|
+
*
|
|
282
|
+
* The mirror of {@link contextEnvelope}, and deliberately its own function rather
|
|
283
|
+
* than a generic over both: the two envelopes differ in more than one field, and
|
|
284
|
+
* a shared builder taking a payload would make `kind` a parameter — which is how
|
|
285
|
+
* a discriminator stops discriminating.
|
|
286
|
+
*
|
|
287
|
+
* ⛔ Exported so a test can pin, over a many-region map, that the limit block
|
|
288
|
+
* appears exactly ONCE in the serialized document. Presence passes on a copy per
|
|
289
|
+
* region, which is the 70.3 MB defect this command already shipped once.
|
|
290
|
+
*
|
|
291
|
+
* @param root - The corpus root that was enumerated
|
|
292
|
+
* @param costMap - The whole-tree cost map, carried entire
|
|
293
|
+
* @returns The envelope, ready to serialize
|
|
294
|
+
*/
|
|
295
|
+
export declare function costMapEnvelope(root: string, costMap: ContextCostMap): ContextCostMapEnvelope;
|
|
296
|
+
/**
|
|
297
|
+
* Render the `--all` cost map for a person: where in this tree it is expensive
|
|
298
|
+
* to work.
|
|
299
|
+
*
|
|
300
|
+
* Four sections, in the order a reader needs them — the region table (what each
|
|
301
|
+
* part of the tree costs at launch), the regions' own files (what they are paying
|
|
302
|
+
* for), the directories that cost the most to work in overall, and what the map
|
|
303
|
+
* looked at — then the limits, ONCE.
|
|
304
|
+
*
|
|
305
|
+
* ⛔ Every ranked section is capped at {@link COST_MAP_ROW_LIMIT} and every cap
|
|
306
|
+
* that fires announces itself. ⛔ Nothing here sums an unknown into a total or
|
|
307
|
+
* calls any figure complete: the counted-not-summed rows are printed beside each
|
|
308
|
+
* estimate, and the stated limits apply whether or not those counters are zero.
|
|
309
|
+
*
|
|
310
|
+
* ⛔ Exported so the properties above can be TESTED with inputs a real tree never
|
|
311
|
+
* produces — a null token count, more directories than the cap. On this repository
|
|
312
|
+
* every file has a measured blob, so an assertion driven by a real run compares
|
|
313
|
+
* `false === false` and would keep passing against a `?? 0`.
|
|
314
|
+
*
|
|
315
|
+
* @param map - The whole-tree cost map from `buildContextCostMap`
|
|
316
|
+
* @returns The text rendering, newline-terminated
|
|
317
|
+
*/
|
|
318
|
+
export declare function renderCostMapText(map: ContextCostMap): string;
|
|
190
319
|
/**
|
|
191
320
|
* What one row costs, or why it costs nothing.
|
|
192
321
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/commands/claude/context.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/commands/claude/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,OAAO,EAUL,KAAK,YAAY,EAEjB,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,KAAK,mBAAmB,EAExB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAEf,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAgB5C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAuBrC,2FAA2F;AAC3F,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3D,0CAA0C;AAC1C,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,qBAAqB,GAAG,sBAAsB,CAAC,EAAE,CAAC;IAC9E,0EAA0E;IAC1E,QAAQ,CAAC,eAAe,EAAE,MAA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