@vibe-agent-toolkit/cli 0.2.0-rc.3 → 0.2.0-rc.4

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 (115) hide show
  1. package/dist/bin/vat +2 -1
  2. package/dist/bin/vat.js +2 -1
  3. package/dist/bin/vat.js.map +1 -1
  4. package/dist/bin.js +2 -1
  5. package/dist/bin.js.map +1 -1
  6. package/dist/commands/audit/distributed-tree.d.ts +1 -1
  7. package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
  8. package/dist/commands/audit/distributed-tree.js +2 -1
  9. package/dist/commands/audit/distributed-tree.js.map +1 -1
  10. package/dist/commands/audit/git-url-clone.d.ts +1 -1
  11. package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
  12. package/dist/commands/audit/git-url-clone.js.map +1 -1
  13. package/dist/commands/audit.d.ts.map +1 -1
  14. package/dist/commands/audit.js +2 -1
  15. package/dist/commands/audit.js.map +1 -1
  16. package/dist/commands/build.d.ts.map +1 -1
  17. package/dist/commands/build.js +14 -11
  18. package/dist/commands/build.js.map +1 -1
  19. package/dist/commands/cache/cache-control.d.ts +16 -7
  20. package/dist/commands/cache/cache-control.d.ts.map +1 -1
  21. package/dist/commands/cache/cache-control.js +17 -8
  22. package/dist/commands/cache/cache-control.js.map +1 -1
  23. package/dist/commands/claude/budget.js +1 -1
  24. package/dist/commands/claude/budget.js.map +1 -1
  25. package/dist/commands/claude/context.d.ts +138 -9
  26. package/dist/commands/claude/context.d.ts.map +1 -1
  27. package/dist/commands/claude/context.js +450 -80
  28. package/dist/commands/claude/context.js.map +1 -1
  29. package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
  30. package/dist/commands/claude/marketplace/git-publish.js +2 -1
  31. package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
  32. package/dist/commands/claude/marketplace/validate.d.ts +18 -0
  33. package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
  34. package/dist/commands/claude/marketplace/validate.js +40 -20
  35. package/dist/commands/claude/marketplace/validate.js.map +1 -1
  36. package/dist/commands/claude/plugin/build.d.ts +17 -1
  37. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  38. package/dist/commands/claude/plugin/build.js +45 -16
  39. package/dist/commands/claude/plugin/build.js.map +1 -1
  40. package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
  41. package/dist/commands/claude/plugin/helpers.js +2 -1
  42. package/dist/commands/claude/plugin/helpers.js.map +1 -1
  43. package/dist/commands/claude/plugin/install.d.ts.map +1 -1
  44. package/dist/commands/claude/plugin/install.js +2 -1
  45. package/dist/commands/claude/plugin/install.js.map +1 -1
  46. package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
  47. package/dist/commands/claude/plugin/tree-copy.js +2 -1
  48. package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
  49. package/dist/commands/consistency-check.d.ts.map +1 -1
  50. package/dist/commands/consistency-check.js +2 -1
  51. package/dist/commands/consistency-check.js.map +1 -1
  52. package/dist/commands/corpus/runner.d.ts.map +1 -1
  53. package/dist/commands/corpus/runner.js +2 -1
  54. package/dist/commands/corpus/runner.js.map +1 -1
  55. package/dist/commands/corpus/scan.d.ts.map +1 -1
  56. package/dist/commands/corpus/scan.js +2 -1
  57. package/dist/commands/corpus/scan.js.map +1 -1
  58. package/dist/commands/doctor.d.ts.map +1 -1
  59. package/dist/commands/doctor.js +3 -2
  60. package/dist/commands/doctor.js.map +1 -1
  61. package/dist/commands/inventory.js +1 -1
  62. package/dist/commands/inventory.js.map +1 -1
  63. package/dist/commands/phase-utils.d.ts +154 -103
  64. package/dist/commands/phase-utils.d.ts.map +1 -1
  65. package/dist/commands/phase-utils.js +109 -155
  66. package/dist/commands/phase-utils.js.map +1 -1
  67. package/dist/commands/resources/scan.d.ts.map +1 -1
  68. package/dist/commands/resources/scan.js +1 -1
  69. package/dist/commands/resources/scan.js.map +1 -1
  70. package/dist/commands/resources/validate.d.ts +11 -0
  71. package/dist/commands/resources/validate.d.ts.map +1 -1
  72. package/dist/commands/resources/validate.js +96 -48
  73. package/dist/commands/resources/validate.js.map +1 -1
  74. package/dist/commands/skill/test/run.d.ts.map +1 -1
  75. package/dist/commands/skill/test/run.js +11 -2
  76. package/dist/commands/skill/test/run.js.map +1 -1
  77. package/dist/commands/skills/build.d.ts +10 -0
  78. package/dist/commands/skills/build.d.ts.map +1 -1
  79. package/dist/commands/skills/build.js +83 -25
  80. package/dist/commands/skills/build.js.map +1 -1
  81. package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
  82. package/dist/commands/skills/skill-discovery.js +2 -1
  83. package/dist/commands/skills/skill-discovery.js.map +1 -1
  84. package/dist/commands/skills/validate.d.ts +78 -1
  85. package/dist/commands/skills/validate.d.ts.map +1 -1
  86. package/dist/commands/skills/validate.js +67 -32
  87. package/dist/commands/skills/validate.js.map +1 -1
  88. package/dist/commands/validate.d.ts.map +1 -1
  89. package/dist/commands/validate.js +26 -16
  90. package/dist/commands/validate.js.map +1 -1
  91. package/dist/commands/verify.d.ts +9 -8
  92. package/dist/commands/verify.d.ts.map +1 -1
  93. package/dist/commands/verify.js +46 -35
  94. package/dist/commands/verify.js.map +1 -1
  95. package/dist/utils/command-error.d.ts +32 -1
  96. package/dist/utils/command-error.d.ts.map +1 -1
  97. package/dist/utils/command-error.js +33 -9
  98. package/dist/utils/command-error.js.map +1 -1
  99. package/dist/utils/population-wiring.d.ts +47 -6
  100. package/dist/utils/population-wiring.d.ts.map +1 -1
  101. package/dist/utils/population-wiring.js +45 -2
  102. package/dist/utils/population-wiring.js.map +1 -1
  103. package/dist/utils/projection-store.d.ts +6 -4
  104. package/dist/utils/projection-store.d.ts.map +1 -1
  105. package/dist/utils/projection-store.js +7 -5
  106. package/dist/utils/projection-store.js.map +1 -1
  107. package/dist/utils/resource-loader.d.ts +1 -1
  108. package/dist/utils/resource-loader.d.ts.map +1 -1
  109. package/dist/utils/resource-loader.js +11 -1
  110. package/dist/utils/resource-loader.js.map +1 -1
  111. package/package.json +13 -13
  112. package/dist/commands/resources/command-helpers.d.ts +0 -5
  113. package/dist/commands/resources/command-helpers.d.ts.map +0 -1
  114. package/dist/commands/resources/command-helpers.js +0 -6
  115. package/dist/commands/resources/command-helpers.js.map +0 -1
@@ -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
- * `vat validate`, `vat verify` and `vat build` enumerate nothing in their own
31
- * process: each `spawnSync`s the vat binary once per phase, and the child is
32
- * what parses the corpus. A flag parsed in the parent therefore never reaches
33
- * the process whose caching it is supposed to control, whereas `process.env` is
34
- * inherited by every child for free. `bin.ts` already leans on exactly that for
35
- * `VAT_CONTEXT` / `VAT_CONTEXT_PATH`.
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;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"}
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
- * `vat validate`, `vat verify` and `vat build` enumerate nothing in their own
20
- * process: each `spawnSync`s the vat binary once per phase, and the child is
21
- * what parses the corpus. A flag parsed in the parent therefore never reaches
22
- * the process whose caching it is supposed to control, whereas `process.env` is
23
- * inherited by every child for free. `bin.ts` already leans on exactly that for
24
- * `VAT_CONTEXT` / `VAT_CONTEXT_PATH`.
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 (also applies to spawned phases)");
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD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,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","sourceRoot":"","sources":["../../../src/commands/claude/budget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,+BAA+B,EAC/B,oCAAoC,EACpC,wBAAwB,GAGzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,GAGhB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,8B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IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,mDAAmD,EAAE,EAAE,CAAC,CAAC;IAC5F,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,OAAO,OAAO,CAAC,QAAQ,IAAI,eAAe,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 both renderings obey
34
- * that identically — see {@link ContextEnvelope} for why. Attaching them per
35
- * answer was not a formatting preference: on a `--all` sweep of this repository
36
- * (6,224 answers) `--format json` measured 76,877,016 bytes and measures
37
- * 6,581,468 with the block hoisted — 70.3 MB of ONE byte-identical paragraph,
38
- * repeated. That is the JSON spelling of the very burial
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
- * @param pathArg - The path to answer for, or undefined for the current directory
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,EASL,KAAK,YAAY,EAEjB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EAExB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAgB5C,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,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,MAAM,CA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